1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[63824],{21404:(e,t,s)=>{s.d(t,{Hx:()=>c,OB:()=>l,R8:()=>o,V7:()=>d,Yz:()=>n,uZ:()=>p,z3:()=>u});var r=s(58232);let i=function(){try{let e="nuqs-localStorage-test";if("undefined"==typeof localStorage)return!1;localStorage.setItem(e,e);let t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}();function n(e,...t){if(!i)return;let s=function(e,...t){return e.replace(/%[sfdO]/g,e=>{let s=t.shift();return"%O"===e&&s?JSON.stringify(s).replace(/"([^"]+)":/g,"$1:"):String(s)})}(e,...t);performance.mark(s);try{console.log(e,...t)}catch{console.log(s)}}function o(e,...t){i&&console.warn(e,...t)}let a={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function u(e){return`[nuqs] ${a[e]} 2 See https://err.47ng.com/NUQS-${e}`}function l(e){if(0===e.size)return"";let t=[];for(let[s,r]of e.entries()){let e=s.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${e}=${r.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,e=>encodeURIComponent(e))}`)}return"?"+t.join("&")}let h=(0,r.createContext)({useAdapter(){throw Error(u(404))}});function c(e){return({children:t,defaultOptions:s,...i})=>(0,r.createElement)(h.Provider,{...i,value:{useAdapter:e,defaultOptions:s}},t)}function d(e){let t=(0,r.useContext)(h);if(!("useAdapter"in t))throw Error(u(404));return t.useAdapter(e)}h.displayName="NuqsAdapterContext",i&&"undefined"!=typeof window&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==h&&console.error(u(303)),window.__NuqsAdapterContext=h);let p=()=>(0,r.useContext)(h).defaultOptions},24722:(e,t,s)=>{s.d(t,{$:()=>a,s:()=>o});var r=s(84987),i=s(44354),n=s(61706),o=class extends i.k{#e;#t;#s;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||a(),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.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#t.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#r({type:"continue"})};this.#s=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#r({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});let s="pending"===this.state.status,r=!this.#s.canStart();try{if(s)t();else{this.#r({type:"pending",variables:e,isPaused:r}),await this.#t.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#r({type:"pending",context:t,variables:e,isPaused:r})}let i=await this.#s.start();return await this.#t.config.onSuccess?.(i,e,this.state.context,this),await this.options.onSuccess?.(i,e,this.state.context),await this.#t.config.onSettled?.(i,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(i,null,e,this.state.context),this.#r({type:"success",data:i}),i}catch(t){try{throw await this.#t.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#t.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#r({type:"error",error:t})}}finally{this.#t.runNext(this)}}#r(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};
2case"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),r.jG.batch(()=>{this.#e.forEach(t=>{t.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},86067:(e,t,s)=>{s.d(t,{V:()=>c,Vv:()=>n,ex:()=>p,zj:()=>o});var r=s(21404),i=s(58232);let n={method:"throttle",timeMs:function(){if("undefined"==typeof window||!window.GestureEvent)return 50;try{let e=navigator.userAgent?.match(/version\/([\d\.]+) safari/i);return parseFloat(e[1])>=17?120:320}catch{return 320}}()};function o(){let e=new Map;return{all:e,on(t,s){let r=e.get(t)||[];return r.push(s),e.set(t,r),()=>this.off(t,s)},off(t,s){let r=e.get(t);r&&e.set(t,r.filter(e=>e!==s))},emit(t,s){let r=e.get(t);r?.forEach(e=>e(s))}}}function a(e,t,s){let r=setTimeout(function(){e(),s.removeEventListener("abort",i)},t);function i(){clearTimeout(r),s.removeEventListener("abort",i)}s.addEventListener("abort",i)}function u(){let e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},s=()=>{};return{promise:new e((e,r)=>{t=e,s=r}),resolve:t,reject:s}}function l(){return new URLSearchParams(location.search)}var h=class{updateMap=new Map;options={history:"replace",scroll:!1,shallow:!0};timeMs=n.timeMs;transitions=new Set;resolvers=null;controller=null;lastFlushedAt=0;push({key:e,query:t,options:s},i=n.timeMs){(0,r.Yz)("[nuqs gtq] Enqueueing %s=%s %O",e,t,s),this.updateMap.set(e,t),"push"===s.history&&(this.options.history="push"),s.scroll&&(this.options.scroll=!0),!1===s.shallow&&(this.options.shallow=!1),s.startTransition&&this.transitions.add(s.startTransition),(!Number.isFinite(this.timeMs)||i>this.timeMs)&&(this.timeMs=i)}getQueuedQuery(e){return this.updateMap.get(e)}flush({getSearchParamsSnapshot:e=l,rateLimitFactor:t=1,...s}){if(this.controller??=new AbortController,!Number.isFinite(this.timeMs))return(0,r.Yz)("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=u();let i=()=>{this.lastFlushedAt=performance.now();let[t,r]=this.applyPendingUpdates({...s,autoResetQueueOnUpdate:s.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e});null===r?this.resolvers.resolve(t):this.resolvers.reject(t),this.resolvers=null},n=()=>{let e=performance.now()-this.lastFlushedAt,s=this.timeMs,n=t*Math.max(0,s-e);(0,r.Yz)("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",n,s,t),0===n?i():a(i,n,this.controller.signal)};return a(n,0,this.controller.signal),this.resolvers.promise}abort(){return this.controller?.abort(),this.controller=new AbortController,this.resolvers?.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){let e=Array.from(this.updateMap.keys());return(0,r.Yz)("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=n.timeMs,e}applyPendingUpdates(e){let{updateUrl:t,getSearchParamsSnapshot:s}=e,i=s();if((0,r.Yz)("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,i.toString()),0===this.updateMap.size)return[i,null];let n=Array.from(this.updateMap.entries()),o={...this.options},a=Array.from(this.transitions);for(let[t,s]of(e.autoResetQueueOnUpdate&&this.reset(),(0,r.Yz)("[nuqs gtq] Flushing queue %O with options %O",n,o),n))null===s?i.delete(t):i.set(t,s);try{return!function(e,t){let s=t;for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r)continue;let i=s;s=()=>r(i)}s()}(a,()=>{t(i,o)}),[i,null]}catch(e){return console.error((0,r.z3)(429),n.map(([e])=>e).join(),e),[i,e]}}};let c=new h;var d=class{callback;resolvers=u();controller=new AbortController;queuedValue=void 0;constructor(e){this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,a(()=>{let t=this.resolvers;try{(0,r.Yz)("[nuqs dq] Flushing debounce queue",e);let s=this.callback(e);(0,r.Yz)("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=u(),s.then(e=>t.resolve(e)).catch(e=>t.reject(e))}catch(e){this.queuedValue=void 0,t.reject(e)}},t,this.controller.signal),this.resolvers.promise}};let p=new class{throttleQueue;queues=new Map;queuedQuerySync=o();constructor(e=new h){this.throttleQueue=e}useQueuedQueries(e){return function(e,t,s){let r=(0,i.useCallback)(()=>{let t=Object.fromEntries(e.map(e=>[e,s(e)]));return[JSON.stringify(t),t]},[e.join(","),s]),n=(0,i.useRef)(null);null===n.current&&(n.current=r());let o=(0,i.useCallback)(s=>
2{let r=e.map(e=>t(e,s));return()=>r.forEach(e=>e())},[e.join(","),t]);return(0,i.useSyncExternalStore)(o,()=>{let[e,t]=r();return n.current[0]===e?n.current[1]:(n.current=[e,t],t)},()=>n.current[1])}(e,(e,t)=>this.queuedQuerySync.on(e,t),e=>this.getQueuedQuery(e))}push(e,t,s){if(!Number.isFinite(t))return Promise.resolve((s.getSearchParamsSnapshot??l)());let i=e.key;if(!this.queues.has(i)){(0,r.Yz)("[nuqs dqc] Creating debounce queue for `%s`",i);let e=new d(e=>(this.throttleQueue.push(e),this.throttleQueue.flush(s).finally(()=>{void 0===this.queues.get(e.key)?.queuedValue&&((0,r.Yz)("[nuqs dqc] Cleaning up empty queue for `%s`",e.key),this.queues.delete(e.key)),this.queuedQuerySync.emit(e.key)})));this.queues.set(i,e)}(0,r.Yz)("[nuqs dqc] Enqueueing debounce update %O",e);let n=this.queues.get(i).push(e,t);return this.queuedQuerySync.emit(i),n}abort(e){let t=this.queues.get(e);return t?((0,r.Yz)("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),e=>(e.then(t.resolvers.resolve,t.resolvers.reject),e)):e=>e}abortAll(){for(let[e,t]of this.queues.entries())(0,r.Yz)("[nuqs dqc] Aborting debounce queue %s=%s",e,t.queuedValue?.query),t.abort(),t.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(e);this.queues.clear()}getQueuedQuery(e){let t=this.queues.get(e)?.queuedValue?.query;return void 0!==t?t:this.throttleQueue.getQueuedQuery(e)}}(c)}}]);
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.