PageSourceSearch

https://dlthub.com/_next/static/chunks/0gg-m3f~gtfy8.js

js dlthub.com collected 2026-10-03 20:51:57 UTC 64,726 bytes, 13 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,698145,107894,e=>{"use strict";let t=!(typeof navigator>"u")&&"ReactNative"===navigator.product,r={timeout:t?6e4:12e4},s=function(e){let s={...r,..."string"==typeof e?{url:e}:e};if(s.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let s=Number(t);return isNaN(s)?e(r.timeout):{connect:s,socket:s}}(s.timeout),s.query){let{url:e,searchParams:r}=function(e){let r=e.indexOf("?");if(-1===r)return{url:e,searchParams:new URLSearchParams};let s=e.slice(0,r),i=e.slice(r+1);if(!t)return{url:s,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let o=new URLSearchParams;for(let e of i.split("&")){let[t,r]=e.split("=");t&&o.append(n(t),n(r||""))}return{url:s,searchParams:o}}(s.url);for(let[t,n]of Object.entries(s.query)){if(void 0!==n)if(Array.isArray(n))for(let e of n)r.append(t,e);else r.append(t,n);let i=r.toString();i&&(s.url=`${e}?${i}`)}}return s.method=s.body&&!s.method?"POST":(s.method||"GET").toUpperCase(),s};function n(e){return decodeURIComponent(e.replace(/\+/g," "))}let i=/^https?:\/\//i,o=function(e){if(!i.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=(c=function(){if(d)return h;d=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return h=function(t){if(!t)return{};for(var r=Object.create(null),s=e(t).split("\n"),n=0;n<s.length;n++){var i,o=s[n],a=o.indexOf(":"),u=e(o.slice(0,a)).toLowerCase(),c=e(o.slice(a+1));typeof r[u]>"u"?r[u]=c:(i=r[u],"[object Array]"===Object.prototype.toString.call(i))?r[u].push(c):r[u]=[r[u],c]}return r}}())&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;class f{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#s={};#n;#i={};#o;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#n=void 0}abort(){this.#n&&this.#n.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#s[e]=t}setInit(e,t=!0){this.#i=e,this.#o=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#i,method:this.#e,headers:this.#s,body:e};"function"==typeof AbortController&&this.#o&&(this.#n=new AbortController,"u">typeof EventTarget&&this.#n.signal instanceof EventTarget&&(r.signal=this.#n.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 g="function"==typeof XMLHttpRequest?"xhr":"fetch",m="xhr"===g?XMLHttpRequest:f,y=(e,t)=>{let r=e.options,s=e.applyMiddleware("finalizeOptions",r),n={},i=e.applyMiddleware("interceptRequest",void 0,{adapter:g,context:e});if(i){let e=setTimeout(t,0,null,i);return{abort:()=>clearTimeout(e)}}let o=new m;o instanceof f&&"object"==typeof s.fetch&&o.setInit(s.fetch,s.useAbortSignal??!0);let a=s.headers,u=s.timeout,c=!1,l=!1,h=!1;if(o.onerror=e=>{b(o instanceof f?e instanceof Error?e:Error(`Request error while attempting to reach is ${s.url}`,{cause:e}):Error(`Request error while attempting to reach is ${s.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.ontimeout=e=>{b(Error(`Request timeout while attempting to reach ${s.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},o.onabort=()=>{y(!0),c=!0},o.onreadystatechange=function(){u&&(y(),n.socket=setTimeout(()=>d("ESOCKETTIMEDOUT"),u.socket)),!c&&o&&4===o.readyState&&0!==o.status&&function(){if(!(c||l||h)){if(0===o.status)return b(Error("Unknown XHR error"));y(),l=!0,t(null,{body:o.response||(""===o.responseType||"text"===o.responseType?o.responseText:""),url:s.url,method:s.method,headers:p(o.getAllResponseHeaders()),statusCode:o.status,statusMessage:o.statusText})}}()},o.open(s.method,s.url,!0),o.withCredentials=!!s.withCredentials,a&&o.setRequestHeader)for(let e in a)a.hasOwnProperty(e)&&o.setRequestHeader(e,a[e]);return s.rawBody&&(o.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:s,adapter:g,request:o,context:e}),o.send(s.body||null),u&&(n.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 ${s.url}`:`Connection timed out on request to ${s.url}`);r.code=t,e.channels.error.publish(r)}function y(e){(e||c||o&&o.readyState>=2&&n.connect)&&clearTimeout(n.connect),n.socket&&clearTimeout(n.socket)}function b(e){if(l)return;y(!0),l=!0,o=null;let r=e||Error(`Network error while attempting to reach ${s.url}`);r.isNetworkError=!0,r.request=s,t(r)}},b=(e=[],t=y)=>(function e(t,r){let n=[],i=u.reduce((e,t)=>
2(e[t]=e[t]||[],e),{processOptions:[s],validateOptions:[o]});function c(e){let t,s=a.reduce((e,t)=>{let r,s;return e[t]=(r=Object.create(null),s=0,{publish:function(e){for(let t in r)r[t](e)},subscribe:function(e){let t=s++;return r[t]=e,function(){delete r[t]}}}),e},{}),n=function(e,t,...r){let s="onError"===e,n=t;for(let t=0;t<i[e].length&&(n=(0,i[e][t])(n,...r),!s||n);t++);return n},o=n("processOptions",e);n("validateOptions",o);let u={options:o,channels:s,applyMiddleware:n},c=s.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let i=e,o=t;if(!i)try{o=n("onResponse",t,r)}catch(e){o=null,i=e}(i=i&&n("onError",i,r))?s.error.publish(i):o&&s.response.publish(o)})(t,r,e))});s.abort.subscribe(()=>{c(),t&&t.abort()});let l=n("onReturn",s,u);return l===s&&s.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&&i.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]&&i[t].push(e[t])}),n.push(e),c},c.clone=()=>e(n,r),t.forEach(c.use),c})(e,t);e.s(["adapter",0,g,"environment",0,"browser","getIt",0,b],107894);var w,v,C,R,q,E=e.i(426389),$=e.i(593109),I={exports:{}};q||(q=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 s=0,n=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(s++,"%c"===e&&(n=s))}),t.splice(n,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 E.default&&"env"in E.default&&(e=E.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+)/))&&("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?C:(R=1,C=function(e){function t(e){let s,n,i,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(s||r),a.prev=s,a.curr=r,s=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let n=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,s)=>{if("%%"===r)return"%";n++;let i=t.formatters[s];if("function"==typeof i){let t=e[n];r=i.call(a,t),e.splice(n,1),n--}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:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i),set
2:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let s=t(this.namespace+(typeof r>"u"?":":r)+e);return s.log=this.log,s}function s(e,t){let r=0,s=0,n=-1,i=0;for(;r<e.length;)if(s<t.length&&(t[s]===e[r]||"*"===t[s]))"*"===t[s]?(n=s,i=r):r++,s++;else{if(-1===n)return!1;s=n+1,r=++i}for(;s<t.length&&"*"===t[s];)s++;return s===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(s(e,r))return!1;for(let r of t.names)if(s(e,r))return!0;return!1},t.humanize=function(){if(v)return w;v=1;function e(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}return w=function(t,r){r=r||{};var s,n,i=typeof t;if("string"===i&&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"===i&&isFinite(t))return r.long?(n=Math.abs(t))>=864e5?e(t,n,864e5,"day"):n>=36e5?e(t,n,36e5,"hour"):n>=6e4?e(t,n,6e4,"minute"):n>=1e3?e(t,n,1e3,"second"):t+" ms":(s=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":s>=36e5?Math.round(t/36e5)+"h":s>=6e4?Math.round(t/6e4)+"m":s>=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:s}=e.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(I,I.exports)),I.exports,Object.prototype.hasOwnProperty;let T=typeof $.Buffer>"u"?()=>!1:e=>$.Buffer.isBuffer(e);function O(e){return"[object Object]"===Object.prototype.toString.call(e)}let j=["boolean","string","number"];var A="u">typeof globalThis?globalThis:"u">typeof window?window:e.g;let x=(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,s)=>new t((t,n)=>{let i=s.options.cancelToken;i&&i.promise.then(e=>{r.abort.publish(e),n(e)}),r.error.subscribe(n),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(s)}catch(e){n(e)}},0)})}};class S{__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class F{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 F(t=>{e=t}),cancel:e}}}x.Cancel=S,x.CancelToken=F,x.isCancel=e=>!(!e||!e?.__CANCEL__);var P=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function D(e){return 100*Math.pow(2,e)+100*Math.random()}let _=(e={})=>{var t;let r,s,n;return r=(t={shouldRetry:P,...e}).maxRetries||5,s=t.retryDelay||D,n=t.shouldRetry,{onError:(e,t)=>
2{var i;let o=t.options,a=o.maxRetries||r,u=o.retryDelay||s,c=o.shouldRetry||n,l=o.attemptNumber||0;if(null!==(i=o.body)&&"object"==typeof i&&"function"==typeof i.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}}};_.shouldRetry=P;var M=e.i(516165),k=e.i(159862),V=e.i(282519),U=e.i(187636);function L(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,V.popScheduler)(e);return(0,U.from)(e,r)}var N=e.i(827540),z=e.i(806298),H=(0,e.i(949918).createErrorClass)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function B(e,t){var r="object"==typeof t;return new Promise(function(s,n){var i,o=!1;e.subscribe({next:function(e){i=e,o=!0},error:n,complete:function(){o?s(i):r?s(t.defaultValue):n(new H)}})})}var G=e.i(30214),W=e.i(633482),J=e.i(7560),Q=e.i(866312);function Y(e){return(0,Q.operate)(function(t,r){var s,n=null,i=!1;n=t.subscribe((0,J.createOperatorSubscriber)(r,void 0,void 0,function(o){s=(0,W.innerFrom)(e(o,Y(e)(t))),n?(n.unsubscribe(),n=null,s.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(r))})}var K=e.i(544287);function X(e,t){var r=(0,N.isFunction)(e)?e:function(){return e},s=function(e){return e.error(r())};return new M.Observable(t?function(e){return t.schedule(s,0,e)}:s)}var Z=e.i(79357),ee=new(e.i(745491)).AsyncScheduler(Z.AsyncAction),et=(e.i(597961),e.i(448971));function er(e){return(0,Q.operate)(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var es=e.i(134671),en=e.i(178480),ei=e.i(913186),eo=e.i(521879);function ea(e,t){var r="object"==typeof t;return new Promise(function(s,n){var i=new eo.SafeSubscriber({next:function(e){s(e),i.unsubscribe()},error:n,complete:function(){r?s(t.defaultValue):n(new H)}});e.subscribe(i)})}var eu=e.i(79496),ec=e.i(824627),el=e.i(168);function eh(e,t,r){e?(0,el.executeSchedule)(r,e,t):t()}var ed=Array.isArray,ep=e.i(591607),ef=e.i(913072);function eg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,V.popResultSelector)(e);return r?(0,ef.pipe)(eg.apply(void 0,(0,ec.__spreadArray)([],(0,ec.__read)(e))),(0,ep.mapOneOrManyArgs)(r)):(0,Q.operate)(function(t,r){var s,n;(s=(0,ec.__spreadArray)([t],(0,ec.__read)(1===e.length&&ed(e[0])?e[0]:e)),void 0===n&&(n=et.identity),function(e){eh(void 0,function(){for(var t=s.length,r=Array(t),i=t,o=t,a=function(t){eh(void 0,function(){var a=(0,U.from)(s[t],void 0),u=!1;a.subscribe((0,J.createOperatorSubscriber)(e,function(s){r[t]=s,!u&&(u=!0,o--),o||e.next(n(r.slice()))},function(){--i||e.complete()}))},e)},u=0;u<t;u++)a(u)},e)})(r)})}var em=e.i(80205),ey=e.i(545636);let eb=e=>crypto.getRandomValues(new Uint8Array(e)),ew=/\r\n|[\n\r\u2028\u2029]/;function ev(e,t){let r=0;for(let s=0;s<t.length;s++){let n=t[s].length+1;if(r+n>e)return{line:s+1,column:e-r};r+=n}return{line:t.length,column:t[t.length-1]?.length??0}}class eC extends Error{response;statusCode=400;responseBody;details;constructor(e,t){const r=eq(e,t);super(r.message),Object.assign(this,r)}}
2class eR extends Error{response;statusCode=500;responseBody;details;constructor(e){const t=eq(e);super(t.message),Object.assign(this,t)}}function eq(e,t){var r,s,n;let i=e.body,o={response:e,statusCode:e.statusCode,responseBody:(r=i,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),message:"",details:void 0};if(!(0,eu.isRecord)(i))return o.message=eI(e,i),o;let a=i.error;if("string"==typeof a&&"string"==typeof i.message)return o.message=`${a} - ${i.message}`,o;if("object"!=typeof a||null===a)return"string"==typeof a?o.message=a:"string"==typeof i.message?o.message=i.message:o.message=eI(e,i),o;if("type"in(s=a)&&"mutationError"===s.type&&"description"in s&&"string"==typeof s.description||"type"in(n=a)&&"actionError"===n.type&&"description"in n&&"string"==typeof n.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}${r}`,o.details=i.error,o}return eE(a)?(o.message=e$(a,t?.options?.query?.tag),o.details=i.error):"description"in a&&"string"==typeof a.description?(o.message=a.description,o.details=a):o.message=eI(e,i),o}function eE(e){return(0,eu.isRecord)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function e$(e,t){let{query:r,start:s,end:n,description:i}=e;if(!r||typeof s>"u")return`GROQ query parse error: ${i}`;let o=t?`
6
7Tag: ${t}`:"";return`GROQ query parse error:
8${function(e,t,r){let s=e.split(ew),{start:n,end:i,markerLines:o}=function(e,t){let r={...e.start},s={...r,...e.end},n=r.line??-1,i=r.column??0,o=s.line,a=s.column,u=Math.max(n-3,0),c=Math.min(t.length,o+3);-1===n&&(u=0),-1===o&&(c=t.length);let l=o-n,h={};if(l)for(let e=0;e<=l;e++){let r=e+n;if(i)if(0===e){let e=t[r-1].length;h[r]=[i,e-i+1]}else if(e===l)h[r]=[0,a];else{let s=t[r-e].length;h[r]=[0,s]}else h[r]=!0}else i===a?i?h[n]=[i,0]:h[n]=!0:h[n]=[i,a-i];return{start:u,end:c,markerLines:h}}({start:ev(t.start,s),end:t.end?ev(t.end,s):void 0},s),a=`${i}`.length;return e.split(ew,i).slice(n,i).map((e,t)=>{let s=n+1+t,i=` ${` ${s}`.slice(-a)} |`,u=o[s],c=!o[s+1];if(!u)return` ${i}${e.length>0?` ${e}`:""}`;let l="";if(Array.isArray(u)){let t=e.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),s=u[1]||1;l=`
9 `+i.replace(/\d/g," ")+" "+t+"^".repeat(s),c&&r&&(l+=" "+r)}return">"+i+(e.length>0?` ${e}`:"")+l}).join(`
10`)}(r,{start:s,end:n},i)}${o}`}function eI(e,t){var r;let s="string"==typeof t?` (${(r=t).length>100?`${r.slice(0,100)}\u2026`:r})`:"",n=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${n}${s}`}class eT 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 eO={onResponse:(e,t)=>{if(e.statusCode>=500)throw new eR(e);if(e.statusCode>=400)throw new eC(e,t);return e}};function ej(e,t={}){return b([_({shouldRetry:eA}),...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 s=e.headers["x-sanity-warning"];for(let e of Array.isArray(s)?s:[s])!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||T(t)||-1===j.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 s(e){return t=>{let s=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:s,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=s("upload")),"onprogress"in t&&(t.onprogress=s("download"))}},eO,function(e={}){let t=e.implementation||A.Observable;if(!t)throw Error("`Observable` is not available in global scope, and n
10o 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:M.Observable})])}function eA(e,t,r){if(0===r.maxRetries)return!1;let s="GET"===r.method||"HEAD"===r.method,n=(r.uri||r.url).startsWith("/data/query"),i=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!s||!!n)&&!!i||_.shouldRetry(e,t,r)}function ex(e){return"https://www.sanity.io/help/"+e}let eS=["image","file"],eF=["before","after","replace"],eP=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")},eD=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},e_=(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`)},eM=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);e_(e,t._id)},ek=(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`)},eV=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")},eU=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},eL=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:s}=t;switch(r){case"dataset":if(2!==s.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()}`)}},eN=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},ez=e=>{var t;let r,s;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(s=t(...e),r=!0),s)},eH=ez(["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"]),eB=ez(["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."]),eG=ez(["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."]),eW=ez(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),eJ=ez(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${ex("js-client-browser-token")} for more information and how to hide this warning.`]),eQ=ez(["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`."]),eY=ez(["Using the Sanity client without specifying an API version is deprecated.",`See ${ex("js-client-api-version")}`]),eK=(ez(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),ez(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),eX=ez(["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."]),eZ={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},e0=["localhost","127.0.0.1","0.0.0.0"];function e1(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 e3=(e,t)=>
10{let r,s={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||eZ.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};s.apiVersion||eY();let n={...eZ,...s};n["~experimental_resource"]&&!n.resource&&(eX(),n.resource=n["~experimental_resource"]);let i=n.resource,o=n.useProjectHostname&&!i;if(typeof Promise>"u"){let e=ex("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(o&&!n.projectId)throw Error("Configuration must contain `projectId`");if(i&&eL(n),"u">typeof n.perspective&&e1(n.perspective),"encodeSourceMap"in n)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 n)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 n.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${n.stega.enabled}`);if(n.stega.enabled&&void 0===n.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(n.stega.enabled&&"string"!=typeof n.stega.studioUrl&&"function"!=typeof n.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${n.stega.studioUrl}`);let a="u">typeof window&&window.location&&window.location.hostname,u=a&&(r=window.location.hostname,-1!==e0.indexOf(r)),c=!!n.token;n.withCredentials&&c&&(eQ(),n.withCredentials=!1),a&&u&&c&&!0!==n.ignoreBrowserTokenWarning?eJ():typeof n.useCdn>"u"&&eB(),o&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(n.projectId),n.dataset&&eP(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?eU(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===eZ.apiHost,!0===n.useCdn&&n.withCredentials&&eH(),n.useCdn=!1!==n.useCdn&&!n.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`")}(n.apiVersion);let l=n.apiHost.split("://",2),h=l[0],d=l[1],p=n.isDefaultApi?"apicdn.sanity.io":d;return o?(n.url=`${h}://${n.projectId}.${d}/v${n.apiVersion}`,n.cdnUrl=`${h}://${n.projectId}.${p}/v${n.apiVersion}`):(n.url=`${n.apiHost}/v${n.apiVersion}`,n.cdnUrl=n.url),n};class e6 extends Error{name="ConnectionFailedError"}class e9 extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class e5 extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class e2 extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class e4 extends Error{name="MessageParseError"}let e8=["channelError","disconnect"];function e7(e,t){return(0,k.defer)(()=>{let t=e();return t&&(t instanceof M.Observable||(0,N.isFunction)(t.lift)&&(0,N.isFunction)(t.subscribe))?t:L(t)}).pipe((0,z.mergeMap)(e=>{var r,s;return r=e,s=t,new M.Observable(e=>{let t=s.includes("open"),n=s.includes("reconnect");function i(t){if("data"in t){let[r,s]=te(t);e.error(r?new e4("Unable to parse EventSource error message",{cause:s}):new e2((s?.data).message,s));return}r.readyState===r.CLOSED?e.error(new e6("EventSource connection failed")):n&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[s,n]=te(t);if(s)return void e.error(new e4("Unable to parse EventSource message",{cause:s}));if("channelError"===t.type){var i,o;let t,s=new URL(r.url).searchParams.get("tag");e.error(new e5((i=n?.data,o=s,(t=i.error)?eE(t)?e$(t,o):t.description?t.description:"string"==typeof t?t:JSON.stringify(t,null,2):i.message||"Unknown listener error"),n.data));return}"disconnect"===t.type?e.error(new e9(`Server disconnected client: ${n.data?.reason||"unknown error"}`)):e.next({type:t.type,id:t.lastEventId,...n.data?{data:n.data}:{}})}r.addEventListener("error",i),t&&r.addEventListener("open",o);let u=[...new Set([...e8,...s])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);
10return u.forEach(e=>r.addEventListener(e,a)),()=>{r.removeEventListener("error",i),t&&r.removeEventListener("open",o),u.forEach(e=>r.removeEventListener(e,a)),r.close()}})}))}function te(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 tt(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(`
11`);throw Error(`Unknown selection - must be one of:
12
13${t}`)}class tr{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 eD("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 s="insert(at, selector, items)";if(-1===eF.indexOf(e)){let e=eF.map(e=>`"${e}"`).join(", ");throw Error(`${s} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${s} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${s} 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,s){let n=t<0?t-1:t,i=typeof r>"u"||-1===r?-1:Math.max(0,t+r),o=`${e}[${n}:${n<0&&i>=0?"":i}]`;return this.insert("replace",o,s||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...tt(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return eD(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 ts extends tr{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new ts(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 tn extends tr{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new tn(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 ti={returnDocuments:!1};class to{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return eD("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return eD(t,e),eM(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return eD(t,e),eM(t,e),this._add({[t]:e})}delete(e){return e_("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 ta extends to{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new ta([...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},ti,e||{}))}patch(e,t){let r="function"==typeof t,s="string"!=typeof e&&e instanceof tn,n="object"==typeof e&&("query"in e||"id"in e);if(s)return this._add({patch:e.serialize()});if(r){let r=t(new tn(e,{},this.#a));if(!(r instanceof tn))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(n){let r=new tn(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class tu extends to{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new tu([...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},ti,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof ts)return this._add({patch:e.serialize()});if(r){let r=t(new ts(e,{},this.#a));if(!(r instanceof ts))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let tc=({query:e,params:t={},options:r={}})=>{let s=new URLSearchParams,{tag:n,includeMutations:i,returnQuery:o,...a}=r;for(let[r,i]of(n&&s.append("tag",n),s.append("query",e),Object.entries(t)))void 0!==i&&s.append(`$${r}`,JSON.stringify(i));for(let[e,t]of Object.entries(a))t&&s.append(e,`${t}`);return!1===o&&s.append("returnQuery","false"),!1===i&&s.append("includeMutations","fal
13se"),`?${s}`},tl=e=>"response"===e.type,th=e=>e.body;function td(t,r,s,n,i={},o={}){let a="stega"in o?{...s||{},..."boolean"==typeof o.stega?{enabled:o.stega}:o.stega||{}}:s,u=a.enabled?(0,eu.stegaClean)(i):i,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=tI(t,r,"query",{query:n,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 eg.apply(void 0,(0,ec.__spreadArray)([],(0,ec.__read)(e)))}((0,U.from)(e.A(293900).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,ei.map)(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe((0,ei.map)(c))}function tp(e,t,r,s={}){let n={uri:tS(e,"doc",(()=>{if(!s.releaseId)return r;let e=(0,ey.getVersionFromId)(r);if(!e){if((0,ey.isDraftId)(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${s.releaseId}\``);return(0,ey.getVersionId)(r,s.releaseId)}if(e!==s.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${e}\` release, but this does not match the provided \`options.releaseId\` (\`${s.releaseId}\`)`);return r})()),json:!0,tag:s.tag,signal:s.signal,query:void 0!==s.includeAllVersions?{includeAllVersions:s.includeAllVersions}:void 0};return tA(e,t,n).pipe((0,em.filter)(tl),(0,ei.map)(e=>{let t=e.body.documents;return t?s.includeAllVersions?t:t[0]:s.includeAllVersions?[]:void 0}))}function tf(e,t,r,s={}){let n={uri:tS(e,"doc",r.join(",")),json:!0,tag:s.tag,signal:s.signal};return tA(e,t,n).pipe((0,em.filter)(tl),(0,ei.map)(e=>{let t,s,n=(t=e.body.documents||[],s=e=>e._id,t.reduce((e,t)=>(e[s(t)]=t,e),Object.create(null)));return r.map(e=>n[e]||null)}))}function tg(e,t,r,s={}){return tI(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},s)}function tm(e,t,r,s){return eM("createIfNotExists",r),tT(e,t,r,"createIfNotExists",s)}function ty(e,t,r,s){return eM("createOrReplace",r),tT(e,t,r,"createOrReplace",s)}function tb(e,t,r,s,n){return eM("createVersion",r),ek("createVersion",r),eK(),t$(e,t,{actionType:"sanity.action.document.version.create",publishedId:s,document:r},n)}function tw(e,t,r,s,n,i,o){if(!s)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return e_("createVersion",s),e_("createVersion",r),t$(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:s,versionId:n?(0,ey.getVersionId)(r,n):(0,ey.getDraftId)(r),ifBaseRevisionId:i},o)}function tv(e,t,r,s){return tI(e,t,"mutate",{mutations:[{delete:tt(r)}]},s)}function tC(e,t,r,s=!1,n){return t$(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:s},n)}function tR(e,t,r,s){return eM("replaceVersion",r),ek("replaceVersion",r),t$(e,t,{actionType:"sanity.action.document.version.replace",document:r},s)}function tq(e,t,r,s,n){return t$(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:s},n)}function tE(e,t,r,s){let n;return tI(e,t,"mutate",{mutations:Array.isArray(n=r instanceof tn||r instanceof ts?{patch:r.serialize()}:r instanceof ta||r instanceof tu?r.serialize():r)?n:[n],transactionId:s&&s.transactionId||void 0},s)}function t$(e,t,r,s){let n=Array.isArray(r)?r:[r],i=s&&s.transactionId||void 0;return tI(e,t,"actions",{actions:n,transactionId:i,skipCrossDatasetReferenceValidation:s&&s.skipCrossDatasetReferenceValidation||void 0,dryRun:s&&s.dryRun||void 0},s)}function tI(e,t,r,s,n={}){let i="mutate"===r,o="actions"===r,a=i||o?"":tc(s),u=!i&&!o&&a.length<11264,c=u?a:"",l=n.returnFirst,{timeout:h,token:d,tag:p,headers:f,returnQuery:g,lastLiveEventId:m,cacheMode:y}=n,b={method:u?"GET":"POST",uri:tS(e,r,c),json:!0,body:u?void 0:s,query:i&&((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}})(n),timeout:h,headers:f,token:d,tag:p,returnQuery:g,perspective:n.perspective,resultSourceMap:n.resultSourceMap,lastLiveEventId:Array.isArray(m)?m[0]:m,cacheMode:y,canUseCdn:"query"===r,signal:n.signal,fetch:n.fetch,useAbortSignal:n.useAbortSignal,useCdn:n.useCdn};return tA(e,t,b).pipe((0,em.filter)(tl),(0,ei.map)(th),(0,ei.map)(e=>{if(!i)return e;let t=e.results||[];if(n.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 tT(e,t,r,s,n={}){return tI(e,t,"mutate",{mutations:[{[s]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},n))}let tO=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},tj=(e,t)=>tO(e)&&t.startsWith(tS(e,"query"));function tA(e,t,r){var s;let n=r.url||r.uri,i=e.config(),o=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(n.startsWith("/data/")||tj(e,n)||tO(e)&&n.startsWith(tS(e,"mutate"))||tO(e)&&n.startsWith(tS(e,"doc",""))||tO(e)&&n.startsWith(tS(e,"listen"))||tO(e)&&n.startsWith(tS(e,"history",""))):r.canUseCdn,a=(r.useCdn??i.useCdn)&&o,u=r.tag&&i.requestTagPrefix?[i.requestTagPrefix,r.tag].join("."):r.tag||i.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:eU(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&tj(e,n)){let e=r.resultSourceMap??i.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||i.perspective;"u">typeof t&&("previewDrafts"===t&&eW(),e1(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,eG())),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 s=t.token||e.token;s&&(r.Authorization=`Bearer ${s}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let n=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),i=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof i>"u"?3e5:i,proxy:t.proxy||e.proxy,json:!0,withCredentials:n,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(i,Object.assign({},r,{url:tF(e,n,a)})),l=new M.Observable(e=>t(c,i.requester).subscribe(e));return r.signal?l.pipe((s=r.signal,e=>new M.Observable(t=>{let r=()=>t.error(function(e){if(tP)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(s));if(s&&s.aborted)return void r();let n=e.subscribe(t);return s.addEventListener("abort",r),()=>{s.removeEventListener("abort",r),n.unsubscribe()}}))):l}function tx(e,t,r){return tA(e,t,r).pipe((0,em.filter)(e=>"response"===e.type),(0,ei.map)(e=>e.body))}function tS(e,t,r){let s=e.config();if(s.resource){eL(s);let e=tD(s),n=void 0!==r?`${t}/${r}`:t;return`${e}/${n}`.replace(/\/($|\?)/,"$1")}let n=eV(s),i=`/${t}/${n}`;return`/data${void 0!==r?`${i}/${r}`:i}`.replace(/\/($|\?)/,"$1")}function tF(e,t,r=!1){let{url:s,cdnUrl:n}=e.config();return`${r?n:s}/${t.replace(/^\//,"")}`}let tP=!!globalThis.DOMException,tD=e=>{let t=e.resource;if(!t)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:s}=t;switch(r){case"dataset":{let e=s.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/${s}`;case"media-library":return`/media-libraries/${s}`;case"dashboard":return`/dashboards/${s}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function t_(e,t,r){let s=eV(e.config());return tx(e,t,{method:"POST",uri:`/agent/action/generate/${s}`,body:r})}function tM(e,t,r){let s=eV(e.config());return tx(e,t,{method:"POST",uri:`/agent/action/transform/${s}`,body:r})}function tk(e,t,r){let s=eV(e.config());return tx(e,t,{method:"POST",uri:`/agent/action/translate/${s}`,body:r})}class tV{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}generate(e){return t_(this.#a,this.#u,e)}transform(e){return tM(this.#a,this.#u,e)}translate(e){return tk(this.#a,this.#u,e)}}class tU{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return B(t_(this.#a,this.#u,e))}transform(e){return B(tM(this.#a,this.#u,e))}translate(e){return B(tk(this.#a,this.#u,e))}prompt(e){var t,r;let s;return B((t=this.#a,r=this.#u,s=eV(t.config()),tx(t,r,{method:"POST",uri:`/agent/action/prompt/${s}`,body:e})))}patch(e){var t,r;let s;return B((t=this.#a,r=this.#u,s=eV(t.config()),tx(t,r,{method:"POST",uri:`/agent/action/patch/${s}`,body:e})))}}class tL{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return tz(this.#a,this.#u,e,t,r)}}class tN{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return B(tz(this.#a,this.#u,e,t,r).pipe((0,em.filter)(e=>"response"===e.type),(0,ei.map)(e=>e.body.document)))}}function tz(e,t,r,s,n={}){var i,o;if(-1===eS.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${eS.join(", ")}`);let a=n.extract||void 0;a&&!a.length&&(a=["none"]);let u=e.config(),c=(i=n,o=s,!(typeof File>"u")&&o instanceof File?Object.assign({filename:!1===i.preserveFilename?void 0:o.name,contentType:o.type},i):i),{tag:l,label:h,title:d,description:p,creditLine:f,filename:g,source:m}=c,y=u.resource?.type==="media-library",b=y?{title:d,filename:g}:{label:h,title:d,description:p,filename:g,meta:a,creditLine:f};return m&&!y&&(b.sourceId=m.id,b.sourceName=m.name,b.sourceUrl=m.url),tA(e,t,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(e,t){let r="image"===t?"images":"files",s=e.resource;if(s){let{type:e,id:t}=s;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 n=eV(e);return`assets/${r}/${n}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:b,body:s})}let tH=(0,k.defer)(()=>e.A(440574)).pipe((0,ei.map)(({default:e})=>e),(0,G.shareReplay)(1));function tB(){return function(e){return e.pipe(Y((e,t)=>{var r;return e instanceof e6?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,K.mergeAll)(1)((0,U.from)(e,(0,V.popScheduler)(e)))}(L({type:"reconnect"}),(void 0===r&&(r=ee),new M.Observable(function(e){var t=1e3;t<0&&(t=0);var s=0;return r.schedule(function(){e.closed||(e.next(s++),e.complete())},t)})).pipe((0,z.mergeMap)(()=>t))):X(()=>e)}))}}let tG=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],tW={includeResult:!0};function tJ(e,t,r={}){let{url:s,token:n,withCredentials:i,requestTagPrefix:o,headers:a}=this.config(),u=r.tag&&o?[o,r.tag].join("."):r.tag,c={...Object.keys(tW).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?tW[t]:r[t],e),{}),tag:u},l=tc({query:e,params:t,options:{tag:u,...tG.reduce((e,t)=>(typeof c[t]>"u"||(e[t]=c[t]),e),{})}}),h=`${s}${tS(this,"listen",l)}`;if(h.length>14800)return X(()=>Error("Query too large for listener"));let d=c.events?c.events:["mutation"],p={};return i&&(p.withCredentials=!0),(n||a)&&(p.headers={},n&&(p.headers.Authorization=`Bearer ${n}`),a&&Object.assign(p.headers,a)),e7(()=>(typeof EventSource>"u"||p.headers?tH:L(EventSource)).pipe((0,ei.map)(e=>new e(h,p))),d).pipe(tB(),(0,em.filter)(e=>d.includes(e.type)),(0,ei.map)(e=>({type:e.type,..."data"in e?e.data:{}})))}let tQ="2021-03-25";class tY{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,s,n,i;let{projectId:o,apiVersion:a,token:u,withCredentials:c,requestTagPrefix:l,headers:h}=this.#a.config(),d=a.replace(/^v/,"");if("X"!==d&&d<tQ)throw Error(`The live events API requires API version ${tQ} or later. The current API version is ${d}. Please update your API version to use this feature.`);if(e&&!u&&!c)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 p=tS(this.#a,"live/events"),f=new URL(this.#a.getUrl(p,!1)),g=t&&l?[l,t].join("."):t;g&&f.searchParams.set("tag",g),e&&f.searchParams.set("includeDrafts","true");let m={};e&&c&&(m.withCredentials=!0),(e&&u||h)&&(m.headers={},e&&u&&(m.headers.Authorization=`Bearer ${u}`),h&&Object.assign(m.headers,h));let y=`${f.href}::${JSON.stringify(m)}`,b=tK.get(y);if(b)return b;let w=e7(()=>(typeof EventSource>"u"||m.headers?tH:L(EventSource)).pipe((0,ei.map)(e=>new e(f.href,m))),["message","restart","welcome","reconnect","goaway"]),v=(s=f,n={method:"OPTIONS",mode:"cors",credentials:m.withCredentials?"include":"omit",headers:m.headers},new M.Observable(e=>{let t=new AbortController,r=t.signal;return fetch(s,{...n,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe(Y(()=>{throw new eT({projectId:o})}
13)),C=w.pipe(tB(),(0,z.mergeMap)(e=>"reconnect"===e.type?v.pipe((0,z.mergeMap)(()=>L(e))):L(e)),Y(e=>v.pipe((0,z.mergeMap)(()=>{throw e}))),(0,ei.map)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe(er(()=>tK.delete(y)),(i="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{var t,r;let s,n=!1,{predicate:o,...a}=i,u=e.pipe((t=e=>{i.predicate(e)&&(n=!0,s=e)},(r=(0,N.isFunction)(t)?{next:t,error:void 0,complete:void 0}:t)?(0,Q.operate)(function(e,t){null==(s=r.subscribe)||s.call(r);var s,n=!0;e.subscribe((0,J.createOperatorSubscriber)(t,function(e){var s;null==(s=r.next)||s.call(r,e),t.next(e)},function(){var e;n=!1,null==(e=r.complete)||e.call(r),t.complete()},function(e){var s;n=!1,null==(s=r.error)||s.call(r,e),t.error(e)},function(){var e,t;n&&(null==(e=r.unsubscribe)||e.call(r)),null==(t=r.finalize)||t.call(r)}))}):et.identity),er(()=>{n=!1,s=void 0}),(0,es.share)(a)),c=new M.Observable(e=>{n&&e.next(s),e.complete()});return(0,en.merge)(u,c)}));return tK.set(y,C),C}}let tK=new Map;class tX{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return t1(this.#a,this.#u,"PUT",e,t)}edit(e,t){return t1(this.#a,this.#u,"PATCH",e,t)}delete(e){return t1(this.#a,this.#u,"DELETE",e)}list(){eN("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),tx(this.#a,this.#u,{uri:r,tag:null})}getEmbeddingsSettings(e){return eN("dataset",this.#a.config()),eP(e),tx(this.#a,this.#u,{uri:t0(this.#a,e),tag:null})}editEmbeddingsSettings(e,t){return eN("dataset",this.#a.config()),eP(e),tx(this.#a,this.#u,{method:"PUT",uri:t0(this.#a,e),body:t,tag:null})}}class tZ{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return eN("dataset",this.#a.config()),B(t1(this.#a,this.#u,"PUT",e,t))}edit(e,t){return eN("dataset",this.#a.config()),B(t1(this.#a,this.#u,"PATCH",e,t))}delete(e){return eN("dataset",this.#a.config()),B(t1(this.#a,this.#u,"DELETE",e))}list(){eN("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),B(tx(this.#a,this.#u,{uri:r,tag:null}))}getEmbeddingsSettings(e){return eN("dataset",this.#a.config()),eP(e),B(tx(this.#a,this.#u,{uri:t0(this.#a,e),tag:null}))}editEmbeddingsSettings(e,t){return eN("dataset",this.#a.config()),eP(e),B(tx(this.#a,this.#u,{method:"PUT",uri:t0(this.#a,e),body:t,tag:null}))}}function t0(e,t){let r=e.config();return!1===r.useProjectHostname?`/projects/${r.projectId}/datasets/${t}/settings/embeddings`:`/datasets/${t}/settings/embeddings`}function t1(e,t,r,s,n){return eN("dataset",e.config()),eP(s),tx(e,t,{method:r,uri:`/datasets/${s}`,body:n,tag:null})}class t3{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){var r,s;let n=this.#a.config(),i=(n.resource||n["~experimental_resource"])?.id,{instanceId:o,libraryId:a}=function(e){let t="object"==typeof e&&"_ref"in e?e._ref:e,r=t9.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||i;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,s=u,`/media-libraries/${s}/video/${r}/playback-info`),l=function(e){let t={};if(e.transformations){let{thumbnail:r,animated:s,storyboard:n}=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)),s&&(s.width&&(t.animatedWidth=s.width),s.height&&(t.animatedHeight=s.height),void 0!==s.start&&(t.animatedStart=s.start),void 0!==s.end&&(t.animatedEnd=s.end),s.fps&&(t.animatedFps=s.fps),s.format&&(t.animatedFormat=s.format)),n&&n.format&&(t.storyboardFormat=n.format)}return e.expiration&&(t.expiration=e.expiration),t}(t);return tx(this.#a,this.#u,{method:"GET",uri:c,query:l})}}class t6{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return B(new t3(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let t9=/^media-library:(ml[^:]+):([^:]+)$/;class t5{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),tx(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return tx(this.#a,this.#u,{uri:`/projects/${e}`})}}class t2{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){let t={};return e?.includeMembers===!1&&(t.includeMembers="false"),e?.organizationId&&(t.organizationId=e.organizationId),B(tx(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return B(tx(this.#a,this.#u,{uri:`/projects/${e}`}))}}let t4=((e,t=21)=>{var r;let s,n;return r=t,n=-~(1.6*(s=(2<<Math.log(e.length-1)/Math.LN2)-1)*r/e.length),(t=r)=>{let i="";for(;;){let r=eb(n),o=0|n;for(;o--;)if((i+=e[r[o]&s]||"").length===t)return i}}})("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),t8=(e,t)=>t?(0,ey.getVersionId)(e,t):(0,ey.getDraftId)(e);function t7(e,{releaseId:t,publishedId:r,document:s}){if(r&&s._id){let e=t8(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,s),e}if(s._id){let r=(0,ey.isDraftId)(s._id),n=(0,ey.isVersionId)(s._id);if(!r&&!n)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 (\`${s._id}\`) that is a draft ID, but a release ID (\`${t}\`) was also provided.`);let n=(0,ey.getVersionFromId)(s._id);if(n!==t)throw Error(`\`${e}()\` was called with a document ID (\`${s._id}\`) that is a version ID, but the release ID (\`${t}\`) does not match the document's version ID (\`${n}\`).`)}return s._id}if(r)return t8(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let re=(e,t)=>{let[r,s,n]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=t4(),metadata:s={}}=e;return[r,s,t]}return[t4(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...s,releaseType:s.releaseType||"undecided"}},options:n}};class rt{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return tp(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:s}=re(e,t),{releaseId:n,metadata:i}=r;return t$(this.#a,this.#u,r,s).pipe((0,ei.map)(e=>({...e,releaseId:n,metadata:i})))}edit({releaseId:e,patch:t},r){return t$(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return t$(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return t$(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return t$(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return t$(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return t$(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return t$(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return tg(this.#a,this.#u,e,t)}}class rr{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return B(tp(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:s}=re(e,t),{releaseId:n,metadata:i}=r;return{...await B(t$(this.#a,this.#u,r,s)),releaseId:n,metadata:i}}edit({releaseId:e,patch:t},r){return B(t$(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return B(t$(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return B(t$(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return B(t$(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return B(t$(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return B(t$(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return B(t$(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return B(tg(this.#a,this.#u,e,t))}}class rs{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}getById(e){return tx(this.#a,this.#u,{uri:`/users/${e}`})}}class rn{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return B(tx(this.#a,this.#u,{uri:`/users/${e}`}))}}class ri{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#u;listen=tJ;constructor(e,t=eZ){this.config(t),this.#u=e,this.assets=new tL(this,this.#u),this.datasets=new tX(this,this.#u),this.live=new tY(this),this.mediaLibrary={video:new t3(this,this.#u)},this.projects=new t5(this,this.#u),this.users=new rs(this,this.#u),this.agent={action:new tV(this,this.#u)},this.releases=new rt(this,this.#u)}clone(){return new ri(this.#u,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=e3(e,this.#c||{}),this}withConfig(e){let t=this.config();return new ri(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return td(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return tp(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 tp(this,this.#u,e,r)}getDocuments(e,t){return tf(this,this.#u,e,t)}create(e,t){return tT(this,this.#u,e,"create",t)}createIfNotExists(e,t){return tm(this,this.#u,e,t)}createOrReplace(e,t){return ty(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:s,ifBaseRevisionId:n},i){if(!e)return tw(this,this.#u,t,s,r,n,i);let o=t7("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,ey.getPublishedId)(e._id);return tb(this,this.#u,a,u,i)}delete(e,t){return tv(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,s){let n=t8(t,e);return tC(this,this.#u,n,r,s)}replaceVersion({document:e,publishedId:t,releaseId:r},s){let n=t7("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:n};return tR(this,this.#u,i,s)}unpublishVersion({releaseId:e,publishedId:t},r){let s=(0,ey.getVersionId)(t,e);return tq(this,this.#u,s,t,r)}mutate(e,t){return tE(this,this.#u,e,t)}patch(e,t){return new ts(e,t,this)}transaction(e){return new tu(e,this)}action(e,t){return t$(this,this.#u,e,t)}request(e){return tx(this,this.#u,e)}getUrl(e,t){return tF(this,e,t)}getDataUrl(e,t){return tS(this,e,t)}}class ro{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#u;listen=tJ;constructor(e,t=eZ){this.config(t),this.#u=e,this.assets=new tN(this,this.#u),this.datasets=new tZ(this,this.#u),this.live=new tY(this),this.mediaLibrary={video:new t6(this,this.#u)},this.projects=new t2(this,this.#u),this.users=new rn(this,this.#u),this.agent={action:new tU(this,this.#u)},this.releases=new rr(this,this.#u),this.observable=new ri(e,t)}clone(){return new ro(this.#u,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=e3(e,this.#c||{}),this}withConfig(e){let t=this.config();return new ro(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return B(td(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return B(tp(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 B(tp(this,this.#u,e,r))}getDocuments(e,t){return B(tf(this,this.#u,e,t))}create(e,t){return B(tT(this,this.#u,e,"create",t))}createIfNotExists(e,t){return B(tm(this,this.#u,e,t))}createOrReplace(e,t){return B(ty(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:s,ifBaseRevisionId:n},i){if(!e)return ea(tw(this,this.#u,t,s,r,n,i));let o=t7("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,ey.getPublishedId)(e._id);return ea(tb(this,this.#u,a,u,i))}delete(e,t){return B(tv(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,s){let n=t8(t,e);return B(tC(this,this.#u,n,r,s))}replaceVersion({document:e,publishedId:t,releaseId:r},s){let n=t7("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:n};return ea(tR(this,this.#u,i,s))}unpublishVersion({releaseId:e,publishedId:t},r){let s=(0,ey.getVersionId)(t,e);return B(tq(this,this.#u,s,t,r))}mutate(e,t){return B(tE(this,this.#u,e,t))}patch(e,t){return new tn(e,t,this)}transaction(e){return new ta(e,this)}action(e,t){return B(t$(this,this.#u,e,t))}request(e){return B(tx(this,this.#u,e))}dataRequest(e,t,r){return B(tI(this,this.#u,e,t,r))}getUrl(e,t){return tF(this,e,t)}getDataUrl(e,t){return tS(this,e,t)}}let ra={requester:ej(l=[]),createClient:e=>{let t=ej(l,{ignoreWarnings:e.ignoreWarnings});return new ro((r,s)=>(s||t)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...r}),e)}},ru=(ra.requester,ra.createClient);e.s(["createClient",0,ru],698145)}]);

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.