1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6166],{46166:function(t,e,i){i.r(e),i.d(e,{default:function(){return tG}});var r,l,n,a,h,o,u,c,p,d,f,g,y,m,S,v,w,b,_,A,O,k,E,F,j,W,T,C,z,R,M,x,I,P,D,$,N,G,U,V,L,K,B,J,q=i(85893);let H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Q=/_key\s*==\s*['"](.*)['"]/,X=/^\d*:\d*$/;function Y(t){return"number"==typeof t||"string"==typeof t&&/^\[\d+\]$/.test(t)}function Z(t){return"string"==typeof t?Q.test(t.trim()):"object"==typeof t&&"_key"in t}function tt(t){return Y(t)?Number(t.replace(/[^\d]/g,"")):Z(t)?{_key:t.match(Q)[1]}:!function(t){if("string"==typeof t&&X.test(t))return!0;if(!Array.isArray(t)||2!==t.length)return!1;let[e,i]=t;return("number"==typeof e||""===e)&&("number"==typeof i||""===i)}(t)?t:function(t){let[e,i]=t.split(":").map(t=>""===t?t:Number(t));return[e,i]}(t)}let te="drafts.";function ti(t){return t.startsWith(te)?t.slice(te.length):t}let ts={"\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","'":"\\'","\\":"\\\\"},tr={"\\f":"\f","\\n":` 2`,"\\r":"\r","\\t":" ","\\'":"'","\\\\":"\\"};function tl(t){return"object"==typeof t&&null!==t}let tn=t=>t;var ta=i(40275);let th=["Value","Copy","Blank","ReturnIntoArray","ReturnIntoObject","ReturnIntoObjectSameKey","PushField","PushElement","PushParent","Pop","PushFieldCopy","PushFieldBlank","PushElementCopy","PushElementBlank","ReturnIntoObjectPop","ReturnIntoObjectSameKeyPop","ReturnIntoArrayPop","ObjectSetFieldValue","ObjectCopyField","ObjectDeleteField","ArrayAppendValue","ArrayAppendSlice","StringAppendString","StringAppendSlice"];class to{constructor(t,e,i){this.model=t,this.root=e,this.patch=i,this.i=0,this.inputStack=[],this.outputStack=[]}read(){return this.patch[this.i++]}process(){for(this.inputStack.push({value:this.root}),this.outputStack.push({value:this.root});this.i<this.patch.length;){let t=this.read(),e=th[t];if(!e)throw Error(`Unknown opcode: ${t}`);this[`process${e}`].apply(this)}let t=this.outputStack.pop();return this.finalizeOutput(t)}inputEntry(){return this.inputStack[this.inputStack.length-1]}inputKey(t,e){return t.keys||(t.keys=this.model.objectGetKeys(t.value).sort()),t.keys[e]}outputEntry(){return this.outputStack[this.outputStack.length-1]}outputArray(){let t=this.outputEntry();return t.writeValue||(t.writeValue=this.model.copyArray(t.value)),t.writeValue}outputObject(){let t=this.outputEntry();return t.writeValue||(t.writeValue=this.model.copyObject(t.value)),t.writeValue}outputString(){let t=this.outputEntry();return t.writeValue||(t.writeValue=this.model.copyString(t.value)),t.writeValue}finalizeOutput(t){return t.writeValue?this.model.finalize(t.writeValue):t.value}processValue(){let t=this.model.wrap(this.read());this.outputStack.push({value:t})}processCopy(){let t=this.inputEntry();this.outputStack.push({value:t.value})}processBlank(){this.outputStack.push({value:null})}processReturnIntoArray(){let t=this.outputStack.pop(),e=this.finalizeOutput(t),i=this.outputArray();this.model.arrayAppendValue(i,e)}processReturnIntoObject(){let t=this.read(),e=this.outputStack.pop(),i=this.finalizeOutput(e);i=this.model.markChanged(i);let r=this.outputObject();this.model.objectSetField(r,t,i)}processReturnIntoObjectSameKey(){let t=this.inputEntry(),e=this.outputStack.pop(),i=this.finalizeOutput(e),r=this.outputObject();this.model.objectSetField(r,t.key,i)}processPushField(){let t=this.read(),e=this.inputEntry(),i=this.inputKey(e,t),r=this.model.objectGetField(e.value,i);this.inputStack.push({value:r,key:i})}processPushElement(){let t=this.read(),e=this.inputEntry(),i=this.model.arrayGetElement(e.value,t);this.inputStack.push({value:i})}processPop(){this.inputStack.pop()}processPushFieldCopy(){this.processPushField(),this.processCopy()}processPushFieldBlank(){this.processPushField(),this.processBlank()}processPushElementCopy(){this.processPushElement(),this.processCopy()}processPushElementBlank(){this.processPushElement(),this.processBlank()}processReturnIntoObjectPop(){this.processReturnIntoObject(),this.processPop()}processReturnIntoObjectSameKeyPop(){this.processReturnIntoObjectSameKey(),this.processPop()}processReturnIntoArrayPop(){this.processReturnIntoArray(),this.processPop()}processObjectSetFieldValue(){this.processValue(),this.processReturnIntoObject()}processObjectCopyField(){this.processPushField(),this.processCopy(),this.processReturnIntoObjectSameKey(),this.processPop()}processObjectDeleteField(){let t=this.read(),e=this.inputEntry(),i=this.inputKey(e,t),r=this.outputObject();this.model.objectDeleteField(r,i)}processArrayAppendValue(){let t=this.model.wrap(this.read()),e=this.outputArray();this.model.arrayAppendValue(e,t)}processArrayAppendSlice(){let t=this.read(),e=this.read(),i=this.outputArray(),r=this.inputEntry().value;this.model.arrayAppendSlice(i,r,t,e)}processStringAppendString(){let t=this.model.wrap(this.read()),e=this.outputString();this.model.stringAppendValue(e,t)}processStringAppendSlice(){let t=this.read(),e=this.read(),i=this.outputString(),r=this.inputEntry().value;this.model.stringAppendSlice(i,r,t,e)}}function tu(t,e,i=0){let r=i,l=0;for(l=i;r<e;l++){var n;let e=(n=t.codePointAt(l))>>16?4:n>>11?3:n>>7?2:1;4===e&&l++,r+=e}return l}class tc{wrap(t){return t}finalize(t){return Array.isArray(t)?t:t.data}markChanged(t){return t}objectGetKeys(t){return Object.keys(t)}objectGetField(t,e){return t[e]}arrayGetElement(t,e){return t[e]}copyObject(t){let e={type:"object",data:{}};if(null!==t)for(let[i,r]of Object.entries(t))e.data[i]=r;return e}copyArray(t){return null===t?[]:t.slice()}copyString(t){return{type:"string",data:null===t?"":t}}
2objectSetField(t,e,i){t.data[e]=i}objectDeleteField(t,e){delete t.data[e]}arrayAppendValue(t,e){t.push(e)}arrayAppendSlice(t,e,i,r){t.push(...e.slice(i,r))}stringAppendSlice(t,e,i,r){let l=tu(e,i),n=tu(e,r,l);t.data+=e.slice(l,n)}stringAppendValue(t,e){t.data+=e}}var tp=i(67294),td=i(80684),tf=i(83454),tg=Object.defineProperty,ty=t=>{throw TypeError(t)},tm=(t,e,i)=>{let r;return(r="symbol"!=typeof e?e+"":e)in t?tg(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i},tS=(t,e,i)=>e.has(t)||ty("Cannot "+i),tv=(t,e,i)=>(tS(t,e,"read from private field"),i?i.call(t):e.get(t)),tw=(t,e,i)=>e.has(t)?ty("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),tb=(t,e,i,r)=>(tS(t,e,"write to private field"),r?r.call(t,i):e.set(t,i),i),t_=(t,e,i)=>(tS(t,e,"access private method"),i),tA=(t,e,i,r)=>({set _(s){tb(t,e,s,i)},get _(){return tv(t,e,r)}}),tO={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},tk={0:8203,1:8204,2:8205,3:65279};[,,,,].fill(String.fromCodePoint(tk[0])).join(""),Object.fromEntries(Object.entries(tk).map(t=>t.reverse())),Object.fromEntries(Object.entries(tO).map(t=>t.reverse()));var tE=`${Object.values(tO).map(t=>`\\u{${t.toString(16)}}`).join("")}`,tF=RegExp(`[${tE}]{4,}`,"gu");function tj(t){var e;return{cleaned:t.replace(tF,""),encoded:(null==(e=t.match(tF))?void 0:e[0])||""}}let tW="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,tT=new Set,tC="object"==typeof tf&&tf?tf:{},tz=(t,e,i,r)=>{"function"==typeof tC.emitWarning?tC.emitWarning(t,e,i,r):console.error(`[${i}] ${e}: ${t}`)},tR=globalThis.AbortController,tM=globalThis.AbortSignal;if(typeof tR>"u"){tM=class{constructor(){tm(this,"onabort"),tm(this,"_onabort",[]),tm(this,"reason"),tm(this,"aborted",!1)}addEventListener(t,e){this._onabort.push(e)}},tR=class{constructor(){tm(this,"signal",new tM),e()}abort(t){var e,i;if(!this.signal.aborted){for(let e of(this.signal.reason=t,this.signal.aborted=!0,this.signal._onabort))e(t);null==(i=(e=this.signal).onabort)||i.call(e,t)}}};let t="1"!==(null==(r=tC.env)?void 0:r.LRU_CACHE_IGNORE_AC_WARNING),e=()=>{t&&(t=!1,tz("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}let tx=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),tI=t=>tx(t)?t<=256?Uint8Array:t<=65536?Uint16Array:t<=4294967296?Uint32Array:t<=Number.MAX_SAFE_INTEGER?tP:null:null;class tP extends Array{constructor(t){super(t),this.fill(0)}}let tD=class t{constructor(e,i){if(tm(this,"heap"),tm(this,"length"),!tv(t,l))throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0}static create(e){let i=tI(e);if(!i)return[];tb(t,l,!0);let r=new t(e,i);return tb(t,l,!1),r}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}};tw(tD,l=new WeakMap,!1);let t$=class t{constructor(e){tw(this,T),tw(this,h),tw(this,o),tw(this,u),tw(this,c),tw(this,p),tm(this,"ttl"),tm(this,"ttlResolution"),tm(this,"ttlAutopurge"),tm(this,"updateAgeOnGet"),tm(this,"updateAgeOnHas"),tm(this,"allowStale"),tm(this,"noDisposeOnSet"),tm(this,"noUpdateTTL"),tm(this,"maxEntrySize"),tm(this,"sizeCalculation"),tm(this,"noDeleteOnFetchRejection"),tm(this,"noDeleteOnStaleGet"),tm(this,"allowStaleOnFetchAbort"),tm(this,"allowStaleOnFetchRejection"),tm(this,"ignoreFetchAbort"),tw(this,d),tw(this,f),tw(this,g),tw(this,y),tw(this,m),tw(this,S),tw(this,v),tw(this,w),tw(this,b),tw(this,_),tw(this,A),tw(this,O),tw(this,k),tw(this,E),tw(this,F),tw(this,j),tw(this,W),tw(this,z,()=>{}),tw(this,R,()=>{}),tw(this,M,()=>{}),tw(this,x,()=>!1),tw(this,P,t=>{}),tw(this,D,(t,e,i)=>{}),tw(this,$,(t,e,i,r)=>{if(i||r)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0}),tm(this,n,"LRUCache");let{max:i=0,ttl:r,ttlResolution:l=1,ttlAutopurge:a,updateAgeOnGet:N,updateAgeOnHas:G,allowStale:U,dispose:V,disposeAfter:L,noDisposeOnSet:K,noUpdateTTL:B,maxSize:J=0,maxEntrySize:q=0,sizeCalculation:H,fetchMethod:Q,noDeleteOnFetchRejection:X,noDeleteOnStaleGet:Y,allowStaleOnFetchRejection:Z,allowStaleOnFetchAbort:tt,ignoreFetchAbort:te}=e;if(0!==i&&!tx(i))throw TypeError("max option must be a nonnegative integer");let ti=i?tI(i):Array;if(!ti)throw Error("invalid max value: "+i);if(tb(this,h,i),tb(this,o,J),this.maxEntrySize=q||tv(this,o),this.sizeCalculation=H,this.sizeCalculation){if(!tv(this,o)&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==Q&&"function"!=typeof Q)throw TypeError("fetchMethod must be a function if specified");if(tb(this,p,Q),tb(this,j,!!Q),tb(this,g,new Map),tb(this,y,Array(i).fill(void 0)),tb(this,m,Array(i).fill(void 0)),tb(this,S,new ti(i)),tb(this,v,new ti(i)),tb(this,w,0),tb(this,b,0),tb(this,_,tD.create(i)),tb(this,d,0),tb(this,f,0),"function"==typeof V&&tb(this,u,V),"function"==typeof L?(tb(this,c,L),tb(this,A,[])):(tb(this,c,void 0),tb(this,A,void 0)),tb(this,F,!!tv(this,u)),tb(this,W,!!tv(this,c)),this.noDisposeOnSet=!!K,this.noUpdateTTL=!!B,this.noDeleteOnFetchRejection=!!X,this.allowStaleOnFetchRejection=!!Z,this.allowStaleOnFetchAbort=!!tt,this.ignoreFetchAbort=!!te,0!==this.maxEntrySize){if(0!==tv(this,o)&&!tx(tv(this,o)))throw TypeError("maxSize must be a positive integer if specified");if(!tx(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");t_(this,T,I).call(this)}if(this.allowStale=!!U,this.noDeleteOnStaleGet=!!Y,this.updateAgeOnGet=!!N,this.updateAgeOnHas=!!G,this.ttlResolution=tx(l)||
20===l?l:1,this.ttlAutopurge=!!a,this.ttl=r||0,this.ttl){if(!tx(this.ttl))throw TypeError("ttl must be a positive integer if specified");t_(this,T,C).call(this)}if(0===tv(this,h)&&0===this.ttl&&0===tv(this,o))throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!tv(this,h)&&!tv(this,o)){let e="LRU_CACHE_UNBOUNDED";tT.has(e)||(tT.add(e),tz("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,t))}}static unsafeExposeInternals(t){return{starts:tv(t,k),ttls:tv(t,E),sizes:tv(t,O),keyMap:tv(t,g),keyList:tv(t,y),valList:tv(t,m),next:tv(t,S),prev:tv(t,v),get head(){return tv(t,w)},get tail(){return tv(t,b)},free:tv(t,_),isBackgroundFetch:e=>t_(t,T,K).call(t,e),backgroundFetch:(e,i,r,l)=>t_(t,T,L).call(t,e,i,r,l),moveToTail:e=>t_(t,T,J).call(t,e),indexes:e=>t_(t,T,N).call(t,e),rindexes:e=>t_(t,T,G).call(t,e),isStale:e=>tv(t,x).call(t,e)}}get max(){return tv(this,h)}get maxSize(){return tv(this,o)}get calculatedSize(){return tv(this,f)}get size(){return tv(this,d)}get fetchMethod(){return tv(this,p)}get dispose(){return tv(this,u)}get disposeAfter(){return tv(this,c)}getRemainingTTL(t){return tv(this,g).has(t)?1/0:0}*entries(){for(let t of t_(this,T,N).call(this))void 0===tv(this,m)[t]||void 0===tv(this,y)[t]||t_(this,T,K).call(this,tv(this,m)[t])||(yield[tv(this,y)[t],tv(this,m)[t]])}*rentries(){for(let t of t_(this,T,G).call(this))void 0===tv(this,m)[t]||void 0===tv(this,y)[t]||t_(this,T,K).call(this,tv(this,m)[t])||(yield[tv(this,y)[t],tv(this,m)[t]])}*keys(){for(let t of t_(this,T,N).call(this)){let e=tv(this,y)[t];void 0===e||t_(this,T,K).call(this,tv(this,m)[t])||(yield e)}}*rkeys(){for(let t of t_(this,T,G).call(this)){let e=tv(this,y)[t];void 0===e||t_(this,T,K).call(this,tv(this,m)[t])||(yield e)}}*values(){for(let t of t_(this,T,N).call(this))void 0===tv(this,m)[t]||t_(this,T,K).call(this,tv(this,m)[t])||(yield tv(this,m)[t])}*rvalues(){for(let t of t_(this,T,G).call(this))void 0===tv(this,m)[t]||t_(this,T,K).call(this,tv(this,m)[t])||(yield tv(this,m)[t])}[(a=Symbol.iterator,n=Symbol.toStringTag,a)](){return this.entries()}find(t,e={}){for(let i of t_(this,T,N).call(this)){let r=tv(this,m)[i],l=t_(this,T,K).call(this,r)?r.__staleWhileFetching:r;if(void 0!==l&&t(l,tv(this,y)[i],this))return this.get(tv(this,y)[i],e)}}forEach(t,e=this){for(let i of t_(this,T,N).call(this)){let r=tv(this,m)[i],l=t_(this,T,K).call(this,r)?r.__staleWhileFetching:r;void 0!==l&&t.call(e,l,tv(this,y)[i],this)}}rforEach(t,e=this){for(let i of t_(this,T,G).call(this)){let r=tv(this,m)[i],l=t_(this,T,K).call(this,r)?r.__staleWhileFetching:r;void 0!==l&&t.call(e,l,tv(this,y)[i],this)}}purgeStale(){let t=!1;for(let e of t_(this,T,G).call(this,{allowStale:!0}))tv(this,x).call(this,e)&&(this.delete(tv(this,y)[e]),t=!0);return t}info(t){let e=tv(this,g).get(t);if(void 0===e)return;let i=tv(this,m)[e],r=t_(this,T,K).call(this,i)?i.__staleWhileFetching:i;if(void 0===r)return;let l={value:r};if(tv(this,E)&&tv(this,k)){let t=tv(this,E)[e],i=tv(this,k)[e];if(t&&i){let e=t-(tW.now()-i);l.ttl=e,l.start=Date.now()}}return tv(this,O)&&(l.size=tv(this,O)[e]),l}dump(){let t=[];for(let e of t_(this,T,N).call(this,{allowStale:!0})){let i=tv(this,y)[e],r=tv(this,m)[e],l=t_(this,T,K).call(this,r)?r.__staleWhileFetching:r;if(void 0===l||void 0===i)continue;let n={value:l};if(tv(this,E)&&tv(this,k)){n.ttl=tv(this,E)[e];let t=tW.now()-tv(this,k)[e];n.start=Math.floor(Date.now()-t)}tv(this,O)&&(n.size=tv(this,O)[e]),t.unshift([i,n])}return t}load(t){for(let[e,i]of(this.clear(),t)){if(i.start){let t=Date.now()-i.start;i.start=tW.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){var r,l,n,a,o;if(void 0===e)return this.delete(t),this;let{ttl:p=this.ttl,start:f,noDisposeOnSet:w=this.noDisposeOnSet,sizeCalculation:O=this.sizeCalculation,status:k}=i,{noUpdateTTL:z=this.noUpdateTTL}=i,x=tv(this,$).call(this,t,e,i.size||0,O);if(this.maxEntrySize&&x>this.maxEntrySize)return k&&(k.set="miss",k.maxEntrySizeExceeded=!0),this.delete(t),this;let I=0===tv(this,d)?void 0:tv(this,g).get(t);if(void 0===I)I=0===tv(this,d)?tv(this,b):0!==tv(this,_).length?tv(this,_).pop():tv(this,d)===tv(this,h)?t_(this,T,V).call(this,!1):tv(this,d),tv(this,y)[I]=t,tv(this,m)[I]=e,tv(this,g).set(t,I),tv(this,S)[tv(this,b)]=I,tv(this,v)[I]=tv(this,b),tb(this,b,I),tA(this,d)._++,tv(this,D).call(this,I,x,k),k&&(k.set="add"),z=!1;else{t_(this,T,J).call(this,I);let i=tv(this,m)[I];if(e!==i){if(tv(this,j)&&t_(this,T,K).call(this,i)){i.__abortController.abort(Error("replaced"));let{__staleWhileFetching:e}=i;void 0!==e&&!w&&(tv(this,F)&&(null==(r=tv(this,u))||r.call(this,e,t,"set")),tv(this,W)&&(null==(l=tv(this,A))||l.push([e,t,"set"])))}else w||(tv(this,F)&&(null==(n=tv(this,u))||n.call(this,i,t,"set")),tv(this,W)&&(null==(a=tv(this,A))||a.push([i,t,"set"])));if(tv(this,P).call(this,I),tv(this,D).call(this,I,x,k),tv(this,m)[I]=e,k){k.set="replace";let t=i&&t_(this,T,K).call(this,i)?i.__staleWhileFetching:i;void 0!==t&&(k.oldValue=t)}}else k&&(k.set="update")}if(0===p||tv(this,E)||t_(this,T,C).call(this),tv(this,E)&&(z||tv(this,M).call(this,I,p,f),k&&tv(this,R).call(this,k,I)),!w&&tv(this,W)&&tv(this,A)){let t;let e=tv(this,A);for(;t=null==e?void 0:e.shift();)null==(o=tv(this,c))||o.call(this,...t)}return this}pop(){var t;try{for(;tv(this,d);){let t=tv(this,m)[tv(this,w)];if(t_(this,T,V).call(this,!0),t_(this,T,K).call(this,t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(tv(this,W)&&tv(this,A)){let e;let i=tv(this,A);for(;e=null==i?void 0:i.shift();)null==(t=tv(this,c))||t.call(this,...e)}}}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=e,l=tv(this,g).get(t);if(void 0!==l){let t=tv(this,m)[l];if(t_(this,T,K).call(this,t)&&void 0===t.__staleWhileFetching)return!1;if(!tv(this,x).call(this,l))return i&&tv(this,z).call(this,l),r&&(r.has="hit",tv(this,R).call(this,r,l)),!0;r&&(r.has="stale",tv(this,R).call(this,r,l))}else r&&(r.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,r=tv(this,g).get(t);if(void 0===r||!i&&tv(this,x).call(this,r))return;let l=tv(this,m)[r];return t_(this,T,K).call(this,l)?l.__staleWhileFetching:l}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:h=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:y,forceRefresh:S=!1,status:v,signal:w}=e;if(!tv(this,j))return v&&(v.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:l,status:v});let b={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:l,ttl:n,noDisposeOnSet:a,size:h,sizeCalculation:o,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:f,ignoreFetchAbort:d,status:v,signal:w},_=tv(this,g).get(t);if(void 0===_){v&&(v.fetch="miss");let e=t_(this,T,L).call(this,t,_,b,y);return e.__returned=e}{let e=tv(this,m)[_];if(t_(this,T,K).call(this,e)){let t=i&&void 0!==e.__staleWhileFetching;return v&&(v.fetch="inflight",t&&(v.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}let l=tv(this,x).call(this,_);if(!S&&!l)return v&&(v.fetch="hit"),t_(this,T,J).call(this,_),r&&tv(this,z).call(this,_),v&&tv(this,R).call(this,v,_),e;let n=t_(this,T,L).call(this,t,_,b,y),a=void 0!==n.__staleWhileFetching&&i;return v&&(v.fetch=l?"stale":"refresh",a&&l&&(v.returnedStale=!0)),a?n.__staleWhileFetching:n.__returned=n}}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:n}=e,a=tv(this,g).get(t);if(void 0!==a){let e=tv(this,m)[a],h=t_(this,T,K).call(this,e);return n&&tv(this,R).call(this,n,a),tv(this,x).call(this,a)?(n&&(n.get="stale"),h?(n&&i&&void 0!==e.__staleWhileFetching&&(n.returnedStale=!0),i?e.__staleWhileFetching:void 0):(l||this.delete(t),n&&i&&(n.returnedStale=!0),i?e:void 0)):(n&&(n.get="hit"),h?e.__staleWhileFetching:(t_(this,T,J).call(this,a),r&&tv(this,z).call(this,a),e))}n&&(n.get="miss")}
2delete(t){var e,i,r,l;let n=!1;if(0!==tv(this,d)){let r=tv(this,g).get(t);if(void 0!==r){if(n=!0,1===tv(this,d))this.clear();else{tv(this,P).call(this,r);let l=tv(this,m)[r];if(t_(this,T,K).call(this,l)?l.__abortController.abort(Error("deleted")):(tv(this,F)||tv(this,W))&&(tv(this,F)&&(null==(e=tv(this,u))||e.call(this,l,t,"delete")),tv(this,W)&&(null==(i=tv(this,A))||i.push([l,t,"delete"]))),tv(this,g).delete(t),tv(this,y)[r]=void 0,tv(this,m)[r]=void 0,r===tv(this,b))tb(this,b,tv(this,v)[r]);else if(r===tv(this,w))tb(this,w,tv(this,S)[r]);else{let t=tv(this,v)[r];tv(this,S)[t]=tv(this,S)[r];let e=tv(this,S)[r];tv(this,v)[e]=tv(this,v)[r]}tA(this,d)._--,tv(this,_).push(r)}}}if(tv(this,W)&&null!=(r=tv(this,A))&&r.length){let t;let e=tv(this,A);for(;t=null==e?void 0:e.shift();)null==(l=tv(this,c))||l.call(this,...t)}return n}clear(){var t,e,i;for(let i of t_(this,T,G).call(this,{allowStale:!0})){let r=tv(this,m)[i];if(t_(this,T,K).call(this,r))r.__abortController.abort(Error("deleted"));else{let l=tv(this,y)[i];tv(this,F)&&(null==(t=tv(this,u))||t.call(this,r,l,"delete")),tv(this,W)&&(null==(e=tv(this,A))||e.push([r,l,"delete"]))}}if(tv(this,g).clear(),tv(this,m).fill(void 0),tv(this,y).fill(void 0),tv(this,E)&&tv(this,k)&&(tv(this,E).fill(0),tv(this,k).fill(0)),tv(this,O)&&tv(this,O).fill(0),tb(this,w,0),tb(this,b,0),tv(this,_).length=0,tb(this,f,0),tb(this,d,0),tv(this,W)&&tv(this,A)){let t;let e=tv(this,A);for(;t=null==e?void 0:e.shift();)null==(i=tv(this,c))||i.call(this,...t)}}};h=new WeakMap,o=new WeakMap,u=new WeakMap,c=new WeakMap,p=new WeakMap,d=new WeakMap,f=new WeakMap,g=new WeakMap,y=new WeakMap,m=new WeakMap,S=new WeakMap,v=new WeakMap,w=new WeakMap,b=new WeakMap,_=new WeakMap,A=new WeakMap,O=new WeakMap,k=new WeakMap,E=new WeakMap,F=new WeakMap,j=new WeakMap,W=new WeakMap,T=new WeakSet,C=function(){let t=new tP(tv(this,h)),e=new tP(tv(this,h));tb(this,E,t),tb(this,k,e),tb(this,M,(i,r,l=tW.now())=>{if(e[i]=0!==r?l:0,t[i]=r,0!==r&&this.ttlAutopurge){let t=setTimeout(()=>{tv(this,x).call(this,i)&&this.delete(tv(this,y)[i])},r+1);t.unref&&t.unref()}}),tb(this,z,i=>{e[i]=0!==t[i]?tW.now():0}),tb(this,R,(l,n)=>{if(t[n]){let a=t[n],h=e[n];if(!a||!h)return;l.ttl=a,l.start=h,l.now=i||r();let o=l.now-h;l.remainingTTL=a-o}});let i=0,r=()=>{let t=tW.now();if(this.ttlResolution>0){i=t;let e=setTimeout(()=>i=0,this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=l=>{let n=tv(this,g).get(l);if(void 0===n)return 0;let a=t[n],h=e[n];return a&&h?a-((i||r())-h):1/0},tb(this,x,l=>{let n=e[l],a=t[l];return!!a&&!!n&&(i||r())-n>a})},z=new WeakMap,R=new WeakMap,M=new WeakMap,x=new WeakMap,I=function(){let t=new tP(tv(this,h));tb(this,f,0),tb(this,O,t),tb(this,P,e=>{tb(this,f,tv(this,f)-t[e]),t[e]=0}),tb(this,$,(t,e,i,r)=>{if(t_(this,T,K).call(this,e))return 0;if(!tx(i)){if(!r)throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof r)throw TypeError("sizeCalculation must be a function");if(!tx(i=r(e,t)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}return i}),tb(this,D,(e,i,r)=>{if(t[e]=i,tv(this,o)){let i=tv(this,o)-t[e];for(;tv(this,f)>i;)t_(this,T,V).call(this,!0)}tb(this,f,tv(this,f)+t[e]),r&&(r.entrySize=i,r.totalCalculatedSize=tv(this,f))})},P=new WeakMap,D=new WeakMap,$=new WeakMap,N=function*({allowStale:t=this.allowStale}={}){if(tv(this,d))for(let e=tv(this,b);t_(this,T,U).call(this,e)&&((t||!tv(this,x).call(this,e))&&(yield e),e!==tv(this,w));)e=tv(this,v)[e]},G=function*({allowStale:t=this.allowStale}={}){if(tv(this,d))for(let e=tv(this,w);t_(this,T,U).call(this,e)&&((t||!tv(this,x).call(this,e))&&(yield e),e!==tv(this,b));)e=tv(this,S)[e]},U=function(t){return void 0!==t&&tv(this,g).get(tv(this,y)[t])===t},V=function(t){var e,i;let r=tv(this,w),l=tv(this,y)[r],n=tv(this,m)[r];return tv(this,j)&&t_(this,T,K).call(this,n)?n.__abortController.abort(Error("evicted")):(tv(this,F)||tv(this,W))&&(tv(this,F)&&(null==(e=tv(this,u))||e.call(this,n,l,"evict")),tv(this,W)&&(null==(i=tv(this,A))||i.push([n,l,"evict"]))),tv(this,P).call(this,r),t&&(tv(this,y)[r]=void 0,tv(this,m)[r]=void 0,tv(this,_).push(r)),1===tv(this,d)?(tb(this,w,tb(this,b,0)),tv(this,_).length=0):tb(this,w,tv(this,S)[r]),tv(this,g).delete(l),tA(this,d)._--,r}
2,L=function(t,e,i,r){let l=void 0===e?void 0:tv(this,m)[e];if(t_(this,T,K).call(this,l))return l;let n=new tR,{signal:a}=i;null==a||a.addEventListener("abort",()=>n.abort(a.reason),{signal:n.signal});let h={signal:n.signal,options:i,context:r},o=(r,l=!1)=>{let{aborted:a}=n.signal,o=i.ignoreFetchAbort&&void 0!==r;return(i.status&&(a&&!l?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,o&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),!a||o||l)?(tv(this,m)[e]===c&&(void 0===r?c.__staleWhileFetching?tv(this,m)[e]=c.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,r,h.options))),r):u(n.signal.reason)},u=r=>{let{aborted:l}=n.signal,a=l&&i.allowStaleOnFetchAbort,h=a||i.allowStaleOnFetchRejection,o=h||i.noDeleteOnFetchRejection;if(tv(this,m)[e]===c&&(o&&void 0!==c.__staleWhileFetching?a||(tv(this,m)[e]=c.__staleWhileFetching):this.delete(t)),h)return i.status&&void 0!==c.__staleWhileFetching&&(i.status.returnedStale=!0),c.__staleWhileFetching;if(c.__returned===c)throw r};i.status&&(i.status.fetchDispatched=!0);let c=new Promise((e,r)=>{var a;let u=null==(a=tv(this,p))?void 0:a.call(this,t,l,h);u&&u instanceof Promise&&u.then(t=>e(void 0===t?void 0:t),r),n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>o(t,!0)))})}).then(o,t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),u(t))),d=Object.assign(c,{__abortController:n,__staleWhileFetching:l,__returned:void 0});return void 0===e?(this.set(t,d,{...h.options,status:void 0}),e=tv(this,g).get(t)):tv(this,m)[e]=d,d},K=function(t){return!!tv(this,j)&&!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof tR},B=function(t,e){tv(this,v)[e]=t,tv(this,S)[t]=e},J=function(t){t!==tv(this,b)&&(t===tv(this,w)?tb(this,w,tv(this,S)[t]):t_(this,T,B).call(this,tv(this,v)[t],tv(this,S)[t]),t_(this,T,B).call(this,tv(this,b),t),tb(this,b,t))};let tN=new t$({max:500}),tG=(0,tp.memo)(function(t){let{children:e,refreshInterval:i=1e4,token:r}=t;if(!t.client)throw Error("Missing a `client` prop with a configured Sanity client instance");let[l]=(0,tp.useState)(()=>{let{requestTagPrefix:e,resultSourceMap:i}=t.client.config();return t.client.withConfig({requestTagPrefix:e||"sanity.preview-kit",resultSourceMap:"withKeyArraySelector"!==i||"withKeyArraySelector",...r&&{token:r,useCdn:!1,perspective:"previewDrafts",ignoreBrowserTokenWarning:!0}})}),[n]=(0,tp.useState)(()=>t.logger);(0,tp.useEffect)(()=>{n&&n.log(`[@sanity/preview-kit]: With the current configuration you can expect that: Updates that can be traced using Content Source Maps will be applied in real-time. Other updates will be applied every ${i}ms.`)},[n,i]);let[a,h]=(0,tp.useState)([]),[o]=(0,tp.useState)(()=>new Map),u=function(t){let[e]=(0,tp.useState)(()=>new Map),i=(0,tp.useCallback)((i,r,l,n)=>{e.has(i)||(e.set(i,{query:r,params:l,listeners:new Set}),(0,tp.startTransition)(()=>t(t=>t.includes(i)?t:[...t,i])));let a=e.get(i);if(!a||!a.listeners)throw TypeError("Inconsistent cache for key: "+i);let{listeners:h}=a;return h.add(n),()=>{h.delete(n),0===h.size&&(e.delete(i),(0,tp.startTransition)(()=>t(t=>t.includes(i)?t.filter(t=>t!==i):t)))}},[e,t]);return(0,tp.useMemo)(()=>({cache:e,subscribe:i}),[e,i])}(h),[c]=(0,tp.useState)(()=>function(t,e,i){let r=tq(e,i);return o.has(r)||o.set(r,{result:t,resultSourceMap:{}}),{subscribe:t=>{let l=u.subscribe(r,e,i,t);return()=>l()},getSnapshot:()=>{var t;return null==(t=o.get(r))?void 0:t.result}}}),[p,d]=(0,tp.useState)([]),[f]=(0,tp.useState)(()=>new Map),g=(0,tp.useCallback)(t=>{var e;let i=new Set;if(f.clear(),null!=(e=t.documents)&&e.length)for(let e of t.documents)i.add(e._id),f.set(e._id,e);(0,tp.startTransition)(()=>d(t=>{let e=Array.from(new Set([...t,...i]));return JSON.stringify(e.sort())===JSON.stringify(t.sort())?t:e}))},[f]);return(0,q.jsxs)(td.d.Provider,{value:c,children:[e,(0,q.jsx)(tL,{cache:u.cache,client:l,setTurboIds:d,snapshots:o,turboIds:p,docsInUse:f}),a.map(t=>{if(!u.cache.has(t))return null;let{query:e,params:r,listeners:n}=u.cache.get(t);return(0,q.jsx)(tU,{client:l,listeners:n,params:r,query:e,refreshInterval:i,snapshots:o,turboIdsFromSourceMap:g},t)})]})});tG.displayName="LiveStoreProvider";let tU=(0,tp.memo)(function(t){let{client:e,refreshInterval:i,query:r,params:l,listeners:n,snapshots:a,turboIdsFromSourceMap:h}=t,{projectId:o,dataset:u}=(0,tp.useMemo)(()=>{let{projectId:t,dataset:i}=e.config();return{projectId:t,dataset:i}},[e]),[c,p]=(0,tp.useState)(null);if(c)throw c;let[d,f]=(0,ta.o_)({refreshInterval:i}),g="refresh"===d||"inflight"===d;return(0,tp.useEffect)(()=>
2{if(!g)return;let t=!1,i=new AbortController,c=f();return(async function(){let{signal:c}=i,{result:p,resultSourceMap:d}=await e.fetch(r,l,{signal:c,filterResponse:!1});if(!c.aborted){for(let t of(a.set(tq(r,l),{result:tJ(o,u,p,d),resultSourceMap:null!=d?d:{}}),d&&h(d),n.values()))t();t=!0}})().catch(t=>{"AbortError"!==t.name&&p(t)}).finally(c),()=>{t||i.abort()}},[e,u,n,l,o,r,g,a,f,h]),null});function tV(t,e,i){return`${t}-${e}-${i}`}tU.displayName="QuerySubscription";let tL=(0,tp.memo)(function(t){let{client:e,snapshots:i,cache:r,turboIds:l,setTurboIds:n,docsInUse:a}=t,{projectId:h,dataset:o}=(0,tp.useMemo)(()=>{let{projectId:t,dataset:i}=e.config();return{projectId:t,dataset:i}},[e]);(0,tp.useEffect)(()=>{var t,e;let h=new Set;for(let{query:l,params:n}of(a.clear(),r.values())){let r=tq(l,n),o=i.get(r);if(o&&null!=(e=null==(t=o.resultSourceMap)?void 0:t.documents)&&e.length)for(let t of o.resultSourceMap.documents)h.add(t._id),a.set(t._id,t)}let o=[...h].sort();JSON.stringify(l)!==JSON.stringify(o)&&(0,tp.startTransition)(()=>n(o))},[r,n,i,l,a]),(0,ta.T)(a,h,o);let[u,c]=(0,tp.useState)([]);(0,tp.useEffect)(()=>{let t=new Set(u.flat()),e=new Set;for(let i of l)t.has(i)||tN.has(tV(h,o,i))||e.add(i);let i=[...e].slice(0,100);0!==i.length&&(0,tp.startTransition)(()=>c(t=>[...t.slice(-100),i]))},[u,o,h,l]);let[p,d]=(0,tp.useState)();return(0,tp.useEffect)(()=>{let t=e.listen("*",{},{events:["mutation"],effectFormat:"mendoza",includePreviousRevision:!1,includeResult:!1,tag:"turbo"}).subscribe(t=>{var e,i,r;if("mutation"!==t.type||null==(i=null==(e=t.effects)?void 0:e.apply)||!i.length)return;let l=tV(h,o,t.documentId),n=tN.peek(l);if(n){let e={...n};delete e._rev;let i=(r=t.effects.apply,new to(new tc,e,r).process());tN.set(l,i)}(0,tp.startTransition)(()=>d(t.documentId))});return()=>t.unsubscribe()},[e,o,h]),(0,tp.useEffect)(()=>{var t,e,n;if(!p||!l.includes(p))return;let a=[];for(let[r,l]of i.entries())null!=(e=null==(t=l.resultSourceMap)?void 0:t.documents)&&e.length&&(l.result=tJ(h,o,l.result,l.resultSourceMap),a.push(r));for(let t of a){let e=null==(n=r.get(t))?void 0:n.listeners;if(e)for(let t of e)t()}(0,tp.startTransition)(()=>d(void 0))},[r,o,p,h,i,l]),(0,q.jsx)(q.Fragment,{children:u.map(t=>(0,q.jsx)(tK,{client:e,projectId:h,dataset:o,ids:t},JSON.stringify(t)))})});tL.displayName="Turbo";let tK=(0,tp.memo)(function(t){let{client:e,projectId:i,dataset:r,ids:l}=t;return(0,tp.useEffect)(()=>{let t=l.filter(t=>!tN.has(tV(i,r,t)));0!==t.length&&e.getDocuments(t).then(t=>{for(let e of t)e&&null!=e&&e._id&&tN.set(tV(i,r,e._id),e)},console.error)},[e,r,l,i]),null});tK.displayName="GetDocuments";let tB=!1;function tJ(t,e,i,r){return r?function(t,e,i,r=tn,l="raw"){if(!e)return t;if("published"!==l&&"raw"!==l&&"previewDrafts"!==l)throw Error(`Unknown perspective "${l}"`);return function t(e,i,r=[]){return null!==e&&Array.isArray(e)?e.map((e,l)=>{if(tl(e)){let n=e._key;if("string"==typeof n)return t(e,i,r.concat({_key:n,_index:l}))}return t(e,i,r.concat(l))}):tl(e)?Object.fromEntries(Object.entries(e).map(([e,l])=>[e,t(l,i,r.concat(e))])):i(e,r)}(JSON.parse(JSON.stringify(t)),(t,n)=>{let a=function(t,e){var i;if(!(null!=e&&e.mappings))return;let r=(i=t.map(t=>{if("string"==typeof t||"number"==typeof t)return t;if(-1!==t._index)return t._index;throw Error(`invalid segment:${JSON.stringify(t)}`)}),`$${i.map(t=>"string"==typeof t?`['${t.replace(/[\f\n\r\t'\\]/g,t=>ts[t])}']`:"number"==typeof t?`[${t}]`:""!==t._key?`[?(@._key=='${t._key.replace(/['\\]/g,t=>ts[t])}')]`:`[${t._index}]`).join("")}`);if(void 0!==e.mappings[r])return{mapping:e.mappings[r],matchedPath:r,pathSuffix:""};let l=Object.entries(e.mappings).filter(([t])=>r.startsWith(t)).sort(([t],[e])=>e.length-t.length);if(0==l.length)return;let[n,a]=l[0],h=r.substring(n.length);return{mapping:a,matchedPath:n,pathSuffix:h}}(n,e);if(!a)return t;let{mapping:h,pathSuffix:o}=a;if("value"!==h.type||"documentValue"!==h.source.type)return t;let u=e.documents[h.source.document],c=e.paths[h.source.path];if(u){let e;let n=function(t){let e;let i=[],r=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g;for(;null!==(e=r.exec(t));){if(void 0!==e[1]){let t=e[1].replace(/\\(\\|f|n|r|t|')/g,t=>tr[t]);i.push(t);continue}if(void 0!==e[2]){i.push(parseInt(e[2],10));continue}if(void 0!==e[3]){let t=e[3].replace(/\\(\\')/g,t=>tr[t]);i.push({_key:t,_index:-1});continue}}return i}(c+o),a=function(t){if(!Array.isArray(t))throw Error("Path is not an array");return t.reduce((t,e,i)=>{let r=typeof e;if("number"===r)return`${t}[${e}]`;if("string"===r)return`${t}${0===i?"":"."}${e}`;if(Z(e)&&e._key)return`${t}[_key=="${e._key}"]`;if(Array.isArray(e)){let[i,r]=e;return`${t}[${i}:${r}]`}throw Error(`Unsupported path segment \`${JSON.stringify(e)}\``)},"")}(n);if("_id"===a||("previewDrafts"===l?((e=i(u._id.startsWith(te)?u:{...u,_id:`${te}${u._id}}`}))||(e=i(u._id.startsWith(te)?{...u,_id:ti(u._id)}:u)),e&&(e={...e,_id:ti(u._id),_originalId:u._id})):e=i(u),!e))return t;
2let h=e?function(t,e,i){let r="string"==typeof e?function(t){if("string"!=typeof t)throw Error("Path is not a string");let e=t.match(H);if(!e)throw Error("Invalid path string");return e.map(tt)}(e):e;if(!Array.isArray(r))throw Error("Path must be an array or a string");let l=t;for(let t=0;t<r.length;t++){let e=r[t];if(Y(e)){if(!Array.isArray(l))return i;l=l[e]}if(Z(e)){if(!Array.isArray(l))return i;l=l.find(t=>t._key===e._key)}if("string"==typeof e&&(l="object"==typeof l&&null!==l?l[e]:void 0),typeof l>"u")return i}return l}(e,a,t):t;return t===h?t:r(h,{cachedDocument:e,previousValue:t,sourceDocument:u,sourcePath:n})}return t})}(i,r,i=>{if(!i._projectId)return tN.get(tV(t,e,i._id));tB||(console.warn("Cross dataset references are not supported yet, ignoring source document",i),tB=!0)},(t,{previousValue:e})=>{if("string"==typeof t&&"string"==typeof e){let{encoded:i}=tj(e),{cleaned:r}=tj(t);return`${i}${r}`}return t},"previewDrafts"):i}function tq(t,e){return`${t}-${JSON.stringify(e)}`}}}]);
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.