PageSourceSearch

https://www.sckonnect.com/_next/static/chunks/04ja639l~8xjr.js?dpl=dpl_GYZ5P1wh9J19UNL9QPqJVkHqdkHW

js sckonnect.com collected 2026-10-08 06:58:18 UTC 92,299 bytes, 14 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,433714,e=>{"use strict";let t=!(typeof navigator>"u")&&"ReactNative"===navigator.product,r={timeout:t?6e4:12e4},n=function(e){let n={...r,..."string"==typeof e?{url:e}:e};if(n.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let n=Number(t);return isNaN(n)?e(r.timeout):{connect:n,socket:n}}(n.timeout),n.query){let{url:e,searchParams:r}=function(e){let r=e.indexOf("?");if(-1===r)return{url:e,searchParams:new URLSearchParams};let n=e.slice(0,r),s=e.slice(r+1);if(!t)return{url:n,searchParams:new URLSearchParams(s)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let o=new URLSearchParams;for(let e of s.split("&")){let[t,r]=e.split("=");t&&o.append(i(t),i(r||""))}return{url:n,searchParams:o}}(n.url);for(let[t,i]of Object.entries(n.query)){if(void 0!==i)if(Array.isArray(i))for(let e of i)r.append(t,e);else r.append(t,i);let s=r.toString();s&&(n.url=`${e}?${s}`)}}return n.method=n.body&&!n.method?"POST":(n.method||"GET").toUpperCase(),n};function i(e){return decodeURIComponent(e.replace(/\+/g," "))}let s=/^https?:\/\//i,o=function(e){if(!s.test(e.url))throw Error(`"${e.url}" is not a valid URL`)},a=["request","response","progress","error","abort"],u=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var c,l,h,d,p,f,y=(c=function(){if(f)return p;f=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return p=function(t){if(!t)return{};for(var r=Object.create(null),n=e(t).split("\n"),i=0;i<n.length;i++){var s,o=n[i],a=o.indexOf(":"),u=e(o.slice(0,a)).toLowerCase(),c=e(o.slice(a+1));typeof r[u]>"u"?r[u]=c:(s=r[u],"[object Array]"===Object.prototype.toString.call(s))?r[u].push(c):r[u]=[r[u],c]}return r}}())&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;class g{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#n={};#i;#s={};#o;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#n[e]=t}setInit(e,t=!0){this.#s=e,this.#o=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#s,method:this.#e,headers:this.#n,body:e};"function"==typeof AbortController&&this.#o&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(r.signal=this.#i.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#t,r).then(e=>(e.headers.forEach((e,t)=>{this.#r+=`${t}: ${e}\r
2`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{"AbortError"!==e.name?this.onerror?.(e):this.onabort?.()})}}let m="function"==typeof XMLHttpRequest?"xhr":"fetch",b="xhr"===m?XMLHttpRequest:g,v=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:m,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let o=new b;o instanceof g&&"object"==typeof n.fetch&&o.setInit(n.fetch,n.useAbortSignal??!0);let a=n.headers,u=n.timeout,c=!1,l=!1,h=!1;if(o.onerror=e=>{f(o instanceof g?e instanceof Error?e:Error(`Request error while attempting to reach is ${n.url}`,{cause:e}):Error(`Request error while attempting to reach is ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.ontimeout=e=>{f(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{p(!0),c=!0},o.onreadystatechange=function(){u&&(p(),i.socket=setTimeout(()=>d("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return f(Error("Unknown XHR error"));p(),l=!0,t(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:n.url,method:n.method,headers:y(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(n.method,n.url,!0),o.withCredentials=!!n.withCredentials,a&&o.setRequestHeader)for(let e in a)a.hasOwnProperty(e)&&o.setRequestHeader(e,a[e]);return n.rawBody&&(o.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:m,request:o,context:e}),o.send(n.body||null),u&&(i.connect=setTimeout(()=>d("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,o&&o.abort()}};function d(t){h=!0,o.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=t,e.channels.error.publish(r)}function p(e){(e||c||o&&o.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function f(e){if(l)return;p(!0),l=!0,o=null;let r=e||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,t(r)}};var w,C,_,R,$,q=e.i(497706),E=e.i(908232),I={exports:{}};$||($=1,function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(i=n))}),t.splice(i,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!e&&"u">typeof q.default&&"env"in q.default&&(e=q.default.env.DEBUG),e},t.useColors=function(){let e;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&
2("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),r=!1,t.destroy=()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=(R?_:(R=1,_=function(e){function t(e){let n,i,s,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(n||r),a.prev=n,a.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let s=t.formatters[n];if("function"==typeof s){let t=e[i];r=s.call(a,t),e.splice(i,1),i--}return r}),t.formatArgs.call(a,e),(a.log||t.log).apply(a,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,i=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,s=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(n(e,r))return!1;for(let r of t.names)if(n(e,r))return!0;return!1},t.humanize=function(){if(C)return w;C=1;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return w=function(t,r){r=r||{};var n,i,s=typeof t;if("string"===s&&t.length>0){var o=t;if(!((o=String(o)).length>100)){var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(a){var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*u;case"weeks":case"week":case"w":return 6048e5*u;case"days":case"day":case"d":return 864e5*u;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*u;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*u;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u}}}return}if("number"===s&&isFinite(t))return r.long?(i=Math.abs(t))>=864e5?e(t,i,864e5,"day"):i>=36e5?e(t,i,36e5,"hour"):i>=6e4?e(t,i,6e4,"minute"):i>=1e3?e(t,i,1e3,"second"):t+" ms":(n=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}
2(I,I.exports)),I.exports,Object.prototype.hasOwnProperty;let x=typeof E.Buffer>"u"?()=>!1:e=>E.Buffer.isBuffer(e);function O(e){return"[object Object]"===Object.prototype.toString.call(e)}let A=["boolean","string","number"];var T="u">typeof globalThis?globalThis:"u">typeof window?window:e.g;let j=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:(r,n)=>new t((t,i)=>{let s=n.options.cancelToken;s&&s.promise.then(e=>{r.abort.publish(e),i(e)}),r.error.subscribe(i),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){i(e)}},0)})}};class S{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class P{promise;reason;constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new S(e),t(this.reason))})}static source=()=>{let e;return{token:new P(t=>{e=t}),cancel:e}}}j.Cancel=S,j.CancelToken=P,j.isCancel=e=>!(!e||!e?.__CANCEL__);var F=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function M(e){return 100*Math.pow(2,e)+100*Math.random()}let D=(e={})=>{var t;let r,n,i;return r=(t={shouldRetry:F,...e}).maxRetries||5,n=t.retryDelay||M,i=t.shouldRetry,{onError:(e,t)=>{var s;let o=t.options,a=o.maxRetries||r,u=o.retryDelay||n,c=o.shouldRetry||i,l=o.attemptNumber||0;if(null!==(s=o.body)&&"object"==typeof s&&"function"==typeof s.pipe||!c(e,l,o)||l>=a)return e;let h=Object.assign({},t,{options:Object.assign({},o,{attemptNumber:l+1})});return setTimeout(()=>t.channels.request.publish(h),u(l)),null}}};D.shouldRetry=F;var k=e.i(824627);function U(e){return"function"==typeof e}function V(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var z=V(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}});function L(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var H=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,i,s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=(0,k.__values)(s),a=o.next();!a.done;a=o.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else s.remove(this);var u=this.initialTeardown;if(U(u))try{u()}catch(e){i=e instanceof z?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,k.__values)(c),h=l.next();!h.done;h=l.next()){var d=h.value;try{W(d)}catch(e){i=null!=i?i:[],e instanceof z?i=(0,k.__spreadArray)((0,k.__spreadArray)([],(0,k.__read)(i)),(0,k.__read)(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new z(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)W(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&L(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&L(r,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),N=H.EMPTY;function B(e){return e instanceof H||e&&"closed"in e&&U(e.remove)&&U(e.add)&&U(e.unsubscribe)}function W(e){U(e)?e():e.unsubscribe()}var G=void 0,J={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=J.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,k.__spreadArray)([e,t],(0,k.__read)(r))):setTimeout.apply(void 0,(0,k.__spreadArray)([e,t],(0,k.__read)(r)))},clearTimeout:function(e){var t=J.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Y(e){J.setTimeout(function(){!1;throw e})}function Q(){}var K=X("C",void 0,void 0);function X(e,t,r){return{kind:e,value:t,error:r}}var Z=null;function ee(e){var t,r,n,i;1;e()}var et=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,B(t)&&t.add(r)):r.destination=eu,r}return(0,k.__extends)(t,e),t.create=function(e,t,r){return new es(e,t,r)},t.prototype.next=function(e){this.isStopped?ea(X("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?ea(X("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?ea(K,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(H),er=Function.prototype.bind;function en(e,t){return er.call(e,t)}var ei=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){eo(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){eo(e)}else eo(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){eo(e)}},e}(),es=function(e){function t(t,r,n){var i,s,o=e.call(this)||this;return U(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i=t,o.destination=new ei(i),o}return(0,k.__extends)(t,e),t}(et);function eo(e){1;Y(e)}function ea(e,t){}var eu={closed:!0,next:Q,error:function(e){throw e},complete:Q},ec="function"==typeof Symbol&&Symbol.observable||"@@observable";function el(e){return e}function eh(e){return 0===e.length?el:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var ed=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this,i=!function(e){return e&&e instanceof et||e&&U(e.next)&&U(e.error)&&U(e.complete)&&B(e)}(e)?new es(e,t,r):e;return ee(function(){var e=n.operator,t=n.source;i.add(e?e.call(i,t):t?n._subscribe(i):n._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=ep(t))(function(t,n){var i=new es({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[ec]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eh(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=ep(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function ep(e){var t;return null!=(t=null!=e?e:G)?t:Promise}var ef=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function ey(e){return U(null==e?void 0:e.then)}function eg(e){return Symbol.asyncIterator&&U(null==e?void 0:e[Symbol.asyncIterator])}function em(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
2d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var eb="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function ev(e){return U(null==e?void 0:e[eb])}function ew(e){return(0,k.__asyncGenerator)(this,arguments,function(){var t,r,n;return(0,k.__generator)(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,k.__await)(t.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,(0,k.__await)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,k.__await)(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eC(e){return U(null==e?void 0:e.getReader)}function e_(e){if(e instanceof ed)return e;if(null!=e){var t,r,n,i;if(U(e[ec])){return t=e,new ed(function(e){var r=t[ec]();if(U(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(ef(e)){return r=e,new ed(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}if(ey(e)){return n=e,new ed(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,Y)})}if(eg(e))return eR(e);if(ev(e)){return i=e,new ed(function(e){var t,r;try{for(var n=(0,k.__values)(i),s=n.next();!s.done;s=n.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}if(eC(e))return eR(ew(e))}throw em(e)}function eR(e){return new ed(function(t){(function(e,t){var r,n,i,s;return(0,k.__awaiter)(this,void 0,void 0,function(){var o;return(0,k.__generator)(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=(0,k.__asyncValues)(e),a.label=1;case 1:return[4,r.next()];case 2:if((n=a.sent()).done)return[3,4];if(o=n.value,t.next(o),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(n&&!n.done&&(s=r.return)))return[3,8];return[4,s.call(r)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function e$(e){return new ed(function(t){e_(e()).subscribe(t)})}function eq(e){return e[e.length-1]}function eE(e){var t;return(t=eq(e))&&U(t.schedule)?e.pop():void 0}function eI(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var s=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!i)return s}function ex(e){return function(t){if(U(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function eO(e,t,r,n,i){return new eA(e,t,r,n,i)}var eA=function(e){function t(t,r,n,i,s,o){var a=e.call(this,t)||this;return a.onFinalize=s,a.shouldUnsubscribe=o,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,k.__extends)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(et);function eT(e,t){return void 0===t&&(t=0),ex(function(r,n){r.subscribe(eO(n,function(r){return eI(n,e,function(){return n.next(r)},t)},function(){return eI(n,e,function(){return n.complete()},t)},function(r){return eI(n,e,function(){return n.error(r)},t)}))})}function ej(e,t){return void 0===t&&(t=0),ex(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function eS(e,t){if(!e)throw Error("Iterable cannot be null");return new ed(function(r){eI(r,t,function(){var n=e[Symbol.asyncIterator]();eI(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function eP(e,t){return t?function(e,t){if(null!=e){if(U(e[ec]))return e_(e).pi
2pe(ej(t),eT(t));if(ef(e))return new ed(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(ey(e))return e_(e).pipe(ej(t),eT(t));if(eg(e))return eS(e,t);if(ev(e))return new ed(function(r){var n;return eI(r,t,function(){n=e[eb](),eI(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return U(null==n?void 0:n.return)&&n.return()}});if(eC(e))return eS(ew(e),t)}throw em(e)}(e,t):e_(e)}function eF(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=eE(e);return eP(e,r)}function eM(e,t){return ex(function(r,n){var i=0;r.subscribe(eO(n,function(r){n.next(e.call(t,r,i++))}))})}function eD(e,t,r){return(void 0===r&&(r=1/0),U(t))?eD(function(r,n){return eM(function(e,i){return t(r,e,n,i)})(e_(e(r,n)))},r):("number"==typeof t&&(r=t),ex(function(t,n){var i,s,o,a,u,c,l,h;return i=r,s=[],o=0,a=0,u=!1,c=function(){!u||s.length||o||n.complete()},l=function(e){return o<i?h(e):s.push(e)},h=function(t){o++;var r=!1;e_(e(t,a++)).subscribe(eO(n,function(e){n.next(e)},function(){r=!0},void 0,function(){if(r)try{for(o--;s.length&&o<i;)!function(){var e=s.shift();h(e)}();c()}catch(e){n.error(e)}}))},t.subscribe(eO(n,l,function(){u=!0,c()})),function(){}}))}var ek=V(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function eU(e,t){var r="object"==typeof t;return new Promise(function(n,i){var s,o=!1;e.subscribe({next:function(e){s=e,o=!0},error:i,complete:function(){o?n(s):r?n(t.defaultValue):i(new ek)}})})}var eV=V(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ez=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,k.__extends)(t,e),t.prototype.lift=function(e){var t=new eL(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new eV},t.prototype.next=function(e){var t=this;ee(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=(0,k.__values)(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;ee(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;ee(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?N:(this.currentObservers=null,i.push(e),new H(function(){t.currentObservers=null,L(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new ed;return e.source=this,e},t.create=function(e,t){return new eL(e,t)},t}(ed),eL=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return(0,k.__extends)(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:N},t}(ez),eH={now:function(){return(eH.delegate||Date).now()},delegate:void 0},eN=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=eH);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return(0,k.__extends)(t,e),t.prototype.next=function(t){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,s=this._timestampProvider,o=this._windowTime;!r&&(n.push(t),i||n.push(s.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var s=t.now(),o=0,a=1;a<r.length&&r[a]<=s;a+=2)o=a;o&&r.splice(0,o+1)}},t}(ez);function eB(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new ez}:t,n=e.resetOnError,i=void 0===n||n,s=e.resetOnComplete,o=void 0===s||s,a=e.resetOnRefCountZero,u=void 0===a||a;return function(e){var t,n,s,a=0,c=!1,l=!1,h=function(){null==n||n.unsubscribe(),n=void 0},d=function(){h(),t=s=void 0,c=l=!1},p=function(){var e=t;d(),null==e||e.unsubscribe()};return ex(function(e,f){a++,l||c||h();var y=s=null!=s?s:r();
2f.add(function(){0!=--a||l||c||(n=eW(p,u))}),y.subscribe(f),!t&&a>0&&(t=new es({next:function(e){return y.next(e)},error:function(e){l=!0,h(),n=eW(d,i,e),y.error(e)},complete:function(){c=!0,h(),n=eW(d,o),y.complete()}}),e_(e).subscribe(t))})(e)}}function eW(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0===t)return void e();if(!1!==t){var i=new es({next:function(){i.unsubscribe(),e()}});return e_(t.apply(void 0,(0,k.__spreadArray)([],(0,k.__read)(r)))).subscribe(i)}}function eG(e){return ex(function(t,r){var n,i=null,s=!1;i=t.subscribe(eO(r,void 0,void 0,function(o){n=e_(e(o,eG(e)(t))),i?(i.unsubscribe(),i=null,n.subscribe(r)):s=!0})),s&&(i.unsubscribe(),i=null,n.subscribe(r))})}function eJ(e){return void 0===e&&(e=1/0),eD(el,e)}var eY=function(e){function t(t,r){return e.call(this)||this}return(0,k.__extends)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(H),eQ={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=eQ.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,k.__spreadArray)([e,t],(0,k.__read)(r))):setInterval.apply(void 0,(0,k.__spreadArray)([e,t],(0,k.__read)(r)))},clearInterval:function(e){var t=eQ.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},eK=function(e){function t(t,r){var n=e.call(this,t,r)||this;
2return n.scheduler=t,n.work=r,n.pending=!1,n}return(0,k.__extends)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),eQ.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&eQ.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,L(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(eY),eX=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=eH.now,e}(),eZ=new(function(e){function t(t,r){void 0===r&&(r=eX.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return(0,k.__extends)(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active)return void r.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift())if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}
2(eX))(eK);function e0(e,t){var r=U(e)?e:function(){return e},n=function(e){return e.error(r())};return new ed(t?function(e){return t.schedule(n,0,e)}:n)}function e1(e){return ex(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var e3=new ed(function(e){return e.complete()});function e6(e,t){var r="object"==typeof t;return new Promise(function(n,i){var s=new es({next:function(e){n(e),s.unsubscribe()},error:i,complete:function(){r?n(t.defaultValue):i(new ek)}});e.subscribe(s)})}var e2=e.i(499389),e9=Array.isArray,e4=Array.isArray;function e5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=U(eq(e))?e.pop():void 0;return r?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eh(e)}(e5.apply(void 0,(0,k.__spreadArray)([],(0,k.__read)(e))),eM(function(e){return e4(e)?r.apply(void 0,(0,k.__spreadArray)([],(0,k.__read)(e))):r(e)})):ex(function(t,r){var n,i;(n=(0,k.__spreadArray)([t],(0,k.__read)(1===e.length&&e9(e[0])?e[0]:e)),void 0===i&&(i=el),function(e){var t,r,s;t=void 0,r=function(){for(var t=n.length,r=Array(t),s=t,o=t,a=function(t){var a,u,c;a=void 0,u=function(){var a=eP(n[t],void 0),u=!1;a.subscribe(eO(e,function(n){r[t]=n,!u&&(u=!0,o--),o||e.next(i(r.slice()))},function(){--s||e.complete()}))},c=e,a?eI(c,a,u):u()},u=0;u<t;u++)a(u)},s=e,t?eI(s,t,r):r()})(r)})}function e7(e,t){return ex(function(r,n){var i=0;r.subscribe(eO(n,function(r){return e.call(t,r,i++)&&n.next(r)}))})}let e8="drafts.",te="versions.";function tt(e){return e.startsWith(e8)}function tr(e){return e.startsWith(te)}function tn(e){return tr(e)?e8+to(e):tt(e)?e:e8+e}function ti(e,t){if("drafts"===t||"published"===t)throw Error('Version can not be "published" or "drafts"');return`${te}${t}.${to(e)}`}function ts(e){if(!tr(e))return;let[t,r]=e.split(".");return r}function to(e){return tr(e)?e.split(".").slice(2).join("."):tt(e)?e.slice(e8.length):e}let ta=e=>crypto.getRandomValues(new Uint8Array(e)),tu=/\r\n|[\n\r\u2028\u2029]/;function tc(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n].length+1;if(r+i>e)return{line:n+1,column:e-r};r+=i}return{line:t.length,column:t[t.length-1]?.length??0}}class tl extends Error{response;statusCode=400;responseBody;traceId;details;constructor(e,t){const r=td(e,t);super(r.message),Object.assign(this,r)}}
2class th extends Error{response;statusCode=500;responseBody;traceId;details;constructor(e){const t=td(e);super(t.message),Object.assign(this,t)}}function td(e,t){var r,n,i;let s=e.body,o={response:e,statusCode:e.statusCode,responseBody:(r=s,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),traceId:function(e){let t=e?.headers?.traceparent;if(t)return t.split("-")[1]}(e),message:"",details:void 0};if(!(0,e2.isRecord)(s))return o.message=`${ty(e,s)}${tg(o.traceId)}`,o;let a=s.error;if("string"==typeof a&&"string"==typeof s.message)return o.message=`${a} - ${s.message}${tg(o.traceId)}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=`${a}${tg(o.traceId)}`:"string"==typeof s.message?o.message=`${s.message}${tg(o.traceId)}`:o.message=`${ty(e,s)}${tg(o.traceId)}`,o;if("type"in(n=a)&&"mutationError"===n.type&&"description"in n&&"string"==typeof n.description||"type"in(i=a)&&"actionError"===i.type&&"description"in i&&"string"==typeof i.description){let e=a.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),r=t.length?`:
3- ${t.join(`
4- `)}`:"";return e.length>5&&(r+=`
5...and ${e.length-5} more`),o.message=`${a.description}${tg(o.traceId)}${r}`,o.details=s.error,o}return tp(a)?(o.message=tf(a,t?.options?.query?.tag,o.traceId),o.details=s.error):"description"in a&&"string"==typeof a.description?(o.message=`${a.description}${tg(o.traceId)}`,o.details=a):o.message=`${ty(e,s)}${tg(o.traceId)}`,o}function tp(e){return(0,e2.isRecord)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function tf(e,t,r){let{query:n,start:i,end:s,description:o}=e,a=r?`
6(traceId: ${r})`:"";if(!n||typeof i>"u")return`GROQ query parse error: ${o}${a}`;let u=t?`
7
8Tag: ${t}`:"";return`GROQ query parse error:
9${function(e,t,r){let n=e.split(tu),{start:i,end:s,markerLines:o}=function(e,t){let r={...e.start},n={...r,...e.end},i=r.line??-1,s=r.column??0,o=n.line,a=n.column,u=Math.max(i-3,0),c=Math.min(t.length,o+3);-1===i&&(u=0),-1===o&&(c=t.length);let l=o-i,h={};if(l)for(let e=0;e<=l;e++){let r=e+i;if(s)if(0===e){let e=t[r-1].length;h[r]=[s,e-s+1]}else if(e===l)h[r]=[0,a];else{let n=t[r-e].length;h[r]=[0,n]}else h[r]=!0}else s===a?s?h[i]=[s,0]:h[i]=!0:h[i]=[s,a-s];return{start:u,end:c,markerLines:h}}({start:tc(t.start,n),end:t.end?tc(t.end,n):void 0},n),a=`${s}`.length;return e.split(tu,s).slice(i,s).map((e,t)=>{let n=i+1+t,s=` ${` ${n}`.slice(-a)} |`,u=o[n],c=!o[n+1];if(!u)return` ${s}${e.length>0?` ${e}`:""}`;let l="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=`
10 `+s.replace(/\d/g," ")+" "+t+"^".repeat(n),c&&r&&(l+=" "+r)}return">"+s+(e.length>0?` ${e}`:"")+l}).join(`
11`)}(n,{start:i,end:s},o)}${u}${a}`}function ty(e,t){var r;let n="string"==typeof t?` (${(r=t).length>100?`${r.slice(0,100)}\u2026`:r})`:"",i=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${i}${n}`}function tg(e){return e?` (traceId: ${e})`:""}class tm extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;const t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){const{origin:e}=location;t.searchParams.set("cors","add"),t.searchParams.set("origin",e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}}let tb={onResponse:(e,t)=>{if(e.statusCode>=500)throw new th(e);if(e.statusCode>=400)throw new tl(e,t);return e}};function tv(e,t={}){return((e=[],t=v)=>(function e(t,r){let i=[],s=u.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[n],validateOptions:[o]});function c(e){let t,n=a.reduce((e,t)=>{let r,n;return e[t]=(r=Object.create(null),n=0,{publish:function(e){for(let t in r)r[t](e)},subscribe:function(e){let t=n++;return r[t]=e,function(){delete r[t]}}}),e},{}),i=function(e,t,...r){let n="onError"===e,i=t;
11for(let t=0;t<s[e].length&&(i=(0,s[e][t])(i,...r),!n||i);t++);return i},o=i("processOptions",e);i("validateOptions",o);let u={options:o,channels:n,applyMiddleware:i},c=n.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let s=e,o=t;if(!s)try{o=i("onResponse",t,r)}catch(e){o=null,s=e}(s=s&&i("onError",s,r))?n.error.publish(s):o&&n.response.publish(o)})(t,r,e))});n.abort.subscribe(()=>{c(),t&&t.abort()});let l=i("onReturn",n,u);return l===n&&n.request.publish(u),l}return c.use=function(e){if(!e)throw Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&s.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return u.forEach(t=>{e[t]&&s[t].push(e[t])}),i.push(e),c},c.clone=()=>e(i,r),t.forEach(c.use),c})(e,t))([D({shouldRetry:tw}),...e,function(e={}){let t={},r=t=>void 0!==e.ignoreWarnings&&(Array.isArray(e.ignoreWarnings)?e.ignoreWarnings:[e.ignoreWarnings]).some(e=>"string"==typeof e?t.includes(e):e instanceof RegExp&&e.test(t));return{onResponse:e=>{let n=e.headers["x-sanity-warning"];for(let e of Array.isArray(n)?n:[n])!e||t[e]||r(e)||(t[e]=!0,console.warn(e));return e}}}(t),{processOptions:e=>{let t=e.body;return!t||"function"==typeof t.pipe||x(t)||-1===A.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===O(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==O(r)&&!1!==r.hasOwnProperty("isPrototypeOf")}(t)?e:Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})})}},{onResponse:e=>{let t=e.headers["content-type"]||"",r=-1!==t.indexOf("application/json");return e.body&&t&&r?Object.assign({},e,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(e.body)}):e},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})},{onRequest:e=>{if("xhr"!==e.adapter)return;let t=e.request,r=e.context;function n(e){return t=>{let n=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:n,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=n("upload")),"onprogress"in t&&(t.onprogress=n("download"))}},tb,function(e={}){let t=e.implementation||T.Observable;if(!t)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(e,r)=>new t(t=>(e.error.subscribe(e=>t.error(e)),e.progress.subscribe(e=>t.next(Object.assign({type:"progress"},e))),e.response.subscribe(e=>{t.next(Object.assign({type:"response"},e)),t.complete()}),e.request.publish(r),()=>e.abort.publish()))}}({implementation:ed})])}function tw(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,i=(r.uri||r.url).startsWith("/data/query"),s=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!i)&&!!s||D.shouldRetry(e,t,r)}function tC(e){return"https://www.sanity.io/help/"+e}let t_=["image","file"],tR=["before","after","replace"],t$=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},tq=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},tE=(e,t)=>{if("string"!=typeof t||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(".."))throw Error(`${e}(): "${t}" is not a valid document ID`)},tI=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);tE(e,t._id)},tx=(e,t)=>{if(!t._type)throw Error(`\`${e}()\` requires that the document contains a type (\`_type\` property)`);var r=t._type;if("string"!=typeof r)throw Error(`\`${e}()\`: \`${r}\` is not a valid document type`)},tO=e=>{if(e.dataset)return e.dataset;let t=e.resource;if(t&&"dataset"===t.type){let e=t.id.split(".");if(2!==e.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return e[1]}throw Error("`dataset` must be provided to perform queries")},tA=e=>{if("string"!=typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e},tT=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":if(2!==n.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},tj=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},tS=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},tP=tS(["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"]),tF=tS(["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."]),tM=tS(["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."]),tD=tS(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),tk=tS(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tC("js-client-browser-token")}
11 for more information and how to hide this warning.`]),tU=tS(["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`."]),tV=tS(["Using the Sanity client without specifying an API version is deprecated.",`See ${tC("js-client-api-version")}`]),tz=(tS(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),tS(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),tL=tS(["The `~experimental_resource` configuration property has been renamed to `resource`.","Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version."]),tH={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},tN=["localhost","127.0.0.1","0.0.0.0"];function tB(e){if(Array.isArray(e)&&e.length>1&&e.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let tW=(e,t)=>{let r,n={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||tH.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};n.apiVersion||tV();let i={...tH,...n};i["~experimental_resource"]&&!i.resource&&(tL(),i.resource=i["~experimental_resource"]);let s=i.resource,o=i.useProjectHostname&&!s;if(typeof Promise>"u"){let e=tC("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(o&&!i.projectId)throw Error("Configuration must contain `projectId`");if(s&&tT(i),"u">typeof i.perspective&&tB(i.perspective),"encodeSourceMap"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");if("boolean"!=typeof i.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${i.stega.enabled}`);if(i.stega.enabled&&void 0===i.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(i.stega.enabled&&"string"!=typeof i.stega.studioUrl&&"function"!=typeof i.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${i.stega.studioUrl}`);let a="u">typeof window&&window.location&&window.location.hostname,u=a&&(r=window.location.hostname,-1!==tN.indexOf(r)),c=!!i.token;i.withCredentials&&c&&(tU(),i.withCredentials=!1),a&&u&&c&&!0!==i.ignoreBrowserTokenWarning?tk():typeof i.useCdn>"u"&&tF(),o&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(i.projectId),i.dataset&&t$(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?tA(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===tH.apiHost,!0===i.useCdn&&i.withCredentials&&tP(),i.useCdn=!1!==i.useCdn&&!i.withCredentials,function(e){if("1"===e||"X"===e)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(i.apiVersion);let l=i.apiHost.split("://",2),h=l[0],d=l[1],p=i.isDefaultApi?"apicdn.sanity.io":d;return o?(i.url=`${h}://${i.projectId}.${d}/v${i.apiVersion}`,i.cdnUrl=`${h}://${i.projectId}.${p}/v${i.apiVersion}
11`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class tG extends Error{name="ConnectionFailedError"}class tJ extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class tY extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class tQ extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class tK extends Error{name="MessageParseError"}let tX=["channelError","disconnect"];function tZ(e,t){return e$(()=>{let t=e();return t&&(t instanceof ed||U(t.lift)&&U(t.subscribe))?t:eF(t)}).pipe(eD(e=>{var r,n;return r=e,n=t,new ed(e=>{let t=n.includes("open"),i=n.includes("reconnect");function s(t){if("data"in t){let[r,n]=t0(t);e.error(r?new tK("Unable to parse EventSource error message",{cause:n}):new tQ((n?.data).message,n));return}r.readyState===r.CLOSED?e.error(new tG("EventSource connection failed")):i&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[n,i]=t0(t);if(n)return void e.error(new tK("Unable to parse EventSource message",{cause:n}));if("channelError"===t.type){var s,o;let t,n=new URL(r.url).searchParams.get("tag");e.error(new tY((s=i?.data,o=n,(t=s.error)?tp(t)?tf(t,o):t.description?t.description:"string"==typeof t?t:JSON.stringify(t,null,2):s.message||"Unknown listener error"),i.data));return}"disconnect"===t.type?e.error(new tJ(`Server disconnected client: ${i.data?.reason||"unknown error"}`)):e.next({type:t.type,id:t.lastEventId,...i.data?{data:i.data}:{}})}r.addEventListener("error",s),t&&r.addEventListener("open",o);let u=[...new Set([...tX,...n])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(e=>r.addEventListener(e,a)),()=>{r.removeEventListener("error",s),t&&r.removeEventListener("open",o),u.forEach(e=>r.removeEventListener(e,a)),r.close()}})}))}function t0(e){try{let t="string"==typeof e.data&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...!function(e){for(let t in e)return!1;return!0}(t)?{data:t}:{}}]}catch(e){return[e,null]}}function t1(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&null!==e&&"query"in e&&"string"==typeof e.query)return"params"in e&&"object"==typeof e.params&&null!==e.params?{query:e.query,params:e.params}:{query:e.query};let t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(`
12`);throw Error(`Unknown selection - must be one of:
13
14${t}`)}class t3{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return tq("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,t,r){return((e,t,r)=>{let n="insert(at, selector, items)";if(-1===tR.indexOf(e)){let e=tR.map(e=>`"${e}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} takes an "items"-argument which must be an array`)})(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,n){let i=t<0?t-1:t,s=typeof r>"u"||-1===r?-1:Math.max(0,t+r),o=`${e}[${i}:${i<0&&s>=0?"":s}]`;return this.insert("replace",o,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...t1(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return tq(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}}class t6 extends t3{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new t6(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}class t2 extends t3{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new t2(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}let t9={returnDocuments:!1};class t4{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return tq("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return tq(t,e),tI(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return tq(t,e),tI(t,e),this._add({[t]:e})}delete(e){return tE("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}class t5 extends t4{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new t5([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t9,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof t2,i="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new t2(e,{},this.#a));if(!(r instanceof t2))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new t2(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class t7 extends t4{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new t7([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t9,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof t6)return this._add({patch:e.serialize()});if(r){let r=t(new t6(e,{},this.#a));if(!(r instanceof t6))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let t8=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:s,returnQuery:o,...a}=r;for(let[r,s]of(i&&n.append("tag",i),n.append("query",e),Object.entries(t)))void 0!==s&&n.append(`$${r}`,JSON.stringify(s));for(let[e,t]of Object.entries(a))t&&n.append(e,`${t}`);return!1===o&&n.append("returnQuery","false"),!1===s&&n.append("includeMutations","fal
14se"),`?${n}`},re=e=>"response"===e.type,rt=e=>e.body;function rr(t,r,n,i,s={},o={}){let a="stega"in o?{...n||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:n,u=a.enabled?(0,e2.stegaClean)(s):s,c=!1===o.filterResponse?e=>e:e=>e.result,{cache:l,next:h,...d}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},p=rg(t,r,"query",{query:i,params:u},"u">typeof l||"u">typeof h?{...d,fetch:{cache:l,next:h}}:d);return a.enabled?p.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e5.apply(void 0,(0,k.__spreadArray)([],(0,k.__read)(e)))}(eP(e.A(964349).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),eM(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe(eM(c))}function rn(e,t,r,n={}){let i={uri:r_(e,"doc",(()=>{if(!n.releaseId)return r;let e=ts(r);if(!e){if(tt(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return ti(r,n.releaseId)}if(e!==n.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${n.releaseId}\`)`);return r})()),json:!0,tag:n.tag,signal:n.signal,query:void 0!==n.includeAllVersions?{includeAllVersions:n.includeAllVersions}:void 0};return rw(e,t,i).pipe(e7(re),eM(e=>{let t=e.body.documents;return t?n.includeAllVersions?t:t[0]:n.includeAllVersions?[]:void 0}))}function ri(e,t,r,n={}){let i={uri:r_(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return rw(e,t,i).pipe(e7(re),eM(e=>{let t,n,i=(t=e.body.documents||[],n=e=>e._id,t.reduce((e,t)=>(e[n(t)]=t,e),Object.create(null)));return r.map(e=>i[e]||null)}))}function rs(e,t,r,n={}){return rg(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function ro(e,t,r,n){return tI("createIfNotExists",r),rm(e,t,r,"createIfNotExists",n)}function ra(e,t,r,n){return tI("createOrReplace",r),rm(e,t,r,"createOrReplace",n)}function ru(e,t,r,n,i){return tI("createVersion",r),tx("createVersion",r),tz(),ry(e,t,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function rc(e,t,r,n,i,s,o){if(!n)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return tE("createVersion",n),tE("createVersion",r),ry(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?ti(r,i):tn(r),ifBaseRevisionId:s},o)}function rl(e,t,r,n){return rg(e,t,"mutate",{mutations:[{delete:t1(r)}]},n)}function rh(e,t,r,n=!1,i){return ry(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function rd(e,t,r,n){return tI("replaceVersion",r),tx("replaceVersion",r),ry(e,t,{actionType:"sanity.action.document.version.replace",document:r},n)}function rp(e,t,r,n,i){return ry(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function rf(e,t,r,n){let i;return rg(e,t,"mutate",{mutations:Array.isArray(i=r instanceof t2||r instanceof t6?{patch:r.serialize()}:r instanceof t5||r instanceof t7?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function ry(e,t,r,n){let i=Array.isArray(r)?r:[r],s=n&&n.transactionId||void 0;return rg(e,t,"actions",{actions:i,transactionId:s,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function rg(e,t,r,n,i={}){let s="mutate"===r,o="actions"===r,a=s||o?"":t8(n),u=!s&&!o&&a.length<11264,c=u?a:"",l=i.returnFirst,{timeout:h,token:d,tag:p,headers:f,returnQuery:y,lastLiveEventId:g,cacheMode:m}=i,b={method:u?"GET":"POST",uri:r_(e,r,c),json:!0,body:u?void 0:n,query:s&&((e={})=>{let t;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,!1===t?void 0:!!(typeof t>"u")||t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:f,token:d,tag:p,returnQuery:y,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(g)?g[0]:g,cacheMode:m,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn};return rw(e,t,b).pipe(e7(re),eM(rt),eM(e=>{if(!s)return e;let t=e.results||[];if(i.returnDocuments)return l?t[0]&&t[0].document:t.map(e=>e.document);let r=l?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[l?"documentId":"documentIds"]:r}}))}function rm(e,t,r,n,i={}){return rg(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let rb=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},rv=(e,t)=>
14rb(e)&&t.startsWith(r_(e,"query"));function rw(e,t,r){var n;let i=r.url||r.uri,s=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(i.startsWith("/data/")||rv(e,i)||rb(e)&&i.startsWith(r_(e,"mutate"))||rb(e)&&i.startsWith(r_(e,"doc",""))||rb(e)&&i.startsWith(r_(e,"listen"))||rb(e)&&i.startsWith(r_(e,"history",""))):r.canUseCdn,a=(r.useCdn??s.useCdn)&&o,u=r.tag&&s.requestTagPrefix?[s.requestTagPrefix,r.tag].join("."):r.tag||s.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:tA(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&rv(e,i)){let e=r.resultSourceMap??s.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||s.perspective;"u">typeof t&&("previewDrafts"===t&&tD(),tB(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&a&&(a=!1,tM())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),a&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(e,t={}){let r={};e.headers&&Object.assign(r,e.headers);let n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let i=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),s=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof s>"u"?3e5:s,proxy:t.proxy||e.proxy,json:!0,withCredentials:i,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(s,Object.assign({},r,{url:rR(e,i,a)})),l=new ed(e=>t(c,s.requester).subscribe(e));return r.signal?l.pipe((n=r.signal,e=>new ed(t=>{let r=()=>t.error(function(e){if(r$)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(n));if(n&&n.aborted)return void r();let i=e.subscribe(t);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):l}function rC(e,t,r){return rw(e,t,r).pipe(e7(e=>"response"===e.type),eM(e=>e.body))}function r_(e,t,r){let n=e.config();if(n.resource){tT(n);let e=rq(n),i=void 0!==r?`${t}/${r}`:t;return`${e}/${i}`.replace(/\/($|\?)/,"$1")}let i=tO(n),s=`/${t}/${i}`;return`/data${void 0!==r?`${s}/${r}`:s}`.replace(/\/($|\?)/,"$1")}function rR(e,t,r=!1){let{url:n,cdnUrl:i}=e.config();return`${r?i:n}/${t.replace(/^\//,"")}`}let r$=!!globalThis.DOMException,rq=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=t;switch(r){case"dataset":{let e=n.split(".");if(2!==e.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${e[0]}/datasets/${e[1]}`}case"canvas":return`/canvases/${n}`;case"media-library":return`/media-libraries/${n}`;case"dashboard":return`/dashboards/${n}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function rE(e,t,r){let n=tO(e.config());return rC(e,t,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function rI(e,t,r){let n=tO(e.config());return rC(e,t,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function rx(e,t,r){let n=tO(e.config());return rC(e,t,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class rO{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return rE(this.#a,this.#u,e)}transform(e){return rI(this.#a,this.#u,e)}translate(e){return rx(this.#a,this.#u,e)}}class rA{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return eU(rE(this.#a,this.#u,e))}transform(e){return eU(rI(this.#a,this.#u,e))}translate(e){return eU(rx(this.#a,this.#u,e))}prompt(e){var t,r;let n;return eU((t=this.#a,r=this.#u,n=tO(t.config()),rC(t,r,{method:"POST",uri:`/agent/action/prompt/${n}`,body:e})))}patch(e){var t,r;let n;return eU((t=this.#a,r=this.#u,n=tO(t.config()),rC(t,r,{method:"POST",uri:`/agent/action/patch/${n}`,body:e})))}}class rT{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return rS(this.#a,this.#u,e,t,r)}}class rj{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return eU(rS(this.#a,this.#u,e,t,r).pipe(e7(e=>"response"===e.type),eM(e=>e.body.document)))}}function rS(e,t,r,n,i={}){var s,o;if(-1===t_.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${t_.join(", ")}`);let a=i.extract||void 0;a&&!a.length&&(a=["none"]);let u=e.config(),c=(s=i,o=n,!(typeof File>"u")&&o instanceof File?Object.assign({filename:!1===s.preserveFilename?void 0:o.name,contentType:o.type},s):s),{tag:l,label:h,title:d,description:p,creditLine:f,filename:y,source:g}=c,m=u.resource?.type==="media-library",b=m?{title:d,filename:y}:{label:h,title:d,description:p,filename:y,meta:a,creditLine:f};return g&&!m&&(b.sourceId=g.id,b.sourceName=g.name,b.sourceUrl=g.url),rw(e,t,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(e,t){let r="image"===t?"images":"files",n=e.resource;if(n){let{type:e,id:t}=n;switch(e){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${t}/assets/${r}`;case"media-library":return`/media-libraries/${t}/upload`;case"dashboard":return`/dashboards/${t}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let i=tO(e);return`assets/${r}/${i}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:b,body:n})}let rP=e$(()=>e.A(440574)).pipe(eM(({default:e})=>e),eB({connector:function(){return new eN(1,l,h)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:!1}));function rF(){return function(e){return e.pipe(eG((e,t)=>{var r;return e instanceof tG?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eJ(1)(eP(e,eE(e)))}(eF({type:"reconnect"}),(void 0===r&&(r=eZ),new ed(function(e){var t=1e3;t<0&&(t=0);var n=0;return r.schedule(function(){e.closed||(e.next(n++),e.complete())},t)})).pipe(eD(()=>t))):e0(()=>e)}
14))}}let rM=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],rD={includeResult:!0};function rk(e,t,r={}){let{url:n,token:i,withCredentials:s,requestTagPrefix:o,headers:a}=this.config(),u=r.tag&&o?[o,r.tag].join("."):r.tag,c={...Object.keys(rD).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?rD[t]:r[t],e),{}),tag:u},l=t8({query:e,params:t,options:{tag:u,...rM.reduce((e,t)=>(typeof c[t]>"u"||(e[t]=c[t]),e),{})}}),h=`${n}${r_(this,"listen",l)}`;if(h.length>14800)return e0(()=>Error("Query too large for listener"));let d=c.events?c.events:["mutation"],p={};return s&&(p.withCredentials=!0),(i||a)&&(p.headers={},i&&(p.headers.Authorization=`Bearer ${i}`),a&&Object.assign(p.headers,a)),tZ(()=>(typeof EventSource>"u"||p.headers?rP:eF(EventSource)).pipe(eM(e=>new e(h,p))),d).pipe(rF(),e7(e=>d.includes(e.type)),eM(e=>({type:e.type,..."data"in e?e.data:{}})))}let rU="2021-03-25";class rV{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t,waitFor:r}={}){var n,i,s,o;let{projectId:a,apiVersion:u,token:c,withCredentials:l,requestTagPrefix:h,headers:d}=this.#a.config(),p=u.replace(/^v/,"");if("X"!==p&&p<rU)throw Error(`The live events API requires API version ${rU} or later. The current API version is ${p}. Please update your API version to use this feature.`);if(e&&!c&&!l)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let f=r_(this.#a,"live/events"),y=new URL(this.#a.getUrl(f,!1)),g=t&&h?[h,t].join("."):t;g&&y.searchParams.set("tag",g),e&&y.searchParams.set("includeDrafts","true"),r&&y.searchParams.set("waitFor",r);let m={};e&&l&&(m.withCredentials=!0),(e&&c||d)&&(m.headers={},e&&c&&(m.headers.Authorization=`Bearer ${c}`),d&&Object.assign(m.headers,d));let b=`${y.href}::${JSON.stringify(m)}`,v=rz.get(b);if(v)return v;let w=tZ(()=>(typeof EventSource>"u"||m.headers?rP:eF(EventSource)).pipe(eM(e=>new e(y.href,m))),["message","restart","welcome","reconnect","goaway"]),C=(i=y,s={method:"OPTIONS",mode:"cors",credentials:m.withCredentials?"include":"omit",headers:m.headers},new ed(e=>{let t=new AbortController,r=t.signal;return fetch(i,{...s,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe(eG(()=>{throw new tm({projectId:a})})),_=w.pipe(rF(),eD(e=>"reconnect"===e.type?C.pipe(eD(()=>eF(e))):eF(e)),eG(e=>C.pipe(eD(()=>{throw e}))),eM(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe(e1(()=>rz.delete(b)),(o="function"==typeof(n={predicate:e=>"welcome"===e.type})?{predicate:n,...void 0}:n,e=>{var t,r;let n,i=!1,{predicate:s,...a}=o;return function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=eE(t),i=(e=1/0,"number"==typeof eq(t)?t.pop():e);return t.length?1===t.length?e_(t[0]):eJ(i)(eP(t,n)):e3}(e.pipe((r=U(t=e=>{o.predicate(e)&&(i=!0,n=e)})?{next:t,error:void 0,complete:void 0}:t)?ex(function(e,t){null==(n=r.subscribe)||n.call(r);var n,i=!0;e.subscribe(eO(t,function(e){var n;null==(n=r.next)||n.call(r,e),t.next(e)},function(){var e;i=!1,null==(e=r.complete)||e.call(r),t.complete()},function(e){var n;i=!1,null==(n=r.error)||n.call(r,e),t.error(e)},function(){var e,t;i&&(null==(e=r.unsubscribe)||e.call(r)),null==(t=r.finalize)||t.call(r)}))}):el,e1(()=>{i=!1,n=void 0}),eB(a)),new ed(e=>{i&&e.next(n),e.complete()}))}));return rz.set(b,_),_}}let rz=new Map;class rL{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return rB(this.#a,this.#u,"PUT",e,t)}edit(e,t){return rB(this.#a,this.#u,"PATCH",e,t)}delete(e){return rB(this.#a,this.#u,"DELETE",e)}list(){tj("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),rC(this.#a,this.#u,{uri:r,tag:null})}getEmbeddingsSettings(e){return tj("dataset",this.#a.config()),t$(e),rC(this.#a,this.#u,{uri:rN(this.#a,e),tag:null})}editEmbeddingsSettings(e,t){return tj("dataset",this.#a.config()),t$(e),rC(this.#a,this.#u,{method:"PUT",uri:rN(this.#a,e),body:t,tag:null})}}class rH{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}create(e,t){return tj("dataset",this.#a.config()),eU(rB(this.#a,this.#u,"PUT",e,t))}edit(e,t){return tj("dataset",this.#a.config()),eU(rB(this.#a,this.#u,"PATCH",e,t))}delete(e){return tj("dataset",this.#a.config()),eU(rB(this.#a,this.#u,"DELETE",e))}list(){tj("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),eU(rC(this.#a,this.#u,{uri:r,tag:null}))}getEmbeddingsSettings(e){return tj("dataset",this.#a.config()),t$(e),eU(rC(this.#a,this.#u,{uri:rN(this.#a,e),tag:null}))}editEmbeddingsSettings(e,t){return tj("dataset",this.#a.config()),t$(e),eU(rC(this.#a,this.#u,{method:"PUT",uri:rN(this.#a,e),body:t,tag:null}))}}function rN(e,t){let r=e.config();return!1===r.useProjectHostname?`/projects/${r.projectId}/datasets/${t}/settings/embeddings`:`/datasets/${t}/settings/embeddings`}function rB(e,t,r,n,i){return tj("dataset",e.config()),t$(n),rC(e,t,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class rW{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){var r,n;let i=this.#a.config(),s=(i.resource||i["~experimental_resource"])?.id,{instanceId:o,libraryId:a}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=rJ.exec(t);if(r){let[,e,t]=r;return{libraryId:e,instanceId:t}}if("string"==typeof e&&e.startsWith("video-"))return{instanceId:e};throw Error(`Invalid video asset instance identifier "${t}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}(e),u=a||s;if(!u)throw Error("Could not determine Media Library ID - you need to provide a valid Media Library ID in the client config or a Media Library GDR");let c=(r=o,n=u,`/media-libraries/${n}/video/${r}/playback-info`),l=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:n,storyboard:i}=e.transformations;r&&(r.width&&(t.thumbnailWidth=r.width),r.height&&(t.thumbnailHeight=r.height),void 0!==r.time&&(t.thumbnailTime=r.time),r.fit&&(t.thumbnailFit=r.fit),r.format&&(t.thumbnailFormat=r.format)),n&&(n.width&&(t.animatedWidth=n.width),n.height&&(t.animatedHeight=n.height),void 0!==n.start&&(t.animatedStart=n.start),void 0!==n.end&&(t.animatedEnd=n.end),n.fps&&(t.animatedFps=n.fps),n.format&&(t.animatedFormat=n.format)),i&&i.format&&(t.storyboardFormat=i.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return rC(this.#a,this.#u,{method:"GET",uri:c,query:l})}}class rG{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return eU(new rW(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let rJ=/^media-library:(ml[^:]+):([^:]+)$/;class rY{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.includeFeatures===!1&&(t.includeFeatures="false"),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership="true"),rC(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return rC(this.#a,this.#u,{uri:`/projects/${e}`})}}class rQ{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.includeFeatures===!1&&(t.includeFeatures="false"),e?.organizationId&&(t.organizationId=e.organizationId),e?.onlyExplicitMembership&&(t.onlyExplicitMembership="true"),eU(rC(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return eU(rC(this.#a,this.#u,{uri:`/projects/${e}`}))}}let rK=((e,t=21)=>{var r;let n,i;return r=t,i=-~(1.6*(n=(2<<Math.log(e.length-1)/Math.LN2)-1)*r/e.length),(t=r)=>{let s="";for(;;){let r=ta(i),o=0|i;for(;o--;)if((s+=e[r[o]&n]||"").length===t)return s}}})("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),rX=(e,t)=>t?ti(e,t):tn(e);function rZ(e,{releaseId:t,publishedId:r,document:n}){if(r&&n._id){let e=rX(r,t);return((e,t)=>{if(t._id&&t._id!==e)throw Error(`The provided document ID (\`${t._id}\`) does not match the generated version ID (\`${e}\`)`)})(e,n),e}if(n._id){let r=tt(n._id),i=tr(n._id);if(!r&&!i)throw Error(`\`${e}()\` requires a document with an \`_id\` that is a version or draft ID`);if(t){if(r)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let i=ts(n._id);if(i!==t)throw Error(`\`${e}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${i}\`).`)}return n._id}if(r)return rX(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let r0=(e,t)=>{let[r,n,i]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=rK(),metadata:n={}}=e;return[r,n,t]}return[rK(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class r1{#a;#u;
14constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return rn(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:n}=r0(e,t),{releaseId:i,metadata:s}=r;return ry(this.#a,this.#u,r,n).pipe(eM(e=>({...e,releaseId:i,metadata:s})))}edit({releaseId:e,patch:t},r){return ry(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return ry(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return ry(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return ry(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return ry(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return ry(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return ry(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return rs(this.#a,this.#u,e,t)}}class r3{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return eU(rn(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:n}=r0(e,t),{releaseId:i,metadata:s}=r;return{...await eU(ry(this.#a,this.#u,r,n)),releaseId:i,metadata:s}}edit({releaseId:e,patch:t},r){return eU(ry(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return eU(ry(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return eU(ry(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return eU(ry(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return eU(ry(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return eU(ry(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return eU(ry(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return eU(rs(this.#a,this.#u,e,t))}}class r6{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return rC(this.#a,this.#u,{uri:`/users/${e}`})}}class r2{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return eU(rC(this.#a,this.#u,{uri:`/users/${e}`}))}}class r9{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#l;#u;listen=rk;constructor(e,t=tH){this.config(t),this.#l=e;const r=t._requestHandler;this.#u=r?(()=>{let n;return(i,s)=>(n||(n=new r4(e,{...t,_requestHandler:void 0})),r(i,t=>e(t,s),n))})():e,this.assets=new rT(this,this.#u),this.datasets=new rL(this,this.#u),this.live=new rV(this),this.mediaLibrary={video:new rW(this,this.#u)},this.projects=new rY(this,this.#u),this.users=new r6(this,this.#u),this.agent={action:new rO(this,this.#u)},this.releases=new r1(this,this.#u)}clone(){return new r9(this.#l,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#c=tW(e,this.#c||{}),this}withConfig(e){let t=this.config();return new r9(this.#l,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return rr(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return rn(this,this.#u,e,{...t,includeAllVersions:!0});let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return rn(this,this.#u,e,r)}getDocuments(e,t){return ri(this,this.#u,e,t)}create(e,t){return rm(this,this.#u,e,"create",t)}createIfNotExists(e,t){return ro(this,this.#u,e,t)}createOrReplace(e,t){return ra(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return rc(this,this.#u,t,n,r,i,s);let o=rZ("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||to(e._id);return ru(this,this.#u,a,u,s)}delete(e,t){return rl(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,n){let i=rX(t,e);return rh(this,this.#u,i,r,n)}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=rZ("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return rd(this,this.#u,s,n)}unpublishVersion({releaseId:e,publishedId:t},r){let n=ti(t,e);return rp(this,this.#u,n,t,r)}mutate(e,t){return rf(this,this.#u,e,t)}patch(e,t){return new t6(e,t,this)}transaction(e){return new t7(e,this)}action(e,t){return ry(this,this.#u,e,t)}request(e){return rC(this,this.#u,e)}getUrl(e,t){return rR(this,e,t)}getDataUrl(e,t){return r_(this,e,t)}}class r4{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#l;#u;listen=rk;constructor(e,t=tH){this.config(t),this.#l=e;const r=t._requestHandler;this.#u=r?(()=>{let n;return(i,s)=>(n||(n=new r4(e,{...t,_requestHandler:void 0})),r(i,t=>e(t,s),n))})():e,this.assets=new rj(this,this.#u),this.datasets=new rH(this,this.#u),this.live=new rV(this),this.mediaLibrary={video:new rG(this,this.#u)}
14,this.projects=new rQ(this,this.#u),this.users=new r2(this,this.#u),this.agent={action:new rA(this,this.#u)},this.releases=new r3(this,this.#u),this.observable=new r9(e,t)}clone(){return new r4(this.#l,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#c=tW(e,this.#c||{}),this}withConfig(e){let t=this.config();return new r4(this.#l,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return eU(rr(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return eU(rn(this,this.#u,e,{...t,includeAllVersions:!0}));let r={signal:t?.signal,tag:t?.tag,releaseId:t?.releaseId,...t&&"includeAllVersions"in t?{includeAllVersions:!1}:{}};return eU(rn(this,this.#u,e,r))}getDocuments(e,t){return eU(ri(this,this.#u,e,t))}create(e,t){return eU(rm(this,this.#u,e,"create",t))}createIfNotExists(e,t){return eU(ro(this,this.#u,e,t))}createOrReplace(e,t){return eU(ra(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:n,ifBaseRevisionId:i},s){if(!e)return e6(rc(this,this.#u,t,n,r,i,s));let o=rZ("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||to(e._id);return e6(ru(this,this.#u,a,u,s))}delete(e,t){return eU(rl(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,n){let i=rX(t,e);return eU(rh(this,this.#u,i,r,n))}replaceVersion({document:e,publishedId:t,releaseId:r},n){let i=rZ("replaceVersion",{document:e,publishedId:t,releaseId:r}),s={...e,_id:i};return e6(rd(this,this.#u,s,n))}unpublishVersion({releaseId:e,publishedId:t},r){let n=ti(t,e);return eU(rp(this,this.#u,n,t,r))}mutate(e,t){return eU(rf(this,this.#u,e,t))}patch(e,t){return new t2(e,t,this)}transaction(e){return new t5(e,this)}action(e,t){return eU(ry(this,this.#u,e,t))}request(e){return eU(rC(this,this.#u,e))}dataRequest(e,t,r){return eU(rg(this,this.#u,e,t,r))}getUrl(e,t){return rR(this,e,t)}getDataUrl(e,t){return r_(this,e,t)}}let r5={requester:tv(d=[]),createClient:e=>{let t=tv(d,{ignoreWarnings:e.ignoreWarnings});return new r4((r,n)=>(n||t)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...r}),e)}},r7=(r5.requester,r5.createClient),r8=r7({projectId:"gg49te7e",dataset:"production",apiVersion:"2024-10-01",useCdn:!0,perspective:"published"});e.s(["client",0,r8],433714)},723927,e=>{"use strict";var t,r,n;let i,s,o="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function a(e){return`image-${e.split("/").slice(-1)[0]}`.replace(/\.([a-z]+)$/,"-$1")}let u=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"],["frame","frame"]],c=["clip","crop","fill","fillmax","max","scale","min"],l=["top","bottom","left","right","center","focalpoint","entropy"],h=["format"];function d(e){let{apiHost:t,projectId:r,dataset:n}=e,i={baseUrl:(t||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn.")},s=e.resource??e["~experimental_resource"];if(s?.type==="media-library"){if("string"!=typeof s.id||0===s.id.length)throw Error('Media library clients must include an id in "resource"');return{...i,mediaLibraryId:s.id}}if(s?.type==="canvas"){if("string"!=typeof s.id||0===s.id.length)throw Error('Canvas clients must include an id in "resource"');return{...i,canvasId:s.id}}if(s?.type==="dataset"){if("string"!=typeof s.id||0===s.id.length)throw Error('Dataset clients must include an id in "resource"');let[e,t]=s.id.split(".");if(!e||!t)throw Error('Dataset resource id must be in the format "projectId.dataset", got: '+s.id);return{...i,projectId:e,dataset:t}}return{...i,projectId:r,dataset:n}}function p(e){return e&&"config"in e&&"function"==typeof e.config?d(e.config()):e&&"clientConfig"in e&&"object"==typeof e.clientConfig?d(e.clientConfig):e||{}}class f{options;constructor(e,t){this.options=e?{...e.options||{},...t||{}}:{...t||{}}}withOptions(e){return new f(this,function(e,t){let r=t.baseUrl||e.baseUrl,n={baseUrl:r};for(let e in t)t.hasOwnProperty(e)&&(n[function(e){for(let t of u){let[r,n]=t;if(e===r||e===n)return r}return e}(e)]=t[e]);return{baseUrl:r,...n}}(this.options,e))}image(e){return this.withOptions({source:e})}dataset(e){return this.withOptions({dataset:e})}projectId(e){return this.withOptions({projectId:e})}withClient(e){let t=p(e),r={...this.options};return delete r.baseUrl,delete r.projectId,delete r.dataset,delete r.mediaLibraryId,delete r.canvasId,new f(null,{...t,...r})}bg(e){return this.withOptions({bg:e})}dpr(e){return this.withOptions(e&&1!==e?{dpr:e}:{})}width(e){return this.withOptions({width:e})}height(e){return this.withOptions({height:e})}focalPoint(e,t){return this.withOptions({focalPoint:{x:e,y:t}})}maxWidth(e){return this.withOptions({maxWidth:e})}minWidth(e){return this.withOptions({minWidth:e})}maxHeight(e){return this.withOptions({maxHeight:e})}minHeight(e){return this.withOptions({minHeight:e})}size(e,t){return this.withOptions({width:e,height:t})}blur(e){return this.withOptions({blur:e})}
14sharpen(e){return this.withOptions({sharpen:e})}rect(e,t,r,n){return this.withOptions({rect:{left:e,top:t,width:r,height:n}})}format(e){return this.withOptions({format:e})}invert(e){return this.withOptions({invert:e})}orientation(e){return this.withOptions({orientation:e})}quality(e){return this.withOptions({quality:e})}forceDownload(e){return this.withOptions({download:e})}flipHorizontal(){return this.withOptions({flipHorizontal:!0})}flipVertical(){return this.withOptions({flipVertical:!0})}ignoreImageParams(){return this.withOptions({ignoreImageParams:!0})}fit(e){if(-1===c.indexOf(e))throw Error(`Invalid fit mode "${e}"`);return this.withOptions({fit:e})}crop(e){if(-1===l.indexOf(e))throw Error(`Invalid crop mode "${e}"`);return this.withOptions({crop:e})}saturation(e){return this.withOptions({saturation:e})}auto(e){if(-1===h.indexOf(e))throw Error(`Invalid auto mode "${e}"`);return this.withOptions({auto:e})}pad(e){return this.withOptions({pad:e})}vanityName(e){return this.withOptions({vanityName:e})}frame(e){if(1!==e)throw Error(`Invalid frame value "${e}"`);return this.withOptions({frame:e})}url(){return function(e){let t={...e||{}},r=t.source;delete t.source;let n=function(e){var t;let r;if(!e)return null;if("string"==typeof e&&(t=e,/^https?:\/\//.test(`${t}`)))r={asset:{_ref:a(e)}};else if("string"==typeof e)r={asset:{_ref:e}};else if(e&&"string"==typeof e._ref)r={asset:e};else if(e&&"string"==typeof e._id)r={asset:{_ref:e._id||""}};else if(e&&e.asset&&"string"==typeof e.asset.url)r={asset:{_ref:a(e.asset.url)}};else{if("object"!=typeof e.asset)return null;r={...e}}return e.crop&&(r.crop=e.crop),e.hotspot&&(r.hotspot=e.hotspot),function(e){if(e.crop&&e.hotspot)return e;let t={...e};return t.crop||(t.crop={left:0,top:0,bottom:0,right:0}),t.hotspot||(t.hotspot={x:.5,y:.5,height:1,width:1}),t}(r)}(r);if(!n){if(r&&"object"==typeof r&&null!==r&&r._upload&&(!r.asset||!r.asset._ref))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8HwQACfsD/QNViZkAAAAASUVORK5CYII=";throw Error(`Unable to resolve image URL from source (${JSON.stringify(r)})`)}let i=function(e){let[,t,r,n]=e.split("-");if(!t||!r||!n)throw Error(`Malformed asset _ref '${e}'. Expected an id like "${o}".`);let[i,s]=r.split("x"),a=+i,u=+s;if(!(isFinite(a)&&isFinite(u)))throw Error(`Malformed asset _ref '${e}'. Expected an id like "${o}".`);return{id:t,width:a,height:u,format:n}}(n.asset._ref||n.asset._id||""),s=Math.round(n.crop.left*i.width),c=Math.round(n.crop.top*i.height),l={left:s,top:c,width:Math.round(i.width-n.crop.right*i.width-s),height:Math.round(i.height-n.crop.bottom*i.height-c)},h=n.hotspot.height*i.height/2,d=n.hotspot.width*i.width/2,p=n.hotspot.x*i.width,f=n.hotspot.y*i.height;return t.rect||t.focalPoint||t.ignoreImageParams||t.crop||(t={...t,...function(e,t){let r,n=t.width,i=t.height;if(!(n&&i))return{width:n,height:i,rect:e.crop};let s=e.crop,o=e.hotspot,a=n/i;if(s.width/s.height>a){let e=Math.round(s.height),t=Math.round(e*a),n=Math.max(0,Math.round(s.top)),i=Math.max(0,Math.round(Math.round((o.right-o.left)/2+o.left)-t/2));i<s.left?i=s.left:i+t>s.left+s.width&&(i=s.left+s.width-t),r={left:i,top:n,width:t,height:e}}else{let e=s.width,t=Math.round(e/a),n=Math.max(0,Math.round(s.left)),i=Math.max(0,Math.round(Math.round((o.bottom-o.top)/2+o.top)-t/2));i<s.top?i=s.top:i+t>s.top+s.height&&(i=s.top+s.height-t),r={left:n,top:i,width:e,height:t}}return{width:n,height:i,rect:r}}({crop:l,hotspot:{left:p-d,top:f-h,right:p+d,bottom:f+h}},t)}),function(e){let t,r=(e.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),n=e.vanityName?`/${e.vanityName}`:"",i=`${e.asset.id}-${e.asset.width}x${e.asset.height}.${e.asset.format}${n}`;t=e.mediaLibraryId?`${r}/media-libraries/${e.mediaLibraryId}/images/${i}`:e.canvasId?`${r}/images/canvases/${e.canvasId}/${i}`:`${r}/images/${e.projectId}/${e.dataset}/${i}`;let s=[];if(e.rect){let{left:t,top:r,width:n,height:i}=e.rect;(0!==t||0!==r||i!==e.asset.height||n!==e.asset.width)&&s.push(`rect=${t},${r},${n},${i}`)}e.bg&&s.push(`bg=${e.bg}`),e.focalPoint&&(s.push(`fp-x=${e.focalPoint.x}`),s.push(`fp-y=${e.focalPoint.y}`));
14let o=[e.flipHorizontal&&"h",e.flipVertical&&"v"].filter(Boolean).join("");return o&&s.push(`flip=${o}`),u.forEach(t=>{let[r,n]=t;"u">typeof e[r]?s.push(`${n}=${encodeURIComponent(e[r])}`):"u">typeof e[n]&&s.push(`${n}=${encodeURIComponent(e[n])}`)}),0===s.length?t:`${t}?${s.join("&")}`}({...t,asset:i})}(this.options)}toString(){return this.url()}}let y=(t=["The default export of @sanity/image-url has been deprecated. Use the named export `createImageUrlBuilder` instead."],r=(...e)=>{console.warn(t.join(" "),...e)},i=!1,(...e)=>(i||(s=r(...e),i=!0),s)),g=(n=function(e){return new f(null,p(e))},function(e){return y(),n(e)});e.s(["default",0,g],723927)},865896,e=>{"use strict";var t=e.i(723927),r=e.i(433714);let n=(0,t.default)(r.client);e.s(["imgUrl",0,function(e,{width:t,height:r,quality:i=85}={}){if(!e)return null;let s=n.image(e).auto("format").quality(i);return t&&(s=s.width(t)),r&&(s=s.height(r)),s.url()}])}]);

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.