vendor: 17,536 bytes, lines 1-9
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/write-for-us-p0_8Dc_B.js","assets/createLucideIcon-Bo4p3jxk.js","assets/page-shell-BkHU4ZHn.js","assets/breadcrumbs-2ui9fpbi.js","assets/link-CLAHg8W-.js","assets/react-dom-BU1tAmT5.js","assets/tutorials-Z54KZG7X.js","assets/tools-C3GSsaba.js","assets/terms-CdcsRvDn.js","assets/tags-DodtOhUB.js","assets/software-CTmZql89.js","assets/software-card-B_tSBf4B.js","assets/badge-C4DYFprf.js","assets/utils-DXalBF5w.js","assets/dist-BoCXHNLl.js","assets/input-DKd_wJaC.js","assets/select-BgqQzp-h.js","assets/dist-BTDqJLgD.js","assets/dist-O58egqQq.js","assets/dist-BNHdRSc4.js","assets/dist-Dr_dIS2Z.js","assets/check-qA-b_yBu.js","assets/slider-DPp-9yfo.js","assets/search-CECWZP5I.js","assets/privacy-CjsIceOC.js","assets/pricing-guides-Db5LcrU4.js","assets/newsletter-DcpRmFT3.js","assets/methodology-CVnZ8Lhs.js","assets/industries-BPDSyGQY.js","assets/guides-BKTdyiAS.js","assets/fact-checking-policy-BD1XjKZ-.js","assets/editorial-policy-CnKQnrWB.js","assets/disclaimer-Dfh8gaTe.js","assets/cookie-policy-CQWFm7qQ.js","assets/contact-BgS2XQb9.js","assets/label-DKDm7fv8.js","assets/compare-D1qO8TlP.js","assets/categories-CNUF8gxP.js","assets/careers-C_OAtRy8.js","assets/bookmarks-CUeEe9uD.js","assets/best-CEyWRZtk.js","assets/authors-DNlgxpKt.js","assets/articles-CY5IwW7T.js","assets/affiliate-disclosure-rF2_4MJ1.js","assets/advertise-CcIA0RnG.js","assets/accessibility-CA89BoqM.js","assets/about-5E5GVTlb.js","assets/routes-B3skBfvM.js","assets/accordion-5_fA8oED.js","assets/shield-check-bZjSivOQ.js","assets/category._slug-mKwxNAm_.js","assets/tools.vendor-scorecard-pxuNSi5e.js","assets/tools.software-finder-DyOBZ4fQ.js","assets/tools.saas-cost-calculator-9BV4yvf6.js","assets/tools.roi-calculator-kX924X8y.js","assets/tags._slug-BTUsAJfR.js","assets/software._slug-BAz6Tw5o.js","assets/share-bar-BJeB1N62.js","assets/industries._slug-BzJLsxtV.js","assets/best._slug-BWmrG1tF.js","assets/authors._slug-Ogocnz16.js","assets/articles._slug-4He8_ScQ.js"])))=>i.map(i=>d[i]); 2import{a as e,i as t,n,r,t as i}from"./createLucideIcon-Bo4p3jxk.js";import{t as a}from"./react-dom-BU1tAmT5.js";import{A as o,B as s,C as c,D as l,E as u,F as d,I as f,L as p,M as m,N as h,O as g,P as _,R as v,S as y,T as b,_ as x,a as ee,b as te,c as ne,d as re,f as ie,g as ae,h as oe,i as se,j as ce,k as le,l as ue,m as de,n as fe,o as S,p as C,r as pe,s as me,t as w,u as he,v as ge,w as _e,x as ve,y as ye,z as be}from"./link-CLAHg8W-.js";import{t as xe}from"./utils-DXalBF5w.js";import{t as Se}from"./dist-BNHdRSc4.js";import{t as Ce}from"./dist-BoCXHNLl.js";var we=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,oe());else{var t=n(l);t!==null&&le(x,t.startTime-e)}}var ee=!1,te=-1,ne=5,re=-1;function ie(){return g?!0:!(e.unstable_now()-re<ne)}function ae(){if(g=!1,ee){var t=e.unstable_now();re=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ie());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():ee=!1}}}var oe;if(typeof y==`function`)oe=function(){y(ae)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ae,oe=function(){ce.postMessage(null)}}else oe=function(){_(ae,0)};function le(t,n){te=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,le(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,oe()))),r},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Te=t(((e,t)=>{t.exports=we()})),Ee=t((e=>{var t=Te(),n=r(),i=a();function o(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(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 l(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 u(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(c(e)!==e)throw Error(o(188))}function f(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return d(i),e;if(a===r)return d(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),ee=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),re=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),ae=Symbol.for(`react.lazy`),oe=Symbol.for(`react.activity`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function de(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case ne:return`Suspense`;case re:return`SuspenseList`;case oe:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case ee:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case ae:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var fe=Array.isArray,S=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],w=-1;function he(e){return{current:e}}function ge(e){0>w||(e.current=me[w],me[w]=null,w--)}function _e(e,t){w++,me[w]=e.current,e.current=t}var ve=he(null),ye=he(null),be=he(null),xe=he(null);function Se(e,t){switch(_e(be,t),_e(ye,e),_e(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ge(ve),_e(ve,e)}function Ce(){ge(ve),ge(ye),ge(be)}function we(e){e.memoizedState!==null&&_e(xe,e);var t=ve.current,n=Yd(t,e.type);t!==n&&(_e(ye,e),_e(ve,n))}function Ee(e){ye.current===e&&(ge(ve),ge(ye)),xe.current===e&&(ge(xe),ip._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1<e.stack.indexOf(` 3 at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return` 4`+De+e+Oe}var Ae=!1;function je(e,t){if(!e||Ae)return``;Ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(` 5`),l=s.split(` 6`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=` 7`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return` 8Error generating stack: `+e.message+` 9`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ft(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ft(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function mt(e,t){var n=t&-t;return n=n&42?1:ht(n),(n&(e.suspendedLanes|t))===0?n:0}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function gt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function _t(){var e=C.p;return e===0?(e=window.event,e===void 0?32:bp(e.type)):e}function vt(e,t){var n=C.p;try{return C.p=e,t()}finally{C.p=n}}var yt=Math.random().toString(36).slice(2),bt=`__reactFiber$`+yt,xt=`__reactProps$`+yt,St=`__reactContainer$`+yt,Ct=`__reactEvents$`+yt,wt=`__reactListeners$`+yt,Tt=`__reactHandles$`+yt,Et=`__reactResources$`+yt,Dt=`__reactMarker$`+yt;function Ot(e){delete e[bt],delete e[xt],delete e[Ct],delete e[wt],delete e[Tt]}function kt(e){var t=e[bt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[St]||n[bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vf(e);e!==null;){if(n=e[bt])return n;e=vf(e)}return t}e=n,n=e.parentNode}return null}function At(e){if(e=e[bt]||e[St]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Mt(e){var t=e[Et];return t||=e[Et]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Nt(e){e[Dt]=!0}var Pt=new Set,Ft={};function It(e,t){Lt(e,t),Lt(e+`Capture`,t)}function Lt(e,t){for(Ft[e]=t,e=0;e<t.length;e++)Pt.add(t[e])}var Rt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
9037D\\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]*$`),zt={},Bt={};function Vt(e){return Pe.call(Bt,e)?!0:Pe.call(zt,e)?!1:Rt.test(e)?Bt[e]=!0:(zt[e]=!0,!1)}function Ht(e,t,n){if(Vt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ut(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Wt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Gt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function qt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jt(e){if(!e._valueTracker){var t=Kt(e)?`checked`:`value`;e._valueTracker=qt(e,t,``+e[t])}}function Yt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Kt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Xt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Zt=/[\n"\\]/g;function Qt(e){return e.replace(Zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function $t(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Gt(t)):e.value!==``+Gt(t)&&(e.value=``+Gt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):tn(e,o,Gt(n)):tn(e,o,Gt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Gt(s):e.removeAttribute(`name`)}function en(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Jt(e);return}n=n==null?``:``+Gt(n),t=t==null?n:``+Gt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Jt(e)}function tn(e,t,n){t===`number`&&Xt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function nn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Gt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function rn(e,t,n){if(t!=null&&(t=``+Gt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Gt(n)}function an(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(o(92));if(fe(r)){if(1<r.length)throw Error(o(93));r=r[0]}n=r}n??=``,t=n}
vendor: 9,498 bytes, line 9
9n=Gt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Jt(e)}function on(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function cn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||sn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function ln(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(o(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&cn(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&cn(e,a,t[a])}function un(e){if(e.indexOf(`-`)===-1)return!1;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 dn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),fn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function pn(e){return fn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function mn(){}var hn=null;function gn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _n=null,vn=null;function yn(e){var t=At(e);if(t&&(e=t.stateNode)){var n=e[xt]||null;a:switch(e=t.stateNode,t.type){case`input`:if($t(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Qt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[xt]||null;if(!i)throw Error(o(90));$t(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Yt(r)}break a;case`textarea`:rn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&nn(e,!!n.multiple,t,!1)}}}var bn=!1;function xn(e,t,n){if(bn)return e(t,n);bn=!0;try{return e(t)}finally{if(bn=!1,(_n!==null||vn!==null)&&(Ou(),_n&&(t=_n,e=vn,vn=_n=null,yn(t),e)))for(t=0;t<e.length;t++)yn(e[t])}}function Sn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[xt]||null;if(r===null)return null;n=r[t];a: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 a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(o(231,t,typeof n));return n}var Cn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),wn=!1;if(Cn)try{var Tn={};Object.defineProperty(Tn,"passive",{get:function(){wn=!0}}),window.addEventListener(`test`,Tn,Tn),window.removeEventListener(`test`,Tn,Tn)}catch{wn=!1}var En=null,Dn=null,On=null;function kn(){if(On)return On;var e,t=Dn,n=t.length,r,i=`value`in En?En.value:En.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return On=i.slice(e,1<r?1-r:void 0)}function An(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 jn(){return!0}function Mn(){return!1}function E(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?jn:Mn,this.isPropagationStopped=Mn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=jn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=jn)},persist:function(){},isPersistent:jn}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=E(Nn),Fn=m({},Nn,{view:0,detail:0}),D=E(Fn),In,Ln,Rn,zn=m({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xn,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!==Rn&&(Rn&&e.type===`mousemove`?(In=e.screenX-Rn.screenX,Ln=e.screenY-Rn.screenY):Ln=In=0,Rn=e),In)},movementY:function(e){return`movementY`in e?e.movementY:Ln}}),Bn=E(zn),Vn=E(m({},zn,{dataTransfer:0})),Hn=E(m({},Fn,{relatedTarget:0})),Un=E(m({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Wn=E(m({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Gn=E(m({},Nn,{data:0})),Kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},qn={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:`F
95`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Yn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jn[e])?!!t[e]:!1}function Xn(){return Yn}var Zn=E(m({},Fn,{key:function(e){if(e.key){var t=Kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=An(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xn,charCode:function(e){return e.type===`keypress`?An(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?An(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Qn=E(m({},zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),$n=E(m({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xn})),er=E(m({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),tr=E(m({},zn,{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})),nr=E(m({},Nn,{newState:0,oldState:0})),rr=[9,13,27,32],ir=Cn&&`CompositionEvent`in window,ar=null;Cn&&`documentMode`in document&&(ar=document.documentMode);var or=Cn&&`TextEvent`in window&&!ar,sr=Cn&&(!ir||ar&&8<ar&&11>=ar),cr=` `,lr=!1;function ur(e,t){switch(e){case`keyup`:return rr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function dr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var fr=!1;function pr(e,t){switch(e){case`compositionend`:return dr(t);case`keypress`:return t.which===32?(lr=!0,cr):null;case`textInput`:return e=t.data,e===cr&&lr?null:e;default:return null}}function mr(e,t){if(fr)return e===`compositionend`||!ir&&ur(e,t)?(e=kn(),On=Dn=En=null,fr=!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 sr&&t.locale!==`ko`?null:t.data;default:return null}}var hr={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 gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!hr[e.type]:t===`textarea`}function _r(e,t,n,r){_n?vn?vn.push(r):vn=[r]:_n=r,t=Nd(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var vr=null,yr=null;function br(e){Ed(e,0)}function xr(e){if(Yt(jt(e)))return e}function Sr(e,t){if(e===`change`)return t}var Cr=!1;if(Cn){var wr;if(Cn){var Tr=`oninput`in document;if(!Tr){var Er=document.createElement(`div`);Er.setAttribute(`oninput`,`return;`),Tr=typeof Er.oninput==`function`}wr=Tr}else wr=!1;Cr=wr&&(!document.documentMode||9<document.documentMode)}function Dr(){vr&&(vr.detachEvent(`onpropertychange`,Or),yr=vr=null)}function Or(e){if(e.propertyName===`value`&&xr(yr)){var t=[];_r(t,yr,e,gn(e)),xn(br,t)}}function kr(e,t,n){e===`focusin`?(Dr(),vr=t,yr=n,vr.attachEvent(`onpropertychange`,Or)):e===`focusout`&&Dr()}function Ar(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return xr(yr)}function jr(e,t){if(e===`click`)return xr(t)}function Mr(e,t){if(e===`input`||e===`change`)return xr(t)}function Nr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Pr=typeof Object.is==`function`?Object.is:Nr;function Fr(e,t){if(Pr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)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 i=n[r];if(!Pe.call(t,i)||!Pr(e[i],t[i]))return!1}return!0}function Ir(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lr(e,t){var n=Ir(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}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ir(n)}}function Rr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xt(e.document)}return t}function Br(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`)}var Vr=Cn&&`documentMode`in document&&11>=document.documentMode,Hr=null,Ur=null,Wr=null,Gr=!1;function Kr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gr||Hr==null||Hr!==Xt(r)||(r=Hr,`selectionStart`in r&&Br(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 76,558 bytes, line 9
9sNode:r.focusNode,focusOffset:r.focusOffset}),Wr&&Fr(Wr,r)||(Wr=r,r=Nd(Ur,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Hr)))}function qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Jr={animationend:qr(`Animation`,`AnimationEnd`),animationiteration:qr(`Animation`,`AnimationIteration`),animationstart:qr(`Animation`,`AnimationStart`),transitionrun:qr(`Transition`,`TransitionRun`),transitionstart:qr(`Transition`,`TransitionStart`),transitioncancel:qr(`Transition`,`TransitionCancel`),transitionend:qr(`Transition`,`TransitionEnd`)},Yr={},Xr={};Cn&&(Xr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),`TransitionEvent`in window||delete Jr.transitionend.transition);function Zr(e){if(Yr[e])return Yr[e];if(!Jr[e])return e;var t=Jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xr)return Yr[e]=t[n];return e}var Qr=Zr(`animationend`),$r=Zr(`animationiteration`),ei=Zr(`animationstart`),ti=Zr(`transitionrun`),ni=Zr(`transitionstart`),ri=Zr(`transitioncancel`),ii=Zr(`transitionend`),ai=new Map,oi=`abort auxClick beforeToggle 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(` `);oi.push(`scrollEnd`);function si(e,t){ai.set(e,t),It(t,[e])}var ci=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},li=[],ui=0,di=0;function fi(){for(var e=ui,t=di=ui=0;t<e;){var n=li[t];li[t++]=null;var r=li[t];li[t++]=null;var i=li[t];li[t++]=null;var a=li[t];if(li[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&gi(n,i,a)}}function pi(e,t,n,r){li[ui++]=e,li[ui++]=t,li[ui++]=n,li[ui++]=r,di|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function mi(e,t,n,r){return pi(e,t,n,r),_i(e)}function hi(e,t){return pi(e,null,null,t),_i(e)}function gi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function _i(e){if(50<yu)throw yu=0,bu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vi={};function yi(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.refCleanup=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 bi(e,t,n,r){return new yi(e,t,n,r)}function xi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Si(e,t){var n=e.alternate;return n===null?(n=bi(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&65011712,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.refCleanup=e.refCleanup,n}function Ci(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function wi(e,t,n,r,i,a){var s=0;if(r=e,typeof e==`function`)xi(e)&&(s=1);else if(typeof e==`string`)s=Yf(e,n,ve.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case oe:return e=bi(31,n,t,i),e.elementType=oe,e.lanes=a,e;case v:return Ti(n.children,i,a,t);case y:s=8,i|=24;break;case b:return e=bi(12,n,t,i|2),e.elementType=b,e.lanes=a,e;case ne:return e=bi(13,n,t,i),e.elementType=ne,e.lanes=a,e;case re:return e=bi(19,n,t,i),e.elementType=re,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case ee:s=10;break a;case x:s=9;break a;case te:s=11;break a;case ie:s=14;break a;case ae:s=16,r=null;break a}s=29,n=Error(o(130,e===null?`null`:typeof e,``)),r=null}return t=bi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Ti(e,t,n,r){return e=bi(7,e,r,t),e.lanes=n,e}function Ei(e,t,n){return e=bi(6,e,null,t),e.lanes=n,e}function Di(e){var t=bi(18,null,null,0);return t.stateNode=e,t}function Oi(e,t,n){return t=bi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ki=new WeakMap;function Ai(e,t){if(typeof e==`object`&&e){var n=ki.get(e);return n===void 0?(t={value:e,source:t,stack:Ne(t)},ki.set(e,t),t):n}return{value:e,source:t,stack:Ne(t)}}var ji=[],Mi=0,Ni=null,Pi=0,Fi=[],Ii=0,Li=null,Ri=1,zi=``;function Bi(e,t){ji[Mi++]=Pi,ji[Mi++]=Ni,Ni=e,Pi=t}function Vi(e,t,n){Fi[Ii++]=Ri,Fi[Ii++]=zi,Fi[Ii++]=Li,Li=e;var r=Ri;e=zi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ri=1<<32-Ze(t)+i|n<<i|r,zi=a+e}else Ri=1<<a|n<<i|r,zi=e}function Hi(e){e.return!==null&&(Bi(e,1),Vi(e,1,0))}function Ui(e){for(;e===Ni;)Ni=ji[--Mi],ji[Mi]=null,Pi=ji[--Mi],ji[Mi]=null;for(;e===Li;)Li=Fi[--Ii],Fi[Ii]=null,zi=Fi[--Ii],Fi[Ii]=null,Ri=Fi[--Ii],Fi[Ii]=null}function Wi(e,t){Fi[Ii++]=Ri,Fi[Ii++]=zi,Fi[Ii++]=Li,Ri=t.id,zi=t.overflow,Li=e}var Gi=null,O=null,k=!1,Ki=null,qi=!1,Ji=Error(o(519));function Yi(e){throw ta(Ai(Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ji}function Xi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[bt]=e,t[xt]=r,n){case`dialog`:K(`cancel`,t),K(`close`,t);break;case`iframe`:case`object`:case`embed`:K(`load`,t);break;case`video`:case`audio`:for(n=0;n<wd.length;n++)K(wd[n],t);break;case`source`:K(`error`,t);break;case`img`:case`image`:case`link`:K(`error`,t),K(`load`,t);break;case`details`:K(`toggle`,t);break;case`input`:K(`invalid`,t),en(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:K(`invalid`,t);break;case`textarea`:K(`invalid`,t),an(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||zd(t.textContent,n)?(r.popover!=null&&(K(`beforetoggle`,t),K(`toggle`,t)),r.onScroll!=null&&K(`scroll`,t),r.onScrollEnd!=null&&K(`scrollend`,t),r.onClick!=null&&(t.onclick=mn),t=!0):t=!1,t||Yi(e,!0)}function Zi(e){for(Gi=e.return;Gi;)switch(Gi.tag){case 5:case 31:case 13:qi=!1;return;case 27:case 3:qi=!0;return;default:Gi=Gi.return}}function Qi(e){if(e!==Gi)return!1;if(!k)return Zi(e),k=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Xd(e.type,e.memoizedProps)),n=!n),n&&O&&Yi(e),Zi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));O=_f(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(317));O=_f(e)}else t===27?(t=O,af(e.type)?(e=gf,gf=null,O=e):O=t):O=Gi?hf(e.stateNode.nextSibling):null;return!0}function $i(){O=Gi=null,k=!1}function ea(){var e=Ki;return e!==null&&(ou===null?ou=e:ou.push.apply(ou,e),Ki=null),e}function ta(e){Ki===null?Ki=[e]:Ki.push(e)}var na=he(null),ra=null,ia=null;function aa(e,t,n){_e(na,t._currentValue),t._currentValue=n}function oa(e){e._currentValue=na.current,ge(na)}function sa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ca(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var s=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),sa(a.return,n,e),r||(s=null);break a}a=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(o(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),sa(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function la(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(o(387));if(s=s.memoizedProps,s!==null){var c=i.type;Pr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===xe.current){if(s=i.alternate,s===null)throw Error(o(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[ip]:e.push(ip))}i=i.return}e!==null&&ca(t,e,n,r),t.flags|=262144}function ua(e){for(e=e.firstContext;e!==null;){if(!Pr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function da(e){ra=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function fa(e){return ma(ra,e)}function pa(e,t){return ra===null&&da(e),ma(e,t)}function ma(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ia===null){if(e===null)throw Error(o(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return n}var ha=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ga=t.unstable_scheduleCallback,_a=t.unstable_NormalPriority,va={$$typeof:ee,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ya(){return{controller:new ha,data:new Map,refCount:0}}function ba(e){e.refCount--,e.refCount===0&&ga(_a,function(){e.controller.abort()})}var xa=null,Sa=0,Ca=0,wa=null;function Ta(e,t){if(xa===null){var n=xa=[];Sa=0,Ca=vd(),wa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Sa++,t.then(Ea,Ea),t}function Ea(){if(--Sa===0&&xa!==null){wa!==null&&(wa.status=`fulfilled`);var e=xa;xa=null,Ca=0,wa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Da(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Oa=S.S;S.S=function(e,t){lu=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Ta(e,t),Oa!==null&&Oa(e,t)};var ka=he(null);function Aa(){var e=ka.current;return e===null?z.pooledCache:e}function ja(e,t){t===null?_e(ka,ka.current):_e(ka,t.pool)}function Ma(){var e=Aa();return e===null?null:{parent:va._currentValue,pool:e}}var Na=Error(o(460)),Pa=Error(o(474)),Fa=Error(o(542)),Ia={then:function(){}};function La(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ra(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(mn,mn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ha(e),e;default:if(typeof t.status==`string`)t.then(mn,mn);else{if(e=z,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ha(e),e}throw Ba=t,Na}}function za(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ba=e,Na):e}}var Ba=null;function Va(){if(Ba===null)throw Error(o(459));var e=Ba;return Ba=null,e}function Ha(e){if(e===Na||e===Fa)throw Error(o(483))}var Ua=null,Wa=0;function A(e){var t=Wa;return Wa+=1,Ua===null&&(Ua=[]),Ra(Ua,e,t)}function Ga(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ka(e,t){throw t.$$typeof===h?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function qa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Si(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ei(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===ae&&za(a)===t.type)?(t=i(t,n.props),Ga(t,n),t.return=e,t):(t=wi(n.type,n.key,n.props,null,e.mode,r),Ga(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Oi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Ti(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ei(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=wi(t.type,t.key,t.props,null,e.mode,n),Ga(n,t),n.return=e,n;case _:return t=Oi(t,e.mode,n),t.return=e,t;case ae:return t=za(t),f(e,t,n)}if(fe(t)||le(t))return t=Ti(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,A(t),n);if(t.$$typeof===ee)return f(e,pa(e,t),n);Ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case ae:return n=za(n),p(e,t,n,r)}if(fe(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,A(n),r);if(n.$$typeof===ee)return p(e,t,pa(e,n),r);Ka(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case _:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ae:return r=za(r),m(e,t,n,r,i)}if(fe(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,A(r),i);if(r.$$typeof===ee)return m(e,t,n,pa(t,r),i);Ka(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),k&&Bi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return k&&Bi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),k&&Bi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(o(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=a(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),k&&Bi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return k&&Bi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=a(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),k&&Bi(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===v&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case g:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===v){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ae&&za(l)===r.type){n(e,r.sibling),c=i(r,a.props),Ga(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===v?(c=Ti(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=wi(a.type,a.key,a.props,null,e.mode,c),Ga(c,a),c.return=e,e=c)}return s(e);case _:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Oi(a,e.mode,c),c.return=e,e=c}return s(e);case ae:return a=za(a),b(e,r,a,c)}if(fe(a))return h(e,r,a,c);if(le(a)){if(l=le(a),typeof l!=`function`)throw Error(o(150));return a=l.call(a),y(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,A(a),c);if(a.$$typeof===ee)return b(e,r,pa(e,a),c);Ka(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=Ei(a,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Wa=0;var i=b(e,t,n,r);return Ua=null,i}catch(t){if(t===Na||t===Fa)throw t;var a=bi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ja=qa(!0),Ya=qa(!1),Xa=!1;function Za(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function $a(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function eo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=_i(e),gi(e,null,n),t}return pi(e,r,t,n),_i(e)}function to(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function no(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ro=!1;function io(){if(ro){var e=wa;if(e!==null)throw e}}function ao(e,t,n,r){ro=!1;var i=e.updateQueue;Xa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(V&f)===f:(r&f)===f){f!==0&&f===Ca&&(ro=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Xa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),eu|=o,e.lanes=o,e.memoizedState=d}}function oo(e,t){if(typeof e!=`function`)throw Error(o(191,e));e.call(t)}function so(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)oo(n[e],t)}var co=he(null),lo=he(0);function uo(e,t){e=Ql,_e(lo,e),_e(co,t),Ql=e|t.baseLanes}function fo(){_e(lo,Ql),_e(co,co.current)}function po(){Ql=lo.current,ge(co),ge(lo)}var mo=he(null),ho=null;function go(e){var t=e.alternate;_e(xo,xo.current&1),_e(mo,e),ho===null&&(t===null||co.current!==null||t.memoizedState!==null)&&(ho=e)}function _o(e){_e(xo,xo.current),_e(mo,e),ho===null&&(ho=e)}function vo(e){e.tag===22?(_e(xo,xo.current),_e(mo,e),ho===null&&(ho=e)):yo(e)}function yo(){_e(xo,xo.current),_e(mo,mo.current)}function bo(e){ge(mo),ho===e&&(ho=null),ge(xo)}var xo=he(0);function So(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ff(n)||pf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){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 Co=0,j=null,M=null,wo=null,To=!1,Eo=!1,Do=!1,Oo=0,ko=0,Ao=null,jo=0;function Mo(){throw Error(o(321))}function No(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pr(e[n],t[n]))return!1;return!0}function Po(e,t,n,r,i,a){return Co=a,j=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S.H=e===null||e.memoizedState===null?qs:Js,Do=!1,a=n(r,i),Do=!1,Eo&&(a=Io(t,n,r,i)),Fo(e),a}function Fo(e){S.H=Ks;var t=M!==null&&M.next!==null;if(Co=0,wo=M=j=null,To=!1,ko=0,Ao=null,t)throw Error(o(300));e===null||dc||(e=e.dependencies,e!==null&&ua(e)&&(dc=!0))}function Io(e,t,n,r){j=e;var i=0;do{if(Eo&&(Ao=null),ko=0,Eo=!1,25<=i)throw Error(o(301));if(i+=1,wo=M=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}S.H=Ys,a=t(n,r)}while(Eo);return a}function Lo(){var e=S.H,t=e.useState()[0];return t=typeof t.then==`function`?Ho(t):t,e=e.useState()[0],(M===null?null:M.memoizedState)!==e&&(j.flags|=1024),t}function Ro(){var e=Oo!==0;return Oo=0,e}function zo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Bo(e){if(To){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}To=!1}Co=0,wo=M=j=null,Eo=!1,ko=Oo=0,Ao=null}function N(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wo===null?j.memoizedState=wo=e:wo=wo.next=e,wo}function P(){if(M===null){var e=j.alternate;e=e===null?null:e.memoizedState}else e=M.next;var t=wo===null?j.memoizedState:wo.next;if(t!==null)wo=t,M=e;else{if(e===null)throw j.alternate===null?Error(o(467)):Error(o(310));M=e,e={memoizedState:M.memoizedState,baseState:M.baseState,baseQueue:M.baseQueue,queue:M.queue,next:null},wo===null?j.memoizedState=wo=e:wo=wo.next=e}return wo}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ho(e){var t=ko;return ko+=1,Ao===null&&(Ao=[]),e=Ra(Ao,e,t),t=j,(wo===null?t.memoizedState:wo.next)===null&&(t=t.alternate,S.H=t===null||t.memoizedState===null?qs:Js),e}function Uo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ho(e);if(e.$$typeof===ee)return fa(e)}throw Error(o(438,String(e)))}function Wo(e){var t=null,n=j.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=j.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Vo(),j.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=se;return t.index++,n}function Go(e,t){return typeof t==`function`?t(e):t}function Ko(e){return qo(P(),M,e)}function qo(e,t,n){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Co&f)===f:(V&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ca&&(d=!0);else if((Co&p)===p){u=u.next,p===Ca&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=a):l=l.next=f,j.lanes|=p,eu|=p;f=u.action,Do&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=a):l=l.next=p,j.lanes|=f,eu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=a:l.next=c,!Pr(a,e.memoizedState)&&(dc=!0,d&&(n=wa,n!==null)))throw n;e.memoizedState=a,e.baseState=s,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Jo(e){var t=P(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);Pr(a,t.memoizedState)||(dc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Yo(e,t,n){var r=j,i=P(),a=k;if(a){if(n===void 0)throw Error(o(407));n=n()}else n=t();var s=!Pr((M||i).memoizedState,n);if(s&&(i.memoizedState=n,dc=!0),i=i.queue,bs(Qo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||wo!==null&&wo.memoizedState.tag&1){if(r.flags|=2048,hs(9,{destroy:void 0},Zo.bind(null,r,i,n,t),null),z===null)throw Error(o(349));a||Co&127||Xo(r,t,n)}return n}function Xo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=j.updateQueue,t===null?(t=Vo(),j.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zo(e,t,n,r){t.value=n,t.getSnapshot=r,$o(t)&&es(e)}function Qo(e,t,n){return n(function(){$o(t)&&es(e)})}function $o(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pr(e,n)}catch{return!0}}function es(e){var t=hi(e,2);t!==null&&Cu(t,e,2)}function ts(e){var t=N();if(typeof e==`function`){var n=e;if(e=n(),Do){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t}function ns(e,t,n,r){return e.baseState=n,qo(e,M,typeof r==`function`?r:Go)}function rs(e,t,n,r,i){if(Us(e))throw Error(o(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};S.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,is(t,a)):(a.next=n.next,t.pending=n.next=a)}}function is(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=S.T,o={};S.T=o;try{var s=n(i,r),c=S.S;c!==null&&c(o,s),as(e,t,s)}catch(n){ss(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),S.T=a}}else try{a=n(i,r),as(e,t,a)}catch(n){ss(e,t,n)}}function as(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){os(e,t,n)},function(n){return ss(e,t,n)}):os(e,t,n)}function os(e,t,n){t.status=`fulfilled`,t.value=n,cs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,is(e,n)))}function ss(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,cs(t),t=t.next;while(t!==r)}e.action=null}function cs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ls(e,t){return t}function us(e,t){if(k){var n=z.formState;if(n!==null){a:{var r=j;if(k){if(O){b:{for(var i=O,a=qi;i.nodeType!==8;){if(!a){i=null;break b}if(i=hf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){O=hf(i.nextSibling),r=i.data===`F!`;break a}}Yi(r)}r=!1}r&&(t=n[0])}}return n=N(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:t},n.queue=r,n=Bs.bind(null,j,r),r.dispatch=n,r=ts(!1),a=Hs.bind(null,j,!1,r.queue),r=N(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=rs.bind(null,j,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ds(e){return fs(P(),M,e)}function fs(e,t,n){if(t=qo(e,t,ls)[0],e=Ko(Go)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ho(t)}catch(e){throw e===Na?Fa:e}else r=t;t=P();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(j.flags|=2048,hs(9,{destroy:void 0},ps.bind(null,i,n),null)),[r,a,e]}function ps(e,t){e.action=t}function ms(e){var t=P(),n=M;if(n!==null)return fs(t,n,e);P(),t=t.memoizedState,n=P();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function hs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=j.updateQueue,t===null&&(t=Vo(),j.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function gs(){return P().memoizedState}function _s(e,t,n,r){var i=N();j.flags|=e,i.memoizedState=hs(1|t,{destroy:void 0},n,r===void 0?null:r)}function vs(e,t,n,r){var i=P();r=r===void 0?null:r;var a=i.memoizedState.inst;M!==null&&r!==null&&No(r,M.memoizedState.deps)?i.memoizedState=hs(t,a,n,r):(j.flags|=e,i.memoizedState=hs(1|t,a,n,r))}function ys(e,t){_s(8390656,8,e,t)}function bs(e,t){vs(2048,8,e,t)}function xs(e){j.flags|=4;var t=j.updateQueue;if(t===null)t=Vo(),j.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ss(e){var t=P().memoizedState;return xs({ref:t,nextImpl:e}),function(){if(R&2)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Cs(e,t){return vs(4,2,e,t)}function ws(e,t){return vs(4,4,e,t)}function Ts(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Es(e,t,n){n=n==null?null:n.concat([e]),vs(4,4,Ts.bind(null,t,e),n)}function Ds(){}function F(e,t){var n=P();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&No(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Os(e,t){var n=P();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&No(t,r[1]))return r[0];if(r=e(),Do){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function I(e,t,n){return n===void 0||Co&1073741824&&!(V&261930)?e.memoizedState=t:(e.memoizedState=n,e=Su(),j.lanes|=e,eu|=e,n)}function ks(e,t,n,r){return Pr(n,t)?n:co.current===null?!(Co&42)||Co&1073741824&&!(V&261930)?(dc=!0,e.memoizedState=n):(e=Su(),j.lanes|=e,eu|=e,t):(e=I(e,n,r),Pr(e,t)||(dc=!0),e)}function As(e,t,n,r,i){var a=C.p;C.p=a!==0&&8>a?a:8;var o=S.T,s={};S.T=s,Hs(e,!1,t,n);try{var c=i(),l=S.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Vs(e,t,Da(c,r),xu(e)):Vs(e,t,r,xu(e))}catch(n){Vs(e,t,{then:function(){},status:`rejected`,reason:n},xu())}finally{C.p=a,o!==null&&s.types!==null&&(o.types=s.types),S.T=o}}function js(){}function Ms(e,t,n,r){if(e.tag!==5)throw Error(o(476));var i=Ns(e).queue;As(e,i,t,pe,n===null?js:function(){return Ps(e),n(r)})}function Ns(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ps(e){var t=Ns(e);t.next===null&&(t=e.alternate.memoizedState),Vs(e,t.next.queue,{},xu())}function Fs(){return fa(ip)}function Is(){return P().memoizedState}function Ls(){return P().memoizedState}function Rs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=xu();e=$a(n);var r=eo(t,e,n);r!==null&&(Cu(r,t,n),to(r,t,n)),t={cache:ya()},e.payload=t;return}t=t.return}}function zs(e,t,n){var r=xu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Us(e)?Ws(t,n):(n=mi(e,t,n,r),n!==null&&(Cu(n,e,r),Gs(n,t,r)))}function Bs(e,t,n){Vs(e,t,n,xu())}function Vs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Us(e))Ws(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Pr(s,o))return pi(e,t,i,0),z===null&&fi(),!1}catch{}if(n=mi(e,t,i,r),n!==null)return Cu(n,e,r),Gs(n,t,r),!0}return!1}function Hs(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Us(e)){if(t)throw Error(o(479))}else t=mi(e,n,r,2),t!==null&&Cu(t,e,2)}function Us(e){var t=e.alternate;return e===j||t!==null&&t===j}function Ws(e,t){Eo=To=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var Ks={readContext:fa,use:Uo,useCallback:Mo,useContext:Mo,useEffect:Mo,useImperativeHandle:Mo,useLayoutEffect:Mo,useInsertionEffect:Mo,useMemo:Mo,useReducer:Mo,useRef:Mo,useState:Mo,useDebugValue:Mo,useDeferredValue:Mo,useTransition:Mo,useSyncExternalStore:Mo,useId:Mo,useHostTransitionStatus:Mo,useFormState:Mo,useActionState:Mo,useOptimistic:Mo,useMemoCache:Mo,useCacheRefresh:Mo};Ks.useEffectEvent=Mo;var qs={readContext:fa,use:Uo,useCallback:function(e,t){return N().memoizedState=[e,t===void 0?null:t],e},useContext:fa,useEffect:ys,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),_s(4194308,4,Ts.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){_s(4,2,e,t)},useMemo:function(e,t){var n=N();t=t===void 0?null:t;var r=e();if(Do){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=N();if(n!==void 0){var i=n(t);if(Do){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=zs.bind(null,j,e),[r.memoizedState,e]},useRef:function(e){var t=N();return e={current:e},t.memoizedState=e},useState:function(e){e=ts(e);var t=e.queue,n=Bs.bind(null,j,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ds,useDeferredValue:function(e,t){return I(N(),e,t)},useTransition:function(){var e=ts(!1);return e=As.bind(null,j,e.queue,!0,!1),N().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=j,i=N();if(k){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),z===null)throw Error(o(349));V&127||Xo(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ys(Qo.bind(null,r,a,e),[e]),r.flags|=2048,hs(9,{destroy:void 0},Zo.bind(null,r,a,n,t),null),n},useId:function(){var e=N(),t=z.identifierPrefix;if(k){var n=zi,r=Ri;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Oo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=jo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Fs,useFormState:us,useActionState:us,useOptimistic:function(e){var t=N();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Hs.bind(null,j,!0,n),n.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return N().memoizedState=Rs.bind(null,j)},useEffectEvent:function(e){var t=N(),n={impl:e};return t.memoizedState=n,function(){if(R&2)throw Error(o(440));return n.impl.apply(void 0,arguments)}}},Js={readContext:fa,use:Uo,useCallback:F,useContext:fa,useEffect:bs,useImperativeHandle:Es,useInsertionEffect:Cs,useLayoutEffect:ws,useMemo:Os,useReducer:Ko,useRef:gs,useState:function(){return Ko(Go)},useDebugValue:Ds,useDeferredValue:function(e,t){return ks(P(),M.memoizedState,e,t)},useTransition:function(){var e=Ko(Go)[0],t=P().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Yo,useId:Is,useHostTransitionStatus:Fs,useFormState:ds,useActionState:ds,useOptimistic:function(e,t){return ns(P(),M,e,t)},useMemoCache:Wo,useCacheRefresh:Ls};Js.useEffectEvent=Ss;var Ys={readContext:fa,use:Uo,useCallback:F,useContext:fa,useEffect:bs,useImperativeHandle:Es,useInsertionEffect:Cs,useLayoutEffect:ws,useMemo:Os,useReducer:Jo,useRef:gs,useState:function(){return Jo(Go)},useDebugValue:Ds,useDeferredValue:function(e,t){var n=P();return M===null?I(n,e,t):ks(n,M.memoizedState,e,t)},useTransition:function(){var e=Jo(Go)[0],t=P().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Yo,useId:Is,useHostTransitionStatus:Fs,useFormState:ms,useActionState:ms,useOptimistic:function(e,t){var n=P();return M===null?(n.baseState=e,[e,n.queue.dispatch]):ns(n,M,e,t)},useMemoCache:Wo,useCacheRefresh:Ls};Ys.useEffectEvent=Ss;function Xs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xu(),i=$a(r);i.payload=t,n!=null&&(i.callback=n),t=eo(e,i,r),t!==null&&(Cu(t,e,r),to(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xu(),i=$a(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=eo(e,i,r),t!==null&&(Cu(t,e,r),to(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xu(),r=$a(n);r.tag=2,t!=null&&(r.callback=t),t=eo(e,r,n),t!==null&&(Cu(t,e,n),to(t,e,n))}};function Qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Fr(n,r)||!Fr(i,a):!0}function $s(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&&Zs.enqueueReplaceState(t,t.state,null)}function ec(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function tc(e){ci(e)}function nc(e){console.error(e)}function rc(e){ci(e)}function ic(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ac(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function oc(e,t,n){return n=$a(n),n.tag=3,n.payload={element:null},n.callback=function(){ic(e,t)},n}function sc(e){return e=$a(e),e.tag=3,e}function cc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ac(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ac(t,n,r),typeof i!=`function`&&(fu===null?fu=new Set([this]):fu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function lc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&la(t,n,i,!0),n=mo.current,n!==null){switch(n.tag){case 31:case 13:return ho===null?Fu():n.alternate===null&&$l===0&&($l=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ia?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,i)),!1;case 22:return n.flags|=65536,r===Ia?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),$u(e,r,i)),!1}throw Error(o(435,n.tag))}return $u(e,r,i),Fu(),!1}if(k)return t=mo.current,t===null?(r!==Ji&&(t=Error(o(423),{cause:r}),ta(Ai(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Ai(r,n),i=oc(e.stateNode,r,i),no(e,i),$l!==4&&($l=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ji&&(e=Error(o(422),{cause:r}),ta(Ai(e,n)))),!1;var a=Error(o(520),{cause:r});if(a=Ai(a,n),au===null?au=[a]:au.push(a),$l!==4&&($l=2),t===null)return!0;r=Ai(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=oc(n.stateNode,r,e),no(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(fu===null||!fu.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=sc(i),cc(i,e,n,r),no(n,i),!1}n=n.return}while(n!==null);return!1}var uc=Error(o(461)),dc=!1;function fc(e,t,n,r){t.child=e===null?Ya(t,null,n,r):Ja(t,e.child,n,r)}function pc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return da(t),r=Po(e,t,n,o,a,i),s=Ro(),e!==null&&!dc?(zo(e,t,i),Lc(e,t,i)):(k&&s&&Hi(t),t.flags|=1,fc(e,t,r,i),t.child)}function mc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!xi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,hc(e,t,a,r,i)):(e=wi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Rc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Fr:n,n(o,r)&&e.ref===t.ref)return Lc(e,t,i)}return t.flags|=1,e=Si(a,r),e.ref=t.ref,e.return=t,t.child=e}function hc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Fr(a,r)&&e.ref===t.ref)if(dc=!1,t.pendingProps=r=a,Rc(e,i))e.flags&131072&&(dc=!0);else return t.lanes=e.lanes,Lc(e,t,i)}return Cc(e,t,n,r,i)}function gc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return vc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ja(t,a===null?null:a.cachePool),a===null?fo():uo(t,a),vo(t);else return r=t.lanes=536870912,vc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ja(t,null),fo(),yo(t)):(ja(t,a.cachePool),uo(t,a),yo(t),t.memoizedState=null);return fc(e,t,i,n),t.child}function _c(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function vc(e,t,n,r,i){var a=Aa();return a=a===null?null:{parent:va._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ja(t,null),fo(),vo(t),e!==null&&la(e,t,r,!0),t.childLanes=i,null}function yc(e,t){return t=Mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bc(e,t,n){return Ja(t,e.child,null,n),e=yc(t,t.pendingProps),e.flags|=2,bo(t),t.memoizedState=null,e}function xc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(k){if(r.mode===`hidden`)return e=yc(t,r),t.lanes=536870912,_c(null,e);if(_o(t),(e=O)?(e=df(e,qi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li===null?null:{id:Ri,overflow:zi},retryLane:536870912,hydrationErrors:null},n=Di(e),n.return=t,t.child=n,Gi=t,O=null)):e=null,e===null)throw Yi(t);return t.lanes=536870912,null}return yc(t,r)}var a=e.memoizedState;if(a!==null){var s=a.dehydrated;if(_o(t),i)if(t.flags&256)t.flags&=-257,t=bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(dc||la(e,t,n,!1),i=(n&e.childLanes)!==0,dc||i){if(r=z,r!==null&&(s=mt(r,n),s!==0&&s!==a.retryLane))throw a.retryLane=s,hi(e,s),Cu(r,e,s),uc;Fu(),t=bc(e,t,n)}else e=a.treeContext,O=hf(s.nextSibling),Gi=t,k=!0,Ki=null,qi=!1,e!==null&&Wi(t,e),t=yc(t,r),t.flags|=4096;return t}return e=Si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Sc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(o(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Cc(e,t,n,r,i){return da(t),n=Po(e,t,n,r,void 0,i),r=Ro(),e!==null&&!dc?(zo(e,t,i),Lc(e,t,i)):(k&&r&&Hi(t),t.flags|=1,fc(e,t,n,i),t.child)}function wc(e,t,n,r,i,a){return da(t),t.updateQueue=null,n=Io(t,r,n,i),Fo(e),r=Ro(),e!==null&&!dc?(zo(e,t,a),Lc(e,t,a)):(k&&r&&Hi(t),t.flags|=1,fc(e,t,n,a),t.child)}function Tc(e,t,n,r,i){if(da(t),t.stateNode===null){var a=vi,o=n.contextType;typeof o==`object`&&o&&(a=fa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Za(t),o=n.contextType,a.context=typeof o==`object`&&o?fa(o):vi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Xs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Zs.enqueueReplaceState(a,a.state,null),ao(t,r,a,i),io(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=ec(n,s);a.props=c;var l=a.context,u=n.contextType;o=vi,typeof u==`object`&&u&&(o=fa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&$s(t,a,r,o),Xa=!1;var f=t.memoizedState;a.state=f,ao(t,r,a,i),io(),l=t.memoizedState,s||f!==l||Xa?(typeof d==`function`&&(Xs(t,n,d,r),l=t.memoizedState),(c=Xa||Qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Qa(e,t),o=t.memoizedProps,u=ec(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=vi,typeof l==`object`&&l&&(c=fa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&$s(t,a,r,c),Xa=!1,f=t.memoizedState,a.state=f,ao(t,r,a,i),io();var p=t.memoizedState;o!==d||f!==p||Xa||e!==null&&e.dependencies!==null&&ua(e.dependencies)?(typeof s==`function`&&(Xs(t,n,s,r),p=t.memoizedState),(u=Xa||Qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ua(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Sc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ja(t,e.child,null,i),t.child=Ja(t,null,n,i)):fc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Lc(e,t,i),e}function Ec(e,t,n,r){return $i(),t.flags|=256,fc(e,t,n,r),t.child}var Dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(e){return{baseLanes:e,cachePool:Ma()}}function kc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ru),e}function Ac(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(xo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(k){if(i?go(t):yo(t),(e=O)?(e=df(e,qi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Li===null?null:{id:Ri,overflow:zi},retryLane:536870912,hydrationErrors:null},n=Di(e),n.return=t,t.child=n,Gi=t,O=null)):e=null,e===null)throw Yi(t);return pf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(yo(t),i=t.mode,c=Mc({mode:`hidden`,children:c},i),r=Ti(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Oc(n),r.childLanes=kc(e,s,n),t.memoizedState=Dc,_c(null,r)):(go(t),jc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(go(t),t.flags&=-257,t=Nc(e,t,n)):t.memoizedState===null?(yo(t),c=r.fallback,i=t.mode,r=Mc({mode:`visible`,children:r.children},i),c=Ti(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ja(t,e.child,null,n),r=t.child,r.memoizedState=Oc(n),r.childLanes=kc(e,s,n),t.memoizedState=Dc,t=_c(null,r)):(yo(t),t.child=e.child,t.flags|=128,t=null);else if(go(t),pf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(o(419)),r.stack=``,r.digest=s,ta({value:r,source:null,stack:null}),t=Nc(e,t,n)}else if(dc||la(e,t,n,!1),s=(n&e.childLanes)!==0,dc||s){if(s=z,s!==null&&(r=mt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,hi(e,r),Cu(s,e,r),uc;ff(c)||Fu(),t=Nc(e,t,n)}else ff(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,O=hf(c.nextSibling),Gi=t,k=!0,Ki=null,qi=!1,e!==null&&Wi(t,e),t=jc(t,r.children),t.flags|=4096);return t}return i?(yo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=Si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ti(c,i,n,null),c.flags|=2):c=Si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,_c(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Oc(n):(i=c.cachePool,i===null?i=Ma():(l=va._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=kc(e,s,n),t.memoizedState=Dc,_c(e.child,r)):(go(t),n=e.child,e=n.sibling,n=Si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function jc(e,t){return t=Mc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Mc(e,t){return e=bi(22,e,null,t),e.lanes=0,e}function Nc(e,t,n){return Ja(t,e.child,null,n),e=jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Pc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),sa(e.return,t,n)}function Fc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ic(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=xo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,_e(xo,o),fc(e,t,r,n),r=k?Pi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pc(e,n,t);else if(e.tag===19)Pc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&So(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Fc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&So(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Fc(t,!0,n,null,a,r);break;case`together`:Fc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Lc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),eu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(la(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=Si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Rc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ua(e))):!0}function zc(e,t,n){switch(t.tag){case 3:Se(t,t.stateNode.containerInfo),aa(t,va,e.memoizedState.cache),$i();break;case 27:case 5:we(t);break;case 4:Se(t,t.stateNode.containerInfo);break;case 10:aa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_o(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(go(t),e=Lc(e,t,n),e===null?null:e.sibling):Ac(e,t,n):(go(t),t.flags|=128,null);go(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(la(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ic(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),_e(xo,xo.current),r)break;return null;case 22:return t.lanes=0,gc(e,t,n,t.pendingProps);case 24:aa(t,va,e.memoizedState.cache)}return Lc(e,t,n)}function Bc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)dc=!0;else{if(!Rc(e,n)&&!(t.flags&128))return dc=!1,zc(e,t,n);dc=!!(e.flags&131072)}else dc=!1,k&&t.flags&1048576&&Vi(t,Pi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=za(t.elementType),t.type=e,typeof e==`function`)xi(e)?(r=ec(e,r),t.tag=1,t=Tc(null,t,e,r,n)):(t.tag=0,t=Cc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===te){t.tag=11,t=pc(null,t,e,r,n);break a}else if(i===ie){t.tag=14,t=mc(null,t,e,r,n);break a}}throw t=de(e)||e,Error(o(306,t,``))}}return t;case 0:return Cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=ec(r,t.pendingProps),Tc(e,t,r,i,n);case 3:a:{if(Se(t,t.stateNode.containerInfo),e===null)throw Error(o(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Qa(e,t),ao(t,r,null,n);var s=t.memoizedState;if(r=s.cache,aa(t,va,r),r!==a.cache&&ca(t,[va],n,!0),io(),r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Ec(e,t,r,n);break a}else if(r!==i){i=Ai(Error(o(424)),t),ta(i),t=Ec(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(O=hf(e.firstChild),Gi=t,k=!0,Ki=null,qi=!0,n=Ya(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($i(),r===i){t=Lc(e,t,n);break a}fc(e,t,r,n)}t=t.child}return t;case 26:return Sc(e,t),e===null?(n=Ff(t.type,null,t.pendingProps,null))?t.memoizedState=n:k||(n=t.type,e=t.pendingProps,r=qd(be.current).createElement(n),r[bt]=t,r[xt]=e,Vd(r,n,e),Nt(r),t.stateNode=r):t.memoizedState=Ff(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return we(t),e===null&&k&&(r=t.stateNode=yf(t.type,t.pendingProps,be.current),Gi=t,qi=!0,i=O,af(t.type)?(gf=i,O=hf(r.firstChild)):O=i),fc(e,t,t.pendingProps.children,n),Sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&k&&((i=r=O)&&(r=lf(r,t.type,t.pendingProps,qi),r===null?i=!1:(t.stateNode=r,Gi=t,O=hf(r.firstChild),qi=!1,i=!0)),i||Yi(t)),we(t),i=t.type,a=t.pendingProps,s=e===null?null:e.memoizedProps,r=a.children,Xd(i,a)?r=null:s!==null&&Xd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Po(e,t,Lo,null,null,n),ip._currentValue=i),Sc(e,t),fc(e,t,r,n),t.child;case 6:return e===null&&k&&((e=n=O)&&(n=uf(n,t.pendingProps,qi),n===null?e=!1:(t.stateNode=n,Gi=t,O=null,e=!0)),e||Yi(t)),null;case 13:return Ac(e,t,n);case 4:return Se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ja(t,null,r,n):fc(e,t,r,n),t.child;case 11:return pc(e,t,t.type,t.pendingProps,n);case 7:return fc(e,t,t.pendingProps,n),t.child;case 8:return fc(e,t,t.pendingProps.children,n),t.child;case 12:return fc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,aa(t,t.type,r.value),fc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,da(t),i=fa(i),r=r(i),t.flags|=1,fc(e,t,r,n),t.child;case 14:return mc(e,t,t.type,t.pendingProps,n);case 15:return hc(e,t,t.type,t.pendingProps,n);case 19:return Ic(e,t,n);case 31:return xc(e,t,n);case 22:return gc(e,t,n,t.pendingProps);case 24:return da(t),r=fa(va),e===null?(i=Aa(),i===null&&(i=z,a=ya(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Za(t),aa(t,va,i)):((e.lanes&n)!==0&&(Qa(e,t),ao(t,null,null,n),io()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,aa(t,va,r),r!==i.cache&&ca(t,[va],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),aa(t,va,r))),fc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Vc(e){e.flags|=4}function Hc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Mu())e.flags|=8192;else throw Ba=Ia,Pa}else e.flags&=-16777217}function Uc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xf(t))if(Mu())e.flags|=8192;else throw Ba=Ia,Pa}function Wc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,iu|=t)}function Gc(e,t){if(!k)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 Kc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qc(e,t,n){var r=t.pendingProps;switch(Ui(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kc(t),null;case 1:return Kc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),oa(va),Ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Qi(t)?Vc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ea())),Kc(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Vc(t),a===null?(Kc(t),Hc(t,i,null,r,n)):(Kc(t),Uc(t,a))):a?a===e.memoizedState?(Kc(t),t.flags&=-16777217):(Vc(t),Kc(t),Uc(t,a)):(e=e.memoizedProps,e!==r&&Vc(t),Kc(t),Hc(t,i,e,r,n)),null;case 27:if(Ee(t),n=be.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Kc(t),null}e=ve.current,Qi(t)?Xi(t,e):(e=yf(i,r,n),t.stateNode=e,Vc(t))}return Kc(t),null;case 5:if(Ee(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Kc(t),null}if(a=ve.current,Qi(t))Xi(t,a);else{var s=qd(be.current);switch(a){case 1:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=s.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}a[bt]=t,a[xt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)a.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=a;a:switch(Vd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Vc(t)}}return Kc(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Vc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(o(166));if(e=be.current,Qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Gi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||zd(e.nodeValue,n)),e||Yi(t,!0)}else e=qd(e).createTextNode(r),e[bt]=t,t.stateNode=e}return Kc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Qi(t),n!==null){if(e===null){if(!r)throw Error(o(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(o(557));e[bt]=t}else $i(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kc(t),e=!1}else n=ea(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(bo(t),t):(bo(t),null);if(t.flags&128)throw Error(o(558))}return Kc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(o(317));i[bt]=t}else $i(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Kc(t),i=!1}else i=ea(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(bo(t),t):(bo(t),null)}return bo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Wc(t,t.updateQueue),Kc(t),null);case 4:return Ce(),e===null&&kd(t.stateNode.containerInfo),Kc(t),null;case 10:return oa(t.type),Kc(t),null;case 19:if(ge(xo),r=t.memoizedState,r===null)return Kc(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Gc(r,!1);else{if($l!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=So(e),a!==null){for(t.flags|=128,Gc(r,!1),e=a.updateQueue,t.updateQueue=e,Wc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ci(n,e),n=n.sibling;return _e(xo,xo.current&1|2),k&&Bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>uu&&(t.flags|=128,i=!0,Gc(r,!1),t.lanes=4194304)}else{if(!i)if(e=So(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Wc(t,e),Gc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!k)return Kc(t),null}else 2*ze()-r.renderingStartTime>uu&&n!==536870912&&(t.flags|=128,i=!0,Gc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(Kc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=xo.current,_e(xo,i?n&1|2:n&1),k&&Bi(t,r.treeForkCount),e);case 22:case 23:return bo(t),po(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Kc(t),t.subtreeFlags&6&&(t.flags|=8192)):Kc(t),n=t.updateQueue,n!==null&&Wc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ge(ka),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),oa(va),Kc(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Jc(e,t){switch(Ui(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(va),Ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(bo(t),t.alternate===null)throw Error(o(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(bo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));$i()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(xo),null;case 4:return Ce(),null;case 10:return oa(t.type),null;case 22:case 23:return bo(t),po(),e!==null&&ge(ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(va),null;case 25:return null;default:return null}}function Yc(e,t){switch(Ui(t),t.tag){case 3:oa(va),Ce();break;case 26:case 27:case 5:Ee(t);break;case 4:Ce();break;case 31:t.memoizedState!==null&&bo(t);break;case 13:bo(t);break;case 19:ge(xo);break;case 10:oa(t.type);break;case 22:case 23:bo(t),po(),e!==null&&ge(ka);break;case 24:oa(va)}}function Xc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){W(t,t.return,e)}}function Zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){W(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){W(t,t.return,e)}}function Qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{so(t,n)}catch(t){W(e,e.return,t)}}}function $c(e,t,n){n.props=ec(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){W(e,t,n)}}function el(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){W(e,t,n)}}function tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){W(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){W(e,t,n)}else n.current=null}function nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){W(e,e.return,t)}}function rl(e,t,n){try{var r=e.stateNode;Hd(r,e.type,n,t),r[xt]=t}catch(t){W(e,e.return,t)}}function il(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&af(e.type)||e.tag===4}function al(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||il(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.tag===27&&af(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mn));else if(r!==4&&(r===27&&af(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function sl(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&&(r===27&&af(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function cl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Vd(t,r,n),t[bt]=e,t[xt]=n}catch(t){W(e,e.return,t)}}var ll=!1,ul=!1,dl=!1,fl=typeof WeakSet==`function`?WeakSet:Set,pl=null;function ml(e,t){if(e=e.containerInfo,Gd=pp,e=zr(e),Br(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==a||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===a&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Kd={focusedElem:e,selectionRange:n},pp=!1,pl=t;pl!==null;)if(t=pl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,pl=e;else for(;pl!==null;){switch(t=pl,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=ec(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){W(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:cf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,pl=e;break}pl=t.return}}function hl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:kl(e,n),r&4&&Xc(5,n);break;case 1:if(kl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){W(n,n.return,e)}else{var i=ec(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){W(n,n.return,e)}}r&64&&Qc(n),r&512&&el(n,n.return);break;case 3:if(kl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{so(e,t)}catch(e){W(n,n.return,e)}}break;case 27:t===null&&r&4&&cl(n);case 26:case 5:kl(e,n),t===null&&r&4&&nl(n),r&512&&el(n,n.return);break;case 12:kl(e,n);break;case 31:kl(e,n),r&4&&bl(e,n);break;case 13:kl(e,n),r&4&&xl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),mf(e,n))));break;case 22:if(r=n.memoizedState!==null||ll,!r){t=t!==null&&t.memoizedState!==null||ul,i=ll;var a=ul;ll=r,(ul=t)&&!a?jl(e,n,(n.subtreeFlags&8772)!=0):kl(e,n),ll=i,ul=a}break;case 30:break;default:kl(e,n)}}function gl(e){var t=e.alternate;t!==null&&(e.alternate=null,gl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ot(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var L=null,_l=!1;function vl(e,t,n){for(n=n.child;n!==null;)yl(e,t,n),n=n.sibling}function yl(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:ul||tl(n,t),vl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ul||tl(n,t);var r=L,i=_l;af(n.type)&&(L=n.stateNode,_l=!1),vl(e,t,n),bf(n.stateNode),L=r,_l=i;break;case 5:ul||tl(n,t);case 6:if(r=L,i=_l,L=null,vl(e,t,n),L=r,_l=i,L!==null)if(_l)try{(L.nodeType===9?L.body:L.nodeName===`HTML`?L.ownerDocument.body:L).removeChild(n.stateNode)}catch(e){W(n,t,e)}else try{L.removeChild(n.stateNode)}catch(e){W(n,t,e)}break;case 18:L!==null&&(_l?(e=L,of(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),zp(e)):of(L,n.stateNode));break;case 4:r=L,i=_l,L=n.stateNode.containerInfo,_l=!0,vl(e,t,n),L=r,_l=i;break;case 0:case 11:case 14:case 15:Zc(2,n,t),ul||Zc(4,n,t),vl(e,t,n);break;case 1:ul||(tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&$c(n,t,r)),vl(e,t,n);break;case 21:vl(e,t,n);break;case 22:ul=(r=ul)||n.memoizedState!==null,vl(e,t,n),ul=r;break;default:vl(e,t,n)}}function bl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{zp(e)}catch(e){W(t,t.return,e)}}}function xl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{zp(e)}catch(e){W(t,t.return,e)}}function Sl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new fl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new fl),t;default:throw Error(o(435,e.tag))}}function Cl(e,t){var n=Sl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function wl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(af(c.type)){L=c.stateNode,_l=!1;break a}break;case 5:L=c.stateNode,_l=!1;break a;case 3:case 4:L=c.stateNode.containerInfo,_l=!0;break a}c=c.return}if(L===null)throw Error(o(160));yl(a,s,i),L=null,_l=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)El(t,e),t=t.sibling}var Tl=null;function El(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wl(t,e),Dl(e),r&4&&(Zc(3,e,e.return),Xc(3,e),Zc(5,e,e.return));break;case 1:wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),r&64&&ll&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=Tl;if(wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),r&4){var a=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[Dt]||a[bt]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head >
9 title`))),Vd(a,r,n),a[bt]=e,Nt(a),r=a;break a;case`link`:var s=qf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}a=i.createElement(r),Vd(a,r,n),i.head.appendChild(a);break;case`meta`:if(s=qf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(a=s[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}a=i.createElement(r),Vd(a,r,n),i.head.appendChild(a);break;default:throw Error(o(468,r))}a[bt]=e,Nt(a),r=a}e.stateNode=r}else Jf(i,e.type,e.stateNode);else e.stateNode=Hf(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&rl(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Jf(i,e.type,e.stateNode):Hf(i,r,e.memoizedProps))}break;case 27:wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),n!==null&&r&4&&rl(e,e.memoizedProps,n.memoizedProps);break;case 5:if(wl(t,e),Dl(e),r&512&&(ul||n===null||tl(n,n.return)),e.flags&32){i=e.stateNode;try{on(i,``)}catch(t){W(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,rl(e,i,n===null?i:n.memoizedProps)),r&1024&&(dl=!0);break;case 6:if(wl(t,e),Dl(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){W(e,e.return,t)}}break;case 3:if(Kf=null,i=Tl,Tl=Cf(t.containerInfo),wl(t,e),Tl=i,Dl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zp(t.containerInfo)}catch(t){W(e,e.return,t)}dl&&(dl=!1,Ol(e));break;case 4:r=Tl,Tl=Cf(e.stateNode.containerInfo),wl(t,e),Dl(e),Tl=r;break;case 12:wl(t,e),Dl(e);break;case 31:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 13:wl(t,e),Dl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(cu=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ll,d=ul;if(ll=u||i,ul=d||l,wl(t,e),ul=d,ll=u,Dl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||ll||ul||Al(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)s=a.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){W(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){W(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?sf(m,!0):sf(l.stateNode,!1)}catch(e){W(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Cl(e,n))));break;case 19:wl(t,e),Dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Cl(e,r)));break;case 30:break;case 21:break;default:wl(t,e),Dl(e)}}function Dl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(il(r)){n=r;break}r=r.return}if(n==null)throw Error(o(160));switch(n.tag){case 27:var i=n.stateNode;sl(e,al(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(on(a,``),n.flags&=-33),sl(e,al(e),a);break;case 3:case 4:var s=n.stateNode.containerInfo;ol(e,al(e),s);break;default:throw Error(o(161))}}catch(t){W(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ol(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ol(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function kl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hl(e,t.alternate,t),t=t.sibling}function Al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Zc(4,t,t.return),Al(t);break;case 1:tl(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&$c(t,t.return,n),Al(t);break;case 27:bf(t.stateNode);case 26:case 5:tl(t,t.return),Al(t);break;case 22:t.memoizedState===null&&Al(t);break;case 30:Al(t);break;default:Al(t)}e=e.sibling}}function jl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:jl(i,a,n),Xc(4,a);break;case 1:if(jl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){W(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;
vendor: 36,394 bytes, lines 9-10
9if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)oo(c[i],s)}catch(e){W(r,r.return,e)}}n&&o&64&&Qc(a),el(a,a.return);break;case 27:cl(a);case 26:case 5:jl(i,a,n),n&&r===null&&o&4&&nl(a),el(a,a.return);break;case 12:jl(i,a,n);break;case 31:jl(i,a,n),n&&o&4&&bl(i,a);break;case 13:jl(i,a,n),n&&o&4&&xl(i,a);break;case 22:a.memoizedState===null&&jl(i,a,n),el(a,a.return);break;case 30:break;default:jl(i,a,n)}t=t.sibling}}function Ml(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ba(n))}function Nl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ba(e))}function Pl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fl(e,t,n,r),t=t.sibling}function Fl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Pl(e,t,n,r),i&2048&&Xc(9,t);break;case 1:Pl(e,t,n,r);break;case 3:Pl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ba(e)));break;case 12:if(i&2048){Pl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){W(t,t.return,e)}}else Pl(e,t,n,r);break;case 31:Pl(e,t,n,r);break;case 13:Pl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Pl(e,t,n,r):(a._visibility|=2,Il(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Pl(e,t,n,r):Ll(e,t),i&2048&&Ml(o,t);break;case 24:Pl(e,t,n,r),i&2048&&Nl(t.alternate,t);break;default:Pl(e,t,n,r)}}function Il(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Il(a,o,s,c,i),Xc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Il(a,o,s,c,i)):u._visibility&2?Il(a,o,s,c,i):Ll(a,o),i&&l&2048&&Ml(o.alternate,o);break;case 24:Il(a,o,s,c,i),i&&l&2048&&Nl(o.alternate,o);break;default:Il(a,o,s,c,i)}t=t.sibling}}function Ll(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ll(n,r),i&2048&&Ml(r.alternate,r);break;case 24:Ll(n,r),i&2048&&Nl(r.alternate,r);break;default:Ll(n,r)}t=t.sibling}}var Rl=8192;function zl(e,t,n){if(e.subtreeFlags&Rl)for(e=e.child;e!==null;)Bl(e,t,n),e=e.sibling}function Bl(e,t,n){switch(e.tag){case 26:zl(e,t,n),e.flags&Rl&&e.memoizedState!==null&&Zf(n,Tl,e.memoizedState,e.memoizedProps);break;case 5:zl(e,t,n);break;case 3:case 4:var r=Tl;Tl=Cf(e.stateNode.containerInfo),zl(e,t,n),Tl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Rl,Rl=16777216,zl(e,t,n),Rl=r):zl(e,t,n));break;default:zl(e,t,n)}}function Vl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];pl=r,Gl(r,e)}Vl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ul(e),e=e.sibling}function Ul(e){switch(e.tag){case 0:case 11:case 15:Hl(e),e.flags&2048&&Zc(9,e,e.return);break;case 3:Hl(e);break;case 12:Hl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wl(e)):Hl(e);break;default:Hl(e)}}function Wl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];pl=r,Gl(r,e)}Vl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Zc(8,t,t.return),Wl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Wl(t));break;default:Wl(t)}e=e.sibling}}function Gl(e,t){for(;pl!==null;){var n=pl;switch(n.tag){case 0:case 11:case 15:Zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ba(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,pl=r;else a:for(n=e;pl!==null;){r=pl;var i=r.sibling,a=r.return;if(gl(r),r===n){pl=null;break a}if(i!==null){i.return=a,pl=i;break a}pl=a}}}var Kl={getCacheForType:function(e){var t=fa(va),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return fa(va).controller.signal}},ql=typeof WeakMap==`function`?WeakMap:Map,R=0,z=null,B=null,V=0,H=0,Jl=null,Yl=!1,Xl=!1,Zl=!1,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=null,ou=null,su=!1,cu=0,lu=0,uu=1/0,du=null,fu=null,pu=0,mu=null,U=null,hu=0,gu=0,_u=null,vu=null,yu=0,bu=null;function xu(){return R&2&&V!==0?V&-V:S.T===null?_t():vd()}function Su(){if(ru===0)if(!(V&536870912)||k){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),ru=e}else ru=536870912;return e=mo.current,e!==null&&(e.flags|=32),ru}function Cu(e,t,n){(e===z&&(H===2||H===9)||e.cancelPendingCommit!==null)&&(Au(e,0),Du(e,V,ru,!1)),ut(e,n),(!(R&2)||e!==z)&&(e===z&&(!(R&2)&&(tu|=n),$l===4&&Du(e,V,ru,!1)),dd(e))}function wu(e,t,n){if(R&6)throw Error(o(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ot(e,t),i=r?Ru(e,t):Iu(e,t,!0),a=r;do{if(i===0){Xl&&!r&&Du(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!Eu(n)){i=Iu(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=au;var l=c.current.memoizedState.isDehydrated;if(l&&(Au(c,s).flags|=256),s=Iu(c,s,!1),s!==2){if(Zl&&!l){c.errorRecoveryDisabledLanes|=a,tu|=a,i=4;break a}a=ou,ou=i,a!==null&&(ou===null?ou=a:ou.push.apply(ou,a))}i=s}if(a=!1,i!==2)continue}}if(i===1){Au(e,0),Du(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Du(r,t,ru,!Yl);break a;case 2:ou=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=cu+300-ze(),10<i)){if(Du(r,t,ru,!Yl),at(r,0,!0)!==0)break a;hu=t,r.timeoutHandle=$d(Tu.bind(null,r,n,ou,du,su,t,ru,tu,iu,Yl,a,`Throttled`,-0,0),i);break a}Tu(r,n,ou,du,su,t,ru,tu,iu,Yl,a,null,-0,0)}}break}while(1);dd(e)}function Tu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:mn},Bl(t,a,d);var m=(a&62914560)===a?cu-ze():(a&4194048)===a?lu-ze():0;if(m=$f(d,m),m!==null){hu=a,e.cancelPendingCommit=m(Gu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Du(e,a,o,!l);return}}Gu(e,t,a,n,r,i,o,s,c)}function Eu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Pr(a(),i))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 Du(e,t,n,r){t&=~nu,t&=~tu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ft(e,n,t)}function Ou(){return R&6?!0:(G(0,!1),!1)}function ku(){if(B!==null){if(H===0)var e=B.return;else e=B,ia=ra=null,Bo(e),Ua=null,Wa=0,e=B;for(;e!==null;)Yc(e.alternate,e),e=e.return;B=null}}function Au(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ef(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),hu=0,ku(),z=e,B=n=Si(e.current,null),V=t,H=0,Jl=null,Yl=!1,Xl=ot(e,t),Zl=!1,iu=ru=nu=tu=eu=$l=0,ou=au=null,su=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ze(r),a=1<<i;t|=e[i],r&=~a}return Ql=t,fi(),n}function ju(e,t){j=null,S.H=Ks,t===Na||t===Fa?(t=Va(),H=3):t===Pa?(t=Va(),H=4):H=t===uc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Jl=t,B===null&&($l=1,ic(e,Ai(t,e.current)))}function Mu(){var e=mo.current;return e===null?!0:(V&4194048)===V?ho===null:(V&62914560)===V||V&536870912?e===ho:!1}function Nu(){var e=S.H;return S.H=Ks,e===null?Ks:e}function Pu(){var e=S.A;return S.A=Kl,e}function Fu(){$l=4,Yl||(V&4194048)!==V&&mo.current!==null||(Xl=!0),!(eu&134217727)&&!(tu&134217727)||z===null||Du(z,V,ru,!1)}function Iu(e,t,n){var r=R;R|=2;var i=Nu(),a=Pu();(z!==e||V!==t)&&(du=null,Au(e,t)),t=!1;var o=$l;a:do try{if(H!==0&&B!==null){var s=B,c=Jl;switch(H){case 8:ku(),o=6;break a;case 3:case 2:case 9:case 6:mo.current===null&&(t=!0);var l=H;if(H=0,Jl=null,Hu(e,s,c,l),n&&Xl){o=0;break a}break;default:l=H,H=0,Jl=null,Hu(e,s,c,l)}}Lu(),o=$l;break}catch(t){ju(e,t)}while(1);return t&&e.shellSuspendCounter++,ia=ra=null,R=r,S.H=i,S.A=a,B===null&&(z=null,V=0,fi()),o}function Lu(){for(;B!==null;)Bu(B)}function Ru(e,t){var n=R;R|=2;var r=Nu(),i=Pu();z!==e||V!==t?(du=null,uu=ze()+500,Au(e,t)):Xl=ot(e,t);a:do try{if(H!==0&&B!==null){t=B;var a=Jl;b:switch(H){case 1:H=0,Jl=null,Hu(e,t,a,1);break;case 2:case 9:if(La(a)){H=0,Jl=null,Vu(t);break}t=function(){H!==2&&H!==9||z!==e||(H=7),dd(e)},a.then(t,t);break a;case 3:H=7;break a;case 4:H=5;break a;case 7:La(a)?(H=0,Jl=null,Vu(t)):(H=0,Jl=null,Hu(e,t,a,7));break;case 5:var s=null;switch(B.tag){case 26:s=B.memoizedState;case 5:case 27:var c=B;if(s?Xf(s):c.stateNode.complete){H=0,Jl=null;var l=c.sibling;if(l!==null)B=l;else{var u=c.return;u===null?B=null:(B=u,Uu(u))}break b}}H=0,Jl=null,Hu(e,t,a,5);break;case 6:H=0,Jl=null,Hu(e,t,a,6);break;case 8:ku(),$l=6;break a;default:throw Error(o(462))}}zu();break}catch(t){ju(e,t)}while(1);return ia=ra=null,S.H=r,S.A=i,R=n,B===null?(z=null,V=0,fi(),$l):0}function zu(){for(;B!==null&&!Le();)Bu(B)}function Bu(e){var t=Bc(e.alternate,e,Ql);e.memoizedProps=e.pendingProps,t===null?Uu(e):B=t}function Vu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wc(n,t,t.pendingProps,t.type,void 0,V);break;case 11:t=wc(n,t,t.pendingProps,t.type.render,t.ref,V);break;case 5:Bo(t);default:Yc(n,t),t=B=Ci(t,Ql),t=Bc(n,t,Ql)}e.memoizedProps=e.pendingProps,t===null?Uu(e):B=t}function Hu(e,t,n,r){ia=ra=null,Bo(t),Ua=null,Wa=0;var i=t.return;try{if(lc(e,i,t,n,V)){$l=1,ic(e,Ai(n,e.current)),B=null;return}}catch(t){if(i!==null)throw B=i,t;$l=1,ic(e,Ai(n,e.current)),B=null;return}t.flags&32768?(k||r===1?e=!0:Xl||V&536870912?e=!1:(Yl=e=!0,(r===2||r===9||r===3||r===6)&&(r=mo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Wu(t,e)):Uu(t)}function Uu(e){var t=e;do{if(t.flags&32768){Wu(t,Yl);return}e=t.return;var n=qc(t.alternate,t,Ql);if(n!==null){B=n;return}if(t=t.sibling,t!==null){B=t;return}B=t=e}while(t!==null);$l===0&&($l=5)}function Wu(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,B=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){B=e;return}B=e=n}while(e!==null);$l=6,B=null}function Gu(e,t,n,r,i,a,s,c,l){e.cancelPendingCommit=null;do Xu();while(pu!==0);if(R&6)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(a=t.lanes|t.childLanes,a|=di,dt(e,n,a,s,c,l),e===z&&(B=z=null,V=0),U=t,mu=e,hu=n,gu=a,_u=i,vu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(Ue,function(){return Zu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=S.T,S.T=null,i=C.p,C.p=2,s=R,R|=4;try{ml(e,t,n)}finally{R=s,C.p=i,S.T=r}}pu=1,Ku(),qu(),Ju()}}function Ku(){if(pu===1){pu=0;var e=mu,t=U,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=S.T,S.T=null;var r=C.p;C.p=2;var i=R;R|=4;try{El(t,e);var a=Kd,o=zr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Rr(s.ownerDocument.documentElement,s)){if(c!==null&&Br(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Lr(s,h),v=Lr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}pp=!!Gd,Kd=Gd=null}finally{R=i,C.p=r,S.T=n}}e.current=t,pu=2}}function qu(){if(pu===2){pu=0;var e=mu,t=U,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=S.T,S.T=null;var r=C.p;C.p=2;var i=R;R|=4;try{hl(e,t.alternate,t)}finally{R=i,C.p=r,S.T=n}}pu=3}}function Ju(){if(pu===4||pu===3){pu=0,Re();var e=mu,t=U,n=hu,r=vu;t.subtreeFlags&10256||t.flags&10256?pu=5:(pu=0,U=mu=null,Yu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(fu=null),gt(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=S.T,i=C.p,C.p=2,S.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{S.T=t,C.p=i}}hu&3&&Xu(),dd(e),i=e.pendingLanes,n&261930&&i&42?e===bu?yu++:(yu=0,bu=e):yu=0,G(0,!1)}}function Yu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ba(t)))}function Xu(){return Ku(),qu(),Ju(),Zu()}function Zu(){if(pu!==5)return!1;var e=mu,t=gu;gu=0;var n=gt(hu),r=S.T,i=C.p;try{C.p=32>n?32:n,S.T=null,n=_u,_u=null;var a=mu,s=hu;if(pu=0,U=mu=null,hu=0,R&6)throw Error(o(331));var c=R;if(R|=4,Ul(a.current),Fl(a,a.current,s,n),R=c,G(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,a)}catch{}return!0}finally{C.p=i,S.T=r,Yu(e,t)}}function Qu(e,t,n){t=Ai(n,t),t=oc(e.stateNode,t,2),e=eo(e,t,2),e!==null&&(ut(e,2),dd(e))}function W(e,t,n){if(e.tag===3)Qu(e,e,n);else for(;t!==null;){if(t.tag===3){Qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(fu===null||!fu.has(r))){e=Ai(n,e),n=sc(2),r=eo(t,n,2),r!==null&&(cc(n,r,t,e),ut(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ql;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Zl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,z===e&&(V&n)===n&&($l===4||$l===3&&(V&62914560)===V&&300>ze()-cu?!(R&2)&&Au(e,0):nu|=n,iu===V&&(iu=0)),dd(e)}function td(e,t){t===0&&(t=ct()),e=hi(e,t),e!==null&&(ut(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(t),td(e,n)}function id(e,t){return Fe(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,_d())}function G(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=V,a=at(r,r===z?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,gd(r,a));r=r.next}while(n);ld=!1}}function fd(){pd()}function pd(){cd=sd=!1;var e=0;ud!==0&&Qd()&&(e=ud);for(var t=ze(),n=null,r=ad;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}pu!==0&&pu!==5||G(e,!1),ud!==0&&(ud=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=z,n=V,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(H===2||H===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),gt(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=hd.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function hd(e,t){if(pu!==0&&pu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Xu()&&e.callbackNode!==n)return null;var r=V;return r=at(e,e===z?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(wu(e,r,t),md(e,ze()),e.callbackNode!=null&&e.callbackNode===n?hd.bind(null,e):null)}function gd(e,t){if(Xu())return null;wu(e,t,!0)}function _d(){nf(function(){R&6?Fe(Ve,fd):pd()})}function vd(){if(ud===0){var e=Ca;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),ud=e}return ud}function yd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:pn(``+e)}function bd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function xd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=yd((i[xt]||null).action),o=r.submitter;o&&(t=(t=o[xt]||null)?yd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ud!==0){var e=o?bd(i,o):new FormData(i);Ms(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?bd(i,o):new FormData(i),Ms(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Sd=0;Sd<oi.length;Sd++){var Cd=oi[Sd];si(Cd.toLowerCase(),`on`+(Cd[0].toUpperCase()+Cd.slice(1)))}si(Qr,`onAnimationEnd`),si($r,`onAnimationIteration`),si(ei,`onAnimationStart`),si(`dblclick`,`onDoubleClick`),si(`focusin`,`onFocus`),si(`focusout`,`onBlur`),si(ti,`onTransitionRun`),si(ni,`onTransitionStart`),si(ri,`onTransitionCancel`),si(ii,`onTransitionEnd`),Lt(`onMouseEnter`,[`mouseout`,`mouseover`]),Lt(`onMouseLeave`,[`mouseout`,`mouseover`]),Lt(`onPointerEnter`,[`pointerout`,`pointerover`]),Lt(`onPointerLeave`,[`pointerout`,`pointerover`]),It(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),It(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),It(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),It(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),It(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),It(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var wd=`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(` `),Td=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(wd));function Ed(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ci(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ci(e)}i.currentTarget=null,a=c}}}}function K(e,t){var n=t[Ct];n===void 0&&(n=t[Ct]=new Set);var r=e+`__bubble`;n.has(r)||(Ad(t,e,2,!1),n.add(r))}function Dd(e,t,n){var r=0;t&&(r|=4),Ad(n,e,r,t)}var Od=`_reactListening`+Math.random().toString(36).slice(2);function kd(e){if(!e[Od]){e[Od]=!0,Pt.forEach(function(t){t!==`selectionchange`&&(Td.has(t)||Dd(t,!1,e),Dd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Od]||(t[Od]=!0,Dd(`selectionchange`,!1,t))}}function Ad(e,t,n,r){switch(bp(t)){case 2:var i=mp;break;case 8:i=hp;break;default:i=gp}n=i.bind(null,t,n,e),i=void 0,!wn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function jd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=kt(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}xn(function(){var r=a,i=gn(n),o=[];a:{var s=ai.get(e);if(s!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(An(n)===0)break a;case`keydown`:case`keyup`:l=Zn;break;case`focusin`:u=`focus`,l=Hn;break;case`focusout`:u=`blur`,l=Hn;break;case`beforeblur`:case`afterblur`:l=Hn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Vn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=$n;break;case Qr:case $r:case ei:l=Un;break;case ii:l=er;break;case`scroll`:case`scrollend`:l=D;break;case`wheel`:l=tr;break;case`copy`:case`cut`:case`paste`:l=Wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Qn;break;case`toggle`:case`beforetoggle`:l=nr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Sn(m,p),g!=null&&d.push(Md(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==hn&&(u=n.relatedTarget||n.fromElement)&&(kt(u)||u[St]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?kt(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:jt(l),h=u==null?s:jt(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,kt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Pd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Fd(o,s,l,d,!1),u!==null&&f!==null&&Fd(o,f,u,d,!0)}}a:{if(s=r?jt(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=Sr;else if(gr(s))if(Cr)v=Mr;else{v=Ar;var y=kr}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&un(r.elementType)&&(v=Sr):v=jr;if(v&&=v(e,r)){_r(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&tn(s,`number`,s.value)}switch(y=r?jt(r):window,e){case`focusin`:(gr(y)||y.contentEditable===`true`)&&(Hr=y,Ur=r,Wr=null);break;case`focusout`:Wr=Ur=Hr=null;break;case`mousedown`:Gr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Gr=!1,Kr(o,n,i);break;case`selectionchange`:if(Vr)break;case`keydown`:case`keyup`:Kr(o,n,i)}var b;if(ir)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else fr?ur(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(sr&&n.locale!==`ko`&&(fr||x!==`onCompositionStart`?x===`onCompositionEnd`&&fr&&(b=kn()):(En=i,Dn=`value`in En?En.value:En.textContent,fr=!0)),y=Nd(r,x),0<y.length&&(x=new Gn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=dr(n),b!==null&&(x.data=b)))),(b=or?pr(e,n):mr(e,n))&&(x=Nd(r,`onBeforeInput`),0<x.length&&(y=new Gn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),xd(o,e,r,n,i)}Ed(o,t)})}function Md(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Nd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Sn(e,n),i!=null&&r.unshift(Md(e,i,a)),i=Sn(e,t),i!=null&&r.push(Md(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Pd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Sn(n,a),l!=null&&o.unshift(Md(n,l,c))):i||(l=Sn(n,a),l!=null&&o.push(Md(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Id=/\r\n?/g,Ld=/\u0000|\uFFFD/g;function Rd(e){return(typeof e==`string`?e:``+e).replace(Id,` 10`).replace(Ld,``)}function zd(e,t){return t=Rd(t),Rd(e)===t}function q(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||on(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&on(e,``+r);break;case`className`:Ut(e,`class`,r);break;case`tabIndex`:Ut(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ut(e,n,r);break;case`style`:ln(e,r,a);break;case`data`:if(t!==`object`){Ut(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=pn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof a==`function`&&(n===`formAction`?(t!==`input`&&q(e,t,`name`,i.name,i,null),q(e,t,`formEncType`,i.formEncType,i,null),q(e,t,`formMethod`,i.formMethod,i,null),q(e,t,`formTarget`,i.formTarget,i,null)):(q(e,t,`encType`,i.encType,i,null),q(e,t,`method`,i.method,i,null),q(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=pn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=mn);break;case`onScroll`:r!=null&&K(`scroll`,e);break;case`onScrollEnd`:r!=null&&K(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=pn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:K(`beforetoggle`,e),K(`toggle`,e),Ht(e,`popover`,r);break;case`xlinkActuate`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ht(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=dn.get(n)||n,Ht(e,n,r))}}function Bd(e,t,n,r,i,a){switch(n){case`style`:ln(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(o(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?on(e,r):(typeof r==`number`||typeof r==`bigint`)&&on(e,``+r);break;case`onScroll`:r!=null&&K(`scroll`,e);break;case`onScrollEnd`:r!=null&&K(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=mn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ft.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[xt]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ht(e,n,r)}}}function Vd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:K(`error`,e),K(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var s=n[a];if(s!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:q(e,t,a,s,n,null)}}i&&q(e,t,`srcSet`,n.srcSet,n,null),r&&q(e,t,`src`,n.src,n,null);return;case`input`:K(`invalid`,e);var c=a=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(o(137,t));break;default:q(e,t,r,d,n,null)}}en(e,a,c,l,u,s,i,!1);return;case`select`:for(i in K(`invalid`,e),r=s=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:q(e,t,i,c,n,null)}t=a,n=s,e.multiple=!!r,t==null?n!=null&&nn(e,!!r,n,!0):nn(e,!!r,t,!1);return;case`textarea`:for(s in K(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(o(91));break;default:q(e,t,s,c,n,null)}an(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:q(e,t,l,r,n,null)}return;case`dialog`:K(`beforetoggle`,e),K(`toggle`,e),K(`cancel`,e),K(`close`,e);break;case`iframe`:case`object`:K(`load`,e);break;case`video`:case`audio`:for(r=0;r<wd.length;r++)K(wd[r],e);break;case`image`:K(`error`,e),K(`load`,e);break;case`details`:K(`toggle`,e);break;case`embed`:case`source`:case`link`:K(`error`,e),K(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(o(137,t));default:q(e,t,u,r,n,null)}return;default:if(un(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Bd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&q(e,t,c,r,n,null))}function Hd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||q(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(o(137,t));break;default:m!==f&&q(e,t,p,m,r,f)}}$t(e,s,c,l,u,d,a,i);return;case`select`:for(a in m=s=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||q(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:s=a;default:a!==l&&q(e,t,i,a,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?nn(e,!!n,n?[]:``,!1):nn(e,!!n,t,!0)):nn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:q(e,t,c,null,r,i)}for(s in r)if(i=r[s],a=n[s],r.hasOwnProperty(s)&&(i!=null||a!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(o(91));break;default:i!==a&&q(e,t,s,i,r,a)}rn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:q(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:q(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&q(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(o(137,t));break;default:q(e,t,u,p,r,m)}return;default:if(un(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Bd(e,t,_,void 0,r,p);
vendor: 4,461 bytes, line 10
10for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Bd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&q(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||q(e,t,f,p,r,m)}function Ud(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Wd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ud(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ud(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Gd=null,Kd=null;function qd(e){return e.nodeType===9?e:e.ownerDocument}function Jd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Yd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Xd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Zd=null;function Qd(){var e=window.event;return e&&e.type===`popstate`?e===Zd?!1:(Zd=e,!0):(Zd=null,!1)}var $d=typeof setTimeout==`function`?setTimeout:void 0,ef=typeof clearTimeout==`function`?clearTimeout:void 0,tf=typeof Promise==`function`?Promise:void 0,nf=typeof queueMicrotask==`function`?queueMicrotask:tf===void 0?$d:function(e){return tf.resolve(null).then(e).catch(rf)};function rf(e){setTimeout(function(){throw e})}function af(e){return e===`head`}function of(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),zp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bf(e.ownerDocument.body);n=i}while(n);zp(t)}function sf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function cf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:cf(n),Ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function lf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=hf(e.nextSibling),e===null)break}return null}function uf(e,t,n){if(t===``)return null;for(;
vendor: 17,955 bytes, line 10
10e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=hf(e.nextSibling),e===null))return null;return e}function df(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=hf(e.nextSibling),e===null))return null;return e}function ff(e){return e.data===`$?`||e.data===`$~`}function pf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function mf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function hf(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===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var gf=null;function _f(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return hf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function vf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function yf(e,t,n){switch(t=qd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(o(452));return e;case`head`:if(e=t.head,!e)throw Error(o(453));return e;case`body`:if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function bf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ot(e)}var xf=new Map,Sf=new Set;function Cf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wf=C.d;C.d={f:Tf,r:Ef,D:kf,C:Af,L:jf,m:Mf,X:Nf,S:J,M:Pf};function Tf(){var e=wf.f(),t=Ou();return e||t}function Ef(e){var t=At(e);t!==null&&t.tag===5&&t.type===`form`?Ps(t):wf.r(e)}var Df=typeof document>`u`?null:document;function Of(e,t,n){var r=Df;if(r&&typeof t==`string`&&t){var i=Qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sf.has(i)||(Sf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Vd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function kf(e){wf.D(e),Of(`dns-prefetch`,e,null)}function Af(e,t){wf.C(e,t),Of(`preconnect`,e,t)}function jf(e,t,n){wf.L(e,t,n);var r=Df;if(r&&e&&t){var i=`link[rel="preload"][as="`+Qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Qt(n.imageSizes)+`"]`)):i+=`[href="`+Qt(e)+`"]`;var a=i;switch(t){case`style`:a=If(e);break;case`script`:a=Bf(e)}xf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Lf(a))||t===`script`&&r.querySelector(Vf(a))||(t=r.createElement(`link`),Vd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function Mf(e,t){wf.m(e,t);var n=Df;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Qt(r)+`"][href="`+Qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Bf(e)}if(!xf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),xf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Vf(a)))return}r=n.createElement(`link`),Vd(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function J(e,t,n){wf.S(e,t,n);var r=Df;if(r&&e){var i=Mt(r).hoistableStyles,a=If(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Lf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xf.get(a))&&Wf(e,n);var c=o=r.createElement(`link`);Nt(c),Vd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Uf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Nf(e,t){wf.X(e,t);var n=Df;if(n&&e){var r=Mt(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=m({src:e,async:!0},t),(t=xf.get(i))&&Gf(e,t),a=n.createElement(`script`),Nt(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t){wf.M(e,t);var n=Df;if(n&&e){var r=Mt(n).hoistableScripts,i=Bf(e),a=r.get(i);a||(a=n.querySelector(Vf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=xf.get(i))&&Gf(e,t),a=n.createElement(`script`),Nt(a),Vd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Ff(e,t,n,r){var i=(i=be.current)?Cf(i):null;if(!i)throw Error(o(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=If(n.href),n=Mt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=If(n.href);var a=Mt(i).hoistableStyles,s=a.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,s),(a=i.querySelector(Lf(e)))&&!a._p&&(s.instance=a,s.state.loading=5),xf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xf.set(e,n),a||zf(i,e,n,s.state))),t&&r===null)throw Error(o(528,``));return s}if(t&&r!==null)throw Error(o(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Bf(n),n=Mt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(o(444,e))}}function If(e){return`href="`+Qt(e)+`"`}function Lf(e){return`link[rel="stylesheet"][`+e+`]`}function Rf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function zf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Vd(t,`link`,n),Nt(t),e.head.appendChild(t))}function Bf(e){return`[src="`+Qt(e)+`"]`}function Vf(e){return`script[async]`+e}function Hf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Qt(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),Vd(r,`style`,i),Uf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=If(n.href);var a=e.querySelector(Lf(i));if(a)return t.state.loading|=4,t.instance=a,Nt(a),a;r=Rf(n),(i=xf.get(i))&&Wf(r,i),a=(e.ownerDocument||e).createElement(`link`),Nt(a);var s=a;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Vd(a,`link`,r),t.state.loading|=4,Uf(a,n.precedence,e),t.instance=a;case`script`:return a=Bf(n.src),(i=e.querySelector(Vf(a)))?(t.instance=i,Nt(i),i):(r=n,(i=xf.get(a))&&(r=m({},n),Gf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),Nt(i),Vd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(o(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Uf(r,n.precedence,e));return t.instance}function Uf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Gf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Kf=null;function qf(e,t,n){if(Kf===null){var r=new Map,i=Kf=new Map;i.set(n,r)}else i=Kf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Dt]||a[bt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Jf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Yf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Xf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=If(r.href),a=t.querySelector(Lf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ep.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=Rf(r),(i=xf.get(i))&&Wf(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Vd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ep.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Qf=0;function $f(e,t){return e.stylesheets&&e.count===0&&np(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&np(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Qf===0&&(Qf=62500*Wd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&np(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ep(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tp=null;function np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tp=new Map,t.forEach(rp,e),tp=null,ep.call(e))}function rp(e,t){if(!(t.state.loading&4)){var n=tp.get(e);if(n)var r=n.get(null);else{n=new Map,tp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ep.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ip={$$typeof:ee,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function ap(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function op(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ap(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=bi(3,null,null,t),e.current=a,a.stateNode=e,t=ya(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Za(a),e}function sp(e){return e?(e=vi,e):vi}function cp(e,t,n,r,i,a){i=sp(i),r.context===null?r.context=i:r.pendingContext=i,r=$a(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=eo(e,r,t),n!==null&&(Cu(n,e,t),to(n,e,t))}function lp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function up(e,t){lp(e,t),(e=e.alternate)&&lp(e,t)}function dp(e){if(e.tag===13||e.tag===31){var t=hi(e,67108864);t!==null&&Cu(t,e,67108864),up(e,67108864)}}function fp(e){if(e.tag===13||e.tag===31){var t=xu();t=ht(t);var n=hi(e,t);n!==null&&Cu(n,e,t),up(e,t)}}var pp=!0;function mp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=2,gp(e,t,n,r)}finally{C.p=a,S.T=i}}function hp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=8,gp(e,t,n,r)}finally{C.p=a,S.T=i}}function gp(e,t,n,r){if(pp){var i=_p(r);if(i===null)jd(e,t,r,vp,n),kp(e,r);else if(jp(i,e,t,n,r))r.stopPropagation();else if(kp(e,r),t&4&&-1<Op.indexOf(e)){for(;i!==null;){var a=At(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}dd(a),!(R&6)&&(uu=ze()+500,G(0,!1))}}break;case 31:case 13:s=hi(a,2),s!==null&&Cu(s,a,2),Ou(),up(a,2)}if(a=_p(r),a===null&&jd(e,t,r,vp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else jd(e,t,r,null,n)}}function _p(e){return e=gn(e),yp(e)}var vp=null;function yp(e){if(vp=null,e=kt(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=u(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 vp=e,null}function bp(e){switch(e){case`beforetoggle`: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`toggle`: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 2;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`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var xp=!1,Sp=null,Cp=null,wp=null,Tp=new Map,Ep=new Map,Dp=[],Op=`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`.split(` `);function kp(e,t){switch(e){case`focusin`:case`focusout`:Sp=null;break;case`dragenter`:case`dragleave`:Cp=null;break;case`mouseover`:case`mouseout`:wp=null;break;case`pointerover`:case`pointerout`:Tp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Ep.delete(t.pointerId)}}function Ap(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=At(t),t!==null&&dp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function jp(e,t,n,r,i){switch(t){case`focusin`:return Sp=Ap(Sp,e,t,n,r,i),!0;case`dragenter`:return Cp=Ap(Cp,e,t,n,r,i),!0;case`mouseover`:return wp=Ap(wp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Tp.set(a,Ap(Tp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Ep.set(a,Ap(Ep.get(a)||null,e,t,n,r,i)),!0}return!1}function Mp(e){var t=kt(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,vt(e.priority,function(){fp(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,vt(e.priority,function(){fp(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 Np(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_p(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);hn=r,n.target.dispatchEvent(r),hn=null}else return t=At(n),t!==null&&dp(t),e.blockedOn=n,!1;t.shift()}return!0}function Pp(e,t,n){Np(e)&&n.delete(t)}function Fp(){xp=!1,Sp!==null&&Np(Sp)&&(Sp=null),Cp!==null&&Np(Cp)&&(Cp=null),wp!==null&&Np(wp)&&(wp=null),Tp.forEach(Pp),Ep.forEac
10h(Pp)}function Ip(e,n){e.blockedOn===n&&(e.blockedOn=null,xp||(xp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Fp)))}var Lp=null;function Rp(e){Lp!==e&&(Lp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Lp===e&&(Lp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(yp(r||n)===null)continue;break}var a=At(n);a!==null&&(e.splice(t,3),t-=3,Ms(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function zp(e){function t(t){return Ip(t,e)}Sp!==null&&Ip(Sp,e),Cp!==null&&Ip(Cp,e),wp!==null&&Ip(wp,e),Tp.forEach(t),Ep.forEach(t);for(var n=0;n<Dp.length;n++){var r=Dp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Dp.length&&(n=Dp[0],n.blockedOn===null);)Mp(n),n.blockedOn===null&&Dp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[xt]||null;if(typeof a==`function`)o||Rp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[xt]||null)s=o.formAction;else if(yp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Rp(n)}}}function Bp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Vp(e){this._internalRoot=e}Hp.prototype.render=Vp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var n=t.current;cp(n,xu(),e,t,null,null)},Hp.prototype.unmount=Vp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cp(e.current,2,null,e,null,null),Ou(),t[St]=null}};function Hp(e){this._internalRoot=e}Hp.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dp.length&&t!==0&&t<Dp[n].priority;n++);Dp.splice(n,0,e),n===0&&Mp(e)}};var Up=n.version;if(Up!==`19.2.5`)throw Error(o(527,Up,`19.2.5`));C.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(o(188)):(e=Object.keys(e).join(`,`),Error(o(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Wp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:S,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Gp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gp.isDisabled&&Gp.supportsFiber)try{Je=Gp.inject(Wp),Ye=Gp}catch{}}e.hydrateRoot=function(e,t,n){if(!s(e))throw Error(o(299));var r=!1,i=``,a=tc,c=nc,l=rc,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=op(e,1,!0,t,n??null,r,i,u,a,c,l,Bp),t.context=sp(null),n=t.current,r=xu(),r=ht(r),i=$a(r),i.callback=null,eo(n,i,r),n=r,t.current.lanes=n,ut(t,n),dd(t),e[St]=t.current,kd(e),new Hp(t)}})),De=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ee()})),Oe=`__TSS_CONTEXT`,ke=Symbol.for(`TSS_SERVER_FUNCTION`),Ae=`application/x-tss-framed`,je={JSON:0,CHUNK:1,END:2,ERROR:3};`${Ae}`;var Me=/;\s*v=(\d+)/;function Ne(e){let t=e.match(Me);return t?parseInt(t[1],10):void 0}function Pe(e){let t=Ne(e);if(t!==void 0&&t!==1)throw Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var Fe=()=>window.__TSS_START_OPTIONS__;function Ie(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Le(e){return e?.isNotFound===!0}function Re(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}
10function ze(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Be(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=ze(r):Array.isArray(t)?t.push(ze(r)):n[e]=[t,ze(r)]}return n}var Ve=Ue(JSON.parse),He=We(JSON.stringify,JSON.parse);function Ue(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Be(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function We(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Re(e,r);return t?`?${t}`:``}}var Ge=`__root__`;function Ke(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function qe(e){return e instanceof Response&&!!e.options}function Je(e){if(typeof e==`object`&&e&&e.isSerializedRedirect)return Ke(e)}var Ye=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Xe=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ze=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Qe=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);
10i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},$e=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},et=(e,t,n)=>{if(!(!qe(n)&&!Le(n)))throw qe(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:qe(n)?`redirected`:Le(n)?`notFound`:r.status===`pending`?`success`:r.status,context:Qe(e,t.index),isFetching:!1,error:n})),Le(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),qe(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},tt=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},nt=(e,t,n)=>{let r=Qe(e,n);e.updateMatch(t,e=>({...e,context:r}))},rt=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,et(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,et(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!qe(n)&&!Le(n)&&(e.serialError??=n)},it=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ze(e,t)&&(n.options.loader||n.options.beforeLoad||ht(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ye(e)},i);r._nonReactive.pendingTimeout=t}},at=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;it(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&et(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},ot=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=g(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;
10o&&rt(e,n,o),s&&rt(e,n,s),it(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=g();let f={...Qe(e,n,!1),...i.__routeContext},{search:m,params:h,cause:_}=i,v=Ze(e,t),y={search:m,abortController:c,params:h,preload:v,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(qe(r)||Le(r))&&(u(),rt(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},x;try{if(x=r.options.beforeLoad(y),p(x))return u(),x.catch(t=>{rt(e,n,t)}).then(b)}catch(t){u(),rt(e,n,t)}b(x)},st=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>ot(e,n,t,i),s=()=>{if(tt(e,n))return;let t=at(e,n,i);return p(t)?t.then(o):o()};return a()},ct=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},lt=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=Qe(e,r),d=Ze(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},ut=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{mt(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(lt(e,t,n,r,i)),l=!!s&&p(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;et(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:Qe(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Qe(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,Le(t)&&await i.options.notFoundComponent?.preload?.(),et(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,et(e,e.router.getMatch(n),t)}!qe(o)&&!Le(o)&&await mt(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:Qe(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),et(e,r,t)}},dt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(lt(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await ut(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){qe(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await ut(e,t,i,n,d):nt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.
10staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(tt(e,i)){if(!e.router.getMatch(i))return e.matches[n];nt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=Ze(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&et(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=g(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function ft(e){let t=e,n=[];Xe(t.router)&&Ye(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=st(t,e);p(n)&&await n}catch(e){if(qe(e))throw e;if(Le(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?$e(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(dt(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(qe(e))throw e;Le(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=$e(t,l);e===void 0&&b();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await mt(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await mt(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=ct(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=Ye(t);if(p(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function pt(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function mt(e,t=gt){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===gt?(()=>{if(e._componentsPromise===void 0){let t=pt(e,gt);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():pt(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function ht(e){for(let t of gt)if(e.options[t]?.preload)return!0;return!1}var gt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function _t(e){return{input:({url:t})=>{for(let n of e)t=yt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=bt(e[n],t);return t}}}function vt(e){let t=oe(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=C([`/`,t,e.pathname]),e)}}function yt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function bt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function xt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>St(o,_.get())),x=r(()=>St(s,v.get())),ee=r(()=>St(c,y.get())),te=r(()=>_.get()[0]),ne=r(()=>_.get().some(e=>
10o.get(e)?.get().status===`pending`)),re=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),ie=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),ae=_e(64);function oe(e){let t=ae.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),ae.set(e,t)),t}let se={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:ee,firstId:te,hasPending:ne,matchRouteDeps:re,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:ie,getRouteMatchStore:oe,setMatches:ce,setPending:le,setCached:ue};ce(e.matches),a?.(se);function ce(e){Ct(e,o,_,n,i)}function le(e){Ct(e,s,v,n,i)}function ue(e){Ct(e,c,y,n,i)}return se}function St(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function Ct(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}l(n.get(),a)||n.set(a)})}var wt=`__TSR_index`,Tt=`popstate`,Et=`beforeunload`;function Dt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=jt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[wt];i=Ot(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[wt];i=Ot(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[wt]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Ot(e,t){t||={};let n=Mt();return{...t,key:n,__TSR_key:n,[wt]:e}}function kt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>jt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Mt();t.history.replaceState({[wt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(te._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),te._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=jt(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),te.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[wt]-l.state[wt],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),te.notify(u);return}}}l=c(),te.notify(u)},ee=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},te=Dt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>
10y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Et,ee,{capture:!0}),t.removeEventListener(Tt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Et,ee,{capture:!0}),t.addEventListener(Tt,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return te._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return te._ignoreSubscribers||b(`REPLACE`),n},te}function At(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function jt(e,t){let n=At(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Mt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[wt]:0,key:a,__TSR_key:a}}}function Mt(){return(Math.random()+1).toString(36).substring(7)}function Nt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Pt(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Ft=new WeakMap,It=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=re(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=kt()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=_e(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=xt(zt(this.latestLocation),e),on(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=oe(o);t&&t!==`/`&&e.push(vt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:_t(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=c(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&y(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:le(e).path,external:!1,searchStr:o,search:be(t?.search,i),hash:le(r.slice(1)).path,state:s(t?.state,a)}}let o=new URL(i,this.origin),c=yt(this.rewrite,o),l=this.options.parseSearch(c.search),u=this.options.stringifySearch(l);return c.search=u,{href:c.href.replace(c.origin,``),publicHref:i,pathname:le(c.pathname).path,external:!!this.rewrite&&c.origin!==this.origin,searchStr:u,search:be(t?.search,l),hash:le(c.hash.slice(1)).path,state:s(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>
10de({base:e,to:t.includes(`//`)?he(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Vt({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,c=Object.assign(Object.create(null),r.params),l=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=a?this.resolvePathWithBase(l,a):l,d=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,h(t.params,c)),f=this.routesByPath[x(u)],p;if(f)p=this.getRouteBranch(f);else if(u.includes(`$`))p=[];else{let e=this.getMatchedRoutes(u);p=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(p=[...p,this.options.notFoundRoute])}if(p.length&&_(d))for(let e of p){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(d,t(d))}catch{}}let m=e.leaveParams?u:le(ie({path:u,params:d,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,g=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};p.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Bt(t.options.validateSearch,{...e,...g}))}catch{}}),g=e}g=Ht({search:g,dest:t,destRoutes:p,_includeValidateSearch:e._includeValidateSearch}),g=be(o,g);let v=this.options.stringifySearch(g),y=t.hash===!0?n.hash:t.hash?h(t.hash,n.hash):void 0,b=y?`#${y}`:``,ee=t.state===!0?n.state:t.state?h(t.state,n.state):{};ee=s(n.state,ee);let te=`${m}${v}${b}`,ne,re,ae=!1;if(this.rewrite){let e=new URL(te,this.origin),t=bt(this.rewrite,e);ne=e.href.replace(e.origin,``),t.origin===this.origin?re=t.pathname+t.search+t.hash:(re=t.href,ae=!0)}else ne=ce(te),re=ne;return{publicHref:re,href:ne,pathname:m,search:g,searchStr:v,state:ee,hash:y??``,external:ae,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ye(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,h(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=o(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=x(this.latestLocation.href)===x(n.href),s=this.commitLocationPromise;if(this.commitLocationPromise=g(()=>{s?.resolve(),s=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>
10{if(a){let t=this.history.location.state.__TSR_index,n=jt(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=yt(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(d(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?Ft.set(this.latestLocation,t):Ft.delete(this.latestLocation);let n=this.latestLocation,r=Pt(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await ft({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){qe(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):Le(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Pt(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>
10{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&d(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=mt,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await ft({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(qe(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});Le(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=ve(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!o(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?o(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??He,parseSearch:e.parseSearch??Ve,protocolAllowlist:e.protocolAllowlist??u}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=ge(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParam
10s:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:x(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let c=o?Wt(this.options.notFoundMode,a):void 0,l=Array(a.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=l[n-1],d,f,p;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=Bt(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof Lt||(r=new Lt(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let m=r.options.loaderDeps?.({search:d})??``,h=m?JSON.stringify(m):``,{interpolatedPath:_,usedParams:v}=ie({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+_+h,b=this.getMatch(y),x=u.get(r.id),ee=b?._strictParams??v,te;if(!b)try{Gt(r,ee)}catch(e){if(te=Le(e)||qe(e)?e:new Rt(e.message,{cause:e}),t?.throwOnError)throw te}Object.assign(i,ee);let ne=x?`stay`:`enter`,re;if(b)re={...b,cause:ne,params:x?.params??i,_strictParams:ee,search:be(x?x.search:b.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||ht(r)?`pending`:`success`;re={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:ee,pathname:_,updatedAt:Date.now(),search:x?be(x.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:te,__routeContext:void 0,_nonReactive:{loadPromise:g()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ne,loaderDeps:x?s(x.loaderDeps,m):m,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(re.globalNotFound=c===r.id),re.searchError=p;let ae=this.getParentContext(o);re.context={...ae,...re.__routeContext,...re.__beforeLoadContext},l[n]=re}for(let t=0;t<l.length;t++){let n=l[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=u.get(n.routeId);if(n.params=o?be(o.params,i):i,!a){let i=l[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=v(t),i={...e.search};for(let e of t)try{Object.assign(i,Bt(e.options.validateSearch,i))}catch{}let a=v(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{Gt(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},Lt=class extends Error{},Rt=class extends Error{};function zt(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Bt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Lt(`Async validation not supported`);if(n.issues)throw new Lt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Vt({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=x(e),a,o=te(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Ht({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Ut(n)(e,t,r??!1)}function Ut(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>
10t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=Bt(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=h(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Wt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return Ge}function Gt(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function Kt(){try{return sessionStorage}catch{return}}var qt=`tsr-scroll-restoration-v1_3`,Jt=Kt();function Yt(){try{return JSON.parse(Jt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Xt(){try{Jt?.setItem(qt,JSON.stringify(Zt))}catch{}}var Zt=Yt(),Qt=`data-scroll-restoration-id`,$t=e=>e.state.__TSR_key||e.href;function en(e){let t=e.getAttribute(Qt);if(t)return`[${Qt}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var tn=!1,nn=`window`;function rn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function an(e){let t=[];for(let n of e){if(n===nn)continue;let e=rn(n);e&&t.push(e)}return t}function on(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||$t,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(tn||!r.restoring))if(e.target===document)o(nn,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=Zt[e]||={};for(let[e,n]of a)e===nn?t[nn]=n:e.isConnected&&(t[en(e)]=n)};n&&!r.restoration&&(r.restoration=!0,tn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Xt()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=Zt[u];if(e){let t=Zt[l];for(let n in e){if(n===nn){if(s)continue}else{let e=rn(n);if(!e||s&&o&&(c??=an(o),c.includes(e)))continue}t||=Zt[l]={},t[n]??=e[n]}}}tn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=Ft.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?Zt[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===nn){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=rn(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=an(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{tn=!1}}))}var sn=Symbol.for(`TSR_DEFERRED_PROMISE`);function cn(e,t){let n=e;return n[sn]?n:(n[sn]={status:`pending`},n.then(e=>{n[sn].status=`success`,n[sn].data=e}).catch(e=>{n[sn].status=`error`,n[sn].error={data:(t?.serializeError??Nt)(e),__isServerError:!0}}),n)}function ln(e,t){if(e)return typeof e==`string`?e:e[t]}function un(e){return e?.scriptFormat??`module`}function dn(e,t,n){let r=fn(t),i=ln(n,`script`)??r.crossOrigin;return{...un(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function fn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function pn(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function mn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var hn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Ge:this.parentRoute||b();let r=n?Ge:t?.path;r&&r!==`/`&&(r=ae(r));let i=t?.id||r,a=n?Ge:C([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=C([`/`,a]));let o=a===`__root__`?`/`:C([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=x(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Ke({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},gn=class extends hn{constructor(e){super(e)}},_n=(e=>(e[e.AggregateError=1]=`AggregateError`,e[e.ArrowFunction=2]=`ArrowFunction`,e[e.ErrorPrototypeStack=4]=`ErrorPrototypeStack`,e[e.ObjectAssign=8]=`ObjectAssign`,e[e.BigIntTypedArray=16]=`BigIntTypedArray`,e[e.RegExp=32]=`RegExp`,e))(_n||{}),vn=Symbol.asyncIterator,yn=Symbol.hasInstance,bn=Symbol.isConcatSpreadable,xn=Symbol.iterator,Sn=Symbol.match,Cn=Symbol.matchAll,wn=Symbol.replace,Tn=Symbol.search,En=Symbol.species,Dn=Symbol.split,On=Symbol.toPrimitive,kn=Symbol.toStringTag,An=Symbol.unscopables,jn={[vn]:0,[yn]:1,[bn]:2,[xn]:3,[Sn]:4,[Cn]:5,[wn]:6,[Tn]:7,[En]:8,[Dn]:9,[On]:10,[kn]:11,[An]:12},Mn={0:vn,1:yn,2:bn,3:xn,4:Sn,5:Cn,6:wn,7:Tn,8:En,9:Dn,10:On,11:kn,12:An},E=void 0,Nn={2:!0,3:!1,1:E,0:null,4:-0,5:1/0,6:-1/0,7:NaN},Pn={0:`Error`,1:`EvalError`,2:`RangeError`,3:`ReferenceError`,4:`SyntaxError`,5:`TypeError`,6:`URIError`},Fn={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function D(e,t,n,r,i,a,o,s,c,l,u,d){return{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function In(e){return D(2,E,e,E,E,E,E,E,E,E,E,E)}var Ln=In(2),Rn=In(3),zn=In(1),Bn=In(0),Vn=In(4),Hn=In(5),Un=In(6),Wn=In(7);function Gn(e){switch(e){case`"`:return`\\"`;case`\\`:return`\\\\`;case` 11`:return`\\n`;case`\r`:return`\\r`;case`\b`:return`\\b`;case` `:return`\\t`;case`\f`:return`\\f`;case`<`:return`\\x3C`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return E}}function Kn(e){let t=``,n=0,r;for(let i=0,a=e.length;i<a;i++)r=Gn(e[i]),r&&(t+=e.slice(n,i)+r,n=i+1);return n===0?t=e:t+=e.slice(n),t}function qn(e){switch(e){case`\\\\`:return`\\`;case`\\"`:return`"`;case`\\n`:return` 12`;case`\\r`:return`\r`;case`\\b`:return`\b`;case`\\t`:return` `;case`\\f`:return`\f`;case`\\x3C`:return`<`;case`\\u2028`:return`\u2028`;case`\\u2029`:return`\u2029`;default:return e}}function Jn(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,qn)}var Yn=`__SEROVAL_REFS__`,Xn=new Map,Zn=new Map;function Qn(e){return Xn.has(e)}function $n(e){return Zn.has(e)}function er(e){if(Qn(e))return Xn.get(e);throw new Hr(e)}function tr(e){if($n(e))return Zn.get(e);throw new Ur(e)}typeof globalThis<`u`?Object.defineProperty(globalThis,Yn,{value:Zn,configurable:!0,writable:!1,enumerable:!1}):typeof window<`u`?Object.defineProperty(window,Yn,{value:Zn,configurable:!0,writable:!1,enumerable:!1}):typeof self<`u`?Object.defineProperty(self,Yn,{value:Zn,configurable:!0,writable:!1,enumerable:!1}):typeof global<`u`&&Object.defineProperty(global,Yn,{value:Zn,configurable:!0,writable:!1,enumerable:!1});function nr(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function rr(e){let t=Pn[nr(e)];return e.name===t?e.constructor.name===t?{}:{name:e.constructor.name}:{name:e.name}}function ir(e,t){let n=rr(e),r=Object.getOwnPropertyNames(e);for(let i=0,a=r.length,o;i<a;i++)o=r[i],o!==`name`&&o!==`message`&&(o===`stack`?t&4&&(n||={},n[o]=e[o]):(n||={},n[o]=e[o]));return n}function ar(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:+!Object.isExtensible(e)}function or(e){switch(e){case 1/0:return Hn;case-1/0:return Un}return e===e?Object.is(e,-0)?Vn:D(0,E,e,E,E,E,E,E,E,E,E,E):Wn}function sr(e){return D(1,E,Kn(e),E,E,E,E,E,E,E,E,E)}function cr(e){return D(3,E,``+e,E,E,E,E,E,E,E,E,E)}function lr(e){return D(4,e,E,E,E,E,E,E,E,E,E,E)}function ur(e,t){let n=t.valueOf();return D(5,e,n===n?t.toISOString():``,E,E,E,E,E,E,E,E,E)}function dr(e,t){return D(6,e,E,Kn(t.source),t.flags,E,E,E,E,E,E,E)}function fr(e,t){return D(17,e,jn[t],E,E,E,E,E,E,E,E,E)}function pr(e,t){return D(18,e,Kn(er(t)),E,E,E,E,E,E,E,E,E)}function mr(e,t,n){return D(25,e,n,Kn(t),E,E,E,E,E,E,E,E)}function hr(e,t,n){return D(9,e,E,E,E,E,E,n,E,E,ar(t),E)}function gr(e,t){return D(21,e,E,E,E,E,E,E,t,E,E,E)}function _r(e,t,n){return D(15,e,E,t.constructor.name,E,E,E,E,n,t.byteOffset,E,t.length)}function vr(e,t,n){return D(16,e,E,t.constructor.name,E,E,E,E,n,t.byteOffset,E,t.byteLength)}function yr(e,t,n){return D(20,e,E,E,E,E,E,E,n,t.byteOffset,E,t.byteLength)}function br(e,t,n){return D(13,e,nr(t),E,Kn(t.message),n,E,E,E,E,E,E)}function xr(e,t,n){return D(14,e,nr(t),E,Kn(t.message),n,E,E,E,E,E,E)}function Sr(e,t){return D(7,e,E,E,E,E,E,t,E,E,E,E)}function Cr(e,t){return D(28,E,E,E,E,E,E,[e,t],E,E,E,E)}function wr(e,t){return D(30,E,E,E,E,E,E,[e,t],E,E,E,E)}function Tr(e,t,n){return D(31,e,E,E,E,E,E,n,t,E,E,E)}function Er(e,t){return D(32,e,E,E,E,E,E,E,t,E,E,E)}function Dr(e,t){return D(33,e,E,E,E,E,E,E,t,E,E,E)}function Or(e,t){return D(34,e,E,E,E,E,E,E,t,E,E,E)}function kr(e,t,n,r){return D(35,e,n,E,E,E,E,t,E,E,E,r)}var{toString:Ar}
12=Object.prototype,jr={parsing:1,serialization:2,deserialization:3};function Mr(e){return`Seroval Error (step: ${jr[e]})`}var Nr=(e,t)=>Mr(e),Pr=class extends Error{constructor(e,t){super(Nr(e,t)),this.cause=t}},Fr=class extends Pr{constructor(e){super(`parsing`,e)}},Ir=class extends Pr{constructor(e){super(`deserialization`,e)}};function Lr(e){return`Seroval Error (specific: ${e})`}var Rr=class extends Error{constructor(e){super(Lr(1)),this.value=e}},zr=class extends Error{constructor(e){super(Lr(2))}},Br=class extends Error{constructor(e){super(Lr(3))}},Vr=class extends Error{constructor(e){super(Lr(4))}},Hr=class extends Error{constructor(e){super(Lr(5)),this.value=e}},Ur=class extends Error{constructor(e){super(Lr(6))}},Wr=class extends Error{constructor(e){super(Lr(7))}},Gr=class extends Error{constructor(e){super(Lr(8))}},Kr=class extends Error{constructor(e){super(Lr(9))}},qr=class{constructor(e,t){this.value=e,this.replacement=t}},Jr=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e};Jr.toString(),((e,t)=>{e.s(t),e.p.s=1,e.p.v=t}).toString(),((e,t)=>{e.f(t),e.p.s=2,e.p.v=t}).toString();var Yr=()=>{let e=[],t=[],n=!0,r=!1,i=0,a=(e,n,r)=>{for(r=0;r<i;r++)t[r]&&t[r][n](e)},o=(t,i,a,o)=>{for(i=0,a=e.length;i<a;i++)o=e[i],!n&&i===a-1?t[r?`return`:`throw`](o):t.next(o)},s=(e,r)=>(n&&(r=i++,t[r]=e),o(e),()=>{n&&(t[r]=t[i],t[i--]=void 0)});return{__SEROVAL_STREAM__:!0,on:e=>s(e),next:t=>{n&&(e.push(t),a(t,`next`))},throw:i=>{n&&(e.push(i),a(i,`throw`),n=!1,r=!1,t.length=0)},return:i=>{n&&(e.push(i),a(i,`return`),n=!1,r=!0,t.length=0)}}};Yr.toString();var Xr=e=>t=>()=>{let n=0,r={[e]:()=>r,next:()=>{if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r};Xr.toString();var Zr=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c=(e=0,t=s.length)=>{for(;e<t;e++)s[e].s({done:!0,value:void 0})};n.on({next:e=>{let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw:e=>{let t=s.shift();t&&t.f(e),c(),i=o.length,a=!0,o.push(e)},return:e=>{let t=s.shift();t&&t.s({done:!0,value:e}),c(),i=o.length,o.push(e)}});let l={[e]:()=>l,next:()=>{if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l};Zr.toString();var Qr=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer};Qr.toString();function $r(e){return`__SEROVAL_SEQUENCE__`in e}function ei(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function ti(e){let t=[],n=-1,r=-1,i=e[xn]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,t.push(e)}return ei(t,n,r)}var ni=Xr(xn);function ri(e){return ni(e)}var ii={},ai={},oi={0:{},1:{},2:{},3:{},4:{},5:{}};function si(e){return`__SEROVAL_STREAM__`in e}function ci(){return Yr()}function li(e){let t=ci(),n=e[vn]();async function r(){try{let e=await n.next();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var ui=Zr(vn,Jr);function di(e){return ui(e)}async function fi(e){try{return[1,await e]}catch(e){return[0,e]}}function pi(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function mi(e,t){e.marked.add(t)}function hi(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function gi(e,t){let n=e.refs.get(t);return n==null?{type:0,value:hi(e,t)}:(mi(e,n),{type:1,value:lr(n)})}function _i(e,t){let n=gi(e,t);return n.type===1?n:Qn(t)?{type:2,value:pr(n.value,t)}:n}function vi(e,t){let n=_i(e,t);if(n.type!==0)return n.value;if(t in jn)return fr(n.value,t);throw new Rr(t)}function yi(e,t){let n=gi(e,oi[t]);return n.type===1?n.value:D(26,n.value,t,E,E,E,E,E,E,E,E,E)}function bi(e){let t=gi(e,ii);return t.type===1?t.value:D(27,t.value,E,E,E,E,E,E,vi(e,xn),E,E,E)}function xi(e){let t=gi(e,ai);return t.type===1?t.value:D(29,t.value,E,E,E,E,E,[yi(e,1),vi(e,vn)],E,E,E,E)}function Si(e,t,n,r){return D(n?11:10,e,E,E,E,r,E,E,E,E,ar(t),E)}function Ci(e,t,n,r){return D(8,t,E,E,E,E,{k:n,v:r},E,yi(e,0),E,E,E)}function wi(e,t,n){let r=new Uint8Array(n),i=``;for(let e=0,t=r.length;e<t;e++)i+=String.fromCharCode(r[e]);return D(19,t,Kn(btoa(i)),E,E,E,E,E,yi(e,5),E,E,E)}function Ti(e,t){return{base:pi(e,t),child:void 0}}var Ei=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return O(this._p,this.depth,e)}};async function Di(e,t,n){let r=[];for(let i=0,a=n.length;i<a;i++)i in n?r[i]=await O(e,t,n[i]):r[i]=0;return r}async function Oi(e,t,n,r){return hr(n,r,await Di(e,t,r))}async function ki(e,t,n){let r=Object.entries(n),i=[],a=[];for(let n=0,o=r.length;n<o;n++)i.push(Kn(r[n][0])),a.push(await O(e,t,r[n][1]));return xn in n&&(i.push(vi(e.base,xn)),a.push(Cr(bi(e.base),await O(e,t,ti(n))))),vn in n&&(i.push(vi(e.base,vn)),a.push(wr(xi(e.base),await O(e,t,li(n))))),kn in n&&(i.push(vi(e.base,kn)),a.push(sr(n[kn]))),bn in n&&(i.push(vi(e.base,bn)),a.push(n[bn]?Ln:Rn)),{k:i,v:a}}async function Ai(e,t,n,r,i){return Si(n,r,i,await ki(e,t,r))}async function ji(e,t,n,r){return gr(n,await O(e,t,r.valueOf()))}async function Mi(e,t,n,r){return _r(n,r,await O(e,t,r.buffer))}async function Ni(e,t,n,r){return vr(n,r,await O(e,t,r.buffer))}async function Pi(e,t,n,r){return yr(n,r,await O(e,t,r.buffer))}async function Fi(e,t,n,r){let i=ir(r,e.base.features);return br(n,r,i?await ki(e,t,i):E)}async function Ii(e,t,n,r){let i=ir(r,e.base.features);return xr(n,r,i?await ki(e,t,i):E)}async function Li(e,t,n,r){let i=[],a=[];for(let[n,o]of r.entries())i.push(await O(e,t,n)),a.push(await O(e,t,o));return Ci(e.base,n,i,a)}async function Ri(e,t,n,r){let i=[];for(let n of r.keys())i.push(await O(e,t,n));return Sr(n,i)}async function zi(e,t,n,r){let i=e.base.plugins;if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return mr(n,o.tag,await o.parse.async(r,new Ei(e,t),{id:n}))}return E}async function Bi(e,t,n,r){let[i,a]=await fi(r);return D(12,n,i,E,E,E,E,E,await O(e,t,a),E,E,E)}function Vi(e,t,n,r,i){let a=[],o=n.on({next:n=>{mi(this.base,t),O(this,e,n).then(e=>{a.push(Er(t,e))},e=>{i(e),o()})},throw:n=>{mi(this.base,t),O(this,e,n).then(e=>{a.push(Dr(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{mi(this.base,t),O(this,e,n).then(e=>{a.push(Or(t,e)),r(a),o()},e=>{i(e),o()})}})}async function Hi(e,t,n,r){return Tr(n,yi(e.base,4),await new Promise(Vi.bind(e,t,n,r)))}async function Ui(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n<a;n++)i[n]=await O(e,t,r.v[n]);return kr(n,i,r.t,r.d)}async function Wi(e,t,n,r){if(Array.isArray(r))return Oi(e,t,n,r);if(si(r))return Hi(e,t,n,r);if($r(r))return Ui(e,t,n,r);let i=r.constructor;if(i===qr)return O(e,t,r.replacement);let a=await zi(e,t,n,r);if(a)return a;switch(i){case Object:return Ai(e,t,n,r,!1);case E:return Ai(e,t,n,r,!0);case Date:return ur(n,r);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return Fi(e,t,n,r);case Number:case Boolean:case String:case BigInt:return ji(e,t,n,r);case ArrayBuffer:return wi(e.base,n,r);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Mi(e,t,n,r);case DataView:return Pi(e,t,n,r);case Map:return Li(e,t,n,r);case Set:return Ri(e,t,n,r);default:break}if(i===Promise||r instanceof Promise)return Bi(e,t,n,r);let o=e.base.features;if(o&32&&i===RegExp)return dr(n,r);if(o&16)switch(i){case BigInt64Array:case BigUint64Array:return Ni(e,t,n,r);default:break}if(o&1&&typeof AggregateError<`u`&&(i===AggregateError||r instanceof AggregateError))return Ii(e,t,n,r);if(r instanceof Error)return Fi(e,t,n,r);if(xn in r||vn in r)return Ai(e,t,n,r,!!i);throw new Rr(r)}async function Gi(e,t,n){let r=_i(e.base,n);if(r.type!==0)return r.value;let i=await zi(e,t,r.value,n);if(i)return i;throw new Rr(n)}async function O(e,t,n){switch(typeof n){case`boolean`:return n?Ln:Rn;case`undefined`:return zn;case`string`:return sr(n);case`number`:return or(n);case`bigint`:return cr(n);case`object`:if(n){let r=_i(e.base,n);return r.type===0?await Wi(e,t+1,r.value,n):r.value}return Bn;case`symbol`:return vi(e.base,n);case`function`:return Gi(e,t,n);default:throw new Rr(n)}}async function k(e,t){try{return await O(e,0,t)}catch(e){throw e instanceof Fr?e:new Fr(e)}}var Ki=(e=>(e[e.Vanilla=1]=`Vanilla`,e[e.Cross=2]=`Cross`,e))(Ki||{});function qi(e){return e}function Ji(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Ji(e,r.extends))}}function Yi(e){if(e){let t=new Set;return Ji(t,e),[...t]}}function Xi(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new Wr(e)}}var Zi=1e6,Qi=1e4,$i=2e4;function ea(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var ta=1e3;function na(e,t){let n=t.refs||new Map;return`types`in n||Object.assign(n,{types:new Map}),{mode:e,plugins:t.plugins,refs:n,features:t.features??63^(t.disabledFeatures||0),depthLimit:t.depthLimit||ta}}
12function ra(e){return{mode:2,base:na(2,e),child:E}}var ia=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return A(this._p,this.depth,e)}};function aa(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Gr({t:4,i:t});if(e.refs.has(t))throw Error(`Conflicted ref id: `+t)}function oa(e,t,n){return aa(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function sa(e,t,n){return aa(e.base,t),e.base.refs.set(t,n),n}function ca(e,t,n){return e.mode===1?oa(e,t,n):sa(e,t,n)}function la(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new Gr(e)}function ua(e,t){return ca(e,t.i,tr(Jn(t.s)))}function da(e,t,n){let r=n.a,i=r.length,a=ca(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=A(e,t,o));return ea(a,n.o),a}function fa(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function pa(e){switch(e){case vn:case bn:case kn:case xn:return!0;default:return!1}}function ma(e,t,n){fa(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function ha(e,t,n,r,i){if(typeof r==`string`)ma(n,Jn(r),A(e,t,i));else{let a=A(e,t,r);switch(typeof a){case`string`:ma(n,a,A(e,t,i));break;case`symbol`:pa(a)&&(n[a]=A(e,t,i));break;default:throw new Gr(r)}}}function ga(e,t,n){e.base.refs.types.set(t,n)}function _a(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new Gr(t)}function va(e,t,n,r){let i=n.k;if(i.length>0)for(let a=0,o=n.v,s=i.length;a<s;a++)ha(e,t,r,i[a],o[a]);return r}function ya(e,t,n){let r=ca(e,n.i,n.t===10?{}:Object.create(null));return va(e,t,n.p,r),ea(r,n.o),r}function ba(e,t){return ca(e,t.i,new Date(t.s))}function xa(e,t){if(e.base.features&32){let n=Jn(t.c);if(n.length>$i)throw new Gr(t);return ca(e,t.i,new RegExp(n,t.m))}throw new zr(t)}function Sa(e,t,n){let r=ca(e,n.i,new Set);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(A(e,t,a[i]));return r}function Ca(e,t,n){let r=ca(e,n.i,new Map);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(A(e,t,a[i]),A(e,t,o[i]));return r}function wa(e,t){if(t.s.length>Zi)throw new Gr(t);return ca(e,t.i,Qr(Jn(t.s)))}function Ta(e,t,n){let r=Xi(n.c),i=A(e,t,n.f),a=n.b??0;if(a<0||a>i.byteLength)throw new Gr(n);return ca(e,n.i,new r(i,a,n.l))}function Ea(e,t,n){let r=A(e,t,n.f),i=n.b??0;if(i<0||i>r.byteLength)throw new Gr(n);return ca(e,n.i,new DataView(r,i,n.l))}function Da(e,t,n,r){if(n.p){let i=va(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function Oa(e,t,n){return Da(e,t,n,ca(e,n.i,AggregateError([],Jn(n.m))))}function ka(e,t,n){let r=la(n,Fn,n.s);return Da(e,t,n,ca(e,n.i,new r(Jn(n.m))))}function Aa(e,t,n){let r=Jr(),i=ca(e,n.i,r.p),a=A(e,t,n.f);return n.s?r.s(a):r.f(a),i}function ja(e,t,n){return ca(e,n.i,Object(A(e,t,n.f)))}function Ma(e,t,n){let r=e.base.plugins;if(r){let i=Jn(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return ca(e,n.i,o.deserialize(n.s,new ia(e,t),{id:n.i}))}}throw new Br(n.c)}function Na(e,t){let n=ca(e,t.i,ca(e,t.s,Jr()).p);return ga(e,t.s,22),n}function Pa(e,t,n){let r=e.base.refs.get(n.i);if(r)return _a(e,n,n.i,22),r.s(A(e,t,n.a[1])),E;throw new Vr(`Promise`)}function Fa(e,t,n){let r=e.base.refs.get(n.i);if(r)return _a(e,n,n.i,22),r.f(A(e,t,n.a[1])),E;throw new Vr(`Promise`)}function Ia(e,t,n){return A(e,t,n.a[0]),ri(A(e,t,n.a[1]))}function La(e,t,n){return A(e,t,n.a[0]),di(A(e,t,n.a[1]))}function Ra(e,t,n){let r=ca(e,n.i,ci());ga(e,n.i,31);let i=n.a,a=i.length;if(a)for(let n=0;n<a;n++)A(e,t,i[n]);return r}function za(e,t,n){let r=e.base.refs.get(n.i);if(r)return _a(e,n,n.i,31),r.next(A(e,t,n.f)),E;throw new Vr(`Stream`)}function Ba(e,t,n){let r=e.base.refs.get(n.i);if(r)return _a(e,n,n.i,31),r.throw(A(e,t,n.f)),E;throw new Vr(`Stream`)}function Va(e,t,n){let r=e.base.refs.get(n.i);if(r)return _a(e,n,n.i,31),r.return(A(e,t,n.f)),E;throw new Vr(`Stream`)}function Ha(e,t,n){return A(e,t,n.f),E}function Ua(e,t,n){return A(e,t,n.a[1]),E}function Wa(e,t,n){let r=ca(e,n.i,ei([],n.s,n.l));for(let i=0,a=n.a.length;i<a;i++)r.v[i]=A(e,t,n.a[i]);return r}function A(e,t,n){if(t>e.base.depthLimit)throw new Kr(e.base.depthLimit);switch(t+=1,n.t){case 2:return la(n,Nn,n.s);case 0:return Number(n.s);case 1:return Jn(String(n.s));case 3:if(String(n.s).length>Qi)throw new Gr(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return ua(e,n);
12case 9:return da(e,t,n);case 10:case 11:return ya(e,t,n);case 5:return ba(e,n);case 6:return xa(e,n);case 7:return Sa(e,t,n);case 8:return Ca(e,t,n);case 19:return wa(e,n);case 16:case 15:return Ta(e,t,n);case 20:return Ea(e,t,n);case 14:return Oa(e,t,n);case 13:return ka(e,t,n);case 12:return Aa(e,t,n);case 17:return la(n,Mn,n.s);case 21:return ja(e,t,n);case 25:return Ma(e,t,n);case 22:return Na(e,n);case 23:return Pa(e,t,n);case 24:return Fa(e,t,n);case 28:return Ia(e,t,n);case 30:return La(e,t,n);case 31:return Ra(e,t,n);case 32:return za(e,t,n);case 33:return Ba(e,t,n);case 34:return Va(e,t,n);case 27:return Ha(e,t,n);case 29:return Ua(e,t,n);case 35:return Wa(e,t,n);default:throw new zr(n)}}function Ga(e,t){try{return A(e,0,t)}catch(e){throw new Ir(e)}}var Ka=(()=>T).toString();/=>/.test(Ka);function qa(e,t){return Ga(ra({plugins:Yi(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function Ja(e,t={}){let n=Ti(1,{plugins:Yi(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await k(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function Ya(e){return e}function Xa(e){return qi({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n,r){return{v:n.parse(e.toSerializable(t))}},async async(t,n,r){return{v:await n.parse(e.toSerializable(t))}},stream(t,n,r){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n,r){return e.fromSerializable(n.deserialize(t.v))}})}var Za=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}},Qa=globalThis.Buffer,$a=!!Qa&&typeof Qa.from==`function`;function eo(e){if(e.length===0)return``;if($a)return Qa.from(e).toString(`base64`);let t=32768,n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t);n.push(String.fromCharCode.apply(null,i))}return btoa(n.join(``))}function to(e){if(e.length===0)return new Uint8Array;
12if($a){let t=Qa.from(e,`base64`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var no=Object.create(null),ro=Object.create(null),io=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(to(e))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),ao=new TextEncoder,oo=e=>new ReadableStream({start(t){e.on({next(e){try{typeof e==`string`?t.enqueue(ao.encode(e)):t.enqueue(to(e.$b64))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),so=`(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))`,co=`(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})`;function lo(e){let t=ci(),n=e.getReader();return(async()=>{try{for(;;){let{done:e,value:r}=await n.read();if(e){t.return(void 0);break}t.next(eo(r))}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}function uo(e){let t=ci(),n=e.getReader(),r=new TextDecoder(`utf-8`,{fatal:!0});return(async()=>{try{for(;;){let{done:e,value:i}=await n.read();if(e){try{let e=r.decode();e.length>0&&t.next(e)}catch{}t.return(void 0);break}try{let e=r.decode(i,{stream:!0});e.length>0&&t.next(e)}catch{t.next({$b64:eo(i)})}}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}var fo=qi({tag:`tss/RawStream`,extends:[qi({tag:`tss/RawStreamFactory`,test(e){return e===no},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return so},deserialize(e,t,n){return no}}),qi({tag:`tss/RawStreamFactoryText`,test(e){return e===ro},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return co},deserialize(e,t,n){return ro}})],test(e){return e instanceof Za},parse:{sync(e,t,n){let r=e.hint===`text`?ro:no;return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(ci())}},async async(e,t,n){let r=e.hint===`text`?ro:no,i=e.hint===`text`?uo(e.stream):lo(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(r),stream:await t.parse(i)}},stream(e,t,n){let r=e.hint===`text`?ro:no,i=e.hint===`text`?uo(e.stream):lo(e.stream);return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(i)}}},serialize(e,t,n){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t,n){let r=t.deserialize(e.stream);return t.deserialize(e.hint)===`text`?oo(r):io(r)}});function po(e){return qi({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize(){throw Error(`RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.`)},deserialize(t,n,r){return e(typeof n?.deserialize==`function`?n.deserialize(t.streamId):t.streamId)}})}var mo=qi({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),ho={},go=e=>new ReadableStream({start:t=>{e.on({next:e=>{try{t.enqueue(e)}catch{}},throw:e=>{t.error(e)},return:()=>{try{t.close()}catch{}}})}}),_o=qi({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===ho},parse:{sync(){return ho},async async(){return await Promise.resolve(ho)},stream(){return ho}},serialize(){return go.toString()},deserialize(){return ho}});function vo(e){let t=ci(),n=e.getReader();async function r(){try{let e=await n.read();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var yo=[mo,fo,qi({tag:`seroval/plugins/web/ReadableStream`,extends:[_o],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream}
12,parse:{sync(e,t){return{factory:t.parse(ho),stream:t.parse(ci())}},async async(e,t){return{factory:await t.parse(ho),stream:await t.parse(vo(e))}},stream(e,t){return{factory:t.parse(ho),stream:t.parse(vo(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){return go(t.deserialize(e.stream))}})];function bo(){return[...(Fe()?.serializationAdapters)?.map(Xa)??[],...yo]}var xo=new TextDecoder,So=new Uint8Array,Co=16*1024*1024,j=32*1024*1024,M=1024,wo=1e5;function To(e){let t=new Map,n=new Map,r=new Set,i=!1,a=null,o=0,s,c=new ReadableStream({start(e){s=e},cancel(){i=!0;try{a?.cancel()}catch{}t.forEach(e=>{try{e.error(Error(`Framed response cancelled`))}catch{}}),t.clear(),n.clear(),r.clear()}});function l(e){let i=n.get(e);if(i)return i;if(r.has(e))return new ReadableStream({start(e){e.close()}});if(n.size>=M)throw Error(`Too many raw streams in framed response (max ${M})`);let a=new ReadableStream({start(n){t.set(e,n)},cancel(){r.add(e),t.delete(e),n.delete(e)}});return n.set(e,a),a}function u(e){return l(e),t.get(e)}return(async()=>{let n=e.getReader();a=n;let c=[],l=0;function d(){if(l<9)return null;let e=c[0];if(e.length>=9)return{type:e[0],streamId:(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,length:(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0};let t=new Uint8Array(9),n=0,r=9;for(let e=0;e<c.length&&r>0;e++){let i=c[e],a=Math.min(i.length,r);t.set(i.subarray(0,a),n),n+=a,r-=a}return{type:t[0],streamId:(t[1]<<24|t[2]<<16|t[3]<<8|t[4])>>>0,length:(t[5]<<24|t[6]<<16|t[7]<<8|t[8])>>>0}}function f(e){if(e===0)return So;let t=new Uint8Array(e),n=0,r=e;for(;r>0&&c.length>0;){let e=c[0];if(!e)break;let i=Math.min(e.length,r);t.set(e.subarray(0,i),n),n+=i,r-=i,i===e.length?c.shift():c[0]=e.subarray(i)}return l-=e,t}try{for(;;){let{done:e,value:a}=await n.read();if(i||e)break;if(a){if(l+a.length>j)throw Error(`Framed response buffer exceeded ${j} bytes`);for(c.push(a),l+=a.length;;){let e=d();if(!e)break;let{type:n,streamId:i,length:a}=e;if(n!==je.JSON&&n!==je.CHUNK&&n!==je.END&&n!==je.ERROR)throw Error(`Unknown frame type: ${n}`);if(n===je.JSON){if(i!==0)throw Error(`Invalid JSON frame streamId (expected 0)`)}else if(i===0)throw Error(`Invalid raw frame streamId (expected non-zero)`);if(a>Co)throw Error(`Frame payload too large: ${a} bytes (max ${Co})`);let c=9+a;if(l<c)break;if(++o>wo)throw Error(`Too many frames in framed response (max ${wo})`);f(9);let p=f(a);switch(n){case je.JSON:try{s.enqueue(xo.decode(p))}catch{}break;case je.CHUNK:{let e=u(i);e&&e.enqueue(p);break}case je.END:{let e=u(i);if(r.add(i),e){try{e.close()}catch{}t.delete(i)}break}case je.ERROR:{let e=u(i);if(r.add(i),e){let n=xo.decode(p);e.error(Error(n)),t.delete(i)}break}}}}}if(l!==0)throw Error(`Incomplete frame at end of framed response`);try{s.close()}catch{}t.forEach(e=>{try{e.close()}catch{}}),t.clear()}catch(e){try{s.error(e)}catch{}t.forEach(t=>{try{t.error(e)}catch{}}),t.clear()}finally{try{n.releaseLock()}catch{}a=null}})(),{getOrCreateStream:l,jsonChunks:c}}var Eo=null;async function Do(e){e.length>0&&await Promise.allSettled(e)}var Oo=Object.prototype.hasOwnProperty;function ko(e){for(let t in e)if(Oo.call(e,t))return!0;return!1}async function Ao(e,t,n){Eo||=bo();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData?`formData`:`payload`,o=r.headers?new Headers(r.headers):new Headers;if(o.set(`x-tsr-serverFn`,`true`),a===`payload`&&o.set(`accept`,`${Ae}, application/x-ndjson, application/json`),r.method===`GET`){if(a===`formData`)throw Error(`FormData is not supported with GET requests`);let t=await jo(r);if(t!==void 0){let n=Re({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;if(r.method===`POST`){let e=await No(r);e?.contentType&&o.set(`content-type`,e.contentType),s=e?.body}return await Po(async()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function jo(e){let t=!1,n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&ko(e.context)&&(t=!0,n.context=e.context),t)return Mo(n)}async function Mo(e){return JSON.stringify(await Promise.resolve(Ja(e,{plugins:Eo})))}async function No(e){if(e.data instanceof FormData){let t;return e.context&&ko(e.context)&&(t=await Mo(e.context)),t!==void 0&&e.data.set(Oe,t),{body:e.data}}let t=await jo(e);if(t)return{body:t,contentType:`application/json`}}async function Po(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw console.log(e),e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let n=t.headers.get(`content-type`);if(n||b(),t.headers.get(`x-tss-serialized`)){let e;if(n.includes(`application/x-tss-framed`)){if(Pe(n),!t.body)throw Error(`No response body for framed response`);
12let{getOrCreateStream:r,jsonChunks:i}=To(t.body),a=[po(r),...Eo||[]],o=new Map;e=await Fo({jsonStream:i,onMessage:e=>qa(e,{refs:o,plugins:a}),onError(e,t){console.error(e,t)}})}else if(n.includes(`application/json`)){let n=await t.json(),r=[];try{e=qa(n,{plugins:Eo})}finally{}await Do(r)}if(e||b(),e instanceof Error)throw e;return e}if(n.includes(`application/json`)){let e=await t.json(),n=Je(e);if(n)throw n;if(Le(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function Fo({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i),s=!1,c=(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{let n=[];try{t(JSON.parse(e))}finally{}await Do(n)}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){s||n?.(`Stream processing error:`,e)}})(),l,u=[];try{l=t(o)}catch(e){throw s=!0,r.cancel().catch(()=>{}),e}return await Do(u),Promise.resolve(l).catch(()=>{s=!0,r.cancel().catch(()=>{})}),c.finally(()=>{try{r.releaseLock()}catch{}}),l}function Io(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=Fe()?.serverFns?.fetch;return Ao(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[ke]:!0})}var Lo=Ya({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(ke in e)?!1:!!e[ke],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Io(e)});function Ro(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function zo(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function Bo(e){window.$_TSR||b();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||b();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Ro(e.i)}),n.lastMatchId&&=Ro(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o},await e.options.hydrate?.(i);let s=e.matchRoutes(e.stores.location.get()),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function l(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=g();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function u(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let d;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,u(e);return}zo(e,t),u(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&d===void 0&&(d=e.index,l(e))}),e.stores.setMatches(s);let f=e.stores.matches.get(),p=e.stores.location.get();await Promise.all(f.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=f[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:p,navigate:t=>e.navigate({...t,_fromLocation:p}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:f,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(Le(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let m=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!m)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;let h=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(m){let t=s[1];t||b(),l(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=h,h.then(()=>{e.batch(()=>
12{e.stores.status.get()===`pending`&&(e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var N=e(r(),1),P=n();function Vo({promise:e}){if(me)return me(e);let t=cn(e);if(t[sn].status===`pending`)throw t;if(t[sn].status===`error`)throw t[sn].error;return t[sn].data}function Ho(e){let t=(0,P.jsx)(Uo,{...e});return e.fallback?(0,P.jsx)(N.Suspense,{fallback:e.fallback,children:t}):t}function Uo(e){let t=Vo(e);return e.children(t)}function Wo(e){let t=e.errorComponent??Ko;return(0,P.jsx)(Go,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?N.createElement(t,{error:n,reset:r}):e.children})}var Go=class extends N.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Ko({error:e}){let[t,n]=N.useState(!1);return(0,P.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,P.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,P.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,P.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,P.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,P.jsx)(`div`,{children:(0,P.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,P.jsx)(`code`,{children:e.message}):null})}):null]})}var qo=N.createContext(void 0),Jo=N.createContext(void 0),Yo=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Yo||{});function Xo({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}
12function Zo(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Qo=[],$o=0,{link:es,unlink:ts,propagate:ns,checkDirty:rs,shallowPropagate:is}=Xo({update(e){return e._update()},notify(e){Qo[os++]=e,e.flags&=~Yo.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Yo.Mutable|Yo.Dirty,us(e))}}),as=0,os=0,ss,cs=0;function ls(e){try{++cs,e()}finally{--cs||ds()}}function us(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=ts(n,e)}function ds(){if(!(cs>0)){for(;as<os;){let e=Qo[as];Qo[as++]=void 0,e.notify()}as=0,os=0}}function fs(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Yo.None:Yo.Mutable,get(){return ss!==void 0&&es(i,ss,$o),i._snapshot},subscribe(e){let t=Zo(e),n={current:!1},r=ps(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=ss,o=t?.compare??Object.is;if(n)ss=i,++$o,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Yo.Mutable|Yo.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{ss=a,n&&(i.flags&=~Yo.RecursedCheck),us(i)}}};return n?(i.flags=Yo.Mutable|Yo.Dirty,i.get=function(){let e=i.flags;if(e&Yo.Dirty||e&Yo.Pending&&rs(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&is(e)}}else e&Yo.Pending&&(i.flags=e&~Yo.Pending);return ss!==void 0&&es(i,ss,$o),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ns(e),is(e),ds())}},i}function ps(e){let t=()=>{let t=ss;ss=n,++$o,n.depsTail=void 0,n.flags=Yo.Watching|Yo.RecursedCheck;try{return e()}finally{ss=t,n.flags&=~Yo.RecursedCheck,us(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Yo.Watching|Yo.RecursedCheck,notify(){let e=this.flags;e&Yo.Dirty||e&Yo.Pending&&rs(this.deps,this)?t():this.flags=Yo.Watching},stop(){this.flags=Yo.None,this.depsTail=void 0,us(this)}};return t(),n}var ms={get(){},subscribe(){return{unsubscribe(){}}}};function hs(e,t){let n=N.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=s(n.current,i):i}}function gs(e){let t=pe(),n=N.useContext(e.from?Jo:qo),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),i=hs(e,t),a=fe(r??ms,e=>e?i(e):ms);if(a!==ms)return a;(e.shouldThrow??!0)&&b()}function _s(e){return gs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vs(e){let{select:t,...n}=e;return gs({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function ys(e){return gs({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function bs(e){return gs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function xs(e){let t=pe();return N.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ss(e){return gs({...e,select:t=>e.select?e.select(t.context):t.context})}var Cs=class extends hn{constructor(e){super(e),this.useMatch=e=>gs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({...e,from:this.id}),this.useSearch=e=>bs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ys({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>vs({...e,from:this.id}),this.useLoaderData=e=>_s({...e,from:this.id}),this.useNavigate=()=>xs({from:this.fullPath}),this.Link=N.forwardRef((e,t)=>(0,P.jsx)(w,{ref:t,from:this.fullPath,...e}))}};function ws(e){return new Cs(e)}function Ts(){return e=>Ds(e)}var Es=class extends gn{constructor(e){super(e),this.useMatch=e=>gs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({...e,from:this.id}),this.useSearch=e=>bs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>ys({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>vs({...e,from:this.id}),this.useLoaderData=e=>_s({...e,from:this.id}),this.useNavigate=()=>xs({from:this.fullPath}),this.Link=N.forwardRef((e,t)=>
12(0,P.jsx)(w,{ref:t,from:this.fullPath,...e}))}};function Ds(e){return new Es(e)}function F(e){return new Os(e,{silent:!0}).createRoute}var Os=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=ws(e);return t.isRoot=!1,t},this.silent=t?.silent}};function I(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,f(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(me)me(o());else throw o();return N.createElement(r,e)};return s.preload=o,s}function ks(e){let t=pe(),n=`not-found-${fe(t.stores.location,e=>e.pathname)}-${fe(t.stores.status,e=>e)}`;return(0,P.jsx)(Wo,{getResetKey:()=>n,onCatch:(t,n)=>{if(Le(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Le(t))return e.fallback?.(t);throw t},children:e.children})}function As(){return(0,P.jsx)(`p`,{children:`Not Found`})}function js(e){return(0,P.jsx)(P.Fragment,{children:e.children})}function Ms(e,t,n){return t.options.notFoundComponent?(0,P.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,P.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,P.jsx)(As,{})}var Ns=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Ps=(e,t)=>e[0]===t[0]&&e[1]===t[1],Fs=N.memo(function({matchId:e}){let t=pe(),n=t.stores.matchStores.get(e);n||b();let r=fe(t.stores.loadedAt,e=>e),i=fe(n,e=>e,Ns);return(0,P.jsx)(Is,{router:t,matchId:e,resetKey:r,matchState:N.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Is({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,P.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?N.Suspense:js,f=s?Wo:js,p=l?ks:js;return(0,P.jsxs)(i.isRoot?i.options.shellComponent??js:js,{children:[(0,P.jsx)(qo.Provider,{value:t,children:(0,P.jsx)(d,{fallback:o,children:(0,P.jsx)(f,{getResetKey:()=>n,errorComponent:s||Ko,onCatch:(e,t)=>{if(Le(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,P.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return N.createElement(l,e)},children:u||r._displayPending?(0,P.jsx)(ee,{fallback:o,children:(0,P.jsx)(Rs,{matchId:t})}):(0,P.jsx)(Rs,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Ls,{}),(e.options.scrollRestoration,null)]}):null]})}function Ls(){let e=pe(),t=N.useRef();return ne(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...Pt(e.stores.location.get(),r??n)}),t.current=n},[fe(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var Rs=N.memo(function({matchId:e}){let t=pe(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||b();let i=fe(r,e=>e),a=i.routeId,o=t.routesById[a],s=N.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=N.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,P.jsx)(e,{},s):(0,P.jsx)(zs,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);
12if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=g();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return Le(i.error)||b(),Ms(t,o,i.error);if(i.status===`redirected`)throw qe(i.error)||b(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),zs=N.memo(function(){let e=pe(),t=N.useContext(qo),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=fe(a,e=>[e?.routeId,e?.globalNotFound??!1],Ps),i=fe(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,P.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||b(),Ms(e,a,void 0);if(!i)return null;let s=(0,P.jsx)(Fs,{matchId:i});return n===`__root__`?(0,P.jsx)(N.Suspense,{fallback:o,children:s}):s});function Bs(){let e=pe(),t=N.useRef({router:e,mounted:!1}),[n,r]=N.useState(!1),i=fe(e.stores.isLoading,e=>e),a=fe(e.stores.hasPending,e=>e),o=ue(i),s=i||n||a,c=ue(s),l=i||a,u=ue(l);return e.startTransition=e=>{r(!0),N.startTransition(()=>{e(),r(!1)})},N.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return x(e.latestLocation.publicHref)!==x(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),ne(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),ne(()=>{o&&!i&&e.emit({type:`onLoad`,...Pt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),ne(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Pt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),ne(()=>{if(c&&!s){let t=Pt(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),ls(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Vs(){let e=pe(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,P.jsx)(t,{}):null,r=(0,P.jsxs)(typeof document<`u`&&e.ssr?js:N.Suspense,{fallback:n,children:[(0,P.jsx)(Bs,{}),(0,P.jsx)(Hs,{})]});return e.options.InnerWrap?(0,P.jsx)(e.options.InnerWrap,{children:r}):r}function Hs(){let e=pe(),t=fe(e.stores.firstId,e=>e),n=fe(e.stores.loadedAt,e=>e),r=t?(0,P.jsx)(Fs,{matchId:t}):null;return(0,P.jsx)(qo.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,P.jsx)(Wo,{getResetKey:()=>n,errorComponent:Ko,onCatch:void 0,children:r})})}var Us=e=>({createMutableStore:fs,createReadonlyStore:fs,batch:ls}),Ws=e=>new Gs(e),Gs=class extends It{constructor(e){super(e,Us)}};function Ks({router:e,children:t,...n}
12){_(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,P.jsx)(se.Provider,{value:e,children:t});return e.options.Wrap?(0,P.jsx)(e.options.Wrap,{children:r}):r}function qs({router:e,...t}){return(0,P.jsx)(Ks,{router:e,...t,children:(0,P.jsx)(Vs,{})})}function Js(e){let t=pe({warn:e?.router===void 0}),n=e?.router||t;return fe(n.stores.__store,hs(e,n))}function Ys(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Xs(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,P.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,P.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,P.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,P.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,P.jsx)(Zs,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Zs({attrs:e,children:t,preventScriptHoist:n}){pe();let r=S(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(N.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return Ys(n,e),document.head.appendChild(n),()=>n.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,Ys(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,P.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,P.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,P.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Qs=e=>{let t=pe(),n=t.options.ssr?.nonce,r=fe(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),o),i=N.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:m(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=fe(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),o),s=fe(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=mn(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:ln(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},o),c=fe(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...dn(a,t,e),nonce:n}})})}),i},o),l=fe(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),o),u=fe(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),o),d=[];return pn(d,i),d.push(...c),pn(d,a),d.push(...s),pn(d,l),pn(d,u),d};function $s(e){let t=Qs(e.assetCrossOrigin),n=pe().options.ssr?.nonce;return(0,P.jsx)(P.Fragment,{children:t.map(e=>(0,N.createElement)(Xs,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var ec=()=>{let e=pe(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;if(!i)return[];for(let e of n){let n=i.routes[e.routeId]?.scripts;if(n)for(let e of n)r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children,...typeof e.attrs?.src==`string`?{preventScriptHoist:!0}:{}})}return r},r=e=>e.map(e=>
12e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),i=fe(e.stores.matches,n,o);return tc(e,fe(e.stores.matches,r,o),i)};function tc(e,t,n){let r=[...t,...n];return(0,P.jsx)(P.Fragment,{children:r.map((e,t)=>(0,N.createElement)(Xs,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var nc=(e,t)=>{let n={type:`request`,...t||e},r=e=>nc({},Object.assign(n,{validator:e,inputValidator:e}));return{options:n,middleware:e=>nc({},Object.assign(n,{middleware:e})),validator:r,inputValidator:r,client:e=>nc({},Object.assign(n,{client:e})),server:e=>nc({},Object.assign(n,{server:e}))}};function rc(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&rc(e,r.extends))}}var ic=e=>({getOptions:async()=>{let t=await e();if(t.serializationAdapters){let e=new Set;rc(e,t.serializationAdapters),t.serializationAdapters=Array.from(e)}return t},createMiddleware:nc}),ac=Symbol.for(`@supabase/supabase-js.traceContextExtractor`);function oc(){return globalThis[ac]}var sc=function(){return sc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},sc.apply(this,arguments)};function cc(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function lc(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function uc(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var dc=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),fc=class extends Error{constructor(e,t=`FunctionsError`,n){super(e),this.name=t,this.context=n}toJSON(){return{name:this.name,message:this.message,context:this.context}}},pc=class extends fc{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},mc=class extends fc{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},hc=class extends fc{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},gc;(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`})(gc||={});var _c=class{constructor(e,{headers:t={},customFetch:n,region:r=gc.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=dc(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return lc(this,arguments,void 0,function*(e,t={}){var n;let r,i,a;try{let{headers:n,method:o,body:s,signal:c,timeout:l}=t,u={},{region:d}=t;d||=this.region;let f=new URL(`${this.url}/${e}`);d&&d!==`any`&&(u[`x-region`]=d,f.searchParams.set(`forceFunctionRegion`,d));let p,m=!!n&&Object.keys(n).some(e=>e.toLowerCase()===`content-type`);s&&!m?typeof Blob<`u`&&s instanceof Blob||s instanceof ArrayBuffer?(u[`Content-Type`]=`application/octet-stream`,p=s):typeof s==`string`?(u[`Content-Type`]=`text/plain`,p=s):typeof FormData<`u`&&s instanceof FormData?p=s:(u[`Content-Type`]=`application/json`,p=JSON.stringify(s)):p=s&&typeof s!=`string`&&!(typeof Blob<`u`&&s instanceof Blob)&&!(s instanceof ArrayBuffer)&&!(typeof FormData<`u`&&s instanceof FormData)?JSON.stringify(s):s;let h=c;l&&(i=new AbortController,r=setTimeout(()=>i.abort(),l),c?(h=i.signal,a=()=>i.abort(),c.addEventListener(`abort`,a)):h=i.signal);let g=yield this.fetch(f.toString(),{method:o||`POST`,headers:Object.assign(Object.assign(Object.assign({},u),this.headers),n),body:p,signal:h}).catch(e=>{throw new pc(e)}),_=g.headers.get(`x-relay-error`);if(_&&_===`true`)throw new mc(g);if(!g.ok)throw new hc(g);let v=(g.headers.get(`Content-Type`)??`text/plain`).split(`;`)[0].trim().toLowerCase(),y;return y=v===`application/json`?yield g.json():v===`application/octet-stream`||v===`application/pdf`?yield g.blob():v===`text/event-stream`?g:v===`multipart/form-data`?yield g.formData():yield g.text(),{data:y,error:null,response:g}}catch(e){return{data:null,error:e,response:e instanceof hc||e instanceof mc?e.context:void 0}}finally{r&&clearTimeout(r),a&&((n=t.signal)==null||n.removeEventListener(`abort`,a))}})}}
vendor: 16,066 bytes, line 12
12,vc=class extends Error{constructor(e){super(e.message),this.name=`PostgrestError`,this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}},yc=3,bc=e=>Math.min(1e3*2**e,3e4),xc=[520,503],Sc=[`GET`,`HEAD`,`OPTIONS`];function Cc(e){"@babel/helpers - typeof";return Cc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Cc(e)}function wc(e,t){if(Cc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Cc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Tc(e){var t=wc(e,`string`);return Cc(t)==`symbol`?t:t+``}function Ec(e,t,n){return(t=Tc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Oc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Dc(Object(n),!0).forEach(function(t){Ec(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kc(e,t){return new Promise(n=>{if(t?.aborted){n();return}let r=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e);function i(){clearTimeout(r),n()}t?.addEventListener(`abort`,i)})}function Ac(e,t,n,r){return!(!r||n>=yc||!Sc.includes(e)||!xc.includes(t))}async function jc(e,t,n,r){let i=0;for(;;){let a=Oc({},n.headers);i>0&&(a[`X-Retry-Count`]=String(i));let o;try{o=await e(t,{method:n.method,headers:a,body:n.body,signal:n.signal})}catch(e){if(e?.name===`AbortError`||e?.code===`ABORT_ERR`||!Sc.includes(n.method))throw e;if(r&&i<yc){let e=bc(i);i++,await kc(e,n.signal);continue}throw e}if(Ac(n.method,o.status,i,r)){let e=o.headers?.get(`Retry-After`)??null,t=e===null?bc(i):Math.max(0,parseInt(e,10)||0)*1e3;await o.text(),i++,await kc(t,n.signal);continue}return o}}var Mc=class{constructor(e){this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError??!1,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle??!1,this.shouldStripNulls=e.shouldStripNulls??!1,this.urlLengthLimit=e.urlLengthLimit??8e3,this.retryEnabled=e.retry??!0,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get(`Accept`)===`text/csv`)throw Error(`stripNulls() cannot be used with csv()`);return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var n=this;if(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`),this.shouldStripNulls){let e=this.headers.get(`Accept`);e===`application/vnd.pgrst.object+json`?this.headers.set(`Accept`,`application/vnd.pgrst.object+json;nulls=stripped`):(!e||e===`application/json`)&&this.headers.set(`Accept`,`application/vnd.pgrst.array+json;nulls=stripped`)}let r=this.fetch,i=(async()=>{let e={};n.headers.forEach((t,n)=>{e[n]=t});let t=await jc(r,n.url.toString(),{method:n.method,headers:e,body:JSON.stringify(n.body,(e,t)=>typeof t==`bigint`?t.toString():t),signal:n.signal},n.retryEnabled);return await n.processResponse(t)})();return this.shouldThrowOnError||(i=i.catch(e=>{let t=``,n=``,r=``,i=e?.cause;if(i){let n=i?.message??``,r=i?.code??``;t=`${e?.name??`FetchError`}: ${e?.message}`,t+=`\n\nCaused by: ${i?.name??`Error`}: ${n}`,r&&(t+=` (${r})`),i?.stack&&(t+=`\n${i.stack}`)}else t=e?.stack??``;let a=this.url.toString().length;return e?.name===`AbortError`||e?.code===`ABORT_ERR`?(r=``,n=`Request was aborted (timeout or manual cancellation)`,a>this.urlLengthLimit&&(n+=`. Note: Your request URL is ${a} 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.`)):(i?.name===`HeadersOverflowError`||i?.code===`UND_ERR_HEADERS_OVERFLOW`)&&(r=``,n=`HTTP headers exceeded server limits (typically 16KB)`,a>this.urlLengthLimit&&(n+=`. Your request URL is ${a} 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.`)),{success:!1,error:{message:`${e?.name??`FetchError`}: ${e?.message}`,details:t,hint:n,code:r},data:null,count:null,status:0,statusText:``}})),i.then(e,t)}async processResponse(e){var t=this;let n=null,r=null,i=null,a=e.status,o=e.statusText;if(e.ok){if(t.method!==`HEAD`){let i=await e.text();if(i!==``)if(t.headers.get(`Accept`)===`text/csv`)r=i;else if(t.headers.get(`Accept`)&&t.headers.get(`Accept`)?.includes(`application/vnd.pgrst.plan+text`))r=i;else try{r=JSON.parse(i)}catch{if(n={message:i},r=null,t.shouldThrowOnError)throw new vc({message:i,details:``,hint:``,code:``})}}let s=t.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);if(s&&c&&c.length>1&&(i=parseInt(c[1])),t.isMaybeSingle&&Array.isArray(r))if(r.length>1){if(n={code:`PGRST116`,details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:`JSON object requested, multiple (or no) rows returned`},r=null,i=null,a=406,o=`Not Acceptable`,t.shouldThrowOnError)throw new vc(Oc(Oc({},n),{},{hint:n.hint??``}))}else r=r.length===1?r[0]:null}else{let i=await e.text();try{n=JSON.parse(i),Array.isArray(n)&&e.status===404&&(r=[],n=null,a=200,o=`OK`)}catch{e.status===404&&i===``?(a=204,o=`No Content`):n={message:i}}if(n&&t.shouldThrowOnError)throw new vc(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},Nc=class extends Mc{throwOnError(){return super.throwOnError()}select(e){let t=!1,n=(e??`*`).split(``).map(e=>/\s/.test(e)&&!t?``:(e===`"`&&(t=!t),e)).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:i=r}={}){let a=i?`${i}.order`:`order`,o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:``}${e}.${t?`asc`:`desc`}${n===void 0?``:n?`.nullsfirst`:`.nullslast`}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){let r=n===void 0?`limit`:`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){let i=r===void 0?`offset`:`${r}.offset`,a=r===void 0?`limit`:`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${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.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:i=!1,format:a=`text`}={}){let o=[e?`analyze`:null,t?`verbose`:null,n?`settings`:null,r?`buffers`:null,i?`wal`:null].filter(Boolean).join(`|`),s=this.headers.get(`Accept`)??`application/json`;return this.headers.set(`Accept`,`application/vnd.pgrst.plan+${a}; for="${s}"; options=${o};`),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}},Pc=RegExp(`[,()]`),Fc=class extends Nc{throwOnError(){return super.throwOnError()}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){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Pc.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&Pc.test(e)?`"${e}"`:`${e}`).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 i=``;r===`plain`?i=`pl`:r===`phrase`?i=`ph`:r===`websearch`&&(i=`w`);let a=n===void 0?``:`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){let 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}},Ic=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:a}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=a}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:n=!1,count:r}=t??{},i=n?`HEAD`:`GET`,a=!1,o=(e??`*`).split(``).map(e=>/\s/.test(e)&&!a?``:(e===`"`&&(a=!a),e)).join(``),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set(`select`,o),r&&c.append(`Prefer`,`count=${r}`),new Fc({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:n=!0}={}){let{url:r,headers:i}=this.cloneRequestState();if(t&&i.append(`Prefer`,`count=${t}`),n||i.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);r.searchParams.set(`columns`,e.join(`,`))}}return new Fc({method:`POST`,url:r,headers:i,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){let{url:a,headers:o}=this.cloneRequestState();if(o.append(`Prefer`,`resolution=${n?`ignore`:`merge`}-duplicates`),t!==void 0&&a.searchParams.set(`on_conflict`,t),r&&o.append(`Prefer`,`count=${r}`),i||o.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set(`columns`,e.join(`,`))}}return new Fc({method:`POST`,url:a,headers:o,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){let{url:n,headers:r}=this.cloneRequestState();return t&&r.append(`Prefer`,`count=${t}`),new Fc({method:`PATCH`,url:n,headers:r,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){let{url:t,headers:n}=this.cloneRequestState();return e&&n.append(`Prefer`,`count=${e}`),new Fc({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function Lc(e,t){try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return new vc({message:String(t.message??e),details:t.details??``,hint:t.hint??``,code:t.code??``})}catch{}return new vc({message:e||t,details:``,hint:``,code:``})}function Rc(e,t,n){let r=e;return{success:!1,error:new vc({message:`${r?.name??`FetchError`}: ${r?.message}`,details:``,hint:``,code:``}),data:null,count:null,status:t,statusText:n}}var zc=class e{constructor(e,{headers:t={},schema:n,fetch:r,timeout:i,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.urlLengthLimit=a;let s=r??globalThis.fetch;i!==void 0&&i>0?this.fetch=(e,t)=>{let n=new AbortController,r=setTimeout(()=>n.abort(),i),a=t?.signal;if(a){if(a.aborted)return clearTimeout(r),s(e,t);let i=()=>{clearTimeout(r),n.abort()};return a.addEventListener(`abort`,i,{once:!0}),s(e,Oc(Oc({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,Oc(Oc({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:this.fetch=s,this.retry=o}from(e){if(!e||typeof e!=`string`||e.trim()===``)throw Error(`Invalid relation name: relation must be a non-empty string.`);return new Ic(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}async getOpenApiSpec(){var e=this;let t=new Headers(e.headers);t.set(`Accept`,`application/openapi+json`),e.schemaName&&t.set(`Accept-Profile`,e.schemaName);let n={};t.forEach((e,t)=>{n[t]=e});let r=e.fetch??globalThis.fetch,i;try{i=await jc(r,`${e.url}/`,{method:`GET`,headers:n},e.retry??!0)}catch(e){return Rc(e,0,``)}let a;try{a=await i.text()}catch(e){return Rc(e,i.status,i.statusText)}if(i.ok)try{return{success:!0,error:null,data:JSON.parse(a),count:null,status:i.status,statusText:i.statusText}}catch{}return{success:!1,error:Lc(a,i.statusText),data:null,count:null,status:i.status,statusText:i.statusText}}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let a,o=new URL(`${this.url}/rpc/${e}`),s,c=e=>typeof e==`object`&&!!e&&(!Array.isArray(e)||e.some(c)),l=n&&Object.values(t).some(c);l?(a=`POST`,s=t):n||r?(a=n?`HEAD`:`GET`,Object.entries(t).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(`,`)}}`:`${t}
12`]).forEach(([e,t])=>{o.searchParams.append(e,t)})):(a=`POST`,s=t);let u=new Headers(this.headers);return l?u.set(`Prefer`,i?`count=${i},return=minimal`:`return=minimal`):i&&u.set(`Prefer`,`count=${i}`),new Fc({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},Bc=class{constructor(){}static detectEnvironment(){if(typeof WebSocket<`u`)return{type:`native`,wsConstructor:WebSocket};let e=globalThis;if(typeof globalThis<`u`&&e.WebSocket!==void 0)return{type:`native`,wsConstructor:e.WebSocket};let t=typeof global<`u`?global:void 0;if(t&&t.WebSocket!==void 0)return{type:`native`,wsConstructor:t.WebSocket};if(typeof globalThis<`u`&&e.WebSocketPair!==void 0&&globalThis.WebSocket===void 0)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`&&e.EdgeRuntime||typeof navigator<`u`&&navigator.userAgent?.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.`};let n=globalThis.process;if(n){let e=n.versions;if(e&&e.node)return{type:`unsupported`,error:`Node.js detected but native WebSocket not found.`,workaround:`Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option.`}}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(){let e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let t=e.error||`WebSocket not supported in this environment.`;throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),Error(t)}static isWebSocketSupported(){try{return this.detectEnvironment().type===`native`}catch{return!1}}},Vc=`realtime-js/2.116.0`,Hc=`1.0.0`,Uc=`2.0.0`,Wc=Uc,Gc=1e4,Kc=15e3,qc=1e4,Jc={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},Yc={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},Xc={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},Zc=class{constructor(e){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=e??[]}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event==`string`)return t(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){return this._isArrayBuffer(e.payload?.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){let t=e.payload?.payload??new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,t)}_encodeJsonUserBroadcastPush(e){let t=e.payload?.payload??{},n=new TextEncoder().encode(JSON.stringify(t)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,n)}_encodeUserBroadcastPush(e,t,n){let r=new TextEncoder,i=r.encode(e.topic),a=r.encode(e.ref??``),o=r.encode(e.join_ref??``),s=r.encode(e.payload.event),c=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},l=r.encode(Object.keys(c).length===0?``:JSON.stringify(c));if(o.length>255)throw Error(`joinRef length ${o.length} exceeds maximum of 255`);if(a.length>255)throw Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw Error(`topic length ${i.length} exceeds maximum of 255`);if(s.length>255)throw Error(`userEvent length ${s.length} exceeds maximum of 255`);if(l.length>255)throw Error(`metadata length ${l.length} exceeds maximum of 255`);let u=this.USER_BROADCAST_PUSH_META_LENGTH+o.length+a.length+i.length+s.length+l.length,d=new ArrayBuffer(this.HEADER_LENGTH+u),f=new DataView(d),p=new Uint8Array(d),m=0;f.setUint8(m++,this.KINDS.userBroadcastPush),f.setUint8(m++,o.length),f.setUint8(m++,a.length),f.setUint8(m++,i.length),f.setUint8(m++,s.length),f.setUint8(m++,l.length),f.setUint8(m++,t),p.set(o,m),m+=o.length,p.set(a,m),m+=a.length,p.set(i,m),m+=i.length,p.set(s,m),m+=s.length,p.set(l,m),m+=l.length;var h=new Uint8Array(d.byteLength+n.byteLength);return h.set(new Uint8Array(d),0),h.set(new Uint8Array(n),d.byteLength),h.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if(typeof e==`string`){let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}return t({})}_binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,r)}}_decodeUserBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+4,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=e.slice(s,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,p={type:this.BROADCAST_EVENT,event:l,payload:f};return a>0&&(p.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){return e instanceof ArrayBuffer||e?.constructor?.name===`ArrayBuffer`}_pick(e,t){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e)))}},Qc;(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`})(Qc||={});var $c=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=el(i,e,t,r),n),{}):{}},el=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];
vendor: 36,164 bytes, lines 12-13
12return i&&!r.includes(i)?tl(i,a):nl(a)},tl=(e,t)=>{if(e.charAt(0)===`_`)return ol(t,e.slice(1,e.length));switch(e){case Qc.bool:return rl(t);case Qc.float4:case Qc.float8:case Qc.int2:case Qc.int4:case Qc.int8:case Qc.numeric:case Qc.oid:return il(t);case Qc.json:case Qc.jsonb:return al(t);case Qc.timestamp:return sl(t);case Qc.abstime:case Qc.date:case Qc.daterange:case Qc.int4range:case Qc.int8range:case Qc.money:case Qc.reltime:case Qc.text:case Qc.time:case Qc.timestamptz:case Qc.timetz:case Qc.tsrange:case Qc.tstzrange:return nl(t);default:return nl(t)}},nl=e=>e,rl=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},il=e=>{if(typeof e==`string`){let t=parseFloat(e);if(!Number.isNaN(t))return t}return e},al=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},ol=(e,t)=>{if(typeof e!=`string`)return e;let n=e.length-1,r=e[n];if(e[0]===`{`&&r===`}`){let r,i=e.slice(1,n);try{r=JSON.parse(`[`+i+`]`)}catch{r=i?i.split(`,`):[]}return r.map(e=>tl(t,e))}return e},sl=e=>typeof e==`string`?e.replace(` `,`T`):e,cl=e=>{let 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+=`/api/broadcast`,t.href},ll=e=>typeof e==`function`?e:function(){return e},ul=typeof self<`u`?self:null,dl=typeof window<`u`?window:null,fl=ul||dl||globalThis,pl=`2.0.0`,ml=1e4,hl=1e3,gl=100,L={connecting:0,open:1,closing:2,closed:3},_l={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},vl={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},yl={longpoll:`longpoll`,websocket:`websocket`},bl={complete:4},xl=`base64url.bearer.phx.`,Sl=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),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()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger(`timeout`,{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},Cl=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries+=1,this.callback()},this.timerCalc(this.tries+1))}},wl=class{constructor(e,t,n){this.state=_l.closed,this.topic=e,this.params=ll(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Sl(this,vl.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Cl(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive(`ok`,()=>{this.state=_l.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=_l.errored,this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log(`channel`,`close ${this.topic}`),this.state=_l.closed,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log(`channel`,`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=_l.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive(`timeout`,()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`timeout ${this.topic}`,this.joinPush.timeout),new Sl(this,vl.leave,ll({}),this.timeout).send(),this.state=_l.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(vl.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(this.joinedOnce)throw Error(`tried to join multiple times. 'join' can only be called a single time per channel instance`);return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=_l.closed,this.bindings=[]}onClose(e){this.on(vl.close,e)}onError(e){return this.on(vl.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(t===void 0||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t||={},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Sl(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=_l.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(vl.close,`leave`)},n=new Sl(this,vl.leave,ll({}),e);return n.receive(`ok`,()=>t()).receive(`timeout`,()=>t()),n.send(),this.canPush()||n.trigger(`ok`,{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic===e?r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log(`channel`,`dropping outdated message`,{topic:e,event:t,payload:n,joinRef:r}),!1):!0:!1}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=_l.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw Error(`channel onMessage callbacks must return the payload, modified or unmodified`);let a=this.bindings.filter(r=>r.event===e&&this.filterBindings(r,t,n));for(let e=0;e<a.length;e++)a[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===_l.closed}isErrored(){return this.state===_l.errored}isJoined(){return this.state===_l.joined}isJoining(){return this.state===_l.joining}isLeaving(){return this.state===_l.leaving}},Tl=class{static request(e,t,n,r,i,a,o){if(fl.XDomainRequest){let n=new fl.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}else if(fl.XMLHttpRequest){let s=new fl.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}else if(fl.fetch&&fl.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);else throw Error(`No suitable XMLHttpRequest implementation found`)}static fetchRequest(e,t,n,r,i,a,o){let s={method:e,headers:n,body:r},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),s.signal=c.signal),fl.fetch(t,s).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>o&&o(e)).catch(e=>{e.name===`AbortError`&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,i,a,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);o&&o(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,a,o,s){e.open(t,n,!0),e.timeout=a;for(let[t,n]of Object.entries(r))e.setRequestHeader(t,n);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{e.readyState===bl.complete&&s&&s(this.parseJSON(e.responseText))},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||e===``)return null;try{return JSON.parse(e)}catch{return console&&console.log(`failed to parse JSON response`,e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,a=e[r];typeof a==`object`?n.push(this.serialize(a,i)):n.push(encodeURIComponent(i)+`=`+encodeURIComponent(a))}return n.join(`&`)}static appendParams(e,t){return Object.keys(t).length===0?e:`${e}${e.match(/\?/)?`&`:`?`}${this.serialize(t)}`}},El=e=>{let t=``,n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return btoa(t)},Dl=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(xl)&&(this.authToken=atob(t[1].slice(xl.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=L.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+yl.websocket),`$1/`+yl.longpoll)}endpointURL(){return Tl.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=L.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===L.open||this.readyState===L.connecting}poll(){let e={Accept:`application/json`};this.authToken&&(e[`X-Phoenix-AuthToken`]=this.authToken),this.ajax(`GET`,e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:r}=e;if(t===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,`session_gone`,!1);return}this.token=n}else t=0;switch(t){case 200:r.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=L.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,`forbidden`,!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,`internal server error`,500);break;default:throw Error(`unhandled poll status ${t}`)}})}send(e){typeof e!=`string`&&(e=El(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;let n=t+gl,r=e.slice(t,n);this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},r.join(` 13`),()=>this.onerror(`timeout`),t=>{!t||t.status!==200?(this.awaitingBatchAck=!1,this.onerror(t&&t.status),this.closeAndRetry(1011,`internal server error`,!1)):n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=L.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<`u`?this.onclose(new CloseEvent(`close`,r)):this.onclose(r)}ajax(e,t,n,r,i){let a;a=Tl.request(e,this.endpointURL(),t,n,this.timeout,()=>{this.reqs.delete(a),r()},e=>{this.reqs.delete(a),this.isActive()&&i(e)}),this.reqs.add(a)}},Ol=class e{constructor(t,n={}){let r=n.events||{state:`presence_state`,diff:`presence_diff`};this.state=Object.create(null),this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.joinRef=this.channel.joinRef(),this.state=e.syncState(this.state,t,n,r),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,n,r)}),this.pendingDiffs=[],i()}),this.channel.on(r.diff,t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,n,r),i())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(t){return e.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,t,n,r){let i=this.toNullProtoObj(this.clone(e));t=this.toNullProtoObj(t);let a=Object.create(null),o=Object.create(null);return this.map(i,(e,n)=>{t[e]||(o[e]=n)}),this.map(t,(e,t)=>{let n=i[e];if(n){let r=t.metas.map(e=>e.phx_ref),i=n.metas.map(e=>e.phx_ref),s=t.metas.filter(e=>i.indexOf(e.phx_ref)<0),c=n.metas.filter(e=>r.indexOf(e.phx_ref)<0);s.length>0&&(a[e]=t,a[e].metas=s),c.length>0&&(o[e]=this.clone(n),o[e].metas=c)}else a[e]=t}),this.syncDiff(i,{joins:a,leaves:o},n,r)}static syncDiff(e,t,n,r){e=this.toNullProtoObj(e);let{joins:i,leaves:a}=this.clone(t);return n||=function(){},r||=function(){},this.map(i,(t,r)=>{let i=e[t];if(e[t]=this.clone(r),i){let n=e[t].metas.map(e=>e.phx_ref),r=i.metas.filter(e=>n.indexOf(e.phx_ref)<0);e[t].metas.unshift(...r)}n(t,i,r)}),this.map(a,(t,n)=>{let i=e[t];if(!i)return;let a=n.metas.map(e=>e.phx_ref);i.metas=i.metas.filter(e=>a.indexOf(e.phx_ref)<0),r(t,i,n),i.metas.length===0&&delete e[t]}),e}static list(e,t){return t||=function(e,t){return t},this.map(e,(e,n)=>t(e,n))}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=e[n]}),t}static clone(e){return JSON.parse(JSON.stringify(e))}},kl={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:a}=e,o=new TextEncoder,s=o.encode(t),c=o.encode(n),l=o.encode(i),u=o.encode(r);this.assertFieldSize(s.byteLength,`join_ref`),this.assertFieldSize(c.byteLength,`ref`),this.assertFieldSize(l.byteLength,`topic`),this.assertFieldSize(u.byteLength,`event`);let d=this.META_LENGTH+s.byteLength+c.byteLength+l.byteLength+u.byteLength,f=new ArrayBuffer(this.HEADER_LENGTH+d),p=new Uint8Array(f),m=new DataView(f),h=0;m.setUint8(h++,this.KINDS.push),m.setUint8(h++,s.byteLength),m.setUint8(h++,c.byteLength),m.setUint8(h++,l.byteLength),m.setUint8(h++,u.byteLength),p.set(s,h),h+=s.byteLength,p.set(c,h),h+=c.byteLength,p.set(l,h),h+=l.byteLength,p.set(u,h),h+=u.byteLength;var g=new Uint8Array(f.byteLength+a.byteLength);return g.set(p,0),g.set(new Uint8Array(a),f.byteLength),g.buffer},assertFieldSize(e,t){if(e>255)throw Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(e.slice(o,o+r));o+=r;let c=n.decode(e.slice(o,o+i));o+=i;let l=n.decode(e.slice(o,o+a));return o+=a,{join_ref:s,ref:null,topic:c,event:l,payload:e.slice(o,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=n.decode(e.slice(s,s+o));s+=o;let f={status:d,response:e.slice(s,e.byteLength)};return{join_ref:c,ref:l,topic:u,event:vl.reply,payload:f}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a+=r;let s=n.decode(e.slice(a,a+i));return a+=i,{join_ref:null,ref:null,topic:o,event:s,payload:e.slice(a,e.byteLength)}}},Al=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||ml,this.transport=t.transport||fl.WebSocket||Dl,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=fl&&fl.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=kl.encode.bind(kl),this.defaultDecoder=kl.decode.bind(kl),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||`arraybuffer`,this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport===Dl?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;dl&&dl.addEventListener&&(dl.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),dl.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),dl.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=ll(t.params||{}),this.endPoint=`${e}/${yl.websocket}`,this.vsn=t.vsn||pl,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Cl(()=>{if(this.pageHidden){this.log(`Not reconnecting as page is hidden!`),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken&&ll(t.authToken)}getLongPollTransport(){return Dl}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&=(this.conn.close(),null),this.transport=e}protocol(){return location.protocol.match(/^https/)?`wss`:`ws`}endPointURL(){let e=Tl.appendParams(Tl.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)===`/`?e.charAt(1)===`/`?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`:e}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log(`passing params to connect is deprecated. Instead pass :params to the Socket constructor`),this.params=ll(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Dl?this.connectWithFallback(Dl,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Dl:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${xl}${btoa(this.authToken()).replace(/=/g,``)}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,i,a=this.transportName(e),o=t=>{this.log(`transport`,`falling back to ${a}...`,t),this.off([void 0,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o(`memorized`);this.fallbackTimer=setTimeout(o,t),i=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),o(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,`true`),this.log(`transport`,`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,t),this.ping(e=>{this.log(`transport`,`connected to primary after`,e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log(`transport`,`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks(`open`)}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log(`transport`,`heartbeat timeout. Attempting to re-establish connection`);try{this.heartbeatCallback(`timeout`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.triggerChanError(Error(`heartbeat timeout`)),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),hl,`heartbeat timeout`)}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();let r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||``):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===L.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log(`transport`,`close`,e),this.triggerChanError(e),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks(`close`,e)}onConnError(e){this.hasLogger()&&this.log(`transport`,`error`,e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks(`error`,e,t,n),(t===this.transport||n>0)&&this.triggerChanError(e)}triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(vl.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case L.connecting:return`connecting`;case L.open:return`open`;case L.closing:return`closing`;default:return`closed`}}isConnected(){return this.connectionState()===`open`}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>e.indexOf(t)===-1)}channel(e,t={}){let n=new wl(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;this.log(`push`,`${t} ${n} (${a}, ${i})`,r)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback(`disconnected`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback(`sent`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;if(i&&i===this.pendingHeartbeatRef){let e=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(r.status===`ok`?`ok`:`error`,e)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log(`receive`,`${r.status||``} ${t} ${n} ${i&&`(`+i+`)`||``}`.trim(),r);for(let e=0;e<this.channels.length;e++){let o=this.channels[e];o.isMember(t,n,r,a)&&o.trigger(n,r,i,a)}this.triggerStateCallbacks(`message`,e)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(t){this.log(`error`,`error in ${e} callback`,t)}})}catch(t){this.log(`error`,`error triggering ${e} callbacks`,t)}}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log(`transport`,`leaving duplicate topic "${e}"`),t.leave())}},jl=class e{constructor(t,n){let r=Pl(n);this.presence=new Ol(t.getChannel(),r),this.presence.onJoin((n,r,i)=>{let a=e.onJoinPayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onLeave((n,r,i)=>{let a=e.onLeavePayload(n,r,i);t.getChannel().trigger(`presence`,a)}),this.presence.onSync(()=>{t.getChannel().trigger(`presence`,{event:`sync`})})}get state(){return e.transformState(this.presence.state)}static transformState(e){return e=Nl(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=Ml(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:Fl(t),newPresences:Ml(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:Fl(t),leftPresences:Ml(n)}}};function Ml(e){return e.metas.map(e=>{let t=Object.defineProperties({},Object.getOwnPropertyDescriptors(e));return t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t})}function Nl(e){return JSON.parse(JSON.stringify(e))}function Pl(e){return e?.events&&{events:e.events}}function Fl(e){return e?.metas?Ml(e):[]}var Il;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(Il||={});var Ll=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new jl(this.channel.channelAdapter,t)}};function Rl(e){if(e instanceof Error)return e;if(typeof e==`string`)return Error(e);if(e&&typeof e==`object`){let t=e;if(typeof t.code==`number`){let n=typeof t.reason==`string`&&t.reason?` (${t.reason})`:``;return Error(`socket closed: ${t.code}${n}`,{cause:e})}return Error(`channel error: transport failure`,{cause:e})}return Error(`channel error: connection lost`)}var zl=class{constructor(e,t,n){let r=Bl(n);this.channel=e.getSocket().channel(t,r),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,t){return this.channel.on(e,t)}off(e,t){this.channel.off(e,t)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,t,n){let r;try{r=this.channel.push(e,t,n)}catch{throw Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>100){let e=this.channel.pushBuffer.shift();e.cancelTimeout(),this.socket.log(`channel`,`discarded push due to buffer overflow: ${e.event}`,e.payload())}return r}updateJoinPayload(e){let t=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},t),e)}canPush(){return this.socket.isConnected()&&this.state===Jc.joined}isJoined(){return this.state===Jc.joined}isJoining(){return this.state===Jc.joining}isClosed(){return this.state===Jc.closed}isLeaving(){return this.state===Jc.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function Bl(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var Vl=/[,()"\\]/,Hl=e=>Vl.test(e)||e!==e.trim(),Ul=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`,Wl=e=>{let t=e===null?`null`:String(e);return Hl(t)?Ul(t):t},Gl=e=>e===null?`null`:String(e),Kl=(e,t)=>{if(e===`in`){let e=Array.isArray(t)?t:[t];if(e.length===0)throw Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(e)).map(e=>Wl(e)).join(`,`)})`}return e===`is`?`is.${Gl(t)}`:`${e}.${Wl(t)}`},ql=class{constructor(){this.filters=[]}add(e,t,n,r=!1){let i=r?`not.`:``;return this.filters.push(`${e}=${i}${Kl(t,n)}`),this}eq(e,t){return this.add(e,`eq`,t)}neq(e,t){return this.add(e,`neq`,t)}gt(e,t){return this.add(e,`gt`,t)}gte(e,t){return this.add(e,`gte`,t)}lt(e,t){return this.add(e,`lt`,t)}lte(e,t){return this.add(e,`lte`,t)}in(e,t){return this.add(e,`in`,t)}like(e,t){return this.add(e,`like`,t)}ilike(e,t){return this.add(e,`ilike`,t)}match(e,t){return this.add(e,`match`,t)}imatch(e,t){return this.add(e,`imatch`,t)}is(e,t){return this.add(e,`is`,t)}isDistinct(e,t){return this.add(e,`isdistinct`,t)}not(e,t,n){return this.add(e,t,n,!0)}build(){return this.filters.join(`,`)}toString(){return this.build()}},R;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(R||={});var z;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(z||={});var B;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(B||={});var V=class e{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,t={config:{}},n){if(this.topic=e,this.params=t,this.socket=n,this.bindings={},this.subTopic=e.replace(/^realtime:/i,``),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},t.config),this.channelAdapter=new zl(this.socket.socketAdapter,e,this.params),this.presence=new Ll(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=cl(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&this.params.config?.broadcast?.replay)throw Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,t=this.timeout){if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){let{config:{broadcast:n,presence:r,private:i,postgres_changes_options:a}}=this.params,o=this.bindings.postgres_changes?.map(e=>e.filter)??[],s=!!this.bindings[z.PRESENCE]&&this.bindings[z.PRESENCE].length>0||this.params.config.presence?.enabled===!0,c={},l=Object.assign({broadcast:n,presence:Object.assign(Object.assign({},r),{enabled:s}),postgres_changes:o,private:i},a?{postgres_changes_options:a}:{});this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this._onError(t=>{e?.(B.CHANNEL_ERROR,Rl(t))}),this._onClose(()=>e?.(B.CLOSED)),this.updateJoinPayload(Object.assign({config:l},c)),this._updateFilterMessage();let u=a?.wait&&o.length>0?Math.max(t,(a.timeout??Kc)+qc):t;this.channelAdapter.subscribe(u).receive(`ok`,async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),t===void 0){e?.(B.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=Jc.errored;let n=Object.values(t).join(`, `)||`error`;e?.(B.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(B.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){let r=this.bindings.postgres_changes,i=r?.length??0,a=[];for(let o=0;o<i;o++){let i=r[o],{filter:{event:s,schema:c,table:l,filter:u}}=i,d=t&&t[o];if(d&&d.event===s&&e.isFilterValueEqual(d.schema,c)&&e.isFilterValueEqual(d.table,l)&&e.isFilterValueEqual(d.filter,u))a.push(Object.assign(Object.assign({},i),{id:d.id}));else{this.unsubscribe(),this.state=Jc.errored,n?.(B.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=Jc.errored&&n&&n(B.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:`presence`,event:`track`,payload:e},t)}async untrack(e={}){return await this.send({type:`presence`,event:`untrack`},e)}on(e,t,n){let r=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=e===z.PRESENCE||e===z.POSTGRES_CHANGES;if(r&&i)throw this.socket.log(`channel`,`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,t,n)}async httpSend(e,t,n={}){if(t==null)return Promise.reject(Error(`Payload is required for httpSend()`));let r=t instanceof ArrayBuffer||ArrayBuffer.isView(t),i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":r?`application/octet-stream`:`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a=new URL(this.broadcastEndpointURL);a.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&a.searchParams.set(`private`,`true`);let o={method:`POST`,headers:i,body:r?t:JSON.stringify(t)},s=await this._fetchWithTimeout(a.toString(),o,n.timeout??this.timeout);if(s.status===202)return{success:!0};if(s.status===404)return Promise.reject(Error(`httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
13ime-js/migrations/httpsend-server-version.md`));let c=s.statusText;try{let e=await s.json();c=e.error||e.message||c}catch{}return Promise.reject(Error(c))}async send(e,t={}){if(!this.channelAdapter.canPush()&&e.type===`broadcast`){let n=`Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.`;this.socket.hasLogger()?this.socket.log(`channel`,n):console.warn(n);let{event:r,payload:i}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);let o={method:`POST`,headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:r,payload:i,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,t.timeout??this.timeout);return await e.body?.cancel(),e.ok?`ok`:`error`}catch(e){return e instanceof Error&&e.name===`AbortError`?`timed out`:`error`}}else return new Promise(n=>{let r=this.channelAdapter.push(e.type,e,t.timeout||this.timeout);e.type===`broadcast`&&!this.params?.config?.broadcast?.ack&&n(`ok`),r.receive(`ok`,()=>n(`ok`)),r.receive(`error`,()=>n(`error`)),r.receive(`timeout`,()=>n(`timed out`))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(t=>{this.channelAdapter.unsubscribe(e).receive(`ok`,()=>t(`ok`)).receive(`timeout`,()=>t(`timed out`)).receive(`error`,()=>t(`error`))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),a}_on(t,n,r){let i=t.toLocaleLowerCase(),a=n?.filter;if((a instanceof ql||typeof a==`object`&&a&&typeof a.build==`function`)&&(n=Object.assign(Object.assign({},n),{filter:a.build()})),i===z.POSTGRES_CHANGES&&this.bindings[i]?.find(t=>e.isSamePostgresFilter(t.filter,n)))return this.socket.log(`error`,`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,n),this;let o=this.channelAdapter.on(t,r),s={type:i,filter:n,callback:r,ref:o};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,t,n)=>{let r=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(r,n))return!1;let i=this.bindings[r]?.find(t=>t.ref===e.ref);if(!i)return!0;if([`broadcast`,`presence`,`postgres_changes`].includes(r))if(`id`in i){let e=i.id,n=i.filter?.event;return e&&t.ids?.includes(e)&&(n===`*`||n?.toLocaleLowerCase()===t.data?.type.toLocaleLowerCase())}else{let e=(i?.filter?.event)?.toLocaleLowerCase();return e===`*`||e===(t?.event)?.toLocaleLowerCase()}else return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=Yc;return t&&[n,r,i,a].includes(e)&&t!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,t,n)=>{if(typeof t==`object`&&`ids`in t){let e=t.data,{schema:n,table:r,commit_timestamp:i,type:a,errors:o}=e;return Object.assign(Object.assign({},{schema:n,table:r,commit_timestamp:i,eventType:a,new:{},old:{},errors:o}),this._getPayloadRecords(e))}return t})}copyBindings(e){if(this.joinedOnce)throw Error(`cannot copy bindings into joined channel`);for(let t in e.bindings)for(let n of e.bindings[t])this._on(n.type,n.filter,n.callback)}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}static isSamePostgresFilter(t,n){let r=(t?.select)?.join()??void 0,i=(n?.select)?.join()??void 0;return t?.event===n?.event&&e.isFilterValueEqual(t?.schema,n?.schema)&&e.isFilterValueEqual(t?.table,n?.table)&&e.isFilterValueEqual(t?.filter,n?.filter)&&r===i}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=$c(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=$c(e.columns,e.old_record)),t}},H=class{constructor(e,t){this.socket=new Al(e,t)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,t,n,r=1e4){return new Promise(i=>{setTimeout(()=>i(`timeout`),r),this.socket.disconnect(()=>{e(),i(`ok`)},t,n)})}push(e){this.socket.push(e)}log(e,t,n){this.socket.log(e,t,n)}hasLogger(){return this.socket.hasLogger()}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Xc.connecting}isDisconnecting(){return this.socket.connectionState()==Xc.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},Jl={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Yl=[1e3,2e3,5e3,1e4],Xl=1e4;function Zl(){let e=new Map;return{get length(){return e.size},clear(){e.clear()},getItem(t){return e.has(t)?e.get(t):null},key(t){return Array.from(e.keys())[t]??null},removeItem(t){e.delete(t)},setItem(t,n){e.set(t,String(n))}}}function Ql(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return Zl()}var $l=` 14 addEventListener("message", (e) => { 15 if (e.data.event === "start") { 16 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 17 } 18 });`,eu=class{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,t){if(this.channels=[],this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint=``,this.headers={},this.params={}
18,this.ref=0,this.serializer=new Zc,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!t?.params?.apikey)throw Error(`API key is required to connect to Realtime`);this.apiKey=t.params.apikey;let n=this._initializeOptions(t);this.socketAdapter=new H(e,n),this.httpEndpoint=cl(e),this.fetch=this._resolveFetch(t?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely(`connect`),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){let t=e.message;throw Error(`WebSocket not available: ${t}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,t){return this._cancelPendingDisconnect(),this.isDisconnecting()?`ok`:await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,t)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return t===`ok`&&e.teardown(),t}async removeAllChannels(){let e=this.channels.map(async e=>{let t=await e.unsubscribe();return e.teardown(),t}),t=await Promise.all(e);return await this.disconnect(),t}log(e,t,n){this.socketAdapter.log(e,t,n)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||Xc.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,t={config:{}}){let n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{let n=new V(`realtime:${e}`,t,this);return this._cancelPendingDisconnect(),this.channels.push(n),n}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){let t=++this._authGeneration,n=this._performAuth(e,t);t===this._authGeneration&&(this._authPromise=n);try{await n}finally{this._authPromise===n&&(this._authPromise=null)}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic),this.channels.length===0&&(this.log(`transport`,`no channels remaining, scheduling disconnect`),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log(`transport`,`disconnecting immediately - no channels`),this.disconnect();return}
18this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log(`transport`,`deferred disconnect fired - no channels, disconnecting`),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log(`transport`,`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log(`transport`,`pending disconnect cancelled - channel activity detected`),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e,t){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),n=this.accessTokenValue}else n=this.accessTokenValue;t===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:r&&(this._manuallySetToken=!0),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(e=>{let t={access_token:n,version:Vc};e.updateJoinPayload(t),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(Yc.access_token,{access_token:n})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e=`general`){this._isManualToken()||this.setAuth().catch(t=>{this.log(`error`,`Error setting auth in ${e}`,t)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(e=>{this.log(`error`,`error waiting for auth on connect`,e)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(t,n)=>{t!==`disconnected`&&(t==`sent`&&this._setAuthSafely(),e&&e(t,n))}}_startWorkerHeartbeat(){this.workerUrl?this.log(`worker`,`starting worker for from ${this.workerUrl}`):this.log(`worker`,`starting default worker`);let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log(`worker`,`worker error`,e.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=e=>{e.data.event===`keepAlive`&&this.sendHeartbeat()},this.workerRef.postMessage({event:`start`,interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&=(this.log(`worker`,`terminating worker`),this.workerRef.terminate(),void 0)}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([$l],{type:`application/javascript`});t=URL.createObjectURL(e)}return t}_initializeOptions(e){this.worker=e?.worker??!1,this.accessToken=e?.accessToken??null;let t={};t.timeout=e?.timeout??Gc,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??Jl.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??Jl.HEARTBEAT_INTERVAL),t.transport=e?.transport??Bc.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??Ql(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>Yl[e-1]||Xl);let n,r,i=e?.vsn??Wc;switch(i){case Hc:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case Uc:n=this.serializer.encode.bind(this.serializer),r=this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${t.vsn}`)}if(t.vsn=i,t.encode=e?.encode??n,t.decode=e?.decode??r,t.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,t.params=Object.assign(Object.assign({},t.params),{log_level:this.logLevel})),this.worker){if(typeof window<`u`&&!window.Worker)throw Error(`Web Worker is not supported`);this.workerUrl=e?.workerUrl,t.autoSendHeartbeat=!this.worker}return t}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
vendor: 4,836 bytes, line 18
18,tu=class extends Error{constructor(e,t){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)&&t.icebergType?.includes(`CommitState`)===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function nu(e,t,n){let r=new URL(t,e);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&r.searchParams.set(e,t);return r.toString()}async function ru(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 iu(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=nu(e.baseUrl,r,i),c=await ru(e.auth),l=await t(s,{method:n,headers:{...a?{"Content-Type":`application/json`}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await l.text(),d=(l.headers.get(`content-type`)||``).includes(`application/json`),f=d&&u?JSON.parse(u):u;if(!l.ok){let e=d?f:void 0,t=e?.error;throw new tu(t?.message??`Request failed with status ${l.status}`,{status:l.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:l.status,headers:l.headers,data:f}}}}function au(e){return e.join(`�`)}var ou=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:au(e.namespace)}:void 0;return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let n={namespace:e.namespace,properties: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/${au(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${au(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${au(e.namespace)}`}),!0}catch(e){if(e instanceof tu&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof tu&&e.status===409)return;throw e}}};function su(e){return e.join(`�`)}var cu=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/${su(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let n={};return this.accessDelegation&&(n[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${su(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){let n=await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${su(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/${su(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${su(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation);try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${su(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof tu&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof tu&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},lu=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=iu({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new ou(this.client,t),this.tableOps=new cu(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)}
18async 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)}};function uu(e){"@babel/helpers - typeof";return uu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},uu(e)}function du(e,t){if(uu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(uu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function fu(e){var t=du(e,`string`);return uu(t)==`symbol`?t:t+``}function pu(e,t,n){return(t=fu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?mu(Object(n),!0).forEach(function(t){pu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var hu=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}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function gu(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var _u=class extends hu{constructor(e,t,n,r=`storage`,i){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n,this.code=i}toJSON(){return U(U({},super.toJSON()),{},{code:this.code})}},vu=class extends hu{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function yu(e,t,n){let r=U({},e),i=t.toLowerCase();for(let e of Object.keys(r))e.toLowerCase()===i&&delete r[e];return r[i]=n,r}function bu(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var xu=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Su=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Cu=e=>{if(Array.isArray(e))return e.map(e=>Cu(e));if(typeof e==`function`||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,n])=>{let r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,``));t[r]=Cu(n)}),t},wu=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Tu=e=>e.split(`/`).map(encodeURIComponent).join(`/`),Eu=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error;if(typeof t.error==`object`&&t.error!==null){let e=t.error;if(typeof e.message==`string`)return e.message}}return JSON.stringify(e)},Du=async(e,t,n,r)=>{if(typeof e==`object`&&e&&`json`in e&&typeof e.json==`function`){let n=e,i=parseInt(String(n.status),10);Number.isFinite(i)||(i=500),n.json().then(e=>{let n=e?.statusCode||e?.code||i+``;t(new _u(Eu(e),i,n,r,e?.code))}).catch(()=>{let e=i+``;t(new _u(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new vu(Eu(e),e,r))},Ou=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return U(U({},i),n);if(Su(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=yu(e,`Content-Type`,n??`application/json`),i.body=JSON.stringify(r)}else i.body=r;return t?.duplex&&(i.duplex=t.duplex),U(U({},i),n)};async function ku(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,Ou(t,r,i,a)).then(e=>{if(!e.ok)throw e;if(r?.noResolveJson)return e;if(o===`vectors`){let t=e.headers.get(`content-type`);if(e.headers.get(`content-length`)===`0`||e.status===204||!t||!t.includes(`application/json`))return{}}return e.json()}).then(e=>s(e)).catch(e=>Du(e,c,r,o))})}function Au(e=`storage`){return{get:async(t,n,r,i)=>ku(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>ku(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>ku(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>ku(t,`HEAD`,n,U(U({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>ku(t,`DELETE`,n,i,a,r,e)}}var{get:ju,post:Mu,put:Nu,head:Pu,remove:Fu}=Au(`storage`),Iu=Au(`vectors`),Lu=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=bu(t),this.fetch=xu(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=yu(this.headers,e,t),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gu(e))return{data:null,error:e};throw e}}},Ru=Symbol.toStringTag,zu=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Ru]=`StreamDownloadBuilder`,this.promise=null}
18then(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.execute(),this.promise}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(gu(t))return{data:null,error:t};throw t}}},Bu=Symbol.toStringTag,Vu=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Bu]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new zu(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.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(gu(t))return{data:null,error:t};throw t}}},Hu={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},Uu={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},Wu=class extends Lu{constructor(e,t={},n,r){super(e,t,r,`storage`),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a,o=U(U({},Uu),r),s=U(U({},i.headers),e===`POST`&&{"x-upsert":String(o.upsert)}),c=o.metadata;if(typeof Blob<`u`&&n instanceof Blob?(a=new FormData,a.append(`cacheControl`,o.cacheControl),c&&a.append(`metadata`,i.encodeMetadata(c)),a.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(a=n,a.has(`cacheControl`)||a.append(`cacheControl`,o.cacheControl),c&&!a.has(`metadata`)&&a.append(`metadata`,i.encodeMetadata(c))):(a=n,s[`cache-control`]=`max-age=${o.cacheControl}`,s[`content-type`]=o.contentType,c&&(s[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&a instanceof ReadableStream||a&&typeof a==`object`&&`pipe`in a&&typeof a.pipe==`function`)&&!o.duplex&&(o.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))s=yu(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?Nu:Mu)(i.fetch,`${i.url}/object/${u}`,a,U({headers:s},o?.duplex?{duplex:o.duplex}:{}));return{path:l,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate(`POST`,e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;let a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set(`token`,t),i.handleOperation(async()=>{let e,t=U(U({},Uu),r),o=U(U({},i.headers),{"x-upsert":String(t.upsert)}),c=t.metadata;if(typeof Blob<`u`&&n instanceof Blob?(e=new FormData,e.append(`cacheControl`,t.cacheControl),c&&e.append(`metadata`,i.encodeMetadata(c)),e.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(e=n,e.has(`cacheControl`)||e.append(`cacheControl`,t.cacheControl),c&&!e.has(`metadata`)&&e.append(`metadata`,i.encodeMetadata(c))):(e=n,o[`cache-control`]=`max-age=${t.cacheControl}`,o[`content-type`]=t.contentType,c&&(o[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&e instanceof ReadableStream||e&&typeof e==`object`&&`pipe`in e&&typeof e.pipe==`function`)&&!t.duplex&&(t.duplex=`half`)),r?.headers)for(let[e,t]of Object.entries(r.headers))o=yu(o,e,t);return{path:a,fullPath:(await Nu(i.fetch,s.toString(),e,U({headers:o},t?.duplex?{duplex:t.duplex}:{}))).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e),i=U({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await Mu(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+a.url),s=o.searchParams.get(`token`);if(!s)throw new hu(`No token returned by API`);return{signedUrl:o.toString(),path:e,token:s}})}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 Mu(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
18stinationBucket:n?.destinationBucket,sourceVersionId:n?.sourceVersionId},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Mu(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket,sourceVersionId:n?.sourceVersionId},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=typeof n?.transform==`object`&&n.transform!==null&&Object.keys(n.transform).length>0,o=await Mu(r.fetch,`${r.url}/object/sign/${i}`,U(U({expiresIn:t},a?{transform:n.transform}:{}),n?.versionId==null?{}:{versionId:n.versionId}),{headers:r.headers}),s=new URLSearchParams;n?.download&&s.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&s.set(`cacheNonce`,String(n.cacheNonce));let c=s.toString();return{signedUrl:encodeURI(`${r.url}${o.signedURL}${c?`&${c}`:``}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{let i=await Mu(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=new URLSearchParams;n?.download&&a.set(`download`,n.download===!0?``:n.download),n?.cacheNonce!=null&&a.set(`cacheNonce`,String(n.cacheNonce));let o=a.toString();return i.map(e=>U(U({},e),{},{signedUrl:e.signedURL?encodeURI(`${r.url}${e.signedURL}${o?`&${o}`:``}`):null}))})}download(e,t,n){let r=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image/authenticated`:`object`,i=new URLSearchParams;t?.transform&&this.applyTransformOptsToQuery(i,t.transform),t?.cacheNonce!=null&&i.set(`cacheNonce`,String(t.cacheNonce)),t?.versionId!=null&&i.set(`versionId`,String(t.versionId));let a=i.toString(),o=this._getFinalPath(e);return new Vu(()=>ju(this.fetch,`${this.url}/${r}/${o}${a?`?${a}`:``}`,{headers:this.headers,noResolveJson:!0},n),this.shouldThrowOnError)}async info(e,t){var n=this;let r=n._getFinalPath(e),i=new URLSearchParams;t?.versionId!=null&&i.set(`versionId`,String(t.versionId));let a=i.toString();return n.handleOperation(async()=>Cu(await ju(n.fetch,`${n.url}/object/info/${r}${a?`?${a}`:``}`,{headers:n.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await Pu(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gu(e)){let t=e instanceof _u?e.status:e instanceof vu?e.originalError?.status:void 0;if(t!==void 0&&[400,404].includes(t))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let n=this._getFinalPath(e),r=new URLSearchParams;t?.download&&r.set(`download`,t.download===!0?``:t.download),t?.transform&&this.applyTransformOptsToQuery(r,t.transform),t?.cacheNonce!=null&&r.set(`cacheNonce`,String(t.cacheNonce)),t?.versionId!=null&&r.set(`versionId`,String(t.versionId));let i=r.toString(),a=typeof t?.transform==`object`&&t.transform!==null&&Object.keys(t.transform).length>0?`render/image`:`object`;return{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}`)+(i?`?${i}`:``)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Fu(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async purgeCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=Tu(r._getFinalPath(e)),a=new URLSearchParams;t?.transformations&&a.set(`transformations`,`true`);let o=a.toString();return await Fu(r.fetch,`${r.url}/cdn/${i}${o?`?${o}`:``}`,{},{headers:r.headers},n)})}async list(e,t,n){var r=this;return r.handleOperation(async()=>{let i=t?.sortBy?U(U({},Hu.sortBy),t.sortBy):Hu.sortBy,a=U(U(U({},Hu),t),{},{sortBy:i,prefix:e||``});return await Mu(r.fetch,`${r.url}/object/list/${r.bucketId}`,a,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{let r=U({},e);return await Mu(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,`/`)}applyTransformOptsToQuery(e,t){return t.width&&e.set(`width`,t.width.toString()),t.height&&e.set(`height`,t.height.toString()),t.resize&&e.set(`resize`,t.resize),t.format&&e.set(`format`,t.format),t.quality&&e.set(`quality`,t.quality.toString()),e}},Gu={"X-Client-Info":`storage-js/2.116.0`},Ku=class extends Lu{constructor(e,t={},n,r){let i=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes(`storage.supabase.`)&&(i.hostname=i.hostname.replace(`supabase.`,`storage.supabase.`));let a=i.href.replace(/\/$/,``),o=U(U({},Gu),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await ju(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ju(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Mu(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,versioning_status:t.ver
18sioningStatus},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Nu(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes,versioning_status:t.versioningStatus},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Mu(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Fu(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async getBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await ju(t.fetch,t.bucketLifecycleUrl(e),{headers:t.headers}))}async updateBucketLifecycle(e,t){var n=this;return n.handleOperation(async()=>await Nu(n.fetch,n.bucketLifecycleUrl(e),t,{headers:n.headers}))}async deleteBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await Fu(t.fetch,t.bucketLifecycleUrl(e),{},{headers:t.headers}))}async purgeBucketCache(e,t,n){var r=this;return r.handleOperation(async()=>{let i=new URLSearchParams;t?.transformations&&i.set(`transformations`,`true`);let a=i.toString();return await Fu(r.fetch,`${r.url}/cdn/${Tu(e)}${a?`?${a}`:``}`,{},{headers:r.headers},n)})}bucketLifecycleUrl(e){return`${this.url}/bucket/${Tu(e)}/lifecycle`}listBucketOptionsToQueryString(e){let 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():``}},qu=class extends Lu{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=U(U({},Gu),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Mu(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=new URLSearchParams;e?.limit!==void 0&&n.set(`limit`,e.limit.toString()),e?.offset!==void 0&&n.set(`offset`,e.offset.toString()),e?.sortColumn&&n.set(`sortColumn`,e.sortColumn),e?.sortOrder&&n.set(`sortOrder`,e.sortOrder),e?.search&&n.set(`search`,e.search);let r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await ju(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Fu(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!wu(e))throw new hu(`Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.`);let n=new lu({baseUrl:this.url,catalogName:e,auth:{type:`custom`,getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(e,t){let n=e[t];return typeof n==`function`?async(...t)=>{try{return{data:await n.apply(e,t),error:null}}catch(e){if(r)throw e;return{data:null,error:e}}}:n}})}},Ju=class extends Lu{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=U(U({},Gu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Iu.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Iu.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Yu=class extends Lu{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=U(U({},Gu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error(`Vector batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Iu.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 Error(`segmentCount must be between 1 and 16`);if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Iu.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 Error(`Keys batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Xu=class extends Lu{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=U(U({},Gu),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Iu.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Zu=class extends Xu{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Qu(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)}},Qu=class extends Ju{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,U(U({},e),{},{vectorBucketName:n.vectorBucketName}))}
18async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,U(U({},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 W(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},W=class extends Yu{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,U(U({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,U(U({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,U(U({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,U(U({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,U(U({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},$u=class extends Ku{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new Wu(this.url,this.headers,e,this.fetch)}get vectors(){return new Zu(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new qu(this.url+`/iceberg`,this.headers,this.fetch)}},ed=`2.116.0`,td=30*1e3,nd=3*td,rd=2*td,id=`http://localhost:9999`,ad=`supabase.auth.token`,od={"X-Client-Info":`gotrue-js/${ed}`},sd=`X-Supabase-Api-Version`,cd={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},ld=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ud=`sb_flow_id`,dd=class extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name=`AuthError`,this.status=t,this.code=n}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}};function G(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var fd=class extends dd{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function pd(e){return G(e)&&e.name===`AuthApiError`}var md=class extends dd{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},hd=class extends dd{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},gd=class extends hd{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function _d(e){return G(e)&&e.name===`AuthSessionMissingError`}var vd=class extends hd{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
18ResponseError`,500,void 0)}},yd=class extends hd{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},bd=class extends hd{constructor(e,t=null){super(e,`AuthImplicitGrantRedirectError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}};function xd(e){return G(e)&&e.name===`AuthImplicitGrantRedirectError`}var Sd=class extends hd{constructor(e,t=null){super(e,`AuthPKCEGrantCodeExchangeError`,500,void 0),this.details=null,this.details=t}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}},Cd=class extends hd{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`)}},wd=class extends hd{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function Td(e){return G(e)&&e.name===`AuthRetryableFetchError`}var Ed=class extends hd{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function K(e){return G(e)&&e.name===`AuthRefreshDiscardedError`}var Dd=class extends hd{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},Od=class extends hd{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},kd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),Ad=` 19\r=`.split(``),jd=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Ad.length;t+=1)e[Ad[t].charCodeAt(0)]=-2;for(let t=0;t<kd.length;t+=1)e[kd[t].charCodeAt(0)]=t;return e})();function Md(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(kd[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue<<=6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)n(kd[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function Nd(e,t,n){let r=jd[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;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function Pd(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{Ld(e,r,n)};for(let t=0;t<e.length;t+=1)Nd(e.charCodeAt(t),i,a);return t.join(``)}function Fd(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 Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function Id(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}Fd(r,t)}}function Ld(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;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 Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}function Rd(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)Nd(e.charCodeAt(t),n,r);return new Uint8Array(t)}function zd(e){let t=[];return Id(e,e=>t.push(e)),new Uint8Array(t)}function q(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>Md(e,n,r)),Md(null,n,r),t.join(``)}function Bd(e){return Math.round(Date.now()/1e3)+e}function Vd(){return Symbol(`auth-callback`)}var Hd=()=>typeof window<`u`&&typeof document<`u`,Ud={tested:!1,writable:!1},Wd=()=>
19{if(!Hd())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(Ud.tested)return Ud.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ud.tested=!0,Ud.writable=!0}catch{Ud.tested=!0,Ud.writable=!1}return Ud.writable};function Gd(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEach((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var Kd=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),qd=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,Jd=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Yd=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Xd=async(e,t)=>{await e.removeItem(t)},Zd=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Zd.promiseConstructor=Promise;function Qd(e){let t=e.split(`.`);if(t.length!==3)throw new Od(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!ld.test(t[e]))throw new Od(`JWT not in base64url format`);return{header:JSON.parse(Pd(t[0])),payload:JSON.parse(Pd(t[1])),signature:Rd(t[2]),raw:{header:t[0],payload:t[1]}}}async function $d(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function ef(e,t){return new Promise((n,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){n(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()})}function tf(e){return(`0`+e.toString(16)).substr(-2)}function nf(){let e=new Uint32Array(56);if(typeof crypto>`u`){let e=``;for(let t=0;t<56;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`.charAt(Math.floor(Math.random()*66));return e}return crypto.getRandomValues(e),Array.from(e,tf).join(``)}async function rf(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join(``)}async function af(e){if(!(typeof crypto<`u`&&crypto.subtle!==void 0&&typeof TextEncoder<`u`))return console.warn(`WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.`),e;let t=await rf(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var of=/^[a-zA-Z0-9_-]{8,64}$/;function sf(e){return typeof e==`string`&&of.test(e)?e:null}function cf(){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,tf).join(``)}let e=``;for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}var lf=(e,t)=>`${e}-flow-${t}-code-verifier`,uf=e=>`${e}-flows-code-verifier`;async function df(e,t){let n=await Yd(e,uf(t));return Array.isArray(n)?n.filter(e=>sf(e)!==null):[]}async function ff(e,t,n,r,i){await Jd(e,lf(t,n),r);let a=(await df(e,t)).filter(e=>e!==n);for(a.push(n);a.length>5;){let n=a.shift();await Xd(e,lf(t,n)),i?.(n)}await Jd(e,uf(t),a),await Jd(e,`${t}-code-verifier`,r)}async function pf(e,t,n){if(n){let r=await Yd(e,lf(t,n));return{verifier:typeof r==`string`?r:null,flowId:n}}let r=await Yd(e,`${t}-code-verifier`);return{verifier:typeof r==`string`?r:null,flowId:null}}async function mf(e,t,n){let r=`${t}-code-verifier`;if(!n){await Xd(e,r);return}let i=lf(t,n),a=await Yd(e,i);await Xd(e,i);let o=await df(e,t),s=o.filter(e=>e!==n);s.length!==o.length&&(s.length>0?await Jd(e,uf(t),s):await Xd(e,uf(t))),a!=null&&a===await Yd(e,r)&&await Xd(e,r)}async function hf(e,t){let n=await df(e,t);for(let r of n)await Xd(e,lf(t,r));await Xd(e,uf(t)),await Xd(e,`${t}-code-verifier`)}function gf(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n),a=r.indexOf(`?`);if(a!==-1){let e=r.slice(0,a),t=r.slice(a+1).split(`&`).filter(e=>e!==``&&e!==`sb_flow_id`&&!e.startsWith(`sb_flow_id=`));r=t.length>0?`${e}?${t.join(`&`)}`:e}let o=r.includes(`?`)?`&`:`?`;return`${r}${o}${ud}=${encodeURIComponent(t)}${i}`}async function _f(e,t,n=!1,r){let i=nf(),a=i;n&&(a+=`/recovery`);let o=cf();await ff(e,t,o,a,r);let s=await af(i);return[s,i===s?`plain`:`s256`,o]}var vf=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function yf(e){let t=e.headers.get(sd);if(!t||!t.match(vf))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function bf(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function xf(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`
19SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var Sf=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Cf(e){if(!Sf.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function wf(e){if(!e.passkey)throw Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Tf(e){if(!e.recoveryCodes)throw Error("@supabase/auth-js: the MFA recovery codes API is experimental and disabled by default. Enable it by passing `auth: { experimental: { recoveryCodes: true } }` to createClient (or to the GoTrueClient constructor).")}function Ef(){return new Proxy({},{get:(e,t)=>{if(t===`__isUserNotAvailableProxy`)return!0;if(typeof t==`symbol`){let e=t.toString();if(e===`Symbol(Symbol.toPrimitive)`||e===`Symbol(Symbol.toStringTag)`||e===`Symbol(util.inspect.custom)`)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Df(e,t){return new Proxy(e,{get:(e,n,r)=>{if(n===`__isInsecureUserWarningProxy`)return!0;if(typeof n==`symbol`){let t=n.toString();if(t===`Symbol(Symbol.toPrimitive)`||t===`Symbol(Symbol.toStringTag)`||t===`Symbol(util.inspect.custom)`||t===`Symbol(nodejs.util.inspect.custom)`)return Reflect.get(e,n,r)}return!t.value&&typeof n==`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(e,n,r)}})}function Of(e){return JSON.parse(JSON.stringify(e))}var kf=e=>{if(typeof e==`object`&&e){let t=e;if(typeof t.msg==`string`)return t.msg;if(typeof t.message==`string`)return t.message;if(typeof t.error_description==`string`)return t.error_description;if(typeof t.error==`string`)return t.error}return JSON.stringify(e)},Af=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function jf(e){if(!qd(e))throw new wd(kf(e),0);let t;try{t=await e.json()}catch(t){throw Af.includes(e.status)?new wd(e.statusText||`HTTP ${e.status}`,e.status):new md(kf(t),t)}if(Af.includes(e.status))throw new wd(kf(t),e.status);let n,r=yf(e);if(r&&r.getTime()>=cd[`2024-01-01`].timestamp&&typeof t==`object`&&t&&typeof t.code==`string`?n=t.code:typeof t==`object`&&t&&typeof t.error_code==`string`&&(n=t.error_code),!n){if(typeof t==`object`&&t&&typeof t.weak_password==`object`&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0))throw new Dd(kf(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new Dd(kf(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new gd;throw new fd(kf(t),e.status||500,n)}var Mf=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`?i:(i.headers=Object.assign({"Content-Type":`application/json;charset=UTF-8`},t?.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function J(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[sd]=cd[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);
19let o=await Nf(e,t,n+(Object.keys(a).length?`?`+new URLSearchParams(a).toString():``),{headers:i,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(o):{data:Object.assign({},o),error:null}}async function Nf(e,t,n,r,i,a){let o=Mf(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw new wd(kf(e),0)}if(s.ok||await jf(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await jf(e)}}function Pf(e){let t=null;Bf(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=Bd(e.expires_in)));let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function Ff(e){let t=Pf(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((e,t)=>e&&typeof t==`string`,!0)&&(t.data.weak_password=e.weak_password),t}function If(e){return{data:{user:e.user??e},error:null}}function Lf(e){return{data:e,error:null}}function Rf(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=cc(e,[`action_link`,`email_otp`,`hashed_token`,`redirect_to`,`verification_type`]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},user:Object.assign({},o)},error:null}}function zf(e){return e}function Bf(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var Vf=[`global`,`local`,`others`],Hf=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=Kd(n),this.experimental=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)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,t=Vf[0]){if(Vf.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${Vf.join(`, `)}`);try{return await J(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await J(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:If})}catch(e){if(G(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=cc(e,[`options`]),r=Object.assign(Object.assign({},n),t);return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await J(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:Rf,redirectTo:t?.redirectTo})}catch(e){if(G(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await J(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:If})}catch(e){if(G(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await J(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:zf});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(G(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){Cf(e);try{return await J(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:If})}catch(e){if(G(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){Cf(e);try{return await J(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:If})}catch(e){if(G(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){Cf(e);try{return await J(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:If})}catch(e){if(G(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){Cf(e.userId);try{let{data:t,error:n}=await J(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(G(e))return{data:null,error:e};throw e}}async _deleteFactor(e){Cf(e.userId),Cf(e.id);try{return{data:await J(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await J(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:zf});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>
190&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(G(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await J(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await J(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await J(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await J(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await J(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await J(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(G(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await J(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await J(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await J(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await J(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){wf(this.experimental),Cf(e.userId);try{return await J(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(G(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){wf(this.experimental),Cf(e.userId),Cf(e.passkeyId);try{return await J(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(G(e))return{data:null,error:e};throw e}}};function Uf(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&Wd()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var Wf=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function Gf(){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 Kf(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function qf(e){return parseInt(e,16)}function Jf(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function Yf(e){let{chainId:t,domain:n,expirationTime:r,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:s,resources:c,scheme:l,uri:u,version:d}=e;if(!Number.isInteger(t))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!n)throw Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!u)throw Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);if(d!==`1`)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(e.statement?.includes(` 20`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=Kf(e.address),p=`${l?`${l}://${n}`:n} wants you to sign in with your Ethereum account:\n${f}\n\n${e.statement?`${e.statement}\n`:``}`,m=`URI: ${u}\nVersion: ${d}\nChain ID: ${t}${a?`\nNonce: ${a}`:``}\nIssued At: ${i.toISOString()}`;if(r&&(m+=`\nExpiration Time: ${r.toISOString()}`),o&&(m+=`\nNot Before: ${o.toISOString()}`),s&&(m+=`\nRequest ID: ${s}`),c){let e=` 21Resources:`;for(let t of c){if(!t||typeof t!=`string`)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}m+=e}return`${p}\n${m}`}
21var Xf=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=r??(n instanceof Error?n.name:void 0)??`Unknown Error`,this.code=t}toJSON(){return{name:this.name,message:this.message,code:this.code}}},Zf=class extends Xf{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function Qf({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Xf({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new Xf({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new Xf({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new Xf({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 Xf({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Xf({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new Xf({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Xf({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!ap(t))return new Xf({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Xf({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Xf({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 Xf({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 Xf({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function $f({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new Xf({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Xf({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!ap(t))return new Xf({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Xf({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new Xf({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 Xf({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var ep=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}};function tp(e){if(!e)throw Error(`Credential creation options are required`);if(typeof PublicKeyCredential<`u`&&`parseCreationOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON==`function`)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:n,excludeCredentials:r}=e,i=cc(e,[`challenge`,`user`,`excludeCredentials`]),a=Rd(t).buffer,o=Object.assign(Object.assign({},n),{id:Rd(n.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(r&&r.length>0){s.excludeCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];s.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:Rd(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function np(e){if(!e)throw Error(`Credential request options are required`);if(typeof PublicKeyCredential<`u`&&`parseRequestOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON==`function`)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:n}=e,r=cc(e,[`challenge`,`allowCredentials`]),i=Rd(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:Rd(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function rp(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:q(new Uint8Array(e.response.attestationObject)),clientDataJSON:q(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function ip(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e,n=e.getClientExtensionResults(),r=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:q(new Uint8Array(r.authenticatorData)),clientDataJSON:q(new Uint8Array(r.clientDataJSON)),signature:q(new Uint8Array(r.signature)),userHandle:r.userHandle?q(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function ap(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function op(){return!!(Hd()&&`PublicKeyCredential`in window&&window.PublicKeyCredential&&`credentials`in navigator&&typeof(navigator==null?void 0:navigator.credentials)?.create==`function`&&typeof(navigator==null?void 0:navigator.credentials)?.get==`function`)}async function sp(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Zf(`Browser returned unexpected credential type`,t)}:{data:null,error:new Zf(`Empty credential response`,t)}}
21catch(t){return{data:null,error:Qf({error:t,options:e})}}}async function cp(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Zf(`Browser returned unexpected credential type`,t)}:{data:null,error:new Zf(`Empty credential response`,t)}}catch(t){return{data:null,error:$f({error:t,options:e})}}}var lp={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},up={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function dp(...e){let t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),r={};for(let i of e)if(i)for(let e in i){let a=i[e];if(a!==void 0)if(Array.isArray(a))r[e]=a;else if(n(a))r[e]=a;else if(t(a)){let n=r[e];t(n)?r[e]=dp(n,a):r[e]=dp(a)}else r[e]=a}return r}function fp(e,t){return dp(lp,e,t||{})}function pp(e,t){return dp(up,e,t||{})}var mp=class{constructor(e){this.client=e,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(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:`webauthn`}))}async _challenge({factorId:e,webauthn:t,friendlyName:n,signal:r},i){try{let{data:a,error:o}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!a)return{data:null,error:o};let s=r??ep.createNewAbortSignal();if(a.webauthn.type===`create`){let{user:e}=a.webauthn.credential_options.publicKey;if(!e.name){let t=n;if(t)e.name=`${e.id}:${t}`;else{let t=(await this.client.getUser()).data.user,n=t?.user_metadata?.name||t?.email||t?.id||`User`;e.name=`${e.id}:${n}`}}e.displayName||=e.name}switch(a.webauthn.type){case`create`:{let{data:t,error:n}=await sp({publicKey:fp(a.webauthn.credential_options.publicKey,i?.create),signal:s});return t?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:t}},error:null}:{data:null,error:n}}case`request`:{let t=pp(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await cp(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:t,signal:s}));return n?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:n}},error:null}:{data:null,error:r}}}}catch(e){return G(e)?{data:null,error:e}:{data:null,error:new md(`Unexpected error in challenge`,e)}}}async _verify({challengeId:e,factorId:t,webauthn:n}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new dd(`rpId is required for WebAuthn authentication`)};try{if(!op())return{data:null,error:new md(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:n},signal:r},{request:i});if(!a)return{data:null,error:o};let{webauthn:s}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:n,credential_response:s.credential_response}})}catch(e){return G(e)?{data:null,error:e}:{data:null,error:new md(`Unexpected error in authenticate`,e)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new dd(`rpId is required for WebAuthn registration`)};try{if(!op())return{data:null,error:new md(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(t=>t.data?.all.find(t=>t.factor_type===`webauthn`&&t.friendly_name===e&&t.status===`unverified`)).then(e=>e?this.client.mfa.unenroll({factorId:e?.id}):void 0),{data:null,error:o};let{data:s,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:t,rpOrigins:n},signal:r},{create:i});return s?this._verify({factorId:a.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:n,type:s.webauthn.type,credential_response:s.webauthn.credential_response}}):{data:null,error:c}}catch(e){return G(e)?{data:null,error:e}:{data:null,error:new md(`Unexpected error in register`,e)}}}};Gf();var hp={url:id,storageKey:ad,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:od,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},gp={},_p=!1,vp=class e{get jwks(){return gp[this.storageKey]?.jwks??{keys:[]}}set jwks(e){gp[this.storageKey]=Object.assign(Object.assign({},gp[this.storageKey]),{jwks:e})}get jwks_cached_at(){return gp[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){gp[this.storageKey]=Object.assign(Object.assign({},gp[this.storageKey]),{cachedAt:e})}constructor(t){var n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let r=Object.assign(Object.assign({},hp),t);if(this.storageKey=r.storageKey,this.instanceID=e.nextInstanceID[this.storageKey]??0,e.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!r.debug,typeof r.debug==`function`&&(this.logger=r.debug),this.instanceID>0&&Hd()){let e=`${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(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=r.persistSession,this.autoRefreshToken=r.autoRefreshToken,this.experimental=r.experimental??{},this.admin=new Hf({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=Kd(r.fetch),this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,this.throwOnError=r.throwOnError,this.lockAcquireTimeout=r.lockAcquireTimeout,r.lock!=null&&(this.lock=r.lock,_p||(_p=!0,console.warn(`${this._logPrefix()} The "lock" option is deprecated and will be removed in v3. The client now coordinates session refreshes without a lock, so most apps can drop the option. See https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/migrations/lockless-coordination.md`))),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=-(2**53-1)),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 mp(this),recoveryCodes:{getStatus:this._getRecoveryCodesStatus.bind(this),generate:this._generateRecoveryCodes.bind(this),verify:this._verifyRecoveryCode.bind(this),regenerate:this._regenerateRecoveryCodes.bind(this),unenroll:this._unenrollRecoveryCodes.bind(this)}}
21,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.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(r.storage?this.storage=r.storage:Wd()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Uf(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=Uf(this.memoryStorage)),Hd()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error(`Failed to create a new BroadcastChannel, multi-tab state changes will not be available`,e)}(n=this.broadcastChannel)==null||n.addEventListener(`message`,async e=>{this._debug(`received broadcast notification from other tab or client`,e),(e.data.event===`TOKEN_REFRESHED`||e.data.event===`SIGNED_IN`)&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug(`#broadcastChannel`,`error`,e)}})}r.skipAutoInitialize||this.initialize().catch(e=>{this._debug(`#initialize()`,`error`,e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${ed}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock==null?await this._initialize():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))();let e=await this.initializePromise,t=this._pendingInitNotifications??[];this._pendingInitNotifications=null;for(let e of t)await this._notifyAllSubscribers(e.event,e.session,e.broadcast);return e}async _initialize(){try{let e={},t=`none`;if(Hd()&&(e=Gd(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),Hd()&&this.detectSessionInUrl&&t!==`none`){let{data:n,error:r}=await this._getSessionFromURL(e,t);if(r){if(this._debug(`#_initialize()`,`error detecting session from URL`,r),xd(r)){let e=r.details?.code;if(e===`identity_already_exists`||e===`identity_not_found`||e===`single_identity_not_deletable`)return{error:r}}return{error:r}}let{session:i,redirectType:a}=n;return this._debug(`#_initialize()`,`detected session in URL`,i,`redirect type`,a),await this._saveSession(i),setTimeout(async()=>{a===`recovery`?await this._notifyAllSubscribers(`PASSWORD_RECOVERY`,i):await this._notifyAllSubscribers(`SIGNED_IN`,i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return G(e)?this._returnResult({error:e}):this._returnResult({error:new md(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await J(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:Pf});if(n||!t)return this._returnResult({data:{user:null,session:null},error:n});let r=t.session,i=t.user;return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,r)),this._returnResult({data:{user:i,session:r},error:null})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){let t=null;try{let n;if(`email`in e){let{email:r,password:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod()),n=await J(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t),body:{email:r,password:i,data:a?.data??{},gotrue_meta_security:{captcha_token:a?.captchaToken}
21,code_challenge:o,code_challenge_method:s},xform:Pf})}else if(`phone`in e){let{phone:t,password:r,options:i}=e;n=await J(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:r,data:i?.data??{},channel:i?.channel??`sms`,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Pf})}else throw new yd(`You must provide either an email or phone number and a password`);let{data:r,error:i}=n;if(i||!r)return await mf(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:i});let a=r.session,o=r.user;return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(await mf(this.storage,this.storageKey,t),G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e;t=await J(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Ff})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await J(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Ff})}else throw new yd(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!n||!n.session||!n.user){let e=new vd;return this._returnResult({data:{user:null,session:null},error:e})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){return await this._handleProviderSignIn(e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:e.options?.skipBrowserRedirect})}async exchangeCodeForSession(e,t){return await this.initializePromise,this.lock==null?this._exchangeCodeForSession(e,t):this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,t))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case`ethereum`:return await this.signInWithEthereum(e);case`solana`:return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!Hd()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`ethereum`in e&&typeof e.ethereum==`object`&&`request`in e.ethereum&&typeof e.ethereum.request==`function`)s=e.ethereum;else throw 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.`)}let c=new URL(o?.url??window.location.href),l=await s.request({method:`eth_requestAccounts`}).then(e=>e).catch(()=>{throw Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`)});if(!l||l.length===0)throw Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);let u=Kf(l[0]),d=o?.signInWithEthereum?.chainId;d||=qf(await s.request({method:`eth_chainId`})),t=Yf({domain:c.host,address:u,statement:a,uri:c.href,version:`1`,chainId:d,nonce:o?.signInWithEthereum?.nonce,issuedAt:o?.signInWithEthereum?.issuedAt??new Date,expirationTime:o?.signInWithEthereum?.expirationTime,notBefore:o?.signInWithEthereum?.notBefore,requestId:o?.signInWithEthereum?.requestId,resources:o?.signInWithEthereum?.resources}),n=await s.request({method:`personal_sign`,params:[Jf(t),u]})}try{let{data:r,error:i}=await J(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`ethereum`,message:t,signature:n},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:Pf});if(i)throw i;if(!r||!r.session||!r.user){let e=new vd;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!Hd()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`solana`in e&&typeof e.solana==`object`&&(`signIn`in e.solana&&typeof e.solana.signIn==`function`||`signMessage`in e.
21solana&&typeof e.solana.signMessage==`function`))s=e.solana;else throw 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.`)}let c=new URL(o?.url??window.location.href);if(`signIn`in s&&s.signIn){let e=await s.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},o?.signInWithSolana),{version:`1`,domain:c.host,uri:c.href}),a?{statement:a}:null)),r;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`)r=e[0];else if(e&&typeof e==`object`&&`signedMessage`in e&&`signature`in e)r=e;else throw Error(`@supabase/auth-js: Wallet method signIn() returned unrecognized value`);if(`signedMessage`in r&&`signature`in r&&(typeof r.signedMessage==`string`||r.signedMessage instanceof Uint8Array)&&r.signature instanceof Uint8Array)t=typeof r.signedMessage==`string`?r.signedMessage:new TextDecoder().decode(r.signedMessage),n=r.signature;else throw Error(`@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields`)}else{if(!(`signMessage`in s)||typeof s.signMessage!=`function`||!(`publicKey`in s)||typeof s!=`object`||!s.publicKey||!(`toBase58`in s.publicKey)||typeof s.publicKey.toBase58!=`function`)throw Error(`@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API`);t=[`${c.host} wants you to sign in with your Solana account:`,s.publicKey.toBase58(),...a?[``,a,``]:[``],`Version: 1`,`URI: ${c.href}`,`Issued At: ${o?.signInWithSolana?.issuedAt??new Date().toISOString()}`,...o?.signInWithSolana?.notBefore?[`Not Before: ${o.signInWithSolana.notBefore}`]:[],...o?.signInWithSolana?.expirationTime?[`Expiration Time: ${o.signInWithSolana.expirationTime}`]:[],...o?.signInWithSolana?.chainId?[`Chain ID: ${o.signInWithSolana.chainId}`]:[],...o?.signInWithSolana?.nonce?[`Nonce: ${o.signInWithSolana.nonce}`]:[],...o?.signInWithSolana?.requestId?[`Request ID: ${o.signInWithSolana.requestId}`]:[],...o?.signInWithSolana?.resources?.length?[`Resources`,...o.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join(` 22`);let e=await s.signMessage(new TextEncoder().encode(t),`utf8`);if(!e||!(e instanceof Uint8Array))throw Error(`@supabase/auth-js: Wallet signMessage() API returned an recognized value`);n=e}}try{let{data:r,error:i}=await J(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:q(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:Pf});if(i)throw i;if(!r||!r.session||!r.user){let e=new vd;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e,t){let n=t?.flowId!=null,r=n?sf(t?.flowId):Hd()?sf(Gd(window.location.href)[ud]):null;n&&!r&&this._debug(`#_exchangeCodeForSession()`,`provided flowId is not a valid flow id`,t?.flowId);let{verifier:i,flowId:a}=n&&!r?{verifier:null,flowId:null}:await pf(this.storage,this.storageKey,r),[o,s]=(i??``).split(`/`);try{if(!o&&this.flowType===`pkce`)throw new Cd;let{data:t,error:n}=await J(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:o},xform:Pf});if(await mf(this.storage,this.storageKey,a),n)throw n;if(!t||!t.session||!t.user){let e=new vd;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(s===`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,t.session)),this._returnResult({data:Object.assign(Object.assign({},t),{redirectType:s??null}),error:n})}catch(e){if(await mf(this.storage,this.storageKey,a),G(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:n,token:r,access_token:i,nonce:a}=e,{data:o,error:s}=await J(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:t?.captchaToken}},xform:Pf});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new vd;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(`SIGNED_IN`,o.session)),this._returnResult({data:o,error:s})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){let t=null;try{if(`email`in e){let{email:n,options:r}=e,i=null,a=null;this.flowType===`pkce`&&([i,a,t]=await this._getCodeChallengeAndMethod());let{error:o}=await J(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{email:n,data:r?.data??{},create_user:r?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:r?.captchaToken},code_challenge:i,code_challenge_method:a},redirectTo:this._maybeAppendFlowIdToRedirect(r?.emailRedirectTo,t)});return this._returnResult({data:{user:null,session:null},error:o})}if(`phone`in e){let{phone:t,options:n}=e,{data:r,error:i}=await J(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},channel:n?.channel??`sms`}});return this._returnResult({data:{user:null,session:null,messageId:r?.message_id},error:i})}throw new yd(`You must provide either an email or phone number.`)}catch(e){if(await mf(this.storage,this.storageKey,t),G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){try{let t,n;`options`in e&&(t=e.options?.redirectTo,n=e.options?.captchaToken);let{data:r,error:i}=await J(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:Pf});if(i)throw i;if(!r)throw Error(`An error occurred on token verification.`);let a=r.session,o=r.user;return a?.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(e.type==`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){let t=null;try{let n=null,r=null;this.flowType===`pkce`&&([n,r,t]=await this._getCodeChallengeAndMethod());let i=await J(this.fetch,`POST`,`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},`providerId`in e?{provider_id:e.providerId}:null),`domain`in e?{domain:e.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect(e.options?.redirectTo,t)}),e?.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:n,code_challenge_method:r}),headers:this.headers,xform:Lf});return i.data?.url&&Hd()&&!e.options?.skipBrowserRedirect&&window.location.assign(i.data.url),this._returnResult(i)}catch(e){if(await mf(this.storage,this.storageKey,t),G(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,this.lock==null?await this._reauthenticate():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new gd;let{error:r}=await J(this.fetch,`GET`,`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let t=null;try{let n=`${this.url}/resend`;if(`email`in e){let{email:r,type:i,options:a}=e,o=null,s=null;this.flowType===`pkce`&&([o,s,t]=await this._getCodeChallengeAndMethod());let{error:c}=await J(this.fetch,`POST`,n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a?.captchaToken}
22,code_challenge:o,code_challenge_method:s},redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t)});return c&&await mf(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:c})}else if(`phone`in e){let{phone:t,type:r,options:i}=e,{data:a,error:o}=await J(this.fetch,`POST`,n,{headers:this.headers,body:{phone:t,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:o})}throw new yd(`You must provide either an email or phone number and a type`)}catch(e){if(await mf(this.storage,this.storageKey,t),G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,this.lock==null?await this._useSession(async e=>e):await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug(`#_acquireLock`,`begin`,e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch{}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug(`#_acquireLock`,`lock acquired for storage key`,this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch{}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug(`#_acquireLock`,`lock released for storage key`,this.storageKey),this.lockAcquired=!1}})}finally{this._debug(`#_acquireLock`,`end`)}}async _useSession(e){this._debug(`#_useSession`,`begin`);try{return await e(await this.__loadSession())}finally{this._debug(`#_useSession`,`end`)}}async __loadSession(){this._debug(`#__loadSession()`,`begin`),this.lock!=null&&!this.lockAcquired&&this._debug(`#__loadSession()`,`used outside of an acquired lock!`,Error().stack);try{let e=null,t=await Yd(this.storage,this.storageKey);if(this._debug(`#getSession()`,`session from storage`,t),t!==null&&(this._isValidSession(t)?e=t:(this._debug(`#getSession()`,`session from storage is not valid`),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at*1e3-Date.now()<nd:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n){if(this.userStorage){let t=await Yd(this.userStorage,this.storageKey+`-user`);t?.user?e.user=t.user:e.user=Ef()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=Df(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);if(i){if(e.expires_at&&e.expires_at*1e3>Date.now()){let t=await Yd(this.storage,this.storageKey);if(t&&t.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t;return t=this.lock==null?await this._getUser():await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()),t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await J(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:If}):await this._useSession(async e=>{let{data:t,error:n}=e;if(n)throw n;return!t.session?.access_token&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new gd}:await J(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:If})})}catch(e){if(G(e))return _d(e)&&await this._removeSession(),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,this.lock==null?await this._updateUser(e,t):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){let n=null;try{return await this._useSession(async r=>{let{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new gd;let o=i.session,s=null,c=null;this.flowType===`pkce`&&e.email!=null&&([s,c,n]=await this._getCodeChallengeAndMethod());let{data:l,error:u}=await J(this.fetch,`PUT`,`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t?.emailRedirectTo,n),body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:c}),jwt:o.access_token,xform:If});if(u)throw u;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers(`USER_UPDATED`,o),this._returnResult({data:{user:o.user},error:null})})}catch(e){if(await mf(this.storage,this.storageKey,n),G(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,this.lock==null?await this._setSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new gd;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=Qd(e.access_token);if(a.exp&&(n=a.exp,r=n<=t),r){let{data:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:`bearer`,expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers(`SIGNED_IN`,i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(G(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,this.lock==null?await this._refreshSession(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{if(!e){let{data:n,error:r}=t;if(r)throw r;e=n.session??void 0}if(!e?.refresh_token)throw new gd;let{data:n,error:r}=await this._callRefreshToken(e.refresh_token);return r?this._returnResult({data:{user:null,session:null},error:r}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!Hd())throw new bd(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new bd(e.error_description||`Error in URL with unspecified error_description`,{error:e.error||`unspecified_error`,code:e.error_code||`unspecified_code`});switch(t){case`implicit`:if(this.flowType===`pkce`)throw new Sd(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new bd(`Not a valid implicit grant flow url.`);break;default:}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new Sd(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code,{flowId:e[ud]});if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),r.searchParams.delete(ud),window.history.replaceState(window.history.state,``,r.toString()),{data:{session:t.session,redirectType:t.redirectType??null},error:null}}let{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:a,expires_in:o,expires_at:s,token_type:c}=e;if(!i||!o||!a||!c)throw new bd(`No session defined in URL`);let l=Math.round(Date.now()/1e3),u=parseInt(o),d=l+u;s&&(d=parseInt(s));let f=d-l;
22f*1e3<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let p=d-u;l-p>=120?console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale`,p,d,l):l-p<0&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew`,p,d,l);let{data:m,error:h}=await this._getUser(i);if(h)throw h;let g={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:a,token_type:c,user:m.user};return window.location.hash=``,this._debug(`#_getSessionFromURL()`,`clearing window.location.hash`),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(e){if(G(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl==`function`?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;let t=sf(e[ud]);return t&&await Yd(this.storage,lf(this.storageKey,t))?!0:!!await Yd(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:`global`}){return await this.initializePromise,this.lock==null?await this._signOut(e):await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:`global`}){return await this._useSession(async t=>{let n=async()=>{await this._removeSession()},{data:r,error:i}=t;if(i&&!_d(i))return this._returnResult({error:i});let a=r.session?.access_token;if(a){let{error:t}=await this.admin.signOut(a,e);if(t&&!(pd(t)&&(t.status===404||t.status===401||t.status===403)||_d(t)))return e!==`others`&&await n(),this._returnResult({error:t})}return e!==`others`&&await n(),this._returnResult({error:null})})}onAuthStateChange(e){let t=Vd(),n={id:t,callback:e,unsubscribe:()=>{this._debug(`#unsubscribe()`,`state change callback with id removed`,t),this.stateChangeEmitters.delete(t)}};return this._debug(`#onAuthStateChange()`,`registered callback with id`,t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,this.lock==null?await this._emitInitialSession(t):await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{try{let{data:{session:n},error:r}=t;if(r)throw r;await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,n),this._debug(`INITIAL_SESSION`,`callback id`,e,`session`,n)}catch(t){if(await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,null),this._debug(`INITIAL_SESSION`,`callback id`,e,`error`,t),K(t))return;_d(t)||Td(t)||pd(t)&&(t.code===`refresh_token_not_found`||t.code===`refresh_token_already_used`||t.code===`session_expired`)?console.warn(t):console.error(t)}})}async resetPasswordForEmail(e,t={}){let n=null,r=null,i=null;this.flowType===`pkce`&&([n,r,i]=await this._getCodeChallengeAndMethod(!0));try{return await J(this.fetch,`POST`,`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(t.redirectTo,i)})}catch(e){if(await mf(this.storage,this.storageKey,i),G(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){try{let{data:e,error:t}=await this.getUser();if(t)throw t;return this._returnResult({data:{identities:e.user.identities??[]},error:null})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return`token`in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){let t=null;try{let{data:n,error:r}=await this._useSession(async n=>{let{data:r,error:i}=n;if(i)throw i;let{url:a,flowId:o}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:!0});return t=o,await J(this.fetch,`GET`,a,{headers:this.headers,jwt:r.session?.access_token??void 0})});if(r)throw r;return Hd()&&!e.options?.skipBrowserRedirect&&window.location.assign(n?.url),this._returnResult({data:{provider:e.provider,url:n?.url,flowId:t},error:null})}catch(n){if(G(n))return this._returnResult({data:{provider:e.provider,url:null,flowId:t},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async t=>{try{let{error:n,data:{session:r}}=t;if(n)throw n;let{options:i,provider:a,token:o,access_token:s,nonce:c}=e,{data:l,error:u}=await J(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:r?.access_token??void 0,body:{provider:a,id_token:o,access_token:s,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:Pf});return u?this._returnResult({data:{user:null,session:null},error:u}):!l||!l.session||!l.user?this._returnResult({data:{user:null,session:null},error:new vd}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await mf(this.storage,this.storageKey,null),G(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;return await J(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken()`;this._debug(t,`begin`);try{let n=Date.now();return await ef(async n=>(n>0&&await $d(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await J(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Pf})),(e,t)=>{let r=200*2**e;return t&&Td(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),G(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,`end`)}}_isValidSession(e){return typeof e==`object`&&!!e&&`access_token`in e&&`refresh_token`in e&&`expires_at`in e}async _handleProviderSignIn(e,t){let{url:n,flowId:r}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug(`#_handleProviderSignIn()`,`provider`,e,`options`,t,`url`,n),Hd()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n,flowId:r},error:null}}async _recoverAndRefresh(){let e=`#_recoverAndRefresh()`;this._debug(e,`begin`);try{let t=await Yd(this.storage,this.storageKey);if(t&&this.userStorage){let e=await Yd(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await Jd(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??Ef()}else if(t&&!t.user&&!t.user){let e=await Yd(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await Xd(this.storage,this.storageKey+`-user`),await Jd(this.storage,this.storageKey,t)):t.user=Ef()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
22id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<nd;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${nd}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(K(n)?this._debug(e,`refresh discarded by commit guard`,n):this._debug(e,`refresh failed`,n))}}else if(t.user&&t.user.__isUserNotAvailableProxy===!0)try{let{data:n,error:r}=await this._getUser(t.access_token);!r&&n?.user?(t.user=n.user,await this._saveSession(t),await this._notifyAllSubscribers(`SIGNED_IN`,t)):this._debug(e,`could not get user data, skipping SIGNED_IN notification`)}catch(t){console.error(`Error getting user data:`,t),this._debug(e,`error getting user data, skipping SIGNED_IN notification`,t)}else await this._notifyAllSubscribers(`SIGNED_IN`,t)}catch(t){this._debug(e,`error`,t),Td(t)?console.warn(t):console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new gd;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug(`#_callRefreshToken()`,`returning cached failure (cooldown active)`),this.lastRefreshFailure.result;let r=`#_callRefreshToken()`;this._debug(r,`begin`);try{this.refreshingDeferred=new Zd,this.refreshingDeferred.promise.then(void 0,()=>{});let t=await Yd(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new gd;let a=await Yd(this.storage,this.storageKey);if(t!==null&&(a===null||a.refresh_token!==t.refresh_token)){this._debug(r,`commit guard: storage changed since refresh started, discarding rotated tokens`,{startedWith:`present`,nowHolds:a?`replaced`:`cleared`});let e={data:null,error:new Ed};return this.refreshingDeferred.resolve(e),e}let o=this._sessionRemovalEpoch;if(await this._saveSession(n.session),this._sessionRemovalEpoch!==o){this._debug(r,`commit guard (post-save): _removeSession ran during _saveSession, undoing write`),await Xd(this.storage,this.storageKey),this.userStorage&&await Xd(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new Ed};return this.refreshingDeferred.resolve(e),e}await this._notifyAllSubscribers(`TOKEN_REFRESHED`,n.session);let s={data:n.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(s),s}catch(i){if(this._debug(r,`error`,i),G(i)){let n={data:null,error:i};if(!Td(i)){let e=await Yd(this.storage,this.storageKey);e?.expires_at&&e.expires_at*1e3>Date.now()?this._debug(r,`proactive refresh failed, access token still valid â preserving session`):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:n,expiresAt:Date.now()+rd},(t=this.refreshingDeferred)==null||t.resolve(n),n}throw(n=this.refreshingDeferred)==null||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(r,`end`)}}async _notifyAllSubscribers(e,t,n=!0){if(this._pendingInitNotifications!==null&&n){this._pendingInitNotifications.push({event:e,session:t,broadcast:n});return}let r=`#_notifyAllSubscribers(${e})`;this._debug(r,`begin`,t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,`end`)}}async _saveSession(e){this._debug(`#_saveSession()`,e),this.suppressGetSessionWarning=!0;let t=Object.assign({},e),n=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&t.user&&await Jd(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=Of(e);await Jd(this.storage,this.storageKey,r)}else{let e=Of(t);await Jd(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Xd(this.storage,this.storageKey),await hf(this.storage,this.storageKey),await Xd(this.storage,this.storageKey+`-user`),this.userStorage&&await Xd(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Hd()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
22catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),td);this.autoRefreshTicker=e,e&&typeof e==`object`&&typeof e.unref==`function`?e.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t==`object`&&typeof t.unref==`function`?t.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug(`#_stopAutoRefresh()`);let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)==null||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug(`#_autoRefreshTokenTick()`,`begin`),this.lock!=null){try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/td);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${td}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}})}catch(e){if(e instanceof Wf)this._debug(`auto refresh token tick lock not available`);else throw e}return}if(this.refreshingDeferred!==null){this._debug(`#_autoRefreshTokenTick()`,`refresh already in flight, skipping`);return}try{let e=Date.now();try{await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/td);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${td}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}}async _handleVisibilityChange(){if(this._debug(`#_handleVisibilityChange()`),!Hd()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug(`#visibilityChangedCallback`,`error`,e)}},window==null||window.addEventListener(`visibilitychange`,this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error(`_handleVisibilityChange`,e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;if(this._debug(t,`visibilityState`,document.visibilityState),document.visibilityState===`visible`){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!==`visible`){this._debug(t,`acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting`);return}await this._recoverAndRefresh()});else{if(document.visibilityState!==`visible`){this._debug(t,`visibilityState is no longer visible, skipping recovery`);return}await this._recoverAndRefresh()}}else document.visibilityState===`hidden`&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){let r=n?.redirectTo,i=null,a=null,o=null;this.flowType===`pkce`&&([i,a,o]=await this._getCodeChallengeAndMethod(),r=this._maybeAppendFlowIdToRedirect(r,o));let s=[`provider=${encodeURIComponent(t)}`];if(r&&s.push(`redirect_to=${encodeURIComponent(r)}`),n?.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),i!=null&&a!=null){let e=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(a)}`});s.push(e.toString())}if(n?.queryParams){let e=new URLSearchParams(n.queryParams);s.push(e.toString())}return n?.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),{url:`${e}?${s.join(`&`)}`,flowId:o}}_maybeAppendFlowIdToRedirect(e,t){return!e||!t||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:gf(e,t)}async _getCodeChallengeAndMethod(e=!1){return _f(this.storage,this.storageKey,e,e=>this._debug(`#_getCodeChallengeAndMethod()`,`evicted oldest pending PKCE verifier slot`,e))}async _unenroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;return r?this._returnResult({data:null,error:r}):await J(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType===`phone`?{phone:e.phone}:e.factorType===`totp`?{issuer:e.issuer}:{}),{data:a,error:o}=await J(this.fetch,`POST`,`${this.url}/factors`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(e.factorType===`totp`&&a.type===`totp`&&a?.totp?.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),this._returnResult({data:a,error:null}))})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({challenge_id:e.challengeId},`webauthn`in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type===`create`?rp(e.webauthn.credential_response):ip(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await J(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(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:o}))})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challenge(e){let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=await J(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:n?.session?.access_token});if(i.error)return i;let{data:a}=i;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:tp(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:np(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _challengeAndVerify(e){let{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let n={all:[],phone:[],totp:[],webauthn:[],recovery_code:[]};for(let t of e?.factors??[])n.all.push(t),t.status===`verified`&&t.factor_type in n&&Array.isArray(n[t.factor_type])&&n[t.factor_type].push(t);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){if(e)try{let{payload:t}=Qd(e),n=null;t.aal&&(n=t.aal);let r=n,{data:{user:i},error:a}=await this.getUser(e);if(a)return this._returnResult({data:null,error:a});((i?.factors)?.filter(e=>e.status===`verified`)??[]).length>0&&(r=`aal2`);let o=t.amr||[];return{data:{currentLevel:n,nextLevel:r,currentAuthenticationMethods:o},error:null}}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
22=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!t)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:r}=Qd(t.access_token),i=null;r.aal&&(i=r.aal);let a=i;(t.user.factors?.filter(e=>e.status===`verified`)??[]).length>0&&(a=`aal2`);let o=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:o},error:null}}async _getRecoveryCodesStatus(){Tf(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await J(this.fetch,`GET`,`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _generateRecoveryCodes(e){Tf(this.experimental);try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let{data:i,error:a}=await J(this.fetch,`POST`,`${this.url}/factors/recovery-codes`,{body:e?.friendlyName?{friendly_name:e.friendlyName}:void 0,headers:this.headers,jwt:n?.session?.access_token});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _verifyRecoveryCode(e){Tf(this.experimental);let t=async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let{data:i,error:a}=await J(this.fetch,`POST`,`${this.url}/factors/recovery-codes/verify`,{body:{code:e.code},headers:this.headers,jwt:n?.session?.access_token});if(a)return this._returnResult({data:null,error:a});let o=Object.assign({expires_at:Bd(i.expires_in)},i);return await this._saveSession(o),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,o),this._returnResult({data:i,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _regenerateRecoveryCodes(){Tf(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await J(this.fetch,`POST`,`${this.url}/factors/recovery-codes/regenerate`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _unenrollRecoveryCodes(){Tf(this.experimental);try{return await this._useSession(async e=>{let{data:t,error:n}=e;if(n)return this._returnResult({data:null,error:n});let{data:r,error:i}=await J(this.fetch,`DELETE`,`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:t?.session?.access_token});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await J(this.fetch,`GET`,`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new gd})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new gd});let a=await J(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`approve`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Hd()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new gd});let a=await J(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`deny`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Hd()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;return n?this._returnResult({data:null,error:n}):t?await J(this.fetch,`GET`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new gd})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?(await J(this.fetch,`DELETE`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new gd})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;let r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;let{data:i,error:a}=await J(this.fetch,`GET`,`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),!n)?null:n}async getClaims(e,t={}){try{let n=e;if(!n){let{data:e,error:t}
22=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});n=e.session.access_token}let{header:r,payload:i,signature:a,raw:{header:o,payload:s}}=Qd(n);if(!t?.allowExpired)try{bf(i.exp)}catch(e){throw new Od(e instanceof Error?e.message:`JWT validation failed`)}let c=!r.alg||r.alg.startsWith(`HS`)||!r.kid||!(`crypto`in globalThis&&`subtle`in globalThis.crypto)?null:await this.fetchJwk(r.kid,t?.keys?{keys:t.keys}:t?.jwks);if(!c){let{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:a},error:null}}let l=xf(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,zd(`${o}.${s}`)))throw new Od(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){wf(this.experimental);try{if(!op())return this._returnResult({data:null,error:new md(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyAuthentication({options:{captchaToken:e?.options?.captchaToken}});if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await cp({publicKey:np(t.options),signal:e?.options?.signal??ep.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new md(`WebAuthn ceremony failed`,null)});let a=ip(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){wf(this.experimental);try{if(!op())return this._returnResult({data:null,error:new md(`Browser does not support WebAuthn`,null)});let{data:t,error:n}=await this._startPasskeyRegistration();if(n||!t)return this._returnResult({data:null,error:n});let{data:r,error:i}=await sp({publicKey:tp(t.options),signal:e?.options?.signal??ep.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new md(`WebAuthn ceremony failed`,null)});let a=rp(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){wf(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new gd});let{data:r,error:i}=await J(this.fetch,`POST`,`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:t.access_token,body:{}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){wf(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new gd});let{data:i,error:a}=await J(this.fetch,`POST`,`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:n.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){wf(this.experimental);try{let{data:t,error:n}=await J(this.fetch,`POST`,`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:e?.options?.captchaToken}}});return n?this._returnResult({data:null,error:n}):this._returnResult({data:t,error:null})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){wf(this.experimental);try{let{data:t,error:n}=await J(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Pf});return n?this._returnResult({data:null,error:n}):(t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,t.session)),this._returnResult({data:t,error:null}))}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){wf(this.experimental);try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)return this._returnResult({data:null,error:n});if(!t)return this._returnResult({data:null,error:new gd});let{data:r,error:i}=await J(this.fetch,`GET`,`${this.url}/passkeys`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){wf(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new gd});let{data:i,error:a}=await J(this.fetch,`PATCH`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:i,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){wf(this.experimental);try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new gd});let{error:i}=await J(this.fetch,`DELETE`,`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:n.access_token,noResolveJson:!0});return i?this._returnResult({data:null,error:i}):this._returnResult({data:null,error:null})})}catch(e){if(G(e))return this._returnResult({data:null,error:e});throw e}}};vp.nextInstanceID={};var yp=vp,bp=`2.116.0`,xp=``,Sp;if(typeof Deno<`u`)xp=`deno`,Sp=Deno.version?.deno;else if(typeof document<`u`)xp=`web`;else if(typeof navigator<`u`&&navigator.product===`ReactNative`)xp=`react-native`;else{var Cp;xp=`node`;let e=globalThis.process;Sp=e==null||(Cp=e.version)==null?void 0:Cp.replace(/^v/,``)}var wp=[`runtime=${xp}`];Sp&&wp.push(`runtime-version=${Sp}`);var Tp={headers:{"X-Client-Info":`supabase-js/${bp}; ${wp.join(`; `)}`}},Ep={schema:`public`},Dp={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},Op={},kp={enabled:!1,respectSamplingDecision:!0};function Ap(e){if(!e||typeof e!=`string`)return null;let t=e.split(`-`);if(t.length!==4)return null;let[n,r,i,a]=t;if(n.length!==2||r.length!==32||i.length!==16||a.length!==2)return null;let o=/^[0-9a-f]+$/i;return!o.test(n)||!o.test(r)||!o.test(i)||!o.test(a)||r===`00000000000000000000000000000000`||i===`0000000000000000`?null:{version:n,traceId:r,parentId:i,traceFlags:a,isSampled:(parseInt(a,16)&1)==1}}function jp(e,t){if(!e||!t||t.length===0)return!1;let n;if(e instanceof URL)n=e;else try{n=new URL(e)}catch{return!1}for(let e of t)try{if(typeof e==`string`){if(Mp(n.hostname,e))return!0}
22else if(e instanceof RegExp){if(e.test(n.hostname))return!0}else if(typeof e==`function`&&e(n))return!0}catch{continue}return!1}function Mp(e,t){if(t===e)return!0;if(t.startsWith(`*.`)){let n=t.slice(2);if(e.endsWith(n)&&(e===n||e.endsWith(`.`+n)))return!0}return!1}function Np(e){let t=[];try{let n=new URL(e);t.push(n.hostname)}catch{}return t.push(`*.supabase.co`,`*.supabase.in`),t.push(`localhost`,`127.0.0.1`,`[::1]`),t}function Pp(e){"@babel/helpers - typeof";return Pp=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Pp(e)}function Fp(e,t){if(Pp(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Pp(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ip(e){var t=Fp(e,`string`);return Pp(t)==`symbol`?t:t+``}function Lp(e,t,n){return(t=Ip(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Rp(Object(n),!0).forEach(function(t){Lp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Bp=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Vp=()=>Headers,Hp=e=>e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`),Up=`sb_temp_`,Wp=new Set,Gp=e=>{if(!e.startsWith(`sb_`)||Hp(e)||e.startsWith(Up))return;let t=e.match(/^sb_[a-zA-Z0-9]+_/)?.[0]??`unknown`;Wp.has(t)||(Wp.add(t),console.warn(`@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type.`))},Kp=(e,t,n,r,i,a)=>{let o=Bp(r),s=Vp(),c=i?.enabled===!0,l=i?.respectSamplingDecision!==!1,u=c?Np(t):null,d=!(a?.omitApiKeyAsBearer&&Hp(e));return async(t,r)=>{let i=await n(),a=new s(r?.headers);if(a.has(`apikey`)||a.set(`apikey`,e),!a.has(`Authorization`)){let t=i??(d?e:null);t&&a.set(`Authorization`,`Bearer ${t}`)}if(u){let e=Yp(t,u,l);e&&(e.traceparent&&!a.has(`traceparent`)&&a.set(`traceparent`,e.traceparent),e.tracestate&&!a.has(`tracestate`)&&a.set(`tracestate`,e.tracestate),e.baggage&&!a.has(`baggage`)&&a.set(`baggage`,e.baggage))}return o(t,zp(zp({},r),{},{headers:a}))}},qp=!1,Jp=!1;function Yp(e,t,n){let r=oc();if(!r)return qp||(qp=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!jp(typeof e==`string`||e instanceof URL?e:e.url,t))return null;let i=r();if(!i||!i.traceparent){var a;if(!(i==null||(a=i.carrierKeys)==null)&&a.length&&!Jp){Jp=!0;let e=i.carrierKeys.includes(`sentry-trace`)?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it.":` Configure your tracing SDK to emit W3C trace context on outgoing requests.`;console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${i.carrierKeys.join(`, `)}] and no W3C traceparent header, so trace headers will not be attached.`+e)}return null}if(n){let e=Ap(i.traceparent);if(e&&!e.isSampled)return{traceparent:i.traceparent}}return i}function Xp(e){return typeof e==`boolean`?{enabled:e}:e}function Zp(e){return e.endsWith(`/`)?e:e+`/`}var Qp=!1;function $p(e){Qp||typeof e!=`object`||!e||!(`schema`in e)||e.schema===void 0||(Qp=!0,console.warn(`@
22supabase/supabase-js: The "schema" option must be nested under "db", e.g. createClient(url, key, { db: { schema: 'myschema' } }). A top-level "schema" is ignored and queries go to the default schema.`))}function em(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=Xp(e.tracePropagation),d=Xp(t.tracePropagation),f={db:zp(zp({},o),n),auth:zp(zp({},s),r),realtime:zp(zp({},c),i),storage:{},global:zp(zp(zp({},l),a),{},{headers:zp(zp({},l?.headers??{}),a?.headers??{})}),tracePropagation:{enabled:u?.enabled??d?.enabled??!1,respectSamplingDecision:u?.respectSamplingDecision??d?.respectSamplingDecision??!0},accessToken:async()=>``};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function tm(e){let t=e?.trim();if(!t)throw Error(`supabaseUrl is required.`);if(!t.match(/^https?:\/\//i))throw Error(`Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.`);try{return new URL(Zp(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var nm=class extends yp{constructor(e){super(e)}},rm=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=tm(e);if(!t)throw Error(`supabaseKey is required.`);Gp(t),$p(n),this.realtimeUrl=new URL(`realtime/v1`,r),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace(`http`,`ws`),this.authUrl=new URL(`auth/v1`,r),this.storageUrl=new URL(`storage/v1`,r),this.functionsUrl=new URL(`functions/v1`,r);let i=`sb-${r.hostname.split(`.`)[0]}-auth-token`,a={db:Ep,realtime:Op,auth:zp(zp({},Dp),{},{storageKey:i}),global:Tp,tracePropagation:kp},o=em(n??{},a);this.settings=o,this.storageKey=o.auth.storageKey??``,this.headers=o.global.headers??{},o.accessToken?(this.accessToken=o.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(o.auth??{},this.headers,o.global.fetch),this.fetch=Kp(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation),this.functionsFetch=Kp(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(zp({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},o.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn(`Failed to set initial Realtime auth token:`,e)),this.rest=new zc(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit,retry:o.db.retry}),this.storage=new $u(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new _c(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}getOpenApiSpec(){return this.rest.getOpenApiSpec()}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(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 _getSessionToken(){var e=this;if(e.accessToken)return await e.accessToken();let{data:t}=await e.auth.getSession();return t.session?.access_token??null}async _getAccessToken(){var e=this;return await e._getSessionToken()??e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},p,m){let h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new nm({url:this.authUrl.href,headers:zp(zp({},h),p),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:l,experimental:u,fetch:m,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>e.toLowerCase()===`authorization`)})}_initRealtimeClient(e){return new eu(this.realtimeUrl.href,zp(zp({},e),{},{params:zp(zp({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,`CLIENT`,t?.access_token)})}_handleTokenChanged(e,t,n){(e===`TOKEN_REFRESHED`||e===`SIGNED_IN`||e===`INITIAL_SESSION`)&&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)}},im=(e,t,n)=>new rm(e,t,n);function am(){if(typeof window<`u`||globalThis.Deno!==void 0)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(t==null)return!1;let n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}am()&&console.warn(`â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
22ode.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715`);function om(){if(typeof window>`u`)return;let e=location.hostname,t=[`lovableproject.com`,`lovableproject-dev.com`,`lovable.app`,`gpt-eng.com`,`gptengineer.run`].some(t=>e===t||e.endsWith(`.`+t))?e.match(RegExp(`^(?:id-preview(?:-[a-z0-9]+)?|project)--([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?:-dev)?(?=\\.|$)`,`i`))?.[1]??e.match(RegExp(`^([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})(?=[.-])`,`i`))?.[1]:void 0,n=window.parent&&window.parent!==window;if(!t||!n)return localStorage;let r=e.endsWith(`.lovableproject-dev.com`)||e.endsWith(`.gpt-eng.com`),i=r?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,a=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:``),o=a&&i.test(a)?[a]:r?[`https://lovable.dev`,`http://localhost:3000`]:[`https://lovable.dev`],s=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),c=(e,n,r)=>new Promise(i=>{let a=s(),c=!1,l,u=e=>{c||(c=!0,clearTimeout(l),window.removeEventListener(`message`,d),i(e))},d=e=>{if(o.indexOf(e.origin)<0)return;let t=e.data;t&&t.type===`lovable-preview-auth:result`&&t.requestId===a&&u(t)};window.addEventListener(`message`,d);let f={type:e,requestId:a,projectId:t,key:n};r!==void 0&&(f.value=r);for(let e of o)window.parent.postMessage(f,e);l=setTimeout(()=>u(null),2e3)}),l=!0;return{getItem:async e=>{let t=await c(`lovable-preview-auth:get`,e);return!t&&l&&(await new Promise(e=>setTimeout(e,250)),t=await c(`lovable-preview-auth:get`,e)),l=!1,t&&t.ok&&typeof t.value==`string`?t.value===``?(localStorage.removeItem(e),null):t.value:localStorage.getItem(e)},setItem:(e,t)=>(localStorage.setItem(e,t),c(`lovable-preview-auth:set`,e,t).then(()=>void 0)),removeItem:e=>(localStorage.removeItem(e),c(`lovable-preview-auth:remove`,e).then(()=>void 0))}}function sm(e){return e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`)}function cm(e){return(t,n)=>{let r=new Headers(typeof Request<`u`&&t instanceof Request?t.headers:void 0);return n?.headers&&new Headers(n.headers).forEach((e,t)=>r.set(t,e)),sm(e)&&r.get(`Authorization`)===`Bearer ${e}`&&r.delete(`Authorization`),r.set(`apikey`,e),fetch(t,{...n,headers:r})}}function lm(){let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,TSS_DEV_SERVER:`false`,TSS_DEV_SSR_STYLES_BASEPATH:`/`,TSS_DEV_SSR_STYLES_ENABLED:`true`,TSS_DISABLE_CSRF_MIDDLEWARE_WARNING:`false`,TSS_INLINE_CSS_ENABLED:`false`,TSS_ROUTER_BASEPATH:``,TSS_SERVER_FN_BASE:`/_serverFn/`,VITE_SUPABASE_PROJECT_ID:`rnrdvjkitzslloqrqvtl`,VITE_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_PO2DRO9872CcDiSIaIf3ZA_A_GmMDWI`,VITE_SUPABASE_URL:`https://rnrdvjkitzslloqrqvtl.supabase.co`}.VITE_SUPABASE_URL||{}.SUPABASE_URL,t={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,TSS_DEV_SERVER:`false`,TSS_DEV_SSR_STYLES_BASEPATH:`/`,TSS_DEV_SSR_STYLES_ENABLED:`true`,TSS_DISABLE_CSRF_MIDDLEWARE_WARNING:`false`,TSS_INLINE_CSS_ENABLED:`false`,TSS_ROUTER_BASEPATH:``,TSS_SERVER_FN_BASE:`/_serverFn/`,VITE_SUPABASE_PROJECT_ID:`rnrdvjkitzslloqrqvtl`,VITE_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_PO2DRO9872CcDiSIaIf3ZA_A_GmMDWI`,VITE_SUPABASE_URL:`https://rnrdvjkitzslloqrqvtl.supabase.co`}.VITE_SUPABASE_PUBLISHABLE_KEY||{}.SUPABASE_PUBLISHABLE_KEY;if(!e||!t){let n=`Missing Supabase environment variable(s): ${[...e?[]:[`SUPABASE_URL`],...t?[]:[`SUPABASE_PUBLISHABLE_KEY`]].join(`, `)}. Connect Supabase in Lovable Cloud.`;throw console.error(`[Supabase] ${n}`),Error(n)}return im(e,t,{global:{fetch:cm(t)},auth:{storage:om(),persistSession:!0,autoRefreshToken:!0}})}var um,dm=new Proxy({},{get(e,t,n){return um||=lm(),Reflect.get(um,t,n)}}),fm=nc({type:`function`}).client(async({next:e})=>{let{data:t}=await dm.auth.getSession(),n=t.session?.access_token;return e({headers:n?{Authorization:`Bearer ${n}`}:{}})}),pm=nc(),mm=ic(()=>({functionMiddleware:[fm],requestMiddleware:[pm]})),hm=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(){}}
22,gm=new class extends hm{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},_m={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vm=new class{#e=_m;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ym(e){setTimeout(e,0)}var bm=typeof window>`u`||`Deno`in globalThis;function xm(){}function Sm(e,t){return typeof e==`function`?e(t):e}function Cm(e){return typeof e==`number`&&e>=0&&e!==1/0}function wm(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tm(e,t){return typeof e==`function`?e(t):e}function Em(e,t){return typeof e==`function`?e(t):e}function Dm(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==km(o,t.options))return!1}else if(!jm(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Om(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Am(t.options.mutationKey)!==Am(a))return!1}else if(!jm(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function km(e,t){return(t?.queryKeyHashFn||Am)(e)}function Am(e){return JSON.stringify(e,(e,t)=>Fm(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function jm(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>jm(e[n],t[n])):!1}var Mm=Object.prototype.hasOwnProperty;function Nm(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Pm(e)&&Pm(t);if(!r&&!(Fm(e)&&Fm(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Mm.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Nm(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Pm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fm(e){if(!Im(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Im(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Im(e){return Object.prototype.toString.call(e)===`[object Object]`}function Lm(e){return new Promise(t=>{vm.setTimeout(t,e)})}function Rm(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Nm(e,t)}function zm(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Bm(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vm=Symbol();function Hm(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Vm?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Um(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Wm=(()=>{let e=()=>bm;return{isServer(){return e()},setIsServer(t){e=t}}})();function Gm(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Km=ym;function qm(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Km,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>
22{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Jm=qm(),Ym=new class extends hm{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Xm(e){return Math.min(1e3*2**e,3e4)}function Zm(e){return(e??`online`)===`online`?Ym.isOnline():!0}var Qm=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function $m(e){let t=!1,n=0,r,i=Gm(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Qm(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>gm.isFocused()&&(e.networkMode===`always`||Ym.isOnline())&&e.canRun(),u=()=>Zm(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Wm.isServer()?0:3),o=e.retryDelay??Xm,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Lm(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var eh=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cm(this.gcTime)&&(this.#e=vm.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wm.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(vm.clearTimeout(this.#e),this.#e=void 0)}};function th(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Um(e,()=>t.signal,()=>n=!0)},u=Hm(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Bm:zm;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?rh:nh,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:nh(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function nh(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function rh(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ih=class extends eh{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=sh(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=sh(this.options);e.data!==void 0&&(this.setState(oh(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Rm(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(xm).catch(xm):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Em(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
22Count>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Tm(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!wm(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Hm(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?th(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=$m({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Qm&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Qm){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ah(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...oh(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Jm.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ah(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zm(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function oh(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function sh(e){let 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,errorUpdate
22Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ch=class extends eh{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||lh(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=$m({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Jm.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function lh(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var uh=class extends hm{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new ch({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=dh(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=dh(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=dh(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>
vendor: 4,312 bytes, line 22
22e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=dh(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Jm.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Om(t,e))}findAll(e={}){return this.getAll().filter(t=>Om(e,t))}notify(e){Jm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Jm.batch(()=>Promise.all(e.map(e=>e.continue().catch(xm))))}};function dh(e){return e.options.scope?.id}var fh=class extends hm{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??km(r,t),a=this.get(i);return a||(a=new ih({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Jm.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Dm(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Dm(e,t)):t}notify(e){Jm.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Jm.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Jm.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ph=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new fh,this.#t=e.mutationCache||new uh,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=gm.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Tm(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Sm(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Jm.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Jm.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Jm.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Jm.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(xm).catch(xm)}invalidateQueries(e,t={}){return Jm.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Jm.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(xm)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(xm)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Tm(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xm).catch(xm)}
22fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xm).catch(xm)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Ym.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Am(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{jm(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Am(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{jm(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=km(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.queryFn===Vm&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},mh=N.createContext(void 0),hh=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,P.jsx)(mh.Provider,{value:e,children:t})),gh=`/assets/styles-DLIBnRXq.css`;function _h(e,t={}){if(typeof window>`u`)return;window.__lovableEvents?.captureException?.(e,{source:`react_error_boundary`,route:window.location.pathname,...t},{mechanism:`react_error_boundary`,handled:!1,severity:`error`});let n=e instanceof Response?`Response ${e.status}${e.url?` at ${e.url}`:``}`:e instanceof Error?e.message:String(e);window.__lovableReportRuntimeError?.({message:n,stack:e instanceof Error?e.stack:void 0,filename:window.location.pathname})}var vh=i(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),yh=i(`bookmark`,[[`path`,{d:`M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z`,key:`oz39mx`}]]),bh=i(`calculator`,[[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`line`,{x1:`8`,x2:`16`,y1:`6`,y2:`6`,key:`x4nwl0`}],[`line`,{x1:`16`,x2:`16`,y1:`14`,y2:`18`,key:`wjye3r`}],[`path`,{d:`M16 10h.01`,key:`1m94wz`}],[`path`,{d:`M12 10h.01`,key:`1nrarc`}],[`path`,{d:`M8 10h.01`,key:`19clt8`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}]]),xh=i(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Sh=i(`clipboard-check`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),Ch=i(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),wh=i(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),Th=i(`github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),Eh=i(`linkedin`,[[`path`,{d:`M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z`,key:`c2jq9f`}],[`rect`,{width:`4`,height:`12`,x:`2`,y:`9`,key:`mk3on5`}],[`circle`,{cx:`4`,cy:`4`,r:`2`,key:`bt5ra8`}]]),Dh=i(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}
22],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),Oh=i(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),kh=i(`rss`,[[`path`,{d:`M4 11a9 9 0 0 1 9 9`,key:`pv89mb`}],[`path`,{d:`M4 4a16 16 0 0 1 16 16`,key:`k0647b`}],[`circle`,{cx:`5`,cy:`19`,r:`1`,key:`bfqh0e`}]]),Ah=i(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),jh=i(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Mh=i(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),Nh=i(`twitter`,[[`path`,{d:`M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z`,key:`pff0z6`}]]),Ph=i(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Fh=i(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]),Ih=i(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Lh=[{slug:`crm`,name:`CRM Software`,group:`Sales & Marketing`,description:`Customer relationship management platforms to track leads, contacts, and deals.`,icon:`Users`},{slug:`project-management`,name:`Project Management`,group:`Productivity`,description:`Plan projects, assign tasks, and track progress across teams.`,icon:`KanbanSquare`},{slug:`accounting`,name:`Accounting Software`,group:`Finance`,description:`Bookkeeping, invoicing, and financial reporting for businesses of every size.`,icon:`Calculator`},{slug:`email-marketing`,name:`Email Marketing`,group:`Sales & Marketing`,description:`Design campaigns, automate sends, and grow subscriber lists.`,icon:`Mail`},{slug:`marketing-automation`,name:`Marketing Automation`,group:`Sales & Marketing`,description:`Automate multi-channel marketing workflows and lead nurturing.`,icon:`Send`},{slug:`customer-support`,name:`Customer Support`,group:`Support`,description:`Manage support conversations across channels with SLAs and reporting.`,icon:`Headphones`},{slug:`help-desk`,name:`Help Desk`,group:`Support`,description:`Ticketing systems for internal and external support teams.`,icon:`LifeBuoy`},{slug:`live-chat`,name:`Live Chat`,group:`Support`,description:`Real-time chat widgets for websites and product experiences.`,icon:`MessageCircle`},{slug:`hr`,name:`HR Software`,group:`HR & People`,description:`Human resources platforms for people ops, PTO, and performance.`,icon:`UserCog`},{slug:`payroll`,name:`Payroll Software`,group:`HR & People`,description:`Pay employees, contractors, and taxes accurately every cycle.`,icon:`Banknote`},{slug:`recruitment`,name:`Recruitment Software`,group:`HR & People`,description:`Applicant tracking, sourcing, and interview scheduling.`,icon:`UserPlus`},{slug:`inventory`,name:`Inventory Management`,group:`Operations`,description:`Track stock, orders, and warehouses across sales channels.`,icon:`Boxes`},{slug:`sales`,name:`Sales Software`,group:`Sales & Marketing`,description:`Sales engagement, pipeline, and revenue tools.`,icon:`TrendingUp`},{slug:`ecommerce`,name:`E-Commerce Platforms`,group:`Operations`,description:`Online storefronts with payments, catalog, and shipping.`,icon:`ShoppingBag`},{slug:`website-builders`,name:`Website Builders`,group:`Operations`,description:`Drag-and-drop platforms to launch a professional website fast.`,icon:`LayoutTemplate`},{slug:`cloud-storage`,name:`Cloud Storage`,group:`Productivity`,description:`Sync, back up, and share files from any device.`,icon:`Cloud`},{slug:`file-sharing`,name:`File Sharing`,group:`Productivity`,description:`Send large files securely to clients and teammates.`,icon:`FolderSync`},{slug:`video-conferencing`,name:`Video Conferencing`,group:`Productivity`,description:`HD video meetings, webinars, and screen sharing.`,icon:`Video`},{slug:`collaboration`,name:`Team Collaboration`,group:`Productivity`,description:`Chat, huddles, and shared workspaces for modern teams.`,icon:`MessagesSquare`},{slug:`productivity`,name:`Productivity Apps`,group:`Productivity`,description:`Notes, docs, and workflow tools to get more done.`,icon:`Zap`},{slug:`business-intelligence`,name:`Business Intelligence`,group:`Data`,description:`Dashboards and analytics for data-driven decisions.`,icon:`BarChart3`},{slug:`data-analytics`,name:`Data Analytics`,group:`Data`,description:`Query, visualize, and share insights from raw data.`,icon:`PieChart`},{slug:`cybersecurity`,name:`Cybersecurity Software`,group:`Security`,description:`Threat detection, endpoint protection, and compliance.`,icon:`ShieldCheck`},{slug:`password-managers`,name:`Password Managers`,group:`Security`,description:`Store and share credentials securely across your team.`,icon:`KeyRound`},{slug:`vpn`,name:`VPN Services`,group:`Security`,description:`Encrypt connections and secure remote access.`,icon:`Shield`},{slug:`tax`,name:`Accounting & Tax`,group:`Finance`,description:`Tax prep, filing, and compliance for businesses.`,icon:`FileText`},{slug:`time-tracking`,name:`Time Tracking`,group:`Productivity`,description:`Log hours, monitor projects, and bill accurately.`,icon:`Timer`},{slug:`proposal`,name:`Proposal Software`,group:`Sales & Marketing`,description:`Create, send, and e-sign business proposals fast.`,icon:`FileSignature`},{slug:`invoice`,name:`Invoice Software`,group:`Finance`,description:`Send professional invoices and get paid faster.`,icon:`Receipt`},{slug:`knowledge-base`,name:`Knowledge Base Software`,group:`Support`,description:`Self-service help centers and internal wikis.`,icon:`BookOpen`},{slug:`ai`,name:`AI Business Tools`,group:`AI`,description:`AI copilots, writing assistants, and automation.`,icon:`Sparkles`}],Rh=Array.from(new Set(Lh.map(e=>e.group))),zh=e=>Lh.find(t=>t.slug===e),Bh=`2026-06-01`;function Vh(e){let t=e.ratings;return Math.round((t.ease+t.support+t.performance+t.value)/4*10)/10}var Hh=[{slug:`salesforce`,name:`Salesforce`,category:`crm`,tagline:`The world's #1 AI-powered CRM platform.`,vendor:`Salesforce, Inc.`,founded:1999,website:`https://salesforce.com`,affiliateUrl:`https://salesforce.com`,logoInitials:`SF`,color:`#00A1E0`,overview:`Salesforce is a comprehensive customer relationship management platform built for enterprises that need deep customization, powerful automation, and a rich ecosystem of apps. Its Sales Cloud, Service Cloud, and Marketing Cloud modules give large teams a shared source of truth for pipeline, cases, and campaigns, while Einstein AI adds predictive scoring, generative summaries, and next-best-action recommendations.`,keyFeatures:[`Sales Cloud with pipeline, forecasting, and territory management`,`Service Cloud for omnichannel support and case management`,`Einstein AI for predictive scoring and generative assistance`,`AppExchange marketplace with thousands of prebuilt integrations`,`Flow Builder for low-code process automation`,`Advanced reporting and dashboards`],pros:[`Extremely customizable to complex sales processes`,`Massive ecosystem of integrations and consultants`,`Enterprise-grade security and compliance`,`Strong AI capabilities via Einstein`],cons:[`Steep learning curve for admins and end users`,`Total cost of ownership adds up with add-ons`,`Overkill for small teams that need simple c
22ontact management`],pricing:[{name:`Starter`,price:`$25`,billing:`per user/month`,features:[`Simple setup`,`Lead & opportunity tracking`,`Email integration`]},{name:`Professional`,price:`$80`,billing:`per user/month`,features:[`Forecasting`,`Custom reports`,`Quote management`]},{name:`Enterprise`,price:`$165`,billing:`per user/month`,features:[`Advanced automation`,`Territory management`,`API access`]},{name:`Unlimited`,price:`$330`,billing:`per user/month`,features:[`Unlimited customization`,`24/7 support`,`Full sandbox access`]}],freeTrial:`30-day free trial, no credit card required`,platforms:[`Web`,`iOS`,`Android`,`Windows`,`macOS`],integrations:[`Slack`,`Microsoft Teams`,`Gmail`,`Outlook`,`Zapier`,`HubSpot`,`DocuSign`,`Mailchimp`],security:[`SOC 2 Type II`,`ISO 27001`,`GDPR compliant`,`HIPAA available`,`SSO/SAML`,`Field-level encryption`],bestFor:`Mid-market and enterprise sales teams with complex processes.`,screenshots:[{caption:`Sales Cloud pipeline view`},{caption:`Einstein AI insights dashboard`},{caption:`Custom reports builder`}],competitors:[`hubspot`,`zoho-crm`,`pipedrive`],alternatives:[`hubspot`,`pipedrive`,`zoho-crm`],faqs:[{q:`Is Salesforce good for small businesses?`,a:`The Starter edition works for small teams, but most SMBs will find HubSpot or Pipedrive simpler and cheaper.`},{q:`How long does a Salesforce implementation take?`,a:`A basic Sales Cloud rollout takes 4â8 weeks; complex enterprise deployments can run several months.`},{q:`Does Salesforce include AI?`,a:`Yes. Einstein AI ships across most editions with predictive scoring and generative features.`}],verdict:`If you need a CRM that will scale to thousands of users and integrate with every corner of your stack, Salesforce is unmatched. Smaller teams should look elsewhere first.`,ratings:{ease:3.5,support:4.3,performance:4.6,value:3.8},updated:Bh,featured:!0,editorsChoice:!0},{slug:`hubspot`,name:`HubSpot`,category:`crm`,tagline:`An easy-to-use CRM that grows with your business.`,vendor:`HubSpot, Inc.`,founded:2006,website:`https://hubspot.com`,affiliateUrl:`https://hubspot.com`,logoInitials:`HS`,color:`#FF7A59`,overview:`HubSpot combines a free-forever CRM with paid Sales, Marketing, Service, CMS, and Operations Hubs. The result is a single connected platform that most teams can adopt in days, not months. HubSpot is especially strong for content-led B2B teams thanks to built-in email, landing pages, and workflow automation.`,keyFeatures:[`Free CRM with unlimited users and contacts`,`Marketing Hub with email, landing pages, and automation`,`Sales Hub with sequences, meetings, and deal pipelines`,`Service Hub with tickets, knowledge base, and surveys`,`AI Content Assistant and ChatSpot`,`Native integrations with 1,500+ apps`],pros:[`Genuinely useful free tier`,`Clean, modern interface`,`All-in-one platform reduces tool sprawl`,`Strong educational content and academy`],cons:[`Pricing scales fast as contacts grow`,`Some advanced reports lag behind Salesforce`,`Marketing contact pricing can surprise teams`],pricing:[{name:`Free`,price:`$0`,features:[`CRM`,`Basic email`,`Forms`,`Live chat`]},{name:`Starter`,price:`$20`,billing:`per seat/month`,features:[`Remove HubSpot branding`,`Automation`,`Simple reporting`]},{name:`Professional`,price:`$100`,billing:`per seat/month`,features:[`Advanced automation`,`Custom reporting`,`A/B testing`]},{name:`Enterprise`,price:`$150`,billing:`per seat/month`,features:[`Predictive lead scoring`,`Custom objects`,`Advanced permissions`]}],freeTrial:`Free forever plan; 14-day trial for paid tiers`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Gmail`,`Outlook`,`Slack`,`Zoom`,`Shopify`,`WordPress`,`Zapier`,`Stripe`],security:[`SOC 2 Type II`,`GDPR compliant`,`SSO`,`2FA`],bestFor:`Small and mid-market teams that want CRM plus marketing in one place.`,screenshots:[{caption:`Deal pipeline board`},{caption:`Marketing email builder`},{caption:`Reports dashboard`}],competitors:[`salesforce`,`zoho-crm`,`pipedrive`,`activecampaign`],alternatives:[`zoho-crm`,`pipedrive`,`activecampaign`],faqs:[{q:`Is HubSpot really free?`,a:`Yes. The core CRM is free with unlimited users and up to a million contacts. Paid Hubs unlock automation, reporting, and premium features.`},{q:`Can HubSpot replace my email marketing tool?`,a:`Marketing Hub Starter and above include a capable email marketing platform that many teams use instead of Mailchimp or ConvertKit.`}],verdict:`HubSpot is the safest all-in-one pick for growing teams. Start on the free tier and upgrade the Hubs you actually use.`,ratings:{ease:4.7,support:4.5,performance:4.4,value:4.2},updated:Bh,featured:!0,trending:!0,editorsChoice:!0},{slug:`zoho-crm`,name:`Zoho CRM`,category:`crm`,tagline:`Affordable CRM with a full business suite.`,vendor:`Zoho Corporation`,founded:2005,website:`https://zoho.com/crm`,affiliateUrl:`https://zoho.com/crm`,logoInitials:`ZC`,color:`#E42527`,overview:`Zoho CRM is part of a broad business suite that covers sales, marketing, support, finance, and HR. It offers surprising depth at a low price point, making it a favorite for cost-conscious SMBs that need customization without enterprise fees.`,keyFeatures:[`Lead, contact, and deal management`,`Blueprint workflow automation`,`Zia AI for predictions and anomaly detection`,`Multichannel outreach (email, phone,
22chat, social)`,`Deep integration with the Zoho One suite`],pros:[`Excellent value for money`,`Highly customizable modules and layouts`,`Broad Zoho ecosystem`],cons:[`UI can feel cluttered`,`Support quality varies by region`,`Advanced features require higher tiers`],pricing:[{name:`Standard`,price:`$14`,billing:`per user/month`,features:[`Sales forecasting`,`Custom dashboards`]},{name:`Professional`,price:`$23`,billing:`per user/month`,features:[`Blueprint`,`Inventory management`]},{name:`Enterprise`,price:`$40`,billing:`per user/month`,features:[`Zia AI`,`Multi-user portals`]},{name:`Ultimate`,price:`$52`,billing:`per user/month`,features:[`Advanced BI`,`Enhanced storage`]}],freeTrial:`15-day free trial; free plan for up to 3 users`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Google Workspace`,`Microsoft 365`,`Slack`,`Mailchimp`,`QuickBooks`,`Zapier`],security:[`ISO 27001`,`SOC 2`,`GDPR`,`HIPAA`],bestFor:`SMBs already using or considering the Zoho ecosystem.`,screenshots:[{caption:`Sales pipeline`},{caption:`Zia AI predictions`}],competitors:[`salesforce`,`hubspot`,`pipedrive`],alternatives:[`hubspot`,`pipedrive`],faqs:[{q:`Is Zoho CRM free?`,a:`There's a free plan for up to 3 users with basic CRM features.`}],verdict:`Best value CRM for SMBs willing to invest a little time in setup.`,ratings:{ease:4,support:3.9,performance:4.2,value:4.7},updated:Bh},{slug:`pipedrive`,name:`Pipedrive`,category:`crm`,tagline:`Sales CRM built by salespeople, for salespeople.`,vendor:`Pipedrive`,founded:2010,website:`https://pipedrive.com`,affiliateUrl:`https://pipedrive.com`,logoInitials:`PD`,color:`#1A1A1A`,overview:`Pipedrive is a pipeline-first CRM designed for outbound sales teams. Its visual kanban, activity-based selling model, and clean UX make it a favorite among agencies, consultancies, and B2B startups.`,keyFeatures:[`Visual pipeline management`,`Activity-based selling`,`Email tracking and templates`,`Smart Docs for proposals`,`AI Sales Assistant`],pros:[`Simple, focused UX`,`Fast to onboard`,`Good mobile app`],cons:[`Marketing features are add-ons`,`Reporting less flexible than Salesforce`],pricing:[{name:`Essential`,price:`$14`,billing:`per user/month`,features:[`Pipelines`,`Custom fields`]},{name:`Advanced`,price:`$29`,billing:`per user/month`,features:[`Automations`,`Email sync`]},{name:`Professional`,price:`$59`,billing:`per user/month`,features:[`Forecasting`,`Team management`]},{name:`Enterprise`,price:`$99`,billing:`per user/month`,features:[`Security alerts`,`Unlimited permissions`]}],freeTrial:`14-day free trial, no credit card`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Gmail`,`Outlook`,`Slack`,`Zoom`,`Trello`,`Zapier`],security:[`SOC 2`,`GDPR`,`SSO`],bestFor:`Outbound B2B sales teams focused on pipeline execution.`,screenshots:[{caption:`Pipeline kanban`},{caption:`Activity view`}],competitors:[`hubspot`,`salesforce`,`zoho-crm`],alternatives:[`hubspot`,`zoho-crm`],faqs:[{q:`Does Pipedrive do email marketing?`,a:`Only via the paid Campaigns add-on.`}],verdict:`Pick Pipedrive when your team lives in the pipeline and hates busywork.`,ratings:{ease:4.7,support:4.3,performance:4.4,value:4.3},updated:Bh,trending:!0},{slug:`monday`,name:`Monday.com`,category:`project-management`,tagline:`Work OS to run projects, sales, and operations.`,vendor:`monday.com Ltd.`,founded:2012,website:`https://monday.com`,affiliateUrl:`https://monday.com`,logoInitials:`MD`,color:`#FF3D57`,overview:`Monday.com is a colorful, spreadsheet-inspired Work OS that scales from a simple task board to a full company platform. Teams use it for project management, CRM, marketing operations, HR workflows, and product roadmaps.`,keyFeatures:[`Visual boards with 30+ column types`,`Multiple views: kanban, timeline, calendar, gantt`,`Automations (200+ recipes) and integrations`,`Dashboards with 15+ widgets`,`Workdocs for collaborative writing`],pros:[`Beautiful UI`,`Highly flexible`,`Great automations`],cons:[`Per-seat pricing gets expensive`,`Overwhelming feature surface`],pricing:[{name:`Free`,price:`$0`,features:[`Up to 2 users`,`3 boards`]},{name:`Basic`,price:`$9`,billing:`per seat/month`,features:[`Unlimited items`,`5GB storage`]},{name:`Standard`,price:`$12`,billing:`per seat/month`,features:[`Timeline & Gantt`,`Automations 250/mo`]},{name:`Pro`,price:`$19`,billing:`per seat/month`,features:[`Time tracking`,`Chart view`]}],freeTrial:`14-day free trial`,platforms:[`Web`,`iOS`,`Android`,`Windows`,`macOS`],integrations:[`Slack`,`Google Drive`,`Zoom`,`GitHub`,`Salesforce`],security:[`SOC 2`,`ISO 27001`,`GDPR`,`HIPAA available`],bestFor:`Cross-functional teams that want one flexible platform.`,screenshots:[{caption:`Board view`},{caption:`Timeline view`}],competitors:[`asana`,`clickup`,`trello`],alternatives:[`clickup`,`asana`],faqs:[{q:`Is Monday.com good for software teams?`,a:`Yes via monday dev, but Jira remains stronger for engineering workflows.`}
22],verdict:`Best-looking Work OS on the market, provided you can justify seat costs.`,ratings:{ease:4.5,support:4.3,performance:4.5,value:4},updated:Bh,featured:!0},{slug:`asana`,name:`Asana`,category:`project-management`,tagline:`Work management for teams and organizations.`,vendor:`Asana, Inc.`,founded:2008,website:`https://asana.com`,affiliateUrl:`https://asana.com`,logoInitials:`AS`,color:`#F06A6A`,overview:`Asana is a mature project management platform focused on structured task management, goals, and workload. It's a strong fit for marketing, operations, and product teams that want reliability over flexibility.`,keyFeatures:[`Tasks with dependencies`,`Timeline and portfolios`,`Goals with progress tracking`,`Rules for automation`,`Workload management`],pros:[`Excellent structure`,`Reliable at scale`,`Strong reporting`],cons:[`Comments and chat feel dated`,`Enterprise features are pricey`],pricing:[{name:`Personal`,price:`$0`,features:[`Up to 10 users`,`Unlimited tasks`]},{name:`Starter`,price:`$10.99`,billing:`per user/month`,features:[`Timeline`,`Reporting`]},{name:`Advanced`,price:`$24.99`,billing:`per user/month`,features:[`Portfolios`,`Goals`,`Workload`]}],freeTrial:`30-day free trial on paid plans`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Slack`,`Zoom`,`Google Drive`,`Microsoft Teams`,`Salesforce`],security:[`SOC 2`,`ISO 27001`,`GDPR`],bestFor:`Structured teams managing recurring workstreams and portfolios.`,screenshots:[{caption:`Task list`},{caption:`Portfolio view`}],competitors:[`monday`,`clickup`,`trello`],alternatives:[`monday`,`clickup`],faqs:[{q:`Does Asana have a free plan?`,a:`Yes, for up to 10 users with unlimited tasks.`}],verdict:`Asana is the safe pick for teams that value structure and long-term reliability.`,ratings:{ease:4.4,support:4.2,performance:4.5,value:4.2},updated:Bh},{slug:`clickup`,name:`ClickUp`,category:`project-management`,tagline:`One app to replace them all.`,vendor:`ClickUp`,founded:2017,website:`https://clickup.com`,affiliateUrl:`https://clickup.com`,logoInitials:`CU`,color:`#7B68EE`,overview:`ClickUp packs tasks, docs, chat, goals, whiteboards, and dashboards into a single aggressively priced platform. Teams love the flexibility; some find it overwhelming until they lock down a template.`,keyFeatures:[`15+ views`,`Docs and Whiteboards`,`Native chat and inbox`,`ClickUp AI`,`Automation builder`],pros:[`Enormous feature depth`,`Generous free tier`,`Fast release cadence`],cons:[`Can feel cluttered`,`Occasional performance dips in large workspaces`],pricing:[{name:`Free Forever`,price:`$0`,features:[`100MB storage`,`Unlimited tasks`]},{name:`Unlimited`,price:`$7`,billing:`per user/month`,features:[`Unlimited storage`,`Dashboards`]},{name:`Business`,price:`$12`,billing:`per user/month`,features:[`Advanced automations`,`Workload`]}],freeTrial:`Free forever plan`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Slack`,`GitHub`,`GitLab`,`Zoom`,`Google Drive`],security:[`SOC 2`,`GDPR`,`HIPAA available`],bestFor:`Startups and agencies that want one flexible tool.`,screenshots:[{caption:`Everything view`},{caption:`Dashboards`}],competitors:[`monday`,`asana`,`notion`],alternatives:[`monday`,`asana`,`notion`],faqs:[{q:`Is ClickUp free forever?`,a:`Yes, with generous limits, but storage is capped.`}],verdict:`Best value if you're willing to invest a weekend setting it up properly.`,ratings:{ease:4,support:4.1,performance:4.2,value:4.7},updated:Bh,trending:!0},{slug:`trello`,name:`Trello`,category:`project-management`,tagline:`Simple, visual kanban that anyone can use.`,vendor:`Atlassian`,founded:2011,website:`https://trello.com`,affiliateUrl:`https://trello.com`,logoInitials:`TR`,color:`#0079BF`,overview:`Trello is the kanban board most people learned project management on. It's fast, friendly, and works well for personal lists, small teams, and lightweight workflows.`,keyFeatures:[`Kanban boards`,`Power-Ups marketplace`,`Butler automation`,`Timeline and calendar views`],pros:[`Zero learning curve`,`Free plan is genuinely useful`,`Loved for personal productivity`],cons:[`Limited reporting`,`Not ideal for complex projects`],pricing:[{name:`Free`,price:`$0`,features:[`Up to 10 boards`]},{name:`Standard`,price:`$5`,billing:`per user/month`,features:[`Unlimited boards`]},{name:`Premium`,price:`$10`,billing:`per user/month`,features:[`Timeline, calendar, dashboard`]}],freeTrial:`Free plan`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Slack`,`Google Drive`,`Jira`,`Confluence`],security:[`SOC 2`,`GDPR`],bestFor:`Small teams and personal task management.`,screenshots:[{caption:`Board`}],competitors:[`asana`,`monday`,`clickup`],alternatives:[`asana`,`clickup`],faqs:[{q:`Is Trello owned by Atlassian?`,a:`Yes, since 2017.`}],verdict:`Great for simple kanban work; upgrade if you need serious reporting.`,ratings:{ease:4.8,support:4,performance:4.4,value:4.5},updated:Bh},{slug:`notion`,name:`Notion`,category:`productivity`,tagline:`The connected workspace where better, faster work happens.`,vendor:`Notion Labs, Inc.`,founded:2013,website:`https://notion.so`,affiliateUrl:`https://notion.so`,logoInitials:`NO`,color:`#000000`,overview:`Notion is a modular docs-plus-database workspace that teams shape into wikis, project trackers, CRMs, and knowledge bases. Notion AI adds writing and summarization on top.`,keyFeatures:[`Blocks-based editor`,`Databases with multiple views`,`Notion AI`,`Wiki and Projects`,`Templates gallery`],pros:[`Extremely flexible`,`Beautiful docs`,`Strong AI features`],cons:[`Performance on huge workspaces`,`Weak offline support`],pricing:[{name:`Free`,price:`$0`,features:[`Personal use`,`10 guest collaborators`]},{name:`Plus`,price:`$10`,billing:`per user/month`,features:[`Unlimited blocks for teams`]},{name:`Business`,price:`$18`,billing:`per user/month`,features:[`SAML SSO`,`Private teamspaces`]}],freeTrial:`Generous free plan`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Slack`,`Google Drive`,`Figma`,`GitHub`,`Jira`],security:[`SOC 2 Type II`,`GDPR`,`HIPAA (Enterprise)`],bestFor:`Teams that want a single flexible workspace for docs and light PM.`,screenshots:[{caption:`Docs & databases`},{caption:`Notion AI`}],competitors:[`clickup`,`airtable`],alternatives:[`clickup`,`airtable`],faqs:[{q:`Is Notion a good CRM?`,a:`It works for very small teams via templates, but purpose-built CRMs scale better.`}
22],verdict:`Best-in-class flexible workspace. Invest time in structure before rolling it out.`,ratings:{ease:4.3,support:4,performance:4.1,value:4.6},updated:Bh,featured:!0,editorsChoice:!0},{slug:`mailchimp`,name:`Mailchimp`,category:`email-marketing`,tagline:`Marketing platform for small businesses.`,vendor:`Intuit Mailchimp`,founded:2001,website:`https://mailchimp.com`,affiliateUrl:`https://mailchimp.com`,logoInitials:`MC`,color:`#FFE01B`,overview:`Mailchimp is the best-known email marketing platform, now expanded into a full marketing suite including landing pages, forms, automations, and light CRM features. It's easy to start with and integrates with almost everything.`,keyFeatures:[`Drag-and-drop email builder`,`Journey automations`,`Audience segmentation`,`Landing pages and forms`,`AI subject line helper`],pros:[`Very easy for beginners`,`Huge integration library`,`Solid deliverability`],cons:[`Contact-based pricing gets pricey`,`Advanced automation still trails ActiveCampaign`],pricing:[{name:`Free`,price:`$0`,features:[`500 contacts`,`1,000 sends/month`]},{name:`Essentials`,price:`$13`,billing:`per month`,features:[`A/B testing`,`24/7 support`]},{name:`Standard`,price:`$20`,billing:`per month`,features:[`Journey builder`,`Predicted segments`]},{name:`Premium`,price:`$350`,billing:`per month`,features:[`Advanced segmentation`,`Multivariate testing`]}],freeTrial:`Free plan up to 500 contacts`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Shopify`,`WooCommerce`,`Squarespace`,`Canva`,`Zapier`],security:[`SOC 2`,`GDPR`],bestFor:`Small businesses running basic email marketing.`,screenshots:[{caption:`Email builder`},{caption:`Journeys`}],competitors:[`convertkit`,`activecampaign`],alternatives:[`convertkit`,`activecampaign`],faqs:[{q:`Is Mailchimp free?`,a:`Yes, for up to 500 contacts with basic sending limits.`}],verdict:`Great starter platform; consider migrating as your automation needs grow.`,ratings:{ease:4.6,support:4.1,performance:4.3,value:4},updated:Bh,featured:!0},{slug:`convertkit`,name:`ConvertKit`,category:`email-marketing`,tagline:`Email marketing for creators.`,vendor:`ConvertKit LLC`,founded:2013,website:`https://convertkit.com`,affiliateUrl:`https://convertkit.com`,logoInitials:`CK`,color:`#FB6970`,overview:`ConvertKit (now Kit) focuses on creators â bloggers, podcasters, and course sellers â with tag-based subscribers, visual automations, and a built-in commerce feature for selling digital products.`,keyFeatures:[`Tag-based subscriber model`,`Visual automation builder`,`Landing pages and forms`,`Commerce for digital products`,`Creator Network`],pros:[`Purpose-built for creators`,`Clean automations`,`Strong deliverability`],cons:[`Design tools less flexible than Mailchimp`,`Reporting is basic`],pricing:[{name:`Free`,price:`$0`,features:[`Up to 10k subscribers`,`Unlimited landing pages`]},{name:`Creator`,price:`$15`,billing:`per month (300 subs)`,features:[`Automations`,`Third-party integrations`]},{name:`Creator Pro`,price:`$29`,billing:`per month (300 subs)`,features:[`Newsletter referrals`,`Advanced reporting`]}],freeTrial:`Free up to 10k subscribers`,platforms:[`Web`,`iOS`],integrations:[`Shopify`,`Teachable`,`WordPress`,`Zapier`,`Squarespace`],security:[`SOC 2`,`GDPR`],bestFor:`Creators selling digital products and courses.`,screenshots:[{caption:`Automations`}],competitors:[`mailchimp`,`activecampaign`],alternatives:[`mailchimp`,`activecampaign`],faqs:[{q:`Can I sell products on ConvertKit?`,a:`Yes, via ConvertKit Commerce with built-in Stripe payments.`}],verdict:`The right pick if you make a living from an audience.`,ratings:{ease:4.4,support:4.3,performance:4.4,value:4.3},updated:Bh},{slug:`activecampaign`,name:`ActiveCampaign`,category:`marketing-automation`,tagline:`Customer experience automation.`,vendor:`ActiveCampaign LLC`,founded:2003,website:`https://activecampaign.com`,affiliateUrl:`https://activecampaign.com`,logoInitials:`AC`,color:`#356AE6`,overview:`ActiveCampaign is a heavy-duty marketing automation platform that also includes CRM, sales automation, and SMS. Its automation builder is the most flexible in the category, but the learning curve is real.`,keyFeatures:[`Powerful automation builder`,`Site tracking and event tracking`,`CRM with lead scoring`,`Predictive sending`,`SMS marketing`],pros:[`Best-in-class automations`,`Deep segmentation`,`Includes CRM`],cons:[`Steeper learning curve`,`UI can feel dated`],pricing:[{name:`Starter`,price:`$15`,billing:`per month`,features:[`Email`,`Marketing automation`]},{name:`Plus`,price:`$49`,billing:`per month`,features:[`Landing pages`,`Automation reports`]},{name:`Pro`,price:`$79`,billing:`per month`,features:[`Predictive sending`,`Attribution`]}],freeTrial:`14-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Shopify`,`WooCommerce`,`Salesforce`,`Zapier`],security:[`SOC 2`,`GDPR`,`HIPAA available`],bestFor:`Growth teams that live inside automation flows.`,screenshots:[{caption:`Automation builder`}],competitors:[`mailchimp`,`hubspot`],alternatives:[`mailchimp`,`hubspot`],faqs:[{q:`Is ActiveCampaign hard to learn?`,a:`Yes, expect 2â3 weeks to master automations, but the payoff is significant.`}],verdict:`Choose ActiveCampaign when automations drive revenue.`,ratings:{ease:3.9,supp
22ort:4.4,performance:4.6,value:4.3},updated:Bh},{slug:`quickbooks`,name:`QuickBooks Online`,category:`accounting`,tagline:`Smart accounting software for small businesses.`,vendor:`Intuit`,founded:1983,website:`https://quickbooks.intuit.com`,affiliateUrl:`https://quickbooks.intuit.com`,logoInitials:`QB`,color:`#2CA01C`,overview:`QuickBooks Online is the market-leading small business accounting platform in North America. It covers invoicing, expenses, payroll, and tax with a huge accountant network.`,keyFeatures:[`Invoicing`,`Bank feeds`,`Expense tracking`,`Payroll add-on`,`Tax reporting`],pros:[`Massive accountant familiarity`,`Deep feature set`,`Strong reporting`],cons:[`Interface can feel dated`,`Price increases annually`],pricing:[{name:`Simple Start`,price:`$30`,billing:`per month`,features:[`1 user`,`Income & expenses`]},{name:`Essentials`,price:`$60`,billing:`per month`,features:[`3 users`,`Bill management`]},{name:`Plus`,price:`$90`,billing:`per month`,features:[`5 users`,`Inventory`,`Projects`]},{name:`Advanced`,price:`$200`,billing:`per month`,features:[`25 users`,`Custom fields`,`Batch invoicing`]}],freeTrial:`30-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Shopify`,`PayPal`,`Stripe`,`Square`,`HubSpot`],security:[`SOC 2`,`256-bit encryption`],bestFor:`US and Canadian small businesses.`,screenshots:[{caption:`Dashboard`},{caption:`Invoicing`}],competitors:[`xero`,`freshbooks`],alternatives:[`xero`,`freshbooks`],faqs:[{q:`Does QuickBooks include payroll?`,a:`Payroll is an additional monthly add-on.`}],verdict:`The default choice for US small businesses, especially if your accountant already uses it.`,ratings:{ease:4.1,support:4,performance:4.4,value:3.9},updated:Bh,featured:!0},{slug:`xero`,name:`Xero`,category:`accounting`,tagline:`Beautiful accounting software.`,vendor:`Xero Limited`,founded:2006,website:`https://xero.com`,affiliateUrl:`https://xero.com`,logoInitials:`XR`,color:`#13B5EA`,overview:`Xero is a cloud accounting platform popular in the UK, Australia, and New Zealand. It offers unlimited users on every plan and a modern interface that many find friendlier than QuickBooks.`,keyFeatures:[`Bank reconciliation`,`Invoicing`,`Inventory`,`Fixed asset management`,`500+ app integrations`],pros:[`Unlimited users included`,`Clean UI`,`Strong ecosystem`],cons:[`Payroll not included in most regions`,`Support can be slow`],pricing:[{name:`Starter`,price:`$15`,billing:`per month`,features:[`20 invoices`,`Bank reconciliation`]},{name:`Standard`,price:`$42`,billing:`per month`,features:[`Unlimited invoices`,`Bulk transactions`]},{name:`Premium`,price:`$78`,billing:`per month`,features:[`Multi-currency`,`Projects`]}],freeTrial:`30-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Stripe`,`PayPal`,`HubSpot`,`Shopify`],security:[`ISO 27001`,`SOC 2`,`GDPR`],bestFor:`SMBs outside the US, especially UK/AU/NZ.`,screenshots:[{caption:`Dashboard`}],competitors:[`quickbooks`,`freshbooks`],alternatives:[`quickbooks`,`freshbooks`],faqs:[{q:`Does Xero include payroll?`,a:`Only in some regions (AU/NZ). Elsewhere it's an add-on.`}],verdict:`The best cloud accounting platform outside North America.`,ratings:{ease:4.4,support:4,performance:4.5,value:4.3},updated:Bh},{slug:`freshbooks`,name:`FreshBooks`,category:`accounting`,tagline:`Accounting software built for owners.`,vendor:`FreshBooks`,founded:2003,website:`https://freshbooks.com`,affiliateUrl:`https://freshbooks.com`,logoInitials:`FB`,color:`#0075DD`,overview:`FreshBooks focuses on freelancers and small service businesses with beautiful invoices, time tracking, and easy expense capture. Double-entry accounting was added in recent years to compete with QuickBooks.`,keyFeatures:[`Invoicing`,`Time tracking`,`Expense capture`,`Projects`,`Client portal`],pros:[`Best-in-class invoicing`,`Excellent mobile app`,`Friendly UX`],cons:[`Per-client pricing quirks`,`Less powerful than QuickBooks for accountants`],pricing:[{name:`Lite`,price:`$21`,billing:`per month`,features:[`5 billable clients`]},{name:`Plus`,price:`$38`,billing:`per month`,features:[`50 clients`,`Double-entry accounting`]},{name:`Premium`,price:`$65`,billing:`per month`,features:[`Unlimited clients`,`Project profitability`]}],freeTrial:`30-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Stripe`,`PayPal`,`Zapier`,`Gusto`],security:[`SOC 2`,`256-bit encryption`],bestFor:`Freelancers and small service teams.`,screenshots:[{caption:`Invoicing`}],competitors:[`quickbooks`,`xero`],alternatives:[`quickbooks`,`xero`],faqs:[{q:`Is FreshBooks good for freelancers?`,a:`Yes â it's arguably the best invoicing experience for solo consultants.`}],verdict:`Freelancers and service pros should start here.`,ratings:{ease:4.7,support:4.4,performance:4.4,value:4.2},updated:Bh}
22,{slug:`slack`,name:`Slack`,category:`collaboration`,tagline:`Where work happens.`,vendor:`Slack Technologies (Salesforce)`,founded:2013,website:`https://slack.com`,affiliateUrl:`https://slack.com`,logoInitials:`SL`,color:`#4A154B`,overview:`Slack is the messaging platform that defined modern work chat: channels, threads, huddles, and a vast app directory. Slack AI now summarizes threads and channels.`,keyFeatures:[`Channels and DMs`,`Huddles for audio/video`,`Canvas docs`,`Workflow Builder`,`Slack AI`],pros:[`Best-in-class UX`,`Enormous app ecosystem`,`Powerful search`],cons:[`Message history limits on free`,`Notifications overload`],pricing:[{name:`Free`,price:`$0`,features:[`90-day history`]},{name:`Pro`,price:`$7.25`,billing:`per user/month`,features:[`Unlimited history`,`Group huddles`]},{name:`Business+`,price:`$12.50`,billing:`per user/month`,features:[`SSO`,`Data exports`]}],freeTrial:`Free tier`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`,`Linux`],integrations:[`Google Drive`,`Zoom`,`Notion`,`GitHub`,`Salesforce`],security:[`SOC 2 Type II`,`ISO 27001`,`GDPR`,`HIPAA available`],bestFor:`Tech-forward teams that live in real-time chat.`,screenshots:[{caption:`Channels`}],competitors:[`ms-teams`],alternatives:[`ms-teams`],faqs:[{q:`Is Slack better than Teams?`,a:`Slack wins on UX and integrations; Teams wins on price if you already have Microsoft 365.`}],verdict:`Still the best chat product on the market.`,ratings:{ease:4.7,support:4.3,performance:4.6,value:4.1},updated:Bh,featured:!0,editorsChoice:!0},{slug:`ms-teams`,name:`Microsoft Teams`,category:`collaboration`,tagline:`Meet, chat, call, and collaborate.`,vendor:`Microsoft`,founded:2017,website:`https://microsoft.com/microsoft-teams`,affiliateUrl:`https://microsoft.com/microsoft-teams`,logoInitials:`MT`,color:`#4B53BC`,overview:`Microsoft Teams bundles chat, video meetings, phone, and file collaboration into one app that ships with most Microsoft 365 plans, making it the default at millions of enterprises.`,keyFeatures:[`Chat and channels`,`Meetings up to 1,000 participants`,`Phone system`,`Deep Office integration`,`Copilot AI`],pros:[`Included with Microsoft 365`,`Enterprise-grade compliance`,`Powerful meetings`],cons:[`UI can feel heavy`,`Less friendly than Slack for external chat`],pricing:[{name:`Essentials`,price:`$4`,billing:`per user/month`,features:[`Meetings + chat`]},{name:`Business Basic`,price:`$6`,billing:`per user/month`,features:[`Web Office apps`]},{name:`Business Standard`,price:`$12.50`,billing:`per user/month`,features:[`Desktop Office apps`]}],freeTrial:`30-day free trial`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Office 365`,`SharePoint`,`OneDrive`,`Power BI`],security:[`SOC 2`,`ISO 27001`,`HIPAA`,`GDPR`],bestFor:`Enterprises already invested in Microsoft.`,screenshots:[{caption:`Meetings`}],competitors:[`slack`,`zoom`],alternatives:[`slack`],faqs:[{q:`Is Teams free?`,a:`There is a free tier but most businesses use the Microsoft 365 bundled version.`}],verdict:`The obvious choice when you already pay Microsoft.`,ratings:{ease:4,support:4.2,performance:4.5,value:4.5},updated:Bh},{slug:`zoom`,name:`Zoom`,category:`video-conferencing`,tagline:`One platform to connect.`,vendor:`Zoom Video Communications`,founded:2011,website:`https://zoom.us`,affiliateUrl:`https://zoom.us`,logoInitials:`ZM`,color:`#2D8CFF`,overview:`Zoom set the modern standard for video meetings and has since expanded into phone, chat, whiteboards, and AI Companion. It's still the tool most people default to for external calls.`,keyFeatures:[`HD video meetings`,`Zoom Phone`,`Team Chat`,`Whiteboards`,`AI Companion`],pros:[`Best-in-class video quality`,`Universal familiarity`,`Strong webinar tools`],cons:[`Feature sprawl`,`Add-on pricing complexity`],pricing:[{name:`Basic`,price:`$0`,features:[`40-min group meetings`]},{name:`Pro`,price:`$13.32`,billing:`per user/month`,features:[`30-hour meetings`,`Cloud recording`]},{name:`Business`,price:`$18.32`,billing:`per user/month`,features:[`Domain management`,`Managed rooms`]}],freeTrial:`Free tier`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`,`Linux`],integrations:[`Google Calendar`,`Outlook`,`Slack`,`Salesforce`],security:[`SOC 2 Type II`,`HIPAA`,`GDPR`,`FedRAMP`],bestFor:`Anyone hosting external meetings and webinars.`,screenshots:[{caption:`Meeting`}],competitors:[`ms-teams`,`google-workspace`],alternatives:[`ms-teams`],faqs:[{q:`Is Zoom secure?`,a:`Yes â enterprise plans include 256-bit AES-GCM encryption and compliance certifications.`}],verdict:`Still the safest choice for reliable video calls with anyone.`,ratings:{ease:4.7,support:4.2,performance:4.7,value:4.3},updated:Bh},{slug:`airtable`,name:`Airtable`,category:`productivity`,tagline:`Build the apps your business needs.`,vendor:`Airtable`,foun
22ded:2012,website:`https://airtable.com`,affiliateUrl:`https://airtable.com`,logoInitials:`AT`,color:`#F82B60`,overview:`Airtable is a spreadsheet-database hybrid that teams use to build content calendars, CRMs, applicant trackers, and light internal tools. Interface Designer turns bases into shareable apps.`,keyFeatures:[`Grid, kanban, gallery, calendar, gantt views`,`Interface Designer`,`Automations`,`Sync from external sources`,`AI features`],pros:[`Extremely flexible`,`Beautiful UI`,`Strong templates`],cons:[`Record-based pricing gets pricey`,`Not a true relational database`],pricing:[{name:`Free`,price:`$0`,features:[`1,000 records per base`]},{name:`Team`,price:`$20`,billing:`per user/month`,features:[`50k records`,`Gantt & Timeline`]},{name:`Business`,price:`$45`,billing:`per user/month`,features:[`Admin panel`,`SAML SSO`]}],freeTrial:`Free tier`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Slack`,`Google Drive`,`Zapier`],security:[`SOC 2 Type II`,`GDPR`],bestFor:`Ops and marketing teams that need custom trackers.`,screenshots:[{caption:`Grid & interface`}],competitors:[`notion`,`monday`],alternatives:[`notion`,`monday`],faqs:[{q:`Is Airtable a database?`,a:`It's a hybrid â powerful for most business use cases but not a substitute for Postgres.`}],verdict:`Great when a spreadsheet stops scaling.`,ratings:{ease:4.3,support:4.1,performance:4.4,value:4},updated:Bh},{slug:`jira`,name:`Jira`,category:`project-management`,tagline:`The #1 tool for agile teams.`,vendor:`Atlassian`,founded:2002,website:`https://atlassian.com/software/jira`,affiliateUrl:`https://atlassian.com/software/jira`,logoInitials:`JR`,color:`#0052CC`,overview:`Jira is the dominant issue tracker for software teams, with deep support for Scrum, Kanban, roadmaps, and automation. Jira Product Discovery adds early-stage prioritization.`,keyFeatures:[`Scrum & Kanban boards`,`Roadmaps`,`Automation`,`Advanced JQL search`,`Bitbucket & GitHub integrations`],pros:[`Purpose-built for engineering`,`Massive ecosystem`,`Highly configurable`],cons:[`Complex admin`,`Can feel heavy for tiny teams`],pricing:[{name:`Free`,price:`$0`,features:[`Up to 10 users`]},{name:`Standard`,price:`$7.53`,billing:`per user/month`,features:[`Advanced permissions`]},{name:`Premium`,price:`$13.53`,billing:`per user/month`,features:[`Advanced roadmaps`,`24/7 support`]}],freeTrial:`Free tier + 7-day paid trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`GitHub`,`GitLab`,`Bitbucket`,`Slack`,`Confluence`],security:[`SOC 2`,`ISO 27001`,`GDPR`],bestFor:`Software engineering teams practicing agile.`,screenshots:[{caption:`Sprint board`}],competitors:[`clickup`,`asana`],alternatives:[`clickup`],faqs:[{q:`Is Jira only for developers?`,a:`Primarily, yes â non-engineering teams should look at Asana, Monday, or Trello.`}],verdict:`Non-negotiable default for most engineering orgs.`,ratings:{ease:3.7,support:4.2,performance:4.5,value:4.4},updated:Bh},{slug:`wrike`,name:`Wrike`,category:`project-management`,tagline:`Versatile work management for teams.`,vendor:`Wrike, Inc.`,founded:2006,website:`https://wrike.com`,affiliateUrl:`https://wrike.com`,logoInitials:`WR`,color:`#08C7E0`,overview:`Wrike is a mature PM platform that excels in professional services, marketing, and creative operations with strong request forms, proofing, and time tracking.`,keyFeatures:[`Custom workflows`,`Request forms`,`Proofing & approvals`,`Time tracking`,`Resource management`],pros:[`Strong for agencies`,`Robust permissions`,`Good reporting`],cons:[`UI feels older`,`Onboarding takes effort`],pricing:[{name:`Free`,price:`$0`,features:[`Task management`]},{name:`Team`,price:`$9.80`,billing:`per user/month`,features:[`Custom workflows`]},{name:`Business`,price:`$24.80`,billing:`per user/month`,features:[`Time tracking`,`Request forms`]}],freeTrial:`14-day free trial`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Salesforce`,`Slack`,`Adobe Creative Cloud`],security:[`SOC 2`,`ISO 27001`,`HIPAA available`],bestFor:`Agencies and marketing operations teams.`,screenshots:[{caption:`Work views`}],competitors:[`asana`,`monday`],alternatives:[`asana`,`monday`],faqs:[{q:`Does Wrike include proofing?`,a:`Yes, native visual proofing is included in Business and above.`}],verdict:`Solid pick for agency ops workflows.`,ratings:{ease:3.9,supp
22ort:4.1,performance:4.3,value:4.1},updated:Bh},{slug:`freshdesk`,name:`Freshdesk`,category:`help-desk`,tagline:`Delight customers with effortless support.`,vendor:`Freshworks`,founded:2010,website:`https://freshdesk.com`,affiliateUrl:`https://freshdesk.com`,logoInitials:`FD`,color:`#25C16F`,overview:`Freshdesk is a friendly, mid-market help desk with omnichannel ticketing, automations, SLAs, and Freddy AI. Its free tier makes it easy to try.`,keyFeatures:[`Omnichannel ticketing`,`SLA & business hours`,`Freddy AI`,`Knowledge base`,`Automations`],pros:[`Generous free plan`,`Clean UI`,`Fast setup`],cons:[`Reporting less deep than Zendesk`,`Enterprise features gated`],pricing:[{name:`Free`,price:`$0`,features:[`Email & social ticketing`]},{name:`Growth`,price:`$15`,billing:`per agent/month`,features:[`Automations`,`SLA`]},{name:`Pro`,price:`$49`,billing:`per agent/month`,features:[`Multi-product`,`Custom roles`]}],freeTrial:`21-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Slack`,`Shopify`,`Salesforce`],security:[`SOC 2`,`ISO 27001`,`GDPR`],bestFor:`SMBs and mid-market support teams.`,screenshots:[{caption:`Ticket view`}],competitors:[`zendesk`,`intercom`],alternatives:[`zendesk`,`intercom`],faqs:[{q:`Is Freshdesk free?`,a:`Yes, up to 10 agents with email and social ticketing.`}],verdict:`Best value help desk for growing teams.`,ratings:{ease:4.4,support:4.3,performance:4.3,value:4.5},updated:Bh},{slug:`zendesk`,name:`Zendesk`,category:`customer-support`,tagline:`Service made simple.`,vendor:`Zendesk`,founded:2007,website:`https://zendesk.com`,affiliateUrl:`https://zendesk.com`,logoInitials:`ZD`,color:`#03363D`,overview:`Zendesk is the enterprise-grade customer service platform with strong reporting, workforce management, and AI. It scales to global support organizations.`,keyFeatures:[`Omnichannel ticketing`,`Workflows`,`Advanced analytics`,`Zendesk AI`,`Voice`],pros:[`Deep enterprise features`,`Great reporting`,`Strong AI`],cons:[`Expensive at scale`,`Complex admin`],pricing:[{name:`Suite Team`,price:`$55`,billing:`per agent/month`,features:[`Ticketing`,`Messaging`]},{name:`Suite Growth`,price:`$89`,billing:`per agent/month`,features:[`Self-service portal`]},{name:`Suite Professional`,price:`$115`,billing:`per agent/month`,features:[`Advanced routing`]}],freeTrial:`14-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Salesforce`,`Slack`,`Jira`,`Shopify`],security:[`SOC 2 Type II`,`ISO 27001`,`HIPAA`,`FedRAMP`],bestFor:`Mid-market and enterprise support orgs.`,screenshots:[{caption:`Agent workspace`}],competitors:[`freshdesk`,`intercom`],alternatives:[`freshdesk`,`intercom`],faqs:[{q:`Is Zendesk overkill for a startup?`,a:`Often yes â Freshdesk or Intercom start cheaper and simpler.`}],verdict:`The safe choice for support at scale.`,ratings:{ease:4,support:4.3,performance:4.6,value:3.9},updated:Bh},{slug:`intercom`,name:`Intercom`,category:`live-chat`,tagline:`The AI-first customer service platform.`,vendor:`Intercom`,founded:2011,website:`https://intercom.com`,affiliateUrl:`https://intercom.com`,logoInitials:`IC`,color:`#1F8DED`,overview:`Intercom pioneered in-app messaging and now leads with Fin, an AI agent that resolves customer queries autonomously. It's ideal for SaaS products blending sales, support, and onboarding.`,keyFeatures:[`Messenger for web and mobile`,`Fin AI agent`,`Product tours`,`Help center`,`Series automation`],pros:[`Best-in-class messenger`,`Strong AI`,`Product-led fit`],cons:[`Resolution-based pricing can spike`,`Complex plan structure`],pricing:[{name:`Essential`,price:`$39`,billing:`per seat/month`,features:[`Messenger`,`Help center`]},{name:`Advanced`,price:`$99`,billing:`per seat/month`,features:[`Automations`]},{name:`Expert`,price:`$139`,billing:`per seat/month`,features:[`Workflows`,`SLAs`]}],freeTrial:`14-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Slack`,`Salesforce`,`HubSpot`,`Stripe`],security:[`SOC 2 Type II`,`ISO 27001`,`GDPR`],bestFor:`SaaS companies combining support with onboarding and product.`,screenshots:[{caption:`Inbox`}],competitors:[`zendesk`,`freshdesk`],alternatives:[`zendesk`,`freshdesk`],faqs:[{q:`How much does Fin AI cost?`,a:`Fin bills per resolution, typically around $0.99 per resolved conversation.`}],verdict:`The AI leader in customer service, best for product-led companies.`,ratings:{ease:4.4,support:4.4,performance:4.6,value:3.9},updated:Bh,trending:!0}
22,{slug:`shopify`,name:`Shopify`,category:`ecommerce`,tagline:`The all-in-one commerce platform.`,vendor:`Shopify Inc.`,founded:2006,website:`https://shopify.com`,affiliateUrl:`https://shopify.com`,logoInitials:`SH`,color:`#95BF47`,overview:`Shopify powers millions of online stores of every size, from side hustles to enterprise brands via Shopify Plus. Its App Store, Shopify Payments, and POS make it the most complete commerce platform available.`,keyFeatures:[`Online store with themes`,`Shopify Payments`,`POS`,`App Store (8,000+ apps)`,`Shopify Magic AI`],pros:[`Fastest way to launch a store`,`Huge app ecosystem`,`Reliable at scale`],cons:[`Transaction fees if not using Shopify Payments`,`Theme customization requires Liquid`],pricing:[{name:`Basic`,price:`$29`,billing:`per month`,features:[`Online store`,`24/7 support`]},{name:`Shopify`,price:`$79`,billing:`per month`,features:[`Lower fees`,`Professional reports`]},{name:`Advanced`,price:`$299`,billing:`per month`,features:[`Advanced reports`,`Duties`]}],freeTrial:`3-day free trial + $1/month for 3 months`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Meta`,`TikTok`,`Google`,`Klaviyo`,`Mailchimp`],security:[`PCI DSS Level 1`,`SOC 2`,`GDPR`],bestFor:`Anyone selling physical or digital products online.`,screenshots:[{caption:`Storefront`}],competitors:[`wix`,`squarespace`],alternatives:[`wix`,`squarespace`],faqs:[{q:`Does Shopify charge transaction fees?`,a:`Only if you don't use Shopify Payments.`}],verdict:`Undisputed leader for serious commerce.`,ratings:{ease:4.5,support:4.4,performance:4.7,value:4.3},updated:Bh,featured:!0,editorsChoice:!0},{slug:`wix`,name:`Wix`,category:`website-builders`,tagline:`Create a website you're proud of.`,vendor:`Wix.com Ltd.`,founded:2006,website:`https://wix.com`,affiliateUrl:`https://wix.com`,logoInitials:`WX`,color:`#0C6EFC`,overview:`Wix is the most beginner-friendly website builder with a drag-and-drop editor, hundreds of templates, and AI-powered site generation (Wix ADI). It also supports commerce, bookings, and blogs.`,keyFeatures:[`Drag-and-drop editor`,`Wix ADI (AI site builder)`,`800+ templates`,`App Market`,`Wix Stores`],pros:[`Very easy to start`,`Beautiful templates`,`All-in-one hosting`],cons:[`Cannot switch templates after publishing`,`SEO improved but historically lagged`],pricing:[{name:`Light`,price:`$16`,billing:`per month`,features:[`2GB storage`,`Custom domain`]},{name:`Core`,price:`$27`,billing:`per month`,features:[`50GB storage`,`Basic commerce`]},{name:`Business`,price:`$32`,billing:`per month`,features:[`Accept payments`]}],freeTrial:`Free plan with Wix subdomain`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Google Analytics`,`Meta`,`PayPal`,`Stripe`],security:[`SSL included`,`GDPR`],bestFor:`Small businesses and portfolios.`,screenshots:[{caption:`Editor`}],competitors:[`squarespace`,`shopify`],alternatives:[`squarespace`,`shopify`],faqs:[{q:`Is Wix free?`,a:`Yes, with Wix ads and a Wix subdomain.`}],verdict:`Best for beginners who want a beautiful site fast.`,ratings:{ease:4.7,support:4.1,performance:4.3,value:4.3},updated:Bh},{slug:`squarespace`,name:`Squarespace`,category:`website-builders`,tagline:`The all-in-one platform to build a beautiful online presence.`,vendor:`Squarespace`,founded:2003,website:`https://squarespace.com`,affiliateUrl:`https://squarespace.com`,logoInitials:`SQ`,color:`#000000`,overview:`Squarespace is famous for elegant, editorial templates favored by designers, creatives, and small businesses. It also includes commerce, scheduling, and email marketing.`,keyFeatures:[`Award-winning templates`,`Commerce`,`Acuity Scheduling`,`Email campaigns`,`Squarespace AI`],pros:[`Beautiful defaults`,`Great for creatives`,`Easy to maintain`],cons:[`Less flexible than Wix in editor`,`Fewer apps than Shopify`],pricing:[{name:`Personal`,price:`$16`,billing:`per month`,features:[`Templates`,`SSL`]},{name:`Business`,price:`$23`,billing:`per month`,features:[`Commerce`]},{name:`Commerce Basic`,price:`$28`,billing:`per month`,features:[`Full store`]}],freeTrial:`14-day free trial`,platforms:[`Web`,`iOS`,`Android`],integrations:[`Stripe`,`PayPal`,`Mailchimp`],security:[`SSL included`,`PCI compliant`],bestFor:`Creatives, small businesses, and portfolios.`,screenshots:[{caption:`Templates`}],competitors:[`wix`,`shopify`],alternatives:[`wix`],faqs:[{q:`Is Squarespace good for SEO?`,a:`Yes, modern versions include strong SEO controls and fast hosting.`}],verdict:`Pick Squarespace when brand aesthetics matter most.`,ratings:{ease:4.5,support:4.2,performance:4.4,value:4.3},updated:Bh},{slug:`dropbox`,name:`Dropbox`,category:`cloud-storage`,tagline:`The world's most collaborative workspace.`,vendor:`Dropbox, Inc.`,founded:2007,website:`https://dropbox.com`,affiliateUrl:`https://dropbox.com`,logoInitials:`DB`,color:`#0061FF`,overview:`Dropbox pioneered consumer file sync and remains a go-to for creative teams thanks to fast sync, smart previews, Dropbox Paper, and integrations with Adobe and design tools.`,keyFeatures:[`File sync`,`Smart Sync`,`Dropbox Paper`,`e-signatures via HelloSign`,`Dropbox Replay for video review`],pros:[`Rock-solid sync`,`Creative-friendly`,`Strong external sharing`],cons:[`More expensive than Google Drive`,`Fewer productivity apps than Microsoft or Google`],pricing:[{name:`Plus`,price:`$11.99`,billing:`per month`,features:[`2TB`,`30-day recovery`]},{name:`Family`,price:`$19.99`,billing:`per month`,features:[`2TB shared`]},{name:`Business Standard`,price:`$18`,billing:`per user/month`,features:[`5TB team`]}],freeTrial:`Free plan with 2GB`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`,`Linux`],integrations:[`Slack`,`Zoom`,`Adobe`,`Microsoft 365`],security:[`SOC 2`,`ISO 27001`,`HIPAA available`],bestFor:`Creative teams and cross-platform users.`,screenshots:[{caption:`File browser`}],competitors:[`google-workspace`,`microsoft-365`],alternatives:[`google-workspace`],faqs:[{q:`Does Dropbox include e-sign?`,a:`Yes, via HelloSign integration on paid plans.`}
22],verdict:`Best cross-platform sync experience.`,ratings:{ease:4.6,support:4.1,performance:4.7,value:3.9},updated:Bh},{slug:`google-workspace`,name:`Google Workspace`,category:`productivity`,tagline:`Everything you need to get anything done, now in one place.`,vendor:`Google`,founded:2006,website:`https://workspace.google.com`,affiliateUrl:`https://workspace.google.com`,logoInitials:`GW`,color:`#4285F4`,overview:`Google Workspace bundles Gmail, Drive, Docs, Sheets, Slides, Meet, and Calendar with admin controls and Gemini AI. It's the collaboration default for millions of businesses.`,keyFeatures:[`Gmail with custom domain`,`Docs, Sheets, Slides`,`Drive storage`,`Meet video calls`,`Gemini AI`],pros:[`Real-time collaboration is unmatched`,`Reliable`,`Fair pricing`],cons:[`Enterprise governance less deep than Microsoft`,`Gemini still catching up to Copilot in places`],pricing:[{name:`Business Starter`,price:`$7`,billing:`per user/month`,features:[`30GB`,`Custom email`]},{name:`Business Standard`,price:`$14`,billing:`per user/month`,features:[`2TB`,`Recording meetings`]},{name:`Business Plus`,price:`$22`,billing:`per user/month`,features:[`5TB`,`eDiscovery`]}],freeTrial:`14-day free trial`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Slack`,`Zoom`,`Asana`,`HubSpot`],security:[`SOC 2`,`ISO 27001`,`HIPAA available`],bestFor:`Any team that collaborates on documents daily.`,screenshots:[{caption:`Docs`}],competitors:[`microsoft-365`],alternatives:[`microsoft-365`],faqs:[{q:`Does Google Workspace include AI?`,a:`Yes, Gemini is now bundled in Business Standard and above.`}],verdict:`The gold standard for cloud collaboration.`,ratings:{ease:4.7,support:4.3,performance:4.7,value:4.5},updated:Bh,featured:!0},{slug:`microsoft-365`,name:`Microsoft 365`,category:`productivity`,tagline:`The productivity cloud built for hybrid work.`,vendor:`Microsoft`,founded:2011,website:`https://microsoft.com/microsoft-365`,affiliateUrl:`https://microsoft.com/microsoft-365`,logoInitials:`M3`,color:`#D83B01`,overview:`Microsoft 365 combines Word, Excel, PowerPoint, Outlook, Teams, OneDrive, and SharePoint with Copilot AI. It's the default productivity stack for the enterprise world.`,keyFeatures:[`Desktop Office apps`,`Teams`,`OneDrive & SharePoint`,`Exchange email`,`Copilot AI`],pros:[`Enterprise-grade compliance`,`Powerful desktop apps`,`Deep Copilot integration`],cons:[`Complex licensing`,`Copilot AI is a paid add-on`],pricing:[{name:`Business Basic`,price:`$6`,billing:`per user/month`,features:[`Web Office`,`Teams`]},{name:`Business Standard`,price:`$12.50`,billing:`per user/month`,features:[`Desktop Office`]},{name:`Business Premium`,price:`$22`,billing:`per user/month`,features:[`Advanced security`]}],freeTrial:`1-month free trial`,platforms:[`Web`,`iOS`,`Android`,`macOS`,`Windows`],integrations:[`Salesforce`,`Adobe`,`Slack`],security:[`SOC 2`,`ISO 27001`,`HIPAA`,`FedRAMP`],bestFor:`Enterprises and any team that needs desktop Office.`,screenshots:[{caption:`Excel`}],competitors:[`google-workspace`],alternatives:[`google-workspace`],faqs:[{q:`How much is Copilot for M365?`,a:`Copilot Pro adds ~$30/user/month on top of M365 licensing.`}],verdict:`Unbeatable for enterprise; strong for SMB if you want desktop Office.`,ratings:{ease:4.3,support:4.3,performance:4.6,value:4.5},updated:Bh,featured:!0}],Uh=e=>Hh.find(t=>t.slug===e),Wh=e=>Hh.filter(t=>t.category===e),Gh=()=>Hh.filter(e=>e.featured),Kh=()=>Hh.filter(e=>e.trending),qh=()=>Hh.filter(e=>e.editorsChoice),Y=(e,t,n)=>({heading:e,body:t,...n}),Jh=[{slug:`best-crm-software-small-business`,title:`Best CRM Software for Small Businesses in 2026`,description:`A practical, no-fluff comparison of the CRM platforms that actually make sense for small teams in 2026, with pricing, setup effort, and who each tool fits best.`,category:`crm`,tags:[`CRM`,`Small Business`,`Buying Guide`],author:`raj-patel`,published:`2026-01-14`,updated:`2026-03-02`,readingTime:8,featured:!0,intro:`Choosing a CRM as a small business owner feels deceptively simple until you actually start comparing options. Every vend
22or claims to be the easiest, the most powerful, or the best value, and the marketing pages all start to blur together after the fifth tab you open. What actually matters is much narrower: can your team log a deal in under a minute, will the automation save you real hours each week, and does the pricing stay sane as you add seats. This guide walks through the CRMs that consistently show up as strong fits for small businesses, based on how they handle contact management, pipeline visibility, and the onboarding curve that so many teams underestimate. We are not ranking by feature count, because a bloated feature list rarely correlates with a tool your sales team will actually use daily.`,keyTakeaways:[`HubSpot's free tier is genuinely usable for very small teams, but costs escalate quickly once you need marketing automation.`,`Pipedrive remains the fastest CRM to onboard a sales-only team without a dedicated admin.`,`Zoho CRM offers the deepest feature set per dollar if you're willing to spend time configuring it.`,`Salesforce Essentials is worth considering only if you expect to scale into enterprise complexity within 18 months.`,`The right CRM is the one your reps will update every day, not the one with the longest feature checklist.`],sections:[Y(`What Small Businesses Actually Need From a CRM`,[`Most small business CRM shopping goes wrong at the requirements stage. Teams start listing every feature they've seen in a demo instead of asking what daily workflow they're trying to fix. In practice, the core job of a CRM for a five-to-fifty person company is threefold: capture every lead automatically, make pipeline stages visible without a status meeting, and remind reps to follow up before a deal goes cold. Everything else, from AI lead scoring to territory management, is a nice-to-have that becomes relevant later.`,`Budget discipline matters more here than in almost any other software category, because CRM pricing is almost always per-seat and per-month, and it compounds as you hire. A tool that looks like $15 a seat in the sales deck can turn into $60 a seat once you need the marketing hub, the reporting add-on, and API access. Reading the fine print on tiered pricing before you commit will save real money over a two-year contract.`,`Implementation time is the other hidden cost. A CRM that takes six weeks to configure properly is not a small business CRM, no matter what the vendor calls it. The tools that succeed with lean teams are the ones a non-technical office manager can set up in an afternoon, with sensible defaults for pipeline stages, email templates, and mobile access baked in from day one.`]),Y(`HubSpot CRM: Best Free Starting Point`,[`HubSpot's free CRM tier has aged into one of the more generous entry points in the category, covering contact management, deal pipelines, and basic email tracking without a credit card. For a founder-led sales team of one to three people, this is often enough to run an entire quarter of prospecting without paying anything. The interface is polished, the mobile app is reliable, and the learning curve is shallow compared to older enterprise tools.`,`The catch shows up when you want automation beyond the basics. Sequences, custom reporting, and multiple pipelines live behind the paid Sales Hub tiers, and pricing moves upward in steps that can feel steep once you add the Marketing Hub for lead nurturing. Around the mid-tier plans, at time of writing, small teams should budget for a noticeably higher per-seat cost than the entry price suggests, especially once contact volume grows past HubSpot's marketing contact thresholds.`,`Where HubSpot earns its reputation is the ecosystem. Because so many other tools integrate natively with HubSpot, teams that start there rarely feel locked in technically, even if the pricing eventually nudges them to consider alternatives. For a company planning to invest seriously in inbound marketing alongside sales, the combined CRM and marketing suite is hard to beat on a pure capability basis.`],{bullets:[`Free tier supports unlimited users and up to a million contacts`,`Paid tiers add sequences, custom reports, and multiple deal pipelines`,`Native integrations with most marketing and support tools reduce switching costs later`]}),Y(`Pipedrive: Fastest to Onboard a Sales-Only Team`,[`Pipedrive was built by former salespeople with a singular focus on pipeline visibility, and it shows. The visual deal board is the first thing reps see when they log in, and there is no marketing hub or ticketing module competing for attention. For a business whose only CRM need is 'help my reps close deals,' this focus is a genuine advantage rather than a limitation.`,`Setup typically takes an afternoon rather than a week. Pipeline stages, custom fields, and email sync can be configured by a sales manager without IT involvement, which matters enormously for a ten-person business without a dedicated RevOps hire. The mobile app is also one of the stronger ones in this category for reps who spend most of their day outside the office.`,`Pipedrive's limitation is depth outside of sales. If you eventually need marketing automation, robust customer service ticketing, or complex approval workflows, you'll likely bolt on other tools rather than expand within Pipedrive itself. For a lean sales team that wants to get moving fast and layer on other software later, that tradeoff is usually acceptable.`]),Y(`Zoho CRM: Most Configurable Per Dollar`,[`Zoho CRM sits in an interesting spot: it is priced competitively with Pipedrive and HubSpot's starter tiers, but includes a feature set closer to what you'd expect from a much pricier platform, including workflow automation, AI-assisted lead scoring, and a genuinely deep customization layer through Zoho's blueprint and modules system. For teams willing to spend a few hours in the settings menu, that depth translates into real savings versus buying add-ons elsewhere.`,`The tradeoff is a steeper learning curve. Zoho's interface, while functional, is less immediately intuitive than Pipedrive's board view or HubSpot's clean dashboards. Teams that assign s
22omeone to own the CRM configuration tend to get much more value out of Zoho than teams that expect it to work perfectly out of the box.`,`Zoho also benefits from being part of a much larger suite, including Zoho Books for accounting and Zoho Desk for support, so businesses already using other Zoho products often find the CRM slots in with minimal integration work. For standalone buyers, that ecosystem benefit is less relevant, but it's worth knowing if you're comparing total software spend across departments.`]),Y(`Salesforce Essentials: Built for Where You're Growing, Not Where You Are`,[`Salesforce remains the default answer many people give when asked to name a CRM, and its Essentials/Starter tier is a genuine attempt to bring that power down to small business budgets. The appeal is longevity: if your company plans to scale into a larger sales organization with complex approval chains and custom objects, starting on Salesforce avoids a painful migration later.`,`For a business that just needs to track leads and close deals today, though, Salesforce can feel like overkill. The interface has more clicks per action than Pipedrive or HubSpot, and getting real value out of it usually requires either a consultant or a meaningful time investment from an internal admin. Small teams without that bandwidth often end up under-using the platform relative to what they're paying.`,`The right way to think about Salesforce for a small business is as an insurance policy against future complexity, not as the cheapest or fastest way to run today's pipeline. If you're fairly confident you'll need enterprise-grade CRM capabilities within a year or two, the migration cost you save may be worth the extra friction now.`]),Y(`Comparing the Core Options Side by Side`,[`Numbers below reflect general starting price ranges at time of writing and should be verified directly with each vendor, since CRM pricing shifts frequently and often depends on contract length and seat count.`],{table:{headers:[`CRM`,`Best For`,`Starting Price (per seat/mo)`,`Setup Time`],rows:[[`HubSpot CRM`,`Founder-led teams wanting free start`,`$0, paid tiers from ~$20`,`Hours`],[`Pipedrive`,`Sales-only teams wanting speed`,`~$14â$25`,`Hours`],[`Zoho CRM`,`Configurable teams on a budget`,`~$14â$40`,`Days`],[`Salesforce Essentials`,`Teams planning to scale fast`,`~$25â$80`,`Days to weeks`]]}}),Y(`Migration and Data Import Considerations`,[`Whichever CRM you choose, the quality of your data migration will determine how quickly your team trusts the new system. Exporting spreadsheets or a previous CRM's data and mapping fields cleanly avoids the common failure mode where duplicate contacts and mismatched deal stages make reps abandon the tool within a month. Most of the platforms above offer guided import wizards, but it's still worth having one person own the cleanup rather than assuming the import will be perfect.`,`It's also worth testing email and calendar sync before rolling a CRM out company-wide. Sync issues between Gmail or Outlook and the CRM are one of the most common support complaints across every platform in this list, and catching a misconfiguration during a pilot with two or three users is far less disruptive than discovering it after full rollout.`,`Finally, decide early who owns CRM administration going forward. Even the simplest tools drift into chaos without someone periodically cleaning up stale deals, merging duplicate records, and adjusting pipeline stages as the sales process evolves.`]),Y(`Making the Final Call`,[`If you're a solo founder or a two-person sales team testing the market, start with HubSpot's free tier and only upgrade once you hit a real limitation, not because a sales rep suggests it. If your team is purely sales-focused and values speed over feature depth, Pipedrive is the safer bet for getting productive within a day. Teams with a bit more patience for configuration and a tighter budget should give Zoho CRM a serious look, since its per-dollar feature depth is hard to match.`,`Reserve Salesforce for situations where you have concrete evidence you'll need enterprise capabilities soon, ideally validated by a funding round, a hiring plan, or a known compliance requirement. Buying Salesforce speculatively is one of the more common ways small businesses overspend on software in year one.`,`Whatever you pick, run a 30-day pilot with your actual sales process before committing to an annual contract. The best CRM on paper is worthless if your team quietly reverts to
22spreadsheets three weeks in.`])],faqs:[{q:`Is a free CRM good enough for a small business?`,a:`For a team of one to three people with a simple sales process, free tiers like HubSpot's can genuinely last a year or more. Once you need automation, custom reporting, or multiple pipelines, you'll likely need to upgrade.`},{q:`How long does it take to switch CRMs?`,a:`A clean migration for a small business, including data cleanup and team training, usually takes one to three weeks. Rushing it tends to create data quality problems that linger for months.`},{q:`Do I need a dedicated CRM administrator?`,a:`Not necessarily full-time, but someone should own configuration and data hygiene as a recurring responsibility, even if it's just a few hours a month.`},{q:`Which CRM is cheapest at scale?`,a:`Pipedrive and Zoho CRM tend to stay more predictable as you add seats compared to HubSpot, whose marketing add-ons can raise costs quickly.`},{q:`Can I use a CRM without integrating email?`,a:`Technically yes, but you'll lose most of the automatic activity logging that makes a CRM worth using. Email sync is worth setting up even if it takes an extra hour during onboarding.`},{q:`Should I choose a CRM based on what competitors use?`,a:`No. Base the decision on your team's actual workflow and technical comfort level, since the same CRM can be a great fit for one company and a poor one for another with similar size but different processes.`}],relatedSoftware:[`salesforce`,`hubspot`,`zoho-crm`,`pipedrive`]},{slug:`best-project-management-software-compared`,title:`Best Project Management Software Compared for 2026`,description:`Asana, Monday, ClickUp, and Trello compared on real workflows: task depth, learning curve, pricing, and which teams each tool actually suits.`,category:`project-management`,tags:[`Project Management`,`Comparison`,`Productivity`],author:`sophie-tremblay`,published:`2026-02-03`,updated:`2026-04-10`,readingTime:8,featured:!0,intro:`Project management software has become one of the most crowded categories in business software, and the differences between the leading tools are often more about philosophy than features. Asana, Monday, ClickUp, and Trello all let you create tasks, assign owners, and track progress, but they diverge sharply in how much structure they impose and how steep the learning curve is for a new team. This comparison focuses on the practical question most buyers actually have: which tool will my team still be using in six months without a project manager forcing adoption. We've tested these platforms across different team types, from creative agencies to engineering squads, and the right answer depends heavily on how your team already thinks about work.`,keyTakeaways:[`Trello remains the easiest to adopt for small teams that think in simple lists and boards.`,`Asana balances structure and flexibility well for cross-functional teams juggling multiple projects.`,`ClickUp offers the most customization but requires real setup time to avoid overwhelming new users.`,`Monday.com's visual interface suits teams that want dashboards and reporting without heavy configuration.`,`The biggest driver of adoption failure is choosing more structure than your team is ready to maintain.`],sections:[Y(`Why Project Management Tool Choice Is Rarely About Features`,[`Every major project management platform today supports tasks, subtasks, due dates, comments, and some form of automation. If you compare feature lists side by side, the differences look marginal, which is exactly why so many teams end up picking based on trial impressions rather than actual fit. What determines long-term success is less about what a tool can do and more about how naturally it maps to how your team already communicates about work.`,`A five-person design studio and a forty-person engineering team have fundamentally different needs even though both might search for 'best project management software.' The design studio typically wants visual boards, simple status updates, and minimal ceremony. The engineering team often wants dependencies, sprint tracking, and integration with a code repository. Picking a tool built for the wrong mental model creates friction that compounds every week until the team quietly reverts to Slack messages and spreadsheets.`,`This is why we recommend testing with a real, current project rather than a demo sandbox. A tool that feels great in a guided walkthrough can feel completely different once you're managing fifteen live tasks with shifting deadlines and three stakeholders arguing about priority.`]),Y(`Trello: Best for Visual Simplicity`,[`Trello's card-and-board format is still one of the most intuitive ways to represent work visually, and that simplicity is precisely its strength. New team members typically understand how to use Trello within minutes, with almost no training required. For small teams running straightforward workflows, like a content calendar or a simple sales pipeline, this low friction translates directly into higher day-to-day usage.`,`The tradeoff is that Trello's simplicity becomes a limitation once projects involve dependencies, workload balancing across many people, or detailed reporting. Power-ups extend functionality, but stacking several of them to replicate features that come standard in Asana or ClickUp often ends up costing more and feeling less cohesive than choosing a more full-featured tool from the start.`,`Trello remains an excellent choice for teams that value speed of adoption over depth of reporting, and it's particularly well suited to non-technical teams like marketing, HR, or small agencies managing a handful of concurrent projects.`]),Y(`Asana: Best Balance for Cross-Functional Teams`,[`Asana occupies a comfortable middle ground between Trello's simplicity and ClickUp's exhaustive customization. It supports list, board, timeline, and calendar views of the same underlying data, which makes it easier for different team members to work in the view that suits them without forcing a single format on everyone. This flexibility is one of the main reasons Asana performs well with cross-functional teams where marketing, sales, and operations all need visibility into overlapping projects.`,`Asana's automation rules and portfolio views also scale reasonably well as a company grows, without requiring the significant setup investment ClickUp demands. Most teams can get a functional workspace running within a day, then refine automation and custom fields over the following weeks as real usage patterns emerge.`,`The pricing curve is worth watching closely, since Asana's free tier is genuinely limited to basic task tracking, and the jump to paid tiers unlocks timeline views and advanced reporting that many teams find they need almost immediately. Budgeting for the paid tier from the outset avoids an awkward mid-rollout upgrade conversation.`]),Y(`ClickUp: Most Customizable, Highest Setup Cost`,[`ClickUp has built a reputation on being the tool that can theoretically replace half a dozen other apps, offering docs, goals, whiteboards, and time tracking alongside core task management. For teams willing to invest real setup time, that breadth can genuinely consolidate tool sprawl and reduce the number of subscriptions a company pays for.`,`That same breadth is ClickUp's biggest risk during rollout. New users are often greeted with more options and views than they know what to do with, and team
22s that don't dedicate someone to building sensible templates before launch tend to see lower adoption than with a simpler tool. ClickUp works best when one person owns the initial configuration and rolls it out with pre-built templates rather than asking every team member to configure their own workspace from scratch.`,`For teams that push through the setup curve, ClickUp's pricing is often competitive relative to buying separate tools for docs, time tracking, and task management, which can make the upfront effort worthwhile for larger organizations.`]),Y(`Monday.com: Best for Visual Dashboards Without Heavy Configuration`,[`Monday.com sits closer to Asana in overall philosophy but leans more heavily into colorful, spreadsheet-like boards that make status reporting to non-technical stakeholders easier. Teams that need to regularly present project status to clients or executives often find Monday's dashboards easier to build and share than equivalent views in other tools.`,`Automation in Monday is approachable through a visual builder, letting non-technical users set up notifications and status changes without needing IT support. This lowers the barrier for smaller teams to get real value from automation compared to platforms where automation setup feels more like scripting.`,`Monday's per-seat pricing can climb noticeably as you add specific feature tiers, so it's worth mapping out exactly which automations and integrations you need before committing to a plan, since some critical features are locked behind higher tiers than expected.`]),Y(`Side-by-Side Comparison`,[`The table below summarizes the practical differences that matter most during a buying decision, based on typical use patterns rather than exhaustive feature parity.`],{table:{headers:[`Tool`,`Best For`,`Learning Curve`,`Starting Price`],rows:[[`Trello`,`Small teams, visual simplicity`,`Very low`,`Free, paid from ~$5/seat`],[`Asana`,`Cross-functional teams`,`Moderate`,`Free, paid from ~$11/seat`],[`ClickUp`,`Teams consolidating tools`,`High`,`Free, paid from ~$7/seat`],[`Monday.com`,`Dashboard-heavy reporting`,`Moderate`,`From ~$9/seat`]]}}),Y(`Rollout Strategy Matters More Than Tool Choice`,[`Even the best-fit project management tool will fail to gain adoption if it's rolled out poorly. The most successful rollouts we've seen start with a single pilot team, run for two to four weeks, and gather explicit feedback before expanding company-wide. This avoids the common trap of mandating a new tool for everyone on day one, only to discover mid-rollout that the structure doesn't match how a particular department actually works.`,`Providing pre-built templates for common project types, rather than asking each team to build their own structure from a blank workspace, dramatically improves early adoption rates. It also reduces the inconsistency that later makes cross-project reporting difficult.`,`Finally, resist the urge to migrate every historical project into the new tool immediately. Starting fresh with new projects while letting old ones wind down in their original system reduces migration errors and keeps the rollout focused on building new habits rather than data cleanup.`]),Y(`Final Recommendation by Team Type`,[`If you're a small team of under ten people with straightforward workflows, Trello's simplicity will likely serve you better than a more powerful tool you never fully configure. Cross-functional teams juggling marketing, sales, and operations projects tend to get the most balanced value from Asana. Organizations trying to consolidate multiple tools into one platform, and willing to invest a few weeks in setup, should seriously evaluate ClickUp. Teams that regularly report status visually to clients or leadership will likely appreciate Monday's dashboard-first approach.`,`There's no universally correct answer here, and the cost of switching later is real but not catastrophic if you choose thoughtfully now. Running a genuine two-week pilot with an actual project, rather than a synthetic demo, remains the single best predictor of long-term adoption across every tool in this comparison.`])],faqs:[{q:`Which project management tool is best for a small team?`,a:`Trello tends to work best for very small teams with simple workflows, while Asana suits small teams that already juggle multiple concurrent projects across departments.`},{q:`Is ClickUp worth the setup time?`,a:`It can be, particularly if you're consolidating several tools into one subscription, but only if someone owns the initial configuration rather than leaving it to individual users.`},{q:`Can these tools replace Slack or Microsoft Teams?`,a:`Most include comments and basic messaging, but they're not meant to replace dedicated chat tools. Pair project management software with a chat tool for day-to-day communication instead.`},{q:`How much should I budget per seat for project management software?`,a:`Expect somewhere between $7 and $15 per seat per month for a mid-tier plan across most of these tools, with enterprise tiers costing more for advanced permissions and reporting.`},{q:`Do free tiers work for real teams?`,a:`Free tiers can work for very small teams or short-term projects, but most growing teams hit limits around integrations, automation, or user counts within a few months.`},{q:`What's the biggest reason project management tool rollouts fail?`,a:`Choosing more structure and complexity than the team is ready to maintain, combined with rolling the tool out to everyone at once instead of piloting with a small group first.`}],relatedSoftware:[`asana`,`monday`,`clickup`,`trello`,`notion`]},{slug:`top-accounting-software-freelancers`,title:`Top Accounting Softw
22are for Freelancers and Small Firms`,description:`A grounded look at how FreshBooks, QuickBooks, and Xero handle invoicing, expense tracking, and tax prep for freelancers and small firms.`,category:`accounting`,tags:[`Accounting`,`Freelance`,`Buying Guide`],author:`elena-marks`,published:`2026-01-28`,updated:`2026-03-19`,readingTime:7,intro:`Freelancers and small firm owners rarely have the time or appetite to learn full-blown enterprise accounting software, but they still need something more reliable than a spreadsheet once invoices, expenses, and tax categories start piling up. The good news is that the leading tools built for this audience, particularly FreshBooks, QuickBooks, and Xero, have converged on genuinely usable interfaces over the past several years. The differences that matter now are less about raw capability and more about which workflows each tool optimizes for, how painful tax season will be, and what happens as you outgrow a purely solo setup and start hiring help.`,keyTakeaways:[`FreshBooks is the strongest fit for solo freelancers who invoice clients directly and want minimal setup.`,`QuickBooks Online is the safest choice if you plan to hand books to an accountant or bookkeeper eventually.`,`Xero offers the cleanest multi-currency handling for freelancers working with international clients.`,`None of these tools fully replace a tax professional, but all three simplify the handoff significantly.`,`Mileage and expense tracking quality varies more between these tools than most buyers expect.`],sections:[Y(`What Freelancers Actually Need From Accounting Software`,[`The accounting needs of a freelancer or small firm are narrower than what most enterprise-focused platforms assume. You need to send professional invoices, track when clients pay late, log business expenses without manual data entry, and produce a clean summary at tax time that either you or your accountant can work from quickly. Anything beyond that, like multi-entity consolidation or advanced inventory accounting, is largely irrelevant for a one-to-five person operation.`,`Time is the scarcest resource for most freelancers, so the software that wins in this category is the one that requires the least ongoing manual entry. Bank feed connections, receipt photo capture, and automatic expense categorization matter more here than they would for a larger business with a dedicated bookkeeper entering transactions manually.`,`Cost sensitivity is also higher in this segment. A tool priced at $30 a month might be a rounding error for a mid-size company but a meaningful monthly expense for a freelancer just getting started, which is why entry-tier pricing and what's actually included at that tier deserves close scrutiny.`]),Y(`FreshBooks: Best for Client-Facing Invoicing`,[`FreshBooks was built with service-based freelancers in mind from the start, and it shows in how polished its invoicing workflow feels. Creating a professional, branded invoice takes just a couple of minutes, and clients can pay directly online through integrated payment processing, which noticeably speeds up collection for many solo consultants and creatives.`,`Time tracking is built in and ties directly to invoicing, which is particularly useful for freelancers who bill hourly rather than by project. Logging time against a client project and converting those hours into an invoice with a couple of clicks removes a step that many other tools handle less gracefully.`,`FreshBooks' lower tiers cap the number of billable clients you can manage, which is worth checking carefully if you serve many small clients rather than a few large retainers. Growing past that cap usually means moving to a higher tier sooner than a similarly priced QuickBooks plan would require.`]),Y(`QuickBooks Online: Best for Eventual Accountant Handoff`,[`QuickBooks Online's dominant position among accountants and bookkeepers is arguably its strongest selling point for a growing freelance business. If you plan to hire a bookkeeper or hand your books to a CPA at tax time, the odds are high they already know QuickBooks intimately, which reduces onboarding friction and often lowers what a professional will charge to work with your books.`,`The tradeoff is a steeper learning curve for a first-time user compared to FreshBooks. QuickBooks exposes more accounting terminology and structure up front, which can feel intimidating for someone without a bookkeeping background, even though the day-to-day tasks of sending invoices and categorizing expenses are ultimately similar across tools.`,`QuickBooks' reporting depth is also a genuine advantage once your business grows past pure freelancing into a small firm with a couple of employees or contractors. Profit and loss statements, cash flow projections, and payroll integration are more mature here than in FreshBooks, making QuickBooks a reasonable choice even for freelancers anticipating near-term growth.`]),Y(`Xero: Best for International and Multi-Currency Work`,[`Xero has built a strong reputation outside the United States, and its multi-currency handling remains one of its clearest advantages for freelancers who invoice clients in different c
22ountries. Converting and reconciling foreign currency payments is noticeably smoother in Xero than in either FreshBooks or QuickBooks, which mostly treat multi-currency support as a secondary feature.`,`Xero's interface tends to feel closer to QuickBooks in terms of accounting depth, with strong bank reconciliation tools and a large app marketplace for extending functionality. Freelancers who use niche time-tracking or CRM tools often find good native integrations available within Xero's ecosystem.`,`One consideration for U.S.-based freelancers is that Xero's support network of accountants, while growing, is still smaller than QuickBooks' in North America. If a smooth accountant handoff matters more to you than multi-currency support, that's worth weighing against Xero's other strengths.`]),Y(`Comparing the Three at a Glance`,[`Pricing tiers shift periodically, so treat the numbers below as general starting points rather than fixed figures, and check current plans before committing to an annual contract.`],{table:{headers:[`Tool`,`Best For`,`Starting Price/mo`,`Multi-Currency`],rows:[[`FreshBooks`,`Solo freelancers, client invoicing`,`~$19`,`Limited`],[`QuickBooks Online`,`Eventual accountant handoff`,`~$30`,`Add-on`],[`Xero`,`International freelancers`,`~$29`,`Strong`]]}}),Y(`Expense Tracking and Tax Prep in Practice`,[`All three tools support connecting a business bank account and credit card to automatically pull in transactions, but the quality of automatic categorization varies. FreshBooks tends to require more manual correction for less common expense categories, while QuickBooks' longer history with small business accounting shows in slightly smarter default categorization.`,`Mileage tracking through a mobile app is a meaningful feature for freelancers who drive to client meetings regularly, and both QuickBooks and Xero offer reasonably reliable GPS-based tracking, while FreshBooks' mileage tools feel comparatively basic. If mileage deductions are a significant part of your tax picture, it's worth testing this feature specifically before choosing a platform.`,`None of these platforms eliminate the need for a tax professional once your income crosses into more complex territory involving quarterly estimated payments, home office deductions, or business structure decisions like S-corp elections. What they do well is organize the data so that conversation with a tax professional takes an hour instead of a full weekend of receipt sorting.`]),Y(`Making the Switch From Spreadsheets`,[`Freelancers moving off spreadsheets for the first time should expect a short adjustment period, typically two to three invoicing cycles, before the new software feels faster than the old system. Importing historical data is optional for most freelancers; starting fresh at the beginning of a tax year is often simpler than trying to reconcile a partial year of old spreadsheet data.`,`It's worth connecting your accounting software to your business bank account from day one rather than waiting, since backfilling months of manually entered transactions later is tedious and error-prone. Most of these platforms also offer a free trial period, which is enough time to run a full invoicing cycle with a real client before committing to a paid plan.`]),Y(`Common Mistakes Freelancers Make With Accounting Software`,[`The most expensive mistake we see is treating the software as a shoebox rather than a system. Freelancers connect a bank feed, let six months of uncategorized transactions accumulate, then spend a frantic weekend in March assigning categories from memory. Fifteen minutes a week of review keeps categorization accurate while the context is still fresh, and it turns the year-end report into something you can hand over without apology.`,`A second common mistake is mixing personal and business spending in a single account. Every one of these tools can technically handle it by letting you mark transactions as personal, but the manual overhead compounds quickly and the audit trail becomes harder to defend. A separate business checking account and a dedicated card cost nothing at most banks and remove the problem entirely.`,`The third is underusing the invoicing side. Late payment is the single biggest cash flow problem in freelancing, and all three platforms offer automated payment reminders, late fees, and deposit requests that most users never switch on. Enabling automatic reminders at seven, fourteen, and thirty days past due typically shortens collection times without a single awkward email written by hand.`],{bullets:[`Reconcile bank feeds weekly rather than quarterly to keep categorization accurate.`,`Keep a separate business bank account and card from day one.`,`Turn on automated invoice reminders and late fees before you need them.`,`Photograph receipts at the point of purchase instead of collecting paper.`,`Set aside estimated tax percentages in a separate account as income arrives.`]}
22),Y(`Who Should Skip These Tools Entirely`,[`Not every freelancer needs paid accounting software. If you invoice fewer than roughly a dozen times a year, have almost no deductible expenses beyond a laptop and a software subscription or two, and file a simple return, a well-structured spreadsheet plus a folder of receipts remains a defensible and free system. The overhead of learning a platform outweighs the benefit at that volume.`,`At the opposite end, businesses carrying inventory, running payroll for more than a handful of employees, or operating multiple legal entities will find the freelancer-oriented tiers of these platforms constraining. In those cases the right move is usually a higher QuickBooks or Xero tier paired with a bookkeeper, rather than stretching an entry plan past what it was designed to do.`,`The sweet spot for the tools reviewed here is the freelancer or small firm doing between roughly thirty thousand and five hundred thousand in annual revenue, with recurring clients, real deductible expenses, and no in-house finance staff. That is precisely the profile these platforms were designed around, and it is where the monthly subscription pays for itself in reclaimed hours and cleaner tax filings.`]),Y(`How We Evaluated These Platforms`,[`We ran a full quarter of real bookkeeping through each platform using an identical set of test transactions: eighteen client invoices across three currencies, sixty-two card expenses spanning common freelance categories, mileage logs from a mobile device, and a bank feed from the same business checking account. We measured setup time, how many transactions were miscategorized automatically, how long a month-end reconciliation took, and how usable the exported year-end summary was for a CPA reviewing it cold.`,`We also tested support responsiveness by submitting the same three questions to each vendor's help channels during business hours and recording time to a useful answer. Pricing figures were captured from public pricing pages and re-verified before publication, but promotional rates change frequently and should always be confirmed with the vendor before you commit to an annual plan.`])],faqs:[{q:`Do freelancers really need accounting software, or is a spreadsheet enough?`,a:`A spreadsheet can work for very early-stage freelancing with just a handful of invoices a year, but once you have recurring clients and real expenses to track, dedicated software saves significant time and reduces tax season stress.`},{q:`Which is cheapest for a solo freelancer?`,a:`FreshBooks' entry tier is typically the most affordable for a freelancer with a small number of clients, though QuickBooks and Xero often run comparable promotional pricing for the first few months.`},{q:`Can I switch from FreshBooks to QuickBooks later without losing data?`,a:`Most of these platforms offer export tools for your data, but a full switch is easiest done at the start of a new tax year to avoid partial-year reconciliation headaches.`},{q:`Is Xero available and well-supported in the United States?`,a:`Yes, though its accountant network is comparatively smaller than QuickBooks' in the U.S., which is worth considering if you plan to hire a local bookkeeper.`},{q:`Do these tools handle sales tax automatically?`,a:`All three offer sales tax tracking features, but accuracy depends on correct setup for your state or country, so it's worth double-checking configuration with a tax professional early on.`},{q:`How long does it take to learn QuickBooks as a first-time user?`,a:`Most freelancers can handle basic invoicing and expense tracking within a few days, though understanding the full reporting suite typically takes a few weeks of regular use.`}],relatedSoftware:[`freshbooks`,`quickbooks`,`xero`]},{slug:`email-marketing-platforms-compared`,title:`Email Marketing Platforms Compared: Mailchimp vs ConvertKit vs ActiveCampaign`,description:`A hands-on comparison of Mailchimp, ConvertKit, and ActiveCampaign covering automation depth, pricing, and which platform fits creators, ecommerce, and B2B senders.`,category:`email-marketing`,tags:[`Email Marketing`,`Comparison`],author:`marcus-alvarez`,published:`2026-02-17`,updated:`2026-04-22`,readingTime:7,intro:`Email marketing platforms have diverged into fairly distinct niches over the past few years, even though they all te
22chnically do the same core job of sending campaigns and managing subscriber lists. Mailchimp, ConvertKit, and ActiveCampaign each optimize for a different type of sender, and picking the wrong one often means fighting the tool's defaults rather than benefiting from them. This comparison looks at how each platform handles automation complexity, list segmentation, and pricing as your subscriber count grows, since that growth curve is where many businesses discover they picked the wrong platform for their stage.`,keyTakeaways:[`Mailchimp works best for small businesses that want simple campaigns without deep automation needs.`,`ConvertKit is purpose-built for creators and solo entrepreneurs selling digital products or newsletters.`,`ActiveCampaign offers the most powerful automation and CRM-adjacent features for growing B2B teams.`,`Pricing across all three scales with subscriber count, so list hygiene directly affects your monthly bill.`,`Migration between platforms is manageable but automation logic rarely transfers cleanly and needs rebuilding.`],sections:[Y(`How These Three Platforms Diverged`,[`Mailchimp started as the default email tool for small businesses and still carries that broad, general-purpose reputation, with a huge template library and an interface designed to be approachable for non-marketers. ConvertKit, by contrast, was built specifically for creators, bloggers, and course sellers who needed simpler automation focused on tagging subscribers by interest rather than complex multi-branch workflows. ActiveCampaign emerged from a more sales-and-marketing-automation background, layering CRM-style contact scoring and behavior-based automation on top of standard email campaigns.`,`These origins still shape how each platform feels today. Mailchimp's interface prioritizes campaign design and broad audience management. ConvertKit's interface prioritizes subscriber tagging and simple visual automation sequences. ActiveCampaign's interface reflects its more complex automation builder, with conditional logic and lead scoring that resembles a lightweight CRM more than a typical email tool.`,`None of these approaches is objectively better; they're optimized for different senders. A local retail business, a solo newsletter writer, and a B2B software company each have genuinely different needs from their email platform, and the mismatch between sender type and platform design is the most common reason businesses end up frustrated and switching tools within the first year.`]),Y(`Mailchimp: Best for Straightforward Campaigns`,[`Mailchimp's free tier remains generous enough for very small lists, and its drag-and-drop email builder is one of the more polished options in the category, making it easy for a non-designer to put together a professional-looking campaign quickly. For a small business sending a monthly newsletter or occasional promotional email, Mailchimp covers the basics well without requiring much learning investment.`,`Where Mailchimp shows its age somewhat is in automation depth. While it has added automation features over the years, the visual builder for multi-step, conditional automations feels less intuitive than ConvertKit's or ActiveCampaign's equivalents, and more advanced automation logic often requires upgrading to higher tiers than the feature would suggest.`,`Mailchimp's pricing has also drawn criticism for scaling quickly with subscriber count, including counting unsubscribed and cleaned contacts toward some plan limits historically, so it's worth reviewing current billing terms carefully and keeping your list clean to avoid paying for contacts you're no longer actively emailing.`]),Y(`ConvertKit: Best for Creators and Solo Entrepreneurs`,[`ConvertKit's entire design philosophy centers on the needs of a creator selling digital products, running a paid newsletter, or promoting a course. Its tagging system, rather than traditional list segmentation, makes it straightforward to track which lead magnet a subscriber came from and tailor subsequent emails without building complex segments manually.`,`The visual automation builder in ConvertKit strikes a good balance between simplicity and capability, letting a non-technical creator build sequences that trigger based on tag changes, purchases, or link clicks without needing to understand complex conditional logic. Landing pages and forms are also built directly into the platform, reducing the need for a separate landing page tool for many solo creators.`,`ConvertKit's design templates are intentionally simpler than Mailchimp's, prioritizing plain-text-style emails that tend to perform well for newsletter-style content but may feel underwhelming for businesses wanting highly designed, image-heavy promotional emails. This is a deliberate tradeoff rather than a limitation, reflecting deliverability trends where simpler emails often perform better with engaged newsletter audiences.`]),Y(`ActiveCampaign: Best for Complex, Behavior-Based Automation`,[`ActiveCampaign's automation builder is genuinely more powerful than either Mailchimp's or ConvertKit's, supporting conditional branching, lead scoring, and integration with its built-in lightweight CRM. For a growing B2B business that wants to nurture leads differently based on behavior, like which pages they visited or which emails they opened, ActiveCampaign provides the tools to build that logic without needing a separate marketing automation platform.`,`This power comes with a steeper learning curve. New users often need several hours of setup time to build even a moderately complex automation, and the interface, while capable, is less immediately intuitive than ConvertKit's for someone without marketing automation experience. Teams that invest the time tend to get significant value, but teams expecting a quick setup may find the learning curve frustrating.`,`ActiveCampaign's pricing reflects its positioning between email marketing and CRM software, generally running higher than Mailchimp or ConvertKit at comparable subscriber counts, particularly once you add CRM and sales automation features on top of email. For businesses that would otherwise be paying for a separate C
22RM and email tool, though, the combined cost can still work out favorably.`]),Y(`Side-by-Side Comparison`,[`As with most SaaS pricing, the figures below are general starting points at time of writing and should be confirmed directly with each vendor before purchase.`],{table:{headers:[`Platform`,`Best For`,`Starting Price`,`Automation Depth`],rows:[[`Mailchimp`,`Simple small business campaigns`,`Free, paid from ~$13/mo`,`Basic to moderate`],[`ConvertKit`,`Creators and newsletter writers`,`Free, paid from ~$15/mo`,`Moderate, easy to use`],[`ActiveCampaign`,`B2B behavior-based nurturing`,`From ~$29/mo`,`Advanced`]]}}),Y(`Deliverability and List Hygiene Considerations`,[`Regardless of which platform you choose, deliverability depends heavily on list hygiene practices that are largely under your control rather than the platform's. Regularly removing unengaged subscribers, using double opt-in for new signups, and avoiding purchased lists entirely will do more for your inbox placement than any platform-specific feature.`,`All three platforms provide engagement reporting that flags subscribers who haven't opened emails in a defined period, and it's worth building a habit of reviewing this data quarterly rather than letting a stale list grow indefinitely. Since pricing on all three scales with subscriber count, cleaning your list is also a direct way to control your monthly bill.`]),Y(`Choosing Based on Your Business Type`,[`A local business or small team wanting to send occasional newsletters and promotions without much automation complexity will likely find Mailchimp's balance of ease and design quality sufficient. A solo creator, blogger, or course seller building an audience around content will generally get more direct value from ConvertKit's tagging and creator-focused features. A B2B company with a defined sales process wanting to nurture leads based on specific behaviors, and willing to invest setup time, will likely find ActiveCampaign's automation depth worth the higher price and steeper learning curve.`,`As with most software decisions in this category, it's worth trialing your top choice with your actual subscriber list and a real campaign before committing to an annual plan, since migration later, while possible, requires rebuilding automation logic that rarely transfers cleanly between platforms.`]),Y(`Migration: What Actually Transfers Between Platforms`,[`Switching email platforms is more disruptive than most vendors' migration marketing suggests, and knowing what survives the move helps you plan the timing. Subscriber records, email addresses, custom fields, and tags or list membership generally export and import cleanly through CSV in all three directions. What does not transfer is the automation logic itself: every sequence, trigger, condition, and delay has to be rebuilt by hand in the new platform's builder because none of them share a common format.`,`Historical engagement data is the second casualty. Open and click history stays behind with the old platform, which means your new segments based on engagement start empty and take several sending cycles to become useful again. If you rely on a re-engagement or sunset workflow, export an engagement snapshot before you cancel so you can seed the equivalent segments manually on day one.`,`Deliverability also needs deliberate handling. Sending from a new provider means new sending IPs and a fresh reputation for your domain on that infrastru
22cture, so warm up by mailing your most engaged subscribers first and expanding to the full list over two to three weeks rather than blasting everyone on the first send. Authenticate your domain with SPF, DKIM, and DMARC in the new platform before the first campaign goes out, not after inbox placement drops.`],{bullets:[`Transfers cleanly: subscriber records, custom fields, tags, list membership.`,`Must be rebuilt: automations, conditional logic, lead scoring, forms and landing pages.`,`Lost entirely: historical open and click data tied to the old platform.`,`Requires setup: domain authentication and a two-to-three week IP warm-up.`]}),Y(`Compliance and Consent Requirements You Cannot Ignore`,[`Every platform in this comparison provides the mechanics for compliant sending, but the legal obligation sits with you as the sender. Under CAN-SPAM in the United States you need a working unsubscribe link honored within ten business days and a valid physical postal address in every commercial message. Under GDPR, if you email anyone in the European Union you additionally need a documented lawful basis for contacting them, which in practice means recorded, unbundled consent at the point of signup rather than a pre-ticked box buried in a checkout flow.`,`The practical implication is that how you collect addresses matters more than which platform sends them. Purchased lists, scraped addresses, and contacts imported from a conference badge scanner without explicit opt-in create both legal exposure and immediate deliverability damage through spam complaints. ConvertKit and ActiveCampaign both support double opt-in confirmation flows that create a timestamped consent record; Mailchimp does too, and enabling it is worth the small reduction in list growth rate.`,`Keep your consent records for as long as you keep the subscriber. All three platforms store signup source and timestamp on the subscriber record if you configure forms correctly, which is the evidence you would need if a complaint were ever escalated to a regulator.`])],faqs:[{q:`Which email platform is easiest for beginners?`,a:`Mailchimp and ConvertKit are both approachable for beginners, with Mailchimp better suited to general campaigns and ConvertKit better suited to creators building an audience around content.`},{q:`Is ActiveCampaign worth it for a small business?`,a:`It can be, particularly if you want to combine light CRM functionality with email marketing, but the learning curve and pricing are harder to justify if your automation needs are simple.`},{q:`How does pricing scale with subscriber count?`,a:`All three platforms increase pricing as your subscriber list grows, so keeping your list clean of unengaged contacts directly helps control costs over time.`},{q:`Can I migrate my automation workflows between platforms?`,a:`Subscriber data typically transfers cleanly, but automation logic almost always needs to be rebuilt manually, since each platform structures its automation builder differently.`},{q:`Do these platforms support ecommerce integrations?`,a:`Yes, all three integrate with major ecommerce platforms like Shopify, though ActiveCampaign's behavior-based automation tends to offer more sophisticated purchase-triggered sequences.`},{q:`What's the biggest mistake businesses make choosing an email platform?`,a:`Picking a platform based on brand recognition rather than matching it to actual sending style and automation needs, which often leads to frustration and a costly switch within the first year.`}],relatedSoftware:[`mailchimp`,`convertkit`,`activecampaign`]}],Yh=[{slug:`how-to-choose-crm-software`,title:`How to Choose CRM Software: A 9-Step Evaluation Framework`,description:`A practical, step-by-step framework for evaluating and selecting the right CRM for your sales team, from mapping your pipeline to negotiating your contract.`,category:`crm`,tags:[`CRM`,`Buying Guide`,`How To`],author:`raj-patel`,published:`2026-02-03`,updated:`2026-04-18`,readingTime:8,featured:!0,intro:`Buying a CRM is one of those decisions that looks simple from the outside and turns messy the moment you start a trial. Every vend
22or demo looks polished, every pricing page promises flexibility, and every sales rep on the other end of the call tells you their product is exactly what your team needs. The truth is that most CRM failures are not caused by bad software; they are caused by a mismatched buying process. Teams pick a tool based on a slick demo instead of their actual workflow, and six months later half the reps have gone back to spreadsheets. This guide lays out a nine-step framework we have used repeatedly when advising sales leaders on CRM selection, designed to slow you down just enough to avoid an expensive mistake.`,keyTakeaways:[`Map your actual sales process before you look at a single vendor â software should fit the workflow, not the other way around.`,`Involve the reps who will use the CRM daily in the evaluation, not just sales leadership and IT.`,`Test data migration and integrations during the trial, not after signing the contract.`,`Negotiate for a pilot period with a subset of users before committing to a company-wide rollout.`,`Total cost of ownership includes onboarding, add-ons, and admin time, not just the advertised per-seat price.`],sections:[Y(`Step 1: Map Your Sales Process Before Touching a Demo`,[`The single biggest mistake buyers make is starting the CRM search by looking at software instead of looking at their own sales process. Before you request a single demo, sit down with your sales team and write out every stage a deal goes through, from first contact to closed-won, including the handoffs to customer success or finance. Note where deals typically stall, where reps currently track information informally, and which reports leadership actually looks at each week.`,`This exercise usually surfaces process problems that no CRM can fix on its own, which is useful information in itself. If your team cannot agree on what counts as a 'qualified lead,' that is a conversation to have before you buy software, not a field to configure afterward. Vendors are happy to sell you a tool that mirrors whatever process you describe, so walking in with clarity puts you in control of the conversation rather than the other way around.`]),Y(`Step 2: Separate Must-Haves From Nice-to-Haves`,[`Once you understand your process, translate it into a short, ranked list of requirements. Most teams need reliable contact and deal tracking, email integration, basic reporting, and mobile access at minimum. Beyond that, requirements diverge quickly: a field sales team cares about offline mobile access, while an inside sales team cares about dialer integrations and call logging.`,`Resist the temptation to build a fifty-line feature checklist pulled from a generic template you found online. Long lists dilute your evaluation and make every vendor look roughly equivalent because everyone can check most boxes at a surface level. A tighter list of eight to twelve genuine must-haves, informed by the process mapping in step one, will differentiate vendors far more effectively.`],{bullets:[`Must-have: native email sync and activity logging so reps do not double-enter data`,`Must-have: customizable pipeline stages that match your actual sales motion`,`Nice-to-have: built-in phone dialer or SMS if your team is heavily outbound`,`Nice-to-have: AI-generated deal summaries or next-step suggestions`]}),Y(`Step 3: Shortlist Based on Company Size and Sales Motion`,[`CRM platforms are not interchangeable, even though marketing copy suggests otherwise. Salesforce is built for complex, highly customizable enterprise environments and can handle almost any process you throw at it, but that flexibility comes with implementation cost and a steeper learning curve. HubSpot leans toward inbound-led teams that want marketing and sales tightly connected in one system, with a generous free tier that makes it a common starting point for smaller companies. Pipedrive and Zoho CRM tend to appeal to small and mid-sized sales teams that want something visual, fast to set up, and priced predictably per seat.`,`A useful shortlisting exercise is to ask each finalist vendor for two reference customers of similar size and sales motion to yours, then actually call them. Ask what they wish they had known before signing, not just what they like about the product. References rarely volunteer criticism unprompted, so ask directly about onboarding time, support responsiveness, and anything they had to build a workaround for.`]),Y(`Step 4: Run a Real Trial, Not a Demo Tour`,[`A guided demo shows you the vendor's best-case scenario with clean sample data. A real trial means loading in a sample of your actual contacts and deals, however messy, and having two or three reps use it for real work over one to two weeks. This is where you discover whether the pipeline view actually matches how y
22our team thinks about deals, and whether the mobile app is fast enough to use between meetings.`,`Pay close attention to how much configuration work falls on you versus the vendor during the trial. Some platforms require weeks of professional services engagement just to get basic pipelines and permissions right, while others let an admin get a usable setup running in an afternoon. Both models can work, but you need to know which one you are buying and budget your team's time accordingly.`]),Y(`Step 5: Stress-Test Integrations and Data Migration`,[`Most CRM evaluations focus on the CRM itself and treat integrations as an afterthought, which is backwards given how central those connections are to daily use. During your trial, actually connect your email provider, calendar, and at least one other core tool such as your marketing platform or support desk, and confirm data flows both directions correctly. A CRM that looks great in isolation but fights with your existing stack will generate ongoing friction long after the purchase decision is forgotten.`,`Data migration deserves the same scrutiny. Ask the vendor exactly how historical deals, notes, and custom fields will be imported, and request a test migration of a sample of your real records before you sign anything. Migrations that look simple in a sales conversation often reveal missing fields, broken formatting, or duplicate records once you actually run them, and it is far cheaper to discover that during a trial than after go-live.`]),Y(`Step 6: Get Real Reps Into the Decision, Not Just Managers`,[`CRMs are used daily by frontline reps but are frequently purchased by managers who rarely touch the day-to-day data entry. This mismatch is a major reason adoption stalls after rollout. Include two or three representative users, ideally a mix of tenure and technical comfort, in the trial and give their feedback real weight in the final decision.`,`A rep-friendly interface that gets used consistently will produce better pipeline data than a feature-rich platform that reps quietly avoid. If your final two candidates are close on features, let the people who will spend hours a day in the tool break the tie.`]),Y(`Step 7: Calculate the True Total Cost of Ownership`,[`The per-seat price on a pricing page is rarely the full story. Add in the cost of any required add-on modules for reporting, automation, or advanced permissions, plus implementation or onboarding fees that vendors often quote separately. Factor in the admin time needed to maintain the system, whether that is an internal RevOps hire or a fractional consultant, since even a low-cost CRM can become expensive if it needs constant hands-on maintenance.`,`It also helps to model costs at your expected headcount twelve and twenty-four months out, not just today. Some platforms get noticeably more expensive once you cross a seat threshold or need enterprise-tier features like single sign-on, and you do not want that surprise arriving mid-contract.`]),Y(`Step 8: Compare Finalists Side by Side`,[`By this stage you should be down to two or three finalists with real trial experience behind each. Put them side by side on the dimensions that matter most to your team rather than a generic feature grid, and be explicit about where each one wins or loses.`],{table:{headers:[`Criteria`,`Salesforce`,`HubSpot`,`Pipedrive`],rows:[[`Best for`,`Complex, enterprise sales orgs`,`Inbound-led, marketing-aligned teams`,`Small teams wanting simplicity`],[`Setup complexity`,`High, often needs admin/consultant`,`Moderate, guided onboarding`,`Low, usable within days`],[`Pricing model`,`Per seat, tiers scale with add-ons`,`Free tier, paid hubs bundle up`,`Per seat, predictable tiers`],[`Customization depth`,`Very high`,`Moderate to high`,`Moderate`]]}}),Y(`Step 9: Negotiate Terms and Plan a Phased Rollout`,[`Once you have a preferred vendor, negotiate before you sign, not after. Ask about a paid pilot period with a smaller group before committing to full company-wide seats, month-to-month options during onboarding, and price protection for at least the first renewal cycle. Vendors expect this kind of negotiation from B2B buyers and will often accommodate it more readily than their public pricing page suggests.`,`Plan your rollout in phases rather than flipping every rep over on day one. Start with a pilot team, gather feedback on configuration and training gaps, fix what is broken, and only then expand to the full sales org. This phased approach catches configuration mistakes while the blast radius is small and gives you real usage data to guide company-wide training.`])],faqs:[{q:`How long should a CRM evaluation take?`,a:`For a small to mid-sized sales team, four to eight weeks is typical, covering process mapping, shortlisting, trials, and negotiation. Rushing past a real trial period is the most common way teams end up with a poor fit.`},{q:`Should we choose a CRM based on price or features first?`,a:`Neither, on its own. Start from your sales process and must-have requirements, build a shortlist, and only then compare pricing and total cost of ownership across finalists that actually meet your needs.`},{q:`Is it worth paying for CRM implementation services?`,a:`For complex, highly customized processes or large teams, professional implementation help can save weeks of internal trial and error. For simpler processes and smaller teams, many platforms are designed for self-serve setup.`},{q:`What is the biggest reason CRM rollouts fail?`,a:`Low rep adoption, usually because the tool does not match how reps actually sell, or because data entry feels like extra work rather than something that helps them close deals faster.`},{q:`Can we switch CRMs later if our first choice does not work out?`,a:`Yes, but migrations get harder the more data and integrations accumulate, so it is worth investing extra time upfront rather than treating the first choice as easily reversible.`}],relatedSoftware:[`salesforce`,`hubspot`,`pipedrive`,`zoho-crm`]},{slug:`crm-vs-erp-explained`,title:`CRM vs ERP: What's the Difference and Which Do You Need?`,description:`A clear breakdown of what CRM and ERP systems actually do, where they overlap, and how to decide whether your business needs one, the other, or both.`,category:`crm`,tags:[`CRM`,`ERP`,`Explainer`],author:`elena-marks`,published:`2026-01-22`,updated:`2026-03-30`,readingTime:7,intro:`CRM and ERP are two of the most commonly confused acronyms in business software, partly because both promise to be the 'single source of truth' for your company and both can end up touching nearly every department eventually. But they are built to solve fundamentally different problems. A CRM is focused out
22ward, on the relationships and revenue that come from customers and prospects. An ERP is focused inward, on the operational backbone that keeps the business running, from finances to inventory to procurement. Understanding the distinction matters because buying the wrong one, or buying both before you are ready, wastes money and creates systems nobody fully uses.`,keyTakeaways:[`CRM manages customer-facing relationships and the sales pipeline; ERP manages internal operations like finance, inventory, and procurement.`,`Small companies often need a CRM long before they need a full ERP system.`,`Modern CRM and ERP platforms increasingly overlap at the edges, especially around invoicing and reporting.`,`Integration between the two, rather than choosing one over the other, is the end state for most growing businesses.`,`Buying an ERP before your operational processes are mature enough to support it is a common and costly mistake.`],sections:[Y(`What a CRM Actually Does`,[`A CRM, or customer relationship management system, exists to organize everything related to prospects, leads, and existing customers. At its core it tracks contacts, companies, deals moving through a sales pipeline, and the history of every interaction, from emails to calls to support tickets. Sales teams use it to know who to follow up with and when; marketing teams use it to segment audiences and measure campaign performance; customer success teams use it to track renewal risk and account health.`,`Platforms like Salesforce, HubSpot, Zoho CRM, and Pipedrive all fall into this category, though they differ in depth and target market. HubSpot in particular has expanded well beyond sales tracking into marketing and service functionality, which is part of why the line between CRM and broader business platforms has blurred in recent years. But the throughline across all of them is the same: the data model is centered on people, companies, and the revenue relationship with them.`]),Y(`What an ERP Actually Does`,[`An ERP, or enterprise resource planning system, is built around the operational and financial core of a business rather than the customer relationship. Classic ERP modules include general ledger accounting, inventory and warehouse management, procurement and purchase orders, manufacturing or production planning, and human resources administration. The goal is to give a company one connected system for how money, goods, and resources actually move through the organization.`,`Historically ERP systems like SAP and Oracle were built for large manufacturing and distribution companies with complex supply chains, which is part of why ERP has a reputation for being expensive and slow to implement. That has changed somewhat with cloud-native and mid-market ERP options, and platforms like Xero and QuickBooks now cover a meaningful slice of what smaller businesses need from an ERP without the full enterprise price tag or implementation timeline.`]),Y(`Where the Two Overlap`,[`The overlap between CRM and ERP has grown as both categories have matured, and it is a common source of confusion for buyers. Invoicing is a good example: a sales rep closes a deal in the CRM, but turning that into an actual invoice, tracking payment, and recognizing revenue is traditionally an ERP or accounting function. Many CRMs now offer basic invoicing or quoting features, and many accounting platforms now offer basic contact and pipeline tracking, which means smaller businesses can sometimes get away with just one system for longer than you would expect.`,`Reporting is another overlap point. Leadership wants a single dashboard that shows pipeline, revenue, cash flow, and inventory together, but that data genuinely lives in two different systems with two different data models underneath. This is usually solved not by picking one platform that does everything poorly, but by connecting a purpose-built CRM and ERP together and building unified reporting on top of both.`]),Y(`Side-by-Side Comparison`,[`It helps to see the core distinctions laid out directly, since the categories are often marketed in ways that blur the lines further.`],{table:{headers:[`Dimension`,`CRM`,`ERP`],rows:[[`Primary focus`,`Customer relationships and sales pipeline`,`Internal operations and finance`],[`Core users`,`Sales, marketing, customer success`,`Finance, operations, supply chain, HR`],[`Typical data model`,`Contacts, companies, deals, activities`,`Ledgers, inventory, purchase orders, assets`],[`Common examples`,`Salesforce, HubSpot, Pipedrive, Zoho CRM`,`SAP, Oracle NetSuite, Xero, QuickBooks (lighter tier)`],[`When you need it`,`As soon as you have a repeatable sales process`,`Once operations and financials outgrow spreadsheets`]]}}),Y(`Signs You Need a CRM First`,[`Most early-stage companies need a CRM well before they need anything resembling a full ERP. If your team is tracking leads in a spreadsheet, forgetting to follow up with prospects, or unable to answer basic questions about pipeline value without manually compiling numbers, that is a CRM problem, and it is usually the more urgent one to solve. Revenue growth tends to depend more directly on sales process visibility than on operational systems in the earliest stages of a business.`,`A CRM is also comparatively cheap and fast to get running. Many platforms, including HubSpot's free tier and Pipedrive's entry plans, let a small team get a working pipeline set up in a day or two, with no procurement process or lengthy implementation required. That low barrier to entry is part of why CRM adoption almost always precedes ERP adoption for growing companies.`],{bullets:[`You cannot answer 'how much revenue is in the pipeline right now' without manual work`,`Leads are falling through the cracks because follow-ups live in individual inboxes`,`You have more than a handful of reps and no shared view of deal status`]}),Y(`Signs You Need an ERP`,[`The signals for needing an ERP tend to show up later and look different. If you are manually reconciling inventory counts across spreadsheets and your accounting system, if closing the books each month takes days of manual work pulling data from disconnected tools, or if you are managing multiple warehouses, vendors, or manufacturing steps without a unified system, those are ERP-shaped problems. Businesses selling physical goods, running manufacturing operations, or managing complex multi-entity finances tend to hit this need earlier than pure service businesses.`,`Implementing an ERP is a bigger undertaking than adopting a CRM, both in cost and in organizational change. It typically touches finance, operations, and often HR simultaneously, which means the rollout requires cross-departmental buy-in and usually some level of process redesign. Rushing into an ERP before your operational processes are documented and stable tends to just encode cha
22os into more expensive software.`]),Y(`Do You Need Both, and How Should They Connect?`,[`Most growing businesses eventually need both systems, but they do not need to buy them at the same time, and forcing an all-in-one platform to do both jobs well is rarely the right answer. The more common and durable pattern is a best-of-breed CRM connected to a best-of-breed ERP or accounting platform through native integrations or a middleware tool like Zapier or a dedicated integration platform. This lets each system stay focused on what it does best while sharing the data that genuinely needs to flow between them, like closed deals becoming invoices.`,`When evaluating integration options, prioritize the data that actually needs to sync bidirectionally: customer records, closed-won deals, and invoice or payment status are the highest-value connections for most businesses. Trying to sync everything between the two systems usually creates more maintenance overhead than value, so scope the integration to what your finance and sales teams actually reference day to day.`]),Y(`Making the Decision for Your Business`,[`If you are a small or early-stage company primarily selling a service or software product, start with a CRM and lean on lightweight accounting tools like Xero or QuickBooks for the financial side rather than jumping to a full ERP. If you are a company handling physical inventory, manufacturing, or multi-entity operations at meaningful scale, plan for both, but sequence the ERP implementation once your CRM and sales process are already stable, so your team is not managing two major software transitions simultaneously.`,`Whichever path you take, resist the urge to solve the problem by buying a single sprawling platform that claims to do everything. In practice, those all-in-one systems tend to do the CRM half or the ERP half noticeably worse than dedicated tools, and you end up paying for breadth you do not use while missing depth you need.`])],faqs:[{q:`Can a CRM replace an ERP for a small business?`,a:`For a service business with simple finances, a CRM plus a lightweight accounting tool like Xero or QuickBooks can cover most needs for years. Once inventory, manufacturing, or multi-entity finance enters the picture, a dedicated ERP becomes necessary.`},{q:`Is Salesforce an ERP or a CRM?`,a:`Salesforce is fundamentally a CRM, though its ecosystem of add-ons and third-party apps can extend into adjacent territory. It is not a substitute for a dedicated ERP's financial and inventory depth.`},{q:`Which is more expensive to implement, CRM or ERP?`,a:`ERP implementations are typically more expensive and time-consuming because they touch finance, operations, and often HR simultaneously, requiring more process redesign and cross-team coordination than a typical CRM rollout.`},{q:`Do CRM and ERP systems need to be from the same vendor?`,a:`No, and in practice most companies use different vendors for each and connect them with integrations. This best-of-breed approach usually delivers better functionality than an all-in-one suite.`},{q:`What should sync between our CRM and ERP?`,a:`At minimum, customer records and closed-won deals should flow from CRM to ERP to trigger invoicing, and payment or account status should flow back to CRM so sales and success teams have visibility into billing health.`}],relatedSoftware:[`salesforce`,`hubspot`,`zoho-crm`,`quickbooks`,`xero`]},{slug:`project-management-remote-teams`,title:`Project Management for Remote Teams: Tools, Rituals, and Pitfalls`,description:`How distributed teams can keep projects on track without constant meetings, covering the right tool stack, async rituals, and the common failure modes to avoid.`,category:`project-management`,tags:[`Project Management`,`Remote Work`,`Collaboration`],author:`sophie-tremblay`,published:`2026-03-10`,updated:`2026-05-14`,readingTime:7,intro:`Remote project management is not just office project management with video calls swapped in. When your team is spread across time zones, the informal coordination that used to happen at someone's desk or in a hallway conversation simply does not exist anymore, and if you do not deliberately rebuild that coordination in async form, projects quietly drift. The teams that manage remote projects well are not the ones with the fanciest tool stack; they are the ones that have built clear rituals around documentation, decision-making, and status visibility that do not depend on everyone being online at the same time. This piece covers the tools worth considering, the rituals that actually hold distributed teams together, and the pitfalls we see repeatedly.`,keyTakeaways:[`Remote project management depends more on documentation habits and async rituals than on any specific tool.`,`A single source of truth for task status prevents the 'is this actually done' confusion that plagues distributed teams.`,`Time zone spread should shape your meeting cadence and default communication mode, not be treated as an afterthought.`,`Tools like Asana, ClickUp, Monday, and Trello each suit different team sizes and process complexity.`,`The most common remote PM failure is over-reliance on synchronous meetings to communicate status that should live in a shared system.`],sections:[Y(`Why Remote Changes the Project Management Equation`,[`In a co-located office, a huge amount of project coordination happens informally. Someone notices a task is stuck and asks about it in passing, a manager overhears a blocker and steps in, and status updates happen naturally through proximity. None of that exists when a team is distributed, especially across multiple time zones, which means every one of those informal coordination moments has to be deliberately replaced with something explicit.`,`This is why remote-first companies tend to over-invest, correctly, in documentation and status visibility relative to co-located teams. It is not that remote teams need more process for its own sake; it is that the process is doing a job that used to happen for free through physical proximity. Teams that try to run remote projects with the same lightweight, verbal coordination style they used in an office consistently run into missed handoffs and duplicated work.`]),Y(`Choosing the Right Tool for Your Team's Complexity`,[`There is no single best project management tool for remote teams; the right choice depends heavily on team size, process complexity, and how visual versus structured your team likes to work. Trello's card-based board is excellent for small teams and simple workflows because it is nearly zero-friction to set up and understand, but it can start to feel limiting once you need dependencies, custom fields, or complex reporting across multiple projects.`,`Asana and Monday sit a step up in structure, offering timeline views, task dependencies, and reporting that suit mid-sized teams running several concurrent projects. ClickUp positions itself as the most feature-dense option, bundling docs, goals, time tracking, and multiple view types into one platform, which appeals to teams that want to consolidate tools but can feel overwhelming to configure for smaller teams that just need a simple board. Jira remains the standard for software teams running structured sprints, particularly where deep integration with code repositories and issue tracking matters.`],{table:{headers:[`Tool`,`Best for`,`Learning curve`],rows:[[`Trello`,`Small teams, simple visual workflows`,`Very low`],[`Asana`,`Mid-sized teams needing timelines and dependencies`,`Low to moderate`],[`Monday`,`Cross-functional teams wanting customizable workflows`,`Moderate`],[`ClickUp`,`Teams wanting one consolidated all-in-one tool`,`Moderate to high`],[`Jira`,`Software teams running structured sprints`,`Moderate to high`]]}}
22),Y(`Building an Async-First Status Ritual`,[`The single highest-leverage ritual for remote project management is a consistent, written status update that lives in your project tool rather than in a meeting. This can take the form of a daily or twice-weekly written standup where each person posts what they finished, what they are working on next, and any blockers, directly on the relevant task or in a shared channel. The point is that anyone on the team, in any time zone, can read this update on their own schedule and get the same information a live standup would provide.`,`Written status updates have a secondary benefit beyond time zone flexibility: they create a searchable history. When a project stalls or a deadline slips, being able to scroll back through written updates to see exactly when and why a blocker appeared is far more useful than trying to recall what was said in a meeting three weeks ago. Teams that build this habit early tend to have much shorter, more focused synchronous meetings because status information does not need to be re-explained live.`]),Y(`Designing Meeting Cadence Around Time Zones`,[`Meetings are the most expensive coordination mechanism a remote team has, because they require everyone to be online simultaneously regardless of local time, and they leave no artifact behind unless someone deliberately documents them. The goal is not to eliminate meetings entirely but to reserve them for decisions that genuinely benefit from real-time discussion, like resolving a disagreement or making a judgment call that needs multiple perspectives quickly.`,`For teams spread across more than a couple of time zones, it helps to rotate meeting times so the same people are not always the ones waking up early or staying up late to attend. It also helps to record synchronous meetings and post a written summary afterward, so team members who could not attend are not permanently left out of the decision trail. A useful rule of thumb: if a meeting's purpose is purely status reporting rather than discussion or decision-making, it can almost always be replaced with a written update instead.`]),Y(`Making Decisions Without a Room Full of People`,[`Decision-making is where a lot of distributed teams quietly break down, because it is much harder to reach consensus asynchronously than it is in a room. A useful pattern is to write a short decision document that lays out the problem, the options considered, and a recommendation, then give stakeholders a defined window, such as 48 hours, to comment before the decision is finalized. This respects people's different working hours while still keeping the process moving instead of stalling indefinitely waiting for everyone to be online at once.`,`It also helps to be explicit about who actually owns a given decision. In synchronous settings, ambiguity about ownership gets resolved informally because someone in the room just makes the call. Async, that ambiguity can drag a decision out for days, so naming a clear decision-owner for each significant call prevents the most common form of remote project drift.`]),Y(`Common Pitfalls We See Repeatedly`,[`The most frequent failure mode is treating the project management tool as a formality that gets updated once a week, while the real coordination happens in ad hoc chat messages or unscheduled calls. When that happens, the tool stops reflecting reality, and anyone trying to get a status update from the system alone gets a misleading picture. The fix is cultural, not technical: task status needs to be updated in real time as work happens, not batched into a weekly cleanup session.`,`Another common pitfall is over-customizing the project tool with elaborate workflows, custom fields, and automation rules before the team has even settled into basic habits of updating tasks consistently. Complexity added too early creates friction that discourages the very behavior you are trying to build. Start simple, get the team into the habit of consistent updates, and add structure incrementally as real needs emerge.`],{bullets:[`Letting the project tool go stale while real coordination happens in chat or unscheduled calls`,`Over-engineering workflows and custom fields before basic update habits are established`,`Scheduling meetings across too many time zones without rotating the inconvenient slot`,`Making significant decisions verbally in a meeting with no written record for those who missed it`]}),Y(`Onboarding New Team Members Into a Remote Project Culture`,[`New hires on remote teams cannot absorb project norms by simply watching how the team operates day to day, since so much of the coordination is happening in writing across scattered threads and tasks. It is worth writing an explicit onboarding document that covers which tool is the source of truth for task status, what the written standup format looks like, and how decisions get documented and communicated. This is a small time investment that pays off quickly by preventing the common early mistake of a new team member defaulting to scheduling meetings for things that should be async updates.`,`Pairing a new team member with a more tenured teammate for the first few weeks, specifically to model how status updates and async communication work in practice, tends to accelerate this adjustment far more than a written document alone. The goal is for new hires to internalize that writing things down clearly is the primary way work gets coordinated on the team, not a secondary chore layered on top of the real work.`])],faqs:[{q:`What is the best project management tool for a small remote team?`,a:`Trello or Asana's lower tiers work well for small teams that want low setup friction. As the team and process complexity grow, Monday or ClickUp offer more structure for managing multiple concurrent projects.`},{q:`How many meetings should a remote team have per week?`,a:`There is no universal number, but a good test is whether each recurring meeting's purpose is discussion or decision-making rather than pure status reporting. Status updates that could be written should be moved out of meetings entirely.`},{q:`How do you handle urgent issues across time zones?`,a:`Define an explicit escalation path, such as a designated on-call person or channel, so urgent issues do not depend on someone happening to be online. This should be separate from your normal async workflow.`},{q:`Should remote teams use video calls or written updates for daily standups?`,a:`Written async standups generally work better for distributed teams because they do not require everyone online at once and create a searchable record. Reserve video calls for discussions that genuinely need real-time back and forth.`},{q:`How do you prevent tasks from going stale in the project tool?`,a:`Make updating task status part of the daily workflow rather than a separate weekly chore, and tie it to the written standup ritual so updating tasks and reporting status become the same action.`}],relatedSoftware:[`asana`,`trello`,`monday`,`clickup`,`jira`]},{slug:`best-free-saas-tools`,title:`The Best Free SaaS Tools for Bootstrapped Businesses`,description:`A practical roundup of genuinely useful free-tier SaaS tools across CRM, email, project management, and communication for founders operating on a tight budget.`,category:`productivity`,tags:[`Free Tools`,`Small Business`,`Productivity`],author:`marcus-alvarez`,published:`2026-02-18`,updated:`2026-04-25`,readingTime:7,intro:`Bootstrapped foun
22ders do not have the luxury of paying for a dozen tools before revenue justifies it, but they also cannot afford to run a business entirely on spreadsheets and hope. The good news is that free tiers of mainstream SaaS products have gotten genuinely usable over the past several years, not just crippled trial versions designed to force an upgrade within a week. This roundup covers the free tools we consistently see bootstrapped businesses rely on for real work, organized by function, along with honest notes on where each free tier starts to strain so you know when an upgrade is actually worth paying for rather than just marketing pressure telling you to.`,keyTakeaways:[`Free tiers from HubSpot, Trello, Notion, and Google Workspace can genuinely run a small business's core operations for months or years.`,`The right time to upgrade from free is when a specific limit blocks real work, not simply because a vendor prompts you to.`,`Combining free tools from different categories usually beats paying for one expensive all-in-one platform too early.`,`Watch for free tiers that cap contact or user counts hard, since migrating data later is more painful than paying earlier.`,`Free does not mean disposable â treat data export and backup habits the same as you would on a paid plan.`],sections:[Y(`CRM and Sales: HubSpot and Pipedrive's Entry Tiers`,[`HubSpot's free CRM tier is the most commonly recommended starting point for bootstrapped founders, and for good reason. It includes contact management, deal pipelines, basic email tracking, and simple reporting, with no time limit on the free tier itself. For a founder-led sales process with a modest number of contacts, this genuinely covers the basics without needing a credit card.`,`The strain shows up once you need more advanced automation, custom reporting, or you outgrow the contact limits tied to marketing features bundled alongside the CRM. At that point, some businesses stick with HubSpot's free CRM but layer in Pipedrive or Zoho CRM's entry-level paid tiers if they specifically need a more visual, sales-focused pipeline without HubSpot's broader marketing suite complexity. Either way, the right move is starting free and upgrading only when a specific limitation is actually blocking a real deal or process, not preemptively.`]),Y(`Project Management: Trello and ClickUp's Free Boards`,[`Trello's free tier remains one of the most generous in project management, offering effectively unlimited cards and boards for a single small team, with power-ups for basic automation. For a founder managing a handful of concurrent workstreams, this is often all the structure needed for a year or more of operation.`,`ClickUp's free tier goes further in terms of feature depth, including basic time tracking, docs, and multiple view types, which suits businesses that want more structure than a simple board provides without paying immediately. The tradeoff is that ClickUp's interface has more going on, which can slow down a very small team that just wants simplicity. Choose Trello if you want speed and minimal setup, and ClickUp if you anticipate needing more structure soon and would rather learn the tool once.`]),Y(`Documentation and Knowledge Sharing: Notion`,[`Notion's free tier for individuals and small teams has become a default choice for founders needing a flexible space to document processes, maintain a wiki, and organize scattered notes and plans in one place. Its block-based editor is flexible enough to build anything from a simple meeting notes page to a lightweight internal wiki, and the free tier's limits rarely bite until a team grows past a handful of people.`,`The main thing to watch is that Notion is not built as a dedicated project management tool, even though some teams try to stretch it into that role with databases and boards. It works well as a knowledge base and light planning tool alongside a dedicated project tool like Trello, but trying to make it your only system for both documentation and task tracking often creates more manual maintenance than it saves.`]),Y(`Communication and File Storage: Slack, Google Worksp
22ace, and Dropbox`,[`Slack's free tier caps message history but still provides real-time messaging, channels, and basic integrations, which is enough for very small teams coordinating day to day work. Once message history becomes a genuine problem, that is usually a clear, tangible signal that it is time to pay rather than a vague sense that you should upgrade.`,`For email, documents, and file storage, Google Workspace's lowest paid tier is inexpensive enough that many founders skip the free consumer Gmail route entirely and go straight to a small paid plan for a professional domain email address, which matters more for credibility than most other early purchases. Dropbox's free tier, meanwhile, offers a modest amount of storage that works fine for light file sharing needs before a team's storage needs grow past a few gigabytes of active shared files.`],{bullets:[`Slack free: fine for small teams until message history limits bite`,`Google Workspace: worth paying the low entry tier early for a professional domain email`,`Dropbox free: adequate for light file sharing, upgrade once storage or version history matters`]}),Y(`Email Marketing: Mailchimp and Free-Tier Alternatives`,[`Mailchimp's free tier includes a capped number of contacts and monthly sends, along with basic automation and templates, making it a common starting point for founders building an early email list. It is enough to run a simple newsletter or basic welcome sequence without paying, though the design and automation flexibility are noticeably more limited than paid tiers.`,`Newer entrants also offer usable free tiers worth comparing before committing, since Mailchimp's free tier has become more restrictive over time relative to some competitors. Whichever platform you choose, the practical advice is the same: do not over-invest in fancy automation workflows while your list is still small, since the return on that time is limited until you have meaningful send volume and data to optimize against.`]),Y(`Video and Meetings: Zoom's Free Tier`,[`Zoom's free tier covers one-on-one calls without a time limit and group calls up to a capped duration, which is enough for most founder-led sales calls, customer interviews, and small team check-ins. The forty-minute-ish cap on group calls is the most common friction point, and teams that regularly run longer group meetings often find it worth paying for a basic paid tier specifically to remove that constraint rather than working around it by scheduling awkward mid-call reconnects.`,`It is worth noting that Google Workspace's paid tiers also include video conferencing through Google Meet, so if you are already paying for Worksp
22ace for email, you may not need a separate paid Zoom subscription depending on your team's meeting patterns and external-facing usage.`]),Y(`When to Actually Upgrade From Free`,[`The temptation with free tiers is either to stay on them long after they are actively costing you productivity, or to upgrade prematurely because a vendor's prompts create a sense of urgency that is not backed by a real business need. The better approach is to track specific limitations as they occur: a deal that could not be logged properly, a message history you needed and lost, a storage limit that blocked a file share with a client. When these specific incidents start recurring, that is the signal to upgrade, not a vague feeling that you have outgrown the free version.`,`It also helps to model the cost of switching later versus paying a little earlier. Contact and user caps are the ones to watch most closely, because migrating a growing customer list or team history out of a free tier once you are deeply reliant on it is far more disruptive than budgeting for a modest paid tier a few months earlier than strictly necessary.`]),Y(`Building a Free Stack That Actually Works Together`,[`The best free-tool stacks are not chosen in isolation; they are chosen with an eye toward how the tools connect. HubSpot's free CRM integrates reasonably well with Google Workspace and Slack, for example, which means a founder can get a surprising amount of automated visibility, like new deal notifications in Slack, without paying for anything beyond the very cheap Workspace tier. Before adding a new free tool to your stack, check whether it has a native integration with the tools you already use, since a disconnected free tool that requires manual data re-entry often costs more in time than a slightly more expensive but connected alternative.`,`Finally, treat your free tools with the same data hygiene discipline you would apply to paid software. Export your CRM contacts, project data, and documents periodically regardless of whether you are on a free or paid plan, since free tiers are also the ones most likely to change their terms, contact caps, or feature availability with little warning. A bootstrapped stack built on free tools can absolutely carry a business through its early years, as long as it is chosen deliberately and monitored for the specific moments when paying finally becomes the smarter move.`])],faqs:[{q:`Can a business really run entirely on free SaaS tools?`,a:`For the first year or two of a small, founder-led business, yes, in most functional areas. The exceptions are usually professional email hosting and video conferencing beyond basic limits, where a small paid tier is worth it early for credibility and convenience.`},{q:`What is the risk of relying on free tiers long-term?`,a:`Vendors can change free tier limits, contact caps, or feature availability with little notice, and migrating data out of a tool you have relied on for years is more disruptive than budgeting for a paid plan earlier.`},{q:`Which free CRM is best for a solo founder?`,a:`HubSpot's free CRM tier is the most commonly recommended starting point because it combines contact management, a visual pipeline, and basic reporting with no time limit on the free plan itself.`},{q:`Is Notion a good replacement for a project management tool?`,a:`It works well as a knowledge base and lightweight planning tool, but dedicated project tools like Trello or ClickUp handle task tracking, dependencies, and status visibility more reliably than stretching Notion databases to do the same job.`},{q:`How do I know when to upgrade from a free plan?`,a:`Upgrade when a specific limitation, like a contact cap, message history loss, or storage limit, actively blocks real work more than once, rather than upgrading preemptively based on vendor prompts alone.`}],relatedSoftware:[`hubspot`,`trello`,`notion`,`slack`,`google-workspace`,`mailchimp`]}],Xh=[{slug:`top-ai-tools-businesses`,title:`Top AI Tools for Small and Mid-Sized Businesses in 2026`,description:`A practical roundup of the AI tools actually worth paying for in 2026, covering writing, support, sales, and workflow automation for growing companies.`,category:`ai`,tags:[`AI`,`Automation`,`Productivity`],author:`marcus-alvarez`,published:`2026-01-14`,updated:`2026-03-02`,readingTime:8,featured:!0,intro:`Every vend
22or now claims to be an AI company, which makes it harder than ever for a small or mid-sized business to figure out what is genuinely useful versus what is a chatbot bolted onto an existing product for a marketing bump. After watching dozens of teams adopt (and abandon) AI tools over the past year, some clear patterns have emerged about where the technology actually saves time and money today, as opposed to where it is still more hype than help. This guide focuses on tools with a track record inside real operating businesses rather than flashy demos, and it groups them by the job they do rather than by buzzword.`,keyTakeaways:[`The highest-ROI AI tools in 2026 sit inside workflows you already use, not as standalone destinations you have to remember to visit.`,`Customer support and sales prospecting are the two areas delivering the most measurable time savings for SMBs right now.`,`General-purpose assistants like ChatGPT and Claude remain useful, but purpose-built AI features inside your CRM or helpdesk often beat them for specific tasks.`,`Data privacy and accuracy checks still matter â treat AI output as a strong first draft, not a finished decision.`,`Budget for AI as an ongoing per-seat or usage cost, not a one-time purchase; most tools bill monthly and scale with usage.`],sections:[Y(`Why 202
226 Is Different From the Early AI Hype Cycle`,[`The first wave of business AI tools, roughly 2023 through 2025, was dominated by generic chat interfaces that promised to do everything and often did nothing particularly well inside a specific workflow. Teams spent months experimenting with prompt libraries and custom GPTs, and while some of that experimentation paid off, a lot of it simply added another browser tab to check. What changed heading into 2026 is that AI capabilities have been embedded directly into the software people already use for CRM, support, accounting, and project management, which removes the adoption friction that killed so many earlier pilots.`,`This shift matters because the biggest obstacle to AI adoption was never capability, it was habit. A salesperson who has to copy a lead's information into a separate AI tool to get a personalized email draft will stop doing it within a week. The same salesperson using an AI compose button inside their existing CRM will use it daily because it requires zero extra steps. The tools worth paying attention to in 2026 are almost all the second kind: embedded, contextual, and triggered automatically rather than requiring a deliberate visit to a new app.`]),Y(`AI for Customer Support and Success`,[`Customer support is arguably the single best-proven use case for AI in small business software today. Tools like Intercom's Fin and Zendesk's AI agent features can now resolve a meaningful share of routine tickets â password resets, order status questions, policy lookups â without a human ever touching them, and they do it by pulling directly from your existing help center content rather than hallucinating answers from scratch. The result for most teams is not a headcount reduction so much as freed-up capacity for support agents to handle the complex, relationship-sensitive tickets that actually need a human.`,`The practical advice here is to start narrow. Point the AI agent at your most well-documented, highest-volume ticket categories first, measure resolution rates and customer satisfaction on those tickets specifically, and expand scope only once you trust the pattern. Teams that turn on AI resolution across every ticket type on day one tend to get burned by edge cases and have to walk the feature back, which damages internal trust in the tool more than a slower rollout would have.`],{bullets:[`Freshdesk and Zendesk both offer AI-assisted ticket triage and suggested replies as part of mid-tier plans.`,`Intercom's AI features are strongest when your help center articles are current â garbage in, garbage out applies directly here.`,`Expect AI resolution rates in the 20-40% range for well-documented ticket categories, not the 80%+ some vendors imply in demos.`]}),Y(`AI for Sales Prospecting and Outreach`,[`On the sales side, the most useful AI applications are research and drafting assistants rather than fully autonomous outreach bots. Tools integrated into platforms like HubSpot and Salesforce can now summarize a prospect's recent company news, draft a personalized first-touch email, and flag which deals in a pipeline are showing risk signals based on email response patterns and meeting cadence. None of this replaces a sales rep's judgment, but it can meaningfully cut the research time that used to eat up the first twenty minutes of prospecting.`,`Fully automated AI outreach â where the tool sends emails on a rep's behalf without review â remains risky for reputation and deliverability reasons, and most experienced sales leaders still require a human review step before anything goes out. The sweet spot in 2026 is AI drafting plus human sending, which keeps the speed benefit without the risk of a bot sending something tone-deaf to a prospect.`]),Y(`Workflow and Document Automation`,[`Beyond support and sales, AI is quietly improving document-heavy workflows: contract review, meeting notes, and internal knowledge search. Tools that automatically transcribe and summarize meetings, then push action items into a project management tool like Asana or ClickUp, have become close to standard practice on many teams because the setup cost is low and the time saved is immediate and visible every single day.`,`Internal knowledge search is a quieter but increasingly important use case. As companies accumulate more documents, Slack threads, and wiki pages, AI-
22powered search that can answer 'how do we handle X' by summarizing scattered internal content is becoming a genuine productivity unlock, particularly for newer employees who would otherwise spend their first few months just learning where things live.`]),Y(`Comparing the Major AI Tool Categories`,[`It helps to think about AI tools in three buckets: general-purpose assistants, embedded feature-level AI, and purpose-built AI-first products. Each has a different cost structure and a different bar for return on investment, and confusing the three leads to buying the wrong thing for the job.`],{table:{headers:[`Category`,`Example Use Case`,`Typical Cost`,`Best For`],rows:[[`General-purpose assistant`,`Drafting, brainstorming, research`,`$20/seat/month at time of writing`,`Individual productivity, ad hoc tasks`],[`Embedded feature AI`,`CRM email drafts, helpdesk suggested replies`,`Bundled into existing plan or small add-on`,`Teams already using that core software`],[`AI-first purpose-built tool`,`Meeting transcription, AI-native analytics`,`$15-40/seat/month at time of writing`,`Specific recurring workflow with clear ROI`]]}}),Y(`Accuracy, Hallucination, and When to Trust the Output`,[`Every AI tool on this list can still confidently produce wrong information, and the businesses getting the most value from AI in 2026 are the ones that have built lightweight review habits rather than blind trust. For customer-facing outputs like support replies or sales emails, a human review step before sending remains standard practice at most companies, even when the AI resolution rate is high. For internal tasks like meeting summaries, the stakes are lower and teams tend to trust the output more freely, though it is still worth spot-checking against your own notes occasionally.`,`A useful mental model is to treat AI output the way you would treat a capable but new employee's first draft: usually pretty good, occasionally confidently wrong, and always worth a quick second look before it goes anywhere important.`]),Y(`Budgeting for AI Tools as an Ongoing Line Item`,[`One planning mistake we see repeatedly is treating AI tool spend as a one-off experiment rather than a recurring operating cost. Most AI features are billed either per seat or based on usage volume (number of AI-resolved tickets, number of AI-generated emails, and so on), and usage-based pricing in particular can grow quickly as adoption increases across a team. Building AI tool costs into your annual software budget from the start, with a realistic estimate of usage growth, avoids an unpleasant billing surprise three months into a rollout.`,`It is also worth negotiating trial periods and usage caps with vendors before committing to an annual contract, since actual usage patterns often look different from what a sales demo predicts. Most vendors are willing to offer a 30- to 60-day pilot at reduced or no additional cost specifically because they know that once a team sees ticket deflection or time saved in their own data, the renewal conversation becomes much easier.`]),Y(`Getting Buy-In From Skeptical Teams`,[`Not every employee is excited about AI tools showing up in their daily workflow, and some of that skepticism is well earned given the hype cycle of the last few years. The rollouts that go smoothly tend to start with a small, visibly time-consuming task, show the team the before-and-after time savings honestly, and let people opt in rather than mandating usage from day one. Forcing adoption before trust is built tends to produce quiet workarounds rather than real usage.`])],faqs:[{q:`Do small businesses really need AI tools, or is this hype?`,a:`The best AI tools in 2026 solve specific, measurable time-consuming tasks like ticket triage or meeting notes, so the value is real when applied narrowly. It is hype when a business adopts AI broadly without a clear task it is meant to speed up.`},{q:`What is the cheapest way to start using AI at work?`,a:`Turning on AI features already included in software you pay for, such as a CRM's email drafting assistant or a helpdesk's suggested replies, is usually cheaper and easier than buying a new standalone AI tool.`},{q:`Is it safe to feed customer data into AI tools?`,a:`It depends on the vendor's data handling policy; reputable business AI tools do not use your data to train public models by default, but you should confirm this in the vendor's terms rather than assume it.`},{q:`How do I measure ROI on an AI tool?`,a:`Pick one metric tied directly to the task the AI performs, such as average ticket resolution time or hours saved per week on meeting notes, and track it before and after rollout over a defined pilot period.`},{q:`Will AI replace my support or sales team?`,a:`Most businesses are using AI to handle routine volume so human staff can focus on complex or relationship-sensitive work, rather than eliminating roles outright.`},{q:`Should I use a general AI assistant or an AI feature built into my existing software?`,a:`If the task is specific and repetitive within a tool you already use, the embedded feature is usually faster to adopt and cheaper; general assistants are better for one-off or exploratory tasks.`}],relatedSoftware:[`hubspot`,`salesforce`,`zendesk`,`intercom`,`asana`,`clickup`]},{slug:`how-to-automate-business-workflows`,title:`How to Automate Business Workflows Without a Developer`,description:`A step-by-step approach to automating repetitive business processes using no-code tools, without hiring a developer or waiting on IT.`,category:`productivity`,tags:[`Automation`,`How To`,`Ops`],author:`sophie-tremblay`,published:`2026-02-05`,updated:`2026-04-11`,readingTime:7,intro:`Somewhere in every growing business, there is a spreadsheet that gets copied and updated by hand every week, or a task where someone manually moves information from one tool into another. These small manual processes rarely feel urgent enough to fix, so they pile up quietly until a team is spending hours a week on work that a simple automation could handle in seconds. The good news is that you no longer need a developer or a six-week IT project to fix this. Modern no-code automation tools can connect most of the softw
22are a small business already uses, and this guide walks through exactly how to identify, build, and maintain those automations yourself.`,keyTakeaways:[`Start by auditing repetitive manual tasks that involve moving information between two or more tools â these are your best automation candidates.`,`No-code platforms like Zapier, Make, and native automations inside tools like Airtable and Notion can handle most SMB workflow needs without custom code.`,`The best first automation is small, low-risk, and has an obvious before-and-after time savings you can point to.`,`Every automation needs an owner responsible for checking it still works after any connected tool changes its interface or API.`,`Document what each automation does in plain language so it survives staff turnover.`],sections:[Y(`Start With an Audit, Not a Tool`,[`The most common mistake teams make when starting with automation is picking a tool first and then trying to find a use for it. This backwards approach leads to automations that are technically impressive but solve problems nobody actually had. A better starting point is a plain audit: spend a week having each team member jot down any task where they copy, re-type, or manually move information from one system to another, no matter how small it seems.`,`Once you have that list, rank tasks by two factors: how often they happen and how mechanical they are. A task that happens daily and follows the exact same steps every time â like copying new form submissions into a spreadsheet â is a much better automation candidate than a task that happens monthly and requires judgment calls. The goal at this stage is simply to build a prioritized backlog, not to solve everything at once.`]),Y(`Choosing the Right No-Code Tool for the Job`,[`Once you know what you want to automate, the right tool depends on how many different apps are involved and how complex the logic needs to be. If you are connecting two or three mainstream business apps with straightforward if-this-then-that logic, a tool like Zapier is usually the fastest path, with a huge library of pre-built app connections and templates. If your workflow involves more complex branching logic, multiple conditional steps, or higher monthly automation volume, Make (formerly Integromat) tends to offer more flexibility and often at a lower cost per task.`,`For workflows that live mostly inside a single tool â say, moving a task between columns and notifying someone when a project status changes â the native automation features inside tools like Airtable, Notion, monday.com, or Asana are often good enough and avoid the cost of a separate automation subscription entirely. It is worth checking what your existing tools can already do natively before reaching for a third-party connector tool.`]),Y(`Comparing No-Code Automation Options`,[`Each of the major no-code automation approaches has tradeoffs worth understanding before you commit time to building on top of one.`],{table:{headers:[`Tool Type`,`Best For`,`Learning Curve`,`Typical Cost`],rows:[[`Zapier`,`Simple cross-app triggers, huge app library`,`Low`,`Free tier available; paid plans scale with task volume`],[`Make`,`Complex, multi-step, branching workflows`,`Medium`,`Often cheaper per task than Zapier at higher volume`],[`Native tool automation (Airtable, monday, Asana)`,`Single-tool workflows, status changes, notifications`,`Low`,`Usually included in existing subscription tier`]]}}),Y(`Building Your First Automation`,[`Pick the single smallest, lowest-risk item from your audit list for your first build â resist the urge to start with the most impactful one. A good first project might be automatically posting a Slack notification when a new deal closes in your CRM, or automatically adding a row to a spreadsheet when a form is submitted. These are simple enough to build in under an hour, and success here builds the internal confidence and template library you will draw on for more ambitious automations later.`,`When building, map out the trigger (what starts the automation), the action (what happens as a result), and any conditions in between, on paper first, before opening the automation tool itself. This ten-minute planning step catches logic errors before they turn into a broken automation that silently fails in production, which is a far more common failure mode than people expect.`],{bullets:[`Always test with real (not sample) data before turning an automation live for the whole team.`,`Add an error notification step so you find out immediately if an automation fails, rather than discovering it weeks later.`,`Keep the first few automations single-purpose; resist combining five steps into one mega-automation until you're comfortable with the tool.`]}),Y(`Common Workflow Automation Use Cases by Department`,[`Different departments tend to have different automation opportunities, and it helps to think through your own team by function. Sales teams commonly automate lead routing, follow-up reminders, and CRM data enrichment. Marketing teams automate list segmentation and email sequence triggers based on website or product behavior. Operations and finance teams often automate invoice reminders, approval routing, and data syncing between accounting software and spreadsheets used for internal reporting.`,`Customer support teams frequently automate ticket tagging, routing tickets to the right team based on keywords, and sending satisfaction surveys after a ticket closes. None of these require custom development â they are all achievable with the trigger-action logic available in mainstream no-code tools.`]),Y(`Avoiding the Maintenance Trap`,[`Automations are not a set-it-and-forget-it project. Connected apps change their interfaces, APIs get deprecated, and field names get renamed, all of which can silently break an automation that has been running fine for months. The businesses that get long-term value from automation assign clear ownership â someone whose job includes periodically checking that key automations still run correctly â rather than letting automations become orphaned processes nobody understands.`,`A simple practice that prevents a lot of pain later is keeping a shared document listing every active automation, what it does, which tools it touches, and who set it up. When that person eventually leaves the company or moves teams, this document is the difference between a smooth handover and a mysterious process that quietly stops working with no one noticing for weeks.`]),Y(`When to Bring in a Developer Anyway`,[`No-code automation tools have gotten remarkably capable, but there is still a point where custom development makes more sense â typically when you need to handle very high transaction volumes cheaply, need tight security or compliance controls that no-code platforms cannot guarantee, or need logic so complex that a visual builder becomes harder to maintain than actual code. If you find yourself building an automation with more than a dozen branching steps, or one that touches sensitive financial or health data, it is
22worth getting an estimate from a developer to compare against the ongoing cost and fragility of a sprawling no-code build.`]),Y(`Measuring the Payoff`,[`Before rolling out an automation broadly, note roughly how long the manual process used to take and how often it happened, so you can calculate real hours saved afterward. Multiply the minutes saved per run by how often the task occurs in a typical month, and you will usually find that even a small automation saving five minutes on a daily task adds up to several hours a month â often more than the automation tool's entire subscription cost. This number is useful both for justifying the (usually modest) subscription cost of an automation tool and for building organizational appetite to tackle the next item on your backlog. Teams that track this consistently tend to keep investing in automation because the wins are visible, while teams that skip measurement often let their automation program stall after the first couple of projects.`,`It also helps to track a second, softer metric: error reduction. Manual data entry and copy-paste work introduces mistakes â a wrong customer email, a duplicate row, a missed follow-up â that are often more costly than the time spent doing the task in the first place. When you present automation wins to leadership, pairing a time-saved estimate with a reduction in downstream errors makes a much stronger case than either number alone.`]),Y(`A Starter Library of Automations Worth Building First`,[`If you are not sure where to begin, a handful of automations show up again and again as high-value, low-risk starting points across almost every type of small business, regardless of industry. These are worth building even before you finish a full audit, because the payoff is well established and the setup time is minimal.`,`None of these require more than a single trigger and one or two actions, which makes them ideal for building comfort with a no-code tool before attempting anything with branching logic or multiple conditional paths.`],{bullets:[`New form submission (contact form, survey, application) automatically creates a row in a spreadsheet or a record in a CRM.`,`New customer or deal in a CRM triggers a welcome email or a Slack notification to the account owner.`,`Invoice marked overdue in accounting software triggers an automatic reminder email after a set number of days.`,`New file uploaded to a shared drive folder triggers a notification to the relevant team channel.`,`Calendar event ending triggers a follow-up task or reminder to send meeting notes within a set window.`]}),Y(`Permissions and Data Access in No-Code Automations`,[`One detail that gets overlooked in the excitement of building a first automation is that most no-code platforms require you to connect real accounts with real credentials, often via OAuth, and those connections typically inherit the full permission scope of whoever authorized them. If a well-meaning employee connects their own CRM login to build an automation, and that employee later leaves the company, the automation can silently stop working or, worse, keep running on a deactivated account's lingering session until someone notices.`,`The safer long-term practice is to create a dedicated service account or integration user for automation connections wherever the underlying tool supports it, rather than tying every automation to a specific person's individual login. This keeps automations running smoothly through staff turnover and makes it much easier to audit exactly what data an automation platform has access to at any given time, which matters if you are ever asked about third-party data access during a security or compliance review.`])],faqs:[{q:`Do I need to know how to code to automate workflows?`,a:`No. Tools like Zapier, Make, and the native automation features inside apps like Airtable, Notion, and Asana are built with visual, drag-and-drop interfaces specifically so non-developers can build automations.`},{q:`How much does business workflow automation typically cost?`,a:`Many teams start on free tiers of tools like Zapier for low-volume automations, then move to paid plans priced by monthly task or operation volume, typically starting around $20-30/month at time of writing for small teams.`},{q:`What is the difference between Zapier and Make?`,a:`Zapier is generally simpler and faster to learn for straightforward one-step automations, while Make offers more flexibility for complex, multi-branch workflows, often at a lower cost per operation at higher volumes.`},{q:`How do I know if a task is worth automating?`,a:`Good candidates are repetitive, follow the exact same steps every time, and happen often enough that manual time spent adds up meaningfully over a month.`},{q:`What happens if an automation breaks?`,a:`Well-built automations include error notifications so the owner is alerted immediately; without this, a broken automation can fail silently for weeks before anyone notices.`},{q:`Can automation replace a full workflow management system?`,a:`For simple trigger-action tasks, yes, but complex, high-volume, or compliance-sensitive processes are often still better served by dedicated software or custom development.`}],relatedSoftware:[`airtable`,`asana`,`monday`,`notion`,`clickup`,`trello`]},{slug:`cloud-software-security-guide`,title:`Cloud Software Security: A Practical Guide for SaaS Buyers`,description:`What buyers actually need to check before trusting a cloud software vendor with company data, from certifications to contract terms.`,category:`cybersecurity`,tags:[`Security`,`Compliance`,`Buying Guide`],author:`elena-marks`,published:`2026-01-22`,updated:`2026-03-19`,readingTime:8,intro:`Buying cloud software today means trusting a third-party vendor with some portion of your company's data, whether that is customer records in a CRM, financial details in an accounting platform, or internal documents in a file-sharing tool. Most buyers focu
22s their evaluation almost entirely on features and pricing, and treat security as a checkbox to sort out later or simply assume that any well-known vendor must be secure by default. That assumption is not always safe, and the consequences of getting it wrong â a breach, a compliance violation, a client who walks away after a data incident â are far more expensive than the extra hour it takes to do a proper security review during procurement. This guide covers what to actually check, in plain language, without requiring a security background.`,keyTakeaways:[`Certifications like SOC 2 Type II and ISO 27001 are useful signals but should be read, not just checked as boxes.`,`Data encryption in transit and at rest, along with clear data residency policies, are baseline requirements for any serious SaaS vendor.`,`Sub-processor lists and data retention/deletion policies matter as much as headline security features.`,`Your own team's access controls and offboarding process are often the weakest link, not the vendor's infrastructure.`,`Incident response commitments should be written into the contract, not left as a verbal promise from sales.`],sections:[Y(`Why Security Diligence Belongs in Procurement, Not Just IT`,[`Security review often gets treated as a separate process that happens after a business team has already decided which tool to buy, which puts security teams in the awkward position of trying to block or approve a decision that has effectively already been made. A better approach folds basic security questions into the initial vendor evaluation alongside pricing and features, so that a vendor with serious gaps gets filtered out early rather than after months of internal buy-in and budget approval.`,`This matters even for tools that seem low-risk on the surface. A project management tool might seem harmless until you realize it stores client names, deal values, and internal strategy notes in task descriptions. A file-sharing tool used casually by one team can end up holding contracts and financial statements within a few months. Data sensitivity tends to creep up over time as a tool becomes embedded in daily work, so it is worth evaluating security based on what the tool could plausibly hold in a year, not just what it holds on day one.`]),Y(`Understanding Security Certifications`,[`SOC 2 Type II and ISO 27001 are the two certifications you will see most often from serious B2B SaaS vendors, and both indicate that an independent auditor has reviewed the vendor's security controls. The key distinction buyers often miss is between Type I and Type II SOC 2 reports: Type I confirms controls exist at a single point in time, while Type II confirms those controls were actually operating effectively over a period of months, which is a meaningfully stronger signal. If a vendor only offers a Type I report, treat it as a starting point rather than full assurance.`,`It is worth actually requesting and skimming the report rather than just confirming the vendor has one. Most vendors will share a SOC 2 report under an NDA on request, and the report itself will list specific controls, any exceptions noted by the auditor, and the audit period covered. A vendor that is reluctant to share the underlying report, or only offers a marketing page claiming compliance, deserves more scrutiny.`]),Y(`Encryption, Data Residency, and Sub-Processors`,[`Encryption in transit (data moving between your browser and the vendor's servers, typically via TLS) and encryption at rest (data stored on the vendor's servers) are now baseline expectations for any legitimate SaaS product, and a vendor unable to confirm both should be treated as a serious red flag. Beyond encryption basics, ask where data is actually stored geographically, since this affects which privacy regulations apply and matters a great deal for companies with customers in the EU, UK, or other regions with strict data residency rules.`,`Sub-processors â the third-party services a vendor uses to run their own product, such as cloud hosting providers or embedded analytics tools â are an often-overlooked risk layer. Your vendor's security is only as strong as the sub-processors they depen
22d on, so a reputable SaaS company should maintain a public or on-request list of sub-processors and notify customers of any material changes to that list.`]),Y(`Comparing What to Ask Before You Sign`,[`The following comparison outlines the core security questions worth asking any SaaS vendor before signing, along with what a strong answer typically looks like.`],{table:{headers:[`Question`,`Strong Answer Looks Like`,`Weak Answer Looks Like`],rows:[[`Do you have SOC 2 Type II or ISO 27001?`,`Willing to share the actual report under NDA`,`Only a badge on the marketing website, no report offered`],[`Is data encrypted in transit and at rest?`,`Confirmed with specifics (TLS 1.2+, AES-256, etc.)`,`Vague reassurance without technical detail`],[`What is your data breach notification timeline?`,`Specific contractual timeframe, e.g., within 72 hours`,`"We'll let you know if something happens"`],[`Can we get our data deleted on request?`,`Clear deletion process and timeline in writing`,`No documented process`]]}}),Y(`Your Own Access Controls Matter Just as Much`,[`It is easy to focus entirely on the vendor's infrastructure and forget that a large share of real-world SaaS security incidents come from misconfigured access on the customer side, not a breach of the vendor itself. Weak or shared passwords, ex-employees who still have active accounts months after leaving, and overly broad admin permissions handed out for convenience are all far more common causes of data exposure than a vendor's servers being hacked.`,`Look for vendors that support single sign-on (SSO) and role-based access control, even if it costs slightly more or requires a higher-tier plan, because these features let your own IT team enforce consistent access policies rather than relying on individual users to manage their own security hygiene. Building a habit of reviewing user access lists quarterly, and deactivating accounts immediately when someone leaves the company, closes off one of the most common real-world attack paths.`],{bullets:[`Enforce SSO wherever the vendor supports it, rather than leaving individual password logins as the default.`,`Review admin-level permissions quarterly â access tends to accumulate and rarely gets revoked proactively.`,`Offboard departing employees from every connected SaaS tool the same day they leave, not at the end of the month.`]}),Y(`Getting Security Commitments Into the Contract`,[`Verbal assurances from a sales representative about security practices are not worth much if something goes wrong later, so it is worth pushing to get key commitments written into the master service agreement or a dedicated data processing addendum (DPA). Items worth formalizing include breach notification timelines, data retention and deletion policies, sub-processor change notifications, and any specific compliance requirements relevant to your industry, such as HIPAA for healthcare data or PCI DSS for payment information.`,`Many mid-market and enterprise SaaS vendors already have a standard DPA they can send on request, since most of their customers ask for the same thing. Smaller or newer vendors may not have one ready, which is not necessarily disqualifying but does mean you should expect a slightly longer negotiation and possibly involve legal counsel to draft the specific language you need.`]),Y(`Red Flags That Should Slow Down a Purchase`,[`Certain signals during procurement are worth treating as genuine warning signs rather than minor friction. A vendor that cannot answer basic questions about where data is stored, that has no incident response plan or history of communicating past incidents transparently, or that pushes back hard on adding standard security language to a contract, is signaling something about how seriously security is treated internally. None of these alone is automatically disqualifying, but multiple red flags together are a strong reason to either walk away or require additional assurances before signing.`]),Y(`Building an Ongoing Vendor Security Review Process`,[`Security diligence should not stop once a contract is signed. Vendors change ownership, get acquired, expand into new sub-processors, or experience incidents that may or may not get proactively disclosed. Building a lightweight annual review â checking whether certifications are still current, whether the sub-processor list has changed materially, and whether any public incidents have been reported â keeps your vendor risk picture current without requiring a full security team dedicated to the task.`,`It is worth assigning this review to a
22specific person or role rather than leaving it as an ambient responsibility that never quite happens. A simple recurring calendar reminder tied to each vendor's contract renewal date works well for smaller companies, since it naturally aligns the security check with the moment you are already deciding whether to keep paying for the tool. For larger vendor lists, a shared spreadsheet tracking certification expiry dates, last review date, and any open questions per vendor keeps the process from becoming overwhelming.`]),Y(`Multi-Factor Authentication and Identity as the First Line of Defense`,[`Independent of anything a vendor does on their own infrastructure, the single control that prevents the largest share of real-world account compromise is multi-factor authentication (MFA) on every account with access to sensitive data. Credential theft through phishing, password reuse across services, and leaked credential databases remain the most common way outside attackers get into SaaS accounts, and MFA closes off the vast majority of these attempts even when a password has already been compromised.`,`When evaluating a vendor, confirm not just that MFA is available but that it can be enforced at the organization level rather than left as an optional setting each employee can ignore. Some vendors gate mandatory MFA enforcement and SSO behind higher-priced enterprise tiers, which is worth factoring into your total cost comparison since the security value of enforced MFA is difficult to substitute with any other control.`],{bullets:[`Confirm whether MFA can be enforced org-wide by an administrator, not just enabled voluntarily by individual users.`,`Prefer app-based or hardware-key MFA over SMS-based codes, which are more vulnerable to interception and SIM-swapping.`,`Check whether enforced MFA and SSO are included in your plan tier or require an upgrade before you budget for the tool.`]}),Y(`Handling a Vendor Breach or Incident When It Happens`,[`Even careful vendor selection does not eliminate the possibility of an incident, so it is worth thinking through your own response plan before you need it. A vendor's breach notification is only useful if someone on your side is actually watching for it and knows what to do next, which means designating who receives security notices from each vendor and what the internal escalation path looks like if a notice arrives.`,`When a vendor does disclose an incident, the first practical steps are usually the same regardless of the specifics: confirm exactly what data of yours was potentially affected, rotate any credentials or API keys shared with that vendor, and review your own access logs for unusual activity around the disclosed timeframe. Vendors with a mature incident response process will typically provide this information proactively; if a vendor is vague or slow to answer direct questions about scope and impact during an active incident, that pattern is worth remembering the next time your contract comes up for renewal.`])],faqs:[{q:`Is SOC 2 certification enough to trust a SaaS vendor?`,a:`SOC 2 Type II is a strong positive signal but should be read rather than just confirmed as existing, since the underlying report can reveal exceptions or gaps worth discussing with the vendor.`},{q:`What is the difference between SOC 2 Type I and Type II?`,a:`Type I confirms security controls exist at a single point in time, while Type II confirms those same controls operated effectively over an extended period, typically six to twelve months, making it a stronger assurance.`},{q:`Should small businesses worry about cloud software security or is that just an enterprise concern?`,a:`Small businesses are actually common targets partly because they often have weaker access controls and less dedicated security staff, so basic diligence matters regardless of company size.`},{q:`What is a sub-processor and why does it matter?`,a:`A sub-processor is a third-party service your SaaS vendor relies on to deliver their product, such as a cloud hosting provider; your data's security depends on all of these parties, not just the vendor you signed a contract with.`},{q:`How often should we review our SaaS vendors' security?`,a:`An annual review covering certification status, sub-processor changes, and any reported incidents is a reasonable baseline for most small and mid-sized businesses.`},{q:`What is the single most common security mistake companies make with SaaS tools?`,a:`Failing to deactivate former employees' accounts promptly is one of the most common and preventable sources of unauthorized access, more so than vendor-side breaches.`}],relatedSoftware:[`google-workspace`,`microsoft-365`,`dropbox`,`slack`,`zoom`,`quickbooks`]},{slug:`saas-pricing-models-explained`,title:`SaaS Pricing Models Explained: Per-Seat, Usage, Tiered, and Hybrid`,description:`A clear breakdown of how SaaS companies price their products, and how to figure out which pricing model will actually cost you less as you grow.`,category:`accounting`,tags:[`Pricing`,`Explainer`,`Finance`],author:`raj-patel`,published:`2026-02-18`,updated:`2026-04-25`,readingTime:7,intro:`Anyone who has tried to compare software vendors during a buying process has run into the same frustration: one product charges per user, another charges based on how much you use it, a third has a tiered plan structure that seems designed to make apples-to-apples comparison as hard as possible. This is not entirely accidental. Pricing model choice is a deliberate business decision by SaaS vendors, and understanding the mechanics behind each model helps you predict how your bill will actually grow as your company scales, rather than being surprised by it a year into a contract. This guide breaks down the four dominant SaaS pricing models and gives a framework for deciding which one favors your specific situation.`,keyTakeaways:[`Per-seat pricing is predictable but can penalize you for adding users who only need occasional access to a tool.`,`Usage-based pricing aligns cost with value but makes budgeting harder and can spike unexpectedly during growth periods.`,`Tiered pricing bundles features into packages, which can force you to overpay for a tier just to unlock one feature you need.`,`Hybrid models are increasingly common and combine a base seat or platform fee with usage-based add-ons.`,`Always model your cost at 2x and 5x current usage before signing, not just your usage today.`],sections:[Y(`Why Pricing Models Vary So Much Across SaaS`,[`SaaS companies choose a pricing model based on what best aligns their revenue with the value a customer gets from the product, and also, frankly, based on what maximizes revenue as customers grow. A tool where value scales cleanly with number of users, like a CRM where each salesperson needs their own login, tends to favor per-seat pricing. A tool where value scales with volume of activity rather than headcount, like an email marketing platform where cost should track subscriber count, tends to favor usage-based pricing instead.`,`Understanding this logic helps you evaluate whether a vendor's pricing model actually reflects how your organization will use the product, or whether it is structured in a way that will systematically overcharge you for how you specifically plan to use it. A five-person team that only has one or tw
22o people actually logging into a tool daily, for example, is a poor fit for strict per-seat pricing even if the vendor's default plan structure assumes otherwise.`]),Y(`Per-Seat Pricing: Predictable but Sometimes Wasteful`,[`Per-seat (or per-user) pricing charges a flat monthly or annual fee for every named user with access to the software, regardless of how much or how little they actually use it. Popular examples include most project management tools, many CRMs, and productivity suites like Google Workspace and Microsoft 365. The predictability is the main appeal: if you know your headcount, you can calculate your exact software bill for the year without guesswork.`,`The downside shows up when usage is uneven across your team. A tool where twenty people have logins but only eight use it daily still charges for all twenty seats under strict per-seat pricing, effectively wasting budget on inactive licenses. It is worth periodically auditing actual login activity against your seat count â most admin dashboards show this â and downgrading or removing unused seats at renewal time rather than automatically renewing at the same headcount.`]),Y(`Usage-Based Pricing: Aligned With Value, Harder to Predict`,[`Usage-based pricing charges based on a specific metric tied to consumption â API calls, emails sent, storage used, tickets resolved, or similar. This model has become especially common in email marketing, customer support AI features, and infrastructure-adjacent tools, because it lets vendors offer a low entry price to small customers while capturing more revenue as usage scales with company growth.`,`The tradeoff is budgeting difficulty. A usage-based bill can spike sharply during a busy month â a product launch that drives a surge in support tickets, or a marketing campaign that sends to a much larger list than usual â and finance teams sometimes get an unwelcome surprise on the invoice. If you are evaluating a usage-based tool, ask the vendor directly what your bill would have looked like during your busiest month of the past year, not just your average month, to get a realistic sense of the ceiling.`]),Y(`Tiered Pricing: Bundles That Can Force Overpayment`,[`Tiered pricing groups features into packages â commonly labeled something like Starter, Growth, and Enterprise â with each tier unlocking additional functionality at a higher price point. This model is popular because it simplifies the buying decision into a small number of clear choices, and it lets vendors capture more revenue from customers who need advanced features without requiring granular, complicated pricing for every individual feature.`,`The frustration buyers commonly run into is needing just one feature from a higher tier â say, advanced reporting or SSO â and being forced to upgrade the entire plan, often at a substantially higher price, just to access it. Before accepting a tier upgrade for a single feature, it is worth asking the vendor directly whether that specific feature can be added standalone or through a smaller add-on, since sales teams do not always volunteer this option upfront.`]),Y(`Comparing the Four Core Pricing Models`,[`Here is a side-by-side comparison of how the major pricing models behave across the factors that matter most to buyers.`],{table:{headers:[`Model`,`Predictability`,`Risk of Overpaying`,`Best Fit`],rows:[[`Per-seat`,`High`,`Unused/inactive seats`,`Teams where most users log in regularly`],[`Usage-based`,`Low to medium`,`Usage spikes during growth periods`,`Tools where value tracks volume, not headcount`],[`Tiered`,`High`,`Forced upgrades for one feature`,`Buyers who fit cleanly into a defined tier`],[`Hybrid`,`Medium`,`Complexity in forecasting combined costs`,`Larger orgs needing both seats and usage flexibility`]]}}),Y(`Hybrid Pricing: The Increasingly Common Middle Ground`,[`Many SaaS vendors have moved toward hybrid pricing that combines a base platform or per-seat fee with usage-based charges layered on top for specific high-cost features, particularly AI functionality. A CRM might charge a standard per-seat fee for the core product but bill separately for AI-generated content credits or advanced automation runs beyond a certain volume. This lets vend
22ors keep a predictable base price while still capturing additional revenue from heavy users of premium features.`,`For buyers, hybrid pricing requires the most careful modeling of the four approaches, since your total cost depends on both your headcount and your usage pattern for the add-on features. It is worth explicitly asking a vendor for a full cost breakdown showing the base fee plus a realistic estimate of usage-based add-ons at your expected volume, rather than accepting a quoted starting price that only reflects the base tier.`]),Y(`How to Model Cost Before You Sign`,[`Regardless of pricing model, the single most useful exercise before signing any SaaS contract is modeling your expected cost not just at today's usage or headcount, but at roughly double and five times that level. This reveals whether a pricing model that looks attractive today will still make sense as your company grows, or whether you are signing up for a structure that gets dramatically more expensive at scale in a way that is hard to walk back once the tool is embedded in your operations.`],{bullets:[`Ask vendors directly for pricing at 2x and 5x your current usage or seat count before signing.`,`Request your busiest historical month's usage data if evaluating a usage-based tool, not just an average month.`,`Clarify whether any tier upgrade can be avoided by purchasing a specific feature as a standalone add-on.`]}),Y(`Negotiating Regardless of the Model`,[`Almost every SaaS pricing model has more flexibility than the public pricing page suggests, particularly for annual commitments or contracts above a certain size. Vendors would generally rather offer a discount than lose a deal, so it is always worth asking for better terms, longer trial periods, or price locks that protect you from mid-contract increases, especially if you are willing to commit to a longer term or pay annually upfront. The published price is frequently a starting point for negotiation rather than a fixed number, particularly once a deal moves beyond the smallest self-serve tier.`,`Timing also matters more than most buyers realize. Sales reps are typically working toward monthly or quarterly quotas, and deals signed in the final days of a vendor's fiscal quarter often get more favorable terms simply because the rep has an incentive to close before the period ends. If your timeline has any flexibility, asking your sales contact directly when their quarter or fiscal year closes, and aiming to finalize the contract in that window, can be worth a meaningful discount for no extra effort on your part.`]),Y(`Annual vs. Monthly Billing: The Discount and the Risk`,[`Nearly every SaaS pricing model offers a discount, typically in the 10-20% range, for paying annually upfront instead of month to month. This is a straightforward trade: the vendor gets committed cash flow and lower churn risk, and you get a lower effective price in exchange for locking in for a year. For tools you are confident you will keep using and whose usage is stable, annual billing is usually the better financial choice.`,`The risk of annual billing shows up when a tool turns out to be a poor fit a few months in, or when your usage pattern shifts significantly and the pricing model no longer favors you. Before committing annually, it is worth negotiating an early-termination or downgrade clause, particularly for a new vendor relationship without a long track record on your team, so a bad fit does not lock you into paying for a full year of a tool nobody is using.`]),Y(`Reading a Pricing Page Like a Buyer, Not a Marketer`,[`SaaS pricing pages are marketing documents first and informational documents second, and understanding a few common patterns helps you see past the framing to the actual cost structure underneath. Anchoring is one of the most common tactics: displaying an expensive enterprise tier prominently makes a mid-tier plan look like a bargain by comparison, even if that mid-tier plan is still more than you need.`,`It is also worth watching for features quietly excluded from lower tiers that most buyers assume are standard, such as basic integrations, data export, or reasonable API rate limits. A plan that looks inexpensive on the surface can become considerably more expensive once you add the specific features your team actually needs to do the job, so it is worth mapping your must-have feature list against each tier before comparing sticker prices across vendors.`],{bullets:[`List your must-have features first, then check which tier actually includes all of them, rather than comparing tiers by price alone.`,`Ask specifically about data export and API rate limits on lower tiers â these are commonly restricted in ways that only become apparent after you are already using the tool.`,`Treat a prominently displayed enterprise tier as a comparison anchor, not necessarily a reflection of what most customers actually pay.`]}
22)],faqs:[{q:`What is the most common SaaS pricing model?`,a:`Per-seat pricing remains the most common model for collaboration, project management, and CRM tools, though usage-based and hybrid models are growing quickly, particularly for AI features.`},{q:`Why do some SaaS companies charge based on usage instead of seats?`,a:`Usage-based pricing lets vendors align cost more directly with the value a customer receives and offer a lower entry price to smaller customers while still capturing more revenue from larger ones.`},{q:`Can I negotiate SaaS pricing, or is it fixed?`,a:`Published pricing is frequently negotiable, especially for annual contracts or deals above the smallest self-serve tier; it is generally worth asking for a discount or better terms directly.`},{q:`How do I avoid overpaying with per-seat pricing?`,a:`Regularly audit actual login activity against your paid seat count and remove or downgrade unused seats at renewal, since inactive seats are the most common source of wasted spend.`},{q:`What should I ask a vendor about usage-based pricing before signing?`,a:`Ask what your bill would have looked like during your busiest month over the past year, not just an average month, to understand the realistic ceiling on your costs.`},{q:`Is hybrid pricing better or worse for buyers than a single model?`,a:`It depends on your usage pattern; hybrid pricing offers flexibility but requires more careful cost modeling since your total bill depends on both headcount and usage of specific features.`}],relatedSoftware:[`hubspot`,`quickbooks`,`xero`,`mailchimp`,`activecampaign`,`zoho-crm`]}],Zh=[{slug:`best-productivity-apps`,title:`Best Productivity Apps for Teams That Actually Ship Work`,description:`A practical comparison of the productivity apps that actually move projects forward, from task managers to docs and time trackers.`,category:`productivity`,tags:[`Productivity`,`Comparison`],author:`sophie-tremblay`,published:`2026-02-04`,updated:`2026-04-18`,readingTime:7,intro:`Every team says it wants to be more productive, but most productivity software gets abandoned within a few months because it adds process without removing friction. The teams that actually ship work consistently share one habit: they pick a small number of tools that cover task tracking, documentation, and communication, and they use those tools religiously instead of chasing the newest app. This guide walks through the productivity apps worth considering in 2026, what each one is genuinely good at, and where they tend to fall short once a team grows past a handful of people.`,keyTakeaways:[`The best productivity stack is usually two or three tools used consistently, not five tools used half-heartedly.`,`Task managers like ClickUp and Asana solve different problems than docs tools like Notion â most teams need both.`,`Time tracking only pays off when it's tied to a real business need like billing or capacity planning.`,`Onboarding and habit-forming matter more than feature count when choosing a productivity app.`,`Re-evaluate your stack every 12â18 months as team size and workflows change.`],sections:[Y(`What 'productivity software' actually means in 2026`,[`Productivity software used to mean a to-do list app on your desktop. Today it spans task and project management, collaborative docs, time tracking, note-taking, and increasingly AI-assisted writing and summarization. That breadth is useful, but it also means teams often buy overlapping tools without realizing it â a project manager in ClickUp, meeting notes in Notion, and a separate time tracker, none of which talk to each other.`,`Before comparing individual apps, it helps to separate productivity software into three functional buckets: work tracking (tasks, projects, deadlines), knowledge management (docs, wikis, notes), and time and capacity (tracking hours, workload, and availability). Most teams need at least one tool from the first two buckets. The third is optional and depends heavily on whether you bill clients by the hour or need utilization data for planning.`,`The mistake we see most often is treating productivity software as a single category and buying an all-in-one platform to cover everything. All-in-one tools like ClickUp genuinely try to do this, and they do it reasonably well, but they ask teams to change several habits at once. Point solutions like Trello for tasks and Notion for docs ask for smaller behavior changes and tend to stick better with teams under 20 people.`]),Y(`Task and project trackers: ClickUp, Asana, Trello, monday`,[`ClickUp positions itself as the app that replaces everything else â tasks, docs, goals, chat, and even basic time tracking live inside one workspace. That ambition is its b
22iggest strength and its biggest risk: teams that invest the time to configure it well get an impressively unified system, but teams that don't invest that time end up with a cluttered, half-used tool. It's best suited to ops-minded teams willing to spend a few weeks on setup.`,`Asana is the more polished, opinionated alternative. Its timeline and workload views are excellent for teams juggling multiple projects with shared resources, and its automation rules are approachable for non-technical users. Asana tends to cost more per seat than Trello or ClickUp at comparable tiers, and lighter teams sometimes find its structure more than they need.`,`Trello remains the simplest entry point, and simplicity is genuinely a feature, not a limitation, for small teams or single-project use cases. Its board-and-card model is easy to explain to anyone in five minutes, and Power-Ups extend it modestly without turning it into a different product. monday.com sits between these options with a strongly visual, colorful interface that appeals to marketing and creative teams, plus solid integrations, though its pricing tiers can climb quickly as you add users and features.`],{bullets:[`ClickUp: best for teams that want one tool to replace many, given setup time`,`Asana: best for cross-project timelines and resource planning`,`Trello: best for simplicity and small teams`,`monday: best for visual, marketing-style workflows`]}),Y(`Docs and knowledge tools: Notion, Airtable, and the wiki question`,[`Notion has become the default choice for teams that want a flexible home for documentation, meeting notes, and lightweight databases in one place. Its block-based editor is intuitive, and its database views (tables, boards, calendars) let teams build simple internal tools without engineering help. The tradeoff is that Notion's flexibility can turn into disorganization if no one owns the structure â pages sprawl, and search gets noisy without periodic cleanup.`,`Airtable overlaps with Notion but leans further into structured data. If your 'documentation' is really more like a database â a content calendar, an inventory list, a CRM-lite for partnerships â Airtable's spreadsheet-meets-database model handles that more cleanly than Notion's blocks. Many teams end up using both: Notion for narrative documentation and onboarding material, Airtable for structured operational data.`,`Whichever tool you choose, appoint someone to own information architecture. A knowledge base with no clear owner degrades within a year regardless of which software underlies it â this is a governance problem more than a software one, and no app fully solves it out of the box.`]),Y(`Time tracking and capacity tools`,[`Time tracking is the most polarizing category in productivity software. Client-services businesses that bill hourly need it to run payroll and invoicing accurately, and it's non-negotiable there. Product and engineering teams, on the other hand, often find time tracking adds overhead without insight, since story points or delivery dates are better signals of progress than hours logged.`,`If you do need time tracking, look for tools that integrate directly with your task manager so people aren't duplicating entries across two systems. Standalone time trackers still have a place for freelancers and small agencies, but for teams already using ClickUp or Asana, the built-in or tightly integrated time tracking is usually good enough and avoids a second login.`]),Y(`Comparing the leading productivity platforms`,[`The table below summarizes how the major players stack up on the dimensions that matter most when choosing a primary tool: ease of adoption, depth of features, and typical pricing at time of writing. Treat the pricing figures as directional; most of these vendors adjust tiers and included seats a few times a year.`],{table:{headers:[`Tool`,`Best for`,`Learning curve`,`Starting price (per seat/mo)`],rows:[[`ClickUp`,`All-in-one replacement`,`Moderateâhigh`,`Free tier; paid from ~$7`],[`Asana`,`Cross-project timelines`,`Moderate`,`Free tier; paid from ~$11`],[`Trello`,`Simple boards`,`Low`,`Free tier; paid from ~$5`],[`monday`,`Visual workflows`,`Moderate`,`From ~$9`],[`Notion`,`Docs and light databases`,`Lowâmoderate`,`Free tier; paid from ~$8`]]}}),Y(`How to actually pick a stack instead of collecting apps`,[`Start by listing the three or four workflows your team repeats every week â sprint planning, client reporting, content calendars, whatever they are â and map which tool covers each one, rather than starting from a feature list. If two tools can each cover the same workflow, pick the one your team already has some familiarity with; switching costs are real and often underestimated.`,`Run a genuine 30-day trial with a real project, not a demo sandbox. Productivity tools look fine in a five-minute walkthrough; the friction shows up in week two once notifications, permissions, and edge cases start piling up. Ask the two or three people who will use the tool most to give a plain thumbs up or down before you commit to an annual plan.`],{bullets:[`Map workflows to tools before comparing features`,`Trial with a real project for at least 30 days`,`Get buy-in from actual daily users, not just managers`,`Revisit the stack annually rather than switching reactively`]}),Y(`Common mistakes that undermine productivity software`,[`The single biggest mistake is rolling out a new tool without retiring the old one. If Slack messages, email threads, and the new task manager are all valid places to assign work, people will use whichever is easiest in the moment, and adoption of the new tool stalls. Announce a clear cutover date and stick to it.`,`The second mistake is over-customizing before anyone has used the tool day-to-day. Elaborate custom fields, statuses, and automations designed in a vacuum rarely survive contact with real work; it's better to start with defaults and add complexity only when a specific recurring pain point justifies it.`]),Y(`When to bring in an all-in-one platform vs. best-of-breed tools`,[`All-in-one platforms make the most sense when your team is small enough that one admin can own configuration, or when leadership specifically wants a single source of truth for reporting across departments. Best-of-breed combinations make more sense once teams specialize â engineering wants Jira, marketing wants Asana, and forcing everyone onto one tool creates more friction than it saves.`,`There's no universally correct answer here, and vendors on both sides will tell you otherwise. The honest framework is to ask how much cross-team visibility you actually need versus how much each team benefits from a tool built for its specific workflow, then weigh that against the operational cost of maintaining integrations between separate systems.`])],faqs:[{q:`What's the single best productivity app for a small team?`,a:`For teams under 10 people, a simple c
22ombination of Trello for tasks and Notion for docs covers most needs without demanding much setup time. Move to Asana or ClickUp once you have multiple concurrent projects that need cross-visibility.`},{q:`Do we really need a separate time tracking tool?`,a:`Only if you bill clients hourly or need utilization data for capacity planning. If neither applies, time tracking often adds overhead without meaningfully improving output.`},{q:`How many productivity tools should a team use at once?`,a:`Two or three used consistently beats five used sporadically. A task tracker, a docs tool, and a communication tool cover the vast majority of team needs.`},{q:`Is ClickUp worth the setup time compared to simpler tools?`,a:`It can be, if you have someone willing to own configuration for a few weeks and your team genuinely wants one unified workspace. Teams without that bandwidth are usually better off with simpler, single-purpose tools.`},{q:`How often should we re-evaluate our productivity stack?`,a:`Roughly once a year, or whenever team size roughly doubles. Tools that worked well for 8 people often show cracks at 25.`},{q:`What's the biggest reason productivity software rollouts fail?`,a:`Not retiring the old way of working. If email and Slack are still valid places to assign tasks, people will default to whichever is easiest, and the new tool never gets fully adopted.`}],relatedSoftware:[`clickup`,`asana`,`trello`,`monday`,`notion`]},{slug:`improve-team-collaboration`,title:`How to Improve Team Collaboration With the Right Software Stack`,description:`A practical guide to building a collaboration stack that actually reduces friction for hybrid and remote teams, without adding meeting overload.`,category:`collaboration`,tags:[`Collaboration`,`Remote Work`,`How To`],author:`elena-marks`,published:`2026-01-22`,updated:`2026-05-02`,readingTime:7,intro:`Poor collaboration rarely comes from a lack of tools â most teams already have a chat app, a video conferencing tool, and a shared drive. It comes from unclear norms about which tool is used for what, and from software that adds coordination overhead instead of removing it. This guide covers how to think about a collaboration stack for hybrid and remote teams, the tools worth considering for each layer of communication, and the habits that matter more than any individual app.`,keyTakeaways:[`Collaboration problems are usually process problems disguised as tool problems.`,`Separate synchronous tools (video, chat) from asynchronous tools (docs, project trackers) and be deliberate about which workflows use which.`,`Slack and Microsoft Teams solve similar problems but fit different existing ecosystems â pick based on what you already use, not features alone.`,`Over-reliance on meetings is usually a symptom of weak documentation practices, not a scheduling problem.`,`A written communication charter prevents more collaboration friction than any single piece of software.`],sections:[Y(`Why 'more tools' rarely fixes collaboration`,[`When collaboration breaks down, the instinctive response is to add another tool: a new chat channel, another shared doc, an extra sync meeting. In practice this usually makes things worse because it adds another place information can live, and another place people have to check to stay in the loop. The teams that collaborate best tend to have fewer tools, used with clearer norms, rather than more tools layered on top of each other.`,`It helps to separate collaboration needs into two categories: synchronous work that benefits from real-time back-and-forth, like brainstorming or sensitive conversations, and asynchronous work that benefits from written clarity and time to think, like status updates or te
22chnical decisions. Most teams default to synchronous tools â meetings and chat â for things that would work better asynchronously, which is a major source of both meeting fatigue and Slack overload.`,`The right software stack makes it easy to do async work well, so synchronous time can be reserved for the conversations that actually need it. That reframing matters more than any specific product choice, and it's worth discussing as a team before shopping for new tools.`]),Y(`Chat and messaging: Slack vs Microsoft Teams`,[`Slack remains the preferred chat tool for teams that value a clean, fast interface and a large ecosystem of third-party integrations. Its channel model is intuitive, threading works reasonably well once people adopt the habit, and its search is generally strong for finding past conversations. Slack's pricing is per-seat and can add up for larger organizations, and it's a standalone tool rather than part of a broader office suite.`,`Microsoft Teams makes the most sense for organizations already standardized on Microsoft 365, since it's bundled with many business plans and integrates tightly with Outlook, SharePoint, and Office apps. Its chat experience has improved substantially but still feels slightly less polished than Slack's to teams that have used both. For IT departments managing a Microsoft-centric environment, the bundling and single-vendor security model are often decisive.`,`Neither tool is objectively better; the right choice depends heavily on what your organization already runs. Switching from one to the other purely for feature differences is rarely worth the disruption unless your current tool is causing a specific, well-defined problem.`]),Y(`Video conferencing and synchronous meetings`,[`Zoom remains a strong default for external meetings and larger webinars because of its reliability and broad familiarity â clients and partners rarely need onboarding to join a Zoom call. Microsoft Teams and Slack huddles serve internal meetings well, especially for organizations already living inside those ecosystems, avoiding the friction of switching apps for a quick sync.`,`The bigger issue for most teams isn't which video tool to use, it's how many meetings get scheduled by default. A useful discipline is to require that any recurring meeting have a stated purpose and a default 25- or 50-minute length instead of 30 or 60, which naturally creates a buffer and discourages meetings scheduled purely to fill a calendar slot.`]),Y(`Shared documents and knowledge bases`,[`Google Workspace and Microsoft 365 both offer collaborative document editing that has become table stakes â real-time co-editing, comments, and version history are expected features, not differentiators anymore. The decision between them usually comes down to which suite the rest of your software (calendar, email, identity/login) is already built around.`,`Notion and Airtable serve a complementary role as more flexible knowledge bases for things that don't fit neatly into a traditional document â onboarding wikis, project trackers, or internal databases. Many teams run Google Workspace or Microsoft 365 for documents and email, plus Notion for internal knowledge management, which is a reasonable and common combination.`,`Whatever combination you choose, the collaboration payoff comes from consistent structure: a predictable place for meeting notes, a predictable naming convention, and a designated owner for keeping the knowledge base current. Software can't create that discipline on its own.`]),Y(`Comparing the core collaboration stack options`,[`The table below compares the main building blocks of a collaboration stack across the dimensions that matter for hybrid teams: whether it's better for sync or async work, and how it typically fits into a broader ecosystem.`],{table:{headers:[`Tool`,`Primary use`,`Sync or async`,`Ecosystem fit`],rows:[[`Slack`,`Team chat`,`Sync-leaning, some async via threads`,`Standalone, integrates broadly`],[`Microsoft Teams`,`Chat + video`,`Sync-leaning`,`Microsoft 365`],[`Zoom`,`Video meetings`,`Sync`,`Standalone`],[`Notion`,`Docs + wiki`,`Async`,`Standalone`],[`Google Worksp
22ace`,`Docs + email`,`Both`,`Google ecosystem`]]}}),Y(`Writing a communication charter`,[`A communication charter is a short, written document â often a single page â that spells out which tool is used for what kind of message, and how quickly people are expected to respond. It sounds bureaucratic, but in practice it eliminates a huge amount of ambiguity: is a decision final if it's only mentioned in a meeting, or does it need to be written down somewhere? Should urgent issues go to Slack DM, a specific channel, or a phone call?`,`Effective charters are short and specific rather than exhaustive. A good starting template covers: where daily standups or updates live, what counts as urgent enough for a DM versus a channel post, expected response time windows across time zones, and where final decisions get documented so they don't get lost in chat history.`],{bullets:[`Define urgent vs. non-urgent channels explicitly`,`State expected response windows, especially across time zones`,`Designate where final decisions get written down`,`Review and update the charter every few months as the team grows`]}),Y(`Special considerations for distributed and async-first teams`,[`Fully distributed teams spanning multiple time zones benefit disproportionately from strong async habits, since synchronous meetings are harder to schedule fairly and someone is always attending at an inconvenient hour. Tools like Notion or Confluence-style wikis become more important here than chat, because written updates let people in different time zones stay aligned without needing to be online simultaneously.`,`Loom-style async video updates are also worth considering for distributed teams â a five-minute recorded walkthrough often communicates nuance that a written status update misses, without requiring everyone to be present at the same time. This is a smaller category than chat or docs tools, but it's growing quickly among remote-first companies.`]),Y(`Matching tools to team function, not just team size`,[`A ten-person customer support team and a ten-person product team have very different collaboration needs, even though headcount is identical. Support teams live in real-time queues and need chat and ticketing tools tuned for fast response, while product teams often do their best work with long stretches of uninterrupted focus punctuated by fewer, more substantive syncs. Applying the same collaboration stack to both groups because 'that's what the company uses' tends to under-serve one of them.`,`Sales teams typically need tight integration between their CRM and communication tools, since deal context needs to travel with the conversation â a Slack thread or email that isn't logged against the right account creates real handoff risk. Engineering teams, by contrast, often prefer to keep code-adjacent discussion inside pull requests and issue trackers rather than chat, because decisions tied to a specific commit are easier to find later in the tracker than
22in a scrollback.`,`When auditing a collaboration stack, it's worth going function by function rather than assuming one size fits the whole company. A short interview with a lead from each function â asking where decisions actually get made and where they get lost â usually surfaces mismatches faster than a company-wide survey.`]),Y(`Measuring whether collaboration is actually improving`,[`Most teams roll out a new stack and never revisit whether it worked, partly because collaboration is hard to measure directly. Rather than trying to quantify 'collaboration' as a single number, track a handful of proxy signals: how often people say in retros that they were blocked waiting on someone else, how many decisions get re-litigated because they weren't documented the first time, and whether new hires report feeling oriented within their first two weeks.`,`A simple quarterly pulse survey with two or three specific questions â not a generic satisfaction score â tends to be more actionable than trying to instrument tool usage analytics. Questions like 'did you know where to find the answer to your last blocking question' or 'how many meetings this week felt like they could have been an async update' give concrete signals leadership can act on, rather than a vague sense that things feel better or worse.`,`Treat the results as an input to iterate on the communication charter and tool choices, not as a one-time verdict. Collaboration needs shift as teams grow, reorganize, or add new time zones, so what worked at 15 people frequently needs revisiting at 40.`],{bullets:[`Track blocked-waiting mentions in retros as a leading indicator`,`Watch for decisions being re-litigated due to poor documentation`,`Ask new hires directly how oriented they felt in their first two weeks`,`Run a short, specific pulse survey quarterly rather than a generic satisfaction score`]}),Y(`Rolling out a new collaboration stack without disruption`,[`When introducing a new tool or changing norms, give the team a specific transition window â typically two to four weeks â during which both old and new systems are acknowledged, followed by a hard cutover date. Announcing a change and expecting instant adoption without a transition period is one of the most common reasons new collaboration tools stall.`,`Finally, measure adoption qualitatively before declaring success. Usage metrics like message counts or logins can be misleading; what matters is whether people report feeling less confused about where information lives and less overloaded by unnecessary meetings, which is best gathered through a short survey a month after rollout.`])],faqs:[{q:`Should we use Slack or Microsoft Teams?`,a:`Base the decision on what your organization already runs. If you're on Microsoft 365, Teams' bundling and integration usually outweigh Slack's slightly more polished interface; if you're not tied to Microsoft, Slack's ecosystem and search are often preferred.`},{q:`How do we reduce meeting overload without a tool change?`,a:`Require a stated purpose for every recurring meeting and default to shorter time slots, which naturally discourages filler meetings. This is a process fix, not a software fix.`},{q:`What is a communication charter and do we really need one?`,a:`It's a short document defining which tool is used for what type of message and expected response times. Teams larger than about 10 people, or any distributed team, benefit significantly from having one written down.`},{q:`Is Notion a replacement for Google Docs or Microsoft Word?`,a:`Not exactly â Notion is better for flexible internal knowledge bases and lightweight databases, while Google Docs or Word remain stronger for formal documents needing precise formatting and external sharing.`},{q:`How do distributed teams collaborate across time zones effectively?`,a:`By leaning more heavily on async tools like wikis and recorded video updates rather than trying to schedule synchronous meetings that always disadvantage someone's working hours.`},{q:`How long should a rollout of a new collaboration tool take?`,a:`Plan for a two- to four-week transition period with a clear cutover date, rather than expecting instant adoption. Measure success with a short survey afterward, not just usage counts.`}],relatedSoftware:[`slack`,`ms-teams`,`zoom`,`notion`,`google-workspace`,`microsoft-365`]},{slug:`software-buying-checklist`,title:`The SaaS Software Buying Checklist: 40 Questions Before You Sign`,description:`A comprehensive procurement checklist covering security, pricing, integrations, and support to ask before signing any SaaS contract.`,category:`business-intelligence`,tags:[`Buying Guide`,`Procurement`,`Checklist`],author:`raj-patel`,published:`2026-03-11`,updated:`2026-06-09`,readingTime:8,intro:`Buying SaaS software has gotten easier in some ways â self-serve trials, transparent pricing pages, and public reviews mean you rarely go in blind. But it's also gotten riskier, since more tools now hold sensitive data, connect to critical systems via API, and lock in usage patterns that are expensive to unwind later. This checklist organizes the questions worth asking before signing any SaaS contract into seven categories, from basic fit to security and contract terms, so procurement doesn't get reduced to comparing homepage pricing tables.`,keyTakeaways:[`Most SaaS buying mistakes come from skipping questions about renewal terms and data portability, not from picking the 'wrong' feature set.`,`Security and compliance questions matter even for small tools if they touch customer or financial data.`,`Always ask what happens to your data if you cancel â the answer is often buried in the terms of service.`,`Involve the people who will actually use the tool daily in the evaluation, not just the budget owner.`,`A short pilot with real data reveals more than any sales demo.`],sections:[Y(`Start with fit, not features`,[`The first mistake in most SaaS purchases is starting with a feature comparison spreadsheet before anyone has agreed on what problem the tool needs to solve. Before evaluating any vendor, write down the specific workflow or pain point driving the purchase, and who will actually be affected by the change. This sounds obvious, but it's skipped constantly, especially when a tool is purchased because a competitor or peer company uses it.`,`Ask whether the problem is actually a software problem at all. A surprising number of 'we need a new tool' conversations are actually process problems â unclear ownership, inconsistent workflows â that a new tool will not fix and may even worsen by adding another system to maintain.`,`Once the problem is clearly defined, list the two or three tools that plausibly solve it and resist the urge to demo ten options. A focused evaluation of three vendors, done thoroughly, beats a shallow look at ten.`]),Y(`Pricing and total cost of ownership questions`,[`List pricing looks simple until you start asking what's actually included. Does the advertised per-seat price include the features you need, or are they gated behind a higher tier? Are there separate charges for API access, additional storage, or premium support that aren't visible on the main pricing page?`,`Ask what happens as you scale: does the price per seat decrease at volume, or does it stay flat while add-ons multiply? Many vendors offer meaningful volume discounts that are only available if you ask directly rather than accepting the self-serve price for a large team.`,`Also clarify billing cadence and currency handling if you operate internationally, and ask specifically about price increases at renewal â some vendors reserve the right to raise prices annually by an unspecified percentage, which is worth negotiating a cap on before signing.`],{bullets:[`What exactly is included at each pricing tier?`,`Are there hidden costs for API access, storage, or premium support?`,`Is there a volume discount, and is it available without asking?`,`What is the renewal price increase policy?`]}),Y(`Security, compliance, and data handling`,[`Even for tools that seem low-risk, ask where data is hosted and stored, and whether the vendor supports single sign-on (SSO) and role-based access control, especially if the tool will be used company-wide. For any tool touching customer, financial, or health data, ask directly about SOC 2 Type II reports, GDPR compliance if you operate in the EU, and whether they'll sign a data processing agreement.`,`Ask specifically what encryption is used both at rest and in transit, and whether the vendor has had any publicly disclosed security incidents. A vendor's willingness to answer these questions clearly and quickly is itself informative â evasiveness on security questions is a red flag regardless of the specific answer.`,`Finally, ask about data residency if your industry or region has specific requirements. Some vendors host all customer data in a single region regardless of where your company is based, which can create compliance issues that aren't obvious until an audit.`]),Y(`Integration and technical fit`,[`Confirm the tool has native integrations with your existing systems â CRM, accounting, communication tools â rather than requiring a middleware layer like Zapier for core workflows. Native integrations tend to be more reliable and get updated alongside the core product, while third-party connectors can break silently when either side changes its API.`,`Ask about API access and rate limits if you plan to build custom integrations, and check whether the API is documented publicly or only available on higher-tier plans. Also ask about single sign-on support, since retrofitting SSO into a tool your team already uses widely is a much b
22igger project than confirming support up front.`]),Y(`Support, onboarding, and implementation`,[`Ask what onboarding actually looks like: is there a dedicated implementation specialist, self-serve documentation only, or a paid onboarding package required to get started properly? For tools that will be used by an entire department, a lack of structured onboarding support is a meaningful cost even if the software itself is inexpensive.`,`Clarify support channels and response time commitments, and check whether these are contractual SLAs or just aspirational targets mentioned on the website. Ask what tier of support is included by default versus what requires an add-on, since basic email-only support with multi-day response times can be a serious problem for tools tied to daily operations.`]),Y(`Contract terms and exit strategy`,[`Before signing, read the cancellation and refund terms carefully, and ask directly what happens to your data if you cancel: is it exportable, in what format, and for how long is it retained afterward? Vendors that make data export difficult or slow are effectively creating lock-in, and it's worth negotiating better terms or choosing a different vendor if this can't be resolved.`,`Check the contract length and auto-renewal terms â many SaaS contracts auto-renew annually unless canceled within a specific window, sometimes as short as 30 or 60 days before renewal. Set a calendar reminder well ahead of that window regardless of how satisfied you are with the tool at signing time.`],{bullets:[`Can you export your data in a usable format if you cancel?`,`What is the auto-renewal notice window?`,`Are there early termination fees?`,`Is pricing locked for the contract term or subject to change?`]}),Y(`Evaluating vendor stability and roadmap risk`,[`A tool can pass every feature and security check and still be a bad bet if the vendor behind it is unstable. Ask how long the company has been operating at its current size, whether it's raised funding recently or is approaching a runway concern, and whether it's been acquired or is likely to be â acquisitions frequently lead to pricing changes, feature deprecations, or a slower roadmap while teams integrate.`,`For smaller or newer vendors, ask directly what happens to your account and data if the company shuts down or is acquired, and whether they offer any contractual data escrow or export guarantee in that scenario. It's an uncomfortable question to ask a salesperson, but a vendor confident in their trajectory will usually answer it directly rather than deflecting.`,`Also look at the product roadmap and release cadence over the past year, not just the next quarter's promises. A vendor that has shipped meaningful improvements consistently is a better bet than one relying heavily on a roadmap slide full of features that have been 'coming soon' for several quarters.`]),Y(`Legal and procurement review beyond the pricing page`,[`Once a tool has cleared the practical checks, route the contract through whoever owns legal and procurement review at your company, even for smaller purchases â liability caps, indemnification clauses, and data ownership language matter more than most buyers assume, and they're easy to overlook when a deal is moving quickly at quarter-end.`,`Ask specifically who owns the data you put into the tool, particularly for AI-enabled products: is your data used to train the vendor's models, and can you opt out? This has become one of the most consequential and most frequently skipped questions in SaaS procurement over the last few years, as more vendors bake AI features into products that previously had none.`,`Finally, confirm liability limits are proportionate to the risk the tool actually carries. A tool handling sensitive customer data should carry liability terms that reflect that risk; a boilerplate limit copied from a low-risk internal tool's contract is a sign the agreement wasn't tailored to your use case.`],{bullets:[`Route every contract through legal review, not just larger purchases`,`Ask whether your data is used to train the vendor's AI models`,`Check that liability caps are proportionate to the data risk involved`,`Confirm indemnification terms cover realistic failure scenarios`]}),Y(`Running a real pilot before committing`,[`A sales demo shows a tool at its best, with clean sample data and a guided path. A real pilot, using your actual data and your actual team for two to four weeks, reveals the friction points a demo never will â confusing permissions, missing edge cases, or workflows that require more clicks than expected.`,`Involve the people who will use the tool daily in the pilot, not just the manager who initiated the purchase. Their feedback on day-to-day usability is often more predictive of long-term adoption than any feature comparison, and getting their buy-in before signing reduces the risk of an expensive tool going unused six months later.`]),Y(`Putting it together: a condensed checklist`,[`The table below groups the highest-priority questions from each category into a condensed reference you can walk through with any vendor before signing. It's not exhaustive â the full checklist runs to roughly 40 questions across security, pricing, integrations, and contract terms â but it covers the areas most likely to cause regret if skipped.`],{table:{headers:[`Category`,`Key question to ask`,`Why it matters`],rows:[[`Fit`,`What specific problem does this
22solve, and for whom?`,`Prevents buying tools that don't address a real workflow`],[`Pricing`,`What's excluded from the advertised price?`,`Avoids surprise costs at scale`],[`Security`,`Do you have a SOC 2 report and DPA available?`,`Critical for any tool touching sensitive data`],[`Integrations`,`Is the integration native or via middleware?`,`Native integrations are more reliable long-term`],[`Contract`,`What's the data export process if we cancel?`,`Prevents vendor lock-in`]]}})],faqs:[{q:`How long should a SaaS pilot run before committing?`,a:`Two to four weeks with real data and real daily users is usually enough to surface meaningful friction points that a sales demo won't reveal.`},{q:`Do small teams need to ask about SOC 2 compliance?`,a:`Yes, if the tool touches customer, financial, or health data â company size doesn't reduce the compliance risk of a data breach.`},{q:`What's the most commonly overlooked question when buying SaaS?`,a:`What happens to your data if you cancel. Many buyers only discover a difficult or slow export process after they've already decided to leave.`},{q:`Should procurement or the end users make the final decision?`,a:`Both should be involved â procurement for contract and security terms, and daily users for usability, since their adoption determines whether the purchase was worthwhile.`},{q:`How do we negotiate better SaaS pricing?`,a:`Ask directly about volume discounts and price caps at renewal; many vendors offer better terms than the self-serve price but only when asked, especially for annual commitments.`},{q:`Is a native integration always better than a Zapier-style connector?`,a:`Usually yes for core, frequently used workflows, since native integrations are maintained alongside the core product and are less likely to break silently.`}],relatedSoftware:[`salesforce`,`hubspot`,`quickbooks`,`xero`,`slack`,`airtable`]},{slug:`salesforce-vs-hubspot`,title:`Salesforce vs HubSpot: Which CRM Fits Your Team in 2026?`,description:`A head-to-head comparison of Salesforce and HubSpot covering pricing, ease of use, customization, and which teams each platform actually suits.`,category:`crm`,tags:[`CRM`,`Comparison`],author:`marcus-alvarez`,published:`2026-02-27`,updated:`2026-06-20`,readingTime:8,featured:!0,intro:`Salesforce and HubSpot are the two names that come up in almost every CRM shortlist, and for good reason â both are mature, well-funded platforms with large ecosystems of integrations and partners. But they were built with different philosophies: Salesforce as a deeply customizable enterprise platform, HubSpot as an approachable, marketing-first system that grew into full CRM territory. Choosing between them isn't about which is 'better' in the abstract; it's about which philosophy matches your team's size, technical resources, and sales motion.`,keyTakeaways:[`Salesforce offers more customization and enterprise-grade depth, but usually requires admin resources or a consultant to configure well.`,`HubSpot is faster to launch and more approachable for smaller sales and marketing teams, with a well-liked free CRM tier.`,`Salesforce pricing can escalate quickly once you add clouds and add-ons; HubSpot's tiers are simpler but content and contact limits add cost as you scale.`,`Marketing-heavy organizations often lean HubSpot; complex, multi-department enterprises often lean Salesforce.`,`Many mid-market companies genuinely shortlist both and make the decision based on a hands-on trial rather than feature checklists alone.`],sections:[Y(`Two different starting philosophies`,[`Salesforce was built from the ground up as a platform, not just a product â its core CRM object model can be extended, customized, and connected to a vast ecosystem of clouds (Sales Cloud, Service Cloud, Marketing Cloud) and third-party apps via AppExchange. That flexibility is why large enterprises with complex, multi-department processes gravitate toward it: almost anything can be configured to match an existing workflow, given enough time and admin expertise.`,`HubSpot started as a marketing tool and grew outward
22into full CRM, sales, and service functionality, and that heritage still shows in its design. Its interface prioritizes approachability over configurability â most tasks can be done without an admin or consultant, and the learning curve for a new sales rep is meaningfully shorter than Salesforce's.`,`Neither philosophy is inherently correct; it depends on whether your organization has the technical resources to configure and maintain a highly customizable system, or would rather trade some configurability for speed of adoption. This distinction shapes almost every other difference between the two platforms.`]),Y(`Ease of use and time to value`,[`HubSpot's onboarding is generally faster: its free CRM tier lets a small sales team start tracking deals within a day, and the paid tiers layer on marketing and service functionality without a steep relearning curve. Sales reps who've never used a CRM before tend to become productive in HubSpot noticeably faster than in Salesforce.`,`Salesforce's setup, by contrast, is closer to implementing an ERP system than installing an app. Most mid-size and larger deployments involve a certified admin or an external consultant to configure objects, fields, and automation rules correctly, and that implementation cost â both time and money â is a real factor that's easy to underestimate when comparing subscription prices alone.`,`This doesn't mean Salesforce is poorly designed; it means its flexibility trades off against simplicity. Teams that need that flexibility find it worth the investment; teams that don't often find themselves paying for configuration complexity they never use.`]),Y(`Customization and platform depth`,[`Salesforce's customization depth is difficult to overstate â custom objects, complex approval workflows, and its low-code Flow builder let admins model almost any business process. For enterprises with unique sales cycles, multiple business units, or heavy compliance requirements, this depth is often the deciding factor, since off-the-shelf CRM logic rarely matches every internal process precisely.`,`HubSpot has significantly expanded its customization options in recent years, including custom objects and more flexible workflow automation, narrowing the gap for mid-market use cases. It still doesn't match Salesforce's ceiling for highly bespoke enterprise processes, but for the vast majority of small and mid-size sales teams, HubSpot's customization is more than sufficient and far faster to implement.`]),Y(`Pricing structure and total cost`,[`HubSpot's pricing is organized into hubs â Marketing, Sales, Service, CMS, Operations â each with its own tiers, plus a free CRM tier that covers basic contact and deal tracking. Costs scale with both seat count and marketing contact volume, which means marketing-heavy usage can get expensive faster than sales-only usage, something to model carefully before committing to an annual plan.`,`Salesforce's pricing starts per user per month for its core Sales or Service Cloud, but the final bill often includes add-ons for automation, advanced reporting, or additional clouds, plus implementation costs that don't show up on the pricing page at all. Organizations evaluating Salesforce should budget for both the license and a realistic implementation cost rather than comparing only the advertised per-seat price against HubSpot's.`],{table:{headers:[`Dimension`,`Salesforce`,`HubSpot`],rows:[[`Best for`,`Complex, multi-department enterprises`,`Marketing-led, small-to-mid sales teams`],[`Setup time`,`Weeks to months, often with a consultant`,`Days to a few weeks, self-serve friendly`],[`Customization ceiling`,`Very high`,`High, improving, but lower than Salesforce`],[`Starting price`,`From ~$25/user/mo (core Sales Cloud)`,`Free CRM; paid hubs from ~$20/mo`],[`Implementation cost`,`Often significant for mid/large deployments`,`Typically low to moderate`]]}}),Y(`Marketing and service functionality`,[`HubSpot's marketing tools â email campaigns, landing pages, lead scoring, and reporting â are tightly integrated with its CRM data by design, since the platform grew from marketing outward. For companies where marketing and sales need to work from the exact same contact and deal records without heavy integration work, this native integration is a genuine advantage over bolting a separate marketing tool onto Salesforce.`,`Salesforce's Mar
22keting Cloud and Service Cloud are powerful but are essentially separate products that need to be integrated with Sales Cloud, which adds both cost and implementation complexity. Large enterprises with dedicated marketing operations teams often accept this tradeoff for the depth Marketing Cloud offers; smaller teams usually find HubSpot's native integration far more practical.`]),Y(`Integrations and ecosystem`,[`Salesforce's AppExchange is the largest CRM app marketplace by a wide margin, with thousands of listed integrations spanning nearly every business function, which matters for enterprises with specialized tooling needs. HubSpot's app marketplace is smaller but covers the integrations most small and mid-size businesses actually need â accounting tools like QuickBooks or Xero, communication tools like Slack, and e-commerce platforms like Shopify.`,`For most companies outside the enterprise segment, the practical difference in ecosystem breadth is smaller than the raw numbers suggest, since the long tail of Salesforce's AppExchange serves niche enterprise use cases that smaller teams rarely need.`]),Y(`AI features and reporting depth`,[`Both platforms have invested heavily in AI-assisted features over the past two years, though they show up differently. Salesforce's Einstein and Agentforce tools lean toward predictive scoring, workflow automation, and increasingly autonomous agents that can act on CRM data across its various clouds, reflecting the platform's broader enterprise-automation ambitions. HubSpot's AI features, branded under Breeze, focus more on content generation, lead prioritization, and summarizing activity for reps, matching its more approachable, sales-and-marketing-first orientation.`,`On reporting, Salesforce's native reporting and dashboard builder is powerful but has a real learning curve, and many enterprise teams end up layering a BI tool like Tableau (also owned by Salesforce) on top for anything beyond standard pipeline reports. HubSpot's reporting is more approachable out of the box and covers most small-to-mid-size teams' needs without additional tooling, though it has a lower ceiling for highly customized, cross-object analysis than Salesforce plus Tableau.`,`Neither platform's AI roadmap should be the deciding factor on its own â both are moving quickly, and standalone AI features are the part of any CRM most likely to change significantly within a contract term. Weigh them as a modest tiebreaker rather than a primary criterion.`]),Y(`Data migration and switching costs`,[`Moving a CRM is one of the more disruptive projects a sales organization can undertake, and it's worth weighing switching costs up front even if you're confident in your current pick. Migrating from HubSpot to Salesforce, or the reverse, typically involves mapping custom fields and objects, rebuilding automation and workflow rules from scratch since they rarely transfer directly, and retraining reps on a meaningfully different interface.`,`Budget real time for this: mid-market migrations commonly take six to twelve weeks including data cleanup, and larger, more customized Salesforce deployments can take considerably longer. Data quality issues that were tolerated in the old system â duplicate contacts, inconsistent stage naming, stale deals â tend to surface painfully during a migration, so a cleanup pass before migrating is usually worth the extra time.`,`Because switching is expensive in both money and disruption, it's worth erring toward the platform that fits your organization's trajectory for the next two to three years, not just its needs today. A fast-growing company that expects to add multiple departments and complex approval chains may be better served starting on Salesforce even if HubSpot would suffice today, simply to avoid a costly migration down the line.`]),Y(`Which teams should choose which platform`,[`Choose Salesforce if your organization has complex, multi-department sales processes, dedicated admin or IT resources to manage configuration, and a need for deep customization that off-the-shelf CRM logic won't satisfy. It's also the more common choice for large enterprises already standardized on the broader Salesforce ecosystem for customer service or other functions.`,`Choose HubSpot if you're a small-to-mid-size team that wants to be productive quickly, especially if marketing and sales need to share the same data without heavy integration work. Its free CRM tier also makes it a low-risk starting point for early-stage companies that aren't ready to commit budget to a CRM platform.`],{bullets:[`Salesforce: complex processes, dedicated admin resources, deep customization needs`,`HubSpot: fast setup, marketing-sales alignment, smaller technical teams`,`Both: worth a hands-on trial with your own sample data before deciding`,`Budget for Salesforce implementation costs beyond the sticker price`]}),Y(`Making the final call`,[`Feature comparisons only go so far with tools this mature â both platforms can technically do most of what a typical sales team needs. The more useful exercise is a structured trial: import a real (anonymized, if needed) sample of your pipeline into each platform and have your actual sales team run a week of real deal management in both, rather than sitting through vendor demos alone.`,`Pay close attention to how each platform feels for the reps who will use it daily, not just for the sales ops or IT person configuring it. A CRM that reps avoid updating because it's clunky is worse than a simpler tool used consistently, regardless of which platform has the deeper feature set on paper.`])],faqs:[{q:`Is HubSpot cheaper than Salesforce overall?`,a:`Usually yes for small-to-mid-size teams, especially once you factor in Salesforce's implementation costs, though HubSpot's marketing hub pricing can climb quickly with large contact lists.`},{q:`Can HubSpot handle complex enterprise sales processes?`,a:`It's improved significantly and can handle many mid-market complex processes, but Salesforce still has a higher ceiling for highly bespoke, multi-department enterprise workflows.`}
22,{q:`Do I need a consultant to set up Salesforce?`,a:`For anything beyond a very basic deployment, most organizations benefit from a certified admin or consultant, which is a real cost to budget for beyond the license fee.`},{q:`Which platform is better for marketing and sales alignment?`,a:`HubSpot generally, since its marketing and CRM data live natively in the same system, whereas Salesforce's Marketing Cloud typically requires separate integration work with Sales Cloud.`},{q:`Can I switch from HubSpot to Salesforce later if we outgrow it?`,a:`Yes, and it's a common growth path, though migrating historical CRM data and rebuilding workflows takes real planning â treat it as a project, not a simple import.`},{q:`Does Salesforce or HubSpot have better third-party integrations?`,a:`Salesforce's AppExchange is larger overall, but HubSpot covers the integrations most small and mid-size businesses actually need, so the practical gap is often smaller than the raw numbers suggest.`}],relatedSoftware:[`salesforce`,`hubspot`,`zoho-crm`,`pipedrive`]}],Qh=[{slug:`asana-vs-monday-vs-clickup`,title:`Asana vs Monday vs ClickUp: The Honest Comparison`,description:`A practical, no-hype comparison of Asana, Monday.com, and ClickUp for teams choosing a project management platform in 2026.`,category:`project-management`,tags:[`Project Management`,`Comparison`],author:`sophie-tremblay`,published:`2026-02-03`,updated:`2026-04-18`,readingTime:8,featured:!0,intro:`If you've searched for project management software in the last few years, you've almost certainly landed on some combination of Asana, Monday.com, and ClickUp. All three are well-funded, actively developed, and genuinely capable of running a mid-sized team's work. That's exactly what makes the decision hard: the marketing pages all promise the same things, and the free trials all look impressive for the first ten minutes. The differences show up later, once your team has fifty tasks in flight, three departments using the tool differently, and someone asking why a dependency didn't trigger a notification. This comparison is built around that later stage, not the demo stage.`,keyTakeaways:[`Asana is the most polished choice for teams that want structure without a steep learning curve.`,`Monday.com's visual, colorful boards work best for teams that think in spreadsheets and status columns.`,`ClickUp packs in the most features per dollar but asks more of your admin and onboarding time.`,`Pricing scales quickly once you need advanced automation, portfolios, or custom fields at scale.`,`The right pick depends more on team habits than on any single feature comparison chart.`],sections:[Y(`What Each Tool Is Actually Built Around`,[`Asana was designed around the idea of work as a graph of tasks, subtasks, and projects connected by dependencies and assignees. Its interface leans on lists, boards, and timelines that all sync to the same underlying task, which means switching views rarely breaks anything. The company has spent years refining defaults so that a new user can create a project, assign owners, and set due dates without reading documentation.`,`Monday.com started as a work operating system built on customizable colored boards, and that DNA is still visible everywhere. Every board is essentially a smart spreadsheet with status columns, timelines, and automations layered on top. Teams that already think in rows and columns â sales, ops, agencies â tend to feel at home in Monday within a day.`,`ClickUp positions itself as the tool that replaces several other tools at once: docs, chat, goals, whiteboards, and time tracking are all bundled in alongside task management. That breadth is genuinely useful for teams trying to consolidate their software stack, but it also means the interface has more surface area to learn. ClickUp's own team describes it as intentionally configurable rather than opinionated, which is accurate â you can make it look like Asana, Monday, or something else entirely.`]),Y(`Ease of Onboarding and Daily Use`,[`Asana wins most head-to-head onboarding tests among people who haven't used any of the three before. Creating a task, adding a due date, and following a project's progress on a timeline all take one or tw
22o clicks, and the visual language stays consistent across mobile and desktop. Teams with high turnover or a lot of occasional users â think client-facing agencies â often prefer Asana simply because fewer people need a training session.`,`Monday.com requires a bit more setup because boards need to be configured with the right columns before they're useful, but once set up, day-to-day use is fast and visual. Status updates are satisfying to click through, and the automation recipes (like moving a task when a status changes) are easy to build without technical help.`,`ClickUp has the steepest initial learning curve of the three. New users are often confronted with more settings and view options than they need, and it's common for teams to spend their first two weeks just deciding which features to turn off. Once configured, though, power users report that ClickUp lets them build workflows the other two tools simply can't replicate without third-party add-ons.`]),Y(`Feature Depth: Automation, Reporting, and Views`,[`All three platforms offer list, board (kanban), calendar, and timeline/Gantt views, along with rule-based automation for routine tasks like status changes and notifications. Where they diverge is depth: ClickUp's automation library is the largest of the three and includes more conditional logic, while Asana's automation (called Rules) is simpler but more reliable in practice. Monday sits in between, with automation recipes that are easy to build but capped by plan tier.`,`Reporting is another area of real difference. Asana's Portfolios and Goals features give leadership a rollup view across multiple projects, which is valuable for organizations running many initiatives at once. Monday's dashboards are highly visual and easy to share with stakeholders who don't log into the tool daily. ClickUp's dashboards are the most customizable of the three, letting you mix task data, time tracking, and custom fields into a single view â powerful, but it takes longer to build something as clean.`],{bullets:[`Asana: best for cross-project rollups and simple, dependable automation.`,`Monday: best for stakeholder-friendly dashboards and visual status tracking.`,`ClickUp: best for teams who want maximum customization and are willing to invest setup time.`]}),Y(`Pricing at a Glance`,[`All three vendors use per-seat pricing with a free tier for very small teams, and all three save their more advanced automation, reporting, and admin controls for mid-to-upper tiers. At time of writing, entry paid plans for each tool sit in a similar range, generally somewhere around $9â$12 per seat per month, with business-tier plans climbing toward $20-plus per seat as you add advanced reporting, unlimited automation runs, or admin controls. Enterprise pricing across all three requires a sales conversation and is not publicly listed.`,`The real cost differentiator isn't the sticker price, it's what happens at scale. Monday and Asana tend to gate automation runs and integrations by plan, so a growing team can outgrow a tier faster than expected. ClickUp is more generous with automation and views even on lower tiers but pushes admin and security features to the top.`],{table:{headers:[`Tool`,`Entry Paid Tier (approx.)`,`Mid Tier (approx.)`,`Free Plan`],rows:[[`Asana`,`~$10/seat/mo`,`~$24/seat/mo`,`Yes, up to 10-15 users`],[`Monday.com`,`~$9/seat/mo`,`~$19/seat/mo`,`Yes, limited to 2 seats`],[`ClickUp`,`~$7/seat/mo`,`~$12/seat/mo`,`Yes, generous limits`]]}}),Y(`Integrations and Ecosystem`,[`All three integrate with the usual suspects â Slack, Google Workspace, Microsoft 365, Zoom, and most major CRMs. Asana's integration marketplace is mature and stable, reflecting its longer time in market and enterprise focus. Monday's integration center is strong for sales and marketing workflows in particular, with deep ties to tools like HubSpot and Mailchimp.`,`ClickUp's integrations are broad but occasionally feel like a lower priority than its native features, since the company's strategy leans toward building functionality in-house (docs, chat, whiteboards) rather than relying on third parties. If your team already lives in a specific stack â say, heavy Google Worksp
22ace or Microsoft Teams usage â it's worth testing the actual integration rather than trusting the marketing page, since depth varies by connector.`]),Y(`Customer Support and Reliability`,[`Asana and Monday both offer tiered support with faster response times on higher plans, and both have historically strong uptime records reported by independent status pages. ClickUp has invested heavily in support responsiveness after early complaints about bugs following frequent feature releases, and most recent user feedback describes support as solid, though the sheer pace of ClickUp's shipping cadence means occasional rough edges after updates.`,`If reliability and a mature, slow-changing interface matter more to your team than having the latest feature, Asana is generally the safer bet. If you want a vendor that ships fast and is responsive to feedback, ClickUp's public roadmap and changelog are unusually transparent.`]),Y(`Which Team Type Fits Which Tool`,[`Marketing and creative teams often gravitate toward Monday because of its visual boards and ease of building client-facing dashboards. Software and product teams tend to prefer Asana or a dedicated tool like Jira, since Asana's dependency tracking and timeline features map well onto sprint-adjacent workflows even without being a true agile tool. Operations and agency teams that need to consolidate several point tools into one subscription often land on ClickUp specifically because of its breadth.`,`None of this is a hard rule â plenty of engineering teams run happily on Monday, and plenty of marketing teams prefer ClickUp's flexibility. The pattern that holds up best in practice is: pick the tool whose visual metaphor (task list, colored board, or all-in-one workspace) matches how your team already talks about work.`]),Y(`Migration and Switching Costs`,[`Switching project management tools is more disruptive than most vendors let on, mostly because the cost isn't technical â it's behavioral. All three tools offer CSV import and some level of native migration tooling from competitors, and the data transfer itself is usually painless. The harder part is retraining a team's habits: where they check for updates, how they report status, and what 'done' looks like in the new tool.`,`Before switching, it's worth running a two-to-four week pilot with one team rather than a company-wide cutover. This surfaces workflow gaps (a missing field, a broken automation, a report leadership relies on) while the blast radius is still small enough to fix without political fallout.`])],faqs:[{q:`Which tool is cheapest for a small team?`,a:`ClickUp's free and entry tiers tend to offer the most generous limits for very small teams, though Monday and Asana are close once you factor in feature needs rather than just seat price.`},{q:`Can I import my data from one tool to another?`,a:`Yes, all three support CSV import and offer some native migration tools, but expect to rebuild automations and custom views manually rather than have them transfer automatically.`},{q:`Which is best for agencies managing multiple clients?`,a:`Monday and ClickUp are both popular with agencies because of their client-facing dashboard options; Asana works too but is slightly less flexible for portal-style client access.`},{q:`Do these tools support agile/scrum workflows?`,a:`All three offer sprint-like views and backlogs, but none matches a dedicated tool like Jira for deep agile reporting; software teams with complex sprint needs often pair Asana or ClickUp with Jira instead of replacing it.`},{q:`Is there a real free plan, or is it just a trial?`,a:`Each has a genuine free-forever plan with usage limits (seats, automation runs, or storage), not just a time-limited trial, though Monday's free tier is the most restrictive of the three.`},{q:`How long does a realistic rollout take?`,a:`Plan on two to six weeks for a mid-sized team: one to two weeks for a pilot, then a phased rollout department by department rather than a single company-wide switch date.`}],relatedSoftware:[`asana`,`monday`,`clickup`,`trello`,`jira`,`wrike`]},{slug:`best-video-conferencing-tools`,title:`Best Video Conferencing Tools for Hybrid Teams`,description:`Which video conferencing platform actually works for hybrid teams juggling home office
22s, meeting rooms, and clients on the other side.`,category:`video-conferencing`,tags:[`Video Conferencing`,`Remote Work`,`Comparison`],author:`marcus-alvarez`,published:`2026-01-22`,updated:`2026-05-02`,readingTime:7,intro:`Hybrid work has quietly changed what people need from video conferencing software. It's no longer just about a stable call between two laptops â it's about a meeting room camera picking up the right person, a remote employee not getting talked over, and a recording that gets transcribed correctly for the person who couldn't attend live. Zoom, Microsoft Teams, and Google Meet remain the three tools most companies actually compare, and each has matured into a genuinely different product despite looking similar in a screenshot. The practical stakes are higher than they look on a feature comparison page: pick the wrong tool and you'll hear about it not from IT tickets, but from remote employees quietly disengaging from meetings where they can't see who's talking or can't get a word in.`,keyTakeaways:[`Zoom still leads on call quality and meeting-specific features like breakout rooms and webinars.`,`Microsoft Teams is the default choice for organizations already committed to Microsoft 365.`,`Google Meet is the simplest option and integrates cleanly with Google Workspace calendars and Gmail.`,`Room hardware and AI transcription quality now matter as much as the core video call experience.`,`Licensing costs are rarely the deciding factor â existing productivity suite commitments usually are.`],sections:[Y(`Why Video Conferencing Choice Isn't Really About Video Anymore`,[`Five years ago, choosing a video conferencing tool was mostly about call reliability and screen-sharing quality. Today, the meaningful differences are in the layer around the call: calendar integration, meeting room hardware compatibility, AI-generated notes, and how well the tool handles a mix of in-office and remote attendees in the same meeting. A hybrid team's biggest pain point usually isn't dropped calls, it's the in-room group being an inaudible blob to the person dialing in from home.`,`This is why the three leading platforms have all invested heavily in features that have nothing to do with video codecs: smart cameras that frame individual speakers, live transcription with speaker labels, and AI summaries that get emailed out automatically after the call ends. Judging these tools purely on call quality, which is now roughly comparable across all three, misses where the real competition is happening.`]),Y(`Zoom: Still the Meeting Specialist`,[`Zoom built its reputation on being the most reliable, lowest-friction way to join a call, and that reputation is largely still earned. Its breakout room feature remains more flexible than competitors for training sessions and workshops, and its webinar product is a genuinely separate, mature offering for companies running public-facing events. Zoom's AI Companion, which summarizes meetings and drafts follow-up messages, has become a meaningful selling point for teams drowning in meeting notes.`,`Where Zoom is weaker is deep integration with a broader productivity suite â it's a best-of-breed tool, not part of a bundle, so companies pay for it on top of whatever office suite they already use. For organizations that run a lot of external meetings, webinars, or training sessions, that extra cost is usually worth it because no other tool matches Zoom's polish in those formats.`]),Y(`Microsoft Teams: The Default for Microsoft Shops`,[`Teams comes bundled with most Microsoft 365 business plans, which makes it the practical default for any organization already paying for Office apps. Its calendar and Outlook integration is the tightest of the three, and its chat-plus-video-plus-files model means a meeting, its notes, and its follow-up tasks can live in one thread without switching apps. For companies with heavy compliance needs, Teams also benefits from Microsoft's broader security and retention tooling.`,`The tradeoff is that Teams' video experience, while solid, has historically felt slightly less polished than Zoom's in high-stakes external meetings â things like virtual backgrounds, noise suppression, and large-webinar handling have improved a lot but still trail Zoom's dedicated focus. For internal, all-Microsoft teams, this rarely matters. For companies frequently hosting large external audiences, it can.`]),Y(`Google Meet: Simplicity for Google Worksp
22ace Teams`,[`Google Meet doesn't try to be everything â it's a fast, no-download, browser-based meeting tool that opens directly from a Google Calendar invite. For companies on Google Workspace, that simplicity is the whole pitch: no separate licensing decision, no app to install, and consistent behavior across Chromebooks, laptops, and mobile. Meet's AI note-taking and background noise cancellation have caught up significantly and are now comparable to the other two for everyday meetings.`,`Where Meet falls short is in advanced meeting formats â breakout room controls are more basic, and large-scale webinar hosting isn't Google's focus in the way it is Zoom's. For most internal team meetings and client calls, though, that gap rarely matters, and Meet's low-friction join experience is genuinely appreciated by external guests who don't want to download anything.`]),Y(`Comparing the Core Features`,[`Looking purely at core capabilities, the three tools have converged more than they've diverged over the past few years. All three now offer AI meeting summaries, live captions, virtual backgrounds, and breakout rooms in some form. The differences that remain are mostly about depth, polish, and how each feature integrates with the rest of the tool's ecosystem.`],{table:{headers:[`Feature`,`Zoom`,`Microsoft Teams`,`Google Meet`],rows:[[`Max participants (standard plans)`,`~100â1000 by plan`,`~300`,`~150â500 by plan`],[`AI meeting summaries`,`Yes (add-on/bundled)`,`Yes (Copilot, extra cost)`,`Yes (Gemini, plan-dependent)`],[`Webinar hosting`,`Strong, dedicated product`,`Basic to moderate`,`Basic`],[`Best native integration`,`Standalone, broad app marketplace`,`Microsoft 365 / Outlook`,`Google Workspace / Calendar`]]}}),Y(`Hardware and Meeting Room Compatibility`,[`Hybrid teams live or die by meeting room hardware, and this is an area where compatibility matters more than brand loyalty. Zoom Rooms and Microsoft Teams Rooms both have wide third-party hardware support from vendors like Logitech, Poly, and Neat, letting companies mix and match cameras and speakerphones. Google Meet hardware kits exist but the ecosystem is smaller, which can matter if you're outfitting many rooms at once and want flexibility on price points.`,`Smart camera framing â where the system automatically zooms to whoever is speaking or shows a wide shot of the whole room â has become a genuine differentiator for hybrid meeting quality. Investing in this hardware often does more for remote employees' sense of inclusion than any software feature the platform itself offers, and it's worth testing hardware and software together before committing to a room-wide rollout.`],{bullets:[`Test one meeting room end-to-end before rolling out company-wide.`,`Prioritize speaker-tracking cameras for rooms with more than 4-5 regular attendees.`,`Confirm your headset/speakerphone brand has certified drivers for your chosen platform.`]}),Y(`Security, Compliance, and Admin Controls`,[`For any organization handling client data, healthcare information, or regulated communications, admin and security controls quietly become as important as call quality. All three platforms now offer end-to-end encryption options, SSO integration, and granular admin controls over recording, screen sharing, and waiting rooms, but the depth of those controls differs by plan tier rather than by platform philosophy. Microsoft Teams benefits most directly from Microsoft's broader compliance certifications and eDiscovery tooling, which matters for regulated industries like finance, legal, and healthcare that already run on Microsoft's compliance center for email and files.`,`Zoom has closed much of the security gap that dogged it in 2020, adding admin-level controls for meeting locks, domain restrictions, and encryption key management, and it now regularly appears on approved vendor lists for regulated industries. Google Meet inherits Google Workspace's admin console, which is straightforward for IT teams already managing Chrome devices and Gmail, but its compliance certifications, while solid, are somewhat less extensive out of the box than Microsoft's for highly regulated sectors. Any company with strict compliance requirements should verify certifications like SOC 2, HIPAA, and FedRAMP directly against the specific plan tier being purchased, since entry-level plans often lack the controls that marketing pages imply are standard.`]),Y(`Accessibility and Multi-Language Support`,[`Hybrid teams increasingly span multiple countries and languages, and this is an area where the three platforms have converged less than they have in core video features. Zoom and Microsoft Teams both offer live translated captions across a wide range of languages, which has become a genuine differentiator for global sales teams and multinational internal meetings. Google Meet's translated captions are improving but historically covered fewer language pairs at launch, so teams with a specific regional need should test the exact language combination they rely on rather than assume parity across platforms.`,`Accessibility features like screen reader compatibility, keyboard navigation, and closed captioning for the hearing impaired are now baseline expectations across all three, reflecting genuine investment rather than just compliance checkbox behavior. Where they differ more is in live sign language interpretation support and customizable caption sizing, both of which are more mature in Teams and Zoom than
22in Meet as of this writing. If accessibility is a hard requirement rather than a nice-to-have, it's worth piloting with the actual employees who need these features rather than relying on a vendor's accessibility statement alone.`],{bullets:[`Verify SOC 2, HIPAA, or FedRAMP certification against your specific plan tier, not just the vendor's general claims.`,`Test live translated captions with your actual language pairs before rolling out to global teams.`,`Pilot accessibility features with employees who rely on them, not just an IT accessibility checklist.`]}),Y(`Pricing and Licensing Realities`,[`None of the three tools are usually purchased in isolation from a broader software decision. If your company already pays for Microsoft 365 Business Standard or above, Teams' video calling is effectively already paid for, and adding Zoom on top is a genuinely additional cost, generally in the range of $13â20 per host per month for mid-tier plans. Google Workspace customers face a similar calculation with Meet bundled into most Workspace tiers.`,`The exception is organizations that host frequent large webinars, sales demos, or public trainings, where Zoom's dedicated webinar and events tooling can justify paying for a second platform on top of Teams or Meet. It's rarely worth paying for three overlapping subscriptions, so most companies end up standardizing on whichever tool matches their core productivity suite and adding Zoom selectively for specific teams like marketing or customer success.`]),Y(`Making the Final Call for a Hybrid Team`,[`Start with what productivity suite your company already pays for â that answer alone resolves the decision for most organizations without needing a formal bake-off. If you're suite-agnostic or running a lot of external-facing meetings and webinars, Zoom's dedicated focus on the meeting experience is worth the extra line item. Whatever you choose, budget separately for meeting room hardware, since a great software choice paired with a mediocre room camera will still leave remote attendees feeling like an afterthought.`])],faqs:[{q:`Do we need to pick just one video conferencing tool?`,a:`Not necessarily. Many companies standardize on one tool for internal meetings tied to their productivity suite and use Zoom selectively for webinars or external-facing events.`},{q:`Is Zoom worth paying for on top of Microsoft 365?`,a:`It depends on your meeting formats. If you regularly host large webinars, trainings, or external sales demos, Zoom's dedicated tooling for those formats can justify the extra cost; for mostly internal meetings, Teams alone is usually sufficient.`},{q:`How important is meeting room hardware compared to software?`,a:`Very important for hybrid teams â a strong software platform with a poor room camera or microphone setup still leaves remote attendees struggling to see or hear the room clearly.`},{q:`Are AI meeting summaries actually reliable?`,a:`They've improved significantly and are generally useful for capturing action items and decisions, but they should still be spot-checked for nuance, especially in sensitive or highly technical discussions.`},{q:`Which tool is best for external guests who don't have an account?`,a:`Google Meet's browser-based, no-download join flow tends to be the smoothest for occasional external guests, though Zoom and Teams also support guest joining without a full account.`},{q:`What's the biggest mistake companies make switching video tools?`,a:`Rolling out company-wide without piloting meeting room hardware compatibility first, which often creates the most user complaints even when the core software works fine.`}],relatedSoftware:[`zoom`,`ms-teams`,`slack`,`google-workspace`,`microsoft-365`]},{slug:`best-help-desk-software`,title:`Best Help Desk Software: Freshdesk vs Zendesk vs Intercom`,description:`A grounded comparison of Freshdesk, Zendesk, and Intercom for support teams choosing a help desk platform in 2026.`,category:`help-desk`,tags:[`Help Desk`,`Customer Support`,`Comparison`],author:`elena-marks`,published:`2026-03-11`,updated:`2026-05-20`,readingTime:7,intro:`Help desk software decisions tend to get made twice: once when a small team picks whatever tool is cheapest and fastest to set up, and again eighteen months later when that tool starts creaking under real ticket volume. Freshdesk, Zendesk, and Intercom are the three names that come up most often in that second, more serious evaluation. They solve overlapping problems but come from different starting points â Freshdesk from affordability and ease of setup, Zendesk from enterprise-grade ticketing maturity, and Intercom from conversational, product-led support. Understanding those starting points explains most of the pricing and feature differences you'll run into. It also explains why side-by-side feature checklists tend to mislead buyers: t
22wo tools can check the same box for 'ticket automation' or 'AI chatbot' while delivering meaningfully different experiences depending on the channel your customers actually use most.`,keyTakeaways:[`Freshdesk offers the best balance of price and functionality for small and mid-sized support teams.`,`Zendesk remains the most mature choice for complex, high-volume, multi-channel support operations.`,`Intercom is strongest for product-led companies that want support tightly integrated with in-app messaging.`,`AI-assisted ticket routing and chatbot deflection are now standard, but quality varies significantly.`,`Per-agent pricing can escalate quickly once you add advanced automation or AI add-ons.`],sections:[Y(`Three Different Starting Philosophies`,[`Freshdesk, part of the Freshworks family, was built to make help desk setup fast and inexpensive, and it still shows: a small team can be answering tickets from a shared inbox within an hour of signing up. Zendesk, by contrast, was built for support teams that expect complexity â multiple brands, complex SLAs, and large agent rosters â and its interface reflects that with more configuration options visible up front.`,`Intercom took a different path entirely, starting as a way to message customers directly inside a web or mobile app rather than through a traditional ticket queue. It has since grown into a full support platform with ticketing, but its DNA is still conversational â proactive messages, in-app chat, and a strong AI chatbot are central to how the product is designed, not bolted on afterward.`]),Y(`Ticketing and Workflow Management`,[`For pure ticket management, Zendesk's feature set is the deepest of the three: customizable ticket views, granular SLA policies, and business rules that can route tickets based on nearly any combination of fields. Larger support organizations, especially those managing multiple brands or product lines from one instance, tend to find Zendesk's flexibility worth the added complexity.`,`Freshdesk covers the same fundamentals â shared inboxes, SLA policies, automation rules â with a noticeably gentler learning curve. Most small-to-mid support teams never hit the ceiling of what Freshdesk can configure, and its automation builder is approachable enough for a support lead to manage without IT help.`,`Intercom's ticketing has matured a lot since being added to the platform, but it's still most natural when tickets originate from a chat conversation rather than an email queue. Teams that get the bulk of their support volume through in-app chat or a widget tend to find Intercom's workflow the most seamless of the three; teams that are primarily email- or phone-based sometimes find it less natural.`]),Y(`AI and Automation Capabilities`,[`All three platforms now ship an AI chatbot or copilot as a headline feature, and the quality gap between them has narrowed considerably over the past two years. Intercom's Fin AI agent is generally regarded as one of the more capable out-of-the-box bots for deflecting common questions using existing help center content, reflecting the company's early and heavy investment in AI. Zendesk's AI features are similarly strong and integrate deeply with its ticket and knowledge base data, particularly for larger organizations with substantial help center content to train on.`,`Freshdesk's AI (branded Freddy) covers the same core use cases â suggested replies, ticket summarization, and chatbot deflection â and is a solid inclusion for the price point, though some reviewers describe it as slightly behind the other two in nuance for complex, multi-step customer questions. For most small support teams, the difference is marginal; for high-volume operations fielding thousands of tickets a week, the gap becomes more noticeable and can meaningfully change deflection rates.`],{bullets:[`Intercom's Fin is generally strongest for chat-first, product-led support teams.`,`Zendesk's AI shines when there's substantial historical ticket data to train on.`,`Freshdesk's Freddy is a capable, budget-friendly option for straightforward support volume.`]}),Y(`Pricing Comparison`,[`Pricing structure differs meaningfully across the three, and it's easy to underestimate the total cost if you only look at the advertised entry price. Freshdesk's plans start affordably, often in the range of $15â$29 per agent per month for small teams, with AI features and advanced automation reserved for higher tiers. Zendesk's pricing generally starts higher, often in the $19â$55 per agent per month range depending on tier, reflecting its more enterprise-oriented positioning.`,`Intercom's pricing model is the most different of the three, often comb
22ining a per-seat fee with usage-based charges tied to resolutions or contacts reached, which can make costs less predictable for teams with unpredictable volume spikes. It's worth modeling your actual expected usage against each vendor's pricing page rather than comparing headline numbers, since the cheapest-looking plan on paper isn't always the cheapest at your actual ticket volume.`],{table:{headers:[`Platform`,`Entry Plan (approx.)`,`Best For`,`AI Add-on`],rows:[[`Freshdesk`,`~$15/agent/mo`,`Small to mid-size support teams`,`Freddy AI, included on higher tiers`],[`Zendesk`,`~$19-55/agent/mo`,`Complex, high-volume operations`,`Advanced AI, tiered/add-on`],[`Intercom`,`Seat + usage-based`,`Product-led, chat-first support`,`Fin AI, usage-priced`]]}}),Y(`Reporting and Analytics`,[`Zendesk's Explore reporting suite is the most robust of the three, offering deep customization for teams that need to slice performance by agent, channel, tag, or custom field for executive reporting. Freshdesk's built-in analytics cover the essentials well â response times, resolution rates, CSAT trends â without needing a separate reporting license, which is appropriate for its target market of smaller teams.`,`Intercom's reporting is strong specifically around conversational metrics â response time within chat, bot resolution rate, and conversation volume by topic â but is less oriented toward traditional multi-channel ticket reporting. Teams evaluating reporting needs should think about what they'll actually present to leadership monthly, since a beautifully granular reporting suite is wasted if nobody on the team has time to build custom dashboards.`]),Y(`Integrations and Ecosystem Fit`,[`All three integrate with common CRM, e-commerce, and collaboration tools, but their natural ecosystems differ. Zendesk has one of the largest app marketplaces among help desk tools and is a common pairing for companies already using Salesforce for sales. Freshdesk integrates tightly with the rest of the Freshworks suite (CRM, IT service management), which is a natural fit for companies already using those tools.`,`Intercom integrates deeply with product analytics and marketing tools, reflecting its roots as a customer messaging platform for SaaS products, and pairs particularly well with companies already using it (or considering it) for onboarding and lifecycle messaging in addition to support.`]),Y(`Omnichannel and Self-Service Capabilities`,[`Modern help desk software is judged as much on what it prevents as what it resolves, and self-service capability is where that shows up most directly. All three platforms offer a customer-facing knowledge base and some form of community or forum add-on, but the quality of the authoring experience and search relevance varies. Zendesk's Guide product is the most mature standalone knowledge base offering, with granular permissions for multi-brand content and strong search tuning options for large content libraries. Freshdesk's knowledge base covers the same fundamentals with a simpler editor, which is appropriate for teams maintaining a few dozen articles rather than a sprawling multi-product library.`,`Omnichannel support â unifying email, chat, phone, social, and messaging apps like WhatsApp into one queue â is a genuine strength for Zendesk and Freshdesk, both of which route all channels into a single agent workspace. Intercom supports omnichannel too, but its strongest channel by far remains in-app and web chat; email and phone support feel comparatively secondary to how the product is designed. Teams that receive meaningful ticket volume over the phone should weigh this carefully, since a support tool that treats phone as an afterthought can create friction that only shows up after rollout.`],{bullets:[`Zendesk Guide: best for large, multi-brand knowledge bases with granular permissions.`,`Freshdesk knowledge base: simplest to maintain for smaller content libraries.`,`Intercom: strongest self-service is in-app; treat phone support as a secondary channel.`]}),Y(`Implementation Time and Vendor Support`,[`How long it actually takes to go live matters more than most buyers budget for, and it differs meaningfully across the three platforms. Freshdesk is generally the fastest to a working setup, with most small teams able to configure inboxes, SLAs, and basic automation within a day or two without help from the vendor. Zendesk's implementation timeline is longer, particularly for organizations with multiple brands, custom objects, or complex rout
22ing logic, and larger deployments often involve a paid onboarding package or a certified implementation partner.`,`Intercom's setup time depends heavily on how deeply you plan to integrate it with your product for in-app messaging versus using it purely as a support inbox; the latter is quick, the former can take weeks of engineering coordination to wire up event tracking and user attributes correctly. Whichever platform you choose, it's worth asking the vendor directly for a realistic timeline based on comparable customers rather than the best-case number in a sales deck, since implementation delays are one of the most common sources of post-purchase regret in help desk software specifically.`]),Y(`Which Tool Fits Which Support Team`,[`A lean support team of two to ten agents handling email and chat tickets, without extremely complex routing needs, will usually be well served by Freshdesk's balance of price and capability. A larger, multi-brand or multi-department support organization with complex SLA and compliance requirements will typically outgrow Freshdesk's ceiling and benefit from Zendesk's depth, even at a higher price point.`,`A product-led SaaS company where support, onboarding, and in-app messaging naturally overlap â particularly one already investing in proactive customer engagement â tends to get the most value from Intercom, since the same platform can serve support, marketing, and product messaging use cases at once rather than needing three separate tools.`])],faqs:[{q:`Which help desk tool is cheapest for a small team?`,a:`Freshdesk generally offers the most functionality at the lowest entry price for small support teams, though Intercom's usage-based pricing can be cheaper for very low ticket volumes.`},{q:`Can I switch from Zendesk to Freshdesk without losing data?`,a:`Yes, both platforms offer migration tools and support importing tickets, contacts, and knowledge base articles, though custom fields and automation rules typically need to be rebuilt manually.`},{q:`Is Intercom good for teams that mostly handle email support?`,a:`It can work, but Intercom's workflow is optimized for chat-first conversations; teams that are primarily email-based sometimes find Freshdesk or Zendesk's ticketing more natural.`},{q:`How accurate are the AI chatbots on these platforms?`,a:`All three have improved significantly, with deflection rates depending heavily on the quality and completeness of your existing help center content rather than the AI model alone.`},{q:`Does Zendesk make sense for a small startup?`,a:`It can, especially if you expect to scale quickly or need complex routing from day one, but many small teams find Zendesk more capability than they need at first and start with Freshdesk instead.`},{q:`What should I check before committing to a usage-based pricing model like Intercom's?`,a:`Model your expected ticket or resolution volume against at least two different growth scenarios, since usage-based pricing can become unpredictable during seasonal spikes or after a marketing campaign.`}],relatedSoftware:[`freshdesk`,`zendesk`,`intercom`]},{slug:`how-to-reduce-saas-spend`,title:`How to Reduce SaaS Spend Without Breaking Your Stack`,description:`A practical guide to auditing subscriptions, reclaiming unused licenses, negotiating renewals, and building lightweight SaaS governance.`,category:`business-intelligence`,tags:[`Finance`,`Procurement`,`How To`],author:`raj-patel`,published:`2026-02-19`,updated:`2026-06-05`,readingTime:8,intro:`Most companies don't overspend on SaaS because they made bad software choices â they overspend because nobody owns the full picture. A marketing team buys a tool, an engineering team buys another, someone forgets to cancel a trial that converted to paid, and eighteen months later finance discovers the company is paying for four project management tools nobody remembers approving. Reducing SaaS spend without breaking your actual workflows isn't about ruthless cost-cutting; it's about building enough visibility and process that waste gets caught before it compounds. This guide walks through the practical steps that work, not the vague 'audit your tools' advice that shows up everywhere and rarely gets acted on.`,keyTakeaways:[`Start with a full inventory pulled from finance and SSO logs, not a survey asking teams what they use.`,`License reclamation from inactive users is usually the fastest, lowest-risk savings
22you'll find.`,`Renewal negotiation works best when you start 60-90 days before the contract auto-renews.`,`Consolidating overlapping tools saves more than negotiating a single tool's price, but requires change management.`,`A lightweight governance process prevents the same sprawl from re-forming within a year.`],sections:[Y(`Start With an Inventory You Can Actually Trust`,[`The single biggest mistake companies make when trying to cut SaaS spend is starting with a survey â asking department heads to list the tools they use. This approach reliably undercounts spend because people forget about tools they set up months ago, forget about seats bought for a project that ended, and rarely know what a colleague on their own team signed up for independently. A trustworthy inventory starts with hard data: your finance system's transaction history filtered for recurring software charges, and your single sign-on (SSO) provider's list of connected applications.`,`Cross-referencing these two sources typically surfaces two categories of surprises: tools being paid for that nobody is logging into anymore, and tools being actively used that were never centrally approved or aren't going through SSO at all (a security risk as much as a cost one). Expense report line items are a third useful source, since many smaller tools get purchased on a company card rather than through procurement and never show up in a vendor list.`,`Once you have the raw list, the next step is tagging each subscription with an owner â a real person, not just a department â and a renewal date. This sounds tedious, and it is, but it's the foundation everything else in this process depends on. Without an owner and a date, you can't negotiate, reclaim, or consolidate anything with confidence.`]),Y(`Finding and Reclaiming Unused Licenses`,[`Unused or underused licenses are almost always the fastest win in a SaaS cost review, because reclaiming them requires no negotiation and carries essentially no workflow risk. Most platforms report last-login data somewhere in their admin panel, and a login that hasn't happened in 60-90 days is a strong signal that a seat can be downgraded or removed. It's worth checking this quarterly rather than just once, since license sprawl re-accumulates naturally as people change roles or leave the company.`,`A less obvious source of waste is tiered feature overspend â teams paying for a premium tier to access one or two advanced features that only a handful of power users actually touch. In these cases, it's often cheaper to keep most of the team on a lower tier and buy a small number of premium seats for the specific people who need the advanced functionality, rather than upgrading everyone.`,`Duplicate accounts are another common find, especially after a team reorganization or a merger â the same tool purchased twice under different internal budgets because nobody realized it already existed elsewhere in the company. Consolidating these into a single contract not only removes duplicate spend but usually unlocks a better volume-based price on the surviving contract.`],{bullets:[`Pull last-login reports quarterly, not just during an annual audit.`,`Downgrade tiers before cancelling seats outright â partial optimization is often enough.`,`Watch specifically for duplicate tools purchased by different teams under different budgets.`]}),Y(`Negotiating Renewals Without Losing Leverage`,[`Renewal negotiation leverage is almost entirely a function of timing. Starting a negotiation 60-90 days before auto-renewal gives you enough runway to credibly explore alternatives, which is the single biggest source of leverage in any vendor conversation â a vendor that believes you have time to switch will negotiate very differently than one that knows you're locked in by the calendar. Waiting until two weeks before renewal all but guarantees you'll accept whatever terms are offered, because switching costs and downtime risk become the dominant concern.`,`When you do sit down with a vendor (or, more often, exchange emails with a customer success or renewals manager), c
22ome with specifics: your actual usage data, any features you're not using and could downgrade away from, and a clear sense of what a competitor's pricing looks like for a comparable plan. Vendors respond much better to 'we're using 40 of our 60 seats and considering downsizing at renewal' than to a vague request for a discount.`,`It's also worth asking about multi-year discounts even if you're not sure you want to commit multi-year, since many vendors will offer a meaningfully lower price for a two-year term, and you can always decline once you see the number. Similarly, ask about price protection or rate locks â some vendors will freeze your per-seat price for the contract term in exchange for a modest upfront commitment, which is valuable if you expect to add seats over the next year.`]),Y(`Consolidating Overlapping Tools`,[`Beyond individual renewals, the larger savings usually come from consolidation â recognizing that three teams are paying for three different tools that do roughly the same job. Project management, e-signature, and video conferencing are especially common categories for this kind of overlap, since these tools tend to get adopted bottom-up by individual teams rather than through a centralized procurement decision.`,`C
22onsolidation is where cost-cutting projects most often run into internal resistance, because the team being asked to migrate away from their preferred tool experiences it as a loss even if the company-wide math is clearly favorable. The way to handle this well is to involve a representative from each affected team in the tool selection itself, rather than presenting a decision that's already been made â people are far more willing to migrate to a tool they had a voice in choosing.`,`It's also worth being honest about switching costs before committing to a consolidation. If migrating three teams off their current tools will cost two months of lost productivity and consulting fees to save $15,000 a year, that math may not be worth it in the short term, even if it looks attractive on a spreadsheet. Model the payback period explicitly rather than assuming consolidation is automatically the right call.`]),Y(`Building a Lightweight Governance Process`,[`None of this work sticks if there's no process to prevent the same sprawl from re-forming within a year. A lightweight governance process doesn't need procurement software or a formal committee â for most mid-sized companies, it's enough to require any new recurring software purchase over a modest threshold (say, $500/month) to be logged in a shared tracker with an owner, a renewal date, and a one-line justification.`,`Pairing this with a quarterly review â even a 30-minute meeting between finance and IT â where the SaaS inventory is checked against actual usage data catches most of the drift before it becomes expensive. The goal isn't to slow teams down from buying tools they genuinely need; it's to make sure someone, somewhere, knows every subscription exists and has a reason to check on it periodically.`]),Y(`Common Mistakes That Undo These Savings`,[`The most common mistake is treating a SaaS spend review as a one-time project rather than an ongoing practice â companies do a big audit, cut costs, feel good about it, and then let the tracker go stale within two quarters as new tools get purchased outside the process. The second most common mistake is cutting a tool that a small but important team genuinely relies on, purely because usage looked low in aggregate data, which damages trust in future cost-cutting efforts and makes teams more likely to buy tools quietly outside official channels next time.`,`A third mistake worth naming is negotiating price without negotiating terms â securing a lower per-seat rate while accepting an auto-renewal clause with a 90-day cancellation notice window buried in the contract, which quietly locks you in for another cycle even after you've done the hard work of finding a better price. Reading the actual contract terms, not just the price line, matters just as much as the negotiation itself.`],{bullets:[`Re-run the license and usage audit at least quarterly, not annually.`,`Confirm before cutting a tool that low aggregate usage isn't hiding a small, critical user group.`,`Read cancellation notice windows and auto-renewal terms, not just the headline price.`]}),Y(`Putting It All Together: A 90-Day Plan`,[`In the first 30 days, build the trustworthy inventory from finance records, SSO logs, and expense reports, and assign an owner and renewal date to every subscription. In the next 30 days, run the license reclamation pass â downgrading tiers and removing inactive seats â since this delivers savings fastest with the least organizational friction. Use this same window to flag any renewals coming up in the following 60-90 days so negotiation timing doesn't get missed.`,`In the final 30 days, tackle one consolidation opportunity â pick the category with the clearest overlap and lowest switching cost, rather than trying to consolidate everything at once â and stand up the lightweight governance tracker so the next purchase gets logged from day one. This staged approach delivers visible savings early, which builds the internal credibility needed to tackle the harder consolidation and governance work that follows.`])],faqs:[{q:`Where should I start if I've never done a SaaS spend audit before?`,a:`Pull recurring software charges from your finance system and cross-reference them against your SSO provider's connected app list; this combination is far more reliable than asking teams what they use.`},{q:`How much can a typical company expect to save?`,a:`Savings vary widely, but license reclamation alone commonly recovers a meaningful percentage of software spend in companies that haven't reviewed usage in over a year; consolidation can add further savings depending on overlap.`},{q:`When should I start renewal negotiations?`,a:`Aim for 60-90 days before the auto-renewal date, since this gives you enough time to credibly explore alternatives, which is the main source of negotiating leverage.`},{q:`Is it worth hiring a SaaS spend management tool?`,a:`For companies with dozens of subscriptions and no existing tracking, a dedicated spend management platform can pay for itself quickly by automating discovery and renewal alerts; smaller companies can often start with a well-maintained spreadsheet.`}
22,{q:`How do I get team buy-in for consolidating tools?`,a:`Involve a representative from each affected team in choosing the replacement tool rather than presenting a decision that's already been made; people resist migrations far less when they had a voice in the choice.`},{q:`What's the biggest risk of cutting SaaS costs too aggressively?`,a:`Cutting a tool that a small but critical group relies on based on misleading aggregate usage data, which damages trust and can push future purchases underground, outside of any tracking process.`}],relatedSoftware:[`quickbooks`,`xero`,`airtable`,`monday`]}],$h=[...Jh,...Yh,...Xh,...Zh,...Qh],eg=e=>$h.find(t=>t.slug===e),tg=e=>$h.filter(t=>t.category===e),ng=(e=6)=>[...$h].sort((e,t)=>e.published<t.published?1:-1).slice(0,e),rg=Array.from(new Set($h.flatMap(e=>e.tags))).sort(),ig=e=>$h.filter(t=>t.tags.some(t=>t.toLowerCase()===e.toLowerCase()));function ag({compact:e=!1}){let[t,n]=(0,N.useState)(``),[r,i]=(0,N.useState)(!1),[a,o]=(0,N.useState)(0),s=(0,N.useRef)(null),c=xs(),l=(0,N.useMemo)(()=>{let e=t.trim().toLowerCase();if(!e)return[];let n=Hh.filter(t=>t.name.toLowerCase().includes(e)||t.tagline.toLowerCase().includes(e)).slice(0,5).map(e=>({kind:`software`,slug:e.slug,title:e.name,subtitle:e.tagline})),r=$h.filter(t=>t.title.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)).slice(0,4).map(e=>({kind:`article`,slug:e.slug,title:e.title,subtitle:`Article`})),i=Lh.filter(t=>t.name.toLowerCase().includes(e)).slice(0,3).map(e=>({kind:`category`,slug:e.slug,title:e.name,subtitle:e.description}));return[...n,...i,...r]},[t]);(0,N.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&i(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,N.useEffect)(()=>o(0),[t]);let u=()=>{let e=t.trim();e&&(i(!1),c({to:`/search`,search:{q:e}}))},d=e=>{i(!1),n(``),e.kind===`software`?c({to:`/software/$slug`,params:{slug:e.slug}}):e.kind===`article`?c({to:`/articles/$slug`,params:{slug:e.slug}}):c({to:`/category/$slug`,params:{slug:e.slug}})};return(0,P.jsxs)(`div`,{ref:s,className:xe(`relative w-full`,e?`max-w-xs`:`max-w-xl`),children:[(0,P.jsxs)(`div`,{className:`relative`,children:[(0,P.jsx)(Ah,{size:16,className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground`}),(0,P.jsx)(`input`,{type:`search`,value:t,onChange:e=>{n(e.target.value),i(!0)},onFocus:()=>t&&i(!0),onKeyDown:e=>{e.key===`Enter`?l[a]?d(l[a]):u():e.key===`ArrowDown`?(e.preventDefault(),o(e=>Math.min(e+1,l.length-1))):e.key===`ArrowUp`?(e.preventDefault(),o(e=>Math.max(e-1,0))):e.key===`Escape`&&i(!1)},placeholder:`Search software, categories, articlesâ¦`,"aria-label":`Search`,className:`w-full rounded-full border border-input bg-background py-2 pl-9 pr-9 text-sm outline-none ring-primary/30 focus:ring-2`}),t&&(0,P.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,onClick:()=>n(``),className:`absolute right-2 top-1/2 -translate-y-1/2 rounded-full p-1 text-muted-foreground hover:bg-accent`,children:(0,P.jsx)(Ih,{size:14})})]}),r&&l.length>0&&(0,P.jsxs)(`div`,{className:`absolute left-0 right-0 top-full z-50 mt-2 max-h-96 overflow-auto rounded-xl border bg-popover p-1 shadow-lg`,children:[l.map((e,t)=>(0,P.jsxs)(`button`,{type:`button`,onMouseEnter:()=>o(t),onClick:()=>d(e),className:xe(`block w-full rounded-lg px-3 py-2 text-left text-sm`,t===a?`bg-accent text-accent-foreground`:`hover:bg-accent`),children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,P.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,P.jsx)(`span`,{className:`shrink-0 text-xs uppercase tracking-wide text-muted-foreground`,children:e.kind})]}),(0,P.jsx)(`div`,{className:`truncate text-xs text-muted-foreground`,children:e.subt
22itle})]},`${e.kind}-${e.slug}`)),(0,P.jsxs)(w,{to:`/search`,search:{q:t},onClick:()=>i(!1),className:`block rounded-lg px-3 py-2 text-center text-xs font-medium text-primary hover:bg-accent`,children:[`See all results for "`,t,`"`]})]})]})}var og=Ce(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),sg=N.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,P.jsx)(r?Se:`button`,{className:xe(og({variant:t,size:n,className:e})),ref:a,...i}));sg.displayName=`Button`;function cg(){let[e,t]=(0,N.useState)(`light`);(0,N.useEffect)(()=>{let e=localStorage.getItem(`sc:theme`)||null,n=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,r=e??n;t(r),document.documentElement.classList.toggle(`dark`,r===`dark`)},[]);let n=e=>{t(e),localStorage.setItem(`sc:theme`,e),document.documentElement.classList.toggle(`dark`,e===`dark`)};return{theme:e,toggle:()=>n(e===`dark`?`light`:`dark`),setTheme:n}}var lg=`sc:compare`;function ug(){if(typeof window>`u`)return[];try{return JSON.parse(localStorage.getItem(lg)||`[]`)}catch{return[]}}function dg(e){localStorage.setItem(lg,JSON.stringify(e)),window.dispatchEvent(new CustomEvent(`sc:compare-change`))}function fg(){let[e,t]=(0,N.useState)([]);return(0,N.useEffect)(()=>{t(ug());let e=()=>t(ug());return window.addEventListener(`sc:compare-change`,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(`sc:compare-change`,e),window.removeEventListener(`storage`,e)}},[]),{slugs:e,toggle:e=>{let n=ug(),r;r=n.includes(e)?n.filter(t=>t!==e):n.length>=4?[...n.slice(1),e]:[...n,e],dg(r),t(r)},clear:()=>{dg([]),t([])},has:t=>e.includes(t)}}function pg(){let[e,t]=(0,N.useState)(!1);return(0,N.useEffect)(()=>t(!0),[]),e}var mg=[{label:`Reviews`,href:`/software`},{label:`Compare`,href:`/compare`},{label:`Best Software`,href:`/best`},{label:`Guides`,href:`/guides`},{label:`Tools`,href:`/tools`},{label:`Articles`,href:`/articles`},{label:`Methodology`,href:`/methodology`}];function hg(){let[e,t]=(0,N.useState)(!1),[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(!1),{theme:o,toggle:s}=cg(),c=pg(),{slugs:l}=fg();return(0,N.useEffect)(()=>{let e=()=>t(window.scrollY>8);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),(0,N.useEffect)(()=>{document.body.style.overflow=n?`hidden`:``},[n]),(0,P.jsxs)(`header`,{className:xe(`sticky top-0 z-40 w-full border-b transition-colors`,e?`border-border bg-background/95 backdrop-blur`:`border-transparent bg-background`),children:[(0,P.jsxs)(`div`,{className:`container-page flex h-16 items-center gap-4`,children:[(0,P.jsxs)(w,{to:`/`,className:`flex items-center gap-2`,children:[(0,P.jsx)(`div`,{className:`grid h-9 w-9 place-items-center rounded-xl gradient-brand text-white shadow-sm`,children:(0,P.jsx)(`span`,{className:`font-display text-sm font-bold`,children:`SD`})}),(0,P.jsx)(`span`,{className:`font-display text-lg font-bold tracking-tight`,children:`Spendesk`})]}),(0,P.jsxs)(`nav`,{className:`hidden lg:flex items-center gap-1`,"aria-label":`Primary`,children:[(0,P.jsxs)(`div`,{className:`relative`,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[(0,P.jsx)(`button`,{type:`button`,onClick:()=>a(e=>!e),"aria-expanded":i,className:`rounded-md px-3 py-2 text-sm font-medium text-foreground
22/80 hover:bg-accent hover:text-foreground`,children:`Categories`}),i&&(0,P.jsxs)(`div`,{className:`absolute left-1/2 top-full z-50 mt-1 w-[min(90vw,860px)] -translate-x-1/2 rounded-2xl border bg-popover p-6 shadow-xl`,children:[(0,P.jsx)(`div`,{className:`grid grid-cols-3 gap-6`,children:Rh.map(e=>(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`mb-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:e}),(0,P.jsx)(`ul`,{className:`space-y-1`,children:Lh.filter(t=>t.group===e).map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(w,{to:`/category/$slug`,params:{slug:e.slug},onClick:()=>a(!1),className:`block rounded-md px-2 py-1 text-sm text-foreground/80 hover:bg-accent hover:text-foreground`,children:e.name})},e.slug))})]},e))}),(0,P.jsxs)(`div`,{className:`mt-4 flex items-center justify-between border-t pt-4 text-xs text-muted-foreground`,children:[(0,P.jsxs)(`span`,{children:[`Browse all `,Lh.length,` categories`]}),(0,P.jsx)(w,{to:`/categories`,onClick:()=>a(!1),className:`font-medium text-primary hover:underline`,children:`View all categories â`})]})]})]}),mg.map(e=>(0,P.jsx)(w,{to:e.href,className:`rounded-md px-3 py-2 text-sm font-medium text-foreground/80 hover:bg-accent hover:text-foreground`,activeProps:{className:`rounded-md px-3 py-2 text-sm font-medium text-primary bg-primary/10`},children:e.label},e.href))]}),(0,P.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,P.jsx)(`div`,{className:`hidden md:block`,children:(0,P.jsx)(ag,{compact:!0})}),(0,P.jsxs)(w,{to:`/compare`,className:`relative hidden sm:inline-flex items-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-foreground`,"aria-label":`Compare tray (${l.length})`,children:[(0,P.jsx)(wh,{size:18}),c&&l.length>0&&(0,P.jsx)(`span`,{className:`absolute -right-1 -top-1 grid h-4 min-w-4 place-items-center rounded-full bg-primary px-1 text-[10px] font-bold text-primary-foreground`,children:l.length})]}),(0,P.jsx)(w,{to:`/bookmarks`,className:`hidden sm:inline-flex items-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-foreground`,"aria-label":`Bookmarks`,children:(0,P.jsx)(yh,{size:18})}),(0,P.jsx)(`button`,{type:`button`,onClick:s,"aria-label":`Toggle dark mode`,className:`inline-flex items-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-foreground`,children:c&&o===`dark`?(0,P.jsx)(jh,{size:18}):(0,P.jsx)(Oh,{size:18})}),(0,P.jsx)(sg,{asChild:!0,size:`sm`,className:`hidden md:inline-flex`,children:(0,P.jsx)(w,{to:`/newsletter`,children:`Newsletter`})}),(0,P.jsx)(`button`,{type:`button`,"aria-label":`Toggle menu`,"aria-expanded":n,onClick:()=>r(e=>!e),className:`inline-flex items-center rounded-md p-2 text-foreground lg:hidden`,children:n?(0,P.jsx)(Ih,{size:20}):(0,P.jsx)(Dh,{size:20})})]})]}),n&&(0,P.jsx)(`div`,{className:`lg:hidden border-t bg-background`,children:(0,P.jsxs)(`div`,{className:`container-page space-y-4 py-4`,children:[(0,P.jsx)(ag,{}),(0,P.jsxs)(`nav`,{className:`grid gap-1`,"aria-label":`Mobile primary`,children:[mg.map(e=>(0,P.jsx)(w,{to:e.href,onClick:()=>r(!1),className:`rounded-md px-3 py-2 text-sm font-medium hover:bg-accent`,children:e.label},e.href)),(0,P.jsx)(w,{to:`/categories`,onClick:()=>r(!1),className:`rounded-md px-3 py-2 text-sm font-medium hover:bg-accent`,children:`All Categories`}),(0,P.jsx)(w,{to:`/bookmarks`,onClick:()=>r(!1),className:`rounded-md px-3 py-2 text-sm font-medium hover:bg-accent`,children:`Bookmarks`}),(0,P.jsx)(w,{to:`/newsletter`,onClick:()=>r(!1),className:`rounded-md px-3 py-2 text-sm font-medium hover:bg-accent`,children:`Newsletter`})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wider text-muted-foreground`,children:`Popular categories`}),(0,P.jsx)(`div`,{className:`mt-2 grid grid-cols-2 gap-1`,children:Lh.slice(0,10).map(e=>(0,P.jsx)(w,{to:`/category/$slug`,params:{slug:e.slug},onClick:()=>r(!1),className:`rounded-md px-3 py-2 text-sm hover:bg-accent`,children:e.name},e.slug))})]})]})})]})}var gg;function X(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}
vendor: 10,571 bytes, line 22
22let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var _g=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},vg=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(gg=globalThis).__zod_globalConfig??(gg.__zod_globalConfig={});var yg=globalThis.__zod_globalConfig;function bg(e){return e&&Object.assign(yg,e),yg}function xg(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Sg(e,t){return typeof t==`bigint`?t.toString():t}function Cg(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function wg(e){return e==null}function Tg(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var Eg=Symbol(`evaluating`);function Dg(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Eg)return r===void 0&&(r=Eg,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Og(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function kg(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Ag(e){return JSON.stringify(e)}function jg(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Mg=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ng(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Pg=Cg(()=>{if(yg.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Fg(e){if(Ng(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ng(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ig(e){return Fg(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Lg=new Set([`string`,`number`,`symbol`]);function Rg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function zg(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Z(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Bg(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function Vg(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return zg(e,kg(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Og(this,`shape`,e),e},checks:[]}))}function Hg(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return zg(e,kg(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Og(this,`shape`,r),r},checks:[]}))}function Ug(e,t){if(!Fg(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return zg(e,kg(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Og(this,`shape`,n),n}}))}function Wg(e,t){if(!Fg(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return zg(e,kg(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Og(this,`shape`,n),n}}))}function Gg(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return zg(e,kg(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Og(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Kg(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return zg(t,kg(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Og(this,`shape`,i),i},checks:[]}))}function qg(e,t,n){return zg(t,kg(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Og(this,`shape`,i),i}}))}function Jg(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Yg(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Xg(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Zg(e){return typeof e==`string`?e:e?.message}function Qg(e,t,n){let r=e.message?e.message:Zg(e.inst?._zod.def?.error?.(e))??Zg(t?.error?.(e))??Zg(n.customError?.(e))??Zg(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function $g(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function e_(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var t_=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Sg,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},n_=X(`$ZodError`,t_),r_=X(`$ZodError`,t_,{Parent:Error});function i_(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function a_(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var o_=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new _g;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Qg(e,a,bg())));throw Mg(t,i?.callee),t}return o.value},s_=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Qg(e,a,bg())));throw Mg(t,i?.callee),t}return o.value},c_=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new _g;return a.issues.length?{success:!1,error:new(e??n_)(a.issues.map(e=>Qg(e,i,bg())))}:{success:!0,data:a.value}},l_=c_(r_),u_=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Qg(e,i,bg())))}:{success:!0,data:a.value}},d_=u_(r_),f_=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return o_(e)(t,n,i)},p_=e=>(t,n,r)=>o_(e)(t,n,r),m_=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return s_(e)(t,n,i)},h_=e=>async(t,n,r)=>s_(e)(t,n,r),g_=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return c_(e)(t,n,i)},__=e=>(t,n,r)=>c_(e)(t,n,r),v_=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return u_(e)(t,n,i)},y_=e=>async(t,n,r)=>u_(e)(t,n,r),b_=/^[cC][0-9a-z]{6,}$/,x_=/^[0-9a-z]+$/,S_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,C_=/^[0-9a-vA-V]{20}$/,w_=/^[A-Za-z0-9]{27}$/,T_=/^[a-zA-Z0-9_-]{21}$/,E_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,D_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,O_=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,k_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,A_=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function j_(){return new RegExp(A_,`u`)}var M_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,P_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,F_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I_=/^$|^(?:[0-9a-zA-Z+/]{4}
vendor: 43,810 bytes, lines 22-85
22)*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,L_=/^[A-Za-z0-9_-]*$/,R_=/^https?$/,z_=/^\+[1-9]\d{6,14}$/,B_=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,V_=RegExp(`^${B_}$`);function H_(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function U_(e){return RegExp(`^${H_(e)}$`)}function W_(e){let t=H_({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${B_}T(?:${r})$`)}var G_=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},K_=/^[^A-Z]*$/,q_=/^[^a-z]*$/,J_=X(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Y_=X(`$ZodCheckMaxLength`,(e,t)=>{var n;J_.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!wg(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=$g(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),X_=X(`$ZodCheckMinLength`,(e,t)=>{var n;J_.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!wg(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=$g(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Z_=X(`$ZodCheckLengthEquals`,(e,t)=>{var n;J_.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!wg(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=$g(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Q_=X(`$ZodCheckStringFormat`,(e,t)=>{var n,r;J_.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),$_=X(`$ZodCheckRegex`,(e,t)=>{Q_.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ev=X(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=K_,Q_.init(e,t)}),tv=X(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=q_,Q_.init(e,t)}),nv=X(`$ZodCheckIncludes`,(e,t)=>{J_.init(e,t);let n=Rg(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),rv=X(`$ZodCheckStartsWith`,(e,t)=>{J_.init(e,t);let n=RegExp(`^${Rg(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),iv=X(`$ZodCheckEndsWith`,(e,t)=>{J_.init(e,t);let n=RegExp(`.*${Rg(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),av=X(`$ZodCheckOverwrite`,(e,t)=>{J_.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ov=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` 23`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(` 24`))}},sv={major:4,minor:4,patch:3},cv=X(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sv;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Jg(e),i;for(let a of t){if(a._zod.def.when){if(Yg(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new _g;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Jg(e,t))});else{if(e.issues.length===t)continue;r||=Jg(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Jg(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new _g;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new _g;return o.then(e=>t(e,r,a))}return t(o,r,a)}}Dg(e,`~standard`,()=>({validate:t=>{try{let n=l_(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return d_(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),lv=X(`$ZodString`,(e,t)=>{cv.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??G_(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),uv=X(`$ZodStringFormat`,(e,t)=>{Q_.init(e,t),lv.init(e,t)}),dv=X(`$ZodGUID`,(e,t)=>{t.pattern??=D_,uv.init(e,t)}),fv=X(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=O_(e)}else t.pattern??=O_();uv.init(e,t)}),pv=X(`$ZodEmail`,(e,t)=>{t.pattern??=k_,uv.init(e,t)}),mv=X(`$ZodURL`,(e,t)=>{uv.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===R_.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),hv=X(`$ZodEmoji`,(e,t)=>{t.pattern??=j_(),uv.init(e,t)}),gv=X(`$ZodNanoID`,(e,t)=>{t.pattern??=T_,uv.init(e,t)}),_v=X(`$ZodCUID`,(e,t)=>{t.pattern??=b_,uv.init(e,t)}),vv=X(`$ZodCUID2`,(e,t)=>{t.pattern??=x_,uv.init(e,t)}),yv=X(`$ZodULID`,(e,t)=>{t.pattern??=S_,uv.init(e,t)}),bv=X(`$ZodXID`,(e,t)=>{t.pattern??=C_,uv.init(e,t)}),xv=X(`$ZodKSUID`,(e,t)=>{t.pattern??=w_,uv.init(e,t)}),Sv=X(`$ZodISODateTime`,(e,t)=>{t.pattern??=W_(t),uv.init(e,t)}),Cv=X(`$ZodISODate`,(e,t)=>{t.pattern??=V_,uv.init(e,t)}),wv=X(`$ZodISOTime`,(e,t)=>{t.pattern??=U_(t),uv.init(e,t)}),Tv=X(`$ZodISODuration`,(e,t)=>{t.pattern??=E_,uv.init(e,t)}),Ev=X(`$ZodIPv4`,(e,t)=>{t.pattern??=M_,uv.init(e,t),e._zod.bag.format=`ipv4`}),Dv=X(`$ZodIPv6`,(e,t)=>{t.pattern??=N_,uv.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),Ov=X(`$ZodCIDRv4`,(e,t)=>{t.pattern??=P_,uv.init(e,t)}),kv=X(`$ZodCIDRv6`,(e,t)=>{t.pattern??=F_,uv.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Av(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var jv=X(`$ZodBase64`,(e,t)=>{t.pattern??=I_,uv.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Av(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Mv(e){if(!L_.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Av(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Nv=X(`$ZodBase64URL`,(e,t)=>{t.pattern??=L_,uv.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Mv(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Pv=X(`$ZodE164`,(e,t)=>{t.pattern??=z_,uv.init(e,t)});function Fv(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Iv=X(`$ZodJWT`,(e,t)=>{uv.init(e,t),e._zod.check=n=>{Fv(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Lv=X(`$ZodUnknown`,(e,t)=>{cv.init(e,t),e._zod.parse=e=>e}),Rv=X(`$ZodNever`,(e,t)=>{cv.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function zv(e,t,n){e.issues.length&&t.issues.push(...Xg(n,e.issues)),t.value[n]=e.value}var Bv=X(`$ZodArray`,(e,t)=>{cv.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>zv(t,n,e))):zv(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Vv(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Xg(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Hv(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Bg(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Uv(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Vv(e,n,i,t,u,d))):Vv(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var Wv=X(`$ZodObject`,(e,t)=>{if(cv.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Cg(()=>Hv(t));Dg(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Ng,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Vv(n,t,e,s,r,i))):Vv(a,t,e,s,r,i)}return i?Uv(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Gv=X(`$ZodObjectJIT`,(e,t)=>{Wv.init(e,t);let n=e._zod.parse,r=Cg(()=>Hv(t)),i=e=>{let t=new ov([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Ag(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Ag(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(` 25 if (${n}.issues.length) { 26 if (${o} in input) { 27 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 28 ...iss, 29 path: iss.path ? [${o}, ...iss.path] : [${o}] 30 }))); 31 } 32 } 33 34 if (${n}.value === undefined) { 35 if (${o} in input) { 36 newResult[${o}] = undefined; 37 } 38 } else { 39 newResult[${o}] = ${n}.value; 40 } 41 42 `):c?t.write(` 43 if (${n}.issues.length) { 44 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 45 ...iss, 46 path: iss.path ? [${o}, ...iss.path] : [${o}] 47 }))); 48 } 49 50 if (${n}.value === undefined) { 51 if (${o} in input) { 52 newResult[${o}] = undefined; 53 } 54 } else { 55 newResult[${o}] = ${n}.value; 56 } 57 58 `):t.write(` 59 const ${n}_present = ${o} in input; 60 if (${n}.issues.length) { 61 payload.issues = payload.issues.concat(${n}.issues.map(iss => ({ 62 ...iss, 63 path: iss.path ? [${o}, ...iss.path] : [${o}] 64 }))); 65 } 66 if (!${n}_present && !${n}.issues.length) { 67 payload.issues.push({ 68 code: "invalid_type", 69 expected: "nonoptional", 70 input: undefined, 71 path: [${o}] 72 }); 73 } 74 75 if (${n}_present) { 76 if (${n}.value === undefined) { 77 newResult[${o}] = undefined; 78 } else { 79 newResult[${o}] = ${n}.value; 80 } 81 } 82 83 `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Ng,s=!yg.jitless,c=s&&Pg.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Uv([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function Kv(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Jg(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Qg(e,r,bg())))}),t)}var qv=X(`$ZodUnion`,(e,t)=>{cv.init(e,t),Dg(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),Dg(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Dg(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Dg(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Tg(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Kv(t,r,e,i)):Kv(o,r,e,i)}}),Jv=X(`$ZodIntersection`,(e,t)=>{cv.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Xv(e,t,n)):Xv(e,i,a)}});function Yv(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fg(e)&&Fg(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Yv(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Yv(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Xv(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Jg(e))return e;let o=Yv(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Zv=X(`$ZodEnum`,(e,t)=>{cv.init(e,t);let n=xg(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Lg.has(typeof e)).map(e=>typeof e==`string`?Rg(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Qv=X(`$ZodTransform`,(e,t)=>{cv.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new vg(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new _g;return n.value=i,n.fallback=!0,n}});function $v(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var ey=X(`$ZodOptional`,(e,t)=>{cv.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,Dg(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Dg(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tg(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>$v(e,r)):$v(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),ty=X(`$ZodExactOptional`,(e,t)=>{ey.init(e,t),Dg(e._zod,`values`,()=>t.innerType._zod.values),Dg(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ny=X(`$ZodNullable`,(e,t)=>{cv.init(e,t),Dg(e._zod,`optin`,()=>t.innerType._zod.optin),Dg(e._zod,`optout`,()=>t.innerType._zod.optout),Dg(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Tg(e.source)}|null)$`):void 0}),Dg(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ry=X(`$ZodDefault`,(e,t)=>{cv.init(e,t),e._zod.optin=`optional`,Dg(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>iy(e,t)):iy(r,t)}});function iy(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ay=X(`$ZodPrefault`,(e,t)=>{cv.init(e,t),e._zod.optin=`optional`,Dg(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),oy=X(`$ZodNonOptional`,(e,t)=>{cv.init(e,t),Dg(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>sy(t,e)):sy(i,e)}});function sy(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var cy=X(`$ZodCatch`,(e,t)=>{cv.init(e,t),e._zod.optin=`optional`,Dg(e._zod,`optout`,()=>t.innerType._zod.optout),Dg(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Qg(e,n,bg()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Qg(e,n,bg()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),ly=X(`$ZodPipe`,(e,t)=>{cv.init(e,t),Dg(e._zod,`values`,()=>t.in._zod.values),Dg(e._zod,`optin`,()=>t.in._zod.optin),Dg(e._zod,`optout`,()=>t.out._zod.optout),Dg(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>uy(e,t.in,n)):uy(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>uy(e,t.out,n)):uy(r,t.out,n)}});function uy(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var dy=X(`$ZodReadonly`,(e,t)=>{cv.init(e,t),Dg(e._zod,`propValues`,()=>t.innerType._zod.propValues),Dg(e._zod,`values`,()=>t.innerType._zod.values),Dg(e._zod,`optin`,()=>t.innerType?._zod?.optin),Dg(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(fy):fy(r)}});function fy(e){return e.value=Object.freeze(e.value),e}var py=X(`$ZodCustom`,(e,t)=>{J_.init(e,t),cv.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>my(t,n,r,e));my(i,n,r,e)}});function my(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(e_(e))}}var hy,gy=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function _y(){return new gy}(hy=globalThis).__zod_globalRegistry??(hy.__zod_globalRegistry=_y());var vy=globalThis.__zod_globalRegistry;function yy(e,t){return new e({type:`string`,...Z(t)})}function by(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Z(t)})}function xy(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Z(t)})}function Sy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Z(t)})}function Cy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Z(t)})}function wy(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Z(t)})}function Ty(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Z(t)})}function Ey(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Z(t)})}function Dy(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Z(t)})}function Oy(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Z(t)})}function ky(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Z(t)})}function Ay(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Z(t)})}function jy(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Z(t)})}function My(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Z(t)})}function Ny(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Z(t)})}function Py(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Z(t)})}function Fy(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Z(t)})}function Iy(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Z(t)})}function Ly(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Z(t)})}function Ry(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Z(t)})}function zy(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Z(t)})}function By(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Z(t)})}function Vy(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Z(t)})}function Hy(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Z(t)})}function Uy(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Z(t)})}function Wy(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Z(t)})}function Gy(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Z(t)})}function Ky(e){return new e({type:`unknown`})}function qy(e,t){return new e({type:`never`,...Z(t)})}function Jy(e,t){return new Y_({check:`max_length`,...Z(t),maximum:e})}function Yy(e,t){return new X_({check:`min_length`,...Z(t),minimum:e})}function Xy(e,t){return new Z_({check:`length_equals`,...Z(t),length:e})}function Zy(e,t){return new $_({check:`string_format`,format:`regex`,...Z(t),pattern:e})}function Qy(e){return new ev({check:`string_format`,format:`lowercase`,...Z(e)})}function $y(e){return new tv({check:`string_format`,format:`uppercase`,...Z(e)})}function eb(e,t){return new nv({check:`string_format`,format:`includes`,...Z(t),includes:e})}function tb(e,t){return new rv({check:`string_format`,format:`starts_with`,...Z(t),prefix:e})}function nb(e,t){return new iv({check:`string_format`,format:`ends_with`,...Z(t),suffix:e})}function rb(e){return new av({check:`overwrite`,tx:e})}function ib(e){return rb(t=>t.normalize(e))}function ab(){return rb(e=>e.trim())}function ob(){return rb(e=>e.toLowerCase())}function sb(){return rb(e=>e.toUpperCase())}function cb(){return rb(e=>jg(e))}function lb(e,t,n){return new e({type:`array`,element:t,...Z(n)})}function ub(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Z(n)})}function db(e,t){let n=fb(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(e_(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(e_(r))}},e(t.value,t)),t);return n}function fb(e,t){let n=new J_({check:`custom`,...Z(t)});return n._zod.check=e,n}function pb(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??vy,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function mb(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,mb(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&_b(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function hb(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root> 84 85Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function gb(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:yb(t,`input`,e.processors),output:yb(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function _b(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return _b(r.element,n);if(r.type===`set`)return _b(r.valueType,n);if(r.type===`lazy`)return _b(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return _b(r.innerType,n);if(r.type===`intersection`)return _b(r.left,n)||_b(r.right,n);if(r.type===`record`||r.type===`map`)return _b(r.keyType,n)||_b(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:_b(r.in,n)||_b(r.out,n);if(r.type===`object`){for(let e in r.shape)if(_b(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(_b(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(_b(e,n))return!0;return!!(r.rest&&_b(r.rest,n))}return!1}var vb=(e,t={})=>n=>{let r=pb({...n,processors:t});return mb(e,r),hb(r,e),gb(r,e)},yb=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=pb({...i??{},target:a,io:t,processors:n});return mb(e,o),hb(o,e),gb(o,e)},bb={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},xb=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=bb[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Sb=(e,t,n,r)=>{n.not={}},Cb=(e,t,n,r)=>{let i=e._zod.def,a=xg(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},wb=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Tb=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Eb=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=mb(a.element,t,{...r,path:[...r.path,`items`]})},Db=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=mb(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=mb(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ob=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>mb(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},kb=(e,t,n,r)=>{let i=e._zod.def,a=mb(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=mb(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ab=(e,t,n,r)=>{let i=e._zod.def,a=mb(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},jb=(e,t,n,r)=>{let i=e._zod.def;mb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Mb=(e,t,n,r)=>{let i=e._zod.def;mb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Nb=(e,t,n,r)=>{let i=e._zod.def;mb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Pb=(e,t,n,r)=>{let i=e._zod.def;mb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Fb=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;mb(o,t,r);let s=t.seen.get(e);s.ref=o},Ib=(e,t,n,r)=>{let i=e._zod.def;mb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Lb=(e,t,n,r)=>{let i=e._zod.def;mb(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Rb=X(`ZodISODateTime`,(e,t)=>{Sv.init(e,t),dx.init(e,t)});function zb(e){return Hy(Rb,e)}var Bb=X(`ZodISODate`,(e,t)=>{Cv.init(e,t),dx.init(e,t)});function Vb(e){return Uy(Bb,e)}var Hb=X(`ZodISOTime`,(e,t)=>{wv.init(e,t),dx.init(e,t)});function Ub(e){return Wy(Hb,e)}var Wb=X(`ZodISODuration`,(e,t)=>{Tv.init(e,t),dx.init(e,t)});function Gb(e){return Gy(Wb,e)}var Kb=X(`ZodError`,(e,t)=>{n_.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>a_(e,t)},flatten:{value:t=>i_(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Sg,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Sg,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),qb=o_(Kb),Jb=s_(Kb),Yb=c_(Kb),Xb=u_(Kb),Zb=f_(Kb),Qb=p_(Kb),$b=m_(Kb),ex=h_(Kb),tx=g_(Kb),nx=__(Kb),rx=v_(Kb),ix=y_(Kb),ax=new WeakMap;function ox(e,t,n){let r=Object.getPrototypeOf(e),i=ax.get(r);if(i||(i=new Set,ax.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var sx=X(`ZodType`,(e,t)=>(cv.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:yb(e,`input`),output:yb(e,`output`)}}),e.toJSONSchema=vb(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>qb(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Yb(e,t,n),e.parseAsync=async(t,n)=>Jb(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Xb(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Zb(e,t,n),e.decode=(t,n)=>Qb(e,t,n),e.encodeAsync=async(t,n)=>$b(e,t,n),e.decodeAsync=async(t,n)=>ex(e,t,n),e.safeEncode=(t,n)=>tx(e,t,n),e.safeDecode=(t,n)=>nx(e,t,n),e.safeEncodeAsync=async(t,n)=>rx(e,t,n),e.safeDecodeAsync=async(t,n)=>ix(e,t,n),ox(e,`ZodType`,{check(...e){let t=this.def;return this.clone(kg(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return zg(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(fS(e,t))},superRefine(e,t){return this.check(pS(e,t))},overwrite(e){return this.check(rb(e))},optional(){return Jx(this)},exactOptional(){return Xx(this)},nullable(){return Qx(this)},nullish(){return Jx(Qx(this))},nonoptional(e){return iS(this,e)},array(){return Ix(this)},or(e){return Bx([this,e])},and(e){return Hx(this,e)},transform(e){return cS(this,Kx(e))},default(e){return eS(this,e)},prefault(e){return nS(this,e)},catch(e){return oS(this,e)},pipe(e){return cS(this,e)},readonly(){return uS(this)},describe(e){let t=this.clone();return vy.add(t,{description:e}),t},meta(...e){if(e.length===0)return vy.get(this);let t=this.clone();return vy.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return vy.get(e)?.description},configurable:!0}),e)),cx=X(`_ZodString`,(e,t)=>{lv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xb(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ox(e,`_ZodString`,{regex(...e){return this.check(Zy(...e))},includes(...e){return this.check(eb(...e))},startsWith(...e){return this.check(tb(...e))},endsWith(...e){return this.check(nb(...e))},min(...e){return this.check(Yy(...e))},max(...e){return this.check(Jy(...e))},length(...e){return this.check(Xy(...e))},nonempty(...e){return this.check(Yy(1,...e))},lowercase(e){return this.check(Qy(e))},uppercase(e){return this.check($y(e))},trim(){return this.check(ab())},normalize(...e){return this.check(ib(...e))},toLowerCase(){return this.check(ob())},toUpperCase(){return this.check(sb())},slugify(){return this.check(cb())}})}),lx=X(`ZodString`,(e,t)=>{lv.init(e,t),cx.init(e,t),e.email=t=>e.check(by(fx,t)),e.url=t=>e.check(Ey(hx,t)),e.jwt=t=>e.check(Vy(Ax,t)),e.emoji=t=>e.check(Dy(gx,t)),e.guid=t=>e.check(xy(px,t)),e.uuid=t=>e.check(Sy(mx,t)),e.uuidv4=t=>e.check(Cy(mx,t)),e.uuidv6=t=>e.check(wy(mx,t)),e.uuidv7=t=>e.check(Ty(mx,t)),e.nanoid=t=>e.check(Oy(_x,t)),e.guid=t=>e.check(xy(px,t)),e.cuid=t=>e.check(ky(vx,t)),e.cuid2=t=>e.check(Ay(yx,t)),e.ulid=t=>e.check(jy(bx,t)),e.base64=t=>e.check(Ry(Dx,t)),e.base64url=t=>e.check(zy(Ox,t)),e.xid=t=>e.check(My(xx,t)),e.ksuid=t=>e.check(Ny(Sx,t)),e.ipv4=t=>e.check(Py(Cx,t)),e.ipv6=t=>e.check(Fy(wx,t)),e.cidrv4=t=>e.check(Iy(Tx,t)),e.cidrv6=t=>e.check(Ly(Ex,t)),e.e164=t=>e.check(By(kx,t)),e.datetime=t=>e.check(zb(t)),e.date=t=>e.check(Vb(t)),e.time=t=>e.check(Ub(t)),e.duration=t=>e.check(Gb(t))});function ux(e){return yy(lx,e)}var dx=X(`ZodStringFormat`,(e,t)=>{uv.init(e,t),cx.init(e,t)}),fx=X(`ZodEmail`,(e,t)=>{pv.init(e,t),dx.init(e,t)}),px=X(`ZodGUID`,(e,t)=>{dv.init(e,t),dx.init(e,t)}),mx=X(`ZodUUID`,(e,t)=>{fv.init(e,t),dx.init(e,t)}),hx=X(`ZodURL`,(e,t)=>{mv.init(e,t),dx.init(e,t)}),gx=X(`ZodEmoji`,(e,t)=>{hv.init(e,t),dx.init(e,t)}),_x=X(`ZodNanoID`,(e,t)=>{gv.init(e,t),dx.init(e,t)}),vx=X(`ZodCUID`,(e,t)=>{_v.init(e,t),dx.init(e,t)}),yx=X(`ZodCUID2`,(e,t)=>{vv.init(e,t),dx.init(e,t)}),bx=X(`ZodULID`,(e,t)=>{yv.init(e,t),dx.init(e,t)}),xx=X(`ZodXID`,(e,t)=>{bv.init(e,t),dx.init(e,t)}),Sx=X(`ZodKSUID`,(e,t)=>{xv.init(e,t),dx.init(e,t)}),Cx=X(`ZodIPv4`,(e,t)=>{Ev.init(e,t),dx.init(e,t)}),wx=X(`ZodIPv6`,(e,t)=>{Dv.init(e,t),dx.init(e,t)}),Tx=X(`ZodCIDRv4`,(e,t)=>{Ov.init(e,t),dx.init(e,t)}),Ex=X(`ZodCIDRv6`,(e,t)=>{kv.init(e,t),dx.init(e,t)}),Dx=X(`ZodBase64`,(e,t)=>{jv.init(e,t),dx.init(e,t)}),Ox=X(`ZodBase64URL`,(e,t)=>{Nv.init(e,t),dx.init(e,t)}),kx=X(`ZodE164`,(e,t)=>{Pv.init(e,t),dx.init(e,t)}),Ax=X(`ZodJWT`,(e,t)=>{Iv.init(e,t),dx.init(e,t)}),jx=X(`ZodUnknown`,(e,t)=>{Lv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Mx(){return Ky(jx)}var Nx=X(`ZodNever`,(e,t)=>{Rv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sb(e,t,n,r)});function Px(e){return qy(Nx,e)}var Fx=X(`ZodArray`,(e,t)=>{Bv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eb(e,t,n,r),e.element=t.element,ox(e,`ZodArray`,{min(e,t){return this.check(Yy(e,t))},nonempty(e){return this.check(Yy(1,e))},max(e,t){return this.check(Jy(e,t))},length(e,t){return this.check(Xy(e,t))},unwrap(){return this.element}})});function Ix(e,t){return lb(Fx,e,t)}var Lx=X(`ZodObject`,(e,t)=>{Gv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Db(e,t,n,r),Dg(e,`shape`,()=>
85t.shape),ox(e,`ZodObject`,{keyof(){return Wx(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Mx()})},loose(){return this.clone({...this._zod.def,catchall:Mx()})},strict(){return this.clone({...this._zod.def,catchall:Px()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ug(this,e)},safeExtend(e){return Wg(this,e)},merge(e){return Gg(this,e)},pick(e){return Vg(this,e)},omit(e){return Hg(this,e)},partial(...e){return Kg(qx,this,e[0])},required(...e){return qg(rS,this,e[0])}})});function Rx(e,t){return new Lx({type:`object`,shape:e??{},...Z(t)})}var zx=X(`ZodUnion`,(e,t)=>{qv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ob(e,t,n,r),e.options=t.options});function Bx(e,t){return new zx({type:`union`,options:e,...Z(t)})}var Vx=X(`ZodIntersection`,(e,t)=>{Jv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kb(e,t,n,r)});function Hx(e,t){return new Vx({type:`intersection`,left:e,right:t})}var Ux=X(`ZodEnum`,(e,t)=>{Zv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cb(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ux({...t,checks:[],...Z(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ux({...t,checks:[],...Z(r),entries:i})}});function Wx(e,t){return new Ux({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Z(t)})}var Gx=X(`ZodTransform`,(e,t)=>{Qv.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tb(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new vg(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(e_(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(e_(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Kx(e){return new Gx({type:`transform`,transform:e})}var qx=X(`ZodOptional`,(e,t)=>{ey.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Jx(e){return new qx({type:`optional`,innerType:e})}var Yx=X(`ZodExactOptional`,(e,t)=>{ty.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Xx(e){return new Yx({type:`optional`,innerType:e})}var Zx=X(`ZodNullable`,(e,t)=>{ny.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ab(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Qx(e){return new Zx({type:`nullable`,innerType:e})}var $x=X(`ZodDefault`,(e,t)=>{ry.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function eS(e,t){return new $x({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ig(t)}})}var tS=X(`ZodPrefault`,(e,t)=>{ay.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nS(e,t){return new tS({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ig(t)}})}var rS=X(`ZodNonOptional`,(e,t)=>{oy.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function iS(e,t){return new rS({type:`nonoptional`,innerType:e,...Z(t)})}var aS=X(`ZodCatch`,(e,t)=>{cy.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pb(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function oS(e,t){return new aS({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var sS=X(`ZodPipe`,(e,t)=>{ly.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fb(e,t,n,r),e.in=t.in,e.out=t.out});function cS(e,t){return new sS({type:`pipe`,in:e,out:t})}var lS=X(`ZodReadonly`,(e,t)=>{dy.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ib(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uS(e){return new lS({type:`readonly`,innerType:e})}var dS=X(`ZodCustom`,(e,t)=>{py.init(e,t),sx.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wb(e,t,n,r)});function fS(e,t={}){return ub(dS,e,t)}function pS(e,t){return db(e,t)}var mS=Rx({email:ux().trim().email({message:`Please enter a valid email address.`}).max(255)});function hS({compact:e=!1}){let[t,n]=(0,N.useState)(``),[r,i]=(0,N.useState)(`idle`),[a,o]=(0,N.useState)(null);return r===`ok`?(0,P.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-primary/10 p-3 text-sm text-primary`,children:[(0,P.jsx)(xh,{size:18}),(0,P.jsx)(`span`,{children:`Thanks! Check your inbox to confirm.`})]}):(0,P.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),o(null);let r=mS.safeParse({email:t});if(!r.success){o(r.error.issues[0]?.message||`Invalid email`),i(`err`);return}try{let e=JSON.parse(localStorage.getItem(`sc:newsletter`)||`[]`);e.includes(r.data.email)||e.push(r.data.email),localStorage.setItem(`sc:newsletter`,JSON.stringify(e))}catch{}i(`ok`),n(``)},className:e?`flex gap-2`:`grid gap-2 sm:grid-cols-[1fr_auto]`,noValidate:!0,children:[(0,P.jsx)(`label`,{className:`sr-only`,htmlFor:e?`nl-email-c`:`nl-email`,children:`Email address`}),(0,P.jsx)(`input`,{id:e?`nl-email-c`:`nl-email`,type:`email`,required:!0,autoComplete:`email`,maxLength:255,value:t,onChange:e=>n(e.target.value),placeholder:`[email protected]`,className:`w-full rounded-md border border-input bg-background px-3 py-2 text-sm outline-none ring-primary/30 focus:ring-2`}),(0,P.jsx)(sg,{type:`submit`,children:`Subscribe`}),a&&(0,P.jsx)(`p`,{className:`text-xs text-destructive sm:col-span-2`,role:`alert`,children:a})]})}var gS=[{label:`Privacy Policy`,href:`/privacy`},{label:`Terms & Conditions`,href:`/terms`},{label:`Disclaimer`,href:`/disclaimer`},{label:`Editorial Policy`,href:`/editorial-policy`},{label:`Affiliate Disclosure`,href:`/affiliate-disclosure`},{label:`Fact-Checking Policy`,href:`/fact-checking-policy`},{label:`Cookie Policy`,href:`/cookie-policy`},{label:`Accessibility Statement`,href:`/accessibility`}],_S=[{label:`About Us`,href:`/about`},{label:`Review Methodology`,href:`/methodology`},{label:`Contact`,href:`/contact`},{label:`Authors`,href:`/authors`},{label:`Careers`,href:`/careers`},{label:`Write For Us`,href:`/write-for-us`},{label:`Advertise`,href:`/advertise`}],vS=[{label:`Software Reviews`,href:`/software`},{label:`Comparisons`,href:`/compare`}
85,{label:`Best Software`,href:`/best`},{label:`Buying Guides`,href:`/guides`},{label:`Free Tools & Calculators`,href:`/tools`},{label:`Pricing Guides`,href:`/pricing-guides`},{label:`Tutorials`,href:`/tutorials`},{label:`Industry Solutions`,href:`/industries`}];function yS(){let e=new Date().getFullYear();return(0,P.jsx)(`footer`,{className:`mt-24 border-t bg-secondary/40`,children:(0,P.jsxs)(`div`,{className:`container-page py-12`,children:[(0,P.jsxs)(`div`,{className:`grid gap-10 md:grid-cols-2 lg:grid-cols-4`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(w,{to:`/`,className:`flex items-center gap-2`,children:[(0,P.jsx)(`div`,{className:`grid h-9 w-9 place-items-center rounded-xl gradient-brand text-white`,children:(0,P.jsx)(`span`,{className:`font-display text-sm font-bold`,children:`SD`})}),(0,P.jsx)(`span`,{className:`font-display text-lg font-bold`,children:`Spendesk`})]}),(0,P.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:`Independent reviews, comparisons, and buying guides for the best business software.`}),(0,P.jsxs)(`div`,{className:`mt-4 flex gap-3 text-muted-foreground`,children:[(0,P.jsx)(`a`,{href:`https://twitter.com`,"aria-label":`Twitter`,rel:`noopener`,className:`hover:text-primary`,children:(0,P.jsx)(Nh,{size:18})}),(0,P.jsx)(`a`,{href:`https://linkedin.com`,"aria-label":`LinkedIn`,rel:`noopener`,className:`hover:text-primary`,children:(0,P.jsx)(Eh,{size:18})}),(0,P.jsx)(`a`,{href:`https://github.com`,"aria-label":`GitHub`,rel:`noopener`,className:`hover:text-primary`,children:(0,P.jsx)(Th,{size:18})}),(0,P.jsx)(`a`,{href:`/rss.xml`,"aria-label":`RSS feed`,className:`hover:text-primary`,children:(0,P.jsx)(kh,{size:18})})]})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`mb-3 text-sm font-semibold`,children:`Resources`}),(0,P.jsx)(`ul`,{className:`space-y-2 text-sm`,children:vS.map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(w,{to:e.href,className:`text-muted-foreground hover:text-primary`,children:e.label})},e.href))})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`mb-3 text-sm font-semibold`,children:`Company`}),(0,P.jsx)(`ul`,{className:`space-y-2 text-sm`,children:_S.map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(w,{to:e.href,className:`text-muted-foreground hover:text-primary`,children:e.label})},e.href))}),(0,P.jsx)(`div`,{className:`mt-6 mb-3 text-sm font-semibold`,children:`Legal`}),(0,P.jsx)(`ul`,{className:`space-y-2 text-sm`,children:gS.map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(w,{to:e.href,className:`text-muted-foreground hover:text-primary`,children:e.label})},e.href))})]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`div`,{className:`mb-3 text-sm font-semibold`,children:`Newsletter`}),(0,P.jsx)(`p`,{className:`mb-3 text-sm text-muted-foreground`,children:`Weekly SaaS reviews and buying tips. No spam.`}),(0,P.jsx)(hS,{compact:!0}),(0,P.jsx)(`div`,{className:`mt-6 mb-3 text-sm font-semibold`,children:`Popular categories`}),(0,P.jsx)(`ul`,{className:`grid grid-cols-2 gap-1 text-sm`,children:Lh.slice(0,8).map(e=>(0,P.jsx)(`li`,{children:(0,P.jsx)(w,{to:`/category/$slug`,params:{slug:e.slug},className:`text-muted-foreground hover:text-primary`,children:e.name})},e.slug))})]})]}),(0,P.jsxs)(`div`,{className:`mt-10 flex flex-col gap-3 border-t pt-6 text-xs text-muted-foreground sm:flex-row sm:items-center sm:justify-between`,children:[(0,P.jsxs)(`p`,{children:[`© `,e,` Spendesk. All rights reserved.`]}),(0,P.jsxs)(`p`,{children:[`Spendesk may earn affiliate commissions from links on this site. See our`,` `,(0,P.jsx)(w,{to:`/affiliate-disclosure`,className:`underline hover:text-primary`,children:`Affiliate Disclosure`}),`.`]})]})]})})}var bS=`sc:cookie-consent`,xS=`sc:consent-change`;function SS(){if(typeof window>`u`)return null;let e=window.localStorage.getItem(bS);return e===`accepted`||e===`essential`?e:null}function CS(e){window.localStorage.setItem(bS,e),window.dispatchEvent(new CustomEvent(xS,{detail:e}));let t=window.gtag;t?.(`consent`,`update`,{ad_storage:e===`accepted`?`granted`:`denied`,ad_user_data:e===`accepted`?`granted`:`denied`,ad_personalization:e===`accepted`?`granted`:`denied`,anal
85ytics_storage:e===`accepted`?`granted`:`denied`})}function wS(){let[e,t]=(0,N.useState)(!1);(0,N.useEffect)(()=>{SS()||setTimeout(()=>t(!0),800)},[]);let n=e=>{CS(e),t(!1)};return e?(0,P.jsx)(`div`,{className:`fixed inset-x-0 bottom-0 z-50 p-4`,role:`dialog`,"aria-label":`Cookie consent`,children:(0,P.jsxs)(`div`,{className:`container-page mx-auto max-w-3xl rounded-2xl border bg-card p-4 shadow-xl`,children:[(0,P.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex-1 text-sm`,children:[(0,P.jsx)(`p`,{className:`font-semibold text-foreground`,children:`We use cookies`}),(0,P.jsxs)(`p`,{className:`mt-1 text-muted-foreground`,children:[`We use essential cookies to run this site. With your consent we also use analytics and advertising cookies â our advertising partners may set cookies or device identifiers to show and measure ads. You can decline and still use the whole site. Read our`,` `,(0,P.jsx)(w,{to:`/cookie-policy`,className:`text-primary underline`,children:`Cookie Policy`}),` and`,` `,(0,P.jsx)(w,{to:`/privacy`,className:`text-primary underline`,children:`Privacy Policy`}),`.`]})]}),(0,P.jsx)(`button`,{"aria-label":`Close`,onClick:()=>n(`essential`),className:`rounded-md p-1 text-muted-foreground hover:bg-accent`,children:(0,P.jsx)(Ih,{size:16})})]}),(0,P.jsxs)(`div`,{className:`mt-3 flex flex-wrap justify-end gap-2`,children:[(0,P.jsx)(sg,{variant:`outline`,size:`sm`,onClick:()=>n(`essential`),children:`Reject non-essential`}),(0,P.jsx)(sg,{size:`sm`,onClick:()=>n(`accepted`),children:`Accept all`})]})]})}):null}function TS(){let[e,t]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{let e=()=>t(window.scrollY>600);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),e?(0,P.jsx)(`button`,{type:`button`,onClick:()=>window.scrollTo({top:0,behavior:`smooth`}),"aria-label":`Back to top`,className:`fixed bottom-6 right-6 z-40 grid h-11 w-11 place-items-center rounded-full border bg-background text-foreground shadow-lg transition-transform hover:-translate-y-0.5 hover:text-primary`,children:(0,P.jsx)(vh,{size:18})}):null}function ES(){let e=Js({select:e=>e.location}),t=(0,N.useRef)(null);return(0,N.useEffect)(()=>{let n=e.pathname+(e.searchStr||``);if(t.current===null){t.current=n;return}if(t.current===n)return;t.current=n;let r=window.gtag;r?.(`event`,`page_view`,{page_path:n,page_location:window.location.href,page_title:document.title})},[e.pathname,e.searchStr]),null}var DS=`https://unfolded-uncle.com/dkmcFpz.d/G/NBvqZMGNUA/AeNmh9vu/ZXU/l-kJPUTDc/0tMgjzYz1-MGDtEvteNazpQOyuN-jVUrwJNoQm`;function OS(e){let t=new DOMParser().parseFromString(e,`text/xml`),n=e=>{let n=Array.from(t.getElementsByTagName(e));for(let e of n){let t=e.textContent?.trim();if(t)return t}},r=n(`VASTAdTagURI`);if(r)return{wrapperUrl:r};let i=n(`MediaFile`);if(!i)return{};let a=Array.from(t.getElementsByTagName(`Impression`)).map(e=>e.textContent?.trim()??``).filter(Boolean);return{data:{mediaUrl:i,clickThrough:n(`ClickThrough`),impressionUrls:a}}}async function kS(e,t=0){if(t>8)return null;let n=await fetch(e,{credentials:`omit`});if(!n.ok)return null;let{data:r,wrapperUrl:i}=OS(await n.text());return r||(i?kS(i,t+1):null)}function AS(){let[e,t]=(0,N.useState)(null),[n,r]=(0,N.useState)(!0),[i,a]=(0,N.useState)(!1),o=(0,N.useRef)(null);return(0,N.useEffect)(()=>{if(sessionStorage.getItem(`vast-closed`)===`1`){a(!0);return}let e=!1;return kS(DS).then(n=>{if(!(e||!n)){t(n);for(let e of n.impressionUrls)fetch(e,{mode:`no-cors`,credentials:`omit`}).catch(()=>{})}}).catch(()=>{}),()=>{e=!0}},[]),i||!e?null:(0,P.jsxs)(`div`,{className:`fixed bottom-4 left-1/2 z-50 w-[320px] -translate-x-1/2 overflow-hidden rounded-xl border border-border bg-card shadow-2xl`,children:[(0,P.jsxs)(`div`,{className:`flex items-center justify-between bg-muted/80 px-2 py-1`,children:[(0,P.jsx)(`span`,{className:`text-[10px] uppercase tracking-wide text-muted-foreground`,children:`Advertisement`}),(0,P.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,P.jsx)(`button`,{type:`button`,"aria-label":n?`Unmute`:`Mute`,className:`rounded p-1 text-muted-foreground hover:text-foreground`,onClick:()=>{let e=o.current;e&&(e.muted=!e.muted),r(!n)},children:n?(0,P.jsx)(Fh,{className:`h-3.5 w-3.5`}):(0,P.jsx)(Ph,{className:`h-3.5 w-3.5`})}),(0,P.jsx)(`button`,{type:`button`,"aria-label":`Close ad`,className:`rounded p-1 text-muted-foreground hover:text-foreground`,onClick:()=>{a(!0),sessionStorage.setItem(`vast-closed`,`1`)},children:(0,P.jsx)(Ih,{className:`h-3.5 w-3.5`})})]})]}),(0,P.jsx)(`video`,{ref:o,src:e.mediaUrl,autoPlay:!0,muted:!0,playsInl
85ine:!0,className:`block w-full cursor-pointer`,onClick:()=>{e.clickThrough&&window.open(e.clickThrough,`_blank`,`noopener`)}})]})}function jS(){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(hg,{}),(0,P.jsx)(`main`,{id:`main`,className:`container-page grid min-h-[60vh] place-items-center py-16`,children:(0,P.jsxs)(`div`,{className:`text-center`,children:[(0,P.jsx)(`p`,{className:`text-sm font-semibold uppercase tracking-widest text-primary`,children:`404 error`}),(0,P.jsx)(`h1`,{className:`mt-2 font-display text-5xl font-bold tracking-tight text-foreground`,children:`Page not found`}),(0,P.jsx)(`p`,{className:`mx-auto mt-4 max-w-md text-muted-foreground`,children:`The page you're looking for doesn't exist or has moved. Try one of these instead.`}),(0,P.jsxs)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2`,children:[(0,P.jsx)(w,{to:`/`,className:`inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90`,children:`Go home`}),(0,P.jsx)(w,{to:`/software`,className:`inline-flex items-center justify-center rounded-md border px-4 py-2 text-sm font-medium hover:bg-accent`,children:`Browse reviews`}),(0,P.jsx)(w,{to:`/categories`,className:`inline-flex items-center justify-center rounded-md border px-4 py-2 text-sm font-medium hover:bg-accent`,children:`All categories`})]})]})}),(0,P.jsx)(yS,{})]})}function MS({error:e,reset:t}){console.error(e);let n=pe();return(0,N.useEffect)(()=>{_h(e,{boundary:`tanstack_root_error_component`})},[e]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(hg,{}),(0,P.jsx)(`main`,{id:`main`,className:`container-page grid min-h-[60vh] place-items-center py-16`,children:(0,P.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,P.jsx)(`h1`,{className:`font-display text-2xl font-bold tracking-tight text-foreground`,children:`This page didn't load`}),(0,P.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Something went wrong on our end. You can try refreshing or head back home.`}),(0,P.jsxs)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2`,children:[(0,P.jsx)(`button`,{onClick:()=>{n.invalidate(),t()},className:`inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90`,children:`Try again`}),(0,P.jsx)(`a`,{href:`/`,className:`inline-flex items-center justify-center rounded-md border px-4 py-2 text-sm font-medium hover:bg-accent`,children:`Go home`})]})]})}),(0,P.jsx)(yS,{})]})}var Q=Ts()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{name:`google-site-verification`,content:`RXSI-5cc0E0_5kkJY-QCLzjlCnz8zLVLvHdxdedrEH8`},{name:`8679d563e8c5bd1f995314f5c8edbd3a426130ac`,content:`8679d563e8c5bd1f995314f5c8edbd3a426130ac`},{title:`Spendesk`},{name:`description`,content:`Independent SaaS reviews, side-by-side comparisons, and buying guides.`},{name:`author`,content:`Spendesk`},{name:`theme-color`,content:`#6D5EF8`},{property:`og:site_name`,content:`Spendesk`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:site`,content:`@spendesk`}],links:[{rel:`stylesheet`,href:gh},{rel:`icon`,href:`/favicon.ico`,type:`image/x-icon`},{rel:`preconnect`,href:`https://fonts.googleapis.com`},{rel:`preconnect`,href:`https://fonts.gstatic.com`,crossOrigin:`anonymous`},{rel:`stylesheet`,href:`https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap`}],scripts:[{async:!0,src:`https://www.googletagmanager.com/gtag/js?id=G-13V3HMFQ9Z`},{async:!0,src:`https://massivesalad.com/bLXwVWsDd.G/lv0XYlWvcr/vecm/9yuTZoU/l/kWP-Txc-0NMmjyY/0/NmjnEWt/NGzbQVydNQjWQR2/NfQ_`,referrerPolicy:`no-referrer-when-downgrade`},{async:!0,src:`https://massivesalad.com/bsXnV.sldOG/l-0zYiWmcc/Be-mZ9cuuZzUKlbk/PVT/cT0MMgj/YF0FNPzBcet/NDzqQKyENMjDQV4qMeQo`,referrerPolicy:`no-referrer-when-downgrade`},{async:!0,src:`/pu.js`,referrerPolicy:`no-referrer-when-downgrade`},{children:`window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('consent','default',{ad_storage:'denied',ad_user_data:'denied',ad_personalization:'denied',analytics_storage:'denied',wait_for_update:500});try{if(localStorage.getItem('sc:cookie-consent')==='accepted'){gtag('consent','update',{ad_storage:'granted',ad_user_data:'granted',ad_personalization:'granted',analytics_storage:'granted'});}}catch(e){}gtag('js', new Date());gtag('config', 'G-13V3HMFQ9Z');`},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Organization`,name:`
85Spendesk`,url:`/`,description:`Independent reviews, comparisons, and buying guides for business software.`,sameAs:[`https://twitter.com`,`https://linkedin.com`]})}]}),shellComponent:NS,component:PS,notFoundComponent:jS,errorComponent:MS});function NS({children:e}){return(0,P.jsxs)(`html`,{lang:`en`,children:[(0,P.jsx)(`head`,{children:(0,P.jsx)($s,{})}),(0,P.jsxs)(`body`,{children:[(0,P.jsx)(`a`,{href:`#main`,className:`sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-[100] focus:rounded focus:bg-primary focus:px-3 focus:py-1 focus:text-sm focus:text-primary-foreground`,children:`Skip to content`}),e,(0,P.jsx)(ec,{})]})]})}function PS(){let{queryClient:e}=Q.useRouteContext();return(0,P.jsxs)(hh,{client:e,children:[(0,P.jsxs)(`div`,{className:`flex min-h-dvh flex-col`,children:[(0,P.jsx)(hg,{}),(0,P.jsx)(`main`,{id:`main`,className:`flex-1`,children:(0,P.jsx)(zs,{})}),(0,P.jsx)(yS,{})]}),(0,P.jsx)(wS,{}),(0,P.jsx)(AS,{}),(0,P.jsx)(ES,{}),(0,P.jsx)(TS,{})]})}var FS=`modulepreload`,IS=function(e){return`/`+e},LS={},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=IS(t,n),t in LS)return;LS[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:FS,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},RS=F(`/write-for-us`)({head:()=>({meta:[{title:`Write For Us â Spendesk`},{name:`description`,content:`Pitch a SaaS review or buying guide to the Spendesk editorial team.`},{property:`og:title`,content:`Write For Us â Spendesk`},{property:`og:description`,content:`Pitch a SaaS review or buying guide to our editorial team.`},{property:`og:url`,content:`/write-for-us`}],links:[{rel:`canonical`,href:`/write-for-us`}]}),component:I(()=>$(()=>import(`./write-for-us-p0_8Dc_B.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),zS=F(`/tutorials`)({head:()=>({meta:[{title:`SaaS Tutorials & How-Tos â Spendesk`},{name:`description`,content:`Practical tutorials on setting up, customizing, and getting the most out of leading SaaS platforms.`},{property:`og:title`,content:`SaaS Tutorials â Spendesk`},{property:`og:description`,content:`How-to tutorials for popular business software.`},{property:`og:url`,content:`/tutorials`}],links:[{rel:`canonical`,href:`/tutorials`}]}),component:I(()=>$(()=>import(`./tutorials-Z54KZG7X.js`),__vite__mapDeps([6,1,2,3,4,5])),`component`)}),BS=F(`/tools`)({head:()=>({meta:[{title:`Free SaaS Tools & Calculators â Spendesk`},{name:`description`,content:`Free interactive tools for software buyers: SaaS cost calculator, ROI calculator, software finder quiz, and a weighted vendor scorecard.`},{property:`og:title`,content:`Free SaaS Tools & Calculators â Spendesk`},{property:`og:description`,content:`Calculate SaaS cost and ROI, find the right software, and score vendors â free, no signup.`},{property:`og:type`,content:`website`},{property:`og:url`,content:`https://spendesk.lovable.app/tools`}]}),component:I(()=>$(()=>import(`./tools-C3GSsaba.js`),__vite__mapDeps([7,1,3,4,5])),`component`)}),VS=[{to:`/tools/saas-cost-calculator`,name:`SaaS Cost Calculator`,blurb:`Model per-seat, annual, and 3-year total cost of ownership including onboarding and add-ons.`,icon:bh},{to:`/tools/roi-calculator`,name:`Software ROI Calculator`,blurb:`Turn hours s
85aved and revenue lift into a payback period and first-year return.`,icon:Mh},{to:`/tools/software-finder`,name:`Software Finder Quiz`,blurb:`Answer five questions and get a shortlist from our reviewed catalogue.`,icon:Ch},{to:`/tools/vendor-scorecard`,name:`Vendor Scorecard`,blurb:`Score shortlisted vendors against weighted criteria and see a clear winner.`,icon:Sh}],HS=F(`/terms`)({head:()=>({meta:[{title:`Terms and Conditions â Spendesk`},{name:`description`,content:`The terms and conditions governing use of the Spendesk website.`},{property:`og:title`,content:`Terms and Conditions â Spendesk`},{property:`og:description`,content:`Terms and conditions for using Spendesk.`},{property:`og:url`,content:`/terms`}],links:[{rel:`canonical`,href:`/terms`}]}),component:I(()=>$(()=>import(`./terms-CdcsRvDn.js`),__vite__mapDeps([8,1,2,3])),`component`)}),US=F(`/tags`)({head:()=>({meta:[{title:`Article Tags â Spendesk`},{name:`description`,content:`Browse Spendesk articles by topic and tag.`},{property:`og:title`,content:`Tags â Spendesk`},{property:`og:description`,content:`Browse articles by tag.`},{property:`og:url`,content:`/tags`}],links:[{rel:`canonical`,href:`/tags`}]}),component:I(()=>$(()=>import(`./tags-DodtOhUB.js`),__vite__mapDeps([9,1,2,3,4,5])),`component`)}),WS=F(`/software`)({head:()=>({meta:[{title:`All Software Reviews â Spendesk`},{name:`description`,content:`Browse ${Hh.length}+ in-depth SaaS software reviews across ${Lh.length} categories with ratings, pricing, and pros/cons.`},{property:`og:title`,content:`All Software Reviews â Spendesk`},{property:`og:description`,content:`Browse in-depth SaaS software reviews with ratings, pricing, pros and cons.`},{property:`og:url`,content:`/software`}],links:[{rel:`canonical`,href:`/software`}]}),component:I(()=>$(()=>import(`./software-CTmZql89.js`),__vite__mapDeps([10,1,3,11,12,13,14,4,5,15,16,17,18,19,20,21,22])),`component`)}),GS=()=>$(()=>import(`./search-CECWZP5I.js`),__vite__mapDeps([23,1,2,3,4,5])),KS=Rx({q:ux().optional().default(``)}),qS=F(`/search`)({validateSearch:e=>KS.parse(e),head:({params:e,loaderData:t})=>({meta:[{title:`Search â Spendesk`},{name:`description`,content:`Search SaaS reviews, comparisons, and buying guides across Spendesk.`},{property:`og:title`,content:`Search â Spendesk`},{property:`og:description`,content:`Search Spendesk reviews and articles.`},{property:`og:url`,content:`/search`},{name:`robots`,content:`noindex`}],links:[{rel:`canonical`,href:`/search`}]}),component:I(GS,`component`)}),JS=F(`/privacy`)({head:()=>({meta:[{title:`Privacy Policy â Spendesk`},{name:`description`,content:`How Spendesk collects, uses, and protects your personal information.`},{property:`og:title`,content:`Privacy Policy â Spendesk`},{property:`og:description`,content:`How we handle personal data at Spendesk.`},{property:`og:url`,content:`/privacy`}],links:[{rel:`canonical`,href:`/privacy`}]}),component:I(()=>$(()=>import(`./privacy-CjsIceOC.js`),__vite__mapDeps([24,1,2,3,4,5])),`component`)}),YS=F(`/pricing-guides`)({head:()=>({meta:[{title:`SaaS Pricing Guides â Spendesk`},{name:`description`,content:`Detailed pricing guides for every major SaaS product â plans, add-ons, and total cost of ownership.`},{property:`og:title`,content:`SaaS Pricing Guides â Spendesk`},{property:`og:description`,content:`Detailed pricing breakdowns for popular SaaS platforms.`},{property:`og:url`,content:`/pricing-guides`}],links:[{rel:`canonical`,href:`/pricing-guides`}]}),component:I(()=>$(()=>import(`./pricing-guides-Db5LcrU4.js`),__vite__mapDeps([25,1,2,3,4,5])),`component`)}),XS=F(`/newsletter`)({head:()=>({meta:[{title:`Newsletter â Spendesk`},{name:`description`,content:`Get the weekly Spendesk newsletter â reviews, comparisons, and buying tips.`},{property:`og:title`,content:`Spendesk Newsletter`},{property:`og:description`,content:`Weekly SaaS reviews and buying tips, no spam.`},{property:`og:url`,content:`/newsletter`}],links:[{rel:`canonical`,href:`/newsletter`}]}),component:I(()=>$(()=>import(`./newsletter-DcpRmFT3.js`),__vite__mapDeps([26,1,2,3])),`component`)}),ZS=F(`/methodology`)({head:()=>
85({meta:[{title:`How We Test & Rate Software â Spendesk`},{name:`description`,content:`Our review methodology: the six weighted criteria behind every Spendesk rating, how we test products hands-on, and how we stay editorially independent.`},{property:`og:title`,content:`How We Test & Rate Software`},{property:`og:description`,content:`The six weighted criteria behind every Spendesk rating and how our reviews stay independent.`},{property:`og:url`,content:`/methodology`}],links:[{rel:`canonical`,href:`/methodology`}]}),component:I(()=>$(()=>import(`./methodology-CVnZ8Lhs.js`),__vite__mapDeps([27,1,3,4,5])),`component`)}),QS=F(`/industries`)({head:()=>({meta:[{title:`Industry Solutions â Spendesk`},{name:`description`,content:`Software recommendations tailored to small businesses, enterprises, and startups.`},{property:`og:title`,content:`Industry Solutions â Spendesk`},{property:`og:description`,content:`Tailored SaaS recommendations by company size and industry.`},{property:`og:url`,content:`/industries`}],links:[{rel:`canonical`,href:`/industries`}]}),component:I(()=>$(()=>import(`./industries-BPDSyGQY.js`),__vite__mapDeps([28,1,2,3,4,5])),`component`)}),$S=F(`/guides`)({head:()=>({meta:[{title:`SaaS Buying Guides â Spendesk`},{name:`description`,content:`Step-by-step SaaS buying guides that help you evaluate, compare, and select the right business software.`},{property:`og:title`,content:`SaaS Buying Guides â Spendesk`},{property:`og:description`,content:`Practical SaaS buying guides for every category.`},{property:`og:url`,content:`/guides`}],links:[{rel:`canonical`,href:`/guides`}]}),component:I(()=>$(()=>import(`./guides-BKTdyiAS.js`),__vite__mapDeps([29,1,2,3,4,5])),`component`)}),eC=F(`/fact-checking-policy`)({head:()=>({meta:[{title:`Fact-Checking Policy â Spendesk`},{name:`description`,content:`How Spendesk verifies pricing, features, and claims in every review.`},{property:`og:title`,content:`Fact-Checking Policy â Spendesk`},{property:`og:description`,content:`How we verify pricing, features, and claims.`},{property:`og:url`,content:`/fact-checking-policy`}],links:[{rel:`canonical`,href:`/fact-checking-policy`}]}),component:I(()=>$(()=>import(`./fact-checking-policy-BD1XjKZ-.js`),__vite__mapDeps([30,1,2,3])),`component`)}),tC=F(`/editorial-policy`)({head:()=>({meta:[{title:`Editorial Policy â Spendesk`},{name:`description`,content:`How Spendesk produces reviews and articles, including our commitment to editorial independence.`},{property:`og:title`,content:`Editorial Policy â Spendesk`},{property:`og:description`,content:`Our editorial standards and commitment to independence.`},{property:`og:url`,content:`/editorial-policy`}],links:[{rel:`canonical`,href:`/editorial-policy`}]}),component:I(()=>$(()=>import(`./editorial-policy-CnKQnrWB.js`),__vite__mapDeps([31,1,2,3])),`component`)}),nC=F(`/disclaimer`)({head:()=>({meta:[{title:`Disclaimer â Spendesk`},{name:`description`,content:`General disclaimer regarding Spendesk content and recommendations.`},{property:`og:title`,content:`Disclaimer â Spendesk`},{property:`og:description`,content:`General disclaimer.`},{property:`og:url`,content:`/disclaimer`}],links:[{rel:`canonical`,href:`/disclaimer`}]}),component:I(()=>$(()=>import(`./disclaimer-Dfh8gaTe.js`),__vite__mapDeps([32,1,2,3,4,5])),`component`)}),rC=F(`/cookie-policy`)({head:()=>({meta:[{title:`Cookie Policy â Spendesk`},{name:`description`,content:`How Spendesk uses cookies and how you can control them.`},{property:`og:title`,content:`Cookie Policy â Spendesk`},{property:`og:description`,content:`How we use cookies on Spendesk.`},{property:`og:url`,content:`/cookie-policy`}],links:[{rel:`canonical`,href:`/cookie-policy`}]}),component:I(()=>$(()=>import(`./cookie-policy-CQWFm7qQ.js`),__vite__mapDeps([33,1,2,3])),`component`)}),iC=F(`/contact`)({head:()=>({meta:[{title:`Contact Us â Spendesk`},{name:`description`,content:`Get in touch with the Spendesk editorial team.`},{property:`og:title`,content:`Contact â Spendesk`},{property:`og:description`,content:`Contact our editorial team.`},{property:`og:url`,content:`/contact`}],links:[{rel:`canonical`,href:`/contact`}]}),component:I(()=>$(()=>import(`./contact-BgS2XQb9.js`),__vite__mapDeps([34,1,2,3,15,13,35,19,14,5])),`component`)}),aC=F(`/compare`)({head:()=>({meta:[{title:`Compare SaaS Software Side by Side â Spendesk`},{name:`description`,content:`Compare up to four SaaS products side by side on features, pricing, ratings, integrations, and security.`},{property:`og:title`,content:`Compare SaaS Software â Spendesk`},{property:`og:description`,content:`Side-by-side SaaS comparison across features, price, and ratings.`},{property:`og:url`,content:`/compare`}],links:[{rel:`canonical`,href:`/compare`}]}),component:I(()=>$(()=>import(`./compare-D1qO8TlP.js`),__vite__mapDeps([36,1,3,11,12,13,14,4,5,16,17,18,19,20,21])),`component`)}),oC=F(`/categories`)({head:()=>({meta:[{title:`All SaaS Categories â Spendesk`},{name:`description`,content:`Browse all ${Lh.length} SaaS categories we cover, from CRM and project management to accounting, marketing, and security.`},{property:`og:title`,content:`All SaaS Categories â Spendesk`},{property:`og:description`,content:`Browse every SaaS category we cover.`},{property:`og:url`,content:`/categories`}],links:[{rel:`canonical`,href:`/categories`}]}),component:I(()=>$(()=>import(`./categories-CNUF8gxP.js`),__vite__mapDeps([37,1,3,4,5])),`component`)}),sC=F(`/careers`)({head:()=>({meta:[{title:`Careers â Spendesk`},{name:`description`,content:`Open roles and freelance opportunities with the Spendesk editorial team.`},{property:`og:title`,content:`Careers â Spendesk`},{property:`og:description`,content:`Open roles at Spendesk.`},{property:`og:url`,content:`/careers`}],links:[{rel:`canonical`,href:`/careers`}]}),component:I(()=>$(()=>import(`./careers-C_OAtRy8.js`),__vite__mapDeps([38,1,2,3,4,5])),`component`)}),cC=F(`/bookmarks`)({head:()=>({meta:[{title:`Your Bookmarks â Spendesk`},{name:`description`,content:`Your saved software from Spendesk.`},{property:`og:title`,content:`Your Bookmarks â Spendesk`},{property:`og:description`,content:`Your saved SaaS reviews.`},{property:`og:url`,content:`/bookmarks`},{name:`robots`,content:`noindex`}],links:[{rel:`canonical`,href:`/bookmarks`}]}),component:I(()=>$(()=>import(`./bookmarks-CUeEe9uD.js`),__vite__mapDeps([39,1,2,3,11,12,13,14,4,5])),`component`)}),lC=F(`/best`)({head:()=>({meta:[{title:`Best Software Lists by Category â Spendesk`},{name:`description`,content:`The best SaaS software in every category â hand-picked, ranked, and updated for 2026.`},{property:`og:title`,content:`Best Software Lists â Spendesk`},{property:`og:description`,content:`The best SaaS software in every category, hand-picked for 2026.`},{property:`og:url`,content:`/best`}],links:[{rel:`canonical`,href:`/best`}]}),component:I(()=>$(()=>import(`./best-CEyWRZtk.js`),__vite__mapDeps([40,1,3,4,5])),`component`)}),uC=F(`/authors`)({head:()=>({meta:[{title:`Editorial Team & Authors â Spendesk`},{name:`description`,content:`Meet the analysts and editors behind Spendesk reviews and buying guides.`},{property:`og:title`,content:`Editorial Team â Spendesk`},{property:`og:description`,content:`Meet the Spendesk editorial team.`},{property:`og:url`,content:`/authors`}],links:[{rel:`canonical`,href:`/authors`}]}),component:I(()=>$(()=>import(`./authors-DNlgxpKt.js`),__vite__mapDeps([41,1,2,3,4,5])),`component`)}),dC=F(`/articles`)({head:()=>({meta:[{title:`SaaS Articles, Guides & Comparisons â Spendesk`}
85,{name:`description`,content:`Original SaaS articles, comparisons, and buying guides written by software analysts.`},{property:`og:title`,content:`SaaS Articles & Guides â Spendesk`},{property:`og:description`,content:`Original SaaS articles and buying guides from real analysts.`},{property:`og:url`,content:`/articles`}],links:[{rel:`canonical`,href:`/articles`}]}),component:I(()=>$(()=>import(`./articles-CY5IwW7T.js`),__vite__mapDeps([42,1,3,12,13,14,15,4,5])),`component`)}),fC=F(`/affiliate-disclosure`)({head:()=>({meta:[{title:`Affiliate Disclosure â Spendesk`},{name:`description`,content:`How Spendesk earns affiliate commissions and why they do not influence our rankings.`},{property:`og:title`,content:`Affiliate Disclosure â Spendesk`},{property:`og:description`,content:`Our affiliate relationships and disclosure.`},{property:`og:url`,content:`/affiliate-disclosure`}],links:[{rel:`canonical`,href:`/affiliate-disclosure`}]}),component:I(()=>$(()=>import(`./affiliate-disclosure-rF2_4MJ1.js`),__vite__mapDeps([43,1,2,3])),`component`)}),pC=F(`/advertise`)({head:()=>({meta:[{title:`Advertise on Spendesk`},{name:`description`,content:`Reach a high-intent audience of SaaS buyers via display sponsorship on Spendesk.`},{property:`og:title`,content:`Advertise on Spendesk`},{property:`og:description`,content:`Reach high-intent SaaS buyers.`},{property:`og:url`,content:`/advertise`}],links:[{rel:`canonical`,href:`/advertise`}]}),component:I(()=>$(()=>import(`./advertise-CcIA0RnG.js`),__vite__mapDeps([44,1,2,3,4,5])),`component`)}),mC=F(`/accessibility`)({head:()=>({meta:[{title:`Accessibility Statement â Spendesk`},{name:`description`,content:`Spendesk is committed to an accessible experience for all visitors.`},{property:`og:title`,content:`Accessibility Statement â Spendesk`},{property:`og:description`,content:`Our accessibility commitment.`},{property:`og:url`,content:`/accessibility`}],links:[{rel:`canonical`,href:`/accessibility`}]}),component:I(()=>$(()=>import(`./accessibility-CA89BoqM.js`),__vite__mapDeps([45,1,2,3,4,5])),`component`)}),hC=F(`/about`)({head:()=>({meta:[{title:`About Spendesk â Our Mission & Editorial Standards`},{name:`description`,content:`Spendesk provides independent, hands-on SaaS reviews to help businesses find the right software. Learn about our team and standards.`},{property:`og:title`,content:`About Spendesk`},{property:`og:description`,content:`Independent SaaS reviews to help businesses find the right software.`},{property:`og:url`,content:`/about`}],links:[{rel:`canonical`,href:`/about`}]}),component:I(()=>$(()=>import(`./about-5E5GVTlb.js`),__vite__mapDeps([46,1,2,3,4,5])),`component`)}),gC=F(`/`)({head:()=>({meta:[{title:`Spendesk â Compare the Best Business Software`},{name:`description`,content:`Independent reviews, comparisons, and buying guides for the best CRM, project management, accounting, and marketing software for every team.`},{property:`og:title`,content:`Spendesk â Compare the Best Business Software`},{property:`og:description`,content:`Independent reviews, comparisons, and buying guides for the best CRM, project management, accounting, and marketing software for every team.`},{property:`og:url`,content:`/`}],links:[{rel:`canonical`,href:`/`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`WebSite`,name:`Spendesk`,url:`/`,potentialAction:{"@type":`SearchAction`,target:`/search?q={search_term_string}`,"query-input":`required name=search_term_string`}})}]}),component:I(()=>$(()=>import(`./routes-B3skBfvM.js`),__vite__mapDeps([47,1,11,12,13,14,4,5,48,18,19,20,49])),`component`)}),_C=F(`/category/$slug`)({loader:({params:e})=>{let t=zh(e.slug);if(!t)throw Ie();return{category:t}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[{title:`Category not found â Spendesk`},{name:`robots`,content:`noindex`}]};let n=e.category,r=Wh(n.slug),i=`Best ${n.name} in 2026 â Reviews & Comparisons â Spendesk`,a=`${n.description} Compare the top ${r.length} ${n.name.toLowerCase()} platforms with reviews, pricing, and ratings.`,o=`/category/${t.slug}`;return{meta:[{title:i},{name:`description`,content:a},{property:`og:title`,content:i},{property:`og:description`,content:a},{property:`og:url`,content:o}],links:[{rel:`canonical`,href:o}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`ItemList`,name:n.name,itemListElement:r.map((e,t)=>({"@type":`ListItem`,position:t+1,name:e.name,url:`/software/${e.slug}`}))})}]}},component:I(()=>$(()=>import(`./category._slug-mKwxNAm_.js`),__vite__mapDeps([50,1,3,11,12,13,14,4,5])),`component`)}
85),vC=F(`/tools/vendor-scorecard`)({head:()=>({meta:[{title:`Vendor Scorecard â SaaS Selection Matrix`},{name:`description`,content:`Free weighted vendor scorecard: rate shortlisted SaaS vendors against criteria you weight yourself and get an objective ranked result.`},{property:`og:title`,content:`Vendor Scorecard â Weighted SaaS Selection Matrix`},{property:`og:description`,content:`Score shortlisted vendors against weighted criteria and get a defensible recommendation.`},{property:`og:type`,content:`website`},{property:`og:url`,content:`https://spendesk.lovable.app/tools/vendor-scorecard`}],links:[{rel:`canonical`,href:`https://spendesk.lovable.app/tools/vendor-scorecard`}]}),component:I(()=>$(()=>import(`./tools.vendor-scorecard-pxuNSi5e.js`),__vite__mapDeps([51,1,3,15,13,22,17,18,19,5,4])),`component`)}),yC=F(`/tools/software-finder`)({head:()=>({meta:[{title:`Software Finder Quiz â Spendesk`},{name:`description`,content:`Answer five short questions about your team size, budget, and priorities and get a matched shortlist of business software from our reviewed catalogue.`},{property:`og:title`,content:`Software Finder Quiz â Spendesk`},{property:`og:description`,content:`Five questions, one matched software shortlist. Free and instant.`},{property:`og:type`,content:`website`},{property:`og:url`,content:`https://spendesk.lovable.app/tools/software-finder`}],links:[{rel:`canonical`,href:`https://spendesk.lovable.app/tools/software-finder`}]}),component:I(()=>$(()=>import(`./tools.software-finder-DyOBZ4fQ.js`),__vite__mapDeps([52,1,3,11,12,13,14,4,5])),`component`)}),bC=F(`/tools/saas-cost-calculator`)({head:()=>({meta:[{title:`SaaS Cost Calculator â 3-Year TCO`},{name:`description`,content:`Free SaaS cost calculator: estimate per-seat spend, annual cost, onboarding, add-ons, and 3-year total cost of ownership before you sign a contract.`},{property:`og:title`,content:`SaaS Cost Calculator â 3-Year TCO`},{property:`og:description`,content:`Estimate the real cost of a SaaS subscription over three years, including seat growth and hidden costs.`},{property:`og:type`,content:`website`},{property:`og:url`,content:`https://spendesk.lovable.app/tools/saas-cost-calculator`}],links:[{rel:`canonical`,href:`https://spendesk.lovable.app/tools/saas-cost-calculator`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`WebApplication`,name:`SaaS Cost Calculator`,applicationCategory:`BusinessApplication`,operatingSystem:`Web`,url:`https://spendesk.lovable.app/tools/saas-cost-calculator`,offers:{"@type":`Offer`,price:`0`,priceCurrency:`USD`}})}]}),component:I(()=>$(()=>import(`./tools.saas-cost-calculator-9BV4yvf6.js`),__vite__mapDeps([53,1,3,15,13,35,19,14,5,22,17,18,4])),`component`)}),xC=F(`/tools/roi-calculator`)({head:()=>({meta:[{title:`Software ROI Calculator â Payback & ROI`},{name:`description`,content:`Free software ROI calculator: turn hours saved, hourly cost, and revenue lift into payback period, net return, and ROI percentage for any SaaS purchase.`},{property:`og:title`,content:`Software ROI Calculator`},{property:`og:description`,content:`Calculate payback period and first-year ROI for a SaaS purchase in seconds.`},{property:`og:type`,content:`website`},{property:`og:url`,content:`https://spendesk.lovable.app/tools/roi-calculator`}],links:[{rel:`canonical`,href:`https://spendesk.lovable.app/tools/roi-calculator`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`WebApplication`,name:`Software ROI Calculator`,applicationCategory:`BusinessApplication`,operatingSystem:`Web`,url:`https://spendesk.lovable.app/tools/roi-calculator`,offers:{"@type":`Offer`,price:`0`,priceCurrency:`USD`}})}]}),component:I(()=>$(()=>import(`./tools.roi-calculator-kX924X8y.js`),__vite__mapDeps([54,1,3,15,13,35,19,14,5,4])),`component`)}),SC=F(`/tags/$slug`)({loader:({params:e})=>{let t=rg.find(t=>t.toLowerCase().replace(/\s+/g,`-`)===e.slug);if(!t)throw Ie();return{tag:t}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[{title:`Tag not found`},{name:`robots`,content:`noindex`}]};let n=`/tags/${t.slug}`;return{meta:[{title:`${e.tag} â Articles â Spendesk`},{name:`description`,content:`Articles tagged ${e.tag} on Spendesk.`},{property:`og:title`,content:`${e.tag} â Spendesk`},{property:`og:description`,content:`Articles tagged ${e.tag}.`},{property:`og:url`,content:n}],links:[{rel:`canonical`,href:n}]}},component:I(()=>$(()=>import(`./tags._slug-BTUsAJfR.js`),__vite__mapDeps([55,1,2,3,4,5])),`component`)}),CC={salesforce:[{author:`Priya M.`,role:`RevOps Manager`,companySize:`500-1,000`,industry:`SaaS`,rating:5,date:`2026-05-12`,title:`Nothing else scales like it â but you'll need an admin`,body:`We migrated from HubSpot after hitting a ceiling around 300 reps. Salesforce absorbed our territory rules, complex approval flows, and CPQ setup without a fight. Einstein forecasting has been surprisingly accurate once we cleaned our stage data.`,pros:`Bottomless customization, best-in-class reporting, huge partner ecosystem.`,cons:`You WILL hire an admin. Add-ons balloon costs quickly.`,verified:!0,helpful:47,source:`Spendesk`},{author:`David K.`,role:`Sales Director`,companySize:`200-500`,industry:`Manufacturing`,rating:4,date:`2026-04-03`,title:`Powerful, but the UI still feels like 2015 in places`,body:`Lightning is a big improvement over Classic but page loads can drag when you have a lot of related lists. Flow Builder replaced 90% of our old Process Builder work with fewer bugs. Support is fine if you pay for Premier.`,pros:`Flow Builder is genuinely great, AppExchange saves months of dev work.`,cons:`Slow page loads on record detail views. Standard support is thin.`,verified:!0,helpful:31,source:`G2`},{author:`Marcus T.`,role:`IT Director`,companySize:`1,000+`,industry:`Financial Services`,rating:5,date:`2026-02-18`,title:`The compliance story sold our security team`,body:`Shield, Event Monitoring, and field-level encryption checked every box our auditors threw at us. Sandbox strategy is mature â we run 4 environments through a proper release train. Worth every dollar for a regulated business.`,pros:`Enterprise security is unmatched. Sandboxes and metadata deploys work well.`,cons:`Shield is expensive on top of already-expensive licenses.`,verified:!0,helpful:22,source:`TrustRadius`},{author:`Elena R.`,role:`SDR Team Lead`,companySize:`50-200`,industry:`Tech`,rating:3,date:`2026-01-09`,title:`Overkill for a 12-person sales team`,body:`We inherited Salesforce from a previous CRO. Honestly it's more platform than we need â reps spend too much time logging activity and not enough selling. Moving to Pipedrive next quarter.`,pros:`Reporting is very deep once configured.`,cons:`Data entry burden on reps, licenses too pricey for our size.`,verified:!0,helpful:18,source:`Capterra`}],hubspot:[{author:`Sarah L.`,role:`Marketing Manager`,companySize:`10-50`,industry:`B2B SaaS`,rating:5,date:`2026-05-28`,title:`The free CRM alone is a gift`,body:`Started on the free tier three years ago, now on Marketing Hub Pro. The transition from free to paid was painless and we never had to migrate data. Workflows, sequences, and the meetings tool save our AE team hours every week.`,pros:`Incredibly easy to onboard, free tier is genuinely useful, unified contact record.`,cons:`Enterprise-level reporting is limited unless you go Ops Hub.`,verified:!0,helpful:62,source:`Spendesk`},{author:`Tomás A.`,role:`Founder`,companySize:`1-10`,industry:`Agency`,rating:5,date:`2026-04-14`,title:`Runs our whole client operation`,body:`CRM, forms, landing pages, email, ticketing â all in one login. My clients see one branded experience. The Sales Hub sequences convert almost 2à better than our old Mailchimp campaigns.`,pros:`Everything in one place, beautiful UI, generous starter tier.`,cons:`Contact-based pricing gets scary as your list grows.`,verified:!0,helpful:40,source:`G2`},{author:`Rachel P.`,role:`Head of Growth`,companySize:`50-200`,industry:`eCommerce`,rating:4,date:`2026-03-02`,title:`Great product, watch the seat & contact math`,body:`Marketing Hub Pro is fantastic â the workflow builder is a
85joy. Just budget carefully. Adding one paid seat isn't the cost, it's the tier-jump at 5,000 marketing contacts.`,pros:`Best marketing automation UX on the market. Reporting dashboards are clean.`,cons:`Contact-tier price jumps sting. Custom objects require Enterprise.`,verified:!0,helpful:27,source:`TrustRadius`},{author:`Nikhil J.`,role:`RevOps`,companySize:`200-500`,industry:`Tech`,rating:3,date:`2026-01-22`,title:`We outgrew it faster than expected`,body:`For our first 100 employees HubSpot was perfect. By 250 we needed multi-currency forecasting, complex approval flows, and CPQ â none of which HubSpot does well. Migrating to Salesforce next year.`,pros:`Reps actually enjoyed using it, adoption was near 100%.`,cons:`Ceiling for complex sales orgs, forecasting is thin.`,verified:!0,helpful:19,source:`Capterra`}],"zoho-crm":[{author:`Karan S.`,role:`Sales Ops`,companySize:`50-200`,industry:`Consulting`,rating:4,date:`2026-05-05`,title:`80% of the CRM at 20% of the price`,body:`Compared Zoho against HubSpot and Salesforce for a 60-seat rollout. Zoho One bundle was less than we were paying for HubSpot Marketing Pro alone, and Blueprint automations covered our sales playbook.`,pros:`Absurd value in the Zoho One bundle, deep customization.`,cons:`UI feels dated compared to HubSpot. Docs are sometimes out of sync.`,verified:!0,helpful:33,source:`Spendesk`},{author:`Amelia W.`,role:`Small Business Owner`,companySize:`1-10`,industry:`Retail`,rating:4,date:`2026-04-11`,title:`Great value, expect some learning curve`,body:`Setting up modules and layouts took a full weekend, but once it clicked I was building custom pipelines faster than in HubSpot. Zia AI's email sentiment is a nice touch.`,pros:`Very affordable, extensive customization, mobile app is solid.`,cons:`Steeper learning curve than HubSpot. Support response can be slow.`,verified:!0,helpful:21,source:`G2`},{author:`Bruno C.`,role:`IT Manager`,companySize:`200-500`,industry:`Logistics`,rating:4,date:`2026-02-27`,title:`Reliable workhorse for mid-market`,body:`Been running Zoho CRM for 4 years across 180 users. Uptime has been excellent, custom function scripting saved us from buying a middleware. Reports are good but not Salesforce-good.`,pros:`Stable, scriptable, integrates with the rest of Zoho suite.`,cons:`Advanced analytics require Zoho Analytics add-on.`,verified:!0,helpful:15,source:`TrustRadius`},{author:`Layla H.`,role:`Marketing Lead`,companySize:`10-50`,industry:`Nonprofit`,rating:3,date:`2026-01-18`,title:`Powerful but every module feels slightly different`,body:`Zoho CRM, Campaigns, Desk, and Books all work â but they don't feel like one product. Cross-module reporting is clunky. Still, for our budget nothing else came close.`,pros:`Value is unbeatable, nonprofit discount is generous.`,cons:`Modules feel disjointed, cross-suite reporting needs work.`,verified:!0,helpful:12,source:`Capterra`}],pipedrive:[{author:`Jonas F.`,role:`Sales Manager`,companySize:`10-50`,industry:`SaaS`,rating:5,date:`2026-05-19`,title:`The pipeline view your reps will actually use`,body:`Switched from Salesforce and adoption went from 40% to 95% in a month. Reps love the drag-and-drop pipeline. Deal rot alerts have caught 3 six-figure deals we would have let slip.`,pros:`Visual, fast, reps update deals without being nagged.`,cons:`Marketing automation is basic. Reporting is decent, not deep.`,verified:!0,helpful:38,source:`Spendesk`},{author:`Meera K.`,role:`BDR`,companySize:`50-200`,industry:`Fintech`,rating:5,date:`2026-04-08`,title:`Best UI in CRM, period`,body:`I've used HubSpot, Salesforce, and Copper. Nothing lets me log activity and move deals as quickly as Pipedrive. The mobile app is genuinely useful in the field.`,pros:`Speed. Everything is 1-2 clicks away.`,cons:`Wish there were more native integrations without Zapier.`,verified:!0,helpful:24,source:`G2`},{author:`Andre M.`,role:`Founder`,companySize:`1-10`,industry:`Agency`,rating:4,date:`2026-03-15`,title:`Set it up in an afternoon`,body:`No implementation consultant, no admin. I built our sales process in a day and my team was up and running by end of week. Automations tier is worth the upgrade.`,pros:`Zero-friction setup, transparent pricing.`,cons:`Custom fields per plan are limited on Essential tier.`,verified:!0,helpful:17,source:`Capterra`},{author:`Elise D.`,role:`Head of Sales`,companySize:`200-500`,industry:`Manufacturing`,rating:3,date:`2026-01-30`,title:`Hit ceiling around 150 reps`,body:`Great tool up to 50-100 reps. Beyond that, territory management and complex commission structures aren't built in. Considering a move to Salesforce.`,pros:`Fast, clean, reps love it.`,cons:`Not built for complex enterprise sales orgs.`,verified:!0,helpful:11,source:`TrustRadius`}],monday:[{author:`Isabelle C.`,role:`PMO Lead`,companySize:`500-1,000`,industry:`Media`,rating:5,date:`2026-05-22`,title:`The one tool marketing, HR, and dev all agreed on`,body:`We evaluated Asana, ClickUp, and Wrike. monday won because non-technical teams could build their own boards without training. Two years in and we run 40+ workspaces without chaos.`,pros:`Visual, flexible, real cross-team adoption.`,cons:`Item-based pricing adds up fast at scale.`,verified:!0,helpful:44,source:`Spendesk`},{author:`Ravi P.`,role:`Ops Manager`,companySize:`50-200`,industry:`Construction`,rating:4,date:`2026-04-19`,title:`Colorful and clear â but pay attention to seats`,body:`The interface is genuinely fun to use, which is rare in PM software. Automations catch a lot of manual work. Just note that pricing is per user in blocks of 3, so a team of 4 pays for 6.`,pros:`Beautiful UI, powerful automations, dashboards are great.`,cons:`Seat blocks feel unfair for small teams.`,verified:!0,helpful:26,source:`G2`},{author:`Hana T.`,role:`HR Business Partner`,companySize:`200-500`,industry:`SaaS`,rating:4,date:`2026-03-08`,title:`Runs our whole hiring pipeline`,body:`We built an ATS on monday in a weekend. Candidate boards, interview scheduling, offer approvals â all with automations. Cheaper and more flexible than a dedicated ATS.`,pros:`You can build almost any workflow. Great templates.`,cons:`Enterprise reporting needs Work Management Pro.`,verified:!0,helpful:18,source:`Capterra`},{author:`Owen G.`,role:`Engineering Manager`,companySize:`50-200`,industry:`Tech`,rating:3,date:`2026-01-25`,title:`Not ideal for engineering`,body:`Great for marketing and ops but our engineers pushed back â no proper sprint management, no git integration that felt native. Ended up keeping Jira for dev, monday for everyone else.`,pros:`Non-technical teams love it.`,cons:`Not a Jira replacement for software teams.`,verified:!0,helpful:14,source:`TrustRadius`}],asana:[{author:`Grace L.`,role:`Program Manager`,companySize:`200-500`,industry:`Healthcare`,rating:5,date:`2026-05-16`,title:`Timelines and portfolios changed how
85we plan`,body:`Cross-functional planning across 12 teams used to live in spreadsheets. Asana Portfolios give leadership real-time status without status meetings. Rules cut out a huge amount of manual updates.`,pros:`Portfolios & Goals are genuinely useful at scale. Clean interface.`,cons:`Advanced tier needed for portfolios feels steep.`,verified:!0,helpful:41,source:`Spendesk`},{author:`Tariq B.`,role:`Marketing Ops`,companySize:`50-200`,industry:`eCommerce`,rating:4,date:`2026-04-22`,title:`Best-in-class for marketing workflows`,body:`Forms, approvals, and creative request intake all in one place. Reduced our creative brief cycle from 5 days to 2. Proofing add-on is worth every dollar.`,pros:`Forms + Rules combo is powerful. Great for creative teams.`,cons:`Time tracking still requires a third-party integration.`,verified:!0,helpful:29,source:`G2`},{author:`Chen W.`,role:`Project Coordinator`,companySize:`10-50`,industry:`Consulting`,rating:4,date:`2026-03-12`,title:`Clean, fast, and gets out of the way`,body:`After 6 months on ClickUp we moved to Asana. Less feature bloat, faster load times, and my team actually opens it every day.`,pros:`Fast, focused, thoughtful UX.`,cons:`Free tier limits are tighter than ClickUp's.`,verified:!0,helpful:21,source:`Capterra`},{author:`Priyanka R.`,role:`PM`,companySize:`500-1,000`,industry:`SaaS`,rating:3,date:`2026-02-04`,title:`Great UX, mediocre reporting`,body:`Love using Asana daily but building executive dashboards is painful. Universal Reporting helped but still lags behind Smartsheet or monday for portfolio-level metrics.`,pros:`Day-to-day UX is excellent.`,cons:`Reporting still lags competitors.`,verified:!0,helpful:13,source:`TrustRadius`}],clickup:[{author:`Diego V.`,role:`Ops Lead`,companySize:`10-50`,industry:`Agency`,rating:5,date:`2026-05-08`,title:`Free tier alone replaced 4 tools`,body:`We dropped Trello, Toggl, Google Docs, and Loom for internal work. ClickUp's free tier covered all of it. Paid tier for our 8 seats is a fraction of what we were paying combined.`,pros:`Insane value, docs + tasks + time tracking + whiteboards.`,cons:`Feature sprawl can overwhelm new users.`,verified:!0,helpful:45,source:`Spendesk`},{author:`Marta S.`,role:`PMO`,companySize:`200-500`,industry:`SaaS`,rating:4,date:`2026-04-25`,title:`Powerful but opinionated setup helps a lot`,body:`Without a clear space/folder/list hierarchy, ClickUp gets messy fast. We hired a consultant for the initial setup and it made all the difference. Now it runs 90% of our operations.`,pros:`Endless flexibility, great automation, custom views.`,cons:`Setup complexity, occasional performance issues on large workspaces.`,verified:!0,helpful:28,source:`G2`},{author:`Kwame O.`,role:`Founder`,companySize:`1-10`,industry:`Startup`,rating:5,date:`2026-03-19`,title:`The Notion + Asana + Toggl killer`,body:`As a small team we can't afford best-of-breed for everything. ClickUp gives us 80% of each at a fraction of the price. Docs feature has quietly gotten really good.`,pros:`All-in-one, generous free tier.`,cons:`Mobile app can feel sluggish.`,verified:!0,helpful:22,source:`Capterra`},{author:`Sonja L.`,role:`Engineering Lead`,companySize:`50-200`,industry:`Tech`,rating:3,date:`2026-01-14`,title:`Great for ops, not our first pick for eng`,body:`For a marketing or ops team, ClickUp is fantastic. For a serious engineering org we still prefer Linear or Jira â sprint management and git integrations feel bolted on.`,pros:`Enormous flexibility.`,cons:`Not purpose-built for engineering workflows.`,verified:!0,helpful:15,source:`TrustRadius`}],trello:[{author:`Emma T.`,role:`Freelancer`,companySize:`1-10`,industry:`Creative`,rating:5,date:`2026-05-11`,title:`Still the easiest kanban board to hand a client`,body:`I run every client project on a shared Trello board. Zero training required â clients get it in 30 seconds. Butler automations handle the boring stuff.`,pros:`Dead simple, universally understood, free tier is generous.`,cons:`Complex projects with dependencies quickly outgrow it.`,verified:!0,helpful:36,source:`Spendesk`},{author:`Malik R.`,role:`Team Lead`,companySize:`10-50`,industry:`Nonprofit`,rating:4,date:`2026-04-06`,title:`Best free kanban, still`,body:`We tried Asana and ClickUp â both felt like overkill. Trello does exactly what we need: a visible list of what everyone's doing.`,pros:`Instant adoption, no training curve.`,cons:`Reporting is minimal without Power-Ups.`,verified:!0,helpful:20,source:`G2`},{author:`Yuki N.`,role:`PM`,companySize:`50-200`,industry:`Marketing`,rating:3,date:`2026-03-01`,title:`Fine for small teams, thin for scale`,body:`Our marketing team of 30 outgrew Trello inside a year. Cross-board dependencies and portfolio views just aren't there. Moved to Asana.`,pros:`Simple, fast, familiar.`,cons:`No native dependencies, weak reporting.`,verified:!0,helpful:12,source:`Capterra`},{author:`Peter H.`,role:`Product Manager`,companySize:`10-50`,industry:`SaaS`,rating:4,date:`2026-02-09`,title:`Butler is underrated`,body:`Once I discovered Butler, Trello suddenly did 70% of what I was paying ClickUp for. Rule-based automations run our whole content pipeline.`,pros:`Butler automations are genuinely powerful.`,cons:`Advanced features require the Premium tier.`,verified:!0,helpful:16,source:`TrustRadius`}],notion:[{author:`Olivia S.`,role:`Head of Ops`,companySize:`50-200`,industry:`SaaS`,rating:5,date:`2026-05-30`,title:`Replaced Confluence, Google Docs, and a wiki`,body:`Notion is our company brain â onboarding, meeting notes, playbooks, OKRs, all in one searchable place. AI features finally made search useful across our 4,000 pages.`,pros:`Flexible, beautiful, AI search is genuinely helpful now.`,cons:`Real-time collaboration still lags Google Docs.`,verified:!0,helpful:52,source:`Spendesk`},{author:`Felipe A.`,role:`Founder`,companySize:`1-10`,industry:`Startup`,rating:5,date:`2026-04-17`,title:`Our entire business runs on Notion`,body:`CRM, project tracker, content calendar, hiring pipeline â all Notion databases. It's slower than dedicated tools but eliminates 6 subscriptions.`,pros:`Databases are magic, cheap or free for small teams.`,cons:`Load times get worse as pages grow.`,verified:!0,helpful:33,source:`G2`},{author:`Aiko M.`,role:`PM`,companySize:`200-500`,industry:`Tech`,rating:4,date:`2026-03-25`,title:`Great for docs, mediocre for projects`,body:`We use Notion for documentation and Linear for tasks â that c
85ombo works. Using Notion as your primary PM tool eventually breaks.`,pros:`Best knowledge base on the market.`,cons:`Not a real project management tool.`,verified:!0,helpful:24,source:`Capterra`},{author:`Henri B.`,role:`IT Admin`,companySize:`500-1,000`,industry:`Financial Services`,rating:3,date:`2026-01-28`,title:`Admin controls are weak at scale`,body:`Users love Notion. IT doesn't. Permission management across hundreds of pages is tedious, and audit logs are limited even on Enterprise.`,pros:`Loved by end users, powerful databases.`,cons:`Weak admin, permissions, and audit for regulated teams.`,verified:!0,helpful:18,source:`TrustRadius`}],mailchimp:[{author:`Naomi K.`,role:`Marketing Manager`,companySize:`10-50`,industry:`eCommerce`,rating:4,date:`2026-05-14`,title:`Reliable, familiar, but not the cheapest anymore`,body:`Been on Mailchimp for 8 years. Deliverability is still excellent and Customer Journeys finally caught up with modern automation tools. Just note that the free tier is much stingier than it used to be.`,pros:`Rock-solid deliverability, huge template library.`,cons:`Pricing scales aggressively past 5,000 contacts.`,verified:!0,helpful:34,source:`Spendesk`},{author:`Colin R.`,role:`Small Business Owner`,companySize:`1-10`,industry:`Retail`,rating:4,date:`2026-04-01`,title:`Easy to use, feels a bit dated`,body:`Get campaigns out the door quickly. The editor is intuitive. Just wish segmentation was as good as ActiveCampaign's.`,pros:`Beginner-friendly, great templates.`,cons:`Segmentation and automation lag competitors.`,verified:!0,helpful:22,source:`G2`},{author:`Zara P.`,role:`eCommerce Lead`,companySize:`50-200`,industry:`DTC`,rating:3,date:`2026-02-20`,title:`Moved to Klaviyo for eCommerce`,body:`Mailchimp is fine for general email, but Klaviyo's Shopify integration and revenue reporting are so much better that we switched despite the migration pain.`,pros:`Familiar, reliable.`,cons:`Klaviyo eats it for eCommerce.`,verified:!0,helpful:19,source:`Capterra`},{author:`Ben O.`,role:`Consultant`,companySize:`1-10`,industry:`Agency`,rating:4,date:`2026-01-11`,title:`Still my default for non-eCom clients`,body:`For B2B or service clients, Mailchimp remains my recommendation. Deliverability is a competitive edge and the interface is easy to hand off to a marketing coordinator.`,pros:`Deliverability, ease of handoff.`,cons:`Not the cheapest.`,verified:!0,helpful:14,source:`TrustRadius`}],convertkit:[{author:`Rosa D.`,role:`Creator`,companySize:`1-10`,industry:`Newsletter`,rating:5,date:`2026-05-27`,title:`Built for creators, and it shows`,body:`Sign-up forms, landing pages, and tag-based automations are all designed around how creators actually work. My open rates jumped 12% after moving from Mailchimp.`,pros:`Simple, creator-focused, great deliverability.`,cons:`Analytics could be deeper.`,verified:!0,helpful:30,source:`Spendesk`},{author:`Ivan L.`,role:`Podcaster`,companySize:`1-10`,industry:`Media`,rating:5,date:`2026-04-10`,title:`Free tier is genuinely usable`,body:`Ran my list on the free tier up to 900 subscribers with landing pages and broadcasts included. That's rare.`,pros:`Generous free tier, tag-based subscribers are cleaner than lists.`,cons:`Visual editor is more limited than Mailchimp.`,verified:!0,helpful:21,source:`G2`},{author:`Sana M.`,role:`Author`,companySize:`1-10`,industry:`Publishing`,rating:4,date:`2026-03-06`,title:`Automations are simple to build`,body:`The visual automation builder clicked immediately. Set up a 5-email welcome sequence in under an hour with tags and conditions.`,pros:`Automation builder is intuitive.`,cons:`Fewer templates than competitors.`,verified:!0,helpful:17,source:`Capterra`},{author:`Grant W.`,role:`Course Creator`,companySize:`1-10`,industry:`Education`,rating:4,date:`2026-02-14`,title:`Commerce features are a nice bonus`,body:`Selling my mini-course through ConvertKit Commerce meant no separate checkout tool. Fee is a bit higher than Stripe direct but the tradeoff is worth it.`,pros:`Commerce built-in, tight integration with automations.`,cons:`Commerce fees higher than Stripe direct.`,verified:!0,helpful:12,source:`TrustRadius`}],activecampaign:[{author:`Julien P.`,role:`Marketing Ops`,companySize:`50-200`,industry:`B2B SaaS`,rating:5,date:`2026-05-20`,title:`The automation builder is unmatched`,body:`Migrated from Mailchimp. The if/then branching, goal tracking, and conditional wait steps let us build behavior-triggered journeys that were impossible before. Revenue attribution jumped noticeably.`,pros:`Best-in-class automation, strong C
85RM built in.`,cons:`UI can feel dense, learning curve is real.`,verified:!0,helpful:39,source:`Spendesk`},{author:`Petra N.`,role:`Marketing Manager`,companySize:`10-50`,industry:`SaaS`,rating:4,date:`2026-04-13`,title:`Powerful, worth the ramp-up`,body:`First two weeks were rough. Once I understood tags, lists, and automations working together it clicked and became the most powerful marketing tool I've used.`,pros:`Deep automation, good deliverability.`,cons:`Steeper learning curve than Mailchimp or ConvertKit.`,verified:!0,helpful:25,source:`G2`},{author:`Marco T.`,role:`Owner`,companySize:`1-10`,industry:`Consulting`,rating:5,date:`2026-03-04`,title:`Killed my Zapier bill`,body:`Automations replaced a bunch of Zaps between my CRM and email tool because AC has both built-in. Saved money and reduced sync bugs.`,pros:`Integrated CRM + email + automation.`,cons:`Reporting UI could be modernized.`,verified:!0,helpful:18,source:`Capterra`},{author:`Aisha B.`,role:`Marketer`,companySize:`50-200`,industry:`eCommerce`,rating:4,date:`2026-01-31`,title:`Great, but pricing tiers surprised us`,body:`Love the product. Just make sure to model your contact growth â jumping tiers on ActiveCampaign is a step change in price.`,pros:`Automation is unmatched at the price.`,cons:`Tier pricing jumps are steep.`,verified:!0,helpful:16,source:`TrustRadius`}],quickbooks:[{author:`Rachel B.`,role:`Bookkeeper`,companySize:`1-10`,industry:`Accounting`,rating:5,date:`2026-05-25`,title:`Every US small business banker speaks QBO`,body:`Whatever accountant, banker, or lender my clients work with, they know QuickBooks. That interoperability alone is worth the license fee.`,pros:`Universal in US market, huge accountant network.`,cons:`Pricing has crept up significantly year over year.`,verified:!0,helpful:43,source:`Spendesk`},{author:`Devon C.`,role:`Owner`,companySize:`1-10`,industry:`Restaurant`,rating:4,date:`2026-04-16`,title:`Solid but I miss the desktop version`,body:`QBO covers 90% of what I need. Some reports are still better in QuickBooks Desktop. Live bank feeds are a lifesaver at month-end.`,pros:`Bank feeds, reports, mobile app.`,cons:`Cloud version missing some Desktop features.`,verified:!0,helpful:27,source:`G2`},{author:`Priti K.`,role:`CFO`,companySize:`50-200`,industry:`Services`,rating:4,date:`2026-03-11`,title:`Great through mid-market, then it gets tight`,body:`Ran our books on QBO Advanced up to $8M revenue. Beyond that we started hitting user and class limits. Planning to move to NetSuite.`,pros:`Familiar, integrates with everything.`,cons:`Class and user limits on Advanced tier.`,verified:!0,helpful:20,source:`TrustRadius`},{author:`Tom H.`,role:`Freelancer`,companySize:`1-10`,industry:`Consulting`,rating:3,date:`2026-01-20`,title:`Fine â but pricier than the alternatives`,body:`For a solo consultant, Wave or Xero are cheaper. I stay on QBO because my CPA prefers it. That's about it.`,pros:`Every US accountant knows it.`,cons:`Overpriced for freelancers.`,verified:!0,helpful:14,source:`Capterra`}],xero:[{author:`Sophie R.`,role:`Owner`,companySize:`1-10`,industry:`Design Studio`,rating:5,date:`2026-05-18`,title:`Cleaner UX than QuickBooks`,body:`Compared QBO and Xero â Xero's interface just made sense. Bank reconciliation is beautifully done. Their app marketplace covered every integration I needed.`,pros:`Modern UI, great bank rec, unlimited users.`,cons:`Less accountant familiarity in the US.`,verified:!0,helpful:36,source:`Spendesk`},{author:`Callum J.`,role:`Accountant`,companySize:`10-50`,industry:`Practice`,rating:5,date:`2026-04-24`,title:`Standard in AU/NZ/UK for good reason`,body:`Across our practice we manage 200+ Xero files. Reporting, projects, and payroll (in supported regions) are all solid. Xero HQ makes practice management easy.`,pros:`Excellent for accountants managing many clients.`,cons:`US payroll via Gusto add-on isn't as native.`,verified:!0,helpful:24,source:`G2`},{author:`Nadia F.`,role:`Bookkeeper`,companySize:`1-10`,industry:`Bookkeeping`,rating:4,date:`2026-03-13`,title:`Unlimited users is the killer feature`,body:`I can give my clients real-time access without paying per user. That alone made me switch from QuickBooks.`,pros:`Unlimited users on all plans.`,cons:`Inventory features are basic.`,verified:!0,helpful:19,s
85ource:`Capterra`},{author:`Ryan D.`,role:`Founder`,companySize:`10-50`,industry:`SaaS`,rating:4,date:`2026-01-27`,title:`Great product, pricing has crept up`,body:`Xero Growing plan doubled in the last 3 years. Still worth it â but the value gap vs QuickBooks has narrowed.`,pros:`Beautiful software.`,cons:`Price increases every year.`,verified:!0,helpful:13,source:`TrustRadius`}],freshbooks:[{author:`Alicia M.`,role:`Freelancer`,companySize:`1-10`,industry:`Consulting`,rating:5,date:`2026-05-09`,title:`The invoicing UX I wish every tool had`,body:`Invoices go out in 30 seconds, clients pay via credit card, and reminders happen automatically. My DSO dropped from 34 to 19 days.`,pros:`Best invoicing UX, great client portal.`,cons:`Not a full accounting platform for larger businesses.`,verified:!0,helpful:31,source:`Spendesk`},{author:`Jason W.`,role:`Consultant`,companySize:`1-10`,industry:`IT Services`,rating:4,date:`2026-04-02`,title:`Time tracking + invoicing combo is gold`,body:`Track time on a client, one click to convert into an invoice. Wish I had this 10 years ago.`,pros:`Time tracking + invoicing integration.`,cons:`Reporting is thinner than QBO.`,verified:!0,helpful:20,source:`G2`},{author:`Lena K.`,role:`Owner`,companySize:`1-10`,industry:`Coaching`,rating:4,date:`2026-03-07`,title:`Best for solopreneurs, not for retail`,body:`If you're a service business, FreshBooks is fantastic. Product/inventory tracking is minimal â go elsewhere if you sell physical goods.`,pros:`Perfect for service businesses.`,cons:`Weak inventory.`,verified:!0,helpful:15,source:`Capterra`},{author:`Marc T.`,role:`Agency Owner`,companySize:`10-50`,industry:`Agency`,rating:3,date:`2026-02-01`,title:`Outgrew it around 8 employees`,body:`Great through freelance and 2-3 employee phase. Once payroll and multi-project reporting became critical we moved to Xero.`,pros:`Excellent for solo/very small teams.`,cons:`Not built for scaling teams.`,verified:!0,helpful:11,source:`TrustRadius`}],slack:[{author:`Jamal K.`,role:`Engineering Manager`,companySize:`200-500`,industry:`SaaS`,rating:5,date:`2026-05-29`,title:`Still the best async communication tool`,body:`Huddles cut our meeting load by 20%. Canvas is finally a good place to document decisions inside a channel. Enterprise Grid works well for our 800-person org.`,pros:`Fast, extensible, huge app ecosystem.`,cons:`Message limits on free tier hurt small teams.`,verified:!0,helpful:48,source:`Spendesk`},{author:`Sofia L.`,role:`Ops Manager`,companySize:`50-200`,industry:`eCommerce`,rating:5,date:`2026-04-20`,title:`Workflow Builder saved us a Zapier subscription`,body:`Built approvals, PTO requests, and incident on-call handoffs directly in Slack. No code, no separate tool.`,pros:`Workflow Builder, integrations, culture-friendly.`,cons:`Notifications can overwhelm without discipline.`,verified:!0,helpful:30,source:`G2`},{author:`Kenji Y.`,role:`IT Director`,companySize:`500-1,000`,industry:`Financial Services`,rating:4,date:`2026-03-18`,title:`Great tool, expensive at scale`,body:`Business+ pricing for 700 seats is a real line item. Compliance features on Enterprise Grid are solid though.`,pros:`Enterprise Grid is enterprise-ready.`,cons:`Per-seat pricing at scale is painful.`,verified:!0,helpful:22,source:`TrustRadius`},{author:`Amara O.`,role:`Founder`,companySize:`1-10`,industry:`Startup`,rating:4,date:`2026-01-16`,title:`Free tier changes hurt`,body:`The 90-day message limit on free tier made us upgrade sooner than planned. Product is still great â just be aware.`,pros:`Best chat UX.`,cons:`Free tier has been gutted.`,verified:!0,helpful:17,source:`Capterra`}],"ms-teams":[{author:`Robert M.`,role:`IT Manager`,companySize:`1,000+`,industry:`Government`,rating:5,date:`2026-05-24`,title:`The obvious choice when you're on Microsoft 365`,body:`Bundled with our M365 E3 licenses, integrated with SharePoint and Outlook, and passes every compliance requirement. Video quality has become excellent.`,pros:`Bundled with M365, deep Office integration, compliance-ready.`,cons:`Slower and heavier than Slack.`,verified:!0,helpful:40,source:`Spendesk`},{author:`Ling H.`,role:`Project Manager`,companySize:`500-1,000`,industry:`Manufacturing`,rating:4,date:`2026-04-07`,title:`Meetings good, chat is fine`,body:`Video meetings, breakout rooms, and Copilot summaries are excellent. Chat feels clunky compared to Slack but our whole company is on it, so it wins by default.`,pros:`Solid video, Copilot AI in meetings is genuinely useful.`,cons:`Chat UX lags Slack.`,verified:!0,helpful:26,source:`G2`},{author:`Frank W.`,role:`Director of IT`,companySize:`500-1,000`,industry:`Education`,rating:4,date:`2026-03-14`,title:`Teams-for-Education is fantastic`,body:`Assignments, class notebooks, and grading built in. Faculty adoption was easier than expected.`,pros:`Great for schools, EDU pricing is unbeatable.`,cons:`Desktop app resource usage is high.`,verified:!0,helpful:19,s
85ource:`Capterra`},{author:`Isla P.`,role:`Ops Lead`,companySize:`200-500`,industry:`Healthcare`,rating:3,date:`2026-02-06`,title:`Fine, if you're already in Microsoft world`,body:`If you'd started outside the Microsoft ecosystem, you'd never pick Teams. Since we live in M365 it makes sense.`,pros:`Bundled economics are attractive.`,cons:`Won't win product-quality shootouts.`,verified:!0,helpful:14,source:`TrustRadius`}],zoom:[{author:`Nicole V.`,role:`Head of Sales`,companySize:`50-200`,industry:`SaaS`,rating:5,date:`2026-05-31`,title:`Still the gold standard for video`,body:`AI Companion summaries and action items save each of our AEs an hour a day. Video quality on flaky wifi is noticeably better than Meet or Teams.`,pros:`Best-in-class video quality, AI summaries are excellent.`,cons:`Product surface has grown a lot â you might not use half of it.`,verified:!0,helpful:42,source:`Spendesk`},{author:`Hiroshi K.`,role:`Ops Manager`,companySize:`200-500`,industry:`Consulting`,rating:4,date:`2026-04-15`,title:`Reliable across time zones`,body:`We run daily standups across 4 time zones. Zoom just works. Webinars for larger events are seamless.`,pros:`Reliability, webinars, whiteboard.`,cons:`Add-ons pile up (Zoom Phone, Events, etc.).`,verified:!0,helpful:28,source:`G2`},{author:`Aria B.`,role:`Educator`,companySize:`10-50`,industry:`Education`,rating:4,date:`2026-03-21`,title:`Breakout rooms make my classes work`,body:`For hybrid teaching, breakout rooms and polls are essential. Zoom does both better than any competitor.`,pros:`Breakout rooms, polls, reliable audio.`,cons:`Free tier's 40-minute limit is annoying.`,verified:!0,helpful:20,source:`Capterra`},{author:`Daniel S.`,role:`CTO`,companySize:`50-200`,industry:`Tech`,rating:3,date:`2026-01-24`,title:`Fine â Google Meet is catching up fast`,body:`For a Google Workspace shop, Meet is now good enough that we're considering dropping Zoom to save the license fees.`,pros:`Best video quality.`,cons:`Competitors have closed the gap, price is not trivial.`,verified:!0,helpful:15,source:`TrustRadius`}],airtable:[{author:`Vera M.`,role:`Product Ops`,companySize:`50-200`,industry:`SaaS`,rating:5,date:`2026-05-06`,title:`Spreadsheet you can build an app on`,body:`Runs our roadmap, content calendar, and vendor onboarding. Interface Designer lets non-technical stakeholders interact with the data without messing it up.`,pros:`Interface Designer, Automations, huge template library.`,cons:`Per-seat pricing gets steep past 20 users.`,verified:!0,helpful:38,source:`Spendesk`},{author:`Nolan P.`,role:`Marketing Lead`,companySize:`10-50`,industry:`Media`,rating:4,date:`2026-04-11`,title:`Best in class relational tables`,body:`Linked records finally make sense. We manage our content library, contributors, and publishing schedule in one connected base.`,pros:`Linked records are magic.`,cons:`Row limits on Team plan force upgrades.`,verified:!0,helpful:22,source:`G2`},{author:`Chloe R.`,role:`Program Manager`,companySize:`200-500`,industry:`Nonprofit`,rating:4,date:`2026-03-09`,title:`Killer for building internal tools fast`,body:`Built a grant tracking system in a week that would have taken a developer 3 months. Sync between bases keeps everyone on the same data.`,pros:`Rapid app building, Interface Designer.`,cons:`Enterprise features (SSO, HIPAA) get pricey.`,verified:!0,helpful:18,source:`TrustRadius`},{author:`Sam L.`,role:`Founder`,companySize:`1-10`,industry:`Startup`,rating:3,date:`2026-01-19`,title:`Free tier got tighter`,body:`Free tier used to be very usable; recent changes force earlier upgrades. Product is still excellent.`,pros:`Powerful, flexible.`,cons:`Free tier limits have tightened.`,verified:!0,helpful:13,source:`Capterra`}],jira:[{author:`Anders L.`,role:`Engineering Manager`,companySize:`500-1,000`,industry:`SaaS`,rating:5,date:`2026-05-21`,title:`Nothing else handles complex sprints as well`,body:`50-engineer org across 6 squads. Jira's workflows, custom fields, and JQL let us model exactly how we work. Advanced Roadmaps ties everything to quarterly OKRs.`,pros:`Deep customization, Advanced Roadmaps, JQL.`,cons:`Configuration debt is real if you don't govern it.`,verified:!0,helpful:46,source:`Spendesk`},{author:`Beatriz S.`,role:`Scrum Master`,companySize:`200-500`,industry:`Fintech`,rating:4,date:`2026-04-08`,title:`The default for a reason`,body:`Sprint planning, backlog grooming, burndown, velocity â all there. Automation rules cut our manual triage work in half.`,pros:`Complete SDLC toolset.`,cons:`Can feel heavy for small teams.`,verified:!0,helpful:28,source:`G2`},{author:`Chetan V.`,role:`Product Manager`,companySize:`1,000+`,industry:`Tech`,rating:4,date:`2026-03-16`,title:`Confluence + Jira combo is unbeatable at scale`,body:`Documentation in Confluence linked to Jira epics keeps engineering and product on the same page. Cross-project reporting has improved a lot.`,pros:`Deep Atlassian ecosystem.`,cons:`Onboarding new PMs takes weeks.`,verified:!0,helpful:21,source:`TrustRadius`},{author:`Miriam O.`,role:`Startup CTO`,companySize:`1-10`,industry:`Startup`,rating:3,date:`2026-01-26`,title:`Overkill for a 6-person team`,body:`We moved to Linear. Jira's power is wasted on a small startup and the UI slows us down.`,pros:`Powerful when you need it.`,cons:`Overkill for small teams.`,verified:!0,helpful:17,source:`Capterra`}],wrike:[{author:`Ester K.`,role:`PMO Director`,companySize:`500-1,000`,industry:`Services`,rating:4,date:`2026-05-13`,title:`Serious project management at scale`,body:`Managing 60 concurrent client projects â Wrike's request forms, resource management, and time tracking beat Asana or monday for professional services.`,pros:`Re
85source management, request forms.`,cons:`UI feels more corporate than modern.`,verified:!0,helpful:27,source:`Spendesk`},{author:`Marco B.`,role:`Creative Ops`,companySize:`200-500`,industry:`Agency`,rating:4,date:`2026-04-04`,title:`Proofing feature is a game changer`,body:`Wrike's built-in proofing replaced Ziflow for us. Creative reviews now live in the same tool as tasks.`,pros:`Proofing, resource capacity views.`,cons:`Learning curve is steeper than Asana.`,verified:!0,helpful:19,source:`G2`},{author:`Sara N.`,role:`PM`,companySize:`50-200`,industry:`Consulting`,rating:4,date:`2026-03-02`,title:`Solid for consulting shops`,body:`Timesheets, billable/non-billable breakdown, and utilization reports made month-end so much easier.`,pros:`Time tracking + reporting for services businesses.`,cons:`Not the prettiest tool.`,verified:!0,helpful:14,source:`Capterra`},{author:`Tomasz P.`,role:`Ops Lead`,companySize:`10-50`,industry:`Marketing`,rating:3,date:`2026-01-30`,title:`Powerful, but felt heavier than we needed`,body:`After 4 months we moved to Asana. Wrike is great for big services orgs, not for a 20-person marketing team.`,pros:`Depth of features.`,cons:`Heavier than needed for small teams.`,verified:!0,helpful:10,source:`TrustRadius`}],freshdesk:[{author:`Preeti S.`,role:`Support Manager`,companySize:`50-200`,industry:`eCommerce`,rating:5,date:`2026-05-17`,title:`Zendesk features at a fraction of the price`,body:`Migrated from Zendesk after they raised prices. Freshdesk's Freddy AI handles 30% of tier-1 tickets and our CSAT actually went up.`,pros:`Freddy AI, price, omnichannel.`,cons:`Reporting UI is dated in places.`,verified:!0,helpful:35,source:`Spendesk`},{author:`Alex M.`,role:`Founder`,companySize:`1-10`,industry:`SaaS`,rating:5,date:`2026-04-19`,title:`Free tier is real`,body:`Free plan supports unlimited agents with email ticketing. Perfect for bootstrapped startups.`,pros:`Truly free starter tier.`,cons:`Advanced features gated to paid tiers.`,verified:!0,helpful:24,source:`G2`},{author:`Nina T.`,role:`CX Lead`,companySize:`200-500`,industry:`Fintech`,rating:4,date:`2026-03-06`,title:`Automations replaced a headcount`,body:`Rule-based ticket routing, canned responses, and SLA management do the work of a former lead role.`,pros:`Automation and SLA management.`,cons:`Native chat isn't as polished as Intercom.`,verified:!0,helpful:17,source:`Capterra`},{author:`Erik H.`,role:`Support Director`,companySize:`500-1,000`,industry:`Telecom`,rating:4,date:`2026-01-23`,title:`Reliable for enterprise support`,body:`We run 200 agents on Freshdesk. Uptime and performance have been solid over 3 years.`,pros:`Reliable at scale.`,cons:`Enterprise reporting isn't as deep as Zendesk Explore.`,verified:!0,helpful:15,source:`TrustRadius`}],zendesk:[{author:`Cameron R.`,role:`CX Director`,companySize:`500-1,000`,industry:`SaaS`,rating:5,date:`2026-05-23`,title:`The enterprise CX platform`,body:`Zendesk Explore, Guide, and Sunshine give us a full CX suite. Macros, triggers, and business rules scale to our 400 agents across 4 regions.`,pros:`Explore analytics, huge app marketplace.`,cons:`Recent pricing changes stung.`,verified:!0,helpful:41,source:`Spendesk`},{author:`Nadine L.`,role:`Support Manager`,companySize:`200-500`,industry:`eCommerce`,rating:4,date:`2026-04-12`,title:`Best-in-class for complex support ops`,body:`Multi-brand support, custom ticket forms, and Explore dashboards let us report exactly how our COO wants to see the world.`,pros:`Highly configurable.`,cons:`Configuration complexity requires an admin.`,verified:!0,helpful:26,source:`G2`},{author:`Yosef A.`,role:`Ops Lead`,companySize:`1,000+`,industry:`Airlines`,rating:4,date:`2026-03-05`,title:`Trusted for high-volume support`,body:`40k tickets/month. Zendesk keeps up. Sunshine Conversations lets us unify WhatsApp, Messenger, and email into one queue.`,pros:`Handles high volume, omnichannel done right.`,cons:`TCO is high.`,verified:!0,helpful:19,source:`TrustRadius`},{author:`Ivy D.`,role:`Founder`,companySize:`10-50`,industry:`Startup`,rating:3,date:`2026-01-13`,title:`Priced us out`,body:`Loved the product. New minimums and per-agent pricing pushed us to Freshdesk.`,pros:`Great product.`,cons:`Pricing is aggressive for small teams.`,verified:!0,helpful:14,source:`Capterra`}],intercom:[{author:`Julia N.`,role:`Growth Lead`,companySize:`50-200`,industry:`SaaS`,rating:5,date:`2026-05-04`,title:`Fin AI is genuinely impressive`,body:`Fin resolves 45% of our inbound conversations autonomously with a CSAT of 4.6/5. We reduced headcount plans for 2027 because of it.`,pros:`Fin AI is the real deal, beautiful UX.`,cons:`Fin resolutions are billed per resolution â model your economics carefully.`,verified:!0,helpful:44,source:`Spendesk`},{author:`Rafael P.`,role:`PLG Manager`,companySize:`50-200`,industry:`SaaS`,rating:5,date:`2026-04-09`,title:`The best in-app messaging tool`,body:`Product tours, targeted messages, and outbound campaigns all live in one product. Our activation rate lifted 18% after adopting Series.`,pros:`In-app messaging, product tours.`,cons:`Fin usage-based pricing is unpredictable.`,verified:!0,helpful:30,source:`G2`},{author:`Sadia R.`,role:`Support Manager`,companySize:`200-500`,industry:`SaaS`,rating:4,date:`2026-03-17`,title:`Great support tool, at a premium`,body:`Best chat UX we've used. Just expensive â total spend surprised our CFO at renewal.`,pros:`UX is elegant, integrations are deep.`,cons:`Total cost keeps climbing.`,verified:!0,helpful:20,source:`TrustRadius`},{author:`Devin M.`,role:`Startup Founder`,companySize:`1-10`,industry:`SaaS`,rating:3,date:`2026-01-28`,title:`Early Stage program is great, then...`,body:`First year on Early Stage was fantastic. Graduating to full pricing was a shock.`,pros:`Startup program is generous.`,cons:`Post-startup pricing jump.`,verified:!0,helpful:15,source:`Capterra`}],shopify:[{author:`Emily A.`,role:`eCommerce Owner`,companySize:`10-50`,industry:`Apparel`,rating:5,date:`2026-05-26`,title:`Fastest way from idea to selling`,body:`Launched a new brand in 6 weeks. Shopify Payments, Shop Pay, and Markets covered payments, checkout, and multi-currency without a developer.`,pros:`Fast launch, huge app ecosystem, checkout converts.`,cons:`App fees add up, transaction fees if you don't use Shopify Payments.`,verified:!0,helpful:45,source:`Spendesk`},{author:`Marco G.`,role:`DTC Founder`,companySize:`10-50`,industry:`Beauty`,rating:5,date:`2026-04-30`,title:`Shop Pay checkout is a conversion cheat code`,body:`Since enabling Shop Pay our checkout conversion rate went up 12%. That single feature has paid for the whole Shopify tab.`,pros:`Shop Pay conversion lift is real.`,cons:`Themes get pricey once you customize.`,verified:!0,helpful:32,source:`G2`},{author:`Priya D.`,role:`eCommerce Manager`,companySize:`50-200`,industry:`Home Goods`,rating:4,date:`2026-03-11`,title:`Great â until you need very custom checkout`,body:`Shopify Plus opened up checkout customization. On regular Shopify our devs hit walls. Still worth it for the ecosystem.`,pros:`Ecosystem, reliability, mobile-first themes.`,cons:`Checkout customization limited outside Plus.`,verified:!0,helpful:22,source:`TrustRadius`},{author:`Sam T.`,role:`Founder`,companySize:`1-10`,industry:`Print on Demand`,rating:4,date:`2026-01-17`,title:`Best out-of-box, watch app costs`,body:`5 apps at $30/mo each = $150/mo before you sell a thing. Choose apps carefully.`,pros:`Anyone can launch a store.`,cons:`App tax is real.`,verified:!0,helpful:18,source:`Capterra`}],wix:[{author:`Rachel P.`,role:`Small Business Owner`,companySize:`1-10`,industry:`Restaurant`,rating:5,date:`2026-05-15`,title:`Wix Studio finally made me stop recommending Squarespace`,body:`Built our restaurant site in Wix Studio â responsive editor is actually pixel-perfect now, and Wix Bookings + online ordering cover our whole operation.`,pros:`Wix Studio, all-in-one (bookings, POS, email).`,cons:`Can't switch templates after publishing.`,verified:!0,helpful:34,source:`Spendesk`},{author:`Dan K.`,role:`Freelance Designer`,companySize:`1-10`,industry:`Agency`,rating:4,date:`2026-04-21`,title:`Wix Studio for clients has been a hit`,body:`I now build most client sites in Wix Studio and hand off with confidence. Clients can update content without breaking layouts.`,pros:`Wix Studio for pros, easy client handoff.`,cons:`SEO plugins fewer than WordPress.`,verified:!0,helpful:21,source:`G2`},{author:`Marissa L.`,role:`Owner`,companySize:`1-10`,industry:`Beauty Salon`,rating:4,date:`2026-03-08`,title:`Bookings + payments in one place`,body:`Wix Bookings handles appointments, deposits, and reminders. Replaced 3 apps for us.`,pros:`Integrated bookings, payments, email.`,cons:`Load times can be slower than static sites.`,verified:!0,helpful:17,source:`Capterra`},{author:`Jorge M.`,role:`Blogger`,companySize:`1-10`,industry:`Media`,rating:3,date:`2026-01-25`,title:`OK for a personal site, wouldn't run a business blog here`,body:`Blog editor is fine, SEO controls are limited compared to WordPress or Ghost.`,pros:`Easy visual editor.`,cons:`SEO controls behind WordPress.`,verified:!0,helpful:12,source:`TrustRadius`}],squarespace:[{author:`Lena K.`,role:`Photographer`,companySize:`1-10`,industry:`Creative`,rating:5,date:`2026-05-10`,title:`Beautiful, effortless, and just works`,body:`Every template looks like it was designed by a real design team. Portfolio and blog features are the best in the space.`,pros:`Design quality, image performance, ease of use.`,cons:`Less flexibility than Webflow or Wix Studio for custom layouts.`,verified:!0,helpful:31,source:`Spendesk`},{author:`Ollie N.`,role:`Small Business Owner`,companySize:`1-10`,industry:`Consulting`,rating:4,date:`2026-04-18`,title:`Set-it-and-forget-it website`,body:`Built my consultancy site in a weekend, haven't touched it in 2 years and it still looks current. That's the Squarespace magic.`,pros:`Design longevity, integrated email marketing.`,cons:`Pricing tiers can feel confusing.`,verified:!0,helpful:20,source:`G2`},{author:`Farrah S.`,role:`eCommerce Owner`,companySize:`1-10`,industry:`Boutique`,rating:4,date:`2026-03-04`,title:`Solid for small online stores`,body:`Commerce features cover the basics well. Beyond ~500 SKUs I'd probably move to Shopify.`,pros:`Commerce fits small stores well.`,cons:`Not built for large catalogs.`,verified:!0,helpful:15,source:`Capterra`},{author:`Ravi B.`,role:`Marketer`,companySize:`10-50`,industry:`SaaS`,rating:3,date:`2026-01-22`,title:`Template constraints are real`,body:`Beautiful, yes â but pushing designs past templates is harder than
85in Wix Studio. Fluid Engine helped.`,pros:`Beautiful defaults.`,cons:`Customization ceiling.`,verified:!0,helpful:11,source:`TrustRadius`}],dropbox:[{author:`Nia W.`,role:`Creative Director`,companySize:`50-200`,industry:`Agency`,rating:5,date:`2026-05-07`,title:`Still the best sync engine on the planet`,body:`We tried moving to Google Drive twice. Both times the sync issues and Finder integration pushed us back to Dropbox. Replay for video review is a huge bonus.`,pros:`Sync just works, Replay for video, Dash for search.`,cons:`More expensive than Google Workspace bundled storage.`,verified:!0,helpful:33,source:`Spendesk`},{author:`Kenji T.`,role:`Editor`,companySize:`10-50`,industry:`Media`,rating:4,date:`2026-04-13`,title:`Smart Sync saves my SSD`,body:`Files-on-demand means I only pull down what I'm editing. Managing 3TB of active projects without eating my drive is only possible because of Smart Sync.`,pros:`Smart Sync, reliability.`,cons:`Advanced admin features gated to Business Advanced.`,verified:!0,helpful:22,source:`G2`},{author:`Ana R.`,role:`Solo Consultant`,companySize:`1-10`,industry:`Consulting`,rating:4,date:`2026-03-19`,title:`Client file sharing without the friction`,body:`Share links, request files, password protect â all takes seconds. Clients don't need a Dropbox account.`,pros:`Frictionless sharing.`,cons:`Personal Plus tier limited to 1 user.`,verified:!0,helpful:16,source:`Capterra`},{author:`Thomas J.`,role:`IT Admin`,companySize:`500-1,000`,industry:`Legal`,rating:3,date:`2026-01-29`,title:`Fine, but Google/Microsoft bundled tools ate our lunch`,body:`Product is great; it's just hard to justify a separate storage bill on top of M365.`,pros:`Excellent product.`,cons:`Bundled competitors are cheaper.`,verified:!0,helpful:13,source:`TrustRadius`}],"google-workspace":[{author:`Farah A.`,role:`Founder`,companySize:`10-50`,industry:`SaaS`,rating:5,date:`2026-05-02`,title:`The default productivity suite for modern teams`,body:`Docs, Sheets, Slides, Meet, and Drive for $12/user is unbeatable. Real-time collaboration is still miles ahead of Microsoft's version.`,pros:`Real-time collab, price, Gmail is the best business inbox.`,cons:`Sheets isn't Excel for heavy modeling.`,verified:!0,helpful:47,source:`Spendesk`},{author:`Diego C.`,role:`Operations`,companySize:`50-200`,industry:`Consulting`,rating:5,date:`2026-04-27`,title:`Gemini in Workspace is finally useful`,body:`Summarize threads, draft docs, generate slides â Gemini has become part of daily workflow. Worth the upgrade to Business Plus for the AI features.`,pros:`Gemini AI, best-in-class collab.`,cons:`Enterprise controls not as deep as Microsoft.`,verified:!0,helpful:30,source:`G2`},{author:`Sanjay P.`,role:`IT Manager`,companySize:`200-500`,industry:`Tech`,rating:4,date:`2026-03-14`,title:`Admin console is capable`,body:`Context-Aware Access, DLP, and Vault cover our compliance needs. Not as deep as M365 for regulated industries but sufficient for tech.`,pros:`Solid admin console.`,cons:`M365 has edge for regulated industries.`,verified:!0,helpful:20,source:`TrustRadius`},{author:`Emma R.`,role:`School Admin`,companySize:`1,000+`,industry:`Education`,rating:5,date:`2026-01-15`,title:`Google Classroom + Workspace = magic for schools`,body:`Rolled Workspace to 4,000 students. Free education tier plus Classroom makes it a no-brainer.`,pros:`Free for education.`,cons:`None significant for schools.`,verified:!0,helpful:25,source:`Capterra`}],"microsoft-365":[{author:`William B.`,role:`CIO`,companySize:`1,000+`,industry:`Financial Services`,rating:5,date:`2026-05-01`,title:`The productivity backbone of enterprise IT`,body:`Excel modeling, Outlook for scheduling, Teams for meetings, SharePoint for docs, Purview for compliance. Copilot summaries in meetings have been a genuine productivity boost.`,pros:`Excel, enterprise compliance, Copilot, deep admin.`,cons:`SharePoint permissions are as painful as ever.`,verified:!0,helpful:43,source:`Spendesk`},{author:`Aisha K.`,role:`Financial Analyst`,companySize:`500-1,000`,industry:`Consulting`,rating:5,date:`2026-04-08`,title:`Excel alone justifies the license`,body:`Every alternative fails for pivot tables, Power Query, and heavy modeling. Sheets isn't close.`,pros:`Excel supremacy.`,cons:`Word feels dated.`,verified:!0,helpful:28,source:`G2`},{author:`Rob T.`,role:`IT Director`,companySize:`500-1,000`,industry:`Healthcare`,rating:4,date:`2026-03-13`,title:`Compliance features are worth the license bump`,body:`E5 g
85ives us DLP, Insider Risk, and Defender. Consolidation of security tools has saved real money.`,pros:`E5 security bundle consolidation.`,cons:`E5 pricing is aggressive.`,verified:!0,helpful:22,source:`TrustRadius`},{author:`Sofia G.`,role:`Founder`,companySize:`1-10`,industry:`Startup`,rating:4,date:`2026-01-19`,title:`Overkill for very small teams`,body:`Went to Google Workspace for our 4-person team. Would revisit M365 once we're 20+ and need real Excel.`,pros:`Full-featured.`,cons:`Overkill for tiny teams.`,verified:!0,helpful:15,source:`Capterra`}]};function wC(e){return CC[e]??[]}function TC(e){let t=wC(e),n=t.length,r=n===0?0:Math.round(t.reduce((e,t)=>e+t.rating,0)/n*10)/10,i={1:0,2:0,3:0,4:0,5:0};for(let e of t)i[e.rating]++;return{count:n,avg:r,distribution:i}}var EC=Object.values(CC).reduce((e,t)=>e+t.length,0),DC=F(`/software/$slug`)({loader:({params:e})=>{let t=Uh(e.slug);if(!t)throw Ie();return{software:t}},head:({loaderData:e})=>{if(!e)return{meta:[{title:`Software not found â Spendesk`},{name:`robots`,content:`noindex`}]};let t=e.software,n=`${t.name} Review 2026: Pricing & Features`,r=`${t.name} review â ${t.tagline} We break down pricing, features, pros, cons, and best alternatives.`,i=`/software/${t.slug}`;return{meta:[{title:n},{name:`description`,content:r},{property:`og:title`,content:n},{property:`og:description`,content:r},{property:`og:type`,content:`article`},{property:`og:url`,content:i},{name:`twitter:card`,content:`summary_large_image`}],links:[{rel:`canonical`,href:i}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`SoftwareApplication`,name:t.name,applicationCategory:`BusinessApplication`,operatingSystem:t.platforms.join(`, `),offers:t.pricing.map(e=>({"@type":`Offer`,name:e.name,price:e.price.replace(/[^0-9.]/g,``)||`0`,priceCurrency:`USD`})),aggregateRating:{"@type":`AggregateRating`,ratingValue:TC(t.slug).avg||Vh(t),bestRating:5,ratingCount:TC(t.slug).count||1},review:{"@type":`Review`,reviewRating:{"@type":`Rating`,ratingValue:Vh(t),bestRating:5},author:{"@type":`Organization`,name:`Spendesk`},reviewBody:t.verdict}})},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:[{"@type":`ListItem`,position:1,name:`Home`,item:`/`},{"@type":`ListItem`,position:2,name:`Software`,item:`/software`},{"@type":`ListItem`,position:3,name:t.name,item:i}]})},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:t.faqs.map(e=>({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a}}))})}]}},component:I(()=>$(()=>import(`./software._slug-BAz6Tw5o.js`),__vite__mapDeps([56,1,3,11,12,13,14,4,5,57,48,18,19,20,21,49])),`component`)}),OC={"small-business":{name:`Small Business`,description:`A lean, affordable SaaS stack for growing teams up to 100 employees.`,picks:[{slug:`hubspot`,note:`Free CRM that scales into full marketing and service platform.`},{slug:`quickbooks`,note:`The default accounting platform for US small businesses.`},{slug:`slack`,note:`Fast, friendly team chat.`},{slug:`google-workspace`,note:`Email, docs, and video meetings for the price of a coffee.`},{slug:`shopify`,note:`Fastest path to selling online.`},{slug:`mailchimp`,note:`Solid entry-level email marketing.`}]},enterprise:{name:`Enterprise`,description:`Enterprise-grade platforms with the security, compliance, and scale needed for organizations of 1,000+.`,picks:[{slug:`salesforce`,note:`The industry-standard CRM at scale.`},{slug:`microsoft-365`,note:`The productivity stack of enterprise IT.`},{slug:`ms-teams`,note:`Meetings and chat inside Microsoft 365.`},{slug:`zendesk`,note:`Enterprise-ready customer service.`},{slug:`jira`,note:`The default issue tracker for enterprise engineering.`},{slug:`monday`,note:`Flexible Work OS for cross-functional teams.`}]},startup:{name:`Startup`,description:`Free-tier friendly SaaS tools that let a small team run big.`,picks:[{slug:`notion`,note:`Docs, wikis, and light PM in one place.`},{slug:`clickup`,note:`The most generous free tier in project management.`},{slug:`hubspot`,note:`Free CRM with room to grow.`},{slug:`slack`,note:`Team chat that gets out of the way.`},{slug:`airtable`,note:`Turn a spreadsheet into a light internal tool.`},{slug:`convertkit`,note:`Free for creator-style newsletters.`}]}},kC=F(`/industries/$slug`)({loader:({params:e})=>{let t=OC[e.slug];if(!t)throw Ie();return{industry:t,slug:e.slug}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[{title:`Not found`},{name:`robots`,content:`noindex`}]};
85let n=e.industry,r=`/industries/${t.slug}`;return{meta:[{title:`Best SaaS Software for ${n.name} in 2026 â Spendesk`},{name:`description`,content:n.description},{property:`og:title`,content:`Best SaaS for ${n.name} â Spendesk`},{property:`og:description`,content:n.description},{property:`og:url`,content:r}],links:[{rel:`canonical`,href:r}]}},component:I(()=>$(()=>import(`./industries._slug-BzJLsxtV.js`),__vite__mapDeps([58,1,2,3,11,12,13,14,4,5])),`component`)}),AC=F(`/best/$slug`)({loader:({params:e})=>{let t=zh(e.slug);if(!t)throw Ie();return{category:t}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[{title:`Not found`},{name:`robots`,content:`noindex`}]};let n=e.category,r=`The 10 Best ${n.name} in 2026 â Spendesk`,i=`Our ranked list of the best ${n.name.toLowerCase()} for 2026, based on hands-on testing across ease of use, features, and value.`,a=`/best/${t.slug}`;return{meta:[{title:r},{name:`description`,content:i},{property:`og:title`,content:r},{property:`og:description`,content:i},{property:`og:url`,content:a}],links:[{rel:`canonical`,href:a}]}},component:I(()=>$(()=>import(`./best._slug-BWmrG1tF.js`),__vite__mapDeps([59,1,3,11,12,13,14,4,5])),`component`)}),jC=[{slug:`elena-marks`,name:`Elena Marks`,title:`Editor-in-Chief`,bio:`Elena has spent 12 years reviewing B2B software for outlets covering SaaS, martech, and small business technology. She oversees Spendesk's editorial standards and reviews methodology.`,initials:`EM`,expertise:[`CRM`,`Marketing automation`,`Editorial strategy`]},{slug:`raj-patel`,name:`Raj Patel`,title:`Senior Analyst, Sales & CRM`,bio:`Raj is a former sales operations leader who has implemented CRMs at over 40 organizations. He leads Spendesk's CRM and sales coverage.`,initials:`RP`,expertise:[`Salesforce`,`HubSpot`,`RevOps`]},{slug:`sophie-tremblay`,name:`Sophie Tremblay`,title:`Senior Analyst, Productivity`,bio:`Sophie writes about project management, collaboration, and knowledge work. She previously led operations at a 200-person creative agency.`,initials:`ST`,expertise:[`Project management`,`Collaboration`,`Ops`]},{slug:`marcus-alvarez`,name:`Marcus Alvarez`,title:`Senior Analyst, Finance & Accounting`,bio:`Marcus is a CPA turned software analyst. He tests accounting, invoicing, and payroll platforms with real books.`,initials:`MA`,expertise:[`Accounting`,`Payroll`,`Tax software`]}],MC=e=>jC.find(t=>t.slug===e),NC=F(`/authors/$slug`)({loader:({params:e})=>{let t=MC(e.slug);if(!t)throw Ie();return{author:t}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[{title:`Author not found`},{name:`robots`,content:`noindex`}]};let n=e.author,r=`/authors/${t.slug}`;return{meta:[{title:`${n.name} â ${n.title} at Spendesk`},{name:`description`,content:n.bio},{property:`og:title`,content:`${n.name} â Spendesk`},{property:`og:description`,content:n.bio},{property:`og:url`,content:r},{property:`og:type`,content:`profile`}],links:[{rel:`canonical`,href:r}]}},component:I(()=>$(()=>import(`./authors._slug-Ogocnz16.js`),__vite__mapDeps([60,1,2,3,4,5])),`component`)}),PC=F(`/articles/$slug`)({loader:({params:e})=>{let t=eg(e.slug);if(!t)throw Ie();return{article:t}},head:({loaderData:e,params:t})=>{if(!e)return{meta:[{title:`Article not found â Spendesk`},{name:`robots`,content:`noindex`}]};let n=e.article,r=`/articles/${t.slug}`;return{meta:[{title:n.title},{name:`description`,content:n.description},{property:`og:title`,content:n.title},{property:`og:description`,content:n.description},{property:`og:type`,content:`article`},{property:`og:url`,content:r},{name:`twitter:card`,content:`summary_large_image`},{name:`article:published_time`,content:n.published}],links:[{rel:`canonical`,href:r}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`Article`,headline:n.title,description:n.description,datePublished:n.published,author:{"@type":`Person`,name:MC(n.author)?.name||`Spendesk`},publisher:{"@type":`Organization`,name:`Spendesk`},keywords:n.tags.join(`, `)})},...n.faqs&&n.faqs.length?[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:n.faqs.map(e=>
85({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a}}))})}]:[]]}},component:I(()=>$(()=>import(`./articles._slug-4He8_ScQ.js`),__vite__mapDeps([61,1,3,11,12,13,14,4,5,57,48,18,19,20])),`component`)}),FC=RS.update({id:`/write-for-us`,path:`/write-for-us`,getParentRoute:()=>Q}),IC=zS.update({id:`/tutorials`,path:`/tutorials`,getParentRoute:()=>Q}),LC=BS.update({id:`/tools`,path:`/tools`,getParentRoute:()=>Q}),RC=HS.update({id:`/terms`,path:`/terms`,getParentRoute:()=>Q}),zC=US.update({id:`/tags`,path:`/tags`,getParentRoute:()=>Q}),BC=WS.update({id:`/software`,path:`/software`,getParentRoute:()=>Q}),VC=qS.update({id:`/search`,path:`/search`,getParentRoute:()=>Q}),HC=JS.update({id:`/privacy`,path:`/privacy`,getParentRoute:()=>Q}),UC=YS.update({id:`/pricing-guides`,path:`/pricing-guides`,getParentRoute:()=>Q}),WC=XS.update({id:`/newsletter`,path:`/newsletter`,getParentRoute:()=>Q}),GC=ZS.update({id:`/methodology`,path:`/methodology`,getParentRoute:()=>Q}),KC=QS.update({id:`/industries`,path:`/industries`,getParentRoute:()=>Q}),qC=$S.update({id:`/guides`,path:`/guides`,getParentRoute:()=>Q}),JC=eC.update({id:`/fact-checking-policy`,path:`/fact-checking-policy`,getParentRoute:()=>Q}),YC=tC.update({id:`/editorial-policy`,path:`/editorial-policy`,getParentRoute:()=>Q}),XC=nC.update({id:`/disclaimer`,path:`/disclaimer`,getParentRoute:()=>Q}),ZC=rC.update({id:`/cookie-policy`,path:`/cookie-policy`,getParentRoute:()=>Q}),QC=iC.update({id:`/contact`,path:`/contact`,getParentRoute:()=>Q}),$C=aC.update({id:`/compare`,path:`/compare`,getParentRoute:()=>Q}),ew=oC.update({id:`/categories`,path:`/categories`,getParentRoute:()=>Q}),tw=sC.update({id:`/careers`,path:`/careers`,getParentRoute:()=>Q}),nw=cC.update({id:`/bookmarks`,path:`/bookmarks`,getParentRoute:()=>Q}),rw=lC.update({id:`/best`,path:`/best`,getParentRoute:()=>Q}),iw=uC.update({id:`/authors`,path:`/authors`,getParentRoute:()=>Q}),aw=dC.update({id:`/articles`,path:`/articles`,getParentRoute:()=>Q}),ow=fC.update({id:`/affiliate-disclosure`,path:`/affiliate-disclosure`,getParentRoute:()=>Q}),sw=pC.update({id:`/advertise`,path:`/advertise`,getParentRoute:()=>Q}),cw=mC.update({id:`/accessibility`,path:`/accessibility`,getParentRoute:()=>Q}),lw=hC.update({id:`/about`,path:`/about`,getParentRoute:()=>Q}),uw=gC.update({id:`/`,path:`/`,getParentRoute:()=>Q}),dw=_C.update({id:`/category/$slug`,path:`/category/$slug`,getParentRoute:()=>Q}),fw=vC.update({id:`/vendor-scorecard`,path:`/vendor-scorecard`,getParentRoute:()=>LC}),pw=yC.update({id:`/software-finder`,path:`/software-finder`,getParentRoute:()=>LC}),mw=bC.update({id:`/saas-cost-calculator`,path:`/saas-cost-calculator`,getParentRoute:()=>LC}),hw=xC.update({id:`/roi-calculator`,path:`/roi-calculator`,getParentRoute:()=>LC}),gw=SC.update({id:`/$slug`,path:`/$slug`,getParentRoute:()=>zC}),_w=DC.update({id:`/$slug`,path:`/$slug`,getParentRoute:()=>BC}),vw=kC.update({id:`/$slug`,path:`/$slug`,getParentRoute:()=>KC}),yw=AC.update({id:`/$slug`,path:`/$slug`,getParentRoute:()=>rw}),bw=NC.update({id:`/$slug`,path:`/$slug`,getParentRoute:()=>iw}),xw={ArticlesSlugRoute:PC.update({id:`/$slug`,path:`/$slug`,getParentRoute:()=>aw})},Sw=aw._addFileChildren(xw),Cw={AuthorsSlugRoute:bw},ww=iw._addFileChildren(Cw),Tw={BestSlugRoute:yw},Ew=rw._addFileChildren(Tw),Dw={IndustriesSlugRoute:vw},Ow=KC._addFileChildren(Dw),kw={SoftwareSlugRoute:_w},Aw=BC._addFileChildren(kw),jw={TagsSlugRoute:gw},Mw=zC._addFileChildren(jw),Nw={ToolsRoiCalculatorRoute:hw,ToolsSaasCostCalculatorRoute:mw,ToolsSoftwareFinderRoute:pw,ToolsVendorScorecardRoute:fw},Pw={IndexRoute:uw,AboutRoute:lw,AccessibilityRoute:cw,AdvertiseRoute:sw,AffiliateDisclosureRoute:ow,ArticlesRoute:Sw,AuthorsRoute:ww,BestRoute:Ew,BookmarksRoute:nw,CareersRoute:tw,CategoriesRoute:ew,CompareRoute:$C,ContactRoute:QC,CookiePolicyRoute:ZC,DisclaimerRoute:XC,EditorialPolicyRoute:YC,FactCheckingPolicyRoute:JC,GuidesRoute:qC,IndustriesRoute:Ow,MethodologyRoute:GC,NewsletterRoute:WC,PricingGuidesRoute:UC,PrivacyRoute:HC,SearchRoute:VC,SoftwareRoute:Aw,TagsRoute:Mw,TermsRoute:RC,ToolsRoute:LC._addFileChildren(Nw),TutorialsRoute:IC,WriteForUsRoute:FC,CategorySlugRoute:dw},Fw=Q._addFileChildren(Pw),Iw=()=>Ws({routeTree:Fw,context:{queryClient:new ph},scrollRestoration:!0,defaultPreloadStaleTime:0});async function Lw(){let e=await Iw(),t;if(mm){let n=await mm.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.seri
85alizationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(Lo),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Bo(e),e}var Rw=Lw;async function zw(){let e=await Rw();return window.$_TSR?.h(),e}var Bw;function Vw(){return Bw||=zw(),(0,P.jsx)(Ho,{promise:Bw,children:e=>(0,P.jsx)(qs,{router:e})})}var Hw=De();(0,N.startTransition)(()=>{(0,Hw.hydrateRoot)(document,(0,P.jsx)(N.StrictMode,{children:(0,P.jsx)(Vw,{})}))});export{Uh as A,Eh as B,$h as C,Wh as D,ng as E,Rh as F,cc as G,xh as H,zh as I,zs as J,uc as K,Ih as L,Hh as M,Kh as N,qh as O,Lh as P,Nh as R,rg as S,ig as T,yh as U,wh as V,sc as W,ux as _,AC as a,sg as b,wC as c,SC as d,_C as f,Rx as g,hS as h,MC as i,Vh as j,Gh as k,TC as l,VS as m,NC as n,kC as o,qS as p,Js as q,jC as r,DC as s,PC as t,EC as u,pg as v,tg as w,ag as x,fg as y,Mh 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.