PageSourceSearch

https://aeventyr.no/_next/static/chunks/4ebd7034ef5b1197.js?dpl=dpl_C8jDRNRrwt5z7Lggnh9VSFggaLgb

js aeventyr.no collected 2026-10-08 13:57:47 UTC 113,426 bytes, 13 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,877522,(t,e,r)=>{var n={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="undefined"!=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>0x7fffffff)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)||"undefined"!=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("undefined"!=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||"undefined"==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 R(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return I(t).length;default:if(i)return n?-1:R(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+=T[t[o]];return i}(this,e,r);case"utf8":case"utf-8":return v(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;
vendor: 12,407 bytes, line 1
1o++)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?v(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 v(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 b(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 _(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(R(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(I(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||b(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||b(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||b(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||b(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||b(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||b(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||b(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||b(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||b(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||b(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||b(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||b(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||b(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||b(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||b(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||b(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 _(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return _(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 x=/[^+/0-9A-Za-z-_]/g;function R(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 I(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(x,"")).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 T=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}}},i={};function o(t){var e=i[t];if(void 0!==e)return e.exports;var r=i[t]={exports:{}},s=!0;try{n[t](r,r.exports,o),s=!1}finally{s&&delete i[t]}return r.exports}o.ab="/ROOT/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/buffer/",e.exports=o(72)},477846,(t,e,r)=>{t.e,e.exports=function(){function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function e(){return(e=Object.assign.bind()).apply(null,arguments)}var r="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function n(t){return("image-"+t.split("/").slice(-1)[0]).replace(/\.([a-z]+)$/,"-$1")}var i=[["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"]],o=["clip","crop","fill","fillmax","max","scale","min"],s=["top","bottom","left","right","center","focalpoint","entropy"],a=["format"],u=function(){function u(t,r){this.options=void 0,this.options=t?e({},t.options||{},r||{}):e({},r||{})}var c=u.prototype;return c.withOptions=function(r){var n=r.baseUrl||this.options.baseUrl,o={baseUrl:n};for(var s in r)r.hasOwnProperty(s)&&(o[function(e){for(var r,n=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,void 0);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,void 0):void 0}}(e))){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i);!(r=n()).done;){var o=r.value,s=o[0],a=o[1];if(e===s||e===a)return s}return e}(s)]=r[s]);return new u(this,e({baseUrl:n},o))},c.image=function(t){return this.withOptions({source:t})},c.dataset=function(t){return this.withOptions({dataset:t})},c.projectId=function(t){return this.withOptions({projectId:t})},c.bg=function(t){return this.withOptions({bg:t})},c.dpr=function(t){return this.withOptions(t&&1!==t?{dpr:t}:{})},c.width=function(t){return this.withOptions({width:t})},c.height=function(t){return this.withOptions({height:t})},c.focalPoint=function(t,e){return this.withOptions({focalPoint:{x:t,y:e}})},c.maxWidth=function(t){return this.withOptions({maxWidth:t})},c.minWidth=function(t){return this.withOptions({minWidth:t})},c.maxHeight=function(t){return this.withOptions({maxHeight:t})},c.minHeight=function(t){return this.withOptions({minHeight:t})},c.size=function(t,e){return this.withOptions({width:t,height:e})},c.blur=function(t){return this.withOptions({blur:t})},c.sharpen=function(t){return this.withOptions({sharpen:t})},c.rect=function(t,e,r,n){return this.withOptions({rect:{left:t,top:e,width:r,height:n}})},c.format=function(t){return this.withOptions({format:t})},c.invert=function(t){return this.withOptions({invert:t})},c.orientation=function(t){return this.withOptions({orientation:t})},c.quality=function(t){return this.withOptions({quality:t})},c.forceDownload=function(t){return this.withOptions({download:t})},c.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},c.flipVertical=function(){return this.withOptions({flipVertical:!0})},c.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},c.fit=function(t){if(-1===o.indexOf(t))throw Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},c.crop=function(t){if(-1===s.indexOf(t))throw Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},c.saturation=function(t){return this.withOptions({saturation:t})},c.auto=function(t){if(-1===a.indexOf(t))throw Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},c.pad=function(t){return this.withOptions({pad:t})},c.vanityName=function(t){return this.withOptions({vanityName:t})},c.frame=function(t){if(1!==t)throw Error('Invalid frame value "'+t+'"');return this.withOptions({frame:t})},c.url=function(){return function(t){var o=e({},t||{}),s=o.source;delete o.source;var a=function(t){var r,i;if(!t)return null;if("string"==typeof t&&(i=t,/^https?:\/\//.test(""+i)))r={asset:{_ref:n(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:n(t.asset.url)}};else{if("object"!=typeof t.asset)return null;r=e({},t)}return t.crop&&(r.crop=t.crop),t.hotspot&&(r.hotspot=t.hotspot),function(t){if(t.crop&&t.hotspot)return t;var r=e({},t);
1return r.crop||(r.crop={left:0,top:0,bottom:0,right:0}),r.hotspot||(r.hotspot={x:.5,y:.5,height:1,width:1}),r}(r)}(s);if(!a){if(s&&"object"==typeof s&&null!==s&&s._upload&&(!s.asset||!s.asset._ref))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8HwQACfsD/QNViZkAAAAASUVORK5CYII=";throw Error("Unable to resolve image URL from source ("+JSON.stringify(s)+")")}var u=function(t){var e=t.split("-"),n=e[1],i=e[2],o=e[3];if(!n||!i||!o)throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+r+'".');var s=i.split("x"),a=s[0],u=s[1],c=+a,l=+u;if(!(isFinite(c)&&isFinite(l)))throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+r+'".');return{id:n,width:c,height:l,format:o}}(a.asset._ref||a.asset._id||""),c=Math.round(a.crop.left*u.width),l=Math.round(a.crop.top*u.height),h={left:c,top:l,width:Math.round(u.width-a.crop.right*u.width-c),height:Math.round(u.height-a.crop.bottom*u.height-l)},f=a.hotspot.height*u.height/2,p=a.hotspot.width*u.width/2,d=a.hotspot.x*u.width,y=a.hotspot.y*u.height;return o.rect||o.focalPoint||o.ignoreImageParams||o.crop||(o=e({},o,function(t,e){var r,n=e.width,i=e.height;if(!(n&&i))return{width:n,height:i,rect:t.crop};var o=t.crop,s=t.hotspot,a=n/i;if(o.width/o.height>a){var u=Math.round(o.height),c=Math.round(u*a),l=Math.max(0,Math.round(o.top)),h=Math.max(0,Math.round(Math.round((s.right-s.left)/2+s.left)-c/2));h<o.left?h=o.left:h+c>o.left+o.width&&(h=o.left+o.width-c),r={left:h,top:l,width:c,height:u}}else{var f=o.width,p=Math.round(f/a),d=Math.max(0,Math.round(o.left)),y=Math.max(0,Math.round(Math.round((s.bottom-s.top)/2+s.top)-p/2));y<o.top?y=o.top:y+p>o.top+o.height&&(y=o.top+o.height-p),r={left:d,top:y,width:f,height:p}}return{width:n,height:i,rect:r}}({crop:h,hotspot:{left:d-p,top:y-f,right:d+p,bottom:y+f}},o))),function(t){var e=(t.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),r=t.vanityName?"/"+t.vanityName:"",n=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format+r,o=e+"/images/"+t.projectId+"/"+t.dataset+"/"+n,s=[];if(t.rect){var a=t.rect,u=a.left,c=a.top,l=a.width,h=a.height;(0!==u||0!==c||h!==t.asset.height||l!==t.asset.width)&&s.push("rect="+u+","+c+","+l+","+h)}t.bg&&s.push("bg="+t.bg),t.focalPoint&&(s.push("fp-x="+t.focalPoint.x),s.push("fp-y="+t.focalPoint.y));var f=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(f&&s.push("flip="+f),i.forEach(function(e){var r=e[0],n=e[1];void 0!==t[r]?s.push(n+"="+encodeURIComponent(t[r])):void 0!==t[n]&&s.push(n+"="+encodeURIComponent(t[n]))}),0===s.length)?o:o+"?"+s.join("&")}(e({},o,{asset:u}))}(this.options)},c.toString=function(){return this.url()},u}();return function(t){if(t&&"config"in t&&"function"==typeof t.config){var e=t.config(),r=e.apiHost,n=e.projectId,i=e.dataset;return new u(null,{baseUrl:(r||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:n,dataset:i})}if(t&&"clientConfig"in t&&"object"==typeof t.clientConfig){var o=t.clientConfig,s=o.apiHost,a=o.projectId,c=o.dataset;return new u(null,{baseUrl:(s||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:a,dataset:c})}return new u(null,t||{})}}()},924078,t=>{"use strict";var e,r,n,i=t.i(49302);let o=!(typeof navigator>"u")&&"ReactNative"===navigator.product,s={timeout:o?6e4:12e4},a=function(t){let e={...s,..."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(s.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),n=t.slice(e+1);if(!o)return{url:r,searchParams:new URLSearchParams(n)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let i=new URLSearchParams;for(let t of n.split("&")){let[e,r]=t.split("=");e&&i.append(u(e),u(r||""))}return{url:r,searchParams:i}}(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 u(t){return decodeURIComponent(t.replace(/\+/g," "))}let c=/^https?:\/\//i,l=function(t){if(!c.test(t.url))throw Error(`"${t.url}" is not a valid URL`)},h=["request","response","progress","error","abort"],f=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var p,d,y,g=(p=function(){if(y)return d;y=1;var t=function(t){return t.replace(/^\s+|\s+$/g,"")};return d=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}}())&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;class m{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",b="xhr"===v?XMLHttpRequest:m,w=(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 b;s instanceof m&&"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 m?t instanceof Error?t:Error(`Request error while attempting to reach is ${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:g(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 E,C,_,x,R,A=t.i(877522),I={exports:{}};R||(R=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 i.default&&"env"in i.default&&(t=i.default.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?_:(x=1,_=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(C)return E;C=1;function t(t,e,r,n){return Math.round(t/r)+" "+n+(e>=1.5*r?"s":"")}return E=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}}}(I,I.exports)),I.exports,Object.prototype.hasOwnProperty;let q=typeof A.Buffer>"u"?()=>!1:t=>A.Buffer.isBuffer(t);function O(t){return"[object Object]"===Object.prototype.toString.call(t)}let T=["boolean","string","number"];var $="u">typeof globalThis?globalThis:"u">typeof window?window:t.g;let S=(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 j{__CANCEL__=!0;message;constructor(t){this.message=t}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class P{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 j(t),e(this.reason))})}static source=()=>{let t;return{token:new P(e=>{t=e}),cancel:t}}}S.Cancel=j,S.CancelToken=P,S.isCancel=t=>!(!t||!t?.__CANCEL__);var U=(t,e,r)=>("GET"===r.method||"HEAD"===r.method)&&(t.isNetworkError||!1);function M(t){return 100*Math.pow(2,t)+100*Math.random()}let B=(t={})=>{var e;let r,n,i;return r=(e={shouldRetry:U,...t}).maxRetries||5,n=e.retryDelay||M,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}}};B.shouldRetry=U;var F=t.i(824627);function k(t){return"function"==typeof t}function D(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}var L=D(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 N(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var z=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=(0,F.__values)(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;if(k(u))try{u()}catch(t){i=t instanceof L?t.errors:[t]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=(0,F.__values)(c),h=l.next();!h.done;h=l.next()){var f=h.value;try{W(f)}catch(t){i=null!=i?i:[],t instanceof L?i=(0,F.__spreadArray)((0,F.__spreadArray)([],(0,F.__read)(i)),(0,F.__read)(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 L(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)W(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)&&N(e,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&N(r,t),t instanceof e&&t._removeParent(this)},(t=new e).closed=!0,e.EMPTY=t,e}(),V=z.EMPTY;function H(t){return t instanceof z||t&&"closed"in t&&k(t.remove)&&k(t.add)&&k(t.unsubscribe)}function W(t){k(t)?t():t.unsubscribe()}var Y=void 0,G={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=G.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,(0,F.__spreadArray)([t,e],(0,F.__read)(r))):setTimeout.apply(void 0,(0,F.__spreadArray)([t,e],(0,F.__read)(r)))},clearTimeout:function(t){var e=G.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function J(t){G.setTimeout(function(){!1;throw t})}function Q(){}var X=K("C",void 0,void 0);function K(t,e,r){return{kind:t,value:e,error:r}}var Z=null;function tt(t){var e,r,n,i;1;t()}var te=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,H(e)&&e.add(r)):r.destination=tu,r}return(0,F.__extends)(e,t),e.create=function(t,e,r){return new to(t,e,r)},e.prototype.next=function(t){this.isStopped?ta(K("N",t,void 0),this):this._next(t)},e.prototype.error=function(t){this.isStopped?ta(K("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?ta(X,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}(z),tr=Function.prototype.bind;function tn(t,e){return tr.call(t,e)}var ti=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){ts(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){ts(t)}else ts(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){ts(t)}},t}(),to=function(t){function e(e,r,n){var i,o,s=t.call(this)||this;return k(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 ti(i),s}return(0,F.__extends)(e,t),e}(te);function ts(t){1;J(t)}function ta(t,e){}var tu={closed:!0,next:Q,error:function(t){throw t},complete:Q},tc="function"==typeof Symbol&&Symbol.observable||"@@observable";function tl(t){return t}function th(t){return 0===t.length?tl:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}var tf=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 te||t&&
2k(t.next)&&k(t.error)&&k(t.complete)&&H(t)}(t)?new to(t,e,r):t;return tt(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=tp(e))(function(e,n){var i=new to({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[tc]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return th(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=tp(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 tp(t){var e;return null!=(e=null!=t?t:Y)?e:Promise}var td=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function ty(t){return k(null==t?void 0:t.then)}function tg(t){return Symbol.asyncIterator&&k(null==t?void 0:t[Symbol.asyncIterator])}function tm(t){return TypeError("You provided "+(null!==t&&"object"==typeof t?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var tv="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function tb(t){return k(null==t?void 0:t[tv])}function tw(t){return(0,F.__asyncGenerator)(this,arguments,function(){var e,r,n;return(0,F.__generator)(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,(0,F.__await)(e.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,(0,F.__await)(void 0)];case 4:return[2,i.sent()];case 5:return[4,(0,F.__await)(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 tE(t){return k(null==t?void 0:t.getReader)}function tC(t){if(t instanceof tf)return t;if(null!=t){var e,r,n,i;if(k(t[tc])){return e=t,new tf(function(t){var r=e[tc]();if(k(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(td(t)){return r=t,new tf(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}if(ty(t)){return n=t,new tf(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,J)})}if(tg(t))return t_(t);if(tb(t)){return i=t,new tf(function(t){var e,r;try{for(var n=(0,F.__values)(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(tE(t))return t_(tw(t))}throw tm(t)}function t_(t){return new tf(function(e){(function(t,e){var r,n,i,o;return(0,F.__awaiter)(this,void 0,void 0,function(){var s;return(0,F.__generator)(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=(0,F.__asyncValues)(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]}})})})(t,e).catch(function(t){return e.error(t)})})}function tx(t){return new tf(function(e){tC(t()).subscribe(e)})}function tR(t){return t[t.length-1]}function tA(t){var e;return(e=tR(t))&&k(e.schedule)?t.pop():void 0}function tI(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 tq(t){return function(e){if(k(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 tO(t,e,r,n,i){return new tT(t,e,r,n,i)}var tT=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(0,F.__extends)(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}(te);function t$(t,e){return void 0===e&&(e=0),tq(function(r,n){r.subscribe(tO(n,function(r){return tI(n,t,function(){return n.next(r)},e)},function(){return tI(n,t,function(){return n.complete()},e)},function(r){return tI(n,t,function(){return n.error(r)},e)}))})}function tS(t,e){return void 0===e&&(e=0),tq(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}function tj(t,e){if(!t)throw Error("Iterable cannot be null");return new tf(function(r){tI(r,e,function(){var n=t[Symbol.asyncIterator]();tI(r,e,function(){n.next().then(function(t){t.done?r.complete():r.next(t.value)})},0,!0)})})}function tP(t,e){return e?function(t,e){if(null!=t){if(k(t[tc]))return tC(t).pipe(tS(e),t$(e));if(td(t))return new tf(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})});if(ty(t))return tC(t).pipe(tS(e),t$(e));if(tg(t))return tj(t,e);if(tb(t))return new tf(function(r){var n;return tI(r,e,function(){n=t[tv](),tI(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 k(null==n?void 0:n.return)&&n.return()}});if(tE(t))return tj(tw(t),e)}throw tm(t)}(t,e):tC(t)}function tU(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=tA(t);return tP(t,r)}function tM(t,e){return tq(function(r,n){var i=0;r.subscribe(tO(n,function(r){n.next(t.call(e,r,i++))}))})}function tB(t,e,r){return(void 0===r&&(r=1/0),k(e))?tB(function(r,n){return tM(function(t,i){return e(r,t,n,i)})(tC(t(r,n)))},r):("number"==typeof e&&(r=e),tq(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;tC(t(e,a++)).subscribe(tO(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(tO(n,l,function(){u=!0,c()})),function(){}}))}var tF=D(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function tk(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 tF)}})})}var tD=D(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),tL=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(0,F.__extends)(e,t),e.prototype.lift=function(t){var e=new tN(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new tD},e.prototype.next=function(t){var e=this;tt(function(){var r,n;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=(0,F.__values)(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;tt(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;tt(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?V:(this.currentObservers=null,i.push(t),new z(function(){e.currentObservers=null,N(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 tf;return t.source=this,t},e.create=function(t,e){return new tN(t,e)},e}(tf),tN=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return(0,F.__extends)(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:V},e}(tL),tz={now:function(){return(tz.delegate||Date).now()},delegate:void 0},tV=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=tz);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(0,F.__extends)(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}(tL);function tH(t){void 0===t&&(t={});var e=t.connector,r=void 0===e?function(){return new tL}: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 tq(function(t,d){a++,l||c||h();var y=o=null!=o?o:r();d.add(function(){0!=--a||l||c||(n=tW(p,u))}),y.subscribe(d),!e&&a>0&&(e=new to({next:function(t){return y.next(t)},error:function(t){l=!0,h(),n=tW(f,i,t),y.error(t)},complete:function(){c=!0,h(),n=tW(f,s),y.complete()}}),tC(t).subscribe(e))})(t)}}function tW(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 to({next:function(){i.unsubscribe(),t()}});return tC(e.apply(void 0,(0,F.__spreadArray)([],(0,F.__read)(r)))).subscribe(i)}}function tY(t){return tq(function(e,r){var n,i=null,o=!1;i=e.subscribe(tO(r,void 0,void 0,function(s){n=tC(t(s,tY(t)(e))),i?(i.unsubscribe(),i=null,n.subscribe(r)):o=!0})),o&&(i.unsubscribe(),i=null,n.subscribe(r))})}function tG(t){return void 0===t&&(t=1/0),tB(tl,t)}function tJ(t,e){var r=k(t)?t:function(){return t},n=function(t){return t.error(r())};return new tf(e?function(t){return e.schedule(n,0,t)}:n)}var tQ=function(t){function e(e,r){return t.call(this)||this}return(0,F.__extends)(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(z),tX={setInterval:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=tX.delegate;return(null==i?void 0:i.setInterval)?i.setInterval.apply(i,(0,F.__spreadArray)([t,e],(0,F.__read)(r))):setInterval.apply(void 0,(0,F.__spreadArray)([t,e],(0,F.__read)(r)))},clearInterval:function(t){var e=tX.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},tK=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(0,F.__extends)(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),tX.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&&tX.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,N(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(tQ),tZ=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=tz.now,t}(),t0=new(function(t){function e(e,r){void 0===r&&(r=tZ.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return(0,F.__extends)(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}(tZ))(tK);function t1(t){return tq(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})}var t2=new tf(function(t){return t.complete()});function t3(t,e){var r="object"==typeof e;return new Promise(function(n,i){var o=new to({next:function(t){n(t),o.unsubscribe()},error:i,complete:function(){r?n(e.defaultValue):i(new tF)}});t.subscribe(o)})}var t6=t.i(797654),t5=Array.isArray,t8=Array.isArray;function t4(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=k(tR(t))?t.pop():void 0;return r?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return th(t)}(t4.apply(void 0,(0,F.__spreadArray)([],(0,F.__read)(t))),tM(function(t){return t5(t)?r.apply(void 0,(0,F.__spreadArray)([],(0,F.__read)(t))):r(t)})):tq(function(e,r){var n,i;(n=(0,F.__spreadArray)([e],(0,F.__read)(1===t.length&&t8(t[0])?t[0]:t)),void 0===i&&(i=tl),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=tP(n[e],void 0),u=!1;a.subscribe(tO(t,function(n){r[e]=n,!u&&(u=!0,s--),s||t.next(i(r.slice()))},function(){--o||t.complete()}))},c=t,a?tI(c,a,u):u()},u=0;u<e;u++)a(u)},o=t,e?tI(o,e,r):r()})(r)})}function t9(t,e){return tq(function(r,n){var i=0;r.subscribe(tO(n,function(r){return t.call(e,r,i++)&&n.next(r)}))})}let t7="drafts.",et="versions.";function ee(t){return t.startsWith(t7)}function er(t){return t.startsWith(et)}function en(t){return er(t)?t7+es(t):ee(t)?t:t7+t}function ei(t,e){if("drafts"===e||"published"===e)throw Error('Version can not be "published" or "drafts"');return`${et}${e}.${es(t)}`}function eo(t){if(!er(t))return;let[e,r,...n]=t.split(".");return r}function es(t){return er(t)?t.split(".").slice(2).join("."):ee(t)?t.slice(t7.length):t}let ea=t=>crypto.getRandomValues(new Uint8Array(t)),eu=/\r\n|[\n\r\u2028\u2029]/;function ec(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 el extends Error{response;statusCode=400;responseBody;details;constructor(t,e){const r=ef(t,e);super(r.message),Object.assign(this,r)}}class eh extends Error{response;statusCode=500;responseBody;details;constructor(t){const e=ef(t);super(e.message),Object.assign(this,e)}}function ef(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),message:"",details:void 0};if(!(0,t6.isRecord)(o))return s.message=ey(t,o),s;let a=o.error;if("string"==typeof a&&"string"==typeof o.message)return s.message=`${a} - ${o.message}`,s;if("object"!=typeof a||null===a)return"string"==typeof a?s.message=a:"string"==typeof o.message?s.message=o.message:s.message=ey(t,o),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}${r}`,s.details=o.error,s}return ep(a)?(s.message=ed(a,e?.options?.query?.tag),s.details=o.error):"description"in a&&"string"==typeof a.description?(s.message=a.description,s.details=a):s.message=ey(t,o),s}function ep(t){return(0,t6.isRecord)(t)&&"queryParseError"===t.type&&"string"==typeof t.query&&"number"==typeof t.start&&"number"==typeof t.end}function ed(t,e){let{query:r,start:n,end:i,description:o}=t;if(!r||typeof n>"u")return`GROQ query parse error: ${o}`;let s=e?`
6
7Tag: ${e}`:"";return`GROQ query parse error:
8${function(t,e,r){let n=t.split(eu),{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:ec(e.start,n),end:e.end?ec(e.end,n):void 0},n),a=`${o}`.length;return t.split(eu,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=`
9 `+o.replace(/\d/g," ")+" "+e+"^".repeat(n),c&&r&&(l+=" "+r)}return">"+o+(t.length>0?` ${t}`:"")+l}).join(`
10`)}(r,{start:n,end:i},o)}${s}`}function ey(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}`}class eg extends Error{projectId;addOriginUrl;constructor({projectId:t}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=t;const e=new URL(`https://sanity.io/manage/project/${t}/api`);if("u">typeof location){const{origin:t}=location;e.searchParams.set("cors","add"),e.searchParams.set("origin",t),this.addOriginUrl=e,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${e}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${e}`}}let em={onResponse:(t,e)=>{if(t.statusCode>=500)throw new eh(t);if(t.statusCode>=400)throw new el(t,e);return t}};function ev(t,e={}){return((t=[],e=w)=>(function t(e,r){let n=[],i=f.reduce((t,e)=>(t[e]=t[e]||[],t),{processOptions:[a],validateOptions:[l]});function o(t){let e,n=h.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},{}),o=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},s=o("processOptions",t);o("validateOptions",s);let a={options:s,channels:n,applyMiddleware:o},u=n.request.subscribe(t=>{e=r(t,(e,r)=>((t,e,r)=>{let i=t,s=e;if(!i)try{s=o("onResponse",e,r)}catch(t){s=null,i=t}(i=i&&o("onError",i,r))?n.error.publish(i):s&&n.response.publish(s)})(e,r,t))});n.abort.subscribe(()=>{u(),e&&e.abort()});let c=o("onReturn",n,a);return c===n&&n.request.publish(a),c}return o.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");return f.forEach(e=>{t[e]&&i[e].push(t[e])}),n.push(t),o},o.clone=()=>t(n,r),e.forEach(o.use),o})(t,e))([B({shouldRetry:eb}),...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||q(e)||-1===T.indexOf(typeof e)&&!Array.isArray(e)&&!function(t){if(!1===O(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!1!==O(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"))}},em,function(t={}){let e=t.implementation||$.Observable;if(!e)throw Error("`Observable` is not available in global scope, and n
10o 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:tf})])}function eb(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||B.shouldRetry(t,e,r)}function ew(t){return"https://www.sanity.io/help/"+t}let eE=["image","file"],eC=["before","after","replace"],e_=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")},ex=(t,e)=>{if(null===e||"object"!=typeof e||Array.isArray(e))throw Error(`${t}() takes an object of properties`)},eR=(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`)},eA=(t,e)=>{if(!e._id)throw Error(`${t}() requires that the document contains an ID ("_id" property)`);eR(t,e._id)},eI=(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`)},eq=t=>{if(!t.dataset)throw Error("`dataset` must be provided to perform queries");return t.dataset||""},eO=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},eT=t=>{if(!t["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:e,id:r}=t["~experimental_resource"];switch(e){case"dataset":if(2!==r.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: ${e.toString()}`)}},e$=(t,e)=>{if(e["~experimental_resource"])throw Error(`\`${t}\` does not support resource-based operations`)},eS=t=>{var e;let r,n;return e=(...e)=>console.warn(t.join(" "),...e),r=!1,(...t)=>(r||(n=e(...t),r=!0),n)},ej=eS(["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"]),eP=eS(["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."]),eU=eS(["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."]),eM=eS(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),eB=eS(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${ew("js-client-browser-token")} for more information and how to hide this warning.`]),eF=eS(["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`."]),ek=eS(["Using the Sanity client without specifying an API version is deprecated.",`See ${ew("js-client-api-version")}`]),eD=(eS(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),eS(["You have called `createVersion()` with a defined `document`. The recommended approach is to provide a `baseId` and `releaseId` instead."])),eL={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}},eN=["localhost","127.0.0.1","0.0.0.0"];function ez(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 eV=(t,e)=>{let r,n={...e,...t,stega:{..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||eL.stega,..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||{}}};n.apiVersion||ek();let i={...eL,...n},o=i.useProjectHostname&&!i["~experimental_resource"];if(typeof Promise>"u"){let t=ew("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${t}`)}if(o&&!i.projectId)throw Error("Configuration must contain `projectId`");if(i["~experimental_resource"]&&eT(i),"u">typeof i.perspective&&ez(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'?");
10if("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 s="u">typeof window&&window.location&&window.location.hostname,a=s&&(r=window.location.hostname,-1!==eN.indexOf(r)),u=!!i.token;i.withCredentials&&u&&(eF(),i.withCredentials=!1),s&&a&&u&&!0!==i.ignoreBrowserTokenWarning?eB():typeof i.useCdn>"u"&&eP(),o&&(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&&e_(i.dataset),"requestTagPrefix"in i&&(i.requestTagPrefix=i.requestTagPrefix?eO(i.requestTagPrefix).replace(/\.+$/,""):void 0),i.apiVersion=`${i.apiVersion}`.replace(/^v/,""),i.isDefaultApi=i.apiHost===eL.apiHost,!0===i.useCdn&&i.withCredentials&&ej(),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 c=i.apiHost.split("://",2),l=c[0],h=c[1],f=i.isDefaultApi?"apicdn.sanity.io":h;return o?(i.url=`${l}://${i.projectId}.${h}/v${i.apiVersion}`,i.cdnUrl=`${l}://${i.projectId}.${f}/v${i.apiVersion}
10`):(i.url=`${i.apiHost}/v${i.apiVersion}`,i.cdnUrl=i.url),i};class eH extends Error{name="ConnectionFailedError"}class eW extends Error{name="DisconnectError";reason;constructor(t,e,r={}){super(t,r),this.reason=e}}class eY extends Error{name="ChannelError";data;constructor(t,e){super(t),this.data=e}}class eG extends Error{name="MessageError";data;constructor(t,e,r={}){super(t,r),this.data=e}}class eJ extends Error{name="MessageParseError"}let eQ=["channelError","disconnect"];function eX(t,e){return tx(()=>{let e=t();return e&&(e instanceof tf||k(e.lift)&&k(e.subscribe))?e:tU(e)}).pipe(tB(t=>{var r,n;return r=t,n=e,new tf(t=>{let e=n.includes("open"),i=n.includes("reconnect");function o(e){if("data"in e){let[r,n]=eK(e);t.error(r?new eJ("Unable to parse EventSource error message",{cause:n}):new eG((n?.data).message,n));return}r.readyState===r.CLOSED?t.error(new eH("EventSource connection failed")):i&&t.next({type:"reconnect"})}function s(){t.next({type:"open"})}function a(e){let[n,i]=eK(e);if(n)return void t.error(new eJ("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 eY((o=i?.data,s=n,(e=o.error)?ep(e)?ed(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 eW(`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([...eQ,...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 eK(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 eZ(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(`
11`);throw Error(`Unknown selection - must be one of:
12
13${e}`)}class e0{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 ex("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===eC.indexOf(t)){let t=eC.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{...eZ(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(t,e,r=!0){return ex(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 e1 extends e0{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new e1(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 e2 extends e0{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new e2(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 e3={returnDocuments:!1};class e6{operations;trxId;constructor(t=[],e){this.operations=t,this.trxId=e}create(t){return ex("create",t),this._add({create:t})}createIfNotExists(t){let e="createIfNotExists";return ex(e,t),eA(e,t),this._add({[e]:t})}createOrReplace(t){let e="createOrReplace";return ex(e,t),eA(e,t),this._add({[e]:t})}delete(t){return eR("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 e5 extends e6{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new e5([...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},e3,t||{}))}patch(t,e){let r="function"==typeof e,n="string"!=typeof t&&t instanceof e2,i="object"==typeof t&&("query"in t||"id"in t);if(n)return this._add({patch:t.serialize()});if(r){let r=e(new e2(t,{},this.#a));if(!(r instanceof e2))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new e2(t,e||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}class e8 extends e6{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new e8([...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},e3,t||{}))}patch(t,e){let r="function"==typeof e;if("string"!=typeof t&&t instanceof e1)return this._add({patch:t.serialize()});if(r){let r=e(new e1(t,{},this.#a));if(!(r instanceof e1))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}let e4=({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
13se"),`?${n}`},e9=t=>"response"===t.type,e7=t=>t.body;function rt(e,r,n,i,o={},s={}){let a="stega"in s?{...n||{},..."boolean"==typeof s.stega?{enabled:s.stega}:s.stega||{}}:n,u=a.enabled?(0,t6.stegaClean)(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=rd(e,r,"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 t4.apply(void 0,(0,F.__spreadArray)([],(0,F.__read)(t)))}(tP(t.A(822966).then(function(t){return t.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:t})=>t))),tM(([t,e])=>{let r=e(t.result,t.resultSourceMap,a);return c({...t,result:r})})):p.pipe(tM(c))}function re(t,e,r,n={}){let i={uri:rw(t,"doc",(()=>{if(!n.releaseId)return r;let t=eo(r);if(!t){if(ee(r))throw Error(`The document ID (\`${r}\`) is a draft, but \`options.releaseId\` is set as \`${n.releaseId}\``);return ei(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 rv(t,e,i).pipe(t9(e9),tM(t=>{let e=t.body.documents;return e?n.includeAllVersions?e:e[0]:n.includeAllVersions?[]:void 0}))}function rr(t,e,r,n={}){let i={uri:rw(t,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return rv(t,e,i).pipe(t9(e9),tM(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 rn(t,e,r,n={}){return rd(t,e,"query",{query:"*[sanity::partOfRelease($releaseId)]",params:{releaseId:r}},n)}function ri(t,e,r,n){return eA("createIfNotExists",r),ry(t,e,r,"createIfNotExists",n)}function ro(t,e,r,n){return eA("createOrReplace",r),ry(t,e,r,"createOrReplace",n)}function rs(t,e,r,n,i){return eA("createVersion",r),eI("createVersion",r),eD(),rp(t,e,{actionType:"sanity.action.document.version.create",publishedId:n,document:r},i)}function ra(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 eR("createVersion",n),eR("createVersion",r),rp(t,e,{actionType:"sanity.action.document.version.create",publishedId:r,baseId:n,versionId:i?ei(r,i):en(r),ifBaseRevisionId:o},s)}function ru(t,e,r,n){return rd(t,e,"mutate",{mutations:[{delete:eZ(r)}]},n)}function rc(t,e,r,n=!1,i){return rp(t,e,{actionType:"sanity.action.document.version.discard",versionId:r,purge:n},i)}function rl(t,e,r,n){return eA("replaceVersion",r),eI("replaceVersion",r),rp(t,e,{actionType:"sanity.action.document.version.replace",document:r},n)}function rh(t,e,r,n,i){return rp(t,e,{actionType:"sanity.action.document.version.unpublish",versionId:r,publishedId:n},i)}function rf(t,e,r,n){let i;return rd(t,e,"mutate",{mutations:Array.isArray(i=r instanceof e2||r instanceof e1?{patch:r.serialize()}:r instanceof e5||r instanceof e8?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function rp(t,e,r,n){let i=Array.isArray(r)?r:[r],o=n&&n.transactionId||void 0;return rd(t,e,"actions",{actions:i,transactionId:o,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function rd(t,e,r,n,i={}){let o="mutate"===r,s="actions"===r,a=o||s?"":e4(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,v={method:u?"GET":"POST",uri:rw(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 rv(t,e,v).pipe(t9(e9),tM(e7),tM(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=>
13t.id);return{transactionId:t.transactionId,results:e,[l?"documentId":"documentIds"]:r}}))}function ry(t,e,r,n,i={}){return rd(t,e,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let rg=t=>void 0!==t.config().dataset&&void 0!==t.config().projectId||void 0!==t.config()["~experimental_resource"],rm=(t,e)=>rg(t)&&e.startsWith(rw(t,"query"));function rv(t,e,r){var n;let i=r.url||r.uri,o=t.config(),s=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(i.startsWith("/data/")||rm(t,i)||rg(t)&&i.startsWith(rw(t,"mutate"))||rg(t)&&i.startsWith(rw(t,"doc",""))||rg(t)&&i.startsWith(rw(t,"listen"))||rg(t)&&i.startsWith(rw(t,"history",""))):r.canUseCdn,a=(r.useCdn??o.useCdn)&&s,u=r.tag&&o.requestTagPrefix?[o.requestTagPrefix,r.tag].join("."):r.tag||o.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:eO(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&rm(t,i)){let t=r.resultSourceMap??o.resultSourceMap;void 0!==t&&!1!==t&&(r.query={resultSourceMap:t,...r.query});let e=r.perspective||o.perspective;"u">typeof e&&("previewDrafts"===e&&eM(),ez(e),r.query={perspective:Array.isArray(e)?e.join(","):e,...r.query},(Array.isArray(e)&&e.length>0||"previewDrafts"===e||"drafts"===e)&&a&&(a=!1,eU())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),a&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(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})}(o,Object.assign({},r,{url:rE(t,i,a)})),l=new tf(t=>e(c,o.requester).subscribe(t));return r.signal?l.pipe((n=r.signal,t=>new tf(e=>{let r=()=>e.error(function(t){if(rC)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()}}))):l}function rb(t,e,r){return rv(t,e,r).pipe(t9(t=>"response"===t.type),tM(t=>t.body))}function rw(t,e,r){let n=t.config();if(n["~experimental_resource"]){eT(n);let t=r_(n),i=void 0!==r?`${e}/${r}`:e;return`${t}/${i}`.replace(/\/($|\?)/,"$1")}let i=eq(n),o=`/${e}/${i}`;return`/data${void 0!==r?`${o}/${r}`:o}`.replace(/\/($|\?)/,"$1")}function rE(t,e,r=!1){let{url:n,cdnUrl:i}=t.config();return`${r?i:n}/${e.replace(/^\//,"")}`}let rC=!!globalThis.DOMException,r_=t=>{if(!t["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:e,id:r}=t["~experimental_resource"];switch(e){case"dataset":{let t=r.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/${r}`;case"media-library":return`/media-libraries/${r}`;case"dashboard":return`/dashboards/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}};function rx(t,e,r){let n=eq(t.config());return rb(t,e,{method:"POST",uri:`/agent/action/generate/${n}`,body:r})}function rR(t,e,r){let n=eq(t.config());return rb(t,e,{method:"POST",uri:`/agent/action/transform/${n}`,body:r})}function rA(t,e,r){let n=eq(t.config());return rb(t,e,{method:"POST",uri:`/agent/action/translate/${n}`,body:r})}class rI{#a;#u;constructor(t,e){this.#a=t,this.#u=e}generate(t){return rx(this.#a,this.#u,t)}transform(t){return rR(this.#a,this.#u,t)}translate(t){return rA(this.#a,this.#u,t)}}class rq{#a;#u;constructor(t,e){this.#a=t,this.#u=e}generate(t){return tk(rx(this.#a,this.#u,t))}transform(t){return tk(rR(this.#a,this.#u,t))}translate(t){return tk(rA(this.#a,this.#u,t))}prompt(t){var e,r;let n;return tk((e=this.#a,r=this.#u,n=eq(e.config()),rb(e,r,{method:"POST",uri:`/agent/action/prompt/${n}`,body:t})))}patch(t){var e,r;let n;return tk((e=this.#a,r=this.#u,n=eq(e.config()),rb(e,r,{method:"POST",uri:`/agent/action/patch/${n}`,body:t})))}}class rO{#a;#u;constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){return r$(this.#a,this.#u,t,e,r)}}class rT{#a;#u;constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){return tk(r$(this.#a,this.#u,t,e,r).pipe(t9(t=>"response"===t.type),tM(t=>t.body.document)))}}function r$(t,e,r,n,i={}){var o,s;if(-1===eE.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${eE.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={label:h,title:f,description:p,filename:y,meta:a,creditLine:d};return g&&(m.sourceId=g.id,m.sourceName=g.name,m.sourceUrl=g.url),rv(t,e,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(t,e){let r="image"===e?"images":"files";if(t["~experimental_resource"]){let{type:e,id:n}=t["~experimental_resource"];switch(e){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${n}/assets/${r}`;case"media-library":return`/media-libraries/${n}/upload`;case"dashboard":return`/dashboards/${n}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let n=eq(t);return`assets/${r}/${n}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:m,body:n})}let rS=tx(()=>t.A(440574)).pipe(tM(({default:t})=>t),tH({connector:function(){return new tV(1,e,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:!1}));function rj(){return function(t){return t.pipe(tY((t,e)=>{var r;return t instanceof eH?function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tG(1)(tP(t,tA(t)))}(tU({type:"reconnect"}),(void 0===r&&(r=t0),new tf(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(tB(()=>e))):tJ(()=>t)}))}}let rP=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],rU={includeResult:!0};function rM(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(rU).concat(Object.keys(r)).reduce((t,e)=>(t[e]=typeof r[e]>"u"?rU[e]:r[e],t),{}),tag:u},l=e4({query:t,params:e,options:{tag:u,...rP.reduce((t,e)=>(typeof c[e]>"u"||(t[e]=c[e]),t),{})}}),h=`${n}${rw(this,"listen",l)}`;if(h.length>14800)return tJ(()=>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)),eX(()=>(typeof EventSource>"u"||p.headers?rS:tU(EventSource)).pipe(tM(t=>new t(h,p))),f).pipe(rj(),t9(t=>f.includes(t.type)),tM(t=>({type:t.type,..."data"in t?t.data:{}})))}let rB="2021-03-25";class rF{#a;constructor(t){this.#a=t}events({includeDrafts:t=!1,tag:e}={}){var r,n,i,o;e$("live",this.#a.config());let{projectId:s,apiVersion:a,token:u,withCredentials:c,requestTagPrefix:l,headers:h}=this.#a.config(),f=a.replace(/^v/,"");if("X"!==f&&f<rB)throw Error(`The live events API requires API version ${rB} or later. The current API version is ${f}. Please update your API version to use this feature.`);if(t&&!u&&!c)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let p=rw(this.#a,"live/events"),d=new URL(this.#a.getUrl(p,!1)),y=e&&l?[l,e].join("."):e;y&&d.searchParams.set("tag",y),t&&d.searchParams.set("includeDrafts","true");let g={};t&&c&&(g.withCredentials=!0),(t&&u||h)&&(g.headers={},t&&u&&(g.headers.Authorization=`Bearer ${u}`),h&&Object.assign(g.headers,h));let m=`${d.href}::${JSON.stringify(g)}`,v=rk.get(m);
13if(v)return v;let b=eX(()=>(typeof EventSource>"u"||g.headers?rS:tU(EventSource)).pipe(tM(t=>new t(d.href,g))),["message","restart","welcome","reconnect","goaway"]),w=(n=d,i={method:"OPTIONS",mode:"cors",credentials:g.withCredentials?"include":"omit",headers:g.headers},new tf(t=>{let e=new AbortController,r=e.signal;return fetch(n,{...i,signal:e.signal}).then(e=>{t.next(e),t.complete()},e=>{r.aborted||t.error(e)}),()=>e.abort()})).pipe(tY(()=>{throw new eg({projectId:s})})),E=b.pipe(rj(),tB(t=>"reconnect"===t.type?w.pipe(tB(()=>tU(t))):tU(t)),tY(t=>w.pipe(tB(()=>{throw t}))),tM(t=>{if("message"===t.type){let{data:e,...r}=t;return{...r,tags:e.tags}}return t})).pipe(t1(()=>rk.delete(m)),(o="function"==typeof(r={predicate:t=>"welcome"===t.type})?{predicate:r,...void 0}:r,t=>{var e,r;let n,i=!1,{predicate:s,...a}=o;return function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=tA(e),i=(t=1/0,"number"==typeof tR(e)?e.pop():t);return e.length?1===e.length?tC(e[0]):tG(i)(tP(e,n)):t2}(t.pipe((r=k(e=t=>{o.predicate(t)&&(i=!0,n=t)})?{next:e,error:void 0,complete:void 0}:e)?tq(function(t,e){null==(n=r.subscribe)||n.call(r);var n,i=!0;t.subscribe(tO(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)}))}):tl,t1(()=>{i=!1,n=void 0}),tH(a)),new tf(t=>{i&&t.next(n),t.complete()}))}));return rk.set(m,E),E}}let rk=new Map;class rD{#a;#u;constructor(t,e){this.#a=t,this.#u=e}create(t,e){return rN(this.#a,this.#u,"PUT",t,e)}edit(t,e){return rN(this.#a,this.#u,"PATCH",t,e)}delete(t){return rN(this.#a,this.#u,"DELETE",t)}list(){e$("dataset",this.#a.config());let t=this.#a.config(),e=t.projectId,r="/datasets";return!1===t.useProjectHostname&&(r=`/projects/${e}/datasets`),rb(this.#a,this.#u,{uri:r,tag:null})}}class rL{#a;#u;constructor(t,e){this.#a=t,this.#u=e}create(t,e){return e$("dataset",this.#a.config()),tk(rN(this.#a,this.#u,"PUT",t,e))}edit(t,e){return e$("dataset",this.#a.config()),tk(rN(this.#a,this.#u,"PATCH",t,e))}delete(t){return e$("dataset",this.#a.config()),tk(rN(this.#a,this.#u,"DELETE",t))}list(){e$("dataset",this.#a.config());let t=this.#a.config(),e=t.projectId,r="/datasets";return!1===t.useProjectHostname&&(r=`/projects/${e}/datasets`),tk(rb(this.#a,this.#u,{uri:r,tag:null}))}}function rN(t,e,r,n,i){return e$("dataset",t.config()),e_(n),rb(t,e,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class rz{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getPlaybackInfo(t,e={}){var r,n;let i=this.#a.config()["~experimental_resource"]?.id,{instanceId:o,libraryId:s}=function(t){let e="object"==typeof t&&"_ref"in t?t._ref:t,r=rH.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),a=s||i;if(!a)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 u=(r=o,n=a,`/media-libraries/${n}/video/${r}/playback-info`),c=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 rb(this.#a,this.#u,{method:"GET",uri:u,query:c})}}class rV{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getPlaybackInfo(t,e={}){return tk(new rz(this.#a.observable,this.#u).getPlaybackInfo(t,e))}}let rH=/^media-library:(ml[^:]+):([^:]+)$/;class rW{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){let e={};return t?.includeMembers===!1&&(e.includeMembers="false"),t?.organizationId&&(e.organizationId=t.organizationId),rb(this.#a,this.#u,{uri:"/projects",query:e})}getById(t){return rb(this.#a,this.#u,{uri:`/projects/${t}`})}}class rY{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){let e={};return t?.includeMembers===!1&&(e.includeMembers="false"),t?.organizationId&&(e.organizationId=t.organizationId),tk(rb(this.#a,this.#u,{uri:"/projects",query:e}))}getById(t){return tk(rb(this.#a,this.#u,{uri:`/projects/${t}`}))}}let rG=((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=ea(i),s=0|i;for(;s--;)if((o+=t[r[s]&n]||"").length===e)return o}}})("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",8),rJ=(t,e)=>e?ei(t,e):en(t);function rQ(t,{releaseId:e,publishedId:r,document:n}){if(r&&n._id){let t=rJ(r,e);return((t,e)=>{if(e._id&&e._id!==t)throw Error(`The provided document ID (\`${e._id}
13\`) does not match the generated version ID (\`${t}\`)`)})(t,n),t}if(n._id){let r=ee(n._id),i=er(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=eo(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 rJ(r,e);throw Error(`\`${t}()\` requires either a publishedId or a document with an \`_id\``)}let rX=(t,e)=>{let[r,n,i]=((t,e)=>{if("object"==typeof t&&null!==t&&("releaseId"in t||"metadata"in t)){let{releaseId:r=rG(),metadata:n={}}=t;return[r,n,e]}return[rG(),{},t]})(t,e);return{action:{actionType:"sanity.action.release.create",releaseId:r,metadata:{...n,releaseType:n.releaseType||"undecided"}},options:i}};class rK{#a;#u;constructor(t,e){this.#a=t,this.#u=e}get({releaseId:t},e){return re(this.#a,this.#u,`_.releases.${t}`,e)}create(t,e){let{action:r,options:n}=rX(t,e),{releaseId:i,metadata:o}=r;return rp(this.#a,this.#u,r,n).pipe(tM(t=>({...t,releaseId:i,metadata:o})))}edit({releaseId:t,patch:e},r){return rp(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:t,patch:e},r)}publish({releaseId:t},e){return rp(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:t},e)}archive({releaseId:t},e){return rp(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:t},e)}unarchive({releaseId:t},e){return rp(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:t},e)}schedule({releaseId:t,publishAt:e},r){return rp(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:t,publishAt:e},r)}unschedule({releaseId:t},e){return rp(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:t},e)}delete({releaseId:t},e){return rp(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:t},e)}fetchDocuments({releaseId:t},e){return rn(this.#a,this.#u,t,e)}}class rZ{#a;#u;constructor(t,e){this.#a=t,this.#u=e}get({releaseId:t},e){return tk(re(this.#a,this.#u,`_.releases.${t}`,e))}async create(t,e){let{action:r,options:n}=rX(t,e),{releaseId:i,metadata:o}=r;return{...await tk(rp(this.#a,this.#u,r,n)),releaseId:i,metadata:o}}edit({releaseId:t,patch:e},r){return tk(rp(this.#a,this.#u,{actionType:"sanity.action.release.edit",releaseId:t,patch:e},r))}publish({releaseId:t},e){return tk(rp(this.#a,this.#u,{actionType:"sanity.action.release.publish",releaseId:t},e))}archive({releaseId:t},e){return tk(rp(this.#a,this.#u,{actionType:"sanity.action.release.archive",releaseId:t},e))}unarchive({releaseId:t},e){return tk(rp(this.#a,this.#u,{actionType:"sanity.action.release.unarchive",releaseId:t},e))}schedule({releaseId:t,publishAt:e},r){return tk(rp(this.#a,this.#u,{actionType:"sanity.action.release.schedule",releaseId:t,publishAt:e},r))}unschedule({releaseId:t},e){return tk(rp(this.#a,this.#u,{actionType:"sanity.action.release.unschedule",releaseId:t},e))}delete({releaseId:t},e){return tk(rp(this.#a,this.#u,{actionType:"sanity.action.release.delete",releaseId:t},e))}fetchDocuments({releaseId:t},e){return tk(rn(this.#a,this.#u,t,e))}}class r0{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getById(t){return rb(this.#a,this.#u,{uri:`/users/${t}`})}}class r1{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getById(t){return tk(rb(this.#a,this.#u,{uri:`/users/${t}`}))}}class r2{assets;datasets;live;mediaLibrary;projects;users;agent;releases;#c;#u;listen=rM;constructor(t,e=eL){this.config(e),this.#u=t,this.assets=new rO(this,this.#u),this.datasets=new rD(this,this.#u),this.live=new rF(this),this.mediaLibrary={video:new rz(this,this.#u)},this.projects=new rW(this,this.#u),this.users=new r0(this,this.#u),this.agent={action:new rI(this,this.#u)},this.releases=new rK(this,this.#u)}clone(){return new r2(this.#u,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=eV(t,this.#c||{}),this}withConfig(t){let e=this.config();return new r2(this.#u,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return rt(this,this.#u,this.#c.stega,t,e,r)}getDocument(t,e){if(e?.includeAllVersions===!0)return re(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 re(this,this.#u,t,r)}getDocuments(t,e){return rr(this,this.#u,t,e)}create(t,e){return ry(this,this.#u,t,"create",e)}createIfNotExists(t,e){return ri(this,this.#u,t,e)}createOrReplace(t,e){return ro(this,this.#u,t,e)}createVersion({document:t,publishedId:e,releaseId:r,baseId:n,ifBaseRevisionId:i},o){if(!t)return ra(this,this.#u,e,n,r,i,o);let s=rQ("createVersion",{document:t,publishedId:e,releaseId:r}),a={...t,_id:s},u=e||es(t._id);return rs(this,this.#u,a,u,o)}delete(t,e){return ru(this,this.#u,t,e)}discardVersion({releaseId:t,publishedId:e},r,n){let i=rJ(e,t);return rc(this,this.#u,i,r,n)}replaceVersion({document:t,publishedId:e,releaseId:r},n){let i=rQ("replaceVersion",{document:t,publishedId:e,releaseId:r}),o={...t,_id:i};return rl(this,this.#u,o,n)}unpublishVersion({releaseId:t,publishedId:e},r){let n=ei(e,t);return rh(this,this.#u,n,e,r)}mutate(t,e){return rf(this,this.#u,t,e)}patch(t,e){return new e1(t,e,this)}transaction(t){return new e8(t,this)}action(t,e){return rp(this,this.#u,t,e)}request(t){return rb(this,this.#u,t)}getUrl(t,e){return rE(this,t,e)}getDataUrl(t,e){return rw(this,t,e)}}class r3{assets;datasets;live;mediaLibrary;projects;users;agent;releases;observable;#c;#u;listen=rM;constructor(t,e=eL){this.config(e),this.#u=t,this.assets=new rT(this,this.#u),this.datasets=new rL(this,this.#u),this.live=new rF(this),this.mediaLibrary={video:new rV(this,this.#u)}
13,this.projects=new rY(this,this.#u),this.users=new r1(this,this.#u),this.agent={action:new rq(this,this.#u)},this.releases=new rZ(this,this.#u),this.observable=new r2(t,e)}clone(){return new r3(this.#u,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=eV(t,this.#c||{}),this}withConfig(t){let e=this.config();return new r3(this.#u,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return tk(rt(this,this.#u,this.#c.stega,t,e,r))}getDocument(t,e){if(e?.includeAllVersions===!0)return tk(re(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 tk(re(this,this.#u,t,r))}getDocuments(t,e){return tk(rr(this,this.#u,t,e))}create(t,e){return tk(ry(this,this.#u,t,"create",e))}createIfNotExists(t,e){return tk(ri(this,this.#u,t,e))}createOrReplace(t,e){return tk(ro(this,this.#u,t,e))}createVersion({document:t,publishedId:e,releaseId:r,baseId:n,ifBaseRevisionId:i},o){if(!t)return t3(ra(this,this.#u,e,n,r,i,o));let s=rQ("createVersion",{document:t,publishedId:e,releaseId:r}),a={...t,_id:s},u=e||es(t._id);return t3(rs(this,this.#u,a,u,o))}delete(t,e){return tk(ru(this,this.#u,t,e))}discardVersion({releaseId:t,publishedId:e},r,n){let i=rJ(e,t);return tk(rc(this,this.#u,i,r,n))}replaceVersion({document:t,publishedId:e,releaseId:r},n){let i=rQ("replaceVersion",{document:t,publishedId:e,releaseId:r}),o={...t,_id:i};return t3(rl(this,this.#u,o,n))}unpublishVersion({releaseId:t,publishedId:e},r){let n=ei(e,t);return tk(rh(this,this.#u,n,e,r))}mutate(t,e){return tk(rf(this,this.#u,t,e))}patch(t,e){return new e2(t,e,this)}transaction(t){return new e5(t,this)}action(t,e){return tk(rp(this,this.#u,t,e))}request(t){return tk(rb(this,this.#u,t))}dataRequest(t,e,r){return tk(rd(this,this.#u,t,e,r))}getUrl(t,e){return rE(this,t,e)}getDataUrl(t,e){return rw(this,t,e)}}let r6={requester:ev(n=[]),createClient:t=>{let e=ev(n,{ignoreWarnings:t.ignoreWarnings});return new r3((r,n)=>(n||e)({maxRedirects:0,maxRetries:t.maxRetries,retryDelay:t.retryDelay,lineage:t.lineage,...r}),t)}},r5=(r6.requester,r6.createClient);var r8=t.i(477846);let r4=r5({projectId:i.default.env.NEXT_PUBLIC_SANITY_PROJECT_ID||"p5e1cxqw",dataset:i.default.env.NEXT_PUBLIC_SANITY_DATASET||"production",apiVersion:"2024-01-01",useCdn:!0}),r9=(0,r8.default)(r4);function r7(t){if(!t)return{url:()=>"/placeholder.jpg"};if("string"==typeof t)return{url:()=>t};if(t.asset&&t.asset.url)return{url:()=>t.asset.url};try{return r9.image(t)}catch(t){return console.error("Error building image URL:",t),{url:()=>"/placeholder.jpg"}}}t.s(["urlFor",()=>r7],924078)}]);

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.