(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[400],{5258:function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r2&&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",p="undefined"!=typeof window&&e instanceof window.File?o({filename:!1===r.preserveFilename?void 0:e.name,contentType:e.type},r):r,h=p.tag,f=p.label,l=p.title,d=p.description,y=p.creditLine,v=p.filename,b=p.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:h,method:"POST",timeout:p.timeout||0,uri:"/assets/".concat(c,"/").concat(i),headers:p.contentType?{"Content-Type":p.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()");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=t._ref||t;if("string"!=typeof r)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(r))throw Error('Unsupported asset ID "'.concat(r,'". URL generation only works for auto-generated IDs.'));var o=r.split("-"),i=function(t){if(Array.isArray(t))return t}(o)||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),!e||i.length!==e);s=!0);}catch(t){a=!0,n=t}finally{try{s||null==o.return||o.return()}finally{if(a)throw n}}return i}}(o,4)||function(t,e){if(t){if("string"==typeof t)return n(t,e);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,e)}}(o,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],p=i[3];u.hasDataset(this.client.clientConfig);var h=this.client.clientConfig,f=h.projectId,l=h.dataset,d=e?c(e):"";return"https://cdn.sanity.io/images/".concat(f,"/").concat(l,"/").concat(s,"-").concat(a,".").concat(p).concat(d)}}),t.exports=p},6586:function(t,e,r){"use strict";function n(t){this.client=t}r(6086)(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},9895:function(t,e,r){"use strict";var n=r(6086),o=r(2913),i=r(2947),s=r(1356),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,p=n({},r,t);p.apiVersion||s.printNoApiVersionSpecifiedWarning();var h=n({},a,p),f=h.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&&!h.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&&h.token&&!0!==h.ignoreBrowserTokenWarning?s.printBrowserTokenWarning():void 0===h.useCdn&&s.printCdnWarning(),f&&i.projectId(h.projectId),h.dataset&&i.dataset(h.dataset),"requestTagPrefix"in h&&(h.requestTagPrefix=h.requestTagPrefix?i.requestTag(h.requestTagPrefix).replace(/\.+$/,""):void 0),h.apiVersion="".concat(h.apiVersion).replace(/^v/,""),h.isDefaultApi=h.apiHost===a.apiHost,h.useCdn=!!h.useCdn&&!h.withCredentials,e.validateApiVersion(h.apiVersion);var v=h.apiHost.split("://",2),b=v[0],g=v[1],m=h.isDefaultApi?"apicdn.sanity.io":g;return h.useProjectHostname?(h.url="".concat(b,"://").concat(h.projectId,".").concat(g,"/v").concat(h.apiVersion),h.cdnUrl="".concat(b,"://").concat(h.projectId,".").concat(m,"/v").concat(h.apiVersion)):(h.url="".concat(h.apiHost,"/v").concat(h.apiVersion),h.cdnUrl=h.url),h},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`")}}},1078:function(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(6086),i=r(5092),s=i.map,a=i.filter,c=r(2947),u=r(7054),p=r(6102),h=r(485),f=r(5770),l=r(5420),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=(e.body.documents||[]).reduce(function(t,e){return t[e._id]=e,t},Object.create(null));return t.map(function(t){return r[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 h?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 h(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="query"===t,c=!o&&p(e),u=!o&&c.length<11264,h=r.returnFirst,f=r.timeout,l=r.token,b=r.tag,g=r.headers,m={method:u?"GET":"POST",uri:this.getDataUrl(t,u?c:""),json:!0,body:u?void 0:e,query:o&&d(r),timeout:f,headers:g,token:l,tag:b,canUseCdn:i};return this._requestObservable(m).pipe(a(y),s(v),s(function(t){if(!o)return t;var e=t.results||[];if(r.returnDocuments)return h?e[0]&&e[0].document:e.map(function(t){return t.document});var i=h?e[0]&&e[0].id:e.map(function(t){return t.id});return n({transactionId:t.transactionId,results:e},h?"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)}}},6102:function(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=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(a,e),p="query=".concat(r(n)),h=c?"?tag=".concat(r(c),"&").concat(p):"?".concat(p),f=Object.keys(i).reduce(function(t,e){return"".concat(t,"&").concat(r("$".concat(e)),"=").concat(r(JSON.stringify(i[e])))},h);return Object.keys(u).reduce(function(t,e){return a[e]?"".concat(t,"&").concat(r(e),"=").concat(r(a[e])):t},f)}},5420:function(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;e2&&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=p({query:t,params:e,options:c(g,h),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=p(),n=!1;function o(){!n&&(_&&t.next({type:"reconnect"}),n||r.readyState!==a.CLOSED||(u(),clearTimeout(e),e=setTimeout(h,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 p(){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 h(){r=p()}return function(){n=!0,u()}})}},5770:function(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(6086),i=r(7054),s=r(2947),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=o<0&&i>=0?"":i,a="".concat(t,"[").concat(o,":").concat(s,"]");return this.insert("replace",a,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},485:function(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(6086),i=r(2947),s=r(5770),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},8288:function(t,e,r){"use strict";var n=r(6086),o=r(2947);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},2913:function(t){"use strict";t.exports=function(t){return"https://docs.sanity.io/help/"+t}},1708:function(t){"use strict";t.exports=[]},2288:function(t,e,r){"use strict";var n=r(1432),o=r(6086);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},3202:function(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("&")):""}},7343:function(t,e,r){"use strict";var n=r(6258),o=r(6086),i=r(6890),s=r(2289),a=r(8362),c=r(5018),u=r(5092).Observable,p=r(2288),h=p.ClientError,f=p.ServerError,l=n(r(1708).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 h(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=h,d.ServerError=f,t.exports=d},3914:function(t,e,r){"use strict";var n=r(6086);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})}},9226:function(t,e,r){"use strict";function n(t){this.client=t}r(6086)(n.prototype,{list:function(){return this.client.request({uri:"/projects"})},getById:function(t){return this.client.request({uri:"/projects/".concat(t)})}}),t.exports=n},9729:function(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;e0&&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=p,E.Transaction=h,E.ClientError=g.ClientError,E.ServerError=g.ServerError,E.requester=g.defaultRequester,t.exports=E},1102:function(t,e,r){"use strict";function n(t){this.client=t}r(6086)(n.prototype,{getById:function(t){return this.client.request({uri:"/users/".concat(t)})}}),t.exports=n},9119:function(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},{})}},7054:function(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 ()\n* Array of document IDs\n* Object containing `query`"))}},5092:function(t,e,r){"use strict";var n=r(2837).Observable,o=r(7224).filter,i=r(8359).map;t.exports={Observable:n,filter:o,map:i}},7826:function(t){"use strict";t.exports=function(t){var e,r=!1;return function(){return r||(e=t.apply(void 0,arguments),r=!0),e}}},8201:function(t){"use strict";t.exports=function(t,e){return e.reduce(function(e,r){return void 0===t[r]||(e[r]=t[r]),e},{})}},2947:function(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}},1356:function(t,e,r){"use strict";var n=r(2913),o=r(7826),i=function(t){return o(function(){for(var e,r=arguments.length,n=Array(r),o=0;oa){var c=i.height,u=c*a,p=i.top,h=(s.right-s.left)/2+s.left-u/2;hi.left+i.width&&(h=i.left+i.width-u),r={left:Math.round(h),top:Math.round(p),width:Math.round(u),height:Math.round(c)}}else{var f=i.width,l=f/a,d=i.left,y=(s.bottom-s.top)/2+s.top-l/2;yi.top+i.height&&(y=i.top+i.height-l),r={left:Math.max(0,Math.floor(d)),top:Math.max(0,Math.floor(y)),width:Math.round(f),height:Math.round(l)}}return{width:n,height:o,rect:r}}({crop:p,hotspot:{left:l-f,top:d-h,right:l+f,bottom:d+h}},o))),function(t){var e=t.baseUrl||"https://cdn.sanity.io",n=t.asset.id+"-"+t.asset.width+"x"+t.asset.height+"."+t.asset.format,o=e+"/images/"+t.projectId+"/"+t.dataset+"/"+n,i=[];if(t.rect){var s=t.rect,a=s.left,c=s.top,u=s.width,p=s.height;(0!==a||0!==c||p!==t.asset.height||u!==t.asset.width)&&i.push("rect="+a+","+c+","+u+","+p)}t.bg&&i.push("bg="+t.bg),t.focalPoint&&(i.push("fp-x="+t.focalPoint.x),i.push("fp-y="+t.focalPoint.y));var h=[t.flipHorizontal&&"h",t.flipVertical&&"v"].filter(Boolean).join("");return(h&&i.push("flip="+h),r.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)?o:o+"?"+i.join("&")}(Object.assign({},o,{asset:a}))}(this.options)},s.prototype.toString=function(){return this.url()},function(t){if(t&&"object"==typeof t.clientConfig){var e=t.clientConfig,r=e.apiHost,n=e.projectId,o=e.dataset;return new s(null,{baseUrl:r.replace(/^https:\/\/api\./,"https://cdn."),projectId:n,dataset:o})}return new s(null,t)}}()},8541:function(t,e){var r,n,o;/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */!function(i){"use strict";var s=i.setTimeout,a=i.clearTimeout,c=i.XMLHttpRequest,u=i.XDomainRequest,p=i.ActiveXObject,h=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!=p&&(c=function(){return new p("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<=2048>>e&&t<=57344>>e&&t<=65536>>e&&t<>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;s191||!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))+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;n0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,p=[],h=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(h),s=i("processOptions",t);i("validateOptions",s);var a={options:s,channels:e,applyMiddleware:i},u=null,p=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(){p(),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&&h.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]&&h[e].push(t[e])}),p.push(t),f},f.clone=function(){return t(p)},e.forEach(f.use),f}},5734:function(t,e,r){"use strict";var n=r(6086),o=r(4564),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}},5139:function(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'))}},2289:function(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(6086),i=r(5299),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}}}},8362:function(t,e,r){"use strict";var n=r(6086);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)})}}}},6890:function(t,e,r){"use strict";var n=r(3366),o=r(6086);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()}})}}}},4393:function(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})}}}}}},5018:function(t,e,r){"use strict";t.exports=r(4393)},7288:function(t,e,r){"use strict";var n=r(7215),o=r(4947),i=r(6377),s="undefined"==typeof window?void 0:window,a=s?"xhr":"fetch",c="function"==typeof XMLHttpRequest?XMLHttpRequest:function(){},u="withCredentials"in new c,p="undefined"==typeof XDomainRequest?void 0:XDomainRequest,h=u?c:p;s||(c=i,h=i),t.exports=function(t,e){var r=t.options,i=t.applyMiddleware("finalizeOptions",r),u={},p=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=p?new h: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)}}}},6377:function(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},9825:function(t,e,r){"use strict";t.exports=r(7288)},3366:function(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={}},6604:function(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 * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */var n=r(7798);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")}},7798:function(t){"use strict";/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */t.exports=function(t){return null!=t&&"object"==typeof t&&!1===Array.isArray(t)}},1432:function(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},8749:function(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;e256||/^[a-z0-9]$/i.test(t)?t:"%"+e.toString(16).toUpperCase()}).join("")}catch(t){return e}}):p.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=[p.username,p.password].map(decodeURIComponent).filter(Boolean).join(":"),m.port=p.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=p,i.resolveObject=function(t,e){return b(p(t,e))},i.Url=h}(),t.exports=i}()},7334:function(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=0?(p=d.substr(0,y),h=d.substr(y+1)):(p=d,h=""),f=decodeURIComponent(p),l=decodeURIComponent(h),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=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=h(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),e=d(e),i=!(a=v(t||"",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||p.test(t))||!a.slashes&&(a.protocol||a.slashesCount<2||!y(this.protocol)))&&(m[3]=[/(.*)/,"pathname"]);O