PageSourceSearch

https://www.presse.no/_next/static/chunks/53a9e9ffb0b1ffce.js?dpl=dpl_DMp13TLoPi9N4Ug7sXQRKcLYPD2Q

js presse.no collected 2026-10-02 07:42:18 UTC 65,778 bytes, 13 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,107894,16917,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=(c=function(){if(h)return l;h=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return l=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 p{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 f="function"==typeof XMLHttpRequest?"xhr":"fetch",g="xhr"===f?XMLHttpRequest:p,m=(e,t)=>{let r=e.options,s=e.applyMiddleware("finalizeOptions",r),n={},i=e.applyMiddleware("interceptRequest",void 0,{adapter:f,context:e});if(i){let e=setTimeout(t,0,null,i);return{abort:()=>clearTimeout(e)}}let o=new g;o instanceof p&&"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 p?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(()=>m("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:d(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:f,request:o,context:e}),o.send(s.body||null),u&&(n.connect=setTimeout(()=>m("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,o&&o.abort()}};function m(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)}},y=(e=[],t=m)=>(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",()=>f,"environment",()=>"browser","getIt",()=>y],107894);var b,w,v,C,R,q=e.i(390462),E=e.i(751368),I={exports:{}};R||(R=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 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+)/))&&("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=(C?v:(C=1,v=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(w)return b;w=1;function e(e,t,r,s){return Math.round(e/r)+" "+s+(t>=1.5*r?"s":"")}return b=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 $=typeof E.Buffer>"u"?()=>!1:e=>E.Buffer.isBuffer(e);function O(e){return"[object Object]"===Object.prototype.toString.call(e)}let F=["boolean","string","number"];function j(){return{processOptions:e=>{let t=e.body;return!t||"function"==typeof t.pipe||$(t)||-1===F.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"})})}}}function A(e){return{onResponse:t=>{let r=t.headers["content-type"]||"",s=e&&e.force||-1!==r.indexOf("application/json");return t.body&&r&&s?Object.assign({},t,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(t.body)}):t},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})}}var T="u">typeof globalThis?globalThis:"u">typeof window?window:e.g;function x(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()))}}function V(){return{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"))}}}let S=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and n
2o 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 D{__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 D(e),t(this.reason))})}static source=()=>{let e;return{token:new P(t=>{e=t}),cancel:e}}}S.Cancel=D,S.CancelToken=P,S.isCancel=e=>!(!e||!e?.__CANCEL__);var _=(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 k=(e={})=>{var t;let r,s,n;return r=(t={shouldRetry:_,...e}).maxRetries||5,s=t.retryDelay||M,n=t.shouldRetry,{onError:(e,t)=>{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}}};k.shouldRetry=_,e.s(["jsonRequest",()=>j,"jsonResponse",()=>A,"observable",()=>x,"progress",()=>V,"retry",()=>k],16917)},987417,e=>{"use strict";var t=e.i(516165),r=e.i(827540);function s(e){return!!e&&(e instanceof t.Observable||(0,r.isFunction)(e.lift)&&(0,r.isFunction)(e.subscribe))}e.s(["isObservable",()=>s])},986838,e=>{"use strict";var t=e.i(633482),r=e.i(7560),s=e.i(866312);e.s(["catchError",()=>function e(n){return(0,s.operate)(function(s,i){var o,a=null,u=!1;a=s.subscribe((0,r.createOperatorSubscriber)(i,void 0,void 0,function(r){o=(0,t.innerFrom)(n(r,e(n)(s))),a?(a.unsubscribe(),a=null,o.subscribe(i)):u=!0})),u&&(a.unsubscribe(),a=null,o.subscribe(i))})}])},381095,298183,e=>{"use strict";var t=e.i(544287);function r(){return(0,t.mergeAll)(1)}e.s(["concatAll",()=>r],298183);var s=e.i(282519),n=e.i(187636);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r()((0,n.from)(e,(0,s.popScheduler)(e)))}e.s(["concat",()=>i],381095)},969031,e=>{"use strict";var t=e.i(516165),r=e.i(827540);function s(e,s){var n=(0,r.isFunction)(e)?e:function(){return e},i=function(e){return e.error(n())};return new t.Observable(s?function(e){return s.schedule(i,0,e)}:i)}e.s(["throwError",()=>s])},161218,e=>{"use strict";var t=e.i(501267),r=e.i(521879);function s(e,s){var n="object"==typeof s;return new Promise(function(i,o){var a=new r.SafeSubscriber({next:function(e){i(e),a.unsubscribe()},error:o,complete:function(){n?i(s.defaultValue):o(new t.EmptyError)}});e.subscribe(a)})}e.s(["firstValueFrom",()=>s])},547460,54675,930941,e=>{"use strict";var t=e.i(516165),r=Array.isArray,s=Object.getPrototypeOf,n=Object.prototype,i=Object.keys;function o(e){if(1===e.length){var t,o=e[0];if(r(o))return{args:o,keys:null};if((t=o)&&"object"==typeof t&&s(t)===n){var a=i(o);return{args:a.map(function(e){return o[e]}),keys:a}}}return{args:e,keys:null}}e.s(["argsArgArrayOrObject",()=>o],54675);var a=e.i(187636),u=e.i(448971),c=e.i(591607),l=e.i(282519);function h(e,t){return e.reduce(function(e,r,s){return e[r]=t[s],e},{})}e.s(["createObject",()=>h],930941);var d=e.i(7560),p=e.i(168);function f(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var s=(0,l.popScheduler)(e),n=(0,l.popResultSelector)(e),i=o(e),d=i.args,p=i.keys;if(0===d.length)return(0,a.from)([],s);var f=new t.Observable(g(d,s,p?function(e){return h(p,e)}:u.identity));return n?f.pipe((0,c.mapOneOrManyArgs)(n)):f}function g(e,t,r){return void 0===r&&(r=u.identity),function(s){m(t,function(){for(var n=e.length,i=Array(n),o=n,u=n,c=function(n){m(t,function(){var c=(0,a.from)(e[n],t),l=!1;c.subscribe((0,d.createOperatorSubscriber)(s,function(e){i[n]=e,!l&&(l=!0,u--),u||s.next(r(i.slice()))},function(){--o||s.complete()}))},s)},l=0;l<n;l++)c(l)},s)}}function m(e,t,r){e?(0,p.executeSchedule)(r,e,t):t()}
2e.s(["combineLatest",()=>f,"combineLatestInit",()=>g],547460)},51411,763967,326674,e=>{"use strict";var t,r=e.i(107894),s=e.i(16917),n=e.i(516165),i=e.i(159862),o=e.i(897275),a=e.i(987417),u=e.i(806298),c=e.i(187636),l=e.i(689431),h=e.i(30214),d=e.i(986838),p=e.i(381095),f=e.i(969031),g=e.i(946704),m=e.i(812802),y=e.i(819600),b=e.i(134671),w=e.i(178480),v=e.i(913186),C=e.i(161218),R=e.i(536918),q=e.i(824627),E=e.i(547460),I=e.i(866312),$=Array.isArray;function O(e){return 1===e.length&&$(e[0])?e[0]:e}e.s(["argsOrArgArray",()=>O],763967);var F=e.i(591607),j=e.i(913072),A=e.i(282519);function T(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,A.popResultSelector)(e);return r?(0,j.pipe)(T.apply(void 0,(0,q.__spreadArray)([],(0,q.__read)(e))),(0,F.mapOneOrManyArgs)(r)):(0,I.operate)(function(t,r){(0,E.combineLatestInit)((0,q.__spreadArray)([t],(0,q.__read)(O(e))))(r)})}var x=e.i(80205),V=e.i(599431);let S=e=>crypto.getRandomValues(new Uint8Array(e)),D=(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=S(n),o=0|n;for(;o--;)if((i+=e[r[o]&s]||"").length===t)return i}}},P=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>((t&=63)<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+="-":e+="_",e),"");e.s(["customAlphabet",()=>D,"nanoid",()=>P],326674);let _=/\r\n|[\n\r\u2028\u2029]/;function M(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 k extends Error{response;statusCode=400;responseBody;details;constructor(e,t){const r=L(e,t);super(r.message),Object.assign(this,r)}}class U extends Error{response;statusCode=500;responseBody;details;constructor(e){const t=L(e);super(t.message),Object.assign(this,t)}}function L(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,R.isRecord)(i))return o.message=H(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=H(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 N(a)?(o.message=z(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=H(e,i),o}function N(e){return(0,R.isRecord)(e)&&"queryParseError"===e.type&&"string"==typeof e.query&&"number"==typeof e.start&&"number"==typeof e.end}function z(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(_),{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:M(t.start,s),end:t.end?M(t.end,s):void 0},s),a=`${i}`.length;return e.split(_,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 H(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}`}
10class B 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 G={onResponse:(e,t)=>{if(e.statusCode>=500)throw new U(e);if(e.statusCode>=400)throw new k(e,t);return e}};function W(e,t={}){return(0,r.getIt)([(0,s.retry)({shouldRetry:J}),...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),(0,s.jsonRequest)(),(0,s.jsonResponse)(),(0,s.progress)(),G,(0,s.observable)({implementation:n.Observable})])}function J(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"),o=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!i)&&!!o||s.retry.shouldRetry(e,t,r)}function Q(e){return"https://www.sanity.io/help/"+e}let Y=["image","file"],K=["before","after","replace"],X=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")},Z=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},ee=(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`)},et=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);ee(e,t._id)},er=(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`)},es=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")},en=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},ei=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()}`)}},eo=(e,t)=>{if(t.resource)throw Error(`\`${e}\` does not support resource-based operations`)},ea=e=>{var t;let r,s;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(s=t(...e),r=!0),s)},eu=ea(["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"]),ec=ea(["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."]),el=ea(["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."]),eh=ea(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),ed=ea(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${Q("js-cl
10ient-browser-token")} for more information and how to hide this warning.`]),ep=ea(["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`."]),ef=ea(["Using the Sanity client without specifying an API version is deprecated.",`See ${Q("js-client-api-version")}`]),eg=(ea(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),ea(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),em=ea(["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."]),ey={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},eb=["localhost","127.0.0.1","0.0.0.0"];function ew(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 ev=(e,t)=>
10{let r,s={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||ey.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};s.apiVersion||ef();let n={...ey,...s};n["~experimental_resource"]&&!n.resource&&(em(),n.resource=n["~experimental_resource"]);let i=n.resource,o=n.useProjectHostname&&!i;if(typeof Promise>"u"){let e=Q("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&&ei(n),"u">typeof n.perspective&&ew(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!==eb.indexOf(r)),c=!!n.token;n.withCredentials&&c&&(ep(),n.withCredentials=!1),a&&u&&c&&!0!==n.ignoreBrowserTokenWarning?ed():typeof n.useCdn>"u"&&ec(),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&&X(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?en(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===ey.apiHost,!0===n.useCdn&&n.withCredentials&&eu(),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 eC extends Error{name="ConnectionFailedError"}
10class eR extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class eq extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class eE extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class eI extends Error{name="MessageParseError"}let e$=["channelError","disconnect"];function eO(e,t){return(0,i.defer)(()=>{let t=e();return(0,a.isObservable)(t)?t:(0,o.of)(t)}).pipe((0,u.mergeMap)(e=>{var r,s;return r=e,s=t,new n.Observable(e=>{let t=s.includes("open"),n=s.includes("reconnect");function i(t){if("data"in t){let[r,s]=eF(t);e.error(r?new eI("Unable to parse EventSource error message",{cause:s}):new eE((s?.data).message,s));return}r.readyState===r.CLOSED?e.error(new eC("EventSource connection failed")):n&&e.next({type:"reconnect"})}function o(){e.next({type:"open"})}function a(t){let[s,n]=eF(t);if(s)return void e.error(new eI("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 eq((i=n?.data,o=s,(t=i.error)?N(t)?z(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 eR(`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([...e$,...s])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return 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 eF(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 ej(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 eA{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 Z("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===K.indexOf(e)){let e=K.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{...ej(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return Z(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 eT extends eA{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new eT(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 ex extends eA{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new ex(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 eV={returnDocuments:!1};class eS{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return Z("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return Z(t,e),et(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return Z(t,e),et(t,e),this._add({[t]:e})}delete(e){return ee("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 eD extends eS{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new eD([...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},eV,e||{}))}patch(e,t){let r="function"==typeof t,s="string"!=typeof e&&e instanceof ex,n="object"==typeof e&&("query"in e||"id"in e);if(s)return this._add({patch:e.serialize()});if(r){let r=t(new ex(e,{},this.#a));if(!(r instanceof ex))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(n){let r=new ex(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class eP extends eS{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new eP([...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},eV,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof eT)return this._add({patch:e.serialize()});if(r){let r=t(new eT(e,{},this.#a));if(!(r instanceof eT))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let e_=({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}`},eM=e=>"response"===e.type,ek=e=>e.body;function eU(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,R.stegaClean)(i):i,l=!1===o.filterResponse?e=>e:e=>e.result,{cache:h,next:d,...p}={useAbortSignal:"u">typeof o.signal,resultSourceMap:a.enabled?"withKeyArraySelector":o.resultSourceMap,...o,returnQuery:!1===o.filterResponse&&!1!==o.returnQuery},f=e0(t,r,"query",{query:n,params:u},"u">typeof h||"u">typeof d?{...p,fetch:{cache:h,next:d}}:p);return a.enabled?f.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return T.apply(void 0,(0,q.__spreadArray)([],(0,q.__read)(e)))}((0,c.from)(e.A(74491).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),(0,v.map)(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return l({...e,result:r})})):f.pipe((0,v.map)(l))}function eL(e,t,r,s={}){let n={uri:e2(e,"doc",(()=>{if(!s.releaseId)return r;let e=(0,V.getVersionFromId)(r);if(!e){if((0,V.isDraftId)(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${s.releaseId}\``);return(0,V.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 e9(e,t,n).pipe((0,x.filter)(eM),(0,v.map)(e=>{let t=e.body.documents;return t?s.includeAllVersions?t:t[0]:s.includeAllVersions?[]:void 0}))}function eN(e,t,r,s={}){let n={uri:e2(e,"doc",r.join(",")),json:!0,tag:s.tag,signal:s.signal};return e9(e,t,n).pipe((0,x.filter)(eM),(0,v.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 ez(e,t,r,s={}){return e0(e,t,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},s)}function eH(e,t,r,s){return et("createIfNotExists",r),e1(e,t,r,"createIfNotExists",s)}function eB(e,t,r,s){return et("createOrReplace",r),e1(e,t,r,"createOrReplace",s)}function eG(e,t,r,s,n){return et("createVersion",r),er("createVersion",r),eg(),eZ(e,t,{actionType:"sanity.action.document.version.create",publishedId:s,document:r},n)}function eW(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 ee("createVersion",s),ee("createVersion",r),eZ(e,t,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:s,versionId:n?(0,V.getVersionId)(r,n):(0,V.getDraftId)(r),ifBaseRevisionId:i},o)}function eJ(e,t,r,s){return e0(e,t,"mutate",{mutations:[{delete:ej(r)}]},s)}function eQ(e,t,r,s=!1,n){return eZ(e,t,{actionType:"sanity.action.document.version.discard",versionId:r,purge:s},n)}function eY(e,t,r,s){return et("replaceVersion",r),er("replaceVersion",r),eZ(e,t,{actionType:"sanity.action.document.version.replace",document:r},s)}function eK(e,t,r,s,n){return eZ(e,t,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:s},n)}function eX(e,t,r,s){let n;return e0(e,t,"mutate",{mutations:Array.isArray(n=r instanceof ex||r instanceof eT?{patch:r.serialize()}:r instanceof eD||r instanceof eP?r.serialize():r)?n:[n],transactionId:s&&s.transactionId||void 0},s)}function eZ(e,t,r,s){let n=Array.isArray(r)?r:[r],i=s&&s.transactionId||void 0;return e0(e,t,"actions",{actions:n,transactionId:i,skipCrossDatasetReferenceValidation:s&&s.skipCrossDatasetReferenceValidation||void 0,dryRun:s&&s.dryRun||void 0},s)}function e0(e,t,r,s,n={}){let i="mutate"===r,o="actions"===r,a=i||o?"":e_(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:e2(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 e9(e,t,b).pipe((0,x.filter)(eM),(0,v.map)(ek),(0,v.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 e1(e,t,r,s,n={}){return e0(e,t,"mutate",{mutations:[{[s]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},n))}let e3=e=>{let t=e.config();return void 0!==t.dataset&&void 0!==t.projectId||void 0!==t.resource},e6=(e,t)=>e3(e)&&t.startsWith(e2(e,"query"));function e9(e,t,r){var s;let i=r.url||r.uri,o=e.config(),a=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(i.startsWith("/data/")||e6(e,i)||e3(e)&&i.startsWith(e2(e,"mutate"))||e3(e)&&i.startsWith(e2(e,"doc",""))||e3(e)&&i.startsWith(e2(e,"listen"))||e3(e)&&i.startsWith(e2(e,"history",""))):r.canUseCdn,u=(r.useCdn??o.useCdn)&&a,c=r.tag&&o.requestTagPrefix?[o.requestTagPrefix,r.tag].join("."):r.tag||o.requestTagPrefix;if(c&&null!==r.tag&&(r.query={tag:en(c),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&e6(e,i)){let e=r.resultSourceMap??o.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||o.perspective;"u">typeof t&&("previewDrafts"===t&&eh(),ew(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&u&&(u=!1,el())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),u&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let l=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})}(o,Object.assign({},r,{url:e4(e,i,u)})),h=new n.Observable(e=>t(l,o.requester).subscribe(e));
13return r.signal?h.pipe((s=r.signal,e=>new n.Observable(t=>{let r=()=>t.error(function(e){if(e8)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()}}))):h}function e5(e,t,r){return e9(e,t,r).pipe((0,x.filter)(e=>"response"===e.type),(0,v.map)(e=>e.body))}function e2(e,t,r){let s=e.config();if(s.resource){ei(s);let e=e7(s),n=void 0!==r?`${t}/${r}`:t;return`${e}/${n}`.replace(/\/($|\?)/,"$1")}let n=es(s),i=`/${t}/${n}`;return`/data${void 0!==r?`${i}/${r}`:i}`.replace(/\/($|\?)/,"$1")}function e4(e,t,r=!1){let{url:s,cdnUrl:n}=e.config();return`${r?n:s}/${t.replace(/^\//,"")}`}let e8=!!globalThis.DOMException,e7=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 te(e,t,r){let s=es(e.config());return e5(e,t,{method:"POST",uri:`/agent/action/generate/${s}`,body:r})}function tt(e,t,r){let s=es(e.config());return e5(e,t,{method:"POST",uri:`/agent/action/transform/${s}`,body:r})}function tr(e,t,r){let s=es(e.config());return e5(e,t,{method:"POST",uri:`/agent/action/translate/${s}`,body:r})}class ts{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return te(this.#a,this.#u,e)}transform(e){return tt(this.#a,this.#u,e)}translate(e){return tr(this.#a,this.#u,e)}}class tn{#a;#u;constructor(e,t){this.#a=e,this.#u=t}generate(e){return(0,l.lastValueFrom)(te(this.#a,this.#u,e))}transform(e){return(0,l.lastValueFrom)(tt(this.#a,this.#u,e))}translate(e){return(0,l.lastValueFrom)(tr(this.#a,this.#u,e))}prompt(e){var t,r;let s;return(0,l.lastValueFrom)((t=this.#a,r=this.#u,s=es(t.config()),e5(t,r,{method:"POST",uri:`/agent/action/prompt/${s}`,body:e})))}patch(e){var t,r;let s;return(0,l.lastValueFrom)((t=this.#a,r=this.#u,s=es(t.config()),e5(t,r,{method:"POST",uri:`/agent/action/patch/${s}`,body:e})))}}class ti{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return ta(this.#a,this.#u,e,t,r)}}class to{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){let s=ta(this.#a,this.#u,e,t,r);return(0,l.lastValueFrom)(s.pipe((0,x.filter)(e=>"response"===e.type),(0,v.map)(e=>e.body.document)))}}function ta(e,t,r,s,n={}){var i,o;if(-1===Y.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${Y.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),e9(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=es(e);return`assets/${r}/${n}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:b,body:s})}let tu=(0,i.defer)(()=>e.A(440574)).pipe((0,v.map)(({default:e})=>e),(0,h.shareReplay)(1));function tc(){return function(e){return e.pipe((0,d.catchError)((e,t)=>e instanceof eC?(0,p.concat)((0,o.of)({type:"reconnect"}),(0,g.timer)(1e3).pipe((0,u.mergeMap)(()=>t))):(0,f.throwError)(()=>e)))}}let tl=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],th={includeResult:!0};function td(e,t,r={}){let{url:s,token:n,withCredentials:i,requestTagPrefix:a,headers:u}=this.config(),c=r.tag&&a?[a,r.tag].join("."):r.tag,l={...Object.keys(th).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?th[t]:r[t],e),{}),tag:c},h=e_({query:e,params:t,options:{tag:c,...tl.reduce((e,t)=>(typeof l[t]>"u"||(e[t]=l[t]),e),{})}}),d=`${s}${e2(this,"listen",h)}`;if(d.length>14800)return(0,f.throwError)(()=>Error("Query too large for listener"));let p=l.events?l.events:["mutation"],g={};return i&&(g.withCredentials=!0),(n||u)&&(g.headers={},n&&(g.headers.Authorization=`Bearer ${n}`),u&&Object.assign(g.headers,u)),eO(()=>(typeof EventSource>"u"||g.headers?tu:(0,o.of)(EventSource)).pipe((0,v.map)(e=>new e(d,g))),p).pipe(tc(),(0,x.filter)(e=>p.includes(e.type)),(0,v.map)(e=>({type:e.type,..."data"in e?e.data:{}})))}let tp="2021-03-25";class tf{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,s,i,a;let{projectId:c,apiVersion:l,token:h,withCredentials:p,requestTagPrefix:f,headers:g}=this.#a.config(),C=l.replace(/^v/,"");if("X"!==C&&C<tp)throw Error(`The live events API requires API version ${tp} or later. The current API version is ${C}. Please update your API version to use this feature.`);if(e&&!h&&!p)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 R=e2(this.#a,"live/events"),q=new URL(this.#a.getUrl(R,!1)),E=t&&f?[f,t].join("."):t;E&&q.searchParams.set("tag",E),e&&q.searchParams.set("includeDrafts","true");let I={};e&&p&&(I.withCredentials=!0),(e&&h||g)&&(I.headers={},e&&h&&(I.headers.Authorization=`Bearer ${h}`),g&&Object.assign(I.headers,g));let $=`${q.href}::${JSON.stringify(I)}`,O=tg.get($);if(O)return O;let F=eO(()=>(typeof EventSource>"u"||I.headers?tu:(0,o.of)(EventSource)).pipe((0,v.map)(e=>new e(q.href,I))),["message","restart","welcome","reconnect","goaway"]),j=(s=q,i={method:"OPTIONS",mode:"cors",credentials:I.withCredentials?"include":"omit",headers:I.headers},new n.Observable(e=>{let t=new AbortController,r=t.signal;return fetch(s,{...i,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe((0,d.catchError)(()=>{throw new B({projectId:c})})),A=F.pipe(tc(),(0,u.mergeMap)(e=>"reconnect"===e.type?j.pipe((0,u.mergeMap)(()=>(0,o.of)(e))):(0,o.of)(e)),(0,d.catchError)(e=>j.pipe((0,u.mergeMap)(()=>{throw e}))),(0,v.map)(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})).pipe((0,y.finalize)(()=>tg.delete($)),(a="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{let t,r=!1,{predicate:s,...i}=a,o=e.pipe((0,m.tap)(e=>{a.predicate(e)&&(r=!0,t=e)}),(0,y.finalize)(()=>{r=!1,t=void 0}),(0,b.share)(i)),u=new n.Observable(e=>{r&&e.next(t),e.complete()});return(0,w.merge)(o,u)}));return tg.set($,A),A}}let tg=new Map;class tm{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return tb(this.#a,this.#u,"PUT",e,t)}edit(e,t){return tb(this.#a,this.#u,"PATCH",e,t)}delete(e){return tb(this.#a,this.#u,"DELETE",e)}list(){eo("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),e5(this.#a,this.#u,{uri:r,tag:null})}}class ty{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}create(e,t){return eo("dataset",this.#a.config()),(0,l.lastValueFrom)(tb(this.#a,this.#u,"PUT",e,t))}edit(e,t){return eo("dataset",this.#a.config()),(0,l.lastValueFrom)(tb(this.#a,this.#u,"PATCH",e,t))}delete(e){return eo("dataset",this.#a.config()),(0,l.lastValueFrom)(tb(this.#a,this.#u,"DELETE",e))}list(){eo("dataset",this.#a.config());let e=this.#a.config(),t=e.projectId,r="/datasets";return!1===e.useProjectHostname&&(r=`/projects/${t}/datasets`),(0,l.lastValueFrom)(e5(this.#a,this.#u,{uri:r,tag:null}))}}function tb(e,t,r,s,n){return eo("dataset",e.config()),X(s),e5(e,t,{method:r,uri:`/datasets/${s}`,body:n,tag:null})}class tw{#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=tC.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 e5(this.#a,this.#u,{method:"GET",uri:c,query:l})}}class tv{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getPlaybackInfo(e,t={}){return(0,l.lastValueFrom)(new tw(this.#a.observable,this.#u).getPlaybackInfo(e,t))}}let tC=/^media-library:(ml[^:]+):([^:]+)$/;class tR{#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),e5(this.#a,this.#u,{uri:"/projects",query:t})}getById(e){return e5(this.#a,this.#u,{uri:`/projects/${e}`})}}class tq{#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),(0,l.lastValueFrom)(e5(this.#a,this.#u,{uri:"/projects",query:t}))}getById(e){return(0,l.lastValueFrom)(e5(this.#a,this.#u,{uri:`/projects/${e}`}))}}let tE=D("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),tI=(e,t)=>t?(0,V.getVersionId)(e,t):(0,V.getDraftId)(e);function t$(e,{releaseId:t,publishedId:r,document:s}){if(r&&s._id){let e=tI(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,V.isDraftId)(s._id),n=(0,V.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,V.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 tI(r,t);throw Error(`\`${e}()\` requires either a publishedId or a document with an \`_id\``)}let tO=(e,t)=>{let[r,s,n]=((e,t)=>{if("object"==typeof e&&null!==e&&("releaseId"in e||"metadata"in e)){let{releaseId:r=tE(),metadata:s={}}=e;return[r,s,t]}return[tE(),{},e]})(e,t);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...s,releaseType:s.releaseType||"undecided"}},options:n}};class tF{#a;#u;
13constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return eL(this.#a,this.#u,`_.releases.${e}`,t)}create(e,t){let{action:r,options:s}=tO(e,t),{releaseId:n,metadata:i}=r;return eZ(this.#a,this.#u,r,s).pipe((0,v.map)(e=>({...e,releaseId:n,metadata:i})))}edit({releaseId:e,patch:t},r){return eZ(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r)}publish({releaseId:e},t){return eZ(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t)}archive({releaseId:e},t){return eZ(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t)}unarchive({releaseId:e},t){return eZ(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t)}schedule({releaseId:e,publishAt:t},r){return eZ(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r)}unschedule({releaseId:e},t){return eZ(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t)}delete({releaseId:e},t){return eZ(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t)}fetchDocuments({releaseId:e},t){return ez(this.#a,this.#u,e,t)}}class tj{#a;#u;constructor(e,t){this.#a=e,this.#u=t}get({releaseId:e},t){return(0,l.lastValueFrom)(eL(this.#a,this.#u,`_.releases.${e}`,t))}async create(e,t){let{action:r,options:s}=tO(e,t),{releaseId:n,metadata:i}=r;return{...await (0,l.lastValueFrom)(eZ(this.#a,this.#u,r,s)),releaseId:n,metadata:i}}edit({releaseId:e,patch:t},r){return(0,l.lastValueFrom)(eZ(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:e,patch:t},r))}publish({releaseId:e},t){return(0,l.lastValueFrom)(eZ(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:e},t))}archive({releaseId:e},t){return(0,l.lastValueFrom)(eZ(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:e},t))}unarchive({releaseId:e},t){return(0,l.lastValueFrom)(eZ(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:e},t))}schedule({releaseId:e,publishAt:t},r){return(0,l.lastValueFrom)(eZ(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:e,publishAt:t},r))}unschedule({releaseId:e},t){return(0,l.lastValueFrom)(eZ(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:e},t))}delete({releaseId:e},t){return(0,l.lastValueFrom)(eZ(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:e},t))}fetchDocuments({releaseId:e},t){return(0,l.lastValueFrom)(ez(this.#a,this.#u,e,t))}}class tA{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return e5(this.#a,this.#u,{uri:`/users/${e}`})}}class tT{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return(0,l.lastValueFrom)(e5(this.#a,this.#u,{uri:`/users/${e}`}))}}class tx{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#u;listen=td;constructor(e,t=ey){this.config(t),this.#u=e,this.assets=new ti(this,this.#u),this.datasets=new tm(this,this.#u),this.live=new tf(this),this.mediaLibrary={video:new tw(this,this.#u)},this.projects=new tR(this,this.#u),this.users=new tA(this,this.#u),this.agent={action:new ts(this,this.#u)},this.releases=new tF(this,this.#u)}clone(){return new tx(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=ev(e,this.#c||{}),this}withConfig(e){let t=this.config();return new tx(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return eU(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){if(t?.includeAllVersions===!0)return eL(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 eL(this,this.#u,e,r)}getDocuments(e,t){return eN(this,this.#u,e,t)}create(e,t){return e1(this,this.#u,e,"create",t)}createIfNotExists(e,t){return eH(this,this.#u,e,t)}createOrReplace(e,t){return eB(this,this.#u,e,t)}createVersion({document:e,publishedId:t,releaseId:r,baseId:s,ifBaseRevisionId:n},i){if(!e)return eW(this,this.#u,t,s,r,n,i);let o=t$("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,V.getPublishedId)(e._id);return eG(this,this.#u,a,u,i)}delete(e,t){return eJ(this,this.#u,e,t)}discardVersion({releaseId:e,publishedId:t},r,s){let n=tI(t,e);return eQ(this,this.#u,n,r,s)}replaceVersion({document:e,publishedId:t,releaseId:r},s){let n=t$("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:n};return eY(this,this.#u,i,s)}unpublishVersion({releaseId:e,publishedId:t},r){let s=(0,V.getVersionId)(t,e);return eK(this,this.#u,s,t,r)}mutate(e,t){return eX(this,this.#u,e,t)}patch(e,t){return new eT(e,t,this)}transaction(e){return new eP(e,this)}action(e,t){return eZ(this,this.#u,e,t)}request(e){return e5(this,this.#u,e)}getUrl(e,t){return e4(this,e,t)}getDataUrl(e,t){return e2(this,e,t)}}class tV{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#u;listen=td;constructor(e,t=ey){this.config(t),this.#u=e,this.assets=new to(this,this.#u),this.datasets=new ty(this,this.#u),this.live=new tf(this),this.mediaLibrary={video:new tv(this,this.#u)}
13,this.projects=new tq(this,this.#u),this.users=new tT(this,this.#u),this.agent={action:new tn(this,this.#u)},this.releases=new tj(this,this.#u),this.observable=new tx(e,t)}clone(){return new tV(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=ev(e,this.#c||{}),this}withConfig(e){let t=this.config();return new tV(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return(0,l.lastValueFrom)(eU(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){if(t?.includeAllVersions===!0)return(0,l.lastValueFrom)(eL(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(0,l.lastValueFrom)(eL(this,this.#u,e,r))}getDocuments(e,t){return(0,l.lastValueFrom)(eN(this,this.#u,e,t))}create(e,t){return(0,l.lastValueFrom)(e1(this,this.#u,e,"create",t))}createIfNotExists(e,t){return(0,l.lastValueFrom)(eH(this,this.#u,e,t))}createOrReplace(e,t){return(0,l.lastValueFrom)(eB(this,this.#u,e,t))}createVersion({document:e,publishedId:t,releaseId:r,baseId:s,ifBaseRevisionId:n},i){if(!e)return(0,C.firstValueFrom)(eW(this,this.#u,t,s,r,n,i));let o=t$("createVersion",{document:e,publishedId:t,releaseId:r}),a={...e,_id:o},u=t||(0,V.getPublishedId)(e._id);return(0,C.firstValueFrom)(eG(this,this.#u,a,u,i))}delete(e,t){return(0,l.lastValueFrom)(eJ(this,this.#u,e,t))}discardVersion({releaseId:e,publishedId:t},r,s){let n=tI(t,e);return(0,l.lastValueFrom)(eQ(this,this.#u,n,r,s))}replaceVersion({document:e,publishedId:t,releaseId:r},s){let n=t$("replaceVersion",{document:e,publishedId:t,releaseId:r}),i={...e,_id:n};return(0,C.firstValueFrom)(eY(this,this.#u,i,s))}unpublishVersion({releaseId:e,publishedId:t},r){let s=(0,V.getVersionId)(t,e);return(0,l.lastValueFrom)(eK(this,this.#u,s,t,r))}mutate(e,t){return(0,l.lastValueFrom)(eX(this,this.#u,e,t))}patch(e,t){return new ex(e,t,this)}transaction(e){return new eD(e,this)}action(e,t){return(0,l.lastValueFrom)(eZ(this,this.#u,e,t))}request(e){return(0,l.lastValueFrom)(e5(this,this.#u,e))}dataRequest(e,t,r){return(0,l.lastValueFrom)(e0(this,this.#u,e,t,r))}getUrl(e,t){return e4(this,e,t)}getDataUrl(e,t){return e2(this,e,t)}}let tS={requester:W(t=[]),createClient:e=>{let r=W(t,{ignoreWarnings:e.ignoreWarnings});return new tV((t,s)=>(s||r)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,lineage:e.lineage,...t}),e)}},tD=(tS.requester,tS.createClient);e.s(["ChannelError",()=>eq,"ClientError",()=>k,"ServerError",()=>U,"createClient",()=>tD],51411)}]);

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.