PageSourceSearch

https://1001things.org/_next/static/chunks/778-750efc4a1ad3fc80.js

js 1001things.org collected 2026-10-02 10:29:53 UTC 121,178 bytes, 14 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[778],{34:(t,e,r)=>{"use strict";var n,i,o;let s,a;r.d(e,{A:()=>b});let u="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function c(t){return`image-${t.split("/").slice(-1)[0]}`.replace(/\.([a-z]+)$/,"-$1")}let l=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"],["frame","frame"]],h=["clip","crop","fill","fillmax","max","scale","min"],f=["top","bottom","left","right","center","focalpoint","entropy"],p=["format"];function d(t){let{apiHost:e,projectId:r,dataset:n}=t,i={baseUrl:(e||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn.")},o=t.resource??t["~experimental_resource"];if(o?.type==="media-library"){if("string"!=typeof o.id||0===o.id.length)throw Error('Media library clients must include an id in "resource"');return{...i,mediaLibraryId:o.id}}if(o?.type==="canvas"){if("string"!=typeof o.id||0===o.id.length)throw Error('Canvas clients must include an id in "resource"');return{...i,canvasId:o.id}}if(o?.type==="dataset"){if("string"!=typeof o.id||0===o.id.length)throw Error('Dataset clients must include an id in "resource"');let[t,e]=o.id.split(".");if(!t||!e)throw Error('Dataset resource id must be in the format "projectId.dataset", got: '+o.id);return{...i,projectId:t,dataset:e}}return{...i,projectId:r,dataset:n}}function y(t){return t&&"config"in t&&"function"==typeof t.config?d(t.config()):t&&"clientConfig"in t&&"object"==typeof t.clientConfig?d(t.clientConfig):t||{}}class g{options;constructor(t,e){this.options=t?{...t.options||{},...e||{}}:{...e||{}}}withOptions(t){return new g(this,function(t,e){let r=e.baseUrl||t.baseUrl,n={baseUrl:r};for(let t in e)e.hasOwnProperty(t)&&(n[function(t){for(let e of l){let[r,n]=e;if(t===r||t===n)return r}return t}(t)]=e[t]);return{baseUrl:r,...n}}(this.options,t))}image(t){return this.withOptions({source:t})}dataset(t){return this.withOptions({dataset:t})}projectId(t){return this.withOptions({projectId:t})}withClient(t){let e=y(t),r={...this.options};return delete r.baseUrl,delete r.projectId,delete r.dataset,delete r.mediaLibraryId,delete r.canvasId,new g(null,{...e,...r})}bg(t){return this.withOptions({bg:t})}dpr(t){return this.withOptions(t&&1!==t?{dpr:t}:{})}width(t){return this.withOptions({width:t})}height(t){return this.withOptions({height:t})}focalPoint(t,e){return this.withOptions({focalPoint:{x:t,y:e}})}maxWidth(t){return this.withOptions({maxWidth:t})}minWidth(t){return this.withOptions({minWidth:t})}maxHeight(t){return this.withOptions({maxHeight:t})}minHeight(t){return this.withOptions({minHeight:t})}size(t,e){return this.withOptions({width:t,height:e})}blur(t){return this.withOptions({blur:t})}sharpen(t){return this.withOptions({sharpen:t})}rect(t,e,r,n){return this.withOptions({rect:{left:t,top:e,width:r,height:n}})}format(t){return this.withOptions({format:t})}invert(t){return this.withOptions({invert:t})}orientation(t){return this.withOptions({orientation:t})}quality(t){return this.withOptions({quality:t})}forceDownload(t){return this.withOptions({download:t})}flipHorizontal(){return this.withOptions({flipHorizontal:!0})}flipVertical(){return this.withOptions({flipVertical:!0})}ignoreImageParams(){return this.withOptions({ignoreImageParams:!0})}fit(t){if(-1===h.indexOf(t))throw Error(`Invalid fit mode "${t}"`);return this.withOptions({fit:t})}crop(t){if(-1===f.indexOf(t))throw Error(`Invalid crop mode "${t}"`);return this.withOptions({crop:t})}saturation(t){return this.withOptions({saturation:t})}auto(t){if(-1===p.indexOf(t))throw Error(`Invalid auto mode "${t}"`);return this.withOptions({auto:t})}pad(t){return this.withOptions({pad:t})}vanityName(t){return this.withOptions({vanityName:t})}frame(t){if(1!==t)throw Error(`Invalid frame value "${t}"`);return this.withOptions({frame:t})}url(){return function(t){let e={...t||{}},r=e.source;delete e.source;let n=function(t){var e;let r;if(!t)return null;if("string"==typeof t&&(e=t,/^https?:\/\//.test(`${e}`)))r={asset:{_ref:c(t)}};else if("string"==typeof t)r={asset:{_ref:t}};else if(t&&"string"==typeof t._ref)r={asset:t};else if(t&&"string"==typeof t._id)r={asset:{_ref:t._id||""}};else if(t&&t.asset&&"string"==typeof t.asset.url)r={asset:{_ref:c(t.asset.url)}};else{if("object"!=typeof t.asset)return null;r={...t}}return t.crop&&(r.crop=t.crop),t.hotspot&&(r.hotspot=t.hotspot),function(t){if(t.crop&&t.hotspot)return t;let e={...t};return e.crop||(e.crop={left:0,top:0,bottom:0,right:0}),e.hotspot||(e.hotspot={x:.5,y:.5,height:1,width:1}),e}(r)}(r);
1if(!n){if(r&&"object"==typeof r&&null!==r&&r._upload&&(!r.asset||!r.asset._ref))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8HwQACfsD/QNViZkAAAAASUVORK5CYII=";throw Error(`Unable to resolve image URL from source (${JSON.stringify(r)})`)}let i=function(t){let[,e,r,n]=t.split("-");if(!e||!r||!n)throw Error(`Malformed asset _ref '${t}'. Expected an id like "${u}".`);let[i,o]=r.split("x"),s=+i,a=+o;if(!(isFinite(s)&&isFinite(a)))throw Error(`Malformed asset _ref '${t}'. Expected an id like "${u}".`);return{id:e,width:s,height:a,format:n}}(n.asset._ref||n.asset._id||""),o=Math.round(n.crop.left*i.width),s=Math.round(n.crop.top*i.height),a={left:o,top:s,width:Math.round(i.width-n.crop.right*i.width-o),height:Math.round(i.height-n.crop.bottom*i.height-s)},h=n.hotspot.height*i.height/2,f=n.hotspot.width*i.width/2,p=n.hotspot.x*i.width,d=n.hotspot.y*i.height;return e.rect||e.focalPoint||e.ignoreImageParams||e.crop||(e={...e,...function(t,e){let r,n=e.width,i=e.height;if(!(n&&i))return{width:n,height:i,rect:t.crop};let o=t.crop,s=t.hotspot,a=n/i;if(o.width/o.height>a){let t=Math.round(o.height),e=Math.round(t*a),n=Math.max(0,Math.round(o.top)),i=Math.max(0,Math.round(Math.round((s.right-s.left)/2+s.left)-e/2));i<o.left?i=o.left:i+e>o.left+o.width&&(i=o.left+o.width-e),r={left:i,top:n,width:e,height:t}}else{let t=o.width,e=Math.round(t/a),n=Math.max(0,Math.round(o.left)),i=Math.max(0,Math.round(Math.round((s.bottom-s.top)/2+s.top)-e/2));i<o.top?i=o.top:i+e>o.top+o.height&&(i=o.top+o.height-e),r={left:n,top:i,width:t,height:e}}return{width:n,height:i,rect:r}}({crop:a,hotspot:{left:p-f,top:d-h,right:p+f,bottom:d+h}},e)}),function(t){let e,r=(t.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),n=t.vanityName?`/${t.vanityName}`:"",i=`${t.asset.id}-${t.asset.width}x${t.asset.height}.${t.asset.format}${n}`;e=t.mediaLibraryId?`${r}/media-libraries/${t.mediaLibraryId}/images/${i}`:t.canvasId?`${r}/images/canvases/${t.canvasId}/${i}`:`${r}/images/${t.projectId}/${t.dataset}/${i}`;let o=[];if(t.rect){let{left:e,top:r,width:n,height:i}=t.rect;(0!==e||0!==r||i!==t.asset.height||n!==t.asset.width)&&o.push(`rect=${e},${r},${n},${i}`)}t.bg&&o.push(`bg=${t.bg}`),t.focalPoint&&(o.push(`fp-x=${t.focalPoint.x}`),o.push(`fp-y=${t.focalPoint.y}`));let s=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return s&&o.push(`flip=${s}`),l.forEach(e=>{let[r,n]=e;"u">typeof t[r]?o.push(`${n}=${encodeURIComponent(t[r])}`):"u">typeof t[n]&&o.push(`${n}=${encodeURIComponent(t[n])}`)}),0===o.length?e:`${e}?${o.join("&")}`}({...e,asset:i})}(this.options)}toString(){return this.url()}}let m=(n=["The default export of @sanity/image-url has been deprecated. Use the named export `createImageUrlBuilder` instead."],i=(...t)=>{console.warn(n.join(" "),...t)},s=!1,(...t)=>(s||(a=i(...t),s=!0),a)),b=(o=function(t){return new g(null,y(t))},function(t){return m(),o(t)})},2619:t=>{var e={675:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],c=new i((s+a)*3/4-a),l=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(function(t,e,n){for(var i,o=[],s=e;s<n;s+=3)i=(t[s]<<16&0xff0000)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(t,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(t,e,r){"use strict";var n=r(675),i=r(783),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>
vendor: 18,551 bytes, line 1
10x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t){var n=t,i=e;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);var o=0|p(n,i),u=s(o),c=u.write(n,i);return c!==o&&(u=u.slice(0,c)),u}if(ArrayBuffer.isView(t))return h(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(O(t,ArrayBuffer)||t&&O(t.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(O(t,SharedArrayBuffer)||t&&O(t.buffer,SharedArrayBuffer)))return function(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),a.prototype),n}(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var l=t.valueOf&&t.valueOf();if(null!=l&&l!==t)return a.from(l,e,r);var d=function(t){if(a.isBuffer(t)){var e=0|f(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(d)return d;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),s(t<0?0:0|f(t))}function h(t){for(var e=t.length<0?0:0|f(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}e.Buffer=a,e.SlowBuffer=function(t){return+t!=t&&(t=0),a.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return(c(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)};function f(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function p(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||O(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return x(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(t).length;default:if(i)return n?-1:x(t).length;e=(""+e).toLowerCase(),i=!0}}function d(t,e,r){var i,o,s,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=S[t[o]];return i}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":return i=this,o=e,s=r,0===o&&s===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(o,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,e,r);default:if(a)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(i)return -1;else r=t.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return m(t,[e],r,n,i)}throw TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else -1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){h=!1;break}if(h)return o}return -1}a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:+(n<r)},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(O(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):d.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if(O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,u=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),h=0;h<u;++h)if(c[h]!==l[h]){o=c[h],s=l[h];break}return o<s?-1:+(s<o)},a.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)};function b(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:(192&(o=t[i+1]))==128&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}var f=n,p=f.length;if(p<=4096)return String.fromCharCode.apply(String,f);for(var d="",y=0;y<p;)d+=String.fromCharCode.apply(String,f.slice(y,y+=4096));return d}function v(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function w(t,e,r,n,i,o){if(!a.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function E(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function C(t,e,r,n,o){return e*=1,r>>>=0,o||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function I(t,e,r,n,o){return e*=1,r>>>=0,o||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,u,c,l,h,f=this.length-e;if((void 0===r||r>f)&&(r=f),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a,u=parseInt(e.substr(2*s,2),16);if((a=u)!=a)break;t[r+s]=u}return s}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,q(x(t,this.length-i),this,i,o);case"ascii":return s=e,a=r,q(A(t),this,s,a);case"latin1":case"binary":return function(t,e,r,n){return q(A(e),t,r,n)}(this,t,e,r);case"base64":return u=e,c=r,q($(t),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,h=r,q(function(t,e){for(var r,n,i=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,h);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||v(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||v(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||v(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return(t>>>=0,e||v(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||v(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||v(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||v(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=t/o&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||w(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var i,o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),u=s.length;
1if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%u]}return this};var R=/[^+/0-9A-Za-z-_]/g;function x(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function A(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function $(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function O(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var S=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},783:function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=5960464477539062e-23*(23===i),p=n?0:o-1,d=n?1:-1,y=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(a=+!!isNaN(e),s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?e+=f/u:e+=f*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}},s=!0;try{e[t](o,o.exports,n),s=!1}finally{s&&delete r[t]}return o.exports}n.ab="//",t.exports=n(72)},3710:(t,e,r)=>{"use strict";r.d(e,{UU:()=>nu});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,i={timeout:n?6e4:12e4},o=function(t){let e={...i,..."string"==typeof t?{url:t}:t};if(e.timeout=function t(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;let r=Number(e);return isNaN(r)?t(i.timeout):{connect:r,socket:r}}(e.timeout),e.query){let{url:t,searchParams:r}=function(t){let e=t.indexOf("?");if(-1===e)return{url:t,searchParams:new URLSearchParams};let r=t.slice(0,e),i=t.slice(e+1);if(!n)return{url:r,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let o=new URLSearchParams;for(let t of i.split("&")){let[e,r]=t.split("=");e&&o.append(s(e),s(r||""))}return{url:r,searchParams:o}}(e.url);for(let[n,i]of Object.entries(e.query)){if(void 0!==i)if(Array.isArray(i))for(let t of i)r.append(n,t);else r.append(n,i);let o=r.toString();o&&(e.url=`${t}?${o}`)}}return e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e};function s(t){return decodeURIComponent(t.replace(/\+/g," "))}let a=/^https?:\/\//i,u=function(t){if(!a.test(t.url))throw Error(`"${t.url}" is not a valid URL`)},c=["request","response","progress","error","abort"],l=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var h,f,p,d,y,g,m=(h=function(){if(g)return y;g=1;var t=function(t){return t.replace(/^\s+|\s+$/g,"")};return y=function(e){if(!e)return{};for(var r=Object.create(null),n=t(e).split("\n"),i=0;i<n.length;i++){var o,s=n[i],a=s.indexOf(":"),u=t(s.slice(0,a)).toLowerCase(),c=t(s.slice(a+1));typeof r[u]>"u"?r[u]=c:(o=r[u],"[object Array]"===Object.prototype.toString.call(o))?r[u].push(c):r[u]=[r[u],c]}return r}}())&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h;class b{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#t;#e;#r;#n={};#i;#o={};#s;open(t,e,r){this.#t=t,this.#e=e,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(t,e){this.#n[t]=e}setInit(t,e=!0){this.#o=t,this.#s=e}send(t){let e="arraybuffer"!==this.responseType,r={...this.#o,method:this.#t,headers:this.#n,body:t};"function"==typeof AbortController&&this.#s&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(r.signal=this.#i.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#e,r).then(t=>
1(t.headers.forEach((t,e)=>{this.#r+=`${e}: ${t}\r
2`}),this.status=t.status,this.statusText=t.statusText,this.readyState=3,this.onreadystatechange?.(),e?t.text():t.arrayBuffer())).then(t=>{"string"==typeof t?this.responseText=t:this.response=t,this.readyState=4,this.onreadystatechange?.()}).catch(t=>{"AbortError"!==t.name?this.onerror?.(t):this.onabort?.()})}}let v="function"==typeof XMLHttpRequest?"xhr":"fetch",w="xhr"===v?XMLHttpRequest:b,E=(t,e)=>{let r=t.options,n=t.applyMiddleware("finalizeOptions",r),i={},o=t.applyMiddleware("interceptRequest",void 0,{adapter:v,context:t});if(o){let t=setTimeout(e,0,null,o);return{abort:()=>clearTimeout(t)}}let s=new w;s instanceof b&&"object"==typeof n.fetch&&s.setInit(n.fetch,n.useAbortSignal??!0);let a=n.headers,u=n.timeout,c=!1,l=!1,h=!1;if(s.onerror=t=>{d(s instanceof b?t instanceof Error?t:Error(`Request error while attempting to reach ${n.url}`,{cause:t}):Error(`Request error while attempting to reach is ${n.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},s.ontimeout=t=>{d(Error(`Request timeout while attempting to reach ${n.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},s.onabort=()=>{p(!0),c=!0},s.onreadystatechange=function(){u&&(p(),i.socket=setTimeout(()=>f("ESOCKETTIMEDOUT"),u.socket)),!c&&s&&4===s.readyState&&0!==s.status&&function(){if(!(c||l||h)){if(0===s.status)return d(Error("Unknown XHR error"));p(),l=!0,e(null,{body:s.response||(""===s.responseType||"text"===s.responseType?s.responseText:""),url:n.url,method:n.method,headers:m(s.getAllResponseHeaders()),statusCode:s.status,statusMessage:s.statusText})}}()},s.open(n.method,n.url,!0),s.withCredentials=!!n.withCredentials,a&&s.setRequestHeader)for(let t in a)a.hasOwnProperty(t)&&s.setRequestHeader(t,a[t]);return n.rawBody&&(s.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:n,adapter:v,request:s,context:t}),s.send(n.body||null),u&&(i.connect=setTimeout(()=>f("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,s&&s.abort()}};function f(e){h=!0,s.abort();let r=Error("ESOCKETTIMEDOUT"===e?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=e,t.channels.error.publish(r)}function p(t){(t||c||s&&s.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function d(t){if(l)return;p(!0),l=!0,s=null;let r=t||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,e(r)}};var C,I,R,x,A,$=r(1463),q=r(2619).Buffer,O={exports:{}};A||(A=1,function(t,e){let r;e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(i=n))}),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!t&&"u">typeof $&&"env"in $&&(t=$.env.DEBUG),t},e.useColors=function(){let t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch{}}(),r=!1,e.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`."))},e.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","#33
2CCCC","#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"],e.log=console.debug||console.log||(()=>{}),t.exports=(x?R:(x=1,R=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(n||r),a.prev=n,a.curr=r,n=r,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";i++;let o=e.formatters[n];if("function"==typeof o){let e=t[i];r=o.call(a,e),t.splice(i,1),i--}return r}),e.formatArgs.call(a,t),(a.log||e.log).apply(a,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,r){let n=e(this.namespace+(typeof r>"u"?":":r)+t);return n.log=this.log,n}function n(t,e){let r=0,n=0,i=-1,o=0;for(;r<t.length;)if(n<e.length&&(e[n]===t[r]||"*"===e[n]))"*"===e[n]?(i=n,o=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++o}for(;n<e.length&&"*"===e[n];)n++;return n===e.length}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){let t=[...e.names,...e.skips.map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){for(let r of(e.save(t),e.namespaces=t,e.names=[],e.skips=[],("string"==typeof t?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?e.skips.push(r.slice(1)):e.names.push(r)},e.enabled=function(t){for(let r of e.skips)if(n(t,r))return!1;for(let r of e.names)if(n(t,r))return!0;return!1},e.humanize=function(){if(I)return C;I=1;function t(t,e,r,n){return Math.round(t/r)+" "+n+(e>=1.5*r?"s":"")}return C=function(e,r){r=r||{};var n,i,o=typeof e;if("string"===o&&e.length>0){var s=e;if(!((s=String(s)).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(s);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"===o&&isFinite(e))return r.long?(i=Math.abs(e))>=864e5?t(e,i,864e5,"day"):i>=36e5?t(e,i,36e5,"hour"):i>=6e4?t(e,i,6e4,"minute"):i>=1e3?t(e,i,1e3,"second"):e+" ms":(n=Math.abs(e))>=864e5?Math.round(e/864e5)+"d":n>=36e5?Math.round(e/36e5)+"h":n>=6e4?Math.round(e/6e4)+"m":n>=1e3?Math.round(e/1e3)+"s":e+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}(),e.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(t).forEach(r=>{e[r]=t[r]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e)|0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}))(e);let{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}(O,O.exports)),O.exports,Object.prototype.hasOwnProperty;let S=typeof q>"u"?()=>!1:t=>q.isBuffer(t);function _(t){return"[object Object]"===Object.prototype.toString.call(t)}let T=["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 P=j;let U=(t={})=>{let e=t.implementation||Promise;if(!e)throw Error("`Promise` is not available in global scope, and n
2o implementation was passed");return{onReturn:(r,n)=>new e((e,i)=>{let o=n.options.cancelToken;o&&o.promise.then(t=>{r.abort.publish(t),i(t)}),r.error.subscribe(i),r.response.subscribe(r=>{e(t.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(t){i(t)}},0)})}};class M{__CANCEL__=!0;message;constructor(t){this.message=t}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class k{promise;reason;constructor(t){if("function"!=typeof t)throw TypeError("executor must be a function.");let e=null;this.promise=new Promise(t=>{e=t}),t(t=>{this.reason||(this.reason=new M(t),e(this.reason))})}static source=()=>{let t;return{token:new k(e=>{t=e}),cancel:t}}}U.Cancel=M,U.CancelToken=k,U.isCancel=t=>!(!t||!t?.__CANCEL__);var F=(t,e,r)=>("GET"===r.method||"HEAD"===r.method)&&(t.isNetworkError||!1);function B(t){return 100*Math.pow(2,t)+100*Math.random()}let D=(t={})=>{var e;let r,n,i;return r=(e={shouldRetry:F,...t}).maxRetries||5,n=e.retryDelay||B,i=e.shouldRetry,{onError:(t,e)=>{var o;let s=e.options,a=s.maxRetries||r,u=s.retryDelay||n,c=s.shouldRetry||i,l=s.attemptNumber||0;if(null!==(o=s.body)&&"object"==typeof o&&"function"==typeof o.pipe||!c(t,l,s)||l>=a)return t;let h=Object.assign({},e,{options:Object.assign({},s,{attemptNumber:l+1})});return setTimeout(()=>e.channels.request.publish(h),u(l)),null}}};D.shouldRetry=F;var L=function(t,e){return(L=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function N(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}L(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function z(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&c[0]?n.return:c[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,c[1])).done)return i;switch(n=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(t,o)}catch(t){c=[6,t],n=0}finally{r=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function V(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function H(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function W(t,e,r){if(r||2==arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function G(t){return this instanceof G?(this.v=t,this):new G(t)}function Y(t){return"function"==typeof t}function J(t){var e=t(function(t){Error.call(t),t.stack=Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}"function"==typeof SuppressedError&&SuppressedError;var Q=J(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=e}});function X(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var K=function(){var t;function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t,e,r,n,i,o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=V(o),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var u=this.initialTeardown;
2if(Y(u))try{u()}catch(t){i=t instanceof Q?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=V(c),h=l.next();!h.done;h=l.next()){var f=h.value;try{te(f)}catch(t){i=null!=i?i:[],t instanceof Q?i=W(W([],H(i)),H(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(i)throw new Q(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)te(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(t)}},e.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},e.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},e.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&X(e,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&X(r,t),t instanceof e&&t._removeParent(this)},(t=new e).closed=!0,e.EMPTY=t,e}(),Z=K.EMPTY;function tt(t){return t instanceof K||t&&"closed"in t&&Y(t.remove)&&Y(t.add)&&Y(t.unsubscribe)}function te(t){Y(t)?t():t.unsubscribe()}var tr=void 0,tn={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=tn.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,W([t,e],H(r))):setTimeout.apply(void 0,W([t,e],H(r)))},clearTimeout:function(t){var e=tn.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function ti(t){tn.setTimeout(function(){!1;throw t})}function to(){}var ts=ta("C",void 0,void 0);function ta(t,e,r){return{kind:t,value:e,error:r}}var tu=null;function tc(t){var e,r,n,i;1;t()}var tl=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,tt(e)&&e.add(r)):r.destination=tm,r}return N(e,t),e.create=function(t,e,r){return new td(t,e,r)},e.prototype.next=function(t){this.isStopped?tg(ta("N",t,void 0),this):this._next(t)},e.prototype.error=function(t){this.isStopped?tg(ta("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?tg(ts,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(K),th=Function.prototype.bind;function tf(t,e){return th.call(t,e)}var tp=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){ty(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){ty(t)}else ty(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){ty(t)}},t}(),td=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;return Y(e)||!e?i={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i=e,s.destination=new tp(i),s}return N(e,t),e}(tl);function ty(t){1;ti(t)}function tg(t,e){}var tm={closed:!0,next:to,error:function(t){throw t},complete:to},tb="function"==typeof Symbol&&Symbol.observable||"@@observable";function tv(t){return t}function tw(t){return 0===t.length?tv:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}var tE=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this,i=!function(t){return t&&t instanceof tl||t&&Y(t.next)&&Y(t.error)&&Y(t.complete)&&tt(t)}(t)?new td(t,e,r):t;return tc(function(){var t=n.operator,e=n.source;i.add(t?t.call(i,e):e?n._subscribe(i):n._trySubscribe(i))}),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=tC(e))(function(e,n){var i=new td({next:function(e){try{t(e)}catch(t){n(t),i.unsubscribe()}},error:n,complete:e});r.subscribe(i)})},t.prototype._subscribe=function(t){var e;return null==(e=this.source)?void 0:e.subscribe(t)},t.prototype[tb]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tw(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=tC(t))(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();function tC(t){var e;return null!=(e=null!=t?t:tr)?e:Promise}var tI=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function tR(t){return Y(null==t?void 0:t.then)}function tx(t){return Symbol.asyncIterator&&Y(null==t?void 0:t[Symbol.asyncIterator])}function tA(t){return TypeError("You provided "+(null!==t&&"object"==typeof t?"an invali
2d object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var t$="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function tq(t){return Y(null==t?void 0:t[t$])}function tO(t){return function(t,e,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(t){return function(e){return Promise.resolve(e).then(t,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(t,e){i[t]&&(n[t]=function(e){return new Promise(function(r,n){o.push([t,e,r,n])>1||a(t,e)})},e&&(n[t]=e(n[t])))}function a(t,e){try{var r;(r=i[t](e)).value instanceof G?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(t){l(o[0][3],t)}}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}(this,arguments,function(){var e,r,n;return z(this,function(i){switch(i.label){case 0:e=t.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,G(e.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,G(void 0)];case 4:return[2,i.sent()];case 5:return[4,G(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function tS(t){return Y(null==t?void 0:t.getReader)}function t_(t){if(t instanceof tE)return t;if(null!=t){var e,r,n,i;if(Y(t[tb])){return e=t,new tE(function(t){var r=e[tb]();if(Y(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(tI(t)){return r=t,new tE(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}if(tR(t)){return n=t,new tE(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,ti)})}if(tx(t))return tT(t);if(tq(t)){return i=t,new tE(function(t){var e,r;try{for(var n=V(i),o=n.next();!o.done;o=n.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t.complete()})}if(tS(t))return tT(tO(t))}throw tA(t)}function tT(t){return new tE(function(e){(function(t,e){var r,n,i,o,s,a,u,c;return s=this,a=void 0,u=void 0,c=function(){var s;return z(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=function(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=V(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,i){var o,s,a;o=n,s=i,a=(e=t[r](e)).done,Promise.resolve(e.value).then(function(t){o({value:t,done:a})},s)})}}}(t),a.label=1;case 1:return[4,r.next()];case 2:if((n=a.sent()).done)return[3,4];if(s=n.value,e.next(s),e.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(n&&!n.done&&(o=r.return)))return[3,8];return[4,o.call(r)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})},new(u||(u=Promise))(function(t,e){function r(t){try{i(c.next(t))}catch(t){e(t)}}function n(t){try{i(c.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof u?i:new u(function(t){t(i)})).then(r,n)}i((c=c.apply(s,a||[])).next())})})(t,e).catch(function(t){return e.error(t)})})}function tj(t){return new tE(function(e){t_(t()).subscribe(e)})}function tP(t){return t[t.length-1]}function tU(t){var e;return(e=tP(t))&&Y(e.schedule)?t.pop():void 0}function tM(t,e,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!i)return o}function tk(t){return function(e){if(Y(null==e?void 0:e.lift))return e.lift(function(e){try{return t(e,this)}catch(t){this.error(t)}});throw TypeError("Unable to lift unknown Observable type")}}function tF(t,e,r,n,i){return new tB(t,e,r,n,i)}var tB=function(t){function e(e,r,n,i,o,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return N(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),r||null==(e=this.onFinalize)||e.call(this)}},e}(tl);function tD(t,e){return void 0===e&&(e=0),tk(function(r,n){r.subscribe(tF(n,function(r){return tM(n,t,function(){return n.next(r)},e)},function(){return tM(n,t,function(){return n.complete()},e)},function(r){return tM(n,t,function(){return n.error(r)},e)}))})}function tL(t,e){return void 0===e&&(e=0),tk(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}function tN(t,e){if(!t)throw Error("Iterable cannot be null");return new tE(function(r){tM(r,e,function(){var n=t[Symbol.asyncIterator]();tM(r,e,function(){n.next().then(function(t){t.done?r.complete():r.next(t.value)})},0,!0)})})}function tz(t,e){return e?function(t,e){if(null!=t){if(Y(t[tb]))return t_(t).pipe(tL(e),tD(e));if(tI(t))return new tE(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})});if(tR(t))return t_(t).pipe(tL(e),tD(e));if(tx(t))return tN(t,e);if(tq(t))return new tE(function(r){var n;return tM(r,e,function(){n=t[t$](),tM(r,e,function(){var t,e,i;try{e=(t=n.next()).value,i=t.done}catch(t){r.error(t);return}i?r.complete():r.next(e)},0,!0)}),function(){return Y(null==n?void 0:n.return)&&n.return()}});if(tS(t))return tN(tO(t),e)}throw tA(t)}(t,e):t_(t)}function tV(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=tU(t);return tz(t,r)}function tH(t,e){return tk(function(r,n){var i=0;r.subscribe(tF(n,function(r){n.next(t.call(e,r,i++))}))})}function tW(t,e,r){return(void 0===r&&(r=1/0),Y(e))?tW(function(r,n){return tH(function(t,i){return e(r,t,n,i)})(t_(t(r,n)))},r):("number"==typeof e&&(r=e),tk(function(e,n){var i,o,s,a,u,c,l,h;
2return i=r,o=[],s=0,a=0,u=!1,c=function(){!u||o.length||s||n.complete()},l=function(t){return s<i?h(t):o.push(t)},h=function(e){s++;var r=!1;t_(t(e,a++)).subscribe(tF(n,function(t){n.next(t)},function(){r=!0},void 0,function(){if(r)try{for(s--;o.length&&s<i;)!function(){var t=o.shift();h(t)}();c()}catch(t){n.error(t)}}))},e.subscribe(tF(n,l,function(){u=!0,c()})),function(){}}))}var tG=J(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function tY(t,e){var r="object"==typeof e;return new Promise(function(n,i){var o,s=!1;t.subscribe({next:function(t){o=t,s=!0},error:i,complete:function(){s?n(o):r?n(e.defaultValue):i(new tG)}})})}var tJ=J(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),tQ=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return N(e,t),e.prototype.lift=function(t){var e=new tX(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new tJ},e.prototype.next=function(t){var e=this;tc(function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=V(e.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}})},e.prototype.error=function(t){var e=this;tc(function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}})},e.prototype.complete=function(){var t=this;tc(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null==(t=this.observers)?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?Z:(this.currentObservers=null,i.push(t),new K(function(){e.currentObservers=null,X(i,t)}))},e.prototype._checkFinalizedStatuses=function(t){var e=this.hasError,r=this.thrownError,n=this.isStopped;e?t.error(r):n&&t.complete()},e.prototype.asObservable=function(){var t=new tE;return t.source=this,t},e.create=function(t,e){return new tX(t,e)},e}(tE),tX=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return N(e,t),e.prototype.next=function(t){var e,r;null==(r=null==(e=this.destination)?void 0:e.next)||r.call(e,t)},e.prototype.error=function(t){var e,r;null==(r=null==(e=this.destination)?void 0:e.error)||r.call(e,t)},e.prototype.complete=function(){var t,e;null==(e=null==(t=this.destination)?void 0:t.complete)||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!=(r=null==(e=this.source)?void 0:e.subscribe(t))?r:Z},e}(tQ),tK={now:function(){return(tK.delegate||Date).now()},delegate:void 0},tZ=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=tK);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return N(e,t),e.prototype.next=function(e){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,o=this._timestampProvider,s=this._windowTime;!r&&(n.push(e),i||n.push(o.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this._bufferSize,e=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*t;
2if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var o=e.now(),s=0,a=1;a<r.length&&r[a]<=o;a+=2)s=a;s&&r.splice(0,s+1)}},e}(tQ);function t0(t){void 0===t&&(t={});var e=t.connector,r=void 0===e?function(){return new tQ}:e,n=t.resetOnError,i=void 0===n||n,o=t.resetOnComplete,s=void 0===o||o,a=t.resetOnRefCountZero,u=void 0===a||a;return function(t){var e,n,o,a=0,c=!1,l=!1,h=function(){null==n||n.unsubscribe(),n=void 0},f=function(){h(),e=o=void 0,c=l=!1},p=function(){var t=e;f(),null==t||t.unsubscribe()};return tk(function(t,d){a++,l||c||h();var y=o=null!=o?o:r();d.add(function(){0!=--a||l||c||(n=t1(p,u))}),y.subscribe(d),!e&&a>0&&(e=new td({next:function(t){return y.next(t)},error:function(t){l=!0,h(),n=t1(f,i,t),y.error(t)},complete:function(){c=!0,h(),n=t1(f,s),y.complete()}}),t_(t).subscribe(e))})(t)}}function t1(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0===e)return void t();if(!1!==e){var i=new td({next:function(){i.unsubscribe(),t()}});return t_(e.apply(void 0,W([],H(r)))).subscribe(i)}}function t2(t){return tk(function(e,r){var n,i=null,o=!1;i=e.subscribe(tF(r,void 0,void 0,function(s){n=t_(t(s,t2(t)(e))),i?(i.unsubscribe(),i=null,n.subscribe(r)):o=!0})),o&&(i.unsubscribe(),i=null,n.subscribe(r))})}function t3(t){return void 0===t&&(t=1/0),tW(tv,t)}var t6=function(t){function e(e,r){return t.call(this)||this}return N(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(K),t5={setInterval:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=t5.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,W([t,e],H(r))):setInterval.apply(void 0,W([t,e],H(r)))},clearInterval:function(t){var e=t5.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},t8=function(t){function e(e,r){var n=t.call(this,e,r)||this;
2return n.scheduler=e,n.work=r,n.pending=!1,n}return N(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),t5.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return e;null!=e&&t5.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r,n=!1;try{this.work(t)}catch(t){n=!0,r=t||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,X(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(t6),t4=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},t.now=tK.now,t}(),t9=new(function(t){function e(e,r){void 0===r&&(r=t4.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return N(e,t),e.prototype.flush=function(t){var e,r=this.actions;if(this._active)return void r.push(t);this._active=!0;do if(e=t.execute(t.state,t.delay))break;while(t=r.shift());if(this._active=!1,e){for(;t=r.shift();)t.unsubscribe();throw e}},e}(t4))(t8);function t7(t,e){var r=Y(t)?t:function(){return t},n=function(t){return t.error(r())};return new tE(e?function(t){return e.schedule(n,0,t)}:n)}function et(t){return tk(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})}var ee=new tE(function(t){return t.complete()});function er(t,e){var r="object"==typeof e;return new Promise(function(n,i){var o=new td({next:function(t){n(t),o.unsubscribe()},error:i,complete:function(){r?n(e.defaultValue):i(new tG)}});t.subscribe(o)})}var en=r(5184),ei=Array.isArray,eo=Array.isArray;function es(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Y(tP(t))?t.pop():void 0;return r?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tw(t)}(es.apply(void 0,W([],H(t))),tH(function(t){return eo(t)?r.apply(void 0,W([],H(t))):r(t)})):tk(function(e,r){var n,i;(n=W([e],H(1===t.length&&ei(t[0])?t[0]:t)),void 0===i&&(i=tv),function(t){var e,r,o;e=void 0,r=function(){for(var e=n.length,r=Array(e),o=e,s=e,a=function(e){var a,u,c;a=void 0,u=function(){var a=tz(n[e],void 0),u=!1;a.subscribe(tF(t,function(n){r[e]=n,!u&&(u=!0,s--),s||t.next(i(r.slice()))},function(){--o||t.complete()}))},c=t,a?tM(c,a,u):u()},u=0;u<e;u++)a(u)},o=t,e?tM(o,e,r):r()})(r)})}function ea(t,e){return tk(function(r,n){var i=0;r.subscribe(tF(n,function(r){return t.call(e,r,i++)&&n.next(r)}))})}let eu="drafts.",ec="versions.";function el(t){return t.startsWith(eu)}function eh(t){return t.startsWith(ec)}function ef(t){return eh(t)?eu+ey(t):el(t)?t:eu+t}function ep(t,e){if("drafts"===e||"published"===e)throw Error('Version can not be "published" or "drafts"');return`${ec}${e}.${ey(t)}`}function ed(t){if(!eh(t))return;let[e,r]=t.split(".");return r}function ey(t){return eh(t)?t.split(".").slice(2).join("."):el(t)?t.slice(eu.length):t}let eg=t=>crypto.getRandomValues(new Uint8Array(t)),em=/\r\n|[\n\r\u2028\u2029]/;function eb(t,e){let r=0;for(let n=0;n<e.length;n++){let i=e[n].length+1;if(r+i>t)return{line:n+1,column:t-r};r+=i}return{line:e.length,column:e[e.length-1]?.length??0}}class ev extends Error{response;statusCode=400;responseBody;traceId;details;constructor(t,e){const r=eE(t,e);super(r.message),Object.assign(this,r)}}class ew extends Error{response;statusCode=500;responseBody;traceId;details;constructor(t){const e=eE(t);super(e.message),Object.assign(this,e)}}function eE(t,e){var r,n,i;let o=t.body,s={response:t,statusCode:t.statusCode,responseBody:(r=o,-1!==(t.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r),traceId:function(t){let e=t?.headers?.traceparent;if(e)return e.split("-")[1]}(t),message:"",details:void 0};if(!(0,en.u4)(o))return s.message=`${eR(t,o)}${ex(s.traceId)}`,s;let a=o.error;if("string"==typeof a&&"string"==typeof o.message)return s.message=`${a} - ${o.message}${ex(s.traceId)}`,s;if("object"!=typeof a||null===a)return"string"==typeof a?s.message=`${a}${ex(s.traceId)}`:"string"==typeof o.message?s.message=`${o.message}${ex(s.traceId)}`:s.message=`${eR(t,o)}${ex(s.traceId)}`,s;if("type"in(n=a)&&"mutationError"===n.type&&"description"in n&&"string"==typeof n.description||"type"in(i=a)&&"actionError"===i.type&&"description"in i&&"string"==typeof i.description){let t=a.items||[],e=t.slice(0,5).map(t=>
2t.error?.description).filter(Boolean),r=e.length?`:
3- ${e.join(`
4- `)}`:"";return t.length>5&&(r+=`
5...and ${t.length-5} more`),s.message=`${a.description}${ex(s.traceId)}${r}`,s.details=o.error,s}return eC(a)?(s.message=eI(a,e?.options?.query?.tag,s.traceId),s.details=o.error):"description"in a&&"string"==typeof a.description?(s.message=`${a.description}${ex(s.traceId)}`,s.details=a):s.message=`${eR(t,o)}${ex(s.traceId)}`,s}function eC(t){return(0,en.u4)(t)&&"queryParseError"===t.type&&"string"==typeof t.query&&"number"==typeof t.start&&"number"==typeof t.end}function eI(t,e,r){let{query:n,start:i,end:o,description:s}=t,a=r?`
6(traceId: ${r})`:"";if(!n||typeof i>"u")return`GROQ query parse error: ${s}${a}`;let u=e?`
7
8Tag: ${e}`:"";return`GROQ query parse error:
9${function(t,e,r){let n=t.split(em),{start:i,end:o,markerLines:s}=function(t,e){let r={...t.start},n={...r,...t.end},i=r.line??-1,o=r.column??0,s=n.line,a=n.column,u=Math.max(i-3,0),c=Math.min(e.length,s+3);-1===i&&(u=0),-1===s&&(c=e.length);let l=s-i,h={};if(l)for(let t=0;t<=l;t++){let r=t+i;if(o)if(0===t){let t=e[r-1].length;h[r]=[o,t-o+1]}else if(t===l)h[r]=[0,a];else{let n=e[r-t].length;h[r]=[0,n]}else h[r]=!0}else o===a?o?h[i]=[o,0]:h[i]=!0:h[i]=[o,a-o];return{start:u,end:c,markerLines:h}}({start:eb(e.start,n),end:e.end?eb(e.end,n):void 0},n),a=`${o}`.length;return t.split(em,o).slice(i,o).map((t,e)=>{let n=i+1+e,o=` ${` ${n}`.slice(-a)} |`,u=s[n],c=!s[n+1];if(!u)return` ${o}${t.length>0?` ${t}`:""}`;let l="";if(Array.isArray(u)){let e=t.slice(0,Math.max(u[0]-1,0)).replace(/[^\t]/g," "),n=u[1]||1;l=`
10 `+o.replace(/\d/g," ")+" "+e+"^".repeat(n),c&&r&&(l+=" "+r)}return">"+o+(t.length>0?` ${t}`:"")+l}).join(`
11`)}(n,{start:i,end:o},s)}${u}${a}`}function eR(t,e){var r;let n="string"==typeof e?` (${(r=e).length>100?`${r.slice(0,100)}\u2026`:r})`:"",i=t.statusMessage?` ${t.statusMessage}`:"";return`${t.method}-request to ${t.url} resulted in HTTP ${t.statusCode}${i}${n}`}function ex(t){return t?` (traceId: ${t})`:""}class eA extends Error{projectId;addOriginUrl;constructor({projectId:t,credentials:e}={}){if(super("CorsOriginError"),this.name="CorsOriginError",this.projectId=t,t&&"u">typeof location){const r=new URL(`https://sanity.io/manage/project/${t}/api`),{origin:n}=location;r.searchParams.set("cors","add"),r.searchParams.set("origin",n),e&&r.searchParams.set("credentials",""),this.addOriginUrl=r,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${r}`}else t?this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: https://sanity.io/manage/project/${t}/api`:this.message="The current origin is not allowed to connect to the Live Content API."}}let e$={onResponse:(t,e)=>{if(t.statusCode>=500)throw new ew(t);if(t.statusCode>=400)throw new ev(t,e);return t}};function eq(t,e={}){return((t=[],e=E)=>(function t(e,r){let n=[],i=l.reduce((t,e)=>(t[e]=t[e]||[],t),{processOptions:[o],validateOptions:[u]});function s(t){let e,n="object"==typeof t&&t.callSiteStack?t.callSiteStack:void 0,o=n?void 0:Error(),s=c.reduce((t,e)=>{let r,n;return t[e]=(r=Object.create(null),n=0,{publish:function(t){for(let e in r)r[e](t)},subscribe:function(t){let e=n++;return r[e]=t,function(){delete r[e]}}}),t},{}),a=function(t,e,...r){let n="onError"===t,o=e;for(let e=0;e<i[t].length&&(o=(0,i[t][e])(o,...r),!n||o);e++);return o},u=a("processOptions",t);a("validateOptions",u);let l={options:u,channels:s,applyMiddleware:a},h=s.request.subscribe(t=>{e=r(t,(e,r)=>((t,e,r)=>{let i=t,u=e;if(!i)try{u=a("onResponse",e,r)}catch(t){u=null,i=t}if(i=i&&a("onError",i,r)){if(i instanceof Error){let t=n?.stack||o?.stack;if("string"==typeof t){let e=t.split("\n").slice(n?1:2);e.length>0&&(i.stack+="\n"+e.join("\n"))}}s.error.publish(i)}else u&&s.response.publish(u)})(e,r,t))});s.abort.subscribe(()=>{h(),e&&e.abort()});let f=a("onReturn",s,l);return f===s&&s.request.publish(l),f}return s.use=function(t){if(!t)throw Error("Tried to add middleware that resolved to falsey value");if("function"==typeof t)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(t.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");
11return l.forEach(e=>{t[e]&&i[e].push(t[e])}),n.push(t),s},s.clone=()=>t(n,r),e.forEach(s.use),s})(t,e))([D({shouldRetry:eO}),...t,function(t={}){let e={},r=e=>void 0!==t.ignoreWarnings&&(Array.isArray(t.ignoreWarnings)?t.ignoreWarnings:[t.ignoreWarnings]).some(t=>"string"==typeof t?e.includes(t):t instanceof RegExp&&t.test(e));return{onResponse:t=>{let n=t.headers["x-sanity-warning"];for(let t of Array.isArray(n)?n:[n])!t||e[t]||r(t)||(e[t]=!0,console.warn(t));return t}}}(e),{processOptions:t=>{let e=t.body;return!e||"function"==typeof e.pipe||S(e)||-1===T.indexOf(typeof e)&&!Array.isArray(e)&&!function(t){if(!1===_(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!1!==_(r)&&!1!==r.hasOwnProperty("isPrototypeOf")}(e)?t:Object.assign({},t,{body:JSON.stringify(t.body),headers:Object.assign({},t.headers,{"Content-Type":"application/json"})})}},{onResponse:t=>{let e=t.headers["content-type"]||"",r=-1!==e.indexOf("application/json");return t.body&&e&&r?Object.assign({},t,{body:function(t){try{return JSON.parse(t)}catch(t){throw t.message=`Failed to parsed response body as JSON: ${t.message}`,t}}(t.body)}):t},processOptions:t=>Object.assign({},t,{headers:Object.assign({Accept:"application/json"},t.headers)})},{onRequest:t=>{if("xhr"!==t.adapter)return;let e=t.request,r=t.context;function n(t){return e=>{let n=e.lengthComputable?e.loaded/e.total*100:-1;r.channels.progress.publish({stage:t,percent:n,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=n("upload")),"onprogress"in e&&(e.onprogress=n("download"))}},e$,function(t={}){let e=t.implementation||P.Observable;if(!e)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(t,r)=>new e(e=>(t.error.subscribe(t=>e.error(t)),t.progress.subscribe(t=>e.next(Object.assign({type:"progress"},t))),t.response.subscribe(t=>{e.next(Object.assign({type:"response"},t)),e.complete()}),t.request.publish(r),()=>t.abort.publish()))}}({implementation:tE})])}function eO(t,e,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,i=(r.uri||r.url).startsWith("/data/query"),o=t.response&&(429===t.response.statusCode||502===t.response.statusCode||503===t.response.statusCode);return(!!n||!!i)&&!!o||D.shouldRetry(t,e,r)}function eS(t){return"https://www.sanity.io/help/"+t}let e_=["image","file"],eT=["before","after","replace"],ej=t=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},eP=(t,e)=>{if(null===e||"object"!=typeof e||Array.isArray(e))throw Error(`${t}() takes an object of properties`)},eU=(t,e)=>{if("string"!=typeof e||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(e)||e.includes(".."))throw Error(`${t}(): "${e}" is not a valid document ID`)},eM=(t,e)=>{if(!e._id)throw Error(`${t}() requires that the document contains an ID ("_id" property)`);eU(t,e._id)},ek=(t,e)=>{if(!e._type)throw Error(`\`${t}()\` requires that the document contains a type (\`_type\` property)`);var r=e._type;if("string"!=typeof r)throw Error(`\`${t}()\`: \`${r}\` is not a valid document type`)},eF=t=>{if(t.dataset)return t.dataset;let e=t.resource;if(e&&"dataset"===e.type){let t=e.id.split(".");if(2!==t.length)throw Error('Dataset resource ID must be in the format "project.dataset"');return t[1]}throw Error("`dataset` must be provided to perform queries")},eB=t=>{if("string"!=typeof t||!/^[a-z0-9._-]{1,75}$/i.test(t))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t},eD=t=>{let e=t.resource;if(!e)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=e;switch(r){case"dataset":if(2!==n.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${r.toString()}`)}},eL=(t,e)=>{if(e.resource)throw Error(`\`${t}\` does not support resource-based operations`)},eN=t=>{var e;let r,n;return e=(...e)=>console.warn(t.join(" "),...e),r=!1,(...t)=>(r||(n=e(...t),r=!0),n)},ez=eN(["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"]),eV=eN(["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."]),eH=eN(["The Sanity client is configured with the `perspective` set to `drafts` or `previewDrafts`, which doesn't support the API-CDN.","The Live API will be used instead. Set `useCdn: false` in your configuration to hide this warning."]),eW=eN(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),eG=eN(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${eS("js-client-browser-token")} for more information and how to hide this warning.`]),eY=eN(["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`."]),eJ=eN(["Using the Sanity client without specifying an API version is deprecated.",`See ${eS("js-client-api-version")}`]),eQ=(eN(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),eN(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),eX=eN(["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."]),eK={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},eZ=["localhost","127.0.0.1","0.0.0.0"];function e0(t){if(Array.isArray(t)&&t.length>1&&t.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let e1=(t,e)=>{let r,n={...e,...t,stega:{..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||eK.stega,..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||{}}};n.apiVersion||eJ();let i={...eK,...n};i["~experimental_resource"]&&!i.resource&&(eX(),i.resource=i["~experimental_resource"]);let o=i.resource,s=i.useProjectHostname&&!o;if(typeof Promise>"u"){let t=eS("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${t}`)}if(s&&!i.projectId)throw Error("Configuration must contain `projectId`");if(o&&eD(i),"u">typeof i.perspective&&e0(i.perspective),"encodeSourceMap"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in i)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");
11if("boolean"!=typeof i.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${i.stega.enabled}`);if(i.stega.enabled&&void 0===i.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(i.stega.enabled&&"string"!=typeof i.stega.studioUrl&&"function"!=typeof i.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${i.stega.studioUrl}`);let a="u">typeof window&&window.location&&window.location.hostname,u=a&&(r=window.location.hostname,-1!==eZ.indexOf(r)),c=!!i.token;i.withCredentials&&c&&(eY(),i.withCredentials=!1),a&&u&&c&&!0!==i.ignoreBrowserTokenWarning?eG():typeof i.useCdn>"u"&&eV(),s&&(t=>{if(!/^[-a-z0-9]+$/i.test(t))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(i.projectId),i.dataset&&ej(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?eB(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===eK.apiHost,!0===i.useCdn&&i.withCredentials&&ez(),i.useCdn=!1!==i.useCdn&&!i.withCredentials,function(t){if("1"===t||"X"===t)return;let e=new Date(t);if(!(/^\d{4}-\d{2}-\d{2}$/.test(t)&&e instanceof Date&&e.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(i.apiVersion);let l=i.apiHost.split("://",2),h=l[0],f=l[1],p=i.isDefaultApi?"apicdn.sanity.io":f;return s?(i.url=`${h}://${i.projectId}.${f}/v${i.apiVersion}`,i.cdnUrl=`${h}://${i.projectId}.${p}/v${i.apiVersion}
11`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class e2 extends Error{name="ConnectionFailedError"}class e3 extends Error{name="DisconnectError";reason;constructor(t,e,r={}){super(t,r),this.reason=e}}class e6 extends Error{name="ChannelError";data;constructor(t,e){super(t),this.data=e}}class e5 extends Error{name="MessageError";data;constructor(t,e,r={}){super(t,r),this.data=e}}class e8 extends Error{name="MessageParseError"}let e4=["channelError","disconnect"];function e9(t,e){return tj(()=>{let e=t();return e&&(e instanceof tE||Y(e.lift)&&Y(e.subscribe))?e:tV(e)}).pipe(tW(t=>{var r,n;return r=t,n=e,new tE(t=>{let e=n.includes("open"),i=n.includes("reconnect");function o(e){if("data"in e){let[r,n]=e7(e);t.error(r?new e8("Unable to parse EventSource error message",{cause:n}):new e5((n?.data).message,n));return}r.readyState===r.CLOSED?t.error(new e2("EventSource connection failed")):i&&t.next({type:"reconnect"})}function s(){t.next({type:"open"})}function a(e){let[n,i]=e7(e);if(n)return void t.error(new e8("Unable to parse EventSource message",{cause:n}));if("channelError"===e.type){var o,s;let e,n=new URL(r.url).searchParams.get("tag");t.error(new e6((o=i?.data,s=n,(e=o.error)?eC(e)?eI(e,s):e.description?e.description:"string"==typeof e?e:JSON.stringify(e,null,2):o.message||"Unknown listener error"),i.data));return}"disconnect"===e.type?t.error(new e3(`Server disconnected client: ${i.data?.reason||"unknown error"}`)):t.next({type:e.type,id:e.lastEventId,...i.data?{data:i.data}:{}})}r.addEventListener("error",o),e&&r.addEventListener("open",s);let u=[...new Set([...e4,...n])].filter(t=>"error"!==t&&"open"!==t&&"reconnect"!==t);return u.forEach(t=>r.addEventListener(t,a)),()=>{r.removeEventListener("error",o),e&&r.removeEventListener("open",s),u.forEach(t=>r.removeEventListener(t,a)),r.close()}})}))}function e7(t){try{let e="string"==typeof t.data&&JSON.parse(t.data);return[null,{type:t.type,id:t.lastEventId,...!function(t){for(let e in t)return!1;return!0}(e)?{data:e}:{}}]}catch(t){return[t,null]}}function rt(t){if("string"==typeof t)return{id:t};if(Array.isArray(t))return{query:"*[_id in $ids]",params:{ids:t}};if("object"==typeof t&&null!==t&&"query"in t&&"string"==typeof t.query)return"params"in t&&"object"==typeof t.params&&null!==t.params?{query:t.query,params:t.params}:{query:t.query};let e=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(`
12`);throw Error(`Unknown selection - must be one of:
13
14${e}`)}class re{selection;operations;constructor(t,e={}){this.selection=t,this.operations=e}set(t){return this._assign("set",t)}setIfMissing(t){return this._assign("setIfMissing",t)}diffMatchPatch(t){return eP("diffMatchPatch",t),this._assign("diffMatchPatch",t)}unset(t){if(!Array.isArray(t))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:t}),this}inc(t){return this._assign("inc",t)}dec(t){return this._assign("dec",t)}insert(t,e,r){return((t,e,r)=>{let n="insert(at, selector, items)";if(-1===eT.indexOf(t)){let t=eT.map(t=>`"${t}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${t}`)}if("string"!=typeof e)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`)})(t,e,r),this._assign("insert",{[t]:e,items:r})}append(t,e){return this.insert("after",`${t}[-1]`,e)}prepend(t,e){return this.insert("before",`${t}[0]`,e)}splice(t,e,r,n){let i=e<0?e-1:e,o=typeof r>"u"||-1===r?-1:Math.max(0,e+r),s=`${t}[${i}:${i<0&&o>=0?"":o}]`;return this.insert("replace",s,n||[])}ifRevisionId(t){return this.operations.ifRevisionID=t,this}serialize(){return{...rt(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(t,e,r=!0){return eP(t,e),this.operations=Object.assign({},this.operations,{[t]:Object.assign({},r&&this.operations[t]||{},e)}),this}_set(t,e){return this._assign(t,e,!1)}}class rr extends re{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new rr(this.selection,{...this.operations},this.#a)}commit(t){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let e=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},t);return this.#a.mutate({patch:this.serialize()},e)}}class rn extends re{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new rn(this.selection,{...this.operations},this.#a)}commit(t){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let e=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},t);return this.#a.mutate({patch:this.serialize()},e)}}let ri={returnDocuments:!1};class ro{operations;trxId;constructor(t=[],e){this.operations=t,this.trxId=e}create(t){return eP("create",t),this._add({create:t})}createIfNotExists(t){let e="createIfNotExists";return eP(e,t),eM(e,t),this._add({[e]:t})}createOrReplace(t){let e="createOrReplace";return eP(e,t),eM(e,t),this._add({[e]:t})}delete(t){return eU("delete",t),this._add({delete:{id:t}})}transactionId(t){return t?(this.trxId=t,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(t){return this.operations.push(t),this}}class rs extends ro{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new rs([...this.operations],this.#a,this.trxId)}commit(t){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},ri,t||{}))}patch(t,e){let r="function"==typeof e,n="string"!=typeof t&&t instanceof rn,i="object"==typeof t&&("query"in t||"id"in t);if(n)return this._add({patch:t.serialize()});if(r){let r=e(new rn(t,{},this.#a));if(!(r instanceof rn))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new rn(t,e||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}class ra extends ro{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new ra([...this.operations],this.#a,this.trxId)}commit(t){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},ri,t||{}))}patch(t,e){let r="function"==typeof e;if("string"!=typeof t&&t instanceof rr)return this._add({patch:t.serialize()});if(r){let r=e(new rr(t,{},this.#a));if(!(r instanceof rr))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}let ru=({query:t,params:e={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:o,returnQuery:s,...a}=r;for(let[r,o]of(i&&n.append("tag",i),n.append("query",t),Object.entries(e)))void 0!==o&&n.append(`$${r}`,JSON.stringify(o));for(let[t,e]of Object.entries(a))e&&n.append(t,`${e}`);return!1===s&&n.append("returnQuery","false"),!1===o&&n.append("includeMutations","fal
14se"),`?${n}`},rc=t=>"response"===t.type,rl=t=>t.body;function rh(t,e,n,i,o={},s={}){let a="stega"in s?{...n||{},..."boolean"==typeof s.stega?{enabled:s.stega}:s.stega||{}}:n,u=a.enabled?(0,en.Q)(o):o,c=!1===s.filterResponse?t=>t:t=>t.result,{cache:l,next:h,...f}={useAbortSignal:"u">typeof s.signal,resultSourceMap:a.enabled?"withKeyArraySelector":s.resultSourceMap,...s,returnQuery:!1===s.filterResponse&&!1!==s.returnQuery},p=rA(t,e,"query",{query:i,params:u},"u">typeof l||"u">typeof h?{...f,fetch:{cache:l,next:h}}:f);return a.enabled?p.pipe(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return es.apply(void 0,W([],H(t)))}(tz(r.e(197).then(r.bind(r,8197)).then(function(t){return t.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:t})=>t))),tH(([t,e])=>{let r=e(t.result,t.resultSourceMap,a);return c({...t,result:r})})):p.pipe(tH(c))}function rf(t,e,r,n={}){let i={uri:rT(t,"doc",(()=>{if(!n.releaseId)return r;let t=ed(r);if(!t){if(el(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return ep(r,n.releaseId)}if(t!==n.releaseId)throw Error(`The document ID (\`${r}\`) is already a version of \`${t}\` release, but this does not match the provided \`options.releaseId\` (\`${n.releaseId}\`)`);return r})()),json:!0,tag:n.tag,signal:n.signal,query:void 0!==n.includeAllVersions?{includeAllVersions:n.includeAllVersions}:void 0};return rS(t,e,i).pipe(ea(rc),tH(t=>{let e=t.body.documents;return e?n.includeAllVersions?e:e[0]:n.includeAllVersions?[]:void 0}))}function rp(t,e,r,n={}){let i={uri:rT(t,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return rS(t,e,i).pipe(ea(rc),tH(t=>{let e,n,i=(e=t.body.documents||[],n=t=>t._id,e.reduce((t,e)=>(t[n(e)]=e,t),Object.create(null)));return r.map(t=>i[t]||null)}))}function rd(t,e,r,n={}){var i;if(0===r.length)return tV(new Set);let o=[];for(let t=0;t<r.length;t+=100)o.push(r.slice(t,t+100));return tz(o).pipe((i=r=>rS(t,e,{uri:rT(t,"doc",r.map(encodeURIComponent).join(",")),tag:n.tag,signal:n.signal,query:{excludeContent:!0}}).pipe(ea(rc),tH(t=>{let e=new Set;for(let r of t.body.omitted||[])"existence"===r.reason&&e.add(r.id);return new Set(r.filter(t=>!e.has(t)))})),Y(void 0)?tW(i,void 0,1):tW(i,1)),function(t,e){var r;return tk((r=arguments.length>=2,function(n,i){var o=r,s=e,a=0;n.subscribe(tF(i,function(e){var r=a++;s=o?t(s,e,r):(o=!0,e)},function(){o&&i.next(s),i.complete()}))}))}((t,e)=>{for(let r of e)t.add(r);return t},new Set))}function ry(t,e,r,n={}){return rA(t,e,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function rg(t,e,r,n){return eM("createIfNotExists",r),r$(t,e,r,"createIfNotExists",n)}function rm(t,e,r,n){return eM("createOrReplace",r),r$(t,e,r,"createOrReplace",n)}function rb(t,e,r,n,i){return eM("createVersion",r),ek("createVersion",r),eQ(),rx(t,e,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function rv(t,e,r,n,i,o,s){if(!n)throw Error("`createVersion()` requires `baseId` when no `document` is provided");if(!r)throw Error("`createVersion()` requires `publishedId` when `baseId` is provided");return eU("createVersion",n),eU("createVersion",r),rx(t,e,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?ep(r,i):ef(r),ifBaseRevisionId:o},s)}function rw(t,e,r,n){return rA(t,e,"mutate",{mutations:[{delete:rt(r)}]},n)}function rE(t,e,r,n=!1,i){return rx(t,e,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function rC(t,e,r,n){return eM("replaceVersion",r),ek("replaceVersion",r),rx(t,e,{actionType:"sanity.action.document.version.replace",document:r},n)}function rI(t,e,r,n,i){return rx(t,e,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function rR(t,e,r,n){let i;return rA(t,e,"mutate",{mutations:Array.isArray(i=r instanceof rn||r instanceof rr?{patch:r.serialize()}:r instanceof rs||r instanceof ra?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function rx(t,e,r,n){let i=Array.isArray(r)?r:[r],o=n&&n.transactionId||void 0;return rA(t,e,"actions",{actions:i,transactionId:o,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function rA(t,e,r,n,i={}){let o="mutate"===r,s="actions"===r,a=o||s?"":ru(n),u=!o&&!s&&a.length<11264,c=u?a:"",l=i.returnFirst,{timeout:h,token:f,tag:p,headers:d,returnQuery:y,lastLiveEventId:g,cacheMode:m}=i,b={method:u?"GET":"POST",uri:rT(t,r,c),json:!0,body:u?void 0:n,query:o&&((t={})=>{let e;return{dryRun:t.dryRun,returnIds:!0,returnDocuments:(e=t.returnDocuments,!1===e?void 0:!!(typeof e>"u")||e),visibility:t.visibility||"sync",autoGenerateArrayKeys:t.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:t.skipCrossDatasetReferenceValidation}})(i),timeout:h,headers:d,token:f,tag:p,returnQuery:y,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(g)?g[0]:g,cacheMode:m,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn};return rS(t,e,b).pipe(ea(rc),tH(rl),tH(t=>{if(!o)return t;let e=t.results||[];if(i.returnDocuments)return l?e[0]&&e[0].document:e.map(t=>t.document);let r=l?e[0]&&e[0].id:e.map(t=>
14t.id);return{transactionId:t.transactionId,results:e,[l?"documentId":"documentIds"]:r}}))}function r$(t,e,r,n,i={}){return rA(t,e,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let rq=t=>{let e=t.config();return void 0!==e.dataset&&void 0!==e.projectId||void 0!==e.resource},rO=(t,e)=>rq(t)&&e.startsWith(rT(t,"query"));function rS(t,e,r){var n;let i=Error(),o=r.url||r.uri,s=t.config(),a=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(o.startsWith("/data/")||rO(t,o)||rq(t)&&o.startsWith(rT(t,"mutate"))||rq(t)&&o.startsWith(rT(t,"doc",""))||rq(t)&&o.startsWith(rT(t,"listen"))||rq(t)&&o.startsWith(rT(t,"history",""))):r.canUseCdn,u=(r.useCdn??s.useCdn)&&a,c=r.tag&&s.requestTagPrefix?[s.requestTagPrefix,r.tag].join("."):r.tag||s.requestTagPrefix;if(c&&null!==r.tag&&(r.query={tag:eB(c),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&rO(t,o)){let t=r.resultSourceMap??s.resultSourceMap;void 0!==t&&!1!==t&&(r.query={resultSourceMap:t,...r.query});let e=r.perspective||s.perspective;"u">typeof e&&("previewDrafts"===e&&eW(),e0(e),r.query={perspective:Array.isArray(e)?e.join(","):e,...r.query},(Array.isArray(e)&&e.length>0||"previewDrafts"===e||"drafts"===e)&&u&&(u=!1,eH())),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(t,e={}){let r={};t.headers&&Object.assign(r,t.headers);let n=e.token||t.token;n&&(r.Authorization=`Bearer ${n}`),e.useGlobalApi||t.useProjectHostname||!t.projectId||(r["X-Sanity-Project-ID"]=t.projectId);let i=!!(typeof e.withCredentials>"u"?t.withCredentials:e.withCredentials),o=typeof e.timeout>"u"?t.timeout:e.timeout;return Object.assign({},e,{headers:Object.assign({},r,e.headers||{}),timeout:typeof o>"u"?3e5:o,proxy:e.proxy||t.proxy,json:!0,withCredentials:i,fetch:"object"==typeof e.fetch&&"object"==typeof t.fetch?{...t.fetch,...e.fetch}:e.fetch||t.fetch})}(s,Object.assign({},r,{url:rj(t,o,u),callSiteStack:i})),h=new tE(t=>e(l,s.requester).subscribe(t));return r.signal?h.pipe((n=r.signal,t=>new tE(e=>{let r=()=>e.error(function(t){if(rP)return new DOMException(t?.reason??"The operation was aborted.","AbortError");let e=Error(t?.reason??"The operation was aborted.");return e.name="AbortError",e}(n));if(n&&n.aborted)return void r();let i=t.subscribe(e);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):h}function r_(t,e,r){return rS(t,e,r).pipe(ea(t=>"response"===t.type),tH(t=>t.body))}function rT(t,e,r){let n=t.config();if(n.resource){eD(n);let t=rU(n),i=void 0!==r?`${e}/${r}`:e;return`${t}/${i}`.replace(/\/($|\?)/,"$1")}let i=eF(n),o=`/${e}/${i}`;return`/data${void 0!==r?`${o}/${r}`:o}`.replace(/\/($|\?)/,"$1")}function rj(t,e,r=!1){let{url:n,cdnUrl:i}=t.config();return`${r?i:n}/${e.replace(/^\//,"")}`}let rP=!!globalThis.DOMException,rU=t=>{let e=t.resource;if(!e)throw Error("`resource` must be provided to perform resource queries");let{type:r,id:n}=e;switch(r){case"dataset":{let t=n.split(".");if(2!==t.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${t[0]}/datasets/${t[1]}`}case"canvas":return`/canvases/${n}`;case"media-library":return`/media-libraries/${n}`;case"dashboard":return`/dashboards/${n}`;default:throw Error(`Unsupported resource type: ${r.toString()}`)}};function rM(t,e,r){let n=eF(t.config());return r_(t,e,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function rk(t,e,r){let n=eF(t.config());return r_(t,e,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function rF(t,e,r){let n=eF(t.config());return r_(t,e,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class rB{#a;#u;constructor(t,e){this.#a=t,this.#u=e}generate(t){return rM(this.#a,this.#u,t)}transform(t){return rk(this.#a,this.#u,t)}translate(t){return rF(this.#a,this.#u,t)}}class rD{#a;#u;constructor(t,e){this.#a=t,this.#u=e}generate(t){return tY(rM(this.#a,this.#u,t))}transform(t){return tY(rk(this.#a,this.#u,t))}translate(t){return tY(rF(this.#a,this.#u,t))}prompt(t){var e,r;let n;return tY((e=this.#a,r=this.#u,n=eF(e.config()),r_(e,r,{method:"POST",uri:`/agent/action/prompt/${n}`,body:t})))}patch(t){var e,r;let n;return tY((e=this.#a,r=this.#u,n=eF(e.config()),r_(e,r,{method:"POST",uri:`/agent/action/patch/${n}`,body:t})))}}class rL{#a;#u;
14constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){return rz(this.#a,this.#u,t,e,r)}}class rN{#a;#u;constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){return tY(rz(this.#a,this.#u,t,e,r).pipe(ea(t=>"response"===t.type),tH(t=>t.body.document)))}}function rz(t,e,r,n,i={}){var o,s;if(-1===e_.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${e_.join(", ")}`);let a=i.extract||void 0;a&&!a.length&&(a=["none"]);let u=t.config(),c=(o=i,s=n,!(typeof File>"u")&&s instanceof File?Object.assign({filename:!1===o.preserveFilename?void 0:s.name,contentType:s.type},o):o),{tag:l,label:h,title:f,description:p,creditLine:d,filename:y,source:g}=c,m=u.resource?.type==="media-library",b=m?{title:f,filename:y}:{label:h,title:f,description:p,filename:y,meta:a,creditLine:d};return g&&!m&&(b.sourceId=g.id,b.sourceName=g.name,b.sourceUrl=g.url),rS(t,e,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(t,e){let r="image"===e?"images":"files",n=t.resource;if(n){let{type:t,id:e}=n;switch(t){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/${e}/assets/${r}`;case"media-library":return`/media-libraries/${e}/upload`;case"dashboard":return`/dashboards/${e}/assets/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}}let i=eF(t);return`assets/${r}/${i}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:b,body:n})}let rV=tj(()=>r.e(724).then(r.t.bind(r,3724,19))).pipe(tH(({default:t})=>t),t0({connector:function(){return new tZ(1,f,p)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:!1}));function rH(){return function(t){return t.pipe(t2((t,e)=>{var r;return t instanceof e2?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t3(1)(tz(t,tU(t)))}(tV({type:"reconnect"}),(void 0===r&&(r=t9),new tE(function(t){var e=1e3;e<0&&(e=0);var n=0;return r.schedule(function(){t.closed||(t.next(n++),t.complete())},e)})).pipe(tW(()=>e))):t7(()=>t)}))}}let rW=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","enableResume","tag"],rG={includeResult:!0};function rY(t,e,r={}){let{url:n,token:i,withCredentials:o,requestTagPrefix:s,headers:a}=this.config(),u=r.tag&&s?[s,r.tag].join("."):r.tag,c={...Object.keys(rG).concat(Object.keys(r)).reduce((t,e)=>(t[e]=typeof r[e]>"u"?rG[e]:r[e],t),{}),tag:u},l=ru({query:t,params:e,options:{tag:u,...rW.reduce((t,e)=>(typeof c[e]>"u"||(t[e]=c[e]),t),{})}}),h=`${n}${rT(this,"listen",l)}`;if(h.length>14800)return t7(()=>Error("Query too large for listener"));let f=c.events?c.events:["mutation"],p={};return o&&(p.withCredentials=!0),(i||a)&&(p.headers={},i&&(p.headers.Authorization=`Bearer ${i}`),a&&Object.assign(p.headers,a)),e9(()=>(typeof EventSource>"u"||p.headers?rV:tV(EventSource)).pipe(tH(t=>new t(h,p))),f).pipe(rH(),ea(t=>f.includes(t.type)),tH(t=>({type:t.type,..."data"in t?t.data:{}})))}let rJ="2021-03-25";class rQ{#a;constructor(t){this.#a=t}events({includeDrafts:t=!1,tag:e,waitFor:r}={}){var n,i,o,s,a;let{projectId:u,apiVersion:c,token:l,withCredentials:h,requestTagPrefix:f,headers:p}=this.#a.config(),d=c.replace(/^v/,"");if("X"!==d&&d<rJ)throw Error(`The live events API requires API version ${rJ} or later. The current API version is ${d}. Please update your API version to use this feature.`);if(t&&!l&&!h)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 y=rT(this.#a,"live/events"),g=new URL(this.#a.getUrl(y,!1)),m=e&&f?[f,e].join("."):e;m&&g.searchParams.set("tag",m),t&&g.searchParams.set("includeDrafts","true"),r&&g.searchParams.set("waitFor",r);let b={};t&&h&&(b.withCredentials=!0),(t&&l||p)&&(b.headers={},t&&l&&(b.headers.Authorization=`Bearer ${l}`),p&&Object.assign(b.headers,p));let v=`${g.href}::${JSON.stringify(b)}`,w=rX.get(v);if(w)return w;let E=e9(()=>(typeof EventSource>"u"||b.headers?rV:tV(EventSource)).pipe(tH(t=>new t(g.href,b))),["message","restart","welcome","reconnect","goaway"]),C=(i=new URL(this.#a.getUrl("/check/cors",!1)),o=u,s=!0===b.withCredentials,new tE(t=>{let e=new AbortController,{signal:r}=e;return fetch(i,{method:"GET",mode:"cors",credentials:"omit",signal:r}).then(t=>{if(!(r.aborted||!t.ok))return t.json()}).then(e=>{if(!r.aborted){if(s&&e?.result?.withCredentials===!1)return void t.error(new eA({projectId:o,credentials:!0}));if(e?.result?.allowed===!1)return void t.error(new eA({projectId:o,credentials:s}));t.next(),t.complete()}}).catch(()=>{r.aborted||t.closed||(t.next(),t.complete())}),()=>e.abort()})),I=E.pipe(rH(),tW(t=>"reconnect"===t.type?C.pipe(tW(()=>tV(t))):tV(t)),t2(t=>t instanceof eA?t7(()=>t):C.pipe(tW(()=>{throw t}))),tH(t=>{if("message"===t.type){let{data:e,...r}=t;return{...r,tags:e.tags}}return t})).pipe(et(()=>rX.delete(v)),(a="function"==typeof(n={predicate:t=>"welcome"===t.type})?{predicate:n,...void 0}:n,t=>{var e,r;let n,i=!1,{predicate:o,...s}=a;return function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=tU(e),i=(t=1/0,"number"==typeof tP(e)?e.pop():t);return e.length?1===e.length?t_(e[0]):t3(i)(tz(e,n)):ee}(t.pipe((r=Y(e=t=>{a.predicate(t)&&(i=!0,n=t)})?{next:e,error:void 0,complete:void 0}:e)?tk(function(t,e){null==(n=r.subscribe)||n.call(r);var n,i=!0;t.subscribe(tF(e,function(t){var n;null==(n=r.next)||n.call(r,t),e.next(t)},function(){var t;i=!1,null==(t=r.complete)||t.call(r),e.complete()},function(t){var n;i=!1,null==(n=r.error)||n.call(r,t),e.error(t)},function(){var t,e;i&&(null==(t=r.unsubscribe)||t.call(r)),null==(e=r.finalize)||e.call(r)}))}):tv,et(()=>{i=!1,n=void 0}),t0(s)),new tE(t=>{i&&t.next(n),t.complete()}
14))}));return rX.set(v,I),I}}let rX=new Map;class rK{#a;#u;constructor(t,e){this.#a=t,this.#u=e}create(t,e){return r1(this.#a,this.#u,"PUT",t,e)}edit(t,e){return r1(this.#a,this.#u,"PATCH",t,e)}delete(t){return r1(this.#a,this.#u,"DELETE",t)}list(){eL("dataset",this.#a.config());let t=this.#a.config(),e=t.projectId,r="/datasets";return!1===t.useProjectHostname&&(r=`/projects/${e}/datasets`),r_(this.#a,this.#u,{uri:r,tag:null})}getEmbeddingsSettings(t){return eL("dataset",this.#a.config()),ej(t),r_(this.#a,this.#u,{uri:r0(this.#a,t),tag:null})}editEmbeddingsSettings(t,e){return eL("dataset",this.#a.config()),ej(t),r_(this.#a,this.#u,{method:"PUT",uri:r0(this.#a,t),body:e,tag:null})}}class rZ{#a;#u;constructor(t,e){this.#a=t,this.#u=e}create(t,e){return eL("dataset",this.#a.config()),tY(r1(this.#a,this.#u,"PUT",t,e))}edit(t,e){return eL("dataset",this.#a.config()),tY(r1(this.#a,this.#u,"PATCH",t,e))}delete(t){return eL("dataset",this.#a.config()),tY(r1(this.#a,this.#u,"DELETE",t))}list(){eL("dataset",this.#a.config());let t=this.#a.config(),e=t.projectId,r="/datasets";return!1===t.useProjectHostname&&(r=`/projects/${e}/datasets`),tY(r_(this.#a,this.#u,{uri:r,tag:null}))}getEmbeddingsSettings(t){return eL("dataset",this.#a.config()),ej(t),tY(r_(this.#a,this.#u,{uri:r0(this.#a,t),tag:null}))}editEmbeddingsSettings(t,e){return eL("dataset",this.#a.config()),ej(t),tY(r_(this.#a,this.#u,{method:"PUT",uri:r0(this.#a,t),body:e,tag:null}))}}function r0(t,e){let r=t.config();return!1===r.useProjectHostname?`/projects/${r.projectId}/datasets/${e}/settings/embeddings`:`/datasets/${e}/settings/embeddings`}function r1(t,e,r,n,i){return eL("dataset",t.config()),ej(n),r_(t,e,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class r2{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getPlaybackInfo(t,e={}){var r,n;let i=this.#a.config(),o=(i.resource||i["~experimental_resource"])?.id,{instanceId:s,library
14Id:a}=function(t){let e="object"==typeof t&&"_ref"in t?t._ref:t,r=r6.exec(e);if(r){let[,t,e]=r;return{libraryId:t,instanceId:e}}if("string"==typeof t&&t.startsWith("video-"))return{instanceId:t};throw Error(`Invalid video asset instance identifier "${e}": must be a valid video instance id or a Global Dataset Reference (GDR) to the video asset in the Media Library`)}(t),u=a||o;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=s,n=u,`/media-libraries/${n}/video/${r}/playback-info`),l=function(t){let e={};if(t.transformations){let{thumbnail:r,animated:n,storyboard:i}=t.transformations;r&&(r.width&&(e.thumbnailWidth=r.width),r.height&&(e.thumbnailHeight=r.height),void 0!==r.time&&(e.thumbnailTime=r.time),r.fit&&(e.thumbnailFit=r.fit),r.format&&(e.thumbnailFormat=r.format)),n&&(n.width&&(e.animatedWidth=n.width),n.height&&(e.animatedHeight=n.height),void 0!==n.start&&(e.animatedStart=n.start),void 0!==n.end&&(e.animatedEnd=n.end),n.fps&&(e.animatedFps=n.fps),n.format&&(e.animatedFormat=n.format)),i&&i.format&&(e.storyboardFormat=i.format)}return t.expiration&&(e.expiration=t.expiration),e}(e);return r_(this.#a,this.#u,{method:"GET",uri:c,query:l})}}class r3{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getPlaybackInfo(t,e={}){return tY(new r2(this.#a.observable,this.#u).getPlaybackInfo(t,e))}}let r6=/^media-library:(ml[^:]+):([^:]+)$/;class r5{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){let e={};return t?.includeMembers===!1&&(e.includeMembers="false"),t?.includeFeatures===!1&&(e.includeFeatures="false"),t?.organizationId&&(e.organizationId=t.organizationId),t?.onlyExplicitMembership&&(e.onlyExplicitMembership="true"),r_(this.#a,this.#u,{uri:"/projects",query:e})}getById(t){return r_(this.#a,this.#u,{uri:`/projects/${t}`})}}class r8{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){let e={};return t?.includeMembers===!1&&(e.includeMembers="false"),t?.includeFeatures===!1&&(e.includeFeatures="false"),t?.organizationId&&(e.organizationId=t.organizationId),t?.onlyExplicitMembership&&(e.onlyExplicitMembership="true"),tY(r_(this.#a,this.#u,{uri:"/projects",query:e}))}getById(t){return tY(r_(this.#a,this.#u,{uri:`/projects/${t}`}))}}let r4=((t,e=21)=>{var r;let n,i;return r=e,i=-~(1.6*(n=(2<<Math.log(t.length-1)/Math.LN2)-1)*r/t.length),(e=r)=>{let o="";for(;;){let r=eg(i),s=0|i;for(;s--;)if((o+=t[r[s]&n]||"").length===e)return o}}})("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),r9=(t,e)=>e?ep(t,e):ef(t);function r7(t,{releaseId:e,publishedId:r,document:n}){if(r&&n._id){let t=r9(r,e);return((t,e)=>{if(e._id&&e._id!==t)throw Error(`The provided document ID (\`${e._id}\`) does not match the generated version ID (\`${t}\`)`)})(t,n),t}if(n._id){let r=el(n._id),i=eh(n._id);if(!r&&!i)throw Error(`\`${t}()\` requires a document with an \`_id\` that is a version or draft ID`);if(e){if(r)throw Error(`\`${t}()\` was called with a document ID (\`${n._id}\`) that is a draft ID, but a release ID (\`${e}\`) was also provided.`);let i=ed(n._id);if(i!==e)throw Error(`\`${t}()\` was called with a document ID (\`${n._id}\`) that is a version ID, but the release ID (\`${e}\`) does not match the document's version ID (\`${i}\`).`)}return n._id}if(r)return r9(r,e);throw Error(`\`${t}()\` requires either a publishedId or a document with an \`_id\``)}let nt=(t,e)=>{let[r,n,i]=((t,e)=>{if("object"==typeof t&&null!==t&&("releaseId"in t||"metadata"in t)){let{releaseId:r=r4(),metadata:n={}}=t;return[r,n,e]}return[r4(),{},t]})(t,e);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class ne{#a;#u;constructor(t,e){this.#a=t,this.#u=e}get({releaseId:t},e){return rf(this.#a,this.#u,`_.releases.${t}`,e)}create(t,e){let{action:r,options:n}=nt(t,e),{releaseId:i,metadata:o}=r;return rx(this.#a,this.#u,r,n).pipe(tH(t=>({...t,releaseId:i,metadata:o})))}edit({releaseId:t,patch:e},r){return rx(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:t,patch:e},r)}publish({releaseId:t},e){return rx(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:t},e)}archive({releaseId:t},e){return rx(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:t},e)}unarchive({releaseId:t},e){return rx(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:t},e)}schedule({releaseId:t,publishAt:e},r){return rx(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:t,publishAt:e},r)}unschedule({releaseId:t},e){return rx(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:t},e)}delete({releaseId:t},e){return rx(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:t},e)}fetchDocuments({releaseId:t},e){return ry(this.#a,this.#u,t,e)}}class nr{#a;#u;constructor(t,e){this.#a=t,this.#u=e}get({releaseId:t},e){return tY(rf(this.#a,this.#u,`_.releases.${t}`,e))}async create(t,e){let{action:r,options:n}=nt(t,e),{releaseId:i,metadata:o}=r;return{...await tY(rx(this.#a,this.#u,r,n)),releaseId:i,metadata:o}}edit({releaseId:t,patch:e},r){return tY(rx(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:t,patch:e},r))}publish({releaseId:t},e){return tY(rx(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:t},e))}archive({releaseId:t},e){return tY(rx(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:t},e))}unarchive({releaseId:t},e){return tY(rx(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:t},e))}schedule({releaseId:t,publishAt:e},r){return tY(rx(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:t,publishAt:e},r))}unschedule({releaseId:t},e){return tY(rx(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:t},e))}delete({releaseId:t},e){return tY(rx(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:t},e))}fetchDocuments({releaseId:t},e){return tY(ry(this.#a,this.#u,t,e))}}class nn{#a;#u;
14constructor(t,e){this.#a=t,this.#u=e}getById(t){return r_(this.#a,this.#u,{uri:`/users/${t}`})}}class ni{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getById(t){return tY(r_(this.#a,this.#u,{uri:`/users/${t}`}))}}class no{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#l;#u;listen=rY;constructor(t,e=eK){this.config(e),this.#l=t;const r=e._requestHandler;this.#u=r?(()=>{let n;return(i,o)=>(n||(n=new ns(t,{...e,_requestHandler:void 0})),r(i,e=>t(e,o),n))})():t,this.assets=new rL(this,this.#u),this.datasets=new rK(this,this.#u),this.live=new rQ(this),this.mediaLibrary={video:new r2(this,this.#u)},this.projects=new r5(this,this.#u),this.users=new nn(this,this.#u),this.agent={action:new rB(this,this.#u)},this.releases=new ne(this,this.#u)}clone(){return new no(this.#l,this.config())}config(t){if(void 0===t)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=e1(t,this.#c||{}),this}withConfig(t){let e=this.config();return new no(this.#l,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return rh(this,this.#u,this.#c.stega,t,e,r)}getDocument(t,e){if(e?.includeAllVersions===!0)return rf(this,this.#u,t,{...e,includeAllVersions:!0});let r={signal:e?.signal,tag:e?.tag,releaseId:e?.releaseId,...e&&"includeAllVersions"in e?{includeAllVersions:!1}:{}};return rf(this,this.#u,t,r)}getDocuments(t,e){return rp(this,this.#u,t,e)}documentsExists(t,e){return rd(this,this.#u,t,e)}create(t,e){return r$(this,this.#u,t,"create",e)}createIfNotExists(t,e){return rg(this,this.#u,t,e)}createOrReplace(t,e){return rm(this,this.#u,t,e)}createVersion({document:t,publishedId:e,releaseId:r,baseId:n,ifBaseRevisionId:i},o){if(!t)return rv(this,this.#u,e,n,r,i,o);let s=r7("createVersion",{document:t,publishedId:e,releaseId:r}),a={...t,_id:s},u=e||ey(t._id);return rb(this,this.#u,a,u,o)}delete(t,e){return rw(this,this.#u,t,e)}discardVersion({releaseId:t,publishedId:e},r,n){let i=r9(e,t);return rE(this,this.#u,i,r,n)}replaceVersion({document:t,publishedId:e,releaseId:r},n){let i=r7("replaceVersion",{document:t,publishedId:e,releaseId:r}),o={...t,_id:i};return rC(this,this.#u,o,n)}unpublishVersion({releaseId:t,publishedId:e},r){let n=ep(e,t);return rI(this,this.#u,n,e,r)}mutate(t,e){return rR(this,this.#u,t,e)}patch(t,e){return new rr(t,e,this)}transaction(t){return new ra(t,this)}action(t,e){return rx(this,this.#u,t,e)}request(t){return r_(this,this.#u,t)}getUrl(t,e){return rj(this,t,e)}getDataUrl(t,e){return rT(this,t,e)}}class ns{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#l;#u;listen=rY;constructor(t,e=eK){this.config(e),this.#l=t;const r=e._requestHandler;this.#u=r?(()=>{let n;return(i,o)=>(n||(n=new ns(t,{...e,_requestHandler:void 0})),r(i,e=>t(e,o),n))})():t,this.assets=new rN(this,this.#u),this.datasets=new rZ(this,this.#u),this.live=new rQ(this),this.mediaLibrary={video:new r3(this,this.#u)},this.projects=new r8(this,this.#u),this.users=new ni(this,this.#u),this.agent={action:new rD(this,this.#u)},this.releases=new nr(this,this.#u),this.observable=new no(t,e)}clone(){return new ns(this.#l,this.config())}config(t){if(void 0===t)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(t),this.#c=e1(t,this.#c||{}),this}withConfig(t){let e=this.config();return new ns(this.#l,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return tY(rh(this,this.#u,this.#c.stega,t,e,r))}getDocument(t,e){if(e?.includeAllVersions===!0)return tY(rf(this,this.#u,t,{...e,includeAllVersions:!0}));let r={signal:e?.signal,tag:e?.tag,releaseId:e?.releaseId,...e&&"includeAllVersions"in e?{includeAllVersions:!1}:{}};return tY(rf(this,this.#u,t,r))}getDocuments(t,e){return tY(rp(this,this.#u,t,e))}documentsExists(t,e){return tY(rd(this,this.#u,t,e))}create(t,e){return tY(r$(this,this.#u,t,"create",e))}createIfNotExists(t,e){return tY(rg(this,this.#u,t,e))}createOrReplace(t,e){return tY(rm(this,this.#u,t,e))}createVersion({document:t,publishedId:e,releaseId:r,baseId:n,ifBaseRevisionId:i},o){if(!t)return er(rv(this,this.#u,e,n,r,i,o));let s=r7("createVersion",{document:t,publishedId:e,releaseId:r}),a={...t,_id:s},u=e||ey(t._id);return er(rb(this,this.#u,a,u,o))}delete(t,e){return tY(rw(this,this.#u,t,e))}discardVersion({releaseId:t,publishedId:e},r,n){let i=r9(e,t);return tY(rE(this,this.#u,i,r,n))}replaceVersion({document:t,publishedId:e,releaseId:r},n){let i=r7("replaceVersion",{document:t,publishedId:e,releaseId:r}),o={...t,_id:i};return er(rC(this,this.#u,o,n))}unpublishVersion({releaseId:t,publishedId:e},r){let n=ep(e,t);return tY(rI(this,this.#u,n,e,r))}mutate(t,e){return tY(rR(this,this.#u,t,e))}patch(t,e){return new rn(t,e,this)}transaction(t){return new rs(t,this)}action(t,e){return tY(rx(this,this.#u,t,e))}request(t){return tY(r_(this,this.#u,t))}dataRequest(t,e,r){return tY(rA(this,this.#u,t,e,r))}getUrl(t,e){return rj(this,t,e)}getDataUrl(t,e){return rT(this,t,e)}}let na={requester:eq(d=[]),createClient:t=>{let e=eq(d,{ignoreWarnings:t.ignoreWarnings});return new ns((r,n)=>(n||e)({maxRedirects:0,maxRetries:t.maxRetries,retryDelay:t.retryDelay,lineage:t.lineage,...r}),t)}}
14,nu=(na.requester,na.createClient)},5184:(t,e,r)=>{"use strict";function n(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}r.d(e,{Q:()=>h,u4:()=>n,y:()=>u});var i={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},s={0:String.fromCodePoint(o[0]),1:String.fromCodePoint(o[1]),2:String.fromCodePoint(o[2]),3:String.fromCodePoint(o[3])},a=[,,,,].fill(String.fromCodePoint(o[0])).join("");function u(t,e,r="auto"){return!0===r||"auto"===r&&(!(!Number.isNaN(Number(t))||/[a-z]/i.test(t)&&!/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(t))&&Date.parse(t)||function(t){try{new URL(t,t.startsWith("/")?"https://acme.com":void 0)}catch{return!1}return!0}(t))?t:`${t}${function(t){let e=JSON.stringify(t),r=new TextEncoder().encode(e),n="";for(let t=0;t<r.length;t++){let e=r[t];n+=s[e>>6&3]+s[e>>4&3]+s[e>>2&3]+s[3&e]}return a+n}(e)}`}Object.fromEntries(Object.entries(s).map(t=>[t[1],+t[0]])),Object.fromEntries(Object.entries(i).map(t=>t.reverse()));var c=`${Object.values(i).map(t=>`\\u{${t.toString(16)}}`).join("")}`,l=RegExp(`[${c}]{4,}`,"gu");function h(t){var e,r;return t&&JSON.parse({cleaned:(e=JSON.stringify(t)).replace(l,""),encoded:(null==(r=e.match(l))?void 0:r[0])||""}.cleaned)}},5772:(t,e,r)=>{"use strict";r.d(e,{default:()=>i.a});var n=r(7651),i=r.n(n)},7651:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={default:function(){return l},getImageProps:function(){return c}};for(var i in n)Object.defineProperty(e,i,{enumerable:!0,get:n[i]});let o=r(3623),s=r(5413),a=r(8437),u=o._(r(6095));function c(t){let{props:e}=(0,s.getImgProps)(t,{defaultLoader:u.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[t,r]of Object.entries(e))void 0===r&&delete e[t];return{props:e}}let l=a.Image}}]);

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.