vendor: 17,797 bytes, lines 1-9
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-BQKonmuM.js","assets/useSelector-BnRwIYQX.js","assets/QualificationFields-DS_PE4Qq.js","assets/LendingAreasMap-FGa5ipKN.js","assets/not-found-i5RsCZif.js","assets/RecentDeals-WIjv4ufR.js","assets/Sections-B41u3ZY3.js","assets/MaskButton-CQeYxa2O.js","assets/a4-hero-C5x0cxEV.js","assets/refresh-cw-CLNhkkx4.js","assets/LoanCalculator-DVFnkAcq.js","assets/about-us-DIjAqC3m.js","assets/PageTemplates-CY8VUcqf.js","assets/a4-property-ovC_Iurj.js","assets/acquisition-BVAarDTO.js","assets/ProductPage-D8AD-YQM.js","assets/app-ColriT4v.js","assets/blogs-D6xEaamm.js","assets/borrower-K5X3_mLd.js","assets/brokers-BjRbZ2aF.js","assets/builders-Dud49t3c.js","assets/careers-Cmg5BB4U.js","assets/commercial-DS5xoSXt.js","assets/contact-us-S5mdDRaP.js","assets/dealanalyzer-crbfUrSZ.js","assets/disclosures-and-licenses-D_OiCXhb.js","assets/e-sign-consent-geMqFGde.js","assets/faqs-Du-iySvM.js","assets/fix-flip-rehab-D_p-8q9I.js","assets/hospitality-BcHce_U-.js","assets/industrial-DH_LBcUc.js","assets/mixed-use-BcMREHSZ.js","assets/multi-family-C4xqZD8X.js","assets/new-construction-fNxOcy1s.js","assets/not-qualified-DsgOsRZX.js","assets/ResultPages-CDCePXrm.js","assets/office-BlcEoQ_8.js","assets/press-D6xEaamm.js","assets/privacy-ca-CkP89Lpc.js","assets/privacy-policy-D8Qb-_RQ.js","assets/recent-deals-B3JjWJ4Z.js","assets/refinance-Cr8rN63I.js","assets/retail-D5R7MqZC.js","assets/security-B4fMKPTX.js","assets/single-family-m0ujzqDe.js","assets/terms-DgLDIbqA.js","assets/typ-3wJGBqps.js","assets/warehouse-CNOuWkqQ.js","assets/blogs.index-SzLVJOCc.js","assets/blogs._-DxDnq-Lc.js","assets/gads.connecticut-Dtd3me2u.js","assets/gads.lp-u1RQJ8wW.js","assets/gads.not-qualified-DsgOsRZX.js","assets/gads.typ-3wJGBqps.js","assets/locations.index-rhWZCZfT.js","assets/locations._-6krsCN6I.js","assets/press.index-Bv0jpUrx.js","assets/press._-BMT7V0Ir.js"])))=>i.map(i=>d[i]); 2import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./useSelector-BnRwIYQX.js";import{$ as l,A as u,B as d,D as f,F as p,G as m,H as h,I as g,K as _,L as v,M as y,N as b,O as x,Q as S,R as ee,U as te,V as ne,W as re,X as ie,Y as ae,Z as oe,j as se,k as ce,q as le,z as ue}from"./QualificationFields-DS_PE4Qq.js";import{B as de,D as C,E as w,F as fe,I as pe,L as me,P as he,R as ge,S as T,T as _e,_ as ve,b as ye,k as be,n as xe,t as Se,v as Ce,w as we,x as Te}from"./LendingAreasMap-FGa5ipKN.js";import{n as Ee,t as De}from"./not-found-i5RsCZif.js";import{n as Oe,r as ke}from"./matchContext-D_rpjOYL.js";import{a as Ae,i as je,n as E,o as Me,r as D,s as Ne,t as O}from"./preload-helper-DMd7BiyM.js";import{t as Pe}from"./MaskButton-CQeYxa2O.js";import{a as Fe,c as Ie,i as Le,n as Re,o as ze,s as Be,t as Ve}from"./a4-hero-C5x0cxEV.js";import{a as He,i as Ue,t as We}from"./Sections-B41u3ZY3.js";import{t as k}from"./seo-C3jBH4SJ.js";var Ge=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,S||(S=!0,ae());else{var t=n(l);t!==null&&ce(x,t.startTime-e)}}var S=!1,ee=-1,te=5,ne=-1;function re(){return g?!0:!(e.unstable_now()-ne<te)}function ie(){if(g=!1,S){var t=e.unstable_now();ne=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&re());){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&&ce(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?ae():S=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){ee=_(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`):te=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(ee),ee=-1):h=!0,ce(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ae()))),r},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ke=t(((e,t)=>{t.exports=Ge()})),qe=t((e=>{var t=Ke(),n=s(),r=l();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 c(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(o(e)!==e)throw Error(i(188))}function f(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return d(a),e;if(s===r)return d(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=s;break}if(l===r){c=!0,r=a,n=s;break}l=l.sibling}if(!c){for(l=s.child;l;){if(l===n){c=!0,n=s,r=a;break}if(l===r){c=!0,r=s,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(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`),S=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.memo_cache_sentinel`),se=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=se&&e[se]||e[`@@iterator`],typeof e==`function`?e:null)}var le=Symbol.for(`react.client.reference`);function ue(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===le?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 te:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}var de=Array.isArray,C=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe={pending:!1,data:null,method:null,action:null},pe=[],me=-1;function he(e){return{current:e}}function ge(e){0>me||(e.current=pe[me],pe[me]=null,me--)}function T(e,t){me++,pe[me]=e.current,e.current=t}var _e=he(null),ve=he(null),ye=he(null),be=he(null);function xe(e,t){switch(T(ye,t),T(ve,e),T(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ge(_e),T(_e,e)}function Se(){ge(_e),ge(ve),ge(ye)}function Ce(e){e.memoizedState!==null&&T(be,e);var t=_e.current,n=Gd(t,e.type);t!==n&&(T(ve,e),T(_e,n))}function we(e){ve.current===e&&(ge(_e),ge(ve)),be.current===e&&(ge(be),$f._currentValue=fe)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(` 3 at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return` 4`+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!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{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return De(`Activity`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return` 8Error generating stack: `+e.message+` 9`+e.stack}}var E=Object.prototype.hasOwnProperty,Me=t.unstable_scheduleCallback,D=t.unstable_cancelCallback,Ne=t.unstable_shouldYield,O=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,Ve=t.log,He=t.unstable_setDisableYieldValue,Ue=null,We=null;function k(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var Ge=Math.clz32?Math.clz32:Ye,qe=Math.log,Je=Math.LN2;function Ye(e){return e>>>=0,e===0?32:31-(qe(e)/Je|0)|0}var Xe=256,Ze=262144,Qe=4194304;function $e(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 et(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=$e(n))):i=$e(o):i=$e(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=$e(n))):i=$e(o)):i=$e(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 tt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nt(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 rt(){var e=Qe;return Qe<<=1,!(Qe&62914560)&&(Qe=4194304),e}function it(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function at(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ot(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-Ge(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&&st(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function st(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function lt(e,t){var n=t&-t;return n=n&42?1:ut(n),(n&(e.suspendedLanes|t))===0?n:0}function ut(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 dt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ft(){var e=w.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function pt(e,t){var n=w.p;try{return w.p=e,t()}finally{w.p=n}}var mt=Math.random().toString(36).slice(2),ht=`__reactFiber$`+mt,gt=`__reactProps$`+mt,_t=`__reactContainer$`+mt,vt=`__reactEvents$`+mt,yt=`__reactListeners$`+mt,bt=`__reactHandles$`+mt,xt=`__reactResources$`+mt,St=`__reactMarker$`+mt;function Ct(e){delete e[ht],delete e[gt],delete e[vt],delete e[yt],delete e[bt]}function wt(e){var t=e[ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_t]||n[ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[ht])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function Tt(e){if(e=e[ht]||e[_t]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Et(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Dt(e){var t=e[xt];return t||=e[xt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ot(e){e[St]=!0}var kt=new Set,At={};function jt(e,t){Mt(e,t),Mt(e+`Capture`,t)}function Mt(e,t){for(At[e]=t,e=0;e<t.length;e++)kt.add(t[e])}var Nt=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]*$`),Pt={},Ft={};function It(e){return E.call(Ft,e)?!0:E.call(Pt,e)?!1:Nt.test(e)?Ft[e]=!0:(Pt[e]=!0,!1)}function Lt(e,t,n){if(It(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 Rt(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 zt(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 Bt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Vt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ht(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 Ut(e){if(!e._valueTracker){var t=Vt(e)?`checked`:`value`;e._valueTracker=Ht(e,t,``+e[t])}}function Wt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Vt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Gt(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 Kt=/[\n"\\]/g;function qt(e){return e.replace(Kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Jt(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=``+Bt(t)):e.value!==``+Bt(t)&&(e.value=``+Bt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Xt(e,o,Bt(n)):Xt(e,o,Bt(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=``+Bt(s):e.removeAttribute(`name`)}function Yt(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)){Ut(e);return}n=n==null?``:``+Bt(n),t=t==null?n:``+Bt(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),Ut(e)}function Xt(e,t,n){t===`number`&&Gt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Zt(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=``+Bt(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 Qt(e,t,n){if(t!=null&&(t=``+Bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Bt(n)}function $t(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(de(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}
vendor: 87,224 bytes, line 9
9n=Bt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ut(e)}function en(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var tn=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 nn(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||tn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function rn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(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 a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&nn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&nn(e,o,t[o])}function an(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 on=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`]]),sn=/^[\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 cn(e){return sn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function ln(){}var un=null;function dn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fn=null,pn=null;function mn(e){var t=Tt(e);if(t&&(e=t.stateNode)){var n=e[gt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Jt(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 a=r[gt]||null;if(!a)throw Error(i(90));Jt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Wt(r)}break a;case`textarea`:Qt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Zt(e,!!n.multiple,t,!1)}}}var hn=!1;function gn(e,t,n){if(hn)return e(t,n);hn=!0;try{return e(t)}finally{if(hn=!1,(fn!==null||pn!==null)&&(Cu(),fn&&(t=fn,e=pn,pn=fn=null,mn(t),e)))for(t=0;t<e.length;t++)mn(e[t])}}function _n(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gt]||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(i(231,t,typeof n));return n}var vn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),yn=!1;if(vn)try{var bn={};Object.defineProperty(bn,"passive",{get:function(){yn=!0}}),window.addEventListener(`test`,bn,bn),window.removeEventListener(`test`,bn,bn)}catch{yn=!1}var xn=null,Sn=null,Cn=null;function wn(){if(Cn)return Cn;var e,t=Sn,n=t.length,r,i=`value`in xn?xn.value:xn.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 Cn=i.slice(e,1<r?1-r:void 0)}function Tn(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 En(){return!0}function Dn(){return!1}function On(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)?En:Dn,this.isPropagationStopped=Dn,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=En)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=En)},persist:function(){},isPersistent:En}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=On(kn),jn=m({},kn,{view:0,detail:0}),Mn=On(jn),Nn,Pn,Fn,In=m({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qn,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!==Fn&&(Fn&&e.type===`mousemove`?(Nn=e.screenX-Fn.screenX,Pn=e.screenY-Fn.screenY):Pn=Nn=0,Fn=e),Nn)},movementY:function(e){return`movementY`in e?e.movementY:Pn}}),Ln=On(In),Rn=On(m({},In,{dataTransfer:0})),zn=On(m({},jn,{relatedTarget:0})),Bn=On(m({},kn,{animationName:0,elapsedTime:0,pseudoElement:0})),Vn=On(m({},kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Hn=On(m({},kn,{data:0})),Un={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Wn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Gn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gn[e])?!!t[e]:!1}function qn(){return Kn}var Jn=On(m({},jn,{key:function(e){if(e.key){var t=Un[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Tn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Wn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qn,charCode:function(e){return e.type===`keypress`?Tn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Tn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Yn=On(m({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xn=On(m({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qn})),Zn=On(m({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qn=On(m({},In,{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})),$n=On(m({},kn,{newState:0,oldState:0})),er=[9,13,27,32],tr=vn&&`CompositionEvent`in window,nr=null;vn&&`documentMode`in document&&(nr=document.documentMode);var rr=vn&&`TextEvent`in window&&!nr,ir=vn&&(!tr||nr&&8<nr&&11>=nr),ar=` `,or=!1;function sr(e,t){switch(e){case`keyup`:return er.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(or=!0,ar):null;case`textInput`:return e=t.data,e===ar&&or?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!tr&&sr(e,t)?(e=wn(),Cn=Sn=xn=null,lr=!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 ir&&t.locale!==`ko`?null:t.data;default:return null}}var fr={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 pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!fr[e.type]:t===`textarea`}function mr(e,t,n,r){fn?pn?pn.push(r):pn=[r]:fn=r,t=kd(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var hr=null,gr=null;function _r(e){Sd(e,0)}function vr(e){if(Wt(Et(e)))return e}function yr(e,t){if(e===`change`)return t}var br=!1;if(vn){var xr;if(vn){var Sr=`oninput`in document;if(!Sr){var A=document.createElement(`div`);A.setAttribute(`oninput`,`return;`),Sr=typeof A.oninput==`function`}xr=Sr}else xr=!1;br=xr&&(!document.documentMode||9<document.documentMode)}function j(){hr&&(hr.detachEvent(`onpropertychange`,Cr),gr=hr=null)}function Cr(e){if(e.propertyName===`value`&&vr(gr)){var t=[];mr(t,gr,e,dn(e)),gn(_r,t)}}function wr(e,t,n){e===`focusin`?(j(),hr=t,gr=n,hr.attachEvent(`onpropertychange`,Cr)):e===`focusout`&&j()}function Tr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return vr(gr)}function Er(e,t){if(e===`click`)return vr(t)}function Dr(e,t){if(e===`input`||e===`change`)return vr(t)}function Or(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var kr=typeof Object.is==`function`?Object.is:Or;function Ar(e,t){if(kr(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(!E.call(t,i)||!kr(e[i],t[i]))return!1}return!0}function jr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mr(e,t){var n=jr(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=jr(n)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Gt(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=Gt(e.document)}return t}function Fr(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 Ir=vn&&`documentMode`in document&&11>=document.documentMode,Lr=null,Rr=null,zr=null,Br=!1;function Vr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Br||Lr==null||Lr!==Gt(r)||(r=Lr,`selectionStart`in r&&Fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zr&&Ar(zr,r)||(zr=r,r=kd(Rr,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Lr)))}function Hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ur={animationend:Hr(`Animation`,`AnimationEnd`),animationiteration:Hr(`Animation`,`AnimationIteration`),animationstart:Hr(`Animation`,`AnimationStart`),transitionrun:Hr(`Transition`,`TransitionRun`),transitionstart:Hr(`Transition`,`TransitionStart`),transitioncancel:Hr(`Transition`,`TransitionCancel`),transitionend:Hr(`Transition`,`TransitionEnd`)},Wr={},Gr={};vn&&(Gr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ur.animationend.animation,delete Ur.animationiteration.animation,delete Ur.animationstart.animation),`TransitionEvent`in window||delete Ur.transitionend.transition);function Kr(e){if(Wr[e])return Wr[e];if(!Ur[e])return e;var t=Ur[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Gr)return Wr[e]=t[n];return e}var qr=Kr(`animationend`),Jr=Kr(`animationiteration`),Yr=Kr(`animationstart`),Xr=Kr(`transitionrun`),Zr=Kr(`transitionstart`),Qr=Kr(`transitioncancel`),$r=Kr(`transitionend`),ei=new Map,ti=`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(` `);ti.push(`scrollEnd`);function ni(e,t){ei.set(e,t),jt(t,[e])}var ri=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)},ii=[],ai=0,oi=0;function si(){for(var e=ai,t=oi=ai=0;t<e;){var n=ii[t];ii[t++]=null;var r=ii[t];ii[t++]=null;var i=ii[t];ii[t++]=null;var a=ii[t];if(ii[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&&di(n,i,a)}}function ci(e,t,n,r){ii[ai++]=e,ii[ai++]=t,ii[ai++]=n,ii[ai++]=r,oi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function li(e,t,n,r){return ci(e,t,n,r),fi(e)}function ui(e,t){return ci(e,null,null,t),fi(e)}function di(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-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function fi(e){if(50<mu)throw mu=0,hu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pi={};function mi(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 hi(e,t,n,r){return new mi(e,t,n,r)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _i(e,t){var n=e.alternate;return n===null?(n=hi(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 vi(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 yi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)gi(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,_e.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ae:return e=hi(31,n,t,a),e.elementType=ae,e.lanes=o,e;case v:return bi(n.children,a,o,t);case y:s=8,a|=24;break;case b:return e=hi(12,n,t,a|2),e.elementType=b,e.lanes=o,e;case te:return e=hi(13,n,t,a),e.elementType=te,e.lanes=o,e;case ne:return e=hi(19,n,t,a),e.elementType=ne,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case x:s=9;break a;case ee:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=hi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function bi(e,t,n,r){return e=hi(7,e,r,t),e.lanes=n,e}function xi(e,t,n){return e=hi(6,e,null,t),e.lanes=n,e}function Si(e){var t=hi(18,null,null,0);return t.stateNode=e,t}function Ci(e,t,n){return t=hi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wi=new WeakMap;function Ti(e,t){if(typeof e==`object`&&e){var n=wi.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},wi.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Ei=[],Di=0,Oi=null,ki=0,Ai=[],ji=0,Mi=null,Ni=1,Pi=``;function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Oi,Oi=e,ki=t}function Ii(e,t,n){Ai[ji++]=Ni,Ai[ji++]=Pi,Ai[ji++]=Mi,Mi=e;var r=Ni;e=Pi;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ni=1<<32-Ge(t)+i|n<<i|r,Pi=a+e}else Ni=1<<a|n<<i|r,Pi=e}function Li(e){e.return!==null&&(Fi(e,1),Ii(e,1,0))}function Ri(e){for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null;for(;e===Mi;)Mi=Ai[--ji],Ai[ji]=null,Pi=Ai[--ji],Ai[ji]=null,Ni=Ai[--ji],Ai[ji]=null}function zi(e,t){Ai[ji++]=Ni,Ai[ji++]=Pi,Ai[ji++]=Mi,Ni=t.id,Pi=t.overflow,Mi=e}var Bi=null,M=null,N=!1,Vi=null,Hi=!1,Ui=Error(i(519));function Wi(e){throw Xi(Ti(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ui}function Gi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ht]=e,t[gt]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<bd.length;n++)Y(bd[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),Yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),$t(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||Fd(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=ln),t=!0):t=!1,t||Wi(e,!0)}function Ki(e){for(Bi=e.return;Bi;)switch(Bi.tag){case 5:case 31:case 13:Hi=!1;return;case 27:case 3:Hi=!0;return;default:Bi=Bi.return}}function qi(e){if(e!==Bi)return!1;if(!N)return Ki(e),N=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Kd(e.type,e.memoizedProps)),n=!n),n&&M&&Wi(e),Ki(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));M=ff(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));M=ff(e)}else t===27?(t=M,$d(e.type)?(e=df,df=null,M=e):M=t):M=Bi?uf(e.stateNode.nextSibling):null;return!0}function Ji(){M=Bi=null,N=!1}function Yi(){var e=Vi;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),Vi=null),e}function Xi(e){Vi===null?Vi=[e]:Vi.push(e)}var Zi=he(null),Qi=null,$i=null;function ea(e,t,n){T(Zi,t._currentValue),t._currentValue=n}function ta(e){e._currentValue=Zi.current,ge(Zi)}function na(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 ra(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),na(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),na(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ia(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;kr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===be.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[$f]:e.push($f))}a=a.return}e!==null&&ra(t,e,n,r),t.flags|=262144}function aa(e){for(e=e.firstContext;e!==null;){if(!kr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){Qi=e,$i=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function sa(e){return la(Qi,e)}function ca(e,t){return Qi===null&&oa(e),la(e,t)}function la(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$i===null){if(e===null)throw Error(i(308));$i=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $i=$i.next=t;return n}var ua=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()})}},da=t.unstable_scheduleCallback,fa=t.unstable_NormalPriority,pa={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ma(){return{controller:new ua,data:new Map,refCount:0}}function P(e){e.refCount--,e.refCount===0&&da(fa,function(){e.controller.abort()})}var ha=null,ga=0,_a=0,va=null;function ya(e,t){if(ha===null){var n=ha=[];ga=0,_a=md(),va={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ga++,t.then(ba,ba),t}function ba(){if(--ga===0&&ha!==null){va!==null&&(va.status=`fulfilled`);var e=ha;ha=null,_a=0,va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function xa(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 Sa=C.S;C.S=function(e,t){ru=Pe(),typeof t==`object`&&t&&typeof t.then==`function`&&ya(e,t),Sa!==null&&Sa(e,t)};var Ca=he(null);function wa(){var e=Ca.current;return e===null?U.pooledCache:e}function Ta(e,t){t===null?T(Ca,Ca.current):T(Ca,t.pool)}function Ea(){var e=wa();return e===null?null:{parent:pa._currentValue,pool:e}}var Da=Error(i(460)),Oa=Error(i(474)),ka=Error(i(542)),Aa={then:function(){}};function ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ma(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ln,ln),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ia(e),e;default:if(typeof t.status==`string`)t.then(ln,ln);else{if(e=U,e!==null&&100<e.shellSuspendCounter)throw Error(i(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,Ia(e),e}throw Pa=t,Da}}function Na(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Pa=e,Da):e}}var Pa=null;function Fa(){if(Pa===null)throw Error(i(459));var e=Pa;return Pa=null,e}function Ia(e){if(e===Da||e===ka)throw Error(i(483))}var La=null,Ra=0;function za(e){var t=Ra;return Ra+=1,La===null&&(La=[]),Ma(La,e,t)}function Ba(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Va(e,t){throw t.$$typeof===h?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ha(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 a(e,t){return e=_i(e,t),e.index=0,e.sibling=null,e}function o(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=xi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&Na(i)===t.type)?(t=a(t,n.props),Ba(t,n),t.return=e,t):(t=yi(n.type,n.key,n.props,null,e.mode,r),Ba(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=Ci(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=bi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=xi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=yi(t.type,t.key,t.props,null,e.mode,n),Ba(n,t),n.return=e,n;case _:return t=Ci(t,e.mode,n),t.return=e,t;case ie:return t=Na(t),f(e,t,n)}if(de(t)||ce(t))return t=bi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,za(t),n);if(t.$$typeof===S)return f(e,ca(e,t),n);Va(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 ie:return n=Na(n),p(e,t,n,r)}if(de(n)||ce(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,za(n),r);if(n.$$typeof===S)return p(e,t,ca(e,n),r);Va(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 ie:return r=Na(r),m(e,t,n,r,i)}if(de(r)||ce(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,za(r),i);if(r.$$typeof===S)return m(e,t,n,ca(t,r),i);Va(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=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),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),N&&Fi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return N&&Fi(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),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),N&&Fi(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(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(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),N&&Fi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return N&&Fi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),N&&Fi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===v&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===v){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Na(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ba(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===v?(c=bi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=yi(o.type,o.key,o.props,null,e.mode,c),Ba(c,o),c.return=e,e=c)}return s(e);case _:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=Ci(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Na(o),b(e,r,o,c)}if(de(o))return h(e,r,o,c);if(ce(o)){if(l=ce(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,za(o),c);if(o.$$typeof===S)return b(e,r,ca(e,o),c);Va(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=xi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Da||t===ka)throw t;var a=hi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(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 Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=fi(e),di(e,null,n),t}return ci(e,r,t,n),fi(e)}function Xa(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,ct(e,n)}}function Za(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 Qa=!1;function $a(){if(Qa){var e=va;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!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?(G&f)===f:(r&f)===f){f!==0&&f===_a&&(Qa=!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:Ga=!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),Yl|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)to(n[e],t)}var ro=he(null),io=he(0);function ao(e,t){e=ql,T(io,e),T(ro,t),ql=e|t.baseLanes}function oo(){T(io,ql),T(ro,ro.current)}function so(){ql=io.current,ge(ro),ge(io)}var co=he(null),lo=null;function uo(e){var t=e.alternate;T(go,go.current&1),T(co,e),lo===null&&(t===null||ro.current!==null||t.memoizedState!==null)&&(lo=e)}function fo(e){T(go,go.current),T(co,e),lo===null&&(lo=e)}function po(e){e.tag===22?(T(go,go.current),T(co,e),lo===null&&(lo=e)):mo(e)}function mo(){T(go,go.current),T(co,co.current)}function ho(e){ge(co),lo===e&&(lo=null),ge(go)}var go=he(0);function _o(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sf(n)||cf(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 vo=0,F=null,I=null,yo=null,bo=!1,xo=!1,So=!1,Co=0,wo=0,To=null,Eo=0;function Do(){throw Error(i(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!kr(e[n],t[n]))return!1;return!0}function ko(e,t,n,r,i,a){return vo=a,F=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,C.H=e===null||e.memoizedState===null?Us:Ws,So=!1,a=n(r,i),So=!1,xo&&(a=jo(t,n,r,i)),Ao(e),a}function Ao(e){C.H=Hs;var t=I!==null&&I.next!==null;if(vo=0,yo=I=F=null,bo=!1,wo=0,To=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&aa(e)&&(sc=!0))}function jo(e,t,n,r){F=e;var a=0;do{if(xo&&(To=null),wo=0,xo=!1,25<=a)throw Error(i(301));if(a+=1,yo=I=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}C.H=Gs,o=t(n,r)}while(xo);return o}function Mo(){var e=C.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(I===null?null:I.memoizedState)!==e&&(F.flags|=1024),t}function No(){var e=Co!==0;return Co=0,e}function Po(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Fo(e){if(bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bo=!1}vo=0,yo=I=F=null,xo=!1,wo=Co=0,To=null}function L(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yo===null?F.memoizedState=yo=e:yo=yo.next=e,yo}function R(){if(I===null){var e=F.alternate;e=e===null?null:e.memoizedState}else e=I.next;var t=yo===null?F.memoizedState:yo.next;if(t!==null)yo=t,I=e;else{if(e===null)throw F.alternate===null?Error(i(467)):Error(i(310));I=e,e={memoizedState:I.memoizedState,baseState:I.baseState,baseQueue:I.baseQueue,queue:I.queue,next:null},yo===null?F.memoizedState=yo=e:yo=yo.next=e}return yo}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=wo;return wo+=1,To===null&&(To=[]),e=Ma(To,e,t),t=F,(yo===null?t.memoizedState:yo.next)===null&&(t=t.alternate,C.H=t===null||t.memoizedState===null?Us:Ws),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===S)return sa(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=F.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=F.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=Io(),F.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]=oe;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(R(),I,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(vo&f)===f:(G&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===_a&&(d=!0);else if((vo&p)===p){u=u.next,p===_a&&(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=o):l=l.next=f,F.lanes|=p,Yl|=p;f=u.action,So&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,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=o):l=l.next=p,F.lanes|=f,Yl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!kr(o,e.memoizedState)&&(sc=!0,d&&(n=va,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=R(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);kr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=F,a=R(),o=N;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!kr((I||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,hs(qo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||yo!==null&&yo.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),U===null)throw Error(i(349));o||vo&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=F.updateQueue,t===null?(t=Io(),F.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kr(e,n)}catch{return!0}}function Yo(e){var t=ui(e,2);t!==null&&vu(t,e,2)}function Xo(e){var t=L();if(typeof e==`function`){var n=e;if(e=n(),So){k(!0);try{n()}finally{k(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,I,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};C.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=C.T,o={};C.T=o;try{var s=n(i,r),c=C.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),C.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(N){var n=U.formState;if(n!==null){a:{var r=F;if(N){if(M){b:{for(var i=M,a=Hi;i.nodeType!==8;){if(!a){i=null;break b}if(i=uf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){M=uf(i.nextSibling),r=i.data===`F!`;break a}}Wi(r)}r=!1}r&&(t=n[0])}}return n=L(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Is.bind(null,F,r),r.dispatch=n,r=Xo(!1),a=Rs.bind(null,F,!1,r.queue),r=L(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,F,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(R(),I,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===Da?ka:e}else r=t;t=R();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(F.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=R(),n=I;if(n!==null)return ss(t,n,e);R(),t=t.memoizedState,n=R();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=F.updateQueue,t===null&&(t=Io(),F.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 ds(){return R().memoizedState}function fs(e,t,n,r){var i=L();F.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=R();r=r===void 0?null:r;var a=i.memoizedState.inst;I!==null&&r!==null&&Oo(r,I.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(F.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){F.flags|=4;var t=F.updateQueue;if(t===null)t=Io(),F.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=R().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(H&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(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 xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=R();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=R();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Oo(t,r[1]))return r[0];if(r=e(),So){k(!0);try{e()}finally{k(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||vo&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=_u(),F.lanes|=e,Yl|=e,n)}function Es(e,t,n,r){return kr(n,t)?n:ro.current===null?!(vo&42)||vo&1073741824&&!(G&261930)?(sc=!0,e.memoizedState=n):(e=_u(),F.lanes|=e,Yl|=e,t):(e=Ts(e,n,r),kr(e,t)||(sc=!0),e)}function Ds(e,t,n,r,i){var a=w.p;w.p=a!==0&&8>a?a:8;var o=C.T,s={};C.T=s,Rs(e,!1,t,n);try{var c=i(),l=C.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,xa(c,r),gu(e)):Ls(e,t,r,gu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{w.p=a,o!==null&&s.types!==null&&(o.types=s.types),C.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=As(e).queue;Ds(e,a,t,fe,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:fe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},gu())}function Ms(){return sa($f)}function z(){return R().memoizedState}function Ns(){return R().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=Ja(n);var r=Ya(t,e,n);r!==null&&(vu(r,t,n),Xa(r,t,n)),t={cache:ma()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=li(e,t,n,r),n!==null&&(vu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,gu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(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,kr(s,o))return ci(e,t,i,0),U===null&&si(),!1}catch{}if(n=li(e,t,i,r),n!==null)return vu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=li(e,n,r,2),t!==null&&vu(t,e,2)}function zs(e){var t=e.alternate;return e===F||t!==null&&t===F}function Bs(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ct(e,n)}}var Hs={readContext:sa,use:Ro,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useLayoutEffect:Do,useInsertionEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useSyncExternalStore:Do,useId:Do,useHostTransitionStatus:Do,useFormState:Do,useActionState:Do,useOptimistic:Do,useMemoCache:Do,useCacheRefresh:Do};Hs.useEffectEvent=Do;var Us={readContext:sa,use:Ro,useCallback:function(e,t){return L().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=L();t=t===void 0?null:t;var r=e();if(So){k(!0);try{e()}finally{k(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=L();if(n!==void 0){var i=n(t);if(So){k(!0);try{n(t)}finally{k(!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=Fs.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=L();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Is.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(L(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,F,e.queue,!0,!1),L().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,a=L();if(N){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),U===null)throw Error(i(349));G&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=L(),t=U.identifierPrefix;if(N){var n=Pi,r=Ni;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Eo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=L();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,F,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return L().memoizedState=Ps.bind(null,F)},useEffectEvent:function(e){var t=L(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:sa,use:Ro,useCallback:Cs,useContext:sa,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(R(),I.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=R().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:z,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(R(),I,e,t)},useMemoCache:zo,useCacheRefresh:Ns};Ws.useEffectEvent=_s;var Gs={readContext:sa,use:Ro,useCallback:Cs,useContext:sa,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=R();return I===null?Ts(n,e,t):Es(n,I.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=R().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:z,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=R();return I===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,I,e,t)},useMemoCache:zo,useCacheRefresh:Ns};Gs.useEffectEvent=_s;function Ks(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 qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(vu(t,e,r),Xa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ya(e,i,r),t!==null&&(vu(t,e,r),Xa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gu(),r=Ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ya(e,r,n),t!==null&&(vu(t,e,n),Xa(t,e,n))}};function Js(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?!Ar(n,r)||!Ar(i,a):!0}function Ys(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&&qs.enqueueReplaceState(t,t.state,null)}function Xs(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 Zs(e){ri(e)}function Qs(e){console.error(e)}function $s(e){ri(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(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 nc(e,t,n){return n=Ja(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ja(e),e.tag=3,e}function ic(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(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(ou===null?ou=new Set([this]):ou.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ia(t,n,a,!0),n=co.current,n!==null){switch(n.tag){case 31:case 13:return lo===null?Au():n.alternate===null&&Jl===0&&(Jl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Aa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ju(e,r,a)),!1;case 22:return n.flags|=65536,r===Aa?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)),Ju(e,r,a)),!1}throw Error(i(435,n.tag))}return Ju(e,r,a),Au(),!1}if(N)return t=co.current,t===null?(r!==Ui&&(t=Error(i(423),{cause:r}),Xi(Ti(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ti(r,n),a=nc(e.stateNode,r,a),Za(e,a),Jl!==4&&(Jl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Ui&&(e=Error(i(422),{cause:r}),Xi(Ti(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ti(o,n),q===null?q=[o]:q.push(o),Jl!==4&&(Jl=2),t===null)return!0;r=Ti(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Za(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ou===null||!ou.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Za(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?Wa(t,null,n,r):Ua(t,e.child,n,r)}function lc(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 oa(t),r=ko(e,t,n,o,a,i),s=No(),e!==null&&!sc?(Po(e,t,i),Nc(e,t,i)):(N&&s&&Li(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!gi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=yi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ar:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=_i(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ar(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(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 mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ta(t,a===null?null:a.cachePool),a===null?oo():ao(t,a),po(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ta(t,null),oo(),mo(t)):(Ta(t,a.cachePool),ao(t,a),mo(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=wa();return a=a===null?null:{parent:pa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ta(t,null),oo(),po(t),e!==null&&ia(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ua(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,ho(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(N){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(fo(t),(e=M)?(e=of(e,Hi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi===null?null:{id:Ni,overflow:Pi},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,Bi=t,M=null)):e=null,e===null)throw Wi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(fo(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||ia(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=U,r!==null&&(s=lt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ui(e,s),vu(r,e,s),oc;Au(),t=gc(e,t,n)}else e=o.treeContext,M=uf(s.nextSibling),Bi=t,N=!0,Vi=null,Hi=!1,e!==null&&zi(t,e),t=hc(t,r),t.flags|=4096;return t}return e=_i(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return oa(t),n=ko(e,t,n,r,void 0,i),r=No(),e!==null&&!sc?(Po(e,t,i),Nc(e,t,i)):(N&&r&&Li(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return oa(t),t.updateQueue=null,n=jo(t,r,n,i),Ao(e),r=No(),e!==null&&!sc?(Po(e,t,a),Nc(e,t,a)):(N&&r&&Li(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(oa(t),t.stateNode===null){var a=pi,o=n.contextType;typeof o==`object`&&o&&(a=sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ka(t),o=n.contextType,a.context=typeof o==`object`&&o?sa(o):pi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(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&&qs.enqueueReplaceState(a,a.state,null),eo(t,r,a,i),$a(),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=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=pi,typeof u==`object`&&u&&(o=sa(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)&&Ys(t,a,r,o),Ga=!1;var f=t.memoizedState;a.state=f,eo(t,r,a,i),$a(),l=t.memoizedState,s||f!==l||Ga?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ga||Js(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=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=pi,typeof l==`object`&&l&&(c=sa(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)&&Ys(t,a,r,c),Ga=!1,f=t.memoizedState,a.state=f,eo(t,r,a,i),$a();var p=t.memoizedState;o!==d||f!==p||Ga||e!==null&&e.dependencies!==null&&aa(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ga||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&aa(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,vc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ua(t,e.child,null,i),t.child=Ua(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Ji(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:Ea()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(go.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(N){if(a?uo(t):mo(t),(e=M)?(e=of(e,Hi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi===null?null:{id:Ni,overflow:Pi},retryLane:536870912,hydrationErrors:null},n=Si(e),n.return=t,t.child=n,Bi=t,M=null)):e=null,e===null)throw Wi(t);return cf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(mo(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=bi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(uo(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(uo(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(mo(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=bi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ua(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(mo(t),t.child=e.child,t.flags|=128,t=null);else if(uo(t),cf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Xi({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||ia(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=U,s!==null&&(r=lt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ui(e,r),vu(s,e,r),oc;sf(c)||Au(),t=kc(e,t,n)}else sf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,M=uf(c.nextSibling),Bi=t,N=!0,Vi=null,Hi=!1,e!==null&&zi(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(mo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=_i(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=bi(c,a,n,null),c.flags|=2):c=_i(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=Ea():(l=pa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(uo(t),n=e.child,e=n.sibling,n=_i(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 Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=hi(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ua(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),na(e.return,t,n)}function jc(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 Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=go.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,T(go,o),cc(e,t,r,n),r=N?ki:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(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&&_o(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(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&&_o(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ia(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=_i(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=_i(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&aa(e)))}function Fc(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),ea(t,pa,e.memoizedState.cache),Ji();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:ea(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,fo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(uo(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(uo(t),t.flags|=128,null);uo(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ia(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),T(go,go.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:ea(t,pa,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,N&&t.flags&1048576&&Ii(t,ki,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Na(t.elementType),t.type=e,typeof e==`function`)gi(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=lc(null,t,e,r,n);break a}if(a===re){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ue(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,qa(e,t),eo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ea(t,pa,r),r!==o.cache&&ra(t,[pa],n,!0),$a(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=Ti(Error(i(424)),t),Xi(a),t=Sc(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(M=uf(e.firstChild),Bi=t,N=!0,Vi=null,Hi=!0,n=Wa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ji(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:N||(n=t.type,e=t.pendingProps,r=Ud(ye.current).createElement(n),r[ht]=t,r[gt]=e,Ld(r,n,e),Ot(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&N&&(r=t.stateNode=mf(t.type,t.pendingProps,ye.current),Bi=t,Hi=!0,a=M,$d(t.type)?(df=a,M=uf(r.firstChild)):M=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&N&&((a=r=M)&&(r=rf(r,t.type,t.pendingProps,Hi),r===null?a=!1:(t.stateNode=r,Bi=t,M=uf(r.firstChild),Hi=!1,a=!0)),a||Wi(t)),Ce(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(a,o)?r=null:s!==null&&Kd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ko(e,t,Mo,null,null,n),$f._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&N&&((e=n=M)&&(n=af(n,t.pendingProps,Hi),n===null?e=!1:(t.stateNode=n,Bi=t,M=null,e=!0)),e||Wi(t)),null;case 13:return Ec(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ua(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ea(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,oa(t),a=sa(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return oa(t),r=sa(pa),e===null?(a=wa(),a===null&&(a=U,o=ma(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ka(t),ea(t,pa,a)):((e.lanes&n)!==0&&(qa(e,t),eo(t,null,null,n),$a()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ea(t,pa,r),r!==a.cache&&ra(t,[pa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ea(t,pa,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Du())e.flags|=8192;else throw Pa=Aa,Oa}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t))if(Du())e.flags|=8192;else throw Pa=Aa,Oa}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:rt(),e.lanes|=t,$l|=t)}function Vc(e,t){if(!N)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 B(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 Hc(e,t,n){var r=t.pendingProps;switch(Ri(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return B(t),null;case 1:return B(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ta(pa),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(qi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yi())),B(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(B(t),Rc(t,a,null,r,n)):(B(t),zc(t,o))):o?o===e.memoizedState?(B(t),t.flags&=-16777217):(Lc(t),B(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),B(t),Rc(t,a,e,r,n)),null;case 27:if(we(t),n=ye.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}e=_e.current,qi(t)?Gi(t,e):(e=mf(a,r,n),t.stateNode=e,Lc(t))}return B(t),null;case 5:if(we(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}if(o=_e.current,qi(t))Gi(t,o);else{var s=Ud(ye.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ht]=t,o[gt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.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=o;a:switch(Ld(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return B(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ye.current,qi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Bi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ht]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Fd(e.nodeValue,n)),e||Wi(t,!0)}else e=Ud(e).createTextNode(r),e[ht]=t,t.stateNode=e}return B(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(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ht]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),e=!1}else n=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(i(558))}return B(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=qi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ht]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),a=!1}else a=Yi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),B(t),null);case 4:return Se(),e===null&&Td(t.stateNode.containerInfo),B(t),null;case 10:return ta(t.type),B(t),null;case 19:if(ge(go),r=t.memoizedState,r===null)return B(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null)if(a)Vc(r,!1);else{if(Jl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=_o(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)vi(n,e),n=n.sibling;return T(go,go.current&1|2),N&&Fi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>iu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=_o(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!N)return B(t),null}else 2*Pe()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(B(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=go.current,T(go,a?n&1|2:n&1),N&&Fi(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(B(t),t.subtreeFlags&6&&(t.flags|=8192)):B(t),n=t.updateQueue,n!==null&&Bc(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(Ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(pa),B(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Uc(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(pa),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(go),null;case 4:return Se(),null;case 10:return ta(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&ge(Ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(pa),null;case 25:return null;default:return null}}function Wc(e,t){switch(Ri(t),t.tag){case 3:ta(pa),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:ge(go);break;case 10:ta(t.type);break;case 22:case 23:ho(t),so(),e!==null&&ge(Ca);break;case 24:ta(pa)}}function Gc(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){J(t,t.return,e)}}function Kc(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){J(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){J(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){J(e,e.return,t)}}}function Jc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){J(e,t,n)}}function Yc(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){J(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){J(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){J(e,t,n)}else n.current=null}function Zc(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){J(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[gt]=t}catch(t){J(e,e.return,t)}}function V(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function $c(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||V(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&&$d(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 el(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=ln));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(el(e,t,n),e=e.sibling;e!==null;)el(e,t,n),e=e.sibling}function tl(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&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[ht]=e,t[gt]=n}catch(t){J(e,e.return,t)}}var rl=!1,il=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,sl=null;function cl(e,t){if(e=e.containerInfo,Vd=cp,e=Pr(e),Fr(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 a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.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||a!==0&&f.nodeType!==3||(c=s+a),f!==o||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===a&&(c=s),p===o&&++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(Hd={focusedElem:e,selectionRange:n},cp=!1,sl=t;sl!==null;)if(t=sl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,sl=e;else for(;sl!==null;){switch(t=sl,o=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++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){J(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)nf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:nf(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(i(163))}if(e=t.sibling,e!==null){e.return=t.return,sl=e;break}sl=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&Gc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){J(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;
vendor: 5,405 bytes, line 9
9try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){J(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(wl(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{no(e,t)}catch(e){J(n,n.return,e)}}break;case 27:t===null&&r&4&&nl(n);case 26:case 5:wl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&hl(e,n);break;case 13:wl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Zu.bind(null,n),lf(e,n))));break;case 22:if(r=n.memoizedState!==null||rl,!r){t=t!==null&&t.memoizedState!==null||il,i=rl;var a=il;rl=r,(il=t)&&!a?El(e,n,!!(n.subtreeFlags&8772)):wl(e,n),rl=i,il=a}break;case 30:break;default:wl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ct(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 dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(We&&typeof We.onCommitFiberUnmount==`function`)try{We.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:il||Xc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:il||Xc(n,t);var r=dl,i=fl;$d(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),hf(n.stateNode),dl=r,fl=i;break;case 5:il||Xc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null)if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){J(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){J(n,t,e)}break;case 18:dl!==null&&(fl?(e=dl,ef(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):ef(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),il||Kc(4,n,t),pl(e,t,n);break;case 1:il||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:il=(r=il)||n.memoizedState!==null,pl(e,t,n),il=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){J(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){J(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(i(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Qu.bind(null,e,t);t.then(r,r)}})}function yl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if($d(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(i(160));ml(o,s,a),dl=null,fl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var bl=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yl(t,e),Sl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:yl(t,e),Sl(e),r&512&&(il||n===null||Xc(n,n.return)),r&64&&rl&&(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 a=bl;if(yl(t,e),Sl(e),r&512&&(il||n===null||Xc(n,n.return)),r&4){var o=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,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[St]||o[ht]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ld(o,r,n),o[ht]=e,Ot(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Ld(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Ld(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ht]=e,Ot(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode);else e.stateNode=Lf(a,r,e.memoizedProps);
vendor: 65,796 bytes, lines 9-10
9else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:yl(t,e),Sl(e),r&512&&(il||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yl(t,e),Sl(e),r&512&&(il||n===null||Xc(n,n.return)),e.flags&32){a=e.stateNode;try{en(a,``)}catch(t){J(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(yl(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){J(e,e.return,t)}}break;case 3:if(Vf=null,a=bl,bl=vf(t.containerInfo),yl(t,e),bl=a,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){J(e,e.return,t)}al&&(al=!1,Cl(e));break;case 4:r=bl,bl=vf(e.stateNode.containerInfo),yl(t,e),Sl(e),bl=r;break;case 12:yl(t,e),Sl(e);break;case 31:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:yl(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=Pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=rl,d=il;if(rl=u||a,il=d||l,yl(t,e),il=d,rl=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||rl||il||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.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){J(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){J(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?tf(m,!0):tf(l.stateNode,!1)}catch(e){J(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,vl(e,n))));break;case 19:yl(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:yl(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(V(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;tl(e,$c(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(en(o,``),n.flags&=-33),tl(e,$c(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;el(e,$c(e),s);break;default:throw Error(i(161))}}catch(t){J(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),Tl(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),Tl(t);break;case 27:hf(t.stateNode);case 26:case 5:Xc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=!!(t.subtreeFlags&8772),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:El(i,a,n),Gc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){J(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)to(c[i],s)}catch(e){J(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:nl(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&hl(i,a);break;case 13:El(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Yc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(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&&P(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&P(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&Gc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(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&&P(e)));break;case 12:if(i&2048){kl(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){J(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!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:jl(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(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:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&Kf(n,bl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=bl;bl=vf(e.stateNode.containerInfo),Pl(e,t,n),bl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(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 Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;sl!==null;){var n=sl;switch(n.tag){case 0:case 11:case 15:Kc(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:P(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sl=r;else a:for(n=e;sl!==null;){r=sl;var i=r.sibling,a=r.return;if(ul(r),r===n){sl=null;break a}if(i!==null){i.return=a,sl=i;break a}sl=a}}}var Vl={getCacheForType:function(e){var t=sa(pa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return sa(pa).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,H=0,U=null,W=null,G=0,K=0,Ul=null,Wl=!1,Gl=!1,Kl=!1,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,q=null,eu=null,tu=!1,nu=0,ru=0,iu=1/0,au=null,ou=null,su=0,cu=null,lu=null,uu=0,du=0,fu=null,pu=null,mu=0,hu=null;function gu(){return H&2&&G!==0?G&-G:C.T===null?ft():md()}function _u(){if(Ql===0)if(!(G&536870912)||N){var e=Ze;Ze<<=1,!(Ze&3932160)&&(Ze=262144),Ql=e}else Ql=536870912;return e=co.current,e!==null&&(e.flags|=32),Ql}function vu(e,t,n){(e===U&&(K===2||K===9)||e.cancelPendingCommit!==null)&&(Tu(e,0),Su(e,G,Ql,!1)),at(e,n),(!(H&2)||e!==U)&&(e===U&&(!(H&2)&&(Xl|=n),Jl===4&&Su(e,G,Ql,!1)),od(e))}function yu(e,t,n){if(H&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||tt(e,t),a=r?Nu(e,t):ju(e,t,!0),o=r;do{if(a===0){Gl&&!r&&Su(e,t,0,!1);break}if(n=e.current.alternate,o&&!xu(n)){a=ju(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)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;a=q;var l=c.current.memoizedState.isDehydrated;if(l&&(Tu(c,s).flags|=256),s=ju(c,s,!1),s!==2){if(Kl&&!l){c.errorRecoveryDisabledLanes|=o,Xl|=o,a=4;break a}o=eu,eu=a,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Tu(e,0),Su(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Su(r,t,Ql,!Wl);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=nu+300-Pe(),10<a)){if(Su(r,t,Ql,!Wl),et(r,0,!0)!==0)break a;uu=t,r.timeoutHandle=Yd(bu.bind(null,r,n,eu,au,tu,t,Ql,Xl,$l,Wl,o,`Throttled`,-0,0),a);break a}bu(r,n,eu,au,tu,t,Ql,Xl,$l,Wl,o,null,-0,0)}break}while(1);od(e)}function bu(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:ln},Fl(t,a,d);var m=(a&62914560)===a?nu-Pe():(a&4194048)===a?ru-Pe():0;if(m=Jf(d,m),m!==null){uu=a,e.cancelPendingCommit=m(Bu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Su(e,a,o,!l);return}}Bu(e,t,a,n,r,i,o,s,c)}function xu(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(!kr(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 Su(e,t,n,r){t&=~Zl,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&st(e,n,t)}function Cu(){return H&6?!0:(sd(0,!1),!1)}function wu(){if(W!==null){if(K===0)var e=W.return;else e=W,$i=Qi=null,Fo(e),La=null,Ra=0,e=W;for(;e!==null;)Wc(e.alternate,e),e=e.return;W=null}}function Tu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Z(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),uu=0,wu(),U=e,W=n=_i(e.current,null),G=t,K=0,Ul=null,Wl=!1,Gl=tt(e,t),Kl=!1,$l=Ql=Zl=Xl=Yl=Jl=0,eu=q=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return ql=t,si(),n}function Eu(e,t){F=null,C.H=Hs,t===Da||t===ka?(t=Fa(),K=3):t===Oa?(t=Fa(),K=4):K=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ul=t,W===null&&(Jl=1,ec(e,Ti(t,e.current)))}function Du(){var e=co.current;return e===null?!0:(G&4194048)===G?lo===null:(G&62914560)===G||G&536870912?e===lo:!1}function Ou(){var e=C.H;return C.H=Hs,e===null?Hs:e}function ku(){var e=C.A;return C.A=Vl,e}function Au(){Jl=4,Wl||(G&4194048)!==G&&co.current!==null||(Gl=!0),!(Yl&134217727)&&!(Xl&134217727)||U===null||Su(U,G,Ql,!1)}function ju(e,t,n){var r=H;H|=2;var i=Ou(),a=ku();(U!==e||G!==t)&&(au=null,Tu(e,t)),t=!1;var o=Jl;a:do try{if(K!==0&&W!==null){var s=W,c=Ul;switch(K){case 8:wu(),o=6;break a;case 3:case 2:case 9:case 6:co.current===null&&(t=!0);var l=K;if(K=0,Ul=null,Lu(e,s,c,l),n&&Gl){o=0;break a}break;default:l=K,K=0,Ul=null,Lu(e,s,c,l)}}Mu(),o=Jl;break}catch(t){Eu(e,t)}while(1);return t&&e.shellSuspendCounter++,$i=Qi=null,H=r,C.H=i,C.A=a,W===null&&(U=null,G=0,si()),o}function Mu(){for(;W!==null;)Fu(W)}function Nu(e,t){var n=H;H|=2;var r=Ou(),a=ku();U!==e||G!==t?(au=null,iu=Pe()+500,Tu(e,t)):Gl=tt(e,t);a:do try{if(K!==0&&W!==null){t=W;var o=Ul;b:switch(K){case 1:K=0,Ul=null,Lu(e,t,o,1);break;case 2:case 9:if(ja(o)){K=0,Ul=null,Iu(t);break}t=function(){K!==2&&K!==9||U!==e||(K=7),od(e)},o.then(t,t);break a;case 3:K=7;break a;case 4:K=5;break a;case 7:ja(o)?(K=0,Ul=null,Iu(t)):(K=0,Ul=null,Lu(e,t,o,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?Gf(s):c.stateNode.complete){K=0,Ul=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,Ru(u))}break b}}K=0,Ul=null,Lu(e,t,o,5);break;case 6:K=0,Ul=null,Lu(e,t,o,6);break;case 8:wu(),Jl=6;break a;default:throw Error(i(462))}}Pu();break}catch(t){Eu(e,t)}while(1);return $i=Qi=null,C.H=r,C.A=a,H=n,W===null?(U=null,G=0,si(),Jl):0}function Pu(){for(;W!==null&&!Ne();)Fu(W)}function Fu(e){var t=Ic(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?Ru(e):W=t}function Iu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:Fo(t);default:Wc(n,t),t=W=vi(t,ql),t=Ic(n,t,ql)}e.memoizedProps=e.pendingProps,t===null?Ru(e):W=t}function Lu(e,t,n,r){$i=Qi=null,Fo(t),La=null,Ra=0;var i=t.return;try{if(ac(e,i,t,n,G)){Jl=1,ec(e,Ti(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Jl=1,ec(e,Ti(n,e.current)),W=null;return}t.flags&32768?(N||r===1?e=!0:Gl||G&536870912?e=!1:(Wl=e=!0,(r===2||r===9||r===3||r===6)&&(r=co.current,r!==null&&r.tag===13&&(r.flags|=16384))),zu(t,e)):Ru(t)}function Ru(e){var t=e;do{if(t.flags&32768){zu(t,Wl);return}e=t.return;var n=Hc(t.alternate,t,ql);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Jl===0&&(Jl=5)}function zu(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Jl=6,W=null}function Bu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Gu();while(su!==0);if(H&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=oi,ot(e,n,o,s,c,l),e===U&&(W=U=null,G=0),lu=t,cu=e,uu=n,du=o,fu=a,pu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,$u(Re,function(){return Ku(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=C.T,C.T=null,a=w.p,w.p=2,s=H,H|=4;try{cl(e,t,n)}finally{H=s,w.p=a,C.T=r}}su=1,Vu(),Hu(),Uu()}}function Vu(){if(su===1){su=0;var e=cu,t=lu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=C.T,C.T=null;var r=w.p;w.p=2;var i=H;H|=4;try{xl(t,e);var a=Hd,o=Pr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Nr(s.ownerDocument.documentElement,s)){if(c!==null&&Fr(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 _=Mr(s,h),v=Mr(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}}cp=!!Vd,Hd=Vd=null}finally{H=i,w.p=r,C.T=n}}e.current=t,su=2}}function Hu(){if(su===2){su=0;var e=cu,t=lu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=C.T,C.T=null;var r=w.p;w.p=2;var i=H;H|=4;try{ll(e,t.alternate,t)}finally{H=i,w.p=r,C.T=n}}su=3}}function Uu(){if(su===4||su===3){su=0,O();var e=cu,t=lu,n=uu,r=pu;t.subtreeFlags&10256||t.flags&10256?su=5:(su=0,lu=cu=null,Wu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ou=null),dt(n),t=t.stateNode,We&&typeof We.onCommitFiberRoot==`function`)try{We.onCommitFiberRoot(Ue,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=C.T,i=w.p,w.p=2,C.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{C.T=t,w.p=i}}uu&3&&Gu(),od(e),i=e.pendingLanes,n&261930&&i&42?e===hu?mu++:(mu=0,hu=e):mu=0,sd(0,!1)}}function Wu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,P(t)))}function Gu(){return Vu(),Hu(),Uu(),Ku()}function Ku(){if(su!==5)return!1;var e=cu,t=du;du=0;var n=dt(uu),r=C.T,a=w.p;try{w.p=32>n?32:n,C.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,H&6)throw Error(i(331));var c=H;if(H|=4,Rl(o.current),Al(o,o.current,s,n),H=c,sd(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{w.p=a,C.T=r,Wu(e,t)}}function qu(e,t,n){t=Ti(n,t),t=nc(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(at(e,2),od(e))}function J(e,t,n){if(e.tag===3)qu(e,e,n);else for(;t!==null;){if(t.tag===3){qu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=Ti(n,e),n=rc(2),r=Ya(t,n,2),r!==null&&(ic(n,r,t,e),at(r,2),od(r));break}}t=t.return}}function Ju(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;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)||(Kl=!0,i.add(n),e=Yu.bind(null,e,t,n),t.then(e,e))}function Yu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,U===e&&(G&n)===n&&(Jl===4||Jl===3&&(G&62914560)===G&&300>Pe()-nu?!(H&2)&&Tu(e,0):Zl|=n,$l===G&&($l=0)),od(e)}function Xu(e,t){t===0&&(t=rt()),e=ui(e,t),e!==null&&(at(e,t),od(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Xu(e,n)}function $u(e,t){return Me(e,t)}var ed=null,td=null,nd=!1,rd=!1,id=!1,ad=0;function od(e){e!==td&&e.next===null&&(td===null?ed=td=e:td=td.next=e),rd=!0,nd||(nd=!0,pd())}function sd(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=ed;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-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,fd(r,a))}else a=G,a=et(r,r===U?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||tt(r,a)||(n=!0,fd(r,a));r=r.next}while(n);id=!1}}function cd(){ld()}function ld(){rd=nd=!1;var e=0;ad!==0&&Jd()&&(e=ad);for(var t=Pe(),n=null,r=ed;r!==null;){var i=r.next,a=ud(r,t);a===0?(r.next=null,n===null?ed=i:n.next=i,i===null&&(td=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}su!==0&&su!==5||sd(e,!1),ad!==0&&(ad=0)}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=nt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=U,n=G,n=et(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(K===2||K===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&D(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||tt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&D(r),dt(n)){case 2:case 8:n=Le;break;case 32:n=Re;break;case 268435456:n=Be;break;default:n=Re}return r=dd.bind(null,e),n=Me(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&D(r),e.callbackPriority=2,e.callbackNode=null,2}function dd(e,t){if(su!==0&&su!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gu()&&e.callbackNode!==n)return null;var r=G;return r=et(e,e===U?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yu(e,r,t),ud(e,Pe()),e.callbackNode!=null&&e.callbackNode===n?dd.bind(null,e):null)}function fd(e,t){if(Gu())return null;yu(e,t,!0)}function pd(){Zd(function(){H&6?Me(Ie,cd):ld()})}function md(){if(ad===0){var e=_a;e===0&&(e=Xe,Xe<<=1,!(Xe&261888)&&(Xe=256)),ad=e}return ad}function hd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:cn(``+e)}function gd(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 _d(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=hd((i[gt]||null).action),o=r.submitter;o&&(t=(t=o[gt]||null)?hd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new An(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ad!==0){var e=o?gd(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?gd(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var vd=0;vd<ti.length;vd++){var yd=ti[vd];ni(yd.toLowerCase(),`on`+(yd[0].toUpperCase()+yd.slice(1)))}ni(qr,`onAnimationEnd`),ni(Jr,`onAnimationIteration`),ni(Yr,`onAnimationStart`),ni(`dblclick`,`onDoubleClick`),ni(`focusin`,`onFocus`),ni(`focusout`,`onBlur`),ni(Xr,`onTransitionRun`),ni(Zr,`onTransitionStart`),ni(Qr,`onTransitionCancel`),ni($r,`onTransitionEnd`),Mt(`onMouseEnter`,[`mouseout`,`mouseover`]),Mt(`onMouseLeave`,[`mouseout`,`mouseover`]),Mt(`onPointerEnter`,[`pointerout`,`pointerover`]),Mt(`onPointerLeave`,[`pointerout`,`pointerover`]),jt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),jt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),jt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),jt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),jt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),jt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var bd=`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(` `),xd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(bd));function Sd(e,t){t=!!(t&4);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){ri(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){ri(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[vt];n===void 0&&(n=t[vt]=new Set);var r=e+`__bubble`;n.has(r)||(Ed(t,e,2,!1),n.add(r))}function Cd(e,t,n){var r=0;t&&(r|=4),Ed(n,e,r,t)}var wd=`_reactListening`+Math.random().toString(36).slice(2);function Td(e){if(!e[wd]){e[wd]=!0,kt.forEach(function(t){t!==`selectionchange`&&(xd.has(t)||Cd(t,!1,e),Cd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wd]||(t[wd]=!0,Cd(`selectionchange`,!1,t))}}function Ed(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!yn||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 Dd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=wt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}gn(function(){var r=a,i=dn(n),s=[];a:{var c=ei.get(e);if(c!==void 0){var l=An,u=e;switch(e){case`keypress`:if(Tn(n)===0)break a;case`keydown`:case`keyup`:l=Jn;break;case`focusin`:u=`focus`,l=zn;break;case`focusout`:u=`blur`,l=zn;break;case`beforeblur`:case`afterblur`:l=zn;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=Ln;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Rn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Xn;break;case qr:case Jr:case Yr:l=Bn;break;case $r:l=Zn;break;case`scroll`:case`scrollend`:l=Mn;break;case`wheel`:l=Qn;break;case`copy`:case`cut`:case`paste`:l=Vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Yn;break;case`toggle`:case`beforetoggle`:l=$n}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;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=_n(m,p),g!=null&&d.push(Od(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==un&&(u=n.relatedTarget||n.fromElement)&&(wt(u)||u[_t]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?wt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Ln,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Yn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Et(l),h=u==null?c:Et(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,wt(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=Ad,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&&jd(s,c,l,d,!1),u!==null&&f!==null&&jd(s,f,u,d,!0)}}a:{if(c=r?Et(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=yr;else if(pr(c))if(br)v=Dr;else{v=Tr;var y=wr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&an(r.elementType)&&(v=yr):v=Er;if(v&&=v(e,r)){mr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Xt(c,`number`,c.value)}switch(y=r?Et(r):window,e){case`focusin`:(pr(y)||y.contentEditable===`true`)&&(Lr=y,Rr=r,zr=null);break;case`focusout`:zr=Rr=Lr=null;break;case`mousedown`:Br=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Br=!1,Vr(s,n,i);break;case`selectionchange`:if(Ir)break;case`keydown`:case`keyup`:Vr(s,n,i)}var b;if(tr)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 lr?sr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(ir&&n.locale!==`ko`&&(lr||x!==`onCompositionStart`?x===`onCompositionEnd`&&lr&&(b=wn()):(xn=i,Sn=`value`in xn?xn.value:xn.textContent,lr=!0)),y=kd(r,x),0<y.length&&(x=new Hn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=cr(n),b!==null&&(x.data=b)))),(b=rr?ur(e,n):dr(e,n))&&(x=kd(r,`onBeforeInput`),0<x.length&&(y=new Hn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),_d(s,e,r,n,i)}Sd(s,t)})}function Od(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kd(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=_n(e,n),i!=null&&r.unshift(Od(e,i,a)),i=_n(e,t),i!=null&&r.push(Od(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ad(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jd(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=_n(n,a),l!=null&&o.unshift(Od(n,l,c))):i||(l=_n(n,a),l!=null&&o.push(Od(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Md=/\r\n?/g,Nd=/\u0000|\uFFFD/g;function Pd(e){return(typeof e==`string`?e:``+e).replace(Md,` 10`).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function X(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||en(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&en(e,``+r);break;case`className`:Rt(e,`class`,r);break;case`tabIndex`:Rt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Rt(e,n,r);break;case`style`:rn(e,r,o);break;case`data`:if(t!==`object`){Rt(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=cn(``+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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&X(e,t,`name`,a.name,a,null),X(e,t,`formEncType`,a.formEncType,a,null),X(e,t,`formMethod`,a.formMethod,a,null),X(e,t,`formTarget`,a.formTarget,a,null)):(X(e,t,`encType`,a.encType,a,null),X(e,t,`method`,a.method,a,null),X(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=cn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=ln);break;case`onScroll`:r!=null&&Y(`scroll`,e);break;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(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=cn(``+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`:Y(`beforetoggle`,e),Y(`toggle`,e),Lt(e,`popover`,r);break;case`xlinkActuate`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:zt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:zt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Lt(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=on.get(n)||n,Lt(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:rn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?en(e,r):(typeof r==`number`||typeof r==`bigint`)&&en(e,``+r);break;case`onScroll`:r!=null&&Y(`scroll`,e);break;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=ln);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!At.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[gt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Lt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:X(e,t,o,s,n,null)}}a&&X(e,t,`srcSet`,n.srcSet,n,null),r&&X(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:X(e,t,r,d,n,null)}}Yt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:X(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Zt(e,!!r,n,!0):Zt(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:X(e,t,s,c,n,null)}$t(e,r,a,o);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:X(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<bd.length;r++)Y(bd[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`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(i(137,t));default:X(e,t,u,r,n,null)}return;default:if(an(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&X(e,t,c,r,n,null))}function Rd(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 a=null,o=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)||X(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`:o=m;break;case`name`:a=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(i(137,t));break;default:m!==f&&X(e,t,p,m,r,f)}}Jt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||X(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&X(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Zt(e,!!n,n?[]:``,!1):Zt(e,!!n,t,!0)):Zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:X(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&X(e,t,s,a,r,o)}Qt(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:X(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:X(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)&&X(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(i(137,t));break;default:X(e,t,u,p,r,m)}return;default:if(an(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&X(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||X(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){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&&zd(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&&zd(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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Z=typeof clearTimeout==`function`?clearTimeout:void 0,Xd=typeof Promise==`function`?Promise:void 0,Zd=typeof queueMicrotask==`function`?queueMicrotask:Xd===void 0?Yd:function(e){return Xd.resolve(null).then(e).catch(Qd)};function Qd(e){setTimeout(function(){throw e})}function $d(e){return e===`head`}function ef(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),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)hf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,hf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[St]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&hf(e.ownerDocument.body);n=i}while(n);Pp(t)}function tf(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 nf(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`:nf(n),Ct(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function rf(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[St])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=uf(e.nextSibling),e===null)break}return null}function af(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=uf(e.nextSibling),e===null))return null;return e}function of(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=uf(e.nextSibling),e===null))return null;return e}function sf(e){return e.data===`$?`||e.data===`$~`}function cf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lf(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 uf(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 df=null;function ff(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return uf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pf(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 mf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function hf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ct(e)}var gf=new Map,_f=new Set;function vf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yf=w.d;w.d={f:Q,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function Q(){var e=yf.f(),t=Cu();return e||t}function bf(e){var t=Tt(e);t!==null&&t.tag===5&&t.type===`form`?js(t):yf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),Ot(t),r.head.appendChild(t)))}}function Cf(e){yf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){yf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){yf.L(e,t,n);var r=xf;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=jf(e);break;case`script`:a=Ff(e)}gf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Ld(t,`link`,e),Ot(t),r.head.appendChild(t)))}}function Ef(e,t){yf.m(e,t);var n=xf;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=Ff(e)}if(!gf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),Ot(r),n.head.appendChild(r)}}}function Df(e,t,n){yf.S(e,t,n);var r=xf;if(r&&e){var i=Dt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);Ot(c),Ld(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,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){yf.X(e,t);var n=xf;if(n&&e){var r=Dt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0},t),(t=gf.get(i))&&Bf(e,t),a=n.createElement(`script`),Ot(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){yf.M(e,t);var n=xf;if(n&&e){var r=Dt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Bf(e,t),a=n.createElement(`script`),Ot(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=ye.current)?vf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=Dt(a).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=jf(n.href);var o=Dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.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},gf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=Dt(a).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(i(444,e))}}function jf(e){return`href="`+qt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(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}),Ld(t,`link`,n),Ot(t),e.head.appendChild(t))}function Ff(e){return`[src="`+qt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(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,Ot(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ot(r),Ld(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,Ot(o),o;r=Nf(n),(a=gf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),Ot(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,Ot(a),a):(r=n,(a=gf.get(o))&&(r=m({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ot(a),Ld(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(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 zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,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[St]||a[ht]||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 Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(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 Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(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=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ot(a);return}a=t.ownerDocument||t,r=Nf(r),(i=gf.get(i))&&zf(r,i),a=a.createElement(`link`),Ot(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(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=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(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 Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.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=Yf.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 $f={$$typeof:S,Provider:null,Consumer:null,_currentValue:fe,_currentValue2:fe,_threadCount:0};function ep(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=it(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=it(0),this.hiddenUpdates=it(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 tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=hi(3,null,null,t),e.current=a,a.stateNode=e,t=ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ka(a),e}function np(e){return e?(e=pi,e):pi}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ya(e,r,t),n!==null&&(vu(n,e,t),Xa(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=ui(e,67108864);t!==null&&vu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=gu();t=ut(t);var n=ui(e,t);n!==null&&vu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=C.T;C.T=null;var a=w.p;try{w.p=2,dp(e,t,n,r)}finally{w.p=a,C.T=i}}function up(e,t,n,r){var i=C.T;C.T=null;var a=w.p;try{w.p=8,dp(e,t,n,r)}finally{w.p=a,C.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)Dd(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=Tt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=$e(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}od(a),!(H&6)&&(iu=Pe()+500,sd(0,!1))}}break;case 31:case 13:s=ui(a,2),s!==null&&vu(s,a,2),Cu(),ap(a,2)}if(a=fp(r),a===null&&Dd(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function fp(e){return e=dn(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=wt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(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 pp=e,null}function hp(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(Fe()){case Ie:return 2;case Le:return 8;case Re:case ze:return 32;case Be:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`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 wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(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=Tt(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=wt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,pt(e.priority,function(){sp(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,pt(e.priority,function(){sp(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 Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);un=r,n.target.dispatchEvent(r),un=null}else return t=Tt(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=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(mp(r||n)===null)continue;break}var a=Tt(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.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[gt]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[gt]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){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 Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;rp(n,gu(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),Cu(),t[_t]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ft();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.8`)throw Error(i(527,Rp,`19.2.8`));w.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:C,reconcilerVersion:`19.2.8`};
10if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{Ue=Bp.inject(zp),We=Bp}catch{}}e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Zs,c=Qs,l=$s,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=tp(e,1,!0,t,n??null,r,o,u,s,c,l,Fp),t.context=np(null),n=t.current,r=gu(),r=ut(r),o=Ja(r),o.callback=null,Ya(n,o,r),n=r,t.current.lanes=n,at(t,n),od(t),e[_t]=t.current,Td(e),new Lp(t)}})),Je=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=qe()}));function Ye(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`).replace(/~([~0r])/g,(e,t)=>t===`0`?`\0`:t===`r`?`�`:t)}function Xe(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var Ze=4,Qe=5;function $e(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function et(e,t,n){let r=e.substring(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.substring(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.substring(s,a);return[o?3:c?1:2,c||`_splat`,r.substring(0,i),e.substring(t+a+1,c?n:e.length)]}}return r}function tt(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=ae(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=et(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=rt(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.substring(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=rt(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.substring(m,u));let h=p?.slice();if(!r)return h;
10if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=rt(r,Qe);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=rt(r,Ze);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function nt(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function rt(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function it(e,t){let n=rt(),r=[];function i(e,t,n,a){let[o,s,c]=tt(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(nt);t.masksTree=n,t.flatCache=Xe(1e3)}function at(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=lt(e,t.masksTree);return t.flatCache.set(e,r),r}function ot(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=rt(),tt(t,{from:e},1,o),i.singleCache.set(a,o)),lt(r,o,n)}function st(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=lt(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=dt(a.route)),t.matchCache.set(r,a),a}function ct(e,t=!1){let n=rt(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&me(),i[e.id]=e,o!==0&&e.path){let t=p(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=tt(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(nt);return{processedTree:{segmentTree:n,singleCache:Xe(1e3),matchCache:Xe(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function lt(e,t,n=!1){let r=e.split(`/`),i=pt(e,r,t,n);if(!i)return null;let[a]=ut(e,r,i);return{route:i.node.route,rawParams:a}}function ut(e,t,n){let r=ft(n.node),i=n.node.data&&$e(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===Ze)break;if(u.kind===Qe){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function dt(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ft(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function pt(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!ae(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!_t(l,n))continue;if(i.parse){if(!gt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Ze&&_t(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Ze||i.kind===2)&&_t(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(gt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&ht(f,o))return n;_t(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!(r&&(_||!(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)))){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+mt(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+mt(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+mt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+mt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function mt(e,t){return 2**(e-t-1)}function ht(e,t){return e===2**(t-1)-1}function gt(e,t,n){let r,i;try{[r,i]=ut(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function _t(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ze)>(e.node.kind===Ze)||t.node.kind===Ze==(e.node.kind===Ze)&&t.node.depth>e.node.depth)))}function vt(){try{return sessionStorage}catch{return}}var yt=`tsr-scroll-restoration-v1_3`,bt=vt();
10function xt(){try{return JSON.parse(bt?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var St=xt(),Ct=`data-scroll-restoration-id`,wt=e=>e.state.__TSR_key||e.href;function Tt(e){let t=e.getAttribute(Ct);if(t)return`[${Ct}="${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 Et=!1,Dt=`window`;function Ot(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function kt(e){let t=new Set;for(let n of e){if(n===Dt)continue;let e=Ot(n);e&&t.add(e)}return t}function At(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||wt,a=new Set,o=e=>{let t=St[e]||={};for(let e of a)e===document?t[Dt]={scrollX,scrollY}:e.isConnected&&(t[Tt(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,Et=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Et||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{bt?.setItem(yt,JSON.stringify(St))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=St[d];if(e){let t=St[u];for(let n in e){if(n===Dt){if(s)continue}else{let e=Ot(n);if(!e||s&&o&&(l??=kt(o),l.has(e)))continue}t||=St[u]={},t[n]??=e[n]}}}Et=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=kt(o));let t=e&&i&&c,s=r.e?St[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Dt){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ot(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Et=!1}}))}var jt=/^(?:\s|["[{\d-]|fa|nu|tr)/,Mt=Pt(JSON.parse),Nt=Ft(JSON.stringify,JSON.parse);function Pt(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=fe(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!jt.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function Ft(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!jt.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=pe(e,r);return t?`?${t}`:``}}function It(e,t,n){let r=b(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=ce(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Lt(n,s.input({url:e})),output:({url:e})=>s.output({url:Rt(n,e)})}:s}function Lt(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 Rt(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 zt(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{v(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var Bt=`__TSR_index`,Vt=`popstate`,Ht=`beforeunload`,Ut=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Wt(e){let t=Ut.exec(e);return t?`/`+e.slice(t[0].length):e}function Gt(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>` 11\r`.includes(e)?``:encodeURIComponent(e))),Wt(e)}function Kt(e){let t=e.getLocation(),n=new Set,r=r=>
11{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=Yt(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[Bt];i=qt(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[Bt];i=qt(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,n?.ignoreBlocker??!1),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[Bt]!==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,_getBlockers:()=>e.getBlockers?.()??[]}}function qt(e,t){let n=Xt();return{...t,key:n,__TSR_key:n,[Bt]:e}}function Jt(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=t=>Gt(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Yt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Xt();t.history.replaceState({[Bt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Yt(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[Bt]-l.state[Bt],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 r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=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=``},S=Kt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ht,x,{capture:!0}),t.removeEventListener(Vt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Ht,x,{capture:!0}),t.addEventListener(Vt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Yt(e,t){let n=Gt(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Xt();t={[Bt]:0,key:e,__TSR_key:e}}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}}function Xt(){return(Math.random()+1).toString(36).substring(7)}function Zt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Qt(e){return e.pathname+e.search+e.hash}function $t(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function en(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function tn(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function nn({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function rn(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function an(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var on=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:Jt()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&b(n)?It(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=zt(this.latestLocation,e),At(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=ct(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&it(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Xe(1e3)}},this.subscribe=(e,t)=>
11{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},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:ue(e),external:!1,searchStr:o,search:ie(t?.search,i),hash:ue(r.slice(1)),state:S(t?.state,a)}}let o=Lt(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:ue(Wt(o.pathname)),external:!!this.rewrite&&Zt(o,this.origin),searchStr:c,search:ie(t?.search,s),hash:ue(o.hash.slice(1)),state:S(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=st(p(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Yt(n.href,{});n={...n,to:Lt(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=y(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[p(c)],u=c.includes(`$`),d;if(l)d=l._branch??=dt(l);else if(u)d=[];else{let[e,t,n]=this.getMatchedRoutes(c);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}let f=u?l?._interpolation??tt(!1,{fullPath:c},0):void 0,h;for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(h??=dn(n.params,e),!m(h))break;h===e&&(h=Object.assign(ee(),h));try{Object.assign(h,t(h))}catch{}}}h??=dn(n.params,fn(n.params,f)?o()[3]:pn);let g=e.leaveParams?c:Wt(ue(f?se(c,f,h,this.pathParamsDecoder):c)),_=mn(d,e._includeValidateSearch),v=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,un(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},b=_.length?hn(_,v(),n):n.search===!0?v():typeof n.search==`function`?n.search(v()):n.search||pn,x=this.options.stringifySearch(b),S=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,te=S?`#${S}`:``,re=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:pn,ie=`${g}${x}${te}`,ae,oe,ce=!1;if(this.rewrite){let e=new URL(ie,this.origin),t=e.origin,n=Rt(this.rewrite,e);ae=Qt(e),Zt(n,t)?(oe=n.href,ce=!0):oe=Wt(Qt(n))}else ae=ne(ie),oe=ae;return{publicHref:oe,href:ae,pathname:g,search:b,searchStr:x,state:re,hash:S??``,external:ce,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=at(r.pathname,this.processedTree);if(t){let i=Object.assign(ee(),t.rawParams),{from:a,params:o,...s}=t.route,c=dn(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return sn(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=p(this.latestLocation.href)===p(n.href)&&d(nn(n.state),nn(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.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={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>
11{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?re(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return sn(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await cr(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(tn(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&$t(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(oe.test(n)||(r=re(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Zt(e,this.origin)||(n=Qt(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=bn,this.preloadRoute=e=>lr(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?y(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=ot(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!d(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?d(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=u(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Nt,parseSearch:e.parseSearch??Mt,protocolAllowlist:e.protocolAllowlist??g}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=tt(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:p(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?gn(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>
11{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=un(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof cn||(r=new cn(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=ee(),_=i._interpolation?se(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{_n(i,d)}catch(e){if(x=De(e)||ge(e)?e:new ln(e.message,{cause:e}),t?.throwOnError)throw x}let te=y?`stay`:`enter`,ne;if(b)ne={...b,cause:te,search:ie(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=$t(i)?`pending`:`success`;ne={id:v,ssr:i.options.ssr,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?ie(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:te,loaderDeps:y?S(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let re=s===i.id;ne._notFound&&!re&&(ne.error=void 0),ne._notFound=re,c[n]=ne}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?ie(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=ae(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=ae(a),c={...e.search};for(let e of a)try{Object.assign(c,un(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{_n(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function sn(e,t,{replace:n,ignoreBlocker:r}){if(!le(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var cn=class extends Error{},ln=class extends Error{};function un(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new cn(`Async validation not supported`);if(n.issues)throw new cn(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 dn(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function fn(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!_.call(e,t[1]))}var pn=Object.freeze({});function mn(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=un(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function hn(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=te(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function gn(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return ke}function _n(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function vn(e,t){return e.options[t]?.preload?.()}function yn(e,t){let n=vn(e,`component`),r=vn(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function bn(e,t,n){let r=()=>t===!1?void 0:t?vn(e,t):yn(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function xn(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Sn(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0){t=Math.min(t,Math.max(n+1,r._assetEnd));continue}if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var Cn=0,wn=1,Tn=2,En=3,Dn=[4];
11function On(e){return typeof e[0]==`number`}function kn(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function An(e,t){return e.routesById[t.routeId]}function jn(e,t,n){return ge(e)?[En,e]:De(e)?(e.routeId||=n,[Tn,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[wn,e]):[Cn,e]}function Mn(e,t){let n=jn(t,!0,e.id);if(n[0]!==wn)return n;try{e.options.onError?.(n[1])}catch(t){n=jn(t,!0,e.id)}return n}function Nn(e,t,n,r,i){return i[0].signal.aborted?Dn:Yn(e,t,n,Mn(n,r),i)}async function Pn(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=An(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return In(e,r),[i,Nn(e,t,u,a,n)]}if(c.aborted)return[i,Dn];let p=r.paramsError??r.searchError;if(p!==void 0)return In(e,r),[i,Nn(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{zn(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?kn(a,c):a);if(c.aborted)return[i,Dn];let s=Yn(e,t,u,jn(o,!1,u.id),n);if(s[0]!==Cn)return In(e,r),[i,s];r.context={...r.context,...o}}catch(a){return In(e,r),[i,Nn(e,t,u,a,n)]}finally{r.status=h,zn(e,r,!1,n[0])}}i()}function Fn(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function In(e,t){let n=t._flight;t._flight=void 0,Fn(e,t,n)?.abort()}function Ln(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Fn(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Rn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function zn(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Bn(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Vn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Dn;if(!i)return[Cn,void 0];let l=n._flight;zn(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Bn(e,t,n,r,s,a,!!o[3]))).then(e=>jn(e,!1,r.id),e=>jn(e,!0,r.id)).then(t=>(t[0]!==Cn&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===wn&&l[2]?Mn(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Yn(e,t,r,await kn(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return In(e,n),Dn}finally{zn(e,n,!1,s)}}function Hn(e,t,n){t[0]!==En&&(e.status=`success`,e.error=void 0,t[0]===Cn?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Un(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&In(e,r)}function Wn(e,t){return t[0]===wn||t[0]===Tn?{...e,status:t[0]===wn?`error`:`notFound`,error:t[1],_flight:void 0}:e}function Gn(e,t,n,r,i,a,o){let s=t[1][n],c=An(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Bn(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Dn)),!p)if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>
11e.routeId===s.routeId&&e.id!==s.id)))}}catch(n){s.invalid=!0,In(e,s),p=Nn(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!!(m&&f&&s.status===`success`&&!l&&!a[4]&&((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,ee=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Fn(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let te=!p&&x?Vn(e,t,s,c,g,i,a).then(t=>(Hn(s,t,l),t[0]===Cn&&(m&&!a[0].signal.aborted&&Un(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[Cn,s.loaderData]),ne=(async()=>{try{let e=bn(c,void 0,ee);e&&await kn(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Nn(e,t,c,r,a)]}let r=await te;x&&r[0]===Cn&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,te,ne]),!y)return te.then(e=>Wn(s,e));let re={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ie=Vn(e,t,re,c,g,i,a).then(e=>(s.isFetching=!1,Hn(re,e,!1),e));return(t[2]??=[]).push([n,ie,ne,re]),ie.then(e=>Wn(re,e))}async function Kn(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=An(e,t[n]);try{let e=bn(i,!1);e&&await kn(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function qn(e,t){t[2]&&=(Ln(e,t[2].map(e=>e[3])),void 0)}async function Jn(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=En)throw[a,t];!i&&t[0]!==Cn&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===En)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Yn(e,t,n,r,i,a){for(;r[0]===En;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[En,t]:[En,t,a]}return[En,o,n]}catch(e){r=a?[wn,e]:Mn(n,e),a=!0}}return r}async function Xn(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Tn?Kn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=En)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Cn&&t[0]<En&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=En){let n=s[1];if(n[0]!==En||n[1].options.reloadDocument||n[2])return qn(e,t),n;c=!0,s=[0,[wn,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>
11{i&&(u._notFound=void 0,l===wn?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=An(e,u);try{await kn(i?Promise.resolve().then(()=>bn(m,l===wn?`errorComponent`:`notFoundComponent`)):Promise.all([bn(m),bn(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return qn(e,t),Dn}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),qn(e,t),Ln(e,o),p()):u.status=`success`}return t}async function Zn(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=An(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await kn(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Qn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await Kn(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=Gn(e,i,t,u,f,r,l)},m=await Pn(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Tn){let t=await Kn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=En&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Xn(e,i,u,r[0],Jn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Jn(i[2],void 0,void 0,h.then(e=>On(e)?0:xn(n).length,()=>0))),o=await h}catch(t){if(qn(e,i),t===a&&a.aborted)return Dn;throw t}return On(o)?o:Zn(e,o,a,r[6]===n.length?r[6]:0)}function $n(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=An(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>$n(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function er(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function tr(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!xn(t[3]).some(e=>e.id===n[1]))return;let i;try{await kn(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function nr(e,t){e._committed=t,e.stores.setMatches(t)}function rr(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=xn(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=An(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=rn(n);nr(e,n),Ln(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),an(e,i,n,a,l,t)}async function ir(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function ar(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function or(e,t,n,r,i){let a=n.map(e=>({...e}));Rn(a);for(let t of r)In(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Xn(e,o,r,t[0],i)}catch(t){throw Ln(e,a),t}if(On(s)){Ln(e,a),s[0]===En&&e._tx===t&&e._committed===n&&await ar(e,t,s);return}if(await Zn(e,s,t[0].signal),e._tx!==t||e._committed!==n){Ln(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),In(e,n))}nr(e,a),Ln(e,n,a)}async function sr(e,t,n,r,i,a){let o=await Qn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(On(o)){let n=o[0]===En&&e._tx===t;if((!n||o[1].options.reloadDocument)&&er(e,t),Ln(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){er(e,t);return}await ar(e,t,o);return}let s=o[1];if(e._tx===t&&await tr(e,t),e._tx!==t){er(e,t),Ln(e,s),qn(e,o);return}let c=t[2],l=tn(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>
11{if(e._tx===t&&await tr(e,t),e._tx!==t){er(e,t),Ln(e,s),qn(e,o);return}let n=await e.startTransition(()=>{er(e,t),rr(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){qn(e,o);return}u?.length&&or(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function cr(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=tn(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await ir(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Rn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Ln(e,m),await ir(e,n);return}e._preflight=void 0;let g,_=()=>sr(e,y,f,()=>$n(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>ir(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&zn(e,t,!1)}n[0].abort(),Ln(e,n[3],y[3],!0)}if(e._tx!==y){Ln(e,y[3]),y[3]=[],g?.(),await ir(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&$n(e,y),g?.(_()),await y[5]}async function lr(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Rn(a),o=(e._preloads??=new Map).set(i,a),s=await Qn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Ln(e,a)),i.abort()}if(!On(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){De(e)||console.error(e);return}}}async function ur(e){let t=window.$_TSR,n=e.options.serializationAdapters;n?.length&&(t.t=new Map(n.map(e=>[e.key,e.fromSerializable])),t.buffer.forEach(e=>e())),t.initialized=!0;let r=t.router;e.ssr={manifest:r.manifest},e.options.ssr={nonce:document.querySelector(`meta[property="csp-nonce"]`)?.content};let i=r.matches,a=new AbortController,o=e._preflight;e._preflight=a,o?.abort();let s=()=>e._preflight===a,c,l,u,d;try{if(await kn(e.options.hydrate?.(r.dehydratedData),a.signal),!s())return;let t=e.history.location;u=t.href,d=t.state,e.updateLatestLocation(),c=e.latestLocation,e.stores.location.set(c),l=e.matchRoutes(c,{_controller:a})}catch(t){if(s()&&(e._preflight=void 0),a.abort(t),t!==a.signal)throw t}if(!s())return;let f=[],p,m=0,h=t=>{m=Math.min(m,t+1);let n=f.splice(t);for(let t of n)An(e,t).options.loader&&(t.status===`success`||!t.invalid&&`loaderData`in t)&&Un(e,{...t,status:`success`,error:void 0,preload:!0},e._cache.get(t.id));Ln(e,n)},g=i.length>l.length?l.findIndex(e=>e._notFound)+1:i.length,_=!1;for(let t=0;t<g;t++){let n=l[t],r=i[t];if(typeof r.i!=`string`||Ye(r.i)!==n.id){p??=t;break}m=t+1;let a=An(e,n);if((`l`in r||r.s===`success`&&r.e===void 0&&a.options.loader)&&(n.loaderData=r.l),n.status=r.s,n.ssr=r.ssr,a.options.ssr=n.ssr,n.updatedAt=r.u,n.error=r.e,n._notFound||=r.g,n.status===`error`||n.status===`notFound`||n._notFound){_=!0,f.push(n),(n.ssr===!1||n.ssr===`data-only`)&&(p??=t);break}if(n.status===`pending`){p??=t;break}f.push(n),n.ssr===`data-only`&&(p??=t)}!_&&f.length===g&&g<l.length&&(p=g);let v=f.map(async t=>{try{let n=An(e,t);return await(t._notFound?Promise.all([bn(n),bn(n,`notFoundComponent`)]):bn(n,t.status===`error`?`errorComponent`:t.status===`notFound`?`notFoundComponent`:void 0)),!0}catch{return!1}}),y=0;try{for(;y<v.length&&await kn(v[y],a.signal);)y++}catch{return}if(!s())return;y<f.length&&h(y);let b=Math.max(p===f.length?f.length+1:f.length,y<v.length?y:m);for(let t=0;t<b;t++){let n=l[t],r=An(e,n),o=l[t-1]?.context??e.options.context??{},u;if(r.options.context){try{u=n._ctx=r.options.context({deps:n.loaderDeps,params:n.params,context:o,location:c,navigate:t=>e.navigate({...t,_fromLocation:c}),buildLocation:e.buildLocation,cause:n.cause,abortController:a,preload:!1,matches:l,routeId:r.id})||{}}catch{if(!s())return;if(n.status!==`error`&&n.status!==`notFound`&&!n._notFound){p=Math.min(p??t,t),h(t);break}}if(!s())return}n.context={...o,...u,...f[t]&&i[t].b}}if(await Zn(e,[c,l],a.signal,0,m),!s())return;let x=p!==void 0||f.length<g,S=_&&f.length===g?l:f,ee=x?l:S,te;if(x&&p!==void 0){let e=ee[p];te=e.ssr===`data-only`&&m>p+1?m:void 0,ee=ee.slice(),ee[p]={...e,status:`pending`,ssr:e.ssr===`data-only`&&`data-only`,_assetEnd:te}}let ne=()=>{let t=e.history.location;return x&&!e._tx&&t.href===u&&t.state===d&&e._committed===S&&S.length&&!a.signal.aborted?a:void 0},re=[ne,t=>{if(e._handoff!==re)return;e._handoff=void 0;let n=S.length;if(!t||!ne()||S.some((e,n)=>e.id!==t[n]?.id)){a.abort();return}let r=te;if(r!==void 0){for(let e=n;e<r;e++)if(l[e]?.id!==t[e]?.id){r=e>p+1?e:void 0;break}}let i=S.map(e=>({...e}));r!==void 0&&(i[p]._assetEnd=r),Ln(e,t.splice(0,n,...i));for(let e=n;e<t.length;e++){let n=t[e],r=l[e];r?.id===n.id&&r._ctx&&(n._ctx=r._ctx),n.abortController=a}return n}];e._committed=S,e._lifecycleEnd=rn(S),e._handoff=re,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(ee),e.stores.status.set(`idle`),x||e.stores.resolvedLocation.set(e.stores.location.get())})}var dr=Symbol.for(`TSR_DEFERRED_PROMISE`);function fr(e,t){let n=e;return n[dr]?n:(n[dr]={status:`pending`},n.then(e=>{n[dr].status=`success`,n[dr].data=e}).catch(e=>
11{n[dr].status=`error`,n[dr].error={data:(t?.serializeError??en)(e),__isServerError:!0}}),n)}function pr(e,t){if(e)return typeof e==`string`?e:e[t]}function mr(e){return e?.scriptFormat??`module`}function hr(e,t,n){let r=gr(t),i=pr(n,`script`)??r.crossOrigin;return{...mr(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function gr(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function _r(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 vr(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function yr(e,t,n,r){let i=Sn(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function br([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}function xr(e){return e}var Sr=xr({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(de in e)?!1:!!e[de],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>he(e)}),A=r(s(),1),j=a();function Cr({promise:e}){if(Me)return Me(e);let t=fr(e);if(t[dr].status===`pending`)throw t;if(t[dr].status===`error`)throw t[dr].error;return t[dr].data}function wr(e){let t=(0,j.jsx)(Tr,{...e});return e.fallback?(0,j.jsx)(A.Suspense,{fallback:e.fallback,children:t}):t}function Tr(e){let t=Cr(e);return e.children(t)}var Er=class extends A.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?A.createElement(this.props.errorComponent??Dr,{error:e[0],reset:this.reset}):this.props.children}};function Dr({error:e}){let[t,n]=A.useState(!1);return(0,j.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,j.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,j.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,j.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,j.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,j.jsx)(`div`,{children:(0,j.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,j.jsx)(`code`,{children:e.message}):null})}):null]})}function Or({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}}function kr(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 Ar=[],jr=0,{link:Mr,unlink:Nr,propagate:Pr,checkDirty:Fr,shallowPropagate:Ir}=Or({update(e){return e._update()},notify(e){Ar[Rr++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Hr(e))}}),Lr=0,Rr=0,zr,Br=0;function Vr(e){try{++Br,e()}finally{--Br||Ur()}}function Hr(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Nr(n,e)}function Ur(){if(!(Br>0)){for(;Lr<Rr;){let e=Ar[Lr];Ar[Lr++]=void 0,e.notify()}Lr=0,Rr=0}}function Wr(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,get(){return zr!==void 0&&Mr(i,zr,jr),i._snapshot},subscribe(e){let t=kr(e),n={current:!1},r=Gr(()=>{i.get(),n.current?(zr=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=zr,o=t?.compare??Object.is;if(n)zr=i,++jr,i.depsTail=void 0;else if(e===void 0)return!1;
11n&&(i.flags=5);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{zr=a,n&&(i.flags&=-5),Hr(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&Fr(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ir(e)}}else e&32&&(i.flags=e&-33);return zr!==void 0&&Mr(i,zr,jr),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Pr(e),Ir(e),Ur())}},i}function Gr(e){let t=()=>{let t=zr;zr=n,++jr,n.depsTail=void 0,n.flags=6;try{return e()}finally{zr=t,n.flags&=-5,Hr(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&Fr(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Hr(this)}};return t(),n}function Kr(e){let t=i(),n=`not-found-${c(t.stores.location,e=>e.pathname)}-${c(t.stores.status)}`;return(0,j.jsx)(Er,{getResetKey:()=>n,onCatch:(t,n)=>{if(De(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(De(t))return e.fallback?.(t);throw t},children:e.children})}function qr(){return(0,j.jsx)(`p`,{children:`Not Found`})}function Jr(e,t,n){return t.options.notFoundComponent?(0,j.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,j.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,j.jsx)(qr,{})}function Yr(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,j.jsx)(n,{}):null}var Xr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Zr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Qr=A.memo(function({routeId:e}){let t=i();return(0,j.jsx)($r,{router:t,match:c(t.stores.getMatchStore(e))})});function $r({router:e,match:t}){let r=e.routesById[t.routeId],i=Yr(e,r),a=r.options.errorComponent??e.options.defaultErrorComponent,o=r.options.onCatch??e.options.defaultOnCatch,s=r.isRoot?r.options.notFoundComponent??e.options.notFoundRoute?.options.component:r.options.notFoundComponent,c=t.ssr===!1||t.ssr===`data-only`,l=Zr(e,r,t.ssr)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||c)),u=(0,j.jsx)(ei,{match:t});c&&(u=(0,j.jsx)(n,{fallback:i,children:u})),s&&(u=(0,j.jsx)(Kr,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return A.createElement(s,e)},children:u})),a&&(u=(0,j.jsx)(Er,{getResetKey:()=>t,errorComponent:a,onCatch:(e,n)=>{if(De(e))throw e.routeId??=t.routeId,e;o?.(e,n)},children:u})),l&&(u=(0,j.jsx)(A.Suspense,{fallback:i,children:u}));let d=r.isRoot?r.options.shellComponent:void 0;return(0,j.jsx)(Oe.Provider,{value:t.routeId,children:d?(0,j.jsxs)(d,{children:[u,null]}):(0,j.jsxs)(j.Fragment,{children:[u,null]})})}var ei=A.memo(function({match:e}){let t=i(),n=e.routeId,r=t.routesById[n],a=A.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),o=A.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,j.jsx)(e,{},a):(0,j.jsx)(ti,{})},[a,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Zr(t,r,e.ssr))return o;if(t._tx)throw t._tx[5];return Yr(t,r)}if(e.status===`notFound`)return Jr(t,r,e.error);if(e.status===`error`)throw e.error;return o}),ti=A.memo(function(){let e=i(),t=A.useContext(Oe),n,r,a;{let i=e.stores.getMatchStore(t);[n,r]=c(i,e=>[!!e._notFound,e.error],{compare:Xr}),a=c(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Jr(e,e.routesById[t],r);if(!a)return null;let o=(0,j.jsx)(Qr,{routeId:a});return t===`__root__`?(0,j.jsx)(A.Suspense,{fallback:Yr(e),children:o}):o});function ni(e,t){let n=e[1];e.length=0,n?.(t)}function ri({t:e}){let t=i(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{ni(n,!1),n.push(i,a),e(t),A.startTransition(r)}),Ne(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(p(r.publicHref)!==p(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...tn(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ii(){let e=i(),t=e.routesById[ke],n=Yr(e,t),r=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ri,{t:A.useState()[1]}),e.ssr?(0,j.jsx)(ai,{}):(0,j.jsx)(A.Suspense,{fallback:n,children:(0,j.jsx)(ai,{})})]});return e.options.InnerWrap?(0,j.jsx)(e.options.InnerWrap,{children:r}):r}function ai(){let e=i(),t=e._rendered,n=c(e.stores.matches,e=>t[0]??e),r=n[0],a=r?.routeId;Ne(()=>{t[0]===n&&ni(t,!0)},[t,n]);let o=a?(0,j.jsx)(Qr,{routeId:a}):null;return e.options.disableGlobalCatchBoundary?o:(0,j.jsx)(Er,{getResetKey:()=>r,onCatch:void 0,children:o})}var oi=e=>({createMutableStore:Wr,createReadonlyStore:Wr,batch:Vr}),si=e=>new ci(e),ci=class extends on{constructor(e){super(e,oi)}};function li({router:e,children:t,...n}
11){m(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,j.jsx)(o.Provider,{value:e,children:t});return e.options.Wrap?(0,j.jsx)(e.options.Wrap,{children:r}):r}function ui({router:e,...t}){return(0,j.jsx)(li,{router:e,...t,children:(0,j.jsx)(ii,{})})}function di(e){let t=i({warn:e?.router===void 0}),n=e?.router||t;return c(n.stores.__store,Ae(e,n))}function fi(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 pi(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=A.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,j.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,j.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,j.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,j.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,j.jsx)(mi,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function mi({attrs:t,children:n,preventScriptHoist:r}){i();let a=e(),o=A.useMemo(()=>n===void 0?void 0:{__html:n},[n]),s=typeof t?.type==`string`&&t.type!==``&&t.type!==`text/javascript`&&t.type!==`module`;if(A.useEffect(()=>{if(!s){if(t?.src){let e=document.createElement(`a`);e.href=t.src;let n=e.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return fi(r,t),document.head.appendChild(r),()=>r.remove()}if(typeof n==`string`){let e=typeof t?.type==`string`?t.type:`text/javascript`,r=typeof t?.nonce==`string`?t.nonce:void 0;for(let t of document.scripts){if(t.hasAttribute(`src`))continue;let i=t.getAttribute(`type`)??`text/javascript`,a=t.getAttribute(`nonce`)??void 0;if(t.textContent===n&&i===e&&a===r)return}let i=document.createElement(`script`);return i.textContent=n,fi(i,t),document.head.appendChild(i),()=>i.remove()}}},[t,n,s]),s&&typeof n==`string`)return(0,j.jsx)(`script`,{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:o});if(!a){if(t?.src)return(0,j.jsx)(`script`,{...t,suppressHydrationWarning:!0});if(typeof n==`string`)return(0,j.jsx)(`script`,{...t,dangerouslySetInnerHTML:o,suppressHydrationWarning:!0})}return null}function hi(e,t,n,r){n=Sn(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r)if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:h(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),l=e.ssr?.manifest,u=[];l&&(n.forEach(e=>{(l.routes[e.routeId]?.css)?.forEach(e=>{let n=vr(e);u.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:pr(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),l.inlineStyle&&u.push({tag:`style`,attrs:{...l.inlineStyle.attrs,nonce:t},children:l.inlineStyle.children,inlineCss:!0}));let d=[];l&&n.forEach(e=>{l.routes[e.routeId]?.preloads?.forEach(e=>{d.push({tag:`link`,attrs:{...hr(l,e,r),nonce:t}})})});let f=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),p=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),m=[];return _r(m,a),m.push(...d),_r(m,c),m.push(...u),_r(m,f),_r(m,p),m}var gi=e=>{let t=i(),n=t.options.ssr?.nonce,r=A.useCallback(r=>hi(t,n,r,e),[e,n,t]);return c(t.stores.matches,r,{compare:d})};function _i(e){let t=gi(e.assetCrossOrigin),n=i().options.ssr?.nonce;return(0,j.jsx)(j.Fragment,{children:t.map(e=>(0,A.createElement)(pi,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var vi={suppressHydrationWarning:!0},yi=()=>{let e=i(),t=e.options.ssr?.nonce,n=n=>{let r=yr(n,e.ssr?.manifest,t,vi);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return bi(c(e.stores.matches,e=>br(n(e)),{compare:d}))};function bi(e){return(0,j.jsx)(j.Fragment,{children:e.map((e,t)=>(0,A.createElement)(pi,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var xi=(e,t)=>{let n={type:`request`,...t||e},r=e=>xi({},Object.assign(n,{validator:e,inputValidator:e}));return{options:n,middleware:e=>xi({},Object.assign(n,{middleware:e})),validator:r,inputValidator:r,client:e=>xi({},Object.assign(n,{client:e})),server:e=>xi({},Object.assign(n,{server:e}))}};function Si(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Si(e,r.extends))}}var Ci=e=>({getOptions:async()=>{let t=await e();if(t.serializationAdapters){let e=new Set;Si(e,t.serializationAdapters),t.serializationAdapters=Array.from(e)}return t},createMiddleware:xi}),wi=Symbol.for(`@supabase/supabase-js.traceContextExtractor`);function Ti(){return globalThis[wi]}var Ei=function(){return Ei=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},Ei.apply(this,arguments)};function Di(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 Oi(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 ki(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;
vendor: 18,990 bytes, line 11
11r++)(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 Ai=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),ji=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}}},Mi=class extends ji{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},Ni=class extends ji{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},Pi=class extends ji{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},Fi;(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`})(Fi||={});var Ii=class{constructor(e,{headers:t={},customFetch:n,region:r=Fi.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=Ai(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Oi(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 Mi(e)}),_=g.headers.get(`x-relay-error`);if(_&&_===`true`)throw new Ni(g);if(!g.ok)throw new Pi(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 Pi||e instanceof Ni?e.context:void 0}}finally{r&&clearTimeout(r),a&&((n=t.signal)==null||n.removeEventListener(`abort`,a))}})}},Li=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}}},Ri=3,zi=e=>Math.min(1e3*2**e,3e4),Bi=[520,503],M=[`GET`,`HEAD`,`OPTIONS`];function N(e){"@babel/helpers - typeof";return N=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},N(e)}function Vi(e,t){if(N(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(N(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Hi(e){var t=Vi(e,`string`);return N(t)==`symbol`?t:t+``}function Ui(e,t,n){return(t=Hi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wi(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 Gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Wi(Object(n),!0).forEach(function(t){Ui(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ki(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 qi(e,t,n,r){return!(!r||n>=Ri||!M.includes(e)||!Bi.includes(t))}async function Ji(e,t,n,r){let i=0;for(;;){let a=Gi({},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`||!M.includes(n.method))throw e;if(r&&i<Ri){let e=zi(i);i++,await Ki(e,n.signal);continue}throw e}if(qi(n.method,o.status,i,r)){let e=o.headers?.get(`Retry-After`)??null,t=e===null?zi(i):Math.max(0,parseInt(e,10)||0)*1e3;await o.text(),i++,await Ki(t,n.signal);continue}return o}}var Yi=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,this.fetch=e.fetch?e.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 Ji(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 Li({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 Li(Gi(Gi({},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 Li(n)}return{success:n===null,error:n,data:r,count:i,status:a,statusText:o}}returns(){return this}overrideTypes(){return this}},Xi=class extends Yi{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}},Zi=RegExp(`[,()]`),Qi=class extends Xi{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`&&Zi.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`&&Zi.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}},$i=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 Qi({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 Qi({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 Qi({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 Qi({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 Qi({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function ea(e,t){try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return new Li({message:String(t.message??e),details:t.details??``,hint:t.hint??``,code:t.code??``})}catch{}return new Li({message:e||t,details:``,hint:``,code:``})}function ta(e,t,n){let r=e;return{success:!1,error:new Li({message:`${r?.name??`FetchError`}: ${r?.message}`,details:``,hint:``,code:``}),data:null,count:null,status:t,statusText:n}}var na=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;this.fetch=i!==void 0&&i>0?(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,Gi(Gi({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return s(e,Gi(Gi({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}: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 $i(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 Ji(r,`${e.url}/`,{method:`GET`,headers:n},e.retry??!0)}catch(e){return ta(e,0,``)}let a;try{a=await i.text()}catch(e){return ta(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:ea(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}
11`]).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 Qi({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}},ra=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}}},ia=`realtime-js/2.117.2`,aa=`1.0.0`,oa=`2.0.0`,sa=oa,ca=1e4,la=15e3,ua=1e4,da={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},fa={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`,access_token:`access_token`},pa={connecting:`connecting`,open:`open`,closing:`closing`,closed:`closed`},ma=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)))}},P;(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`})(P||={});var ha=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=ga(i,e,t,r),n),{}):{}},ga=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?_a(i,a):va(a)},_a=(e,t)=>{if(e.charAt(0)===`_`)return Sa(t,e.slice(1,e.length));switch(e){case P.bool:return ya(t);case P.float4:case P.float8:case P.int2:case P.int4:case P.int8:case P.numeric:case P.oid:return ba(t);case P.json:case P.jsonb:return xa(t);case P.timestamp:return Ca(t);case P.abstime:case P.date:case P.daterange:case P.int4range:case P.int8range:case P.money:case P.reltime:case P.text:case P.time:case P.timestamptz:case P.timetz:case P.tsrange:case P.tstzrange:return va(t);default:return va(t)}},va=e=>e,ya=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},ba=e=>{if(typeof e==`string`){let t=parseFloat(e);
vendor: 19,250 bytes, lines 11-12
11if(!Number.isNaN(t))return t}return e},xa=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},Sa=(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=>_a(t,e))}return e},Ca=e=>typeof e==`string`?e.replace(` `,`T`):e,wa=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},Ta=e=>typeof e==`function`?e:function(){return e},Ea=typeof self<`u`?self:null,Da=typeof window<`u`?window:null,Oa=Ea||Da||globalThis,ka=`2.0.0`,Aa=1e4,ja=1e3,Ma=100,Na={connecting:0,open:1,closing:2,closed:3},Pa={closed:`closed`,errored:`errored`,joined:`joined`,joining:`joining`,leaving:`leaving`},Fa={close:`phx_close`,error:`phx_error`,join:`phx_join`,reply:`phx_reply`,leave:`phx_leave`},Ia={longpoll:`longpoll`,websocket:`websocket`},La={complete:4},Ra=`base64url.bearer.phx.`,za=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})}},Ba=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))}},Va=class{constructor(e,t,n){this.state=Pa.closed,this.topic=e,this.params=Ta(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new za(this,Fa.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new Ba(()=>{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=Pa.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive(`error`,e=>{this.state=Pa.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=Pa.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=Pa.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 za(this,Fa.leave,Ta({}),this.timeout).send(),this.state=Pa.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Fa.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=Pa.closed,this.bindings=[]}onClose(e){this.on(Fa.close,e)}onError(e){return this.on(Fa.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 za(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=Pa.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log(`channel`,`leave ${this.topic}`),this.trigger(Fa.close,`leave`)},n=new za(this,Fa.leave,Ta({}),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=Pa.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===Pa.closed}isErrored(){return this.state===Pa.errored}isJoined(){return this.state===Pa.joined}isJoining(){return this.state===Pa.joining}isLeaving(){return this.state===Pa.leaving}},Ha=class{static request(e,t,n,r,i,a,o){if(Oa.XDomainRequest){let n=new Oa.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}if(Oa.XMLHttpRequest){let s=new Oa.XMLHttpRequest;return this.xhrRequest(s,e,t,n,r,i,a,o)}if(Oa.fetch&&Oa.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);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),Oa.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===La.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)}`}},Ua=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)},Wa=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(Ra)&&(this.authToken=atob(t[1].slice(Ra.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=Na.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace(`ws://`,`http://`).replace(`wss://`,`https://`).replace(RegExp(`(.*)/`+Ia.websocket),`$1/`+Ia.longpoll)}endpointURL(){return Ha.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Na.connecting}ontimeout(){this.onerror(`timeout`),this.closeAndRetry(1005,`timeout`,!1)}isActive(){return this.readyState===Na.open||this.readyState===Na.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=Na.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=Ua(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+Ma,r=e.slice(t,n);this.ajax(`POST`,{"Content-Type":`application/x-ndjson`},r.join(` 12`),()=>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=Na.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=Ha.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)}},Ga=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))}},Ka={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:Fa.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)}}},qa=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||Aa,this.transport=t.transport||Oa.WebSocket||Wa,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Oa&&Oa.sessionStorage}catch{}this.sessionStore=t.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=Ka.encode.bind(Ka),this.defaultDecoder=Ka.decode.bind(Ka),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===Wa?(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder):(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder);let r=null;Da&&Da.addEventListener&&(Da.addEventListener(`pagehide`,e=>{this.conn&&(this.disconnect(),r=this.connectClock)}),Da.addEventListener(`pageshow`,e=>{r===this.connectClock&&(r=null,this.connect())}),Da.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=Ta(t.params||{}),this.endPoint=`${e}/${Ia.websocket}`,this.vsn=t.vsn||ka,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new Ba(()=>{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&&Ta(t.authToken)}getLongPollTransport(){return Wa}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=Ha.appendParams(Ha.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=Ta(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Wa?this.connectWithF
vendor: 4,375 bytes, line 12
12allback(Wa,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 Wa:return`LongPoll`;default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=[`phoenix`,`${Ra}${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,o=this.transportName(e),s=t=>{this.log(`transport`,`falling back to ${o}...`,t),this.off([i,a]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return s(`memorized`);this.fallbackTimer=setTimeout(s,t),a=this.onError(e=>{this.log(`transport`,`error`,e),r&&!n&&(clearTimeout(this.fallbackTimer),s(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(s,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(),ja,`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===Na.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)}
vendor: 11,846 bytes, line 12
12triggerChanError(e){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Fa.error,e)})}connectionState(){switch(this.conn&&this.conn.readyState){case Na.connecting:return`connecting`;case Na.open:return`open`;case Na.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 Va(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 this.ref=e===this.ref?0: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())}},Ja=class e{constructor(t,n){let r=Za(n);this.presence=new Ga(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=Xa(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return t[n]=Ya(r),t},{})}static onJoinPayload(e,t,n){return{event:`join`,key:e,currentPresences:Qa(t),newPresences:Ya(n)}}static onLeavePayload(e,t,n){return{event:`leave`,key:e,currentPresences:Qa(t),leftPresences:Ya(n)}}};function Ya(e){return e.metas.map(e=>{let t=Object.getOwnPropertyDescriptors(e),n=Object.defineProperties({},t);return n.presence_ref=n.phx_ref,delete n.phx_ref,delete n.phx_ref_prev,n})}function Xa(e){return JSON.parse(JSON.stringify(e))}function Za(e){return e?.events&&{events:e.events}}function Qa(e){return e?.metas?Ya(e):[]}var $a;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})($a||={});var eo=class{get state(){return this.presenceAdapter.state}constructor(e,t){this.channel=e,this.presenceAdapter=new Ja(this.channel.channelAdapter,t)}};function to(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 no=class{constructor(e,t,n){let r=ro(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===da.joined}isJoined(){return this.state===da.joined}isJoining(){return this.state===da.joining}isClosed(){return this.state===da.closed}isLeaving(){return this.state===da.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}};function ro(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},e.config)}}var io=/[,()"\\]/,ao=e=>io.test(e)||e!==e.trim(),oo=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`,so=e=>{let t=e===null?`null`:String(e);return ao(t)?oo(t):t},co=e=>e===null?`null`:String(e),lo=(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=>so(e)).join(`,`)})`}return e===`is`?`is.${co(t)}`:`${e}.${so(t)}`},uo=class{constructor(){this.filters=[]}add(e,t,n,r=!1){let i=r?`not.`:``;return this.filters.push(`${e}=${i}${lo(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()}},fo;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(fo||={});var po;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(po||={});var mo;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(mo||={});var ho=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 no(this.socket.socketAdapter,e,this.params),this.presence=new eo(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=wa(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[po.PRESENCE]&&this.bindings[po.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?.(mo.CHANNEL_ERROR,to(t))}),this._onClose(()=>e?.(mo.CLOSED)),this.updateJoinPayload(Object.assign({config:l},c)),this._updateFilterMessage();let u=a?.wait&&o.length>0?Math.max(t,(a.timeout??la)+ua):t;this.channelAdapter.subscribe(u).receive(`ok`,async({postgres_changes:t})=>{if(this.socket._isManualToken()||this.socket.setAuth(),t===void 0){e?.(mo.SUBSCRIBED);return}this._updatePostgresBindings(t,e)}).receive(`error`,t=>{this.state=da.errored;let n=Object.values(t).join(`, `)||`error`;e?.(mo.CHANNEL_ERROR,Error(n,{cause:t}))}).receive(`timeout`,()=>{e?.(mo.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=da.errored,n?.(mo.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,this.state!=da.errored&&n&&n(mo.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===po.PRESENCE||e===po.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
12ime-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`}}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 uo||typeof a==`object`&&a&&typeof a.build==`function`)&&(n=Object.assign(Object.assign({},n),{filter:a.build()})),i===po.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()}return i.type.toLocaleLowerCase()===r})}_notThisChannelEvent(e,t){let{close:n,error:r,leave:i,join:a}=fa;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=ha(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=ha(e.columns,e.old_record)),t}},go=class{constructor(e,t){this.socket=new qa(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()==pa.connecting}isDisconnecting(){return this.socket.connectionState()==pa.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}},_o={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},vo=[1e3,2e3,5e3,1e4],F=1e4;function I(){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 yo(){try{if(typeof globalThis<`u`&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return I()}var bo=` 13 addEventListener("message", (e) => { 14 if (e.data.event === "start") { 15 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 16 } 17 });`,xo=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={}
17,this.ref=0,this.serializer=new ma,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 go(e,n),this.httpEndpoint=wa(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()||pa.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 ho(`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}
17this._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:ia};e.updateJoinPayload(t),e.joinedOnce&&e.channelAdapter.isJoined()&&e.channelAdapter.push(fa.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([bo],{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??ca,t.heartbeatIntervalMs=e?.heartbeatIntervalMs??_o.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=e?.disconnectOnEmptyChannelsAfterMs??2*(e?.heartbeatIntervalMs??_o.HEARTBEAT_INTERVAL),t.transport=e?.transport??ra.getWebSocketConstructor(),t.params=e?.params,t.logger=e?.logger,t.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),t.sessionStorage=e?.sessionStorage??yo(),t.reconnectAfterMs=e?.reconnectAfterMs??(e=>vo[e-1]||F);let n,r,i=e?.vsn??sa;switch(i){case aa:n=(e,t)=>t(JSON.stringify(e)),r=(e,t)=>t(JSON.parse(e));break;case oa: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 17
17,So=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 Co(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 wo(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 To(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=Co(e.baseUrl,r,i),c=await wo(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 So(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 Eo(e){return e.join(`�`)}var Do=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:Eo(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/${Eo(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Eo(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Eo(e.namespace)}`}),!0}catch(e){if(e instanceof So&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof So&&e.status===409)return;throw e}}};function Oo(e){return e.join(`�`)}var ko=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/${Oo(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/${Oo(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/${Oo(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/${Oo(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/${Oo(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/${Oo(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof So&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof So&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},Ao=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`);let n=e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`;this.client=To({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new Do(this.client,t),this.tableOps=new ko(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)}
17async 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 jo(e){"@babel/helpers - typeof";return jo=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},jo(e)}function Mo(e,t){if(jo(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(jo(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function No(e){var t=Mo(e,`string`);return jo(t)==`symbol`?t:t+``}function Po(e,t,n){return(t=No(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fo(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 L(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fo(Object(n),!0).forEach(function(t){Po(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var R=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 Io(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var Lo=class extends R{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 L(L({},super.toJSON()),{},{code:this.code})}},Ro=class extends R{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}};function zo(e,t,n){let r=L({},e),i=t.toLowerCase();for(let e of Object.keys(r))e.toLowerCase()===i&&delete r[e];return r[i]=n,r}function Bo(e){let t={};for(let[n,r]of Object.entries(e))t[n.toLowerCase()]=r;return t}var Vo=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Ho=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)},Uo=e=>{if(Array.isArray(e))return e.map(e=>Uo(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]=Uo(n)}),t},Wo=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Go=e=>e.split(`/`).map(encodeURIComponent).join(`/`),Ko=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)},qo=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 Lo(Ko(e),i,n,r,e?.code))}).catch(()=>{let e=i+``;t(new Lo(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new Ro(Ko(e),e,r))},Jo=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};if(e===`GET`||e===`HEAD`||!r)return L(L({},i),n);if(Ho(r)){let e=t?.headers||{},n;for(let[t,r]of Object.entries(e))t.toLowerCase()===`content-type`&&(n=r);i.headers=zo(e,`Content-Type`,n??`application/json`),i.body=JSON.stringify(r)}else i.body=r;return t?.duplex&&(i.duplex=t.duplex),L(L({},i),n)};async function Yo(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,Jo(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=>qo(e,c,r,o))})}function Xo(e=`storage`){return{get:async(t,n,r,i)=>Yo(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>Yo(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>Yo(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>Yo(t,`HEAD`,n,L(L({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>Yo(t,`DELETE`,n,i,a,r,e)}}var{get:Zo,post:Qo,put:$o,head:es,remove:ts}=Xo(`storage`),ns=Xo(`vectors`),rs=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=Bo(t),this.fetch=Vo(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=zo(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(Io(e))return{data:null,error:e};throw e}}},is=Symbol.toStringTag,as=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[is]=`StreamDownloadBuilder`,this.promise=null}
17then(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(Io(t))return{data:null,error:t};throw t}}},os=Symbol.toStringTag,ss=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[os]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new as(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(Io(t))return{data:null,error:t};throw t}}},cs={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},ls={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},us=class extends rs{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=L(L({},ls),r),s=L(L({},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=zo(s,e,t);let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?$o:Qo)(i.fetch,`${i.url}/object/${u}`,a,L({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=L(L({},ls),r),o=L(L({},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=zo(o,e,t);return{path:a,fullPath:(await $o(i.fetch,s.toString(),e,L({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=L({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await Qo(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 R(`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 Qo(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
17stinationBucket:n?.destinationBucket,sourceVersionId:n?.sourceVersionId},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Qo(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 Qo(r.fetch,`${r.url}/object/sign/${i}`,L(L({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 Qo(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=>L(L({},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 ss(()=>Zo(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()=>Uo(await Zo(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 es(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Io(e)){let t=e instanceof Lo?e.status:e instanceof Ro?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 ts(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=Go(r._getFinalPath(e)),a=new URLSearchParams;t?.transformations&&a.set(`transformations`,`true`);let o=a.toString();return await ts(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?L(L({},cs.sortBy),t.sortBy):cs.sortBy,a=L(L(L({},cs),t),{},{sortBy:i,prefix:e||``});return await Qo(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=L({},e);return await Qo(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}},ds={"X-Client-Info":`storage-js/2.117.2`},fs=class extends rs{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=L(L({},ds),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await Zo(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Zo(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Qo(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
17sioningStatus},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await $o(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 Qo(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ts(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}async getBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await Zo(t.fetch,t.bucketLifecycleUrl(e),{headers:t.headers}))}async updateBucketLifecycle(e,t){var n=this;return n.handleOperation(async()=>await $o(n.fetch,n.bucketLifecycleUrl(e),t,{headers:n.headers}))}async deleteBucketLifecycle(e){var t=this;return t.handleOperation(async()=>await ts(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 ts(r.fetch,`${r.url}/cdn/${Go(e)}${a?`?${a}`:``}`,{},{headers:r.headers},n)})}bucketLifecycleUrl(e){return`${this.url}/bucket/${Go(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():``}},ps=class extends rs{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=L(L({},ds),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await Qo(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 Zo(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ts(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!Wo(e))throw new R(`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 Ao({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}})}},ms=class extends rs{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=L(L({},ds),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await ns.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await ns.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await ns.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await ns.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},hs=class extends rs{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=L(L({},ds),{},{"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 ns.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await ns.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 ns.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await ns.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 ns.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},gs=class extends rs{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=L(L({},ds),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await ns.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await ns.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await ns.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await ns.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},_s=class extends gs{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new vs(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)}},vs=class extends ms{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,L(L({},e),{},{vectorBucketName:n.vectorBucketName}))}
17async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,L(L({},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 ys(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},ys=class extends hs{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,L(L({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,L(L({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,L(L({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,L(L({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,L(L({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},bs=class extends fs{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new us(this.url,this.headers,e,this.fetch)}get vectors(){return new _s(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new ps(this.url+`/iceberg`,this.headers,this.fetch)}},xs=`2.117.2`,Ss=3e4,Cs=3*Ss,ws=2*Ss,Ts=`http://localhost:9999`,Es=`supabase.auth.token`,Ds={"X-Client-Info":`gotrue-js/${xs}`},Os=`X-Supabase-Api-Version`,ks={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},As=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,js=`sb_flow_id`,Ms=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 z(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var Ns=class extends Ms{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function Ps(e){return z(e)&&e.name===`AuthApiError`}var Fs=class extends Ms{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},Is=class extends Ms{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},Ls=class extends Is{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function Rs(e){return z(e)&&e.name===`AuthSessionMissingError`}var zs=class extends Is{constructor(){super(`Auth session or user missing`,`AuthInvalidToken
17ResponseError`,500,void 0)}},Bs=class extends Is{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},Vs=class extends Is{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 Hs(e){return z(e)&&e.name===`AuthImplicitGrantRedirectError`}var Us=class extends Is{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})}},Ws=class extends Is{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`)}},Gs=class extends Is{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function Ks(e){return z(e)&&e.name===`AuthRetryableFetchError`}var qs=class extends Is{constructor(e=`Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)`){super(e,`AuthRefreshDiscardedError`,409,void 0)}};function Js(e){return z(e)&&e.name===`AuthRefreshDiscardedError`}var Ys=class extends Is{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}},Xs=class extends Is{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},Zs=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),Qs=` 18\r=`.split(``),$s=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Qs.length;t+=1)e[Qs[t].charCodeAt(0)]=-2;for(let t=0;t<Zs.length;t+=1)e[Zs[t].charCodeAt(0)]=t;return e})();function ec(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(Zs[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(Zs[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function tc(e,t,n){let r=$s[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 nc(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{ac(e,r,n)};for(let t=0;t<e.length;t+=1)tc(e.charCodeAt(t),i,a);return t.join(``)}function rc(e,t){if(e<=127){t(e);return}if(e<=2047){t(192|e>>6),t(128|e&63);return}if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}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 ic(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}rc(r,t)}}function ac(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 oc(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)tc(e.charCodeAt(t),n,r);return new Uint8Array(t)}function sc(e){let t=[];return ic(e,e=>t.push(e)),new Uint8Array(t)}function cc(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>ec(e,n,r)),ec(null,n,r),t.join(``)}function lc(e){return Math.round(Date.now()/1e3)+e}function uc(){return Symbol(`auth-callback`)}var dc=()=>typeof window<`u`&&typeof document<`u`,fc={tested:!1,writable:!1},pc=()=>
18{if(!dc())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(fc.tested)return fc.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),fc.tested=!0,fc.writable=!0}catch{fc.tested=!0,fc.writable=!1}return fc.writable};function mc(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 hc=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),gc=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,_c=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},vc=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return null}},yc=async(e,t)=>{await e.removeItem(t)},bc=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};bc.promiseConstructor=Promise;function xc(e){let t=e.split(`.`);if(t.length!==3)throw new Xs(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!As.test(t[e]))throw new Xs(`JWT not in base64url format`);return{header:JSON.parse(nc(t[0])),payload:JSON.parse(nc(t[1])),signature:oc(t[2]),raw:{header:t[0],payload:t[1]}}}async function Sc(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Cc(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 wc(e){return(`0`+e.toString(16)).substr(-2)}function Tc(){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,wc).join(``)}async function Ec(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 Dc(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 Ec(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var Oc=/^[a-zA-Z0-9_-]{8,64}$/;function kc(e){return typeof e==`string`&&Oc.test(e)?e:null}function Ac(){if(typeof crypto<`u`&&typeof crypto.getRandomValues==`function`){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,wc).join(``)}let e=``;for(let t=0;t<32;t++)e+=Math.floor(Math.random()*16).toString(16);return e}var jc=(e,t)=>`${e}-flow-${t}-code-verifier`,Mc=e=>`${e}-flows-code-verifier`;async function Nc(e,t){let n=await vc(e,Mc(t));return Array.isArray(n)?n.filter(e=>kc(e)!==null):[]}async function Pc(e,t,n,r,i){await _c(e,jc(t,n),r);let a=(await Nc(e,t)).filter(e=>e!==n);for(a.push(n);a.length>5;){let n=a.shift();await yc(e,jc(t,n)),i?.(n)}await _c(e,Mc(t),a),await _c(e,`${t}-code-verifier`,r)}async function Fc(e,t,n){if(n){let r=await vc(e,jc(t,n));return{verifier:typeof r==`string`?r:null,flowId:n}}let r=await vc(e,`${t}-code-verifier`);return{verifier:typeof r==`string`?r:null,flowId:null}}async function Ic(e,t,n){let r=`${t}-code-verifier`;if(!n){await yc(e,r);return}let i=jc(t,n),a=await vc(e,i);await yc(e,i);let o=await Nc(e,t),s=o.filter(e=>e!==n);s.length!==o.length&&(s.length>0?await _c(e,Mc(t),s):await yc(e,Mc(t))),a!=null&&a===await vc(e,r)&&await yc(e,r)}async function Lc(e,t){let n=await Nc(e,t);for(let r of n)await yc(e,jc(t,r));await yc(e,Mc(t)),await yc(e,`${t}-code-verifier`)}function Rc(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}${js}=${encodeURIComponent(t)}${i}`}async function zc(e,t,n=!1,r){let i=Tc(),a=i;n&&(a+=`/recovery`);let o=Ac();await Pc(e,t,o,a,r);let s=await Dc(i);return[s,i===s?`plain`:`s256`,o]}var Bc=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Vc(e){let t=e.headers.get(Os);if(!t||!t.match(Bc))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function B(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function Hc(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`
18SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var Uc=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Wc(e){if(!Uc.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function Gc(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 Kc(){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 qc(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 Jc(e){return JSON.parse(JSON.stringify(e))}var Yc=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)},Xc=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function Zc(e){if(!gc(e))throw new Gs(Yc(e),0);let t;try{t=await e.json()}catch(t){throw Xc.includes(e.status)?new Gs(e.statusText||`HTTP ${e.status}`,e.status):new Fs(Yc(t),t)}if(Xc.includes(e.status))throw new Gs(Yc(t),e.status);let n,r=Vc(e);if(r&&r.getTime()>=ks[`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 Ys(Yc(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new Ys(Yc(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new Ls;throw new Ns(Yc(t),e.status||500,n)}var Qc=(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 V(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[Os]=ks[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);
18let o=await $c(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 $c(e,t,n,r,i,a){let o=Qc(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw new Gs(Yc(e),0)}if(s.ok||await Zc(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await Zc(e)}}function el(e){let t=null;ol(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=lc(e.expires_in)));let n=e.user??(typeof e?.id==`string`?e:null);return{data:{session:t,user:n},error:null}}function tl(e){let t=el(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 nl(e){return{data:{user:e.user??e},error:null}}function rl(e){return{data:e,error:null}}function il(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=Di(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 al(e){return e}function ol(e){return!!e.access_token&&!!e.refresh_token&&!!e.expires_in}var sl=[`global`,`local`,`others`],cl=class{constructor({url:e=``,headers:t={},fetch:n,experimental:r}){this.url=e,this.headers=t,this.fetch=hc(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=sl[0]){if(sl.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${sl.join(`, `)}`);try{return await V(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await V(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:nl})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=Di(e,[`options`]),r=Object.assign(Object.assign({},n),t);return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await V(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:il,redirectTo:t?.redirectTo})}catch(e){if(z(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await V(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:nl})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await V(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:al});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(z(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){Wc(e);try{return await V(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:nl})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){Wc(e);try{return await V(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:nl})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){Wc(e);try{return await V(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:nl})}catch(e){if(z(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){Wc(e.userId);try{let{data:t,error:n}=await V(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(z(e))return{data:null,error:e};throw e}}async _deleteFactor(e){Wc(e.userId),Wc(e.id);try{return{data:await V(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await V(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:al});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>
180&&(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(z(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await V(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await V(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await V(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await V(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await V(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await V(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(z(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await V(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await V(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await V(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await V(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}async _adminListPasskeys(e){Wc(e.userId);try{return await V(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(z(e))return{data:null,error:e};throw e}}async _adminDeletePasskey(e){Wc(e.userId),Wc(e.passkeyId);try{return await V(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(z(e))return{data:null,error:e};throw e}}};function ll(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}globalThis&&pc()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`);var ul=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}};function dl(){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 fl(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function pl(e){return parseInt(e,16)}function ml(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function hl(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(` 19`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=fl(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=` 20Resources:`;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}`}
20var gl=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}}},_l=class extends gl{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function vl({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 gl({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 gl({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 gl({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 gl({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 gl({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new gl({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 gl({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new gl({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(!Tl(t))return new gl({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new gl({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 gl({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 gl({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 gl({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function yl({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 gl({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new gl({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!Tl(t))return new gl({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new gl({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 gl({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 gl({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var bl=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 xl(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=Di(e,[`challenge`,`user`,`excludeCredentials`]),a=oc(t).buffer,o=Object.assign(Object.assign({},n),{id:oc(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:oc(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function Sl(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=Di(e,[`challenge`,`allowCredentials`]),i=oc(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:oc(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function Cl(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:cc(new Uint8Array(e.response.attestationObject)),clientDataJSON:cc(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function wl(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:cc(new Uint8Array(r.authenticatorData)),clientDataJSON:cc(new Uint8Array(r.clientDataJSON)),signature:cc(new Uint8Array(r.signature)),userHandle:r.userHandle?cc(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function Tl(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function El(){return!!(dc()&&`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 Dl(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new _l(`Browser returned unexpected credential type`,t)}:{data:null,error:new _l(`Empty credential response`,t)}}
20catch(t){return{data:null,error:vl({error:t,options:e})}}}async function Ol(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new _l(`Browser returned unexpected credential type`,t)}:{data:null,error:new _l(`Empty credential response`,t)}}catch(t){return{data:null,error:yl({error:t,options:e})}}}var kl={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},Al={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function jl(...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];r[e]=t(n)?jl(n,a):jl(a)}else r[e]=a}return r}function Ml(e,t){return jl(kl,e,t||{})}function Nl(e,t){return jl(Al,e,t||{})}var Pl=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??bl.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 Dl({publicKey:Ml(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=Nl(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await Ol(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 z(e)?{data:null,error:e}:{data:null,error:new Fs(`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 Ms(`rpId is required for WebAuthn authentication`)};try{if(!El())return{data:null,error:new Fs(`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 z(e)?{data:null,error:e}:{data:null,error:new Fs(`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 Ms(`rpId is required for WebAuthn registration`)};try{if(!El())return{data:null,error:new Fs(`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 z(e)?{data:null,error:e}:{data:null,error:new Fs(`Unexpected error in register`,e)}}}};dl();var Fl={url:Ts,storageKey:Es,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Ds,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},Il={},Ll=!1,Rl=class e{get jwks(){return Il[this.storageKey]?.jwks??{keys:[]}}set jwks(e){Il[this.storageKey]=Object.assign(Object.assign({},Il[this.storageKey]),{jwks:e})}get jwks_cached_at(){return Il[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){Il[this.storageKey]=Object.assign(Object.assign({},Il[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({},Fl),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&&dc()){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 cl({url:r.url,headers:r.headers,fetch:r.fetch,experimental:this.experimental}),this.url=r.url,this.headers=r.headers,this.fetch=hc(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,Ll||(Ll=!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 Pl(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)}}
20,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:pc()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ll(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=ll(this.memoryStorage)),dc()&&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} (${xs}) ${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(dc()&&(e=mc(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),dc()&&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),Hs(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 z(e)?this._returnResult({error:e}):this._returnResult({error:new Fs(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await V(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:el});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(z(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 V(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}
20,code_challenge:o,code_challenge_method:s},xform:el})}else if(`phone`in e){let{phone:t,password:r,options:i}=e;n=await V(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:el})}else throw new Bs(`You must provide either an email or phone number and a password`);let{data:r,error:i}=n;if(i||!r)return await Ic(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 Ic(this.storage,this.storageKey,t),z(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 V(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:tl})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await V(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:tl})}else throw new Bs(`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 zs;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(z(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(!dc()){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=fl(l[0]),d=o?.signInWithEthereum?.chainId;d||=pl(await s.request({method:`eth_chainId`})),t=hl({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:[ml(t),u]})}try{let{data:r,error:i}=await V(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:el});if(i)throw i;if(!r||!r.session||!r.user){let e=new zs;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(z(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(!dc()){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.
20solana&&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(` 21`);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 V(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:cc(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:el});if(i)throw i;if(!r||!r.session||!r.user){let e=new zs;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(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e,t){let n=t?.flowId!=null,r=n?kc(t?.flowId):dc()?kc(mc(window.location.href)[js]):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 Fc(this.storage,this.storageKey,r),[o,s]=(i??``).split(`/`);try{if(!o&&this.flowType===`pkce`)throw new Ws;let{data:t,error:n}=await V(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:o},xform:el});if(await Ic(this.storage,this.storageKey,a),n)throw n;if(!t||!t.session||!t.user){let e=new zs;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 Ic(this.storage,this.storageKey,a),z(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 V(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:el});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new zs;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(z(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 V(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 V(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 Bs(`You must provide either an email or phone number.`)}catch(e){if(await Ic(this.storage,this.storageKey,t),z(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 V(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:el});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(z(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 V(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:rl});return i.data?.url&&dc()&&!e.options?.skipBrowserRedirect&&window.location.assign(i.data.url),this._returnResult(i)}catch(e){if(await Ic(this.storage,this.storageKey,t),z(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 Ls;let{error:r}=await V(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(z(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 V(this.fetch,`POST`,n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a?.captchaToken}
21,code_challenge:o,code_challenge_method:s},redirectTo:this._maybeAppendFlowIdToRedirect(a?.emailRedirectTo,t)});return c&&await Ic(this.storage,this.storageKey,t),this._returnResult({data:{user:null,session:null},error:c})}if(`phone`in e){let{phone:t,type:r,options:i}=e,{data:a,error:o}=await V(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 Bs(`You must provide either an email or phone number and a type`)}catch(e){if(await Ic(this.storage,this.storageKey,t),z(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 vc(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()<Cs:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n)return{data:{session:await this._hydrateSessionUser(e)},error:null};let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);if(i){let e=await vc(this.storage,this.storageKey);return e&&this._isValidSession(e)&&e.expires_at&&e.expires_at*1e3>Date.now()?this._returnResult({data:{session:await this._hydrateSessionUser(e)},error:null}):this._returnResult({data:{session:null},error:i})}return this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async _hydrateSessionUser(e){if(this.userStorage){let t=await vc(this.userStorage,this.storageKey+`-user`);e.user=t?.user?t.user:Kc()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=qc(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return e}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 V(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:nl}):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 Ls}:await V(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:nl})})}catch(e){if(z(e))return Rs(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 Ls;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 V(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:nl});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 Ic(this.storage,this.storageKey,n),z(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 Ls;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=xc(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(z(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 Ls;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(z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!dc())throw new Vs(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new Vs(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 Us(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new Vs(`Not a valid implicit grant flow url.`)}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new Us(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code,{flowId:e[js]});if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),r.searchParams.delete(js),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 Vs(`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;
21f*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(z(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=kc(e[js]);return t&&await vc(this.storage,jc(this.storageKey,t))?!0:!!await vc(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&&!Rs(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&&!(Ps(t)&&(t.status===404||t.status===401||t.status===403)||Rs(t)))return e!==`others`&&await n(),this._returnResult({error:t})}return e!==`others`&&await n(),this._returnResult({error:null})})}onAuthStateChange(e){let t=uc(),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),Js(t))return;Rs(t)||Ks(t)||Ps(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 V(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 Ic(this.storage,this.storageKey,i),z(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(z(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 V(this.fetch,`GET`,a,{headers:this.headers,jwt:r.session?.access_token??void 0})});if(r)throw r;return dc()&&!e.options?.skipBrowserRedirect&&window.location.assign(n?.url),this._returnResult({data:{provider:e.provider,url:n?.url,flowId:t},error:null})}catch(n){if(z(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 V(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:el});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 zs}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await Ic(this.storage,this.storageKey,null),z(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 V(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(z(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 Cc(async n=>(n>0&&await Sc(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await V(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:el})),(e,t)=>{let r=200*2**e;return t&&Ks(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),z(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),dc()&&!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 vc(this.storage,this.storageKey);if(t&&this.userStorage){let e=await vc(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await _c(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??Kc()}else if(t&&!t.user&&!t.user){let e=await vc(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await yc(this.storage,this.storageKey+`-user`),await _c(this.storage,this.storageKey,t)):t.user=Kc()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not val
21id`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<Cs;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${Cs}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(Js(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),Ks(t)?console.warn(t):console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new Ls;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 bc,this.refreshingDeferred.promise.then(void 0,()=>{});let t=await vc(this.storage,this.storageKey),{data:n,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!n.session)throw new Ls;let a=await vc(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 qs};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 yc(this.storage,this.storageKey),this.userStorage&&await yc(this.userStorage,this.storageKey+`-user`);let e={data:null,error:new qs};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),z(i)){let n={data:null,error:i};if(!Ks(i)){let e=await vc(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()+ws},(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 _c(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=Jc(e);await _c(this.storage,this.storageKey,r)}else{let e=Jc(t);await _c(this.storage,this.storageKey,e)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug(`#_removeSession()`),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await yc(this.storage,this.storageKey),await Lc(this.storage,this.storageKey),await yc(this.storage,this.storageKey+`-user`),this.userStorage&&await yc(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&dc()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}
21catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),Ss);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)/Ss);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${Ss}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 ul)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)/Ss);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${Ss}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()`),!dc()||!(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:Rc(e,t)}async _getCodeChallengeAndMethod(e=!1){return zc(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 V(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(z(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 V(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(z(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`?Cl(e.webauthn.credential_response):wl(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await V(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(z(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 V(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:xl(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:Sl(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(z(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}=xc(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(z(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}
21=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}=xc(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(){Gc(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 V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _generateRecoveryCodes(e){Gc(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 V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _verifyRecoveryCode(e){Gc(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 V(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:lc(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(z(e))return this._returnResult({data:null,error:e});throw e}};return this.lock==null?t():this._acquireLock(this.lockAcquireTimeout,t)}async _regenerateRecoveryCodes(){Gc(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 V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _unenrollRecoveryCodes(){Gc(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 V(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(z(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 V(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 Ls})})}catch(e){if(z(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 Ls});let a=await V(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&&dc()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(z(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 Ls});let a=await V(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&&dc()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(z(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 V(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 Ls})})}catch(e){if(z(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 V(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 Ls})})}catch(e){if(z(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 V(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}
21=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}}=xc(n);if(!t?.allowExpired)try{B(i.exp)}catch(e){throw new Xs(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=Hc(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,sc(`${o}.${s}`)))throw new Xs(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async signInWithPasskey(e){try{if(!El())return this._returnResult({data:null,error:new Fs(`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 Ol({publicKey:Sl(t.options),signal:e?.options?.signal??bl.createNewAbortSignal(),mediation:e?.options?.mediation});if(i||!r)return this._returnResult({data:null,error:i??new Fs(`WebAuthn ceremony failed`,null)});let a=wl(r);return this._verifyPasskeyAuthentication({challengeId:t.challenge_id,credential:a})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async registerPasskey(e){try{if(!El())return this._returnResult({data:null,error:new Fs(`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 Dl({publicKey:xl(t.options),signal:e?.options?.signal??bl.createNewAbortSignal()});if(i||!r)return this._returnResult({data:null,error:i??new Fs(`WebAuthn ceremony failed`,null)});let a=Cl(r);return this._verifyPasskeyRegistration({challengeId:t.challenge_id,credential:a})}catch(e){if(z(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyRegistration(){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 Ls});let{data:r,error:i}=await V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){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 Ls});let{data:i,error:a}=await V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _startPasskeyAuthentication(e){try{let{data:t,error:n}=await V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyAuthentication(e){try{let{data:t,error:n}=await V(this.fetch,`POST`,`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:el});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(z(e))return this._returnResult({data:null,error:e});throw e}}async _listPasskeys(){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 Ls});let{data:r,error:i}=await V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){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 Ls});let{data:i,error:a}=await V(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(z(e))return this._returnResult({data:null,error:e});throw e}}async _deletePasskey(e){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 Ls});let{error:i}=await V(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(z(e))return this._returnResult({data:null,error:e});throw e}}};Rl.nextInstanceID={};var zl=Rl,Bl=`2.117.2`,Vl=``,Hl;if(typeof Deno<`u`)Vl=`deno`,Hl=Deno.version?.deno;else if(typeof document<`u`)Vl=`web`;else if(typeof navigator<`u`&&navigator.product===`ReactNative`)Vl=`react-native`;else{var H;Vl=`node`;let e=globalThis.process;Hl=e==null||(H=e.version)==null?void 0:H.replace(/^v/,``)}var U=[`runtime=${Vl}`];Hl&&U.push(`runtime-version=${Hl}`);var W={headers:{"X-Client-Info":`supabase-js/${Bl}; ${U.join(`; `)}`}},G={schema:`public`},K={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},Ul={},Wl={enabled:!1,respectSamplingDecision:!0};function Gl(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 Kl(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(ql(n.hostname,e))return!0}
21else 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 ql(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 Jl(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 Yl(e){"@babel/helpers - typeof";return Yl=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},Yl(e)}function Xl(e,t){if(Yl(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Yl(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zl(e){var t=Xl(e,`string`);return Yl(t)==`symbol`?t:t+``}function Ql(e,t,n){return(t=Zl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $l(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 q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$l(Object(n),!0).forEach(function(t){Ql(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var eu=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),tu=()=>Headers,nu=e=>e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`),ru=`sb_temp_`,iu=new Set,au=e=>{if(!e.startsWith(`sb_`)||nu(e)||e.startsWith(ru))return;let t=e.match(/^sb_[a-zA-Z0-9]+_/)?.[0]??`unknown`;iu.has(t)||(iu.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.`))},ou=(e,t,n,r,i,a)=>{let o=eu(r),s=tu(),c=i?.enabled===!0,l=i?.respectSamplingDecision!==!1,u=c?Jl(t):null,d=!(a?.omitApiKeyAsBearer&&nu(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=lu(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,q(q({},r),{},{headers:a}))}},su=!1,cu=!1;function lu(e,t,n){let r=Ti();if(!r)return su||(su=!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(!Kl(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&&!cu){cu=!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=Gl(i.traceparent);if(e&&!e.isSampled)return{traceparent:i.traceparent}}return i}function uu(e){return typeof e==`boolean`?{enabled:e}:e}function du(e){return e.endsWith(`/`)?e:e+`/`}var fu=!1;function pu(e){fu||typeof e!=`object`||!e||!(`schema`in e)||e.schema===void 0||(fu=!0,console.warn(`@
21supabase/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 mu(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u=uu(e.tracePropagation),d=uu(t.tracePropagation),f={db:q(q({},o),n),auth:q(q({},s),r),realtime:q(q({},c),i),storage:{},global:q(q(q({},l),a),{},{headers:q(q({},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 hu(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(du(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var gu=class extends zl{constructor(e){super(e)}},_u=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=hu(e);if(!t)throw Error(`supabaseKey is required.`);au(t),pu(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:G,realtime:Ul,auth:q(q({},K),{},{storageKey:i}),global:W,tracePropagation:Wl},o=mu(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=ou(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation),this.functionsFetch=ou(t,e,this._getSessionToken.bind(this),o.global.fetch,o.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(q({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 na(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 bs(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new Ii(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 gu({url:this.authUrl.href,headers:q(q({},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 xo(this.realtimeUrl.href,q(q({},e),{},{params:q(q({},{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)}}
21,vu=(e,t,n)=>new _u(e,t,n);function yu(){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}yu()&&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 Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715`);function bu(){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(n=>{n&&n.ok&&typeof n.value==`string`&&localStorage.getItem(e)===t&&(n.value===``?localStorage.removeItem(e):localStorage.setItem(e,n.value))})),removeItem:e=>(localStorage.removeItem(e),c(`lovable-preview-auth:remove`,e).then(()=>void 0))}}function xu(e){return e.startsWith(`sb_publishable_`)||e.startsWith(`sb_secret_`)}function Su(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)),xu(e)&&r.get(`Authorization`)===`Bearer ${e}`&&r.delete(`Authorization`),r.set(`apikey`,e),fetch(t,{...n,headers:r})}}function Cu(){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_LOVABLE_CONNECTOR_GOOGLE_ANALYTICS_API_KEY:`G-0M50HPD50G`,VITE_LOVABLE_CONNECTOR_GOOGLE_MAPS_BROWSER_KEY:`AIzaSyBmvJph4LmrbtW7skeczzpBIyb9WWzFKo4`,VITE_LOVABLE_CONNECTOR_GOOGLE_MAPS_TRACKING_ID:`9bd845869e57e009c1c618c26a8830fe`,VITE_SUPABASE_PROJECT_ID:`ootpzkcskxpfmoplzvaf`,VITE_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_PK4_1UVTLbCaTEM-u1asXg_Ihh0itzq`,VITE_SUPABASE_URL:`https://ootpzkcskxpfmoplzvaf.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_LOVABLE_CONNECTOR_GOOGLE_ANALYTICS_API_KEY:`G-0M50HPD50G`,VITE_LOVABLE_CONNECTOR_GOOGLE_MAPS_BROWSER_KEY:`AIzaSyBmvJph4LmrbtW7skeczzpBIyb9WWzFKo4`,VITE_LOVABLE_CONNECTOR_GOOGLE_MAPS_TRACKING_ID:`9bd845869e57e009c1c618c26a8830fe`,VITE_SUPABASE_PROJECT_ID:`ootpzkcskxpfmoplzvaf`,VITE_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_PK4_1UVTLbCaTEM-u1asXg_Ihh0itzq`,VITE_SUPABASE_URL:`https://ootpzkcskxpfmoplzvaf.supabase.co`}
21.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 vu(e,t,{global:{fetch:Su(t)},auth:{storage:bu(),persistSession:!0,autoRefreshToken:!0}})}var wu,Tu=new Proxy({},{get(e,t,n){return wu||=Cu(),Reflect.get(wu,t,n)}}),Eu=xi({type:`function`}).client(async({next:e})=>{let{data:t}=await Tu.auth.getSession(),n=t.session?.access_token;return e({headers:n?{Authorization:`Bearer ${n}`}:{}})}),Du=xi(),Ou=void 0,ku=Ci(()=>({functionMiddleware:[Eu],requestMiddleware:[Du,Ou]})),Au=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(){}},ju=new class extends Au{#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`}},Mu={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Nu=new class{#e=Mu;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 Pu(e){setTimeout(e,0)}var Fu=typeof window>`u`||`Deno`in globalThis;function Iu(){}function Lu(e,t){return typeof e==`function`?e(t):e}function Ru(e){return typeof e==`number`&&e>=0&&e!==1/0}function zu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bu(e,t){return typeof e==`function`?e(t):e}function Vu(e,t){return typeof e==`function`?e(t):e}function Hu(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Wu(o,t.options))return!1}else if(!Ku(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 Uu(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Gu(t.options.mutationKey)!==Gu(a))return!1}else if(!Ku(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Wu(e,t){return(t?.queryKeyHashFn||Gu)(e)}function Gu(e){return JSON.stringify(e,(e,t)=>Yu(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Ku(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Ku(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Ku(e[r],t[r]))return!1;return!0}return!1}var qu=Object.prototype.hasOwnProperty;function J(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ju(e)&&Ju(t);if(!r&&!(Yu(e)&&Yu(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:qu.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=J(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ju(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yu(e){if(!Xu(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Xu(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Xu(e){return Object.prototype.toString.call(e)===`[object Object]`}function Zu(e){return new Promise(t=>{Nu.setTimeout(t,e)})}function Qu(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:J(e,t)}function $u(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ed(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var td=Symbol();
21function nd(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===td?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function rd(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 id=(()=>{let e=()=>Fu;return{isServer(){return e()},setIsServer(t){e=t}}})();function ad(){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 od=Pu;function sd(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=od,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{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 cd=sd(),ld=new class extends Au{#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 ud(e){return Math.min(1e3*2**e,3e4)}function dd(e){return(e??`online`)!==`online`||ld.isOnline()}var fd=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function pd(e){let t=!1,n=0,r,i=ad(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new fd(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>ju.isFocused()&&(e.networkMode===`always`||ld.isOnline())&&e.canRun(),u=()=>dd(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??(id.isServer()?0:3),o=e.retryDelay??ud,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),Zu(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 md=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ru(this.gcTime)&&(this.#e=Nu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(id.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Nu.clearTimeout(this.#e),this.#e=void 0)}};function hd(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=>{rd(e,()=>t.signal,()=>n=!0)},u=nd(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=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?ed:$u;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?_d:gd,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:gd(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function gd(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 _d(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var vd=class extends md{#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=xd(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=xd(this.options);e.data!==void 0&&(this.setState(bd(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Qu(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(Iu).catch(Iu):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=>Vu(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===td||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
21Count>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Bu(e.options.staleTime,this)===`static`)}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:!zu(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=nd(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`?hd(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=pd({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof fd&&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 fd){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,...yd(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...bd(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),cd.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function yd(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:dd(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function bd(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function xd(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
21Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Sd=class extends md{#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||Y(),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=pd({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),cd.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Y(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Cd=class extends Au{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 Sd({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=wd(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=wd(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=wd(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>
vendor: 4,307 bytes, line 21
21e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=wd(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){cd.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=>Uu(t,e))}findAll(e={}){return this.getAll().filter(t=>Uu(e,t))}notify(e){cd.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return cd.batch(()=>Promise.all(e.map(e=>e.continue().catch(Iu))))}};function wd(e){return e.options.scope?.id}var Td=class extends Au{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Wu(r,t),a=this.get(i);return a||(a=new vd({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(){cd.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=>Hu(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Hu(e,t)):t}notify(e){cd.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){cd.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){cd.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ed=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Td,this.#t=e.mutationCache||new Cd,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ju.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ld.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(Bu(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=Lu(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return cd.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;cd.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return cd.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=cd.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Iu).catch(Iu)}invalidateQueries(e,t={}){return cd.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=cd.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(Iu)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Iu)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Bu(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Iu).catch(Iu)}
21fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Iu).catch(Iu)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ld.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(Gu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Ku(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Gu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Ku(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||=Wu(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===td&&(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()}},Dd=A.createContext(void 0),Od=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,j.jsx)(Dd.Provider,{value:e,children:t})),kd=`(function(){try{ 22var KEY='ariel_attr',TTL=90*864e5,P=['utm_source','utm_medium','utm_campaign','utm_term','utm_keyword','utm_matchtype','utm_content','utm_id','ad_group_id','gclid','gbraid','wbraid','fbclid','msclkid','landing_page']; 23var M=[['-ct/','connecticut'],['-nj/','new-jersey'],['-ma/','massachusetts'],['savannah','savannah'],['charleston','charleston'],['nyc','NYC'],['new-york-city','NYC'],['manhattan','NYC'],['brooklyn','NYC'],['queens','NYC'],['bronx','NYC'],['staten-island','NYC'],['charlotte','charlotte'],['greenville','greenville'],['columbia-sc','columbia'],['atlanta','atlanta'],['baltimore','baltimore'],['jacksonville','jacksonville'],['nashville','nashville'],['orlando','orlando'],['philadelphia','philadelphia'],['connecticut','connecticut'],['rhode-island','rhode-island'],['massachusetts','massachusetts'],['new-york','new-york'],['new-jersey','new-jersey'],['pennsylvania','pennsylvania'],['maine','maine'],['new-hampshire','new-hampshire'],['delaware','delaware'],['maryland','maryland'],['virginia','virginia'],['south-carolina','south-carolina'],['north-carolina','north-carolina'],['georgia','georgia'],['tennessee','tennessee'],['florida','florida']]; 24function market(){var p=location.pathname.toLowerCase();for(var i=0;i<M.length;i++){if(p.indexOf(M[i][0])>-1)return M[i][1]}return''} 25function ck(){var m=document.cookie.match(/(?:^|; )ariel_attr=([^;]*)/);if(!m)return null;try{return JSON.parse(decodeURIComponent(m[1]))}catch(e){return null}} 26function raw(){var d=null;try{d=JSON.parse(localStorage.getItem(KEY)||'null')}catch(e){}return d||ck()} 27function save(d){var s=JSON.stringify(d);try{localStorage.setItem(KEY,s)}catch(e){}var exp=new Date(d.ts+TTL).toUTCString();document.cookie=KEY+'='+encodeURIComponent(s)+'; expires='+exp+'; path=/; SameSite=Lax'+(location.protocol==='https:'?'; Secure':'')} 28function read(){var d=raw();if(!d||!d.ts||Date.now()-d.ts>TTL){try{localStorage.removeItem(KEY)}catch(e){}document.cookie=KEY+'=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/';return{}}return d.values||{}} 29try{var q=new URLSearchParams(location.search),v=read(),changed=false; 30P.forEach(function(k){var x=q.get(k);if(x&&x.trim()&&!/^{.*}$/.test(x.trim())){v[k]=x.trim().slice(0,300);changed=true}}); 31if(changed)v.landing_page=location.origin+location.pathname; 32var r=document.referrer;if(r&&r.indexOf(location.origin)!==0){v.referrer=r.slice(0,300);changed=true} 33if(changed||Object.keys(v).length){var old=raw();save({ts:changed||!old?Date.now():old.ts,values:v})}}catch(e){} 34function inject(f){if(!f||f.tagName!=='FORM')return;var v=read(),names=P.concat(['referrer','market']);
35names.forEach(function(k){var val=k==='market'?market():(v[k]||'');var el=f.querySelector('input[type=hidden][name="'+k+'"]'); 36if(!el){el=document.createElement('input');el.type='hidden';el.name=k;f.appendChild(el)}el.value=val})} 37document.addEventListener('submit',function(e){try{inject(e.target)}catch(x){}},true); 38window.arielAttr=function(){var v=read();v.market=market();return v}; 39}catch(e){}})();`,Ad=`/assets/styles-DwHerRG8.css`;function jd(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),r=e instanceof Error?e.stack:void 0;window.__lovableReportRuntimeError?.({message:n,...r!==void 0&&{stack:r},filename:window.location.pathname})}var Md=f(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Nd=f(`circle-user-round`,[[`path`,{d:`M18 20a6 6 0 0 0-12 0`,key:`1qehca`}],[`circle`,{cx:`12`,cy:`10`,r:`4`,key:`1h16sb`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Pd=`block px-4 py-2.5 text-sm text-foreground transition-colors hover:bg-muted hover:text-primary focus-visible:bg-muted focus-visible:text-primary focus-visible:outline-none`;function Fd(e){return e?Array.from(e.querySelectorAll(`[data-menuitem]`)).filter(e=>getComputedStyle(e).visibility!==`hidden`):[]}function X({label:e,items:t,groups:n,triggerClass:r}){let[i,a]=(0,A.useState)(!1),[o,s]=(0,A.useState)(null),c=(0,A.useRef)(null),l=(0,A.useRef)(null),u=(0,A.useRef)(null),d=(0,A.useRef)(void 0),f=(0,A.useId)(),p=(e=!1)=>{a(!1),s(null),e&&l.current?.focus()},m=()=>window.clearTimeout(d.current),h=()=>{m(),d.current=window.setTimeout(()=>p(),180)};(0,A.useEffect)(()=>{if(!i)return;let e=e=>{c.current?.contains(e.target)||p()};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[i]),(0,A.useEffect)(()=>()=>m(),[]);let g=(0,A.useRef)(null);(0,A.useEffect)(()=>{let e=g.current;e&&(g.current=null,Fd(e===`top`?u.current:u.current?.querySelector(e)??null)[0]?.focus())},[i,o]);let _=()=>{g.current=`top`},v=e=>{e.key===`ArrowDown`?(e.preventDefault(),a(!0),_()):e.key===`Escape`&&p()},y=e=>{let t=e.target,n=t.closest(`[data-submenu]`),r=Fd(n??u.current).filter(e=>n?!0:!e.closest(`[data-submenu]`)),i=r.indexOf(t);if(e.key===`ArrowDown`)e.preventDefault(),r[(i+1)%r.length]?.focus();else if(e.key===`ArrowUp`)e.preventDefault(),r[(i-1+r.length)%r.length]?.focus();else if(e.key===`Home`)e.preventDefault(),r[0]?.focus();else if(e.key===`End`)e.preventDefault(),r[r.length-1]?.focus();else if(e.key===`Escape`)if(e.preventDefault(),e.stopPropagation(),n){let e=Number(n.dataset.submenu);s(null),u.current?.querySelector(`[data-subtrigger="${e}"]`)?.focus()}else p(!0);else if(e.key===`ArrowLeft`&&n){e.preventDefault();let t=Number(n.dataset.submenu);s(null),u.current?.querySelector(`[data-subtrigger="${t}"]`)?.focus()}else e.key===`Tab`&&p()},b=(e,t)=>{s(e),t&&(g.current=`[data-submenu="${e}"]`)},S=e=>e?`visible opacity-100`:`invisible opacity-0 pointer-events-none`;return(0,j.jsxs)(`div`,{ref:c,className:`relative`,onPointerEnter:e=>{e.pointerType===`mouse`&&(m(),a(!0))},onPointerLeave:e=>{e.pointerType===`mouse`&&h()},children:[(0,j.jsxs)(`button`,{ref:l,type:`button`,"aria-haspopup":`true`,"aria-expanded":i,"aria-controls":f,onClick:()=>i?p():a(!0),onKeyDown:v,className:`nav-link inline-flex items-center gap-1 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] ${r}`,children:[e,(0,j.jsx)(Md,{"aria-hidden":!0,className:`size-3.5 transition-transform duration-200 ${i?`rotate-180`:``}`})]}),(0,j.jsx)(`div`,{id:f,ref:u,onKeyDown:y,className:`absolute left-1/2 top-full z-50 w-56 -translate-x-1/2 pt-7 transition duration-200 ${S(i)}`,children:(0,j.jsxs)(`ul`,{role:`list`,className:`border-t-2 border-accent bg-background p-2 shadow-lg`,children:[t?.map(([e,t])=>(0,j.jsx)(`li`,{children:(0,j.jsx)(x,{"data-menuitem":!0,to:t,onClick:()=>p(),className:Pd,children:e})},t)),n?.map(([e,t],n)=>(0,j.jsxs)(`li`,{className:`relative`,onPointerEnter:e=>{e.pointerType===`mouse`&&s(n)},children:[(0,j.jsxs)(`button`,{type:`button`,"data-menuitem":!0,"data-subtrigger":n,"aria-haspopup":`true`,"aria-expanded":o===n,onClick:()=>s(o===n?null:n),onKeyDown:e=>{(e.key===`ArrowRight`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b(n,!0))},className:`flex w-full min-h-11 items-center justify-between text-left ${Pd}
39`,children:[e,(0,j.jsx)(Md,{"aria-hidden":!0,className:`size-3 transition-transform ${o===n?`rotate-0 md:-rotate-90`:`-rotate-90`}`})]}),(0,j.jsx)(`div`,{"data-submenu":n,className:`absolute left-full top-0 w-56 pl-2 transition duration-200 ${S(o===n)}`,children:(0,j.jsx)(`ul`,{role:`list`,className:`border-t-2 border-accent bg-background p-2 shadow-lg`,children:t.map(([e,t])=>(0,j.jsx)(`li`,{children:(0,j.jsx)(x,{"data-menuitem":!0,to:t,onClick:()=>p(),className:Pd,children:e})},t))})})]},e))]})})]})}var Id=[[`Bridge/Acquisition`,`/acquisition/`],[`Fix & Flip / Rehab`,`/fix-flip-rehab/`],[`Refinance`,`/refinance/`],[`New Construction`,`/new-construction/`]],Ld=[[`Single Family`,`/single-family/`],[`Multifamily`,`/multi-family/`],[`Mixed-Use`,`/mixed-use/`],[`Other Commercial`,`/commercial/`]],Rd=[[`Loan Types`,Id],[`Asset Types`,Ld]],zd=[...Id,...Ld],Bd=[[`Brokers`,`/brokers/`],[`Builders & Investors`,`/builders/`]],Vd=[[`Home`,`/`],[`About Us`,`/`],[`Recent Deals`,`/recent-deals/`],[`Deal Analyzer`,`/dealanalyzer/`],[`Contact Us`,`/contact-us/`]],Hd=`https://app.junipersquare.com/login?path=%2Fi%2Fatlasrep`,Ud=[...Vd.slice(0,2),...zd,...Bd,...Vd.slice(2)];function Wd({overlay:e=!1}){let[t,n]=(0,A.useState)(!1),[r,i]=(0,A.useState)(!1);(0,A.useEffect)(()=>{let e=()=>i(window.scrollY>60);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]);let a=!r;return(0,j.jsxs)(j.Fragment,{children:[!e&&(0,j.jsx)(`div`,{className:`h-[129px]`}),(0,j.jsxs)(`header`,{className:`${r?`bg-white text-foreground shadow-[0_2px_14px_rgb(15_31_60/0.08)]`:e?`text-primary-foreground`:`bg-primary text-primary-foreground`} fixed inset-x-0 top-0 z-40 transition-colors duration-300`,children:[(0,j.jsx)(`div`,{className:`transition-colors duration-300 text-primary-foreground bg-primary`,children:(0,j.jsxs)(`div`,{className:`mx-auto flex h-[39px] w-full items-center justify-between px-5 text-[14px]`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-5`,children:[(0,j.jsxs)(`a`,{href:`tel:+12034573787`,className:`flex items-center gap-2`,children:[(0,j.jsx)(C,{className:`size-[14px] fill-current`}),`+1 203-457-3787`]}),(0,j.jsxs)(`a`,{href:`mailto:[email protected][email protected]`,className:`hidden items-center gap-2 sm:flex`,children:[(0,j.jsx)(be,{className:`size-[14px] fill-current`}),`[email protected]`]})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,j.jsx)(x,{to:`/app/`,children:`Apply Now`}),(0,j.jsx)(`a`,{href:`https://www.linkedin.com/company/a4-credit-partners/`,target:`_blank`,rel:`noreferrer`,"aria-label":`Follow us on LinkedIn`,className:`flex items-center`,children:(0,j.jsx)(He,{className:`size-[18px] fill-current`})})]})]})}),(0,j.jsx)(`div`,{className:`transition-colors duration-300 ${r?`bg-white`:e?`bg-transparent`:`bg-primary`}`,children:(0,j.jsxs)(`div`,{className:`mx-auto flex h-[90px] w-full items-center px-5`,children:[(0,j.jsx)(w,{dark:a}),(0,j.jsxs)(`nav`,{className:`hidden flex-1 items-center justify-center gap-[28px] xl:gap-[44px] lg:flex`,"aria-label":`Primary navigation`,children:[(0,j.jsx)(x,{to:`/`,className:`nav-link`,children:`Home`}),(0,j.jsx)(x,{to:`/about-us/`,className:`nav-link`,children:`About Us`}),(0,j.jsx)(X,{label:`Loan Products`,groups:Rd,triggerClass:a?`text-primary-foreground`:`text-foreground`}),(0,j.jsx)(X,{label:`Partners`,items:Bd,triggerClass:a?`text-primary-foreground`:`text-foreground`}),Vd.slice(2).map(([e,t])=>t.startsWith(`http`)?(0,j.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`nav-link`,children:e},t):(0,j.jsx)(x,{to:t,className:`nav-link`,children:e},t))]}),(0,j.jsx)(x,{to:`/app/`,className:`hidden h-[46px] items-center whitespace-nowrap rounded-[10px] border border-[var(--accent)] bg-[var(--accent)] px-5 text-[15px] font-bold leading-[44px] text-[var(--accent-foreground)] transition-[background-color,border-color,color] duration-300 ease-in-out `,children:`See Your Rate`}),(0,j.jsxs)(`a`,{href:Hd,target:`_blank`,rel:`noreferrer`,className:`hidden items-center gap-2 whitespace-nowrap text-[16px] lg:flex ${a?`text-primary-foreground
39/85`:`text-foreground/85`}`,children:[(0,j.jsx)(Nd,{className:`size-[17px]`}),`Sign in`]}),(0,j.jsx)(_e,{variant:`ghost`,size:`icon`,className:`ml-auto lg:hidden ${a?`text-primary-foreground `:`text-foreground `}`,onClick:()=>n(!t),"aria-label":`Toggle menu`,"aria-expanded":t,children:t?(0,j.jsx)(Ue,{}):(0,j.jsxs)(`span`,{"aria-hidden":`true`,className:`flex w-7 flex-col items-end gap-[7px]`,children:[(0,j.jsx)(`span`,{className:`h-px w-7 bg-current`}),(0,j.jsx)(`span`,{className:`h-px w-[18px] bg-current`})]})})]})}),t&&(0,j.jsxs)(`div`,{className:`border-t px-5 pb-6 lg:hidden ${a?`border-primary-foreground/10 bg-primary`:`border-border bg-white`}`,children:[(0,j.jsx)(`nav`,{className:`grid py-3`,children:Ud.map(([e,t])=>t.startsWith(`http`)?(0,j.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,onClick:()=>n(!1),className:`border-b py-3 text-sm ${a?`border-primary-foreground/10`:`border-border`}`,children:e},t):(0,j.jsx)(x,{to:t,onClick:()=>n(!1),className:`border-b py-3 text-sm ${a?`border-primary-foreground/10`:`border-border`}`,children:e},t))}),(0,j.jsx)(_e,{asChild:!0,className:`mt-4 w-full border-[var(--accent)] bg-[var(--accent)] text-[14px] font-bold text-[var(--accent-foreground)] `,children:(0,j.jsx)(x,{to:`/app/`,children:`See Your Rate`})}),(0,j.jsx)(`a`,{href:Hd,target:`_blank`,rel:`noreferrer`,className:`mt-3 w-full inline-flex items-center justify-center whitespace-nowrap rounded-md border h-10 px-4 py-2 text-sm ${a?`border-primary-foreground/30 bg-transparent text-primary-foreground `:`border-border bg-transparent text-foreground `}`,children:`Sign in`})]})]})]})}var Gd=[{label:`About Us`,to:`/about-us/`},{label:`Investors`,to:`/builders/`},{label:`Press`,to:`/press/`},{label:`Broker`,to:`/brokers/`},{label:`Contact`,to:`/contact-us/`},{label:`Apply Now`,to:`/app/`}],Kd=[{label:`Acquisition`,to:`/acquisition/`},{label:`Fix & Flip / Rehab`,to:`/fix-flip-rehab/`},{label:`Refinance`,to:`/refinance/`},{label:`New Construction`,to:`/new-construction/`},{label:`Single Family`,to:`/single-family/`},{label:`Multifamily`,to:`/multi-family/`},{label:`Commercial`,to:`/commercial/`},{label:`Office`,to:`/office/`}],qd=[{label:`Why A4 Capital Partners`,to:`/about-us/`,hash:`why-a4`},{label:`Leadership`,to:`/about-us/`,hash:`leadership`},{label:`Track Record`,to:`/about-us/`,hash:`track`},{label:`States We Lend In`,to:`/about-us/`,hash:`states`},{label:`Careers`,to:`/careers/`},{label:`Builders & Investors`,to:`/builders/`},{label:`Contact Us`,to:`/contact-us/`}];function Jd(){return(0,j.jsxs)(`footer`,{className:`bg-background text-foreground`,children:[(0,j.jsx)(`section`,{className:`bg-primary bg-gradient-to-b from-primary to-[#232a5c] text-primary-foreground`,children:(0,j.jsxs)(`div`,{className:`site-container flex flex-col items-center gap-0 py-[70px] text-center`,children:[(0,j.jsx)(`h2`,{className:`text-[30px] font-bold leading-tight tracking-[-0.5px] text-primary-foreground md:text-[40px]`,children:`Still Have Questions?`}),(0,j.jsx)(`p`,{className:`mt-[18px] max-w-xl text-base font-bold leading-[1.62] text-primary-foreground`,children:`Whatever you need, weâre here to help. Reach out today.`}),(0,j.jsx)(Pe,{to:`/contact-us/`,className:`mt-[26px] border-white bg-transparent text-primary-foreground `,children:`Contact Us`})]})}),(0,j.jsxs)(`div`,{className:`bg-primary text-primary-foreground`,children:[(0,j.jsxs)(`div`,{className:`site-container grid gap-10 py-16 md:grid-cols-2 lg:grid-cols-[1.1fr_0.7fr_0.9fr_0.9fr_1.1fr]`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(w,{light:!0,dark:!0}),(0,j.jsx)(`p`,{className:`mt-6 max-w-xs text-[15px] leading-[1.6] text-primary-foreground/70`,children:`Your Partner in Fast, Transparent Real Estate Financing`}),(0,j.jsx)(`p`,{className:`mt-4 text-[13px] uppercase tracking-[1px] text-accent`,children:`Partner of Atlas Real Estate`})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-[13px] font-bold uppercase tracking-[1.2px] text-accent`,children:`Essential pages`}),(0,j.jsx)(`div`,{className:`mt-5 grid gap-2.5 text-[15px] text-primary-foreground/75`,children:Gd.map(e=>(0,j.jsx)(x,{to:e.to,className:`w-fit transition-colors `,children:e.label},e.label))})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-[13px] font-bold uppercase tracking-[1.2px] text-accent`,children:`Loan Types & Programs`}),(0,j.jsx)(`div`,{className:`mt-5 grid gap-2.5 text-[15px] text-primary-foreground
39/75`,children:Kd.map(e=>(0,j.jsx)(x,{to:e.to,className:`w-fit transition-colors `,children:e.label},e.label))})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-[13px] font-bold uppercase tracking-[1.2px] text-accent`,children:`Company`}),(0,j.jsx)(`div`,{className:`mt-5 grid gap-2.5 text-[15px] text-primary-foreground/75`,children:qd.map(e=>`hash`in e?(0,j.jsx)(x,{to:e.to,hash:e.hash,className:`w-fit transition-colors `,children:e.label},e.label):(0,j.jsx)(x,{to:e.to,className:`w-fit transition-colors `,children:e.label},e.label))})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`text-[13px] font-bold uppercase tracking-[1.2px] text-accent`,children:`Contact Us`}),(0,j.jsxs)(`div`,{className:`mt-5 grid gap-2.5 text-[15px] leading-[1.6] text-primary-foreground/75`,children:[(0,j.jsx)(`p`,{children:(0,j.jsx)(`span`,{className:`font-bold text-primary-foreground`,children:`Headquarters:`})}),(0,j.jsxs)(`a`,{href:`https://www.google.com/maps/search/?api=1&query=470+James+St+Suite+7,+New+Haven,+CT+06513`,target:`_blank`,rel:`noreferrer`,className:`w-fit transition-colors `,children:[`470 James St.`,(0,j.jsx)(`br`,{}),`Suite 7`,(0,j.jsx)(`br`,{}),`New Haven, CT 06513`]}),(0,j.jsx)(`p`,{className:`pt-2`,children:(0,j.jsx)(`span`,{className:`font-bold text-primary-foreground`,children:`Other office locations:`})}),(0,j.jsx)(`a`,{href:`https://www.google.com/maps/place/A4+Capital+Partners/data=!4m2!3m1!1s0x0:0x85f15de3e8054219?sa=X&ved=1t:2428&ictx=111`,target:`_blank`,rel:`noreferrer`,className:`w-fit transition-colors `,children:`226 Fifth Avenue, 2nd Floor, New York, NY 10001`}),(0,j.jsx)(`a`,{href:`https://www.google.com/maps/search/?api=1&query=1111+Brickell+Ave+10th+Floor,+Miami,+FL+33131`,target:`_blank`,rel:`noreferrer`,className:`w-fit transition-colors `,children:`1111 Brickell Ave, 10th Floor, Miami, FL 33131`}),(0,j.jsx)(`a`,{className:`w-fit pt-2 `,href:`mailto:[email protected]`,children:`[email protected]`}),(0,j.jsx)(`a`,{className:`w-fit `,href:`tel:+12034573787`,children:`+1 203-457-3787`})]})]})]}),(0,j.jsx)(`div`,{className:`border-t border-primary-foreground/15`,children:(0,j.jsxs)(`div`,{className:`site-container flex flex-col gap-3 py-6 text-[13px] text-primary-foreground/55 md:flex-row md:items-center md:justify-between`,children:[(0,j.jsx)(`span`,{children:`© 2026 A4 Capital Partners. All Rights Reserved`}),(0,j.jsx)(`a`,{href:`https://www.linkedin.com/company/a4-credit-partners/`,target:`_blank`,rel:`noreferrer`,"aria-label":`A4 Capital Partners on LinkedIn`,className:`mx-auto inline-flex size-9 items-center justify-center rounded-[6px] bg-primary-foreground/10 transition-colors md:mx-0`,children:(0,j.jsx)(He,{className:`size-5`})}),(0,j.jsxs)(`div`,{className:`flex flex-wrap gap-5`,children:[(0,j.jsx)(x,{to:`/terms/`,className:``,children:`Terms`}),(0,j.jsx)(x,{to:`/privacy-policy/`,className:``,children:`Privacy`}),(0,j.jsx)(x,{to:`/security/`,className:``,children:`Security`}),(0,j.jsx)(x,{to:`/disclosures-and-licenses/`,className:``,children:`Disclosures`})]})]})})]})]})}function Yd(){return(0,j.jsx)(`a`,{href:`tel:+12034573787`,"aria-label":`Call A4 Capital Partners`,title:`Call A4 Capital Partners`,className:`fixed bottom-5 right-5 z-50 grid size-14 place-items-center rounded-full bg-primary text-primary-foreground transition-transform duration-200 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-ring motion-reduce:transition-none md:bottom-6 md:right-6 md:size-16`,children:(0,j.jsx)(C,{className:`size-5 md:size-6`,strokeWidth:2.25})})}var Z=(e,t,n,r,i,a,o)=>({name:e,st:t,state:n,county:r,zips:i,nearby:a,note:o,stateSlug:n.toLowerCase().replace(/ /g,`-`)}),Xd=[Z(`Greenwich`,`CT`,`Connecticut`,`Fairfield County`,`06830, 06831, 06870 and 06878`,`Stamford, Darien and Rye`,`Greenwich has some of the highest home values in the country, and older estates in areas like Belle Haven, Old Greenwich and Riverside often trade as teardowns or full gut renovations.`),Z(`Darien`,`CT`,`Connecticut`,`Fairfield County`,`06820`,`Stamford, New Canaan and Norwalk`,`Darienâs short commute to Manhattan and limited housing stock keep demand high for renovated colonials and new-construction homes near the shoreline.`),Z(`New Canaan`,`CT`,`Connecticut`,`Fairfield County`,`06840`,`Darien, Wilton and Stamford`,`New Canaan investors often buy dated homes on larger lots and reposition them as modern luxury builds for buyers relocating from New York City.`),Z(`Westport`,`CT`,`Connecticut`,`Fairfield County`,`06880`,`Fairfield, Weston and Norwalk`,`Westportâs beach neighborhoods and downtown walkability drive steady demand for renovated and newly built homes, with teardown lots in high demand.`),Z(`Weston`,`CT`,`Connecticut`,`Fairfield County`,`06883`,`Westport, Wilton and Easton`,`Westonâs larger wooded parcels suit ground-up construction and major additions for buyers seeking privacy close to the coast.`),Z(`Wilton`,`CT`,`Connecticut`,`Fairfield County`,`06897`,`New Canaan, Weston and Ridgefield`,`Wilton offers value-ad
39d opportunities in dated homes that can be modernized for families moving from lower Fairfield County and New York.`),Z(`Ridgefield`,`CT`,`Connecticut`,`Fairfield County`,`06877`,`Wilton, Redding and Danbury`,`Ridgefieldâs historic village and larger lots attract fix and flip investors and builders targeting high-end family buyers.`),Z(`Fairfield`,`CT`,`Connecticut`,`Fairfield County`,`06824, 06825 and 06890`,`Westport, Bridgeport and Easton`,`Fairfieldâs beach area, Greenfield Hill and Southport neighborhoods offer renovation, rental and new-construction opportunities at several price points.`),Z(`Easton`,`CT`,`Connecticut`,`Fairfield County`,`06612`,`Weston, Fairfield and Redding`,`Eastonâs rural acreage appeals to builders and investors creating custom homes for buyers who want space within reach of the coast.`),Z(`Madison`,`CT`,`Connecticut`,`New Haven County`,`06443`,`Guilford, Clinton and New Haven`,`Madisonâs shoreline cottages and downtown homes are frequent targets for renovation and rebuilds aimed at second-home and year-round buyers.`),Z(`Short Hills`,`NJ`,`New Jersey`,`Essex County`,`07078`,`Millburn, Summit and Livingston`,`Short Hills is one of New Jerseyâs most sought-after addresses, and investors regularly renovate or rebuild older homes near the train to Manhattan.`),Z(`Summit`,`NJ`,`New Jersey`,`Union County`,`07901`,`Short Hills, Chatham and New Providence`,`Summitâs direct rail line to New York and strong schools keep demand high for renovated homes and new construction on infill lots.`),Z(`Ridgewood`,`NJ`,`New Jersey`,`Bergen County`,`07450`,`Glen Rock, Ho-Ho-Kus and Paramus`,`Ridgewoodâs walkable village and commuter rail make it a steady market for fix and flip projects and teardown rebuilds.`),Z(`Alpine`,`NJ`,`New Jersey`,`Bergen County`,`07620`,`Englewood Cliffs, Cresskill and Tenafly`,`Alpineâs large estate lots support high-value ground-up construction and major renovations for luxury buyers.`),Z(`Saddle River`,`NJ`,`New Jersey`,`Bergen County`,`07458`,`Upper Saddle River, Ramsey and Ho-Ho-Kus`,`Saddle Riverâs acre-plus lots are well suited to custom new builds and estate renovations.`),Z(`Montclair`,`NJ`,`New Jersey`,`Essex County`,`07042 and 07043`,`Glen Ridge, Verona and Bloomfield`,`Montclairâs historic housing stock and multiple train stations create steady demand for renovated single-family and small multifamily properties.`),Z(`Princeton`,`NJ`,`New Jersey`,`Mercer County`,`08540 and 08542`,`West Windsor, Lawrenceville and Hopewell`,`Princetonâs university-driven demand supports renovations, rental properties and new construction across its neighborhoods.`),Z(`Chatham`,`NJ`,`New Jersey`,`Morris County`,`07928`,`Summit, Madison and Florham Park`,`Chathamâs strong schools and Midtown Direct rail service make renovated homes and new builds some of the fastest-moving listings in Morris County.`),Z(`Westfield`,`NJ`,`New Jersey`,`Union County`,`07090`,`Scotch Plains, Cranford and Mountainside`,`Westfieldâs downtown and commuter access attract investors renovating older colonials and building new homes on teardown lots.`),Z(`Rumson`,`NJ`,`New Jersey`,`Monmouth County`,`07760`,`Fair Haven, Red Bank and Sea Bright`,`Rumsonâs waterfront estates and river-adjacent lots draw builders and investors focused on luxury renovations and rebuilds.`),Z(`Wellesley`,`MA`,`Massachusetts`,`Norfolk County`,`02481 and 02482`,`Newton, Weston and Needham`,`Wellesleyâs top schools and commuter rail keep demand strong for renovated homes and new construction replacing older housing.`),Z(`Weston`,`MA`,`Massachusetts`,`Middlesex County`,`02493`,`Wellesley, Wayland and Lincoln`,`Weston has some of the highest home values in Massachusetts, and its larger lots attract builders and investors doing custom construction.`),Z(`Dover`,`MA`,`Massachusetts`,`Norfolk County`,`02030`,`Sherborn, Medfield and Needham`,`Doverâs estate-sized parcels suit high-end ground-up builds and full renovations for buyers seeking privacy near Boston.`),Z(`Newton`,`MA`,`Massachusetts`,`Middlesex County`,`02458 through 02468`,`Brookline, Wellesley and Waltham`,`Newtonâs 13 villages offer a mix of single-family flips, two-family rentals and teardown rebuilds close to Boston.`),Z(`Lexington`,`MA`,`Massachusetts`,`Middlesex County`,`02420 and 02421`,`Arlington, Bedford and Belmont`,`Lexingtonâs schools and access to Route 128 employers keep new-construction and renovated homes in high demand.`),Z(`Brookline`,`MA`,`Massachusetts`,`Norfolk County`,`02445, 02446 and 02467`,`Boston, Newton and Chestnut Hill`,`Brooklineâs mix of single-family homes, two-families and condo buildings creates opportunities for renovation, bridge and rental financing.`),Z(`Concord`,`MA`,`Massachusetts`,`Middlesex County`,`01742`,`Lincoln, Acton and Carlisle`,`C
39oncordâs historic homes and larger lots attract investors doing careful renovations and new construction for buyers seeking space.`),Z(`Sherborn`,`MA`,`Massachusetts`,`Middlesex County`,`01770`,`Dover, Holliston and Natick`,`Sherbornâs rural acreage supports custom home construction and estate renovations for buyers west of Boston.`),Z(`Winchester`,`MA`,`Massachusetts`,`Middlesex County`,`01890`,`Arlington, Medford and Woburn`,`Winchesterâs commuter rail access and strong schools make renovated homes and teardown rebuilds a steady opportunity.`),Z(`Belmont`,`MA`,`Massachusetts`,`Middlesex County`,`02478`,`Cambridge, Arlington and Watertown`,`Belmontâs proximity to Cambridge and Boston keeps demand high for renovated single-family and two-family homes.`),Z(`Savannah`,`GA`,`Georgia`,`Chatham County`,`31401, 31404, 31405 and 31406`,`Tybee Island, Pooler and Richmond Hill`,`Savannahâs historic district, growing port economy and steady tourism create demand for renovated homes, short-term and long-term rentals, and new construction in fast-growing areas nearby.`),Z(`Charleston`,`SC`,`South Carolina`,`Charleston County`,`29401, 29403, 29407 and 29412`,`Mount Pleasant, James Island and West Ashley`,`Charlestonâs peninsula, historic homes and fast-growing suburbs make it one of the Southeastâs most active markets for fix and flip, rental and new-construction projects.`)],Zd=e=>`${e.name.toLowerCase().replace(/ /g,`-`)}-${e.st.toLowerCase()}`;function Qd(e){let t=`${e.name}, ${e.st}`;return[[{t:`h2`,text:`Private Real Estate Lender in ${t}`},{t:`p`,text:`A4 Capital Partners provides hard money, fix and flip, bridge, ground-up construction and DSCR rental loans for real estate investors in ${t}. Loans are based on the property and your business plan, not personal income, so you can close in days instead of waiting on a bank.`}],[{t:`h1`,text:`Hard Money Loans in ${t}`},{t:`p`,text:e.note},{t:`p`,text:`We lend across ${e.name} and ${e.county}, including ZIP codes ${e.zips}, and nearby markets such as ${e.nearby}. Whether you are buying, renovating, building or refinancing, you work directly with decision-makers who understand local values.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Loan Programs for ${e.name} Real Estate Investors`},{t:`h3`,text:`Fix and Flip Loans in ${e.name}`},{t:`p`,text:`Short-term financing for the purchase and renovation of ${e.name} properties, with up to 90% of the purchase price and up to 100% of rehab costs funded in draws.`},{t:`h3`,text:`Ground-Up Construction Loans in ${e.name}`},{t:`p`,text:`Financing for new builds and teardown rebuilds in ${e.name}, including land, hard costs and soft costs, with a draw schedule tied to your build.`},{t:`h3`,text:`Bridge Loans in ${e.name}`},{t:`p`,text:`Fast bridge financing to buy before you sell, close on a time-sensitive deal, or stabilize a property before long-term financing.`},{t:`h3`,text:`DSCR Rental Loans in ${e.name}`},{t:`p`,text:`Long-term loans for ${e.name} rental properties qualified on the propertyâs rental income instead of your tax returns.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing for acquisitions, renovations, refinances and new construction in ${t}.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Why ${e.name} Investors Choose A4 Capital Partners`},{t:`ul`,items:[`Direct balance-sheet lender with in-house underwriting and funding`,`Decisions based on the property, after repair value (ARV) and exit plan`,`Fast term sheets and closings in as little as 5-10 days`,`No prepayment penalty on short-term loans`,`Experience with high-value renovations and luxury new construction`]},{t:`p`,text:`Ready to move on a deal in ${e.name}? Submit your deal and get terms quickly from a lender who knows ${e.state}.`,href:`/app/`}],[{t:`map`}],[{t:`h2`,text:`${e.name} Hard Money Loan FAQs`},{t:`p`,text:`Common questions from investors financing real estate in ${t}.`},{t:`h3`,text:`How fast can I close a hard money loan in ${e.name}?`},{t:`p`,text:`Most loans close in 5-10 days once the appraisal and title work are in, much faster than a bank.`},{t:`h3`,text:`Do you finance teardowns and new construction in ${e.name}?`},{t:`p`,text:`Yes. We finance ground-up construction and teardown rebuilds throughout ${e.county}, including land, hard and soft costs.`}
39,{t:`h3`,text:`Do I need to show personal income or tax returns?`},{t:`p`,text:`No. Our loans are based on the property, the deal and your exit plan. DSCR rental loans are qualified on rental income.`},{t:`h3`,text:`What property types do you lend on in ${e.name}?`},{t:`p`,text:`Single-family homes, 2-4 unit properties, multifamily, mixed-use and land for new construction.`},{t:`h3`,text:`How much can I borrow?`},{t:`p`,text:`Loans start at $500K, with up to 90% of cost and up to 70% of after repair value, depending on the deal.`}]]}var $d=Object.fromEntries(Xd.map(e=>[Zd(e),Qd(e)])),ef=Xd.map(e=>{let t=`${e.name}, ${e.st}`;return{path:`/locations/${Zd(e)}/`,title:`Hard Money Loans ${t} | Fix & Flip, Construction | A4`,description:`Hard money, fix and flip, construction, bridge and DSCR loans in ${t}. Direct private lender, rates from 8.5%, closings in 5-10 days. Apply today.`,h1:`Hard Money Loans in ${t}`,type:`Location page`,noindex:!1,lastmod:`2026-09-29`,draftDescription:!1}}),tf=[{path:`/locations/hard-money-lenders-colorado/`,title:`Colorado Hard Money Lenders | A4 Capital Partners`,description:`Colorado hard money loans for experienced investors, builders and developers financing acquisitions, renovations and construction from Denver to resort markets.`,h1:`Hard Money Loans in Colorado for Real Estate Investors`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-10-01`,draftDescription:!1},{path:`/locations/hard-money-lenders-wyoming/`,title:`Wyoming Hard Money Lenders | A4 Capital Partners`,description:`Wyoming hard money loans for experienced investors and builders financing acquisitions, renovations and construction in Jackson Hole and statewide markets.`,h1:`Hard Money Loans in Wyoming for Real Estate Investors`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-10-01`,draftDescription:!1},{path:`/locations/hard-money-lenders-idaho/`,title:`Idaho Hard Money Lenders | A4 Capital Partners`,description:`Idaho hard money loans for experienced investors and builders financing acquisitions, renovations and construction from Sun Valley to Boise and beyond.`,h1:`Hard Money Loans in Idaho for Real Estate Investors`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-10-01`,draftDescription:!1},{path:`/locations/hard-money-lenders-utah/`,title:`Utah Hard Money Lenders | A4 Capital Partners`,description:`Utah hard money loans for experienced investors and builders financing acquisitions, renovations and construction in Park City and statewide markets.`,h1:`Hard Money Loans in Utah for Real Estate Investors`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-10-01`,draftDescription:!1},{path:`/locations/hard-money-lenders-montana/`,title:`Montana Hard Money Lenders | A4 Capital Partners`,description:`Montana hard money loans for experienced investors and builders financing acquisitions, renovations and construction in Big Sky, Whitefish and Bozeman.`,h1:`Hard Money Loans in Montana for Real Estate Investors`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-10-01`,draftDescription:!1}],nf=[{path:`/`,title:`Hard Money & Fix and Flip Loans | Private Lender | A4 Capital Partners`,description:`Get fast hard money, fix & flip, and bridge loans from A4CP, a trusted private lender offering competitive rates and quick funding. Apply today.`,h1:`Private Real Estate Lender for Fix & Flip, Bridge, and New Construction Loans`,type:`Core page`,noindex:!1,lastmod:`2026-08-16`,draftDescription:!1},{path:`/recent-deals/`,title:`Recent Deals | Recently Funded Hard Money Loans | A4 Capital Partners`,description:`See recently funded A4 Capital Partners hard money loans â fix and flip, rehab, and new construction deals closed across Connecticut, New York, New Jersey and beyond.`,h1:`Recent Deals`,type:`Core page`,noindex:!1,lastmod:`2026-09-30`,draftDescription:!1},{path:`/dealanalyzer/`,title:`Hard Money Loan Calculator | Fix & Flip, LTV & LTC | A4`,description:`Free hard money loan calculator. Estimate monthly interest, LTV, LTC, total project cost, and potential profit on fix and flip, bridge, and construction deals.`,h1:`Hard Money Loan Calculator`,type:`Core page`,noindex:!1,lastmod:`2026-09-24`,draftDescription:!1},{path:`/about-us/`,title:`About A4 Capital Partners | Private Lending Firm`,de
39scription:`Learn about A4 Caoital Partners, our lending approach, leadership, and commitment to flexible real estate financing.`,h1:`A4 Capital Partners is the credit arm of Atlas Real Estate Partners, a $2Bn+ real estate platform`,type:`Core page`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/app/`,title:`Loan Application | A4 Credit Partners`,description:`Apply online for private real estate financing with A4 Credit Partners. Fast, simple application for qualified borrowers.`,h1:`Application Portal`,type:`Core page`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/blogs/`,title:`Blogs - A4 Capital Partners`,description:`Real estate lending guides, market insights, and investor strategies from A4 Capital Partners covering fix and flip, bridge, DSCR, and construction loans.`,h1:`A4 Atlas Partner News`,type:`Core page`,noindex:!1,lastmod:`2026-02-05`,draftDescription:!0},{path:`/brokers/`,title:`Broker Partnership Programs | A4 Credit Partners`,description:`Work with A4 Credit Partners as a broker and gain access to flexible private lending solutions and responsive underwriting.`,h1:`More than a lender, A True Partner`,type:`Core page`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/builders/`,title:`Builder Financing Solutions | A4 Credit Partners`,description:`Construction and development financing for builders seeking reliable capital for residential and commercial projects.`,h1:`Built to Scale Your Building Business`,type:`Core page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/careers/`,title:`Careers at A4 Credit Partners | Join Our Team`,description:`Explore career opportunities at A4 Credit Partners and join a growing private real estate finance team.`,h1:`Build your career with a team that values execution, integrity, and results.`,type:`Core page`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/contact-us/`,title:`Contact A4 Capital Partners | Private Lending Experts`,description:`Get in touch with A4 Capital Partners to discuss your real estate financing needs and loan options.`,h1:`Contact us`,type:`Core page`,noindex:!1,lastmod:`2026-08-25`,draftDescription:!1},{path:`/faqs/`,title:`FAQs - A4 Capital Partners`,description:`Answers to common questions about A4 Capital Partners loans, including rates, leverage, closing timelines, eligible properties, and how to apply.`,h1:`Any inquiry`,type:`Core page`,noindex:!1,lastmod:`2025-11-28`,draftDescription:!0},{path:`/locations/`,title:`Locations - A4 Capital Partners`,description:`Explore A4 Capital Partners lending locations across the East Coast, offering hard money, bridge, fix and flip, and construction loans to investors.`,h1:null,type:`Core page`,noindex:!1,lastmod:`2026-02-24`,draftDescription:!0},{path:`/press/`,title:`A4 Credit Partners News & Press Releases`,description:`Read the latest news, press releases, and media coverage from A4 Credit Partners, a private real estate financing firm.`,h1:`A4 Atlas Partner Press`,type:`Core page`,noindex:!1,lastmod:`2026-02-19`,draftDescription:!1},{path:`/acquisition/`,title:`Acquisition Loans for Real Estate Investors | A4 Capital Partner`,description:`Fast and flexible acquisition financing for real estate investors purchasing residential and commercial properties.`,h1:`About Acquisition Financing`,type:`Loan program page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/fix-flip-rehab/`,title:`Fix & Flip Loans for Real Estate Investors | A4 Capital Partners`,description:`Get rehab loans for investors and fast fix and flip financing. Fund property purchases and rehab costs with flexible terms, quick approvals and closings.`,h1:`About Fix & Flip / Rehab Financing`,type:`Loan program page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/new-construction/`,title:`New Construction Loans for Investors | A4 Capital Partners`,description:`Get new construction loans for investors with fast approvals, flexible terms, and funding for ground-up builds and real estate development projects.`,h1:`About New Construction Financing`,type:`Loan program page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/refinance/`,title:`Real Estate Refinance Loans | A4 Capital Partners`,description:`Get real estate refinance investment loan options with fast approvals, flexible terms, and funding to access equity or reduce your interest rates.`,h1:`About Fix & Flip / Rehab Financing`,type:`Loan program page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/commercial/`,title:`Commercial Loan Solutions for Investors | A4 Capital Partners`,description:`Get commercial loan solutions for investors with fast approvals, flexible terms, and funding for acquisitions, refinancing, and property growth today.`,h1:`About Commercial Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1}
39,{path:`/hospitality/`,title:`Hospitality Real Estate Financing | A4 Credit Partners`,description:`Hotel and hospitality property financing for acquisitions, refinances, and renovations with customized private lending solutions.`,h1:`Hospitality Growth & Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-07-17`,draftDescription:!1},{path:`/industrial/`,title:`Industrial Real Estate Loans | A4 Credit Partners`,description:`Financing for industrial properties such as warehouses and distribution centers with customized private loan options.`,h1:`A Guide to Industrial Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-07-20`,draftDescription:!1},{path:`/mixed-use/`,title:`Mixed-Use Property Loans | A4 Credit Partners`,description:`Financing solutions for mixed-use real estate projects, including acquisition, refinance, and development loans tailored to complex assets.`,h1:`Understanding Mixed-Use Real Estate Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/multi-family/`,title:`Multifamily Investment Loans | A4 Capital Partners`,description:`Get multifamily real estate loans and multifamily investment loans with fast approvals, flexible terms, and funding for rental portfolios.`,h1:`About Multifamily Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/office/`,title:`Office Real Estate Loans | A4 Capital Partners`,description:`Get office real estate loans with fast approvals, flexible terms, and funding for acquisition, refinance, and investment office property deals now.`,h1:`About Office Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/retail/`,title:`Retail Property Financing | A4 Credit Partners`,description:`Private lending solutions for retail real estate properties, including strip centers and standalone commercial assets.`,h1:`About Retail Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-07-20`,draftDescription:!1},{path:`/single-family/`,title:`Single Family Loan Investment | A4 Capital Partners`,description:`Get single family loan and single family investment loans with fast approvals, flexible terms, and funding to buy or refinance properties fast today.`,h1:`About Single-Family Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-08-04`,draftDescription:!1},{path:`/warehouse/`,title:`warehouse - A4 Capital Partners`,description:`Warehouse property financing from A4 Capital Partners. Flexible private loans for investors acquiring, refinancing, or repositioning warehouse real estate.`,h1:`About Warehouse Investments`,type:`Property type page`,noindex:!1,lastmod:`2026-07-13`,draftDescription:!0},{path:`/locations/bridge-loans-in-connecticut/`,title:`Connecticut Real Estate Bridge Loans | A4 Capital Partners`,description:`Bridge loans Connecticut offer a flexible path to real estate financing, helping investors cover funding gaps and move projects forward efficiently.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/bridge-loans-in-maine/`,title:`Maine Real Estate Bridge Loans | A4 Capital Partners`,description:`Access Bridge loans Maine with flexible funding options designed for fast closings, property purchases, and short-term real estate financing needs.`,h1:`Types of Real Estate Investors We Work With in Maine`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/bridge-loans-in-massachusetts/`,title:`Quick Bridge Financing in Massachusetts | A4 Capital Partners`,description:`Bridge loans Massachusetts solutions for fast real estate funding. Financing for acquisitions, fix-and-flips, and investment properties with flexible terms.`,h1:`Designed for the Right Projects and Partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/bridge-loans-in-new-hampshire/`,title:`New Hampshire Bridge Loans | A4 Capital Partners`,description:`Bridge loan New Hampshire offers a practical financing route for investors looking to close deals, improve properties, and move projects forward.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/bridge-loans-in-new-jersey/`,title:`New Jersey Bridge Loans | A4 Capital Partners`,description:`Bridge loans New Jersey investors use to move quickly on real estate deals. Short
39-term capital for acquisitions, value-add projects, and investment growth.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/bridge-loans-in-new-york/`,title:`Bridge Loans for New York Real Estate | A4 Capital Partners`,description:`Bridge loans New York provide strategic funding options for buyers looking to complete real estate transactions with greater speed and flexibility.`,h1:`Designed for Qualified Investors and Strong Opportunities`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/bridge-loans-in-pennsylvania/`,title:`Pennsylvania Bridge Loans for Real Estate | A4 Capital Partners`,description:`Bridge loans Pennsylvania investors use for fast real estate deals. Bridge financing Pennsylvania for acquisitions, rehab projects, and investments.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/bridge-loans-in-rhode-island/`,title:`Rhode Island Bridge Loans for Real Estate | A4 Capital Partners`,description:`Bridge loans Rhode Island offer a smart funding approach for investors needing capital during property purchases, sales, or redevelopment phases.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/connecticut-hard-money-lender/`,title:`Top Hard Money Lender in Connecticut | A4 Capital Partners`,description:`Hard money loans Connecticut for fast real estate financing solutions. A4CP offers flexible funding, quick approvals, and expert investor support. Today!`,h1:`Customized to suit the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-connecticut/`,title:`Private Construction Loans in Connecticut | A4 Capital Partners`,description:`Need construction financing in Connecticut? A4CP offers fast private loans, flexible lending terms, and reliable funding for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-maine/`,title:`Best Construction Loans in Maine | A4 Capital Partners`,description:`Find construction loans in Maine that are flexible with financing and suitable for construction, land, and development. Apply now for quick approval.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-massachusetts/`,title:`Massachusetts Construction Loans | A4 Capital Partners`,description:`Do you need construction loans in Massachusetts? Get custom financial solutions with competitive loan terms, quick approval process, and secure financing.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-new-hampshire/`,title:`Construction Loans in New Hampshire | A4 Capital Partners`,description:`Look into construction loans in New Hampshire that provide flexible financing options for new buildings and development sites. Quick approvals and best prices.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-new-jersey/`,title:`Flexible Construction Loans New Jersey | A4 Capital Partners`,description:`For residential and investment property development projects, obtain flexible construction loans in New Jersey with quick approvals and affordable rates.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-new-york/`,title:`Finance Your Next Build in New York with A4 Capital Partners`,description:`Apply for construction loans in New York to finance your new construction, renovation, and investment projects. Flexible financing options streamlined.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-pennsylvania/`,title:`Pennsylvania Construction Loans | A4 Capital Partners`,description:`A4 Capital Partners offers Construction Loans in Pennsylvania for investors & builders. Fast approvals, flexible funding for new builds & renovations. USA.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/construction-loans-in-rhode-island/`,title:`Rhode Island Construction Financing | A4 Capital Partners`,description:`Get your construction loans in Rho
39de Island with speedy approval, flexible terms, and guaranteed funding for new construction, renovation, and investments.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/dscr-loan-in-connecticut/`,title:`DSCR Loan In Connecticut | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/dscr-loan-in-maine/`,title:`DSCR Loan In Maine | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/dscr-loan-in-massachusetts/`,title:`DSCR Loan In Massachusetts | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/dscr-loan-in-new-hampshire/`,title:`DSCR Loan In New Hampshire | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/dscr-loan-in-new-jersey/`,title:`DSCR Loan In New Jersey | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/dscr-loan-in-new-york/`,title:`DSCR Loan In New York | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/dscr-loan-in-pennsylvania/`,title:`DSCR Loan In Pennsylvania | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/dscr-loan-in-rhode-island/`,title:`DSCR Loan In Rhode Island | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-in-connecticut/`,title:`Connecticut Fix and Flip Loans | A4 Capital Partners`,description:`Get Connecticut fix and flip loans with fast approvals, flexible terms, and funding for property purchase and renovation investment projects fast now.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-in-florida/`,title:`Fix and Flip Loans in Florida | A4 Capital Partners`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-in-maine/`,title:`Fix and Flip Loans in Florida | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-in-massachusetts/`,title:`Massachusetts Fix and Flip Loans | A4 Capital Partners`,description:`Boost property investments with Fix and Flip Loan Massachusetts, offering fast approvals, flexible funding, and renovation project financing solutions.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-in-new-hampshire/`,title:`Fix and Flip Loans in Florida | Fast Rehab Financing for Investors | A4CP`,description:`Secure fix and flip loans in Florida with fast underwriting and structured renovation financing built for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-in-pennsylvania/`,title:`Fix and Flip Loans in Pennsylvania | A4 Capital Partners`,description:`Transform property deals with fix and flip loans Pennsylvania, backed by flexible funding options and financing designed for real estate investors.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-new-jersey/`,title:`Fix and Flip Loans New Jersey | Fast ARV-Based Rehab Financing | A4CP`,description:`Secure fast, asset-based fix and flip loans in New Jersey with A4CP. Finance acquisition and renovation costs with structured investor-focused lending`,h1:`Fix and Flip Loans in New Jersey | Fast Rehab Financing for Real Estate Investors`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-new-york/`,title:`Fix and Flip Loans in New York | A4 Capital Partners`,description:`Find reliable fix and flip loans new york with speedy approvals, adaptable terms, and funding for property acquisition and renovation projects.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/fix-and-flip-loans-rhode-island/`,title:`Fix and Flip Loans in Rho
39de Island | A4 Capital Partners`,description:`Finance your next property venture using a Fix and Flip Loan Rhode Island option built for speed, flexibility, and successful renovation investments.`,h1:`Built for Rhode Island Investment Opportunities`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/florida-hard-money-lender/`,title:`Hard Money Lenders New York | Fast Investment Property Loans | A4CP`,description:`Secure fast, asset-based hard money loans in New York. A4CP funds fix & flip, rental, and multifamily investments across NYC and statewide. Get approved and close quickly.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/hard-money-financing-in-virginia/`,title:`Hard Money Financing in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-30`,draftDescription:!1},{path:`/locations/hard-money-lenders-atlanta/`,title:`Hard Money Lender in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-18`,draftDescription:!1},{path:`/locations/hard-money-lenders-baltimore/`,title:`Hard Money Lender in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-18`,draftDescription:!1},{path:`/locations/hard-money-lenders-charlotte-nc/`,title:`Hard Money Lender in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-18`,draftDescription:!1},{path:`/locations/hard-money-lenders-columbia-sc/`,title:`Hard Money Lender in Columbia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-30`,draftDescription:!1},{path:`/locations/hard-money-lenders-delaware/`,title:`Hard Money Lenders Delaware | A4 Capital Partners`,description:`Need hard money lenders Delaware investors trust? Get fast funding for fix-and-flips, rentals, and construction projects with flexible terms today.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/hard-money-lenders-georgia/`,title:`Fast Hard Money Loans in Georgia | A4 Capital Partners`,description:`Find private money lenders in Georgia providing flexible loan options, rapid approvals, and funding support for your next real estate opportunity.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/hard-money-lenders-greenville-sc/`,title:`Hard Money Lender in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-18`,draftDescription:!1},{path:`/locations/hard-money-lenders-jacksonville/`,title:`Hard Money Lenders Jacksonville | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-30`,draftDescription:!1},{path:`/locations/hard-money-lenders-maine/`,title:`Maine Real Estate Funding Solutions | A4 Capital Partners`,description:`Move forward with Hard money loan Maine when you need flexible capital solutions for investment properties, remodels, and real estate transactions.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/hard-money-lenders-maryland/`,title:`Fast Hard Money Loans in Maryland | A4 Capital Partners`,description:`Hard money lenders Maryland help investors secure fast funding for real estate ventures, including flips, rentals, and other investment opportunities.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/hard-money-lenders-nashville/`,title:`Hard Money Lender in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-30`,draftDescription:!1},{path:`/locations/hard-money-lenders-new-hampshire/`,title:`New Hampshire Hard Money Loans | A4 Capital Partners`,description:`Take advantage of hard money financing in New Hampshire for quick property funding, flexible loan options, and reliable c
39apital for real estate investments.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/hard-money-lenders-north-carolina/`,title:`North Carolina Hard Money Loans | A4 Capital Partners`,description:`Unlock real estate opportunities with hard money loans North Carolina offering investor-friendly financing, quick decisions, and adaptable loan options.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/hard-money-lenders-orlando/`,title:`Hard Money Lender in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-31`,draftDescription:!1},{path:`/locations/hard-money-lenders-philadelphia/`,title:`Hard Money Lenders Philadelphia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-31`,draftDescription:!1},{path:`/locations/hard-money-lenders-south-carolina/`,title:`Hard Money Lender in South Carolina | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-05-31`,draftDescription:!1},{path:`/locations/hard-money-lenders-tennessee/`,title:`Tennessee Real Estate Hard Money Loans | A4 Capital Partners`,description:`Hard money lenders Tennessee deliver streamlined financing solutions for investors seeking capital for flips, rentals, and profitable real estate ventures.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/massachusetts-hard-money-lender/`,title:`Hard Money Lender Massachusetts | A4 Capital Partners`,description:`Choose A4CP as your Hard Money Lender Massachusetts for efficient real estate financing, rapid approvals, adaptable funding options, and expert assistance.`,h1:`Designed to handle the right kinds of transactions and partnerships`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/new-hampshire-hard-money-lender/`,title:`New Hampshire hard money lender | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/new-jersey-hard-money-lender/`,title:`Hard Money Lenders New Jersey | A4 Capital Partners`,description:`A4 Capital Partners offers hard money loans in New Jersey with fast closings, flexible terms, quick approvals, and reliable investor financing.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/new-york-hard-money-lender/`,title:`Top New York Hard Money Lender | Fast & Easy Approval | A4CP`,description:`Hard money lender New York delivers practical real estate financing options with flexible funding structures and support for investors at every stage.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/pennsylvania-hard-money-lender/`,title:`Private Real Estate Funding Pennsylvania | A4 Capital Partners`,description:`Hard Money Lenders Pennsylvania for private real estate funding solutions. A4 Capital Partners offers flexible loans, quick a
39pprovals, expert support.`,h1:`Built for the Right Deals and the Right Partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/property-loan-in-connecticut/`,title:`Property Loans in Connecticut | A4 Capital Partners`,description:`Property Loan In Connecticut Real estate loans in Connecticut with flexible terms for residential and investment purposes. Fast approvals competitive rates.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/property-loan-in-maine/`,title:`Get a Property Loan in Maine | A4 Capital Partners`,description:`Looking for a property loan in Maine? Explore our range of affordable options for real estate financing, tailored to fit your needs. Contact us today!`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/property-loan-in-massachusetts/`,title:`Best Property Loan In Massachusetts`,description:`Property Loan In Massachusetts helps you secure funding for residential and investment properties with hassle free approvals,and fair rates.`,h1:`The Right Fit for the Right Kind of Deal`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/property-loan-in-new-hampshire/`,title:`Best Property Loans in New Hampshire | A4 Capital Partners`,description:`If you need property loans in New Hampshire, A4 Capital Partners can help with competitive rates and customized financing options. Contact us today!`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/property-loan-in-new-jersey/`,title:`Property Loan Options in New Jersey | A4 Capital Partners`,description:`Looking for a property loan in New Jersey? A4 Capital Partners offers a variety of loan options to help you secure your dream property. Contact us today.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/property-loan-in-new-york/`,title:`Secure Property Loans in new york | A4 Capital Partners`,description:`Looking for a secure property loan in New York? A4 Capital Partners offers quick approval and competitive rates for your real estate investment needs.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/property-loan-in-pennsylvania/`,title:`Trusted Property Loans in Pennsylvania | A4 Capital Partners`,description:`Are you seeking dependable property loans in Pennsylvania? Reach out to A4 Capital Partners for customized services in property finance solutions.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/property-loan-in-rhode-island/`,title:`Construction Loan In Rhode Island | A4 Capital Partners`,description:`Property Loan In Rhode Island provides tailored funding solutions for homes and investments in Rhode Island with quick approvals and attractive rates.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-02`,draftDescription:!1},{path:`/locations/rhode-island-hard-money-lender/`,title:`Hard Money Lenders in Rhode Island | Structured Investment Loans | A4CP`,description:`A4CP provides disciplined, asset-based hard money loans in Rhode Island for fix & flip, rental, and multifamily investors. Close with certainty and structured private capital.`,h1:`For the right kinds of transactions and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/south-carolina-hard-money-lender/`,title:`South Carolina Hard Money Loans | A4 Capital Partners`,description:`Discover hard money lenders South Carolina focused on fast approvals, convenient funding, and lending solutions for real estate investment goals.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/locations/virginia-hard-money-lender/`,title:`Hard Money Lender in Virginia | Private Real Estate Investment Financing | A4CP`,description:`Structured hard money loans in Virginia for investors acquiring, renovating, or refinancing real estate. Asset-based private capital with disciplined execution.`,h1:`Built for the right types of deals and partners`,type:`Location / SEO landing page`,noindex:!1,lastmod:`2026-07-09`,draftDescription:!1},{path:`/blogs/8-most-common-mistakes-developers-make-when-structuring-construction-financing/`,title:`8 Most Common Mistakes Developers Make When Structuring Construction Financing - A4 Capital Partners`,description:`Discover the 8 most common construction financing mistakes developers makeâfrom tight leverage to draw process issuesâand how better structuring can keep projects on track.`,h1:`8 Most Common Mistakes Developers Make When Structuring Construction Financing`,type:`Blog post`,noindex:!1,lastmod:`2026-07-13`,draftDescription:!1},{path:`/blogs/asset-based-lending-for-real-estate-investors-how-it-works/`,title:`Asset-Based Lending for Real Estate Investors: How It Works`,description:`Discover how asset-based lending helps real estate investors finance fix-and-flip, value-ad
39d, and construction projects by leveraging property value and execution, with first-lien bridge and construction loans from A4 Credit Partners.`,h1:`Asset-Based Lending for Real Estate Investors: How It Works`,type:`Blog post`,noindex:!1,lastmod:`2026-03-30`,draftDescription:!1},{path:`/blogs/banks-rejecting-real-estate-investors-2026/`,title:`Major Reasons Banks Are Saying No to Real Estate Investors in 2026`,description:`Why banks are rejecting real estate investor loan applications in 2026. Discover the tightened lending standards affecting fix-and-flip, bridge loans, and rental property financing for investors`,h1:`Major Reasons Banks Are Saying No to Real Estate Investors in 2026`,type:`Blog post`,noindex:!1,lastmod:`2026-05-24`,draftDescription:!1},{path:`/blogs/beginners-guide-to-real-estate-investment-financing-everything-you-need-to-know/`,title:`Beginner's Guide to Real Estate Investment Financing | A4CP`,description:`Beginner's guide to real estate investment financing by A4 Capital Partners. Know about the fix n flip loans, bridge loans, hard loans, DSCR loans, etc`,h1:`Beginnerâs Guide to Real Estate Investment Financing: Everything You Need to Know`,type:`Blog post`,noindex:!1,lastmod:`2026-05-26`,draftDescription:!1},{path:`/blogs/best-cities-connecticut-fix-and-flip-2026/`,title:`Fix and Flip Connecticut: Best Cities to Invest in 2026`,description:`Fix and flip Connecticut in 2026: compare Hartford, Bridgeport, Waterbury and 5 more markets on price, demand, margins, and the financing that wins deals`,h1:`Best Cities in Connecticut for Fix and Flip Investments in 2026`,type:`Blog post`,noindex:!1,lastmod:`2026-09-23`,draftDescription:!1},{path:`/blogs/best-hard-money-loan-strategies-for-fix-flip-investors/`,title:`Best Hard Money Loan Strategies for Fix & Flip Investors`,description:`Discover proven hard money loan strategies for fix & flip investors. Learn how professional investors use bridge loans, ARV calculations, and leverage to close deals fast.`,h1:`Best Hard Money Loan Strategies for Fix & Flip Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-05-28`,draftDescription:!1},{path:`/blogs/best-massachusetts-markets-for-flipping-houses/`,title:`Best Massachusetts Markets for Flipping Houses | A4CP`,description:`Where should you flip houses in Massachusetts ? Compare Boston, Worcester, Springfield & Lowell on price, demand, and returns for investors now.`,h1:`Best Massachusetts Markets for Flipping Houses in 2026`,type:`Blog post`,noindex:!1,lastmod:`2026-07-25`,draftDescription:!1},{path:`/blogs/best-uses-bridge-loans-rhode-island/`,title:`Best Uses for Bridge Loans in Rhode Island Real Estate | A4CP`,description:`Ten proven uses for bridge loans in Rhode Island real estate, from fix-and-flip and auctions to multifamily repositioning, with real underwriting insight.`,h1:`Best Uses for Bridge Loans in Rhode Island Real Estate`,type:`Blog post`,noindex:!1,lastmod:`2026-07-14`,draftDescription:!1},{path:`/blogs/blogs-fix-and-flip-loans-savannah-ga/`,title:`Fix and Flip Loans Savannah GA | A4 Capital Partners`,description:`Explore fix and flip loans Savannah investors use to fund purchase and renovation. Learn how rehab financing works, what lenders review and ke
39y local factors`,h1:`Fix and Flip Loans Savannah : A Real Estate Investorâs Guide to Financing Renovation Projects`,type:`Blog post`,noindex:!1,lastmod:`2026-09-17`,draftDescription:!1},{path:`/blogs/bridge-loan-vs-dscr-loan-in-rhode-island-which-is-right-for-investors/`,title:`Bridge Loan vs. DSCR Loan in Rhode Island: How to Choose | A4CP`,description:`Compare bridge loans and DSCR loans for Rhode Island investment property. When each fits, how the bridge-to-DSCR strategy works, and where refinance exits fail.`,h1:`Bridge Loan vs. DSCR Loan in Rhode Island: Which Is Right for Investors?`,type:`Blog post`,noindex:!1,lastmod:`2026-08-17`,draftDescription:!1},{path:`/blogs/bridge-loans-in-massachusetts/`,title:`Bridge Loans in Massachusetts | Complete Investor Guide | A4CP`,description:`How bridge loans work in Massachusetts. Investor's guide to rates, qualification, risks & real-world scenarios. Compare bridge vs. hard money, DSCR, HELOC financing.`,h1:`Bridge Loans in Massachusetts: Complete Investorâs Guide for 2026`,type:`Blog post`,noindex:!1,lastmod:`2026-07-10`,draftDescription:!1},{path:`/blogs/bridge-loans-new-york-nyc-2/`,title:`Bridge Loans New York & NYC: Fast Real Estate Financing | A4CP`,description:`Bridge loans New York and NYC - fast 5-10 day closing for real estate investors. Expert guide on bridge loan rates, costs, and NYC financing strategies for competitive markets.`,h1:`Bridge Loans NYC: Fast Real Estate Financing in New York`,type:`Blog post`,noindex:!1,lastmod:`2026-05-14`,draftDescription:!1},{path:`/blogs/bridge-loans-vs-hard-money-loans-the-investors-complete-comparison-guide/`,title:`Bridge Loans vs. Hard Money Loans: Complete Investor Guide | A4CP`,description:`Compare bridge loans vs hard money loans for real estate investing. Learn when to use each, costs, qualification requirements, and which fits your strategy`,h1:`Bridge Loans vs. Hard Money Loans: The Investorâs Complete Comparison Guide`,type:`Blog post`,noindex:!1,lastmod:`2026-05-25`,draftDescription:!1},{path:`/blogs/connecticut-bridge-loans/`,title:`Connecticut Bridge Loans: Complete Guide for Investors | A4CP`,description:`Learn how Connecticut bridge loans work, including rates, terms, requirements, & exit strategies for real estate investors seeking fast funding solutions.`,h1:`Connecticut Bridge Loans: Complete Guide for Real Estate Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-07-15`,draftDescription:!1},{path:`/blogs/fix-and-flip-loan-requirements-massachusetts/`,title:`Fix and Flip Loan Requirements in Massachusetts | A4CP`,description:`What Massachusetts lenders check before approving a fix and flip loan: ARV, LTC, LTV, reserves, exit, plus the rehab-budget items that sink files.`,h1:`How to Qualify for a Fix and Flip Loan in Massachusetts`,type:`Blog post`,noindex:!1,lastmod:`2026-08-16`,draftDescription:!1},{path:`/blogs/fix-and-flip-loan-requirements-what-lenders-really-check/`,title:`Fix and Flip Loan Requirements: What Lenders Really Check`,description:`Understand what lenders actually look for in fix and flip loan requirementsâfrom ARV and construction budgets to borrower experience and execution risk. Learn how to structure deals that get approved.`,h1:`Fix and Flip Loan Requirements: What Lenders Really Check`,type:`Blog post`,noindex:!1,lastmod:`2026-07-13`,draftDescription:!1},{path:`/blogs/fix-and-flip-loans-charleston-south-carolina/`,title:`Fix and Flip Loans Charleston South Carolina | A4CP`,description:`Planning a flip in Charleston? Learn how fix and flip loans in Charleston, South Carolina work, what lenders review, and how to prepare your deal`,h1:`Fix and Flip Loans in Charleston, South Carolina: What Local Investors Should Know Before They Borrow`,type:`Blog post`,noindex:!1,lastmod:`2026-09-22`,draftDescription:!1},{path:`/blogs/fix-and-flip-loans-in-new-jersey-monmouth-bergen-essex-morris-middlesex-union-counties/`,title:`Fix and Flip Loans in New Jersey: Monmouth, Bergen, Essex, Morris, Middlesex & Union Counties`,description:`Explore fix and flip loans and real estate investment opportunities in Monmouth, Bergen, Essex, Morris, Middlesex, and Union Counties across New Jersey`,h1:`Fix and Flip Loans in New Jersey: Monmouth, Bergen, Essex, Morris, Middlesex & Union Counties`,type:`Blog post`,noindex:!1,lastmod:`2026-09-12`,draftDescription:!1},{path:`/blogs/fix-and-flip-loans-massachusetts/`,title:`Fix and Flip Loans in Massachusetts: Expert Guide for Investors`,description:`Learn how fix and flip loans work in Massachusetts. Expert guide on hard money financing, bridge loans, ARV calculations, and lender selection for real estate investors.`,h1:`Fix and Flip Loans in Massachusetts: What Investors Need to Know`,type:`Blog post`,noindex:!1,lastmod:`2026-07-15`,draftDescription:!1},{path:`/blogs/fix-and-flip-loans-new-york-markets/`,title:`Fix & Flip Loans Westchester, Long Island, Queens & Montauk NY`,description:`Explore fix and flip loans and real estate investment opportunities in Westchester, Long Island, Queens, and Montauk, New York.`,h1:`Fix and Flip Loans in New York: Real Estate Investment Opportunities in Westchester, Long Island, Queens & Montauk`,type:`Blog post`,noindex:!1,lastmod:`2026-09-22`,draftDescription:!1},{path:`/blogs/fix-and-flip-loans-new-york/`,title:`Fix and Flip Loans New York: Rates & Requirements`,description:`Fix and flip loans in New York (NY) made simple. Get hard money and bridge financing from A4 Capital Partners with fast closings.`,h1:`Fix and Flip Loans in New York: Rates, Requirements & Investor Strategies for 2026`,type:`Blog post`,noindex:!1,lastmod:`2026-07-10`,draftDescription:!1},{path:`/blogs/fix-flip-loans-connecticut-investor-strategies/`,title:`Fix and Flip Loans in Connecticut: Expert Investor Strategies | A4CP`,description:`Learn how experienced Connecticut investors use fix and flip loans to scale portfolios, manage multiple projects, and leverage financing strategically.`,h1:`How Experienced Investors Use Fix and Flip Loans in Connecticut`,type:`Blog post`,noindex:!1,lastmod:`2026-06-09`,draftDescription:!1},{path:`/blogs/hard-money-lenders-massachusetts-fast-closings/`,title:`Hard Money Lenders Massachusetts: Close Deals Faster | A4CP`,description:`Need to move fast on a Massachusetts deal? See how hard money lenders fund in days, not months, with asset-based underwriting built for property investors.`,h1:`How Hard Money Lenders in Massachusetts Help Investors Close Deals Faster`,type:`Blog post`,noindex:!1,lastmod:`2026-07-11`,draftDescription:!1},{path:`/blogs/hard-money-lenders-rhode-island/`,title:`Hard Money Lenders Rhode Island | Fast Real Estate Financing`,de
39scription:`Get fast hard money loans in Rhode Island for fix-and-flip, bridge financing, and investment properties. Apply today with A4 Capital Partners.`,h1:`Hard Money Lenders Rhode Island: How to Finance Your Real Estate Investments Fast`,type:`Blog post`,noindex:!1,lastmod:`2026-07-10`,draftDescription:!1},{path:`/blogs/hard-money-loans-rhode-island/`,title:`Hard Money Loans Rhode Island: Investor Guide`,description:`Hard money loans Rhode Island investors actually use: LTV and LTC math, real closing costs, lender vetting, and when conventional financing beats private capital`,h1:`Hard Money Loans in Rhode Island: Complete Guide for Real Estate Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-09-08`,draftDescription:!1},{path:`/blogs/hard-money-vs-rehab-loans/`,title:`Hard Money vs. Rehab Loans: Complete Investor Guide | A4CP`,description:`Compare hard money vs rehab loans for real estate investing. Understand interest rates, closing speed, approval requirements & choose the right financing for your fix-flip project.`,h1:`Hard Money vs. Rehab Loans: Which Is Right for Your Project?`,type:`Blog post`,noindex:!1,lastmod:`2026-05-28`,draftDescription:!1},{path:`/blogs/how-dscr-loans-work-connecticut/`,title:`DSCR Loan Connecticut: How the Numbers Actually Work | A4CP`,description:`A DSCR loan Connecticut investors use is underwritten on rental cash flow. See how DSCR is calculated, why mill rates move the ratio, and what lenders check.`,h1:`How Do DSCR Loans Work in Connecticut? A Step-by-Step Guide for Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-08-11`,draftDescription:!1},{path:`/blogs/how-dscr-loans-work-rhode-island/`,title:`DSCR Loans Rhode Island: How They Work, Step by Step`,description:`How do DSCR loans Rhode Island investors use actually work? See the ratio, the step-by-step process, a worked example, and the risks before you apply.`,h1:`How Do DSCR Loans Work in Rhode Island? A Step-by-Step Guide for Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-08-10`,draftDescription:!1},{path:`/blogs/how-real-estate-investors-use-bridge-loans-in-competitive-markets/`,title:`How Real Estate Investors Use Bridge Loans in Competitive Markets`,description:`Learn how real estate investors use bridge loans to secure deals, finance renovations, and maximize returns in competitive markets. Discover key risks and strategies.`,h1:`How Real Estate Investors Use Bridge Loans in Competitive Markets?`,type:`Blog post`,noindex:!1,lastmod:`2026-07-13`,draftDescription:!1},{path:`/blogs/how-to-choose-the-right-hard-money-lender-for-your-real-estate-deal/`,title:`How to Choose the Right Hard Money Lender for Your Real Estate Deal - A4 Capital Partners`,description:`Learn how to choose the right hard money lender for your real estate deal, from rates, leverage, and speed to transparency and local market experience.`,h1:`How to Choose the Right Hard Money Lender for Your Real Estate Deal`,type:`Blog post`,noindex:!1,lastmod:`2026-04-28`,draftDescription:!0},{path:`/blogs/how-to-get-fix-and-flip-loans-connecticut/`,title:`Fix and Flip Loans Connecticut: How to Get One`,description:`How to get fix and flip loans Connecticut investors use: ARV, LTV, LTC, documents, underwriting, closing costs and draws, in 10 practical steps.`,h1:`How to Get Fix and Flip Loans in Connecticut: A Step-by-Step Guide`,type:`Blog post`,noindex:!1,lastmod:`2026-09-09`,draftDescription:!1},{path:`/blogs/how-to-qualify-dscr-loan-massachusetts/`,title:`How to Qualify for a DSCR Loan in Massachusetts | A4CP`,description:`What lenders review on a DSCR Loan Massachusetts application: DSCR math, rental income, credit, LTV, reserves and property eligibility`,h1:`How to Qualify for a DSCR Loan in Massachusetts: Investor Guide`,type:`Blog post`,noindex:!1,lastmod:`2026-08-12`,draftDescription:!1},{path:`/blogs/investment-property-loans-rhode-island/`,title:`Investment Property Loans in Rhode Island | A4CP`,description:`Investment property loans in Rhode Island explained: DSCR, bridge, fix-and-flip, multifamily and construction financing options for real estate investors.`,h1:`Investment Property Loans in Rho
39de Island: Financing Options for Real Estate Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-08-19`,draftDescription:!1},{path:`/blogs/multifamily-fix-flip-loans/`,title:`Multifamily Fix & Flip Loans: Hard Money & Bridge Financing Options | A4CP`,description:`Compare hard money, bridge, and rehab loans for multifamily fix-and-flip projects. Learn qualification requirements, rates, terms, and exit strategies for duplexes, triplexes, and apartment buildings.`,h1:`Flipping Multi-Unit Properties: Best Fix & Flip Loan Options Beyond Single Family`,type:`Blog post`,noindex:!1,lastmod:`2026-05-29`,draftDescription:!1},{path:`/blogs/new-construction-loans-rhode-island-small-builders/`,title:`New Construction Loans in Rhode Island for Small Builders`,description:`How new construction loans in Rhode Island work for small builders: draws, LTC vs LTV, documents, permitting timelines, and what lenders actually evaluate`,h1:`New Construction Loans in Rhode Island for Small Builders: What You Need to Know`,type:`Blog post`,noindex:!1,lastmod:`2026-08-22`,draftDescription:!1},{path:`/blogs/private-lenders-new-jersey/`,title:`Private Lenders in New Jersey: Find the Right Partner`,description:`Learn how private lenders in New Jersey fund fix-and-flip, bridge, rental, and commercial deals fast. Compare terms, dodge mistakes, and pick the right partner.`,h1:`Private Lenders in New Jersey: How to Find the Right Funding Partner`,type:`Blog post`,noindex:!1,lastmod:`2026-07-12`,draftDescription:!1},{path:`/blogs/private-lenders-new-york-how-to-find-funding-partner/`,title:`Private Lenders in New York: Find the Right Funding Partner`,description:`Discover how private lenders in New York work, types available, and how to evaluate partners. Learn red flags, loan programs, and comparison to bank financing.`,h1:`Private Lenders in New York: How to Find the Right Funding Partner`,type:`Blog post`,noindex:!1,lastmod:`2026-06-23`,draftDescription:!1},{path:`/blogs/private-money-lenders-connecticut/`,title:`Private Money Lenders Connecticut: How to Pick the Right One | a4cp`,description:`Comparing private money lenders Connecticut investors trust? Learn how to judge leverage, points, draw terms and CT-specific rules before you sign`,h1:`How to Find the Right Private Money Lenders in Connecticut for Your Real Estate Deal`,type:`Blog post`,noindex:!1,lastmod:`2026-08-13`,draftDescription:!1},{path:`/blogs/property-loan-connecticut/`,title:`Property Loan Connecticut: 2026 Investor Financing Guide | A4CP`,description:`Compare 2026 property loan options in Connecticut: bridge, fix-and-flip, DSCR, and rental financing, plus when a private lender beats the bank.`,h1:`Property Loan Connecticut: Financing Options for Investment Properties in 2026`,type:`Blog post`,noindex:!1,lastmod:`2026-07-17`,draftDescription:!1},{path:`/blogs/property-loan-in-rhode-island/`,title:`Property Loan Rhode Island: Top Mistakes to Avoid`,description:`Applying for a property loan in Rhode Island? Avoid these 13 costly mistakes investors make, from bad ARV math to weak exit plans, and close on time.`,h1:`Top Mistakes to Avoid When Applying for a Property Loan in Rhode Island`,type:`Blog post`,noindex:!1,lastmod:`2026-07-20`,draftDescription:!1},{path:`/blogs/qualify-property-loan-massachusetts/`,title:`How to Qualify for a Property Loan in Massachusetts | A4CP`,description:`Learn how to qualify for a property loan in Massachusetts: credit, down payment, LTV, and documents investors need, plus how private lenders approve fast.`,h1:`How to Qualify for a Property Loan in Massachusetts: A Complete Guide for Real Estate Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-07-18`,draftDescription:!1},{path:`/blogs/real-estate-financing-concepts-arv-ltv-ltc/`,title:`Real Estate Financing Concepts: ARV, LTV, LTC Explained for Investors`,description:`Master ARV, LTV, and LTC for real estate investing. Learn how these critical financing concepts determine your fix and flip loan success. Expert guide with real examples.`,h1:`Real Estate Financing Concepts: ARV, LTV, LTC Explained for Investors`,type:`Blog post`,noindex:!1,lastmod:`2026-06-12`,draftDescription:!1},{path:`/blogs/the-real-investors-guide-to-fix-and-flip-loans-in-new-jersey/`,title:`Hard Money Lender New Jersey | Fix and Flip Loans | A4 Capital Partners`,description:`Looking for a hard money lender in New Jersey? A4 Capital Partners funds fix and flip loans fast â closing in 5-10 days with up to 90% LTC. No income verification.`,h1:`The Real Investorâs Guide to Fix and Flip Loans in New Jersey`,type:`Blog post`,noindex:!1,lastmod:`2026-04-22`,draftDescription:!1},{path:`/blogs/the-role-of-balance-sheet-lenders-in-todays-real-estate-market/`,title:`Balance Sheet Lendersâ Role in Todayâs Real Estate Market`,description:`Discover how balance sheet lenders support todayâs real estate market with flexible capital, faster approvals, and long-term lending solutions.`,h1:`The Role of Balance Sheet Lenders in Todayâs Real Estate Market`,type:`Blog post`,noindex:!1,lastmod:`2026-07-13`,draftDescription:!1},{path:`/blogs/what-do-hard-money-lenders-connecticut-look-for/`,title:`What Do Hard Money Lenders in Connecticut Look For?`,de
39scription:`Hard money lenders Connecticut investors approach weigh value, leverage, ARV, renovation budgets and exit strategy. What to prepare before you apply`,h1:`What Do Hard Money Lenders in Connecticut Look for in a Real Estate Deal?`,type:`Blog post`,noindex:!1,lastmod:`2026-08-26`,draftDescription:!1},{path:`/blogs/why-real-estate-investors-choose-nyc-hard-money-lender/`,title:`Hard Money Lenders NYC: Fast Financing for Real Estate Investors`,description:`Discover why NYC investors use hard money lenders for quick closings, flexible terms, and bridge financing. Learn when to use private lenders vs. banks.`,h1:`Why Real Estate Investors Choose NYC Hard Money Lenders: The Speed and Flexibility Advantage`,type:`Blog post`,noindex:!1,lastmod:`2026-05-18`,draftDescription:!1},{path:`/press/atlas-real-estate-launches-small-balance-lending-platform/`,title:`Atlas Real Estate Launches Small Balance Lending Platform`,description:`Atlas Real Estate announces the launch of its small balance lending platform, expanding access to flexible financing solutions for real estate investors.`,h1:`Atlas Real Estate launches small-balance lending platform`,type:`Press release`,noindex:!1,lastmod:`2026-03-30`,draftDescription:!1},{path:`/press/atlas-real-estate-partners-launches-a4-credit-partners-a-small-balance-lending-platform/`,title:`Atlas Real Estate Launches A4 Capital Lending Platform`,description:`Atlas Real Estate Partners launches A4 Capital Partners, a small-balance lending platform offering faster, flexible mortgage solutions for real estate investors and developers.`,h1:`Atlas Real Estate Partners Launches A4 Capital Partners, a Small-Balance Lending Platform`,type:`Press release`,noindex:!1,lastmod:`2026-03-30`,draftDescription:!1},{path:`/gads/lp/`,title:`A4CP - A4 Capital Partners`,description:`Private real estate loans from A4 Capital Partners with fast closings and competitive rates. Request your quote for fix and flip, bridge, or construction.`,h1:`Real Estate Financing Made Smarter, Faster & Simpler.`,type:`Google Ads landing page`,noindex:!0,lastmod:`2026-08-16`,draftDescription:!0},{path:`/leadform/`,title:`Leadform - A4 Capital Partners`,description:`Request real estate financing from A4 Capital Partners. Share your deal details and get a fast, no-obligation quote for fix and flip, bridge, or new build.`,h1:`Real Estate Financing Made Smarter, Faster & Simpler.`,type:`Google Ads landing page`,noindex:!0,lastmod:`2026-05-22`,draftDescription:!0},{path:`/disclosures-and-licenses/`,title:`Disclosures & Licenses | A4 Credit Partners`,description:`View regulatory disclosures, licensing information, and compliance details for A4 Credit Partners.`,h1:`Disclosures Licenses`,type:`Legal / compliance`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/e-sign-consent/`,title:`E-Sign Consent | A4 Credit Partners`,description:`Review A4 Credit Partnersâ electronic signature consent agreement for secure and compliant digital communications and documentation.`,h1:`E-Sign Consent`,type:`Legal / compliance`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/privacy-ca/`,title:`California Privacy Rights | A4 Credit Partners`,description:`Information on California privacy rights and how A4 Credit Partners complies with applicable data protection regulations.`,h1:`Privacy CA`,type:`Legal / compliance`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/privacy-policy/`,title:`Privacy Policy | A4 Credit Partners`,description:`Review how A4 Credit Partners collects, uses, and protects personal information across its website and services.`,h1:`Privacy Policy`,type:`Legal / compliance`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/security/`,title:`Website Security | A4 Credit Partners`,description:`Learn how A4 Credit Partners safeguards user data and maintains secure systems for online loan applications.`,h1:`Security`,type:`Legal / compliance`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1},{path:`/terms/`,title:`Terms & Conditions | A4 Credit Partners`,description:`Read the terms and conditions governing the use of A4 Credit Partnersâ website, services, and loan application process.`,h1:`Terms`,type:`Legal / compliance`,noindex:!1,lastmod:`2026-07-07`,draftDescription:!1}];nf.push(...ef),nf.push(...tf);var rf=new Map(nf.map(e=>[e.path,e])),af=`https://a4cp.com`,of=`A4 Capital Partners`,sf=e=>`${af}${e}`;
39function cf(e,t){let n=e.split(`/`).filter(Boolean),r=[{name:`Home`,path:`/`}],i=`/`;return n.forEach((e,a)=>{i+=`${e}/`;let o=rf.get(i),s=a===n.length-1?o?.h1??t:o?.h1&&e!==`blogs`&&e!==`press`?o.h1:e.charAt(0).toUpperCase()+e.slice(1);r.push({name:s,path:i})}),r}function lf(e,t={}){let n=rf.get(e),r=t.title??n?.title??`A4 Capital Partners`,i=t.description??n?.description??``,a=t.noindex??n?.noindex??!1,o=sf(e),s=[{title:r},{name:`description`,content:i},{property:`og:title`,content:r},{property:`og:description`,content:i},{property:`og:type`,content:t.type??`website`},{property:`og:url`,content:o},{property:`og:site_name`,content:of},{name:`twitter:card`,content:`summary_large_image`},{name:`twitter:title`,content:r},{name:`twitter:description`,content:i}];t.image&&s.push({property:`og:image`,content:t.image},{name:`twitter:image`,content:t.image}),a&&s.push({name:`robots`,content:`noindex, follow`});let c=[];if(e!==`/`){let i=t.crumbs??cf(e,n?.h1??r);c.push({type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:i.map((e,t)=>({"@type":`ListItem`,position:t+1,name:e.name,item:sf(e.path)}))})})}for(let e of t.schema??[])c.push({type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,...e})});return{meta:s,links:[{rel:`canonical`,href:o}],scripts:c}}var uf={"@context":`https://schema.org`,"@type":`Organization`,name:of,url:`${af}/`,email:`[email protected]`,telephone:`+1-203-457-3787`,address:{"@type":`PostalAddress`,streetAddress:`470 James St. Suite 7`,addressLocality:`New Haven`,addressRegion:`CT`,postalCode:`06513`,addressCountry:`US`},parentOrganization:{"@type":`Organization`,name:`Atlas Real Estate Partners`}},df={"@context":`https://schema.org`,"@type":`WebSite`,name:of,url:`${af}/`},ff={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_LOVABLE_CONNECTOR_GOOGLE_ANALYTICS_API_KEY:`G-0M50HPD50G`,VITE_LOVABLE_CONNECTOR_GOOGLE_MAPS_BROWSER_KEY:`AIzaSyBmvJph4LmrbtW7skeczzpBIyb9WWzFKo4`,VITE_LOVABLE_CONNECTOR_GOOGLE_MAPS_TRACKING_ID:`9bd845869e57e009c1c618c26a8830fe`,VITE_SUPABASE_PROJECT_ID:`ootpzkcskxpfmoplzvaf`,VITE_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_PK4_1UVTLbCaTEM-u1asXg_Ihh0itzq`,VITE_SUPABASE_URL:`https://ootpzkcskxpfmoplzvaf.supabase.co`}.VITE_LOVABLE_CONNECTOR_GOOGLE_ANALYTICS_API_KEY,pf=!1;function mf(){if(pf||!ff||typeof document>`u`)return;pf=!0;let e=document.createElement(`script`);e.async=!0,e.src=`https://www.googletagmanager.com/gtag/js?id=${ff}`,document.head.appendChild(e),window.dataLayer=window.dataLayer||[],window.dataLayer.push([`js`,new Date]),window.dataLayer.push([`config`,ff])}function hf(e){!ff||!window.dataLayer||window.dataLayer.push([`event`,`page_view`,{page_path:e}])}var gf=!1;function _f(){gf||typeof document>`u`||(gf=!0,document.addEventListener(`click`,e=>{try{let t=e.target,n=t?.closest?.(`a, button, [role="button"], input[type="submit"], input[type="radio"], input[type="checkbox"], select, summary, label`)??t;if(!n)return;let r=n.closest(`a`),i=(n.innerText||n.value||n.getAttribute(`aria-label`)||``).trim().replace(/\s+/g,` `).slice(0,100),a=r?.href||``,o=a.startsWith(`tel:`),s={click_element:n.tagName.toLowerCase(),click_text:i,click_id:n.id||``,click_classes:(typeof n.className==`string`?n.className:``).slice(0,200),click_url:a,link_domain:r?new URL(a,location.href).hostname:``,outbound:r?new URL(a,location.href).hostname!==location.hostname:!1,page_path:location.pathname};if(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:`element_click`,...s}),ff&&window.dataLayer.push([`event`,`element_click`,s]),o){let e={phone_number:a.replace(/^tel:/i,``),click_text:i,page_path:location.pathname};window.dataLayer.push({event:`call_click`,...e}),ff&&window.dataLayer.push([`event`,`call_click`,e])}}catch{}},{capture:!0,passive:!0}))}function vf(){return(0,j.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,j.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,j.jsx)(`h1`,{className:`text-7xl font-bold text-foreground`,children:`404`}),(0,j.jsx)(`h2`,{className:`mt-4 text-xl font-semibold text-foreground`,children:`Page not found`}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`The page you're looking for doesn't exist or has been moved.`}),(0,j.jsx)(`div`,{className:`mt-6`,children:(0,j.jsx)(x,{to:`/`,className:`inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors `,children:`Go home`})})]})})}function yf({error:e,reset:t}){console.error(e);let n=i();return(0,A.useEffect)(()=>{jd(e,{boundary:`tanstack_root_error_component`})},[e]),(0,j.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-background px-4`,children:(0,j.jsxs)(`div`,{className:`max-w-md text-center`,children:[(0,j.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight text-foreground`,children:`This page didn't load`}),(0,j.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,j.jsxs)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-2`,children:[(0,j.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 transition-colors `,children:`Try again`}),(0,j.jsx)(`a`,{href:`/`,className:`inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2 text-sm font-medium text-foreground transition-colors `,children:`Go home`})]})]})})}var Q=je()({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`A4 Capital Partners | Real Estate Financing`},{name:`description`,content:`Flexible real estate financing for investors, builders, and property owners.`},{name:`author`,content:`A4 Capital Partners`},{property:`og:type`,content:`website`},{property:`og:site_name`,content:`A4 Capital Partners`},{name:`twitter:card`,content:`summary_large_image`}],scripts:[{type:`application/ld+json`,children:JSON.stringify(uf)},{type:`application/ld+json`,children:JSON.stringify(df)},{children:kd},{children:`
vendor: 323 bytes, line 39
39(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','
39GTM-KNC6KH3L
vendor: 3 bytes, line 39
39');
39`},{children:`
vendor: 102 bytes, line 39
39(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:
39856172
vendor: 216 bytes, line 39
39,hjsv:6};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
39`},{children:`(function(c,l,a,r,i,t,y){c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};t=l.createElement(r);t.async=1;t.src='https://www.clarity.ms/tag/'+i;y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);})(window,document,'clarity','script','x0v93tguwf');`}],links:[{rel:`stylesheet`,href:Ad},{rel:`icon`,href:`/favicon.png`,type:`image/png`},{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=Roboto:wght@400;500;600;700&family=Roboto+Slab:wght@400;500;600&display=swap`}]}),shellComponent:bf,component:xf,notFoundComponent:vf,errorComponent:yf});function bf({children:e}){return(0,j.jsxs)(`html`,{lang:`en`,children:[(0,j.jsx)(`head`,{children:(0,j.jsx)(_i,{})}),(0,j.jsxs)(`body`,{children:[(0,j.jsx)(`noscript`,{children:(0,j.jsx)(`iframe`,{src:`https://www.googletagmanager.com/ns.html?id=GTM-KNC6KH3L`,height:`0`,width:`0`,style:{display:`none`,visibility:`hidden`},title:`Google Tag Manager`})}),e,(0,j.jsx)(yi,{})]})]})}function xf(){let{queryClient:e}=Q.useRouteContext(),t=di({select:e=>e.location.pathname}),n=di({select:e=>e.location.searchStr});(0,A.useEffect)(()=>{T(),Te()},[t,n]),(0,A.useEffect)(()=>we(),[]),(0,A.useEffect)(()=>{mf(),_f()},[]),(0,A.useEffect)(()=>{hf(t+n)},[t,n]);let r=t===`/`||t===`/brokers/`||t===`/builders/`||/^\/gads\/(lp|connecticut)\/?$/.test(t)||[`acquisition`,`refinance`,`fix-flip-rehab`,`new-construction`,`single-family`,`multi-family`,`mixed-use`,`commercial`,`office`,`industrial`,`retail`,`warehouse`,`hospitality`].some(e=>t===`/${e}`),i=/^\/(gads\/(lp|connecticut|not-qualified)|leadform)\/?$/.test(t);return(0,j.jsxs)(Od,{client:e,children:[!i&&(0,j.jsx)(Wd,{overlay:r}),(0,j.jsx)(`main`,{children:(0,j.jsx)(ti,{})}),!i&&(0,j.jsx)(Jd,{}),!i&&(0,j.jsx)(Yd,{})]})}var Sf=D(`/`)({head:()=>({meta:[{title:`Hard Money & Fix and Flip Loans | Private Lender | A4 Capital Partners`},{name:`description`,content:`Private real estate lender for fix and flip, bridge, acquisition, refinance, and new construction loans.`},{property:`og:title`,content:`Hard Money & Fix and Flip Loans | A4 Capital Partners`},{property:`og:description`,content:`Fast, flexible real estate financing for investors.`},{property:`og:type`,content:`website`},{name:`twitter:card`,content:`summary_large_image`}]}),component:E(()=>O(()=>import(`./routes-BQKonmuM.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),`component`)}),Cf=D(`/about-us`)({head:()=>k(`about us | A4 Capital Partners`,`Learn more and connect with A4 Capital Partners.`),component:E(()=>O(()=>import(`./about-us-DIjAqC3m.js`),__vite__mapDeps([11,1,12,2,3,4,7,6,10,13])),`component`)}),wf=ve.find(e=>e.slug===`acquisition`),Tf=D(`/acquisition`)({head:()=>k(wf?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./acquisition-BVAarDTO.js`),__vite__mapDeps([14,1,15,2,3,4,7,9,13])),`component`)}),Ef=D(`/app`)({validateSearch:e=>{let t={};for(let n of[`email`,`phone`,`address`,`loan_type`,`loan_amount`,`deals`,`page`]){let r=e[n];typeof r==`string`&&r&&(t[n]=r)}return t},head:()=>k(`Apply for a Real Estate Loan | A4 Capital Partners`,`Submit your real estate financing request to A4 Capital Partners and get pre-approved with no credit score impact.`),component:E(()=>O(()=>import(`./app-ColriT4v.js`),__vite__mapDeps([16,1,3,2,4])),`component`)}),Df=D(`/blogs`)({component:E(()=>O(()=>import(`./blogs-D6xEaamm.js`),__vite__mapDeps([17,1])),`component`)}),Of=D(`/borrower`)({head:()=>k(`borrower | A4 Capital Partners`,`Learn more and connect with A4 Capital Partners.`),component:E(()=>O(()=>import(`./borrower-K5X3_mLd.js`),__vite__mapDeps([18,1,12,2,3,4,7,6,10,13])),`component`)}),kf=D(`/brokers`)({head:()=>k(`brokers | A4 Capital Partners`,`Learn more and connect with A4 Capital Partners.`),component:E(()=>O(()=>import(`./brokers-BjRbZ2aF.js`),__vite__mapDeps([19,1,12,2,3,4,7,6,10,13])),`component`)}),Af=D(`/builders`)({head:()=>k(`Builders & Investors | A4 Capital Partners`,`Flexible construction financing, streamlined draws, and direct lending support for builders and real estate investors.`),component:E(()=>O(()=>import(`./builders-Dud49t3c.js`),__vite__mapDeps([20,1,12,2,3,4,7,6,10,13])),`component`)}),jf=D(`/careers`)({head:()=>k(`careers | A4 Capital Partners`,`Learn more and connect with A4 Capital Partners.`),component:E(()=>O(()=>import(`./careers-Cmg5BB4U.js`),__vite__mapDeps([21,1,12,2,3,4,7,6,10,13])),`component`)}),Mf=ve.find(e=>e.slug===`commercial`),Nf=D(`/commercial`)({head:()=>k(Mf?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./commercial-DS5xoSXt.js`),__vite__mapDeps([22,1,15,2,3,4,7,9,13])),`component`)}),Pf=D(`/contact-us`)({head:()=>k(`contact us | A4 Capital Partners`,`Learn more and connect with A4 Capital Partners.`),component:E(()=>O(()=>import(`./contact-us-S5mdDRaP.js`),__vite__mapDeps([23,1,12,2,3,4,7,6,10,13])),`component`)}),Ff=()=>O(()=>import(`./dealanalyzer-crbfUrSZ.js`),__vite__mapDeps([24,1,12,2,3,4,7,6,10,13])),If=`Deal Analyzer | Free Hard Money Loan Calculator â LTV, LTC & Profit | A4`,Lf=`Free deal analyzer and hard money loan calculator. Estimate LTV, LTC, monthly interest, total project cost, and profit on fix and flip, bridge, and construction loans.`,Rf=D(`/dealanalyzer`)({head:()=>{let e=k(If,Lf);return{...e,meta:[...e.meta,{property:`og:url`,content:`https://a4cp.com/dealanalyzer/`}],links:[{rel:`canonical`,href:`https://a4cp.com/dealanalyzer/`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`WebApplication`,name:`A4 Capital Partners Deal Analyzer â Hard Money Loan Calculator`,url:`https://a4cp.com/dealanalyzer/`,applicationCategory:`FinanceApplication`,operatingSystem:`Any`,offers:{"@type":`Offer`,price:`0`,priceCurrency:`USD`},provider:{"@type":`Organization`,name:`A4 Capital Partners`,url:`https://a4cp.com/`}})},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:[{"@type":`ListItem`,position:1,name:`Home`,item:`https://a4cp.com/`},{"@type":`ListItem`,position:2,name:`Deal Analyzer`,item:`https://a4cp.com/dealanalyzer/`}]})},{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`FAQPage`,mainEntity:[{"@type":`Question`,name:`What is LTV vs. LTC?`,acceptedA
39nswer:{"@type":`Answer`,text:`Loan-to-value compares the loan amount to the property's after-repair value. Loan-to-cost compares the loan to the combined purchase price and renovation budget. Private lenders use both to size fix and flip and construction loans.`}},{"@type":`Question`,name:`How is monthly interest calculated?`,acceptedAnswer:{"@type":`Answer`,text:`Most short-term real estate loans are interest-only. Monthly interest is the loan amount multiplied by the annual rate, divided by twelve. Results are illustrative only and are not a commitment to lend.`}}]})}]}},component:E(Ff,`component`)}),zf=`Disclosures & Licenses`,Bf=D(`/disclosures-and-licenses`)({head:()=>k(zf+` | A4 Capital Partners`,`A4 Capital Partners `+zf.toLowerCase()+`.`),component:E(()=>O(()=>import(`./disclosures-and-licenses-D_OiCXhb.js`),__vite__mapDeps([25,1,12,2,3,4,7,6,10,13])),`component`)}),Vf=`e sign consent`.replace(/\b\w/g,e=>e.toUpperCase()),Hf=D(`/e-sign-consent`)({head:()=>k(Vf+` | A4 Capital Partners`,`A4 Capital Partners `+Vf.toLowerCase()+`.`),component:E(()=>O(()=>import(`./e-sign-consent-geMqFGde.js`),__vite__mapDeps([26,1,12,2,3,4,7,6,10,13])),`component`)}),Uf=D(`/faqs`)({head:()=>k(`Real Estate Loan FAQs | A4`,`Answers to common questions about A4 real estate financing.`),component:E(()=>O(()=>import(`./faqs-Du-iySvM.js`),__vite__mapDeps([27,1,12,2,3,4,7,6,10,13])),`component`)}),Wf=ve.find(e=>e.slug===`fix-flip-rehab`),Gf=D(`/fix-flip-rehab`)({head:()=>k(Wf?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./fix-flip-rehab-D_p-8q9I.js`),__vite__mapDeps([28,1,15,2,3,4,7,9,13])),`component`)}),Kf=ve.find(e=>e.slug===`hospitality`),qf=D(`/hospitality`)({head:()=>k(Kf?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./hospitality-BcHce_U-.js`),__vite__mapDeps([29,1,15,2,3,4,7,9,13])),`component`)}),Jf=ve.find(e=>e.slug===`industrial`),Yf=D(`/industrial`)({head:()=>k(Jf?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./industrial-DH_LBcUc.js`),__vite__mapDeps([30,1,15,2,3,4,7,9,13])),`component`)}),Xf=ve.find(e=>e.slug===`mixed-use`),Zf=D(`/mixed-use`)({head:()=>k(Xf?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./mixed-use-BcMREHSZ.js`),__vite__mapDeps([31,1,15,2,3,4,7,9,13])),`component`)}),Qf=ve.find(e=>e.slug===`multi-family`),$f=D(`/multi-family`)({head:()=>k(Qf?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./multi-family-C4xqZD8X.js`),__vite__mapDeps([32,1,15,2,3,4,7,9,13])),`component`)}),ep=ve.find(e=>e.slug===`new-construction`),tp=D(`/new-construction`)({head:()=>k(ep?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./new-construction-fNxOcy1s.js`),__vite__mapDeps([33,1,15,2,3,4,7,9,13])),`component`)}),np=D(`/not-qualified`)({head:()=>lf(`/not-qualified/`,{noindex:!0,title:`Application Update | A4 Capital Partners`,description:`An update on your application to A4 Capital Partners.`}),component:E(()=>O(()=>import(`./not-qualified-DsgOsRZX.js`),__vite__mapDeps([34,1,35,2])),`component`)}),rp=ve.find(e=>e.slug===`office`),ip=D(`/office`)({head:()=>k(rp?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./office-BlcEoQ_8.js`),__vite__mapDeps([36,1,15,2,3,4,7,9,13])),`component`)}),ap=D(`/press`)({component:E(()=>O(()=>import(`./press-D6xEaamm.js`),__vite__mapDeps([37,1])),`component`)}),op=`privacy ca`.replace(/\b\w/g,e=>e.toUpperCase()),sp=D(`/privacy-ca`)({head:()=>k(op+` | A4 Capital Partners`,`A4 Capital Partners `+op.toLowerCase()+`.`),component:E(()=>O(()=>import(`./privacy-ca-CkP89Lpc.js`),__vite__mapDeps([38,1,12,2,3,4,7,6,10,13])),`component`)}),cp=`privacy policy`.replace(/\b\w/g,e=>e.toUpperCase()),lp=D(`/privacy-policy`)({head:()=>k(cp+` | A4 Capital Partners`,`A4 Capital Partners `+cp.toLowerCase()+`.`),component:E(()=>O(()=>import(`./privacy-policy-D8Qb-_RQ.js`),__vite__mapDeps([39,1,12,2,3,4,7,6,10,13])),`component`)}),up=()=>O(()=>import(`./recent-deals-B3JjWJ4Z.js`),__vite__mapDeps([40,1,2,3,4,12,7,6,10,13,5])),dp=`Recent Deals | Recently Funded Hard Money Loans | A4 Capital Partners`,fp=`See recently funded A4 Capital Partners hard money loans â fix and flip, rehab, and new construction deals closed across Connecticut, New York, New Jersey and beyond.`,pp=D(`/recent-deals`)({head:()=>{let e=k(dp,fp);return{...e,meta:[...e.meta,{property:`og:url`,content:`https://a4cp.com/recent-deals/`}],links:[{rel:`canonical`,href:`https://a4cp.com/recent-deals/`}],scripts:[{type:`application/ld+json`,children:JSON.stringify({"@context":`https://schema.org`,"@type":`BreadcrumbList`,itemListElement:[{"@type":`ListItem`,position:1,name:`Home`,item:`https://a4cp.com/`},{"@type":`ListItem`,position:2,name:`Recent Deals`,item:`https://a4cp.com/recent-deals/`}]})}]}},component:E(up,`component`)}),mp=ve.find(e=>e.slug===`refinance`),hp=D(`/refinance`)({head:()=>k(mp?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./refinance-Cr8rN63I.js`),__vite__mapDeps([41,1,15,2,3,4,7,9,13])),`component`)}),gp=ve.find(e=>e.slug===`retail`),_p=D(`/retail`)({head:()=>k(gp?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./retail-D5R7MqZC.js`),__vite__mapDeps([42,1,15,2,3,4,7,9,13])),`component`)}),vp=`security`.replace(/\b\w/g,e=>e.toUpperCase()),yp=D(`/security`)({head:()=>k(vp+` | A4 Capital Partners`,`A4 Capital Partners `+vp.toLowerCase()+`.`),component:E(()=>O(()=>import(`./security-B4fMKPTX.js`),__vite__mapDeps([43,1,12,2,3,4,7,6,10,13])),`component`)}),bp=ve.find(e=>e.slug===`single-family`),xp=D(`/single-family`)({head:()=>k(bp?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./single-family-m0ujzqDe.js`),__vite__mapDeps([44,1,15,2,3,4,7,9,13])),`component`)}),Sp=`terms`.replace(/\b\w/g,e=>e.toUpperCase()),Cp=D(`/terms`)({head:()=>k(Sp+` | A4 Capital Partners`,`A4 Capital Partners `+Sp.toLowerCase()+`.`),component:E(()=>O(()=>import(`./terms-DgLDIbqA.js`),__vite__mapDeps([45,1,12,2,3,4,7,6,10,13])),`component`)}),wp=D(`/typ`)({head:()=>lf(`/typ/`,{noindex:!0,title:`Thank You | A4 Capital Partners`,description:`Your application to A4 Capital Partners has been received.`}),component:E(()=>O(()=>import(`./typ-3wJGBqps.js`),__vite__mapDeps([46,1,35,2])),`component`)}),Tp=ve.find(e=>e.slug===`warehouse`),Ep=D(`/warehouse`)({head:()=>k(Tp?.title||`Real Estate Financing`,`Flexible real estate financing from A4 Capital Partners.`),component:E(()=>O(()=>import(`./warehouse-CNOuWkqQ.js`),__vite__mapDeps([47,1,15,2,3,4,7,9,13])),`component`)}),Dp=D(`/blogs/`)({head:()=>k(`Real Estate Finance Insights | A4`,`Real estate lending guides, market insights, and investor strategies from A4.`),component:E(()=>O(()=>import(`./blogs.index-SzLVJOCc.js`),__vite__mapDeps([48,1,12,2,3,4,7,6,10,13])),`component`)}),Op=D(`/blogs/$`)({head:({params:e})=>k(`${ye(e._splat??`insights`)} | A4 Insights`,`Real estate finance insights from A4 Capital Partners.`,`article`),component:E(()=>O(()=>import(`./blogs._-DxDnq-Lc.js`),__vite__mapDeps([49,1,12,2,3,4,7,6,10,13])),`component`)}),kp={lp:{href:`tel:+19145609901`,label:`+1 914-560-9901`},lp2:{href:`tel:+19146012893`,label:`+1 914-601-2893`}},Ap=[{children:`
vendor: 323 bytes, line 39
39(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','
39GTM-KNC6KH3L
vendor: 3 bytes, line 39
39');
39`},{src:`https://www.googletagmanager.com/gtag/js?id=G-0M50HPD50G`,async:!0},{children:`
vendor: 118 bytes, line 39
39window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','
39G-0M50HPD50G
vendor: 3 bytes, line 39
39');
39`}];function jp({markets:e}){return(0,j.jsx)(`section`,{className:`bg-white py-16 md:py-20`,children:(0,j.jsxs)(`div`,{className:`mx-auto w-full max-w-[1300px] px-4`,children:[(0,j.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,j.jsx)(`h2`,{className:`text-[30px] font-bold leading-tight text-primary md:text-[40px]`,children:`Areas We Lend in Connecticut`}),(0,j.jsx)(`p`,{className:`mt-5 leading-7 text-muted-foreground`,children:`A4 Capital Partners lends throughout Connecticut â from Fairfield County's commuter and shoreline communities to the state's urban and inland markets â structuring financing around the property, project scope and exit strategy.`})]}),(0,j.jsx)(`div`,{className:`mt-10 grid grid-cols-2 gap-6 lg:grid-cols-4`,children:e.map(e=>(0,j.jsxs)(`div`,{className:`rounded-[10px] border border-border bg-muted p-7`,children:[(0,j.jsx)(`h3`,{className:`text-[20px] font-bold text-primary`,children:e.name}),(0,j.jsx)(`p`,{className:`mt-4 text-[15px] leading-7 text-muted-foreground`,children:e.copy})]},e.name))}),(0,j.jsx)(`div`,{className:`mt-10`,children:(0,j.jsx)(Pe,{href:`#apply`,children:`Apply Now`})})]})})}var Mp={h1:`Real Estate Financing Made Smarter, Faster & Simpler.`,intro:[`A4 Capital Partners is the credit arm of Atlas Real Estate Partners, a $2Bn+ real estate platform.`,`Built by investors, operators, and borrowers, A4 delivers institutional discipline with the entrepreneurial speed and simplicity real estate operators demand.`],formHeading:`Real estate financing made smarter, faster, simpler.`,formText:`Built by investors, operators, and borrowers. We deliver institutional discipline with the speed and simplicity real estate operators demand.`,repeatText:`Our Size & Capability Allows Us To Provide Tailored Solutions For Our Borrowers`,estimateText:`Stop guessing and start planning with confidence. Our operator-built platform gives you instant visibility into your potential funding, cash to close, interest rate options, and value outlook based on a few simple project details.`};function Np({phone:e}){return(0,j.jsx)(`div`,{className:`bg-primary text-primary-foreground`,children:(0,j.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1300px] flex-wrap items-center justify-center gap-x-8 gap-y-2 px-4 py-2.5 text-sm md:justify-end`,children:[(0,j.jsx)(`a`,{href:e.href,className:`font-bold `,children:e.label}),(0,j.jsx)(`a`,{href:`mailto:[email protected]`,className:`font-bold `,children:`[email protected]`})]})})}function Pp({phone:e}){return(0,j.jsxs)(`footer`,{className:`bg-primary text-primary-foreground`,children:[(0,j.jsx)(`div`,{className:`mx-auto w-full max-w-[1300px] px-4 py-16 md:py-20`,children:(0,j.jsxs)(`div`,{className:`grid gap-10 md:grid-cols-2 md:items-center`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h2`,{className:`text-[32px] font-bold leading-tight md:text-[40px]`,children:`Still Have Questions?`}),(0,j.jsx)(`p`,{className:`mt-3 max-w-md text-primary-foreground/70`,children:`Our team is here to help you move faster. Reach out and we'll get back to you shortly.`})]}),(0,j.jsxs)(`div`,{className:`flex flex-col gap-3 text-[15px] md:items-end`,children:[(0,j.jsx)(`a`,{href:e.href,className:`text-[20px] font-bold `,children:e.label}),(0,j.jsx)(`a`,{href:`mailto:[email protected]`,className:`font-bold `,children:`[email protected]`}),(0,j.jsx)(`span`,{className:`text-primary-foreground/70`,children:`470 James St. Suite 7, New Haven, CT 06513`})]})]})}),(0,j.jsx)(`div`,{className:`border-t border-primary-foreground/15`,children:(0,j.jsxs)(`div`,{className:`mx-auto flex w-full max-w-[1300px] flex-col items-center gap-3 px-4 py-6 text-[13px] text-primary-foreground/55 md:flex-row md:justify-between`,children:[(0,j.jsx)(`span`,{children:`© 2026 A4 Capital Partners. All Rights Reserved`}),(0,j.jsx)(`span`,{children:`Partner of Atlas Real Estate`})]})})]})}function Fp({copy:e,phone:t}){return(0,j.jsxs)(`section`,{className:`relative min-h-[100svh] overflow-hidden bg-primary text-primary-foreground`,children:[(0,j.jsx)(`img`,{decoding:`async`,src:Ve,alt:``,"aria-hidden":`true`,className:`absolute inset-0 h-full w-full object-cover`}),(0,j.jsx)(`div`,{className:`absolute inset-0 bg-black/55`}),(0,j.jsxs)(`div`,{className:`relative mx-auto flex min-h-[100svh] w-full max-w-[1300px] flex-col px-4 py-6`,children:[(0,j.jsx)(`div`,{className:`flex-none`,children:(0,j.jsx)(w,{dark:!0})}),(0,j.jsx)(`div`,{className:`flex flex-1 items-center`,children:(0,j.jsxs)(`div`,{className:`w-full`,children:[(0,j.jsx)(`h1`,{className:`max-w-[770px] text-[34px] font-bold leading-[1.15] tracking-[-0.8px] text-primary-foreground sm:text-[42px] lg:text-[52px] lg:leading-[59.8px] lg:tracking-[-1.28px]`,children:e.h1}),(0,j.jsx)(`div`,{className:`hidden sm:block`,children:e.intro.map(e=>(0,j.jsx)(`p`,{className:`mt-[18px] max-w-[770px] text-base leading-[1.62] text-primary-foreground`,children:e},e))}),(0,j.jsx)(`p`,{className:`mt-[14px] text-[19px] font-medium leading-[1.5] text-primary-foreground
39/85 sm:hidden`,children:`See why A4 is becoming the #1 choice for fix and flip, bridge, and new construction loans.`}),(0,j.jsxs)(`div`,{className:`mt-7 flex flex-wrap items-center gap-x-[30px] gap-y-5`,children:[(0,j.jsx)(Pe,{href:`#apply`,children:`Get Started`}),(0,j.jsxs)(`a`,{href:t.href,className:`block leading-tight`,children:[(0,j.jsx)(`span`,{className:`block text-sm text-primary-foreground/60`,children:`Call us.`}),(0,j.jsx)(`span`,{className:`block text-sm font-bold text-primary-foreground`,children:t.label})]}),(0,j.jsxs)(`a`,{href:`mailto:[email protected]`,className:`block leading-tight`,children:[(0,j.jsx)(`span`,{className:`block text-sm text-primary-foreground/60`,children:`Email us.`}),(0,j.jsx)(`span`,{className:`block text-sm font-bold text-primary-foreground`,children:`[email protected]`})]})]})]})})]})]})}function Ip(e){return(0,j.jsx)(`section`,{id:`apply`,className:`section scroll-mt-24 bg-muted`,children:(0,j.jsx)(`div`,{className:`site-container`,children:(0,j.jsx)(Be,{linked:!1})})})}function Lp(){return(0,j.jsx)(`section`,{id:`apply`,className:`section scroll-mt-24 bg-muted`,children:(0,j.jsxs)(`div`,{className:`site-container`,children:[(0,j.jsxs)(`div`,{className:`mx-auto max-w-[760px] text-center`,children:[(0,j.jsx)(`h2`,{className:`section-title`,children:`Submit an application`}),(0,j.jsx)(`p`,{className:`mt-4 leading-7 text-muted-foreground`,children:`Tell us about yourself and your project â we'll show you exactly how we can help fund it.`}),(0,j.jsx)(`p`,{className:`mt-2 text-sm font-bold text-primary`,children:`Time to complete 2-3 minutes.`})]}),(0,j.jsx)(`div`,{className:`mt-10`,children:(0,j.jsx)(xe,{linked:!1})})]})})}function Rp({copy:e}){return(0,j.jsx)(`section`,{className:`bg-background py-16 md:py-[72px]`,children:(0,j.jsxs)(`div`,{className:`mx-auto grid w-full max-w-[1440px] gap-12 px-5 sm:px-8 lg:grid-cols-[minmax(320px,440px)_minmax(0,1fr)] lg:items-center lg:gap-20 xl:px-14`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h2`,{className:`max-w-[420px] text-[40px] leading-[1.16] text-foreground md:text-[52px]`,children:`Built for Repeat Borrowers`}),(0,j.jsx)(`p`,{className:`mt-4 max-w-[440px] text-lg leading-[1.6] text-foreground md:text-[23px]`,children:e.repeatText}),(0,j.jsx)(`div`,{className:`mt-7 flex justify-center`,children:(0,j.jsx)(_e,{asChild:!0,className:`h-[54px] rounded-full px-8 text-base font-bold`,children:(0,j.jsx)(`a`,{href:`#apply`,children:`Apply Now`})})})]}),(0,j.jsxs)(`div`,{className:`grid grid-cols-2 gap-5 sm:grid-cols-2 xl:grid-cols-3`,children:[(0,j.jsx)(Le,{value:`5-10 Days`,label:`Average Processing Time`}),(0,j.jsx)(Le,{value:`8.5%+`,label:`Loan Rates starting at`}),(0,j.jsx)(Le,{value:`75%`,label:`Loan-to-Value up to`}),(0,j.jsx)(Le,{value:`90%`,label:`Loan to Cost up to`}),(0,j.jsx)(Le,{value:`$500K+`,label:`Loan Size`}),(0,j.jsx)(Le,{value:`None`,label:`Prepayment Penalty`})]})]})})}function zp(){return(0,j.jsx)(`section`,{className:`bg-primary text-primary-foreground`,children:(0,j.jsxs)(`div`,{className:`mx-auto w-full max-w-[1330px] px-4 py-16 md:py-20`,children:[(0,j.jsx)(`h2`,{className:`max-w-[700px] text-[34px] font-bold capitalize leading-[1.2] tracking-[-0.9px] text-primary-foreground sm:text-[42px] lg:text-[52px] lg:leading-[62.4px]`,children:`Financing That Works For You`}),(0,j.jsx)(`div`,{className:`mt-10 h-px w-full bg-primary-foreground/10`}),ze.map(e=>(0,j.jsxs)(`div`,{className:`group`,children:[(0,j.jsxs)(`div`,{className:`flex flex-col gap-2 py-6 md:flex-row md:items-center md:justify-between md:gap-10`,children:[(0,j.jsx)(`h3`,{className:`max-w-[700px] text-[26px] font-bold capitalize leading-[1.22] tracking-[-0.72px] text-primary-foreground transition-colors duration-300 md:text-[36px] md:leading-[44px]`,children:e.title}),(0,j.jsx)(`p`,{className:`hidden max-w-[550px] text-[17px] leading-[1.5] text-primary-foreground/70 md:block md:text-[20px] md:leading-[30px]`,children:e.text})]}),(0,j.jsx)(`div`,{className:`h-px w-full bg-primary-foreground/10`})]},e.title)),(0,j.jsx)(`div`,{className:`mt-12 flex justify-center`,children:(0,j.jsx)(Pe,{href:`#apply`,className:`border-[var(--accent)]! bg-[var(--accent)]! text-[var(--accent-foreground)]! `,children:`Apply Now`})})]})})}function Bp({variant:e,copy:t=Mp,phone:n,markets:r}){let i=n??kp[e];
39return e===`lp`?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Np,{phone:i}),(0,j.jsx)(Fp,{copy:t,phone:i}),(0,j.jsx)(Ip,{copy:t}),(0,j.jsx)(Fe,{linked:!1}),(0,j.jsx)(Re,{}),(0,j.jsx)(Rp,{copy:t}),(0,j.jsx)(Ie,{linked:!1}),r&&(0,j.jsx)(jp,{markets:r}),(0,j.jsx)(zp,{}),(0,j.jsx)(We,{linked:!1}),(0,j.jsx)(Se,{linked:!1}),(0,j.jsx)(Pp,{phone:i})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Np,{phone:i}),(0,j.jsx)(Fp,{copy:t,phone:i}),(0,j.jsx)(Lp,{}),(0,j.jsx)(Fe,{linked:!1}),(0,j.jsx)(Re,{}),(0,j.jsx)(Rp,{copy:t}),(0,j.jsx)(Ie,{linked:!1}),r&&(0,j.jsx)(jp,{markets:r}),(0,j.jsx)(Se,{linked:!1}),(0,j.jsx)(zp,{}),(0,j.jsx)(Pp,{phone:i})]})}var Vp=D(`/gads/connecticut`)({head:()=>{let e=lf(`/gads/connecticut/`,{title:`Connecticut Hard Money Loans | A4 Capital Partners`,description:`Fast private real estate loans across Connecticut. Fix and flip, bridge, and ground-up construction financing from a New Haven-based lender. Get your rate today.`,noindex:!0});return{...e,scripts:[...e.scripts,...Ap]}},component:E(()=>O(()=>import(`./gads.connecticut-Dtd3me2u.js`),__vite__mapDeps([50,1])),`component`)}),Hp=D(`/gads/lp`)({head:()=>{let e=lf(`/gads/lp/`,{noindex:!0});return{...e,scripts:[...e.scripts,...Ap]}},component:E(()=>O(()=>import(`./gads.lp-u1RQJ8wW.js`),__vite__mapDeps([51,1])),`component`)}),Up=D(`/gads/not-qualified`)({head:()=>lf(`/gads/not-qualified/`,{noindex:!0,title:`Application Update | A4 Capital Partners`,description:`An update on your application to A4 Capital Partners.`}),component:E(()=>O(()=>import(`./gads.not-qualified-DsgOsRZX.js`),__vite__mapDeps([52,1,35,2])),`component`)}),Wp=D(`/gads/typ`)({head:()=>lf(`/gads/typ/`,{noindex:!0,title:`Thank You | A4 Capital Partners`,description:`Your application to A4 Capital Partners has been received.`}),component:E(()=>O(()=>import(`./gads.typ-3wJGBqps.js`),__vite__mapDeps([53,1,35,2])),`component`)}),Gp=D(`/locations/`)({head:()=>k(`Real Estate Lending Locations | A4`,`Explore A4 Capital Partners lending locations and financing programs.`),component:E(()=>O(()=>import(`./locations.index-rhWZCZfT.js`),__vite__mapDeps([54,12,1,2,3,4,7,6,10,13])),`component`)}),Kp={"connecticut-hard-money-lender":[[{t:`h2`,text:`Hard Money Loan in Connecticut Private Lender for Real Estate`},{t:`p`,text:`Speed decides who wins a deal in Connecticutâs investor market â and thatâs exactly what hard money loans Connecticut financing is built for. Rather than relying on personal income or tax returns, approval is based on the property itself: its current condition and its After Repair Value (ARV). That single difference is why investors across the state turn to private money lenders Connecticut offers when a deal canât wait on a 45-day bank timeline.`},{t:`p`,text:`A4CP has spent years refining a lending process built around one goal: get capital to serious investors fast, without cutting corners on underwriting.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`A Professional Hard Money Lender in Connecticut Focused on Execution`},{t:`p`,text:`Connecticut isnât one market â itâs several. Urban redevelopment plays in Hartford, suburban rental demand near the coast, and high-value renovation flips in Fairfield County all require different underwriting instincts. Thatâs where generic real estate loans Connecticut programs fall short, and where A4CPâs experience matters.`},{t:`p`,text:`Our financing covers:`},{t:`ul`,items:[`Renovation-driven acquisitions`,`Bridge financing between transactions`,`Stabilization and lease-up projects`,`Rental portfolio expansion`,`Multifamily repositioning`,`Portfolio-wide refinancing`]},{t:`p`,text:`We underwrite each deal on its investment merit, valuation, and exit plan, not a borrowerâs mortgage eligibility checklist.`}],[{t:`h2`,text:`Flexible Real Estate Financing for Connecticut Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Ready to Get Moving in Connecticut?`},{t:`p`,text:`The investment options available in Connecticut usually operate fast, especially those in commuter zones that serve New York City. A4 Capital Partners offers timely responses, definite terms, and reliable follow-through when time is critical.`},{t:`p`,text:`Our streamlined process from deal review to closing enables investors to avoid unnecessary delays and act swiftly in markets such as Fairfield County and other suburban investments.`},{t:`h4`,text:`Principal-Led Decisions`},{t:`p`,text:`Direct access to experienced decision-makers allows faster responses, quicker approvals, and improved certainty throughout the lending process.`},{t:`h4`,text:`Streamlined Underwriting`},{t:`p`,text:`Asset-focused underwriting and early deal alignment help establish reliable loan structures while accelerating execution timelines.`},{t:`h4`,text:`In-House Execution`},{t:`p`,text:`Underwriting, funding, and servicing are handled internally, reducing handoffs and helping keep transactions on schedule from approval through closing.`}],[{t:`h2`,text:`Our size and strengths give us the ability to be versatile and provide tailor-made loans that fit into our
39clientsâ strategies.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h1`,text:`Customized to suit the right types of deals and partners`},{t:`h2`,text:`A4 Who Typically Worked With in Connecticut`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Financing Real Estate in Connecticut`},{t:`p`,text:`A4 Capital Partners offers asset based lending with the intention of supporting investors with the process of acquiring and re-financing real estate. Submit your deal today and get financing that is specifically intended for Connecticut investors.`}],[{t:`h2`,text:`Connecticut Hard Money Lending for Investors`},{t:`p`,text:`We provide lending options specifically tailored to real estate professionals in need of reliable and timely funding.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`How is A4CP Different from Other Hard Money Lenders in Connecticut?`},{t:`p`,text:`All hard money lenders in Connecticut do not have strict underwriting standards.`},{t:`p`,text:`A4CP follows a combination of proper execution with risk evaluation for every deal by looking into the following factors:`},{t:`ul`,items:[`ARV projections`,`Feasibility of renovation`,`Exit strategy`,`Conservative leverage ratios`]},{t:`p`,text:`We are not only concerned about closing the deals, but making the capital work in favor of our investors.`},{t:`h2`,text:`Strategic Advantages of Hard Money Loans in Connecticut`},{t:`p`,text:`Private money plays a strategic role in an acquisition context.`},{t:`p`,text:`Engaging in business with knowledgeable hard money lenders in Connecticut helps investors:`},{t:`ul`,items:[`Acquire properties within tight time frames`,`Acquire properties that require renovations or repurposing`,`Skip lengthy underwriting processes`,`Keep negotiating power intact`,`Re-deploy funds effectively`]},{t:`p`,text:`Efficiency through structure, not through hurried financing.`},{t:`h2`,text:`Strategic Lending Within Connecticutâs Top Investment Regions`},{t:`p`,text:`Investments in Connecticut are significantly driven by the commuter market and the suburbs. A4CP delivers strategic financing within the top investment regions in Connecticut.`},{t:`p`,text:`In regions such as Stamford, Greenwich, and Norwalk, investors seek value add deals due to their proximity to New York City employment centers. High-end areas in Fairfield County still receive a lot of interest from buyers for renovations.`},{t:`p`,text:`Moving inward, regions such as New Haven, Hartford, and Bridgeport have opportunities for investors seeking underperforming properties that can be repositioned into stronger assets. The competition in zip codes such as 06902, 06830, and 06511 demands quick private lending to close out deals before conventional finance timeframes.`},{t:`p`,text:`A4CP strategically lends within pricing and deal dynamics of Connecticutâs top investment regions.`}],[{t:`map`}],[{t:`h2`,text:`Find out everything you want to know from Partners`},{t:`p`,text:`Real estate finance explained. Find out more about different loan programs, processes, properties accepted, and how A4 Capital Partners can help you complete your real estate deals in Connecticut quickly and efficie
39ntly.`},{t:`h3`,text:`How are loan amounts determined?`},{t:`p`,text:`Loan structure is based on current asset value, projected stabilized value, leverage thresholds, and renovation feasibility where applicable.`},{t:`h3`,text:`Do you finance renovation-heavy projects?`},{t:`p`,text:`Yes. Many Connecticut opportunities involve transitional or distressed properties.`},{t:`p`,text:`We evaluate projected value and scope feasibility before structuring capital.`},{t:`h3`,text:`Do you lend on multifamily assets?`},{t:`p`,text:`Yes. We finance small multifamily and repositioning opportunities statewide.`},{t:`h3`,text:`How quickly can a transaction close?`},{t:`p`,text:`Private lending is structured to move materially faster than conventional bank financing, subject to documentation and third-party requirements.`},{t:`h3`,text:`What factors most influence approval?`},{t:`p`,text:`Primary considerations include realistic ARV modeling, renovation feasibility, defined exit planning, and appropriate leverage structure.`}]],"fix-and-flip-loans-in-florida":[[{t:`h2`,text:`Fix and Flip Loans in Florida | Fast Rehab Financing for Real Estate Investors`},{t:`p`,text:`A4CP provides structured fix and flip loans in Florida that real estate investors rely on to acquire, renovate, and resell residential properties with speed and confidence. Our Fix and Flip Financing Florida investors trust is purpose-built for execution helping you secure opportunities, complete renovations efficiently, and exit projects profitably across Miami, Tampa, Orlando, Jacksonville, and Fort Lauderdale.`},{t:`p`,text:`Floridaâs population growth, housing demand, and active resale markets make it one of the strongest renovation investment states in the country. Investors need capital that moves as fast as the market. As a trusted Investment Property Loan Florida provider, A4CP structures hard money financing around property value, After Repair Value (ARV), and exit strategy not traditional income-based lending requirements.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Your Reliable Private Lender for Fix and Flip Loans in Florida`},{t:`p`,text:`Floridaâs real estate market moves fast and so does A4CP. As a dedicated investment property lender in Florida, we focus on the strength of your project and the opportunity in your local market, not rigid banking checklists that slow deals down.`},{t:`p`,text:`Our programs support:`},{t:`ul`,items:[`Single-family renovation loans across Miami-Dade, Broward, and Palm Beach`,`Condo and townhouse flips in high-demand Florida beach and urban markets`,`Small multifamily repositioning in Tampa, Orlando, and Jacksonville`,`Distressed property acquisitions in Floridaâs growing suburban corridors`,`Value-add residential investments in emerging Florida neighborhoods`]}],[{t:`h2`,text:`Competitive Rates on Investment Property Loan Florida Programs`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Financing Structured Around Investor Execution`},{t:`p`,text:`Traditional lenders are not built for Florida's fast-moving renovation market. Our Fix and Flip Financing Florida programs are structured around how investors actually work not how banks prefer to lend.`},{t:`h4`,text:`ARV-Based Lending`},{t:`p`,text:`Allows loan sizing based on projected value after improvements.`},{t:`h4`,text:`Structured Rehab Draws`},{t:`p`,text:`Release renovation funds in stages aligned with project milestones.`},{t:`h4`,text:`Short-Term Loan Structures`},{t:`p`,text:`Align financing with resale or refinance timelines, helping investors reduce holding costs and protect margins.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Typically Works With in Florida`},{t:`h3`,text:`Investors`}
39,{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Ready to Fund Your Next Florida Fix and Flip Project?`},{t:`p`,text:`Have a Florida property under contract or preparing to submit an offer? A4CP provides fast underwriting decisions and structured Fix and Flip Financing Florida aligned with your project timeline and investment goals.`},{t:`p`,text:`Submit your deal today and receive Investment Property Loan Florida terms built for Floridaâs competitive real estate market not yesterdayâs banking standards.`}],[{t:`h2`,text:`Types of Fix and Flip Loans In Florida You Can Apply For`},{t:`p`,text:`Our lending solutions are structured for professional real estate operators who require dependable, time-sensitive financing.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Why Investors Choose Fix and Flip Loans`},{t:`p`,text:`Floridaâs real estate market moves quickly, particularly in high-demand metro areas where inventory remains limited and competition remains strong.`},{t:`p`,text:`Working with A4CP allows investors to:`},{t:`ul`,items:[`Close quickly on acquisition opportunities`,`Compete effectively against cash buyers`,`Finance renovation-heavy properties`,`Avoid lengthy conventional underwriting timelines`,`Preserve liquidity throughout construction`,`Execute time-sensitive projects with confidence`]},{t:`p`,text:`Reliable Fix and Flip Financing Florida investors depend on can create a meaningful competitive advantage when timing impacts deal success.`},{t:`h2`,text:`Flexible Rehab Financing for Florida Investment Properties`},{t:`p`,text:`Every renovation project involves unique timelines, budgets, and operational challenges. Our financing programs are designed to adapt to real construction scenarios and investor objectives.`},{t:`p`,text:`Programs may include:`},{t:`ul`,items:[`Interest-only payments during renovation`,`Flexible draw schedules`,`Transitional bridge financing`,`Early payoff flexibility where applicable`]},{t:`p`,text:`We structure capital solutions that support execution from acquisition through final disposition.`},{t:`h2`,text:`The A4CP Advantage for Florida Real Estate Investors`},{t:`p`,text:`Not every lender understands the realities of renovation-driven investing. A4CP combines disciplined underwriting with execution-focused service designed specifically for real estate investors.`},{t:`p`,text:`Borrowers benefit from:`},{t:`ul`,items:[`Transparent loan structures`,`Predictable funding timelines`,`Asset-based underwriting`,`Direct communication throughout the loan lifecycle`,`Long-term lending relationships`]},{t:`p`,text:`Our objective is to become a trusted capital partner investors rely on across multiple projects rather than a one-time transaction provider.`},{t:`h2`,text:`Understanding the Florida Fix and Flip Opportunity`},{t:`p`,text:`Florida remains one of the nationâs most active real estate investment markets. Continued population migration, strong job growth, and ongoing housing demand create opportunities for investors focused on acquisition, renovation, and resale strategies.`},{t:`p`,text:`Major markets including Miami, Orlando, Tampa, Jacksonville, and Fort Lauderdale continue to generate demand for updated housing inventory. Investors who succeed typically focus on disciplined acquisitions, realistic renovation budgets, and clearly defined exit strategies.`},{t:`p`,text:`Access to dependable fix and flip loans in Florida allows investors to act quickly while managing risk in rapidly evolving local markets.`},{t:`h2`,text:`Who Our Fix and Flip Loans Are Designed For`},{t:`p`,text:`Our programs are built for:`}
39,{t:`ul`,items:[`Real estate investors acquiring value-add properties`,`Operators managing multiple renovation projects`,`Investors seeking an Investment Property Loan Florida solution`,`First-time fix and flip investors`,`Borrowers refinancing active renovation projects`,`Investors expanding residential portfolios`]},{t:`p`,text:`If your strategy involves acquiring, improving, and exiting properties efficiently, our financing solutions are designed to support your goals.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Learn more about available financing programs, eligibility requirements, renovation funding structures, underwriting criteria, and property types eligible for financing. A4 Capital Partners provides clear guidance and dependable capital solutions designed to help Florida investors move forward with confidence.`},{t:`h3`,text:`What is a fix and flip loan in Florida?`},{t:`p`,text:`A fix and flip loan is short-term financing designed for real estate investors to purchase, renovate, and resell properties for profit. In Florida, these loans are typically based on the propertyâs value and After Repair Value (ARV), rather than the borrowerâs income or credit profile.`},{t:`h3`,text:`How fast can I get approved and funded?`},{t:`p`,text:`Approval and funding timelines are typically fast, with many deals closing in about 5â10 days depending on the property and documentation. This speed allows investors to compete effectively in Floridaâs fast-moving real estate market.`},{t:`h3`,text:`What types of properties are eligible for financing?`},{t:`p`,text:`Eligible properties include single-family homes, condos, townhouses, small multifamily properties, distressed homes, and other value-add residential investments intended for renovation and resale.`},{t:`h3`,text:`What loan terms can I expect for fix and flip financing?`},{t:`p`,text:`Loan terms are structured for short-term investment cycles and may include up to 70% of ARV, up to 90% of total project cost, interest-only payments during renovation, and flexible draw schedules for rehab funding.`}]],"fix-and-flip-loans-rhode-island":[[{t:`h2`,text:`Fix and Flip Loans Rhode Island | Fast Rehab Financing for Real Estate Investors`},{t:`p`,text:`A4CP provides Fix and Flip Loans Rhode Island real estate investors rely on to purchase, renovate, and resell residential investment properties. Our financing solutions are designed for investors who need speed, flexibility, and dependable capital to secure opportunities and complete profitable projects throughout Rhode Island.`},{t:`p`,text:`Whether youâre flipping a single-family home in Providence, renovating a coastal property, or expanding your investment portfolio, our Fix and Flip Loans Rhode Island help fund both acquisition and renovation costs.`},{t:`p`,text:`Our Fix and Flip Loans Rhode Island are built to support real estate investors seeking fast approvals, flexible terms, and reliable funding for residential rehab projects across the state.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Trusted Source for Fix and Flip Loans Rhode Island`},{t:`p`,text:`A4CP works with real estate investors throughout Rhode Island, including Providence, Cranston, Warwick, Pawtucket, Newport, and surrounding markets. Our Fix and Flip Loans Rhode Island are designed for investors who need fast, flexible financing to acquire, renovate, and resell residential investment properties.`},{t:`p`,text:`As a leading provider of Hard Money Fix and Flip Loan Rhode Island solutions, we focus on property value, renovation plans, and exit strategy rather than lengthy traditional lending requirements. This allows investors to move quickly when attractive opportunities become available.`},{t:`h3`,text:`Our financing supports:`},{t:`ul`,items:[`Single-family fix and flip projects`,`Condo and townhouse renovations`,`Small multifamily investment properties`,`Distressed property acquisitions`,`Value-add residential real estate investments`]},{t:`p`,text:`Whether youâre seeking a Hard Money Fix and Flip Loan Rho
39de Island for your next renovation project or looking for reliable Fix and Flip Loans Rhode Island to grow your portfolio, our financing solutions are built to help investors close faster and execute projects with confidence.`},{t:`p`,text:`Unlike traditional lenders, we evaluate the overall strength of the investment opportunity, helping Rhode Island investors secure capital without unnecessary delays or rigid banking requirements.`}],[{t:`h2`,text:`Flexible Real Estate Capital for Rhode Island Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Financing Solutions for Rhode Island Real Estate Investors`},{t:`p`,text:`Our Hard Money Fix and Flip Loan Rhode Island programs are designed for investors who need fast, flexible capital to acquire, renovate, and resell residential properties. We understand how Rhode Island Real Estate Investors operate, providing financing structures that support project timelines, maximize opportunities, and help investors move quickly in competitive markets`},{t:`h4`,text:`ARV-Based Lending`},{t:`p`,text:`Our Hard Money Fix and Flip Loan Rhode Island solutions use projected After Repair Value (ARV) to help determine financing amounts, giving Rhode Island Real Estate Investors access to capital based on a property's future potential rather than its current condition.`},{t:`h4`,text:`Structured Rehab Draws`},{t:`p`,text:`Renovation funds are released through scheduled draws based on project milestones, helping Rhode Island Real Estate Investors maintain cash flow and keep renovation projects progressing efficiently.`},{t:`h4`,text:`Short-Term Loan Structures`},{t:`p`,text:`Designed specifically for fix-and-flip strategies, our loan structures align with resale and refinance timelines, helping Rhode Island Real Estate Investors reduce holding costs and execute profitable exit strategies with confidence.`}],[{t:`h2`,text:`Our financing solutions help Rhode Island real estate investors secure fast, reliable funding for acquisition, renovation, and resale projects with flexible loan structures.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for Rhode Island Investment Opportunities`},{t:`h2`,text:`Who We Work With Across Rhode Island`},{t:`p`,text:`A4CP partners with a wide range of Rhode Island Real Estate Investors seeking reliable capital for acquisition, renovation, refinance, and value-add investment projects. Our financing solutions are designed to help investors move quickly, execute efficiently, and capitalize on opportunities throughout Rhode Island.`},{t:`h3`,text:`Investors`},{t:`p`,text:`Real estate investors using Hard Money Fix and Flip Loan Rhode Island financing to acquire, renovate, and resell residential investment properties. Ideal for investors seeking speed, flexibility, and dependable funding in competitive markets.`},{t:`h3`,text:`House Flippers & Rehab Specialists`},{t:`p`,text:`Investors focused on property renovations and value-add opportunities who require financing for both acquisition and construction costs. Our lending solutions help keep projects moving from purchase through resale.`},{t:`h3`,text:`Real Estate Professionals`},{t:`p`,text:`Developers, investment groups, and experienced Rhode Island Real Estate Investors seeking flexible financing for fix-and-flip projects, distressed property acquisitions, portfolio growth, and strategic investment opportunities.`}
39],[{t:`h2`,text:`Apply for Hard Money Fix and Flip Loan Rhode Island Today`},{t:`p`,text:`Whether youâre purchasing a distressed property, funding a renovation, or preparing your next investment project, our Hard Money Fix and Flip Loan Rhode Island programs are designed to help investors move quickly when opportunities arise. We provide fast approvals, flexible financing, and dependable capital tailored to the needs of Rhode Island Real Estate Investors .`}],[{t:`h2`,text:`Fix and Flip Loans Rhode Island Financing Options`},{t:`p`,text:`Our Fix and Flip Loans Rhode Island programs are designed to meet the needs of real estate investors seeking fast, flexible capital for acquisition, renovation, refinance, and value-add projects. Whether you're purchasing a distressed property, funding a rehab, or expanding your investment portfolio, we offer financing solutions tailored to your investment strategy.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Why Investors Choose Fix and Flip Loans`},{t:`p`,text:`Investors across Rhode Island rely on private lending because flexibility and speed create opportunity.`},{t:`p`,text:`Working with A4CP allows investors to:`},{t:`ul`,items:[`Close faster and compete with cash buyers`,`Finance renovation-heavy properties`,`Avoid lengthy bank underwriting processes`,`Preserve liquidity during construction`,`Execute time-sensitive deals confidentl`]},{t:`p`,text:`Structured speed provides a measurable competitive advantage.`},{t:`h2`,text:`Flexible Rehab Financing Rhode Island Investors Can Rely On`},{t:`p`,text:`Every project carries different timelines and risks. Our rehab financing adapts to real construction scenarios.`},{t:`p`,text:`Programs may include:`},{t:`ul`,items:[`Interest-only payments during renovation`,`Flexible draw schedules`,`Transitional bridge options`,`Early payoff flexibility where applicable`]},{t:`p`,text:`We structure capital to support execution from acquisition through resale. Our rehab loans in Rhode Island investors are structured to fund both acquisition and renovation phases while maintaining predictable project timelines.`},{t:`h2`,text:`The A4CP Advantage for Rhode Island Real Estate Investors`},{t:`p`,text:`Not all lenders operate with an investor mindset. A4CP combines disciplined underwriting with execution-focused service.`},{t:`p`,text:`Investors benefit from:`},{t:`ul`,items:[`Transparent loan structures`,`Predictable funding timelines`,`Asset-based underwriting`,`Direct communication throughout the loan lifecycle`,`Long-term lending relationships`]},{t:`p`,text:`Our goal is to become a capital partner investors rely on across multiple projects.`},{t:`h2`,text:`Understanding the Rhode Island Fix and Flip Opportunity`},{t:`p`,text:`Rhode Islandâs housing market offers strong renovation potential due to aging residential inventory and consistent buyer demand in coastal and urban markets. Investors who succeed focus on disciplined acquisitions, controlled renovation budgets, and realistic resale timelines.`},{t:`p`,text:`Demand for house flipping loans Rhode Island investors use continues to grow as older housing inventory creates renovation opportunities.`},{t:`p`,text:`Reliable short-term real estate financing allows investors to act decisively while managing risk. A4CP structures financing aligned with real local market conditions.`},{t:`h2`,text:`Who Our Fix and Flip Loans Are Designed For`},{t:`p`,text:`Our programs are built for:`},{t:`ul`,items:[`Real estate investors acquiring value-add properties`,`Investors competing in fast-moving Providence-area markets`,`Operators scaling multiple renovation projects`,`First-time investors entering the fix and flip space`,`Borrowers refinancing active renovation projects`]},{t:`p`,text:`If your strategy involves acquiring, improving, and exiting properties efficie
39ntly, our financing is designed for you.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Learn more about our Fix and Flip Loans Rhode Island programs, including loan requirements, funding timelines, eligible property types, renovation financing, and project execution strategies. Whether youâre an experienced investor or exploring your first fix-and-flip opportunity, our financing solutions are designed to help Rhode Island investors move forward with confidence.`},{t:`h3`,text:`How much can I borrow for a fix and flip project in Rhode Island?`},{t:`p`,text:`Loan amounts are based on purchase price, projected After Repair Value (ARV), renovation scope, and defined leverage structure.`},{t:`h3`,text:`Can new investors qualify for fix and flip loans?`},{t:`p`,text:`Yes. Many projects are approved based on preparation, budgeting accuracy, and overall project feasibility rather than experience alone.`},{t:`h3`,text:`Do fix and flip loans include renovation costs?`},{t:`p`,text:`Yes. Approved rehab budgets are funded through structured draw schedules aligned with verified construction milestones.`},{t:`h3`,text:`How fast can a fix and flip loan close?`},{t:`p`,text:`Private lending typically closes significantly faster than traditional bank financing, subject to documentation readiness and third-party requirements.`},{t:`h3`,text:`What properties qualify for fix and flip loans in Rhode Island?`},{t:`p`,text:`Eligible properties typically include single-family homes, condominiums, townhouses, and small multifamily properties requiring renovation or repositioning.`},{t:`h3`,text:`Do you offer rehab loans in Rhode Island?`},{t:`p`,text:`Yes. Our rehab loans Rhode Island investors use include funding for both property acquisition and renovation costs through structured draw schedules.`}]],"hard-money-lenders-delaware":[[{t:`h2`,text:`Hard Money Lenders Delaware | Private Lending for Real Estate Investors`},{t:`p`,text:`Hard money loans in Delaware are short-term, asset-based financing solutions used by real estate investors to acquire, renovate, and reposition properties quickly. Approval is based on the propertyâs current value and After Repair Value (ARV) not personal income documentation making it the preferred choice for investors who need fast, flexible capital in competitive markets.`},{t:`p`,text:`A4CP provides structured hard money loans Delaware real estate investors rely on for time-sensitive acquisitions, renovation projects, transitional repositioning, and short-term investment strategies throughout the state.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Delawareâs Trusted Private Lending Partner for Real Estate Investors`},{t:`p`,text:`Investment opportunities across Delaware are shaped by commuter-driven demand from Philadelphia and Baltimore, institutional employment centers, and aging residential inventory that continues to support strong renovation activity. Effective hard money lending in Delaware requires measured leverage and realistic underwriting assumptions aligned with local market conditions.`},{t:`p`,text:`As established hard money lenders in Delaware, A4CP provides asset-based financing for:`},{t:`ul`,items:[`Acquisition and renovation projects`,`Transitional bridge scenarios`,`Multifamily repositioning`,`Rental portfolio growth`,`Value-add residential investments`,`Strategic refinancing objectives`]}],[{t:`h2`,text:`Flexible Real Estate Capital for New Hampshire Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Structured Lending Process`},{t:`p`,text:`Execution timelines across Delaware's competitive investment markets often require timely credit evaluation supported by clearly defined underwriting standards. As one of the established hard money lenders Delaware investors turn to, A4 Capital Partners follows a disciplined review process designed to provide early transparency around deal structure while maintaining consistent risk assessment. Working with experienced hard money lenders Delaware wide offers gives borrowers the confidence that every deal is reviewed with the same level of discipline, regardless of size or timeline.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Wilmington, Newark, Dover, and other Delaware regional markets often require efficient decision-making supported by clear underwriting parameters. Our process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Typically Works With in Delaware`},{t:`h3`,text:`Investors`}
39,{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Asset-Based Financing Across Delaware`},{t:`p`,text:`A4CP structures private lending Delaware solutions that support acquisition, stabilization, and refinancing strategies across a range of property types and investment approaches throughout New Castle, Kent, and Sussex counties.`}],[{t:`h2`,text:`Explore Our Financing Solutions for Delaware Investors`},{t:`p`,text:`Our lending solutions are structured for professional real estate operators who require dependable, time-sensitive financing.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Role of Hard Money Lending in Delaware Investment Strategy`},{t:`p`,text:`Private lenders in Delaware serve a practical function in competitive acquisition markets where timing influences both pricing and negotiation dynamics. When a distressed property hits the market in Wilmington or a value-ad
39d opportunity surfaces in Dover, investors who can close in days not months consistently outperform those waiting on traditional bank approvals.`},{t:`p`,text:`Working with experienced hard money lenders in Delaware allows investors to finance renovation-dependent assets, navigate compressed timelines, and execute repositioning strategies without extended institutional approval cycles.`},{t:`h2`,text:`Flexible Loan Structures`},{t:`p`,text:`Every investment project carries unique timelines, renovation scopes, and exit strategies. Our hard money loans Delaware investors use are designed to adapt to real-world project requirements rather than rigid lending frameworks.`},{t:`p`,text:`Programs may include:`},{t:`ul`,items:[`Short-term financing aligned with project exit timelines`,`Interest-only payment options during renovation phases`,`Structured renovation funding through draw schedules`,`Transitional bridge financing solutions`,`Early payoff flexibility where applicable`]},{t:`p`,text:`We structure capital to support acquisition, renovation, stabilization, and refinance strategies across a variety of Delaware investment markets.`},{t:`h2`,text:`Investment Activity Across DelawareCore Markets`},{t:`p`,text:`Delawareâs real estate market continues to attract investors driven by its strategic location, favorable tax environment, and consistent housing demand across all three counties.`},{t:`p`,text:`Delawareâs diverse geography creates opportunity across every market segment:`},{t:`p`,text:`New Castle County`},{t:`p`,text:`Wilmington and Newark lead urban renovation activity, supported by proximity to Philadelphia employers and strong commuter demand. Wilmingtonâs 56% renter-occupied housing base creates consistent demand for updated rental units`},{t:`p`,text:`Kent County`},{t:`p`,text:`Doverâs stable population and institutional employment base (state government, healthcare, military) provide steady demand for renovated single-family and multifamily properties`},{t:`p`,text:`Sussex County`},{t:`p`,text:`Rehoboth Beach, Lewes, and coastal communities present unique fix-and-flip and rental investment opportunities driven by vacation and seasonal buyer demand`},{t:`p`,text:`Suburban markets`},{t:`p`,text:`Middletown, Bear, and Glasgow continue to see growing demand as buyers seek affordable suburban alternatives to Philadelphia and Wilmington`},{t:`p`,text:`Reliable private lending in Delaware allows investors to act decisively in each of these distinct markets with financing structured around local deal economics rather than generic national underwriting assumptions.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made simple. Learn about available loan programs, execution processes, eligible property types, and how A4 Capital Partners supports transactions across New Hampshire with speed, clarity, and reliable capital. Get the insight you need to move forward with confidence.`},{t:`h3`,text:`What types of real estate projects do hard money loans in Delaware typically support?`},{t:`p`,text:`Hard money loans are commonly used for acquisition, fix-and-flip renovations, transitional bridge financing, multifamily repositioning, rental portfolio expansion, and short-term refinance strategies. These loans are designed for time-sensitive investment opportunities where speed and flexibility are critical.`},{t:`h3`,text:`How fast can funding be completed with a private hard money lender?`},{t:`p`,text:`Loan approvals and funding are typically completed in about 5â10 days, depending on the complexity of the deal and documentation. The focus is on streamlined underwriting and fast execution for competitive real estate markets.`},{t:`h3`,text:`What loan terms are typically offered for real estate investors?`},{t:`p`,text:`Typical terms may include loan-to-value ratios up to 70%, loan-to-cost up to 90%, interest rates starting around 8.5%, and loan sizes beginning at $500,000. Many structures are interest-only with short-term durations and may include flexible prepayment options.`},{t:`h3`,text:`Who are hard money lenders best suited for in Delaware?`}]],"hard-money-lenders-georgia":[[{t:`h2`,text:`Hard Money Lenders Georgia | Private Lenders for Real Estate Investors`},{t:`p`,text:`A4CP provides structured hard money loans in Georgia for real estate investors operating in t
39ime-sensitive acquisition environments. Our financing supports property acquisitions, renovation initiatives, transitional repositioning, and short-term investment strategies throughout the state. Designed for execution, our lending solutions help investors move quickly when opportunities arise in competitive markets.`},{t:`p`,text:`Investors evaluating a hard money lender in Georgia often prioritize consistency, transparency, and predictable execution alongside speed. Reliable access to capital can play a critical role in securing opportunities and maintaining project momentum from acquisition through exit.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Private Lending Solutions for Georgia Real Estate Investors`},{t:`p`,text:`Investment activity across Georgia is driven by commuter-oriented markets, major employment corridors, and residential properties that continue to present renovation and value-add opportunities. In this environment, investors benefit from financing solutions built around disciplined underwriting, measured leverage, and efficient execution.`},{t:`p`,text:`As trusted hard money lenders in Georgia, A4CP provides financing for:`},{t:`ul`,items:[`Acquisition and renovation projects`,`Bridge financing for transitional assets`,`Multifamily repositioning opportunities`,`Rental portfolio growth and stabilization`,`Value-add residential investment strategies`,`Strategic refinancing and recapitalization objectives`]},{t:`p`,text:`These financing solutions are designed to support real estate investors pursuing opportunities throughout Georgiaâs diverse and competitive investment markets.`}],[{t:`h2`,text:`Flexible Real Estate Capital for Georgia Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`How Our Lending Process Works`},{t:`p`,text:`Execution timelines across Georgia's competitive real estate investment markets often require timely credit evaluation supported by clearly defined underwriting standards. A4 Capital Partners follows a disciplined review process designed to provide early transparency around deal structure while maintaining consistent risk assessment throughout the financing process. This structured approach helps investors evaluate opportunities efficiently, understand financing parameters early, and move forward with greater confidence in competitive acquisition environments.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Northern Virginia and regional cities often require efficient decision-making supported by clear underwriting parameters. Our process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale, experience, and lending capabilities allow us to provide flexible financing solutions tailored to the needs of Georgia real estate investors. Whether the objective is acquisition, renovation, repositioning, or portfolio growth, we structure capital to align with each clientâs investment strategy and operational requirements.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Typically Works With in Georgia`},{t:`h3`,text:`Investors`}
39,{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Real Estate Financing Across Georgia`},{t:`p`,text:`A4 Capital Partners provides asset-based financing solutions that support acquisition, stabilization, and refinancing strategies across Georgia real estate markets. Whether investing in residential, multifamily, or value-add properties, our financing programs are structured to align with diverse investment objectives and execution timelines.`}],[{t:`h2`,text:`Financing Solutions for Georgia Real Estate Investors`},{t:`p`,text:`Our lending solutions are built for professional real estate investors seeking reliable, time-sensitive financing across Georgia markets. From acquisition and renovation projects to portfolio growth and asset repositioning strategies, our financing structures are designed to support efficient execution and informed investment decisions.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Role of Hard Money Lending in Georgia Investment Strategy`},{t:`p`,text:`Private capital plays an important role in Georgia real estate investment markets, where acquisition opportunities often depend on speed, certainty, and execution. In competitive environments, access to responsive financing can help investors secure properties before competing buyers and maintain momentum throughout the investment cycle.`},{t:`p`,text:`By working with experienced hard money lenders in Georgia, investors can finance value-add properties, support renovation-focused projects, manage short closing timelines, and pursue repositioning opportunities without lengthy institutional approval requirements.`},{t:`h2`,text:`Loan Structures Designed for Investment Flexibility`},{t:`p`,text:`Georgia investment properties present varied timelines, business objectives, and operational considerations. Financing structures may be tailored to support the specific requirements of each project and may include:`},{t:`ul`,items:[`Short-term capital aligned with projected exit strategies`,`Interest-only payment arrangements`,`Phased renovation funding and draw schedules`,`Transitional bridge financing structures`,`Prepayment flexibility when appropriate`]},{t:`p`,text:`The objective is to provide capital that supports efficient execution and investment performance rather than impose unnecessary rigidity.`},{t:`h2`,text:`Real Estate Investment Activity Across Georgia Markets`},{t:`p`,text:`Investment demand across New Hampshire spans commuter-driven regions and established regional cities. Northern Virginia markets such as Arlington, Alexandria, and Fairfax remain active due to proximity to Washington, D.C. employment centers and consistent housing demand.`},{t:`p`,text:`Central Virginia, including Richmond , continues to experience redevelopment activity supported by population stability and urban revitalization. Coastal markets such as Virginia Beach and Norfolk provide opportunities for repositioning residential and small multifamily assets.`},{t:`p`,text:`Competitive zip codes including 22201, 22314, and 23220 often require efficient access to private capital in order to secure acquisitions within compressed timelines.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made it simple for Georgia investors. Explore available loan programs, underwriting processes, eligible property types, and financing solutions designed to support acquisitions, renovations, refinancing strategies, and value-ad
39d investment opportunities. A4 Capital Partners provides reliable capital and responsive execution to help investors move forward with confidence.`},{t:`h3`,text:`What types of properties does A4 Capital Partners finance in Georgia?`},{t:`p`,text:`A4 Capital Partners provides financing for a wide range of investment properties across Georgia, including residential, multifamily, value-add, renovation, bridge, and new construction projects. Loan structures are designed to support acquisitions, refinancing, repositioning, and portfolio growth for professional real estate investors.`},{t:`h3`,text:`How quickly can a hard money loan close in Georgia?`},{t:`p`,text:`A4 Capital Partners is built for fast execution, with many hard money loans closing in as little as 5â10 days, depending on the project's documentation, underwriting, and transaction complexity. This helps investors compete in time-sensitive acquisition environments.`},{t:`h3`,text:`What loan terms are available for Georgia real estate investors?`},{t:`p`,text:`Loan programs may offer financing up to 70% Loan-to-Value (LTV), 90% Loan-to-Cost (LTC), rates starting from 8.5%, loan amounts beginning at $500,000, interest-only payment options, and no prepayment penalty on many loan structures.`},{t:`h3`,text:`Can I use a hard money loan for a fix-and-flip or renovation project in Georgia?`},{t:`p`,text:`Yes. A4 Capital Partners offers financing for acquisition and renovation projects throughout Georgia. Rehab loans can include funding for both the property purchase and renovation costs through structured draw schedules, helping investors complete value-add projects efficiently.`},{t:`h3`,text:`5. Who is eligible to apply for a hard money loan with A4 Capital Partners in Georgia?`},{t:`p`,text:`A4 Capital Partners primarily works with experienced real estate investors, builders, developers, operators, and investment-focused borrowers seeking financing for acquisitions, bridge loans , refinancing, rental portfolios, and construction projects across Georgia. Loan eligibility is determined through a structured underwriting and credit evaluation process.`}]],"hard-money-lenders-maine":[[{t:`h2`,text:`Hard Money Lenders Maine | Private Lenders for Real Estate Investors`},{t:`p`,text:`A4 Capital Partners provides structured hard money loans in Maine for real estate investors operating in time-sensitive acquisition environments. Our financing supports property acquisition, renovation initiatives, transitional repositioning, and short-term investment strategies throughout the state.`},{t:`p`,text:`Investors evaluating a hard money lender in Maine often prioritize consistency, transparency, and predictability alongside speed. Reliable capital access can be a key factor in successfully executing investment opportunities in competitive markets.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Private Lending Experience Aligned with Maine Real Estate Investment Activity`},{t:`p`,text:`Real estate investment opportunities across Maine are driven by consistent housing demand, commuter-oriented markets, and older residential properties that continue to create strong renovation potential. Investors operating in these conditions often require financing structured around practical underwriting and execution-focused lending.`},{t:`p`,text:`As experienced hard money lenders in Maine, A4 Capital Partners supports a wide range of investment strategies, including:`},{t:`ul`,items:[`Property acquisition and renovation projects`,`Short-term bridge financing opportunities`,`Multifamily repositioning initiatives`,`Rental portfolio expansion strategies`,`Value-add residential investments`,`Strategic refinancing solutions`]}],[{t:`h2`,text:`Flexible Real Estate Capital for Maine Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Structured Hard Money Lending Process in Maine`},{t:`p`,text:`Execution timelines across Maineâs competitive real estate investment markets often require fast, reliable credit evaluation supported by clear underwriting standards. A4 Capital Partners follows a disciplined lending process designed to provide early transparency on deal structure while maintaining consistent risk assessment for real estate investors.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Northern Virginia and regional cities often require efficient decision-making supported by clear underwriting parameters. Our process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to provide flexible, customized financing solutions for real estate investors in Maine. Each loan is structured to align with the clientâs investment strategy, whether focused on acquisition, renovation, repositioning, or portfolio growth.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Capital Partners Works With in Maine Real Estate Markets`},{t:`h3`,text:`Investors`}
39,{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Real Estate Investment Financing Across Maine`},{t:`p`,text:`across Maine markets. By supporting acquisition, stabilization, renovation, and refinancing strategies, our lending programs provide flexible capital structured to help investors execute efficiently and capitalize on real estate opportunities with confidence.`}],[{t:`h2`,text:`Financing Structures for Professional Real Estate Investors in Maine`},{t:`p`,text:`Our lending solutions are structured for professional real estate investors in Maine who require dependable, time-sensitive financing. These programs support acquisition, renovation, repositioning, and short-term investment strategies across residential and multifamily properties.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Role of Hard Money Lending in Maine Investment Strategy`},{t:`p`,text:`Private capital plays an important role in Maine real estate investment markets, where speed and certainty often determine the success of acquisitions. In competitive environments, access to flexible financing can help investors secure properties, complete renovations, and execute value-add strategies efficiently.`},{t:`p`,text:`By working with experienced hard money lenders in Maine, investors can finance fixer-upper properties, manage short closing timelines, and pursue repositioning opportunities without extended bank approval cycles.`},{t:`h2`,text:`Flexible Hard Money Loan Structures in Maine`},{t:`p`,text:`Real estate investment opportunities across Maine often involve different timelines, renovation scopes, and exit strategies. To accommodate these needs, financing structures may include:`},{t:`ul`,items:[`Short-term financing aligned with acquisition and disposition timelines`,`Interest-only payment options during project execution`,`Structured renovation funding tied to project milestones`,`Bridge financing for transitional investment scenarios`,`Flexible prepayment options where applicable`]},{t:`p`,text:`These structures are designed to support efficient execution and help investors move projects forward with confidenc`},{t:`h2`,text:`Real Estate Investment Activity Across Maine Core Markets`},{t:`p`,text:`Maineâs real estate investment activity is driven by steady demand across coastal, suburban, and regional markets. Southern Maine continues to lead with strong investor interest in Portland and surrounding communities, supported by job growth and housing demand.`},{t:`p`,text:`Markets in Central Maine such as Lewiston and Auburn offer value-add and redevelopment potential, while coastal areas including Brunswick, Bath, and Kennebunk provide opportunities for repositioning residential and multifamily assets. In competitive segments of the Maine market, access to fast private capital is often essential for securing acquisitions quickly.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made simple for Maine investors. Explore available loan programs, underwriting processes, eligible property types, and financing structures designed to support acquisitions, renovations, refinancing, and value-add investment strategies. A4 Capital Partners provides depen
39dable capital and efficient execution to help investors act quickly in todayâs market.`},{t:`h3`,text:`What is a hard money loan for real estate investors in Maine?`},{t:`p`,text:`A hard money loan is a short-term, asset-based financing option that provides fast capital to real estate investors for property acquisition, renovation, refinancing, and repositioning projects. Approval is typically much faster than traditional bank financing.`},{t:`h3`,text:`How quickly can you get a hard money loan in Maine?`},{t:`p`,text:`With lenders like A4 Capital Partners, hard money loans are typically processed within 5â10 days, whereas traditional banks may take 30â60 days or longer.`},{t:`h3`,text:`What is the typical LTV for hard money loans in Maine?`},{t:`p`,text:`Most hard money lenders offer up to 70% Loan-to-Value (LTV) and up to 90% Loan-to-Cost (LTC), depending on the property type and project structure.`},{t:`h3`,text:`What types of real estate projects can be financed with hard money loans?`},{t:`p`,text:`Hard money loans can be used for property acquisitions, fix-and-flip projects, multifamily repositioning, rental portfolio expansion, refinancing, and new construction projects.`},{t:`h3`,text:`Why do investors in Maine prefer hard money lenders over traditional banks?`},{t:`p`,text:`Investors prefer hard money lenders because they offer faster approvals, flexible underwriting, and execution-focused financing, which is essential in competitive real estate markets where speed is critical.`}]],"hard-money-lenders-maryland":[[{t:`h2`,text:`Hard Money Financing in Maryland | Private Lenders for Real Estate Investors`},{t:`p`,text:`A4CP provides structured hard money loans in Maryland for real estate investors operating in time-sensitive acquisition environments. Our Maryland hard money financing supports property acquisition, renovation projects, transitional repositioning, and short-term real estate investment strategies across the state. This allows investors to secure funding quickly and move from acquisition to execution without delays commonly associated with traditional lending.`},{t:`p`,text:`Investors searching for a hard money lender in Maryland often prioritize consistency, transparency, and predictable execution alongside fast funding. Reliable private lending solutions in Maryland help ensure smoother transactions, clearer loan structures, and improved efficiency throughout the investment process.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Private Lending Experience Aligned with Maryland Investment Activity`},{t:`p`,text:`Investment opportunities across Maryland are influenced by commuter-driven demand, institutional employment centers, and aging residential inventory that continues to support renovation activity. Effective financing in this environment requires measured leverage and realistic underwriting assumptions.`},{t:`p`,text:`As established hard money lenders in Maryland , A4CP provides financing for:`},{t:`ul`,items:[`Acquisition and renovation projects`,`Transitional bridge scenarios`,`Multifamily repositioning`,`Rental portfolio growth`,`Value-add residential investments`,`Strategic refinancing objectives`]}],[{t:`h2`,text:`Flexible Real Estate Capital for Maryland Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Structured Lending Process`},{t:`p`,text:`Execution timelines across Maryland competitive investment markets often require timely credit evaluation supported by clearly defined underwriting standards. A4 Capital Partners follows a disciplined review process designed to provide early transparency around deal structure while maintaining consistent risk assessment.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Maryland and regional cities often require efficient decision-making supported by clear underwriting parameters. Our process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who Our Maryland Lending Programs Are Designed For`},{t:`h3`,text:`Investors`}
39,{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Financing Solutions for Maryland Real Estate Investors`},{t:`p`,text:`A4 Capital Partners delivers asset-based financing solutions for real estate investors pursuing acquisition, stabilization, and refinancing opportunities across Maryland. By aligning capital with investment objectives, property characteristics, and market conditions, we help investors execute strategies with confidence while maintaining the flexibility needed to succeed in competitive real estate markets.`}],[{t:`h2`,text:`Financing Structures for Professional Investors`},{t:`p`,text:`Our lending solutions are structured for experienced real estate operators seeking dependable, time-sensitive financing across Maryland investment markets. By combining responsive execution, asset-based underwriting, and flexible loan structures, we help investors move quickly on opportunities while maintaining confidence throughout the financing process.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Role of Hard Money Lending in Maryland Investment Strategy`},{t:`p`,text:`In Marylandâs competitive acquisition environment, private capital provides investors with the speed and flexibility needed to capitalize on time-sensitive opportunities. Market conditions often reward buyers who can make confident decisions and close transactions without unnecessary delays.`},{t:`p`,text:`Working with established hard money lenders in Maryland allows investors to finance renovation-dependent properties, manage compressed closing timelines, and pursue repositioning strategies with greater eff
39iciency. The result is a financing structure aligned with real-world investment execution rather than extended institutional approval cycles.`},{t:`h2`,text:`Flexible Financing Structures for Investors`},{t:`p`,text:`Maryland real estate investment opportunities often involve unique timelines, renovation scopes, and exit strategies. To accommodate these variables, financing structures may include:`},{t:`ul`,items:[`Short-term financing aligned with acquisition and disposition timelines`,`Interest-only payment options during project execution`,`Structured renovation funding through phased draws`,`Bridge financing for transitional assets`,`Flexible prepayment provisions when applicable`]},{t:`p`,text:`This approach allows investors to maintain operational flexibility while executing projects efficiently across Maryland markets.`},{t:`h2`,text:`Investment Activity Across Maryland Core Markets`},{t:`p`,text:`Marylandâs real estate investment market is supported by strong employment centers, commuter-driven housing demand, and diverse residential inventory. High-activity markets such as Baltimore, Annapolis, Rockville, Silver Spring, and Frederick continue to generate opportunities for acquisition, renovation, and long-term investment growth.`},{t:`p`,text:`Investors operating in competitive Maryland zip codes often require fast and reliable financing to secure opportunities before competing buyers. Access to private capital helps support efficient acquisitions, renovation projects, and value-add investment strategies across the state.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made simple for Maryland investors. Learn about our hard money loans, bridge financing solutions, underwriting process, eligible property types, and investment-focused lending programs. A4 Capital Partners supports acquisitions, renovations, refinancing strategies, and transitional projects across Maryland with speed, clarity, and dependable capital. Get the insights you need to execute your next investment opportunity with confidence.`},{t:`h3`,text:`What is hard money financing in Maryland?`},{t:`p`,text:`Hard money financing in Maryland is a short-term, asset-based loan designed for real estate investors. It focuses on property value, renovation potential, and exit strategy rather than traditional credit requirements.`},{t:`h3`,text:`What types of real estate projects qualify for hard money loans in Maryland?`},{t:`p`,text:`Hard money lenders in Maryland typically finance fix-and-flip projects, bridge acquisitions, renovation deals, multifamily properties, rental investments, and other value-add real estate opportunities.`},{t:`h3`,text:`How quickly can a hard money loan close in Maryland?`},{t:`p`,text:`Hard money loans in Maryland can often close within 5â10 days depending on property evaluation, documentation readiness, and deal complexity.`},{t:`h3`,text:`What factors do lenders consider for approval in Maryland?`},{t:`p`,text:`Approval is generally based on property value, after-repair value (ARV), loan-to-value ratio, renovation feasibility, and the investorâs exit strategy rather than credit score alone.`}]],"hard-money-lenders-new-hampshire":[[{t:`h2`,text:`Professional Hard Money Financing in New Hampshire for Residential Real Estate Investors`},{t:`p`,text:`Finding the right investment property is only part of the process; securing funding quickly is just as important. A4 Capital Partners provides hard money financing in New Hampshire for investors purchasing, renovating, refinancing, and repositioning residential properties throughout the state.`},{t:`p`,text:`Our financing is designed for projects where speed, flexibility, and straightforward underwriting matter. Instead of lengthy approval timelines, we evaluate each opportunity based on the propertyâs value, renovation scope, and overall investment strategy. This allows investors to move forward with greater confidence while keeping projects on schedule.`},{t:`p`,text:`Whether youâre planning a fix-and-flip, acquiring a rental property, or completing a value-ad
39d renovation, our lending solutions help you access dependable private capital for your next investment.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Private Hard Money Lending Built for New Hampshire Investment Opportunities`},{t:`p`,text:`New Hampshireâs real estate market continues to create opportunities for investors seeking residential properties with renovation and value-add potential. Steady housing demand, limited inventory in many communities, and ongoing redevelopment activity make access to dependable financing an important part of a successful investment strategy. Choosing the right lending partner allows investors to move quickly while maintaining realistic project expectations.`},{t:`p`,text:`As experienced hard money lenders in New Hampshire, A4 Capital Partners provides financing solutions for:`},{t:`ul`,items:[`Residential property acquisitions`,`Renovation and rehabilitation projects`,`Short-term bridge financing`,`Small multifamily investments`,`Rental portfolio expansion`,`Value-add residential redevelopment`,`Strategic refinancing opportunities`]}],[{t:`h2`,text:`Flexible Real Estate Capital for New Hampshire Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Flexible Lending Process Built Around Your Investment Goals`},{t:`p`,text:`Execution timelines across New Hampshire competitive investment markets often require timely credit evaluation supported by clearly defined underwriting standards. A4 Capital Partners follows a disciplined review process designed to provide early transparency around deal structure while maintaining consistent risk assessment.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Manchester, Nashua, and regional New Hampshire cities often require efficient decision-making supported by clear underwriting parameters. Our process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Typically Works With in New Hampshire`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Asset-Based Financing Solutions for New Hampshire Investors`},{t:`p`,text:`A4 Capital Partners provides asset-based financing designed to support a variety of real estate investment strategies across New Hampshire. Whether youâre acquiring a property, completing renovations, stabilizing an asset, or pursuing refinancing opportunities, our lending solutions are structured around the propertyâs potential and your investment objectives. We work with investors across multiple residential property types, helping them access dependable capital while navigating changing market conditions and project timelines.`}],[{t:`h2`,text:`Financing Structures for Professional Investors`},{t:`p`,text:`Our lending solutions are structured for professional real estate operators who require dependable, time-sensitive financing.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Why Hard Money Financing Matters for New Hampshire Investors`},{t:`p`,text:`In New Hampshireâs competitive real estate market, timely financing can make the difference between securing a property and losing an investment opportunity. Private lending gives investors greater flexibility to purchase, renovate, and reposition residential properties without the extended approval timelines often associated with traditional financing. Working with experienced hard money lenders in New Hampshire helps investors move confidently while adapting to changing project requirements and market conditions.`},{t:`h2`,text:`Flexible Financing Options for Different Project Needs`},{t:`p`,text:`Every investment project has its own budget, timeline, and exit strategy. Our financing solutions may include:`}
39,{t:`ul`,items:[`Short-term funding for investment properties`,`Interest-only payment options`,`Renovation draw schedules`,`Bridge financing solutions`,`Flexible repayment options where applicable`]},{t:`p`,text:`Our loan structures are designed to support efficient project execution while giving investors the flexibility needed to achieve their investment goals.`},{t:`h2`,text:`Real Estate Investment Opportunities Across New Hampshire`},{t:`p`,text:`New Hampshire continues to attract residential real estate investors through its stable economy, growing communities, and consistent housing demand. Cities including Manchester, Nashua, Concord, Portsmouth, Dover, and Rochester offer opportunities for property redevelopment, renovation, and value-add investments. As competition for quality residential properties continues to grow, dependable private financing helps investors act quickly, complete projects efficiently, and capitalize on opportunities across local markets.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made simple. Learn about available loan programs, execution processes, eligible property types, and how A4 Capital Partners supports transactions across New Hampshire with speed, clarity, and reliable capital. Get the insight you need to move forward with confidence.`},{t:`h3`,text:`How does hard money lending differ from traditional bank financing in New Hampshire?`},{t:`p`,text:`Hard money lending is faster and asset-focused, while traditional banks rely heavily on credit history, income verification, and longer approval cycles. Investors use hard money for time-sensitive deals.`},{t:`h3`,text:`Why do investors choose hard money lenders in New Hampshire?`},{t:`p`,text:`Investors choose hard money lenders for speed, flexible underwriting, and the ability to finance distressed or renovation-heavy properties that banks often avoid.`},{t:`h3`,text:`Can hard money loans in New Hampshire be used for rental property investments?`},{t:`p`,text:`Yes, hard money loans can be used for rental acquisitions, especially when investors plan value-add improvements or short-term repositioning before refinancing.`},{t:`h3`,text:`What happens after a hard money project is completed in New Hampshire?`},{t:`p`,text:`Once the project is stabilized or renovated, investors typically refinance into long-term conventional loans or sell the property for profit depending on their exit strategy.`}]],"hard-money-lenders-north-carolina":[[{t:`h2`,text:`Hard Money Financing in North Carolina | Private Lenders for Real Estate Investors`},{t:`p`,text:`A4CP provides structured hard money loans North Carolina real estate investors use to acquire, renovate, refinance, and reposition investment properties throughout the state. Our financing solutions are designed for investors operating in competitive acquisition environments where speed, certainty, and execution matter.`},{t:`p`,text:`From Charlotte and Raleigh to Durham, Greensboro, and Wilmington, North Carolina continues to attract investors seeking value-add opportunities supported by population growth, business expansion, and strong housing demand. As experienced hard money lenders North Carolina investors rely on, we structure financing around property value, investment potential, and clearly defined exit strategies rather than traditional income-based lending requirements.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Financing Solutions Built for North Carolina Investors`},{t:`p`,text:`North Carolinaâs real estate market continues to generate opportunities across urban redevelopment projects, suburban growth corridors, rental property acquisitions, and renovation-focused investments. Investors often require financing that can move as quickly as the opportunities they pursue.`},{t:`p`,text:`As established private lenders North Carolina investors trust, A4CP provides financing for:`},{t:`ul`,items:[`Acquisition and renovation projects`,`Transitional bridge financing`,`Multifamily repositioning`,`Rental portfolio expansion`,`Value-add residential investments`,`Strategic refinancing opportunities`]},{t:`p`,text:`Our approach focuses on asset fundamentals, realistic valuations, and disciplined underwriting designed to support long-term investor success.`}],[{t:`h2`,text:`Why Real Estate Investors Across North Carolina Choose A4CP`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`}
39,{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Lending Process Built for Speed and Certainty`},{t:`p`,text:`Investment opportunities throughout North Carolina often require timely decisions supported by efficient underwriting and transparent communication. Our review process is designed to provide clarity around deal structure while maintaining disciplined risk assessment.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Many North Carolina investment opportunities move quickly. Our process is designed to provide borrowers with early feedback, efficient review timelines, and dependable execution when timing matters most.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers communicate directly with experienced lending professionals involved in underwriting and credit decisions, helping create alignment throughout the financing process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, creating continuity from application through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who Our North Carolina Financing Programs Are Designed For`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Asset-Based Real Estate Financing Throughout North Carolina`},{t:`p`,text:`A4 Capital Partners structures asset-based financing solutions that support acquisition, stabilization, renovation, and refinancing strategies across a wide range of property types and investment objectives.`},{t:`p`,text:`Whether financing a renovation project in Charlotte, refinancing an investment property in Raleigh, or acquiring a value-ad
39d opportunity in Greensboro, our programs are designed to support efficient execution.`}],[{t:`h2`,text:`Loan Solutions for North Carolina Real Estate Investors`},{t:`p`,text:`Our lending solutions are structured for professional real estate operators who require dependable, time-sensitive financing.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Why Investors Use Hard Money Loans in North Carolina`},{t:`p`,text:`Private capital serves an important role within North Carolinaâs competitive real estate market, where acquisition speed can directly impact pricing and investment outcomes.`},{t:`p`,text:`Working with experienced hard money lenders North Carolina investors trust allows borrowers to:`},{t:`ul`,items:[`Secure properties under compressed timelines`,`Finance renovation-focused acquisitions`,`Compete more effectively with cash buyers`,`Execute value-add investment strategies`,`Avoid lengthy conventional lending processes`]},{t:`p`,text:`For investors pursuing acquisition, renovation, repositioning, or bridge financing opportunities, hard money loans North Carolina provide flexibility structured around the asset rather than personal income documentation.`},{t:`h2`,text:`Financing Options Built Around Your Investment Strategy`},{t:`p`,text:`Every investment property follows a unique timeline. Financing structures may include:`},{t:`ul`,items:[`Short-term acquisition financing`,`Interest-only payment options`,`Renovation draw schedules`,`Transitional bridge financing`,`Prepayment flexibility where applicable`]},{t:`p`,text:`Our investment property loan North Carolina programs are designed to support execution while maintaining responsible underwriting standards.`},{t:`h2`,text:`North Carolina Real Estate Markets Driving Investor Demand`},{t:`p`,text:`North Carolina remains one of the fastest-growing states in the country, attracting residents, employers, and real estate investment activity across multiple regions. Charlotte continues to attract investors due to strong job growth, corporate expansion, and consistent housing demand. The Raleigh-Durham Triangle, supported by major universities, technology companies, and population growth, remains one of the stateâs strongest investment markets. The Triad region of Greensboro and Winston-Salem continues to offer value-add opportunities supported by affordability and stable demand. Along the coast, Wilmington benefits from coastal growth and strong migration trends that continue to support residential investment activity throughout the area and surrounding communities. Cities including Fayetteville, Asheville, High Point, Cary, and Concord continue to create opportunities for acquisition, renovation, and portfolio expansion across North Carolinaâs growing secondary markets. Reliable financing from experienced private lenders North Carolina investors trust allows borrowers to act decisively across these diverse local markets.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made simple. Learn about available loan programs, execution processes, eligible property types, and how A4 Capital Partners supports transactions across New Hampshire with speed, clarity, and reliable capital. Get the insight you need to move forward with confidence.`},{t:`h3`,text:`What is a hard money loan and how does it work in North Carolina?`},{t:`p`,text:`A hard money loan is a short-term, asset-based financing option where approval is primarily based on the value of the property and the deal potential rather than the borrowerâs credit profile. In North Carolina, it is commonly used for acquisition, renovation, and fix-and-flip projects.`},{t:`h3`,text:`How fast does A4 Capital Partners fund loans?`},{t:`p`,text:`According to the page, A4 Capital Partners typically completes the approval and funding process within 5â10 days, allowing investors to act quickly in competitive real estate markets.`},{t:`h3`,text:`What are the typical loan terms, including LTV and LTC?`},{t:`p`,text:`The lender offers up to 70% Loan-to-Value (LTV) and up to 90% Loan-to-Cost (LTC). The loans are short-term and structured around the projectâs exit strategy rather than long-term repayment schedules.`},{t:`h3`,text:`What types of real estate projects are eligible for financing?`},{t:`p`,text:`Financing is available for acquisition, fix-and-flip/rehab projects, refinancing, multifamily repositioning, rental portfolio growth, and new construction projects.`}]],"hard-money-lenders-tennessee":[[{t:`h2`,text:`Hard Money Financing in Tennessee | Private Lenders for Real Estate Investors`},{t:`p`,text:`A4CP provides structured hard money loans Tennessee real estate investors use to acquire, renovate, refinance, and reposition investment properties throughout the state. Our financing solutions are designed for investors operating in competitive acquisition environments where timing, certainty, and execution matter.`},{t:`p`,text:`From Nashville and Memphis to Knoxville and Chattanooga, Tennessee continues to attract investors seeking value-ad
39d opportunities supported by population growth, expanding employment centers, and strong housing demand. As experienced hard money lenders Tennessee investors rely on, we structure financing around property value, investment potential, and exit strategy rather than traditional income-based lending requirements.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Trusted Hard Money Financing for Tennessee Investors`},{t:`p`,text:`Tennesseeâs real estate market offers opportunities across urban redevelopment projects, suburban growth markets, and renovation-focused residential investments. Investors often require financing that can support acquisition timelines while maintaining disciplined underwriting standards.`},{t:`p`,text:`As established hard money lenders Tennessee investors trust, A4CP provides financing for:`},{t:`ul`,items:[`Acquisition and renovation projects`,`Transitional bridge financing`,`Multifamily repositioning`,`Rental portfolio expansion`,`Value-add residential investments`,`Strategic refinancing objectives`]},{t:`p`,text:`Our approach focuses on asset fundamentals, realistic valuations, and clearly defined exit strategies designed to support long-term investment performance.`}],[{t:`h2`,text:`Flexible Real Estate Capital for Tennessee Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Lending Process Built for Speed and Certainty`},{t:`p`,text:`Execution timelines across Tennessee competitive investment markets often require timely credit evaluation supported by clearly defined underwriting standards. A4 Capital Partners follows a disciplined review process designed to provide early transparency around deal structure while maintaining consistent risk assessment.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Nashville, Memphis, and regional Tennessee cities often require efficient decision-making supported by clear underwriting parameters. Our process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who Our Tennessee Financing Programs Are Designed For`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Asset-Based Real Estate Financing Throughout Tennessee`},{t:`p`,text:`A4 Capital Partners structures asset-based financing solutions that support acquisition, stabilization, renovation, and refinancing strategies across a wide range of Tennessee property types.`},{t:`p`,text:`Whether financing a renovation project in Nashville, refinancing an investment property in Memphis, or acquiring a value-ad
39d opportunity in Knoxville, our lending solutions are designed to support efficient execution.`}],[{t:`h2`,text:`Financing Structures for Professional Investors`},{t:`p`,text:`Our lending solutions are structured for professional real estate operators who require dependable, time-sensitive financing.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Why Investors Use Hard Money Loans in Tennessee`},{t:`p`,text:`Private capital serves a practical purpose in Tennesseeâs competitive real estate market, where acquisition speed can directly influence pricing and investment outcomes.`},{t:`p`,text:`Working with experienced hard money lenders Tennessee investors trust allows borrowers to:`},{t:`ul`,items:[`Secure properties under compressed timelines`,`Finance renovation-dependent assets`,`Compete more effectively with cash buyers`,`Execute value-add investment strategies`,`Avoid lengthy conventional lending processes`]},{t:`p`,text:`For investors pursuing acquisition, renovation, repositioning, or bridge financing opportunities, hard money loans Tennessee provide flexibility designed around the investment itself.`},{t:`h2`,text:`Financing Options Built Around Your Investment Strategy`},{t:`p`,text:`Tennessee investment properties often involve different timelines, renovation scopes, and exit strategies. Financing structures may include:`},{t:`ul`,items:[`Short-term capital aligned with project exits`,`Interest-only payment arrangements`,`Phased renovation funding`,`Transitional bridge financing`,`Prepayment flexibility where applicable`]},{t:`p`,text:`Our investment property loan Tennessee programs are designed to support operational execution while maintaining disciplined underwriting standards.`},{t:`h2`,text:`Tennessee Real Estate Markets Driving Investor Demand`},{t:`p`,text:`Tennessee continues to attract investors due to population growth, favorable business conditions, and consistent housing demand across major metropolitan areas.`},{t:`h5`,text:`Nashville`},{t:`p`,text:`Nashville remains one of the stateâs most active investment markets, supported by corporate expansion, healthcare growth, and continued population migration.`},{t:`h5`,text:`Memphis`},{t:`p`,text:`Memphis offers opportunities for investors focused on rental properties, renovation projects, and value-add acquisitions supported by stable housing demand.`},{t:`h5`,text:`Knoxville`},{t:`p`,text:`Knoxvilleâs growing population and expanding regional economy continue to create opportunities for residential renovation and investment activity.`},{t:`h5`,text:`Chattanooga`},{t:`p`,text:`Chattanooga remains attractive to investors due to ongoing redevelopment efforts, business growth, and increasing demand for updated housing inventory.`},{t:`h4`,text:`Growing Secondary Markets`},{t:`p`,text:`Cities including Franklin, Murfreesboro, Clarksville, Hendersonville, and Johnson City continue to present opportunities for acquisition, renovation, and portfolio growth.`},{t:`p`,text:`Reliable real estate loan Tennessee financing allows investors to move decisively while managing risk across these diverse local markets.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made simple. Learn about available loan programs, execution processes, eligible property types, and how A4 Capital Partners supports transactions across Tennessee with speed, clarity, and reliable capital. Get the insight you need to move forward with confidence.`},{t:`h3`,text:`What is hard money lending used for in Tennessee real estate investing?`},{t:`p`,text:`It is used for fast property acquisitions, fix-and-flip projects, renovation funding, bridge financing, refinancing, and construction or repositioning deals`},{t:`h3`,text:`How quickly can a hard money loan close?`},{t:`p`,text:`Most loans are structured for fast execution, typically closing in about 5â10 days depending on the deal and required documentation.`},{t:`h3`,text:`What kind of borrowers does A4 Capital Partners work with?`},{t:`p`,text:`The lender primarily works with real estate investors, builders, operators, and brokers who need fast, flexible capital for time-sensitive transactions.`},{t:`h3`,text:`What are the typical loan terms and leverage offered?`},{t:`p`,text:`Loans may go up to 70% LTV and 90% LTC, with loan sizes starting around $500,000, designed for short-term investment strategies.`},{t:`h3`,text:`What are the interest rates and repayment features?`},{t:`p`,text:`Rates generally start around 8.5%, with structured repayment options like interest-only payments and flexible terms, often without prepayment penalties.`}]],"massachusetts-hard-money-lender":[[{t:`h2`,text:`Hard Money Loan in Massachusetts | Disciplined Private Capital for Real Estate Investors`},{t:`p`,text:`At A4CP, we offer hard money loans that are backed by assets and tailored to meet the needs of Massachusetts real estate investors who conduct business in highly competitive acquisition markets.`},{t:`p`,text:`If you are assessing a hard money lender in Massachusetts , closing certainty and quality underwriting deserve as much importance as quick closing times.`}],[{t:`h2`,text:`Our Track Record of Consistent Success`}],[{t:`h2`,text:`A Professional Hard Money Lender in Massachusetts with Emphasis on Execution`},{t:`p`,text:`Massachusetts real estate is characterized by a limited supply, high rental demand, and value through renovation. This means that maintaining margins requires proper valuations and leverage management.`},{t:`p`,text:`We are well-experienced hard money lenders in Massachusetts and can fund the following:`},{t:`ul`,items:[`Fix and flip investments`,`Bridge loans`,`Repositioning of multifamily`,`Portfolio rental additions`,`Value-add transitions`,`Refinancing`]}],[{t:`h2`,text:`Flexible Real Estate Capital in Massachusetts`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`}
39,{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Need to Speed Up in Massachusetts?`},{t:`p`,text:`In a tough market such as Massachusetts, where time may be the difference between making a deal or missing out on one, A4 Credit Partners is designed for rapid action, providing quick turnaround and certainty of execution.`},{t:`p`,text:`Our efficient process ensures that investors waste no time from their initial look at a deal all the way through to its closure in places such as Boston and surrounding suburban investment areas.`},{t:`h4`,text:`Principal-Level Decision Making`},{t:`p`,text:`Having direct access to individuals who are experienced decision makers enables quicker turnaround, faster approvals, and more certainty in the overall loan origination process.`},{t:`h4`,text:`Streamlined Underwriting`},{t:`p`,text:`Using asset based underwriting and deal alignment enables the determination of consistent terms and shortened transaction times.`},{t:`h4`,text:`Internal Transaction Execution`},{t:`p`,text:`All underwriting, funding and servicing processes take place internally and minimize unnecessary transfers between different individuals.`}],[{t:`h2`,text:`Our size and ability mean that we can be adaptable and provide custom-made solutions in line with each clientâs approach.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Designed to handle the right kinds of transactions and partnerships`},{t:`h2`,text:`A4 Who Typically Collaborates With in Massachusetts`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Financing Real Estate in Massachusetts`},{t:`p`,text:`A4 Capital Partners offers asset-based financing designed to help clients purchase, reposition, and refinance properties with confidence. Send us your deal and get access to financing tailored for Massachusetts investors. Our process is built for speed, clarity, and reliable execution at every stage of the transaction. We focus on delivering capital solutions that align with each investorâs strategy and timeline.`}],[{t:`h2`,text:`Hard Money Loans Tailored for Massachusetts Investors`},{t:`p`,text:`Our loans are designed for real estate professionals seeking reliable, time-sensitive financing. We focus on delivering clear terms, fast execution, and consistent support throughout every transaction.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`What Sets A4CP Apart from Other Hard Money Lenders in Massachusetts?`},{t:`p`,text:`It is important to note that not all hard money lenders in Massachusetts adhere to stringent underwriting practices.`}
39,{t:`p`,text:`A4CP combines efficient execution with prudent risk management practices. This includes:`},{t:`ul`,items:[`ARV Modeling based on reality`,`Feasibility of Renovation`,`Exit Planning`,`Prudent Leverage limits`,`Our aim is not just about financing deals but structuring capital that delivers sustainable results for our investors. Strict underwriting is an important practice in the price sensitive markets of Massachusetts.`]},{t:`h2`,text:`Strategic Benefits of Hard Money Lending in Massachusetts`},{t:`p`,text:`The private funding plays a definite strategic role in competitive bidding environments.`},{t:`p`,text:`Partnering with skilled hard money lenders in Massachusetts enables real estate investors to:`},{t:`ul`,items:[`Obtain properties within tight timeframes`,`Fund properties that require renovation`,`Bypass prolonged traditional loan processes`,`Keep negotiating power`,`Leverage funds`]},{t:`p`,text:`Timeliness facilitated by proper underwriting creates sustainable advantage.`},{t:`h2`,text:`Strategic Financing For Real Estate Investment In Massachusettsâ Top Acquisition Markets`},{t:`p`,text:`There are differences in the availability of real estate investment opportunities based on the region in Massachusetts, which require that funding be consistent with the market. As expert hard money lenders in Massachusetts, we offer strategic funding solutions for investors who are working in the most active markets in the state.`},{t:`p`,text:`For example, there are many value-added deals in Boston, Cambridge, and Somerville, as investors focus on renovating the limited inventory of properties that have high resale demand in those locations. The high-end neighborhoods, such as Back Bay, South Boston, and Brookline, remain popular investment targets where the property needs to be acquired quickly and private loans are necessary to get the property.`},{t:`p`,text:`In the suburbs, there are value-added opportunities in Newton, Wellesley, and Lexington, as investors purchase single-family homes and small multi-family buildings in affluent areas. The competitive zip codes such as 02116, 02118, 02459, and 02481 require fast asset-based funding solutions.`},{t:`p`,text:`To the West, Worcester and Springfield also offer value-added investments in underperforming assets with great potential.`}],[{t:`map`}],[{t:`h2`,text:`Find out the answers to all your Partnersâ questions`},{t:`p`,text:`Easy way to finance real estate deals. Find out about loan programs available, process of funding, types of properties which can be financed and how we help with transactions in New York State fast, efficiently and with the money.`},{t:`h3`,text:`How are loan amounts determined?`},{t:`p`,text:`Loan structure is based on current asset value, projected stabilized value, leverage thresholds, and renovation scope feasibility where applicable.`},{t:`h3`,text:`Do you finance heavy renovation projects?`},{t:`p`,text:`Yes. Many Massachusetts opportunities involve transitional or distressed properties.`},{t:`p`,text:`We evaluate projected value and renovation viability before structuring capital.`},{t:`h3`,text:`Do you lend on multifamily assets?`},{t:`p`,text:`Yes. We finance small multifamily and repositioning opportunities statewide.`},{t:`h3`,text:`How quickly can transactions close?`},{t:`p`,text:`Private lending is structured to move materially faster than conventional bank financing, subject to documentation and third-party requirements.`},{t:`h3`,text:`What factors most influence approval?`},{t:`p`,text:`Primary considerations include realistic ARV assumptions, renovation feasibility, defined exit planning, and appropriate leverage structure.`}]],"new-jersey-hard-money-lender":[[{t:`h2`,text:`Hard Money Loans in New Jersey | Disciplined Private Capital for Real Estate Investors`},{t:`p`,text:`A4CP is your hard money lender in New Jersey for real estate investors investing in a competitive marketplace. We offer hard money loans to finance the purchase, improvement, repositioning, and transition of properties in the state of New Jersey.`},{t:`p`,text:`Whether your investment takes place in a highly sought after commuter market around New York City or any part of central and southern New Jersey, we have structured our lending to be executed properly.`},{t:`p`,text:`As you consider hard money lenders in New Jersey, closing performance should be just as important as speed.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Professional Hard Money Lender in New Jersey with Structured Approach to Execution`},{t:`p`,text:`The New Jersey market for real estate investments is characterized by strong demand for commuters, low inventory levels, and ongoing renovations. In such a setting, protecting oneâs investment margins can be accomplished through proper valuation and leveraging.`},{t:`p`,text:`At Hard Money Lenders NJ, our expertise lies in providing funding for:`},{t:`ul`,items:[`fix and flip deals`,`bridge financing`,`multifamily renovations`,`rental portfolio expansion`,`value-ad
39d situations`]}],[{t:`h2`,text:`Adaptable Real Estate Financing for New Jersey Properties`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Do You Want to Go Faster in New Jersey?`},{t:`p`,text:`Many investment opportunities in New Jersey can happen fast, especially those that relate to job market areas. A4 Credit Partners provides quick turnarounds, good terms, and reliable executions when speed is of the essence.`},{t:`p`,text:`Whether in reviewing deals or closing them, our efficient process ensures investors avoid unnecessary delays in competitive acquisition zones.`},{t:`h4`,text:`Principal-Led Decisions`},{t:`p`,text:`Direct contact with seasoned decision-makers facilitates rapid responses, approvals, and certainty throughout the financing process.`},{t:`h4`,text:`Streamlined Underwriting Processg`},{t:`p`,text:`Focused asset-based underwriting and early deal structuring allow for building robust financing structures and speeding up the execution time frame.`},{t:`h4`,text:`Internal Transaction Execution`},{t:`p`,text:`The underwriting process, funding, and servicing are all performed internally, allowing transactions to move smoothly from approval to closing.`}],[{t:`h2`,text:`Business Partnerships for A4 in New Jersey`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Typically Works With in New Jersey`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Real Estate Funding forNew Jersey`},{t:`p`,text:`A4 Capital Partners offers asset-based funding designed to help investors purchase, renovate, and refinance properties with ease and reliability delivering financing solutions built for New Jersey investors. Let us review your deal today and move your project forward with confidence.`}],[{t:`h2`,text:`Real Estate Investor Loan Programs in New Jersey`},{t:`p`,text:`We create structured private capital solutions for professional investors working within time-constrained environments. Our financing is designed to support fast decision-making, clear execution, and dependable outcomes across every transaction.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`New Jersey Investment Market Overview`},{t:`p`,text:`The investment climate of New Jersey is shaped by demand from commuters, redevelopment, and the lack of housing in specific submarkets. There is a need to strike a balance between the price and the renovation cost and resale expectation.`},{t:`p`,text:`We are seasoned hard money lenders in New Jersey and our underwriting is aware of local market sensitivities.`},{t:`p`,text:`Valuation is important in narrow-margin markets.`},{t:`h2`,text:`Strategic Value Propositions of Hard Money Lending in New Jersey`},{t:`p`,text:`Private equity plays a strategic role within a competitive acquisition environment.`},{t:`p`,text:`Partnering with professional hard money lenders in New Jersey enables:`},{t:`ul`,items:[`Quick acquisition of property`,`Leverage for renovation dependent property`,`No need to go through lengthy conventional lending processes`,`Preservation of negotiating power`,`Effective redeployment of capital`]},{t:`p`,text:`Speed with underwriting discipline generates sustainability.`}],[{t:`h2`,text:`Find out what Partners can do for you`},{t:`p`,text:`Real estate funding made easy. Get informed on which loan products are available, procedures involved, types of properties that qualify, and how A4 Capital Partners provides efficie
39nt funding for your transactions throughout New Jersey.`},{t:`h3`,text:`What is the typical loan amount for a hard money loan in New Jersey?`},{t:`p`,text:`Loan amounts are based on current property value and projected ARV.`},{t:`p`,text:`Financing may include a percentage of the purchase price and renovation funding, depending on leverage parameters and overall investment strategy.`},{t:`h3`,text:`Do hard money lenders in New Jersey finance properties in urban redevelopment areas?`},{t:`p`,text:`Yes. We regularly finance projects in redevelopment-focused cities such as Newark, Paterson, and Camden where value-add strategies are common.`},{t:`h3`,text:`Can I get a hard money loan in New Jersey for a multifamily property?`},{t:`p`,text:`Yes. We finance small multifamily and repositioning assets across New Jersey, including 2â4 unit properties and small apartment buildings.`},{t:`h3`,text:`How fast can a hard money lender in New Jersey close?`},{t:`p`,text:`Private lending is structured to move significantly faster than traditional bank financing, subject to documentation readiness and third-party reports.`},{t:`h3`,text:`Are hard money loans in New Jersey based on credit score?`},{t:`p`,text:`Credit is reviewed, but asset strength, ARV assumptions, leverage structure, and exit planning carry greater weight in approval decisions.`},{t:`h3`,text:`Do you lend in commuter-heavy markets like Jersey City and Hoboken?`},{t:`p`,text:`Yes. We provide hard money loans in New Jersey across commuter-driven submarkets where demand and liquidity remain strong.`}]],"new-york-hard-money-lender":[[{t:`h2`,text:`Hard Money Lenders New York | Fast, Structured Investment Property Loans`},{t:`p`,text:`A4CP is a private lender providing asset-based hard money loans in New York investors use to acquire, reposition, and refinance real estate across the state. From competitive NYC boroughs to growing upstate markets, we structure financing that allows investors to close quickly and execute with confidence. If you are evaluating hard money lenders in New York, you need more than speed, you need certainty, transparency, and disciplined underwriting. Thatâs where A4CP differentiates.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Your Trusted Private Lender for Real Estate Investment Loans in New York`},{t:`p`,text:`A4CP is a leading private lender providing fast, reliable hard money loans New York investors depend on to acquire, refinance, and scale real estate across the state construction loans New York. From New York Cityâs five boroughs to upstate markets like Albany, Buffalo, and Rochester, we deliver asset-based financing built specifically for real estate professionals. Whether youâre targeting competitive deals in NYC or expanding into high-growth secondary markets, A4CP structures capital to help you move quickly and close with confidence.`}],[{t:`h2`,text:`Flexible Real Estate Capital for New York Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Want to Move Faster in New York?`},{t:`p`,text:`In New Yorkâs competitive real estate market, timing is everything. A4 Credit Partners is built to move quickly, delivering fast feedback, clear terms, and dependable execution when speed matters most. From initial review through closing, our streamlined process is designed to eliminate delays and keep transactions moving without unnecessary friction.`},{t:`p`,text:`From initial review through closing, our streamlined process is designed to eliminate delays and keep transactions moving without unnecessary friction.`},{t:`h4`,text:`Principal-Led Decisions`},{t:`p`,text:`Direct access to decision-makers enables faster responses, quicker approvals, and fewer surprises throughout the process.`},{t:`h4`,text:`Streamlined Underwriting`},{t:`p`,text:`Asset-focused underwriting and early alignment help deliver reliable terms and accelerate execution.`},{t:`h4`,text:`In-House Execution`},{t:`p`,text:`Underwriting, funding, and servicing are handled internally to reduce handoffs and keep timelines on track.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Typically Works With in New York`},{t:`h3`,text:`Investors`}
39,{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Real Estate Financing in New York`},{t:`p`,text:`New York is one of the most competitive real estate markets in the U.S., where timing, execution, and certainty are critical. Investors and operators often require flexible capital structures and fast decision-making to compete effectively across asset types.`},{t:`p`,text:`Appropriate financial tools may greatly influence whether transactions succeed or not and how fast the portfolios grow. Local lending mechanisms and capital needs should be considered for effective decision-making in such circumstances.`},{t:`p`,text:`Investors who look for custom solutions can benefit from investment property loans New York which assist in purchasing, refinancing, and managing real estate.`}],[{t:`h2`,text:`Loan Programs Designed for New York Investors`},{t:`p`,text:`We structure disciplined private capital solutions specifically for professional real estate investors operating in competitive markets. These solutions are designed to meet the demands of fast-moving deals where traditional financing may not be able to keep pace. Our goal is to provide reliable funding support that helps investors close opportunities with confidence and clarity.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Understanding the New York Investment Lending Landscape`},{t:`p`,text:`New York real estate is highly competitive and margin-sensitive. From aggressive bidding in NYC boroughs to value-add opportunities upstate, investors operate in markets where speed, pricing accuracy, and disciplined underwriting directly impact profitability.`},{t:`p`,text:`As experienced hard money lenders in New York, we evaluate each deal within the context of local market conditions, including realistic ARV modeling, renovation risk, and exit strategy feasibility.`},{t:`p`,text:`Structured capital matters in this environment. We donât rely on generic national guidelines. We underwrite based on how New York investors actually operate.`},{t:`p`,text:`In a market, disciplined execution is the difference between closing and losing.`},{t:`h2`,text:`Flexible Loan Structures Designed for Investors`},{t:`p`,text:`At A4CP, we donât believe your investment strategy should be forced into a rigid banking framework. Every deal in New York is different, different timelines, different scopes, different exit plans. Your financing should reflect that.`},{t:`p`,text:`Thatâs why we structure our hard money loans in NY around your specific investment objectives.`},{t:`p`,text:`When we design a loan, we build it to support execution â not create limitations. Our programs may include:`},{t:`ul`,items:[`Short-term financing aligned with your resale or refinance timeline`,`Interest-only payment structures to preserve cash flow during the project`,`Flexible rehab draw schedules for renovation-heavy properties`,`Transitional bridge financing for repositioning or lease-up strategies`,`Prepayment flexibility (where applicable) so you can exit without unnecessary penalties`]},{t:`p`,text:`We understand that protecting your margins is critical. Carrying costs, construction timelines, and market shifts all impact profitability. Our job is to structure capital that supports your plan â not disrupts it.`},{t:`p`,text:`When you work with A4CP, youâre not getting a standardized loan product. Youâre getting a financing solution built around how y
39ou invest.`},{t:`h2`,text:`Strategic Lending Across New Yorkâs Most Competitive Markets`},{t:`p`,text:`New York real estate moves fast, and financing must keep pace with local market conditions. As experienced hard money lenders in New York, A4CP provides structured capital for investors operating across the stateâs most active investment corridors.`},{t:`p`,text:`Within New York City, investors frequently acquire and reposition properties throughout Manhattan, Brooklyn, and Queens, where limited inventory and strong resale demand reward well-executed renovation strategies. High-value neighborhoods such as Tribeca, the Upper West Side, Williamsburg, and Long Island City continue to attract investors competing for premium assets.`},{t:`p`,text:`Beyond the city, markets in Westchester County and Long Island, including Scarsdale, White Plains, Huntington, and Garden City, offer strong opportunities for value-add acquisitions in high-income communities where updated properties command higher resale pricing. Investors targeting competitive zip codes like 10023, 11215, 10583, and 11530 often rely on private lending to move quickly and secure deals ahead of traditional financing timelines.`},{t:`p`,text:`A4CP structures financing around real market execution, helping investors close confidently across New Yorkâs most competitive locations.`}],[{t:`map`}],[{t:`h2`,text:`Helpful Answers for New York Real Estate Investors`},{t:`p`,text:`Choosing the right financing partner is an important part of any real estate investment strategy. Our FAQs answer common questions about hard money loans in New York, including eligibility requirements, funding timelines, loan structures, qualifying property types, and the lending process. Explore the information below to better understand your financing options and move forward with confidence on your next investment.`},{t:`h3`,text:`How much can I borrow on a hard money deal in New York?`},{t:`p`,text:`Loan amounts are primarily based on the propertyâs value and projected After Repair Value (ARV).`},{t:`p`,text:`For fix-and-flip projects, many investors structure loans based on:`},{t:`ul`,items:[`A percentage of the purchase price`,`A percentage of the ARV`,`Renovation budget funding (when applicable)`]},{t:`p`,text:`The final structure depends on the asset, location, scope of work, and exit strategy. If you have a property under contract, the fastest way to determine loan size is to submit the deal for review.`},{t:`h3`,text:`Can I get funding for a heavy rehab property in NYC?`},{t:`p`,text:`Yes, many profitable opportunities in New York involve distressed or value-add properties.`},{t:`p`,text:`Traditional banks often decline properties that:`},{t:`ul`,items:[`Need major renovations`,`Have deferred maintenance`,`Are vacant`,`Are not stabilized`]},{t:`p`,text:`As experienced hard money lenders in New York, we evaluate the propertyâs potential, not just its current condition. If the numbers support the project and the exit plan is clear, heavy rehab scenarios can be structured appropriately.`},{t:`h3`,text:`Do you fund multifamily properties in New York?`},{t:`p`,text:`Yes. We finance small multifamily and value-add apartment buildings across New York State.`},{t:`p`,text:`Multifamily bridge loans are commonly used for:`},{t:`ul`,items:[`Lease-up stabilization`,`Renovation and repositioning`,`Short-term acquisition financing`,`Refinancing before long-term takeout`]},{t:`p`,text:`If youâre searching for professional New York hard money lenders for multifamily investments, structured short-term capital may provide the flexibility you need.`},{t:`h3`,text:`How fast can I realistically close in New York?`},{t:`p`,text:`Speed depends on documentation readiness, property type, and third-party reports. However, private lending is structured to move significantly faster than traditional financing.`},{t:`p`,text:`If youâre bidding in a competitive NYC market, early submission of your deal allows underwriting to begin immediately, improving closing certainty.`},{t:`h3`,text:`What credit score is required for hard money loans in NY?`},{t:`p`,text:`Credit is reviewed, but it is not the sole determining factor.`},{t:`p`,text:`Unlike conventional lenders, we prioritize:`},{t:`ul`,items:[`Property strength`,`Loan-to-value`,`Investor experience`,`Exit strategy`]},{t:`p`,text:`Strong deals with clear financial planning can qualify even when traditional banks hesitate.`},{t:`h3`,text:`Are interest rates higher than traditional loans?`},{t:`p`,text:`Private loans are structured differently than conventional mortgages because they:`},{t:`ul`,items:[`Close faster`,`Carry shorter terms`,`Finance higher-risk properties`,`Require less traditional documentation`]},{t:`p`,text:`For many investors, the cost of speed is justified by:`},{t:`ul`,items:[`Securing profitable deals`,`Avoiding lost opportunities`,`Completing renovations quickly`,`Refinancing after value creation`]},{t:`h3`,text:`Can first-time investors qualify for hard money loans?`},{t:`p`,text:`Yes, though experience strengthens an application.`},{t:`p`,text:`If you are newer to investing, strong factors include:`},{t:`ul`,items:[`Clear renovation scope`,`Conservative budgeting`,`Defined exit strategy`,`Reliable contractor support`]},{t:`p`,text:`Private lenders evaluate preparation and planning, not just track record.`},{t:`h3`,text:`What makes a hard money loan get declined?`},{t:`p`,text:`Common reasons include:`},{t:`ul`,items:[`Overestimated ARV`,`Unrealistic renovation budgets`,`No clear exit strategy`,`Excessive leverage`,`Incomplete documentation`]},{t:`p`,text:`Preparation matters. The stronger your deal presentation, the smoother underwriting becomes.`}]],"pennsylvania-hard-money-lender":[[{t:`h2`,text:`Hard Money Loan in Pennsylvania | Structured Private Capital for Real Estate`},{t:`p`,text:`A4CP provides asset-based hard money loans Pennsylvania for real estate investors pursuing acquisitions, renovations, and redevelopment projects. We finance property purchases, bridge transactions, renovation plans, and other short-term investment strategies across a variety of market conditions.`},{t:`p`,text:`The state of Pennsylvania is poised with possibilities in both its major and secondary markets. The city of Philadelphia continues to provide possibilities for redevelopment and rental properties, while Pittsburgh keeps attracting investors interested in neighborhood revamping projects. Other secondary markets like Allentown, Harrisburg, and Scranton can prove equally profitable with renovations and value-ad
39ditions leading to high profits.`},{t:`p`,text:`For investors comparing hard money lenders in Pennsylvania, speed is only one part of the equation. Consistent underwriting, dependable funding, and the ability to close as expected can be equally important when evaluating a lending partner.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`A Professional Hard Money Lender in Pennsylvania Focused on Consistent Execution`},{t:`p`,text:`Pennsylvaniaâs real estate market offers opportunities across urban redevelopment projects, older housing inventory, and a wide range of metro and secondary markets. Investors pursuing renovation-driven strategies must carefully manage construction costs and establish realistic after-repair value (ARV) expectations to maintain project profitability.`},{t:`p`,text:`A4CP provides financing for a variety of investment strategies, including:`},{t:`ul`,items:[`Fix-and-flip acquisitions`,`Bridge financing for transitional properties`,`Small multifamily repositioning projects`,`Rental portfolio growth and expansion`,`Value-add redevelopment opportunities`,`Short-term refinance transactions`]},{t:`p`,text:`Our lending approach begins with the asset itself. We review projected ARV, evaluate the scope and practicality of planned improvements, analyze leverage levels, and consider the viability of the proposed exit strategy before structuring financing.`}],[{t:`h2`,text:`Real Estate Capital Designed for Pennsylvania Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`Move Faster on Pennsylvania Real Estate Opportunities`},{t:`p`,text:`Real estate opportunities across Pennsylvania often move quickly, especially in urban redevelopment areas and expanding suburban markets. A4 Credit Partners provides prompt feedback, straightforward terms, and reliable execution when timing is critical.`},{t:`p`,text:`From initial deal evaluation to final closing, our streamlined process is designed to reduce delays and help investors move forward with confidence in competitive acquisition environments across the state.`},{t:`h4`,text:`Principal-Led Decisions`},{t:`p`,text:`Close connection with seasoned decision-makers facilitates speed and certainty in the loan process.`},{t:`h4`,text:`Streamlined Underwriting`},{t:`p`,text:`Through asset-based underwriting and timely deal alignment, it is possible to achieve a reliable loan structure and streamline execution timeframes.`},{t:`h4`,text:`In-House Execution`},{t:`p`,text:`The processes of underwriting, funding, and servicing are done in-house to minimize handoffs.`}],[{t:`h2`,text:`With the scale and experience to adapt, we deliver tailored financing solutions that align with each clientâs specific strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the Right Deals and the Right Partners`},{t:`h2`,text:`Who A4 Typically Works With in Pennsylvania`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Flexible Real Estate Financing in Pennsylvania`},{t:`p`,text:`A4 Capital Partners provides asset-based financing to help investors acquire, reposition, and refinance properties with confidence and reliable execution across Pennsylvania.`}],[{t:`h2`,text:`Custom Hard Money Loans for Pennsylvania Investors`},{t:`p`,text:`Our lending approach is tailored for professional real estate operators who depen
39d on timely, reliable financing. Each transaction is structured to provide speed, clarity, and execution confidence.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`What Makes A4CP Different from Other Hard Money Lenders in Pennsylvania?`},{t:`p`,text:`Not all hard money lenders in Pennsylvania follow a disciplined underwriting approach many prioritize speed over proper risk evaluation.`},{t:`p`,text:`At A4CP, we combine fast execution with structured deal analysis. Every transaction is evaluated with focus on:`},{t:`ul`,items:[`Realistic ARV assessment`,`Renovation scope evaluation`,`Clear exit strategy planning`,`Conservative leverage structure`]},{t:`p`,text:`It is not simply about financing deals, but financing deals in such a way that there is continuous success for investors.`},{t:`p`,text:`In an environment where profitability can be highly dependent on location, underwriting discipline is key to preserving profitability.`},{t:`h2`,text:`The Strategic Advantage of Hard Money Loans in Pennsylvania`},{t:`p`,text:`Private lending is more than just an alternative to banks it is a strategic financing option for real estate investors.`},{t:`p`,text:`Working with experienced hard money lenders in Pennsylvania allows investors to:`},{t:`ul`,items:[`Move quickly in competitive deal environments`,`Fund properties that require renovation or repositioning`,`Avoid lengthy traditional lending processes`,`Strengthen negotiation positions with sellers`,`Recycle capital more efficiently across investments`]},{t:`p`,text:`When supported by disciplined underwriting, speed becomes a meaningful advantage in achieving stronger investment results.`},{t:`h2`,text:`Strategic Lending Across Pennsylvaniaâs Key Investment Locations`},{t:`p`,text:`Pennsylvania offers a diverse real estate landscape, from major metropolitan hubs to emerging regional markets, creating strong opportunities for investors. A4CP provides structured financing across the stateâs most active investment areas.`},{t:`p`,text:`In Philadelphia, investors look to make value-add acquisitions in development areas, which will take advantage of high demand for improved buildings. In Western Pennsylvania, specifically Pittsburgh, all efforts are centered on multifamily and transitional housing acquisitions.`},{t:`p`,text:`Properties in markets like Allentown, Harrisburg, and Reading offer the opportunity to purchase poor-performing buildings and improve their performance through renovations. Properties in hot zip codes like 19103, 15222, and 18102 require quick private financing due to high competition.`},{t:`p`,text:`By aligning financing with local market conditions and real-world execution timelines, A4CP helps investors operate effectively across Pennsylvaniaâs most competitive locations.`}],[{t:`map`}],[{t:`h2`,text:`Answers to Your Partnersâ Questions`},{t:`p`,text:`Real estate financing simplified. Understand what loan options are available, the process for executing these loans, and which properties are eligible. Discover how A4 Capital Partners makes real estate deals happen in Pennsylvania quickly, efficiently, and with certainty.`},{t:`h3`,text:`How is loan amount determined for a hard money loan in Pennsylvania?`},{t:`p`,text:`Loan structure is based on current property value, projected After Repair Value (ARV), defined leverage parameters, and renovation feasibility where applicable.`},{t:`h3`,text:`Do hard money lenders in Pennsylvania finance heavy renovation projects?`},{t:`p`,text:`Yes. Many Pennsylvania investment opportunities involve older housing stock requiring significant updates.`},{t:`p`,text:`We evaluate projected stabilized value and renovation scope feasibility before structuring capital.`},{t:`h3`,text:`Can I obtain hard money loans in Pennsylvania for multifamily properties?`},{t:`p`,text:`Yes. We finance small multifamily and repositioning assets throughout the state, including 2â4 unit properties and small apartment buildings.`},{t:`h3`,text:`How quickly can a hard money lender in Pennsylvania close?`},{t:`p`,text:`Private lending is structured to move materially faster than conventional bank financing, subject to documentation readiness and third-party requirements.`},{t:`h3`,text:`Are hard money loans in Pennsylvania based primarily on credit score?`},{t:`p`,text:`Credit is reviewed, but asset fundamentals, realistic ARV modeling, leverage structure, and clearly defined exit planning carry greater weight in approval decisions.`}]],"south-carolina-hard-money-lender":[[{t:`h2`,text:`Hard Money Lenders South Carolina | Private Money & Hard Money Loan Financing for Real Estate Investors`},{t:`p`,text:`A4CP is a trusted name among hard money lenders south Carolina investors rely on for structured, asset-based loans in time-sensitive acquisition environments. As one of the leading private money lenders south carolina offers, our financing supports property acquisition, renovation initiatives, transitional repositioning, and short-term investment strategies statewide, from the Upstate to the Lowcountry.`},{t:`p`,text:`Investors looking for hard money financing in South Carolina often value quick funding, transparent loan structures, and reliable communication throughout the lending process.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Private Money Lending Aligned with South Carolina Investment Activity`},{t:`p`,text:`Investment opportunities across South Carolina are shaped by strong in-m
39igration, a business-friendly tax climate, and aging residential inventory that continues to support consistent renovation activity. Effective real estate financing south carolina market demand requires measured leverage and realistic underwriting assumptions aligned with local conditions.`},{t:`p`,text:`As established hard money lenders south carolina investors turn to again and again, A4CP provides financing for:`},{t:`ul`,items:[`Acquisition and renovation projects`,`Transitional bridge loans south carolina scenarios`,`Multifamily repositioning`,`Rental portfolio growth`,`Value-add residential investments`,`Strategic refinancing objectives`]}],[{t:`h2`,text:`Flexible Real Estate Capital for South Carolina Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`},{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Structured Lending Process Built for South Carolina Markets`},{t:`p`,text:`Execution timelines across South Carolina's competitive investment markets often require timely credit evaluation supported by clearly defined underwriting standards. As one of the most responsive hard money lenders south carolina has to offer, A4 Capital Partners follows a disciplined review process designed to provide early transparency around deal structure while maintaining consistent risk assessment.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Charleston, Greenville, and Columbia often require efficient decision-making supported by clear underwriting parameters. Our real estate financing south carolina process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who We Partner With Across South Carolina`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Asset-Based Real Estate Financing Across South Carolina`},{t:`p`,text:`A4CP structures private money lenders south carolina investors depend on alongside flexible bridge loans south carolina solutions that support acquisition, stabilization, and refinancing strategies across a range of property types, from the Charleston peninsula and Mount Pleasant to Greenvilleâs urban core and the Columbia metro.`}],[{t:`h2`,text:`Explore Our Real Estate Financing Solutions for South Carolina Investors`},{t:`p`,text:`Our lending solutions, including hard money loans and bridge loans south carolina investors use to move fast, are structured for professional real estate operators who require dependable, time-sensitive financing.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`The Role of Hard Money Loans and Private Money in South Carolina Investment Strategy`},{t:`p`,text:`Private capital serves a practical function within South Carolinaâs competitive acquisition markets, where timing influences pricing and negotiation dynamics. With population growth outpacing housing supply across much of the state, investors who can close in days, not months, consistently outperform those waiting on traditional bank approvals.`},{t:`p`,text:`Working with experienced private money lenders south carolina wide allows investors to finance renovation-dependent assets, use bridge loans south carolina to close financing gaps between acquisition and permanent financing, and execute repositioning strategies without extended institutional approval cycles. For investors comparing real estate financing south carolina options, speed and certainty of execution remain the deciding factors.`},{t:`h2`,text:`Flexible Loan Structures Built Around Your South Carolina Project`},{t:`p`,text:`South Carolina investment properties present varied timelines and operational considerations. Our hard money and bridge loans in South Carolina may include:`}
39,{t:`ul`,items:[`Short-term capital aligned with project exits`,`Interest-only payment arrangements`,`Phased renovation funding`,`Transitional bridge loan structures`,`Prepayment flexibility when appropriate`]},{t:`p`,text:`Capital structure is designed to support operational execution rather than impose rigidity on your project timeline.`},{t:`h2`,text:`Why South Carolina Remains a Strong Market for Real Estate Investment`},{t:`p`,text:`South Carolinaâs real estate market continues to attract investors driven by sustained population growth, a business-friendly tax environment, and consistent housing demand across the stateâs core regions.`},{t:`p`,text:`South Carolinaâs diverse geography creates distinct investment opportunity across every market:`},{t:`p`,text:`Charleston Tri-County (Charleston, Mount Pleasant, North Charleston, Summerville) The stateâs most active investment market, driven by tourism, port-economy employment, and sustained population growth. Coastal and peninsula properties support strong fix-and-flip and short-term rental demand, often financed through hard money lenders south carolina provides.`},{t:`p`,text:`Greenville-Spartanburg (Upstate) A fast-growing corporate and manufacturing hub attracting steady in-migration, with consistent demand for renovated residential and multifamily properties.`},{t:`p`,text:`Midlands (Columbia, Lexington) The state capital anchors steady institutional and government employment, supporting consistent value-add residential opportunity.`},{t:`p`,text:`Myrtle Beach & Grand Strand A recreational and vacation-rental destination market with strong seasonal demand and appreciation potential, well suited to short-term bridge loans south carolina investors use for quick turnarounds.`},{t:`p`,text:`Lowcountry & Coastal Markets (Beaufort, Hilton Head) Coastal communities attract strong buyer demand and vacation rental investment, creating consistent opportunity for repositioning and hold strategies.`},{t:`p`,text:`South Carolinaâs business-friendly environment supports both resale margins and rental yields. Reliable private money lenders south carolina investors trust allows decisive action across all of these distinct markets.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing is simple. Learn about available loan programs, execution processes, eligible property types, and how A4 Capital Partners supports transactions across South Carolina with speed, clarity, and reliable capital. Get the insight you need to move forward with confidence.`},{t:`h3`,text:`How are loan amounts determined?`},{t:`p`,text:`Loan sizing reflects current asset value, projected stabilized value, defined leverage thresholds, and renovation feasibility where applicable.`},{t:`h3`,text:`Can properties requiring significant renovation qualify?`},{t:`p`,text:`Yes. Evaluation focuses on projected value creation and execution planning rather than present condition alone.`},{t:`h3`,text:`Do you finance multifamily investments?`},{t:`p`,text:`Yes. Financing is available for small multifamily and repositioning opportunities statewide.`},{t:`h3`,text:`How quickly can transactions close?`},{t:`p`,text:`Private lending timelines are typically shorter than conventional financing, depending on documentation readiness.`},{t:`h3`,text:`What factors most influence approval?`},{t:`p`,text:`Primary considerations include valuation accuracy, clearly defined exit strategy, renovation feasibility, and appropriate leverage structure.`}]],"virginia-hard-money-lender":[[{t:`h2`,text:`Hard Money Financing in Virginia | Private Lenders for Real Estate Investors`},{t:`p`,text:`A4CP provides structured hard money loans in Virginia for real estate investors operating in time-sensitive acquisition environments. Our financing supports property acquisition, renovation initiatives, transitional repositioning, and short-term investment strategies throughout the Commonwealth.`},{t:`p`,text:`Investors evaluating a hard money lender in Virginia often prioritize consistency and predictability alongside speed.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Private Lending Experience Aligned with Virginia Investment Activity`},{t:`p`,text:`Investment opportunities across Virginia are influenced by commuter-driven demand, institutional employment centers, and aging residential inventory that continues to support renovation activity. Effective financing in this environment requires measured leverage and realistic underwriting assumptions.`},{t:`p`,text:`As established hard money lenders in Virginia , A4CP provides financing for:`},{t:`ul`,items:[`Acquisition and renovation projects`,`Transitional bridge scenarios`,`Multifamily repositioning`,`Rental portfolio growth`,`Value-add residential investments`,`Strategic refinancing objectives`]}],[{t:`h2`,text:`Flexible Real Estate Capital for Virginia Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`}
39,{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Structured Lending Process`},{t:`p`,text:`Execution timelines across Virginiaâs competitive investment markets often require timely credit evaluation supported by clearly defined underwriting standards. A4 Capital Partners follows a disciplined review process designed to provide early transparency around deal structure while maintaining consistent risk assessment.`},{t:`h4`,text:`Execution in Competitive Markets`},{t:`p`,text:`Acquisition timelines across Northern Virginia and regional cities often require efficient decision-making supported by clear underwriting parameters. Our process is designed to provide early clarity while maintaining disciplined review standards.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers interact with experienced lending professionals involved in credit decisions, allowing consistent communication and alignment throughout the review process.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding, and servicing functions are coordinated internally, supporting continuity from approval through repayment.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who A4 Typically Works With in Virginia`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add, or refinance strategies who need speed and certainty in competitive markets`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms, and confidence to close`}],[{t:`h2`,text:`Real Estate Financing Across Virginia`},{t:`p`,text:`A4 Capital Partners structures asset-based financing solutions that support acquisition, stabilization, and refinancing strategies across a range of property types and investment approaches within Virginia markets.`}],[{t:`h2`,text:`Financing Structures for Professional Investors`},{t:`p`,text:`Our lending solutions are structured for professional real estate operators who require dependable, time-sensitive financing.`}],[{t:`h2`,text:`Loan Terms`},{t:`p`,text:`Flexible real estate financing designed to support efficient execution across acquisitions, renovations, refinances, and development projects throughout New York.`},{t:`h3`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h3`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h3`,text:`Loan-to-Value up to`},{t:`p`,text:`Up to 70%`},{t:`h3`,text:`Loan to Cost up to`},{t:`p`,text:`Up to 90%`},{t:`h3`,text:`Loan Size`},{t:`p`,text:`$500K+`},{t:`h3`,text:`Prepayment Penalty`},{t:`p`,text:`No`}],[{t:`h2`,text:`Role of Hard Money Lending in Virginia Investment Strategy`},{t:`p`,text:`Private capital serves a practical function within competitive acquisition markets where timing influences pricing and negotiation dynamics.`},{t:`p`,text:`Working with experienced hard money lenders in Virginia allows investors to finance renovation-dependent assets, navigate compressed timelines, and execute repositioning strategies without extended institutional approval cycles.`},{t:`h2`,text:`Flexible Loan Structures`},{t:`p`,text:`Virginia investment properties present varied timelines and operational considerations. Financing structures may include:`}
39,{t:`ul`,items:[`Short-term capital aligned with project exits`,`Interest-only payment arrangements`,`Phased renovation funding`,`Transitional bridge structures`,`Prepayment flexibility when appropriate`]},{t:`p`,text:`Capital structure is intended to support operational execution rather than impose rigidity.`},{t:`h2`,text:`Investment Activity Across Virginiaâs Core Markets`},{t:`p`,text:`Investment demand across Virginia spans commuter-driven regions and established regional cities. Northern Virginia markets such as Arlington, Alexandria, and Fairfax remain active due to proximity to Washington, D.C. employment centers and consistent housing demand.`},{t:`p`,text:`Central Virginia, including Richmond , continues to experience redevelopment activity supported by population stability and urban revitalization. Coastal markets such as Virginia Beach and Norfolk provide opportunities for repositioning residential and small multifamily assets.`},{t:`p`,text:`Competitive zip codes including 22201, 22314, and 23220 often require efficient access to private capital in order to secure acquisitions within compressed timelines.`}],[{t:`map`}],[{t:`h2`,text:`Get answers to your Partners questions`},{t:`p`,text:`Real estate financing made simple. Learn about available loan programs, execution processes, eligible property types, and how A4 Capital Partners supports transactions across Virginia with speed, clarity, and reliable capital. Get the insight you need to move forward with confidence.`},{t:`h3`,text:`How are loan amounts determined?`},{t:`p`,text:`Loan sizing reflects current asset value, projected stabilized value, defined leverage thresholds, and renovation feasibility where applicable.`},{t:`h3`,text:`Can properties requiring significant renovation qualify?`},{t:`p`,text:`Yes. Evaluation focuses on projected value creation and execution planning rather than present condition alone.`},{t:`h3`,text:`Do you finance multifamily investments?`},{t:`p`,text:`Yes. Financing is available for small multifamily and repositioning opportunities statewide.`},{t:`h3`,text:`How quickly can transactions close?`},{t:`p`,text:`Private lending timelines are typically shorter than conventional financing, depending on documentation readiness.`},{t:`h3`,text:`What factors most influence approval?`},{t:`p`,text:`Primary considerations include valuation accuracy, clearly defined exit strategy, renovation feasibility, and appropriate leverage structure.`}]]},qp=[`Acquisition and renovation projects`,`Transitional bridge financing`,`Ground-up and infill construction`,`Multifamily and mixed-use repositioning`,`Rental property stabilization`,`Strategic refinancing objectives`];function Jp({state:e,leadMarkets:t,opportunities:n}){return[[{t:`h2`,text:`Hard Money Loans in ${e} for Real Estate Investors`},{t:`p`,text:`A4 Capital Partners provides hard money, bridge, fix-and-flip and construction loans for experienced real estate investors across ${e}. Our asset-focused process is designed for acquisitions and projects where timing, certainty and a practical understanding of the property matter.`},{t:`p`,text:`From ${t}, we structure financing around current value, project scope, sponsor experience and a credible exit strategy rather than a conventional mortgage checklist.`}],[{t:`h2`,text:`Our Track Record Of Success`}],[{t:`h2`,text:`Private Real Estate Financing Built for ${e}`},{t:`p`,text:`${n} These projects often require a lender that can evaluate construction plans, local valuation and execution risk without slowing a time-sensitive transaction.`},{t:`p`,text:`A4 Capital Partners provides ${e} investors with financing for:`},{t:`ul`,items:qp},{t:`p`,text:`Every request is reviewed on its own merits, including the property, budget, leverage, borrower experience and planned repayment or sale.`}],[{t:`h2`,text:`Flexible Real Estate Capital for ${e} Markets`}],[{t:`h3`,text:`Simple & Easy`},{t:`p`,text:`A clean, borrower-friendly process that removes friction and keeps everything straightforward.`},{t:`h3`,text:`Built For Speed`}
39,{t:`p`,text:`Our platform is built for quick approvals and streamlined workflows so you can move forward without delays.`},{t:`h3`,text:`Alignment`},{t:`p`,text:`Our loans are structured to win together. We focus on performance, not fees or volume.`},{t:`h3`,text:`AI & Technology At Our Core`},{t:`p`,text:`AI-powered tools help us move with accuracy, reduce costs, and continually deliver more value to borrowers.`}],[{t:`h2`,text:`A Lending Process Built for ${e} Transactions`},{t:`p`,text:`Competitive acquisitions and complex projects in ${e} benefit from clear terms, responsive review and coordinated execution from application through closing.`},{t:`h4`,text:`Direct Credit Evaluation`},{t:`p`,text:`Borrowers work with experienced lending professionals who understand the deal, supporting consistent communication throughout underwriting.`},{t:`h4`,text:`Property-Focused Underwriting`},{t:`p`,text:`We evaluate collateral, project feasibility, borrower experience and exit strategy so the structure reflects the real business plan.`},{t:`h4`,text:`Integrated Loan Management`},{t:`p`,text:`Underwriting, funding and servicing are coordinated internally to maintain continuity through the life of the loan.`}],[{t:`h2`,text:`Our scale and capabilities allow us to remain flexible and deliver custom solutions aligned with each clientâs strategy.`},{t:`h2`,text:`Average Processing Time`},{t:`p`,text:`5-10 Days`},{t:`h2`,text:`Loan Rates starting at`},{t:`p`,text:`8.5%+`},{t:`h2`,text:`Loan-to-Value up to`},{t:`p`,text:`70%`},{t:`h2`,text:`Loan to Cost up to`},{t:`p`,text:`90%`},{t:`h2`,text:`Loan Size`},{t:`p`,text:`$500K â $12MM`},{t:`h2`,text:`Prepayment Penalty`},{t:`p`,text:`No`},{t:`h2`,text:`Quick Inquiry`}],[{t:`h1`,text:`Built for the right types of deals and partners`},{t:`h2`,text:`Who Our ${e} Financing Programs Are Designed For`},{t:`h3`,text:`Investors`},{t:`p`,text:`Executing acquisition, value-add or refinance strategies who need speed and certainty.`},{t:`h3`,text:`Builders and operators`},{t:`p`,text:`Working within compressed timelines who require reliable capital and clear execution.`},{t:`h3`,text:`Brokers`},{t:`p`,text:`Seeking direct balance-sheet lending, dependable terms and confidence to close.`}],[{t:`h2`,text:`Asset-Based Real Estate Financing Throughout ${e}`},{t:`p`,text:`A4 Capital Partners structures acquisition, stabilization, renovation, construction and refinance loans across eligible ${e} residential and commercial investment properties.`},{t:`p`,text:`Loan requests are assessed against local market conditions, project economics and the borrowerâs plan for completion and exit.`}],[{t:`map`}],[{t:`h2`,text:`Frequently Asked Questions About ${e} Hard Money Loans`},{t:`p`,text:`Common questions from real estate investors seeking private financing in ${e}.`},{t:`h3`,text:`What types of ${e} properties can A4 finance?`},{t:`p`,text:`Eligible transactions may include non-owner-occupied single-family, multifamily, mixed-use and select commercial properties, subject to underwriting.`},{t:`h3`,text:`What loan programs are available?`},{t:`p`,text:`A4 offers acquisition, bridge, fix-and-flip, ground-up construction and refinance financing for qualifying investment projects.`},{t:`h3`,text:`What loan sizes does A4 consider?`},{t:`p`,text:`A4 considers loans from $500,000 up to $12 million, with final terms based on the property, leverage, project and borrower profile.`},{t:`h3`,text:`How quickly can a transaction close?`},{t:`p`,text:`Qualified transactions can move quickly when valuation, entity, insurance and project documentation are ready for review.`}]]}var Yp={"hard-money-lenders-colorado":Jp({state:`Colorado`,leadMarkets:`Denver and Boulder to Vail, Telluride, Durango, Steamboat Springs and Aspen`,opportunities:`Colorado combines Front Range renovation and infill opportunities with high-value mountain properties, resort-area construction and selective bridge transactions.`}),"hard-money-lenders-wyoming":Jp({state:`Wyoming`,leadMarkets:`Jackson Hole, Teton Village and Wilson to Cheyenne and Casper`,opportunities:`Wyoming offers a concentrated luxury and resort market around Jackson Hole alongside residential and commercial investment opportunities in its principal cities.`}),"hard-money-lenders-idaho":Jp({state:`Idaho`,leadMarkets:`Sun Valley and Ketchum to Boise, Coeur dâAlene, McCall and Teton Valley`,opportunities:`Idaho supports resort-area construction, lake and mountain renovations, Treasure Valley infill and rental investments across growing regional markets.`}),"hard-money-lenders-utah":Jp({state:`Utah`,leadMarkets:`Park City and Deer Valley to Salt Lake City, the Wasatch Back, Ogden Valley and St. George`,opportunities:`Utah combines luxury resort development with fast-growing Wasatch Front and Wasatch Back markets suited to bridge, construction and value-ad
39d financing.`}),"hard-money-lenders-montana":Jp({state:`Montana`,leadMarkets:`Big Sky, Whitefish and Bozeman to Flathead Lake and the Yellowstone gateway markets`,opportunities:`Montanaâs mountain and recreation markets create opportunities in custom construction, luxury renovation, bridge acquisitions and carefully underwritten rental properties.`})},Xp={...Kp,...Yp,...$d},$=(e,t,n)=>n?{name:e,copy:t,href:n}:{name:e,copy:t},Zp={"connecticut-hard-money-lender":{state:`Connecticut`,intro:`A4 Capital Partners lends throughout Connecticut, from Fairfield County commuter communities to the stateâs urban, shoreline and inland markets. We structure hard money, bridge, fix-and-flip, construction and rental-property loans around the property, project scope and exit strategy.`,cities:[$(`Greenwich`,`Greenwich investors use private financing for luxury renovations, estate repositioning and teardown-to-new-construction projects where purchase and construction timelines demand certainty.`,`/locations/greenwich-ct/`),$(`Stamford`,`Stamford supports value-add single-family, condominium, multifamily and mixed-use opportunities. Bridge financing can help investors acquire or stabilize properties before a sale or long-term refinance.`),$(`Darien`,`Darienâs established housing stock and limited supply create opportunities for substantial renovations and carefully planned new construction near commuter and shoreline amenities.`,`/locations/darien-ct/`),$(`Westport`,`Westport borrowers seek fix-and-flip, bridge and ground-up construction financing for older homes, infill sites and higher-value residential projects.`,`/locations/westport-ct/`),$(`Norwalk`,`Norwalk offers varied residential and small multifamily opportunities, including acquisition-rehab projects, rental stabilization and properties requiring fast bridge capital.`),$(`New Haven`,`New Haven investors pursue renovation, multifamily, mixed-use and rental projects near employment, education and transit corridors, often using asset-based financing to move efficiently.`),$(`Hartford`,`Hartfordâs older residential and multifamily inventory can support value-add renovation, portfolio acquisition and stabilization strategies with a defined operating plan.`),$(`Bridgeport`,`Bridgeport presents single-family, small multifamily and mixed-use repositioning opportunities where acquisition speed, construction budgeting and realistic exit assumptions are central to underwriting.`)]},"hard-money-lenders-delaware":{state:`Delaware`,intro:`We provide private real estate financing across Delawareâs three counties, supporting acquisitions, renovations, construction, bridge transactions and rental investments in urban, suburban and coastal markets.`,cities:[$(`Wilmington`,`Wilmington investors use hard money and bridge loans for rowhome renovations, multifamily repositioning, mixed-use acquisitions and rental-property improvements.`),$(`Newark`,`Newark supports single-family, student-oriented rental and small multifamily strategies where borrowers may need acquisition, renovation or stabilization capital.`),$(`Middletown`,`Middletownâs expanding residential market creates opportunities for ground-up construction, infill development, rental acquisitions and bridge financing for growing investors.`),$(`Dover`,`Dover offers residential and small multifamily projects suited to fix-and-flip, acquisition-rehab and DSCR rental financing based on the propertyâs income and business plan.`),$(`Bear`,`Bear borrowers pursue value-add single-family projects, rental homes and suburban redevelopment opportunities that can benefit from flexible, asset-based underwriting.`),$(`Lewes and Rehoboth Beach`,`Coastal Delaware projects may include second-home renovations, investment rentals and transitional acquisitions, with underwriting focused on valuation, seasonality and a credible exit strategy.`)]},"hard-money-lenders-georgia":{state:`Georgia`,intro:`A4 Capital Partners lends across Georgiaâs major metropolitan, coastal and secondary markets. Our programs support fix-and-flip, bridge, new construction, multifamily and rental-property strategies for professional real estate investors.`,cities:[$(`Atlanta`,`Atlanta investors use private capital for competitive acquisitions, infill construction, rental portfolio growth, multifamily repositioning and value-ad
39d residential projects across the metro area.`),$(`Savannah`,`Savannah supports historic renovations, residential infill, rental properties and new construction in the city and surrounding Chatham County communities.`,`/locations/savannah-ga/`),$(`Augusta`,`Augusta offers single-family renovation, rental and small multifamily opportunities where efficient acquisition financing can help investors execute a defined scope of work.`),$(`Columbus`,`Columbus borrowers pursue fix-and-flip, buy-and-hold and multifamily investments, with loan structures evaluated against property value, budget and exit plan.`),$(`Macon`,`Maconâs established housing inventory creates opportunities for acquisition-rehab and rental stabilization projects that require disciplined renovation and leasing assumptions.`),$(`Athens`,`Athens investments may include single-family rentals, small multifamily properties and value-add residential assets near employment and education corridors.`),$(`Marietta and North Atlanta`,`Marietta and nearby northern suburbs attract renovation, infill and rental projects where speed and dependable construction funding can strengthen an offer.`)]},"hard-money-lenders-maine":{state:`Maine`,intro:`We lend in Maineâs southern, coastal and central markets, helping investors finance residential renovations, bridge transactions, rentals, small multifamily properties and ground-up construction.`,cities:[$(`Portland`,`Portland investors pursue residential renovations, multifamily repositioning and mixed-use projects where acquisition timing and a realistic stabilization plan matter.`),$(`South Portland`,`South Portland offers renovation, rental and infill opportunities supported by access to Greater Portland employment and transportation corridors.`),$(`Biddeford and Saco`,`Biddeford and Saco support mill-area redevelopment, small multifamily investments, residential rehabs and rental strategies with clearly defined construction budgets.`),$(`Lewiston and Auburn`,`Lewiston-Auburn investors use private financing for multifamily acquisitions, value-add renovations and rental portfolio projects requiring flexible execution.`),$(`Bangor`,`Bangor presents single-family, small multifamily and mixed-use opportunities where asset-based loans can support acquisition, improvement and stabilization.`),$(`Brunswick`,`Brunswick borrowers may finance residential renovations, rentals and new construction serving Midcoast demand, subject to property value and exit feasibility.`)]},"hard-money-lenders-maryland":{state:`Maryland`,intro:`A4 Capital Partners provides hard money and private real estate loans throughout Maryland, from Baltimore and the Washington suburbs to Central Maryland and the Eastern Shore.`,cities:[$(`Baltimore`,`Baltimore offers rowhome renovations, multifamily repositioning, mixed-use acquisitions and rental projects where experienced investors value fast, property-focused underwriting.`),$(`Bethesda`,`Bethes
39da projects often involve higher-value residential renovations, teardown construction and bridge transactions requiring careful valuation and scope review.`),$(`Silver Spring`,`Silver Spring supports single-family, small multifamily and mixed-use investments across established neighborhoods near major commuter corridors.`),$(`Rockville`,`Rockville investors pursue residential renovations, infill construction and rental acquisitions where private financing can bridge purchase and stabilization timelines.`),$(`Frederick`,`Frederick offers historic renovation, suburban residential, small multifamily and ground-up opportunities for borrowers with a clear budget and exit strategy.`),$(`Annapolis`,`Annapolis-area loans may support residential renovations, bridge acquisitions and investment rentals, with underwriting attentive to property condition and project complexity.`),$(`Columbia and Ellicott City`,`Howard County borrowers use flexible capital for established-home renovations, rental properties and infill projects in competitive suburban markets.`)]},"massachusetts-hard-money-lender":{state:`Massachusetts`,intro:`We lend across Greater Boston, Eastern Massachusetts and key secondary markets statewide. Investors use our private financing for fix-and-flip projects, bridge acquisitions, construction, multifamily repositioning and rental properties.`,cities:[$(`Boston`,`Boston investors pursue condominium renovations, multifamily repositioning, mixed-use projects and time-sensitive acquisitions where local valuation and execution experience are essential.`),$(`Newton`,`Newtonâs varied housing stock creates opportunities for substantial renovations, two-family investments and teardown-to-new-construction projects.`,`/locations/newton-ma/`),$(`Wellesley`,`Wellesley borrowers use bridge and construction financing for high-value renovations, infill sites and new homes designed for the local market.`,`/locations/wellesley-ma/`),$(`Brookline`,`Brookline supports single-family, condominium and multifamily renovation strategies, with financing structured around property value, budget and exit.`,`/locations/brookline-ma/`),$(`Cambridge and Somerville`,`Dense Cambridge and Somerville markets create opportunities in condominium, multifamily and mixed-use assets where acquisition speed and construction planning matter.`),$(`Worcester`,`Worcester investors pursue residential rehab, multifamily acquisition and rental stabilization projects across a broad range of property sizes.`),$(`Springfield`,`Springfield offers single-family, small multifamily and value-add rental opportunities where disciplined budgets and sustainable operating assumptions guide lending.`),$(`North Shore`,`Communities including Salem, Beverly and Gloucester support historic renovations, rental properties and coastal residential projects with location-specific execution needs.`)]},"hard-money-lenders-new-hampshire":{state:`New Hampshire`,intro:`A4 Capital Partners serves real estate investors throughout New Hampshire with hard money, bridge, renovation, construction and rental-property financing tailored to local project economics.`,cities:[$(`Manchester`,`Manchester investors use private loans for single-family renovations, multifamily repositioning, rental acquisitions and mixed-use properties requiring timely execution.`),$(`Nashua`,`Nashua supports residential renovation, infill construction and rental strategies influenced by access to Greater Boston and southern New Hampshire employment.`),$(`Concord`,`Concord borrowers pursue value-add homes, small multifamily properties and rental stabilization projects with financing based on the asset and business plan.`),$(`Portsmouth`,`Portsmouth-area opportunities can include higher-value renovations, bridge acquisitions and residential investment projects where local supply and project feasibility matter.`),$(`Dover and Rochester`,`Dover and Rochester offer renovation, rental and small multifamily opportunities throughout the Seacoast region and its surrounding communities.`),$(`Salem`,`Salem investors use flexible financing for suburban residential rehabs, rental properties and construction projects near the Massachusetts border.`)]},"new-jersey-hard-money-lender":{state:`New Jersey`,intro:`We finance real estate investments throughout North, Central and South Jersey. Our private lending programs support fix-and-flip, bridge, construction, mixed-use, multifamily and rental-property projects.`,cities:[$(`Jersey City and Hoboken`,`Hudson County investors pursue condominium renovations, multifamily properties, mi
39xed-use buildings and bridge acquisitions in dense urban markets.`),$(`Newark`,`Newark supports residential redevelopment, multifamily repositioning, mixed-use acquisitions and rental stabilization strategies across distinct neighborhoods.`),$(`Short Hills`,`Short Hills borrowers use bridge and construction financing for substantial renovations, teardowns and luxury residential projects.`,`/locations/short-hills-nj/`),$(`Summit`,`Summit offers renovation and infill opportunities around established neighborhoods and commuter access, often requiring dependable closing timelines.`,`/locations/summit-nj/`),$(`Montclair`,`Montclairâs historic homes and multifamily inventory create opportunities for renovation, rental and bridge financing.`,`/locations/montclair-nj/`),$(`Princeton`,`Princeton-area investments may include residential renovations, rentals and new construction, with underwriting focused on local value and project feasibility.`,`/locations/princeton-nj/`),$(`Trenton`,`Trenton investors pursue rowhome, small multifamily and mixed-use repositioning where acquisition cost, renovation scope and achievable rents drive the loan structure.`),$(`Atlantic City and the Shore`,`Shore-market projects may include renovation, bridge and investment-rental financing, with careful attention to property type, seasonality and exit strategy.`)]},"new-york-hard-money-lender":{state:`New York`,intro:`A4 Capital Partners lends across New York City, Long Island, the Hudson Valley and selected upstate markets, structuring private real estate financing for acquisitions, renovations, construction and stabilization.`,cities:[$(`New York City`,`New York City borrowers use bridge and hard money loans for multifamily, mixed-use, condominium and residential projects where certainty and speed are critical.`),$(`Brooklyn`,`Brooklyn investors pursue townhouse renovations, condominium projects, multifamily repositioning and mixed-use acquisitions across highly localized neighborhoods.`),$(`Queens`,`Queens supports single-family, small multifamily, mixed-use and construction opportunities where property condition and exit planning shape the financing.`),$(`Bronx`,`Bronx projects may include multifamily acquisition, rental stabilization, mixed-use repositioning and value-add residential investments.`),$(`Long Island`,`Nassau and Suffolk County borrowers use private capital for fix-and-flip projects, ground-up homes, bridge purchases and rental-property acquisitions.`),$(`Westchester County`,`Westchester investors finance established-home renovations, teardown construction, multifamily properties and time-sensitive acquisitions in commuter markets.`),$(`Hudson Valley`,`Cities and towns from Yonkers through Poughkeepsie offer residential rehab, rental, multifamily and adaptive-reuse opportunities with varied local economics.`),$(`Albany and Capital Region`,`Capital Region investments include single-family rentals, small multifamily assets and mixed-use properties that may benefit from acquisition and renovation financing.`)]},"hard-money-lenders-north-carolina":{state:`North Carolina`,intro:`We lend throughout North Carolinaâs major metros and growth corridors, providing private capital for renovation, bridge, construction, multifamily and rental-property investment strategies.`,cities:[$(`Charlotte`,`Charlotte investors use hard money and bridge loans for competitive acquisitions, infill construction, rental portfolios and multifamily or mixed-use repositioning.`),$(`Raleigh`,`Raleigh supports residential renovation, new construction and rental investments across a growing metro where clear budgets and dependable closings matter.`),$(`Durham`,`Durham offers older-home renovations, infill projects, small multifamily and rental opportunities tied to established neighborhoods and employment centers.`),$(`Greensboro`,`Greensboro borrowers pursue fix-and-flip, buy-and-hold and small multifamily projects with financing structured around value, scope and exit.`),$(`Winston-Salem`,`Winston-Salem presents residential rehab, rental stabilization and mixed-use investment opportunities across established urban and suburban areas.`),$(`Wilmington`,`Wilmington-area projects may include coastal renovations, investment rentals and new construction, with underwriting attentive to insurance, budget and exit considerations.`),$(`Asheville`,`Asheville investors finance renovations, bridge acquisitions and rental properties in a market where property type, terrain and project scope can vary significantly.`)]},"pennsylvania-hard-money-lender":{state:`Pennsylvania`,intro:`A4 Capital Partners lends across Pennsylvania, supporting investors in Philadelphia, Pittsburgh and the stateâs regional markets with acquisition, renovation, construction, bridge and rental financing.`,cities:[$(`Philadelphia`,`Philadelphia investors use private financing for rowhome rehabs, multifamily and mixed-use acquisitions, rental stabilization and infill construction across neighborhood-specific markets.`),$(`Pittsburgh`,`Pittsburgh offers single-family renovation, rental portfolio and small multifamily opportunities where cost basis and realistic construction plans guide underwriting.`),$(`Allentown and Bethlehem`,`Lehigh Valley borrowers pursue residential rehabs, rentals, multifamily properties and light mixed-use projects supported by regional employment and logistics corridors.`),$(`Harrisburg`,`Harrisburg investors use hard money and bridge financing for residential renovation, rental and mixed-use properties in the capital region.`),$(`Lancaster`,`Lancaster-area projects include historic-home renovations, small multifamily acquisitions and suburban residential investments requiring flexible timelines.`),$(`Scranton and Wilkes-Barre`,`Northeastern Pennsylvania supports value-ad
39d housing, rental portfolios and multifamily acquisitions where disciplined repair budgets are especially important.`),$(`Main Line`,`Main Line borrowers finance higher-value renovations, teardown construction and bridge acquisitions in established communities west of Philadelphia.`)]},"south-carolina-hard-money-lender":{state:`South Carolina`,intro:`We serve investors across South Carolinaâs coastal, Midlands and Upstate markets with hard money, bridge, fix-and-flip, construction and rental-property loans.`,cities:[$(`Charleston`,`Charleston investors pursue historic renovations, infill construction, bridge acquisitions and rental properties throughout the peninsula and surrounding communities.`,`/locations/charleston-sc/`),$(`Mount Pleasant`,`Mount Pleasant supports higher-value renovations, teardown construction and investment properties where local valuation and project execution are central.`),$(`Columbia`,`Columbia offers single-family, small multifamily, mixed-use and rental opportunities serving a broad employment and education base.`),$(`Greenville`,`Greenville investors use private capital for residential rehabs, infill projects, rental portfolios and small multifamily properties across a growing Upstate market.`),$(`Spartanburg`,`Spartanburg supports value-add housing, rental acquisitions and construction opportunities near regional manufacturing and logistics corridors.`),$(`Myrtle Beach`,`Myrtle Beach-area financing may support residential renovations, bridge purchases and investment rentals, with underwriting attentive to property type and seasonality.`),$(`Rock Hill and Fort Mill`,`York County borrowers pursue suburban renovation, rental and new-construction projects influenced by access to the Charlotte metro.`)]},"hard-money-lenders-tennessee":{state:`Tennessee`,intro:`A4 Capital Partners provides private real estate financing in Tennesseeâs major metros and growing regional markets for fix-and-flip, bridge, construction, multifamily and rental projects.`,cities:[$(`Nashville`,`Nashville investors finance competitive acquisitions, residential renovations, infill construction, rental properties and multifamily repositioning across the metro.`),$(`Memphis`,`Memphis offers broad single-family rental, fix-and-flip and small multifamily opportunities where acquisition basis, repair scope and sustainable rents matter.`),$(`Knoxville`,`Knoxville supports residential renovation, rental and construction projects tied to established neighborhoods and expanding suburban areas.`),$(`Chattanooga`,`Chattanooga borrowers pursue value-add homes, small multifamily properties and mixed-use assets where flexible acquisition and improvement capital can support execution.`),$(`Franklin`,`Franklin-area projects often include higher-value renovations, bridge acquisitions and new construction in established Williamson County communities.`),$(`Murfreesboro`,`Murfreesboro investors use private financing for suburban residential projects, rental acquisitions and ground-up construction with a clear exit plan.`),$(`Clarksville`,`Clarksville presents rental, renovation and new-construction opportunities where borrowers benefit from loan structures aligned with project and leasing timelines.`)]},"virginia-hard-money-lender":{state:`Virginia`,intro:`We lend throughout Virginia, from Northern Virginia and Richmond to Hampton Roads and western regional markets, supporting acquisition, renovation, construction, bridge and rental strategies.`,cities:[$(`Arlington and Alexandria`,`Northern Virginia borrowers use bridge and private construction financing for higher-value renovations, infill projects, multifamily and mixed-use opportunities near Washington, D.C.`),$(`Fairfax County`,`Fairfax County supports established-home renovations, teardown construction and rental acquisitions where property value and project feasibility require local review.`),$(`Richmond`,`Richmond investors pursue historic renovations, single-family rehabs, multifamily repositioning and mixed-use projects across distinct urban neighborhoods.`),$(`Virginia Beach`,`Virginia Beach loans may support residential renovation, bridge acquisitions and investment rentals, with attention to location, insurance and project scope.`),$(`Norfolk and Chesapeake`,`Hampton Roads borrowers finance single-family, small multifamily and rental-property projects across established military and port-oriented communities.`),$(`Charlottesville`,`Charlottesville offers renovation, rental and infill opportunities where borrowers need a well-supported valuation, budget and exit strategy.`),$(`Roanoke`,`Roanoke investors pursue value-ad
39d residential, small multifamily and rental stabilization projects with financing matched to local deal economics.`)]},"hard-money-lenders-colorado":{state:`Colorado`,intro:`A4 Capital Partners lends across Coloradoâs Front Range and select mountain markets, financing acquisitions, renovations, bridge transactions and ground-up projects for experienced real estate operators.`,cities:[$(`Denver`,`Denver supports infill construction, established-home renovation, multifamily repositioning and mixed-use projects across highly localized neighborhoods.`),$(`Boulder`,`Boulderâs constrained supply and high-value housing create opportunities for substantial renovations, infill development and carefully planned bridge transactions.`),$(`Colorado Springs`,`Colorado Springs offers residential renovation, rental and construction opportunities with a broader cost basis than many resort markets.`),$(`Vail, Beaver Creek and Edwards`,`The Vail Valley supports luxury renovations, custom construction and bridge acquisitions where local valuation, seasonality and execution experience are essential.`),$(`Telluride and Mountain Village`,`Scarce inventory and complex mountain sites make disciplined budgets, experienced sponsorship and realistic exit planning especially important.`),$(`Durango`,`Durango offers custom-home construction, higher-end renovation and select rental projects serving a year-round mountain community.`),$(`Steamboat Springs`,`Steamboat Springs supports luxury renovation, resort-area construction and investment-property acquisitions across established and emerging neighborhoods.`),$(`Aspen and Snowmass`,`Aspen and Snowmass projects may include premium renovations, bridge acquisitions and custom construction, subject to conservative leverage and detailed local underwriting.`)]},"hard-money-lenders-wyoming":{state:`Wyoming`,intro:`A4 Capital Partners provides private real estate financing in Wyoming, with particular focus on the high-value Jackson Hole market and selected investment opportunities elsewhere in the state.`,cities:[$(`Jackson Hole`,`Jackson Holeâs limited developable land and high-value housing support select bridge, renovation and custom-construction loans for experienced sponsors.`),$(`Teton Village`,`Teton Village projects may include resort-adjacent residences, condominium improvements and carefully underwritten construction near Jackson Hole Mountain Resort.`),$(`Wilson`,`Wilson offers estate-scale homes, acreage and substantial renovations where collateral quality and construction execution drive the loan structure.`),$(`Alpine and Star Valley`,`Communities south of Jackson can support lower-basis residential construction, renovation and rental strategies with defined local demand.`),$(`Cheyenne`,`Cheyenne investors pursue residential rehab, rental, infill and select commercial projects in the state capital.`),$(`Casper`,`Casper offers value-add residential, small multifamily and mixed-use opportunities where durable project economics remain central.`)]},"hard-money-lenders-idaho":{state:`Idaho`,intro:`We lend across Idahoâs leading resort, lake and growth markets, supporting experienced investors with bridge, renovation, construction and rental-property financing.`,cities:[$(`Sun Valley and Ketchum`,`Sun Valley and Ketchum support luxury renovations, custom construction and bridge acquisitions in a mature mountain resort market.`),$(`Hailey and the Wood River Valley`,`Hailey and neighboring Wood River communities offer residential construction and renovation opportunities at varied price points below the core resort.`),$(`Boise`,`Boise supports infill construction, established-home renovations, small multifamily projects and rental portfolio growth.`),$(`Meridian and Eagle`,`Treasure Valley suburbs create opportunities for residential development, higher-end renovations and investment-property acquisitions.`),$(`Coeur dâAlene`,`Coeur dâAlene borrowers pursue waterfront and golf-community renovations, custom homes and bridge transactions across North Idaho.`),$(`McCall`,`McCallâs mountain-and-lake setting supports vacation-home renovations, construction and rental properties with careful seasonal underwriting.`),$(`Driggs and Victor`,`Teton Valley offers a lower-basis alternative near Jackson Hole for construction, renovation and select rental projects.`)]},"hard-money-lenders-utah":{state:`Utah`,intro:`A4 Capital Partners serves Utah investors and builders across its resort, technology and growth corridors with bridge, hard money, renovation and construction financing.`,cities:[$(`Park City and Deer Valley`,`Park City and Deer Valley comb
39ine luxury depth, active construction and strong transaction demand for high-quality renovation, bridge and ground-up projects.`),$(`Heber City and Midway`,`The Wasatch Back supports residential construction, infill, renovation and rental strategies near Park City and year-round recreation.`),$(`Salt Lake City`,`Salt Lake City offers established-home renovation, infill development, multifamily repositioning and mixed-use investment opportunities.`),$(`Draper and Lehi`,`The Silicon Slopes corridor supports growing residential and rental markets suited to renovation, construction and bridge financing.`),$(`Provo`,`Provo investors pursue residential renovation, small multifamily and rental projects near major employment and education centers.`),$(`Ogden Valley`,`Powder Mountain and Snowbasin-area communities offer emerging luxury construction and mountain-home renovation opportunities.`),$(`St. George`,`St. George supports desert residential construction, higher-end renovation and investment properties serving year-round and seasonal demand.`)]},"hard-money-lenders-montana":{state:`Montana`,intro:`A4 Capital Partners lends in select Montana markets where experienced operators pursue luxury renovation, custom construction, bridge and investment-property opportunities.`,cities:[$(`Big Sky`,`Big Skyâs luxury resort ecosystem supports custom homes, substantial renovations and bridge acquisitions across established and emerging communities.`),$(`Whitefish`,`Whitefish combines ski, lake and Glacier-area demand for higher-end renovations, construction and carefully underwritten investment rentals.`),$(`Bozeman`,`Bozeman offers year-round transaction volume, infill construction, established-home renovation and rental opportunities across the Gallatin Valley.`),$(`Moonlight Basin and Yellowstone Club`,`Private Big Sky communities support select high-value construction and renovation projects for experienced sponsors and builders.`),$(`Flathead Lake`,`Communities around Flathead Lake offer waterfront renovation, custom construction and second-home projects with location-specific valuation needs.`),$(`West Yellowstone`,`West Yellowstone can support lodging-adjacent and rental-property strategies where seasonality, management and exit assumptions are carefully evaluated.`)]}};function Qp(e){return[{t:`h2`,text:`Cities and Markets We Serve in ${e.state}`},{t:`p`,text:e.intro},...e.cities.flatMap(({name:e,copy:t,href:n})=>[n?{t:`h3`,text:`${e} Real Estate Financing`,href:n}:{t:`h3`,text:`${e} Real Estate Financing`},{t:`p`,text:t}])]}function $p(e,t){let n=Zp[e];if(!n)return t;let r=Qp(n),i=t.findIndex(e=>e[0]?.t===`map`),a=i>=0?i:Math.max(0,t.length-1);return[...t.slice(0,a),r,...t.slice(a)]}Object.keys(Zp);var em={connecticut:`Connecticut`,delaware:`Delaware`,georgia:`Georgia`,maine:`Maine`,maryland:`Maryland`,massachusetts:`Massachusetts`,"new-hampshire":`New Hampshire`,"new-jersey":`New Jersey`,"new-york":`New York`,"north-carolina":`North Carolina`,pennsylvania:`Pennsylvania`,"rhode-island":`Rhode Island`,"south-carolina":`South Carolina`,tennessee:`Tennessee`,virginia:`Virginia`,florida:`Florida`,colorado:`Colorado`,wyoming:`Wyoming`,idaho:`Idaho`,utah:`Utah`,montana:`Montana`},tm=[`Fix and Flip Loans`,`Ground-Up Construction Loans`,`Bridge Loans`,`Rental (DSCR) Loans`,`Refinance Loans`];function nm(e){let t=Xd.find(t=>`${t.name}-${t.st}`.toLowerCase().replace(/ /g,`-`)===e);if(t)return{"@type":`City`,name:`${t.name}, ${t.st}`,containedInPlace:{"@type":`State`,name:t.state}};let n=Object.keys(em).sort((e,t)=>t.length-e.length).find(t=>e.includes(t));return n?{"@type":`State`,name:em[n]}:null}function rm(e){let t=e?.[e.length-1];if(!t||!t.some(e=>e.t===`h3`))return null;let n=[];for(let e of t.slice(t.findIndex(e=>e.t===`h3`)))e.t===`h3`?n.push({q:e.text,a:[]}):e.t===`p`&&n.length&&n[n.length-1].a.push(e.text);let r=n.filter(e=>e.a.length);return r.length?{"@type":`FAQPage`,mainEntity:r.map(e=>({"@type":`Question`,name:e.q,acceptedAnswer:{"@type":`Answer`,text:e.a.join(` `)}}))}:null}function im(e,t){let n=rf.get(e);return n?n.h1&&!/types of deals and partners/i.test(n.h1)?n.h1:n.title.replace(/\s*\| A4 Capital Partners$/,``):t}function am(e,t){let n=[{name:`Home`,path:`/`},{name:`Locations`,path:`/locations/`}],r=Xd.find(t=>`${t.name}-${t.st}`.toLowerCase().replace(/ /g,`-`)===e);if(r){let e=Ce(r.state);n.push({name:im(`/locations/${e}/`,`${r.state} Hard Money Lender`),path:`/locations/${e}/`})}return n.push({name:im(`/locations/${e}/`,t),path:`/locations/${e}/`}),n}function om(e,t,n){let r=`${af}/locations/${e}
39/`,i=nm(e),a=[{"@type":`FinancialService`,"@id":`${r}#service`,name:`A4 Capital Partners â ${t}`,url:r,telephone:`+1-203-457-3787`,email:`[email protected]`,address:{"@type":`PostalAddress`,streetAddress:`470 James St. Suite 7`,addressLocality:`New Haven`,addressRegion:`CT`,postalCode:`06513`,addressCountry:`US`},parentOrganization:{"@type":`Organization`,name:`A4 Capital Partners`,url:`${af}/`},...i?{areaServed:i}:{},hasOfferCatalog:{"@type":`OfferCatalog`,name:`Real estate investor loans`,itemListElement:tm.map(e=>({"@type":`Offer`,itemOffered:{"@type":`LoanOrCredit`,name:e,loanType:e,...i?{areaServed:i}:{}}}))}}],o=rm(n);return o&&a.push(o),a}var sm=()=>O(()=>import(`./locations._-6krsCN6I.js`),__vite__mapDeps([55,1,2,3,4,12,7,6,10,13])),cm=e=>(e??``).replace(/\/+$/,``),lm=D(`/locations/$`)({loader:({params:e})=>{let t=cm(e._splat);if(!rf.has(`/locations/${t}/`)&&!Xp[t])throw Ee();return{slug:t}},head:({params:e})=>{let t=cm(e._splat),n=Xp[t],r=n?$p(t,n):void 0,i=rf.get(`/locations/${t}/`)?.h1??ye(t);return lf(`/locations/${t}/`,{title:rf.get(`/locations/${t}/`)?.title??`${ye(t)} | A4 Capital Partners`,crumbs:am(t,i),schema:om(t,i,r)})},component:E(sm,`component`)}),um=D(`/press/`)({head:()=>k(`A4 Capital Partners Press`,`News and announcements from A4 Capital Partners.`),component:E(()=>O(()=>import(`./press.index-Bv0jpUrx.js`),__vite__mapDeps([56,1,12,2,3,4,7,6,10,13])),`component`)}),dm=D(`/press/$`)({head:({params:e})=>k(`${ye(e._splat??`news`)} | A4 Press`,`News from A4 Capital Partners.`,`article`),component:E(()=>O(()=>import(`./press._-BMT7V0Ir.js`),__vite__mapDeps([57,1,12,2,3,4,7,6,10,13])),`component`)}),fm=Sf.update({id:`/`,path:`/`,getParentRoute:()=>Q}),pm=Cf.update({id:`/about-us`,path:`/about-us`,getParentRoute:()=>Q}),mm=Tf.update({id:`/acquisition`,path:`/acquisition`,getParentRoute:()=>Q}),hm=Ef.update({id:`/app`,path:`/app`,getParentRoute:()=>Q}),gm=Df.update({id:`/blogs`,path:`/blogs`,getParentRoute:()=>Q}),_m=Of.update({id:`/borrower`,path:`/borrower`,getParentRoute:()=>Q}),vm=kf.update({id:`/brokers`,path:`/brokers`,getParentRoute:()=>Q}),ym=Af.update({id:`/builders`,path:`/builders`,getParentRoute:()=>Q}),bm=jf.update({id:`/careers`,path:`/careers`,getParentRoute:()=>Q}),xm=Nf.update({id:`/commercial`,path:`/commercial`,getParentRoute:()=>Q}),Sm=Pf.update({id:`/contact-us`,path:`/contact-us`,getParentRoute:()=>Q}),Cm=Rf.update({id:`/dealanalyzer`,path:`/dealanalyzer`,getParentRoute:()=>Q}),wm=Bf.update({id:`/disclosures-and-licenses`,path:`/disclosures-and-licenses`,getParentRoute:()=>Q}),Tm=Hf.update({id:`/e-sign-consent`,path:`/e-sign-consent`,getParentRoute:()=>Q}),Em=Uf.update({id:`/faqs`,path:`/faqs`,getParentRoute:()=>Q}),Dm=Gf.update({id:`/fix-flip-rehab`,path:`/fix-flip-rehab`,getParentRoute:()=>Q}),Om=qf.update({id:`/hospitality`,path:`/hospitality`,getParentRoute:()=>Q}),km=Yf.update({id:`/industrial`,path:`/industrial`,getParentRoute:()=>Q}),Am=Zf.update({id:`/mixed-use`,path:`/mixed-use`,getParentRoute:()=>Q}),jm=$f.update({id:`/multi-family`,path:`/multi-family`,getParentRoute:()=>Q}),Mm=tp.update({id:`/new-construction`,path:`/new-construction`,getParentRoute:()=>Q}),Nm=np.update({id:`/not-qualified`,path:`/not-qualified`,getParentRoute:()=>Q}),Pm=ip.update({id:`/office`,path:`/office`,getParentRoute:()=>Q}),Fm=ap.update({id:`/press`,path:`/press`,getParentRoute:()=>Q}),Im=sp.update({id:`/privacy-ca`,path:`/privacy-ca`,getParentRoute:()=>Q}),Lm=lp.update({id:`/privacy-policy`,path:`/privacy-policy`,getParentRoute:()=>Q}),Rm=pp.update({id:`/recent-deals`,path:`/recent-deals`,getParentRoute:()=>Q}),zm=hp.update({id:`/refinance`,path:`/refinance`,getParentRoute:()=>Q}),Bm=_p.update({id:`/retail`,path:`/retail`,getParentRoute:()=>Q}),Vm=yp.update({id:`/security`,path:`/security`,getParentRoute:()=>Q}),Hm=xp.update({id:`/single-family`,path:`/single-family`,getParentRoute:()=>Q}),Um=Cp.update({id:`/terms`,path:`/terms`,getParentRoute:()=>Q}),Wm=wp.update({id:`/typ`,path:`/typ`,getParentRoute:()=>Q}),Gm=Ep.update({id:`/warehouse`,path:`/warehouse`,getParentRoute:()=>Q}),Km=Dp.update({id:`/`,path:`/`,getParentRoute:()=>gm}),qm=Op.update({id:`/$`,path:`/$`,getParentRoute:()=>gm}),Jm=Vp.update({id:`/gads/connecticut`,path:`/gads/connecticut`,getParentRoute:()=>Q}),Ym=Hp.update({id:`/gads/lp`,path:`/gads/lp`,getParentRoute:()=>Q}),Xm=Up.update({id:`/gads/not-qualified`,path:`/gads/not-qualified`,getParentRoute:()=>Q}),Zm=Wp.update({id:`/gads/typ`,path:`/gads/typ`,getParentRoute:()=>Q}),Qm=Gp.update({id:`/locations/`,path:`/locations/`,getParentRoute:()=>Q}),$m=lm.update({id:`/locations/$`,path:`/locations/$`,getParentRoute:()=>Q}),eh=um.update({id:`/`,path:`/`,getParentRoute:()=>Fm}),th=dm.update({id:`/$`,path:`/$`,getParentRoute:()=>Fm}),nh={BlogsSplatRoute:qm,BlogsIndexRoute:Km},rh=gm._addFileChildren(nh),ih={PressSplatRoute:th,PressIndexRoute:eh},ah={IndexRoute:fm,AboutUsRoute:pm,AcquisitionRoute:mm,AppRoute:hm,BlogsRoute:rh,BorrowerRoute:_m,BrokersRoute:vm,BuildersRoute:ym,CareersRoute:bm,CommercialRoute:xm,ContactUsRoute:Sm,DealanalyzerRoute:Cm,DisclosuresAndLicensesRoute:wm,ESignConsentRoute:Tm,FaqsRoute:Em,FixFlipRehabRoute:Dm,Hospital
39ityRoute:Om,IndustrialRoute:km,MixedUseRoute:Am,MultiFamilyRoute:jm,NewConstructionRoute:Mm,NotQualifiedRoute:Nm,OfficeRoute:Pm,PressRoute:Fm._addFileChildren(ih),PrivacyCaRoute:Im,PrivacyPolicyRoute:Lm,RecentDealsRoute:Rm,RefinanceRoute:zm,RetailRoute:Bm,SecurityRoute:Vm,SingleFamilyRoute:Hm,TermsRoute:Um,TypRoute:Wm,WarehouseRoute:Gm,GadsConnecticutRoute:Jm,GadsLpRoute:Ym,GadsNotQualifiedRoute:Xm,GadsTypRoute:Zm,LocationsSplatRoute:$m,LocationsIndexRoute:Qm},oh=Q._addFileChildren(ah),sh=()=>si({routeTree:oh,context:{queryClient:new Ed},scrollRestoration:!0,trailingSlash:`always`,defaultPreloadStaleTime:0});async function ch(){let e=await sh(),t;if(ku){let n=await ku.getOptions();n.serializationAdapters=n.serializationAdapters??[],window.__TSS_START_OPTIONS__=n,t=n.serializationAdapters,e.options.defaultSsr=n.defaultSsr}else t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t};return t.push(Sr),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.ids.get().length||await ur(e),e}var lh=ch;function uh(){return lh().finally(()=>window.$_TSR?.h())}var dh;function fh(){return dh||=uh(),(0,j.jsx)(wr,{promise:dh,children:e=>(0,j.jsx)(ui,{router:e})})}var ph=Je();(0,A.startTransition)(()=>{(0,ph.hydrateRoot)(document,(0,j.jsx)(A.StrictMode,{children:(0,j.jsx)(fh,{})}))});export{Di as A,zf as C,rf as D,wf as E,ti as M,Xd as O,Vf as S,Ef as T,Qf as _,Bp as a,Kf as b,Sp as c,gp as d,mp as f,ep as g,rp as h,Xp as i,ki as j,Ei as k,bp as l,op as m,lm as n,Op as o,cp as p,$p as r,Tp as s,dm as t,vp as u,Xf as v,Mf as w,Wf as x,Jf as y};
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.