(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[544],{6583:(t,e,r)=>{var n=r(377);t.exports=n.EventSourcePolyfill},3285:function(t){var e;e=function(){function t(){return(t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var r="image-Tb9Ew8CXIwaY6R1kjMvI0uRR-2000x3000-jpg";function n(t){return("image-"+t.split("/").slice(-1)[0]).replace(/\.([a-z]+)$/,"-$1")}var o=[["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"]],i=["clip","crop","fill","fillmax","max","scale","min"],s=["top","bottom","left","right","center","focalpoint","entropy"],a=["format"],c=function(){function c(e,r){this.options=void 0,this.options=e?t({},e.options||{},r||{}):t({},r||{})}var u=c.prototype;return u.withOptions=function(r){var n=r.baseUrl||this.options.baseUrl,i={baseUrl:n};for(var s in r)r.hasOwnProperty(s)&&(i[function(t){for(var r,n=function(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,r){if(t){if("string"==typeof t)return e(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,void 0)}}(t))){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(o);!(r=n()).done;){var i=r.value,s=i[0],a=i[1];if(t===s||t===a)return s}return t}(s)]=r[s]);return new c(this,t({baseUrl:n},i))},u.image=function(t){return this.withOptions({source:t})},u.dataset=function(t){return this.withOptions({dataset:t})},u.projectId=function(t){return this.withOptions({projectId:t})},u.bg=function(t){return this.withOptions({bg:t})},u.dpr=function(t){return this.withOptions(t&&1!==t?{dpr:t}:{})},u.width=function(t){return this.withOptions({width:t})},u.height=function(t){return this.withOptions({height:t})},u.focalPoint=function(t,e){return this.withOptions({focalPoint:{x:t,y:e}})},u.maxWidth=function(t){return this.withOptions({maxWidth:t})},u.minWidth=function(t){return this.withOptions({minWidth:t})},u.maxHeight=function(t){return this.withOptions({maxHeight:t})},u.minHeight=function(t){return this.withOptions({minHeight:t})},u.size=function(t,e){return this.withOptions({width:t,height:e})},u.blur=function(t){return this.withOptions({blur:t})},u.sharpen=function(t){return this.withOptions({sharpen:t})},u.rect=function(t,e,r,n){return this.withOptions({rect:{left:t,top:e,width:r,height:n}})},u.format=function(t){return this.withOptions({format:t})},u.invert=function(t){return this.withOptions({invert:t})},u.orientation=function(t){return this.withOptions({orientation:t})},u.quality=function(t){return this.withOptions({quality:t})},u.forceDownload=function(t){return this.withOptions({download:t})},u.flipHorizontal=function(){return this.withOptions({flipHorizontal:!0})},u.flipVertical=function(){return this.withOptions({flipVertical:!0})},u.ignoreImageParams=function(){return this.withOptions({ignoreImageParams:!0})},u.fit=function(t){if(-1===i.indexOf(t))throw Error('Invalid fit mode "'+t+'"');return this.withOptions({fit:t})},u.crop=function(t){if(-1===s.indexOf(t))throw Error('Invalid crop mode "'+t+'"');return this.withOptions({crop:t})},u.saturation=function(t){return this.withOptions({saturation:t})},u.auto=function(t){if(-1===a.indexOf(t))throw Error('Invalid auto mode "'+t+'"');return this.withOptions({auto:t})},u.pad=function(t){return this.withOptions({pad:t})},u.url=function(){return function(e){var i=t({},e||{}),s=i.source;delete i.source;var a=function(e){var r;if(!e)return null;if("string"==typeof e&&/^https?:\/\//.test(""+e))r={asset:{_ref:n(e)}};else if("string"==typeof e)r={asset:{_ref:e}};else if(e&&"string"==typeof e._ref)r={asset:e};else if(e&&"string"==typeof e._id)r={asset:{_ref:e._id||""}};else if(e&&e.asset&&"string"==typeof e.asset.url)r={asset:{_ref:n(e.asset.url)}};else{if("object"!=typeof e.asset)return null;r=t({},e)}return e.crop&&(r.crop=e.crop),e.hotspot&&(r.hotspot=e.hotspot),function(e){if(e.crop&&e.hotspot)return e;var r=t({},e);return r.crop||(r.crop={left:0,top:0,bottom:0,right:0}),r.hotspot||(r.hotspot={x:.5,y:.5,height:1,width:1}),r}(r)}(s);if(!a)throw Error("Unable to resolve image URL from source ("+JSON.stringify(s)+")");var c=function(t){var e=t.split("-"),n=e[1],o=e[2],i=e[3];if(!n||!o||!i)throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+r+'".');var s=o.split("x"),a=s[0],c=s[1],u=+a,h=+c;if(!(isFinite(u)&&isFinite(h)))throw Error("Malformed asset _ref '"+t+"'. Expected an id like \""+r+'".');return{id:n,width:u,height:h,format:i}}(a.asset._ref||a.asset._id||""),u=Math.round(a.crop.left*c.width),h=Math.round(a.crop.top*c.height),p={left:u,top:h,width:Math.round(c.width-a.crop.right*c.width-u),height:Math.round(c.height-a.crop.bottom*c.height-h)},f=a.hotspot.height*c.height/2,l=a.hotspot.width*c.width/2,d=a.hotspot.x*c.width,y=a.hotspot.y*c.height;return i.rect||i.focalPoint||i.ignoreImageParams||i.crop||(i=t({},i,function(t,e){var r,n=e.width,o=e.height;if(!(n&&o))return{width:n,height:o,rect:t.crop};var i=t.crop,s=t.hotspot,a=n/o;if(i.width/i.height>a){var c=Math.round(i.height),u=Math.round(c*a),h=Math.max(0,Math.round(i.top)),p=Math.max(0,Math.round(Math.round((s.right-s.left)/2+s.left)-u/2));p<i.left?p=i.left:p+u>i.left+i.width&&(p=i.left+i.width-u),r={left:p,top:h,width:u,height:c}}else{var f=i.width,l=Math.round(f/a),d=Math.max(0,Math.round(i.left)),y=Math.max(0,Math.round(Math.round((s.bottom-s.top)/2+s.top)-l/2));y<i.top?y=i.top:y+l>i.top+i.height&&(y=i.top+i.height-l),r={left:d,top:y,width:f,height:l}}return{width:n,height:o,rect:r}}({crop:p,hotspot:{left:d-l,top:y-f,right:d+l,bottom:y+f}},i))),function(t){var e=(t.baseUrl||"https://cdn.sanity.io").replace(/\/+$/,""),r=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,n=e+"/images/"+t.projectId+"/"+t.dataset+"/"+r,i=[];if(t.rect){var s=t.rect,a=s.left,c=s.top,u=s.width,h=s.height;(0!==a||0!==c||h!==t.asset.height||u!==t.asset.width)&&i.push("rect="+a+","+c+","+u+","+h)}t.bg&&i.push("bg="+t.bg),t.focalPoint&&(i.push("fp-x="+t.focalPoint.x),i.push("fp-y="+t.focalPoint.y));var p=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(p&&i.push("flip="+p),o.forEach(function(e){var r=e[0],n=e[1];void 0!==t[r]?i.push(n+"="+encodeURIComponent(t[r])):void 0!==t[n]&&i.push(n+"="+encodeURIComponent(t[n]))}),0===i.length)?n:n+"?"+i.join("&")}(t({},i,{asset:c}))}(this.options)},u.toString=function(){return this.url()},c}();return function(t){if(t&&"config"in t&&"function"==typeof t.config){var e=t.config(),r=e.apiHost,n=e.projectId,o=e.dataset;return new c(null,{baseUrl:(r||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:n,dataset:o})}if(t&&"clientConfig"in t&&"object"==typeof t.clientConfig){var i=t.clientConfig,s=i.apiHost,a=i.projectId,u=i.dataset;return new c(null,{baseUrl:(s||"https://api.sanity.io").replace(/^https:\/\/api\./,"https://cdn."),projectId:a,dataset:u})}return new c(null,t)}},t.exports=e()},377:function(t,e){var r,n,o;!function(i){"use strict";var s=i.setTimeout,a=i.clearTimeout,c=i.XMLHttpRequest,u=i.XDomainRequest,h=i.ActiveXObject,p=i.EventSource,f=i.document,l=i.Promise,d=i.fetch,y=i.Response,v=i.TextDecoder,b=i.TextEncoder,g=i.AbortController;if("undefined"==typeof window||void 0===f||"readyState"in f||null!=f.body||(f.readyState="loading",window.addEventListener("load",function(t){f.readyState="complete"},!1)),null==c&&null!=h&&(c=function(){return new h("Microsoft.XMLHTTP")}),void 0==Object.create&&(Object.create=function(t){function e(){}return e.prototype=t,new e}),Date.now||(Date.now=function(){return new Date().getTime()}),void 0==g){var m=d;d=function(t,e){var r=e.signal;return m(t,{headers:e.headers,credentials:e.credentials,cache:e.cache}).then(function(t){var e=t.body.getReader();return r._reader=e,r._aborted&&r._reader.cancel(),{status:t.status,statusText:t.statusText,headers:t.headers,body:{getReader:function(){return e}}}})},g=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function w(){this.bitsNeeded=0,this.codePoint=0}w.prototype.decode=function(t){function e(t,e,r){if(1===r)return t>=128>>e&&t<<e<=2047;if(2===r)return t>=2048>>e&&t<<e<=55295||t>=57344>>e&&t<<e<=65535;if(3===r)return t>=65536>>e&&t<<e<=1114111;throw Error()}function r(t,e){if(6===t)return e>>6>15?3:e>31?2:1;if(12===t)return e>15?3:2;if(18===t)return 3;throw Error()}for(var n="",o=this.bitsNeeded,i=this.codePoint,s=0;s<t.length;s+=1){var a=t[s];0!==o&&(a<128||a>191||!e(i<<6|63&a,o-6,r(o,i)))&&(o=0,n+=String.fromCharCode(i=65533)),0===o?(a>=0&&a<=127?(o=0,i=a):a>=192&&a<=223?(o=6,i=31&a):a>=224&&a<=239?(o=12,i=15&a):a>=240&&a<=247?(o=18,i=7&a):(o=0,i=65533),0===o||e(i,o,r(o,i))||(o=0,i=65533)):(o-=6,i=i<<6|63&a),0===o&&(i<=65535?n+=String.fromCharCode(i):(n+=String.fromCharCode(55296+(i-65535-1>>10)),n+=String.fromCharCode(56320+(i-65535-1&1023))))}return this.bitsNeeded=o,this.codePoint=i,n},(void 0==v||void 0==b||!function(){try{return"test"===new v().decode(new b().encode("test"),{stream:!0})}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1}())&&(v=w);var O=function(){};function _(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=O,this.onload=O,this.onerror=O,this.onreadystatechange=O,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=O}function x(t){return t.replace(/[A-Z]/g,function(t){return String.fromCharCode(t.charCodeAt(0)+32)})}function E(t){for(var e=Object.create(null),r=t.split("\r\n"),n=0;n<r.length;n+=1){var o=r[n].split(": "),i=o.shift(),s=o.join(": ");e[x(i)]=s}this._map=e}function j(){}function S(t){this._headers=t}function C(){}function P(){this._listeners=Object.create(null)}function T(t){s(function(){throw t},0)}function I(t){this.type=t,this.target=void 0}function R(t,e){I.call(this,t),this.data=e.data,this.lastEventId=e.lastEventId}function A(t,e){I.call(this,t),this.status=e.status,this.statusText=e.statusText,this.headers=e.headers}function q(t,e){I.call(this,t),this.error=e.error}_.prototype.open=function(t,e){this._abort(!0);var r=this,n=this._xhr,o=1,i=0;this._abort=function(t){0!==r._sendTimeout&&(a(r._sendTimeout),r._sendTimeout=0),1!==o&&2!==o&&3!==o||(o=4,n.onload=O,n.onerror=O,n.onabort=O,n.onprogress=O,n.onreadystatechange=O,n.abort(),0!==i&&(a(i),i=0),t||(r.readyState=4,r.onabort(null),r.onreadystatechange())),o=0};var u=function(){if(1===o){var t=0,e="",i=void 0;if("contentType"in n)t=200,e="OK",i=n.contentType;else try{t=n.status,e=n.statusText,i=n.getResponseHeader("Content-Type")}catch(r){t=0,e="",i=void 0}0!==t&&(o=2,r.readyState=2,r.status=t,r.statusText=e,r._contentType=i,r.onreadystatechange())}},h=function(){if(u(),2===o||3===o){o=3;var t="";try{t=n.responseText}catch(t){}r.readyState=3,r.responseText=t,r.onprogress()}},p=function(t,e){if((null==e||null==e.preventDefault)&&(e={preventDefault:O}),h(),1===o||2===o||3===o){if(o=4,0!==i&&(a(i),i=0),r.readyState=4,"load"===t)r.onload(e);else if("error"===t)r.onerror(e);else if("abort"===t)r.onabort(e);else throw TypeError();r.onreadystatechange()}},f=function(t){void 0==n||(4===n.readyState?"onload"in n&&"onerror"in n&&"onabort"in n||p(""===n.responseText?"error":"load",t):3===n.readyState?"onprogress"in n||h():2===n.readyState&&u())},l=function(){i=s(function(){l()},500),3===n.readyState&&h()};"onload"in n&&(n.onload=function(t){p("load",t)}),"onerror"in n&&(n.onerror=function(t){p("error",t)}),"onabort"in n&&(n.onabort=function(t){p("abort",t)}),"onprogress"in n&&(n.onprogress=h),"onreadystatechange"in n&&(n.onreadystatechange=function(t){f(t)}),("contentType"in n||!("ontimeout"in c.prototype))&&(e+=(-1===e.indexOf("?")?"?":"&")+"padding=true"),n.open(t,e,!0),"readyState"in n&&(i=s(function(){l()},0))},_.prototype.abort=function(){this._abort(!1)},_.prototype.getResponseHeader=function(t){return this._contentType},_.prototype.setRequestHeader=function(t,e){var r=this._xhr;"setRequestHeader"in r&&r.setRequestHeader(t,e)},_.prototype.getAllResponseHeaders=function(){return void 0!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},_.prototype.send=function(){if((!("ontimeout"in c.prototype)||!("sendAsBinary"in c.prototype)&&!("mozAnon"in c.prototype))&&void 0!=f&&void 0!=f.readyState&&"complete"!==f.readyState){var t=this;t._sendTimeout=s(function(){t._sendTimeout=0,t.send()},4);return}var e=this._xhr;"withCredentials"in e&&(e.withCredentials=this.withCredentials);try{e.send(void 0)}catch(t){throw t}},E.prototype.get=function(t){return this._map[x(t)]},null!=c&&null==c.HEADERS_RECEIVED&&(c.HEADERS_RECEIVED=2),j.prototype.open=function(t,e,r,n,o,i,s){t.open("GET",o);var a=0;for(var u in t.onprogress=function(){var e=t.responseText.slice(a);a+=e.length,r(e)},t.onerror=function(t){t.preventDefault(),n(Error("NetworkError"))},t.onload=function(){n(null)},t.onabort=function(){n(null)},t.onreadystatechange=function(){t.readyState===c.HEADERS_RECEIVED&&e(t.status,t.statusText,t.getResponseHeader("Content-Type"),new E(t.getAllResponseHeaders()))},t.withCredentials=i,s)Object.prototype.hasOwnProperty.call(s,u)&&t.setRequestHeader(u,s[u]);return t.send(),t},S.prototype.get=function(t){return this._headers.get(t)},C.prototype.open=function(t,e,r,n,o,i,s){var a=null,c=new g,u=c.signal,h=new v;return d(o,{headers:s,credentials:i?"include":"same-origin",signal:u,cache:"no-store"}).then(function(t){return a=t.body.getReader(),e(t.status,t.statusText,t.headers.get("Content-Type"),new S(t.headers)),new l(function(t,e){var n=function(){a.read().then(function(e){e.done?t(void 0):(r(h.decode(e.value,{stream:!0})),n())}).catch(function(t){e(t)})};n()})}).catch(function(t){if("AbortError"!==t.name)return t}).then(function(t){n(t)}),{abort:function(){null!=a&&a.cancel(),c.abort()}}},P.prototype.dispatchEvent=function(t){t.target=this;var e=this._listeners[t.type];if(void 0!=e)for(var r=e.length,n=0;n<r;n+=1){var o=e[n];try{"function"==typeof o.handleEvent?o.handleEvent(t):o.call(this,t)}catch(t){T(t)}}},P.prototype.addEventListener=function(t,e){t=String(t);var r=this._listeners,n=r[t];void 0==n&&(n=[],r[t]=n);for(var o=!1,i=0;i<n.length;i+=1)n[i]===e&&(o=!0);o||n.push(e)},P.prototype.removeEventListener=function(t,e){t=String(t);var r=this._listeners,n=r[t];if(void 0!=n){for(var o=[],i=0;i<n.length;i+=1)n[i]!==e&&o.push(n[i]);0===o.length?delete r[t]:r[t]=o}},R.prototype=Object.create(I.prototype),A.prototype=Object.create(I.prototype),q.prototype=Object.create(I.prototype);var D=/^text\/event\-stream(;.*)?$/i,U=function(t,e){var r=null==t?e:parseInt(t,10);return r!=r&&(r=e),M(r)},M=function(t){return Math.min(Math.max(t,1e3),18e6)},k=function(t,e,r){try{"function"==typeof e&&e.call(t,r)}catch(t){T(t)}};function H(t,e){var r,n,o,i,h,p,f,l,d,y,v,b,g,m,w,O,x,E,S,T,I,H,z,L,V,$,B,F,X,W;P.call(this),e=e||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,r=this,n=t,o=e,n=String(n),i=!!o.withCredentials,h=o.lastEventIdQueryParameterName||"lastEventId",p=M(1e3),f=U(o.heartbeatTimeout,45e3),l="",d=p,y=!1,v=0,b=o.headers||{},g=o.Transport,m=N&&void 0==g?void 0:new _(void 0!=g?new g:void 0!=c&&"withCredentials"in c.prototype||void 0==u?new c:new u),w=null!=g&&"string"!=typeof g?new g:void 0==m?new C:new j,O=void 0,x=0,E=-1,S="",T="",I="",H="",z=0,L=0,V=0,$=function(t,e,n,o){if(0===E){if(200===t&&void 0!=n&&D.test(n)){E=1,y=Date.now(),d=p,r.readyState=1;var i=new A("open",{status:t,statusText:e,headers:o});r.dispatchEvent(i),k(r,r.onopen,i)}else{var s="";200!==t?(e&&(e=e.replace(/\s+/g," ")),s="EventSource's response has a status "+t+" "+e+" that is not 200. Aborting the connection."):s="EventSource's response has a Content-Type specifying an unsupported type: "+(void 0==n?"-":n.replace(/\s+/g," "))+". Aborting the connection.",X();var i=new A("error",{status:t,statusText:e,headers:o});r.dispatchEvent(i),k(r,r.onerror,i),console.error(s)}}},B=function(t){if(1===E){for(var e=-1,n=0;n<t.length;n+=1){var o=t.charCodeAt(n);(10===o||13===o)&&(e=n)}var i=(-1!==e?H:"")+t.slice(0,e+1);H=(-1===e?H:"")+t.slice(e+1),""!==t&&(y=Date.now(),v+=t.length);for(var c=0;c<i.length;c+=1){var o=i.charCodeAt(c);if(-1===z&&10===o)z=0;else if(-1===z&&(z=0),13===o||10===o){if(0!==z){1===z&&(V=c+1);var u=i.slice(L,V-1),h=i.slice(V+(V<c&&32===i.charCodeAt(V)?1:0),c);"data"===u?(S+="\n",S+=h):"id"===u?T=h:"event"===u?I=h:"retry"===u?d=p=U(h,p):"heartbeatTimeout"===u&&(f=U(h,f),0!==x&&(a(x),x=s(function(){W()},f)))}if(0===z){if(""!==S){l=T,""===I&&(I="message");var b=new R(I,{data:S.slice(1),lastEventId:T});if(r.dispatchEvent(b),"open"===I?k(r,r.onopen,b):"message"===I?k(r,r.onmessage,b):"error"===I&&k(r,r.onerror,b),2===E)return}S="",I=""}z=13===o?-1:0}else 0===z&&(L=c,z=1),1===z?58===o&&(V=c+1,z=2):2===z&&(z=3)}}},F=function(t){if(1===E||0===E){E=-1,0!==x&&(a(x),x=0),x=s(function(){W()},d),d=M(Math.min(16*p,2*d)),r.readyState=0;var e=new q("error",{error:t});r.dispatchEvent(e),k(r,r.onerror,e),void 0!=t&&console.error(t)}},X=function(){E=2,void 0!=O&&(O.abort(),O=void 0),0!==x&&(a(x),x=0),r.readyState=2},W=function(){if(x=0,-1!==E){if(y||void 0==O){var t=Math.max((y||Date.now())+f-Date.now(),1);y=!1,x=s(function(){W()},t)}else F(Error("No activity within "+f+" milliseconds. "+(0===E?"No response received.":v+" chars received.")+" Reconnecting.")),void 0!=O&&(O.abort(),O=void 0);return}y=!1,v=0,x=s(function(){W()},f),E=0,S="",I="",T=l,H="",L=0,V=0,z=0;var e=n;if("data:"!==n.slice(0,5)&&"blob:"!==n.slice(0,5)&&""!==l){var o=n.indexOf("?");e=(-1===o?n:n.slice(0,o+1)+n.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(t,e){return e===h?"":t}))+((-1===n.indexOf("?")?"?":"&")+h)+"="+encodeURIComponent(l)}var i=r.withCredentials,a={};a.Accept="text/event-stream";var c=r.headers;if(void 0!=c)for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(a[u]=c[u]);try{O=w.open(m,$,B,F,e,i,a)}catch(t){throw X(),t}},r.url=n,r.readyState=0,r.withCredentials=i,r.headers=b,r._close=X,W()}var N=void 0!=d&&void 0!=y&&"body"in y.prototype;H.prototype=Object.create(P.prototype),H.prototype.CONNECTING=0,H.prototype.OPEN=1,H.prototype.CLOSED=2,H.prototype.close=function(){this._close()},H.CONNECTING=0,H.OPEN=1,H.CLOSED=2,H.prototype.withCredentials=void 0;var z=p;void 0==c||void 0!=p&&"withCredentials"in p.prototype||(z=H),function(i){if("object"==typeof t.exports){var s=i(e);void 0!==s&&(t.exports=s)}else n=[e],void 0!==(o="function"==typeof(r=i)?r.apply(e,n):r)&&(t.exports=o)}(function(t){t.EventSourcePolyfill=H,t.NativeEventSource=p,t.EventSource=z})}("undefined"==typeof globalThis?"undefined"!=typeof window?window:"undefined"!=typeof self?self:this:globalThis)},3798:t=>{"use strict";t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},2712:(t,e)=>{"use strict";var r="undefined"!=typeof Reflect?Reflect.construct:void 0,n=Object.defineProperty,o=Error.captureStackTrace;function i(t){void 0!==t&&n(this,"message",{configurable:!0,value:t,writable:!0});var e=this.constructor.name;void 0!==e&&e!==this.name&&n(this,"name",{configurable:!0,value:e,writable:!0}),o(this,this.constructor)}void 0===o&&(o=function(t){var e=Error();n(t,"stack",{configurable:!0,get:function(){var t=e.stack;return n(this,"stack",{configurable:!0,value:t,writable:!0}),t},set:function(e){n(t,"stack",{configurable:!0,value:e,writable:!0})}})}),i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var s=function(){function t(t,e){return n(t,"name",{configurable:!0,value:e})}try{var e=function(){};if(t(e,"foo"),"foo"===e.name)return t}catch(t){}}();(t.exports=function(t,e){if(null==e||e===Error)e=i;else if("function"!=typeof e)throw TypeError("super_ should be a function");if("string"==typeof t)n=t,t=void 0!==r?function(){return r(e,arguments,this.constructor)}:function(){e.apply(this,arguments)},void 0!==s&&(s(t,n),n=void 0);else if("function"!=typeof t)throw TypeError("constructor should be either a string or a function");t.super_=t.super=e;var n,o={constructor:{configurable:!0,value:t,writable:!0}};return void 0!==n&&(o.name={configurable:!0,value:n,writable:!0}),t.prototype=Object.create(e.prototype,o),t}).BaseError=i},3893:(t,e,r)=>{"use strict";r.d(e,{UU:()=>i});var n=r(8924),o=r.n(n);function i(t){return o()(t)}r(6540),r(3867)},8361:(t,e,r)=>{"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var o=r(5566),i=r(3661),s=i.map,a=i.filter,c=r(3163),u=r(750);function h(t){this.client=t}o(h.prototype,{upload:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u.validateAssetType(t);var n=r.extract||void 0;n&&!n.length&&(n=["none"]);var i=u.hasDataset(this.client.clientConfig),c="image"===t?"images":"files",h="undefined"!=typeof window&&e instanceof window.File?o({filename:!1===r.preserveFilename?void 0:e.name,contentType:e.type},r):r,p=h.tag,f=h.label,l=h.title,d=h.description,y=h.creditLine,v=h.filename,b=h.source,g={label:f,title:l,description:d,filename:v,meta:n,creditLine:y};b&&(g.sourceId=b.id,g.sourceName=b.name,g.sourceUrl=b.url);var m=this.client._requestObservable({tag:p,method:"POST",timeout:h.timeout||0,uri:"/assets/".concat(c,"/").concat(i),headers:h.contentType?{"Content-Type":h.contentType}:{},query:g,body:e});return this.client.isPromiseAPI()?m.pipe(a(function(t){return"response"===t.type}),s(function(t){return t.body.document})).toPromise():m},delete:function(t,e){console.warn("client.assets.delete() is deprecated, please use client.delete(<document-id>)");var r=e||"";return/^(image|file)-/.test(r)?t._id&&(r=t._id):r="".concat(t,"-").concat(r),u.hasDataset(this.client.clientConfig),this.client.delete(r)},getImageUrl:function(t,e){var r,o=t._ref||t;if("string"!=typeof o)throw Error("getImageUrl() needs either an object with a _ref, or a string with an asset document ID");if(!/^image-[A-Za-z0-9_]+-\d+x\d+-[a-z]{1,5}$/.test(o))throw Error('Unsupported asset ID "'.concat(o,'". URL generation only works for auto-generated IDs.'));var i=function(t){if(Array.isArray(t))return t}(r=o.split("-"))||function(t,e){var r,n,o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i=[],s=!0,a=!1;try{for(o=o.call(t);!(s=(r=o.next()).done)&&(i.push(r.value),4!==i.length);s=!0);}catch(t){a=!0,n=t}finally{try{s||null==o.return||o.return()}finally{if(a)throw n}}return i}}(r,4)||function(t,e){if(t){if("string"==typeof t)return n(t,4);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 n(t,4)}}(r,4)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=i[1],a=i[2],h=i[3];u.hasDataset(this.client.clientConfig);var p=this.client.clientConfig,f=p.projectId,l=p.dataset,d=e?c(e):"";return"https://cdn.sanity.io/images/".concat(f,"/").concat(l,"/").concat(s,"-").concat(a,".").concat(h).concat(d)}}),t.exports=h},9539:(t,e,r)=>{"use strict";function n(t){this.client=t}r(5566)(n.prototype,{getLoginProviders:function(){return this.client.request({uri:"/auth/providers"})},logout:function(){return this.client.request({uri:"/auth/logout",method:"POST"})}}),t.exports=n},4087:(t,e,r)=>{"use strict";var n=r(5566),o=r(6076),i=r(750),s=r(8648),a={apiHost:"https://api.sanity.io",apiVersion:"1",useProjectHostname:!0,isPromiseAPI:!0},c=["localhost","127.0.0.1","0.0.0.0"];e.defaultConfig=a,e.initConfig=function(t,r){var u,h=n({},r,t);h.apiVersion||s.printNoApiVersionSpecifiedWarning();var p=n({},a,h),f=p.useProjectHostname;if("undefined"==typeof Promise){var l=o("js-client-promise-polyfill");throw Error("No native Promise-implementation found, polyfill needed - see ".concat(l))}if(f&&!p.projectId)throw Error("Configuration must contain `projectId`");var d="undefined"!=typeof window&&window.location&&window.location.hostname,y=d&&(u=window.location.hostname,-1!==c.indexOf(u));d&&y&&p.token&&!0!==p.ignoreBrowserTokenWarning?s.printBrowserTokenWarning():void 0===p.useCdn&&s.printCdnWarning(),f&&i.projectId(p.projectId),p.dataset&&i.dataset(p.dataset),"requestTagPrefix"in p&&(p.requestTagPrefix=p.requestTagPrefix?i.requestTag(p.requestTagPrefix).replace(/\.+$/,""):void 0),p.apiVersion="".concat(p.apiVersion).replace(/^v/,""),p.isDefaultApi=p.apiHost===a.apiHost,p.useCdn=!!p.useCdn&&!p.withCredentials,e.validateApiVersion(p.apiVersion);var v=p.apiHost.split("://",2),b=v[0],g=v[1],m=p.isDefaultApi?"apicdn.sanity.io":g;return p.useProjectHostname?(p.url="".concat(b,"://").concat(p.projectId,".").concat(g,"/v").concat(p.apiVersion),p.cdnUrl="".concat(b,"://").concat(p.projectId,".").concat(m,"/v").concat(p.apiVersion)):(p.url="".concat(p.apiHost,"/v").concat(p.apiVersion),p.cdnUrl=p.url),p},e.validateApiVersion=function(t){if("1"!==t&&"X"!==t){var e=new Date(t);if(!(/^\d{4}-\d{2}-\d{2}$/.test(t)&&e instanceof Date&&e.getTime()>0))throw Error("Invalid API version string, expected `1` or date in format `YYYY-MM-DD`")}}},7424:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(5566),i=r(3661),s=i.map,a=i.filter,c=r(750),u=r(3882),h=r(6557),p=r(9270),f=r(3108),l=r(899),d=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{dryRun:e.dryRun,returnIds:!0,returnDocuments:!1===(t=e.returnDocuments)?void 0:void 0===t||t,visibility:e.visibility||"sync",autoGenerateArrayKeys:e.autoGenerateArrayKeys,skipCrossDatasetReferenceValidation:e.skipCrossDatasetReferenceValidation}},y=function(t){return"response"===t.type},v=function(t){return t.body},b=function(t){return t.toPromise()};t.exports={listen:l,getDataUrl:function(t,e){var r=this.clientConfig,n=c.hasDataset(r),o="/".concat(t,"/").concat(n),i=e?"".concat(o,"/").concat(e):o;return"/data".concat(i).replace(/\/($|\?)/,"$1")},fetch:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=!1===r.filterResponse?function(t){return t}:function(t){return t.result},o=this._dataRequest("query",{query:t,params:e},r).pipe(s(n));return this.isPromiseAPI()?b(o):o},getDocument:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",t),json:!0,tag:e.tag},n=this._requestObservable(r).pipe(a(y),s(function(t){return t.body.documents&&t.body.documents[0]}));return this.isPromiseAPI()?b(n):n},getDocuments:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={uri:this.getDataUrl("doc",t.join(",")),json:!0,tag:e.tag},n=this._requestObservable(r).pipe(a(y),s(function(e){var r,n,o=(r=e.body.documents||[],n=function(t){return t._id},r.reduce(function(t,e){return t[n(e)]=e,t},Object.create(null)));return t.map(function(t){return o[t]||null})}));return this.isPromiseAPI()?b(n):n},create:function(t,e){return this._create(t,"create",e)},createIfNotExists:function(t,e){return c.requireDocumentId("createIfNotExists",t),this._create(t,"createIfNotExists",e)},createOrReplace:function(t,e){return c.requireDocumentId("createOrReplace",t),this._create(t,"createOrReplace",e)},patch:function(t,e){return new f(t,e,this)},delete:function(t,e){return this.dataRequest("mutate",{mutations:[{delete:u(t)}]},e)},mutate:function(t,e){var r=t instanceof f||t instanceof p?t.serialize():t,n=Array.isArray(r)?r:[r],o=e&&e.transactionId;return this.dataRequest("mutate",{mutations:n,transactionId:o},e)},transaction:function(t){return new p(t,this)},dataRequest:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._dataRequest(t,e,r);return this.isPromiseAPI()?b(n):n},_dataRequest:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="mutate"===t,i=!o&&h(e),c=!o&&i.length<11264,u=c?i:"",p=r.returnFirst,f=r.timeout,l=r.token,b=r.tag,g=r.headers,m={method:c?"GET":"POST",uri:this.getDataUrl(t,u),json:!0,body:c?void 0:e,query:o&&d(r),timeout:f,headers:g,token:l,tag:b,canUseCdn:"query"===t};return this._requestObservable(m).pipe(a(y),s(v),s(function(t){if(!o)return t;var e=t.results||[];if(r.returnDocuments)return p?e[0]&&e[0].document:e.map(function(t){return t.document});var i=p?e[0]&&e[0].id:e.map(function(t){return t.id});return n({transactionId:t.transactionId,results:e},p?"documentId":"documentIds",i)}))},_create:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n({},e,t),s=o({returnFirst:!0,returnDocuments:!0},r);return this.dataRequest("mutate",{mutations:[i]},s)}}},6557:t=>{"use strict";var e=["tag"],r=encodeURIComponent;t.exports=function(t){var n=t.query,o=t.params,i=void 0===o?{}:o,s=t.options,a=void 0===s?{}:s,c=a.tag,u=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(a,e),h="query=".concat(r(n)),p=c?"?tag=".concat(r(c),"&").concat(h):"?".concat(h),f=Object.keys(i).reduce(function(t,e){return"".concat(t,"&").concat(r("$".concat(e)),"=").concat(r(JSON.stringify(i[e])))},p);return Object.keys(u).reduce(function(t,e){return a[e]?"".concat(t,"&").concat(r(e),"=").concat(r(a[e])):t},f)}},899:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){var n;n=r[e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var i=r(5566),s=r(3661).Observable,a=r(6583),c=r(7325),u=r(2178),h=r(6557),p=["includePreviousRevision","includeResult","visibility","effectFormat","tag"],f={includeResult:!0};function l(t){try{var e=t.data&&JSON.parse(t.data)||{};return i({type:t.type},e)}catch(t){return t}}t.exports=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.clientConfig,i=n.url,d=n.token,y=n.withCredentials,v=n.requestTagPrefix,b=r.tag&&v?[v,r.tag].join("."):r.tag,g=o(o({},u(r,f)),{},{tag:b}),m=h({query:t,params:e,options:c(g,p),tag:b}),w="".concat(i).concat(this.getDataUrl("listen",m));if(w.length>14800)return new s(function(t){return t.error(Error("Query too large for listener"))});var O=g.events?g.events:["mutation"],_=-1!==O.indexOf("reconnect"),x={};return(d||y)&&(x.withCredentials=!0),d&&(x.headers={Authorization:"Bearer ".concat(d)}),new s(function(t){var e,r=h(),n=!1;function o(){!n&&(_&&t.next({type:"reconnect"}),n||r.readyState!==a.CLOSED||(u(),clearTimeout(e),e=setTimeout(p,100)))}function i(e){t.error(function(t){if(t instanceof Error)return t;var e=l(t);return e instanceof Error?e:Error(e.error?e.error.description?e.error.description:"string"==typeof e.error?e.error:JSON.stringify(e.error,null,2):e.message||"Unknown listener error")}(e))}function s(e){var r=l(e);return r instanceof Error?t.error(r):t.next(r)}function c(e){n=!0,u(),t.complete()}function u(){r.removeEventListener("error",o,!1),r.removeEventListener("channelError",i,!1),r.removeEventListener("disconnect",c,!1),O.forEach(function(t){return r.removeEventListener(t,s,!1)}),r.close()}function h(){var t=new a(w,x);return t.addEventListener("error",o,!1),t.addEventListener("channelError",i,!1),t.addEventListener("disconnect",c,!1),O.forEach(function(e){return t.addEventListener(e,s,!1)}),t}function p(){r=h()}return function(){n=!0,u()}})}},3108:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(5566),i=r(3882),s=r(750),a=s.validateObject,c=s.validateInsert;function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.selection=t,this.operations=o({},e),this.client=r}o(u.prototype,{clone:function(){return new u(this.selection,o({},this.operations),this.client)},set:function(t){return this._assign("set",t)},diffMatchPatch:function(t){return a("diffMatchPatch",t),this._assign("diffMatchPatch",t)},unset:function(t){if(!Array.isArray(t))throw Error("unset(attrs) takes an array of attributes to unset, non-array given");return this.operations=o({},this.operations,{unset:t}),this},setIfMissing:function(t){return this._assign("setIfMissing",t)},replace:function(t){return a("replace",t),this._set("set",{$:t})},inc:function(t){return this._assign("inc",t)},dec:function(t){return this._assign("dec",t)},insert:function(t,e,r){var o;return c(t,e,r),this._assign("insert",(n(o={},t,e),n(o,"items",r),o))},append:function(t,e){return this.insert("after","".concat(t,"[-1]"),e)},prepend:function(t,e){return this.insert("before","".concat(t,"[0]"),e)},splice:function(t,e,r,n){var o=e<0?e-1:e,i=void 0===r||-1===r?-1:Math.max(0,e+r),s="".concat(t,"[").concat(o,":").concat(o<0&&i>=0?"":i,"]");return this.insert("replace",s,n||[])},ifRevisionId:function(t){return this.operations.ifRevisionID=t,this},serialize:function(){return o(i(this.selection),this.operations)},toJSON:function(){return this.serialize()},commit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.client)throw Error("No `client` passed to patch, either provide one or pass the patch to a clients `mutate()` method");var e=o({returnFirst:"string"==typeof this.selection,returnDocuments:!0},t);return this.client.mutate({patch:this.serialize()},e)},reset:function(){return this.operations={},this},_set:function(t,e){return this._assign(t,e,!1)},_assign:function(t,e){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return a(t,e),this.operations=o({},this.operations,n({},t,o({},r&&this.operations[t]||{},e))),this}}),t.exports=u},9270:(t,e,r)=>{"use strict";function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(5566),i=r(750),s=r(3108),a={returnDocuments:!1};function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;this.trxId=r,this.operations=t,this.client=e}o(c.prototype,{clone:function(){return new c(this.operations.slice(0),this.client,this.trxId)},create:function(t){return i.validateObject("create",t),this._add({create:t})},createIfNotExists:function(t){var e="createIfNotExists";return i.validateObject(e,t),i.requireDocumentId(e,t),this._add(n({},e,t))},createOrReplace:function(t){var e="createOrReplace";return i.validateObject(e,t),i.requireDocumentId(e,t),this._add(n({},e,t))},delete:function(t){return i.validateDocumentId("delete",t),this._add({delete:{id:t}})},patch:function(t,e){var r="function"==typeof e;if(t instanceof s)return this._add({patch:t.serialize()});if(r){var n=e(new s(t,{},this.client));if(!(n instanceof s))throw Error("function passed to `patch()` must return the patch");return this._add({patch:n.serialize()})}return this._add({patch:o({id:t},e)})},transactionId:function(t){return t?(this.trxId=t,this):this.trxId},serialize:function(){return this.operations.slice()},toJSON:function(){return this.serialize()},commit:function(t){if(!this.client)throw Error("No `client` passed to transaction, either provide one or pass the transaction to a clients `mutate()` method");return this.client.mutate(this.serialize(),o({transactionId:this.trxId},a,t||{}))},reset:function(){return this.operations=[],this},_add:function(t){return this.operations.push(t),this}}),t.exports=c},9693:(t,e,r)=>{"use strict";var n=r(5566),o=r(750);function i(t){this.request=t.request.bind(t)}n(i.prototype,{create:function(t,e){return this._modify("PUT",t,e)},edit:function(t,e){return this._modify("PATCH",t,e)},delete:function(t){return this._modify("DELETE",t)},list:function(){return this.request({uri:"/datasets"})},_modify:function(t,e,r){return o.dataset(e),this.request({method:t,uri:"/datasets/".concat(e),body:r})}}),t.exports=i},6076:t=>{"use strict";t.exports=function(t){return"https://docs.sanity.io/help/"+t}},6474:t=>{"use strict";t.exports=[]},9327:(t,e,r)=>{"use strict";var n=r(2712),o=r(5566);function i(t){var e=a(t);i.super.call(this,e.message),o(this,e)}function s(t){var e=a(t);s.super.call(this,e.message),o(this,e)}function a(t){var e,r=t.body,n={response:t,statusCode:t.statusCode,responseBody:-1!==(t.headers["content-type"]||"").toLowerCase().indexOf("application/json")?JSON.stringify(r,null,2):r};return r.error&&r.message?n.message="".concat(r.error," - ").concat(r.message):r.error&&r.error.description?(n.message=r.error.description,n.details=r.error):n.message=r.error||r.message||(e=t.statusMessage?" ".concat(t.statusMessage):"","".concat(t.method,"-request to ").concat(t.url," resulted in HTTP ").concat(t.statusCode).concat(e)),n}n(i),n(s),e.ClientError=i,e.ServerError=s},3163:t=>{"use strict";t.exports=function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push("".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(t[r])));return e.length>0?"?".concat(e.join("&")):""}},4163:(t,e,r)=>{"use strict";var n=r(9551),o=r(5566),i=r(3243),s=r(6519),a=r(6979),c=r(1774),u=r(3661).Observable,h=r(9327),p=h.ClientError,f=h.ServerError,l=n(r(6474).concat([{onResponse:function(t){var e=t.headers["x-sanity-warning"];return(Array.isArray(e)?e:[e]).filter(Boolean).forEach(function(t){return console.warn(t)}),t}},s(),a(),c(),{onResponse:function(t){if(t.statusCode>=500)throw new f(t);if(t.statusCode>=400)throw new p(t);return t}},i({implementation:u})]));function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;return e(o({maxRedirects:0},t))}d.defaultRequester=l,d.ClientError=p,d.ServerError=f,t.exports=d},1869:(t,e,r)=>{"use strict";var n=r(5566);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},o=e.token||t.token;o&&(r.Authorization="Bearer ".concat(o)),e.useGlobalApi||t.useProjectHostname||!t.projectId||(r["X-Sanity-Project-ID"]=t.projectId);var i=!!(void 0===e.withCredentials?t.token||t.withCredentials:e.withCredentials),s=void 0===e.timeout?t.timeout:e.timeout;return n({},e,{headers:n({},r,e.headers||{}),timeout:void 0===s?3e5:s,proxy:e.proxy||t.proxy,json:!0,withCredentials:i})}},3971:(t,e,r)=>{"use strict";function n(t){this.client=t}r(5566)(n.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(t){return this.client.request({uri:"/projects/".concat(t)})}}),t.exports=n},8924:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){var n;n=r[e],e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var i=r(5566),s=r(3661),a=s.Observable,c=s.map,u=s.filter,h=r(3108),p=r(9270),f=r(7424),l=r(9693),d=r(3971),y=r(8361),v=r(4349),b=r(9539),g=r(4163),m=r(1869),w=r(4087),O=w.defaultConfig,_=w.initConfig,x=r(750);function E(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;if(!(this instanceof E))return new E(t);if(this.config(t),this.assets=new y(this),this.datasets=new l(this),this.projects=new d(this),this.users=new v(this),this.auth=new b(this),this.clientConfig.isPromiseAPI){var e=i({},this.clientConfig,{isPromiseAPI:!1});this.observable=new E(e)}}i(E.prototype,f),i(E.prototype,{clone:function(){return new E(this.config())},config:function(t){if(void 0===t)return i({},this.clientConfig);if(this.clientConfig&&!1===this.clientConfig.allowReconfigure)throw Error("Existing client instance cannot be reconfigured - use `withConfig(newConfig)` to return a new client");if(this.observable){var e=i({},t,{isPromiseAPI:!1});this.observable.config(e)}return this.clientConfig=_(t,this.clientConfig||{}),this},withConfig:function(t){return new E(o(o({},this.config()),t))},getUrl:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e?this.clientConfig.cdnUrl:this.clientConfig.url;return"".concat(r,"/").concat(t.replace(/^\//,""))},isPromiseAPI:function(){return this.clientConfig.isPromiseAPI},_requestObservable:function(t){var e=this,r=t.url||t.uri,n=void 0===t.canUseCdn?["GET","HEAD"].indexOf(t.method||"GET")>=0&&0===r.indexOf("/data/"):t.canUseCdn,s=this.clientConfig.useCdn&&n,c=t.tag&&this.clientConfig.requestTagPrefix?[this.clientConfig.requestTagPrefix,t.tag].join("."):t.tag||this.clientConfig.requestTagPrefix;c&&(t.query=o({tag:x.requestTag(c)},t.query));var u=m(this.clientConfig,i({},t,{url:this.getUrl(r,s)}));return new a(function(t){return g(u,e.clientConfig.requester).subscribe(t)})},request:function(t){var e=this._requestObservable(t).pipe(u(function(t){return"response"===t.type}),c(function(t){return t.body}));return this.isPromiseAPI()?e.toPromise():e}}),E.Patch=h,E.Transaction=p,E.ClientError=g.ClientError,E.ServerError=g.ServerError,E.requester=g.defaultRequester,t.exports=E},4349:(t,e,r)=>{"use strict";function n(t){this.client=t}r(5566)(n.prototype,{getById:function(t){return this.client.request({uri:"/users/".concat(t)})}}),t.exports=n},2178:t=>{"use strict";t.exports=function(t,e){return Object.keys(e).concat(Object.keys(t)).reduce(function(r,n){return r[n]=void 0===t[n]?e[n]:t[n],r},{})}},3882:t=>{"use strict";t.exports=function(t){if("string"==typeof t||Array.isArray(t))return{id:t};if(t&&t.query)return"params"in t?{query:t.query,params:t.params}:{query:t.query};throw Error("Unknown selection - must be one of:\n\n".concat("* Document ID (<docId>)\n* Array of document IDs\n* Object containing `query`"))}},3661:(t,e,r)=>{"use strict";var n=r(8683).Observable,o=r(7718).filter,i=r(1040).map;t.exports={Observable:n,filter:o,map:i}},2237:t=>{"use strict";t.exports=function(t){var e,r=!1;return function(){return r||(e=t.apply(void 0,arguments),r=!0),e}}},7325:t=>{"use strict";t.exports=function(t,e){return e.reduce(function(e,r){return void 0===t[r]||(e[r]=t[r]),e},{})}},750:(t,e)=>{"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=["image","file"],o=["before","after","replace"];e.dataset=function(t){if(!/^(~[a-z0-9]{1}[-\w]{0,63}|[a-z0-9]{1}[-\w]{0,63})$/.test(t))throw Error("Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters")},e.projectId=function(t){if(!/^[-a-z0-9]+$/i.test(t))throw Error("`projectId` can only contain only a-z, 0-9 and dashes")},e.validateAssetType=function(t){if(-1===n.indexOf(t))throw Error("Invalid asset type: ".concat(t,". Must be one of ").concat(n.join(", ")))},e.validateObject=function(t,e){if(null===e||"object"!==r(e)||Array.isArray(e))throw Error("".concat(t,"() takes an object of properties"))},e.requireDocumentId=function(t,r){if(!r._id)throw Error("".concat(t,'() requires that the document contains an ID ("_id" property)'));e.validateDocumentId(t,r._id)},e.validateDocumentId=function(t,e){if("string"!=typeof e||!/^[a-z0-9_.-]+$/i.test(e))throw Error("".concat(t,'(): "').concat(e,'" is not a valid document ID'))},e.validateInsert=function(t,e,r){var n="insert(at, selector, items)";if(-1===o.indexOf(t)){var i=o.map(function(t){return'"'.concat(t,'"')}).join(", ");throw Error("".concat(n,' takes an "at"-argument which is one of: ').concat(i))}if("string"!=typeof e)throw Error("".concat(n,' takes a "selector"-argument which must be a string'));if(!Array.isArray(r))throw Error("".concat(n,' takes an "items"-argument which must be an array'))},e.hasDataset=function(t){if(!t.dataset)throw Error("`dataset` must be provided to perform queries");return t.dataset||""},e.requestTag=function(t){if("string"!=typeof t||!/^[a-z0-9._-]{1,75}$/i.test(t))throw Error("Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.");return t}},8648:(t,e,r)=>{"use strict";var n=r(6076),o=r(2237),i=function(t){return o(function(){for(var e,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=console).warn.apply(e,[t.join(" ")].concat(n))})};e.printCdnWarning=i(["You are not using the Sanity CDN. That means your data is always fresh, but the CDN is faster and","cheaper. Think about it! For more info, see ".concat(n("js-client-cdn-configuration"),"."),"To hide this warning, please set the `useCdn` option to either `true` or `false` when creating","the client."]),e.printBrowserTokenWarning=i(["You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.","See ".concat(n("js-client-browser-token")," for more information and how to hide this warning.")]),e.printNoApiVersionSpecifiedWarning=i(["Using the Sanity client without specifying an API version is deprecated.","See ".concat(n("js-client-api-version"))])},9551:(t,e,r)=>{t.exports=r(1375)},1375:(t,e,r)=>{"use strict";var n=r(7941),o=r(7348),i=r(3543),s=r(9917),a=r(9989),c=["request","response","progress","error","abort"],u=["processOptions","validateOptions","interceptRequest","finalizeOptions","onRequest","onResponse","onError","onReturn","onHeaders"];t.exports=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,h=[],p=u.reduce(function(t,e){return t[e]=t[e]||[],t},{processOptions:[i],validateOptions:[s]});function f(t){var e=c.reduce(function(t,e){return t[e]=n(),t},{}),i=o(p),s=i("processOptions",t);i("validateOptions",s);var a={options:s,channels:e,applyMiddleware:i},u=null,h=e.request.subscribe(function(t){u=r(t,function(r,n){return function(t,r,n){var o=t,s=r;if(!o)try{s=i("onResponse",r,n)}catch(t){s=null,o=t}(o=o&&i("onError",o,n))?e.error.publish(o):s&&e.response.publish(s)}(r,n,t)})});e.abort.subscribe(function(){h(),u&&u.abort()});var f=i("onReturn",e,a);return f===e&&e.request.publish(a),f}return f.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&&p.onReturn.length>0)throw Error("Tried to add new middleware with `onReturn` handler, but another handler has already been registered for this event");return u.forEach(function(e){t[e]&&p[e].push(t[e])}),h.push(t),f},f.clone=function(){return t(h)},e.forEach(f.use),f}},3543:(t,e,r)=>{"use strict";var n=r(5566),o=r(1160),i="undefined"!=typeof navigator&&"ReactNative"===navigator.product,s=Object.prototype.hasOwnProperty,a={timeout:i?6e4:12e4};function c(t){var e=[];for(var r in t)s.call(t,r)&&function t(r,n){Array.isArray(n)?n.forEach(function(e){return t(r,e)}):e.push([r,n].map(encodeURIComponent).join("="))}(r,t[r]);return e.length?e.join("&"):""}t.exports=function(t){var e="string"==typeof t?n({url:t},a):n({},a,t),r=o(e.url,{},!0);return e.timeout=function t(e){if(!1===e||0===e)return!1;if(e.connect||e.socket)return e;var r=Number(e);return isNaN(r)?t(a.timeout):{connect:r,socket:r}}(e.timeout),e.query&&(r.query=n({},r.query,function(t){var e={};for(var r in t)void 0!==t[r]&&(e[r]=t[r]);return e}(e.query))),e.method=e.body&&!e.method?"POST":(e.method||"GET").toUpperCase(),e.url=r.toString(c),e}},9917:t=>{"use strict";var e=/^https?:\/\//i;t.exports=function(t){if(!e.test(t.url))throw Error('"'.concat(t.url,'" is not a valid URL'))}},6519:(t,e,r)=>{"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=r(5566),i=r(8616),s=["boolean","string","number"];t.exports=function(){return{processOptions:function(t){var e=t.body;return e&&"function"!=typeof e.pipe&&!(e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))&&(-1!==s.indexOf(n(e))||Array.isArray(e)||i(e))?o({},t,{body:JSON.stringify(t.body),headers:o({},t.headers,{"Content-Type":"application/json"})}):t}}}},6979:(t,e,r)=>{"use strict";var n=r(5566);t.exports=function(t){return{onResponse:function(e){var r=e.headers["content-type"]||"",o=t&&t.force||-1!==r.indexOf("application/json");return e.body&&r&&o?n({},e,{body:function(t){try{return JSON.parse(t)}catch(t){throw t.message="Failed to parsed response body as JSON: ".concat(t.message),t}}(e.body)}):e},processOptions:function(t){return n({},t,{headers:n({Accept:"application/json"},t.headers)})}}}},3243:(t,e,r)=>{"use strict";var n=r(9809),o=r(5566);t.exports=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.implementation||n.Observable;if(!e)throw Error("`Observable` is not available in global scope, and no implementation was passed");return{onReturn:function(t,r){return new e(function(e){return t.error.subscribe(function(t){return e.error(t)}),t.progress.subscribe(function(t){return e.next(o({type:"progress"},t))}),t.response.subscribe(function(t){e.next(o({type:"response"},t)),e.complete()}),t.request.publish(r),function(){return t.abort.publish()}})}}}},368:t=>{"use strict";t.exports=function(){return{onRequest:function(t){if("xhr"===t.adapter){var e=t.request,r=t.context;"upload"in e&&"onprogress"in e.upload&&(e.upload.onprogress=n("upload")),"onprogress"in e&&(e.onprogress=n("download"))}function n(t){return function(e){var n=e.lengthComputable?e.loaded/e.total*100:-1;r.channels.progress.publish({stage:t,percent:n,total:e.total,loaded:e.loaded,lengthComputable:e.lengthComputable})}}}}}},1774:(t,e,r)=>{"use strict";t.exports=r(368)},9301:(t,e,r)=>{"use strict";var n=r(2180),o=r(8023),i=r(5378),s="undefined"==typeof window?void 0:window,a=s?"xhr":"fetch",c="function"==typeof XMLHttpRequest?XMLHttpRequest:function(){},u="withCredentials"in new c,h="undefined"==typeof XDomainRequest?void 0:XDomainRequest,p=u?c:h;s||(c=i,p=i),t.exports=function(t,e){var r=t.options,i=t.applyMiddleware("finalizeOptions",r),u={},h=s&&s.location&&!n(s.location.href,i.url),f=t.applyMiddleware("interceptRequest",void 0,{adapter:a,context:t});if(f){var l=setTimeout(e,0,null,f);return{abort:function(){return clearTimeout(l)}}}var d=h?new p:new c,y=s&&s.XDomainRequest&&d instanceof s.XDomainRequest,v=i.headers,b=i.timeout,g=!1,m=!1,w=!1;if(d.onerror=E,d.ontimeout=E,d.onabort=function(){x(!0),g=!0},d.onprogress=function(){},d[y?"onload":"onreadystatechange"]=function(){b&&(x(),u.socket=setTimeout(function(){return _("ESOCKETTIMEDOUT")},b.socket)),!g&&(4===d.readyState||y)&&0!==d.status&&function(){if(!g&&!m&&!w){if(0===d.status){E(Error("Unknown XHR error"));return}x(),m=!0,e(null,function(){var t=d.status,e=d.statusText;if(y&&void 0===t)t=200;else{if(t>12e3&&t<12156)return E();t=1223===d.status?204:d.status,e=1223===d.status?"No Content":e}return{body:d.response||d.responseText,url:i.url,method:i.method,headers:y?{}:o(d.getAllResponseHeaders()),statusCode:t,statusMessage:e}}())}}()},d.open(i.method,i.url,!0),d.withCredentials=!!i.withCredentials,v&&d.setRequestHeader)for(var O in v)v.hasOwnProperty(O)&&d.setRequestHeader(O,v[O]);else if(v&&y)throw Error("Headers cannot be set on an XDomainRequest object");return i.rawBody&&(d.responseType="arraybuffer"),t.applyMiddleware("onRequest",{options:i,adapter:a,request:d,context:t}),d.send(i.body||null),b&&(u.connect=setTimeout(function(){return _("ETIMEDOUT")},b.connect)),{abort:function(){g=!0,d&&d.abort()}};function _(e){w=!0,d.abort();var r=Error("ESOCKETTIMEDOUT"===e?"Socket timed out on request to ".concat(i.url):"Connection timed out on request to ".concat(i.url));r.code=e,t.channels.error.publish(r)}function x(t){(t||g||d.readyState>=2&&u.connect)&&clearTimeout(u.connect),u.socket&&clearTimeout(u.socket)}function E(t){if(!m){x(!0),m=!0,d=null;var r=t||Error("Network error while attempting to reach ".concat(i.url));r.isNetworkError=!0,r.request=i,e(r)}}}},5378:t=>{"use strict";function e(){this.readyState=0}e.prototype.open=function(t,e){this._method=t,this._url=e,this._resHeaders="",this.readyState=1,this.onreadystatechange()},e.prototype.abort=function(){this._controller&&this._controller.abort()},e.prototype.getAllResponseHeaders=function(){return this._resHeaders},e.prototype.setRequestHeader=function(t,e){this._headers=this._headers||{},this._headers[t]=e},e.prototype.send=function(t){var e=this,r=this._controller="function"==typeof AbortController&&new AbortController,n="arraybuffer"!==this.responseType,o={method:this._method,headers:this._headers,signal:r&&r.signal,body:t};"undefined"!=typeof window&&(o.credentials=this.withCredentials?"include":"omit"),fetch(this._url,o).then(function(t){return t.headers.forEach(function(t,r){e._resHeaders+="".concat(r,": ").concat(t,"\r\n")}),e.status=t.status,e.statusText=t.statusText,e.readyState=3,n?t.text():t.arrayBuffer()}).then(function(t){n?e.responseText=t:e.response=t,e.readyState=4,e.onreadystatechange()}).catch(function(t){if("AbortError"===t.name){e.onabort();return}e.onerror(t)})},t.exports=e},9989:(t,e,r)=>{"use strict";t.exports=r(9301)},9809:(t,e,r)=>{"use strict";"undefined"!=typeof globalThis?t.exports=globalThis:"undefined"!=typeof window?t.exports=window:void 0!==r.g?t.exports=r.g:"undefined"!=typeof self?t.exports=self:t.exports={}},7348:t=>{"use strict";t.exports=function(t){return function(e,r){for(var n="onError"===e,o=r,i=arguments.length,s=Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];for(var c=0;c<t[e].length&&(o=t[e][c].apply(void 0,[o].concat(s)),!n||o);c++);return o}}},3867:t=>{"use strict";t.exports=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var o=t.length-1;return t.slice(0,o).reduce(function(t,e,n){return t+e+r[n]},"")+t[o]}},8616:(t,e,r)=>{"use strict";var n=r(3798);function o(t){return!0===n(t)&&"[object Object]"===Object.prototype.toString.call(t)}t.exports=function(t){var e,r;return!1!==o(t)&&"function"==typeof(e=t.constructor)&&!1!==o(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")}},7941:t=>{t.exports=function(){var t=[];return{subscribe:function(e){return t.push(e),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}},publish:function(){for(var e=0;e<t.length;e++)t[e].apply(null,arguments)}}}},5566:t=>{"use strict";var e=Object.assign.bind(Object);t.exports=e,t.exports.default=t.exports},8683:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4991),o=r(7246),i=r(5628),s=r(2517),a=r(2808),c=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this.operator,i=o.toSubscriber(t,e,r);if(n?i.add(n.call(i,this.source)):i.add(this.source||a.config.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),a.config.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){a.config.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),n.canReportError(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=u(e))(function(e,n){var o;o=r.subscribe(function(e){try{t(e)}catch(t){n(t),o&&o.unsubscribe()}},n,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[i.observable]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:s.pipeFromArray(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=u(t))(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();function u(t){if(t||(t=a.config.Promise||Promise),!t)throw Error("no Promise impl found");return t}e.Observable=c},6376:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(2808),o=r(507);e.empty={closed:!0,next:function(t){},error:function(t){if(n.config.useDeprecatedSynchronousErrorHandling)throw t;o.hostReportError(t)},complete:function(){}}},6700:(t,e,r)=>{"use strict";var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=r(7137),i=r(6376),s=r(8143),a=r(6365),c=r(2808),u=r(507),h=function(t){function e(r,n,o){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=i.empty;break;case 1:if(!r){s.destination=i.empty;break}if("object"==typeof r){r instanceof e?(s.syncErrorThrowable=r.syncErrorThrowable,s.destination=r,r.add(s)):(s.syncErrorThrowable=!0,s.destination=new p(s,r));break}default:s.syncErrorThrowable=!0,s.destination=new p(s,r,n,o)}return s}return n(e,t),e.prototype[a.rxSubscriber]=function(){return this},e.create=function(t,r,n){var o=new e(t,r,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(s.Subscription);e.Subscriber=h;var p=function(t){function e(e,r,n,s){var a,c=t.call(this)||this;c._parentSubscriber=e;var u=c;return o.isFunction(r)?a=r:r&&(a=r.next,n=r.error,s=r.complete,r!==i.empty&&(u=Object.create(r),o.isFunction(u.unsubscribe)&&c.add(u.unsubscribe.bind(u)),u.unsubscribe=c.unsubscribe.bind(c))),c._context=u,c._next=a,c._error=n,c._complete=s,c}return n(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,r=c.config.useDeprecatedSynchronousErrorHandling;if(this._error)r&&e.syncErrorThrowable?this.__tryOrSetError(e,this._error,t):this.__tryOrUnsub(this._error,t),this.unsubscribe();else if(e.syncErrorThrowable)r?(e.syncErrorValue=t,e.syncErrorThrown=!0):u.hostReportError(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;u.hostReportError(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var r=function(){return t._complete.call(t._context)};c.config.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,r):this.__tryOrUnsub(r),this.unsubscribe()}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),c.config.useDeprecatedSynchronousErrorHandling)throw t;u.hostReportError(t)}},e.prototype.__tryOrSetError=function(t,e,r){if(!c.config.useDeprecatedSynchronousErrorHandling)throw Error("bad call");try{e.call(this._context,r)}catch(e){if(c.config.useDeprecatedSynchronousErrorHandling)return t.syncErrorValue=e,t.syncErrorThrown=!0,!0;return u.hostReportError(e),!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(h);e.SafeSubscriber=p},8143:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6320),o=r(6458),i=r(7137),s=r(4437),a=function(){var t;function e(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}return e.prototype.unsubscribe=function(){if(!this.closed){var t,r=this._parentOrParents,a=this._ctorUnsubscribe,u=this._unsubscribe,h=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var p=0;p<r.length;++p)r[p].remove(this);if(i.isFunction(u)){a&&(this._unsubscribe=void 0);try{u.call(this)}catch(e){t=e instanceof s.UnsubscriptionError?c(e.errors):[e]}}if(n.isArray(h))for(var p=-1,f=h.length;++p<f;){var l=h[p];if(o.isObject(l))try{l.unsubscribe()}catch(e){t=t||[],e instanceof s.UnsubscriptionError?t=t.concat(c(e.errors)):t.push(e)}}if(t)throw new s.UnsubscriptionError(t)}},e.prototype.add=function(t){var r=t;if(!t)return e.EMPTY;switch(typeof t){case"function":r=new e(t);case"object":if(r===this||r.closed||"function"!=typeof r.unsubscribe)return r;if(this.closed)return r.unsubscribe(),r;if(!(r instanceof e)){var n=r;(r=new e)._subscriptions=[n]}break;default:throw Error("unrecognized teardown "+t+" added to Subscription.")}var o=r._parentOrParents;if(null===o)r._parentOrParents=this;else if(o instanceof e){if(o===this)return r;r._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return r;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[r]:i.push(r),r},e.prototype.remove=function(t){var e=this._subscriptions;if(e){var r=e.indexOf(t);-1!==r&&e.splice(r,1)}},e.EMPTY=((t=new e).closed=!0,t),e}();function c(t){return t.reduce(function(t,e){return t.concat(e instanceof s.UnsubscriptionError?e.errors:e)},[])}e.Subscription=a},2808:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=!1;e.config={Promise:void 0,set useDeprecatedSynchronousErrorHandling(value){value?console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+Error().stack):r&&console.log("RxJS: Back to a better error behavior. Thank you. <3"),r=value},get useDeprecatedSynchronousErrorHandling(){return r}}},7718:(t,e,r)=>{"use strict";var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=r(6700);e.filter=function(t,e){return function(r){return r.lift(new i(t,e))}};var i=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.predicate=r,o.thisArg=n,o.count=0,o}return n(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){this.destination.error(t);return}e&&this.destination.next(t)},e}(o.Subscriber)},1040:(t,e,r)=>{"use strict";var n=function(){var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=r(6700);e.map=function(t,e){return function(r){if("function"!=typeof t)throw TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new i(t,e))}};var i=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}();e.MapOperator=i;var s=function(t){function e(e,r,n){var o=t.call(this,e)||this;return o.project=r,o.count=0,o.thisArg=n||o,o}return n(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){this.destination.error(t);return}this.destination.next(e)},e}(o.Subscriber)},5628:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},6365:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rxSubscriber="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),e.$$rxSubscriber=e.rxSubscriber},4437:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}();e.UnsubscriptionError=r},4991:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6700);e.canReportError=function(t){for(;t;){var e=t,r=e.closed,o=e.destination,i=e.isStopped;if(r||i)return!1;t=o&&o instanceof n.Subscriber?o:null}return!0}},507:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hostReportError=function(t){setTimeout(function(){throw t},0)}},6683:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.identity=function(t){return t}},6320:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},7137:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isFunction=function(t){return"function"==typeof t}},6458:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=function(t){return null!==t&&"object"==typeof t}},2517:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6683);function o(t){return 0===t.length?n.identity:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}e.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)},e.pipeFromArray=o},7246:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6700),o=r(6365),i=r(6376);e.toSubscriber=function(t,e,r){if(t){if(t instanceof n.Subscriber)return t;if(t[o.rxSubscriber])return t[o.rxSubscriber]()}return t||e||r?new n.Subscriber(t,e,r):new n.Subscriber(i.empty)}},8797:(t,e,r)=>{!function(){var e={452:function(t){"use strict";t.exports=r(6271)}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var i=n[t]={exports:{}},s=!0;try{e[t](i,i.exports,o),s=!1}finally{s&&delete n[t]}return i.exports}o.ab="//";var i={};!function(){var t,e=(t=o(452))&&"object"==typeof t&&"default"in t?t.default:t,r=/https?|ftp|gopher|file/;function n(t){"string"==typeof t&&(t=b(t));var n,o,i,s,a,c,u,h,p,f=(o=(n=t).auth,i=n.hostname,s=n.protocol||"",a=n.pathname||"",c=n.hash||"",u=n.query||"",h=!1,o=o?encodeURIComponent(o).replace(/%3A/i,":")+"@":"",n.host?h=o+n.host:i&&(h=o+(~i.indexOf(":")?"["+i+"]":i),n.port&&(h+=":"+n.port)),u&&"object"==typeof u&&(u=e.encode(u)),p=n.search||u&&"?"+u||"",s&&":"!==s.substr(-1)&&(s+=":"),n.slashes||(!s||r.test(s))&&!1!==h?(h="//"+(h||""),a&&"/"!==a[0]&&(a="/"+a)):h||(h=""),c&&"#"!==c[0]&&(c="#"+c),p&&"?"!==p[0]&&(p="?"+p),{protocol:s,host:h,pathname:a=a.replace(/[?#]/g,encodeURIComponent),search:p=p.replace("#","%23"),hash:c});return""+f.protocol+f.host+f.pathname+f.search+f.hash}var s="http://",a=s+"w.w",c=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,u=/https?|ftp|gopher|file/;function h(t,e){var r="string"==typeof t?b(t):t;t="object"==typeof t?n(t):t;var o=b(e),i="";r.protocol&&!r.slashes&&(i=r.protocol,t=t.replace(r.protocol,""),i+="/"===e[0]||"/"===t[0]?"/":""),i&&o.protocol&&(i="",o.slashes||(i=o.protocol,e=e.replace(o.protocol,"")));var h=t.match(c);h&&!o.protocol&&(t=t.substr((i=h[1]+(h[2]||"")).length),/^\/\/[^/]/.test(e)&&(i=i.slice(0,-1)));var p=new URL(t,a+"/"),f=new URL(e,p).toString().replace(a,""),l=o.protocol||r.protocol;return l+=r.slashes||o.slashes?"//":"",!i&&l?f=f.replace(s,l):i&&(f=f.replace(s,"")),u.test(f)||~e.indexOf(".")||"/"===t.slice(-1)||"/"===e.slice(-1)||"/"!==f.slice(-1)||(f=f.slice(0,-1)),i&&(f=i+("/"===f[0]?f.substr(1):f)),f}function p(){}p.prototype.parse=b,p.prototype.format=n,p.prototype.resolve=h,p.prototype.resolveObject=h;var f=/^https?|ftp|gopher|file/,l=/^(.*?)([#?].*)/,d=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,y=/^([a-z0-9.+-]*:)?\/\/\/*/i,v=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function b(t,r,o){if(void 0===r&&(r=!1),void 0===o&&(o=!1),t&&"object"==typeof t&&t instanceof p)return t;var i=(t=t.trim()).match(l);t=i?i[1].replace(/\\/g,"/")+i[2]:t.replace(/\\/g,"/"),v.test(t)&&"/"!==t.slice(-1)&&(t+="/");var s=!/(^javascript)/.test(t)&&t.match(d),c=y.test(t),u="";s&&(f.test(s[1])||(u=s[1].toLowerCase(),t=""+s[2]+s[3]),s[2]||(c=!1,f.test(s[1])?(u=s[1],t=""+s[3]):t="//"+s[3]),3!==s[2].length&&1!==s[2].length||(u=s[1],t="/"+s[3]));var h,b=(i?i[1]:t).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),g=b&&b[1],m=new p,w="",O="";try{h=new URL(t)}catch(e){w=e,u||o||!/^\/\//.test(t)||/^\/\/.+[@.]/.test(t)||(O="/",t=t.substr(1));try{h=new URL(t,a)}catch(t){return m.protocol=u,m.href=u,m}}m.slashes=c&&!O,m.host="w.w"===h.host?"":h.host,m.hostname="w.w"===h.hostname?"":h.hostname.replace(/(\[|\])/g,""),m.protocol=w?u||null:h.protocol,m.search=h.search.replace(/\\/g,"%5C"),m.hash=h.hash.replace(/\\/g,"%5C");var _=t.split("#");!m.search&&~_[0].indexOf("?")&&(m.search="?"),m.hash||""!==_[1]||(m.hash="#"),m.query=r?e.decode(h.search.substr(1)):m.search.substr(1),m.pathname=O+(s?h.pathname.replace(/['^|`]/g,function(t){return"%"+t.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(t,e){try{return decodeURIComponent(e).split("").map(function(t){var e=t.charCodeAt();return e>256||/^[a-z0-9]$/i.test(t)?t:"%"+e.toString(16).toUpperCase()}).join("")}catch(t){return e}}):h.pathname),"about:"===m.protocol&&"blank"===m.pathname&&(m.protocol="",m.pathname=""),w&&"/"!==t[0]&&(m.pathname=m.pathname.substr(1)),u&&!f.test(u)&&"/"!==t.slice(-1)&&"/"===m.pathname&&(m.pathname=""),m.path=m.pathname+m.search,m.auth=[h.username,h.password].map(decodeURIComponent).filter(Boolean).join(":"),m.port=h.port,g&&!m.host.endsWith(g)&&(m.host+=g,m.port=g.slice(1)),m.href=O?""+m.pathname+m.search+m.hash:n(m);var x=/^(file)/.test(m.href)?["host","hostname"]:[];return Object.keys(m).forEach(function(t){~x.indexOf(t)||(m[t]=m[t]||null)}),m}i.parse=b,i.format=n,i.resolve=h,i.resolveObject=function(t,e){return b(h(t,e))},i.Url=p}(),t.exports=i}()},6271:t=>{!function(){"use strict";var e={815:function(t){t.exports=function(t,r,n,o){r=r||"&",n=n||"=";var i={};if("string"!=typeof t||0===t.length)return i;var s=/\+/g;t=t.split(r);var a=1e3;o&&"number"==typeof o.maxKeys&&(a=o.maxKeys);var c=t.length;a>0&&c>a&&(c=a);for(var u=0;u<c;++u){var h,p,f,l,d=t[u].replace(s,"%20"),y=d.indexOf(n);(y>=0?(h=d.substr(0,y),p=d.substr(y+1)):(h=d,p=""),f=decodeURIComponent(h),l=decodeURIComponent(p),Object.prototype.hasOwnProperty.call(i,f))?e(i[f])?i[f].push(l):i[f]=[i[f],l]:i[f]=l}return i};var e=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},577:function(t){var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,i,s,a){return(i=i||"&",s=s||"=",null===t&&(t=void 0),"object"==typeof t)?n(o(t),function(o){var a=encodeURIComponent(e(o))+s;return r(t[o])?n(t[o],function(t){return a+encodeURIComponent(e(t))}).join(i):a+encodeURIComponent(e(t[o]))}).join(i):a?encodeURIComponent(e(a))+s+encodeURIComponent(e(t)):""};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}},s=!0;try{e[t](i,i.exports,n),s=!1}finally{s&&delete r[t]}return i.exports}n.ab="//";var o={};o.decode=o.parse=n(815),o.encode=o.stringify=n(577),t.exports=o}()},3368:(t,e,r)=>{t.exports=r(6085)},8023:t=>{var e=function(t){return t.replace(/^\s+|\s+$/g,"")};t.exports=function(t){if(!t)return{};for(var r={},n=e(t).split("\n"),o=0;o<n.length;o++){var i,s=n[o],a=s.indexOf(":"),c=e(s.slice(0,a)).toLowerCase(),u=e(s.slice(a+1));void 0===r[c]?r[c]=u:(i=r[c],"[object Array]"===Object.prototype.toString.call(i))?r[c].push(u):r[c]=[r[c],u]}return r}},3992:(t,e)=>{"use strict";var r,n=Object.prototype.hasOwnProperty;function o(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){var o,s,a=[];for(s in"string"!=typeof(e=e||"")&&(e="?"),t)if(n.call(t,s)){if(!(o=t[s])&&(null===o||o===r||isNaN(o))&&(o=""),s=i(s),o=i(o),null===s||null===o)continue;a.push(s+"="+o)}return a.length?e+a.join("&"):""},e.parse=function(t){for(var e,r=/([^=?#&]+)=?([^&]*)/g,n={};e=r.exec(t);){var i=o(e[1]),s=o(e[2]);null===i||null===s||i in n||(n[i]=s)}return n}},4444:t=>{"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},2180:(t,e,r)=>{"use strict";var n=r(8797);t.exports=function(t,e,r){if(t===e)return!0;var o=n.parse(t,!1,!0),i=n.parse(e,!1,!0),s=0|o.port||("https"===o.protocol?443:80),a=0|i.port||("https"===i.protocol?443:80),c={proto:o.protocol===i.protocol,hostname:o.hostname===i.hostname,port:s===a};return c.proto&&c.hostname&&(c.port||r)}},1160:(t,e,r)=>{"use strict";var n=r(4444),o=r(3992),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,h=/^[a-zA-Z]:/;function p(t){return(t||"").toString().replace(i,"")}var f=[["#","hash"],["?","query"],function(t,e){return y(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function d(t){"undefined"!=typeof window?e=window:void 0!==r.g?e=r.g:"undefined"!=typeof self?e=self:e={};var e,n,o=e.location||{},i={},s=typeof(t=t||o);if("blob:"===t.protocol)i=new b(unescape(t.pathname),{});else if("string"===s)for(n in i=new b(t,{}),l)delete i[n];else if("object"===s){for(n in t)n in l||(i[n]=t[n]);void 0===i.slashes&&(i.slashes=a.test(t.href))}return i}function y(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function v(t,e){t=(t=p(t)).replace(s,""),e=e||{};var r,n=u.exec(t),o=n[1]?n[1].toLowerCase():"",i=!!n[2],a=!!n[3],c=0;return i?a?(r=n[2]+n[3]+n[4],c=n[2].length+n[3].length):(r=n[2]+n[4],c=n[2].length):a?(r=n[3]+n[4],c=n[3].length):r=n[4],"file:"===o?c>=2&&(r=r.slice(2)):y(o)?r=n[4]:o?i&&(r=r.slice(2)):c>=2&&y(e.protocol)&&(r=n[4]),{protocol:o,slashes:i||y(o),slashesCount:c,rest:r}}function b(t,e,r){if(t=(t=p(t)).replace(s,""),!(this instanceof b))return new b(t,e,r);var i,a,c,u,l,g,m=f.slice(),w=typeof e,O=0;for("object"!==w&&"string"!==w&&(r=e,e=null),r&&"function"!=typeof r&&(r=o.parse),i=!(a=v(t||"",e=d(e))).protocol&&!a.slashes,this.slashes=a.slashes||i&&e.slashes,this.protocol=a.protocol||e.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||h.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!y(this.protocol)))&&(m[3]=[/(.*)/,"pathname"]);O<m.length;O++){if("function"==typeof(u=m[O])){t=u(t,this);continue}c=u[0],g=u[1],c!=c?this[g]=t:"string"==typeof c?~(l="@"===c?t.lastIndexOf(c):t.indexOf(c))&&("number"==typeof u[2]?(this[g]=t.slice(0,l),t=t.slice(l+u[2])):(this[g]=t.slice(l),t=t.slice(0,l))):(l=c.exec(t))&&(this[g]=l[1],t=t.slice(0,l.index)),this[g]=this[g]||i&&u[3]&&e[g]||"",u[4]&&(this[g]=this[g].toLowerCase())}r&&(this.query=r(this.query)),i&&e.slashes&&"/"!==this.pathname.charAt(0)&&(""!==this.pathname||""!==e.pathname)&&(this.pathname=function(t,e){if(""===t)return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=r.length,o=r[n-1],i=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(i=!0),r.splice(n,1),s--);return i&&r.unshift(""),("."===o||".."===o)&&r.push(""),r.join("/")}(this.pathname,e.pathname)),"/"!==this.pathname.charAt(0)&&y(this.protocol)&&(this.pathname="/"+this.pathname),n(this.port,this.protocol)||(this.host=this.hostname,this.port=""),this.username=this.password="",this.auth&&(~(l=this.auth.indexOf(":"))?(this.username=this.auth.slice(0,l),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=this.auth.slice(l+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(this.auth)),this.auth=this.password?this.username+":"+this.password:this.username),this.origin="file:"!==this.protocol&&y(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString()}b.prototype={set:function(t,e,r){switch(t){case"query":"string"==typeof e&&e.length&&(e=(r||o.parse)(e)),this[t]=e;break;case"port":this[t]=e,n(e,this.protocol)?e&&(this.host=this.hostname+":"+e):(this.host=this.hostname,this[t]="");break;case"hostname":this[t]=e,this.port&&(e+=":"+this.port),this.host=e;break;case"host":this[t]=e,c.test(e)?(e=e.split(":"),this.port=e.pop(),this.hostname=e.join(":")):(this.hostname=e,this.port="");break;case"protocol":this.protocol=e.toLowerCase(),this.slashes=!r;break;case"pathname":case"hash":if(e){var i="pathname"===t?"/":"#";this[t]=e.charAt(0)!==i?i+e:e}else this[t]=e;break;case"username":case"password":this[t]=encodeURIComponent(e);break;case"auth":var s=e.indexOf(":");~s?(this.username=e.slice(0,s),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=e.slice(s+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(e))}for(var a=0;a<f.length;a++){var u=f[a];u[4]&&(this[u[1]]=this[u[1]].toLowerCase())}return this.auth=this.password?this.username+":"+this.password:this.username,this.origin="file:"!==this.protocol&&y(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString(),this},toString:function(t){t&&"function"==typeof t||(t=o.stringify);var e,r=this.host,n=this.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var i=n+(this.protocol&&this.slashes||y(this.protocol)?"//":"");return this.username?(i+=this.username,this.password&&(i+=":"+this.password),i+="@"):this.password?(i+=":"+this.password,i+="@"):"file:"!==this.protocol&&y(this.protocol)&&!r&&"/"!==this.pathname&&(i+="@"),(":"===r[r.length-1]||c.test(this.hostname)&&!this.port)&&(r+=":"),i+=r+this.pathname,(e="object"==typeof this.query?t(this.query):this.query)&&(i+="?"!==e.charAt(0)?"?"+e:e),this.hash&&(i+=this.hash),i}},b.extractProtocol=v,b.location=d,b.trimLeft=p,b.qs=o,t.exports=b}}]);