PageSourceSearch

https://www.lofty.ai/assets/useQuery-BhDSG0wj.js

js lofty.ai collected 2026-09-28 05:45:49 UTC 26,921 bytes, 1 lines download raw bytes

1import{s as e,t}from"./rolldown-runtime-BG2f4sTM.js";import{t as n}from"./react-CYsHstG7.js";import{$n as r,Ir as i,Kt as a,Nr as o,Rt as s,Xt as c,Yt as l,Zt as u,dr as d,er as f,jt as p,rt as m,tr as h,xt as g,zt as _}from"./analytics-DyulWhN4.js";import{n as v,r as y}from"./property-cuwonSdw.js";import{n as b,r as x,t as ee}from"./split-on-first-DQh-h8Jc.js";var te=t(((e,t)=>{t.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a<r.length;a++){var o=r[a],s=e[o];(i?t.indexOf(o)!==-1:t(o,s,e))&&(n[o]=s)}return n}})),ne=t((e=>{var t=x(),n=b(),r=ee(),i=te(),a=e=>e==null,o=Symbol(`encodeFragmentIdentifier`);function s(e){switch(e.arrayFormat){case`index`:return t=>(n,r)=>{let i=n.length;return r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[u(t,e),`[`,i,`]`].join(``)]:[...n,[u(t,e),`[`,u(i,e),`]=`,u(r,e)].join(``)]};case`bracket`:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[u(t,e),`[]`].join(``)]:[...n,[u(t,e),`[]=`,u(r,e)].join(``)];case`colon-list-separator`:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,[u(t,e),`:list=`].join(``)]:[...n,[u(t,e),`:list=`,u(r,e)].join(``)];case`comma`:case`separator`:case`bracket-separator`:{let t=e.arrayFormat===`bracket-separator`?`[]=`:`=`;return n=>(r,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===``?r:(i=i===null?``:i,r.length===0?[[u(n,e),t,u(i,e)].join(``)]:[[r,u(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>r===void 0||e.skipNull&&r===null||e.skipEmptyString&&r===``?n:r===null?[...n,u(t,e)]:[...n,[u(t,e),`=`,u(r,e)].join(``)]}}function c(e){let t;switch(e.arrayFormat){case`index`:return(e,n,r)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,``),!t){r[e]=n;return}r[e]===void 0&&(r[e]={}),r[e][t[1]]=n};case`bracket`:return(e,n,r)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,``),!t){r[e]=n;return}if(r[e]===void 0){r[e]=[n];return}r[e]=[].concat(r[e],n)};case`colon-list-separator`:return(e,n,r)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,``),!t){r[e]=n;return}if(r[e]===void 0){r[e]=[n];return}r[e]=[].concat(r[e],n)};case`comma`:case`separator`:return(t,n,r)=>{let i=typeof n==`string`&&n.includes(e.arrayFormatSeparator),a=typeof n==`string`&&!i&&d(n,e).includes(e.arrayFormatSeparator);n=a?d(n,e):n,r[t]=i||a?n.split(e.arrayFormatSeparator).map(t=>d(t,e)):n===null?n:d(n,e)};case`bracket-separator`:return(t,n,r)=>{let i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,``),!i){r[t]=n&&d(n,e);return}let a=n===null?[]:n.split(e.arrayFormatSeparator).map(t=>d(t,e));if(r[t]===void 0){r[t]=a;return}r[t]=[].concat(r[t],a)};default:return(e,t,n)=>{if(n[e]===void 0){n[e]=t;return}n[e]=[].concat(n[e],t)}}}function l(e){if(typeof e!=`string`||e.length!==1)throw TypeError(`arrayFormatSeparator must be single character string`)}function u(e,n){return n.encode?n.strict?t(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(e):e}function f(e){return Array.isArray(e)?e.sort():typeof e==`object`?f(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function p(e){let t=e.indexOf(`#`);return t!==-1&&(e=e.slice(0,t)),e}function m(e){let t=``,n=e.indexOf(`#`);return n!==-1&&(t=e.slice(n)),t}function h(e){e=p(e);let t=e.indexOf(`?`);return t===-1?``:e.slice(t+1)}function g(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e==`string`&&e.trim()!==``?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()===`true`||e.toLowerCase()===`false`)&&(e=e.toLowerCase()===`true`),e}function _(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:`none`,arrayFormatSeparator:`,`,parseNumbers:!1,parseBooleans:!1},t),l(t.arrayFormatSeparator);let n=c(t),i=Object.create(null);if(typeof e!=`string`||(e=e.trim().replace(/^[?#&]/,``),!e))return i;for(let a of e.split(`&`)){if(a===``)continue;let[e,o]=r(t.decode?a.replace(/\+/g,` `):a,`=`);o=o===void 0?null:[`comma`,`separator`,`bracket-separator`].includes(t.arrayFormat)?o:d(o,t),n(d(e,t),o,i)}for(let e of Object.keys(i)){let n=i[e];if(typeof n==`object`&&n)for(let e of Object.keys(n))n[e]=g(n[e],t);else i[e]=g(n,t)}return t.sort===!1?i:(t.sort===!0?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>
1{let n=i[t];return n&&typeof n==`object`&&!Array.isArray(n)?e[t]=f(n):e[t]=n,e},Object.create(null))}e.extract=h,e.parse=_,e.stringify=(e,t)=>{if(!e)return``;t=Object.assign({encode:!0,strict:!0,arrayFormat:`none`,arrayFormatSeparator:`,`},t),l(t.arrayFormatSeparator);let n=n=>t.skipNull&&a(e[n])||t.skipEmptyString&&e[n]===``,r=s(t),i={};for(let t of Object.keys(e))n(t)||(i[t]=e[t]);let o=Object.keys(i);return t.sort!==!1&&o.sort(t.sort),o.map(n=>{let i=e[n];return i===void 0?``:i===null?u(n,t):Array.isArray(i)?i.length===0&&t.arrayFormat===`bracket-separator`?u(n,t)+`[]`:i.reduce(r(n),[]).join(`&`):u(n,t)+`=`+u(i,t)}).filter(e=>e.length>0).join(`&`)},e.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[n,i]=r(e,`#`);return Object.assign({url:n.split(`?`)[0]||``,query:_(h(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,t)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0,[o]:!0},n);let r=p(t.url).split(`?`)[0]||``,i=e.extract(t.url),a=e.parse(i,{sort:!1}),s=Object.assign(a,t.query),c=e.stringify(s,n);c&&=`?${c}`;let l=m(t.url);return t.fragmentIdentifier&&(l=`#${n[o]?u(t.fragmentIdentifier,n):t.fragmentIdentifier}`),`${r}${c}${l}`},e.pick=(t,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[o]:!1},r);let{url:a,query:s,fragmentIdentifier:c}=e.parseUrl(t,r);return e.stringifyUrl({url:a,query:i(s,n),fragmentIdentifier:c},r)},e.exclude=(t,n,r)=>{let i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return e.pick(t,i,r)}})),S=null,C=null,re=e=>{S=e},ie=e=>{C=e},ae=()=>{S?.()},oe=e=>{C?.invalidateQueries(e)},se=e=>{C?.removeQueries(e)},ce=e=>e?.status===y.Hidden||e?.status===y.Canceled,le=e=>e?.featured===`true`,ue=e=>!!e?.hideMkt,de=async e=>{let t=e?.queryKey?.find(e=>!!e&&typeof e==`object`&&`include`in e)?.include;try{let e=await a(t?{include:t}:void 0);if(e.error||!e.data)throw Error(e.error);if(e.success&&Array.isArray(e.data))return e.data}catch(e){throw console.log(`getListingsData::error:`,e),Error(e)}},fe=async(e,t,n)=>{let r=e.watchlistedPropertyIds.includes(t);try{let i;if(i=r?await p({propertyId:t,alerts:e.alertsMapping[t]??!1,turnedOn:n}):await m({propertyId:t}),i.error||!i.data)throw Error(i.error);if(i.success&&Array.isArray(i.data))return i.data}catch(e){throw console.log(`updateUserWatchlist::error:`,e),Error(e)}},pe=async(e,t,n)=>{let r=e.watchlistedPropertyIds.includes(t);try{let e=await p({propertyId:t,alerts:n,turnedOn:r});if(e.error||!e.data)throw Error(e.error);if(e.success&&Array.isArray(e.data))return e.data}catch(e){throw console.log(`updateUserAlerts::error:`,e),Error(e)}},me=async()=>{try{let e=await g();if(e.error||!e.data)throw Error(e.error);if(e.success&&Array.isArray(e.data))return{watchlistedPropertyIds:e.data.filter(e=>e.turnedOn).map(e=>e.propertyId),alertsMapping:e.data.reduce((e,t)=>(e[t.propertyId]=t.alerts,e),{})}}catch(e){throw console.log(`getUserWatchlistData::error:`,e),Error(e)}},he=async({queryKey:e})=>{let[,{propertyKey:t}]=e;return(await l({key:t})).data?.property},ge=async({queryKey:e})=>{let[,{id:t,startTime:n}]=e;return(await r({propertyId:t,startTime:n??Date.now()-i.days(30)})).data},_e=async({queryKey:e})=>{let[,{id:t}]=e;return(await u({id:t})).data},ve=async({queryKey:e})=>{let[,{id:t,routingUserId:n}]=e,r=performance.now(),[i,a]=await Promise.all([f({propertyId:t}),n?h(t).catch(()=>null):null]);return!n||!a?.data?.liquidity||a.data.liquidity.pmmVersion!==`v2`?i.data:{...i.data,routing:a?.data?.routingUserId===n&&a?.data?.propertyId===t&&!a?.data?.error?{...a.data,requestStartedAt:r}:void 0}},ye=async()=>{let{data:e,error:t}=await d().adminGetProperties({hidden:!0,invalid:!0});return t||!e?[]:e.properties},be=async e=>{let{data:t,error:n}=await c(e);return{data:t,error:n}},xe=async e=>{let{data:t,error:n}=await c(e,{hidden:!0,invalid:!0,avm:!1});return{data:t,error:n}},Se=e=>{let t=!1;for(let n of`address.street.city.state.zipcode.beds.baths.sqft.year_built.property_type.available_date.original_starting_date.description.sale_price.closing_costs.llc_admin_fee_upfront.maintenance_reserve.annual_rent.taxes.insurance.management_fees.llc_admin_fee_yearly.cash_flow.irr.appreciation.coc.cap_rate.market.slug.lat.lng.total_investment.tokens`.split(`.`))if(t=typeof e[n]==`string`&&!!e[n]||typeof e[n]==`number`&&Math.abs(e[n])>0||Array.isArray(e[n])&&e[n].length>0,!t)break;return t},Ce=(e,t)=>{let n=e.coc,r=(e.numIssued??e.tokens)||e.tokens,i=e.cash_flow,a=e.projected_annual_return??0,s=e.appreciation;Array.isArray(e.cashflow_per_unit)&&e.cashflow_per_unit.length>0&&(i=e.cashflow_per_unit.filter(e=>e.occupied).reduce((e,t)=>
1e+t.monthly_cash_flow,0)*12),n=i/(t*r),n=o(n*100,2,!0);let c=e.projected_rental_yield??0;return c=(e.projected_annual_cash_flow??0)/(t*r),c=o(c*100,2,!0),a=o(c+s,2,!0),{coc:n,irr:o(e.appreciation+n,2,!0),projected_rental_yield:c,projectedAnnualReturn:a}},we=e=>{let{flags:t}=e;return{hiddenSell:[v.MarketSellSecondaryHidden,v.MarketSellAMMHidden].every(e=>t?.includes(e)),hiddenBuy:[v.MarketPrimaryHidden,v.MarketSecondaryHidden,v.MarketAMMHidden].every(e=>t?.includes(e))}},Te=async e=>{try{return await _({propertyId:e})}catch(e){console.log(`executeTokensSwap ~ error:`,e)}},Ee=async e=>{try{return await s({propertyId:e})}catch(e){console.log(`executeTokensRedeem ~ error:`,e)}},w=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){let t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},T=typeof window>`u`||`Deno`in window;function E(){}function De(e,t){return typeof e==`function`?e(t):e}function D(e){return typeof e==`number`&&e>=0&&e!==1/0}function O(e,t){return Math.max(e+(t||0)-Date.now(),0)}function k(e,t,n){return z(e)?typeof t==`function`?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Oe(e,t,n){return z(e)?[{...t,queryKey:e},n]:[e||{},t]}function ke(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(z(o)){if(r){if(t.queryHash!==A(o,t.options))return!1}else if(!M(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!==void 0&&i!==t.state.fetchStatus||a&&!a(t))}function Ae(e,t){let{exact:n,fetching:r,predicate:i,mutationKey:a}=e;if(z(a)){if(!t.options.mutationKey)return!1;if(n){if(j(t.options.mutationKey)!==j(a))return!1}else if(!M(t.options.mutationKey,a))return!1}return!(typeof r==`boolean`&&t.state.status===`loading`!==r||i&&!i(t))}function A(e,t){return(t?.queryKeyHashFn||j)(e)}function j(e){return JSON.stringify(e,(e,t)=>L(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function M(e,t){return N(e,t)}function N(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?!Object.keys(t).some(n=>!N(e[n],t[n])):!1}function P(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=I(e)&&I(t);if(r||L(e)&&L(t)){let i=r?e.length:Object.keys(e).length,a=r?t:Object.keys(t),o=a.length,s=r?[]:{},c=0;for(let i=0;i<o;i++){let o=r?i:a[i];s[o]=P(e[o],t[o],n+1),s[o]===e[o]&&c++}return i===o&&c===i?e:s}return t}function F(e,t){if(e&&!t||t&&!e)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function I(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function L(e){if(!R(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!R(n)||!n.hasOwnProperty(`isPrototypeOf`))}function R(e){return Object.prototype.toString.call(e)===`[object Object]`}function z(e){return Array.isArray(e)}function B(e){return new Promise(t=>{setTimeout(t,e)})}function V(e){B(0).then(e)}function je(){if(typeof AbortController==`function`)return new AbortController}function H(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:P(e,t)}var U=new class extends w{constructor(){super(),this.setup=e=>{if(!T&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),window.addEventListener(`focus`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t),window.removeEventListener(`focus`,t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused==`boolean`?this.focused:typeof document>`u`||[void 0,`visible`,`prerender`].includes(document.visibilityState)}},W=[`online`,`offline`],G=new class extends w{constructor(){super(),this.setup=e=>{if(!T&&window.addEventListener){let t=()=>e();
1return W.forEach(e=>{window.addEventListener(e,t,!1)}),()=>{W.forEach(e=>{window.removeEventListener(e,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(e=>{typeof e==`boolean`?this.setOnline(e):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online==`boolean`?this.online:typeof navigator>`u`||navigator.onLine===void 0||navigator.onLine}};function Me(e){return Math.min(1e3*2**e,3e4)}function K(e){return(e??`online`)!==`online`||G.isOnline()}var q=class{constructor(e){this.revert=e?.revert,this.silent=e?.silent}};function J(e){return e instanceof q}function Ne(e){let t=!1,n=0,r=!1,i,a,o,s=new Promise((e,t)=>{a=e,o=t}),c=t=>{r||(p(new q(t)),e.abort==null||e.abort())},l=()=>{t=!0},u=()=>{t=!1},d=()=>!U.isFocused()||e.networkMode!==`always`&&!G.isOnline(),f=t=>{r||(r=!0,e.onSuccess==null||e.onSuccess(t),i?.(),a(t))},p=t=>{r||(r=!0,e.onError==null||e.onError(t),i?.(),o(t))},m=()=>new Promise(t=>{i=e=>{let n=r||!d();return n&&t(e),n},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),h=()=>{if(r)return;let i;try{i=e.fn()}catch(e){i=Promise.reject(e)}Promise.resolve(i).then(f).catch(i=>{if(r)return;let a=e.retry??3,o=e.retryDelay??Me,s=typeof o==`function`?o(n,i):o,c=a===!0||typeof a==`number`&&n<a||typeof a==`function`&&a(n,i);if(t||!c){p(i);return}n++,e.onFail==null||e.onFail(n,i),B(s).then(()=>{if(d())return m()}).then(()=>{t?p(i):h()})})};return K(e.networkMode)?h():m().then(h),{promise:s,cancel:c,continue:()=>i?.()?s:Promise.resolve(),cancelRetry:l,continueRetry:u}}function Pe(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>{let n;t++;try{n=e()}finally{t--,t||s()}return n},a=r=>{t?e.push(r):V(()=>{n(r)})},o=e=>(...t)=>{a(()=>{e(...t)})},s=()=>{let t=e;e=[],t.length&&V(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:i,batchCalls:o,schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e}}}var Y=Pe(),Fe=class extends w{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Le(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return X(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return X(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),F(n,this.options)||this.client.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.currentQuery,observer:this}),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`)throw Error(`Expected enabled to be a boolean`);this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();let i=this.hasListeners();i&&Re(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();let a=this.computeRefetchInterval();i&&(this.currentQuery!==r||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){let t=this.client.getQueryCache().build(this.client,e),n=this.createResult(t,e);return ze(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.executeFetch({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(E)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),T||this.currentResult.isStale||!D(this.options.staleTime))return;let e=O(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e)}computeRefetchInterval(){return typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.currentResult.data,this.currentQuery):this.options.refetchInterval??!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(T||this.options.enabled===!1||!D(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>
1{(this.options.refetchIntervalInBackground||U.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&=(clearTimeout(this.staleTimeoutId),void 0)}clearRefetchInterval(){this.refetchIntervalId&&=(clearInterval(this.refetchIntervalId),void 0)}createResult(e,t){let n=this.currentQuery,r=this.options,i=this.currentResult,a=this.currentResultState,o=this.currentResultOptions,s=e!==n,c=s?e.state:this.currentQueryInitialState,l=s?this.currentResult:this.previousQueryResult,{state:u}=e,{dataUpdatedAt:d,error:f,errorUpdatedAt:p,fetchStatus:m,status:h}=u,g=!1,_=!1,v;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Le(e,t),o=i&&Re(e,n,t,r);(a||o)&&(m=K(e.options.networkMode)?`fetching`:`paused`,d||(h=`loading`)),t._optimisticResults===`isRestoring`&&(m=`idle`)}if(t.keepPreviousData&&!u.dataUpdatedAt&&l!=null&&l.isSuccess&&h!==`error`)v=l.data,d=l.dataUpdatedAt,h=l.status,g=!0;else if(t.select&&u.data!==void 0)if(i&&u.data===a?.data&&t.select===this.selectFn)v=this.selectResult;else try{this.selectFn=t.select,v=t.select(u.data),v=H(i?.data,v,t),this.selectResult=v,this.selectError=null}catch(e){this.selectError=e}else v=u.data;if(t.placeholderData!==void 0&&v===void 0&&h===`loading`){let e;if(i!=null&&i.isPlaceholderData&&t.placeholderData===o?.placeholderData)e=i.data;else if(e=typeof t.placeholderData==`function`?t.placeholderData():t.placeholderData,t.select&&e!==void 0)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}e!==void 0&&(h=`success`,v=H(i?.data,e,t),_=!0)}this.selectError&&(f=this.selectError,v=this.selectResult,p=Date.now(),h=`error`);let y=m===`fetching`,b=h===`loading`,x=h===`error`;return{status:h,fetchStatus:m,isLoading:b,isSuccess:h===`success`,isError:x,isInitialLoading:b&&y,data:v,dataUpdatedAt:d,error:f,errorUpdatedAt:p,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:x&&u.dataUpdatedAt===0,isPaused:m===`paused`,isPlaceholderData:_,isPreviousData:g,isRefetchError:x&&u.dataUpdatedAt!==0,isStale:Z(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){let t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,F(n,t))return;this.currentResult=n;let r={cache:!0};e?.listeners!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,n=typeof e==`function`?e():e;if(n===`all`||!n&&!this.trackedProps.size)return!0;let r=new Set(n??this.trackedProps);return this.options.useErrorBoundary&&r.add(`error`),Object.keys(this.currentResult).some(e=>{let n=e;return this.currentResult[n]!==t[n]&&r.has(n)})})()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};e.type===`success`?t.onSuccess=!e.manual:e.type===`error`&&!J(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){Y.batch(()=>{if(e.onSuccess){var t,n,r,i;(t=(n=this.options).onSuccess)==null||t.call(n,this.currentResult.data),(r=(i=this.options).onSettled)==null||r.call(i,this.currentResult.data,null)}else if(e.onError){var a,o,s,c;(a=(o=this.options).onError)==null||a.call(o,this.currentResult.error),(s=(c=this.options).onSettled)==null||s.call(c,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:`observerResultsUpdated`})})}};function Ie(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status===`error`&&t.retryOn
1Mount===!1)}function Le(e,t){return Ie(e,t)||e.state.dataUpdatedAt>0&&X(e,t,t.refetchOnMount)}function X(e,t,n){if(t.enabled!==!1){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Z(e,t)}return!1}function Re(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!==`error`)&&Z(e,n)}function Z(e,t){return e.isStaleByTime(t.staleTime)}function ze(e,t,n){return n.keepPreviousData?!1:n.placeholderData===void 0?!F(e.getCurrentResult(),t):t.isPlaceholderData}var Be=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ve=t(((e,t)=>{t.exports=Be()})),Q=e(n(),1),He=Ve().useSyncExternalStore,Ue=Q.createContext(void 0),We=Q.createContext(!1);function Ge(e,t){return e||(t&&typeof window<`u`?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Ue),window.ReactQueryClientContext):Ue)}var Ke=({context:e}={})=>{let t=Q.useContext(Ge(e,Q.useContext(We)));if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},qe=({client:e,children:t,context:n,contextSharing:r=!1})=>{Q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let i=Ge(n,r);return Q.createElement(We.Provider,{value:!n&&r},Q.createElement(i.Provider,{value:e},t))},Je=Q.createContext(!1),Ye=()=>Q.useContext(Je);Je.Provider;function Xe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ze=Q.createContext(Xe()),Qe=()=>Q.useContext(Ze);function $e(e,t){return typeof e==`function`?e(...t):!!e}var et=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},tt=e=>{Q.useEffect(()=>{e.clearReset()},[e])},nt=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&$e(n,[e.error,r]),rt=e=>{e.suspense&&(typeof e.staleTime!=`number`&&(e.staleTime=1e3),typeof e.cacheTime==`number`&&(e.cacheTime=Math.max(e.cacheTime,1e3)))},it=(e,t)=>e.isLoading&&e.isFetching&&!t,at=(e,t,n)=>e?.suspense&&it(t,n),ot=(e,t,n)=>t.fetchOptimistic(e).then(({data:t})=>{e.onSuccess==null||e.onSuccess(t),e.onSettled==null||e.onSettled(t,null)}).catch(t=>{n.clearReset(),e.onError==null||e.onError(t),e.onSettled==null||e.onSettled(void 0,t)});function $(e,t){let n=Ke({context:e.context}),r=Ye(),i=Qe(),a=n.defaultQueryOptions(e);a._optimisticResults=r?`isRestoring`:`optimistic`,a.onError&&=Y.batchCalls(a.onError),a.onSuccess&&=Y.batchCalls(a.onSuccess),a.onSettled&&=Y.batchCalls(a.onSettled),rt(a),et(a,i),tt(i);let[o]=Q.useState(()=>new t(n,a)),s=o.getOptimisticResult(a);if(He(Q.useCallback(e=>{let t=r?()=>void 0:o.subscribe(Y.batchCalls(e));return o.updateResult(),t},[o,r]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),Q.useEffect(()=>{o.setOptions(a,{listeners:!1})},[a,o]),at(a,s,r))throw ot(a,o,i);if(nt({result:s,errorResetBoundary:i,useErrorBoundary:a.useErrorBoundary,query:o.getCurrentQuery()}))throw s.error;return a.notifyOnChangeProps?s:o.trackResult(s)}function st(e,t,n){return $(k(e,t,n),Fe)}export{Ee as A,me as B,k as C,w as D,O as E,he as F,pe as G,le as H,be as I,oe as J,fe as K,ge as L,Ce as M,we as N,ye as O,de as P,ne as Q,_e as R,Oe as S,H as T,ce as U,Se as V,ue as W,ie as X,re as Y,se as Z,T as _,Ve as a,ke as b,K as c,G as d,U as f,A as g,j as h,Ke as i,Te as j,xe as k,Ne as l,je as m,$ as n,Fe as o,De as p,ae as q,qe as r,Y as s,st as t,J as u,D as v,M as w,E as x,Ae as y,ve as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.