PageSourceSearch

https://rpgtrader.com/assets/api-client-AMnfRrkx.js

js rpgtrader.com collected 2026-10-09 17:59:35 UTC 52,713 bytes, 1 lines download raw bytes

vendor: 4,161 bytes, line 1
1import{a as e,t}from"./rolldown-runtime-Cyuzqnbw.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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)}
1,ne={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ne,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),a=t(((e,t)=>{t.exports=i()})),o=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(){}},s=new class extends o{#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();
1this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},c={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},l=new class{#e=c;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 u(e){setTimeout(e,0)}var d=typeof window>`u`||`Deno`in globalThis;function f(){}function p(e,t){return typeof e==`function`?e(t):e}function m(e){return typeof e==`number`&&e>=0&&e!==1/0}function h(e,t){return Math.max(e+(t||0)-Date.now(),0)}function g(e,t){return typeof e==`function`?e(t):e}function _(e,t){return typeof e==`function`?e(t):e}function v(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==b(o,t.options))return!1}else if(!S(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 y(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(x(t.options.mutationKey)!==x(a))return!1}else if(!S(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function b(e,t){return(t?.queryKeyHashFn||x)(e)}function x(e){return JSON.stringify(e,(e,t)=>D(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function S(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>S(e[n],t[n])):!1}var C=Object.prototype.hasOwnProperty;function w(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=E(e)&&E(t);if(!r&&!(D(e)&&D(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:C.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=w(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function T(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function E(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function D(e){if(!O(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!O(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function O(e){return Object.prototype.toString.call(e)===`[object Object]`}function ee(e){return new Promise(t=>{l.setTimeout(t,e)})}function k(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:w(e,t)}function A(e){return e}function te(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function j(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var M=Symbol();function N(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===M?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function P(e,t){return typeof e==`function`?e(...t):!!e}function ne(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 F=(()=>{let e=()=>d;return{isServer(){return e()},setIsServer(t){e=t}}})();function I(){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 re=u;function ie(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=re,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 L=ie(),R=new class extends o{#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))}
1setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ae(e){return Math.min(1e3*2**e,3e4)}function oe(e){return(e??`online`)===`online`?R.isOnline():!0}var z=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function se(e){let t=!1,n=0,r,i=I(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new z(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>s.isFocused()&&(e.networkMode===`always`||R.isOnline())&&e.canRun(),d=()=>oe(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{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(f).catch(r=>{if(a())return;let i=e.retry??(F.isServer()?0:3),o=e.retryDelay??ae,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){p(r);return}n++,e.onFail?.(n,r),ee(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var ce=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),m(this.gcTime)&&(this.#e=l.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(F.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(l.clearTimeout(this.#e),this.#e=void 0)}};function le(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=>{ne(e,()=>t.signal,()=>n=!0)},u=N(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?j:te;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?de:ue,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:ue(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function ue(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 de(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var fe=class extends ce{#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=he(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=he(this.options);e.data!==void 0&&(this.setState(me(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=k(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(f).catch(f):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=>_(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===M||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
1Count>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>g(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!h(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=N(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`?le(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=se({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof z&&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 z){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,...pe(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...me(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),L.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function pe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:oe(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function me(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function he(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
vendor: 4,608 bytes, line 1
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ge=class extends o{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=I(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ve(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return B(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return B(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof _(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!T(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&ye(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||_(this.options.enabled,this.#t)!==_(t.enabled,this.#t)||g(this.options.staleTime,this.#t)!==g(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||_(this.options.enabled,this.#t)!==_(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return be(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(f)),t}#g(){this.#b();let e=g(this.options.staleTime,this.#t);if(F.isServer()||this.#r.isStale||!m(e))return;let t=h(this.#r.dataUpdatedAt,e)+1;this.#d=l.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(F.isServer()||_(this.options.enabled,this.#t)===!1||!m(this.#p)||this.#p===0)&&(this.#f=l.setInterval(()=>{(this.options.refetchIntervalInBackground||s.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(l.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(l.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ve(e,t),o=i&&ye(e,n,t,r);(a||o)&&(l={...l,...pe(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=k(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=k(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&g,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdate
1Count:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:V(e,t),refetch:this.refetch,promise:this.#o,isEnabled:_(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=I())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!T(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){L.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function _e(e,t){return _(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&_(t.retryOnMount,e)===!1)}function ve(e,t){return _e(e,t)||e.state.data!==void 0&&B(e,t,t.refetchOnMount)}function B(e,t,n){if(_(t.enabled,e)!==!1&&g(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&V(e,t)}return!1}function ye(e,t,n,r){return(e!==t||_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&V(e,n)}function V(e,t){return _(t.enabled,e)!==!1&&e.isStaleByTime(g(t.staleTime,e))}function be(e,t){return!T(e.getCurrentResult(),t)}var xe=class extends ce{#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||H(),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=se({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,isPau
1sed:!1,status:`error`}}};this.state=t(this.state),L.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function H(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Se=class extends o{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),T(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&x(t.mutationKey)!==x(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??H();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){L.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},U=e(r(),1),Ce=a(),we=U.createContext(void 0),W=e=>{let t=U.useContext(we);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Te=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Ce.jsx)(we.Provider,{value:e,children:t})),Ee=U.createContext(!1),De=()=>U.useContext(Ee);Ee.Provider;function Oe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ke=U.createContext(Oe()),Ae=()=>U.useContext(ke),je=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?P(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Me=e=>{U.useEffect(()=>{e.clearReset()},[e])},Ne=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||P(n,[e.error,r])),Pe=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Fe=(e,t)=>e.isLoading&&e.isFetching&&!t,Ie=(e,t)=>e?.suspense&&t.isPending,G=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Le(e,t,n){let r=De(),i=Ae(),a=W(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,Pe(o),je(o,i,s),Me(i);let c=!a.getQueryCache().get(o.queryHash),[l]=U.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(U.useSyncExternalStore(U.useCallback(e=>{let t=d?l.subscribe(L.batchCalls(e)):f;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),U.useEffect(()=>{l.setOptions(o)},[o,l]),Ie(o,u))throw G(o,l,i);if(Ne({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!F.isServer()&&Fe(u,r)&&(c?G(o,l,i):s?.promise)?.catch(f).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function K(e,t){return Le(e,ge,t)}function q(e,t){let n=W(t),[r]=U.useState(()=>new Se(n,e));U.useEffect(()=>{r.setOptions(e)},[r,e]);let i=U.useSyncExternalStore(U.useCallback(e=>r.subscribe(L.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=U.useCallback((e,t)=>{r.mutate(e,t).catch(f)},[r]);if(i.error&&P(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Re=new Set([204,205,304]),ze=`application/json, application/problem+json`,Be=null,Ve=null,J=null;function He(e){J=e}function Ue(e){return typeof Request<`u`&&e instanceof Request}function We(e,t){return t?t.toUpperCase():Ue(e)?e.method.toUpperCase():`GET`}function Ge(e){return typeof URL<`u`&&e instanceof URL}function Ke(e){if(!Be)return e;let t=qe(e);
1if(!t.startsWith(`/`))return e;let n=`${Be}${t}`;return typeof e==`string`?n:Ge(e)?new URL(n):new Request(n,e)}function qe(e){return typeof e==`string`?e:Ge(e)?e.toString():e.url}function Je(...e){let t=new Headers;for(let n of e)n&&new Headers(n).forEach((e,n)=>{t.set(n,e)});return t}function Ye(e){let t=e.get(`content-type`);return t?t.split(`;`,1)[0].trim().toLowerCase():null}function Y(e){return e===`application/json`||!!e?.endsWith(`+json`)}function Xe(e){return!!(e&&(e.startsWith(`text/`)||e===`application/xml`||e===`text/xml`||e.endsWith(`+xml`)||e===`application/x-www-form-urlencoded`))}function Ze(e,t){return!!(t===`HEAD`||Re.has(e.status)||e.headers.get(`content-length`)===`0`||e.body===null)}function Qe(e){return e.charCodeAt(0)===65279?e.slice(1):e}function $e(e){let t=e.trimStart();return t.startsWith(`{`)||t.startsWith(`[`)}function X(e,t){if(!e||typeof e!=`object`)return;let n=e[t];if(typeof n!=`string`)return;let r=n.trim();return r===``?void 0:r}function et(e,t=300){return e.length>t?`${e.slice(0,t-1)}…`:e}function tt(e,t){let n=`HTTP ${e.status} ${e.statusText}`;if(typeof t==`string`){let e=t.trim();return e?`${n}: ${et(e)}`:n}let r=X(t,`title`),i=X(t,`detail`),a=X(t,`message`)??X(t,`error_description`)??X(t,`error`);return r&&i?`${n}: ${r} — ${i}`:i?`${n}: ${i}`:a?`${n}: ${a}`:r?`${n}: ${r}`:n}var nt=`HTTP 500 Internal Server Error`;function rt(e,t){return e.status===500&&J&&!J()?nt:tt(e,t)}var it=class extends Error{name=`ApiError`;status;statusText;data;headers;response;method;url;constructor(e,t,n){super(rt(e,t)),Object.setPrototypeOf(this,new.target.prototype),this.status=e.status,this.statusText=e.statusText,this.data=t,this.headers=e.headers,this.response=e,this.method=n.method,this.url=e.url||n.url}},at=class extends Error{name=`ResponseParseError`;status;statusText;headers;response;method;url;rawBody;cause;constructor(e,t,n,r){super(`Failed to parse response from ${r.method} ${e.url||r.url} (${e.status} ${e.statusText}) as JSON`),Object.setPrototypeOf(this,new.target.prototype),this.status=e.status,this.statusText=e.statusText,this.headers=e.headers,this.response=e,this.method=r.method,this.url=e.url||r.url,this.rawBody=t,this.cause=n}};async function ot(e,t){let n=await e.text(),r=Qe(n);if(r.trim()===``)return null;try{return JSON.parse(r)}catch(r){throw new at(e,n,r,t)}}async function st(e,t){if(Ze(e,t))return null;let n=Ye(e.headers);if(n&&!Y(n)&&!Xe(n))return typeof e.blob==`function`?e.blob():e.text();let r=await e.text(),i=Qe(r);if(i.trim()===``)return null;if(Y(n)||$e(i))try{return JSON.parse(i)}catch{return r}return r}function ct(e){let t=Ye(e.headers);return Y(t)?`json`:Xe(t)||t==null?`text`:`blob`}async function lt(e,t,n){if(Ze(e,n.method))return null;switch(t===`auto`?ct(e):t){case`json`:return ot(e,n);case`text`:{let t=await e.text();return t===``?null:t}case`blob`:if(typeof e.blob!=`function`)throw TypeError(`Blob responses are not supported in this runtime. Use responseType "json" or "text" instead.`);return e.blob()}}async function Z(e,t={}){e=Ke(e);let{responseType:n=`auto`,headers:r,...i}=t,a=We(e,i.method);if(i.body!=null&&(a===`GET`||a===`HEAD`))throw TypeError(`customFetch: ${a} requests cannot have a body.`);let o=Je(Ue(e)?e.headers:void 0,r);if(typeof i.body==`string`&&!o.has(`content-type`)&&$e(i.body)&&o.set(`content-type`,`application/json`),n===`json`&&!o.has(`accept`)&&o.set(`accept`,ze),Ve&&!o.has(`authorization`)){let e=await Ve();e&&o.set(`authorization`,`Bearer ${e}`)}let s={method:a,url:qe(e)},c=await fetch(e,{...i,method:a,headers:o,credentials:`include`});if(!c.ok)throw new it(c,await st(c,a),s);return await lt(c,n,s)}var Q=(e,t)=>{let n={queryKey:t};for(let t of Object.keys(e))t!==`queryKey`&&Object.defineProperty(n,t,{enumerable:!0,configurable:!0,get:()=>e[t]});return n},ut=()=>`/api/auth/register`,dt=async(e,t)=>{let n=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(ut(),{...t,method:`POST`,headers:{"Content-Type":`application/json`,...n(t?.headers)},body:JSON.stringify(e)})},ft=()=>[`register`],pt=e=>{let t=ft(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return dt(t,r)},...n}},mt=e=>q(pt(e)),ht=()=>`/api/auth/login`,gt=async(e,t)=>{let n=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(ht(),{...t,method:`POST`,headers:{"Content-Type":`application/json`,...n(t?.headers)},body:JSON.stringify(e)})},_t=()=>[`login`],vt=e=>{let t=_t(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return gt(t,r)},...n}},yt=e=>q(vt(e)),bt=()=>`/api/auth/login/2fa`,xt=async(e,t)=>{let n=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(bt(),{...t,method:`POST`,headers:{"Content-Type":`application/json`,...n(t?.headers)},body:JSON.stringify(e)})},St=()=>[`login2fa`],Ct=e=>{let t=St(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return xt(t,r)},...n}},wt=e=>q(Ct(e)),Tt=()=>`/api/auth/logout`,Et=async e=>Z(Tt(),{...e,method:`POST`}),Dt=()=>[`logout`],Ot=e=>{let t=Dt(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:()=>Et(r),...n}},kt=e=>q(Ot(e)),At=()=>`/api/auth/me`,jt=async e=>Z(At(),{...e,method:`GET`}),Mt=()=>[`/api/auth/me`],Nt=e=>{let{query:t,request:n}=e??{};return{queryKey:t?.queryKey??Mt(),queryFn:({signal:e})=>jt({signal:e,...n}),...t}};function Pt(e){let t=Nt(e);return Q(K(t),t.queryKey)}var Ft=()=>`/api/creators/profile`,It=async e=>Z(Ft(),{...e,method:`GET`}),Lt=()=>[`/api/creators/profile`],Rt=e=>{let{query:t,request:n}=e??{};return{queryKey:t?.queryKey??Lt(),queryFn:({signal:e})=>It({signal:e,...n}),...t}};function zt(e){let t=Rt(e);return Q(K(t),t.queryKey)}var Bt=e=>{let t=new URLSearchParams;Object.entries(e||{}
1).forEach(([e,n])=>{n!==void 0&&t.append(e,n===null?`null`:String(n))});let n=t.toString();return n.length>0?`/api/products?${n}`:`/api/products`},Vt=async(e,t)=>Z(Bt(e),{...t,method:`GET`}),Ht=e=>[`/api/products`,...e?[e]:[]],Ut=()=>`/api/products`,Wt=async(e,t)=>{let n=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(Ut(),{...t,method:`POST`,headers:{"Content-Type":`application/json`,...n(t?.headers)},body:JSON.stringify(e)})},Gt=()=>[`createProduct`],Kt=e=>{let t=Gt(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return Wt(t,r)},...n}},qt=e=>q(Kt(e)),Jt=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([e,t])=>{t!==void 0&&n.append(e,t===null?`null`:String(t))});let r=n.toString();return r.length>0?`/api/products/${e}?${r}`:`/api/products/${e}`},Yt=async(e,t,n)=>Z(Jt(e,t),{...n,method:`GET`}),Xt=(e,t)=>[`/api/products/${e}`,...t?[t]:[]],$=(e,t,n)=>{let{query:r,request:i}=n??{};return{queryKey:r?.queryKey??Xt(e,t),queryFn:({signal:n})=>Yt(e,t,{signal:n,...i}),enabled:e!=null,...r}};function Zt(e,t,n){let r=$(e,t,n);return Q(K(r),r.queryKey)}var Qt=e=>`/api/products/${e}`,$t=async(e,t,n)=>{let r=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(Qt(e),{...n,method:`PUT`,headers:{"Content-Type":`application/json`,...r(n?.headers)},body:JSON.stringify(t)})},en=()=>[`updateProduct`],tn=e=>{let t=en(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t,data:n}=e??{};return $t(t,n,r)},...n}},nn=e=>q(tn(e)),rn=e=>`/api/products/${e}`,an=async(e,t)=>Z(rn(e),{...t,method:`DELETE`}),on=()=>[`deleteProduct`],sn=e=>{let t=on(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return an(t,r)},...n}},cn=e=>q(sn(e)),ln=e=>`/api/products/${e}/duplicate`,un=async(e,t)=>Z(ln(e),{...t,method:`POST`}),dn=()=>[`duplicateProduct`],fn=e=>{let t=dn(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return un(t,r)},...n}},pn=e=>q(fn(e)),mn=e=>`/api/products/${e}/collaborators/accept`,hn=async(e,t)=>Z(mn(e),{...t,method:`POST`}),gn=()=>[`acceptProductCollaboratorInvite`],_n=e=>{let t=gn(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return hn(t,r)},...n}},vn=e=>q(_n(e)),yn=e=>`/api/products/${e}/collaborators/decline`,bn=async(e,t)=>Z(yn(e),{...t,method:`POST`}),xn=()=>[`declineProductCollaboratorInvite`],Sn=e=>{let t=xn(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return bn(t,r)},...n}},Cn=e=>q(Sn(e)),wn=e=>`/api/products/${e}/publish`,Tn=async(e,t)=>Z(wn(e),{...t,method:`POST`}),En=()=>[`publishProduct`],Dn=e=>{let t=En(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return Tn(t,r)},...n}},On=e=>q(Dn(e)),kn=e=>`/api/products/${e}/request-review`,An=async(e,t)=>Z(kn(e),{...t,method:`POST`}),jn=()=>[`requestProductReview`],Mn=e=>{let t=jn(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return An(t,r)},...n}},Nn=e=>q(Mn(e)),Pn=e=>`/api/products/${e}/unpublish`,Fn=async(e,t)=>Z(Pn(e),{...t,method:`POST`}),In=()=>[`unpublishProduct`],Ln=e=>{let t=In(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return Fn(t,r)},...n}},Rn=e=>q(Ln(e)),zn=e=>`/api/products/${e}/files`,Bn=async(e,t,n)=>{let r=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(zn(e),{...n,method:`POST`,headers:{"Content-Type":`application/json`,...r(n?.headers)},body:JSON.stringify(t)})},Vn=()=>[`addProductFile`],Hn=e=>{let t=Vn(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t,data:n}=e??{};return Bn(t,n,r)},...n}},Un=e=>q(Hn(e)),Wn=(e,t)=>`/api/products/${e}/files/${t}`,Gn=async(e,t,n)=>Z(Wn(e,t),{...n,method:`DELETE`}),Kn=()=>[`deleteProductFile`],qn=e=>{let t=Kn(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t,fileId:n}=e??{};return Gn(t,n,r)},...n}},Jn=e=>q(qn(e)),Yn=e=>`/api/products/${e}/permanent`,Xn=async(e,t)=>Z(Yn(e),{...t,method:`DELETE`}
1),Zn=e=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([e,n])=>{n!==void 0&&t.append(e,n===null?`null`:String(n))});let n=t.toString();return n.length>0?`/api/admin/products?${n}`:`/api/admin/products`},Qn=async(e,t)=>Z(Zn(e),{...t,method:`GET`}),$n=e=>[`/api/admin/products`,...e?[e]:[]],er=(e,t)=>{let{query:n,request:r}=t??{};return{queryKey:n?.queryKey??$n(e),queryFn:({signal:t})=>Qn(e,{signal:t,...r}),...n}},tr=e=>`/api/admin/products/${e}/mark-pending`,nr=async(e,t)=>Z(tr(e),{...t,method:`POST`}),rr=()=>[`adminProductMarkPending`],ir=e=>{let t=rr(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t}=e??{};return nr(t,r)},...n}},ar=e=>q(ir(e)),or=e=>`/api/admin/products/${e}/review-decision`,sr=async(e,t,n)=>{let r=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(or(e),{...n,method:`POST`,headers:{"Content-Type":`application/json`,...r(n?.headers)},body:JSON.stringify(t)})},cr=()=>[`adminProductReviewDecision`],lr=e=>{let t=cr(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{id:t,data:n}=e??{};return sr(t,n,r)},...n}},ur=e=>q(lr(e)),dr=()=>`/api/lulu/pricing`,fr=async(e,t)=>{let n=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(dr(),{...t,method:`POST`,headers:{"Content-Type":`application/json`,...n(t?.headers)},body:JSON.stringify(e)})},pr=()=>[`calculatePrintCost`],mr=e=>{let t=pr(),{mutation:n,request:r}=e?e.mutation&&`mutationKey`in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=e??{};return fr(t,r)},...n}},hr=e=>q(mr(e)),gr=e=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([e,n])=>{n!==void 0&&t.append(e,n===null?`null`:String(n))});let n=t.toString();return n.length>0?`/api/lulu/shipping-options?${n}`:`/api/lulu/shipping-options`},_r=async(e,t)=>Z(gr(e),{...t,method:`GET`}),vr=e=>[`/api/lulu/shipping-options`,...e?[e]:[]],yr=(e,t)=>{let{query:n,request:r}=t??{};return{queryKey:n?.queryKey??vr(e),queryFn:({signal:t})=>_r(e,{signal:t,...r}),...n}};function br(e,t){let n=yr(e,t);return Q(K(n),n.queryKey)}var xr=()=>`/api/lulu/cover-dimensions`,Sr=async(e,t)=>{let n=e=>e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):e:{};return Z(xr(),{...t,method:`POST`,headers:{"Content-Type":`application/json`,...n(t?.headers)},body:JSON.stringify(e)})},Cr={PDF:`PDF`,IMAGE:`IMAGE`,ZIP:`ZIP`,OTHER:`OTHER`,EXTERNAL:`EXTERNAL`};export{Ae as $,Jn as A,mt as B,Un as C,r as Ct,qt as D,hr as E,br as F,q as G,Rn as H,yt as I,G as J,K,wt as L,zt as M,Pt as N,Cn as O,Zt as P,Me as Q,kt as R,vn as S,a as St,ur as T,nn as U,Nn as V,He as W,je as X,Ie as Y,Ne as Z,Sr as _,g as _t,Lt as a,fe as at,Fn as b,s as bt,$ as c,p as ct,er as d,A as dt,De as et,Ht as f,y as ft,Xn as g,w as gt,Vt as h,S as ht,un as i,ge as it,pn as j,cn as k,vr as l,x as lt,Qn as m,f as mt,fr as n,W as nt,Mt as o,R as ot,Yt as p,v as pt,Pe as q,an as r,xe as rt,Xt as s,L as st,Cr as t,Te as tt,$n as u,b as ut,Tn as v,T as vt,ar as w,$t as x,o as xt,An as y,M as yt,On 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.