"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6417],{21475:function(e,t,r){r.d(t,{C:function(){return s},N:function(){return c}});var n={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},o={0:8203,1:8204,2:8205,3:65279},i=[,,,,].fill(String.fromCodePoint(o[0])).join("");function s(e,t,r="auto"){let n;return!0===r||"auto"===r&&(!(!Number.isNaN(Number(e))||/[a-z]/i.test(e)&&!/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(e))&&Date.parse(e)||function(e){try{new URL(e,e.startsWith("/")?"https://acme.com":void 0)}catch{return!1}return!0}(e))?e:`${e}${n=JSON.stringify(t),`${i}${Array.from(n).map(e=>{let t=e.charCodeAt(0);if(t>255)throw Error(`Only ASCII edit info can be encoded. Error attempting to encode ${n} on character ${e} (${t})`);return Array.from(t.toString(4).padStart(4,"0")).map(e=>String.fromCodePoint(o[e])).join("")}).join("")}`}`}Object.fromEntries(Object.entries(o).map(e=>e.reverse())),Object.fromEntries(Object.entries(n).map(e=>e.reverse()));var a=`${Object.values(n).map(e=>`\\u{${e.toString(16)}}`).join("")}`,u=RegExp(`[${a}]{4,}`,"gu");function c(e){var t,r;return e&&JSON.parse({cleaned:(t=JSON.stringify(e)).replace(u,""),encoded:(null==(r=t.match(u))?void 0:r[0])||""}.cleaned)}},36417:function(e,t,r){r.d(t,{eI:function(){return nb}});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,o={timeout:n?6e4:12e4},i=function(e){let t={...o,..."string"==typeof e?{url:e}:e};if(t.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let r=Number(t);return isNaN(r)?e(o.timeout):{connect:r,socket:r}}(t.timeout),t.query){let{url:e,searchParams:r}=function(e){let t=e.indexOf("?");if(-1===t)return{url:e,searchParams:new URLSearchParams};let r=e.slice(0,t),o=e.slice(t+1);if(!n)return{url:r,searchParams:new URLSearchParams(o)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let i=new URLSearchParams;for(let e of o.split("&")){let[t,r]=e.split("=");t&&i.append(s(t),s(r||""))}return{url:r,searchParams:i}}(t.url);for(let[n,o]of Object.entries(t.query)){if(void 0!==o){if(Array.isArray(o))for(let e of o)r.append(n,e);else r.append(n,o)}let i=r.toString();i&&(t.url=`${e}?${i}`)}}return t.method=t.body&&!t.method?"POST":(t.method||"GET").toUpperCase(),t};function s(e){return decodeURIComponent(e.replace(/\+/g," "))}let a=/^https?:\/\//i,u=function(e){if(!a.test(e.url))throw Error(`"${e.url}" is not a valid URL`)},c=e=>function(t,r,...n){let o="onError"===t,i=r;for(let r=0;r<e[t].length&&(i=(0,e[t][r])(i,...n),!o||i);r++);return i},l=["request","response","progress","error","abort"],h=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var d,f,p,y,m,b,g,v,w,C,E=function(e){return e.replace(/^\s+|\s+$/g,"")},x=(d=function(e){if(!e)return{};for(var t={},r=E(e).split(`
`),n=0;n<r.length;n++){var o,i=r[n],s=i.indexOf(":"),a=E(i.slice(0,s)).toLowerCase(),u=E(i.slice(s+1));typeof t[a]>"u"?t[a]=u:(o=t[a],"[object Array]"===Object.prototype.toString.call(o))?t[a].push(u):t[a]=[t[a],u]}return t}).__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d,O=Object.defineProperty,T=e=>{throw TypeError(e)},j=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,S=(e,t,r)=>j(e,"symbol"!=typeof t?t+"":t,r),$=(e,t,r)=>t.has(e)||T("Cannot "+r),k=(e,t,r)=>($(e,t,"read from private field"),r?r.call(e):t.get(e)),A=(e,t,r)=>t.has(e)?T("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),I=(e,t,r,n)=>($(e,t,"write to private field"),t.set(e,r),r);class R{constructor(){S(this,"onabort"),S(this,"onerror"),S(this,"onreadystatechange"),S(this,"ontimeout"),S(this,"readyState",0),S(this,"response"),S(this,"responseText",""),S(this,"responseType",""),S(this,"status"),S(this,"statusText"),S(this,"withCredentials"),A(this,y),A(this,m),A(this,b),A(this,g,{}),A(this,v),A(this,w,{}),A(this,C)}open(e,t,r){var n;I(this,y,e),I(this,m,t),I(this,b,""),this.readyState=1,null==(n=this.onreadystatechange)||n.call(this),I(this,v,void 0)}abort(){k(this,v)&&k(this,v).abort()}getAllResponseHeaders(){return k(this,b)}setRequestHeader(e,t){k(this,g)[e]=t}setInit(e,t=!0){I(this,w,e),I(this,C,t)}send(e){let t="arraybuffer"!==this.responseType,r={...k(this,w),method:k(this,y),headers:k(this,g),body:e};"function"==typeof AbortController&&k(this,C)&&(I(this,v,new AbortController),"u">typeof EventTarget&&k(this,v).signal instanceof EventTarget&&(r.signal=k(this,v).signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(k(this,m),r).then(e=>{var r;return e.headers.forEach((e,t)=>{I(this,b,k(this,b)+`${t}: ${e}\r
`)}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,null==(r=this.onreadystatechange)||r.call(this),t?e.text():e.arrayBuffer()}).then(e=>{var t;"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,null==(t=this.onreadystatechange)||t.call(this)}).catch(e=>{var t,r;if("AbortError"===e.name){null==(t=this.onabort)||t.call(this);return}null==(r=this.onerror)||r.call(this,e)})}}y=new WeakMap,m=new WeakMap,b=new WeakMap,g=new WeakMap,v=new WeakMap,w=new WeakMap,C=new WeakMap;let F="function"==typeof XMLHttpRequest?"xhr":"fetch",P="xhr"===F?XMLHttpRequest:R,M=(e,t)=>{var r;let n=e.options,o=e.applyMiddleware("finalizeOptions",n),i={},s=e.applyMiddleware("interceptRequest",void 0,{adapter:F,context:e});if(s){let e=setTimeout(t,0,null,s);return{abort:()=>clearTimeout(e)}}let a=new P;a instanceof R&&"object"==typeof o.fetch&&a.setInit(o.fetch,null==(r=o.useAbortSignal)||r);let u=o.headers,c=o.timeout,l=!1,h=!1,d=!1;if(a.onerror=e=>{a instanceof R?y(e instanceof Error?e:Error(`Request error while attempting to reach is ${o.url}`,{cause:e})):y(Error(`Request error while attempting to reach is ${o.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},a.ontimeout=e=>{y(Error(`Request timeout while attempting to reach ${o.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},a.onabort=()=>{p(!0),l=!0},a.onreadystatechange=()=>{c&&(p(),i.socket=setTimeout(()=>f("ESOCKETTIMEDOUT"),c.socket)),l||4!==a.readyState||0===a.status||function(){if(!(l||h||d)){if(0===a.status){y(Error("Unknown XHR error"));return}p(),h=!0,t(null,{body:a.response||(""===a.responseType||"text"===a.responseType?a.responseText:""),url:o.url,method:o.method,headers:x(a.getAllResponseHeaders()),statusCode:a.status,statusMessage:a.statusText})}}()},a.open(o.method,o.url,!0),a.withCredentials=!!o.withCredentials,u&&a.setRequestHeader)for(let e in u)u.hasOwnProperty(e)&&a.setRequestHeader(e,u[e]);return o.rawBody&&(a.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:o,adapter:F,request:a,context:e}),a.send(o.body||null),c&&(i.connect=setTimeout(()=>f("ETIMEDOUT"),c.connect)),{abort:function(){l=!0,a&&a.abort()}};function f(t){d=!0,a.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${o.url}`:`Connection timed out on request to ${o.url}`);r.code=t,e.channels.error.publish(r)}function p(e){(e||l||a.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function y(e){if(h)return;p(!0),h=!0,a=null;let r=e||Error(`Network error while attempting to reach ${o.url}`);r.isNetworkError=!0,r.request=o,t(r)}},_=(e=[],t=M)=>(function e(t,r){let n=[],o=h.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[i],validateOptions:[u]});function s(e){let t;let n=(e,t,r)=>{let n=e,o=t;if(!n)try{o=s("onResponse",t,r)}catch(e){o=null,n=e}(n=n&&s("onError",n,r))?i.error.publish(n):o&&i.response.publish(o)},i=l.reduce((e,t)=>(e[t]=function(){let e=Object.create(null),t=0;return{publish:function(t){for(let r in e)e[r](t)},subscribe:function(r){let n=t++;return e[n]=r,function(){delete e[n]}}}}(),e),{}),s=c(o),a=s("processOptions",e);s("validateOptions",a);let u={options:a,channels:i,applyMiddleware:s},h=i.request.subscribe(e=>{t=r(e,(t,r)=>n(t,r,e))});i.abort.subscribe(()=>{h(),t&&t.abort()});let d=s("onReturn",i,u);return d===i&&i.request.publish(u),d}return s.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&&o.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return h.forEach(t=>{e[t]&&o[t].push(e[t])}),n.push(e),s},s.clone=()=>e(n,r),t.forEach(s.use),s})(e,t);var q,D,N=r(32608),U=r(38003).Buffer,W={exports:{}},L=function(e){function t(e){let n,o=null,i,s;function a(...e){if(!a.enabled)return;let r=Number(new Date),o=r-(n||r);a.diff=o,a.prev=n,a.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let o=t.formatters[n];if("function"==typeof o){let t=e[i];r=o.call(a,t),e.splice(i,1),i--}return r}),t.formatArgs.call(a,e),(a.log||t.log).apply(a,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,s=t.enabled(e)),s),set:e=>{o=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}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.map(n),...t.skips.map(n).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];let n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(RegExp("^"+e.slice(1)+"$")):t.names.push(RegExp("^"+e+"$")))},t.enabled=function(e){let r,n;if("*"===e[e.length-1])return!0;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=function(){if(D)return q;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return D=1,q=function(t,r){r=r||{};var n,o,i=typeof t;if("string"===i&&t.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return 864e5*r;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*r;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(t);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":(o=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":o>=36e5?Math.round(t/36e5)+"h":o>=6e4?Math.round(t/6e4)+"m":o>=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};!function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,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")}catch{}return!e&&"u">typeof N&&"env"in N&&(e=N.env.DEBUG),e},t.useColors=function(){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&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(r=!1,()=>{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=L(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(W,W.exports),W.exports,Object.prototype.hasOwnProperty;let z=typeof U>"u"?()=>!1:e=>U.isBuffer(e);/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */function H(e){return"[object Object]"===Object.prototype.toString.call(e)}let B=["boolean","string","number"],J={};"u">typeof globalThis?J=globalThis:"u">typeof window?J=window:"u">typeof global?J=global:"u">typeof self&&(J=self);var V=J,G=Object.defineProperty,Y=(e,t,r)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,X=(e,t,r)=>Y(e,"symbol"!=typeof t?t+"":t,r);let K=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:(r,n)=>new t((t,o)=>{let i=n.options.cancelToken;i&&i.promise.then(e=>{r.abort.publish(e),o(e)}),r.error.subscribe(o),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){o(e)}},0)})}};class Q{constructor(e){X(this,"__CANCEL__",!0),X(this,"message"),this.message=e}toString(){return`Cancel${this.message?`: ${this.message}`:""}`}}let Z=class{constructor(e){if(X(this,"promise"),X(this,"reason"),"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 Q(e),t(this.reason))})}};X(Z,"source",()=>{let e;return{token:new Z(t=>{e=t}),cancel:e}}),K.Cancel=Q,K.CancelToken=Z,K.isCancel=e=>!!(e&&null!=e&&e.__CANCEL__);var ee=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);let et=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;var er=e=>{let t=e.maxRetries||5,r=e.retryDelay||en,n=e.shouldRetry;return{onError:(e,o)=>{let i=o.options,s=i.maxRetries||t,a=i.retryDelay||r,u=i.shouldRetry||n,c=i.attemptNumber||0;if(et(i.body)||!u(e,c,i)||c>=s)return e;let l=Object.assign({},o,{options:Object.assign({},i,{attemptNumber:c+1})});return setTimeout(()=>o.channels.request.publish(l),a(c)),null}}};function en(e){return 100*Math.pow(2,e)+100*Math.random()}let eo=(e={})=>er({shouldRetry:ee,...e});eo.shouldRetry=ee;var ei=Object.defineProperty,es=(e,t,r)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ea=r(70246);function eu(e){return"function"==typeof e}function ec(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var el=ec(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}});function eh(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var ed=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,o,i=this._parentage;if(i){if(this._parentage=null,Array.isArray(i))try{for(var s=(0,ea.XA)(i),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this)}var u=this.initialTeardown;if(eu(u))try{u()}catch(e){o=e instanceof el?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,ea.XA)(c),h=l.next();!h.done;h=l.next()){var d=h.value;try{ep(d)}catch(e){o=null!=o?o:[],e instanceof el?o=(0,ea.ev)((0,ea.ev)([],(0,ea.CR)(o)),(0,ea.CR)(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(o)throw new el(o)}},t.prototype.add=function(e){var r;if(e&&e!==this){if(this.closed)ep(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(e)}}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&eh(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&eh(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}();function ef(e){return e instanceof ed||e&&"closed"in e&&eu(e.remove)&&eu(e.add)&&eu(e.unsubscribe)}function ep(e){eu(e)?e():e.unsubscribe()}ed.EMPTY;var ey={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},em={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=em.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,(0,ea.ev)([e,t],(0,ea.CR)(r))):setTimeout.apply(void 0,(0,ea.ev)([e,t],(0,ea.CR)(r)))},clearTimeout:function(e){var t=em.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function eb(e){em.setTimeout(function(){var t=ey.onUnhandledError;if(t)t(e);else throw e})}function eg(){}var ev=ew("C",void 0,void 0);function ew(e,t,r){return{kind:e,value:t,error:r}}var eC=null,eE=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,ef(t)&&t.add(r)):r.destination=ek,r}return(0,ea.ZT)(t,e),t.create=function(e,t,r){return new ej(e,t,r)},t.prototype.next=function(e){this.isStopped?e$(ew("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?e$(ew("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?e$(ev,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(ed),ex=Function.prototype.bind;function eO(e,t){return ex.call(e,t)}var eT=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){eS(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){eS(e)}else eS(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){eS(e)}},e}(),ej=function(e){function t(t,r,n){var o,i,s=e.call(this)||this;return eu(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s&&ey.useDeprecatedNextContext?((i=Object.create(t)).unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&eO(t.next,i),error:t.error&&eO(t.error,i),complete:t.complete&&eO(t.complete,i)}):o=t,s.destination=new eT(o),s}return(0,ea.ZT)(t,e),t}(eE);function eS(e){ey.useDeprecatedSynchronousErrorHandling?ey.useDeprecatedSynchronousErrorHandling&&eC&&(eC.errorThrown=!0,eC.error=e):eb(e)}function e$(e,t){var r=ey.onStoppedNotification;r&&em.setTimeout(function(){return r(e,t)})}var ek={closed:!0,next:eg,error:function(e){throw e},complete:eg},eA="function"==typeof Symbol&&Symbol.observable||"@@observable";function eI(e){return e}function eR(e){return 0===e.length?eI:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var eF=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof eE||n&&eu(n.next)&&eu(n.error)&&eu(n.complete)&&ef(n)?e:new ej(e,t,r);return function(e){if(ey.useDeprecatedSynchronousErrorHandling){var t=!eC;if(t&&(eC={errorThrown:!1,error:null}),e(),t){var r=eC,n=r.errorThrown,o=r.error;if(eC=null,n)throw o}}else e()}(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=eP(t))(function(t,n){var o=new ej({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[eA]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eR(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=eP(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function eP(e){var t;return null!==(t=null!=e?e:ey.Promise)&&void 0!==t?t:Promise}var eM=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function e_(e){return eu(null==e?void 0:e.then)}function eq(e){return Symbol.asyncIterator&&eu(null==e?void 0:e[Symbol.asyncIterator])}function eD(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var eN="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function eU(e){return eu(null==e?void 0:e[eN])}function eW(e){return(0,ea.FC)(this,arguments,function(){var t,r,n;return(0,ea.Jh)(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,(0,ea.qq)(t.read())];case 3:if(n=(r=o.sent()).value,!r.done)return[3,5];return[4,(0,ea.qq)(void 0)];case 4:return[2,o.sent()];case 5:return[4,(0,ea.qq)(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eL(e){return eu(null==e?void 0:e.getReader)}function ez(e){if(e instanceof eF)return e;if(null!=e){if(eu(e[eA]))return new eF(function(t){var r=e[eA]();if(eu(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")});if(eM(e))return new eF(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()});if(e_(e))return new eF(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,eb)});if(eq(e))return eH(e);if(eU(e))return new eF(function(t){var r,n;try{for(var o=(0,ea.XA)(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(t.next(s),t.closed)return}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}t.complete()});if(eL(e))return eH(eW(e))}throw eD(e)}function eH(e){return new eF(function(t){(function(e,t){var r,n,o,i;return(0,ea.mG)(this,void 0,void 0,function(){var s;return(0,ea.Jh)(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=(0,ea.KL)(e),a.label=1;case 1:return[4,r.next()];case 2:if((n=a.sent()).done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(n&&!n.done&&(i=r.return)))return[3,8];return[4,i.call(r)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}function eB(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var i=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i}function eJ(e){return function(t){if(eu(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function eV(e,t,r,n,o){return new eG(e,t,r,n,o)}var eG=function(e){function t(t,r,n,o,i,s){var a=e.call(this,t)||this;return a.onFinalize=i,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,ea.ZT)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null===(t=this.onFinalize)||void 0===t||t.call(this)}},t}(eE);function eY(e,t){return void 0===t&&(t=0),eJ(function(r,n){r.subscribe(eV(n,function(r){return eB(n,e,function(){return n.next(r)},t)},function(){return eB(n,e,function(){return n.complete()},t)},function(r){return eB(n,e,function(){return n.error(r)},t)}))})}function eX(e,t){return void 0===t&&(t=0),eJ(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function eK(e,t){if(!e)throw Error("Iterable cannot be null");return new eF(function(r){eB(r,t,function(){var n=e[Symbol.asyncIterator]();eB(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function eQ(e,t){return t?function(e,t){if(null!=e){if(eu(e[eA]))return ez(e).pipe(eX(t),eY(t));if(eM(e))return new eF(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(e_(e))return ez(e).pipe(eX(t),eY(t));if(eq(e))return eK(e,t);if(eU(e))return new eF(function(r){var n;return eB(r,t,function(){n=e[eN](),eB(r,t,function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){r.error(e);return}o?r.complete():r.next(t)},0,!0)}),function(){return eu(null==n?void 0:n.return)&&n.return()}});if(eL(e))return eK(eW(e),t)}throw eD(e)}(e,t):ez(e)}var eZ=ec(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function e0(e,t){var r="object"==typeof t;return new Promise(function(n,o){var i,s=!1;e.subscribe({next:function(e){i=e,s=!0},error:o,complete:function(){s?n(i):r?n(t.defaultValue):o(new eZ)}})})}var e1=Array.isArray;function e3(e,t){return eJ(function(r,n){var o=0;r.subscribe(eV(n,function(r){n.next(e.call(t,r,o++))}))})}var e6=Array.isArray;function e9(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=eu(e[e.length-1])?e.pop():void 0;return r?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eR(e)}(e9.apply(void 0,(0,ea.ev)([],(0,ea.CR)(e))),e3(function(e){return e6(e)?r.apply(void 0,(0,ea.ev)([],(0,ea.CR)(e))):r(e)})):eJ(function(t,r){var n,o,i;(n=(0,ea.ev)([t],(0,ea.CR)(1===e.length&&e1(e[0])?e[0]:e)),void 0===i&&(i=eI),function(e){var t,r;t=void 0,r=function(){for(var t=n.length,r=Array(t),s=t,a=t,u=function(t){var u;u=function(){var u=eQ(n[t],o),c=!1;u.subscribe(eV(e,function(n){r[t]=n,!c&&(c=!0,a--),a||e.next(i(r.slice()))},function(){--s||e.complete()}))},o?eB(e,o,u):u()},c=0;c<t;c++)u(c)},t?eB(e,t,r):r()})(r)})}function e2(e,t){return eJ(function(r,n){var o=0;r.subscribe(eV(n,function(r){return e.call(t,r,o++)&&n.next(r)}))})}var e5=r(21475),e4=Object.defineProperty,e8=(e,t,r)=>t in e?e4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,e7=(e,t,r)=>(e8(e,"symbol"!=typeof t?t+"":t,r),r);class te extends Error{constructor(e){let t=tr(e);super(t.message),e7(this,"response"),e7(this,"statusCode",400),e7(this,"responseBody"),e7(this,"details"),Object.assign(this,t)}}class tt extends Error{constructor(e){let t=tr(e);super(t.message),e7(this,"response"),e7(this,"statusCode",500),e7(this,"responseBody"),e7(this,"details"),Object.assign(this,t)}}function tr(e){let t=e.body,r={response:e,statusCode:e.statusCode,responseBody:-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(t,null,2):t,message:"",details:void 0};if(t.error&&t.message)return r.message=`${t.error} - ${t.message}`,r;if(tn(t)&&tn(t.error)&&"mutationError"===t.error.type&&"string"==typeof t.error.description||tn(t)&&tn(t.error)&&"actionError"===t.error.type&&"string"==typeof t.error.description){let e=t.error.items||[],n=e.slice(0,5).map(e=>{var t;return null==(t=e.error)?void 0:t.description}).filter(Boolean),o=n.length?`:
- ${n.join(`
- `)}`:"";return e.length>5&&(o+=`
...and ${e.length-5} more`),r.message=`${t.error.description}${o}`,r.details=t.error,r}return t.error&&t.error.description?(r.message=t.error.description,r.details=t.error):r.message=t.error||t.message||function(e){let t=e.statusMessage?` ${e.statusMessage}`:"";return`${e.method}-request to ${e.url} resulted in HTTP ${e.statusCode}${t}`}(e),r}function tn(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let to={onResponse:e=>{if(e.statusCode>=500)throw new tt(e);if(e.statusCode>=400)throw new te(e);return e}},ti={onResponse:e=>{let t=e.headers["x-sanity-warning"];return(Array.isArray(t)?t:[t]).filter(Boolean).forEach(e=>console.warn(e)),e}};function ts(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,o=(r.uri||r.url).startsWith("/data/query"),i=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!o)&&!!i||eo.shouldRetry(e,t,r)}function ta(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(`
`);throw Error(`Unknown selection - must be one of:

${t}`)}let tu=["image","file"],tc=["before","after","replace"],tl=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")},th=e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},td=e=>{if(-1===tu.indexOf(e))throw Error(`Invalid asset type: ${e}. Must be one of ${tu.join(", ")}`)},tf=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},tp=(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`)},ty=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);tp(e,t._id)},tm=(e,t,r)=>{let n="insert(at, selector, items)";if(-1===tc.indexOf(e)){let e=tc.map(e=>`"${e}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} takes an "items"-argument which must be an array`)},tb=e=>{if(!e.dataset)throw Error("`dataset` must be provided to perform queries");return e.dataset||""},tg=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};var tv=Object.defineProperty,tw=(e,t,r)=>t in e?tv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tC=(e,t,r)=>(tw(e,"symbol"!=typeof t?t+"":t,r),r),tE=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tx=(e,t,r)=>(tE(e,t,"read from private field"),r?r.call(e):t.get(e)),tO=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},tT=(e,t,r,n)=>(tE(e,t,"write to private field"),t.set(e,r),r);class tj{constructor(e,t={}){tC(this,"selection"),tC(this,"operations"),this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return tf("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 tm(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,n){let o=t<0?t-1:t,i=typeof r>"u"||-1===r?-1:Math.max(0,t+r),s=`${e}[${o}:${o<0&&i>=0?"":i}]`;return this.insert("replace",s,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...ta(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return tf(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)}}let tS=class e extends tj{constructor(e,t,r){super(e,t),tO(this,rc,void 0),tT(this,rc,r)}clone(){return new e(this.selection,{...this.operations},tx(this,rc))}commit(e){if(!tx(this,rc))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 tx(this,rc).mutate({patch:this.serialize()},t)}};rc=new WeakMap;let t$=class e extends tj{constructor(e,t,r){super(e,t),tO(this,rl,void 0),tT(this,rl,r)}clone(){return new e(this.selection,{...this.operations},tx(this,rl))}commit(e){if(!tx(this,rl))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 tx(this,rl).mutate({patch:this.serialize()},t)}};rl=new WeakMap;var tk=Object.defineProperty,tA=(e,t,r)=>t in e?tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tI=(e,t,r)=>(tA(e,"symbol"!=typeof t?t+"":t,r),r),tR=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},tF=(e,t,r)=>(tR(e,t,"read from private field"),r?r.call(e):t.get(e)),tP=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},tM=(e,t,r,n)=>(tR(e,t,"write to private field"),t.set(e,r),r);let t_={returnDocuments:!1};class tq{constructor(e=[],t){tI(this,"operations"),tI(this,"trxId"),this.operations=e,this.trxId=t}create(e){return tf("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return tf(t,e),ty(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return tf(t,e),ty(t,e),this._add({[t]:e})}delete(e){return tp("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}}let tD=class e extends tq{constructor(e,t,r){super(e,r),tP(this,rh,void 0),tM(this,rh,t)}clone(){return new e([...this.operations],tF(this,rh),this.trxId)}commit(e){if(!tF(this,rh))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return tF(this,rh).mutate(this.serialize(),Object.assign({transactionId:this.trxId},t_,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof t$)return this._add({patch:e.serialize()});if(r){let r=t(new t$(e,{},tF(this,rh)));if(!(r instanceof t$))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}};rh=new WeakMap;let tN=class e extends tq{constructor(e,t,r){super(e,r),tP(this,rd,void 0),tM(this,rd,t)}clone(){return new e([...this.operations],tF(this,rd),this.trxId)}commit(e){if(!tF(this,rd))throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return tF(this,rd).mutate(this.serialize(),Object.assign({transactionId:this.trxId},t_,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,{},tF(this,rd)));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}})}};function tU(e){return"https://www.sanity.io/help/"+e}rd=new WeakMap;let tW=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},tL=tW(["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"]),tz=tW(["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."]),tH=tW(["The Sanity client is configured with the `perspective` set to `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."]),tB=tW(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tU("js-client-browser-token")} for more information and how to hide this warning.`]),tJ=tW(["Using the Sanity client without specifying an API version is deprecated.",`See ${tU("js-client-api-version")}`]),tV=(tW(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),{apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}}),tG=["localhost","127.0.0.1","0.0.0.0"],tY=e=>-1!==tG.indexOf(e),tX=function(e){switch(e){case"previewDrafts":case"published":case"raw":return;default:throw TypeError("Invalid API perspective string, expected `published`, `previewDrafts` or `raw`")}},tK=(e,t)=>{let r={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||tV.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};r.apiVersion||tJ();let n={...tV,...r},o=n.useProjectHostname;if(typeof Promise>"u"){let e=tU("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("string"==typeof n.perspective&&tX(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 i="u">typeof window&&window.location&&window.location.hostname,s=i&&tY(window.location.hostname);i&&s&&n.token&&!0!==n.ignoreBrowserTokenWarning?tB():typeof n.useCdn>"u"&&tz(),o&&th(n.projectId),n.dataset&&tl(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?tg(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===tV.apiHost,!0===n.useCdn&&n.withCredentials&&tL(),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 a=n.apiHost.split("://",2),u=a[0],c=a[1],l=n.isDefaultApi?"apicdn.sanity.io":c;return n.useProjectHostname?(n.url=`${u}://${n.projectId}.${c}/v${n.apiVersion}`,n.cdnUrl=`${u}://${n.projectId}.${l}/v${n.apiVersion}`):(n.url=`${n.apiHost}/v${n.apiVersion}`,n.cdnUrl=n.url),n},tQ=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:o,returnQuery:i,...s}=r;for(let[r,i]of(o&&n.append("tag",o),n.append("query",e),Object.entries(t)))n.append(`$${r}`,JSON.stringify(i));for(let[e,t]of Object.entries(s))t&&n.append(e,`${t}`);return!1===i&&n.append("returnQuery","false"),`?${n}`},tZ=(e,t)=>!1===e?void 0:typeof e>"u"?t:e,t0=(e={})=>({dryRun:e.dryRun,returnIds:!0,returnDocuments:tZ(e.returnDocuments,!0),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}),t1=e=>"response"===e.type,t3=e=>e.body,t6=(e,t)=>e.reduce((e,r)=>(e[t(r)]=r,e),Object.create(null));function t9(e,t,n,o,i={},s={}){let a="stega"in s?{...n||{},..."boolean"==typeof s.stega?{enabled:s.stega}:s.stega||{}}:n,u=a.enabled?(0,e5.N)(i):i,c=!1===s.filterResponse?e=>e:e=>e.result,{cache:l,next:h,...d}={useAbortSignal:"u">typeof s.signal,resultSourceMap:a.enabled?"withKeyArraySelector":s.resultSourceMap,...s,returnQuery:!1===s.filterResponse&&!1!==s.returnQuery},f=rr(e,t,"query",{query:o,params:u},"u">typeof l||"u">typeof h?{...d,fetch:{cache:l,next:h}}:d);return a.enabled?f.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e9.apply(void 0,(0,ea.ev)([],(0,ea.CR)(e)))}(eQ(r.e(7536).then(r.bind(r,47536)).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),e3(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):f.pipe(e3(c))}function t2(e,t,r,n={}){let o={uri:rs(e,"doc",r),json:!0,tag:n.tag};return ro(e,t,o).pipe(e2(t1),e3(e=>e.body.documents&&e.body.documents[0]))}function t5(e,t,r,n={}){let o={uri:rs(e,"doc",r.join(",")),json:!0,tag:n.tag};return ro(e,t,o).pipe(e2(t1),e3(e=>{let t=t6(e.body.documents||[],e=>e._id);return r.map(e=>t[e]||null)}))}function t4(e,t,r,n){return ty("createIfNotExists",r),rn(e,t,r,"createIfNotExists",n)}function t8(e,t,r,n){return ty("createOrReplace",r),rn(e,t,r,"createOrReplace",n)}function t7(e,t,r,n){return rr(e,t,"mutate",{mutations:[{delete:ta(r)}]},n)}function re(e,t,r,n){let o;return rr(e,t,"mutate",{mutations:Array.isArray(o=r instanceof t$||r instanceof tS?{patch:r.serialize()}:r instanceof tD||r instanceof tN?r.serialize():r)?o:[o],transactionId:n&&n.transactionId||void 0},n)}function rt(e,t,r,n){let o=Array.isArray(r)?r:[r];return rr(e,t,"actions",{actions:o,transactionId:n&&n.transactionId||void 0,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function rr(e,t,r,n,o={}){let i="mutate"===r,s="actions"===r,a=i||s?"":tQ(n),u=!i&&!s&&a.length<11264,c=o.returnFirst,{timeout:l,token:h,tag:d,headers:f,returnQuery:p,lastLiveEventId:y}=o,m=rs(e,r,u?a:"");return ro(e,t,{method:u?"GET":"POST",uri:m,json:!0,body:u?void 0:n,query:i&&t0(o),timeout:l,headers:f,token:h,tag:d,returnQuery:p,perspective:o.perspective,resultSourceMap:o.resultSourceMap,lastLiveEventId:Array.isArray(y)?y[0]:y,canUseCdn:"query"===r,signal:o.signal,fetch:o.fetch,useAbortSignal:o.useAbortSignal,useCdn:o.useCdn}).pipe(e2(t1),e3(t3),e3(e=>{if(!i)return e;let t=e.results||[];if(o.returnDocuments)return c?t[0]&&t[0].document:t.map(e=>e.document);let r=c?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[c?"documentId":"documentIds"]:r}}))}function rn(e,t,r,n,o={}){return rr(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},o))}function ro(e,t,r){var n,o,i;let s=r.url||r.uri,a=e.config(),u=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&0===s.indexOf("/data/"):r.canUseCdn,c=(null!=(n=r.useCdn)?n:a.useCdn)&&u,l=r.tag&&a.requestTagPrefix?[a.requestTagPrefix,r.tag].join("."):r.tag||a.requestTagPrefix;if(l&&null!==r.tag&&(r.query={tag:tg(l),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&0===s.indexOf("/data/query/")){let e=null!=(o=r.resultSourceMap)?o:a.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||a.perspective;"string"==typeof t&&"raw"!==t&&(tX(t),r.query={perspective:t,...r.query},"previewDrafts"===t&&c&&(c=!1,tH())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query})}let h=function(e,t={}){let r={},n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let o=!!(typeof t.withCredentials>"u"?e.token||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:o,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(a,Object.assign({},r,{url:ra(e,s,c)})),d=new eF(e=>t(h,a.requester).subscribe(e));return r.signal?d.pipe((i=r.signal,e=>new eF(t=>{let r=()=>t.error(function(e){var t,r;if(ru)return new DOMException(null!=(t=null==e?void 0:e.reason)?t:"The operation was aborted.","AbortError");let n=Error(null!=(r=null==e?void 0:e.reason)?r:"The operation was aborted.");return n.name="AbortError",n}(i));if(i&&i.aborted){r();return}let n=e.subscribe(t);return i.addEventListener("abort",r),()=>{i.removeEventListener("abort",r),n.unsubscribe()}}))):d}function ri(e,t,r){return ro(e,t,r).pipe(e2(e=>"response"===e.type),e3(e=>e.body))}function rs(e,t,r){let n=tb(e.config()),o=`/${t}/${n}`;return`/data${r?`${o}/${r}`:o}`.replace(/\/($|\?)/,"$1")}function ra(e,t,r=!1){let{url:n,cdnUrl:o}=e.config();return`${r?o:n}/${t.replace(/^\//,"")}`}let ru=!!globalThis.DOMException;var rc,rl,rh,rd,rf,rp,ry=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rm=(e,t,r)=>(ry(e,t,"read from private field"),r?r.call(e):t.get(e)),rb=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},rg=(e,t,r,n)=>(ry(e,t,"write to private field"),t.set(e,r),r);class rv{constructor(e,t){rb(this,rf,void 0),rb(this,rp,void 0),rg(this,rf,e),rg(this,rp,t)}upload(e,t,r){return rC(rm(this,rf),rm(this,rp),e,t,r)}}rf=new WeakMap,rp=new WeakMap;class rw{constructor(e,t){rb(this,rM,void 0),rb(this,r_,void 0),rg(this,rM,e),rg(this,r_,t)}upload(e,t,r){return e0(rC(rm(this,rM),rm(this,r_),e,t,r).pipe(e2(e=>"response"===e.type),e3(e=>e.body.document)))}}function rC(e,t,r,n,o={}){td(r);let i=o.extract||void 0;i&&!i.length&&(i=["none"]);let s=tb(e.config()),a="image"===r?"images":"files",u=!(typeof File>"u")&&n instanceof File?Object.assign({filename:!1===o.preserveFilename?void 0:n.name,contentType:n.type},o):o,{tag:c,label:l,title:h,description:d,creditLine:f,filename:p,source:y}=u,m={label:l,title:h,description:d,filename:p,meta:i,creditLine:f};return y&&(m.sourceId=y.id,m.sourceName=y.name,m.sourceUrl=y.url),ro(e,t,{tag:c,method:"POST",timeout:u.timeout||0,uri:`/assets/${a}/${s}`,headers:u.contentType?{"Content-Type":u.contentType}:{},query:m,body:n})}rM=new WeakMap,r_=new WeakMap;var rE=(e,t)=>Object.keys(t).concat(Object.keys(e)).reduce((r,n)=>(r[n]=typeof e[n]>"u"?t[n]:e[n],r),{});let rx=(e,t)=>t.reduce((t,r)=>(typeof e[r]>"u"||(t[r]=e[r]),t),{}),rO=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],rT={includeResult:!0};function rj(e,t,n={}){let{url:o,token:i,withCredentials:s,requestTagPrefix:a}=this.config(),u=n.tag&&a?[a,n.tag].join("."):n.tag,c={...rE(n,rT),tag:u},l=tQ({query:e,params:t,options:{tag:u,...rx(c,rO)}}),h=`${o}${rs(this,"listen",l)}`;if(h.length>14800)return new eF(e=>e.error(Error("Query too large for listener")));let d=c.events?c.events:["mutation"],f=-1!==d.indexOf("reconnect"),p={};return(i||s)&&(p.withCredentials=!0),i&&(p.headers={Authorization:`Bearer ${i}`}),new eF(e=>{let t,n,o=!1,i=!1;function s(){o||(f&&e.next({type:"reconnect"}),o||t.readyState!==t.CLOSED||(l(),clearTimeout(n),n=setTimeout(m,100)))}function a(t){e.error(function(e){if(e instanceof Error)return e;let t=rS(e);return t instanceof Error?t:Error(t.error?t.error.description?t.error.description:"string"==typeof t.error?t.error:JSON.stringify(t.error,null,2):t.message||"Unknown listener error")}(t))}function u(t){let r=rS(t);return r instanceof Error?e.error(r):e.next(r)}function c(){o=!0,l(),e.complete()}function l(){t&&(t.removeEventListener("error",s),t.removeEventListener("channelError",a),t.removeEventListener("disconnect",c),d.forEach(e=>t.removeEventListener(e,u)),t.close())}async function y(){let{default:e}=await r.e(209).then(r.t.bind(r,30209,19));if(i)return;let t=new e(h,p);return t.addEventListener("error",s),t.addEventListener("channelError",a),t.addEventListener("disconnect",c),d.forEach(e=>t.addEventListener(e,u)),t}function m(){y().then(e=>{e&&(t=e,i&&l())}).catch(t=>{e.error(t),b()})}function b(){o=!0,l(),i=!0}return m(),b})}function rS(e){try{let t=e.data&&JSON.parse(e.data)||{};return Object.assign({type:e.type},t)}catch(e){return e}}var r$=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rk=(e,t,r)=>(r$(e,t,"read from private field"),r?r.call(e):t.get(e)),rA=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},rI=(e,t,r,n)=>(r$(e,t,"write to private field"),t.set(e,r),r);let rR="2021-03-26";class rF{constructor(e){rA(this,rq,void 0),rI(this,rq,e)}events(){let e=rk(this,rq).config().apiVersion.replace(/^v/,"");if("X"!==e&&e<rR)throw Error(`The live events API requires API version ${rR} or later. The current API version is ${e}. Please update your API version to use this feature.`);let t=rs(rk(this,rq),"live/events"),n=new URL(rk(this,rq).getUrl(t,!1)),o=["restart","message"];return new eF(e=>{let t,i,s=!1,a=!1;function u(r){if(!s){if("data"in r){let t=rP(r);e.error(Error(t.message,{cause:t}))}t.readyState===t.CLOSED&&(l(),clearTimeout(i),i=setTimeout(d,100))}}function c(t){let r=rP(t);return r instanceof Error?e.error(r):e.next(r)}function l(){if(t){for(let e of(t.removeEventListener("error",u),o))t.removeEventListener(e,c);t.close()}}async function h(){let e=typeof EventSource>"u"?(await r.e(209).then(r.t.bind(r,30209,19))).default:EventSource;if(a)return;let t=new e(n.toString());for(let e of(t.addEventListener("error",u),o))t.addEventListener(e,c);return t}function d(){h().then(e=>{e&&(t=e,a&&l())}).catch(t=>{e.error(t),f()})}function f(){s=!0,l(),a=!0}return d(),f})}}function rP(e){try{let t=e.data&&JSON.parse(e.data)||{};return{type:e.type,id:e.lastEventId,...t}}catch(e){return e}}rq=new WeakMap;var rM,r_,rq,rD,rN,rU=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rW=(e,t,r)=>(rU(e,t,"read from private field"),r?r.call(e):t.get(e)),rL=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},rz=(e,t,r,n)=>(rU(e,t,"write to private field"),t.set(e,r),r);class rH{constructor(e,t){rL(this,rD,void 0),rL(this,rN,void 0),rz(this,rD,e),rz(this,rN,t)}create(e,t){return rJ(rW(this,rD),rW(this,rN),"PUT",e,t)}edit(e,t){return rJ(rW(this,rD),rW(this,rN),"PATCH",e,t)}delete(e){return rJ(rW(this,rD),rW(this,rN),"DELETE",e)}list(){return ri(rW(this,rD),rW(this,rN),{uri:"/datasets",tag:null})}}rD=new WeakMap,rN=new WeakMap;class rB{constructor(e,t){rL(this,rV,void 0),rL(this,rG,void 0),rz(this,rV,e),rz(this,rG,t)}create(e,t){return e0(rJ(rW(this,rV),rW(this,rG),"PUT",e,t))}edit(e,t){return e0(rJ(rW(this,rV),rW(this,rG),"PATCH",e,t))}delete(e){return e0(rJ(rW(this,rV),rW(this,rG),"DELETE",e))}list(){return e0(ri(rW(this,rV),rW(this,rG),{uri:"/datasets",tag:null}))}}function rJ(e,t,r,n,o){return tl(n),ri(e,t,{method:r,uri:`/datasets/${n}`,body:o,tag:null})}rV=new WeakMap,rG=new WeakMap;var rV,rG,rY,rX,rK=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rQ=(e,t,r)=>(rK(e,t,"read from private field"),r?r.call(e):t.get(e)),rZ=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},r0=(e,t,r,n)=>(rK(e,t,"write to private field"),t.set(e,r),r);class r1{constructor(e,t){rZ(this,rY,void 0),rZ(this,rX,void 0),r0(this,rY,e),r0(this,rX,t)}list(e){let t=(null==e?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return ri(rQ(this,rY),rQ(this,rX),{uri:t})}getById(e){return ri(rQ(this,rY),rQ(this,rX),{uri:`/projects/${e}`})}}rY=new WeakMap,rX=new WeakMap;class r3{constructor(e,t){rZ(this,r6,void 0),rZ(this,r9,void 0),r0(this,r6,e),r0(this,r9,t)}list(e){let t=(null==e?void 0:e.includeMembers)===!1?"/projects?includeMembers=false":"/projects";return e0(ri(rQ(this,r6),rQ(this,r9),{uri:t}))}getById(e){return e0(ri(rQ(this,r6),rQ(this,r9),{uri:`/projects/${e}`}))}}r6=new WeakMap,r9=new WeakMap;var r6,r9,r2,r5,r4=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},r8=(e,t,r)=>(r4(e,t,"read from private field"),r?r.call(e):t.get(e)),r7=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ne=(e,t,r,n)=>(r4(e,t,"write to private field"),t.set(e,r),r);class nt{constructor(e,t){r7(this,r2,void 0),r7(this,r5,void 0),ne(this,r2,e),ne(this,r5,t)}getById(e){return ri(r8(this,r2),r8(this,r5),{uri:`/users/${e}`})}}r2=new WeakMap,r5=new WeakMap;class nr{constructor(e,t){r7(this,nn,void 0),r7(this,no,void 0),ne(this,nn,e),ne(this,no,t)}getById(e){return e0(ri(r8(this,nn),r8(this,no),{uri:`/users/${e}`}))}}nn=new WeakMap,no=new WeakMap;var nn,no,ni,ns,na=Object.defineProperty,nu=(e,t,r)=>t in e?na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nc=(e,t,r)=>(nu(e,"symbol"!=typeof t?t+"":t,r),r),nl=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},nh=(e,t,r)=>(nl(e,t,"read from private field"),r?r.call(e):t.get(e)),nd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},nf=(e,t,r,n)=>(nl(e,t,"write to private field"),t.set(e,r),r);let np=class e{constructor(e,t=tV){nc(this,"assets"),nc(this,"datasets"),nc(this,"live"),nc(this,"projects"),nc(this,"users"),nd(this,ni,void 0),nd(this,ns,void 0),nc(this,"listen",rj),this.config(t),nf(this,ns,e),this.assets=new rv(this,nh(this,ns)),this.datasets=new rH(this,nh(this,ns)),this.live=new rF(this),this.projects=new r1(this,nh(this,ns)),this.users=new nt(this,nh(this,ns))}clone(){return new e(nh(this,ns),this.config())}config(e){if(void 0===e)return{...nh(this,ni)};if(nh(this,ni)&&!1===nh(this,ni).allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return nf(this,ni,tK(e,nh(this,ni)||{})),this}withConfig(t){let r=this.config();return new e(nh(this,ns),{...r,...t,stega:{...r.stega||{},..."boolean"==typeof(null==t?void 0:t.stega)?{enabled:t.stega}:(null==t?void 0:t.stega)||{}}})}fetch(e,t,r){return t9(this,nh(this,ns),nh(this,ni).stega,e,t,r)}getDocument(e,t){return t2(this,nh(this,ns),e,t)}getDocuments(e,t){return t5(this,nh(this,ns),e,t)}create(e,t){return rn(this,nh(this,ns),e,"create",t)}createIfNotExists(e,t){return t4(this,nh(this,ns),e,t)}createOrReplace(e,t){return t8(this,nh(this,ns),e,t)}delete(e,t){return t7(this,nh(this,ns),e,t)}mutate(e,t){return re(this,nh(this,ns),e,t)}patch(e,t){return new tS(e,t,this)}transaction(e){return new tN(e,this)}action(e,t){return rt(this,nh(this,ns),e,t)}request(e){return ri(this,nh(this,ns),e)}getUrl(e,t){return ra(this,e,t)}getDataUrl(e,t){return rs(this,e,t)}};ni=new WeakMap,ns=new WeakMap;let ny=class e{constructor(e,t=tV){nc(this,"assets"),nc(this,"datasets"),nc(this,"live"),nc(this,"projects"),nc(this,"users"),nc(this,"observable"),nd(this,f,void 0),nd(this,p,void 0),nc(this,"listen",rj),this.config(t),nf(this,p,e),this.assets=new rw(this,nh(this,p)),this.datasets=new rB(this,nh(this,p)),this.live=new rF(this),this.projects=new r3(this,nh(this,p)),this.users=new nr(this,nh(this,p)),this.observable=new np(e,t)}clone(){return new e(nh(this,p),this.config())}config(e){if(void 0===e)return{...nh(this,f)};if(nh(this,f)&&!1===nh(this,f).allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),nf(this,f,tK(e,nh(this,f)||{})),this}withConfig(t){let r=this.config();return new e(nh(this,p),{...r,...t,stega:{...r.stega||{},..."boolean"==typeof(null==t?void 0:t.stega)?{enabled:t.stega}:(null==t?void 0:t.stega)||{}}})}fetch(e,t,r){return e0(t9(this,nh(this,p),nh(this,f).stega,e,t,r))}getDocument(e,t){return e0(t2(this,nh(this,p),e,t))}getDocuments(e,t){return e0(t5(this,nh(this,p),e,t))}create(e,t){return e0(rn(this,nh(this,p),e,"create",t))}createIfNotExists(e,t){return e0(t4(this,nh(this,p),e,t))}createOrReplace(e,t){return e0(t8(this,nh(this,p),e,t))}delete(e,t){return e0(t7(this,nh(this,p),e,t))}mutate(e,t){return e0(re(this,nh(this,p),e,t))}patch(e,t){return new t$(e,t,this)}transaction(e){return new tD(e,this)}action(e,t){return e0(rt(this,nh(this,p),e,t))}request(e){return e0(ri(this,nh(this,p),e))}dataRequest(e,t,r){return e0(rr(this,nh(this,p),e,t,r))}getUrl(e,t){return ra(this,e,t)}getDataUrl(e,t){return rs(this,e,t)}};f=new WeakMap,p=new WeakMap;let nm=function(e,t){let r=_([eo({shouldRetry:ts}),...e,ti,{processOptions:e=>{let t=e.body;return t&&"function"!=typeof t.pipe&&!z(t)&&(-1!==B.indexOf(typeof t)||Array.isArray(t)||function(e){if(!1===H(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!(!1===H(r)||!1===r.hasOwnProperty("isPrototypeOf"))}(t))?Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})}):e}},{onResponse:e=>{let t=e.headers["content-type"]||"",r=-1!==t.indexOf("application/json");return e.body&&t&&r?Object.assign({},e,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(e.body)}):e},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})},{onRequest:e=>{if("xhr"!==e.adapter)return;let t=e.request,r=e.context;function n(e){return t=>{let n=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:n,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=n("upload")),"onprogress"in t&&(t.onprogress=n("download"))}},to,function(e={}){let t=e.implementation||V.Observable;if(!t)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(e,r)=>new t(t=>(e.error.subscribe(e=>t.error(e)),e.progress.subscribe(e=>t.next(Object.assign({type:"progress"},e))),e.response.subscribe(e=>{t.next(Object.assign({type:"response"},e)),t.complete()}),e.request.publish(r),()=>e.abort.publish()))}}({implementation:eF})]);return{requester:r,createClient:e=>new t((t,n)=>(n||r)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,...t}),e)}}([],ny),nb=(nm.requester,nm.createClient)}}]);
//# sourceMappingURL=6417-9ee83458039fe36b.js.map