PageSourceSearch

https://www.muralia.at/_next/static/chunks/885-dad2a1f9dddd0515.js

js muralia.at collected 2026-10-06 05:05:39 UTC 162,653 bytes, 10 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[885],{59196:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],c=new i((s+a)*3/4-a),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(function(t,e,n){for(var i,o=[],s=e;s<n;s+=3)o.push(r[(i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(t,s,s+16383>a?a:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},82957:function(t,e,r){"use strict";var n=r(59196),i=r(68848),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!a.isEncoding(e))throw TypeError("Unknown encoding: "+e);var r=0|d(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(O(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(O(t,ArrayBuffer)||t&&O(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(O(t,SharedArrayBuffer)||t&&O(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);var i=function(t){if(a.isBuffer(t)){var e,r=0|p(t.length),n=s(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?s(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),s(t<0?0:0|p(t))}function f(t){for(var e=t.length<0?0:0|p(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),a.prototype),n}function p(t){if(t>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||O(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return T(t).length;default:if(i)return n?-1:I(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){var i,o,s=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=R[t[o]];return i}(this,e,r);case"utf8":case"utf-8":return b(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":return i=e,o=r,0===i&&o===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,e,r);default:if(s)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){var o;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}
vendor: 14,466 bytes, line 1
1else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else -1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(c(t,o+h)!==c(e,h)){f=!1;break}if(f)return o}return -1}function b(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:(192&(o=t[i+1]))==128&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],(192&o)==128&&(192&s)==128&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}function w(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function x(t,e,r,n,i,o){if(!a.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function E(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function _(t,e,r,n,o){return e=+e,r>>>=0,o||E(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function S(t,e,r,n,o){return e=+e,r>>>=0,o||E(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.lW=a,e.h2=50,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return(c(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(O(o,Uint8Array))i+o.length>n.length?a.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(a.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):y.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",r=e.h2;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,i){if(O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,u=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),f=0;f<u;++f)if(c[f]!==l[f]){o=c[f],s=l[f];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,o,s,a,u,c,l,f,h=this.length-e;if((void 0===r||r>h)&&(r=h),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(a!=a)break;t[r+s]=a}return s}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,A(I(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=e,a=r,A(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(t),this,s,a);case"base64":return u=e,c=r,A(T(t),this,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,f=r,A(function(t,e){for(var r,n,i=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,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(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||w(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return(t>>>=0,e||w(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||w(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||w(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||w(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||w(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;x(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=t/o&255;return e+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;x(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return _(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return _(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return S(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return S(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var i,o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),u=s.length;
1if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%u]}return this};var C=/[^+/0-9A-Za-z-_]/g;function I(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function T(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function A(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function O(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var R=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},68848:function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?5960464477539062e-23:0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+f>=1?e+=h/u:e+=h*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*y}},78743:function(t,e,r){"use strict";r.d(e,{y:function(){return l}});var n=r(19142),i=r(37219),o=r(27723),s=r(95767),a=r(80124),u=r(2070),c=r(99287),l=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var o,s=this,a=(o=t)&&o instanceof n.Lv||o&&(0,u.m)(o.next)&&(0,u.m)(o.error)&&(0,u.m)(o.complete)&&(0,i.Nn)(o)?t:new n.Hp(t,e,r);return(0,c.x)(function(){var t=s.operator,e=s.source;a.add(t?t.call(a,e):e?s._subscribe(a):s._trySubscribe(a))}),a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=f(e))(function(e,i){var o=new n.Hp({next:function(e){try{t(e)}catch(t){i(t),o.unsubscribe()}},error:i,complete:e});r.subscribe(o)})},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[o.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,s.U)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();function f(t){var e;return null!==(e=null!=t?t:a.v.Promise)&&void 0!==e?e:Promise}},95978:function(t,e,r){"use strict";r.d(e,{t:function(){return s}});var n=r(5853),i=r(82863),o=r(24325),s=function(t){function e(e,r,n){void 0===e&&(e=1/0),void 0===r&&(r=1/0),void 0===n&&(n=o.l);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,r),i}return(0,n.ZT)(e,t),e.prototype.next=function(e){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,o=this._timestampProvider,s=this._windowTime;!r&&(n.push(e),i||n.push(o.now()+s)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!t.closed;i+=r?1:2)t.next(n[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this._bufferSize,e=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*t;
1if(t<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var o=e.now(),s=0,a=1;a<r.length&&r[a]<=o;a+=2)s=a;s&&r.splice(0,s+1)}},e}(i.x)},82863:function(t,e,r){"use strict";r.d(e,{x:function(){return c}});var n=r(5853),i=r(78743),o=r(37219),s=(0,r(37169).d)(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),a=r(30325),u=r(99287),c=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return(0,n.ZT)(e,t),e.prototype.lift=function(t){var e=new l(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new s},e.prototype.next=function(t){var e=this;(0,u.x)(function(){var r,i;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=(0,n.XA)(e.currentObservers),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}})},e.prototype.error=function(t){var e=this;(0,u.x)(function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var r=e.observers;r.length;)r.shift().error(t)}})},e.prototype.complete=function(){var t=this;(0,u.x)(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?o.Lc:(this.currentObservers=null,i.push(t),new o.w0(function(){e.currentObservers=null,(0,a.P)(i,t)}))},e.prototype._checkFinalizedStatuses=function(t){var e=this.hasError,r=this.thrownError,n=this.isStopped;e?t.error(r):n&&t.complete()},e.prototype.asObservable=function(){var t=new i.y;return t.source=this,t},e.create=function(t,e){return new l(t,e)},e}(i.y),l=function(t){function e(e,r){var n=t.call(this)||this;return n.destination=e,n.source=r,n}return(0,n.ZT)(e,t),e.prototype.next=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===r||r.call(e,t)},e.prototype.error=function(t){var e,r;null===(r=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===r||r.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,r;return null!==(r=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==r?r:o.Lc},e}(c)},19142:function(t,e,r){"use strict";r.d(e,{Hp:function(){return v},Lv:function(){return p}});var n=r(5853),i=r(2070),o=r(37219),s=r(80124),a=r(67444),u=r(8365),c=l("C",void 0,void 0);function l(t,e,r){return{kind:t,value:e,error:r}}var f=r(94814),h=r(99287),p=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,(0,o.Nn)(e)&&e.add(r)):r.destination=w,r}return(0,n.ZT)(e,t),e.create=function(t,e,r){return new v(t,e,r)},e.prototype.next=function(t){this.isStopped?b(l("N",t,void 0),this):this._next(t)},e.prototype.error=function(t){this.isStopped?b(l("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(o.w0),d=Function.prototype.bind;function y(t,e){return d.call(t,e)}var g=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){m(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){m(t)}else m(t)}
1,t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){m(t)}},t}(),v=function(t){function e(e,r,n){var o,a,u=t.call(this)||this;return(0,i.m)(e)||!e?o={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&s.v.useDeprecatedNextContext?((a=Object.create(e)).unsubscribe=function(){return u.unsubscribe()},o={next:e.next&&y(e.next,a),error:e.error&&y(e.error,a),complete:e.complete&&y(e.complete,a)}):o=e,u.destination=new g(o),u}return(0,n.ZT)(e,t),e}(p);function m(t){s.v.useDeprecatedSynchronousErrorHandling?(0,h.O)(t):(0,a.h)(t)}function b(t,e){var r=s.v.onStoppedNotification;r&&f.z.setTimeout(function(){return r(t,e)})}var w={closed:!0,next:u.Z,error:function(t){throw t},complete:u.Z}},37219:function(t,e,r){"use strict";r.d(e,{Lc:function(){return u},w0:function(){return a},Nn:function(){return c}});var n=r(5853),i=r(2070),o=(0,r(37169).d)(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=e}}),s=r(30325),a=function(){var t;function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t,e,r,s,a,u=this._parentage;if(u){if(this._parentage=null,Array.isArray(u))try{for(var c=(0,n.XA)(u),f=c.next();!f.done;f=c.next())f.value.remove(this)}catch(e){t={error:e}}finally{try{f&&!f.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}else u.remove(this)}var h=this.initialTeardown;if((0,i.m)(h))try{h()}catch(t){a=t instanceof o?t.errors:[t]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=(0,n.XA)(p),y=d.next();!y.done;y=d.next()){var g=y.value;try{l(g)}catch(t){a=null!=a?a:[],t instanceof o?a=(0,n.ev)((0,n.ev)([],(0,n.CR)(a)),(0,n.CR)(t.errors)):a.push(t)}}}catch(t){r={error:t}}finally{try{y&&!y.done&&(s=d.return)&&s.call(d)}finally{if(r)throw r.error}}}if(a)throw new o(a)}},e.prototype.add=function(t){var r;if(t&&t!==this){if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}}},e.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},e.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},e.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&(0,s.P)(e,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&(0,s.P)(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),u=a.EMPTY;function c(t){return t instanceof a||t&&"closed"in t&&(0,i.m)(t.remove)&&(0,i.m)(t.add)&&(0,i.m)(t.unsubscribe)}function l(t){(0,i.m)(t)?t():t.unsubscribe()}},80124:function(t,e,r){"use strict";r.d(e,{v:function(){return n}});var n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},46737:function(t,e,r){"use strict";r.d(e,{n:function(){return i}});var n=r(60551);function i(t,e){var r="object"==typeof e;return new Promise(function(i,o){var s,a=!1;t.subscribe({next:function(t){s=t,a=!0},error:o,complete:function(){a?i(s):r?i(e.defaultValue):o(new n.K)}})})}},79911:function(t,e,r){"use strict";r.d(e,{a:function(){return h},l:function(){return p}});var n=r(78743),i=r(47026),o=r(28419),s=r(15531),a=r(59326),u=r(36023),c=r(82663),l=r(4382),f=r(42903);function h(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,u.yG)(t),l=(0,u.jO)(t),f=(0,i.D)(t),h=f.args,d=f.keys;if(0===h.length)return(0,o.D)([],r);var y=new n.y(p(h,r,d?function(t){return(0,c.n)(d,t)}:s.y));return l?y.pipe((0,a.Z)(l)):y}function p(t,e,r){return void 0===r&&(r=s.y),function(n){d(e,function(){for(var i=t.length,s=Array(i),a=i,u=i,c=function(i){d(e,function(){var c=(0,o.D)(t[i],e),f=!1;c.subscribe((0,l.x)(n,function(t){s[i]=t,!f&&(f=!0,u--),u||n.next(r(s.slice()))},function(){--a||n.complete()}
1))},n)},f=0;f<i;f++)c(f)},n)}}function d(t,e,r){t?(0,f.f)(r,t,e):e()}},85393:function(t,e,r){"use strict";r.d(e,{z:function(){return s}});var n=r(70273),i=r(36023),o=r(28419);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.u)()((0,o.D)(t,(0,i.yG)(t)))}},68851:function(t,e,r){"use strict";r.d(e,{P:function(){return o}});var n=r(78743),i=r(96750);function o(t){return new n.y(function(e){(0,i.Xf)(t()).subscribe(e)})}},66692:function(t,e,r){"use strict";r.d(e,{E:function(){return i},c:function(){return o}});var n=r(78743),i=new n.y(function(t){return t.complete()});function o(t){return t?new n.y(function(e){return t.schedule(function(){return e.complete()})}):i}},28419:function(t,e,r){"use strict";r.d(e,{D:function(){return o}});var n=r(78095),i=r(96750);function o(t,e){return e?(0,n.x)(t,e):(0,i.Xf)(t)}},85078:function(t,e,r){"use strict";r.d(e,{R:function(){return function t(e,r,d,y){if((0,u.m)(d)&&(y=d,d=void 0),y)return t(e,r,d).pipe((0,c.Z)(y));var g=(0,n.CR)((0,u.m)(e.addEventListener)&&(0,u.m)(e.removeEventListener)?f.map(function(t){return function(n){return e[t](r,n,d)}}):(0,u.m)(e.addListener)&&(0,u.m)(e.removeListener)?l.map(p(e,r)):(0,u.m)(e.on)&&(0,u.m)(e.off)?h.map(p(e,r)):[],2),v=g[0],m=g[1];if(!v&&(0,a.z)(e))return(0,s.z)(function(e){return t(e,r,d)})((0,i.Xf)(e));if(!v)throw TypeError("Invalid event target");return new o.y(function(t){var e=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.next(1<e.length?e:e[0])};return v(e),function(){return m(e)}})}}});var n=r(5853),i=r(96750),o=r(78743),s=r(36550),a=r(76613),u=r(2070),c=r(59326),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],h=["on","off"];function p(t,e){return function(r){return function(n){return t[r](e,n)}}}},96750:function(t,e,r){"use strict";r.d(e,{Xf:function(){return y}});var n=r(5853),i=r(76613),o=r(84223),s=r(78743),a=r(87229),u=r(67555),c=r(46345),l=r(96090),f=r(32450),h=r(2070),p=r(67444),d=r(27723);function y(t){if(t instanceof s.y)return t;if(null!=t){if((0,a.c)(t))return new s.y(function(e){var r=t[d.L]();if((0,h.m)(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")});if((0,i.z)(t))return new s.y(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()});if((0,o.t)(t))return new s.y(function(e){t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,p.h)});if((0,u.D)(t))return g(t);if((0,l.T)(t))return new s.y(function(e){var r,i;try{for(var o=(0,n.XA)(t),s=o.next();!s.done;s=o.next()){var a=s.value;if(e.next(a),e.closed)return}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}e.complete()});if((0,f.L)(t))return g((0,f.Q)(t))}throw(0,c.z)(t)}function g(t){return new s.y(function(e){(function(t,e){var r,i,o,s;return(0,n.mG)(this,void 0,void 0,function(){var a;return(0,n.Jh)(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,11]),r=(0,n.KL)(t),u.label=1;case 1:return[4,r.next()];case 2:if((i=u.sent()).done)return[3,4];if(a=i.value,e.next(a),e.closed)return[2];u.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:u.sent()},[3,11];case 6:if(u.trys.push([6,,9,10]),!(i&&!i.done&&(s=r.return)))return[3,8];return[4,s.call(r)];case 7:u.sent(),u.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})})(t,e).catch(function(t){return e.error(t)})})}},36381:function(t,e,r){"use strict";r.d(e,{T:function(){return u}});var n=r(6904),i=r(96750),o=r(66692),s=r(36023),a=r(28419);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,s.yG)(t),u=(0,s._6)(t,1/0);return t.length?1===t.length?(0,i.Xf)(t[0]):(0,n.J)(u)((0,a.D)(t,r)):o.E}},87935:function(t,e,r){"use strict";r.d(e,{of:function(){return o}});var n=r(36023),i=r(28419);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,n.yG)(t);return(0,i.D)(t,r)}},38214:function(t,e,r){"use strict";r.d(e,{_:function(){return o}});var n=r(78743),i=r(2070);function o(t,e){var r=(0,i.m)(t)?t:function(){return t}
1,o=function(t){return t.error(r())};return new n.y(e?function(t){return e.schedule(o,0,t)}:o)}},61514:function(t,e,r){"use strict";r.d(e,{H:function(){return a}});var n=r(78743),i=r(46593),o=r(96476),s=r(13746);function a(t,e,r){void 0===t&&(t=0),void 0===r&&(r=i.P);var a=-1;return null!=e&&((0,o.K)(e)?r=e:a=e),new n.y(function(e){var n=(0,s.q)(t)?+t-r.now():t;n<0&&(n=0);var i=0;return r.schedule(function(){e.closed||(e.next(i++),0<=a?this.schedule(void 0,a):e.complete())},n)})}},4382:function(t,e,r){"use strict";r.d(e,{Q:function(){return o},x:function(){return i}});var n=r(5853);function i(t,e,r,n,i){return new o(t,e,r,n,i)}var o=function(t){function e(e,r,n,i,o,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return(0,n.ZT)(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),r||null===(e=this.onFinalize)||void 0===e||e.call(this)}},e}(r(19142).Lv)},17482:function(t,e,r){"use strict";r.d(e,{K:function(){return function t(e){return(0,o.e)(function(r,o){var s,a=null,u=!1;a=r.subscribe((0,i.x)(o,void 0,void 0,function(i){s=(0,n.Xf)(e(i,t(e)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):u=!0})),u&&(a.unsubscribe(),a=null,s.subscribe(o))})}}});var n=r(96750),i=r(4382),o=r(17753)},70273:function(t,e,r){"use strict";r.d(e,{u:function(){return i}});var n=r(6904);function i(){return(0,n.J)(1)}},21178:function(t,e,r){"use strict";r.d(e,{b:function(){return o}});var n=r(36550),i=r(2070);function o(t,e){return(0,i.m)(e)?(0,n.z)(t,e,1):(0,n.z)(t,1)}},44465:function(t,e,r){"use strict";r.d(e,{h:function(){return o}});var n=r(17753),i=r(4382);function o(t,e){return(0,n.e)(function(r,n){var o=0;r.subscribe((0,i.x)(n,function(r){return t.call(e,r,o++)&&n.next(r)}))})}},67387:function(t,e,r){"use strict";r.d(e,{x:function(){return i}});var n=r(17753);function i(t){return(0,n.e)(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})}},7449:function(t,e,r){"use strict";r.d(e,{U:function(){return o}});var n=r(17753),i=r(4382);function o(t,e){return(0,n.e)(function(r,n){var o=0;r.subscribe((0,i.x)(n,function(r){n.next(t.call(e,r,o++))}))})}},6904:function(t,e,r){"use strict";r.d(e,{J:function(){return o}});var n=r(36550),i=r(15531);function o(t){return void 0===t&&(t=1/0),(0,n.z)(i.y,t)}},59262:function(t,e,r){"use strict";r.d(e,{p:function(){return s}});var n=r(96750),i=r(42903),o=r(4382);function s(t,e,r,s,a,u,c,l){var f=[],h=0,p=0,d=!1,y=function(){!d||f.length||h||e.complete()},g=function(t){return h<s?v(t):f.push(t)},v=function(t){u&&e.next(t),h++;var l=!1;(0,n.Xf)(r(t,p++)).subscribe((0,o.x)(e,function(t){null==a||a(t),u?g(t):e.next(t)},function(){l=!0},void 0,function(){if(l)try{for(h--;f.length&&h<s;)!function(){var t=f.shift();c?(0,i.f)(e,c,function(){return v(t)}):v(t)}();y()}catch(t){e.error(t)}}))};return t.subscribe((0,o.x)(e,g,function(){d=!0,y()})),function(){null==l||l()}}},36550:function(t,e,r){"use strict";r.d(e,{z:function(){return function t(e,r,u){return(void 0===u&&(u=1/0),(0,a.m)(r))?t(function(t,o){return(0,n.U)(function(e,n){return r(t,e,o,n)})((0,i.Xf)(e(t,o)))},u):("number"==typeof r&&(u=r),(0,o.e)(function(t,r){return(0,s.p)(t,r,e,u)}))}}});var n=r(7449),i=r(96750),o=r(17753),s=r(59262),a=r(2070)},96987:function(t,e,r){"use strict";r.d(e,{Q:function(){return s}});var n=r(42903),i=r(17753),o=r(4382);function s(t,e){return void 0===e&&(e=0),(0,i.e)(function(r,i){r.subscribe((0,o.x)(i,function(r){return(0,n.f)(i,t,function(){return i.next(r)},e)},function(){return(0,n.f)(i,t,function(){return i.complete()},e)},function(r){return(0,n.f)(i,t,function(){return i.error(r)},e)}))})}},71064:function(t,e,r){"use strict";r.d(e,{B:function(){return u}});var n=r(5853),i=r(96750),o=r(82863),s=r(19142),a=r(17753);function u(t){void 0===t&&(t={});var e=t.connector,r=void 0===e?function(){return new o.x}:e,n=t.resetOnError,u=void 0===n||n,l=t.resetOnComplete,f=void 0===l||l,h=t.resetOnRefCountZero,p=void 0===h||h;return function(t){var e,n,o,l=0,h=!1,d=!1,y=function(){null==n||n.unsubscribe(),n=void 0},g=function(){y(),e=o=void 0,h=d=!1},v=function(){var t=e;g(),null==t||t.unsubscribe()};return(0,a.e)(function(t,a){l++,d||h||y();var m=o=null!=o?o:r();a.add(function(){0!=--l||d||h||(n=c(v,p))}),m.subscribe(a),!e&&l>0&&(e=new s.Hp({next:function(t){return m.next(t)},error:function(t){d=!0,y(),n=c(g,u,t),m.error(t)},complete:function(){h=!0,y(),n=c(g,f),m.complete()}}),(0,i.Xf)(t).subscribe(e))})(t)}}function c(t,e){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!0===e){t();return}if(!1!==e){var a=new s.Hp({next:function(){a.unsubscribe(),t()}});return(0,i.Xf)(e.apply(void 0,(0,n.ev)([],(0,n.CR)(r)))).subscribe(a)}}},89155:function(t,e,r){"use strict";r.d(e,{d:function(){return o}});var n=r(95978),i=r(71064);function o(t,e,r){var o,s,a,u,c=!1;return t&&"object"==typeof t?(u=void 0===(o=t.bufferSize)?1/0:o,e=void 0===(s=t.windowTime)?1/0:s,c=void 0!==(a=t.refCount)&&a,r=t.scheduler):u=null!=t?t:1/0,(0,i.B)({connector:function(){return new n.t(u,e,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},47876:function(t,e,r){"use strict";r.d(e,{R:function(){return i}});var n=r(17753);function i(t,e){return void 0===e&&(e=0),(0,n.e)(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}},60033:function(t,e,r){"use strict";r.d(e,{q:function(){return s}});var n=r(66692),i=r(17753),o=r(4382);function s(t){return t<=0?function(){return n.E}:(0,i.e)(function(e,r){var n=0;e.subscribe((0,o.x)(r,function(e){++n<=t&&(r.next(e),t<=n&&r.complete())}))})}},89634:function(t,e,r){"use strict";r.d(e,{R:function(){return a}});var n=r(17753),i=r(4382),o=r(96750),s=r(8365);function a(t){return(0,n.e)(function(e,r){(0,o.Xf)(t).subscribe((0,i.x)(r,function(){return r.complete()},s.Z)),r.closed||e.subscribe(r)})}},30867:function(t,e,r){"use strict";r.d(e,{b:function(){return a}});var n=r(2070),i=r(17753),o=r(4382),s=r(15531);function a(t,e,r){var a=(0,n.m)(t)||e||r?{next:t,error:e,complete:r}:t;return a?(0,i.e)(function(t,e){null===(r=a.subscribe)||void 0===r||r.call(a);var r,n=!0;t.subscribe((0,o.x)(e,function(t){var r;null===(r=a.next)||void 0===r||r.call(a,t),e.next(t)},function(){var t;n=!1,null===(t=a.complete)||void 0===t||t.call(a),e.complete()},function(t){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,t),e.error(t)},function(){var t,e;n&&(null===(t=a.unsubscribe)||void 0===t||t.call(a)),null===(e=a.finalize)||void 0===e||e.call(a)}))}):s.y}},78095:function(t,e,r){"use strict";r.d(e,{x:function(){return m}});var n=r(96750),i=r(96987),o=r(47876),s=r(78743),a=r(53073),u=r(2070),c=r(42903);function l(t,e){if(!t)throw Error("Iterable cannot be null");return new s.y(function(r){(0,c.f)(r,e,function(){var n=t[Symbol.asyncIterator]();(0,c.f)(r,e,function(){n.next().then(function(t){t.done?r.complete():r.next(t.value)})},0,!0)})})}var f=r(87229),h=r(84223),p=r(76613),d=r(96090),y=r(67555),g=r(46345),v=r(32450);function m(t,e){if(null!=t){if((0,f.c)(t))return(0,n.Xf)(t).pipe((0,o.R)(e),(0,i.Q)(e));if((0,p.z)(t))return new s.y(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})});if((0,h.t)(t))return(0,n.Xf)(t).pipe((0,o.R)(e),(0,i.Q)(e));if((0,y.D)(t))return l(t,e);if((0,d.T)(t))return new s.y(function(r){var n;return(0,c.f)(r,e,function(){n=t[a.h](),(0,c.f)(r,e,function(){var t,e,i;try{e=(t=n.next()).value,i=t.done}catch(t){r.error(t);return}i?r.complete():r.next(e)},0,!0)}),function(){return(0,u.m)(null==n?void 0:n.return)&&n.return()}});if((0,v.L)(t))return l((0,v.Q)(t),e)}throw(0,g.z)(t)}},8150:function(t,e,r){"use strict";r.d(e,{o:function(){return a}});var n=r(5853),i=function(t){function e(e,r){return t.call(this)||this}return(0,n.ZT)(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(r(37219).w0),o={setInterval:function(t,e){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var s=o.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,(0,n.ev)([t,e],(0,n.CR)(r))):setInterval.apply(void 0,(0,n.ev)([t,e],(0,n.CR)(r)))},clearInterval:function(t){var e=o.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},s=r(30325),a=function(t){function e(e,r){var n=t.call(this,e,r)||this;
1return n.scheduler=e,n.work=r,n.pending=!1,n}return(0,n.ZT)(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,r){return void 0===r&&(r=0),o.setInterval(t.flush.bind(t,this),r)},e.prototype.recycleAsyncId=function(t,e,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return e;null!=e&&o.clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(t,e);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var r,n=!1;try{this.work(t)}catch(t){n=!0,r=t||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,s.P)(n,this),null!=e&&(this.id=this.recycleAsyncId(r,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(i)},319:function(t,e,r){"use strict";r.d(e,{v:function(){return s}});var n=r(5853),i=r(24325),o=function(){function t(e,r){void 0===r&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(t,e,r){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(r,e)},t.now=i.l.now,t}(),s=function(t){function e(e,r){void 0===r&&(r=o.now);var n=t.call(this,e,r)||this;return n.actions=[],n._active=!1,n}return(0,n.ZT)(e,t),e.prototype.flush=function(t){var e,r=this.actions;if(this._active){r.push(t);return}this._active=!0;do if(e=t.execute(t.state,t.delay))break;while(t=r.shift());if(this._active=!1,e){for(;t=r.shift();)t.unsubscribe();throw e}},e}(o)},46593:function(t,e,r){"use strict";r.d(e,{P:function(){return o},z:function(){return i}});var n=r(8150),i=new(r(319)).v(n.o),o=i},24325:function(t,e,r){"use strict";r.d(e,{l:function(){return n}});var n={now:function(){return(n.delegate||Date).now()},delegate:void 0}},94814:function(t,e,r){"use strict";r.d(e,{z:function(){return i}});var n=r(5853),i={setTimeout:function(t,e){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var s=i.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,(0,n.ev)([t,e],(0,n.CR)(r))):setTimeout.apply(void 0,(0,n.ev)([t,e],(0,n.CR)(r)))},clearTimeout:function(t){var e=i.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0}},53073:function(t,e,r){"use strict";r.d(e,{h:function(){return n}});var n="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},27723:function(t,e,r){"use strict";r.d(e,{L:function(){return n}});var n="function"==typeof Symbol&&Symbol.observable||"@@observable"},60551:function(t,e,r){"use strict";r.d(e,{K:function(){return n}});var n=(0,r(37169).d)(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})},36023:function(t,e,r){"use strict";r.d(e,{_6:function(){return u},jO:function(){return s},yG:function(){return a}});var n=r(2070),i=r(96476);function o(t){return t[t.length-1]}function s(t){return(0,n.m)(o(t))?t.pop():void 0}function a(t){return(0,i.K)(o(t))?t.pop():void 0}function u(t,e){return"number"==typeof o(t)?t.pop():e}},47026:function(t,e,r){"use strict";r.d(e,{D:function(){return a}});var n=Array.isArray,i=Object.getPrototypeOf,o=Object.prototype,s=Object.keys;function a(t){if(1===t.length){var e=t[0];if(n(e))return{args:e,keys:null};if(e&&"object"==typeof e&&i(e)===o){var r=s(e);return{args:r.map(function(t){return e[t]}),keys:r}}}return{args:t,keys:null}}},82573:function(t,e,r){"use strict";r.d(e,{k:function(){return i}});var n=Array.isArray;function i(t){return 1===t.length&&n(t[0])?t[0]:t}},30325:function(t,e,r){"use strict";function n(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}r.d(e,{P:function(){return n}})},37169:function(t,e,r){"use strict";function n(t){var e=t(function(t){Error.call(t),t.stack=Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}r.d(e,{d:function(){return n}})},82663:function(t,e,r){"use strict";function n(t,e){return t.reduce(function(t,r,n){return t[r]=e[n],t},{})}r.d(e,{n:function(){return n}})},99287:function(t,e,r){"use strict";r.d(e,{O:function(){return s},x:function(){return o}});var n=r(80124),i=null;function o(t){if(n.v.useDeprecatedSynchronousErrorHandling){var e=!i;if(e&&(i={errorThrown:!1,error:null}),t(),e){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else t()}function s(t){n.v.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=t)}},42903:function(t,e,r){"use strict";function n(t,e,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!i)return o}r.d(e,{f:function(){return n}})},15531:function(t,e,r){"use strict";function n(t){return t}r.d(e,{y:function(){return n}})},76613:function(t,e,r){"use strict";r.d(e,{z:function(){return n}});var n=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},67555:function(t,e,r){"use strict";r.d(e,{D:function(){return i}});var n=r(2070);function i(t){return Symbol.asyncIterator&&(0,n.m)(null==t?void 0:t[Symbol.asyncIterator])}},13746:function(t,e,r){"use strict";function n(t){return t instanceof Date&&!isNaN(t)}r.d(e,{q:function(){return n}})},2070:function(t,e,r){"use strict";function n(t){return"function"==typeof t}r.d(e,{m:function(){return n}})},87229:function(t,e,r){"use strict";r.d(e,{c:function(){return o}});var n=r(27723),i=r(2070);function o(t){return(0,i.m)(t[n.L])}},96090:function(t,e,r){"use strict";r.d(e,{T:function(){return o}});var n=r(53073),i=r(2070);function o(t){return(0,i.m)(null==t?void 0:t[n.h])}},79473:function(t,e,r){"use strict";r.d(e,{b:function(){return o}});var n=r(78743),i=r(2070);function o(t){return!!t&&(t instanceof n.y||(0,i.m)(t.lift)&&(0,i.m)(t.subscribe))}},84223:function(t,e,r){"use strict";r.d(e,{t:function(){return i}});var n=r(2070);function i(t){return(0,n.m)(null==t?void 0:t.then)}},32450:function(t,e,r){"use strict";r.d(e,{L:function(){return s},Q:function(){return o}});var n=r(5853),i=r(2070);function o(t){return(0,n.FC)(this,arguments,function(){var e,r,i;return(0,n.Jh)(this,function(o){switch(o.label){case 0:e=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,(0,n.qq)(e.read())];case 3:if(i=(r=o.sent()).value,!r.done)return[3,5];return[4,(0,n.qq)(void 0)];case 4:return[2,o.sent()];case 5:return[4,(0,n.qq)(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function s(t){return(0,i.m)(null==t?void 0:t.getReader)}},96476:function(t,e,r){"use strict";r.d(e,{K:function(){return i}});var n=r(2070);function i(t){return t&&(0,n.m)(t.schedule)}},17753:function(t,e,r){"use strict";r.d(e,{A:function(){return i},e:function(){return o}});var n=r(2070);function i(t){return(0,n.m)(null==t?void 0:t.lift)}function o(t){return function(e){if(i(e))return e.lift(function(e){try{return t(e,this)}catch(t){this.error(t)}});throw TypeError("Unable to lift unknown Observable type")}}},59326:function(t,e,r){"use strict";r.d(e,{Z:function(){return s}});var n=r(5853),i=r(7449),o=Array.isArray;function s(t){return(0,i.U)(function(e){return o(e)?t.apply(void 0,(0,n.ev)([],(0,n.CR)(e))):t(e)}
1)}},8365:function(t,e,r){"use strict";function n(){}r.d(e,{Z:function(){return n}})},95767:function(t,e,r){"use strict";r.d(e,{U:function(){return o},z:function(){return i}});var n=r(15531);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return 0===t.length?n.y:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}},67444:function(t,e,r){"use strict";r.d(e,{h:function(){return o}});var n=r(80124),i=r(94814);function o(t){i.z.setTimeout(function(){var e=n.v.onUnhandledError;if(e)e(t);else throw t})}},46345:function(t,e,r){"use strict";function n(t){return TypeError("You provided "+(null!==t&&"object"==typeof t?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}r.d(e,{z:function(){return n}})},40211:function(t,e,r){"use strict";r.d(e,{E9:function(){return a},Y$:function(){return l},ah:function(){return g},p4:function(){return d}});var n,i,o=r(48769);let s=new WeakMap;function a(t){return{config:t,start:(e,r)=>{let{self:n,system:i,emit:o}=r,a={receivers:void 0,dispose:void 0};s.set(n,a),a.dispose=t({input:e.input,system:i,self:n,sendBack:t=>{"stopped"!==n.getSnapshot().status&&n._parent&&i._relay(n,n._parent,t)},receive:t=>{a.receivers??=new Set,a.receivers.add(t)},emit:o})},transition:(t,e,r)=>{let n=s.get(r.self);return e.type===o.X?(t={...t,status:"stopped",error:void 0},n.dispose?.()):n.receivers?.forEach(t=>t(e)),t},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}let u="xstate.observable.error",c="xstate.observable.complete";function l(t){return{config:t,transition:(t,e)=>{if("active"!==t.status)return t;switch(e.type){case u:return{...t,status:"error",error:e.data,input:void 0,_subscription:void 0};case c:return{...t,status:"done",input:void 0,_subscription:void 0};case o.X:return t._subscription.unsubscribe(),{...t,status:"stopped",input:void 0,_subscription:void 0};default:return t}},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,context:void 0,input:e,_subscription:void 0}),start:(e,{self:r,system:n,emit:i})=>{"done"!==e.status&&(e._subscription=t({input:e.input,system:n,self:r,emit:i}).subscribe({next:t=>{r._parent&&n._relay(r,r._parent,t)},error:t=>{n._relay(r,r,{type:u,data:t})},complete:()=>{n._relay(r,r,{type:c})}}))},getPersistedSnapshot:({_subscription:t,...e})=>e,restoreSnapshot:t=>({...t,_subscription:void 0})}}let f="xstate.promise.resolve",h="xstate.promise.reject",p=new WeakMap;function d(t){return{config:t,transition:(t,e,r)=>{if("active"!==t.status)return t;switch(e.type){case f:{let r=e.data;return{...t,status:"done",output:r,input:void 0}}case h:return{...t,status:"error",error:e.data,input:void 0};case o.X:return p.get(r.self)?.abort(),{...t,status:"stopped",input:void 0};default:return t}},start:(e,{self:r,system:n,emit:i})=>{if("active"!==e.status)return;let o=new AbortController;p.set(r,o),Promise.resolve(t({input:e.input,system:n,self:r,signal:o.signal,emit:i})).then(t=>{"active"===r.getSnapshot().status&&(p.delete(r),n._relay(r,r,{type:f,data:t}))},t=>{"active"===r.getSnapshot().status&&(p.delete(r),n._relay(r,r,{type:h,data:t}))})},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}let y=(i=void 0,{config:n=t=>void 0,transition:(t,e,r)=>({...t,context:n(t.context,e,r)}),getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,context:"function"==typeof i?i({input:e}):i}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t});function g(){return(0,o.A)(y)}},87746:function(t,e,r){"use strict";r.d(e,{a:function(){return s},b:function(){return v},c:function(){return d},e:function(){return c},s:function(){return y}});var n,i=r(48769);function o(t,e,r,n,{assignment:o}){if(!e.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let s={},a={context:e.context,event:r.event,spawn:function(t,{machine:e,context:r},n,o){let s=(s,a)=>
1{if("string"!=typeof s)return(0,i.A)(s,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:a?.input,src:s,systemId:a?.systemId});{let u=(0,i.z)(e,s);if(!u)throw Error(`Actor logic '${s}' not implemented in machine '${e.id}'`);let c=(0,i.A)(u,{id:a?.id,parent:t.self,syncSnapshot:a?.syncSnapshot,input:"function"==typeof a?.input?a.input({context:r,event:n,self:t.self}):a?.input,src:s,systemId:a?.systemId});return o[c.id]=c,c}};return(e,r)=>{let n=s(e,r);return o[n.id]=n,t.defer(()=>{n._processingStatus!==i.T.Stopped&&n.start()}),n}}(t,e,r.event,s),self:t.self,system:t.system},u={};if("function"==typeof o)u=o(a,n);else for(let t of Object.keys(o)){let e=o[t];u[t]="function"==typeof e?e(a,n):e}let c=Object.assign({},e.context,u);return[(0,i.U)(e,{context:c,children:Object.keys(s).length?{...e.children,...s}:e.children}),void 0,void 0]}function s(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=o,e}function a(t,e,r,n,{event:i}){return[e,{event:"function"==typeof i?i(r,n):i},void 0]}function u(t,{event:e}){t.defer(()=>t.emit(e))}function c(t){function e(t,e){}return e.type="xstate.emit",e.event=t,e.resolve=a,e.execute=u,e}let l=((n={}).Parent="#_parent",n.Internal="#_internal",n);function f(t,e,r,n,{to:i,event:o,id:s,delay:a},u){let c,f;let h=e.machine.implementations.delays;if("string"==typeof o)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${o}" }) instead`);let p="function"==typeof o?o(r,n):o;if("string"==typeof a){let t=h&&h[a];c="function"==typeof t?t(r,n):t}else c="function"==typeof a?a(r,n):a;let d="function"==typeof i?i(r,n):i;if("string"==typeof d){if(!(f=d===l.Parent?t.self._parent:d===l.Internal?t.self:d.startsWith("#_")?e.children[d.slice(2)]:u.deferredActorIds?.includes(d)?d:e.children[d]))throw Error(`Unable to send event to actor '${d}' from machine '${e.machine.id}'.`)}else f=d||t.self;return[e,{to:f,targetId:"string"==typeof d?d:void 0,event:p,id:s,delay:c},void 0]}function h(t,e,r){"string"==typeof r.to&&(r.to=e.children[r.to])}function p(t,e){t.defer(()=>{let{to:r,event:n,delay:o,id:s}=e;if("number"==typeof o){t.system.scheduler.schedule(t.self,r,n,o,s);return}t.system._relay(t.self,r,n.type===i.V?(0,i.W)(t.self.id,n.data):n)})}function d(t,e,r){function n(t,e){}return n.type="xstate.sendTo",n.to=t,n.event=e,n.id=r?.id,n.delay=r?.delay,n.resolve=f,n.retryResolve=h,n.execute=p,n}function y(t,e){return d(l.Parent,t,e)}function g(t,e,r,n,{collect:o}){let a=[],u=function(t){a.push(t)};return u.assign=(...t)=>{a.push(s(...t))},u.cancel=(...t)=>{a.push((0,i.M)(...t))},u.raise=(...t)=>{a.push((0,i.O)(...t))},u.sendTo=(...t)=>{a.push(d(...t))},u.sendParent=(...t)=>{a.push(y(...t))},u.spawnChild=(...t)=>{a.push((0,i.P)(...t))},u.stopChild=(...t)=>{a.push((0,i.R)(...t))},u.emit=(...t)=>{a.push(c(...t))},o({context:r.context,event:r.event,enqueue:u,check:t=>(0,i.e)(t,e.context,r.event,e),self:t.self,system:t.system},n),[e,void 0,a]}function v(t){function e(t,e){}return e.type="xstate.enqueueActions",e.collect=t,e.resolve=g,e}},48769:function(t,e,r){"use strict";var n;r.d(e,{$:function(){return R},A:function(){return q},D:function(){return V},E:function(){return W},G:function(){return H},L:function(){return S},M:function(){return D},N:function(){return a},O:function(){return tL},P:function(){return L},R:function(){return z},S:function(){return s},T:function(){return k},U:function(){return tP},V:function(){return c},W:function(){return h},X:function(){return l},a:function(){return E},b:function(){return ta},c:function(){return C},d:function(){return tc},e:function(){return G},f:function(){return tu},g:function(){return ts},h:function(){return to},i:function(){return tt},j:function(){return tg},k:function(){return tU},l:function(){return tn},m:function(){return m},n:function(){return tI},o:function(){return function t(e,r,n,i){return"string"==typeof r?function(t,e,r,n){let i=td(t,e).next(r,n);return i&&i.length?i:t.next(r,n)}(e,r,n,i):1===Object.keys(r).length?function(e,r,n,i){let o=Object.keys(r),s=t(td(e,o[0]),r[o[0]],n,i);return s&&s.length?s:e.next(n,i)}(e,r,n,i):function(e,r,n,i){let o=[];for(let s of Object.keys(r)){let a=r[s];if(!a)continue;let u=t(td(e,s),a,n,i);u&&o.push(...u)}return o.length?o:e.next(n,i)}(e,r,n,i)}},p:function(){return tC},q:function(){return p},r:function(){return tO},s:function(){return tE},t:function(){return b},u:function(){return tp}
1,v:function(){return g},w:function(){return ti},x:function(){return ty},y:function(){return tD},z:function(){return I}});let i=t=>{if("undefined"==typeof window)return;let e=function(){let t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:void 0;if(t.__xstate__)return t.__xstate__}();e&&e.register(t)};class o{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){let e={value:t,next:null};if(this._current){this._last.next=e,this._last=e;return}this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){let t=this._current;this._process(t.value),this._current=t.next}this._last=null}}let s=".",a="",u="xstate.init",c="xstate.error",l="xstate.stop";function f(t,e){return{type:`xstate.done.state.${t}`,output:e}}function h(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}function p(t){return{type:u,input:t}}function d(t){setTimeout(()=>{throw t})}let y="function"==typeof Symbol&&Symbol.observable||"@@observable";function g(t){if(x(t))return t;let e=[],r="";for(let n=0;n<t.length;n++){switch(t.charCodeAt(n)){case 92:r+=t[n+1],n++;continue;case 46:e.push(r),r="";
1continue}r+=t[n]}return e.push(r),e}function v(t){return t&&"object"==typeof t&&"machine"in t&&"value"in t?t.value:"string"!=typeof t?t:function(t){if(1===t.length)return t[0];let e={},r=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)r[t[e]]=t[e+1];else{let n=r;r={},n[t[e]]=r}return e}(g(t))}function m(t,e){let r={},n=Object.keys(t);for(let i=0;i<n.length;i++){let o=n[i];r[o]=e(t[o],o,t,i)}return r}function b(t){return void 0===t?[]:x(t)?t:[t]}function w(t,e,r,n){return"function"==typeof t?t({context:e,event:r,self:n}):t}function x(t){return Array.isArray(t)}function E(t){return(x(t)?t:[t]).map(t=>void 0===t||"string"==typeof t?{target:t}:t)}function _(t){if(void 0!==t&&""!==t)return b(t)}function S(t,e,r){let n="object"==typeof t,i=n?t:void 0;return{next:(n?t.next:t)?.bind(i),error:(n?t.error:e)?.bind(i),complete:(n?t.complete:r)?.bind(i)}}function C(t,e){return`${e}.${t}`}function I(t,e){let r=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!r)return t.implementations.actors[e];let[,n,i]=r,o=t.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[n]:o).src}function T(t,e){return`${t.sessionId}.${e}`}let A=0,O=!1,R=1,k=((n={})[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped",n),$={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};
1class j{constructor(t,e){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new o(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=k.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];let r={...$,...e},{clock:n,logger:i,parent:s,syncSnapshot:a,id:u,systemId:c,inspect:l}=r;this.system=s?s.system:function(t,e){let r=new Map,n=new Map,i=new WeakMap,o=new Set,s={},{clock:a,logger:u}=e,c={schedule:(t,e,r,n,i=Math.random().toString(36).slice(2))=>{let o={source:t,target:e,event:r,delay:n,id:i,startedAt:Date.now()},u=T(t,i);l._snapshot._scheduledEvents[u]=o;let c=a.setTimeout(()=>{delete s[u],delete l._snapshot._scheduledEvents[u],l._relay(t,e,r)},n);s[u]=c},cancel:(t,e)=>{let r=T(t,e),n=s[r];delete s[r],delete l._snapshot._scheduledEvents[r],void 0!==n&&a.clearTimeout(n)},cancelAll:t=>{for(let e in l._snapshot._scheduledEvents){let r=l._snapshot._scheduledEvents[e];r.source===t&&c.cancel(t,r.id)}}},l={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${A++}`,_register:(t,e)=>(r.set(t,e),t),_unregister:t=>{r.delete(t.sessionId);let e=i.get(t);void 0!==e&&(n.delete(e),i.delete(t))},get:t=>n.get(t),_set:(t,e)=>{let r=n.get(t);if(r&&r!==e)throw Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),i.set(e,t)},inspect:t=>{let e=S(t);return o.add(e),{unsubscribe(){o.delete(e)}}},_sendInspectionEvent:e=>{if(!o.size)return;let r={...e,rootId:t.sessionId};o.forEach(t=>t.next?.(r))},_relay:(t,e,r)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:r}),e._send(r)},scheduler:c,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{let t=l._snapshot._scheduledEvents;for(let e in l._snapshot._scheduledEvents={},t){let{source:r,target:n,event:i,delay:o,id:s}=t[e];c.schedule(r,n,i,o,s)}},_clock:a,_logger:u};return l}(this,{clock:n,logger:i}),l&&!s&&this.system.inspect(S(l)),this.sessionId=this.system._bookId(),this.id=u??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=s,this._syncSnapshot=a,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:t=>{this._deferred.push(t)},system:this.system,stopChild:t=>{if(t._parent!==this)throw Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()},emit:t=>{let e=this.eventListeners.get(t.type),r=this.eventListeners.get("*");if(e||r)for(let n of[...e?e.values():[],...r?r.values():[]])n(t)},actionExecutor:t=>{let e=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:t.type,params:t.params}}),!t.exec)return;let e=O;try{O=!0,t.exec(t.info,t.params)}finally{O=e}};this._processingStatus===k.Running?e():this._deferred.push(e)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),c&&(this._systemId=c,this.system._set(c,this)),this._initState(e?.snapshot??e?.state),c&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(t){try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(t){this._snapshot={status:"error",output:void 0,error:t}}}update(t,e){let r;for(this._snapshot=t;r=this._deferred.shift();)try{r()}catch(e){this._deferred.length=0,this._snapshot={...t,status:"error",error:e}}switch(this._snapshot.status){case"active":for(let e of this.observers)try{e.next?.(t)}catch(t){d(t)}break;case"done":var n;for(let e of this.observers)try{e.next?.(t)}catch(t){d(t)}this._stopProcedure(),this._complete(),this._doneEvent=(n=this.id,{type:`xstate.done.actor.${n}`,output:this._snapshot.output,actorId:n}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:e,snapshot:t})}subscribe(t,e,r){let n=S(t,e,r);
1if(this._processingStatus!==k.Stopped)this.observers.add(n);else switch(this._snapshot.status){case"done":try{n.complete?.()}catch(t){d(t)}break;case"error":{let t=this._snapshot.error;if(n.error)try{n.error(t)}catch(t){d(t)}else d(t)}}return{unsubscribe:()=>{this.observers.delete(n)}}}on(t,e){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));let n=e.bind(void 0);return r.add(n),{unsubscribe:()=>{r.delete(n)}}}start(){if(this._processingStatus===k.Running)return this;this._syncSnapshot&&this.subscribe({next:t=>{"active"===t.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:t})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=k.Running;let t=p(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(t){return this._snapshot={...this._snapshot,status:"error",error:t},this._error(t),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,r;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(t){r={err:t}}if(r){let{err:t}=r;this._snapshot={...this._snapshot,status:"error",error:t},this._error(t);return}this.update(e,t),t.type===l&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===k.Stopped||((this.mailbox.clear(),this._processingStatus===k.NotStarted)?this._processingStatus=k.Stopped:this.mailbox.enqueue({type:l})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let t of this.observers)try{t.complete?.()}catch(t){d(t)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||d(t);return}let e=!1;for(let r of this.observers){let n=r.error;e||=!n;try{n?.(t)}catch(t){d(t)}}this.observers.clear(),e&&d(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,h(this.id,t))}_stopProcedure(){return this._processingStatus!==k.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new o(this._process.bind(this)),this._processingStatus=k.Stopped,this.system._unregister(this)),this}_send(t){this._processingStatus!==k.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){let{devTools:t}=this.options;t&&("function"==typeof t?t:i)(this)}toJSON(){return{xstate$$type:R,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[y](){return this}getSnapshot(){return this._snapshot}}function q(t,...[e]){return new j(t,e)}function U(t,e,r,n,{sendId:i}){return[e,{sendId:"function"==typeof i?i(r,n):i},void 0]}function P(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function D(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=U,e.execute=P,e}function B(t,e,r,n,{id:i,systemId:o,src:s,input:a,syncSnapshot:u}){let c,l;let f="string"==typeof s?I(e.machine,s):s,h="function"==typeof i?i(r):i;return f&&(l="function"==typeof a?a({context:e.context,event:r.event,self:t.self}):a,c=q(f,{id:h,src:s,parent:t.self,syncSnapshot:u,systemId:o,input:l})),[tP(e,{children:{...e.children,[h]:c}}),{id:i,systemId:o,actorRef:c,src:s,input:l},void 0]}function M(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==k.Stopped&&e.start()})}function L(...[t,{id:e,systemId:r,input:n,syncSnapshot:i=!1}={}]){function o(t,e){}return o.type="xstate.spawnChild",o.id=e,o.systemId=r,o.src=t,o.input=n,o.syncSnapshot=i,o.resolve=B,o.execute=M,o}function N(t,e,r,n,{actorRef:i}){let o="function"==typeof i?i(r,n):i,s="string"==typeof o?e.children[o]:o,a=e.children;return s&&(a={...a},delete a[s.id]),[tP(e,{children:a}),s,void 0]}function F(t,e){if(e){if(t.system._unregister(e),e._processingStatus!==k.Running){t.stopChild(e);return}t.defer(()=>{t.stopChild(e)})}}function z(t){function e(t,e){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=N,e.execute=F,e}function Z(t,e,{stateValue:r}){if("string"==typeof r&&ti(r)){let e=t.machine.getStateNodeById(r);return t._nodes.some(t=>t===e)}return t.matches(r)}function H(t){function e(){return!1}return e.check=Z,e.stateValue=t,e}function J(t,{context:e,event:r},{guards:n}){return!G(n[0],e,r,t)}function W(t){function e(t,e){return!1}return e.check=J,e.guards=[t],e}function X(t,{context:e,event:r},{guards:n}){return n.every(n=>G(n,e,r,t))}function V(t){function e(t,e){return!1}return e.check=X,e.guards=t,e}function G(t,e,r,n){let{machine:i}=n,o="function"==typeof t,s=o?t:i.implementations.guards["string"==typeof t?t:t.type];if(!o&&!s)throw Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof s)return G(s,e,r,n);let a={context:e,event:r},u=o||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:r}):t.params:void 0;return"check"in s?s.check(n,a,s):s(a,u)}let Y=t=>"atomic"===t.type||"final"===t.type;function K(t){return Object.values(t.states).filter(t=>"history"!==t.type)}function Q(t,e){let r=[];if(e===t)return r;let n=t.parent;for(;n&&n!==e;)r.push(n),n=n.parent;return r}function tt(t){let e=new Set(t),r=te(e);for(let t of e)if("compound"!==t.type||r.get(t)&&r.get(t).length){if("parallel"===t.type){for(let r of K(t))if("history"!==r.type&&!e.has(r))for(let t of th(r))e.add(t)}}else th(t).forEach(t=>e.add(t));for(let t of e){let r=t.parent;for(;r;)e.add(r),r=r.parent}return e}function te(t){let e=new Map;for(let r of t)e.has(r)||e.set(r,[]),r.parent&&(e.has(r.parent)||e.set(r.parent,[]),e.get(r.parent).push(r));return e}function tr(t,e){return function t(e,r){let n=r.get(e);if(!n)return{};if("compound"===e.type){let t=n[0];if(!t)return{};if(Y(t))return t.key}let i={};for(let e of n)i[e.key]=t(e,r);return i}(t,te(tt(e)))}function tn(t,e){return"compound"===e.type?K(e).some(e=>"final"===e.type&&t.has(e)):"parallel"===e.type?K(e).every(e=>tn(t,e)):"final"===e.type}let ti=t=>"#"===t[0];function to(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter(t=>{if("*"===t)return!0;
1if(!t.endsWith(".*"))return!1;let r=t.split("."),n=e.split(".");for(let t=0;t<r.length;t++){let e=r[t],i=n[t];if("*"===e)return t===r.length-1;if(e!==i)return!1}return!0}).sort((t,e)=>e.length-t.length).flatMap(e=>t.transitions.get(e))}function ts(t){let e=t.config.after;if(!e)return[];let r=e=>{var r;let n=(r=t.id,{type:`xstate.after.${e}.${r}`}),i=n.type;return t.entry.push(tL(n,{id:i,delay:e})),t.exit.push(D(i)),i};return Object.keys(e).flatMap(t=>{let n=e[t],i=Number.isNaN(+t)?t:+t,o=r(i);return b("string"==typeof n?{target:n}:n).map(t=>({...t,event:o,delay:i}))}).map(e=>{let{delay:r}=e;return{...ta(t,e.event,e),delay:r}})}function ta(t,e,r){let n=_(r.target),i=r.reenter??!1,o=function(t,e){if(void 0!==e)return e.map(e=>{if("string"!=typeof e)return e;if(ti(e))return t.machine.getStateNodeById(e);let r=e[0]===s;if(r&&!t.parent)return ty(t,e.slice(1));let n=r?t.key+e:e;if(t.parent)try{return ty(t.parent,n)}catch(e){throw Error(`Invalid transition definition for state node '${t.id}':
2${e.message}`)}else throw Error(`Invalid target: "${e}" is not a valid target from the root node. Did you mean ".${e}"?`)})}(t,n),a={...r,actions:b(r.actions),guard:r.guard,target:o,source:t,reenter:i,eventType:e,toJSON:()=>({...a,source:`#${t.id}`,target:o?o.map(t=>`#${t.id}`):void 0})};return a}function tu(t){let e=new Map;if(t.config.on)for(let r of Object.keys(t.config.on)){if(r===a)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let n=t.config.on[r];e.set(r,E(n).map(e=>ta(t,r,e)))}if(t.config.onDone){let r=`xstate.done.state.${t.id}`;e.set(r,E(t.config.onDone).map(e=>ta(t,r,e)))}for(let r of t.invoke){if(r.onDone){let n=`xstate.done.actor.${r.id}`;e.set(n,E(r.onDone).map(e=>ta(t,n,e)))}if(r.onError){let n=`xstate.error.actor.${r.id}`;e.set(n,E(r.onError).map(e=>ta(t,n,e)))}if(r.onSnapshot){let n=`xstate.snapshot.${r.id}`;e.set(n,E(r.onSnapshot).map(e=>ta(t,n,e)))}}for(let r of t.after){let t=e.get(r.eventType);t||(t=[],e.set(r.eventType,t)),t.push(r)}return e}function tc(t,e){let r="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!r&&e)throw Error(`Initial state node "${e}" not found on parent state node #${t.id}`);let n={source:t,actions:e&&"string"!=typeof e?b(e.actions):[],eventType:null,reenter:!1,target:r?[r]:[],toJSON:()=>({...n,source:`#${t.id}`,target:r?[`#${r.id}`]:[]})};return n}function tl(t){let e=_(t.config.target);return e?{target:e.map(e=>"string"==typeof e?ty(t.parent,e):e)}:t.parent.initial}function tf(t){return"history"===t.type}function th(t){let e=tp(t);for(let r of e)for(let n of Q(r,t))e.add(n);return e}function tp(t){let e=new Set;return!function t(r){if(!e.has(r)){if(e.add(r),"compound"===r.type)t(r.initial.target[0]);else if("parallel"===r.type)for(let e of K(r))t(e)}}(t),e}function td(t,e){if(ti(e))return t.machine.getStateNodeById(e);if(!t.states)throw Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);let r=t.states[e];if(!r)throw Error(`Child state '${e}' does not exist on '${t.id}'`);return r}function ty(t,e){if("string"==typeof e&&ti(e))try{return t.machine.getStateNodeById(e)}catch{}let r=g(e).slice(),n=t;for(;r.length;){let t=r.shift();if(!t.length)break;n=td(n,t)}return n}function tg(t,e){if("string"==typeof e){let r=t.states[e];if(!r)throw Error(`State '${e}' does not exist on '${t.id}'`);return[t,r]}let r=Object.keys(e),n=r.map(e=>td(t,e)).filter(Boolean);return[t.machine.root,t].concat(n,r.reduce((r,n)=>{let i=td(t,n);if(!i)return r;let o=tg(i,e[n]);return r.concat(o)},[]))}function tv(t,e){let r=t;for(;r.parent&&r.parent!==e;)r=r.parent;return r.parent===e}function tm(t,e,r){let n=new Set;for(let i of t){let t=!1,o=new Set;for(let s of n)if(function(t,e){let r=new Set(t),n=new Set(e);for(let t of r)if(n.has(t))return!0;for(let t of n)if(r.has(t))return!0;return!1}(tx([i],e,r),tx([s],e,r))){if(tv(i.source,s.source))o.add(s);else{t=!0;break}}if(!t){for(let t of o)n.delete(t);n.add(i)}}return Array.from(n)}function tb(t,e){if(!t.target)return[];let r=new Set;for(let n of t.target)if(tf(n)){if(e[n.id])for(let t of e[n.id])r.add(t);else for(let t of tb(tl(n),e))r.add(t)}else r.add(n);return[...r]}function tw(t,e){let r=tb(t,e);if(!r)return;if(!t.reenter&&r.every(e=>
2e===t.source||tv(e,t.source)))return t.source;let n=function(t){let[e,...r]=t;for(let t of Q(e,void 0))if(r.every(e=>tv(e,t)))return t}(r.concat(t.source));return n||(t.reenter?void 0:t.source.machine.root)}function tx(t,e,r){let n=new Set;for(let i of t)if(i.target?.length){let t=tw(i,r);for(let r of(i.reenter&&i.source===t&&n.add(t),e))tv(r,t)&&n.add(r)}return[...n]}function tE(t,e,r,n,i,o){if(!t.length)return e;let s=new Set(e._nodes),a=e.historyValue,u=tm(t,s,a),c=e;i||([c,a]=function(t,e,r,n,i,o,s,a){let u,c=t,l=tx(n,i,o);for(let t of(l.sort((t,e)=>e.order-t.order),l))for(let e of function(t){return Object.keys(t.states).map(e=>t.states[e]).filter(t=>"history"===t.type)}(t)){let r;r="deep"===e.history?e=>Y(e)&&tv(e,t):e=>e.parent===t,(u??={...o})[e.id]=Array.from(i).filter(r)}for(let t of l)c=tC(c,e,r,[...t.exit,...t.invoke.map(t=>z(t.id))],s,void 0),i.delete(t);return[c,u||o]}(c,n,r,u,s,a,o,r.actionExecutor)),c=function(t,e,r,n,i,o,s,a){let u=t,c=new Set,l=new Set;(function(t,e,r,n){for(let i of t){let t=tw(i,e);for(let o of i.target||[])!tf(o)&&(i.source!==o||i.source!==t||i.reenter)&&(n.add(o),r.add(o)),t_(o,e,r,n);for(let o of tb(i,e)){let s=Q(o,t);t?.type==="parallel"&&s.push(t),tS(n,e,r,s,!i.source.parent&&i.reenter?void 0:t)}}})(n,s,l,c),a&&l.add(t.machine.root);let h=new Set;for(let t of[...c].sort((t,e)=>t.order-e.order)){i.add(t);let n=[];for(let e of(n.push(...t.entry),t.invoke))n.push(L(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(l.has(t)){let e=t.initial.actions;n.push(...e)}if(u=tC(u,e,r,n,o,t.invoke.map(t=>t.id)),"final"===t.type){let n=t.parent,s=n?.type==="parallel"?n:n?.parent,a=s||t;for(n?.type==="compound"&&o.push(f(n.id,void 0!==t.output?w(t.output,u.context,e,r.self):void 0));s?.type==="parallel"&&!h.has(s)&&tn(i,s);)h.add(s),o.push(f(s.id)),a=s,s=s.parent;if(s)continue;u=tP(u,{status:"done",output:function(t,e,r,n,i){if(void 0===n.output)return;let o=f(i.id,void 0!==i.output&&i.parent?w(i.output,t.context,e,r.self):void 0);return w(n.output,t.context,o,r.self)}(u,e,r,u.machine.root,a)})}}return u}(c=tC(c,n,r,u.flatMap(t=>t.actions),o,void 0),n,r,u,s,o,a,i);let l=[...s];"done"===c.status&&(c=tC(c,n,r,l.sort((t,e)=>e.order-t.order).flatMap(t=>t.exit),o,void 0));try{if(a===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}(e._nodes,s))return c;return tP(c,{_nodes:l,historyValue:a})}catch(t){throw t}}function t_(t,e,r,n){if(tf(t)){if(e[t.id]){let i=e[t.id];for(let t of i)n.add(t),t_(t,e,r,n);for(let o of i)tS(n,e,r,Q(o,t.parent))}else{let i=tl(t);for(let o of i.target)n.add(o),i===t.parent?.initial&&r.add(t.parent),t_(o,e,r,n);for(let o of i.target)tS(n,e,r,Q(o,t.parent))}}else if("compound"===t.type){let[i]=t.initial.target;tf(i)||(n.add(i),r.add(i)),t_(i,e,r,n),tS(n,e,r,Q(i,t))}else if("parallel"===t.type)for(let i of K(t).filter(t=>!tf(t)))[...n].some(t=>tv(t,i))||(tf(i)||(n.add(i),r.add(i)),t_(i,e,r,n))}function tS(t,e,r,n,i){for(let o of n)if((!i||tv(o,i))&&t.add(o),"parallel"===o.type)for(let n of K(o).filter(t=>!tf(t)))[...t].some(t=>tv(t,n))||(t.add(n),t_(n,e,r,t))}function tC(t,e,r,n,i,o){let s=o?[]:void 0,a=function t(e,r,n,i,o,s){let{machine:a}=e,u=e;for(let e of i){var c;let i="function"==typeof e,l=i?e:(c="string"==typeof e?e:e.type,a.implementations.actions[c]),f={context:u.context,event:r,self:n.self,system:n.system},h=i||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:u.context,event:r}):e.params:void 0;if(!l||!("resolve"in l)){n.actionExecutor({type:"string"==typeof e?e:"object"==typeof e?e.type:e.name||"(anonymous)",info:f,params:h,exec:l});continue}let[p,d,y]=l.resolve(n,u,f,h,l,o);u=p,"retryResolve"in l&&s?.push([l,d]),"execute"in l&&n.actionExecutor({type:l.type,info:f,params:d,exec:l.execute.bind(null,n,d)}),y&&(u=t(u,r,n,y,o,s))}return u}(t,e,r,n,{internalQueue:i,deferredActorIds:o},s);return s?.forEach(([t,e])=>{t.retryResolve(r,a,e)}),a}function tI(t,e,r,n){let i=t,o=[];function s(t,e,n){r.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:r.self,event:e,snapshot:t,_transitions:n}),o.push(t)}if(e.type===l)return s(i=tP(tT(i,e,r),{status:"stopped"}),e,[]),{snapshot:i,microstates:o};let a=e;if(a.type!==u){let e=a,u=e.type.startsWith("xstate.error.actor"),c=tA(e,i);if(u&&!c.length)return s(i=tP(t,{status:"error",error:e.error}),e,[]),{snapshot:i,microstates:o};s(i=tE(c,t,r,a,!1,n),e,c)}let c=!0;for(;"active"===i.status;){let t=c?function(t,e){let r=new Set;for(let n of t._nodes.filter(Y))t:for(let i of[n].concat(Q(n,void 0)))if(i.always){for(let n of i.always)if(void 0===n.guard||G(n.guard,t.context,e,t)){r.add(n);break t}}return tm(Array.from(r),new Set(t._nodes),t.historyValue)}
2(i,a):[],e=t.length?i:void 0;if(!t.length){if(!n.length)break;t=tA(a=n.shift(),i)}c=(i=tE(t,i,r,a,!1,n))!==e,s(i,a,t)}return"active"!==i.status&&tT(i,a,r),{snapshot:i,microstates:o}}function tT(t,e,r){return tC(t,e,r,Object.values(t.children).map(t=>z(t)),[],void 0)}function tA(t,e){return e.machine.getTransitionData(e,t)}function tO(t,e){let r=tt(tg(t,e));return tr(t,[...r])}let tR=function(t){return function t(e,r){let n=v(e),i=v(r);return"string"==typeof i?"string"==typeof n&&i===n:"string"==typeof n?n in i:Object.keys(n).every(e=>e in i&&t(n[e],i[e]))}(t,this.value)},tk=function(t){return this.tags.has(t)},t$=function(t){let e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(t=>void 0!==t.target||t.actions.length)},tj=function(){let{_nodes:t,tags:e,machine:r,getMeta:n,toJSON:i,can:o,hasTag:s,matches:a,...u}=this;return{...u,tags:Array.from(e)}},tq=function(){return this._nodes.reduce((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t),{})};function tU(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:tr(e.root,t._nodes),tags:new Set(t._nodes.flatMap(t=>t.tags)),children:t.children,historyValue:t.historyValue||{},matches:tR,hasTag:tk,can:t$,getMeta:tq,toJSON:tj}}function tP(t,e={}){return tU({...t,...e},t.machine)}function tD(t,e){let{_nodes:r,tags:n,machine:i,children:o,context:s,can:a,hasTag:u,matches:c,getMeta:l,toJSON:f,...h}=t,p={};for(let t in o){let r=o[t];p[t]={snapshot:r.getPersistedSnapshot(e),src:r.src,systemId:r._systemId,syncSnapshot:r._syncSnapshot}}return{...h,context:function t(e){let r;for(let n in e){let i=e[n];if(i&&"object"==typeof i){if("sessionId"in i&&"send"in i&&"ref"in i)(r??=Array.isArray(e)?e.slice():{...e})[n]={xstate$$type:R,id:i.id};else{let o=t(i);o!==i&&((r??=Array.isArray(e)?e.slice():{...e})[n]=o)}}}return r??e}(s),children:p}}function tB(t,e,r,n,{event:i,id:o,delay:s},{internalQueue:a}){let u;let c=e.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with raise; use raise({ type: "${i}" }) instead`);let l="function"==typeof i?i(r,n):i;if("string"==typeof s){let t=c&&c[s];u="function"==typeof t?t(r,n):t}else u="function"==typeof s?s(r,n):s;return"number"!=typeof u&&a.push(l),[e,{event:l,id:o,delay:u},void 0]}function tM(t,e){let{event:r,delay:n,id:i}=e;if("number"==typeof n){t.defer(()=>{let e=t.self;t.system.scheduler.schedule(e,e,r,n,i)});return}}function tL(t,e){function r(t,e){}return r.type="xstate.raise",r.event=t,r.id=e?.id,r.delay=e?.delay,r.resolve=tB,r.execute=tM,r}},25181:function(t,e,r){"use strict";r.d(e,{ZD:function(){return o},cY:function(){return h}}),r(40211);var n=r(48769),i=r(87746);function o(t,e){let r=(0,n.t)(e);if(!r.includes(t.type)){let e=1===r.length?`type "${r[0]}"`:`one of types "${r.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(t)} to have ${e}`)}}let s=new WeakMap;function a(t,e,r){let n=s.get(t);return n?e in n||(n[e]=r()):(n={[e]:r()},s.set(t,n)),n[e]}let u={},c=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class l{constructor(t,e){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=e._parent,this.key=e._key,this.machine=e._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(n.S),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?(0,n.m)(this.config.states,(t,e)=>new l(t,{_parent:this,_key:e,_machine:this.machine})):u,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for c
2ompound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=(0,n.t)(this.config.entry).slice(),this.exit=(0,n.t)(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=(0,n.t)(t.tags).slice()}_initialize(){this.transitions=(0,n.f)(this),this.config.always&&(this.always=(0,n.a)(this.config.always).map(t=>(0,n.b)(this,n.N,t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(c),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(c),eventType:null})}:void 0,history:this.history,states:(0,n.m)(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(c)})),entry:this.entry.map(c),exit:this.exit.map(c),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return a(this,"invoke",()=>(0,n.t)(this.config.invoke).map((t,e)=>{let{src:r,systemId:i}=t,o=t.id??(0,n.c)(this.id,e),s="string"==typeof r?r:`xstate.invoke.${(0,n.c)(this.id,e)}`;return{...t,src:s,id:o,systemId:i,toJSON(){let{onDone:e,onError:r,...n}=t;return{...n,type:"xstate.invoke",src:s,id:o}}}}))}get on(){return a(this,"on",()=>[...this.transitions].flatMap(([t,e])=>e.map(e=>[t,e])).reduce((t,[e,r])=>(t[e]=t[e]||[],t[e].push(r),t),{}))}get after(){return a(this,"delayedTransitions",()=>(0,n.g)(this))}get initial(){return a(this,"initial",()=>(0,n.d)(this,this.config.initial))}next(t,e){let r;let i=e.type,o=[];for(let s of a(this,`candidates-${i}`,()=>(0,n.h)(this,i))){let{guard:a}=s,u=t.context,c=!1;try{c=!a||(0,n.e)(a,u,e,t)}catch(e){let t="string"==typeof a?a:"object"==typeof a?a.type:void 0;throw Error(`Unable to evaluate guard ${t?`'${t}' `:""}in transition for event '${i}' in state node '${this.id}':
3${e.message}`)}if(c){o.push(...s.actions),r=s;break}}return r?[r]:void 0}get events(){return a(this,"events",()=>{let{states:t}=this,e=new Set(this.ownEvents);if(t)for(let r of Object.keys(t)){let n=t[r];if(n.states)for(let t of n.events)e.add(`${t}`)}return Array.from(e)})}get ownEvents(){return Array.from(new Set([...this.transitions.keys()].filter(t=>this.transitions.get(t).some(t=>!(!t.target&&!t.actions.length&&!t.reenter)))))}}class f{constructor(t,e){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:e?.actors??{},actions:e?.actions??{},delays:e?.delays??{},guards:e?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new l(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){let{actions:e,guards:r,actors:n,delays:i}=this.implementations;return new f(this.config,{actions:{...e,...t.actions},guards:{...r,...t.guards},actors:{...n,...t.actors},delays:{...i,...t.delays}})}resolveState(t){let e=(0,n.r)(this.root,t.value),r=(0,n.i)((0,n.j)(this.root,e));return(0,n.k)({_nodes:[...r],context:t.context||{},children:{},status:(0,n.l)(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,e,r){return(0,n.n)(t,e,r,[]).snapshot}microstep(t,e,r){return(0,n.n)(t,e,r,[]).microstates}getTransitionData(t,e){return(0,n.o)(this.root,t.value,t,e)||[]}
3getPreInitialState(t,e,r){let{context:o}=this.config,s=(0,n.k)({context:"function"!=typeof o&&o?o:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof o?(0,n.p)(s,e,t,[(0,i.a)(({spawn:t,event:e,self:r})=>o({spawn:t,input:e.input,self:r}))],r,void 0):s}getInitialSnapshot(t,e){let r=(0,n.q)(e),i=[],o=this.getPreInitialState(t,r,i),s=(0,n.s)([{target:[...(0,n.u)(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],o,t,r,!0,i),{snapshot:a}=(0,n.n)(s,r,t,i);return a}start(t){Object.values(t.children).forEach(t=>{"active"===t.getSnapshot().status&&t.start()})}getStateNodeById(t){let e=(0,n.v)(t),r=e.slice(1),i=(0,n.w)(e[0])?e[0].slice(1):e[0],o=this.idMap.get(i);if(!o)throw Error(`Child state node '#${i}' does not exist on machine '${this.id}'`);return(0,n.x)(o,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,e){return(0,n.y)(t,e)}restoreSnapshot(t,e){let r={},i=t.children;Object.keys(i).forEach(t=>{let o=i[t],s=o.snapshot,a=o.src,u="string"==typeof a?(0,n.z)(this,a):a;if(!u)return;let c=(0,n.A)(u,{id:t,parent:e.self,syncSnapshot:o.syncSnapshot,snapshot:s,src:a,systemId:o.systemId});r[t]=c});let o=(0,n.k)({...t,children:r,_nodes:Array.from((0,n.i)((0,n.j)(this.root,t.value)))},this),s=new Set;return!function t(e,r){if(!s.has(e))for(let i in s.add(e),e){let o=e[i];if(o&&"object"==typeof o){if("xstate$$type"in o&&o.xstate$$type===n.$){e[i]=r[o.id];continue}t(o,r)}}}(o.context,r),o}}function h({schemas:t,actors:e,actions:r,guards:n,delays:i}){return{createMachine:o=>new f({...o,schemas:t},{actors:e,actions:r,guards:n,delays:i})}}},25566:function(t){var e,r,n,i=t.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u=[],c=!1,l=-1;function f(){c&&n&&(c=!1,n.length?u=n.concat(u):l=-1,u.length&&h())}function h(){if(!c){var t=a(f);c=!0;for(var e=u.length;e;){for(n=u,u=[];++l<e;)n&&n[l].run();l=-1,e=u.length}n=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||c||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},3607:function(t,e,r){"use strict";r.d(e,{C:function(){return s},N:function(){return c}});var n={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},i={0:8203,1:8204,2:8205,3:65279},o=[,,,,].fill(String.fromCodePoint(i[0])).join("");function s(t,e,r="auto"){let n;return!0===r||"auto"===r&&(!(!Number.isNaN(Number(t))||/[a-z]/i.test(t)&&!/\d+(?:[-:\/]\d+){2}(?:T\d+(?:[-:\/]\d+){1,2}(\.\d+)?Z?)?/.test(t))&&Date.parse(t)||function(t){try{new URL(t,t.startsWith("/")?"https://acme.com":void 0)}catch{return!1}return!0}(t))?t:`${t}${n=JSON.stringify(e),`${o}${Array.from(n).map(t=>{let e=t.charCodeAt(0);if(e>255)throw Error(`Only ASCII edit info can be encoded. Error attempting to encode ${n} on character ${t} (${e})`);return Array.from(e.toString(4).padStart(4,"0")).map(t=>String.fromCodePoint(i[t])).join("")}).join("")}`}`}Object.fromEntries(Object.entries(i).map(t=>t.reverse())),Object.fromEntries(Object.entries(n).map(t=>t.reverse()));var a=`${Object.values(n).map(t=>`\\u{${t.toString(16)}}`).join("")}`,u=RegExp(`[${a}]{4,}`,"gu");function c(t){var e,r;return t&&JSON.parse({cleaned:(e=JSON.stringify(t)).replace(u,""),encoded:(null==(r=e.match(u))?void 0:r[0])||""}.cleaned)}},46668:function(t,e,r){"use strict";r.d(e,{Ap:function(){return tm},Y2:function(){return t1},eI:function(){return eQ}});let n=!(typeof navigator>"u")&&"ReactNative"===navigator.product,i={timeout:n?6e4:12e4},o=function(t){let e={...i,..."string"==typeof t?{url:t}:t};if(e.timeout=function t(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;let r=Number(e);return isNaN(r)?t(i.timeout):{connect:r,socket:r}}(e.timeout),e.query){let{url:t,searchParams:r}=function(t){let e=t.indexOf("?");if(-1===e)return{url:t,searchParams:new URLSearchParams};let r=t.slice(0,e),i=t.slice(e+1);if(!n)return{url:r,searchParams:new URLSearchParams(i)};if("function"!=typeof decodeURIComponent)throw Error("Broken `URLSearchParams` implementation, and `decodeURIComponent` is not defined");let o=new URLSearchParams;for(let t of i.split("&")){let[e,r]=t.split("=");e&&o.append(s(e),s(r||""))}return{url:r,searchParams:o}}(e.url);for(let[n,i]of Object.entries(e.query)){if(void 0!==i){if(Array.isArray(i))for(let t of i)r.append(n,t);else r.append(n,i)}let o=r.toString();o&&(e.url=`${t}?${o}`)}}return e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e};function s(t){return decodeURIComponent(t.replace(/\+/g," "))}let a=/^https?:\/\//i,u=function(t){if(!a.test(t.url))throw Error(`"${t.url}" is not a valid URL`)},c=["request","response","progress","error","abort"],l=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var f,h,p,d,y=(f=function(){if(d)return p;d=1;var t=function(t){return t.replace(/^\s+|\s+$/g,"")};return p=function(e){if(!e)return{};for(var r,n={},i=t(e).split("\n"),o=0;o<i.length;o++){var s=i[o],a=s.indexOf(":"),u=t(s.slice(0,a)).toLowerCase(),c=t(s.slice(a+1));typeof n[u]>"u"?n[u]=c:(r=n[u],"[object Array]"===Object.prototype.toString.call(r)?n[u].push(c):n[u]=[n[u],c])}return n}}())&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f;class g{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#t;#e;#r;#n={};#i;#o={};#s;open(t,e,r){this.#t=t,this.#e=e,this.#r="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#r}setRequestHeader(t,e){this.#n[t]=e}setInit(t,e=!0){this.#o=t,this.#s=e}send(t){let e="arraybuffer"!==this.responseType,r={...this.#o,method:this.#t,headers:this.#n,body:t};"function"==typeof AbortController&&this.#s&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(r.signal=this.#i.signal)),"u">typeof document&&(r.credentials=this.withCredentials?"include":"omit"),fetch(this.#e,r).then(t=>
3(t.headers.forEach((t,e)=>{this.#r+=`${e}: ${t}\r
4`}),this.status=t.status,this.statusText=t.statusText,this.readyState=3,this.onreadystatechange?.(),e?t.text():t.arrayBuffer())).then(t=>{"string"==typeof t?this.responseText=t:this.response=t,this.readyState=4,this.onreadystatechange?.()}).catch(t=>{"AbortError"!==t.name?this.onerror?.(t):this.onabort?.()})}}let v="function"==typeof XMLHttpRequest?"xhr":"fetch",m="xhr"===v?XMLHttpRequest:g,b=(t,e)=>{let r=t.options,n=t.applyMiddleware("finalizeOptions",r),i={},o=t.applyMiddleware("interceptRequest",void 0,{adapter:v,context:t});if(o){let t=setTimeout(e,0,null,o);return{abort:()=>clearTimeout(t)}}let s=new m;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=t=>{d(s instanceof g?t instanceof Error?t:Error(`Request error while attempting to reach is ${n.url}`,{cause:t}):Error(`Request error while attempting to reach is ${n.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},s.ontimeout=t=>{d(Error(`Request timeout while attempting to reach ${n.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},s.onabort=()=>{p(!0),c=!0},s.onreadystatechange=()=>{u&&(p(),i.socket=setTimeout(()=>h("ESOCKETTIMEDOUT"),u.socket)),c||4!==s.readyState||0===s.status||function(){if(!(c||l||f)){if(0===s.status)return void d(Error("Unknown XHR error"));p(),l=!0,e(null,{body:s.response||(""===s.responseType||"text"===s.responseType?s.responseText:""),url:n.url,method:n.method,headers: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 t in a)a.hasOwnProperty(t)&&s.setRequestHeader(t,a[t]);return n.rawBody&&(s.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:n,adapter:v,request:s,context:t}),s.send(n.body||null),u&&(i.connect=setTimeout(()=>h("ETIMEDOUT"),u.connect)),{abort:function(){c=!0,s&&s.abort()}};function h(e){f=!0,s.abort();let r=Error("ESOCKETTIMEDOUT"===e?`Socket timed out on request to ${n.url}`:`Connection timed out on request to ${n.url}`);r.code=e,t.channels.error.publish(r)}function p(t){(t||c||s.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function d(t){if(l)return;p(!0),l=!0,s=null;let r=t||Error(`Network error while attempting to reach ${n.url}`);r.isNetworkError=!0,r.request=n,e(r)}},w=(t=[],e=b)=>(function t(e,r){let n=[],i=l.reduce((t,e)=>(t[e]=t[e]||[],t),{processOptions:[o],validateOptions:[u]});function s(t){let e;let n=c.reduce((t,e)=>(t[e]=function(){let t=Object.create(null),e=0;return{publish:function(e){for(let r in t)t[r](e)},subscribe:function(r){let n=e++;return t[n]=r,function(){delete t[n]}}}}(),t),{}),o=function(t,e,...r){let n="onError"===t,o=e;for(let e=0;e<i[t].length&&(o=(0,i[t][e])(o,...r),!n||o);e++);return o},s=o("processOptions",t);o("validateOptions",s);let a={options:s,channels:n,applyMiddleware:o},u=n.request.subscribe(t=>{e=r(t,(e,r)=>((t,e,r)=>{let i=t,s=e;if(!i)try{s=o("onResponse",e,r)}catch(t){s=null,i=t}(i=i&&o("onError",i,r))?n.error.publish(i):s&&n.response.publish(s)})(e,r,t))});n.abort.subscribe(()=>{u(),e&&e.abort()});let l=o("onReturn",n,a);return l===n&&n.request.publish(a),l}return s.use=function(t){if(!t)throw Error("Tried to add middleware that resolved to falsey value");if("function"==typeof t)throw Error("Tried to add middleware that was a function. It probably expects you to pass options to it.");if(t.onReturn&&i.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return l.forEach(e=>{t[e]&&i[e].push(t[e])}),n.push(t),s},s.clone=()=>t(n,r),e.forEach(s.use),s})(t,e);var x,E,_,S,C,I=r(25566),T=r(82957).lW,A={exports:{}};C||(C=1,function(t,e){let r;e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let r="color: "+this.color;e.splice(1,0,r,"color: inherit");let n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(n++,"%c"===t&&(i=n))}),e.splice(i,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch{}return!t&&"u">typeof I&&"env"in I&&(t=I.env.DEBUG),t},e.useColors=function(){let t;return"u">typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&
4("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch{}}(),e.destroy=(r=!1,()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=(S?_:(S=1,_=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;let r=Number(new Date),i=r-(n||r);a.diff=i,a.prev=n,a.curr=r,n=r,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(r,n)=>{if("%%"===r)return"%";o++;let i=e.formatters[n];if("function"==typeof i){let e=t[o];r=i.call(a,e),t.splice(o,1),o--}return r}),e.formatArgs.call(a,t),(a.log||e.log).apply(a,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,r){let n=e(this.namespace+(typeof r>"u"?":":r)+t);return n.log=this.log,n}function n(t,e){let r=0,n=0,i=-1,o=0;for(;r<t.length;)if(n<e.length&&(e[n]===t[r]||"*"===e[n]))"*"===e[n]?(i=n,o=r):r++,n++;else{if(-1===i)return!1;n=i+1,r=++o}for(;n<e.length&&"*"===e[n];)n++;return n===e.length}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){let t=[...e.names,...e.skips.map(t=>"-"+t)].join(",");return e.enable(""),t},e.enable=function(t){for(let r of(e.save(t),e.namespaces=t,e.names=[],e.skips=[],("string"==typeof t?t:"").trim().replace(" ",",").split(",").filter(Boolean)))"-"===r[0]?e.skips.push(r.slice(1)):e.names.push(r)},e.enabled=function(t){for(let r of e.skips)if(n(t,r))return!1;for(let r of e.names)if(n(t,r))return!0;return!1},e.humanize=function(){if(E)return x;function t(t,e,r,n){return Math.round(t/r)+" "+n+(e>=1.5*r?"s":"")}return E=1,x=function(e,r){r=r||{};var n,i,o=typeof e;if("string"===o&&e.length>0)return function(t){if(!((t=String(t)).length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return 864e5*r;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*r;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*r;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===o&&isFinite(e))return r.long?(i=Math.abs(e))>=864e5?t(e,i,864e5,"day"):i>=36e5?t(e,i,36e5,"hour"):i>=6e4?t(e,i,6e4,"minute"):i>=1e3?t(e,i,1e3,"second"):e+" ms":(n=Math.abs(e))>=864e5?Math.round(e/864e5)+"d":n>=36e5?Math.round(e/36e5)+"h":n>=6e4?Math.round(e/6e4)+"m":n>=1e3?Math.round(e/1e3)+"s":e+"ms";throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}(),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(r=>{e[r]=t[r]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e)|0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}))(e);let{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}(A,A.exports)),A.exports,Object.prototype.hasOwnProperty;let O=typeof T>"u"?()=>!1:t=>T.isBuffer(t);function R(t){return"[object Object]"===Object.prototype.toString.call(t)}let k=["boolean","string","number"],$={};"u">typeof globalThis?$=globalThis:"u">typeof window?$=window:"u">typeof global?$=global:"u">typeof self&&($=self);var j=$;let q=(t={})=>{let e=t.implementation||Promise;if(!e)throw Error("`Promise` is not available in global scope, and n
4o implementation was passed");return{onReturn:(r,n)=>new e((e,i)=>{let o=n.options.cancelToken;o&&o.promise.then(t=>{r.abort.publish(t),i(t)}),r.error.subscribe(i),r.response.subscribe(r=>{e(t.onlyBody?r.body:r)}),setTimeout(()=>{try{r.request.publish(n)}catch(t){i(t)}},0)})}};class U{__CANCEL__=!0;message;constructor(t){this.message=t}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class P{promise;reason;constructor(t){if("function"!=typeof t)throw TypeError("executor must be a function.");let e=null;this.promise=new Promise(t=>{e=t}),t(t=>{this.reason||(this.reason=new U(t),e(this.reason))})}static source=()=>{let t;return{token:new P(e=>{t=e}),cancel:t}}}q.Cancel=U,q.CancelToken=P,q.isCancel=t=>!(!t||!t?.__CANCEL__);var D=(t,e,r)=>("GET"===r.method||"HEAD"===r.method)&&(t.isNetworkError||!1);function B(t){return 100*Math.pow(2,t)+100*Math.random()}let M=(t={})=>(t=>{let e=t.maxRetries||5,r=t.retryDelay||B,n=t.shouldRetry;return{onError:(t,i)=>{var o;let s=i.options,a=s.maxRetries||e,u=s.retryDelay||r,c=s.shouldRetry||n,l=s.attemptNumber||0;if(null!==(o=s.body)&&"object"==typeof o&&"function"==typeof o.pipe||!c(t,l,s)||l>=a)return t;let f=Object.assign({},i,{options:Object.assign({},s,{attemptNumber:l+1})});return setTimeout(()=>i.channels.request.publish(f),u(l)),null}}})({shouldRetry:D,...t});M.shouldRetry=D;var L=r(78743),N=r(68851),F=r(79473),z=r(87935),Z=r(36550),H=r(28419),J=r(46737),W=r(89155),X=r(17482),V=r(85393),G=r(61514),Y=r(38214),K=r(30867),Q=r(67387),tt=r(71064),te=r(36381),tr=r(66692),tn=r(3607),ti=r(5853),to=r(79911),ts=r(17753),ta=r(82573),tu=r(59326),tc=r(95767),tl=r(36023);function tf(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=(0,tl.jO)(t);return r?(0,tc.z)(tf.apply(void 0,(0,ti.ev)([],(0,ti.CR)(t))),(0,tu.Z)(r)):(0,ts.e)(function(e,r){(0,to.l)((0,ti.ev)([e],(0,ti.CR)((0,ta.k)(t))))(r)})}var th=r(7449),tp=r(44465);class td extends Error{response;statusCode=400;responseBody;details;constructor(t){let e=tg(t);super(e.message),Object.assign(this,e)}}class ty extends Error{response;statusCode=500;responseBody;details;constructor(t){let e=tg(t);super(e.message),Object.assign(this,e)}}function tg(t){let e=t.body,r={response:t,statusCode:t.statusCode,responseBody:-1!==(t.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(e,null,2):e,message:"",details:void 0};if(e.error&&e.message)return r.message=`${e.error} - ${e.message}`,r;if(tv(e)&&tv(e.error)&&"mutationError"===e.error.type&&"string"==typeof e.error.description||tv(e)&&tv(e.error)&&"actionError"===e.error.type&&"string"==typeof e.error.description){let t=e.error.items||[],n=t.slice(0,5).map(t=>t.error?.description).filter(Boolean),i=n.length?`:
5- ${n.join(`
6- `)}`:"";return t.length>5&&(i+=`
7...and ${t.length-5} more`),r.message=`${e.error.description}${i}`,r.details=e.error,r}return e.error&&e.error.description?(r.message=e.error.description,r.details=e.error):r.message=e.error||e.message||function(t){let e=t.statusMessage?` ${t.statusMessage}`:"";return`${t.method}-request to ${t.url} resulted in HTTP ${t.statusCode}${e}`}(t),r}function tv(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}class tm extends Error{projectId;addOriginUrl;constructor({projectId:t}){super("CorsOriginError"),this.name="CorsOriginError",this.projectId=t;let e=new URL(`https://sanity.io/manage/project/${t}/api`);if("u">typeof location){let{origin:t}=location;e.searchParams.set("cors","add"),e.searchParams.set("origin",t),this.addOriginUrl=e,this.message=`The current origin is not allowed to connect to the Live Content API. Add it here: ${e}`}else this.message=`The current origin is not allowed to connect to the Live Content API. Change your configuration here: ${e}`}}let tb={onResponse:t=>{if(t.statusCode>=500)throw new ty(t);if(t.statusCode>=400)throw new td(t);return t}};function tw(t){return w([M({shouldRetry:tx}),...t,function(){let t={};return{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:t=>{let e=t.body;return!e||"function"==typeof e.pipe||O(e)||-1===k.indexOf(typeof e)&&!Array.isArray(e)&&!function(t){if(!1===R(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!(!1===R(r)||!1===r.hasOwnProperty("isPrototypeOf"))}(e)?t:Object.assign({},t,{body:JSON.stringify(t.body),headers:Object.assign({},t.headers,{"Content-Type":"application/json"})})}},{onResponse:t=>{let e=t.headers["content-type"]||"",r=-1!==e.indexOf("application/json");return t.body&&e&&r?Object.assign({},t,{body:function(t){try{return JSON.parse(t)}catch(t){throw t.message=`Failed to parsed response body as JSON: ${t.message}`,t}}(t.body)}):t},processOptions:t=>Object.assign({},t,{headers:Object.assign({Accept:"application/json"},t.headers)})},{onRequest:t=>{if("xhr"!==t.adapter)return;let e=t.request,r=t.context;function n(t){return e=>{let n=e.lengthComputable?e.loaded/e.total*100:-1;r.channels.progress.publish({stage:t,percent:n,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=n("upload")),"onprogress"in e&&(e.onprogress=n("download"))}},tb,function(t={}){let e=t.implementation||j.Observable;if(!e)throw Error("`Observable` is not available in global scope, and n
7o implementation was passed");return{onReturn:(t,r)=>new e(e=>(t.error.subscribe(t=>e.error(t)),t.progress.subscribe(t=>e.next(Object.assign({type:"progress"},t))),t.response.subscribe(t=>{e.next(Object.assign({type:"response"},t)),e.complete()}),t.request.publish(r),()=>t.abort.publish()))}}({implementation:L.y})])}function tx(t,e,r){if(0===r.maxRetries)return!1;let n="GET"===r.method||"HEAD"===r.method,i=(r.uri||r.url).startsWith("/data/query"),o=t.response&&(429===t.response.statusCode||502===t.response.statusCode||503===t.response.statusCode);return(!!n||!!i)&&!!o||M.shouldRetry(t,e,r)}function tE(t){return"https://www.sanity.io/help/"+t}let t_=["image","file"],tS=["before","after","replace"],tC=t=>{if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},tI=t=>{if(!/^[-a-z0-9]+$/i.test(t))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},tT=t=>{if(-1===t_.indexOf(t))throw Error(`Invalid asset type: ${t}. Must be one of ${t_.join(", ")}`)},tA=(t,e)=>{if(null===e||"object"!=typeof e||Array.isArray(e))throw Error(`${t}() takes an object of properties`)},tO=(t,e)=>{if("string"!=typeof e||!/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(e)||e.includes(".."))throw Error(`${t}(): "${e}" is not a valid document ID`)},tR=(t,e)=>{if(!e._id)throw Error(`${t}() requires that the document contains an ID ("_id" property)`);tO(t,e._id)},tk=(t,e,r)=>{let n="insert(at, selector, items)";if(-1===tS.indexOf(t)){let t=tS.map(t=>`"${t}"`).join(", ");throw Error(`${n} takes an "at"-argument which is one of: ${t}`)}if("string"!=typeof e)throw Error(`${n} takes a "selector"-argument which must be a string`);if(!Array.isArray(r))throw Error(`${n} takes an "items"-argument which must be an array`)},t$=t=>{if(!t.dataset)throw Error("`dataset` must be provided to perform queries");return t.dataset||""},tj=t=>{if("string"!=typeof t||!/^[a-z0-9._-]{1,75}$/i.test(t))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t},tq=t=>{if(!t["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:e,id:r}=t["~experimental_resource"];switch(e){case"dataset":if(2!==r.split(".").length)throw Error('Dataset resource ID must be in the format "project.dataset"');return;case"dashboard":case"media-library":case"canvas":return;default:throw Error(`Unsupported resource type: ${e.toString()}`)}},tU=(t,e)=>{if(e["~experimental_resource"])throw Error(`\`${t}\` does not support resource-based operations`)},tP=t=>{var e;let r,n;return e=(...e)=>console.warn(t.join(" "),...e),r=!1,(...t)=>(r||(n=e(...t),r=!0),n)},tD=tP(["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"]),tB=tP(["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."]),tM=tP(["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."]),tL=tP(["The `previewDrafts` perspective has been renamed to  `drafts` and will be removed in a future API version"]),tN=tP(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.",`See ${tE("js-client-browser-token")} for more information and how to hide this warning.`]),tF=tP(["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`."]),tz=tP(["Using the Sanity client without specifying an API version is deprecated.",`See ${tE("js-client-api-version")}`]),tZ=(tP(["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}}),tH=["localhost","127.0.0.1","0.0.0.0"],tJ=t=>-1!==tH.indexOf(t);function tW(t){if(Array.isArray(t)&&t.length>1&&t.includes("raw"))throw TypeError('Invalid API perspective value: "raw". The raw-perspective can not be combined with other perspectives')}let tX=(t,e)=>{let r={...e,...t,stega:{..."boolean"==typeof e.stega?{enabled:e.stega}:e.stega||tZ.stega,..."boolean"==typeof t.stega?{enabled:t.stega}:t.stega||{}}};r.apiVersion||tz();let n={...tZ,...r},i=n.useProjectHostname&&!n["~experimental_resource"];if(typeof Promise>"u"){let t=tE("js-client-promise-polyfill");throw Error(`No native Promise-implementation found, polyfill needed - see ${t}`)}if(i&&!n.projectId)throw Error("Configuration must contain `projectId`");if(n["~experimental_resource"]&&tq(n),"u">typeof n.perspective&&tW(n.perspective),"encodeSourceMap"in n)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?");if("encodeSourceMapAtPath"in n)throw Error("It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?");
7if("boolean"!=typeof n.stega.enabled)throw Error(`stega.enabled must be a boolean, received ${n.stega.enabled}`);if(n.stega.enabled&&void 0===n.stega.studioUrl)throw Error("stega.studioUrl must be defined when stega.enabled is true");if(n.stega.enabled&&"string"!=typeof n.stega.studioUrl&&"function"!=typeof n.stega.studioUrl)throw Error(`stega.studioUrl must be a string or a function, received ${n.stega.studioUrl}`);let o="u">typeof window&&window.location&&window.location.hostname,s=o&&tJ(window.location.hostname),a=!!n.token;n.withCredentials&&a&&(tF(),n.withCredentials=!1),o&&s&&a&&!0!==n.ignoreBrowserTokenWarning?tN():typeof n.useCdn>"u"&&tB(),i&&tI(n.projectId),n.dataset&&tC(n.dataset),"requestTagPrefix"in n&&(n.requestTagPrefix=n.requestTagPrefix?tj(n.requestTagPrefix).replace(/\.+$/,""):void 0),n.apiVersion=`${n.apiVersion}`.replace(/^v/,""),n.isDefaultApi=n.apiHost===tZ.apiHost,!0===n.useCdn&&n.withCredentials&&tD(),n.useCdn=!1!==n.useCdn&&!n.withCredentials,function(t){if("1"===t||"X"===t)return;let e=new Date(t);if(!(/^\d{4}-\d{2}-\d{2}$/.test(t)&&e instanceof Date&&e.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}(n.apiVersion);let u=n.apiHost.split("://",2),c=u[0],l=u[1],f=n.isDefaultApi?"apicdn.sanity.io":l;return i?(n.url=`${c}://${n.projectId}.${l}/v${n.apiVersion}`,n.cdnUrl=`${c}://${n.projectId}.${f}/v${n.apiVersion}`):(n.url=`${n.apiHost}/v${n.apiVersion}`,n.cdnUrl=n.url),n};class tV extends Error{name="ConnectionFailedError"}class tG extends Error{name="DisconnectError";reason;constructor(t,e,r={}){super(t,r),this.reason=e}}class tY extends Error{name="ChannelError";data;constructor(t,e){super(t),this.data=e}}class tK extends Error{name="MessageError";data;constructor(t,e,r={}){super(t,r),this.data=e}}class tQ extends Error{name="MessageParseError"}let t0=["channelError","disconnect"];function t1(t,e){return(0,N.P)(()=>{let e=t();return(0,F.b)(e)?e:(0,z.of)(e)}).pipe((0,Z.z)(t=>new L.y(r=>{let n=e.includes("open"),i=e.includes("reconnect");function o(e){if("data"in e){let[t,n]=t2(e);r.error(t?new tQ("Unable to parse EventSource error message",{cause:n}):new tK((n?.data).message,n));return}t.readyState===t.CLOSED?r.error(new tV("EventSource connection failed")):i&&r.next({type:"reconnect"})}function s(){r.next({type:"open"})}function a(t){let[e,n]=t2(t);if(e){r.error(new tQ("Unable to parse EventSource message",{cause:e}));return}if("channelError"===t.type){var i;r.error(new tY((i=n?.data).error?i.error.description?i.error.description:"string"==typeof i.error?i.error:JSON.stringify(i.error,null,2):i.message||"Unknown listener error",n.data));return}if("disconnect"===t.type){r.error(new tG(`Server disconnected client: ${n.data?.reason||"unknown error"}`));return}r.next({type:t.type,id:t.lastEventId,...n.data?{data:n.data}:{}})}t.addEventListener("error",o),n&&t.addEventListener("open",s);let u=[...new Set([...t0,...e])].filter(t=>"error"!==t&&"open"!==t&&"reconnect"!==t);return u.forEach(e=>t.addEventListener(e,a)),()=>{t.removeEventListener("error",o),n&&t.removeEventListener("open",s),u.forEach(e=>t.removeEventListener(e,a)),t.close()}})))}function t2(t){try{let e="string"==typeof t.data&&JSON.parse(t.data);return[null,{type:t.type,id:t.lastEventId,...!function(t){for(let e in t)return!1;return!0}(e)?{data:e}:{}}]}catch(t){return[t,null]}}function t3(t){if("string"==typeof t)return{id:t};if(Array.isArray(t))return{query:"*[_id in $ids]",params:{ids:t}};if("object"==typeof t&&null!==t&&"query"in t&&"string"==typeof t.query)return"params"in t&&"object"==typeof t.params&&null!==t.params?{query:t.query,params:t.params}:{query:t.query};let e=["* Document ID (<docId>)","* Array of document IDs","* Object containing `query`"].join(`
8`);throw Error(`Unknown selection - must be one of:
9
10${e}`)}class t6{selection;operations;constructor(t,e={}){this.selection=t,this.operations=e}set(t){return this._assign("set",t)}setIfMissing(t){return this._assign("setIfMissing",t)}diffMatchPatch(t){return tA("diffMatchPatch",t),this._assign("diffMatchPatch",t)}unset(t){if(!Array.isArray(t))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=Object.assign({},this.operations,{unset:t}),this}inc(t){return this._assign("inc",t)}dec(t){return this._assign("dec",t)}insert(t,e,r){return tk(t,e,r),this._assign("insert",{[t]:e,items:r})}append(t,e){return this.insert("after",`${t}[-1]`,e)}prepend(t,e){return this.insert("before",`${t}[0]`,e)}splice(t,e,r,n){let i=e<0?e-1:e,o=typeof r>"u"||-1===r?-1:Math.max(0,e+r),s=`${t}[${i}:${i<0&&o>=0?"":o}]`;return this.insert("replace",s,n||[])}ifRevisionId(t){return this.operations.ifRevisionID=t,this}serialize(){return{...t3(this.selection),...this.operations}}toJSON(){return this.serialize()}reset(){return this.operations={},this}_assign(t,e,r=!0){return tA(t,e),this.operations=Object.assign({},this.operations,{[t]:Object.assign({},r&&this.operations[t]||{},e)}),this}_set(t,e){return this._assign(t,e,!1)}}class t5 extends t6{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new t5(this.selection,{...this.operations},this.#a)}commit(t){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let e=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},t);return this.#a.mutate({patch:this.serialize()},e)}}class t8 extends t6{#a;constructor(t,e,r){super(t,e),this.#a=r}clone(){return new t8(this.selection,{...this.operations},this.#a)}commit(t){if(!this.#a)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");let e=Object.assign({returnFirst:"string"==typeof this.selection,returnDocuments:!0},t);return this.#a.mutate({patch:this.serialize()},e)}}let t4={returnDocuments:!1};class t7{operations;trxId;constructor(t=[],e){this.operations=t,this.trxId=e}create(t){return tA("create",t),this._add({create:t})}createIfNotExists(t){let e="createIfNotExists";return tA(e,t),tR(e,t),this._add({[e]:t})}createOrReplace(t){let e="createOrReplace";return tA(e,t),tR(e,t),this._add({[e]:t})}delete(t){return tO("delete",t),this._add({delete:{id:t}})}transactionId(t){return t?(this.trxId=t,this):this.trxId}serialize(){return[...this.operations]}toJSON(){return this.serialize()}reset(){return this.operations=[],this}_add(t){return this.operations.push(t),this}}class t9 extends t7{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new t9([...this.operations],this.#a,this.trxId)}commit(t){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t4,t||{}))}patch(t,e){let r="function"==typeof e,n="string"!=typeof t&&t instanceof t8,i="object"==typeof t&&("query"in t||"id"in t);if(n)return this._add({patch:t.serialize()});if(r){let r=e(new t8(t,{},this.#a));if(!(r instanceof t8))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}if(i){let r=new t8(t,e||{},this.#a);return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}class et extends t7{#a;constructor(t,e,r){super(t,r),this.#a=e}clone(){return new et([...this.operations],this.#a,this.trxId)}commit(t){if(!this.#a)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.#a.mutate(this.serialize(),Object.assign({transactionId:this.trxId},t4,t||{}))}patch(t,e){let r="function"==typeof e;if("string"!=typeof t&&t instanceof t5)return this._add({patch:t.serialize()});if(r){let r=e(new t5(t,{},this.#a));if(!(r instanceof t5))throw Error("function passed to `patch()` must return the patch");return this._add({patch:r.serialize()})}return this._add({patch:{id:t,...e}})}}let ee=({query:t,params:e={},options:r={}})=>{let n=new URLSearchParams,{tag:i,includeMutations:o,returnQuery:s,...a}=r;for(let[r,o]of(i&&n.append("tag",i),n.append("query",t),Object.entries(e)))n.append(`$${r}`,JSON.stringify(o));for(let[t,e]of Object.entries(a))e&&n.append(t,`${e}`);return!1===s&&n.append("returnQuery","false"),!1===o&&n.append("includeMutations","fal
10se"),`?${n}`},er=(t,e)=>!1===t?void 0:typeof t>"u"?e:t,en=(t={})=>({dryRun:t.dryRun,returnIds:!0,returnDocuments:er(t.returnDocuments,!0),visibility:t.visibility||"sync",autoGenerateArrayKeys:t.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:t.skipCrossDatasetReferenceValidation}),ei=t=>"response"===t.type,eo=t=>t.body,es=(t,e)=>t.reduce((t,r)=>(t[e(r)]=r,t),Object.create(null));function ea(t,e,n,i,o={},s={}){let a="stega"in s?{...n||{},..."boolean"==typeof s.stega?{enabled:s.stega}:s.stega||{}}:n,u=a.enabled?(0,tn.N)(o):o,c=!1===s.filterResponse?t=>t:t=>t.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=ey(t,e,"query",{query:i,params:u},"u">typeof l||"u">typeof f?{...h,fetch:{cache:l,next:f}}:h);return a.enabled?p.pipe(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tf.apply(void 0,(0,ti.ev)([],(0,ti.CR)(t)))}((0,H.D)(r.e(3139).then(r.bind(r,13139)).then(function(t){return t.stegaEncodeSourceMap$1}).then(({stegaEncodeSourceMap:t})=>t))),(0,th.U)(([t,e])=>{let r=e(t.result,t.resultSourceMap,a);return c({...t,result:r})})):p.pipe((0,th.U)(c))}function eu(t,e,r,n={}){let i={uri:eI(t,"doc",r),json:!0,tag:n.tag,signal:n.signal};return eS(t,e,i).pipe((0,tp.h)(ei),(0,th.U)(t=>t.body.documents&&t.body.documents[0]))}function ec(t,e,r,n={}){let i={uri:eI(t,"doc",r.join(",")),json:!0,tag:n.tag,signal:n.signal};return eS(t,e,i).pipe((0,tp.h)(ei),(0,th.U)(t=>{let e=es(t.body.documents||[],t=>t._id);return r.map(t=>e[t]||null)}))}function el(t,e,r,n){return tR("createIfNotExists",r),eg(t,e,r,"createIfNotExists",n)}function ef(t,e,r,n){return tR("createOrReplace",r),eg(t,e,r,"createOrReplace",n)}function eh(t,e,r,n){return ey(t,e,"mutate",{mutations:[{delete:t3(r)}]},n)}function ep(t,e,r,n){let i;return ey(t,e,"mutate",{mutations:Array.isArray(i=r instanceof t8||r instanceof t5?{patch:r.serialize()}:r instanceof t9||r instanceof et?r.serialize():r)?i:[i],transactionId:n&&n.transactionId||void 0},n)}function ed(t,e,r,n){let i=Array.isArray(r)?r:[r];return ey(t,e,"actions",{actions:i,transactionId:n&&n.transactionId||void 0,skipCrossDatasetReferenceValidation:n&&n.skipCrossDatasetReferenceValidation||void 0,dryRun:n&&n.dryRun||void 0},n)}function ey(t,e,r,n,i={}){let o="mutate"===r,s="actions"===r,a=o||s?"":ee(n),u=!o&&!s&&a.length<11264,c=i.returnFirst,{timeout:l,token:f,tag:h,headers:p,returnQuery:d,lastLiveEventId:y,cacheMode:g}=i,v=eI(t,r,u?a:"");return eS(t,e,{method:u?"GET":"POST",uri:v,json:!0,body:u?void 0:n,query:o&&en(i),timeout:l,headers:p,token:f,tag:h,returnQuery:d,perspective:i.perspective,resultSourceMap:i.resultSourceMap,lastLiveEventId:Array.isArray(y)?y[0]:y,cacheMode:g,canUseCdn:"query"===r,signal:i.signal,fetch:i.fetch,useAbortSignal:i.useAbortSignal,useCdn:i.useCdn}).pipe((0,tp.h)(ei),(0,th.U)(eo),(0,th.U)(t=>{if(!o)return t;let e=t.results||[];if(i.returnDocuments)return c?e[0]&&e[0].document:e.map(t=>t.document);let r=c?e[0]&&e[0].id:e.map(t=>t.id);return{transactionId:t.transactionId,results:e,[c?"documentId":"documentIds"]:r}}))}function eg(t,e,r,n,i={}){return ey(t,e,"mutate",{mutations:[{[n]:r}]},Object.assign({returnFirst:!0,returnDocuments:!0},i))}let ev=t=>void 0!==t.config().dataset&&void 0!==t.config().projectId||void 0!==t.config()["~experimental_resource"],em=(t,e)=>ev(t)&&e.startsWith(eI(t,"query")),eb=(t,e)=>ev(t)&&e.startsWith(eI(t,"mutate")),ew=(t,e)=>ev(t)&&e.startsWith(eI(t,"doc","")),ex=(t,e)=>ev(t)&&e.startsWith(eI(t,"listen")),eE=(t,e)=>ev(t)&&e.startsWith(eI(t,"history","")),e_=(t,e)=>e.startsWith("/data/")||em(t,e)||eb(t,e)||ew(t,e)||ex(t,e)||eE(t,e);function eS(t,e,r){var n;let i=r.url||r.uri,o=t.config(),s=typeof r.canUseCdn>"u"?["GET","HEAD"].indexOf(r.method||"GET")>=0&&e_(t,i):r.canUseCdn,a=(r.useCdn??o.useCdn)&&s,u=r.tag&&o.requestTagPrefix?[o.requestTagPrefix,r.tag].join("."):r.tag||o.requestTagPrefix;if(u&&null!==r.tag&&(r.query={tag:tj(u),...r.query}),["GET","HEAD","POST"].indexOf(r.method||"GET")>=0&&em(t,i)){let t=r.resultSourceMap??o.resultSourceMap;void 0!==t&&!1!==t&&(r.query={resultSourceMap:t,...r.query});let e=r.perspective||o.perspective;"u">typeof e&&("previewDrafts"===e&&tL(),tW(e),r.query={perspective:Array.isArray(e)?e.join(","):e,...r.query},(Array.isArray(e)&&e.length>0||"previewDrafts"===e||"drafts"===e)&&a&&(a=!1,tM())),r.lastLiveEventId&&(r.query={...r.query,lastLiveEventId:r.lastLiveEventId}),!1===r.returnQuery&&(r.query={returnQuery:"false",...r.query}),a&&"noStale"==r.cacheMode&&(r.query={cacheMode:"noStale",...r.query})}let c=function(t,e={}){let r={},n=e.token||t.token;n&&(r.Authorization=`Bearer ${n}`),e.useGlobalApi||t.useProjectHostname||!t.projectId||(r["X-Sanity-Project-ID"]=t.projectId);let i=!!(typeof e.withCredentials>"u"?t.withCredentials:e.withCredentials),o=typeof e.timeout>"u"?t.timeout:e.timeout;return Object.assign({},e,{headers:Object.assign({},r,e.headers||{}),timeout:typeof o>"u"?3e5:o,proxy:e.proxy||t.proxy,json:!0,withCredentials:i,fetch:"object"==typeof e.fetch&&"object"==typeof t.fetch?{...t.fetch,...e.fetch}:e.fetch||t.fetch})}(o,Object.assign({},r,{url:eT(t,i,a)})),l=new L.y(t=>e(c,o.requester).subscribe(t));return r.signal?l.pipe((n=r.signal,t=>new L.y(e=>{let r=()=>e.error(function(t){if(eA)return new DOMException(t?.reason??"The operation was aborted.","AbortError");let e=Error(t?.reason??"The operation was aborted.");return e.name="AbortError",e}(n));if(n&&n.aborted){r();return}let i=t.subscribe(e);return n.addEventListener("abort",r),()=>{n.removeEventListener("abort",r),i.unsubscribe()}}))):l}function eC(t,e,r){return eS(t,e,r).pipe((0,tp.h)(t=>"response"===t.type),(0,th.U)(t=>t.body))}function eI(t,e,r){let n=t.config();if(n["~experimental_resource"]){tq(n);let t=eO(n),i=void 0!==r?`${e}/${r}`:e;return`${t}/${i}`.replace(/\/($|\?)/,"$1")}let i=t$(n),o=`/${e}/${i}`;return`/data${void 0!==r?`${o}/${r}`:o}`.replace(/\/($|\?)/,"$1")}function eT(t,e,r=!1){let{url:n,cdnUrl:i}=t.config();return`${r?i:n}/${e.replace(/^\//,"")}`}let eA=!!globalThis.DOMException,eO=t=>{if(!t["~experimental_resource"])throw Error("`resource` must be provided to perform resource queries");let{type:e,id:r}=t["~experimental_resource"];switch(e){case"dataset":{let t=r.split(".");if(2!==t.length)throw Error('Dataset ID must be in the format "project.dataset"');return`/projects/${t[0]}/datasets/${t[1]}`}case"canvas":return`/canvases/${r}`;case"media-library":return`/media-libraries/${r}`;case"dashboard":return`/dashboards/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}};class eR{#a;#u;
10constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){return e$(this.#a,this.#u,t,e,r)}}class ek{#a;#u;constructor(t,e){this.#a=t,this.#u=e}upload(t,e,r){let n=e$(this.#a,this.#u,t,e,r);return(0,J.n)(n.pipe((0,tp.h)(t=>"response"===t.type),(0,th.U)(t=>t.body.document)))}}function e$(t,e,r,n,i={}){tT(r);let o=i.extract||void 0;o&&!o.length&&(o=["none"]);let s=t.config(),a=!(typeof File>"u")&&n instanceof File?Object.assign({filename:!1===i.preserveFilename?void 0:n.name,contentType:n.type},i):i,{tag:u,label:c,title:l,description:f,creditLine:h,filename:p,source:d}=a,y={label:c,title:l,description:f,filename:p,meta:o,creditLine:h};return d&&(y.sourceId=d.id,y.sourceName=d.name,y.sourceUrl=d.url),eS(t,e,{tag:u,method:"POST",timeout:a.timeout||0,uri:function(t,e){let r="image"===e?"images":"files";if(t["~experimental_resource"]){let{type:e,id:n}=t["~experimental_resource"];switch(e){case"dataset":throw Error("Assets are not supported for dataset resources, yet. Configure the client with `{projectId: <projectId>, dataset: <datasetId>}` instead.");case"canvas":return`/canvases/${n}/assets/${r}`;case"media-library":return`/media-libraries/${n}/upload`;case"dashboard":return`/dashboards/${n}/assets/${r}`;default:throw Error(`Unsupported resource type: ${e.toString()}`)}}let n=t$(t);return`assets/${r}/${n}`}(s,r),headers:a.contentType?{"Content-Type":a.contentType}:{},query:y,body:n})}var ej=(t,e)=>Object.keys(e).concat(Object.keys(t)).reduce((r,n)=>(r[n]=typeof t[n]>"u"?e[n]:t[n],r),{});let eq=(t,e)=>e.reduce((e,r)=>(typeof t[r]>"u"||(e[r]=t[r]),e),{}),eU=(0,N.P)(()=>r.e(6247).then(r.t.bind(r,46247,19))).pipe((0,th.U)(({default:t})=>t),(0,W.d)(1));function eP(){return function(t){return t.pipe((0,X.K)((t,e)=>t instanceof tV?(0,V.z)((0,z.of)({type:"reconnect"}),(0,G.H)(1e3).pipe((0,Z.z)(()=>e))):(0,Y._)(()=>t)))}}let eD=["includePreviousRevision","includeResult","includeMutations","includeAllVersions","visibility","effectFormat","tag"],eB={includeResult:!0};function eM(t,e,r={}){let{url:n,token:i,withCredentials:o,requestTagPrefix:s}=this.config(),a=r.tag&&s?[s,r.tag].join("."):r.tag,u={...ej(r,eB),tag:a},c=ee({query:t,params:e,options:{tag:a,...eq(u,eD)}}),l=`${n}${eI(this,"listen",c)}`;if(l.length>14800)return(0,Y._)(()=>Error("Query too large for listener"));let f=u.events?u.events:["mutation"],h={};return o&&(h.withCredentials=!0),i&&(h.headers={Authorization:`Bearer ${i}`}),t1(()=>(typeof EventSource>"u"||h.headers?eU:(0,z.of)(EventSource)).pipe((0,th.U)(t=>new t(l,h))),f).pipe(eP(),(0,tp.h)(t=>f.includes(t.type)),(0,th.U)(t=>({type:t.type,..."data"in t?t.data:{}})))}let eL="2021-03-25";class eN{#a;constructor(t){this.#a=t}events({includeDrafts:t=!1,tag:e}={}){var r,n,i;tU("live",this.#a.config());let{projectId:o,apiVersion:s,token:a,withCredentials:u,requestTagPrefix:c}=this.#a.config(),l=s.replace(/^v/,"");if("X"!==l&&l<eL)throw Error(`The live events API requires API version ${eL} or later. The current API version is ${l}. Please update your API version to use this feature.`);if(t&&!a&&!u)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 f=eI(this.#a,"live/events"),h=new URL(this.#a.getUrl(f,!1)),p=e&&c?[c,e].join("."):e;p&&h.searchParams.set("tag",p),t&&h.searchParams.set("includeDrafts","true");let d={};t&&a&&(d.headers={Authorization:`Bearer ${a}`}),t&&u&&(d.withCredentials=!0);let y=`${h.href}::${JSON.stringify(d)}`,g=eF.get(y);if(g)return g;let v=t1(()=>(typeof EventSource>"u"||d.headers?eU:(0,z.of)(EventSource)).pipe((0,th.U)(t=>new t(h.href,d))),["message","restart","welcome","reconnect","goaway"]).pipe(eP(),(0,th.U)(t=>{if("message"===t.type){let{data:e,...r}=t;return{...r,tags:e.tags}}return t})),m=(n={method:"OPTIONS",mode:"cors",credentials:d.withCredentials?"include":"omit",headers:d.headers},new L.y(t=>{let e=new AbortController,r=e.signal;return fetch(h,{...n,signal:e.signal}).then(e=>{t.next(e),t.complete()},e=>{r.aborted||t.error(e)}),()=>e.abort()})).pipe((0,Z.z)(()=>tr.E),(0,X.K)(()=>{throw new tm({projectId:o})})),b=(0,V.z)(m,v).pipe((0,Q.x)(()=>eF.delete(y)),(i="function"==typeof(r={predicate:t=>"welcome"===t.type})?{predicate:r}:r,t=>{let e,r=!1,{predicate:n,...o}=i,s=t.pipe((0,K.b)(t=>{i.predicate(t)&&(r=!0,e=t)}),(0,Q.x)(()=>{r=!1,e=void 0}),(0,tt.B)(o)),a=new L.y(t=>{r&&t.next(e),t.complete()});return(0,te.T)(s,a)}));return eF.set(y,b),b}}let eF=new Map;class ez{#a;#u;constructor(t,e){this.#a=t,this.#u=e}create(t,e){return eH(this.#a,this.#u,"PUT",t,e)}edit(t,e){return eH(this.#a,this.#u,"PATCH",t,e)}delete(t){return eH(this.#a,this.#u,"DELETE",t)}list(){return eC(this.#a,this.#u,{uri:"/datasets",tag:null})}}class eZ{#a;#u;
10constructor(t,e){this.#a=t,this.#u=e}create(t,e){return tU("dataset",this.#a.config()),(0,J.n)(eH(this.#a,this.#u,"PUT",t,e))}edit(t,e){return tU("dataset",this.#a.config()),(0,J.n)(eH(this.#a,this.#u,"PATCH",t,e))}delete(t){return tU("dataset",this.#a.config()),(0,J.n)(eH(this.#a,this.#u,"DELETE",t))}list(){return tU("dataset",this.#a.config()),(0,J.n)(eC(this.#a,this.#u,{uri:"/datasets",tag:null}))}}function eH(t,e,r,n,i){return tU("dataset",t.config()),tC(n),eC(t,e,{method:r,uri:`/datasets/${n}`,body:i,tag:null})}class eJ{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){tU("projects",this.#a.config());let e=t?.includeMembers===!1?"/projects?includeMembers=false":"/projects";return eC(this.#a,this.#u,{uri:e})}getById(t){return tU("projects",this.#a.config()),eC(this.#a,this.#u,{uri:`/projects/${t}`})}}class eW{#a;#u;constructor(t,e){this.#a=t,this.#u=e}list(t){tU("projects",this.#a.config());let e=t?.includeMembers===!1?"/projects?includeMembers=false":"/projects";return(0,J.n)(eC(this.#a,this.#u,{uri:e}))}getById(t){return tU("projects",this.#a.config()),(0,J.n)(eC(this.#a,this.#u,{uri:`/projects/${t}`}))}}class eX{#a;#u;constructor(t,e){this.#a=t,this.#u=e}getById(t){return eC(this.#a,this.#u,{uri:`/users/${t}`})}}class eV{#a;#u;
10constructor(t,e){this.#a=t,this.#u=e}getById(t){return(0,J.n)(eC(this.#a,this.#u,{uri:`/users/${t}`}))}}class eG{assets;datasets;live;projects;users;#c;#u;listen=eM;constructor(t,e=tZ){this.config(e),this.#u=t,this.assets=new eR(this,this.#u),this.datasets=new ez(this,this.#u),this.live=new eN(this),this.projects=new eJ(this,this.#u),this.users=new eX(this,this.#u)}clone(){return new eG(this.#u,this.config())}config(t){if(void 0===t)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.#c=tX(t,this.#c||{}),this}withConfig(t){let e=this.config();return new eG(this.#u,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return ea(this,this.#u,this.#c.stega,t,e,r)}getDocument(t,e){return eu(this,this.#u,t,e)}getDocuments(t,e){return ec(this,this.#u,t,e)}create(t,e){return eg(this,this.#u,t,"create",e)}createIfNotExists(t,e){return el(this,this.#u,t,e)}createOrReplace(t,e){return ef(this,this.#u,t,e)}delete(t,e){return eh(this,this.#u,t,e)}mutate(t,e){return ep(this,this.#u,t,e)}patch(t,e){return new t5(t,e,this)}transaction(t){return new et(t,this)}action(t,e){return ed(this,this.#u,t,e)}request(t){return eC(this,this.#u,t)}getUrl(t,e){return eT(this,t,e)}getDataUrl(t,e){return eI(this,t,e)}}class eY{assets;datasets;live;projects;users;observable;#c;#u;listen=eM;constructor(t,e=tZ){this.config(e),this.#u=t,this.assets=new ek(this,this.#u),this.datasets=new eZ(this,this.#u),this.live=new eN(this),this.projects=new eW(this,this.#u),this.users=new eV(this,this.#u),this.observable=new eG(t,e)}clone(){return new eY(this.#u,this.config())}config(t){if(void 0===t)return{...this.#c};if(this.#c&&!1===this.#c.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");return this.observable&&this.observable.config(t),this.#c=tX(t,this.#c||{}),this}withConfig(t){let e=this.config();return new eY(this.#u,{...e,...t,stega:{...e.stega||{},..."boolean"==typeof t?.stega?{enabled:t.stega}:t?.stega||{}}})}fetch(t,e,r){return(0,J.n)(ea(this,this.#u,this.#c.stega,t,e,r))}getDocument(t,e){return(0,J.n)(eu(this,this.#u,t,e))}getDocuments(t,e){return(0,J.n)(ec(this,this.#u,t,e))}create(t,e){return(0,J.n)(eg(this,this.#u,t,"create",e))}createIfNotExists(t,e){return(0,J.n)(el(this,this.#u,t,e))}createOrReplace(t,e){return(0,J.n)(ef(this,this.#u,t,e))}delete(t,e){return(0,J.n)(eh(this,this.#u,t,e))}mutate(t,e){return(0,J.n)(ep(this,this.#u,t,e))}patch(t,e){return new t8(t,e,this)}transaction(t){return new t9(t,this)}action(t,e){return(0,J.n)(ed(this,this.#u,t,e))}request(t){return(0,J.n)(eC(this,this.#u,t))}dataRequest(t,e,r){return(0,J.n)(ey(this,this.#u,t,e,r))}getUrl(t,e){return eT(this,t,e)}getDataUrl(t,e){return eI(this,t,e)}}let eK={requester:tw(h=[]),createClient:t=>{let e=tw(h);return new eY((r,n)=>(n||e)({maxRedirects:0,maxRetries:t.maxRetries,retryDelay:t.retryDelay,...r}),t)}},eQ=(eK.requester,eK.createClient)},89981:function(t,e,r){"use strict";r.d(e,{yK:function(){return I},Hq:function(){return O},ei:function(){return $},bK:function(){return R},Ol:function(){return k},UE:function(){return A},Ag:function(){return T},F8:function(){return C},dS:function(){return P},zB:function(){return U},lB:function(){return q}});var n=r(93837),i=r(40211),o=r(25181),s=r(87746),a=r(48769),u=r(68851),c=r(85078),l=r(7449),f=r(95767),h=r(44465),p=r(5853),d=r(17753),y=r(4382),g=r(30325),v=r(21178),m=r(60033),b=r(66692),w=r(89634);let x=t=>({context:e})=>{let{count:r,include:n,exclude:i,responseType:o="message.received"}=t;return{count:r,domain:e.domain,from:e.connectTo,include:n?Array.isArray(n)?n:[n]:[],exclude:i?Array.isArray(i)?i:[i]:[],responseType:o,target:e.target,to:e.name}},E=t=>e=>{let{data:r}=e;return(!t.include.length||t.include.includes(r.type))&&(!t.exclude.length||!t.exclude.includes(r.type))&&r.domain===t.domain&&r.from===t.from&&r.to===t.to&&(!t.target||e.source===t.target)},_=t=>e=>({type:t,message:e}),S=(0,u.P)(()=>(0,c.R)(window,"message")),C=t=>(0,i.Y$)(({input:e})=>{var r,n;return S.pipe(t?(0,l.U)(t):(0,f.z)(),(0,h.h)(E(e)),(0,l.U)(_(e.responseType)),e.count?(0,f.z)((r=e.count,void 0===n&&(n=null),n=null!=n?n:r,(0,d.e)(function(t,e){var i=[],o=0;t.subscribe((0,y.x)(e,function(t){var s,a,u,c,l=null;o++%n==0&&i.push([]);try{for(var f=(0,p.XA)(i),h=f.next();!h.done;h=f.next()){var d=h.value;d.push(t),r<=d.length&&(l=null!=l?l:[]).push(d)}}catch(t){s={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(s)throw s.error}}if(l)try{for(var y=(0,p.XA)(l),v=y.next();!v.done;v=y.next()){var d=v.value;(0,g.P)(i,d),e.next(d)}}catch(t){u={error:t}}finally{try{v&&!v.done&&(c=y.return)&&c.call(y)}finally{if(u)throw u.error}}},function(){var t,r;try{for(var n=(0,p.XA)(i),o=n.next();!o.done;o=n.next()){var s=o.value;e.next(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()},void 0,function(){i=null}))})),(0,v.b)(t=>t),(0,m.q)(e.count)):(0,f.z)())}),I="sanity/comlink",T="comlink/response",A="comlink/heartbeat",O="comlink/disconnect",R="comlink/handshake/syn",k="comlink/handshake/syn-ack",$="comlink/handshake/ack",j=t=>e=>e.pipe((0,m.q)(1),(0,l.U)(()=>{throw Error(t)})),q=()=>(0,o.cY)({types:{},actors:{listen:(0,i.Y$)(({input:t})=>{let e=t.signal?(0,c.R)(t.signal,"abort").pipe(j(`Request ${t.requestId} aborted`)):b.E;return(0,c.R)(window,"message").pipe((0,h.h)(e=>e.data?.type===T&&e.data?.responseTo===t.requestId&&!!e.source&&t.sources.has(e.source)),(0,m.q)(t.sources.size),(0,w.R)(e))})},actions:{"send message":({context:t},e)=>{let{sources:r,targetOrigin:n}=t,{message:i}=e;r.forEach(t=>{t.postMessage(i,{targetOrigin:n})})},"on success":(0,s.c)(({context:t})=>t.parentRef,({context:t,self:e})=>(t.response&&t.resolvable?.resolve(t.response),{type:"request.success",requestId:e.id,response:t.response,responseTo:t.responseTo})),"on fail":(0,s.c)(({context:t})=>t.parentRef,({context:t,self:e})=>(t.suppressWarnings||console.warn(`[@sanity/comlink] Received no response to message '${t.type}' on client '${t.from}' (ID: '${t.id}').`),t.resolvable?.reject(Error("No response received")),{type:"request.failed",requestId:e.id})),"on abort":(0,s.c)(({context:t})=>t.parentRef,({context:t,self:e})=>(t.resolvable?.reject(Error("Request aborted")),{type:"request.aborted",requestId:e.id}))},guards:{expectsResponse:({context:t})=>t.expectResponse},delays:{initialTimeout:0,responseTimeout:({context:t})=>t.responseTimeout??3e3}}).createMachine({context:({input:t})=>({channelId:t.channelId,data:t.data,domain:t.domain,expectResponse:t.expectResponse??!1,from:t.from,id:`msg-${(0,n.Z)()}`,parentRef:t.parentRef,resolvable:t.resolvable,response:null,responseTimeout:t.responseTimeout,responseTo:t.responseTo,signal:t.signal,sources:t.sources instanceof Set?t.sources:new Set([t.sources]),suppressWarnings:t.suppressWarnings,targetOrigin:t.targetOrigin,to:t.to,type:t.type}),initial:"idle",on:{abort:".aborted"},states:{idle:{after:{initialTimeout:[{target:"sending"}]}},sending:{entry:{type:"send message",params:({context:t})=>{let{channelId:e,data:r,domain:n,from:i,id:o,responseTo:s,to:a,type:u}=t;return{message:{channelId:e,data:r,domain:n,from:i,id:o,to:a,type:u,responseTo:s}}}},always:[{guard:"expectsResponse",target:"awaiting"},"success"]},awaiting:{invoke:{id:"listen for response",src:"listen",input:({context:t})=>({requestId:t.id,sources:t.sources,signal:t.signal}),onError:"aborted"},after:{responseTimeout:"failed"},on:{message:{actions:(0,s.a)({response:({event:t})=>t.data.data,responseTo:({event:t})=>t.data.responseTo}),target:"success"}}},failed:{type:"final",entry:"on fail"},success:{type:"final",entry:"on success"},aborted:{type:"final",entry:"on abort"}},output:({context:t,self:e})=>({requestId:e.id,response:t.response,responseTo:t.responseTo})}),U=((0,i.E9)(({sendBack:t,input:e})=>{let r=()=>{t(e.event)};e.immediate&&r();let n=setInterval(r,e.interval);return()=>{clearInterval(n)}}),()=>(0,o.cY)({types:{},actors:{requestMachine:q(),listen:C()},actions:{"buffer handshake":(0,s.a)({handshakeBuffer:({event:t,context:e})=>((0,o.ZD)(t,"message.received"),[...e.handshakeBuffer,t])}),"buffer message":(0,s.b)(({enqueue:t})=>{t.assign({buffer:({event:t,context:e})=>((0,o.ZD)(t,"post"),[...e.buffer,{data:t.data,resolvable:t.resolvable,options:t.options}])}),t.emit(({event:t})=>((0,o.ZD)(t,"post"),{type:"buffer.added",message:t.data}))}),"create request":(0,s.a)({requests:({context:t,event:e,self:r,spawn:i})=>{(0,o.ZD)(e,"request");let s=(Array.isArray(e.data)?e.data:[e.data]).map(e=>i("requestMachine",{id:`req-${(0,n.Z)()}`,input:{channelId:t.channelId,data:e.data,domain:t.domain,expectResponse:e.expectResponse,from:t.name,parentRef:r,resolvable:e.resolvable,responseTimeout:e.options?.responseTimeout,responseTo:e.responseTo,signal:e.options?.signal,sources:t.target,suppressWarnings:e.options?.suppressWarnings,targetOrigin:t.targetOrigin,to:t.connectTo,type:e.type}}));return[...t.requests,...s]}}),"emit heartbeat":(0,s.e)(()=>({type:"heartbeat"})),"emit received message":(0,s.b)(({enqueue:t})=>{t.emit(({event:t})=>((0,o.ZD)(t,"message.received"),{type:"message",message:t.message.data}))}),"emit status":(0,s.e)((t,e)=>({type:"status",status:e.status})),"post message":(0,a.O)(({event:t})=>((0,o.ZD)(t,"post"),{type:"request",data:{data:t.data.data,expectResponse:!!t.resolvable,type:t.data.type,resolvable:t.resolvable,options:t.options}})),"process pending handshakes":(0,s.b)(({context:t,enqueue:e})=>{t.handshakeBuffer.forEach(t=>e.raise(t)),e.assign({handshakeBuffer:[]})}),"remove request":(0,s.b)(({context:t,enqueue:e,event:r})=>{(0,o.ZD)(r,["request.success","request.failed","request.aborted"]),(0,a.R)(r.requestId),e.assign({requests:t.requests.filter(({id:t})=>t!==r.requestId)})}),"send response":(0,a.O)(({event:t})=>((0,o.ZD)(t,["message.received","heartbeat.received"]),{type:"request",data:{type:T,responseTo:t.message.data.id,data:void 0}})),"send handshake syn ack":(0,a.O)({type:"request",data:{type:k}}),"send pending messages":(0,s.b)(({enqueue:t})=>{t.raise(({context:t})=>({type:"request",data:t.buffer.map(({data:t,resolvable:e,options:r})=>({data:t.data,type:t.type,expectResponse:!!e,resolvable:e,options:r}))})),t.emit(({context:t})=>({type:"buffer.flushed",messages:t.buffer.map(({data:t})=>t)})),t.assign({buffer:[]})}),"set connection config":(0,s.a)({channelId:({event:t})=>((0,o.ZD)(t,"handshake.syn"),t.message.data.channelId),target:({event:t})=>((0,o.ZD)(t,"handshake.syn"),t.message.source||void 0),targetOrigin:({event:t})=>((0,o.ZD)(t,"handshake.syn"),t.message.origin)})},guards:{hasSource:({context:t})=>null!==t.target}}).createMachine({id:"node",context:({input:t})=>({buffer:[],channelId:null,connectTo:t.connectTo,domain:t.domain??I,handshakeBuffer:[],name:t.name,requests:[],target:void 0,targetOrigin:null}),invoke:{id:"listen for handshake syn",src:"listen",input:x({include:R,responseType:"handshake.syn"})},on:{"request.success":{actions:"remove request"},"request.failed":{actions:"remove request"},"request.aborted":{actions:"remove request"},"handshake.syn":{actions:"set connection config",target:".handshaking"}}
10,initial:"idle",states:{idle:{entry:[{type:"emit status",params:{status:"idle"}}],on:{post:{actions:"buffer message"}}},handshaking:{guard:"hasSource",entry:["send handshake syn ack",{type:"emit status",params:{status:"handshaking"}}],invoke:[{id:"listen for handshake ack",src:"listen",input:x({include:$,count:1,responseType:"handshake.complete"}),onDone:"connected"},{id:"listen for disconnect",src:"listen",input:x({include:O,count:1,responseType:"disconnect"})},{id:"listen for messages",src:"listen",input:x({exclude:[O,R,$,A,T]})}],on:{request:{actions:"create request"},post:{actions:"buffer message"},"message.received":{actions:"buffer handshake"},disconnect:{target:"idle"}}},connected:{entry:["process pending handshakes","send pending messages",{type:"emit status",params:{status:"connected"}}],invoke:[{id:"listen for messages",src:"listen",input:x({exclude:[O,R,$,A,T]})},{id:"listen for heartbeat",src:"listen",input:x({include:A,responseType:"heartbeat.received"})},{id:"listen for disconnect",src:"listen",input:x({include:O,count:1,responseType:"disconnect"})}],on:{request:{actions:"create request"},post:{actions:"post message"},disconnect:{target:"idle"},"message.received":{actions:["send response","emit received message"]},"heartbeat.received":{actions:["send response","emit heartbeat"]}}}}})),P=(t,e=U())=>{let r;let n=(0,a.A)(e,{input:t}),i=new Map,o=new Map;n.on("message",({message:t})=>{let e=i.get(t.type);if(e){e.forEach(e=>e(t.data));return}let r=o.get(t.type);r?r.add(t):o.set(t.type,new Set([t]))});let s=()=>{n.stop()};return{actor:n,fetch:(t,e,r)=>{let{responseTimeout:i=1e4,signal:o,suppressWarnings:s}=r||{},a=Promise.withResolvers();return n.send({type:"post",data:{type:t,data:e},resolvable:a,options:{responseTimeout:i,signal:o,suppressWarnings:s}}),a.promise},machine:e,on:(t,e,r)=>{let n=i.get(t)||new Set;i.has(t)||i.set(t,n),n.add(e);let s=o.get(t);if(s){let n=r?.replay??1;Array.from(s).slice(-n).forEach(({data:t})=>e(t)),o.delete(t)}return()=>{n.delete(e)}},onStatus:(t,e)=>{let{unsubscribe:i}=n.on("status",n=>{r=n.status,e&&n.status!==e||t(n.status)});return r&&t(r),i},post:(t,e)=>{n.send({type:"post",data:{type:t,data:e}})},start:()=>(n.start(),s),stop:s}}},5853:function(t,e,r){"use strict";r.d(e,{CR:function(){return f},FC:function(){return y},Jh:function(){return c},KL:function(){return g},XA:function(){return l},ZT:function(){return i},_T:function(){return s},ev:function(){return p},fl:function(){return h},gn:function(){return a},mG:function(){return u},pi:function(){return o},qq:function(){return d}});var n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return(o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)0>e.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function a(t,e,r,n){var i,o=arguments.length,s=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function u(t,e,r,n){return new(r||(r=Promise))(function(i,o){function s(t){try{u(n.next(t))}catch(t){o(t)}}function a(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(s,a)}u((n=n.apply(t,e||[])).next())})}function c(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;
10function a(a){return function(u){return function(a){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function l(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function h(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(f(arguments[e]));return t}function p(t,e,r){if(r||2==arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))}function d(t){return this instanceof d?(this.v=t,this):new d(t)}function y(t,e,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(t){i[t]&&(n[t]=function(e){return new Promise(function(r,n){o.push([t,e,r,n])>1||a(t,e)})})}function a(t,e){try{var r;(r=i[t](e)).value instanceof d?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(t){l(o[0][3],t)}}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function g(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=l(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,i){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,i,(e=t[r](e)).done,e.value)})}}}"function"==typeof SuppressedError&&SuppressedError},52141:function(t,e,r){"use strict";r.d(e,{i:function(){return i}});var n=r(2265);function i(t){let e=(0,n.useRef)(null);return(0,n.useInsertionEffect)(()=>{e.current=t},[t]),(0,n.useCallback)((...t)=>(0,e.current)(...t),[])}},93837:function(t,e,r){"use strict";let n;r.d(e,{Z:function(){return a}});var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o=new Uint8Array(16),s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));var a=function(t,e,r){if(i.randomUUID&&!e&&!t)return i.randomUUID();let a=(t=t||{}).random??t.rng?.()??function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(o)}();if(a.length<16)throw Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e){if((r=r||0)<0||r+16>e.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=a[t];return e}return function(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}(a)}}}]);

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.