1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21168,(e,t,r)=>{var n={675:function(e,t){"use strict";t.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,i=u(e),s=i[0],a=i[1],c=new o((s+a)*3/4-a),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(function(e,t,n){for(var o,i=[],s=t;s<n;s+=3)o=(e[s]<<16&0xff0000)+(e[s+1]<<8&65280)+(255&e[s+2]),i.push(r[o>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,s,s+16383>a?a:s+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="u">typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s<a;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(e,t,r){"use strict";var n=r(675),o=r(783),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e){var n=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!a.isEncoding(o))throw TypeError("Unknown encoding: "+o);var i=0|p(n,o),u=s(i),c=u.write(n,o);return c!==i&&(u=u.slice(0,c)),u}if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(T(e,ArrayBuffer)||e&&T(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(T(e,SharedArrayBuffer)||e&&T(e.buffer,SharedArrayBuffer)))return function(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return a.from(l,t,r);var d=function(e){if(a.isBuffer(e)){var t=0|h(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(d)return d;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return c(e),s(e<0?0:0|h(e))}function f(e){for(var t=e.length<0?0:0|h(e.length),r=s(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)};function h(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||T(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(o)return n?-1:I(e).length;t=(""+t).toLowerCase(),o=!0}}function d(e,t,r){var o,i,s,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=_[e[i]];return o}(this,t,r);case"utf8":case"utf-8":return v(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}(this,t,r);case"base64":return o=this,i=t,s=r,0===i&&s===o.length?n.fromByteArray(o):n.fromByteArray(o.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,o){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(o)return -1;else r=e.length-1;else if(r<0)if(!o)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(
vendor: 12,881 bytes, line 1
1o)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return b(e,[t],r,n,o)}throw TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var l=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else -1!==l&&(i-=i-l),l=-1}else for(r+u>a&&(r=a-u),i=r;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(e,i+h)!==c(t,h)){f=!1;break}if(f)return i}return -1}a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(T(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),T(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:+(n<r)},a.isEncoding=function(e){switch(String(e).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(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=a.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(T(i,Uint8Array)&&(i=a.from(i)),!a.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?v(this,0,e):d.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,o){if(T(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var i=o-n,s=r-t,u=Math.min(i,s),c=this.slice(n,o),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){i=c[f],s=l[f];break}return i<s?-1:+(s<i)},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)};function v(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:(192&(i=e[o+1]))==128&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],s=e[o+2],(192&i)==128&&(192&s)==128&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],(192&i)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}var h=n,p=h.length;if(p<=4096)return String.fromCharCode.apply(String,h);for(var d="",y=0;y<p;)d+=String.fromCharCode.apply(String,h.slice(y,y+=4096));return d}function m(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,o,i){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function C(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function E(e,t,r,n,i){return t*=1,r>>>=0,i||C(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function x(e,t,r,n,i){return t*=1,r>>>=0,i||C(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=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 o,i,s,a,u,c,l,f,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a,u=parseInt(t.substr(2*s,2),16);if((a=u)!=a)break;e[r+s]=u}return s}(this,e,t,r);case"utf8":case"utf-8":return o=t,i=r,O(I(e,this.length-o),this,o,i);case"ascii":return s=t,a=r,O(R(e),this,s,a);case"latin1":case"binary":return function(e,t,r,n){return O(R(t),e,r,n)}(this,e,t,r);case"base64":return u=t,c=r,O(S(e),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=t,f=r,O(function(e,t){for(var r,n,o=[],i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(e,this.length-l),this,l,f);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(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUInt8=function(e,t){return e>>>=0,t||m(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||m(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||m(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||m(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||m(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||m(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return(e>>>=0,t||m(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||m(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||m(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||m(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||m(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||m(e,4,this.length),o.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||m(e,4,this.length),o.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||m(e,8,this.length),o.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||m(e,8,this.length),o.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;w(this,e,t,r,o,0)}var i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var o=Math.pow(2,8*r)-1;w(this,e,t,r,o,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var o=Math.pow(2,8*r-1);w(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var o=Math.pow(2,8*r-1);w(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,r){return E(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return E(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return x(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return x(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<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),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var i=o-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=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===e.length){var o,i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=a.isBuffer(e)?e:a.from(e,n),u=s.length;
1if(0===u)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%u]}return this};var A=/[^+/0-9A-Za-z-_]/g;function I(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319||s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function R(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function S(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(A,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function T(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var _=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},783:function(e,t){t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=a;l>0;i=256*i+e[t+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=c}return(p?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=5960464477539062e-23*(23===o),p=n?0:i-1,d=n?1:-1,y=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+f>=1?t+=h/u:t+=h*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},s=!0;try{n[e](r,r.exports,i),s=!1}finally{s&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/next/dist/compiled/buffer/",t.exports=i(72)},22997,e=>{"use strict";let t=!(typeof navigator>"u")&&"ReactNative"===navigator.product,r={timeout:t?6e4:12e4},n=function(e){let n={...r,..."string"==typeof e?{url:e}:e};if(n.timeout=function e(t){if(!1===t||0===t)return!1;if(t.connect||t.socket)return t;let n=Number(t);return isNaN(n)?e(r.timeout):{connect:n,socket:n}}(n.timeout),n.query){let{url:e,searchParams:r}=function(e){let r=e.indexOf("?");if(-1===r)return{url:e,searchParams:new URLSearchParams};let n=e.slice(0,r),i=e.slice(r+1);if(!t)return{url:n,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let s=new URLSearchParams;for(let e of i.split("&")){let[t,r]=e.split("=");t&&s.append(o(t),o(r||""))}return{url:n,searchParams:s}}(n.url);for(let[t,o]of Object.entries(n.query)){if(void 0!==o)if(Array.isArray(o))for(let e of o)r.append(t,e);else r.append(t,o);let i=r.toString();i&&(n.url=`${e}?${i}`)}}return n.method=n.body&&!n.method?"POST":(n.method||"GET").toUpperCase(),n};function o(e){return decodeURIComponent(e.replace(/\+/g," "))}let i=/^https?:\/\//i,s=function(e){if(!i.test(e.url))throw Error(`"${e.url}" is not a valid URL`)},a=["request","response","progress","error","abort"],u=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var c,l,f,h,p,d,y=(c=function(){if(d)return p;d=1;var e=function(e){return e.replace(/^\s+|\s+$/g,"")};return p=function(t){if(!t)return{};for(var r=Object.create(null),n=e(t).split("\n"),o=0;o<n.length;o++){var i,s=n[o],a=s.indexOf(":"),u=e(s.slice(0,a)).toLowerCase(),c=e(s.slice(a+1));typeof r[u]>"u"?r[u]=c:(i=r[u],"[object Array]"===Object.prototype.toString.call(i))?r[u].push(c):r[u]=[r[u],c]}return r}}())&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;class g{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#e;#t;#r;#n={};#o;#i={};#s;open(e,t,r){this.#e=e,this.#t=t,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#o=void 0}abort(){this.#o&&this.#o.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(e,t){this.#n[e]=t}setInit(e,t=!0){this.#i=e,this.#s=t}send(e){let t="arraybuffer"!==this.responseType,r={...this.#i,method:this.#e,headers:this.#n,body:e};"function"==typeof AbortController&&this.#s&&(this.#o=new AbortController,"u">typeof EventTarget&&this.#o.signal instanceof EventTarget&&(r.signal=this.#o.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#t,r).then(e=>
1(e.headers.forEach((e,t)=>{this.#r+=`${t}: ${e}\r 2`}),this.status=e.status,this.statusText=e.statusText,this.readyState=3,this.onreadystatechange?.(),t?e.text():e.arrayBuffer())).then(e=>{"string"==typeof e?this.responseText=e:this.response=e,this.readyState=4,this.onreadystatechange?.()}).catch(e=>{"AbortError"!==e.name?this.onerror?.(e):this.onabort?.()})}}let b="function"==typeof XMLHttpRequest?"xhr":"fetch",v="xhr"===b?XMLHttpRequest:g,m=(e,t)=>{let r=e.options,n=e.applyMiddleware("finalizeOptions",r),o={},i=e.applyMiddleware("interceptRequest",void 0,{adapter:b,context:e});if(i){let e=setTimeout(t,0,null,i);return{abort:()=>clearTimeout(e)}}let s=new v;s instanceof g&&"object"==typeof n.fetch&&s.setInit(n.fetch,n.useAbortSignal??!0);let a=n.headers,u=n.timeout,c=!1,l=!1,f=!1;if(s.onerror=e=>{d(s instanceof g?e instanceof Error?e:Error(`Request error while attempting to reach ${n.url}`,{cause:e}):Error(`Request error while attempting to reach is ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},s.ontimeout=e=>{d(Error(`Request timeout while attempting to reach ${n.url}${e.lengthComputable?`(${e.loaded} of ${e.total} bytes transferred)`:""}`))},s.onabort=()=>{p(!0),c=!0},s.onreadystatechange=function(){u&&(p(),o.socket=setTimeout(()=>h("ESOCKETTIMEDOUT"),u.socket)),!c&&s&&4===s.readyState&&0!==s.status&&function(){if(!(c||l||f)){if(0===s.status)return d(Error("Unknown XHR error"));p(),l=!0,t(null,{body:s.response||(""===s.responseType||"text"===s.responseType?s.responseText:""),url:n.url,method:n.method,headers:y(s.getAllResponseHeaders()),statusCode:s.status,statusMessage:s.statusText})}}()},s.open(n.method,n.url,!0),s.withCredentials=!!n.withCredentials,a&&s.setRequestHeader)for(let e in a)a.hasOwnProperty(e)&&s.setRequestHeader(e,a[e]);return n.rawBody&&(s.responseType="arraybuffer"),e.applyMiddleware("onRequest",{options:n,adapter:b,request:s,context:e}),s.send(n.body||null),u&&(o.connect=setTimeout(()=>h("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,s&&s.abort()}};function h(t){f=!0,s.abort();let r=Error("ESOCKETTIMEDOUT"===t?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=t,e.channels.error.publish(r)}function p(e){(e||c||s&&s.readyState>=2&&o.connect)&&clearTimeout(o.connect),o.socket&&clearTimeout(o.socket)}function d(e){if(l)return;p(!0),l=!0,s=null;let r=e||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,t(r)}};var w,C,E,x,A,I=e.i(50461),R=e.i(21168),S={exports:{}};A||(A=1,function(e,t){let r;t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!e&&"u">typeof I.default&&"env"in I.default&&(e=I.default.env.DEBUG),e},t.useColors=function(){let e;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),r=!1,t.destroy=()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#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"],t.log=console.debug||console.log||(()=>{}),e.exports=(x?E:(x=1,E=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(n||r),a.prev=n,a.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";o++;let i=t.formatters[n];if("function"==typeof i){let t=e[o];r=i.call(a,t),e.splice(o,1),o--}return r}),t.formatArgs.call(a,e),(a.log||t.log).apply(a,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){let n=t(this.namespace+(typeof r>"u"?":":r)+e);return n.log=this.log,n}function n(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r):r++,n++;else{if(-1===o)return!1;n=o+1,r=++i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){let e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){for(let r of(t.save(e),t.namespaces=e,t.names=[],t.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(let r of t.skips)if(n(e,r))return!1;for(let r of t.names)if(n(e,r))return!0;return!1},t.humanize=function(){if(C)return w;C=1;function e(e,t,r,n){return Math.round(e/r)+" "+n+(t>=1.5*r?"s":"")}return w=function(t,r){r=r||{};var n,o,i=typeof t;if("string"===i&&t.length>0){var s=t;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"===i&&isFinite(t))return r.long?(o=Math.abs(t))>=864e5?e(t,o,864e5,"day"):o>=36e5?e(t,o,36e5,"hour"):o>=6e4?e(t,o,6e4,"minute"):o>=1e3?e(t,o,1e3,"second"):t+" ms":(n=Math.abs(t))>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}}(),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}))(t);let{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(S,S.exports)),S.exports,Object.prototype.hasOwnProperty;let O=typeof R.Buffer>"u"?()=>!1:e=>R.Buffer.isBuffer(e);function T(e){return"[object Object]"===Object.prototype.toString.call(e)}let _=["boolean","string","number"];var j="u">typeof globalThis?globalThis:"u">typeof window?window:e.g;let q=(e={})=>{let t=e.implementation||Promise;if(!t)throw Error("`Promise` is not available in global scope, and n
2o implementation was passed");return{onReturn:(r,n)=>new t((t,o)=>{let i=n.options.cancelToken;i&&i.promise.then(e=>{r.abort.publish(e),o(e)}),r.error.subscribe(o),r.response.subscribe(r=>{t(e.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(e){o(e)}},0)})}};class ${__CANCEL__=!0;message;constructor(e){this.message=e}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class P{promise;reason;constructor(e){if("function"!=typeof e)throw TypeError("executor must be a function.");let t=null;this.promise=new Promise(e=>{t=e}),e(e=>{this.reason||(this.reason=new $(e),t(this.reason))})}static source=()=>{let e;return{token:new P(t=>{e=t}),cancel:e}}}q.Cancel=$,q.CancelToken=P,q.isCancel=e=>!(!e||!e?.__CANCEL__);var U=(e,t,r)=>("GET"===r.method||"HEAD"===r.method)&&(e.isNetworkError||!1);function B(e){return 100*Math.pow(2,e)+100*Math.random()}let k=(e={})=>{var t;let r,n,o;return r=(t={shouldRetry:U,...e}).maxRetries||5,n=t.retryDelay||B,o=t.shouldRetry,{onError:(e,t)=>{var i;let s=t.options,a=s.maxRetries||r,u=s.retryDelay||n,c=s.shouldRetry||o,l=s.attemptNumber||0;if(null!==(i=s.body)&&"object"==typeof i&&"function"==typeof i.pipe||!c(e,l,s)||l>=a)return e;let f=Object.assign({},t,{options:Object.assign({},s,{attemptNumber:l+1})});return setTimeout(()=>t.channels.request.publish(f),u(l)),null}}};k.shouldRetry=U;var F=function(e,t){return(F=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function M(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}F(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function D(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){var c=[a,u];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function L(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function z(e,t,r){if(r||2==arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function H(e){return this instanceof H?(this.v=e,this):new H(e)}function V(e){return"function"==typeof e}function Y(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var W=Y(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function G(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var J=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,o,i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var s=L(i),a=s.next();!a.done;a=s.next())a.value.remove(this)}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else i.remove(this);var u=this.initialTeardown;
2if(V(u))try{u()}catch(e){o=e instanceof W?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var l=L(c),f=l.next();!f.done;f=l.next()){var h=f.value;try{Q(h)}catch(e){o=null!=o?o:[],e instanceof W?o=z(z([],N(o)),N(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}if(o)throw new W(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Q(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&G(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&G(r,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),X=J.EMPTY;function K(e){return e instanceof J||e&&"closed"in e&&V(e.remove)&&V(e.add)&&V(e.unsubscribe)}function Q(e){V(e)?e():e.unsubscribe()}var Z=void 0,ee={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ee.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,z([e,t],N(r))):setTimeout.apply(void 0,z([e,t],N(r)))},clearTimeout:function(e){var t=ee.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function et(e){ee.setTimeout(function(){!1;throw e})}function er(){}var en=eo("C",void 0,void 0);function eo(e,t,r){return{kind:e,value:t,error:r}}var ei=null;function es(e){var t,r,n,o;1;e()}var ea=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,K(t)&&t.add(r)):r.destination=ed,r}return M(t,e),t.create=function(e,t,r){return new ef(e,t,r)},t.prototype.next=function(e){this.isStopped?ep(eo("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?ep(eo("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?ep(en,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(J),eu=Function.prototype.bind;function ec(e,t){return eu.call(e,t)}var el=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){eh(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){eh(e)}else eh(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){eh(e)}},e}(),ef=function(e){function t(t,r,n){var o,i,s=e.call(this)||this;return V(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:o=t,s.destination=new el(o),s}return M(t,e),t}(ea);function eh(e){1;et(e)}function ep(e,t){}var ed={closed:!0,next:er,error:function(e){throw e},complete:er},ey="function"==typeof Symbol&&Symbol.observable||"@@observable";function eg(e){return e}function eb(e){return 0===e.length?eg:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var ev=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this,o=!function(e){return e&&e instanceof ea||e&&V(e.next)&&V(e.error)&&V(e.complete)&&K(e)}(e)?new ef(e,t,r):e;return es(function(){var e=n.operator,t=n.source;o.add(e?e.call(o,t):t?n._subscribe(o):n._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=em(t))(function(t,n){var o=new ef({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});r.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[ey]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eb(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=em(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function em(e){var t;return null!=(t=null!=e?e:Z)?t:Promise}var ew=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function eC(e){return V(null==e?void 0:e.then)}function eE(e){return Symbol.asyncIterator&&V(null==e?void 0:e[Symbol.asyncIterator])}function ex(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
2d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var eA="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function eI(e){return V(null==e?void 0:e[eA])}function eR(e){return function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||a(e,t)})},t&&(n[e]=t(n[e])))}function a(e,t){try{var r;(r=o[e](t)).value instanceof H?Promise.resolve(r.value.v).then(u,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}(this,arguments,function(){var t,r,n;return D(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,H(t.read())];case 3:if(n=(r=o.sent()).value,!r.done)return[3,5];return[4,H(void 0)];case 4:return[2,o.sent()];case 5:return[4,H(n)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eS(e){return V(null==e?void 0:e.getReader)}function eO(e){if(e instanceof ev)return e;if(null!=e){var t,r,n,o;if(V(e[ey])){return t=e,new ev(function(e){var r=t[ey]();if(V(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(ew(e)){return r=e,new ev(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}if(eC(e)){return n=e,new ev(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,et)})}if(eE(e))return eT(e);if(eI(e)){return o=e,new ev(function(e){var t,r;try{for(var n=L(o),i=n.next();!i.done;i=n.next()){var s=i.value;if(e.next(s),e.closed)return}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}if(eS(e))return eT(eR(e))}throw ex(e)}function eT(e){return new ev(function(t){(function(e,t){var r,n,o,i,s,a,u,c;return s=this,a=void 0,u=void 0,c=function(){var s;return D(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),r=function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=L(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,s,a;i=n,s=o,a=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:a})},s)})}}}(e),a.label=1;case 1:return[4,r.next()];case 2:if((n=a.sent()).done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(n&&!n.done&&(i=r.return)))return[3,8];return[4,i.call(r)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})},new(u||(u=Promise))(function(e,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):((o=t.value)instanceof u?o:new u(function(e){e(o)})).then(r,n)}o((c=c.apply(s,a||[])).next())})})(e,t).catch(function(e){return t.error(e)})})}function e_(e){return new ev(function(t){eO(e()).subscribe(t)})}function ej(e){return e[e.length-1]}function eq(e){var t;return(t=ej(e))&&V(t.schedule)?e.pop():void 0}function e$(e,t,r,n,o){void 0===n&&(n=0),void 0===o&&(o=!1);var i=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(i),!o)return i}function eP(e){return function(t){if(V(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function eU(e,t,r,n,o){return new eB(e,t,r,n,o)}var eB=function(e){function t(t,r,n,o,i,s){var a=e.call(this,t)||this;return a.onFinalize=i,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return M(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(ea);function ek(e,t){return void 0===t&&(t=0),eP(function(r,n){r.subscribe(eU(n,function(r){return e$(n,e,function(){return n.next(r)},t)},function(){return e$(n,e,function(){return n.complete()},t)},function(r){return e$(n,e,function(){return n.error(r)},t)}
2))})}function eF(e,t){return void 0===t&&(t=0),eP(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function eM(e,t){if(!e)throw Error("Iterable cannot be null");return new ev(function(r){e$(r,t,function(){var n=e[Symbol.asyncIterator]();e$(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function eD(e,t){return t?function(e,t){if(null!=e){if(V(e[ey]))return eO(e).pipe(eF(t),ek(t));if(ew(e))return new ev(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(eC(e))return eO(e).pipe(eF(t),ek(t));if(eE(e))return eM(e,t);if(eI(e))return new ev(function(r){var n;return e$(r,t,function(){n=e[eA](),e$(r,t,function(){var e,t,o;try{t=(e=n.next()).value,o=e.done}catch(e){r.error(e);return}o?r.complete():r.next(t)},0,!0)}),function(){return V(null==n?void 0:n.return)&&n.return()}});if(eS(e))return eM(eR(e),t)}throw ex(e)}(e,t):eO(e)}function eL(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=eq(e);return eD(e,r)}function eN(e,t){return eP(function(r,n){var o=0;r.subscribe(eU(n,function(r){n.next(e.call(t,r,o++))}))})}function ez(e,t,r){return(void 0===r&&(r=1/0),V(t))?ez(function(r,n){return eN(function(e,o){return t(r,e,n,o)})(eO(e(r,n)))},r):("number"==typeof t&&(r=t),eP(function(t,n){var o,i,s,a,u,c,l,f;return o=r,i=[],s=0,a=0,u=!1,c=function(){!u||i.length||s||n.complete()},l=function(e){return s<o?f(e):i.push(e)},f=function(t){s++;var r=!1;eO(e(t,a++)).subscribe(eU(n,function(e){n.next(e)},function(){r=!0},void 0,function(){if(r)try{for(s--;i.length&&s<o;)!function(){var e=i.shift();f(e)}();c()}catch(e){n.error(e)}}))},t.subscribe(eU(n,l,function(){u=!0,c()})),function(){}}))}var eH=Y(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function eV(e,t){var r="object"==typeof t;return new Promise(function(n,o){var i,s=!1;e.subscribe({next:function(e){i=e,s=!0},error:o,complete:function(){s?n(i):r?n(t.defaultValue):o(new eH)}})})}var eY=Y(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),eW=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return M(t,e),t.prototype.lift=function(e){var t=new eG(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new eY},t.prototype.next=function(e){var t=this;es(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=L(t.currentObservers),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;es(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;es(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?X:(this.currentObservers=null,o.push(e),new J(function(){t.currentObservers=null,G(o,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new ev;return e.source=this,e},t.create=function(e,t){return new eG(e,t)},t}(ev),eG=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return M(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:X},t}(eW),eJ={now:function(){return(eJ.delegate||Date).now()},delegate:void 0},eX=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=eJ);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=r,o._timestampProvider=n,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,r),o}return M(t,e),t.prototype.next=function(t){var r=this.isStopped,n=this._buffer,o=this._infiniteTimeWindow,i=this._timestampProvider,s=this._windowTime;!r&&(n.push(t),o||n.push(i.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,o=(n?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!n){for(var i=t.now(),s=0,a=1;a<r.length&&r[a]<=i;a+=2)s=a;s&&r.splice(0,s+1)}},t}(eW);function eK(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new eW}:t,n=e.resetOnError,o=void 0===n||n,i=e.resetOnComplete,s=void 0===i||i,a=e.resetOnRefCountZero,u=void 0===a||a;return function(e){var t,n,i,a=0,c=!1,l=!1,f=function(){null==n||n.unsubscribe(),n=void 0},h=function(){f(),t=i=void 0,c=l=!1},p=function(){var e=t;h(),null==e||e.unsubscribe()};return eP(function(e,d){a++,l||c||f();var y=i=null!=i?i:r();
2d.add(function(){0!=--a||l||c||(n=eQ(p,u))}),y.subscribe(d),!t&&a>0&&(t=new ef({next:function(e){return y.next(e)},error:function(e){l=!0,f(),n=eQ(h,o,e),y.error(e)},complete:function(){c=!0,f(),n=eQ(h,s),y.complete()}}),eO(e).subscribe(t))})(e)}}function eQ(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0===t)return void e();if(!1!==t){var o=new ef({next:function(){o.unsubscribe(),e()}});return eO(t.apply(void 0,z([],N(r)))).subscribe(o)}}function eZ(e){return eP(function(t,r){var n,o=null,i=!1;o=t.subscribe(eU(r,void 0,void 0,function(s){n=eO(e(s,eZ(e)(t))),o?(o.unsubscribe(),o=null,n.subscribe(r)):i=!0})),i&&(o.unsubscribe(),o=null,n.subscribe(r))})}function e0(e){return void 0===e&&(e=1/0),ez(eg,e)}function e1(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e0(1)(eD(e,eq(e)))}function e2(e,t){var r=V(e)?e:function(){return e},n=function(e){return e.error(r())};return new ev(t?function(e){return t.schedule(n,0,e)}:n)}var e3=function(e){function t(t,r){return e.call(this)||this}return M(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(J),e6={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=e6.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,z([e,t],N(r))):setInterval.apply(void 0,z([e,t],N(r)))},clearInterval:function(e){var t=e6.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},e5=function(e){function t(t,r){var n=e.call(this,t,r)||this;
2return n.scheduler=t,n.work=r,n.pending=!1,n}return M(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,o=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(o,n,t)),this.pending=!0,this.delay=t,this.id=null!=(r=this.id)?r:this.requestAsyncId(o,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),e6.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&e6.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,G(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(e3),e8=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=eJ.now,e}(),e4=new(function(e){function t(t,r){void 0===r&&(r=e8.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return M(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active)return void r.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift())if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(e8))(e5);function e9(e){return eP(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var e7=new ev(function(e){return e.complete()}),te=e.i(6803),tt=Array.isArray,tr=Array.isArray;function tn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=V(ej(e))?e.pop():void 0;return r?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eb(e)}(tn.apply(void 0,z([],N(e))),eN(function(e){return tr(e)?r.apply(void 0,z([],N(e))):r(e)})):eP(function(t,r){var n,o;(n=z([t],N(1===e.length&&tt(e[0])?e[0]:e)),void 0===o&&(o=eg),function(e){var t,r,i;t=void 0,r=function(){for(var t=n.length,r=Array(t),i=t,s=t,a=function(t){var a,u,c;a=void 0,u=function(){var a=eD(n[t],void 0),u=!1;a.subscribe(eU(e,function(n){r[t]=n,!u&&(u=!0,s--),s||e.next(o(r.slice()))},function(){--i||e.complete()}))},c=e,a?e$(c,a,u):u()},u=0;u<t;u++)a(u)},i=e,t?e$(i,t,r):r()})(r)})}function to(e,t){return eP(function(r,n){var o=0;r.subscribe(eU(n,function(r){return e.call(t,r,o++)&&n.next(r)}))})}class ti extends Error{response;statusCode=400;responseBody;details;constructor(e){const t=ta(e);super(t.message),Object.assign(this,t)}}class ts extends Error{response;statusCode=500;responseBody;details;constructor(e){const t=ta(e);super(t.message),Object.assign(this,t)}}function ta(e){var t,r,n,o;let i,s=e.body,a={response:e,statusCode:e.statusCode,responseBody:(t=s,-1!==(e.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(t,null,2):t),message:"",details:void 0};if(s.error&&s.message)return a.message=`${s.error} - ${s.message}`,a;if(tu(r=s)&&tu(r.error)&&"mutationError"===r.error.type&&"string"==typeof r.error.description||tu(n=s)&&tu(n.error)&&"actionError"===n.error.type&&"string"==typeof n.error.description){let e=s.error.items||[],t=e.slice(0,5).map(e=>e.error?.description).filter(Boolean),r=t.length?`: 3- ${t.join(` 4- `)}`:"";return e.length>5&&(r+=` 5...and ${e.length-5} more`),a.message=`${s.error.description}${r}`,a.details=s.error,a}return s.error&&s.error.description?(a.message=s.error.description,a.details=s.error):a.message=s.error||s.message||(i=(o=e).statusMessage?` ${o.statusMessage}`:"",`${o.method}-request to ${o.url} resulted in HTTP ${o.statusCode}${i}`),a}function tu(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}
5class tc extends Error{projectId;addOriginUrl;constructor({projectId:e}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=e;const t=new URL(`https://sanity.io/manage/project/${e}/api`);if("u">typeof location){const{origin:e}=location;t.searchParams.set("cors","add"),t.searchParams.set("origin",e),this.addOriginUrl=t,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${t}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${t}`}}let tl={onResponse:e=>{if(e.statusCode>=500)throw new ts(e);if(e.statusCode>=400)throw new ti(e);return e}};function tf(e){let t;return((e=[],t=m)=>(function e(t,r){let o=[],i=u.reduce((e,t)=>(e[t]=e[t]||[],e),{processOptions:[n],validateOptions:[s]});function c(e){let t,n="object"==typeof e&&e.callSiteStack?e.callSiteStack:void 0,o=n?void 0:Error(),s=a.reduce((e,t)=>{let r,n;return e[t]=(r=Object.create(null),n=0,{publish:function(e){for(let t in r)r[t](e)},subscribe:function(e){let t=n++;return r[t]=e,function(){delete r[t]}}}),e},{}),u=function(e,t,...r){let n="onError"===e,o=t;for(let t=0;t<i[e].length&&(o=(0,i[e][t])(o,...r),!n||o);t++);return o},c=u("processOptions",e);u("validateOptions",c);let l={options:c,channels:s,applyMiddleware:u},f=s.request.subscribe(e=>{t=r(e,(t,r)=>((e,t,r)=>{let i=e,a=t;if(!i)try{a=u("onResponse",t,r)}catch(e){a=null,i=e}if(i=i&&u("onError",i,r)){if(i instanceof Error){let e=n?.stack||o?.stack;if("string"==typeof e){let t=e.split("\n").slice(n?1:2);t.length>0&&(i.stack+="\n"+t.join("\n"))}}s.error.publish(i)}else a&&s.response.publish(a)})(t,r,e))});s.abort.subscribe(()=>{f(),t&&t.abort()});let h=u("onReturn",s,l);return h===s&&s.request.publish(l),h}return c.use=function(e){if(!e)throw Error("Tried to add middleware that resolved to falsey value");if("function"==typeof e)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(e.onReturn&&i.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return u.forEach(t=>{e[t]&&i[t].push(e[t])}),o.push(e),c},c.clone=()=>e(o,r),t.forEach(c.use),c})(e,t))([k({shouldRetry:th}),...e,(t={},{onResponse:e=>{let r=e.headers["x-sanity-warning"];for(let e of Array.isArray(r)?r:[r])!e||t[e]||(t[e]=!0,console.warn(e));return e}}),{processOptions:e=>{let t=e.body;return!t||"function"==typeof t.pipe||O(t)||-1===_.indexOf(typeof t)&&!Array.isArray(t)&&!function(e){if(!1===T(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==T(r)&&!1!==r.hasOwnProperty("isPrototypeOf")}(t)?e:Object.assign({},e,{body:JSON.stringify(e.body),headers:Object.assign({},e.headers,{"Content-Type":"application/json"})})}},{onResponse:e=>{let t=e.headers["content-type"]||"",r=-1!==t.indexOf("application/json");return e.body&&t&&r?Object.assign({},e,{body:function(e){try{return JSON.parse(e)}catch(e){throw e.message=`Failed to parsed response body as JSON: ${e.message}`,e}}(e.body)}):e},processOptions:e=>Object.assign({},e,{headers:Object.assign({Accept:"application/json"},e.headers)})},{onRequest:e=>{if("xhr"!==e.adapter)return;let t=e.request,r=e.context;function n(e){return t=>{let n=t.lengthComputable?t.loaded/t.total*100:-1;r.channels.progress.publish({stage:e,percent:n,total:t.total,loaded:t.loaded,lengthComputable:t.lengthComputable})}}"upload"in t&&"onprogress"in t.upload&&(t.upload.onprogress=n("upload")),"onprogress"in t&&(t.onprogress=n("download"))}},tl,function(e={}){let t=e.implementation||j.Observable;if(!t)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(e,r)=>new t(t=>(e.error.subscribe(e=>t.error(e)),e.progress.subscribe(e=>t.next(Object.assign({type:"progress"},e))),e.response.subscribe(e=>{t.next(Object.assign({type:"response"},e)),t.complete()}),e.request.publish(r),()=>e.abort.publish()))}}({implementation:ev})])}function th(e,t,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,o=(r.uri||r.url).startsWith("/data/query"),i=e.response&&(429===e.response.statusCode||502===e.response.statusCode||503===e.response.statusCode);return(!!n||!!o)&&!!i||k.shouldRetry(e,t,r)}function tp(e){return"https://www.sanity.io/help/"+e}let td=["image","file"],ty=["before","after","replace"],tg=e=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(e))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},tb=(e,t)=>{if(null===t||"object"!=typeof t||Array.isArray(t))throw Error(`${e}() takes an object of properties`)},tv=(e,t)=>
5{if("string"!=typeof t||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(t)||t.includes(".."))throw Error(`${e}(): "${t}" is not a valid document ID`)},tm=(e,t)=>{if(!t._id)throw Error(`${e}() requires that the document contains an ID ("_id" property)`);tv(e,t._id)},tw=e=>{if(!e.dataset)throw Error("`dataset` must be provided to perform queries");return e.dataset||""},tC=e=>{if("string"!=typeof e||!/^[a-z0-9._-]{1,75}$/i.test(e))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return e},tE=e=>{if(!e["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:t,id:r}=e["~experimental_resource"];switch(t){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: ${t.toString()}`)}},tx=(e,t)=>{if(t["~experimental_resource"])throw Error(`\`${e}\` does not support resource-based operations`)},tA=e=>{var t;let r,n;return t=(...t)=>console.warn(e.join(" "),...t),r=!1,(...e)=>(r||(n=t(...e),r=!0),n)},tI=tA(["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"]),tR=tA(["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."]),tS=tA(["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."]),tO=tA(["The `previewDrafts` perspective has been renamed to `drafts` and will be removed in a future API version"]),tT=tA(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tp("js-client-browser-token")} for more information and how to hide this warning.`]),t_=tA(["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`."]),tj=tA(["Using the Sanity client without specifying an API version is deprecated.",`See ${tp("js-client-api-version")}`]),tq=(tA(["The default export of @sanity/client has been deprecated. Use the named export `createClient` instead."]),{apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,stega:{enabled:!1}}),t$=["localhost","127.0.0.1","0.0.0.0"];function tP(e){if(Array.isArray(e)&&e.length>1&&e.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let tU=(e,t)=>{let r,n={...t,...e,stega:{..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||tq.stega,..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||{}}};n.apiVersion||tj();let o={...tq,...n},i=o.useProjectHostname&&!o["~experimental_resource"];if(typeof Promise>"u"){let e=tp("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${e}`)}if(i&&!o.projectId)throw Error("Configuration must contain `projectId`");if(o["~experimental_resource"]&&tE(o),"u">typeof o.perspective&&tP(o.perspective),"encodeSourceMap"in o)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 o)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");if("boolean"!=typeof o.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${o.stega.enabled}`);if(o.stega.enabled&&void 0===o.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(o.stega.enabled&&"string"!=typeof o.stega.studioUrl&&"function"!=typeof o.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${o.stega.studioUrl}`);let s="u">typeof window&&window.location&&window.location.hostname,a=s&&(r=window.location.hostname,-1!==t$.indexOf(r)),u=!!o.token;o.withCredentials&&u&&(t_(),o.withCredentials=!1),s&&a&&u&&!0!==o.ignoreBrowserTokenWarning?tT():typeof o.useCdn>"u"&&tR(),i&&(e=>{if(!/^[-a-z0-9]+$/i.test(e))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")})(o.projectId),o.dataset&&tg(o.dataset),"requestTagPrefix"in o&&(o.requestTagPrefix=o.requestTagPrefix?tC(o.requestTagPrefix).replace(/\.+$/,""):void 0),o.apiVersion=`${o.apiVersion}
5`.replace(/^v/,""),o.isDefaultApi=o.apiHost===tq.apiHost,!0===o.useCdn&&o.withCredentials&&tI(),o.useCdn=!1!==o.useCdn&&!o.withCredentials,function(e){if("1"===e||"X"===e)return;let t=new Date(e);if(!(/^\d{4}-\d{2}-\d{2}$/.test(e)&&t instanceof Date&&t.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(o.apiVersion);let c=o.apiHost.split("://",2),l=c[0],f=c[1],h=o.isDefaultApi?"apicdn.sanity.io":f;return i?(o.url=`${l}://${o.projectId}.${f}/v${o.apiVersion}`,o.cdnUrl=`${l}://${o.projectId}.${h}/v${o.apiVersion}`):(o.url=`${o.apiHost}/v${o.apiVersion}`,o.cdnUrl=o.url),o};class tB extends Error{name="ConnectionFailedError"}class tk extends Error{name="DisconnectError";reason;constructor(e,t,r={}){super(e,r),this.reason=t}}class tF extends Error{name="ChannelError";data;constructor(e,t){super(e),this.data=t}}class tM extends Error{name="MessageError";data;constructor(e,t,r={}){super(e,r),this.data=t}}class tD extends Error{name="MessageParseError"}let tL=["channelError","disconnect"];function tN(e,t){return e_(()=>{let t=e();return t&&(t instanceof ev||V(t.lift)&&V(t.subscribe))?t:eL(t)}).pipe(ez(e=>{var r,n;return r=e,n=t,new ev(e=>{let t=n.includes("open"),o=n.includes("reconnect");function i(t){if("data"in t){let[r,n]=tz(t);e.error(r?new tD("Unable to parse EventSource error message",{cause:n}):new tM((n?.data).message,n));return}r.readyState===r.CLOSED?e.error(new tB("EventSource connection failed")):o&&e.next({type:"reconnect"})}function s(){e.next({type:"open"})}function a(t){var r;let[n,o]=tz(t);n?e.error(new tD("Unable to parse EventSource message",{cause:n})):"channelError"===t.type?e.error(new tF((r=o?.data).error?r.error.description?r.error.description:"string"==typeof r.error?r.error:JSON.stringify(r.error,null,2):r.message||"Unknown listener error",o.data)):"disconnect"===t.type?e.error(new tk(`Server disconnected client: ${o.data?.reason||"unknown error"}`)):e.next({type:t.type,id:t.lastEventId,...o.data?{data:o.data}:{}})}r.addEventListener("error",i),t&&r.addEventListener("open",s);let u=[...new Set([...tL,...n])].filter(e=>"error"!==e&&"open"!==e&&"reconnect"!==e);return u.forEach(e=>r.addEventListener(e,a)),()=>{r.removeEventListener("error",i),t&&r.removeEventListener("open",s),u.forEach(e=>r.removeEventListener(e,a)),r.close()}})}))}function tz(e){try{let t="string"==typeof e.data&&JSON.parse(e.data);return[null,{type:e.type,id:e.lastEventId,...!function(e){for(let t in e)return!1;return!0}(t)?{data:t}:{}}]}catch(e){return[e,null]}}function tH(e){if("string"==typeof e)return{id:e};if(Array.isArray(e))return{query:"*[_id in $ids]",params:{ids:e}};if("object"==typeof e&&null!==e&&"query"in e&&"string"==typeof e.query)return"params"in e&&"object"==typeof e.params&&null!==e.params?{query:e.query,params:e.params}:{query:e.query};let t=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(` 6`);throw Error(`Unknown selection - must be one of: 7 8${t}`)}class tV{selection;operations;constructor(e,t={}){this.selection=e,this.operations=t}set(e){return this._assign("set",e)}setIfMissing(e){return this._assign("setIfMissing",e)}diffMatchPatch(e){return tb("diffMatchPatch",e),this._assign("diffMatchPatch",e)}unset(e){if(!Array.isArray(e))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:e}),this}inc(e){return this._assign("inc",e)}dec(e){return this._assign("dec",e)}insert(e,t,r){return((e,t,r)=>{let n="insert(at, selector, items)";if(-1===ty.indexOf(e)){let e=ty.map(e=>`"${e}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${e}`)}if("string"!=typeof t)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} takes an "items"-argument which must be an array`)})(e,t,r),this._assign("insert",{[e]:t,items:r})}append(e,t){return this.insert("after",`${e}[-1]`,t)}prepend(e,t){return this.insert("before",`${e}[0]`,t)}splice(e,t,r,n){let o=t<0?t-1:t,i=typeof r>"u"||-1===r?-1:Math.max(0,t+r),s=`${e}[${o}:${o<0&&i>=0?"":i}]`;return this.insert("replace",s,n||[])}ifRevisionId(e){return this.operations.ifRevisionID=e,this}serialize(){return{...tH(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(e,t,r=!0){return tb(e,t),this.operations=Object.assign({},this.operations,{[e]:Object.assign({},r&&this.operations[e]||{},t)}),this}_set(e,t){return this._assign(e,t,!1)}}class tY extends tV{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new tY(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}class tW extends tV{#a;constructor(e,t,r){super(e,t),this.#a=r}clone(){return new tW(this.selection,{...this.operations},this.#a)}commit(e){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let t=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},e);return this.#a.mutate({patch:this.serialize()},t)}}
8let tG={returnDocuments:!1};class tJ{operations;trxId;constructor(e=[],t){this.operations=e,this.trxId=t}create(e){return tb("create",e),this._add({create:e})}createIfNotExists(e){let t="createIfNotExists";return tb(t,e),tm(t,e),this._add({[t]:e})}createOrReplace(e){let t="createOrReplace";return tb(t,e),tm(t,e),this._add({[t]:e})}delete(e){return tv("delete",e),this._add({delete:{id:e}})}transactionId(e){return e?(this.trxId=e,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(e){return this.operations.push(e),this}}class tX extends tJ{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new tX([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},tG,e||{}))}patch(e,t){let r="function"==typeof t,n="string"!=typeof e&&e instanceof tW,o="object"==typeof e&&("query"in e||"id"in e);if(n)return this._add({patch:e.serialize()});if(r){let r=t(new tW(e,{},this.#a));if(!(r instanceof tW))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(o){let r=new tW(e,t||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}class tK extends tJ{#a;constructor(e,t,r){super(e,r),this.#a=t}clone(){return new tK([...this.operations],this.#a,this.trxId)}commit(e){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},tG,e||{}))}patch(e,t){let r="function"==typeof t;if("string"!=typeof e&&e instanceof tY)return this._add({patch:e.serialize()});if(r){let r=t(new tY(e,{},this.#a));if(!(r instanceof tY))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:e,...t}})}}let tQ=({query:e,params:t={},options:r={}})=>{let n=new URLSearchParams,{tag:o,includeMutations:i,returnQuery:s,...a}=r;for(let[r,i]of(o&&n.append("tag",o),n.append("query",e),Object.entries(t)))n.append(`$${r}`,JSON.stringify(i));for(let[e,t]of Object.entries(a))t&&n.append(e,`${t}`);return!1===s&&n.append("returnQuery","false"),!1===i&&n.append("includeMutations","false"),`?${n}`},tZ=e=>"response"===e.type,t0=e=>e.body;function t1(t,r,n,o,i={},s={}){let a="stega"in s?{...n||{},..."boolean"==typeof s.stega?{enabled:s.stega}:s.stega||{}}:n,u=a.enabled?(0,te.stegaClean)(i):i,c=!1===s.filterResponse?e=>e:e=>e.result,{cache:l,next:f,...h}={useAbortSignal:"u">typeof s.signal,resultSourceMap:a.enabled?"withKeyArraySelector":s.resultSourceMap,...s,returnQuery:!1===s.filterResponse&&!1!==s.returnQuery},p=t7(t,r,"query",{query:o,params:u},"u">typeof l||"u">typeof f?{...h,fetch:{cache:l,next:f}}:h);return a.enabled?p.pipe(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tn.apply(void 0,z([],N(e)))}(eD(e.A(12247).then(function(e){return e.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:e})=>e))),eN(([e,t])=>{let r=t(e.result,e.resultSourceMap,a);return c({...e,result:r})})):p.pipe(eN(c))}function t2(e,t,r,n={}){let o={uri:ri(e,"doc",r),json:!0,tag:n.tag,signal:n.signal};return rn(e,t,o).pipe(to(tZ),eN(e=>e.body.documents&&e.body.documents[0]))}function t3(e,t,r,n={}){let o={uri:ri(e,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return rn(e,t,o).pipe(to(tZ),eN(e=>{let t,n,o=(t=e.body.documents||[],n=e=>e._id,t.reduce((e,t)=>(e[n(t)]=t,e),Object.create(null)));return r.map(e=>o[e]||null)}))}function t6(e,t,r,n){return tm("createIfNotExists",r),re(e,t,r,"createIfNotExists",n)}function t5(e,t,r,n){return tm("createOrReplace",r),re(e,t,r,"createOrReplace",n)}function t8(e,t,r,n){return t7(e,t,"mutate",{mutations:[{delete:tH(r)}]},n)}function t4(e,t,r,n){let o;return t7(e,t,"mutate",{mutations:Array.isArray(o=r instanceof tW||r instanceof tY?{patch:r.serialize()}:r instanceof tX||r instanceof tK?r.serialize():r)?o:[o],transactionId:n&&n.transactionId||void 0},n)}function t9(e,t,r,n){let o=Array.isArray(r)?r:[r],i=n&&n.transactionId||void 0;return t7(e,t,"actions",{actions:o,transactionId:i,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function t7(e,t,r,n,o={}){let i="mutate"===r,s="actions"===r,a=i||s?"":tQ(n),u=!i&&!s&&a.length<11264,c=u?a:"",l=o.returnFirst,{timeout:f,token:h,tag:p,headers:d,returnQuery:y,lastLiveEventId:g,cacheMode:b}=o,v={method:u?"GET":"POST",uri:ri(e,r,c),json:!0,body:u?void 0:n,query:i&&((e={})=>{let t;return{dryRun:e.dryRun,returnIds:!0,returnDocuments:(t=e.returnDocuments,!1===t?void 0:!!(typeof t>"u")||t),visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}})(o),timeout:f,headers:d,token:h,tag:p,returnQuery:y,perspective:o.perspective,resultSourceMap:o.resultSourceMap,lastLiveEventId:Array.isArray(g)?g[0]:g,cacheMode:b,canUseCdn:"query"===r,signal:o.signal,fetch:o.fetch,useAbortSignal:o.useAbortSignal,useCdn:o.useCdn};return rn(e,t,v).pipe(to(tZ),eN(t0),eN(e=>{if(!i)return e;let t=e.results||[];if(o.returnDocuments)return l?t[0]&&t[0].document:t.map(e=>e.document);let r=l?t[0]&&t[0].id:t.map(e=>e.id);return{transactionId:e.transactionId,results:t,[l?"documentId":"documentIds"]:r}}))}function re(e,t,r,n,o={}){return t7(e,t,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},o))}let rt=e=>void 0!==e.config().dataset&&void 0!==e.config().projectId||void 0!==e.config()["~experimental_resource"],rr=(e,t)=>rt(e)&&t.startsWith(ri(e,"query"));function rn(e,t,r){var n;let o=r.url||r.uri,i=e.config(),s=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&(o.startsWith("/data/")||rr(e,o)||rt(e)&&o.startsWith(ri(e,"mutate"))||rt(e)&&o.startsWith(ri(e,"doc",""))||rt(e)&&o.startsWith(ri(e,"listen"))||rt(e)&&o.startsWith(ri(e,"history",""))):r.canUseCdn,a=(r.useCdn??i.useCdn)&&s,u=r.tag&&i.requestTagPrefix?[i.requestTagPrefix,r.tag].join("."):r.tag||i.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:tC(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&rr(e,o)){let e=r.resultSourceMap??i.resultSourceMap;void 0!==e&&!1!==e&&(r.query={resultSourceMap:e,...r.query});let t=r.perspective||i.perspective;"u">typeof t&&("previewDrafts"===t&&tO(),tP(t),r.query={perspective:Array.isArray(t)?t.join(","):t,...r.query},(Array.isArray(t)&&t.length>0||"previewDrafts"===t||"drafts"===t)&&a&&(a=!1,tS())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),a&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(e,t={}){let r={},n=t.token||e.token;n&&(r.Authorization=`Bearer ${n}`),t.useGlobalApi||e.useProjectHostname||!e.projectId||(r["X-Sanity-Project-ID"]=e.projectId);let o=!!(typeof t.withCredentials>"u"?e.withCredentials:t.withCredentials),i=typeof t.timeout>"u"?e.timeout:t.timeout;return Object.assign({},t,{headers:Object.assign({},r,t.headers||{}),timeout:typeof i>"u"?3e5:i,proxy:t.proxy||e.proxy,json:!0,withCredentials:o,fetch:"object"==typeof t.fetch&&"object"==typeof e.fetch?{...e.fetch,...t.fetch}:t.fetch||e.fetch})}(i,Object.assign({},r,{url:rs(e,o,a)})),l=new ev(e=>t(c,i.requester).subscribe(e));return r.signal?l.pipe((n=r.signal,e=>new ev(t=>{let r=()=>t.error(function(e){if(ra)return new DOMException(e?.reason??"The operation was aborted.","AbortError");let t=Error(e?.reason??"The operation was aborted.");return t.name="AbortError",t}(n));if(n&&n.aborted)return void r();let o=e.subscribe(t);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),o.unsubscribe()}}))):l}function ro(e,t,r){return rn(e,t,r).pipe(to(e=>"response"===e.type),eN(e=>e.body))}function ri(e,t,r){let n=e.config();if(n["~experimental_resource"]){tE(n);let e=ru(n),o=void 0!==r?`${t}/${r}`:t;return`${e}/${o}`.replace(/\/($|\?)/,"$1")}let o=tw(n),i=`/${t}/${o}`;return`/data${void 0!==r?`${i}/${r}`:i}`.replace(/\/($|\?)/,"$1")}function rs(e,t,r=!1){let{url:n,cdnUrl:o}=e.config();return`${r?o:n}/${t.replace(/^\//,"")}`}let ra=!!globalThis.DOMException,ru=e=>{if(!e["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:t,id:r}=e["~experimental_resource"];switch(t){case"dataset":{let e=r.split(".");if(2!==e.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${e[0]}/datasets/${e[1]}`}case"canvas":return`/canvases/${r}`;case"media-library":return`/media-libraries/${r}`;case"dashboard":return`/dashboards/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}};class rc{#a;#u;
8constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return rf(this.#a,this.#u,e,t,r)}}class rl{#a;#u;constructor(e,t){this.#a=e,this.#u=t}upload(e,t,r){return eV(rf(this.#a,this.#u,e,t,r).pipe(to(e=>"response"===e.type),eN(e=>e.body.document)))}}function rf(e,t,r,n,o={}){var i,s;if(-1===td.indexOf(r))throw Error(`Invalid asset type: ${r}. Must be one of ${td.join(", ")}`);let a=o.extract||void 0;a&&!a.length&&(a=["none"]);let u=e.config(),c=(i=o,s=n,!(typeof File>"u")&&s instanceof File?Object.assign({filename:!1===i.preserveFilename?void 0:s.name,contentType:s.type},i):i),{tag:l,label:f,title:h,description:p,creditLine:d,filename:y,source:g}=c,b={label:f,title:h,description:p,filename:y,meta:a,creditLine:d};return g&&(b.sourceId=g.id,b.sourceName=g.name,b.sourceUrl=g.url),rn(e,t,{tag:l,method:"POST",timeout:c.timeout||0,uri:function(e,t){let r="image"===t?"images":"files";if(e["~experimental_resource"]){let{type:t,id:n}=e["~experimental_resource"];switch(t){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${n}/assets/${r}`;case"media-library":return`/media-libraries/${n}/upload`;case"dashboard":return`/dashboards/${n}/assets/${r}`;default:throw Error(`Unsupported resource type: ${t.toString()}`)}}let n=tw(e);return`assets/${r}/${n}`}(u,r),headers:c.contentType?{"Content-Type":c.contentType}:{},query:b,body:n})}let rh=e_(()=>e.A(34942)).pipe(eN(({default:e})=>e),eK({connector:function(){return new eX(1,l,f)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:!1}));function rp(){return function(e){return e.pipe(eZ((e,t)=>{var r;return e instanceof tB?e1(eL({type:"reconnect"}),(void 0===r&&(r=e4),new ev(function(e){var t=1e3;t<0&&(t=0);var n=0;return r.schedule(function(){e.closed||(e.next(n++),e.complete())},t)})).pipe(ez(()=>t))):e2(()=>e)}))}}let rd=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],ry={includeResult:!0};function rg(e,t,r={}){let{url:n,token:o,withCredentials:i,requestTagPrefix:s}=this.config(),a=r.tag&&s?[s,r.tag].join("."):r.tag,u={...Object.keys(ry).concat(Object.keys(r)).reduce((e,t)=>(e[t]=typeof r[t]>"u"?ry[t]:r[t],e),{}),tag:a},c=tQ({query:e,params:t,options:{tag:a,...rd.reduce((e,t)=>(typeof u[t]>"u"||(e[t]=u[t]),e),{})}}),l=`${n}${ri(this,"listen",c)}`;if(l.length>14800)return e2(()=>Error("Query too large for listener"));let f=u.events?u.events:["mutation"],h={};return i&&(h.withCredentials=!0),o&&(h.headers={Authorization:`Bearer ${o}`}),tN(()=>(typeof EventSource>"u"||h.headers?rh:eL(EventSource)).pipe(eN(e=>new e(l,h))),f).pipe(rp(),to(e=>f.includes(e.type)),eN(e=>({type:e.type,..."data"in e?e.data:{}})))}let rb="2021-03-25";class rv{#a;constructor(e){this.#a=e}events({includeDrafts:e=!1,tag:t}={}){var r,n,o,i;tx("live",this.#a.config());let{projectId:s,apiVersion:a,token:u,withCredentials:c,requestTagPrefix:l}=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(e&&!u&&!c)throw Error("The live events API requires a token or withCredentials when 'includeDrafts: true'. Please update your client configuration. The token should have the lowest possible access role.");let h=ri(this.#a,"live/events"),p=new URL(this.#a.getUrl(h,!1)),d=t&&l?[l,t].join("."):t;d&&p.searchParams.set("tag",d),e&&p.searchParams.set("includeDrafts","true");let y={};e&&u&&(y.headers={Authorization:`Bearer ${u}`}),e&&c&&(y.withCredentials=!0);let g=`${p.href}::${JSON.stringify(y)}`,b=rm.get(g);if(b)return b;let v=tN(()=>(typeof EventSource>"u"||y.headers?rh:eL(EventSource)).pipe(eN(e=>new e(p.href,y))),["message","restart","welcome","reconnect","goaway"]).pipe(rp(),eN(e=>{if("message"===e.type){let{data:t,...r}=e;return{...r,tags:t.tags}}return e})),m=e1((n=p,o={method:"OPTIONS",mode:"cors",credentials:y.withCredentials?"include":"omit",headers:y.headers},new ev(e=>{let t=new AbortController,r=t.signal;return fetch(n,{...o,signal:t.signal}).then(t=>{e.next(t),e.complete()},t=>{r.aborted||e.error(t)}),()=>t.abort()})).pipe(ez(()=>e7),eZ(()=>{throw new tc({projectId:s})})),v).pipe(e9(()=>rm.delete(g)),(i="function"==typeof(r={predicate:e=>"welcome"===e.type})?{predicate:r,...void 0}:r,e=>{var t,r;let n,o=!1,{predicate:s,...a}=i;return function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=eq(t),o=(e=1/0,"number"==typeof ej(t)?t.pop():e);return t.length?1===t.length?eO(t[0]):e0(o)(eD(t,n)):e7}(e.pipe((r=V(t=e=>{i.predicate(e)&&(o=!0,n=e)})?{next:t,error:void 0,complete:void 0}:t)?eP(function(e,t){null==(n=r.subscribe)||n.call(r);var n,o=!0;e.subscribe(eU(t,function(e){var n;null==(n=r.next)||n.call(r,e),t.next(e)},function(){var e;o=!1,null==(e=r.complete)||e.call(r),t.complete()},function(e){var n;o=!1,null==(n=r.error)||n.call(r,e),t.error(e)},function(){var e,t;o&&(null==(e=r.unsubscribe)||e.call(r)),null==(t=r.finalize)||t.call(r)}))}):eg,e9(()=>{o=!1,n=void 0}),eK(a)),new ev(e=>{o&&e.next(n),e.complete()}
8))}));return rm.set(g,m),m}}let rm=new Map;class rw{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return rE(this.#a,this.#u,"PUT",e,t)}edit(e,t){return rE(this.#a,this.#u,"PATCH",e,t)}delete(e){return rE(this.#a,this.#u,"DELETE",e)}list(){return ro(this.#a,this.#u,{uri:"/datasets",tag:null})}}class rC{#a;#u;constructor(e,t){this.#a=e,this.#u=t}create(e,t){return tx("dataset",this.#a.config()),eV(rE(this.#a,this.#u,"PUT",e,t))}edit(e,t){return tx("dataset",this.#a.config()),eV(rE(this.#a,this.#u,"PATCH",e,t))}delete(e){return tx("dataset",this.#a.config()),eV(rE(this.#a,this.#u,"DELETE",e))}list(){return tx("dataset",this.#a.config()),eV(ro(this.#a,this.#u,{uri:"/datasets",tag:null}))}}function rE(e,t,r,n,o){return tx("dataset",e.config()),tg(n),ro(e,t,{method:r,uri:`/datasets/${n}`,body:o,tag:null})}class rx{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){tx("projects",this.#a.config());let t=e?.includeMembers===!1?"/projects?includeMembers=false":"/projects";return ro(this.#a,this.#u,{uri:t})}getById(e){return tx("projects",this.#a.config()),ro(this.#a,this.#u,{uri:`/projects/${e}`})}}class rA{#a;#u;constructor(e,t){this.#a=e,this.#u=t}list(e){tx("projects",this.#a.config());let t=e?.includeMembers===!1?"/projects?includeMembers=false":"/projects";return eV(ro(this.#a,this.#u,{uri:t}))}getById(e){return tx("projects",this.#a.config()),eV(ro(this.#a,this.#u,{uri:`/projects/${e}`}))}}class rI{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return ro(this.#a,this.#u,{uri:`/users/${e}`})}}class rR{#a;#u;constructor(e,t){this.#a=e,this.#u=t}getById(e){return eV(ro(this.#a,this.#u,{uri:`/users/${e}`}))}}class rS{assets;datasets;live;projects;users;#c;#u;listen=rg;constructor(e,t=tq){this.config(t),this.#u=e,this.assets=new rc(this,this.#u),this.datasets=new rw(this,this.#u),this.live=new rv(this),this.projects=new rx(this,this.#u),this.users=new rI(this,this.#u)}clone(){return new rS(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#c=tU(e,this.#c||{}),this}withConfig(e){let t=this.config();return new rS(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return t1(this,this.#u,this.#c.stega,e,t,r)}getDocument(e,t){return t2(this,this.#u,e,t)}getDocuments(e,t){return t3(this,this.#u,e,t)}create(e,t){return re(this,this.#u,e,"create",t)}createIfNotExists(e,t){return t6(this,this.#u,e,t)}createOrReplace(e,t){return t5(this,this.#u,e,t)}delete(e,t){return t8(this,this.#u,e,t)}mutate(e,t){return t4(this,this.#u,e,t)}patch(e,t){return new tY(e,t,this)}transaction(e){return new tK(e,this)}action(e,t){return t9(this,this.#u,e,t)}request(e){return ro(this,this.#u,e)}getUrl(e,t){return rs(this,e,t)}getDataUrl(e,t){return ri(this,e,t)}}class rO{assets;datasets;live;projects;users;observable;#c;#u;listen=rg;constructor(e,t=tq){this.config(t),this.#u=e,this.assets=new rl(this,this.#u),this.datasets=new rC(this,this.#u),this.live=new rv(this),this.projects=new rA(this,this.#u),this.users=new rR(this,this.#u),this.observable=new rS(e,t)}clone(){return new rO(this.#u,this.config())}config(e){if(void 0===e)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(e),this.#c=tU(e,this.#c||{}),this}withConfig(e){let t=this.config();return new rO(this.#u,{...t,...e,stega:{...t.stega||{},..."boolean"==typeof e?.stega?{enabled:e.stega}:e?.stega||{}}})}fetch(e,t,r){return eV(t1(this,this.#u,this.#c.stega,e,t,r))}getDocument(e,t){return eV(t2(this,this.#u,e,t))}getDocuments(e,t){return eV(t3(this,this.#u,e,t))}create(e,t){return eV(re(this,this.#u,e,"create",t))}createIfNotExists(e,t){return eV(t6(this,this.#u,e,t))}createOrReplace(e,t){return eV(t5(this,this.#u,e,t))}delete(e,t){return eV(t8(this,this.#u,e,t))}mutate(e,t){return eV(t4(this,this.#u,e,t))}patch(e,t){return new tW(e,t,this)}transaction(e){return new tX(e,this)}action(e,t){return eV(t9(this,this.#u,e,t))}request(e){return eV(ro(this,this.#u,e))}dataRequest(e,t,r){return eV(t7(this,this.#u,e,t,r))}getUrl(e,t){return rs(this,e,t)}getDataUrl(e,t){return ri(this,e,t)}}let rT={requester:tf(h=[]),createClient:e=>{let t=tf(h);return new rO((r,n)=>(n||t)({maxRedirects:0,maxRetries:e.maxRetries,retryDelay:e.retryDelay,...r}),e)}},r_=(rT.requester,rT.createClient),rj=r_({projectId:"mh4v6tpb",dataset:"production",useCdn:!0,apiVersion:"2021-06-07"});e.s(["default",0,rj],22997)}]);
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.