1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,672632,954768,816198,696024,379693,e=>{"use strict";var t=e.i(331802),i=e.i(659223);e.i(169137);var s=e.i(659028),r=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let n=(0,s.createSlot)(`Primitive.${r}`),a=i.forwardRef((e,i)=>{let{asChild:s,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(s?n:r,{...a,ref:i})});return a.displayName=`Primitive.${r}`,{...e,[r]:a}},{});e.s(["Primitive",0,r],954768);var n="Progress",[a,o]=function(e,s=[]){let r=[],n=()=>{let t=r.map(e=>i.createContext(e));return function(s){let r=s?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:r}}),[s,r])}};return n.scopeName=e,[function(s,n){let a=i.createContext(n);a.displayName=s+"Context";let o=r.length;r=[...r,n];let u=s=>{let{scope:r,children:n,...u}=s,l=r?.[e]?.[o]||a,c=i.useMemo(()=>u,Object.values(u));return(0,t.jsx)(l.Provider,{value:c,children:n})};return u.displayName=s+"Provider",[u,function(t,r){let u=r?.[e]?.[o]||a,l=i.useContext(u);if(l)return l;if(void 0!==n)return n;throw Error(`\`${t}\` must be used within \`${s}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let s=()=>{let s=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=s.reduce((t,{useScope:i,scopeName:s})=>{let r=i(e)[`__scope${s}`];return{...t,...r}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return s.scopeName=t.scopeName,s}(n,...s)]}(n),[u,l]=a(n),c=i.forwardRef((e,i)=>{var s,n;let{__scopeProgress:a,value:o=null,max:l,getValueLabel:c=p,...h}=e;(l||0===l)&&!v(l)&&console.error((s=`${l}`,`Invalid prop \`max\` of value \`${s}\` supplied to \`Progress\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`));let d=v(l)?l:100;null===o||y(o,d)||console.error((n=`${o}`,`Invalid prop \`value\` of value \`${n}\` supplied to \`Progress\`. The \`value\` prop must be: 2 - a positive number 3 - less than the value passed to \`max\` (or 100 if no \`max\` prop is set) 4 - \`null\` or \`undefined\` if the progress is indeterminate. 5 6Defaulting to \`null\`.`));let g=y(o,d)?o:null,b=m(g)?c(g,d):void 0;return(0,t.jsx)(u,{scope:a,value:g,max:d,children:(0,t.jsx)(r.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":m(g)?g:void 0,"aria-valuetext":b,role:"progressbar","data-state":f(g,d),"data-value":g??void 0,"data-max":d,...h,ref:i})})});c.displayName=n;var h="ProgressIndicator",d=i.forwardRef((e,i)=>{let{__scopeProgress:s,...n}=e,a=l(h,s);return(0,t.jsx)(r.div,{"data-state":f(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...n,ref:i})});function p(e,t){return`${Math.round(e/t*100)}%`}function f(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function m(e){return"number"==typeof e}function v(e){return m(e)&&!isNaN(e)&&e>0}function y(e,t){return m(e)&&!isNaN(e)&&e<=t&&e>=0}d.displayName=h;var g=e.i(294237),b=e.i(439361);let x=(0,g.cva)("relative flex-1 overflow-hidden rounded-full bg-muted",{variants:{size:{sm:"h-1",default:"h-2",lg:"h-4"}},defaultVariants:{size:"default"}});function w({progress:e,showLabel:i=!0,size:s,className:r}){let n=Math.min(Math.max(e,0),100);return(0,t.jsxs)("div",{className:(0,b.cn)("flex items-center gap-3",r),children:[(0,t.jsx)(c,{value:n,className:x({size:s}),children:(0,t.jsx)(d,{className:"h-full rounded-full bg-brand-core transition-all duration-500 ease-out",style:{transform:`translateX(-${100-n}%)`}})}),i&&(0,t.jsxs)("span",{className:"text-xs font-medium text-foreground tabular-nums",children:[Math.round(n),"%"]})]})}e.s(["BookingStickyHeader",0,function({header:e,progress:i}){return null==e&&void 0===i?null:(0,t.jsxs)("div",{className:"sticky top-0 z-20 bg-white pb-4",children:[e,void 0!==i?(0,t.jsx)(w,{progress:i}):null]})}],672632);var S=e.i(924676),C=e.i(457223);let j=(0,e.i(110430).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,j],816198),e.s(["LoaderCircle",0,j],696024);var P=e.i(782450);e.s(["BookingStepNav",0,function({onBack:e,onNext:i,nextLabel:s="Next",backLabel:r="Back",backDisabled:n=!1,nextDisabled:a,isNextLoading:o,sticky:u,hidden:l,className:c}){let h=!!e;return(0,t.jsxs)("div",{className:(0,b.cn)("flex items-center bg-white py-4 gap-2",h?"justify-between":"justify-end",u&&"sticky bottom-0 z-10",l&&"hidden","max-md:group-data-booking-panel-scroll/booking-panel-scroll:fixed max-md:group-data-booking-panel-scroll/booking-panel-scroll:left-0 max-md:group-data-booking-panel-scroll/booking-panel-scroll:bottom-0 max-md:group-data-booking-panel-scroll/booking-panel-scroll:w-full max-md:group-data-booking-panel-scroll/booking-panel-scroll:px-5",c),children:[h&&(0,t.jsxs)(P.Button,{variant:"outline",size:"xl",className:"px-6",onClick:e,disabled:n,children:[(0,t.jsx)(S.ArrowLeft,{})," ",r]}),(0,t.jsx)(P.Button,{size:"xl",className:"text-primary-foreground text-wrap whitespace-normal wrap-break-word",onClick:i,disabled:a||o,children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"animate-spin"})," ",s]}):(0,t.jsxs)(t.Fragment,{children:[s,"Next"===s&&(0,t.jsx)(C.ArrowRight,{})]})})]})}],379693)},266967,354768,652243,991412,e=>{"use strict";var t=e.i(331802),i=e.i(164486);e.s(["FieldError",0,function({message:e}){return e?(0,t.jsxs)("div",{className:"flex items-center gap-2",role:"alert","data-field-error":!0,children:[(0,t.jsx)(i.TriangleAlert,{className:"size-5 shrink-0 text-destructive"}),(0,t.jsx)("span",{className:"text-sm text-destructive",children:e})]}):null}],266967);
6var s=e.i(659223);let r=(0,e.i(110430).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,r],354768),e.s(["Check",0,r],652243);var n=e.i(603324),a=e.i(439361),o=e.i(782450),u=e.i(441716);e.s(["MobileDrawer",0,function(e){let{options:i,onOpenChange:l,drawerTitle:c,triggerClassName:h}=e,[d,p]=(0,s.useState)(!1),f=!0===e.multiSelect,m=f?e.open:d,v=e=>{f||p(e),l?.(e)},y=f?null:i.find(t=>t.id===e.value)?.name??e.placeholder??"Any vet",g=t=>f?e.selectedIds.includes(t):e.value===t;return(0,t.jsxs)(t.Fragment,{children:[!f&&(0,t.jsxs)(o.Button,{variant:"outline",onClick:()=>v(!0),className:(0,a.cn)("h-auto w-30.75 justify-between overflow-hidden truncate rounded-lg border-border px-3 py-2.5 text-xs font-normal text-foreground shadow-sm",!e.value&&"text-muted-foreground",h),children:[(0,t.jsx)("span",{className:"truncate",children:y}),(0,t.jsx)(n.ChevronDown,{size:16,className:"shrink-0"})]}),(0,t.jsx)(u.Drawer,{open:m,onOpenChange:v,children:(0,t.jsxs)(u.DrawerContent,{children:[(0,t.jsx)(u.DrawerHeader,{children:(0,t.jsx)(u.DrawerTitle,{children:c??"Select"})}),(0,t.jsx)("div",{className:"scrollbar-hide flex max-h-[60vh] flex-col gap-4 overflow-y-auto px-8 pt-2 pb-8",children:i.map(i=>{let s=f&&(e.disabledIds??[]).includes(i.id);return(0,t.jsxs)(o.Button,{variant:"outline",disabled:s,onClick:()=>{var t;return t=i.id,void(f?e.onToggle(t):(e.onChange(t),v(!1)))},className:(0,a.cn)("h-auto w-full justify-start gap-3 rounded-xl p-4 text-sm font-medium text-primary-foreground shadow-none transition-colors",g(i.id)?"border-2 border-brand-core bg-brand-core/10 hover:bg-brand-core/10":"border border-muted-foreground hover:bg-muted",s&&"cursor-not-allowed opacity-50"),children:[e.multiSelect&&(0,t.jsx)("span",{className:(0,a.cn)("flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border shadow-sm",g(i.id)?"border-brand-core bg-brand-core":"border-input bg-background"),children:g(i.id)&&(0,t.jsx)(r,{size:10,className:"text-white",strokeWidth:3})}),i.name]},i.id)})})]})})]})}],991412)},671231,458304,e=>{"use strict";var t=e.i(331802),i=e.i(659223);let s=[],r=(0,i.createContext)(null);e.s(["BookingProvider",0,function({clinicName:e,clinicPhone:i,clinicId:n,clinicAddress:a,termsAndConditionsUrl:o,isReasonRequired:u,queries:l,createBookingSession:c,createBooking:h,initialFormValues:d,userPets:p,preselectedUserPetId:f,lockedClientType:m,hideContactDetailsForm:v,onBookingSuccess:y,onStepComplete:g,onClinicSelection:b,children:x}){return(0,t.jsx)(r,{value:{clinicName:e,clinicPhone:i,clinicAddress:function(e){if(!e)return"";if("string"==typeof e)return e;let t=e.postcode??e.postCode,i=[e.state,t].filter(Boolean).join(" ");return[e.street,e.suburb,i].filter(Boolean).join(", ")}(a),clinicId:n,termsAndConditionsUrl:o,isReasonRequired:u??!0,queries:l,createBookingSession:c,createBooking:h,initialFormValues:d,userPets:p??s,preselectedUserPetId:f,lockedClientType:m,hideContactDetailsForm:v,onBookingSuccess:y,onStepComplete:g,onClinicSelection:b},children:x})},"useBookingContext",0,function(){let e=(0,i.use)(r);if(!e)throw Error("useBookingContext must be used within a BookingProvider");return e}],671231);var n=e.i(598279),a=e.i(230902),o=e.i(313741);let u="yyyy-MM-dd";function l(e){return(0,o.parse)(e,u,new Date)}function c(e){let t=(0,a.format)((0,n.addDays)(l(e),6),u);return{startDate:e,endDate:t}}e.s(["buildWindow",0,c,"getNextSlotsPageParam",0,function(e,t){if(e.anyAvailableSlots){var i;return i=c(t).endDate,(0,a.format)((0,n.addDays)(l(i),1),u)}let s=e.nextAvailableSlot?.slice(0,10);return s&&s>t?s:void 0}],458304)},682539,e=>{"use strict";var t=e.i(659223);let i="(max-width: 767px)";function s(e){let t=window.matchMedia(i);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function r(){return window.matchMedia(i).matches}function n(){return!1}e.s(["useIsMobile",0,function(){return(0,t.useSyncExternalStore)(s,r,n)}])},739781,e=>{"use strict";let t;var i=e.i(858859),s=(t=()=>i.isServer,{isServer:()=>t(),setIsServer(e){t=e}});e.s(["environmentManager",0,s])},676848,23144,e=>{"use strict";var t=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(){}};e.s(["Subscribable",0,t],23144);var i=new class extends t{#e;#t;#i;constructor(){super(),this.#i=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#i=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();
6this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",0,i],676848)},792571,e=>{"use strict";var t=e.i(858859);function i(e,{pages:t,pageParams:s}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function s(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}e.s(["hasNextPage",0,function(e,t){return!!t&&null!=i(e,t)},"hasPreviousPage",0,function(e,t){return!!t&&!!e.getPreviousPageParam&&null!=s(e,t)},"infiniteQueryBehavior",0,function(e){return{onFetch:(r,n)=>{let a=r.options,o=r.fetchOptions?.meta?.fetchMore?.direction,u=r.state.data?.pages||[],l=r.state.data?.pageParams||[],c={pages:[],pageParams:[]},h=0,d=async()=>{let n=!1,d=(0,t.ensureQueryFn)(r.options,r.fetchOptions),p=async(e,i,s)=>{let a;if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);let o=(a={client:r.client,queryKey:r.queryKey,pageParam:i,direction:s?"backward":"forward",meta:r.options.meta},(0,t.addConsumeAwareSignal)(a,()=>r.signal,()=>n=!0),a),u=await d(o),{maxPages:l}=r.options,c=s?t.addToStart:t.addToEnd;return{pages:c(e.pages,u,l),pageParams:c(e.pageParams,i,l)}};if(o&&u.length){let e="backward"===o,t={pages:u,pageParams:l},r=(e?s:i)(a,t);c=await p(t,r,e)}else{let t=e??u.length;do{let e=0===h?l[0]??a.initialPageParam:i(a,c);if(h>0&&null==e)break;c=await p(c,e),h++}while(h<t)}return c};r.options.persister?r.fetchFn=()=>r.options.persister?.(d,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},n):r.fetchFn=d}}}])},887097,e=>{"use strict";var t=e.i(732534),i=e.i(444020),s=e.i(600669),r=class extends i.Removable{#s;#r;#n;#a;constructor(e){super(),this.#s=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#r=[],this.state=e.state||n(),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.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||("pending"===this.state.status?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#o({type:"continue"})},i={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=(0,s.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r="pending"===this.state.status,n=!this.#a.canStart();try{if(r)t();else{this.#o({type:"pending",variables:e,isPaused:n}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);let t=await this.options.onMutate?.(e,i);t!==this.state.context&&this.#o({type:"pending",context:t,variables:e,isPaused:n})}let s=await this.#a.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,i),await this.options.onSuccess?.(s,e,this.state.context,i),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(s,null,e,this.state.context,i),this.#o({type:"success",data:s}),s}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,i)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,i)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,i)}catch(e){Promise.reject(e)}throw this.#o({type:"error",error:t}),t}finally{this.#n.runNext(this)}}#o(e){this.state=(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};
6case"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.notifyManager.batch(()=>{this.#r.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function n(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}e.s(["Mutation",0,r,"getDefaultState",0,n])},732534,e=>{"use strict";let t,i,s,r,n,a;var o=e.i(548827).systemSetTimeoutZero,u=(t=[],i=0,s=e=>{e()},r=e=>{e()},n=o,{batch:e=>{let a;i++;try{a=e()}finally{let e;--i||(e=t,t=[],e.length&&n(()=>{r(()=>{e.forEach(e=>{s(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{i?t.push(e):n(()=>{s(e)})},setNotifyFunction:e=>{s=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{n=e}});e.s(["notifyManager",0,u])},912513,307109,e=>{"use strict";var t=e.i(23144),i=new class extends t.Subscribable{#u=!0;#t;#i;constructor(){super(),this.#i=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#i)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#i=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#u!==e&&(this.#u=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#u}};e.s(["onlineManager",0,i],912513),e.i(858859),e.s(["pendingThenable",0,function(){let e,t,i=new Promise((i,s)=>{e=i,t=s});function s(e){Object.assign(i,e),delete i.resolve,delete i.reject}return i.status="pending",i.catch(()=>{}),i.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},i.reject=e=>{s({status:"rejected",reason:e}),t(e)},i}],307109)},44897,600669,444020,e=>{"use strict";var t=e.i(858859),i=e.i(732534),s=e.i(676848),r=e.i(912513),n=e.i(307109),a=e.i(739781);function o(e){return Math.min(1e3*2**e,3e4)}function u(e){return(e??"online")!=="online"||r.onlineManager.isOnline()}var l=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function c(e){let i,c=!1,h=0,d=(0,n.pendingThenable)(),p=()=>s.focusManager.isFocused()&&("always"===e.networkMode||r.onlineManager.isOnline())&&e.canRun(),f=()=>u(e.networkMode)&&e.canRun(),m=e=>{"pending"===d.status&&(i?.(),d.resolve(e))},v=e=>{"pending"===d.status&&(i?.(),d.reject(e))},y=()=>new Promise(t=>{i=e=>{("pending"!==d.status||p())&&t(e)},e.onPause?.()}).then(()=>{i=void 0,"pending"===d.status&&e.onContinue?.()}),g=()=>{let i;if("pending"!==d.status)return;let s=0===h?e.initialPromise:void 0;try{i=s??e.fn()}catch(e){i=Promise.reject(e)}Promise.resolve(i).then(m).catch(i=>{if("pending"!==d.status)return;let s=e.retry??3*!a.environmentManager.isServer(),r=e.retryDelay??o,n="function"==typeof r?r(h,i):r,u=!0===s||"number"==typeof s&&h<s||"function"==typeof s&&s(h,i);c||!u?v(i):(h++,e.onFail?.(h,i),(0,t.sleep)(n).then(()=>p()?void 0:y()).then(()=>{c?v(i):g()}))})};return{promise:d,status:()=>d.status,cancel:t=>{if("pending"===d.status){let i=new l(t);v(i),e.onCancel?.(i)}},continue:()=>(i?.(),d),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1},canStart:f,start:()=>(f()?g():y().then(g),d)}}e.s(["CancelledError",0,l,"canFetch",0,u,"createRetryer",0,c],600669);var h=e.i(548827),d=class{#l;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,t.isValidTimeout)(this.gcTime)&&(this.#l=h.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(a.environmentManager.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#l&&(h.timeoutManager.clearTimeout(this.#l),this.#l=void 0)}};e.s(["Removable",0,d],444020);var p=class extends d{#c;#h;#d;#s;#a;#p;#f;constructor(e){super(),this.#f=!1,this.#p=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#d=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#c=v(this.options),this.state=e.state??this.#c,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#p,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=v(this.options);void 0!==e.data&&(this.setState(m(e.data,e.dataUpdatedAt)),this.#c=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#d.remove(this)}setData(e,i){let s=(0,t.replaceData)(this.state.data,e,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){let i=this.#a?.promise;return this.#a?.cancel(e),i?i.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#c}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveEnabled)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
6Count>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#d.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.#f||this.#m()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#d.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#m(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,i){let s;if("idle"!==this.state.fetchStatus&&this.#a?.status()!=="rejected"){if(void 0!==this.state.data&&i?.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 r=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,r.signal)})},a=()=>{let e,s=(0,t.ensureQueryFn)(this.options,i),r=(n(e={client:this.#s,queryKey:this.queryKey,meta:this.meta}),e);return(this.#f=!1,this.options.persister)?this.options.persister(s,r,this):s(r)},o=(n(s={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:a}),s);this.options.behavior?.onFetch(o,this),this.#h=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#a=c({initialPromise:i?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof l&&e.revert&&this.setState({...this.#h,fetchStatus:"idle"}),r.abort()},onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#d.config.onSuccess?.(e,this),this.#d.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof l){if(e.silent)return this.#a.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#o({type:"error",error:e}),this.#d.config.onError?.(e,this),this.#d.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#o(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,...f(t.data,this.options),fetchMeta:e.meta??null};case"success":let i={...t,...m(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#h=e.manual?i:void 0,i;case"error":let s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),i.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#d.notify({query:this,type:"updated",action:e})})}};function f(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:u(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function m(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function v(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,i=void 0!==t,
6s=i?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}e.s(["Query",0,p,"fetchState",0,f],44897)},858859,548827,e=>{"use strict";var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},i=new class{#v=t;#y=!1;setTimeoutProvider(e){this.#v=e}setTimeout(e,t){return this.#v.setTimeout(e,t)}clearTimeout(e){this.#v.clearTimeout(e)}setInterval(e,t){return this.#v.setInterval(e,t)}clearInterval(e){this.#v.clearInterval(e)}};e.s(["systemSetTimeoutZero",0,function(e){setTimeout(e,0)},"timeoutManager",0,i],548827);var s="u"<typeof window||"Deno"in globalThis;function r(e,t){return(t?.queryKeyHashFn||n)(e)}function n(e){return JSON.stringify(e,(e,t)=>l(t)?Object.keys(t).sort().reduce((e,i)=>(e[i]=t[i],e),{}):t)}function a(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(i=>a(e[i],t[i]))}var o=Object.prototype.hasOwnProperty;function u(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function l(e){if(!c(e))return!1;let t=e.constructor;if(void 0===t)return!0;let i=t.prototype;return!!c(i)&&!!i.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function c(e){return"[object Object]"===Object.prototype.toString.call(e)}var h=Symbol();e.s(["addConsumeAwareSignal",0,function(e,t,i){let s,r=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),r||(r=!0,s.aborted?i():s.addEventListener("abort",i,{once:!0})),s)}),e},"addToEnd",0,function(e,t,i=0){let s=[...e,t];return i&&s.length>i?s.slice(1):s},"addToStart",0,function(e,t,i=0){let s=[t,...e];return i&&s.length>i?s.slice(0,-1):s},"ensureQueryFn",0,function(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==h?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))},"functionalUpdate",0,function(e,t){return"function"==typeof e?e(t):e},"hashKey",0,n,"hashQueryKeyByOptions",0,r,"isServer",0,s,"isValidTimeout",0,function(e){return"number"==typeof e&&e>=0&&e!==1/0},"keepPreviousData",0,function(e){return e},"matchMutation",0,function(e,t){let{exact:i,status:s,predicate:r,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(i){if(n(t.options.mutationKey)!==n(o))return!1}else if(!a(t.options.mutationKey,o))return!1}return(!s||t.state.status===s)&&(!r||!!r(t))},"matchQuery",0,function(e,t){let{type:i="all",exact:s,fetchStatus:n,predicate:o,queryKey:u,stale:l}=e;if(u){if(s){if(t.queryHash!==r(u,t.options))return!1}else if(!a(t.queryKey,u))return!1}if("all"!==i){let e=t.isActive();if("active"===i&&!e||"inactive"===i&&e)return!1}return("boolean"!=typeof l||t.isStale()===l)&&(!n||n===t.state.fetchStatus)&&(!o||!!o(t))},"noop",0,function(){},"partialMatchKey",0,a,"replaceData",0,function(e,t,i){return"function"==typeof i.structuralSharing?i.structuralSharing(e,t):!1!==i.structuralSharing?function e(t,i,s=0){if(t===i)return t;if(s>500)return i;let r=u(t)&&u(i);if(!r&&!(l(t)&&l(i)))return i;let n=(r?t:Object.keys(t)).length,a=r?i:Object.keys(i),c=a.length,h=r?Array(c):{},d=0;for(let u=0;u<c;u++){let l=r?u:a[u],c=t[l],p=i[l];if(c===p){h[l]=c,(r?u<n:o.call(t,l))&&d++;continue}if(null===c||null===p||"object"!=typeof c||"object"!=typeof p){h[l]=p;continue}let f=e(c,p,s+1);h[l]=f,f===c&&d++}return n===c&&d===n?t:h}(e,t):t},"resolveEnabled",0,function(e,t){return"function"==typeof e?e(t):e},"resolveStaleTime",0,function(e,t){return"function"==typeof e?e(t):e},"shallowEqualObjects",0,function(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e)if(e[i]!==t[i])return!1;return!0},"shouldThrowError",0,function(e,t){return"function"==typeof e?e(...t):!!e},"skipToken",0,h,"sleep",0,function(e){return new Promise(t=>{i.setTimeout(t,e)})},"timeUntilStale",0,function(e,t){return Math.max(e+(t||0)-Date.now(),0)}],858859)},284123,e=>{"use strict";var t=e.i(659223),i=e.i(331802),s=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:r})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(s.Provider,{value:e,children:r})),"useQueryClient",0,e=>{let i=t.useContext(s);if(e)return e;if(!i)throw Error("No QueryClient set, use QueryClientProvider to set one");return i}])},924676,e=>{"use strict";let t=(0,e.i(110430).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],924676)}]);
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.