PageSourceSearch

https://rana-hemdan.vercel.app/_next/static/chunks/5673-8ae21723e8848ac0.js

js rana-hemdan.vercel.app collected 2026-10-03 07:34:49 UTC 142,864 bytes, 4 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5673],{3740:function(t){var e;e=function(){function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var n="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function r(t){return("image-"+t.split("/").slice(-1)[0]).replace(/\.([a-z]+)$/,"-$1")}var i=[["width","w"],["height","h"],["format","fm"],["download","dl"],["blur","blur"],["sharpen","sharp"],["invert","invert"],["orientation","or"],["minHeight","min-h"],["maxHeight","max-h"],["minWidth","min-w"],["maxWidth","max-w"],["quality","q"],["fit","fit"],["crop","crop"],["saturation","sat"],["auto","auto"],["dpr","dpr"],["pad","pad"]],o=["clip","crop","fill","fillmax","max","scale","min"],s=["top","bottom","left","right","center","focalpoint","entropy"],u=["format"],a=function(){function a(e,n){this.options=void 0,this.options=e?t({},e.options||{},n||{}):t({},n||{})}var c=a.prototype;return c.withOptions=function(n){var r=n.baseUrl||this.options.baseUrl,o={baseUrl:r};for(var s in n)n.hasOwnProperty(s)&&(o[function(t){for(var n,r=function(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);if("Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,void 0)}}(t))){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i);!(n=r()).done;){var o=n.value,s=o[0],u=o[1];if(t===s||t===u)return s}return t}(s)]=n[s]);return new a(this,t({baseUrl:r},o))},c.image=function(t){return this.withOptions({source:t})},c.dataset=function(t){return this.withOptions({dataset:t})},c.projectId=function(t){return this.withOptions({projectId:t})},c.bg=function(t){return this.withOptions({bg:t})},c.dpr=function(t){return this.withOptions(t&&1!==t?{dpr:t}:{})},c.width=function(t){return this.withOptions({width:t})},c.height=function(t){return this.withOptions({height:t})},c.focalPoint=function(t,e){return this.withOptions({focalPoint:{x:t,y:e}})},c.maxWidth=function(t){return this.withOptions({maxWidth:t})},c.minWidth=function(t){return this.withOptions({minWidth:t})},c.maxHeight=function(t){return this.withOptions({maxHeight:t})},c.minHeight=function(t){return this.withOptions({minHeight:t})},c.size=function(t,e){return this.withOptions({width:t,height:e})},c.blur=function(t){return this.withOptions({blur:t})},c.sharpen=function(t){return this.withOptions({sharpen:t})},c.rect=function(t,e,n,r){return this.withOptions({rect:{left:t,top:e,width:n,height:r}})},c.format=function(t){return this.withOptions({format:t})},c.invert=function(t){return this.withOptions({invert:t})},c.orientation=function(t){return this.withOptions({orientation:t})},c.quality=function(t){return this.withOptions({quality:t})},c.forceDownload=function(t){return this.withOptions({download:t})},c.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},c.flipVertical=function(){return this.withOptions({flipVertical:!0})},c.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},c.fit=function(t){if(-1===o.indexOf(t))throw Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},c.crop=function(t){if(-1===s.indexOf(t))throw Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},c.saturation=function(t){return this.withOptions({saturation:t})},c.auto=function(t){if(-1===u.indexOf(t))throw Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},c.pad=function(t){return this.withOptions({pad:t})},c.url=function(){return function(e){var o=t({},e||{}),s=o.source;delete o.source;var u=function(e){var n;if(!e)return null;if("string"==typeof e&&/^https?:\/\//.test(""+e))n={asset:{_ref:r(e)}};else if("string"==typeof e)n={asset:{_ref:e}};else if(e&&"string"==typeof e._ref)n={asset:e};else if(e&&"string"==typeof e._id)n={asset:{_ref:e._id||""}};else if(e&&e.asset&&"string"==typeof e.asset.url)n={asset:{_ref:r(e.asset.url)}};else{if("object"!=typeof e.asset)return null;n=t({},e)}return e.crop&&(n.crop=e.crop),e.hotspot&&(n.hotspot=e.hotspot),function(e){if(e.crop&&e.hotspot)return e;var n=t({},e);return n.crop||(n.crop={left:0,top:0,bottom:0,right:0}),n.hotspot||(n.hotspot={x:.5,y:.5,height:1,width:1}),n}(n)}(s);if(!u)throw Error("Unable to resolve image URL from source ("+JSON.stringify(s)+")");var a=function(t){var e=t.split("-"),r=e[1],i=e[2],o=e[3];
1if(!r||!i||!o)throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+n+'".');var s=i.split("x"),u=s[0],a=s[1],c=+u,f=+a;if(!(isFinite(c)&&isFinite(f)))throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+n+'".');return{id:r,width:c,height:f,format:o}}(u.asset._ref||u.asset._id||""),c=Math.round(u.crop.left*a.width),f=Math.round(u.crop.top*a.height),l={left:c,top:f,width:Math.round(a.width-u.crop.right*a.width-c),height:Math.round(a.height-u.crop.bottom*a.height-f)},h=u.hotspot.height*a.height/2,p=u.hotspot.width*a.width/2,d=u.hotspot.x*a.width,y=u.hotspot.y*a.height;return o.rect||o.focalPoint||o.ignoreImageParams||o.crop||(o=t({},o,function(t,e){var n,r=e.width,i=e.height;if(!(r&&i))return{width:r,height:i,rect:t.crop};var o=t.crop,s=t.hotspot,u=r/i;if(o.width/o.height>u){var a=Math.round(o.height),c=Math.round(a*u),f=Math.max(0,Math.round(o.top)),l=Math.max(0,Math.round(Math.round((s.right-s.left)/2+s.left)-c/2));l<o.left?l=o.left:l+c>o.left+o.width&&(l=o.left+o.width-c),n={left:l,top:f,width:c,height:a}}else{var h=o.width,p=Math.round(h/u),d=Math.max(0,Math.round(o.left)),y=Math.max(0,Math.round(Math.round((s.bottom-s.top)/2+s.top)-p/2));y<o.top?y=o.top:y+p>o.top+o.height&&(y=o.top+o.height-p),n={left:d,top:y,width:h,height:p}}return{width:r,height:i,rect:n}}({crop:l,hotspot:{left:d-p,top:y-h,right:d+p,bottom:y+h}},o))),function(t){var e=(t.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),n=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,r=e+"/images/"+t.projectId+"/"+t.dataset+"/"+n,o=[];if(t.rect){var s=t.rect,u=s.left,a=s.top,c=s.width,f=s.height;(0!==u||0!==a||f!==t.asset.height||c!==t.asset.width)&&o.push("rect="+u+","+a+","+c+","+f)}t.bg&&o.push("bg="+t.bg),t.focalPoint&&(o.push("fp-x="+t.focalPoint.x),o.push("fp-y="+t.focalPoint.y));var l=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(l&&o.push("flip="+l),i.forEach(function(e){var n=e[0],r=e[1];void 0!==t[n]?o.push(r+"="+encodeURIComponent(t[n])):void 0!==t[r]&&o.push(r+"="+encodeURIComponent(t[r]))}),0===o.length)?r:r+"?"+o.join("&")}(t({},o,{asset:a}))}(this.options)},c.toString=function(){return this.url()},a}();return function(t){if(t&&"config"in t&&"function"==typeof t.config){var e=t.config(),n=e.apiHost,r=e.projectId,i=e.dataset;return new a(null,{baseUrl:(n||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:r,dataset:i})}if(t&&"clientConfig"in t&&"object"==typeof t.clientConfig){var o=t.clientConfig,s=o.apiHost,u=o.projectId,c=o.dataset;return new a(null,{baseUrl:(s||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:u,dataset:c})}return new a(null,t)}},t.exports=e()},59196:function(t,e){"use strict";e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return(n+r)*3/4-r},e.toByteArray=function(t){var e,n,o=a(t),s=o[0],u=o[1],c=new i((s+u)*3/4-u),f=0,l=u>0?s-4:s;for(n=0;n<l;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===u&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[f++]=255&e),1===u&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,u=r-i;s<u;s+=16383)o.push(function(t,e,r){for(var i,o=[],s=e;s<r;s+=3)o.push(n[(i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]))>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}(t,s,s+16383>u?u:s+16383));return 1===i?o.push(n[(e=t[r-1])>>2]+n[e<<4&63]+"=="):2===i&&o.push(n[(e=(t[r-2]<<8)+t[r-1])>>10]+n[e>>4&63]+n[e<<2&63]+"="),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},82957:function(t,e,n){"use strict";let r=n(59196),i=n(68848),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>
12147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,n){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return f(t)}return a(t,e,n)}function a(t,e,n){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!u.isEncoding(e))throw TypeError("Unknown encoding: "+e);let n=0|d(t,e),r=s(n),i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(F(t,Uint8Array)){let e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return l(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(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(F(t,SharedArrayBuffer)||t&&F(t.buffer,SharedArrayBuffer)))return h(t,e,n);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);let i=function(t){var e;if(u.isBuffer(t)){let e=0|p(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?s(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,n);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 f(t){return c(t),s(t<0?0:0|p(t))}function l(t){let e=t.length<0?0:0|p(t.length),n=s(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function h(t,e,n){let r;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),u.prototype),r}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(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(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);let n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(t).length;default:if(i)return r?-1:$(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,n){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,n){let r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=M[t[r]];return i}(this,e,n);case"utf8":case"utf-8":return b(this,e,n);case"ascii":return function(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}(this,e,n);case"latin1":case"binary":return function(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}(this,e,n);case"base64":var o,s;return o=e,s=n,0===o&&s===this.length?r.fromByteArray(this):r.fromByteArray(this.slice(o,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,n){let r=t.slice(e,n),i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}(this,e,n);default:if(i)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){var o;if(0===t.length)return -1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),(o=n=+n)!=o&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return -1;n=t.length-1}else if(n<0){if(!i)return -1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){let o,s=1,u=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return -1;s=2,u/=2,a/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let r=-1;for(o=n;o<u;o++)if(c(t,o)===c(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===a)return r*s}else -1!==r&&(o-=o-r),r=-1}else for(n+a>u&&(n=u-a),o=n;o>=0;o--){let n=!0;for(let r=0;r<a;r++)if(c(t,o+r)!==c(e,r)){n=!1;break}if(n)return o}return -1}function b(t,e,n){n=Math.min(t.length,n);let r=[],i=e;for(;i<n;){let e=t[i],o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=n){let n,r,u,a;switch(s){case 1:e<128&&(o=e);break;case 2:(192&(n=t[i+1]))==128&&(a=(31&e)<<6|63&n)>127&&(o=a);break;case 3:n=t[i+1],r=t[i+2],(192&n)==128&&(192&r)==128&&(a=(15&e)<<12|(63&n)<<6|63&r)>
vendor: 15,385 bytes, line 1
12047&&(a<55296||a>57343)&&(o=a);break;case 4:n=t[i+1],r=t[i+2],u=t[i+3],(192&n)==128&&(192&r)==128&&(192&u)==128&&(a=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&u)>65535&&a<1114112&&(o=a)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}function w(t,e,n){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>n)throw RangeError("Trying to access beyond buffer length")}function _(t,e,n,r,i,o){if(!u.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(n+r>t.length)throw RangeError("Index out of range")}function x(t,e,n,r,i){k(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,n}function E(t,e,n,r,i){k(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=s,s>>=8,t[n+2]=s,s>>=8,t[n+1]=s,s>>=8,t[n]=s,n+8}function S(t,e,n,r,i,o){if(n+r>t.length||n<0)throw RangeError("Index out of range")}function I(t,e,n,r,o){return e=+e,n>>>=0,o||S(t,e,n,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,n,r,23,4),n+4}function C(t,e,n,r,o){return e=+e,n>>>=0,o||S(t,e,n,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,n,r,52,8),n+8}e.lW=u,e.h2=50,u.TYPED_ARRAY_SUPPORT=function(){try{let 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}}(),u.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(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,n){return a(t,e,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,n){return(c(t),t<=0)?s(t):void 0!==e?"string"==typeof n?s(t).fill(e,n):s(t).fill(e):s(t)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(F(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),F(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.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}},u.concat=function(t,e){let n;if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);if(void 0===e)for(n=0,e=0;n<t.length;++n)e+=t[n].length;let r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){let e=t[n];if(F(e,Uint8Array))i+e.length>r.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else if(u.isBuffer(e))e.copy(r,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let 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},u.prototype.toString=function(){let t=this.length;return 0===t?"":0==arguments.length?b(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="",n=e.h2;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,n,r,i){if(F(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.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===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return -1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;let o=i-r,s=n-e,a=Math.min(o,s),c=this.slice(r,i),f=t.slice(e,n);for(let t=0;t<a;++t)if(c[t]!==f[t]){o=c[t],s=f[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return -1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){var i,o,s,u,a,c,f,l;if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-e;if((void 0===n||n>h)&&(n=h),t.length>0&&(n<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let p=!1;for(;;)switch(r){case"hex":return function(t,e,n,r){let i;n=Number(n)||0;let o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;let s=e.length;for(r>s/2&&(r=s/2),i=0;i<r;++i){let r=parseInt(e.substr(2*i,2),16);if(r!=r)break;t[n+i]=r}return i}(this,t,e,n);case"utf8":case"utf-8":return i=e,o=n,P($(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return s=e,u=n,P(function(t){let e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(t),this,s,u);case"base64":return a=e,c=n,P(j(t),this,a,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f=e,l=n,P(function(t,e){let n,r;let i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)r=(n=t.charCodeAt(o))>>8,i.push(n%256),i.push(r);return i}(t,this.length-f),this,f,l);default:if(p)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),p=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},u.prototype.slice=function(t,e){let n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);let r=this.subarray(t,e);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||w(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||w(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||w(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||w(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.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]},u.prototype.readUint32BE=u.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])},u.prototype.readBigUInt64LE=q(function(t){R(t>>>=0,"offset");let e=this[t],n=this[t+7];(void 0===e||void 0===n)&&B(t,this.length-8);let r=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*n;return BigInt(r)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=q(function(t){R(t>>>=0,"offset");let e=this[t],n=this[t+7];(void 0===e||void 0===n)&&B(t,this.length-8);let r=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||w(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||w(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return(t>>>=0,e||w(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||w(t,2,this.length);let n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||w(t,2,this.length);let n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.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},u.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]},u.prototype.readBigInt64LE=q(function(t){R(t>>>=0,"offset");let e=this[t],n=this[t+7];return(void 0===e||void 0===n)&&B(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24))<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+16777216*this[++t])}),u.prototype.readBigInt64BE=q(function(t){R(t>>>=0,"offset");let e=this[t],n=this[t+7];return(void 0===e||void 0===n)&&B(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<<BigInt(32))+BigInt(16777216*this[++t]+65536*this[++t]+256*this[++t]+n)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||w(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||w(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||w(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||w(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;_(this,t,e,n,r,0)}let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;_(this,t,e,n,r,0)}let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||_(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},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||_(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},u.prototype.writeBigUInt64LE=q(function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=q(function(t,e=0){return E(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){let r=Math.pow(2,8*n-1);_(this,t,e,n,r-1,-r)}let i=0,o=1,s=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){let r=Math.pow(2,8*n-1);_(this,t,e,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||_(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},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||_(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},u.prototype.writeBigInt64LE=q(function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=q(function(t,e=0){return E(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,n){return I(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return I(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return C(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return C(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);let i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},u.prototype.fill=function(t,e,n,r){let i;if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===t.length){let e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw RangeError("Out of range index");if(n<=e)return this;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{let o=u.isBuffer(t)?t:u.from(t,r),s=o.length;
1if(0===s)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%s]}return this};let O={};function T(t,e,n){O[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function A(t){let e="",n=t.length,r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function k(t,e,n,r,i,o){if(t>n||t<e){let r;let i="bigint"==typeof e?"n":"";throw r=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${n}${i}`,new O.ERR_OUT_OF_RANGE("value",r,t)}R(i,"offset"),(void 0===r[i]||void 0===r[i+o])&&B(i,r.length-(o+1))}function R(t,e){if("number"!=typeof t)throw new O.ERR_INVALID_ARG_TYPE(e,"number",t)}function B(t,e,n){if(Math.floor(t)!==t)throw R(t,n),new O.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new O.ERR_BUFFER_OUT_OF_BOUNDS;throw new O.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}T("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),T("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),T("ERR_OUT_OF_RANGE",function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>4294967296?i=A(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=A(i)),i+="n"),r+=` It must be ${e}. Received ${i}`},RangeError);let U=/[^+/0-9A-Za-z-_]/g;function $(t,e){let n;e=e||1/0;let r=t.length,i=null,o=[];for(let s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319||s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return o}function j(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length)&&!(i>=t.length);++i)e[i+n]=t[i];return i}function F(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let M=function(){let t="0123456789abcdef",e=Array(256);for(let n=0;n<16;++n){let r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function q(t){return"undefined"==typeof BigInt?L:t}function L(){throw Error("BigInt not supported")}},68848:function(t,e){e.read=function(t,e,n,r,i){var o,s,u=8*i-r-1,a=(1<<u)-1,c=a>>1,f=-7,l=n?i-1:0,h=n?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,u,a,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?5960464477539062e-23:0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(u=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+l>=1?e+=h/a:e+=h*Math.pow(2,1-l),e*a>=2&&(s++,a/=2),s+l>=f?(u=0,s=f):s+l>=1?(u=(e*a-1)*Math.pow(2,i),s+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&u,p+=d,u/=256,i-=8);for(s=s<<i|u,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*y}},78743:function(t,e,n){"use strict";n.d(e,{y:function(){return f}});var r=n(19142),i=n(37219),o=n(27723),s=n(95767),u=n(80124),a=n(2070),c=n(99287),f=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o,s=this,u=(o=t)&&o instanceof r.Lv||o&&(0,a.m)(o.next)&&(0,a.m)(o.error)&&(0,a.m)(o.complete)&&(0,i.Nn)(o)?t:new r.Hp(t,e,n);return(0,c.x)(function(){var t=s.operator,e=s.source;u.add(t?t.call(u,e):e?s._subscribe(u):s._trySubscribe(u))}),u},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(e))(function(e,i){var o=new r.Hp({next:function(e){try{t(e)}catch(t){i(t),o.unsubscribe()}},error:i,complete:e});n.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=l(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();function l(t){var e;return null!==(e=null!=t?t:u.v.Promise)&&void 0!==e?e:Promise}},95978:function(t,e,n){"use strict";n.d(e,{t:function(){return s}});var r=n(5134),i=n(82863),o=n(24325),s=function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=o.l);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}return(0,r.ZT)(e,t),e.prototype.next=function(e){var n=this.isStopped,r=this._buffer,i=this._infiniteTimeWindow,o=this._timestampProvider,s=this._windowTime;!n&&(r.push(e),i||r.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),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this._bufferSize,e=this._timestampProvider,n=this._buffer,r=this._infiniteTimeWindow,i=(r?1:2)*t;
1if(t<1/0&&i<n.length&&n.splice(0,n.length-i),!r){for(var o=e.now(),s=0,u=1;u<n.length&&n[u]<=o;u+=2)s=u;s&&n.splice(0,s+1)}},e}(i.x)},82863:function(t,e,n){"use strict";n.d(e,{x:function(){return c}});var r=n(5134),i=n(78743),o=n(37219),s=(0,n(37169).d)(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),u=n(30325),a=n(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,r.ZT)(e,t),e.prototype.lift=function(t){var e=new f(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,a.x)(function(){var n,i;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var o=(0,r.XA)(e.currentObservers),s=o.next();!s.done;s=o.next())s.value.next(t)}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}})},e.prototype.error=function(t){var e=this;(0,a.x)(function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}})},e.prototype.complete=function(){var t=this;(0,a.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,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?o.Lc:(this.currentObservers=null,i.push(t),new o.w0(function(){e.currentObservers=null,(0,u.P)(i,t)}))},e.prototype._checkFinalizedStatuses=function(t){var e=this.hasError,n=this.thrownError,r=this.isStopped;e?t.error(n):r&&t.complete()},e.prototype.asObservable=function(){var t=new i.y;return t.source=this,t},e.create=function(t,e){return new f(t,e)},e}(i.y),f=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return(0,r.ZT)(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.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,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:o.Lc},e}(c)},19142:function(t,e,n){"use strict";n.d(e,{Hp:function(){return v},Lv:function(){return p}});var r=n(5134),i=n(2070),o=n(37219),s=n(80124),u=n(67444),a=n(8365),c=f("C",void 0,void 0);function f(t,e,n){return{kind:t,value:e,error:n}}var l=n(94814),h=n(99287),p=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,(0,o.Nn)(e)&&e.add(n)):n.destination=w,n}return(0,r.ZT)(e,t),e.create=function(t,e,n){return new v(t,e,n)},e.prototype.next=function(t){this.isStopped?b(f("N",t,void 0),this):this._next(t)},e.prototype.error=function(t){this.isStopped?b(f("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,n,r){var o,u,a=t.call(this)||this;return(0,i.m)(e)||!e?o={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:a&&s.v.useDeprecatedNextContext?((u=Object.create(e)).unsubscribe=function(){return a.unsubscribe()},o={next:e.next&&y(e.next,u),error:e.error&&y(e.error,u),complete:e.complete&&y(e.complete,u)}):o=e,a.destination=new g(o),a}return(0,r.ZT)(e,t),e}(p);function m(t){s.v.useDeprecatedSynchronousErrorHandling?(0,h.O)(t):(0,u.h)(t)}function b(t,e){var n=s.v.onStoppedNotification;n&&l.z.setTimeout(function(){return n(t,e)})}var w={closed:!0,next:a.Z,error:function(t){throw t},complete:a.Z}},37219:function(t,e,n){"use strict";n.d(e,{Lc:function(){return a},w0:function(){return u},Nn:function(){return c}});var r=n(5134),i=n(2070),o=(0,n(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=n(30325),u=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,n,s,u,a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var c=(0,r.XA)(a),l=c.next();!l.done;l=c.next())l.value.remove(this)}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=c.return)&&e.call(c)}finally{if(t)throw t.error}}else a.remove(this)}var h=this.initialTeardown;if((0,i.m)(h))try{h()}catch(t){u=t instanceof o?t.errors:[t]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var d=(0,r.XA)(p),y=d.next();!y.done;y=d.next()){var g=y.value;try{f(g)}catch(t){u=null!=u?u:[],t instanceof o?u=(0,r.ev)((0,r.ev)([],(0,r.CR)(u)),(0,r.CR)(t.errors)):u.push(t)}}}catch(t){n={error:t}}finally{try{y&&!y.done&&(s=d.return)&&s.call(d)}finally{if(n)throw n.error}}}if(u)throw new o(u)}},e.prototype.add=function(t){var n;if(t&&t!==this){if(this.closed)f(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).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 n=this._finalizers;n&&(0,s.P)(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),a=u.EMPTY;function c(t){return t instanceof u||t&&"closed"in t&&(0,i.m)(t.remove)&&(0,i.m)(t.add)&&(0,i.m)(t.unsubscribe)}function f(t){(0,i.m)(t)?t():t.unsubscribe()}},80124:function(t,e,n){"use strict";n.d(e,{v:function(){return r}});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},30783:function(t,e,n){"use strict";n.d(e,{z:function(){return o}});var r=n(60551),i=n(19142);function o(t,e){var n="object"==typeof e;return new Promise(function(o,s){var u=new i.Hp({next:function(t){o(t),u.unsubscribe()},error:s,complete:function(){n?o(e.defaultValue):s(new r.K)}});t.subscribe(u)})}},46737:function(t,e,n){"use strict";n.d(e,{n:function(){return i}});var r=n(60551);function i(t,e){var n="object"==typeof e;return new Promise(function(i,o){var s,u=!1;t.subscribe({next:function(t){s=t,u=!0},error:o,complete:function(){u?i(s):n?i(e.defaultValue):o(new r.K)}})})}},79911:function(t,e,n){"use strict";n.d(e,{a:function(){return h},l:function(){return p}});var r=n(78743),i=n(47026),o=n(28419),s=n(15531),u=n(59326),a=n(36023),c=n(82663),f=n(4382),l=n(42903);function h(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,a.yG)(t),f=(0,a.jO)(t),l=(0,i.D)(t),h=l.args,d=l.keys;if(0===h.length)return(0,o.D)([],n);var y=new r.y(p(h,n,d?function(t){return(0,c.n)(d,t)}:s.y));return f?y.pipe((0,u.Z)(f)):y}function p(t,e,n){return void 0===n&&(n=s.y),function(r){d(e,function(){for(var i=t.length,s=Array(i),u=i,a=i,c=function(i){d(e,function(){var c=(0,o.D)(t[i],e),l=!1;c.subscribe((0,f.x)(r,function(t){s[i]=t,!l&&(l=!0,a--),a||r.next(n(s.slice()))},function(){--u||r.complete()}
1))},r)},l=0;l<i;l++)c(l)},r)}}function d(t,e,n){t?(0,l.f)(n,t,e):e()}},85393:function(t,e,n){"use strict";n.d(e,{z:function(){return s}});var r=n(70273),i=n(36023),o=n(28419);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,r.u)()((0,o.D)(t,(0,i.yG)(t)))}},68851:function(t,e,n){"use strict";n.d(e,{P:function(){return o}});var r=n(78743),i=n(96750);function o(t){return new r.y(function(e){(0,i.Xf)(t()).subscribe(e)})}},66692:function(t,e,n){"use strict";n.d(e,{E:function(){return r}});var r=new(n(78743)).y(function(t){return t.complete()})},28419:function(t,e,n){"use strict";n.d(e,{D:function(){return o}});var r=n(35995),i=n(96750);function o(t,e){return e?(0,r.x)(t,e):(0,i.Xf)(t)}},85078:function(t,e,n){"use strict";n.d(e,{R:function(){return function t(e,n,d,y){if((0,a.m)(d)&&(y=d,d=void 0),y)return t(e,n,d).pipe((0,c.Z)(y));var g=(0,r.CR)((0,a.m)(e.addEventListener)&&(0,a.m)(e.removeEventListener)?l.map(function(t){return function(r){return e[t](n,r,d)}}):(0,a.m)(e.addListener)&&(0,a.m)(e.removeListener)?f.map(p(e,n)):(0,a.m)(e.on)&&(0,a.m)(e.off)?h.map(p(e,n)):[],2),v=g[0],m=g[1];if(!v&&(0,u.z)(e))return(0,s.z)(function(e){return t(e,n,d)})((0,i.Xf)(e));if(!v)throw TypeError("Invalid event target");return new o.y(function(t){var e=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.next(1<e.length?e:e[0])};return v(e),function(){return m(e)}})}}});var r=n(5134),i=n(96750),o=n(78743),s=n(36550),u=n(76613),a=n(2070),c=n(59326),f=["addListener","removeListener"],l=["addEventListener","removeEventListener"],h=["on","off"];function p(t,e){return function(n){return function(r){return t[n](e,r)}}}},96750:function(t,e,n){"use strict";n.d(e,{Xf:function(){return y}});var r=n(5134),i=n(76613),o=n(84223),s=n(78743),u=n(87229),a=n(67555),c=n(46345),f=n(96090),l=n(32450),h=n(2070),p=n(67444),d=n(27723);function y(t){if(t instanceof s.y)return t;if(null!=t){if((0,u.c)(t))return new s.y(function(e){var n=t[d.L]();if((0,h.m)(n.subscribe))return n.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 n=0;n<t.length&&!e.closed;n++)e.next(t[n]);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,a.D)(t))return g(t);if((0,f.T)(t))return new s.y(function(e){var n,i;try{for(var o=(0,r.XA)(t),s=o.next();!s.done;s=o.next()){var u=s.value;if(e.next(u),e.closed)return}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}e.complete()});if((0,l.L)(t))return g((0,l.Q)(t))}throw(0,c.z)(t)}function g(t){return new s.y(function(e){(function(t,e){var n,i,o,s;return(0,r.mG)(this,void 0,void 0,function(){var u;return(0,r.Jh)(this,function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),n=(0,r.KL)(t),a.label=1;case 1:return[4,n.next()];case 2:if((i=a.sent()).done)return[3,4];if(u=i.value,e.next(u),e.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:a.sent()},[3,11];case 6:if(a.trys.push([6,,9,10]),!(i&&!i.done&&(s=n.return)))return[3,8];return[4,s.call(n)];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})})(t,e).catch(function(t){return e.error(t)})})}},36381:function(t,e,n){"use strict";n.d(e,{T:function(){return a}});var r=n(6904),i=n(96750),o=n(66692),s=n(36023),u=n(28419);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,s.yG)(t),a=(0,s._6)(t,1/0);return t.length?1===t.length?(0,i.Xf)(t[0]):(0,r.J)(a)((0,u.D)(t,n)):o.E}},87935:function(t,e,n){"use strict";n.d(e,{of:function(){return o}});var r=n(36023),i=n(28419);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,r.yG)(t);return(0,i.D)(t,n)}},38214:function(t,e,n){"use strict";n.d(e,{_:function(){return o}});var r=n(78743),i=n(2070);function o(t,e){var n=(0,i.m)(t)?t:function(){return t},o=function(t){return t.error(n())};return new r.y(e?function(t){return e.schedule(o,0,t)}:o)}},61514:function(t,e,n){"use strict";n.d(e,{H:function(){return u}});var r=n(78743),i=n(46593),o=n(96476),s=n(13746);function u(t,e,n){void 0===t&&(t=0),void 0===n&&(n=i.P);var u=-1;return null!=e&&((0,o.K)(e)?n=e:u=e),new r.y(function(e){var r=(0,s.q)(t)?+t-n.now():t;r<0&&(r=0);var i=0;return n.schedule(function(){e.closed||(e.next(i++),0<=u?this.schedule(void 0,u):e.complete())},r)})}},4382:function(t,e,n){"use strict";n.d(e,{Q:function(){return o},x:function(){return i}});var r=n(5134);function i(t,e,n,r,i){return new o(t,e,n,r,i)}var o=function(t){function e(e,n,r,i,o,s){var u=t.call(this,e)||this;return u.onFinalize=o,u.shouldUnsubscribe=s,u._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,u._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,u}return(0,r.ZT)(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),n||null===(e=this.onFinalize)||void 0===e||e.call(this)}},e}(n(19142).Lv)},17482:function(t,e,n){"use strict";n.d(e,{K:function(){return function t(e){return(0,o.e)(function(n,o){var s,u=null,a=!1;u=n.subscribe((0,i.x)(o,void 0,void 0,function(i){s=(0,r.Xf)(e(i,t(e)(n))
1),u?(u.unsubscribe(),u=null,s.subscribe(o)):a=!0})),a&&(u.unsubscribe(),u=null,s.subscribe(o))})}}});var r=n(96750),i=n(4382),o=n(17753)},81125:function(t,e,n){"use strict";n.d(e,{V:function(){return l}});var r=n(5134),i=n(79911),o=n(17753),s=n(82573),u=n(59326),a=n(95767),c=n(36023);function f(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,c.jO)(t);return n?(0,a.z)(f.apply(void 0,(0,r.ev)([],(0,r.CR)(t))),(0,u.Z)(n)):(0,o.e)(function(e,n){(0,i.l)((0,r.ev)([e],(0,r.CR)((0,s.k)(t))))(n)})}function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f.apply(void 0,(0,r.ev)([],(0,r.CR)(t)))}},70273:function(t,e,n){"use strict";n.d(e,{u:function(){return i}});var r=n(6904);function i(){return(0,r.J)(1)}},21178:function(t,e,n){"use strict";n.d(e,{b:function(){return o}});var r=n(36550),i=n(2070);function o(t,e){return(0,i.m)(e)?(0,r.z)(t,e,1):(0,r.z)(t,1)}},44465:function(t,e,n){"use strict";n.d(e,{h:function(){return o}});var r=n(17753),i=n(4382);function o(t,e){return(0,r.e)(function(n,r){var o=0;n.subscribe((0,i.x)(r,function(n){return t.call(e,n,o++)&&r.next(n)}))})}},67387:function(t,e,n){"use strict";n.d(e,{x:function(){return i}});var r=n(17753);function i(t){return(0,r.e)(function(e,n){try{e.subscribe(n)}finally{n.add(t)}})}},7449:function(t,e,n){"use strict";n.d(e,{U:function(){return o}});var r=n(17753),i=n(4382);function o(t,e){return(0,r.e)(function(n,r){var o=0;n.subscribe((0,i.x)(r,function(n){r.next(t.call(e,n,o++))}))})}},6904:function(t,e,n){"use strict";n.d(e,{J:function(){return o}});var r=n(36550),i=n(15531);function o(t){return void 0===t&&(t=1/0),(0,r.z)(i.y,t)}},59262:function(t,e,n){"use strict";n.d(e,{p:function(){return s}});var r=n(96750),i=n(42903),o=n(4382);function s(t,e,n,s,u,a,c,f){var l=[],h=0,p=0,d=!1,y=function(){!d||l.length||h||e.complete()},g=function(t){return h<s?v(t):l.push(t)},v=function(t){a&&e.next(t),h++;var f=!1;(0,r.Xf)(n(t,p++)).subscribe((0,o.x)(e,function(t){null==u||u(t),a?g(t):e.next(t)},function(){f=!0},void 0,function(){if(f)try{for(h--;l.length&&h<s;)!function(){var t=l.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==f||f()}}},36550:function(t,e,n){"use strict";n.d(e,{z:function(){return function t(e,n,a){return(void 0===a&&(a=1/0),(0,u.m)(n))?t(function(t,o){return(0,r.U)(function(e,r){return n(t,e,o,r)})((0,i.Xf)(e(t,o)))},a):("number"==typeof n&&(a=n),(0,o.e)(function(t,n){return(0,s.p)(t,n,e,a)}))}}});var r=n(7449),i=n(96750),o=n(17753),s=n(59262),u=n(2070)},96987:function(t,e,n){"use strict";n.d(e,{Q:function(){return s}});var r=n(42903),i=n(17753),o=n(4382);function s(t,e){return void 0===e&&(e=0),(0,i.e)(function(n,i){n.subscribe((0,o.x)(i,function(n){return(0,r.f)(i,t,function(){return i.next(n)},e)},function(){return(0,r.f)(i,t,function(){return i.complete()},e)},function(n){return(0,r.f)(i,t,function(){return i.error(n)},e)}))})}},71064:function(t,e,n){"use strict";n.d(e,{B:function(){return a}});var r=n(5134),i=n(96750),o=n(82863),s=n(19142),u=n(17753);function a(t){void 0===t&&(t={});var e=t.connector,n=void 0===e?function(){return new o.x}:e,r=t.resetOnError,a=void 0===r||r,f=t.resetOnComplete,l=void 0===f||f,h=t.resetOnRefCountZero,p=void 0===h||h;return function(t){var e,r,o,f=0,h=!1,d=!1,y=function(){null==r||r.unsubscribe(),r=void 0},g=function(){y(),e=o=void 0,h=d=!1},v=function(){var t=e;g(),null==t||t.unsubscribe()};return(0,u.e)(function(t,u){f++,d||h||y();var m=o=null!=o?o:n();u.add(function(){0!=--f||d||h||(r=c(v,p))}),m.subscribe(u),!e&&f>0&&(e=new s.Hp({next:function(t){return m.next(t)},error:function(t){d=!0,y(),r=c(g,a,t),m.error(t)},complete:function(){h=!0,y(),r=c(g,l),m.complete()}}),(0,i.Xf)(t).subscribe(e))})(t)}}function c(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===e){t();return}if(!1!==e){var u=new s.Hp({next:function(){u.unsubscribe(),t()}});return(0,i.Xf)(e.apply(void 0,(0,r.ev)([],(0,r.CR)(n)))).subscribe(u)}}},89155:function(t,e,n){"use strict";n.d(e,{d:function(){return o}});var r=n(95978),i=n(71064);function o(t,e,n){var o,s,u,a,c=!1;return t&&"object"==typeof t?(a=void 0===(o=t.bufferSize)?1/0:o,e=void 0===(s=t.windowTime)?1/0:s,c=void 0!==(u=t.refCount)&&u,n=t.scheduler):a=null!=t?t:1/0,(0,i.B)({connector:function(){return new r.t(a,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},60033:function(t,e,n){"use strict";n.d(e,{q:function(){return s}});var r=n(66692),i=n(17753),o=n(4382);function s(t){return t<=0?function(){return r.E}:(0,i.e)(function(e,n){var r=0;e.subscribe((0,o.x)(n,function(e){++r<=t&&(n.next(e),t<=r&&n.complete())}))})}},89634:function(t,e,n){"use strict";n.d(e,{R:function(){return u}});var r=n(17753),i=n(4382),o=n(96750),s=n(8365);function u(t){return(0,r.e)(function(e,n){(0,o.Xf)(t).subscribe((0,i.x)(n,function(){return n.complete()},s.Z)),n.closed||e.subscribe(n)})}},30867:function(t,e,n){"use strict";n.d(e,{b:function(){return u}});var r=n(2070),i=n(17753),o=n(4382),s=n(15531);function u(t,e,n){var u=(0,r.m)(t)||e||n?{next:t,error:e,complete:n}:t;return u?(0,i.e)(function(t,e){null===(n=u.subscribe)||void 0===n||n.call(u);var n,r=!0;t.subscribe((0,o.x)(e,function(t){var n;null===(n=u.next)||void 0===n||n.call(u,t),e.next(t)},function(){var t;r=!1,null===(t=u.complete)||void 0===t||t.call(u),e.complete()},function(t){var n;r=!1,null===(n=u.error)||void 0===n||n.call(u,t),e.error(t)},function(){var t,e;r&&(null===(t=u.unsubscribe)||void 0===t||t.call(u)),null===(e=u.finalize)||void 0===e||e.call(u)}))}):s.y}},35995:function(t,e,n){"use strict";n.d(e,{x:function(){return b}});var r=n(96750),i=n(96987),o=n(17753);function s(t,e){return void 0===e&&(e=0),(0,o.e)(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}var u=n(78743),a=n(53073),c=n(2070),f=n(42903);function l(t,e){if(!t)throw Error("Iterable cannot be null");return new u.y(function(n){(0,f.f)(n,e,function(){var r=t[Symbol.asyncIterator]();(0,f.f)(n,e,function(){r.next().then(function(t){t.done?n.complete():n.next(t.value)})},0,!0)})})}var h=n(87229),p=n(84223),d=n(76613),y=n(96090),g=n(67555),v=n(46345),m=n(32450);function b(t,e){if(null!=t){if((0,h.c)(t))return(0,r.Xf)(t).pipe(s(e),(0,i.Q)(e));if((0,d.z)(t))return new u.y(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})});if((0,p.t)(t))return(0,r.Xf)(t).pipe(s(e),(0,i.Q)(e));if((0,g.D)(t))return l(t,e);if((0,y.T)(t))return new u.y(function(n){var r;return(0,f.f)(n,e,function(){r=t[a.h](),(0,f.f)(n,e,function(){var t,e,i;try{e=(t=r.next()).value,i=t.done}catch(t){n.error(t);return}i?n.complete():n.next(e)},0,!0)}),function(){return(0,c.m)(null==r?void 0:r.return)&&r.return()}});if((0,m.L)(t))return l((0,m.Q)(t),e)}throw(0,v.z)(t)}},8150:function(t,e,n){"use strict";n.d(e,{o:function(){return u}});var r=n(5134),i=function(t){function e(e,n){return t.call(this)||this}return(0,r.ZT)(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(37219).w0),o={setInterval:function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var s=o.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,(0,r.ev)([t,e],(0,r.CR)(n))):setInterval.apply(void 0,(0,r.ev)([t,e],(0,r.CR)(n)))},clearInterval:function(t){var e=o.delegate;return((null==e?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},s=n(30325),u=function(t){function e(e,n){var r=t.call(this,e,n)||this;
1return r.scheduler=e,r.work=n,r.pending=!1,r}return(0,r.ZT)(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,e)),this.pending=!0,this.delay=e,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(i,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),o.setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!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 n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,s.P)(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(i)},319:function(t,e,n){"use strict";n.d(e,{v:function(){return s}});var r=n(5134),i=n(24325),o=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=i.l.now,t}(),s=function(t){function e(e,n){void 0===n&&(n=o.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r}return(0,r.ZT)(e,t),e.prototype.flush=function(t){var e,n=this.actions;if(this._active){n.push(t);return}this._active=!0;do if(e=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,e){for(;t=n.shift();)t.unsubscribe();throw e}},e}(o)},46593:function(t,e,n){"use strict";n.d(e,{P:function(){return o},z:function(){return i}});var r=n(8150),i=new(n(319)).v(r.o),o=i},24325:function(t,e,n){"use strict";n.d(e,{l:function(){return r}});var r={now:function(){return(r.delegate||Date).now()},delegate:void 0}},94814:function(t,e,n){"use strict";n.d(e,{z:function(){return i}});var r=n(5134),i={setTimeout:function(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];var s=i.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,(0,r.ev)([t,e],(0,r.CR)(n))):setTimeout.apply(void 0,(0,r.ev)([t,e],(0,r.CR)(n)))},clearTimeout:function(t){var e=i.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0}},53073:function(t,e,n){"use strict";n.d(e,{h:function(){return r}});var r="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},27723:function(t,e,n){"use strict";n.d(e,{L:function(){return r}});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},60551:function(t,e,n){"use strict";n.d(e,{K:function(){return r}});var r=(0,n(37169).d)(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})},36023:function(t,e,n){"use strict";n.d(e,{_6:function(){return a},jO:function(){return s},yG:function(){return u}});var r=n(2070),i=n(96476);function o(t){return t[t.length-1]}function s(t){return(0,r.m)(o(t))?t.pop():void 0}function u(t){return(0,i.K)(o(t))?t.pop():void 0}function a(t,e){return"number"==typeof o(t)?t.pop():e}},47026:function(t,e,n){"use strict";n.d(e,{D:function(){return u}});var r=Array.isArray,i=Object.getPrototypeOf,o=Object.prototype,s=Object.keys;function u(t){if(1===t.length){var e=t[0];if(r(e))return{args:e,keys:null};if(e&&"object"==typeof e&&i(e)===o){var n=s(e);return{args:n.map(function(t){return e[t]}),keys:n}}}return{args:t,keys:null}}},82573:function(t,e,n){"use strict";n.d(e,{k:function(){return i}});var r=Array.isArray;function i(t){return 1===t.length&&r(t[0])?t[0]:t}},30325:function(t,e,n){"use strict";function r(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}n.d(e,{P:function(){return r}})},37169:function(t,e,n){"use strict";function r(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}n.d(e,{d:function(){return r}})},82663:function(t,e,n){"use strict";function r(t,e){return t.reduce(function(t,n,r){return t[n]=e[r],t},{})}n.d(e,{n:function(){return r}})},99287:function(t,e,n){"use strict";n.d(e,{O:function(){return s},x:function(){return o}});var r=n(80124),i=null;function o(t){if(r.v.useDeprecatedSynchronousErrorHandling){var e=!i;if(e&&(i={errorThrown:!1,error:null}),t(),e){var n=i,o=n.errorThrown,s=n.error;if(i=null,o)throw s}}else t()}function s(t){r.v.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=t)}},42903:function(t,e,n){"use strict";function r(t,e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var o=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(o),!i)return o}n.d(e,{f:function(){return r}})},15531:function(t,e,n){"use strict";function r(t){return t}n.d(e,{y:function(){return r}})},76613:function(t,e,n){"use strict";n.d(e,{z:function(){return r}});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},67555:function(t,e,n){"use strict";n.d(e,{D:function(){return i}});var r=n(2070);function i(t){return Symbol.asyncIterator&&(0,r.m)(null==t?void 0:t[Symbol.asyncIterator])}},13746:function(t,e,n){"use strict";function r(t){return t instanceof Date&&!isNaN(t)}n.d(e,{q:function(){return r}})},2070:function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,{m:function(){return r}})},87229:function(t,e,n){"use strict";n.d(e,{c:function(){return o}});var r=n(27723),i=n(2070);function o(t){return(0,i.m)(t[r.L])}},96090:function(t,e,n){"use strict";n.d(e,{T:function(){return o}});var r=n(53073),i=n(2070);function o(t){return(0,i.m)(null==t?void 0:t[r.h])}},79473:function(t,e,n){"use strict";n.d(e,{b:function(){return o}});var r=n(78743),i=n(2070);function o(t){return!!t&&(t instanceof r.y||(0,i.m)(t.lift)&&(0,i.m)(t.subscribe))}},84223:function(t,e,n){"use strict";n.d(e,{t:function(){return i}});var r=n(2070);function i(t){return(0,r.m)(null==t?void 0:t.then)}},32450:function(t,e,n){"use strict";n.d(e,{L:function(){return s},Q:function(){return o}});var r=n(5134),i=n(2070);function o(t){return(0,r.FC)(this,arguments,function(){var e,n,i;return(0,r.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,r.qq)(e.read())];case 3:if(i=(n=o.sent()).value,!n.done)return[3,5];return[4,(0,r.qq)(void 0)];case 4:return[2,o.sent()];case 5:return[4,(0,r.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,n){"use strict";n.d(e,{K:function(){return i}});var r=n(2070);function i(t){return t&&(0,r.m)(t.schedule)}},17753:function(t,e,n){"use strict";n.d(e,{A:function(){return i},e:function(){return o}});var r=n(2070);function i(t){return(0,r.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,n){"use strict";n.d(e,{Z:function(){return s}});var r=n(5134),i=n(7449),o=Array.isArray;function s(t){return(0,i.U)(function(e){return o(e)?t.apply(void 0,(0,r.ev)([],(0,r.CR)(e))):t(e)}
1)}},8365:function(t,e,n){"use strict";function r(){}n.d(e,{Z:function(){return r}})},95767:function(t,e,n){"use strict";n.d(e,{U:function(){return o},z:function(){return i}});var r=n(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?r.y:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}},67444:function(t,e,n){"use strict";n.d(e,{h:function(){return o}});var r=n(80124),i=n(94814);function o(t){i.z.setTimeout(function(){var e=r.v.onUnhandledError;if(e)e(t);else throw t})}},46345:function(t,e,n){"use strict";function r(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.")}n.d(e,{z:function(){return r}})},40211:function(t,e,n){"use strict";n.d(e,{E9:function(){return u},Y$:function(){return f},ah:function(){return g},p4:function(){return d}});var r,i,o=n(37604);let s=new WeakMap;function u(t){return{config:t,start:(e,n)=>{let{self:r,system:i,emit:o}=n,u={receivers:void 0,dispose:void 0};s.set(r,u),u.dispose=t({input:e.input,system:i,self:r,sendBack:t=>{"stopped"!==r.getSnapshot().status&&r._parent&&i._relay(r,r._parent,t)},receive:t=>{u.receivers??=new Set,u.receivers.add(t)},emit:o})},transition:(t,e,n)=>{let r=s.get(n.self);return e.type===o.X?(t={...t,status:"stopped",error:void 0},r.dispose?.()):r.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 a="xstate.observable.error",c="xstate.observable.complete";function f(t){return{config:t,transition:(t,e)=>{if("active"!==t.status)return t;switch(e.type){case a: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:n,system:r,emit:i})=>{"done"!==e.status&&(e._subscription=t({input:e.input,system:r,self:n,emit:i}).subscribe({next:t=>{n._parent&&r._relay(n,n._parent,t)},error:t=>{r._relay(n,n,{type:a,data:t})},complete:()=>{r._relay(n,n,{type:c})}}))},getPersistedSnapshot:({_subscription:t,...e})=>e,restoreSnapshot:t=>({...t,_subscription:void 0})}}let l="xstate.promise.resolve",h="xstate.promise.reject",p=new WeakMap;function d(t){return{config:t,transition:(t,e,n)=>{if("active"!==t.status)return t;switch(e.type){case l:{let n=e.data;return{...t,status:"done",output:n,input:void 0}}case h:return{...t,status:"error",error:e.data,input:void 0};case o.X:return p.get(n.self)?.abort(),{...t,status:"stopped",input:void 0};default:return t}},start:(e,{self:n,system:r,emit:i})=>{if("active"!==e.status)return;let o=new AbortController;p.set(n,o),Promise.resolve(t({input:e.input,system:r,self:n,signal:o.signal,emit:i})).then(t=>{"active"===n.getSnapshot().status&&(p.delete(n),r._relay(n,n,{type:l,data:t}))},t=>{"active"===n.getSnapshot().status&&(p.delete(n),r._relay(n,n,{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:r=t=>void 0,transition:(t,e,n)=>({...t,context:r(t.context,e,n)}),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.c)(y)}},78725:function(t,e,n){"use strict";n.d(e,{a:function(){return o}});var r=n(37604);function i(t,e,n,i,{assignment:o}){if(!e.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let s={},u={context:e.context,event:n.event,spawn:function(t,{machine:e,context:n},i,o){let s=(s,u)=>{if("string"!=typeof s)return(0,r.c)(s,{id:u?.id,parent:t.self,syncSnapshot:u?.syncSnapshot,input:u?.input,src:s,systemId:u?.systemId});{let a=(0,r.R)(e,s);if(!a)throw Error(`Actor logic '${s}' not implemented in machine '${e.id}'`);let c=(0,r.c)(a,{id:u?.id,parent:t.self,syncSnapshot:u?.syncSnapshot,input:"function"==typeof u?.
1input?u.input({context:n,event:i,self:t.self}):u?.input,src:s,systemId:u?.systemId});return o[c.id]=c,c}};return(e,n)=>{let i=s(e,n);return o[i.id]=i,t.defer(()=>{i._processingStatus!==r.V.Stopped&&i.start()}),i}}(t,e,n.event,s),self:t.self,system:t.system},a={};if("function"==typeof o)a=o(u,i);else for(let t of Object.keys(o)){let e=o[t];a[t]="function"==typeof e?e(u,i):e}let c=Object.assign({},e.context,a);return[(0,r.W)(e,{context:c,children:Object.keys(s).length?{...e.children,...s}:e.children}),void 0,void 0]}function o(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=i,e}},87150:function(t,e,n){"use strict";n.d(e,{a:function(){return a},b:function(){return d},e:function(){return g},l:function(){return b},s:function(){return p}});var r,i=n(37604),o=n(78725);function s(t,e,n,r,{event:i}){return[e,{event:"function"==typeof i?i(n,r):i},void 0]}function u(t,{event:e}){t.defer(()=>t.emit(e))}function a(t){function e(t,e){}return e.type="xstate.emit",e.event=t,e.resolve=s,e.execute=u,e}let c=((r={}).Parent="#_parent",r.Internal="#_internal",r);function f(t,e,n,r,{to:i,event:o,id:s,delay:u},a){let f,l;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(n,r):o;if("string"==typeof u){let t=h&&h[u];f="function"==typeof t?t(n,r):t}else f="function"==typeof u?u(n,r):u;let d="function"==typeof i?i(n,r):i;if("string"==typeof d){if(!(l=d===c.Parent?t.self._parent:d===c.Internal?t.self:d.startsWith("#_")?e.children[d.slice(2)]:a.deferredActorIds?.includes(d)?d:e.children[d]))throw Error(`Unable to send event to actor '${d}' from machine '${e.machine.id}'.`)}else l=d||t.self;return[e,{to:l,targetId:"string"==typeof d?d:void 0,event:p,id:s,delay:f},void 0]}function l(t,e,n){"string"==typeof n.to&&(n.to=e.children[n.to])}function h(t,e){t.defer(()=>{let{to:n,event:r,delay:o,id:s}=e;if("number"==typeof o){t.system.scheduler.schedule(t.self,n,r,o,s);return}t.system._relay(t.self,n,r.type===i.T?(0,i.U)(t.self.id,r.data):r)})}function p(t,e,n){function r(t,e){}return r.type="xstate.sendTo",r.to=t,r.event=e,r.id=n?.id,r.delay=n?.delay,r.resolve=f,r.retryResolve=l,r.execute=h,r}function d(t,e){return p(c.Parent,t,e)}function y(t,e,n,r,{collect:s}){let u=[],c=function(t){u.push(t)};return c.assign=(...t)=>{u.push((0,o.a)(...t))},c.cancel=(...t)=>{u.push((0,i.a)(...t))},c.raise=(...t)=>{u.push((0,i.r)(...t))},c.sendTo=(...t)=>{u.push(p(...t))},c.sendParent=(...t)=>{u.push(d(...t))},c.spawnChild=(...t)=>{u.push((0,i.b)(...t))},c.stopChild=(...t)=>{u.push((0,i.s)(...t))},c.emit=(...t)=>{u.push(a(...t))},s({context:n.context,event:n.event,enqueue:c,check:t=>(0,i.w)(t,e.context,n.event,e),self:t.self,system:t.system},r),[e,void 0,u]}function g(t){function e(t,e){}return e.type="xstate.enqueueActions",e.collect=t,e.resolve=y,e}function v(t,e,n,r,{value:i,label:o}){return[e,{value:"function"==typeof i?i(n,r):i,label:o},void 0]}function m({logger:t},{value:e,label:n}){n?t(n,e):t(e)}function b(t=({context:t,event:e})=>({context:t,event:e}),e){function n(t,e){}return n.type="xstate.log",n.value=t,n.label=e,n.resolve=v,n.execute=m,n}},37604:function(t,e,n){"use strict";var r;n.d(e,{$:function(){return k},B:function(){return to},C:function(){return tA},D:function(){return tt},E:function(){return tj},F:function(){return tr},G:function(){return tC},H:function(){return function t(e,n,r,i){return"string"==typeof n?function(t,e,n,r){let i=td(t,e).next(n,r);return i&&i.length?i:t.next(n,r)}(e,n,r,i):1===Object.keys(n).length?function(e,n,r,i){let o=Object.keys(n),s=t(td(e,o[0]),n[o[0]],r,i);return s&&s.length?s:e.next(r,i)}(e,n,r,i):function(e,n,r,i){let o=[];for(let s of Object.keys(n)){let u=n[s];if(!u)continue;let a=t(td(e,s),u,r,i);a&&o.push(...a)}return o.length?o:e.next(r,i)}(e,n,r,i)}},I:function(){return tI},J:function(){return p},K:function(){return tx},L:function(){return tp},M:function(){return g},N:function(){return u},O:function(){return ti},P:function(){return ty},Q:function(){return tF},R:function(){return C},S:function(){return s},T:function(){return c},U:function(){return h},V:function(){return R},W:function(){return tP},X:function(){return f},a:function(){return F},b:function(){return L},c:function(){return $},d:function(){return J},e:function(){return Z},g:function(){return tg},j:function(){return S},l:function(){return m},n:function(){return X},q:function(){return ta},r:function(){return tL},s:function(){return z},t:function(){return b},u:function(){return x},v:function(){return tu},w:function(){return G},x:function(){return I},y:function(){return ts},z:function(){return tc}});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!==n.g?n.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=".",u="",a="xstate.init",c="xstate.error",f="xstate.stop";function l(t,e){return{type:`xstate.done.state.${t}`,output:e}}function h(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}
1function p(t){return{type:a,input:t}}function d(t){setTimeout(()=>{throw t})}let y="function"==typeof Symbol&&Symbol.observable||"@@observable";function g(t){if(_(t))return t;let e=[],n="";for(let r=0;r<t.length;r++){switch(t.charCodeAt(r)){case 92:n+=t[r+1],r++;continue;case 46:e.push(n),n="";continue}n+=t[r]}return e.push(n),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={},n=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)n[t[e]]=t[e+1];else{let r=n;n={},r[t[e]]=n}return e}(g(t))}function m(t,e){let n={},r=Object.keys(t);for(let i=0;i<r.length;i++){let o=r[i];n[o]=e(t[o],o,t,i)}return n}function b(t){return void 0===t?[]:_(t)?t:[t]}function w(t,e,n,r){return"function"==typeof t?t({context:e,event:n,self:r}):t}function _(t){return Array.isArray(t)}function x(t){return(_(t)?t:[t]).map(t=>void 0===t||"string"==typeof t?{target:t}:t)}function E(t){if(void 0!==t&&""!==t)return b(t)}function S(t,e,n){let r="object"==typeof t,i=r?t:void 0;return{next:(r?t.next:t)?.bind(i),error:(r?t.error:e)?.bind(i),complete:(r?t.complete:n)?.bind(i)}}function I(t,e){return`${e}.${t}`}function C(t,e){let n=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return t.implementations.actors[e];let[,r,i]=n,o=t.getStateNodeById(i).config.invoke;return(Array.isArray(o)?o[r]:o).src}function O(t,e){return`${t.sessionId}.${e}`}let T=0,A=!1,k=1,R=((r={})[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped",r),B={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class U{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=R.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 n={...B,...e},{clock:r,logger:i,parent:s,syncSnapshot:u,id:a,systemId:c,inspect:f}=n;this.system=s?s.system:function(t,e){let n=new Map,r=new Map,i=new WeakMap,o=new Set,s={},{clock:u,logger:a}=e,c={schedule:(t,e,n,r,i=Math.random().toString(36).slice(2))=>{let o={source:t,target:e,event:n,delay:r,id:i,startedAt:Date.now()},a=O(t,i);f._snapshot._scheduledEvents[a]=o;let c=u.setTimeout(()=>{delete s[a],delete f._snapshot._scheduledEvents[a],f._relay(t,e,n)},r);s[a]=c},cancel:(t,e)=>{let n=O(t,e),r=s[n];delete s[n],delete f._snapshot._scheduledEvents[n],void 0!==r&&u.clearTimeout(r)},cancelAll:t=>{for(let e in f._snapshot._scheduledEvents){let n=f._snapshot._scheduledEvents[e];n.source===t&&c.cancel(t,n.id)}}},f={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${T++}`,_register:(t,e)=>(n.set(t,e),t),_unregister:t=>{n.delete(t.sessionId);let e=i.get(t);void 0!==e&&(r.delete(e),i.delete(t))},get:t=>r.get(t),getAll:()=>Object.fromEntries(r.entries()),_set:(t,e)=>{let n=r.get(t);if(n&&n!==e)throw Error(`Actor with system ID '${t}' already exists.`);r.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 n={...e,rootId:t.sessionId};o.forEach(t=>t.next?.(n))},_relay:(t,e,n)=>{f._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:n}),e._send(n)},scheduler:c,getSnapshot:()=>({_scheduledEvents:{...f._snapshot._scheduledEvents}}),start:()=>{let t=f._snapshot._scheduledEvents;for(let e in f._snapshot._scheduledEvents={},t){let{source:n,target:r,event:i,delay:o,id:s}=t[e];c.schedule(n,r,i,o,s)}},_clock:u,_logger:a};return f}(this,{clock:r,logger:i}),f&&!s&&this.system.inspect(S(f)),this.sessionId=this.system._bookId(),this.id=a??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=s,this._syncSnapshot=u,this.options=n,this.src=n.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),n=this.eventListeners.get("*");if(e||n)for(let r of[...e?e.values():[],...n?n.values():[]])try{r(t)}catch(t){d(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=A;try{A=!0,t.exec(t.info,t.params)}finally{A=e}};this._processingStatus===R.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 n;for(this._snapshot=t;n=this._deferred.shift();)try{n()}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.
1next?.(t)}catch(t){d(t)}break;case"done":var r;for(let e of this.observers)try{e.next?.(t)}catch(t){d(t)}this._stopProcedure(),this._complete(),this._doneEvent=(r=this.id,{type:`xstate.done.actor.${r}`,output:this._snapshot.output,actorId:r}),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,n){let r=S(t,e,n);if(this._processingStatus!==R.Stopped)this.observers.add(r);else switch(this._snapshot.status){case"done":try{r.complete?.()}catch(t){d(t)}break;case"error":{let t=this._snapshot.error;if(r.error)try{r.error(t)}catch(t){d(t)}else d(t)}}return{unsubscribe:()=>{this.observers.delete(r)}}}on(t,e){let n=this.eventListeners.get(t);n||(n=new Set,this.eventListeners.set(t,n));let r=e.bind(void 0);return n.add(r),{unsubscribe:()=>{n.delete(r)}}}start(){if(this._processingStatus===R.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=R.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,n;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(t){n={err:t}}if(n){let{err:t}=n;this._snapshot={...this._snapshot,status:"error",error:t},this._error(t);return}this.update(e,t),t.type===f&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===R.Stopped||((this.mailbox.clear(),this._processingStatus===R.NotStarted)?this._processingStatus=R.Stopped:this.mailbox.enqueue({type:f})),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 n of this.observers){let r=n.error;e||=!r;try{r?.(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!==R.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new o(this._process.bind(this)),this._processingStatus=R.Stopped,this.system._unregister(this)),this}_send(t){this._processingStatus!==R.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:k,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[y](){return this}getSnapshot(){return this._snapshot}}function $(t,...[e]){return new U(t,e)}function j(t,e,n,r,{sendId:i}){return[e,{sendId:"function"==typeof i?i(n,r):i},void 0]}function P(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function F(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=j,e.execute=P,e}function M(t,e,n,r,{id:i,systemId:o,src:s,input:u,syncSnapshot:a}){let c,f;let l="string"==typeof s?C(e.machine,s):s,h="function"==typeof i?i(n):i;return l&&(f="function"==typeof u?u({context:e.context,event:n.event,self:t.self}):u,c=$(l,{id:h,src:s,parent:t.self,syncSnapshot:a,systemId:o,input:f})),[tP(e,{children:{...e.children,[h]:c}}),{id:i,systemId:o,actorRef:c,src:s,input:f},void 0]}function q(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==R.Stopped&&e.start()})}function L(...[t,{id:e,systemId:n,input:r,syncSnapshot:i=!1}={}]){function o(t,e){}return o.type="xstate.spawnChild",o.id=e,o.systemId=n,o.src=t,o.input=r,o.syncSnapshot=i,o.resolve=M,o.execute=q,o}function N(t,e,n,r,{actorRef:i}){let o="function"==typeof i?i(n,r):i,s="string"==typeof o?e.children[o]:o,u=e.children;return s&&(u={...u},delete u[s.id]),[tP(e,{children:u}),s,void 0]}function D(t,e){if(e){if(t.system._unregister(e),e._processingStatus!==R.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=D,e}function H(t,e,{stateValue:n}){if("string"==typeof n&&ti(n)){let e=t.machine.getStateNodeById(n);return t._nodes.some(t=>t===e)}return t.matches(n)}function Z(t){function e(){return!1}return e.check=H,e.stateValue=t,e}function W(t,{context:e,event:n},{guards:r}){return!G(r[0],e,n,t)}function X(t){function e(t,e){return!1}return e.check=W,e.guards=[t],e}function V(t,{context:e,event:n},{guards:r}){return r.every(r=>G(r,e,n,t))}function J(t){function e(t,e){return!1}return e.check=V,e.guards=t,e}function G(t,e,n,r){let{machine:i}=r,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,n,r);let u={context:e,event:n},a=o||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:n}):t.params:void 0;return"check"in s?s.check(r,u,s):s(u,a)}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 n=[];if(e===t)return n;let r=t.parent;for(;r&&r!==e;)n.push(r),r=r.parent;return n}function tt(t){let e=new Set(t),n=te(e);for(let t of e)if("compound"!==t.type||n.get(t)&&n.get(t).length){if("parallel"===t.type){for(let n of K(t))if("history"!==n.type&&!e.has(n))for(let t of th(n))e.add(t)}}else th(t).forEach(t=>e.add(t));for(let t of e){let n=t.parent;for(;n;)e.add(n),n=n.parent}return e}function te(t){let e=new Map;for(let n of t)e.has(n)||e.set(n,[]),n.parent&&(e.has(n.parent)||e.set(n.parent,[]),e.get(n.parent).push(n));return e}function tn(t,e){return function t(e,n){let r=n.get(e);if(!r)return{};if("compound"===e.type){let t=r[0];if(!t)return{};if(Y(t))return t.key}let i={};for(let e of r)i[e.key]=t(e,n);return i}(t,te(tt(e)))}function tr(t,e){return"compound"===e.type?K(e).some(e=>"final"===e.type&&t.has(e)):"parallel"===e.type?K(e).every(e=>tr(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 n=t.split("."),r=e.split(".");for(let t=0;t<n.length;t++){let e=n[t],i=r[t];if("*"===e)return t===n.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 n=e=>{var n;let r=(n=t.id,{type:`xstate.after.${e}.${n}`}),i=r.type;return t.entry.push(tL(r,{id:i,delay:e})),t.exit.push(F(i)),i};return Object.keys(e).flatMap(t=>{let r=e[t],i=Number.isNaN(+t)?t:+t,o=n(i);return b("string"==typeof r?{target:r}:r).map(t=>({...t,event:o,delay:i}))}).map(e=>{let{delay:n}=e;return{...tu(t,e.event,e),delay:n}})}function tu(t,e,n){let r=E(n.target),i=n.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 n=e[0]===s;if(n&&!t.parent)return ty(t,e.slice(1));let r=n?t.key+e:e;if(t.parent)try{return ty(t.parent,r)}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,r),u={...n,actions:b(n.actions),guard:n.guard,target:o,source:t,reenter:i,eventType:e,toJSON:()=>({...u,source:`#${t.id}`,target:o?o.map(t=>`#${t.id}`):void 0})};return u}function ta(t){let e=new Map;if(t.config.on)for(let n of Object.keys(t.config.on)){if(n===u)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let r=t.config.on[n];e.set(n,x(r).map(e=>tu(t,n,e)))}if(t.config.onDone){let n=`xstate.done.state.${t.id}`;e.set(n,x(t.config.onDone).map(e=>tu(t,n,e)))}for(let n of t.invoke){if(n.onDone){let r=`xstate.done.actor.${n.id}`;e.set(r,x(n.onDone).map(e=>tu(t,r,e)))}if(n.onError){let r=`xstate.error.actor.${n.id}`;e.set(r,x(n.onError).map(e=>tu(t,r,e)))}if(n.onSnapshot){let r=`xstate.snapshot.${n.id}`;e.set(r,x(n.onSnapshot).map(e=>tu(t,r,e)))}}for(let n of t.after){let t=e.get(n.eventType);t||(t=[],e.set(n.eventType,t)),t.push(n)}return e}function tc(t,e){let n="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!n&&e)throw Error(`Initial state node "${e}" not found on parent state node #${t.id}`);let r={source:t,actions:e&&"string"!=typeof e?b(e.actions):[],eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${t.id}`,target:n?[`#${n.id}`]:[]})};return r}function tf(t){let e=E(t.config.target);return e?{target:e.map(e=>"string"==typeof e?ty(t.parent,e):e)}:t.parent.initial}function tl(t){return"history"===t.type}function th(t){let e=tp(t);for(let n of e)for(let r of Q(n,t))e.add(r);return e}function tp(t){let e=new Set;return!function t(n){if(!e.has(n)){if(e.add(n),"compound"===n.type)t(n.initial.target[0]);else if("parallel"===n.type)for(let e of K(n))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 n=t.states[e];if(!n)throw Error(`Child state '${e}' does not exist on '${t.id}'`);return n}function ty(t,e){if("string"==typeof e&&ti(e))try{return t.machine.getStateNodeById(e)}catch{}let n=g(e).slice(),r=t;for(;n.length;){let t=n.shift();if(!t.length)break;r=td(r,t)}return r}function tg(t,e){if("string"==typeof e){let n=t.states[e];if(!n)throw Error(`State '${e}' does not exist on '${t.id}'`);return[t,n]}let n=Object.keys(e),r=n.map(e=>td(t,e)).filter(Boolean);return[t.machine.root,t].concat(r,n.reduce((n,r)=>{let i=td(t,r);if(!i)return n;let o=tg(i,e[r]);return n.concat(o)},[]))}function tv(t,e){let n=t;for(;n.parent&&n.parent!==e;)n=n.parent;return n.parent===e}function tm(t,e,n){let r=new Set;for(let i of t){let t=!1,o=new Set;for(let s of r)if(function(t,e){let n=new Set(t),r=new Set(e);for(let t of n)if(r.has(t))return!0;for(let t of r)if(n.has(t))return!0;return!1}(t_([i],e,n),t_([s],e,n))){if(tv(i.source,s.source))o.add(s);else{t=!0;break}}if(!t){for(let t of o)r.delete(t);r.add(i)}}return Array.from(r)}function tb(t,e){if(!t.target)return[];let n=new Set;for(let r of t.target)if(tl(r)){if(e[r.id])for(let t of e[r.id])n.add(t);else for(let t of tb(tf(r),e))n.add(t)}else n.add(r);return[...n]}function tw(t,e){let n=tb(t,e);if(!n)return;if(!t.reenter&&n.every(e=>
2e===t.source||tv(e,t.source)))return t.source;let r=function(t){let[e,...n]=t;for(let t of Q(e,void 0))if(n.every(e=>tv(e,t)))return t}(n.concat(t.source));return r||(t.reenter?void 0:t.source.machine.root)}function t_(t,e,n){let r=new Set;for(let i of t)if(i.target?.length){let t=tw(i,n);for(let n of(i.reenter&&i.source===t&&r.add(t),e))tv(n,t)&&r.add(n)}return[...r]}function tx(t,e,n,r,i,o){if(!t.length)return e;let s=new Set(e._nodes),u=e.historyValue,a=tm(t,s,u),c=e;i||([c,u]=function(t,e,n,r,i,o,s,u){let a,c=t,f=t_(r,i,o);for(let t of(f.sort((t,e)=>e.order-t.order),f))for(let e of function(t){return Object.keys(t.states).map(e=>t.states[e]).filter(t=>"history"===t.type)}(t)){let n;n="deep"===e.history?e=>Y(e)&&tv(e,t):e=>e.parent===t,(a??={...o})[e.id]=Array.from(i).filter(n)}for(let t of f)c=tI(c,e,n,[...t.exit,...t.invoke.map(t=>z(t.id))],s,void 0),i.delete(t);return[c,a||o]}(c,r,n,a,s,u,o,n.actionExecutor)),c=function(t,e,n,r,i,o,s,u){let a=t,c=new Set,f=new Set;(function(t,e,n,r){for(let i of t){let t=tw(i,e);for(let o of i.target||[])!tl(o)&&(i.source!==o||i.source!==t||i.reenter)&&(r.add(o),n.add(o)),tE(o,e,n,r);for(let o of tb(i,e)){let s=Q(o,t);t?.type==="parallel"&&s.push(t),tS(r,e,n,s,!i.source.parent&&i.reenter?void 0:t)}}})(r,s,f,c),u&&f.add(t.machine.root);let h=new Set;for(let t of[...c].sort((t,e)=>t.order-e.order)){i.add(t);let r=[];for(let e of(r.push(...t.entry),t.invoke))r.push(L(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(f.has(t)){let e=t.initial.actions;r.push(...e)}if(a=tI(a,e,n,r,o,t.invoke.map(t=>t.id)),"final"===t.type){let r=t.parent,s=r?.type==="parallel"?r:r?.parent,u=s||t;for(r?.type==="compound"&&o.push(l(r.id,void 0!==t.output?w(t.output,a.context,e,n.self):void 0));s?.type==="parallel"&&!h.has(s)&&tr(i,s);)h.add(s),o.push(l(s.id)),u=s,s=s.parent;if(s)continue;a=tP(a,{status:"done",output:function(t,e,n,r,i){if(void 0===r.output)return;let o=l(i.id,void 0!==i.output&&i.parent?w(i.output,t.context,e,n.self):void 0);return w(r.output,t.context,o,n.self)}(a,e,n,a.machine.root,u)})}}return a}(c=tI(c,r,n,a.flatMap(t=>t.actions),o,void 0),r,n,a,s,o,u,i);let f=[...s];"done"===c.status&&(c=tI(c,r,n,f.sort((t,e)=>e.order-t.order).flatMap(t=>t.exit),o,void 0));try{if(u===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}(e._nodes,s))return c;return tP(c,{_nodes:f,historyValue:u})}catch(t){throw t}}function tE(t,e,n,r){if(tl(t)){if(e[t.id]){let i=e[t.id];for(let t of i)r.add(t),tE(t,e,n,r);for(let o of i)tS(r,e,n,Q(o,t.parent))}else{let i=tf(t);for(let o of i.target)r.add(o),i===t.parent?.initial&&n.add(t.parent),tE(o,e,n,r);for(let o of i.target)tS(r,e,n,Q(o,t.parent))}}else if("compound"===t.type){let[i]=t.initial.target;tl(i)||(r.add(i),n.add(i)),tE(i,e,n,r),tS(r,e,n,Q(i,t))}else if("parallel"===t.type)for(let i of K(t).filter(t=>!tl(t)))[...r].some(t=>tv(t,i))||(tl(i)||(r.add(i),n.add(i)),tE(i,e,n,r))}function tS(t,e,n,r,i){for(let o of r)if((!i||tv(o,i))&&t.add(o),"parallel"===o.type)for(let r of K(o).filter(t=>!tl(t)))[...t].some(t=>tv(t,r))||(t.add(r),tE(r,e,n,t))}function tI(t,e,n,r,i,o){let s=o?[]:void 0,u=function t(e,n,r,i,o,s){let{machine:u}=e,a=e;for(let e of i){var c;let i="function"==typeof e,f=i?e:(c="string"==typeof e?e:e.type,u.implementations.actions[c]),l={context:a.context,event:n,self:r.self,system:r.system},h=i||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:a.context,event:n}):e.params:void 0;if(!f||!("resolve"in f)){r.actionExecutor({type:"string"==typeof e?e:"object"==typeof e?e.type:e.name||"(anonymous)",info:l,params:h,exec:f});continue}let[p,d,y]=f.resolve(r,a,l,h,f,o);a=p,"retryResolve"in f&&s?.push([f,d]),"execute"in f&&r.actionExecutor({type:f.type,info:l,params:d,exec:f.execute.bind(null,r,d)}),y&&(a=t(a,n,r,y,o,s))}return a}(t,e,n,r,{internalQueue:i,deferredActorIds:o},s);return s?.forEach(([t,e])=>{t.retryResolve(n,u,e)}),u}function tC(t,e,n,r){let i=t,o=[];function s(t,e,r){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:e,snapshot:t,_transitions:r}),o.push(t)}if(e.type===f)return s(i=tP(tO(i,e,n),{status:"stopped"}),e,[]),{snapshot:i,microstates:o};let u=e;if(u.type!==a){let e=u,a=e.type.startsWith("xstate.error.actor"),c=tT(e,i);if(a&&!c.length)return s(i=tP(t,{status:"error",error:e.error}),e,[]),{snapshot:i,microstates:o};s(i=tx(c,t,n,u,!1,r),e,c)}let c=!0;for(;"active"===i.status;){let t=c?function(t,e){let n=new Set;for(let r of t._nodes.filter(Y))t:for(let i of[r].concat(Q(r,void 0)))if(i.always){for(let r of i.always)if(void 0===r.guard||G(r.guard,t.context,e,t)){n.add(r);break t}}return tm(Array.from(n),new Set(t._nodes),t.historyValue)}
2(i,u):[],e=t.length?i:void 0;if(!t.length){if(!r.length)break;t=tT(u=r.shift(),i)}c=(i=tx(t,i,n,u,!1,r))!==e,s(i,u,t)}return"active"!==i.status&&tO(i,u,n),{snapshot:i,microstates:o}}function tO(t,e,n){return tI(t,e,n,Object.values(t.children).map(t=>z(t)),[],void 0)}function tT(t,e){return e.machine.getTransitionData(e,t)}function tA(t,e){let n=tt(tg(t,e));return tn(t,[...n])}let tk=function(t){return function t(e,n){let r=v(e),i=v(n);return"string"==typeof i?"string"==typeof r&&i===r:"string"==typeof r?r in i:Object.keys(r).every(e=>e in i&&t(r[e],i[e]))}(t,this.value)},tR=function(t){return this.tags.has(t)},tB=function(t){let e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(t=>void 0!==t.target||t.actions.length)},tU=function(){let{_nodes:t,tags:e,machine:n,getMeta:r,toJSON:i,can:o,hasTag:s,matches:u,...a}=this;return{...a,tags:Array.from(e)}},t$=function(){return this._nodes.reduce((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t),{})};function tj(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:tn(e.root,t._nodes),tags:new Set(t._nodes.flatMap(t=>t.tags)),children:t.children,historyValue:t.historyValue||{},matches:tk,hasTag:tR,can:tB,getMeta:t$,toJSON:tU}}function tP(t,e={}){return tj({...t,...e},t.machine)}function tF(t,e){let{_nodes:n,tags:r,machine:i,children:o,context:s,can:u,hasTag:a,matches:c,getMeta:f,toJSON:l,...h}=t,p={};for(let t in o){let n=o[t];p[t]={snapshot:n.getPersistedSnapshot(e),src:n.src,systemId:n.systemId,syncSnapshot:n._syncSnapshot}}return{...h,context:function t(e){let n;for(let r in e){let i=e[r];if(i&&"object"==typeof i){if("sessionId"in i&&"send"in i&&"ref"in i)(n??=Array.isArray(e)?e.slice():{...e})[r]={xstate$$type:k,id:i.id};else{let o=t(i);o!==i&&((n??=Array.isArray(e)?e.slice():{...e})[r]=o)}}}return n??e}(s),children:p,historyValue:function(t){if("object"!=typeof t||null===t)return{};let e={};for(let n in t){let r=t[n];Array.isArray(r)&&(e[n]=r.map(t=>({id:t.id})))}return e}(h.historyValue)}}function tM(t,e,n,r,{event:i,id:o,delay:s},{internalQueue:u}){let a;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 f="function"==typeof i?i(n,r):i;if("string"==typeof s){let t=c&&c[s];a="function"==typeof t?t(n,r):t}else a="function"==typeof s?s(n,r):s;return"number"!=typeof a&&u.push(f),[e,{event:f,id:o,delay:a},void 0]}function tq(t,e){let{event:n,delay:r,id:i}=e;if("number"==typeof r){t.defer(()=>{let e=t.self;t.system.scheduler.schedule(e,e,n,r,i)});return}}function tL(t,e){function n(t,e){}return n.type="xstate.raise",n.event=t,n.id=e?.id,n.delay=e?.delay,n.resolve=tM,n.execute=tq,n}},16279:function(t,e,n){"use strict";n.d(e,{ZD:function(){return h},cY:function(){return function t({schemas:e,actors:n,actions:o,guards:s,delays:u}){return{assign:i.a,sendTo:l.s,raise:r.r,log:l.l,cancel:r.a,stopChild:r.s,enqueueActions:l.e,emit:l.a,spawnChild:r.b,createStateConfig:t=>t,createAction:t=>t,createMachine:t=>new f({...t,schemas:e},{actors:n,actions:o,guards:s,delays:u}),extend:r=>t({schemas:e,actors:n,actions:{...o,...r.actions},guards:{...s,...r.guards},delays:{...u,...r.delays}})}}}}),n(40211);var r=n(37604),i=n(78725);let o=new WeakMap;function s(t,e,n){let r=o.get(t);return r?e in r||(r[e]=n()):(r={[e]:n()},o.set(t,r)),r[e]}let u={},a=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class c{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(r.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,r.l)(this.config.states,(t,e)=>new c(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,r.t)(this.config.entry).slice(),this.exit=(0,r.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,r.t)(t.tags).slice()}_initialize(){this.transitions=(0,r.q)(this),this.config.always&&(this.always=(0,r.u)(this.config.always).map(t=>(0,r.v)(this,r.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(a),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(a),eventType:null})}:void 0,history:this.history,states:(0,r.l)(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(a)})),entry:this.entry.map(a),exit:this.exit.map(a),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 s(this,"invoke",()=>(0,r.t)(this.config.invoke).map((t,e)=>{let{src:n,systemId:i}=t,o=t.id??(0,r.x)(this.id,e),s="string"==typeof n?n:`xstate.invoke.${(0,r.x)(this.id,e)}`;return{...t,src:s,id:o,systemId:i,toJSON(){let{onDone:e,onError:n,...r}=t;return{...r,type:"xstate.invoke",src:s,id:o}}}}))}get on(){return s(this,"on",()=>[...this.transitions].flatMap(([t,e])=>e.map(e=>[t,e])).reduce((t,[e,n])=>(t[e]=t[e]||[],t[e].push(n),t),{}))}get after(){return s(this,"delayedTransitions",()=>(0,r.y)(this))}get initial(){return s(this,"initial",()=>(0,r.z)(this,this.config.initial))}next(t,e){let n;let i=e.type,o=[];for(let u of s(this,`candidates-${i}`,()=>(0,r.B)(this,i))){let{guard:s}=u,a=t.context,c=!1;try{c=!s||(0,r.w)(s,a,e,t)}catch(e){let t="string"==typeof s?s:"object"==typeof s?s.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(...u.actions),n=u;break}}return n?[n]:void 0}get events(){return s(this,"events",()=>{let{states:t}=this,e=new Set(this.ownEvents);if(t)for(let n of Object.keys(t)){let r=t[n];if(r.states)for(let t of r.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 c(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:n,actors:r,delays:i}=this.implementations;return new f(this.config,{actions:{...e,...t.actions},guards:{...n,...t.guards},actors:{...r,...t.actors},delays:{...i,...t.delays}})}resolveState(t){let e=(0,r.C)(this.root,t.value),n=(0,r.D)((0,r.g)(this.root,e));return(0,r.E)({_nodes:[...n],context:t.context||{},children:{},status:(0,r.F)(n,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,e,n){return(0,r.G)(t,e,n,[]).snapshot}microstep(t,e,n){return(0,r.G)(t,e,n,[]).microstates}getTransitionData(t,e){return(0,r.H)(this.root,t.value,t,e)||[]}getPreInitialState(t,e,n){let{context:o}=this.config,s=(0,r.E)({context:"function"!=typeof o&&o?o:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof o?(0,r.I)(s,e,t,[(0,i.a)(({spawn:t,event:e,self:n})=>o({spawn:t,input:e.input,self:n}))],n,void 0):s}getInitialSnapshot(t,e){let n=(0,r.J)(e),i=[],o=this.getPreInitialState(t,n,i),s=(0,r.K)([{target:[...(0,r.L)(this.root)],source:this.root,reenter
3:!0,actions:[],eventType:null,toJSON:null}],o,t,n,!0,i),{snapshot:u}=(0,r.G)(s,n,t,i);return u}start(t){Object.values(t.children).forEach(t=>{"active"===t.getSnapshot().status&&t.start()})}getStateNodeById(t){let e=(0,r.M)(t),n=e.slice(1),i=(0,r.O)(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,r.P)(o,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,e){return(0,r.Q)(t,e)}restoreSnapshot(t,e){let n={},i=t.children;Object.keys(i).forEach(t=>{let o=i[t],s=o.snapshot,u=o.src,a="string"==typeof u?(0,r.R)(this,u):u;if(!a)return;let c=(0,r.c)(a,{id:t,parent:e.self,syncSnapshot:o.syncSnapshot,snapshot:s,src:u,systemId:o.systemId});n[t]=c});let o=function(t,e){if(!e||"object"!=typeof e)return{};let n={};for(let r in e)for(let i of e[r]){let e=function(t,e){if(e instanceof c)return e;try{return t.machine.getStateNodeById(e.id)}catch{}}(t,i);e&&(n[r]??=[],n[r].push(e))}return n}(this.root,t.historyValue),s=(0,r.E)({...t,children:n,_nodes:Array.from((0,r.D)((0,r.g)(this.root,t.value))),historyValue:o},this),u=new Set;return!function t(e,n){if(!u.has(e))for(let i in u.add(e),e){let o=e[i];if(o&&"object"==typeof o){if("xstate$$type"in o&&o.xstate$$type===r.$){e[i]=n[o.id];continue}t(o,n)}}}(s.context,n),s}}var l=n(87150);function h(t,e){let n=(0,r.t)(e);if(!n.includes(t.type)){let e=1===n.length?`type "${n[0]}"`:`one of types "${n.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(t)} to have ${e}`)}}},25566:function(t){var e,n,r,i=t.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function u(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(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var a=[],c=!1,f=-1;function l(){c&&r&&(c=!1,r.length?a=r.concat(a):f=-1,a.length&&h())}function h(){if(!c){var t=u(l);c=!0;for(var e=a.length;e;){for(r=a,a=[];++f<e;)r&&r[f].run();f=-1,e=a.length}r=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.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 n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new p(t,e)),1!==a.length||c||u(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}},42460:function(t,e,n){"use strict";let r;n.d(e,{yK:function(){return R},Hq:function(){return $},ei:function(){return F},bK:function(){return j},Ol:function(){return P},UE:function(){return U},Ag:function(){return B},F8:function(){return k},dS:function(){return N},zB:function(){return L},lB:function(){return q}});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 u=function(t,e,n){if(i.randomUUID&&!e&&!t)return i.randomUUID();let u=(t=t||{}).random??t.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(o)}();if(u.length<16)throw Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,e){if((n=n||0)<0||n+16>e.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=u[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()}(u)},a=n(40211),c=n(16279),f=n(87150),l=n(78725),h=n(37604),p=n(68851),d=n(85078),y=n(7449),g=n(95767),v=n(44465),m=n(5134),b=n(17753),w=n(4382),_=n(30325),x=n(21178),E=n(60033),S=n(66692),I=n(89634);let C=t=>({context:e})=>{let{count:n,include:r,exclude:i,responseType:o="message.received"}=t;return{count:n,domain:e.domain,from:e.connectTo,include:r?Array.isArray(r)?r:[r]:[],exclude:i?Array.isArray(i)?i:[i]:[],responseType:o,target:e.target,to:e.name}},O=t=>e=>{let{data:n}=e;
3return(!t.include.length||t.include.includes(n.type))&&(!t.exclude.length||!t.exclude.includes(n.type))&&n.domain===t.domain&&n.from===t.from&&n.to===t.to&&(!t.target||e.source===t.target)},T=t=>e=>({type:t,message:e}),A=(0,p.P)(()=>(0,d.R)(window,"message")),k=t=>(0,a.Y$)(({input:e})=>{var n,r;return A.pipe(t?(0,y.U)(t):(0,g.z)(),(0,v.h)(O(e)),(0,y.U)(T(e.responseType)),e.count?(0,g.z)((n=e.count,void 0===r&&(r=null),r=null!=r?r:n,(0,b.e)(function(t,e){var i=[],o=0;t.subscribe((0,w.x)(e,function(t){var s,u,a,c,f=null;o++%r==0&&i.push([]);try{for(var l=(0,m.XA)(i),h=l.next();!h.done;h=l.next()){var p=h.value;p.push(t),n<=p.length&&(f=null!=f?f:[]).push(p)}}catch(t){s={error:t}}finally{try{h&&!h.done&&(u=l.return)&&u.call(l)}finally{if(s)throw s.error}}if(f)try{for(var d=(0,m.XA)(f),y=d.next();!y.done;y=d.next()){var p=y.value;(0,_.P)(i,p),e.next(p)}}catch(t){a={error:t}}finally{try{y&&!y.done&&(c=d.return)&&c.call(d)}finally{if(a)throw a.error}}},function(){var t,n;try{for(var r=(0,m.XA)(i),o=r.next();!o.done;o=r.next()){var s=o.value;e.next(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.complete()},void 0,function(){i=null}))})),(0,x.b)(t=>t),(0,E.q)(e.count)):(0,g.z)())}),R="sanity/comlink",B="comlink/response",U="comlink/heartbeat",$="comlink/disconnect",j="comlink/handshake/syn",P="comlink/handshake/syn-ack",F="comlink/handshake/ack",M=t=>e=>e.pipe((0,E.q)(1),(0,y.U)(()=>{throw Error(t)})),q=()=>(0,c.cY)({types:{},actors:{listen:(0,a.Y$)(({input:t})=>{let e=t.signal?(0,d.R)(t.signal,"abort").pipe(M(`Request ${t.requestId} aborted`)):S.E;return(0,d.R)(window,"message").pipe((0,v.h)(e=>e.data?.type===B&&e.data?.responseTo===t.requestId&&!!e.source&&t.sources.has(e.source)),(0,E.q)(t.sources.size),(0,I.R)(e))})},actions:{"send message":({context:t},e)=>{let{sources:n,targetOrigin:r}=t,{message:i}=e;n.forEach(t=>{t.postMessage(i,{targetOrigin:r})})},"on success":(0,f.s)(({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,f.s)(({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,f.s)(({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-${u()}`,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:n,domain:r,from:i,id:o,responseTo:s,to:u,type:a}=t;return{message:{channelId:e,data:n,domain:r,from:i,id:o,to:u,type:a,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,l.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})});(0,a.E9)(({sendBack:t,input:e})=>{let n=()=>{t(e.event)};e.immediate&&n();let r=setInterval(n,e.interval);return()=>{clearInterval(r)}});let L=()=>(0,c.cY)({types:{},actors:{requestMachine:q(),listen:k()},actions:{"buffer handshake":(0,l.a)({handshakeBuffer:({event:t,context:e})=>((0,c.ZD)(t,"message.received"),[...e.handshakeBuffer,t])}),"buffer message":(0,f.e)(({enqueue:t})=>{t.assign({buffer:({event:t,context:e})=>((0,c.ZD)(t,"post"),[...e.buffer,{data:t.data,resolvable:t.resolvable,options:t.options}])}),t.emit(({event:t})=>((0,c.ZD)(t,"post"),{type:"buffer.added",message:t.data}))}),"create request":(0,l.a)({requests:({context:t,event:e,self:n,spawn:r})=>{(0,c.ZD)(e,"request");let i=(Array.isArray(e.data)?e.data:[e.data]).map(e=>r("requestMachine",{id:`req-${u()}`,input:{channelId:t.channelId,data:e.data,domain:t.domain,expectResponse:e.expectResponse,from:t.name,parentRef:n,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,...i]}}),"emit heartbeat":(0,f.a)(()=>({type:"heartbeat"})),"emit received message":(0,f.e)(({enqueue:t})=>{t.emit(({event:t})=>((0,c.ZD)(t,"message.received"),{type:"message",message:t.message.data}))}),"emit status":(0,f.a)((t,e)=>({type:"status",status:e.status})),"post message":(0,h.r)(({event:t})=>((0,c.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,f.e)(({context:t,enqueue:e})=>{t.handshakeBuffer.forEach(t=>e.raise(t)),e.assign({handshakeBuffer:[]})}),"remove request":(0,f.e)(({context:t,enqueue:e,event:n})=>{(0,c.ZD)(n,["request.success","request.failed","request.aborted"]),(0,h.s)(n.requestId),e.assign({requests:t.requests.filter(({id:t})=>t!==n.requestId)})}),"send response":(0,h.r)(({event:t})=>((0,c.ZD)(t,["message.received","heartbeat.received"]),{type:"request",data:{type:B,responseTo:t.message.data.id,data:void 0}})),"send handshake syn ack":(0,h.r)({type:"request",data:{type:P}}),"send pending messages":(0,f.e)(({enqueue:t})=>{t.raise(({context:t})=>({type:"request",data:t.buffer.map(({data:t,resolvable:e,options:n})=>({data:t.data,type:t.type,expectResponse:!!e,resolvable:e,options:n}))})),t.emit(({context:t})=>({type:"buffer.flushed",messages:t.buffer.map(({data:t})=>t)})),t.assign({buffer:[]})}),"set connection config":(0,l.a)({channelId:({event:t})=>((0,c.ZD)(t,"handshake.syn"),t.message.data.channelId),target:({event:t})=>((0,c.ZD)(t,"handshake.syn"),t.message.source||void 0),targetOrigin:({event:t})=>((0,c.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??R,handshakeBuffer:[],name:t.name,requests:[],target:void 0,targetOrigin:null}),invoke:{id:"listen for handshake syn",src:"listen",input:C({include:j,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"}}
3,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:C({include:F,count:1,responseType:"handshake.complete"}),onDone:"connected"},{id:"listen for disconnect",src:"listen",input:C({include:$,count:1,responseType:"disconnect"})},{id:"listen for messages",src:"listen",input:C({exclude:[$,j,F,U,B]})}],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:C({exclude:[$,j,F,U,B]})},{id:"listen for heartbeat",src:"listen",input:C({include:U,responseType:"heartbeat.received"})},{id:"listen for disconnect",src:"listen",input:C({include:$,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"]}}}}}),N=(t,e=L())=>{let n;let r=(0,h.c)(e,{input:t}),i=new Map,o=new Map;r.on("message",({message:t})=>{let e=i.get(t.type);if(e){e.forEach(e=>e(t.data));return}let n=o.get(t.type);n?n.add(t):o.set(t.type,new Set([t]))});let s=()=>{r.stop()};return{actor:r,fetch:(t,e,n)=>{let i,o;let{responseTimeout:s=1e4,signal:u,suppressWarnings:a}=n||{},c="function"==typeof Promise.withResolvers?Promise.withResolvers():{promise:new Promise((t,e)=>{i=t,o=e}),resolve:i,reject:o};return r.send({type:"post",data:{type:t,data:e},resolvable:c,options:{responseTimeout:s,signal:u,suppressWarnings:a}}),c.promise},machine:e,on:(t,e,n)=>{let r=i.get(t)||new Set;i.has(t)||i.set(t,r),r.add(e);let s=o.get(t);if(s){let r=n?.replay??1;Array.from(s).slice(-r).forEach(({data:t})=>e(t)),o.delete(t)}return()=>{r.delete(e)}},onStatus:(t,e)=>{let i=r.on("status",r=>{n=r.status,e&&r.status!==e||t(r.status)});return n&&t(n),()=>i.unsubscribe()},post:(t,e)=>{r.send({type:"post",data:{type:t,data:e}})},start:()=>(r.start(),s),stop:s}}},6271:function(t,e,n){"use strict";n.d(e,{g:function(){return c},p:function(){return o},v:function(){return a}});let r=!(typeof navigator>"u")&&"ReactNative"===navigator.product,i={timeout:r?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 n=Number(e);return isNaN(n)?t(i.timeout):{connect:n,socket:n}}(e.timeout),e.query){let{url:t,searchParams:n}=function(t){let e=t.indexOf("?");if(-1===e)return{url:t,searchParams:new URLSearchParams};let n=t.slice(0,e),i=t.slice(e+1);if(!r)return{url:n,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,n]=t.split("=");e&&o.append(s(e),s(n||""))}return{url:n,searchParams:o}}(e.url);for(let[r,i]of Object.entries(e.query)){if(void 0!==i){if(Array.isArray(i))for(let t of i)n.append(r,t);else n.append(r,i)}let o=n.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 u=/^https?:\/\//i,a=function(t){if(!u.test(t.url))throw Error(`"${t.url}" is not a valid URL`)};function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},23742:function(t,e,n){"use strict";n.d(e,{xl:function(){return p}});var r=n(6271);let i=["request","response","progress","error","abort"],o=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];var s,u,a=(0,r.g)(function(){if(u)return s;u=1;var t=function(t){return t.replace(/^\s+|\s+$/g,"")};return s=function(e){if(!e)return{};for(var n=Object.create(null),r=t(e).split("\n"),i=0;i<r.length;i++){var o,s=r[i],u=s.indexOf(":"),a=t(s.slice(0,u)).toLowerCase(),c=t(s.slice(u+1));typeof n[a]>"u"?n[a]=c:(o=n[a],"[object Array]"===Object.prototype.toString.call(o))?n[a].push(c):n[a]=[n[a],c]}return n}}());class c{onabort;onerror;onreadystatechange;ontimeout;readyState=0;response;responseText="";responseType="";status;statusText;withCredentials;#t;#e;#n;#r={};#i;#o={};#s;open(t,e,n){this.#t=t,this.#e=e,this.#n="",this.readyState=1,this.onreadystatechange?.(),this.#i=void 0}abort(){this.#i&&this.#i.abort()}getAllResponseHeaders(){return this.#n}setRequestHeader(t,e){this.#r[t]=e}setInit(t,e=!0){this.#o=t,this.#s=e}send(t){let e="arraybuffer"!==this.responseType,n={...this.#o,method:this.#t,headers:this.#r,body:t};"function"==typeof AbortController&&this.#s&&(this.#i=new AbortController,"u">typeof EventTarget&&this.#i.signal instanceof EventTarget&&(n.signal=this.#i.signal)),"u">typeof document&&(n.credentials=this.withCredentials?"include":"omit"),fetch(this.#e,n).then(t=>
3(t.headers.forEach((t,e)=>{this.#n+=`${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 f="function"==typeof XMLHttpRequest?"xhr":"fetch",l="xhr"===f?XMLHttpRequest:c,h=(t,e)=>{let n=t.options,r=t.applyMiddleware("finalizeOptions",n),i={},o=t.applyMiddleware("interceptRequest",void 0,{adapter:f,context:t});if(o){let t=setTimeout(e,0,null,o);return{abort:()=>clearTimeout(t)}}let s=new l;s instanceof c&&"object"==typeof r.fetch&&s.setInit(r.fetch,r.useAbortSignal??!0);let u=r.headers,h=r.timeout,p=!1,d=!1,y=!1;if(s.onerror=t=>{m(s instanceof c?t instanceof Error?t:Error(`Request error while attempting to reach is ${r.url}`,{cause:t}):Error(`Request error while attempting to reach is ${r.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},s.ontimeout=t=>{m(Error(`Request timeout while attempting to reach ${r.url}${t.lengthComputable?`(${t.loaded} of ${t.total} bytes transferred)`:""}`))},s.onabort=()=>{v(!0),p=!0},s.onreadystatechange=function(){h&&(v(),i.socket=setTimeout(()=>g("ESOCKETTIMEDOUT"),h.socket)),!p&&s&&4===s.readyState&&0!==s.status&&function(){if(!(p||d||y)){if(0===s.status)return void m(Error("Unknown XHR error"));v(),d=!0,e(null,{body:s.response||(""===s.responseType||"text"===s.responseType?s.responseText:""),url:r.url,method:r.method,headers:a(s.getAllResponseHeaders()),statusCode:s.status,statusMessage:s.statusText})}}()},s.open(r.method,r.url,!0),s.withCredentials=!!r.withCredentials,u&&s.setRequestHeader)for(let t in u)u.hasOwnProperty(t)&&s.setRequestHeader(t,u[t]);return r.rawBody&&(s.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:r,adapter:f,request:s,context:t}),s.send(r.body||null),h&&(i.connect=setTimeout(()=>g("ETIMEDOUT"),h.connect)),{abort:function(){p=!0,s&&s.abort()}};function g(e){y=!0,s.abort();let n=Error("ESOCKETTIMEDOUT"===e?`Socket timed out on request to ${r.url}`:`Connection timed out on request to ${r.url}`);n.code=e,t.channels.error.publish(n)}function v(t){(t||p||s&&s.readyState>=2&&i.connect)&&clearTimeout(i.connect),i.socket&&clearTimeout(i.socket)}function m(t){if(d)return;v(!0),d=!0,s=null;let n=t||Error(`Network error while attempting to reach ${r.url}`);n.isNetworkError=!0,n.request=r,e(n)}},p=(t=[],e=h)=>(function t(e,n){let s=[],u=o.reduce((t,e)=>(t[e]=t[e]||[],t),{processOptions:[r.p],validateOptions:[r.v]});function a(t){let e;let r=i.reduce((t,e)=>(t[e]=function(){let t=Object.create(null),e=0;return{publish:function(e){for(let n in t)t[n](e)},subscribe:function(n){let r=e++;return t[r]=n,function(){delete t[r]}}}}(),t),{}),o=function(t,e,...n){let r="onError"===t,i=e;for(let e=0;e<u[t].length&&(i=(0,u[t][e])(i,...n),!r||i);e++);return i},s=o("processOptions",t);o("validateOptions",s);let a={options:s,channels:r,applyMiddleware:o},c=r.request.subscribe(t=>{e=n(t,(e,n)=>((t,e,n)=>{let i=t,s=e;if(!i)try{s=o("onResponse",e,n)}catch(t){s=null,i=t}(i=i&&o("onError",i,n))?r.error.publish(i):s&&r.response.publish(s)})(e,n,t))});r.abort.subscribe(()=>{c(),e&&e.abort()});let f=o("onReturn",r,a);return f===r&&r.request.publish(a),f}return a.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&&u.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return o.forEach(e=>{t[e]&&u[e].push(t[e])}),s.push(t),a},a.clone=()=>t(s,n),e.forEach(a.use),a})(t,e)},60349:function(t,e,n){"use strict";n.d(e,{LO:function(){return m},XD:function(){return I},YD:function(){return b},ll:function(){return d},wE:function(){return y}}),n(6271);var r,i,o,s,u,a=n(25566),c=n(82957).lW,f={exports:{}};u||(u=1,function(t,e){let n;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 n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))}),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}},e.load=function(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!t&&"u">typeof a&&"env"in a&&(t=a.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=(n=!1,()=>{n||(n=!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?o:(s=1,o=function(t){function e(t){let r,i,o,s=null;function u(...t){if(!u.enabled)return;let n=Number(new Date),i=n-(r||n);u.diff=i,u.prev=r,u.curr=n,r=n,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,(n,r)=>{if("%%"===n)return"%";o++;let i=e.formatters[r];if("function"==typeof i){let e=t[o];n=i.call(u,e),t.splice(o,1),o--}return n}),e.formatArgs.call(u,t),(u.log||e.log).apply(u,t)}return u.namespace=t,u.useColors=e.useColors(),u.color=e.selectColor(t),u.extend=n,u.destroy=e.destroy,Object.defineProperty(u,"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(u),u}function n(t,n){let r=e(this.namespace+(typeof n>"u"?":":n)+t);return r.log=this.log,r}function o(t,e){let n=0,r=0,i=-1,o=0;for(;n<t.length;)if(r<e.length&&(e[r]===t[n]||"*"===e[r]))"*"===e[r]?(i=r,o=n):n++,r++;else{if(-1===i)return!1;r=i+1,n=++o}for(;r<e.length&&"*"===e[r];)r++;return r===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 n of(e.save(t),e.namespaces=t,e.names=[],e.skips=[],("string"==typeof t?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===n[0]?e.skips.push(n.slice(1)):e.names.push(n)},e.enabled=function(t){for(let n of e.skips)if(o(t,n))return!1;for(let n of e.names)if(o(t,n))return!0;return!1},e.humanize=function(){if(i)return r;function t(t,e,n,r){return Math.round(t/n)+" "+r+(e>=1.5*n?"s":"")}
4return i=1,r=function(e,n){n=n||{};var r,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 n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return 864e5*n;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===o&&isFinite(e))return n.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":(r=Math.abs(e))>=864e5?Math.round(e/864e5)+"d":r>=36e5?Math.round(e/36e5)+"h":r>=6e4?Math.round(e/6e4)+"m":r>=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(n=>{e[n]=t[n]}),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e<t.length;e++)n=(n<<5)-n+t.charCodeAt(e)|0;return e.colors[Math.abs(n)%e.colors.length]},e.enable(e.load()),e}))(e);let{formatters:u}=t.exports;u.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}(f,f.exports)),f.exports,Object.prototype.hasOwnProperty;let l=typeof c>"u"?()=>!1:t=>c.isBuffer(t);function h(t){return"[object Object]"===Object.prototype.toString.call(t)}let p=["boolean","string","number"];function d(){return{processOptions:t=>{let e=t.body;return!e||"function"==typeof e.pipe||l(e)||-1===p.indexOf(typeof e)&&!Array.isArray(e)&&!function(t){if(!1===h(t))return!1;let e=t.constructor;if(void 0===e)return!0;let n=e.prototype;return!(!1===h(n)||!1===n.hasOwnProperty("isPrototypeOf"))}(e)?t:Object.assign({},t,{body:JSON.stringify(t.body),headers:Object.assign({},t.headers,{"Content-Type":"application/json"})})}}}function y(t){return{onResponse:e=>{let n=e.headers["content-type"]||"",r=t&&t.force||-1!==n.indexOf("application/json");return e.body&&n&&r?Object.assign({},e,{body:function(t){try{return JSON.parse(t)}catch(t){throw t.message=`Failed to parsed response body as JSON: ${t.message}`,t}}(e.body)}):e},processOptions:t=>Object.assign({},t,{headers:Object.assign({Accept:"application/json"},t.headers)})}}let g={};"u">typeof globalThis?g=globalThis:"u">typeof window?g=window:"u">typeof global?g=global:"u">typeof self&&(g=self);var v=g;function m(t={}){let e=t.implementation||v.Observable;if(!e)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:(t,n)=>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(n),()=>t.abort.publish()))}}function b(){return{onRequest:t=>{if("xhr"!==t.adapter)return;let e=t.request,n=t.context;function r(t){return e=>{let r=e.lengthComputable?e.loaded/e.total*100:-1;n.channels.progress.publish({stage:t,percent:r,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=r("upload")),"onprogress"in e&&(e.onprogress=r("download"))}}}let w=(t={})=>{let e=t.implementation||Promise;if(!e)throw Error("`Promise` is not available in global scope, and no implementation was passed");return{onReturn:(n,r)=>new e((e,i)=>{let o=r.options.cancelToken;o&&o.promise.then(t=>{n.abort.publish(t),i(t)}),n.error.subscribe(i),n.response.subscribe(n=>{e(t.onlyBody?n.body:n)}),setTimeout(()=>{try{n.request.publish(r)}catch(t){i(t)}},0)})}};class _{__CANCEL__=!0;message;constructor(t){this.message=t}toString(){return"Cancel"+(this.message?`: ${this.message}`:"")}}class x{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 _(t),e(this.reason))})}static source=()=>{let t;return{token:new x(e=>{t=e}),cancel:t}}}w.Cancel=_,w.CancelToken=x,w.isCancel=t=>!(!t||!t?.__CANCEL__);var E=(t,e,n)=>("GET"===n.method||"HEAD"===n.method)&&(t.isNetworkError||!1);function S(t){return 100*Math.pow(2,t)+100*Math.random()}let I=(t={})=>(t=>{let e=t.maxRetries||5,n=t.retryDelay||S,r=t.shouldRetry;return{onError:(t,i)=>{var o;let s=i.options,u=s.maxRetries||e,a=s.retryDelay||n,c=s.shouldRetry||r,f=s.attemptNumber||0;if(null!==(o=s.body)&&"object"==typeof o&&"function"==typeof o.pipe||!c(t,f,s
4)||f>=u)return t;let l=Object.assign({},i,{options:Object.assign({},s,{attemptNumber:f+1})});return setTimeout(()=>i.channels.request.publish(l),a(f)),null}}})({shouldRetry:E,...t});I.shouldRetry=E},66629:function(t,e,n){"use strict";n.d(e,{kP:function(){return o},x0:function(){return s}});let r=t=>crypto.getRandomValues(new Uint8Array(t)),i=(t,e,n)=>{let r=(2<<Math.log(t.length-1)/Math.LN2)-1,i=-~(1.6*r*e/t.length);return (o=e)=>{let s="";for(;;){let e=n(i),u=0|i;for(;u--;)if((s+=t[e[u]&r]||"").length===o)return s}}},o=(t,e=21)=>i(t,e,r),s=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((t,e)=>((e&=63)<36?t+=e.toString(36):e<62?t+=(e-26).toString(36).toUpperCase():e>62?t+="-":t+="_",t),"")},5134:function(t,e,n){"use strict";n.d(e,{CR:function(){return a},FC:function(){return l},Jh:function(){return s},KL:function(){return h},XA:function(){return u},ZT:function(){return i},ev:function(){return c},mG:function(){return o},qq:function(){return f}});var r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(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 n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{a(r.next(t))}catch(t){o(t)}}function u(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(s,u)}a((r=r.apply(t,e||[])).next())})}function s(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(a){return function(u){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,r=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=e.call(t,s)}catch(t){u=[6,t],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function u(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function c(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function f(t){return this instanceof f?(this.v=t,this):new f(t)}function l(t,e,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},s("next"),s("throw"),s("return",function(t){return function(e){return Promise.resolve(e).then(t,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function s(t,e){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||u(t,e)})},e&&(r[t]=e(r[t])))}function u(t,e){try{var n;(n=i[t](e)).value instanceof f?Promise.resolve(n.value.v).then(a,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}}function a(t){u("next",t)}function c(t){u("throw",t)}function l(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function h(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=u(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise(function(r,i){!function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}(r,i,(e=t[n](e)).done,e.value)})}}}"function"==typeof SuppressedError&&SuppressedError},52141:function(t,e,n){"use strict";n.d(e,{i:function(){return u}});var r=n(2265);let i=r.createContext(!0);function o(){throw Error("A function wrapped in useEffectEvent can't be called during rendering.")}let s=()=>{try{return r.use(i)}catch{return!1}};function u(t){let e=r.useRef(o);return r.useInsertionEffect(()=>{e.current=t},[t]),(...t)=>(s()&&o(),(0,e.current)(...t))}}}]);

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.