PageSourceSearch

https://captainstarlight.org.au/_next/static/chunks/646.2fbc177395a828a2.js

js captainstarlight.org.au collected 2026-10-09 22:42:30 UTC 34,384 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[646],{3646:function(t,e,i){let s;i.r(e),i.d(e,{default:function(){return V}});var r=i(2676),n=i(6886);function o(t){return"https://www.sanity.io/help/"+t}let a=t=>{var e;let i,s;return e=(...e)=>console.warn(t.join(" "),...e),i=!1,(...t)=>(i||(s=e(...t),i=!0),s)};a(["Because you set `withCredentials` to true, we will override your `useCdn`","setting to be false since (cookie-based) credentials are never set on the CDN"]),a(["Since you haven't set a value for `useCdn`, we will deliver content using our","global, edge-cached API-CDN. If you wish to have content delivered faster, set","`useCdn: false` to use the Live API. Note: You may incur higher costs using the live API."]),a(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),a(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),a(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${o("js-client-browser-token")} for more information and how to hide this warning.`]),a(["You have configured Sanity client to use a token, but also provided `withCredentials: true`.","This is no longer supported - only token will be used - remove `withCredentials: true`."]),a(["Using the Sanity client without specifying an API version is deprecated.",`See ${o("js-client-api-version")}`]),a(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),a(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."]);var l=i(5271);let h=new Uint8Array(16),u=[];for(let t=0;t<256;++t)u.push((t+256).toString(16).slice(1));var c={randomUUID:"u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let d=["channel/disconnect","channel/response","channel/heartbeat"],p=["handshake/syn","handshake/syn-ack","handshake/ack"],f=t=>d.some(e=>e===t),g=t=>p.some(e=>e===t),y=({data:t={}})=>"object"==typeof t&&null!==t&&!Array.isArray(t)&&!("domain"in t)&&["id","type","from","to"].every(e=>e in t)&&t.type.startsWith("handshake/");function v(t){return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)}var m={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},S={0:8203,1:8204,2:8205,3:65279};[,,,,].fill(String.fromCodePoint(S[0])).join(""),Object.fromEntries(Object.entries(S).map(t=>t.reverse())),Object.fromEntries(Object.entries(m).map(t=>t.reverse()));var w=`${Object.values(m).map(t=>`\\u{${t.toString(16)}}`).join("")}`,b=RegExp(`[${w}]{4,}`,"gu");function k(t){var e;return{cleaned:t.replace(b,""),encoded:(null==(e=t.match(b))?void 0:e[0])||""}}var A=i(4224);let _="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,E=new Set,F="object"==typeof A&&A?A:{},L=(t,e,i,s)=>{"function"==typeof F.emitWarning?F.emitWarning(t,e,i,s):console.error(`[${i}] ${e}: ${t}`)},z=globalThis.AbortController,T=globalThis.AbortSignal;if(void 0===z){T=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},z=class{constructor(){e()}signal=new T;abort(t){if(!this.signal.aborted){for(let e of(this.signal.reason=t,this.signal.aborted=!0,this.signal._onabort))e(t);this.signal.onabort?.(t)}}};let t=F.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,L("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 x=t=>!E.has(t);Symbol("type");let I=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),O=t=>I(t)?t<=256?Uint8Array:t<=65536?Uint16Array:t<=4294967296?Uint32Array:t<=Number.MAX_SAFE_INTEGER?j:null:null;class j extends Array{constructor(t){super(t),this.fill(0)}}class C{heap;length;static #t=!1;static create(t){let e=O(t);if(!e)return[];C.#t=!0;let i=new C(t,e);return C.#t=!1,i}constructor(t,e){if(!C.#t)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class D{#e;#i;#s;#r;#n;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#a;#l;#h;#u;#c;#d;#p;#f;#g;#y;#v;#m;#S;#w;#b;#k;static unsafeExposeInternals(t){return{starts:t.#m,ttls:t.#S,sizes:t.#v,keyM
1ap:t.#l,keyList:t.#h,valList:t.#u,next:t.#c,prev:t.#d,get head(){return t.#p},get tail(){return t.#f},free:t.#g,isBackgroundFetch:e=>t.#A(e),backgroundFetch:(e,i,s,r)=>t.#_(e,i,s,r),moveToTail:e=>t.#E(e),indexes:e=>t.#F(e),rindexes:e=>t.#L(e),isStale:e=>t.#z(e)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#a}get size(){return this.#o}get fetchMethod(){return this.#n}get dispose(){return this.#s}get disposeAfter(){return this.#r}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:r,updateAgeOnGet:n,updateAgeOnHas:o,allowStale:a,dispose:l,disposeAfter:h,noDisposeOnSet:u,noUpdateTTL:c,maxSize:d=0,maxEntrySize:p=0,sizeCalculation:f,fetchMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:m,allowStaleOnFetchAbort:S,ignoreFetchAbort:w}=t;if(0!==e&&!I(e))throw TypeError("max option must be a nonnegative integer");let b=e?O(e):Array;if(!b)throw Error("invalid max value: "+e);if(this.#e=e,this.#i=d,this.maxEntrySize=p||this.#i,this.sizeCalculation=f,this.sizeCalculation){if(!this.#i&&!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!==g&&"function"!=typeof g)throw TypeError("fetchMethod must be a function if specified");if(this.#n=g,this.#b=!!g,this.#l=new Map,this.#h=Array(e).fill(void 0),this.#u=Array(e).fill(void 0),this.#c=new b(e),this.#d=new b(e),this.#p=0,this.#f=0,this.#g=C.create(e),this.#o=0,this.#a=0,"function"==typeof l&&(this.#s=l),"function"==typeof h?(this.#r=h,this.#y=[]):(this.#r=void 0,this.#y=void 0),this.#w=!!this.#s,this.#k=!!this.#r,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!m,this.allowStaleOnFetchAbort=!!S,this.ignoreFetchAbort=!!w,0!==this.maxEntrySize){if(0!==this.#i&&!I(this.#i))throw TypeError("maxSize must be a positive integer if specified");if(!I(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#T()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!n,this.updateAgeOnHas=!!o,this.ttlResolution=I(s)||0===s?s:1,this.ttlAutopurge=!!r,this.ttl=i||0,this.ttl){if(!I(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#x()}if(0===this.#e&&0===this.ttl&&0===this.#i)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){let t="LRU_CACHE_UNBOUNDED";x(t)&&(E.add(t),L("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,D))}}getRemainingTTL(t){return this.#l.has(t)?1/0:0}#x(){let t=new j(this.#e),e=new j(this.#e);this.#S=t,this.#m=e,this.#I=(i,s,r=_.now())=>{if(e[i]=0!==s?r:0,t[i]=s,0!==s&&this.ttlAutopurge){let t=setTimeout(()=>{this.#z(i)&&this.delete(this.#h[i])},s+1);t.unref&&t.unref()}},this.#O=i=>{e[i]=0!==t[i]?_.now():0},this.#j=(r,n)=>{if(t[n]){let o=t[n],a=e[n];if(!o||!a)return;r.ttl=o,r.start=a,r.now=i||s();let l=r.now-a;r.remainingTTL=o-l}};let i=0,s=()=>{let t=_.now();if(this.ttlResolution>0){i=t;let e=setTimeout(()=>i=0,this.ttlResolution);e.unref&&e.unref()}return t};this.getRemainingTTL=r=>{let n=this.#l.get(r);if(void 0===n)return 0;let o=t[n],a=e[n];return o&&a?o-((i||s())-a):1/0},this.#z=r=>{let n=e[r],o=t[r];return!!o&&!!n&&(i||s())-n>o}}#O=()=>{};#j=()=>{};#I=()=>{};#z=()=>!1;#T(){let t=new j(this.#e);this.#a=0,this.#v=t,this.#C=e=>{this.#a-=t[e],t[e]=0},this.#D=(t,e,i,s)=>{if(this.#A(e))return 0;if(!I(i)){if(s){if("function"!=typeof s)throw TypeError("sizeCalculation must be a function");if(!I(i=s(e,t)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#M=(e,i,s)=>{if(t[e]=i,this.#i){let i=this.#i-t[e];for(;this.#a>i;)this.#P(!0)}this.#a+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#a)}}#C=t=>{};#M=(t,e,i)=>{};#D=(t,e,i,s)=>{if(i||s)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#F({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#f;this.#R(e)&&((t||!this.#z(e))&&(yield e),e!==this.#p);)e=this.#d[e]}*#L({allowStale:t=this.allowStale}={}){if(this.#o)for(let e=this.#p;this.#R(e)&&((t||!this.#z(e))&&(yield e),e!==this.#f);)e=this.#c[e]}#R(t){return void 0!==t&&this.#l.get(this.#h[t])===t}*entries(){for(let t of this.#F())void 0===this.#u[t]||void 0===this.#h[t]||this.#A(this.#u[t])||(yield[this.#h[t],this.#u[t]])}*rentries(){for(let t of this.#L())void 0===this.#u[t]||void 0===this.#h[t]||this.#A(this.#u[t])||(yield[this.#h[t],this.#u[t]])}*keys(){for(let t of this.#F()){let e=this.#h[t];void 0===e||this.#A(this.#u[t])||(yield e)}}*rkeys(){for(let t of this.#L()){let e=this.#h[t];void 0===e||this.#A(this.#u[t])||(yield e)}}*values(){for(let t of this.#F())void 0===this.#u[t]||this.#A(this.#u[t])||(yield this.#u[t])}*rvalues(){for(let t of this.#L())void 0===this.#u[t]||this.#A(this.#u[t])||(yield this.#u[t])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(let i of this.#F()){let s=this.#u[i],r=this.#A(s)?s.__staleWhileFetching:s;if(void 0!==r&&t(r,this.#h[i],this))return this.get(this.#h[i],e)}}forEach(t,e=this){for(let i of this.#F()){let s=this.#u[i],r=this.#A(s)?s.__staleWhileFetching:s;void 0!==r&&t.call(e,r,this.#h[i],this)}}
1rforEach(t,e=this){for(let i of this.#L()){let s=this.#u[i],r=this.#A(s)?s.__staleWhileFetching:s;void 0!==r&&t.call(e,r,this.#h[i],this)}}purgeStale(){let t=!1;for(let e of this.#L({allowStale:!0}))this.#z(e)&&(this.delete(this.#h[e]),t=!0);return t}info(t){let e=this.#l.get(t);if(void 0===e)return;let i=this.#u[e],s=this.#A(i)?i.__staleWhileFetching:i;if(void 0===s)return;let r={value:s};if(this.#S&&this.#m){let t=this.#S[e],i=this.#m[e];if(t&&i){let e=t-(_.now()-i);r.ttl=e,r.start=Date.now()}}return this.#v&&(r.size=this.#v[e]),r}dump(){let t=[];for(let e of this.#F({allowStale:!0})){let i=this.#h[e],s=this.#u[e],r=this.#A(s)?s.__staleWhileFetching:s;if(void 0===r||void 0===i)continue;let n={value:r};if(this.#S&&this.#m){n.ttl=this.#S[e];let t=_.now()-this.#m[e];n.start=Math.floor(Date.now()-t)}this.#v&&(n.size=this.#v[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=_.now()-t}this.set(e,i.value,i)}}set(t,e,i={}){if(void 0===e)return this.delete(t),this;let{ttl:s=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=i,{noUpdateTTL:l=this.noUpdateTTL}=i,h=this.#D(t,e,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(t),this;let u=0===this.#o?void 0:this.#l.get(t);if(void 0===u)u=0===this.#o?this.#f:0!==this.#g.length?this.#g.pop():this.#o===this.#e?this.#P(!1):this.#o,this.#h[u]=t,this.#u[u]=e,this.#l.set(t,u),this.#c[this.#f]=u,this.#d[u]=this.#f,this.#f=u,this.#o++,this.#M(u,h,a),a&&(a.set="add"),l=!1;else{this.#E(u);let i=this.#u[u];if(e!==i){if(this.#b&&this.#A(i)){i.__abortController.abort(Error("replaced"));let{__staleWhileFetching:e}=i;void 0!==e&&!n&&(this.#w&&this.#s?.(e,t,"set"),this.#k&&this.#y?.push([e,t,"set"]))}else!n&&(this.#w&&this.#s?.(i,t,"set"),this.#k&&this.#y?.push([i,t,"set"]));if(this.#C(u),this.#M(u,h,a),this.#u[u]=e,a){a.set="replace";let t=i&&this.#A(i)?i.__staleWhileFetching:i;void 0!==t&&(a.oldValue=t)}}else a&&(a.set="update")}if(0===s||this.#S||this.#x(),this.#S&&(l||this.#I(u,s,r),a&&this.#j(a,u)),!n&&this.#k&&this.#y){let t;let e=this.#y;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){let t=this.#u[this.#p];if(this.#P(!0),this.#A(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(void 0!==t)return t}}finally{if(this.#k&&this.#y){let t;let e=this.#y;for(;t=e?.shift();)this.#r?.(...t)}}}#P(t){let e=this.#p,i=this.#h[e],s=this.#u[e];return this.#b&&this.#A(s)?s.__abortController.abort(Error("evicted")):(this.#w||this.#k)&&(this.#w&&this.#s?.(s,i,"evict"),this.#k&&this.#y?.push([s,i,"evict"])),this.#C(e),t&&(this.#h[e]=void 0,this.#u[e]=void 0,this.#g.push(e)),1===this.#o?(this.#p=this.#f=0,this.#g.length=0):this.#p=this.#c[e],this.#l.delete(i),this.#o--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,r=this.#l.get(t);if(void 0!==r){let t=this.#u[r];if(this.#A(t)&&void 0===t.__staleWhileFetching)return!1;if(!this.#z(r))return i&&this.#O(r),s&&(s.has="hit",this.#j(s,r)),!0;s&&(s.has="stale",this.#j(s,r))}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#l.get(t);if(void 0===s||!i&&this.#z(s))return;let r=this.#u[s];return this.#A(r)?r.__staleWhileFetching:r}#_(t,e,i,s){let r=void 0===e?void 0:this.#u[e];if(this.#A(r))return r;let n=new z,{signal:o}=i;o?.addEventListener("abort",()=>n.abort(o.reason),{signal:n.signal});let a={signal:n.signal,options:i,context:s},l=(s,r=!1)=>{let{aborted:o}=n.signal,l=i.ignoreFetchAbort&&void 0!==s;return(i.status&&(o&&!r?(i.status.fetchAborted=!0,i.status.fetchError=n.signal.reason,l&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),!o||l||r)?(this.#u[e]===u&&(void 0===s?u.__staleWhileFetching?this.#u[e]=u.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,s,a.options))),s):h(n.signal.reason)},h=s=>{let{aborted:r}=n.signal,o=r&&i.allowStaleOnFetchAbort,a=o||i.allowStaleOnFetchRejection,l=a||i.noDeleteOnFetchRejection;if(this.#u[e]!==u||(l&&void 0!==u.__staleWhileFetching?o||(this.#u[e]=u.__staleWhileFetching):this.delete(t)),a)return i.status&&void 0!==u.__staleWhileFetching&&(i.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw s};
1i.status&&(i.status.fetchDispatched=!0);let u=new Promise((e,s)=>{let o=this.#n?.(t,r,a);o&&o instanceof Promise&&o.then(t=>e(void 0===t?void 0:t),s),n.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(e(void 0),i.allowStaleOnFetchAbort&&(e=t=>l(t,!0)))})}).then(l,t=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=t),h(t))),c=Object.assign(u,{__abortController:n,__staleWhileFetching:r,__returned:void 0});return void 0===e?(this.set(t,c,{...a.options,status:void 0}),e=this.#l.get(t)):this.#u[e]=c,c}#A(t){return!!this.#b&&!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof z}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:g=!1,status:y,signal:v}=e;if(!this.#b)return y&&(y.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,status:y});let m={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:h,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:y,signal:v},S=this.#l.get(t);if(void 0===S){y&&(y.fetch="miss");let e=this.#_(t,S,m,f);return e.__returned=e}{let e=this.#u[S];if(this.#A(e)){let t=i&&void 0!==e.__staleWhileFetching;return y&&(y.fetch="inflight",t&&(y.returnedStale=!0)),t?e.__staleWhileFetching:e.__returned=e}let r=this.#z(S);if(!g&&!r)return y&&(y.fetch="hit"),this.#E(S),s&&this.#O(S),y&&this.#j(y,S),e;let n=this.#_(t,S,m,f),o=void 0!==n.__staleWhileFetching&&i;return y&&(y.fetch=r?"stale":"refresh",o&&r&&(y.returnedStale=!0)),o?n.__staleWhileFetching:n.__returned=n}}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e,o=this.#l.get(t);if(void 0!==o){let e=this.#u[o],a=this.#A(e);return(n&&this.#j(n,o),this.#z(o))?(n&&(n.get="stale"),a)?(n&&i&&void 0!==e.__staleWhileFetching&&(n.returnedStale=!0),i?e.__staleWhileFetching:void 0):(r||this.delete(t),n&&i&&(n.returnedStale=!0),i?e:void 0):(n&&(n.get="hit"),a)?e.__staleWhileFetching:(this.#E(o),s&&this.#O(o),e)}n&&(n.get="miss")}#B(t,e){this.#d[e]=t,this.#c[t]=e}#E(t){t!==this.#f&&(t===this.#p?this.#p=this.#c[t]:this.#B(this.#d[t],this.#c[t]),this.#B(this.#f,t),this.#f=t)}delete(t){let e=!1;if(0!==this.#o){let i=this.#l.get(t);if(void 0!==i){if(e=!0,1===this.#o)this.clear();else{this.#C(i);let e=this.#u[i];if(this.#A(e)?e.__abortController.abort(Error("deleted")):(this.#w||this.#k)&&(this.#w&&this.#s?.(e,t,"delete"),this.#k&&this.#y?.push([e,t,"delete"])),this.#l.delete(t),this.#h[i]=void 0,this.#u[i]=void 0,i===this.#f)this.#f=this.#d[i];else if(i===this.#p)this.#p=this.#c[i];else{let t=this.#d[i];this.#c[t]=this.#c[i];let e=this.#c[i];this.#d[e]=this.#d[i]}this.#o--,this.#g.push(i)}}}if(this.#k&&this.#y?.length){let t;let e=this.#y;for(;t=e?.shift();)this.#r?.(...t)}return e}clear(){for(let t of this.#L({allowStale:!0})){let e=this.#u[t];if(this.#A(e))e.__abortController.abort(Error("deleted"));else{let i=this.#h[t];this.#w&&this.#s?.(e,i,"delete"),this.#k&&this.#y?.push([e,i,"delete"])}}if(this.#l.clear(),this.#u.fill(void 0),this.#h.fill(void 0),this.#S&&this.#m&&(this.#S.fill(0),this.#m.fill(0)),this.#v&&this.#v.fill(0),this.#p=0,this.#f=0,this.#g.length=0,this.#a=0,this.#o=0,this.#k&&this.#y){let t;let e=this.#y;for(;t=e?.shift();)this.#r?.(...t)}}}let M=["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 P{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=M[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 s=this.outputObject();this.model.objectSetField(s,t,i)}processReturnIntoObjectSameKey(){let t=this.inputEntry(),e=this.outputStack.pop(),i=this.finalizeOutput(e),s=this.outputObject();this.model.objectSetField(s,t.key,i)}processPushField(){let t=this.read(),e=this.inputEntry(),i=this.inputKey(e,t),s=this.model.objectGetField(e.value,i);this.inputStack.push({value:s,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),s=this.outputObject();this.model.objectDeleteField(s,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(),s=this.inputEntry().value;this.model.arrayAppendSlice(i,s,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(),s=this.inputEntry().value;this.model.stringAppendSlice(i,s,t,e)}}function R(t,e,i=0){let s=i,r=0;for(r=i;s<e;r++){var n;let e=(n=t.codePointAt(r))>>16?4:n>>11?3:n>>7?2:1;4===e&&r++,s+=e}return r}class B{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,s]of Object.entries(t))e.data[i]=s;return e}copyArray(t){return null===t?[]:t.slice()}copyString(t){return{type:"string",data:null===t?"":t}}
1objectSetField(t,e,i){t.data[e]=i}objectDeleteField(t,e){delete t.data[e]}arrayAppendValue(t,e){t.push(e)}arrayAppendSlice(t,e,i,s){t.push(...e.slice(i,s))}stringAppendSlice(t,e,i,s){let r=R(e,i),n=R(e,s,r);t.data+=e.slice(r,n)}stringAppendValue(t,e){t.data+=e}}let U=(0,l.createContext)(null),W=new D({max:500}),V=(0,l.memo)(function(t){let{children:e,refreshInterval:i=1e4,token:s}=t;if(!t.client)throw Error("Missing a `client` prop with a configured Sanity client instance");let[n]=(0,l.useState)(()=>{let{requestTagPrefix:e,resultSourceMap:i}=t.client.config();return t.client.withConfig({requestTagPrefix:e||"sanity.preview-kit",resultSourceMap:"withKeyArraySelector"!==i||"withKeyArraySelector",...s&&{token:s,useCdn:!1,perspective:"previewDrafts",ignoreBrowserTokenWarning:!0}})}),[o]=(0,l.useState)(()=>t.logger);(0,l.useEffect)(()=>{o&&o.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.`)},[o,i]);let[a,h]=(0,l.useState)([]),[u]=(0,l.useState)(()=>new Map),c=function(t){let[e]=(0,l.useState)(()=>new Map),i=(0,l.useCallback)((i,s,r,n)=>{e.has(i)||(e.set(i,{query:s,params:r,listeners:new Set}),(0,l.startTransition)(()=>t(t=>t.includes(i)?t:[...t,i])));let o=e.get(i);if(!o||!o.listeners)throw TypeError("Inconsistent cache for key: "+i);let{listeners:a}=o;return a.add(n),()=>{a.delete(n),0===a.size&&(e.delete(i),(0,l.startTransition)(()=>t(t=>t.includes(i)?t.filter(t=>t!==i):t)))}},[e,t]);return(0,l.useMemo)(()=>({cache:e,subscribe:i}),[e,i])}(h),[d]=(0,l.useState)(()=>function(t,e,i){let s=H(e,i);return u.has(s)||u.set(s,{result:t,resultSourceMap:{}}),{subscribe:t=>{let r=c.subscribe(s,e,i,t);return()=>r()},getSnapshot:()=>{var t;return null==(t=u.get(s))?void 0:t.result}}}),[p,f]=(0,l.useState)([]),[g]=(0,l.useState)(()=>new Map),y=(0,l.useCallback)(t=>{var e;let i=new Set;if(g.clear(),null!=(e=t.documents)&&e.length)for(let e of t.documents)i.add(e._id),g.set(e._id,e);(0,l.startTransition)(()=>f(t=>{let e=Array.from(new Set([...t,...i]));return JSON.stringify(e.sort())===JSON.stringify(t.sort())?t:e}))},[g]);return(0,r.jsxs)(U.Provider,{value:d,children:[e,(0,r.jsx)($,{cache:c.cache,client:n,setTurboIds:f,snapshots:u,turboIds:p,docsInUse:g}),a.map(t=>{if(!c.cache.has(t))return null;let{query:e,params:s,listeners:o}=c.cache.get(t);return(0,r.jsx)(N,{client:n,listeners:o,params:s,query:e,refreshInterval:i,snapshots:u,turboIdsFromSourceMap:y},t)})]})});V.displayName="LiveStoreProvider";let N=(0,l.memo)(function(t){let{client:e,refreshInterval:i,query:s,params:r,listeners:n,snapshots:o,turboIdsFromSourceMap:a}=t,{projectId:h,dataset:u}=(0,l.useMemo)(()=>{let{projectId:t,dataset:i}=e.config();return{projectId:t,dataset:i}},[e]),[c,d]=(0,l.useState)(null);if(c)throw c;let[p,f]=function(t){let{refreshInterval:e}=t,i=function(){let[t,e]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e(navigator.onLine);let t=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",t),window.addEventListener("offline",i),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",i)}},[]);let i=(0,l.useSyncExternalStore)(v,()=>document.visibilityState,()=>"hidden");return!t||"hidden"===i}(),[s,r]=(0,l.useState)("hit"),n=(0,l.useCallback)(()=>(r("inflight"),()=>r("hit")),[]);return(0,l.useEffect)(()=>{if(!e||"hit"!==s)return;let t=setTimeout(()=>r("stale"),e);return()=>clearTimeout(t)},[e,s]),(0,l.useEffect)(()=>{if("hit"!==s)return;let t=()=>r("stale");return window.addEventListener("focus",t),()=>window.removeEventListener("focus",t)},[e,s]),(0,l.useEffect)(()=>{i&&"hit"===s&&r("stale"),i||"stale"!==s||r("refresh")},[i,s]),[s,n]}({refreshInterval:i}),g="refresh"===p||"inflight"===p;return(0,l.useEffect)(()=>{if(!g)return;let t=!1,i=new AbortController,l=f();return(async function(){let{signal:l}=i,{result:c,resultSourceMap:d}=await e.fetch(s,r,{signal:l,filterResponse:!1});if(!l.aborted){for(let t of(o.set(H(s,r),{result:J(h,u,c,d),resultSourceMap:null!=d?d:{}}
1),d&&a(d),n.values()))t();t=!0}})().catch(t=>{"AbortError"!==t.name&&d(t)}).finally(l),()=>{t||i.abort()}},[e,u,n,r,h,s,g,o,f,a]),null});function G(t,e,i){return`${t}-${e}-${i}`}N.displayName="QuerySubscription";let $=(0,l.memo)(function(t){let{client:e,snapshots:i,cache:n,turboIds:o,setTurboIds:a,docsInUse:d}=t,{projectId:p,dataset:v}=(0,l.useMemo)(()=>{let{projectId:t,dataset:i}=e.config();return{projectId:t,dataset:i}},[e]);(0,l.useEffect)(()=>{var t,e;let s=new Set;for(let{query:r,params:o}of(d.clear(),n.values())){let n=H(r,o),a=i.get(n);if(a&&null!=(e=null==(t=a.resultSourceMap)?void 0:t.documents)&&e.length)for(let t of a.resultSourceMap.documents)s.add(t._id),d.set(t._id,t)}let r=[...s].sort();JSON.stringify(o)!==JSON.stringify(r)&&(0,l.startTransition)(()=>a(r))},[n,a,i,o,d]),function(t,e,i){let[r,n]=(0,l.useState)(),[o,a]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(window.self===window.top&&!window.opener)return;let t=function(t){let e=window.self!==window.top||window.opener,i={buffer:[],id:null,origin:null,source:null,status:"connecting"};function r(e,r){if(g(e)||f(e)||"connecting"!==i.status&&"reconnecting"!==i.status){if(i.id&&i.origin&&i.source){let n={connectionId:i.id,data:r,domain:"sanity/channels",from:t.id,id:function(t,e,i){if(c.randomUUID&&!t)return c.randomUUID();let r=(t=t||{}).random||(t.rng||function(){if(!s&&!(s="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return s(h)})();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(t,e=0){return u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]}(r)}(),to:t.connectTo,type:e};try{i.source.postMessage(n,{targetOrigin:i.origin})}catch{throw Error(`Failed to postMessage '${n.id}' on '${t.id}'`)}}}else i.buffer.push({type:e,data:r})}function n(e){if(y(e))console.error("Visual editing package mismatch detected! Please ensure you are using the latest version of Sanity Studio and any packages listed here:\nhttps://github.com/sanity-io/visual-editing");else if(function(e){let{data:i}=e;return"sanity/channels"===i.domain&&i.to===t.id&&i.from===t.connectTo&&"channel/response"!==i.type}(e)){let{data:t}=e;if(i.origin&&e.origin!==i.origin)return;if(e.source&&i.source!==e.source&&(i.source=e.source),g(t.type)&&t.data){if("handshake/syn"===t.type)return i.origin=e.origin,i.id=t.data.id,l("connecting"),void r("handshake/syn-ack",{id:i.id});if("handshake/ack"===t.type&&t.data.id===i.id)return void l("connected")}else if(t.connectionId===i.id&&e.origin===i.origin){if("channel/disconnect"===t.type)return void l("disconnected");{let e=[t.type,t.data];o.forEach(t=>{t(...e)}),r("channel/response",{responseTo:t.id})}return}}}let o=new Set,a=new Set;function l(t){i.status=t,a.forEach(e=>{e(t)}),"connected"===t&&function(){let t=[...i.buffer];i.buffer.splice(0,i.buffer.length),t.forEach(({type:t,data:e})=>{r(t,e)})}()}return window.addEventListener("message",n,!1),l("connecting"),{destroy:function(){["disconnected"].includes(i.status)||l("disconnected"),o.clear(),a.clear(),window.removeEventListener("message",n,!1)},inFrame:e,send:function(t,e){r(t,e)},subscribe:function(t){return o.add(t),()=>o.delete(t)},onStatusUpdate:function(t){return a.add(t),()=>a.delete(t)}}}({id:"preview-kit",connectTo:"presentation"});t.onStatusUpdate(t=>{"connected"===t?a(!0):"disconnected"===t&&a(!1)});let e=setTimeout(()=>n(t),0);return()=>{clearTimeout(e),t.destroy(),n(void 0)}},[i,e]);let d=JSON.stringify(Array.from(t.keys()));(0,l.useEffect)(()=>{"[]"!==d&&r&&o&&r.send("preview-kit/documents",{projectId:e,dataset:i,perspective:"previewDrafts",documents:Array.from(t.values())})},[d,r,o,i,t,e])}(d,p,v);let[m,S]=(0,l.useState)([]);(0,l.useEffect)(()=>{let t=new Set(m.flat()),e=new Set;for(let i of o)t.has(i)||W.has(G(p,v,i))||e.add(i);let i=[...e].slice(0,100);0!==i.length&&(0,l.startTransition)(()=>S(t=>[...t.slice(-100),i]))},[m,v,p,o]);let[w,b]=(0,l.useState)();return(0,l.useEffect)(()=>{let t=e.listen("*",{},{events:["mutation"],effectFormat:"mendoza",includePreviousRevision:!1,includeResult:!1,tag:"turbo"}).subscribe(t=>{var e,i,s;if("mutation"!==t.type||null==(i=null==(e=t.effects)?void 0:e.apply)||!i.length)return;let r=G(p,v,t.documentId),n=W.peek(r);if(n){let e={...n};delete e._rev;let i=(s=t.effects.apply,new P(new B,e,s).process());W.set(r,i)}(0,l.startTransition)(()=>b(t.documentId))});return()=>t.unsubscribe()},[e,v,p]),(0,l.useEffect)(()=>{var t,e,s;if(!w||!o.includes(w))return;let r=[];for(let[s,n]of i.entries())null!=(e=null==(t=n.resultSourceMap)?void 0:t.documents)&&e.length&&(n.result=J(p,v,n.result,n.resultSourceMap),r.push(s));for(let t of r){let e=null==(s=n.get(t))?void 0:s.listeners;if(e)for(let t of e)t()}(0,l.startTransition)(()=>b(void 0))},[n,v,w,p,i,o]),(0,r.jsx)(r.Fragment,{children:m.map(t=>(0,r.jsx)(K,{client:e,projectId:p,dataset:v,ids:t},JSON.stringify(t)))})});$.displayName="Turbo";let K=(0,l.memo)(function(t){let{client:e,projectId:i,dataset:s,ids:r}=t;return(0,l.useEffect)(()=>{let t=r.filter(t=>!W.has(G(i,s,t)));0!==t.length&&e.getDocuments(t).then(t=>{for(let e of t)e&&null!=e&&e._id&&W.set(G(i,s,e._id),e)},console.error)},[e,s,r,i]),null});K.displayName="GetDocuments";let q=!1;
1function J(t,e,i,s){return s?function(t,e,i,s,r){if(!e)return t;let o=function(t,e){let i=function(t){if(function(t){if(Array.isArray(t)&&t.length>1&&t.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}(t),Array.isArray(t))return t.includes("published")?t:[...t,"published"];switch(t){case"previewDrafts":case"drafts":return["drafts","published"];default:return["published"]}}(e);return function(e){return function(e){for(let s of i){let i=null;if(s.startsWith("r")&&(i=t({...e,_id:(0,n.XL)(e._id,s)})),"drafts"===s&&(i=t({...e,_id:(0,n.qy)(e._id)})),"published"===s&&(i=t({...e,_id:(0,n.vs)(e._id)})),i)return{...i,_id:(0,n.vs)(i._id),_originalId:i._id}}return null}(e)}}(i,r),a=e.documents?.map?.(o)||[];return(0,n.lV)(JSON.parse(JSON.stringify(t)),(t,i)=>{let r=(0,n.Mx)(i,e);if(!r)return t;let{mapping:o,pathSuffix:l}=r;if("value"!==o.type||"documentValue"!==o.source.type)return t;let h=e.documents[o.source.document],u=e.paths[o.source.path];if(h){let e=(0,n.F5)(u+l),i=(0,n.BB)(e),r=a[o.source.document];if(!r)return t;let c=r?(0,n.U2)(r,i,t):t;return t===c?t:s(c,{cachedDocument:r,previousValue:t,sourceDocument:h,sourcePath:e})}return t})}(i,s,i=>{if(!i._projectId)return W.get(G(t,e,i._id));q||(console.warn("Cross dataset references are not supported yet, ignoring source document",i),q=!0)},(t,{previousValue:e})=>
1{if("string"==typeof t&&"string"==typeof e){let{encoded:i}=k(e),{cleaned:s}=k(t);return`${i}${s}`}return t},"previewDrafts"):i}function H(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.