0){var i=r.remaining;throw new Error("Unable to find matching route for state. Could not map the following state key".concat(1==i.length?"":"s"," to a valid url: ").concat(i.join(", ")))}if(0===r.nodes.length)throw new Error("Unable to resolve path from given state: ".concat(JSON.stringify(t)));var u=t,s=(0,n.default)(r.nodes.map(e=>(e.scope&&e.scope in u&&(u=u[e.scope]),e.route.segments.map(t=>{if("dir"===t.type)return t.name;var r=e.transform&&e.transform[t.name];return r?r.toPath(u[t.name]):u[t.name]})))).join("/");return(0,a.debug)("Resolved to /%s",s),"/".concat(s)};var n=i(r(31)),o=i(r(1632)),a=r(621);function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){var n=r(191),o=r(1634),a=r(156);e.exports=function(e,t,r){for(var i=-1,u=t.length,s={};++i=200&&(f=s,d=!1,t=new n(t));e:for(;++co?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n{this.setState({routerState:e.getState()})}))}componentWillUnmount(){this.unsubscribe&&this.unsubscribe()}render(){if(!this.context)throw new Error("WithRouter: missing context value");var t=this.context.__internalRouter,r=t?{state:this.state.routerState,navigate:t.navigate,navigateIntent:t.navigateIntent}:s;return n.default.createElement(e,i({},this.props,{router:r}))}},u(t,"displayName","withRouter(".concat(e.displayName||e.name,")")),u(t,"contextTypes",{__internalRouter:o.default}),r};var n=a(r(0)),o=a(r(259));function a(e){return e&&e.__esModule?e:{default:e}}function i(){return(i=Object.assign||function(e){for(var t=1;t{throw new Error("Cannot navigate to the state ".concat(JSON.stringify(e),". No router found in context"))},navigateIntent:e=>{throw new Error("Cannot navigate to the intent ".concat(e,". No router found in context"))}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(7)),o=a(r(0));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class u extends o.default.PureComponent{render(){return o.default.createElement("div",{className:"sanity-app-loading-screen"},o.default.createElement("style",{type:"text/css"},"\n.sanity-app-loading-screen {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;\n text-align: center;\n background-color: #F1F3F6;\n color: #1C2430;\n display: flex;\n width: 100vw;\n height: 100vh;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.sanity-app-loading-screen__inner {\n margin: auto;\n}\n\n.sanity-app-loading-screen__text {\n margin-top: 2rem;\n font-size: 13px;\n font-weight: 600;\n}\n\n.sanity-app-loading-screen__loader {\n display: block;\n animation: pulse var(--time) cubic-bezier(.11,0,.27,1) infinite;\n --time: 3s;\n}\n\n@keyframes pulse {\n from {\n transform: scale3d(0.75, 0.75, 0.75);\n }\n \n 50% {\n transform: scale3d(1, 1, 1);\n }\n \n to {\n transform: scale3d(0.75, 0.75, 0.75);\n }\n}\n"),o.default.createElement("div",{className:"sanity-app-loading-screen__inner"},o.default.createElement("div",{className:"sanity-app-loading-screen__loader"},o.default.createElement("svg",{width:"73",height:"95",viewBox:"0 0 73 95",fill:"none",xmlns:"http://www.w3.org/2000/svg",shapeRendering:"geometricPrecision"},o.default.createElement("style",null,"\n .fillShape {\n stroke-width: 40;\n stroke: #F03E2F;\n opacity: 0;\n }\n \n .fillShape--bottom {\n stroke-dasharray: 90;\n stroke-dashoffset: 85;\n animation: bottom var(--time) ease-in infinite;\n }\n \n .fillShape--middle {\n stroke-dasharray: 115;\n stroke-dashoffset: 110;\n animation: middle var(--time) linear infinite;\n }\n \n .fillShape--top {\n stroke-dasharray: 77;\n stroke-dashoffset: 72;\n animation: top var(--time) ease-out infinite;\n }\n \n @keyframes bottom {\n 0%,\n 85% {\n stroke-dashoffset: 265;\n opacity: 0;\n }\n 15%,\n 64% {\n stroke-dashoffset: 175;\n opacity: 0.5;\n }\n }\n @keyframes middle {\n 11%,\n 75% {\n stroke-dashoffset: 100;\n opacity: 0;\n }\n 15% {\n opacity: 1;\n }\n 25%,\n 63% {\n stroke-dashoffset: 225;\n opacity: 1;\n }\n }\n @keyframes top {\n 22%,\n 70% {\n opacity: 0;\n stroke-dashoffset: 226;\n }\n 25% {\n opacity: 0.5;\n }\n 35%,\n 54% {\n stroke-dashoffset: 149;\n opacity: 0.5;\n }\n }\n"),o.default.createElement("mask",{id:"bottom","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"0",y:"62",width:"67",height:"33"},o.default.createElement("path",{d:"M56.4905 62.9807C63.6434 67.5637 66.7972 73.9744 66.7972 83.168C60.7987 90.7262 50.4577 95 38.2203 95C17.6963 95 3.17759 84.8102 0.0100098 67.282H19.7851C22.3343 75.3761 29.0748 79.1209 38.0622 79.1209C49.056 79.1209 56.3462 73.2598 56.4905 62.9807",fill:"white"})),o.default.createElement("g",{mask:"url(#bottom)"},o.default.createElement("path",{className:"fillShape fillShape--bottom",d:"M8 59C9.35605 77.6466 25.4128 87.4032 37.5 87.5C54 87.6322 62 75 71.5 66.5"})),o.default.createElement("mask",{id:"middle","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"12",width:"71",height:"72"},o.default.createElement("path",{d:"M7.73317 12.1206C7.73317 24.8871 15.6418 32.5484 31.4729 36.568L48.2521 40.4571C63.238 43.8926 72.3834 52.4472 72.3834 66.3818C72.493 72.4436 70.5187 78.3594 66.7904 83.1404C66.7904 69.2402 59.5963 61.7232 42.2605 57.2157L25.7698 53.471C12.5842 50.4683 2.40806 43.4323 2.40806 28.2952C2.33733 22.4523 4.21324 16.7521 7.74004 12.0931",fill:"white"})),o.default.createElement("g",{mask:"url(#middle)"},o.default.createElement("path",{className:"fillShape fillShape--middle",d:"M-15.5 8.5C-15.5 12 -1 41.7047 38.3457 48C65.7344 52.3822 69 68 62.8457 74.5C56.6914 81 54.5 82 54.5 82"})),o.default.createElement("mask",{id:"top","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"7",y:"0",width:"65",height:"32"},o.default.createElement("path",{d:"M18.0122 31.1124C11.1411 26.7149 7.70557 20.524 7.70557 12.1138C13.4636 4.59677 23.3648 0 35.5198 0C56.4973 0 68.6317 11.09 71.6275 26.6737H52.5945C50.4988 20.5309 45.2562 15.7348 35.6641 15.7348C25.4399 15.7348 18.4863 21.6852 18.0122 31.1124",fill:"white"})),o.default.createElement("g",{mask:"url(#top)"},o.default.createElement("path",{className:"fillShape fillShape--top",d:"M9 35C9 21 19 5.49993 40 8.49996C61 11.5 65.3456 29 65.3456 33.5"})))),o.default.createElement("div",{className:"sanity-app-loading-screen__text"},this.props.text)))}}t.default=u,i(u,"propTypes",{text:n.default.string}),i(u,"defaultProps",{text:"Loading Content Studio"})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.navigate=d,t.state=void 0;var n=l(r(1682)),o=r(5),a=l(r(639)),i=l(r(2920)),u=r(148),s=l(r(950));function l(e){return e&&e.__esModule?e:{default:e}}function c(e){if(!u.HAS_SPACES||!e||e.space)return e;var t=u.CONFIGURED_SPACES.find(e=>e.default)||u.CONFIGURED_SPACES[0];return Object.assign({},e,{space:t.name})}function f(e){var t=function(e){var t=(0,a.default)()[0];return e&&!e.tool&&t?Object.assign({},e,{tool:t.name}):e}(function(e){return e&&(0,a.default)().find(t=>t.name===e.space)?Object.assign({},e,{tool:e.space,space:void 0}):e}(e));return u.HAS_SPACES?c(t):t}function d(e,t){n.default.actions.navigate(e,t)}var p=n.default.state.pipe((0,o.map)((function(e){return{type:e.type,state:s.default.decode(location.pathname),isNotFound:s.default.isNotFound(location.pathname)}})),(0,o.scan)((function(e,t){if(t&&t.state&&t.state.intent){var r=function(e,t){var r=t.intent,n=t.params,o=t.payload,i=(0,a.default)(),u=e.tool?i.find(t=>t.name===e.tool):null,s=(u?[u,...i]:i).find(t=>t&&"function"==typeof t.canHandleIntent&&t.canHandleIntent(r,n,e[t.name]));if(s){var l=s.getIntentState(r,n,e[s.name],o),f=c(e)||e;return Object.assign({},f,{tool:s.name,[s.name]:l})}return{isNotFound:!0,intent:{name:r,params:n}}}(e?e.state:{},t.state);if(r){var n=s.default.encode(r);return setTimeout(()=>d(n,{replace:!0}),0),null}}return t}),null),(0,o.filter)(Boolean),(0,o.map)((function(e){var t=f(e.state);return t!==e.state?(d(s.default.encode(t),{replace:!0}),null):e})),(0,o.filter)(Boolean),(0,o.publishReplay)(1),(0,o.refCount)());t.state=p,u.HAS_SPACES&&p.pipe((0,o.map)(e=>e.state),(0,o.filter)(Boolean),(0,o.tap)(i.default)).subscribe()},function(e,t,r){"use strict";t.decode=t.parse=r(1688),t.encode=t.stringify=r(1689)},function(e,t,r){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t{var n=r.title||"";if(!r.name)return console.warn('Tool "'.concat(n,'" does not have the required "name"-property')),e;if(e[r.name]){var o=e[r.name].tool.title;return console.warn('Tools with duplicate name "'.concat(r.name,'" found ("').concat(n,'" and "').concat(o,'")')),e}var a=t.indexOf(r.name);return e[r.name]={tool:r,index:-1===a?1/0:a},e},{});return o.default.filter(e=>-1===r.indexOf(e.name)).sort((e,t)=>{var r=a[e.name],n=a[t.name],o=r?r.index:1/0,i=n?n.index:1/0;return o===i?0:o-i})};var n=a(r(1696)),o=a(r(376));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";var n;t.a=function(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(o)};var o=new Uint8Array(16)},function(e,t,r){"use strict";var n=r(261),o=r(642);t.a=function(e,t,r){function a(e,a,i,u){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1710),o=r(644);function a(e,t){var r;"string"==typeof e?r=(t||(0,o.getDefaultSchema)()).get(e):r=e;return new n.TemplateBuilder({id:r.name,schemaType:r.name,title:r.title||r.name,icon:r.icon,value:r.initialValue||{_type:r.name}})}var i={template:e=>new n.TemplateBuilder(e),defaults:function(e){var t=e||(0,o.getDefaultSchema)();if(!t)throw new Error("Unable to automatically resolve schema. Pass schema explicitly: `defaults(schema)`");return t.getTypeNames().filter(e=>!/^sanity\./.test(e)).filter(e=>function(e,t){var r=t.get(e);return r.type&&"document"===r.type.name}(e,t)).map(e=>a(t.get(e),t))},defaultTemplateForType:a};t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultSchema=void 0;var n,o=(n=r(1711))&&n.__esModule?n:{default:n};t.getDefaultSchema=()=>(0,o.default)(r(22))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o.default}});var n,o=(n=r(1713))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";e.exports=function(e){return null==e?[]:Array.isArray(e)?e:[e]}},function(e,t,r){var n=r(1730),o=r(1731),a=r(82),i=r(1732);e.exports=function(e,t,r){return e=a(e),void 0===(t=r?void 0:t)?o(e)?i(e):n(e):e.match(t)||[]}},function(e,t,r){var n=r(633);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},function(e,t,r){var n=r(1734),o=r(263),a=r(1735);e.exports=function(e){return o(e)?a(e):n(e)}},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectType=void 0;var n=d(r(73)),o=d(r(162)),a=d(r(652)),i=d(r(1744)),u=d(r(21)),s=d(r(197)),l=d(r(1745)),c=d(r(1746)),f=r(129);function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t({name:"object",type:null,jsonType:"object"}),extend(e,t){var r=m({fields:[]},e),d=m({},r.options||{}),h=Object.assign((0,u.default)(this.get(),y),r,{type:this.get(),title:r.title||(r.name?(0,o.default)(r.name):""),options:d,orderings:r.orderings||(0,l.default)(r),fields:r.fields.map(e=>{var r=e.name,n=e.fieldset,a=p(e,["name","fieldset"]),i={name:r,fieldset:n};return(0,f.lazyGetter)(i,"type",()=>t(m(m({},a),{},{title:e.title||(0,o.default)(r)})))})});return(0,f.lazyGetter)(h,"fieldsets",()=>{return e=r,t=h.fields,n=(e.fieldsets||[]).map(e=>({name:e.name,title:e.title,description:e.description,options:e.options,fields:[]})),o=(0,a.default)(n,"name"),t.map(t=>{if(t.fieldset){var r=o[t.fieldset];if(!r)throw new Error("Group '".concat(t.fieldset,"' is not defined in schema for type '").concat(e.name,"'"));return r.fields.push(t),1===r.fields.length?r:null}return{single:!0,field:t}}).filter(Boolean);var e,t,n,o}),(0,f.lazyGetter)(h,"preview",(0,s.default)(r)),(0,f.lazyGetter)(h,"__experimental_search",()=>{var e=r.__experimental_search?(e=>{if(!Array.isArray(e))throw new Error("The search config of a document type must be an array of search config objects");return e.map(e=>{if("defaults"===e)return e;if(!(0,n.default)(e))throw new Error("Search config must be an object of {path: string, weight: number}");if("string"!=typeof e.path)throw new Error("The path property of the search field declaration must be a string");return{weight:"weight"in e?e.weight:1,path:(0,i.default)(e.path)}})})(r.__experimental_search):null;return e?e.map(e=>"defaults"===e?(0,c.default)(r):e):(0,c.default)(h)},{enumerable:!1}),function e(t){return{get:()=>t,extend:n=>{if(n.fields)throw new Error('Cannot override `fields` of subtypes of "object"');var a=Object.assign({},t,(0,u.default)(n,y),{title:n.title||r.title||(r.name?(0,o.default)(r.name):""),type:t});return(0,f.lazyGetter)(a,"__experimental_search",()=>t.__experimental_search),e(a)}}}(h)}};t.ObjectType=b},function(e,t,r){var n=r(257),o=r(345)((function(e,t,r){n(e,r,t)}));e.exports=o},function(e,t,r){"use strict";var n=[],o=[];e.exports=function(e,t){if(e===t)return 0;var r=e;e.length>t.length&&(e=t,t=r);var a=e.length,i=t.length;if(0===a)return i;if(0===i)return a;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-i);)a--,i--;if(0===a)return i;for(var u,s,l,c,f=0;fs?c>s?s+1:c:c>l?l+1:c;return s}},function(e,t,r){"use strict";e.exports={Rule:r(655),validateDocument:r(667),inferFromSchema:r(1802),inferFromSchemaType:r(668)}},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(1773),a=r(1781),i=r(657),u=["Object","String","Number","Boolean","Array","Date"],s=["type","uri","email"];class l{constructor(e){this.FIELD_REF=l.FIELD_REF,this._typeDef=e,this.reset()}valueOfField(){return l.valueOfField(...arguments)}error(e){var t=this.clone();return t._level="error",t._message=e||null,t}warning(e){var t=this.clone();return t._level="warning",t._message=e||null,t}reset(){return this._type=this._type||null,this._rules=(this._rules||[]).filter(e=>"type"===e.flag),this._message=null,this._required=void 0,this._level="error",this._fieldRules=void 0,this}isRequired(){return!0===this._required}clone(){var e=new l;return e._type=this._type,e._message=this._message,e._required=this._required,e._rules=o(this._rules),e._level=this._level,e._fieldRules=this._fieldRules,e._typeDef=this._typeDef,e}cloneWithRules(e){var t=this.clone(),r=new Set;return e.forEach(e=>{"type"===e.flag&&(t._type=e.constraint),r.add(e.flag)}),t._rules=t._rules.filter(e=>{var t=s.includes(e.flag),n=r.has(e.flag);return!(t&&n)}).concat(e),t}merge(e){if(this._type&&e._type&&this._type!==e._type)throw new Error("merge() failed: conflicting types");var t,r,n,o=this.cloneWithRules(e._rules);return o._type=this._type||e._type,o._message=this._message||e._message,o._required=(r=e,(n=(t=this)._required||r._required)||(n=!1!==t._required&&!1!==r._required&&void 0),n),o._level="error"===this._level?e._level:this._level,o}validate(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,e,t)}type(e){var t="".concat(e.slice(0,1).toUpperCase()).concat(e.slice(1));if(!u.includes(t))throw new Error('Unknown type "'.concat(e,'"'));var r=this.cloneWithRules([{flag:"type",constraint:t}]);return r._type=t,r}all(e){return this.cloneWithRules([{flag:"all",constraint:e}])}either(e){return this.cloneWithRules([{flag:"either",constraint:e}])}optional(){var e=this.cloneWithRules([{flag:"presence",constraint:"optional"}]);return e._required=!1,e}required(){var e=this.cloneWithRules([{flag:"presence",constraint:"required"}]);return e._required=!0,e}custom(e){return this.cloneWithRules([{flag:"custom",constraint:e}])}min(e){return this.cloneWithRules([{flag:"min",constraint:e}])}max(e){return this.cloneWithRules([{flag:"max",constraint:e}])}length(e){return this.cloneWithRules([{flag:"length",constraint:e}])}valid(e){var t=Array.isArray(e)?e:[e];return this.cloneWithRules([{flag:"valid",constraint:t}])}integer(){return this.cloneWithRules([{flag:"integer"}])}precision(e){return this.cloneWithRules([{flag:"precision",constraint:e}])}positive(){return this.cloneWithRules([{flag:"min",constraint:0}])}negative(){return this.cloneWithRules([{flag:"lessThan",constraint:0}])}greaterThan(e){return this.cloneWithRules([{flag:"greaterThan",constraint:e}])}lessThan(e){return this.cloneWithRules([{flag:"lessThan",constraint:e}])}uppercase(){return this.cloneWithRules([{flag:"stringCasing",constraint:"uppercase"}])}lowercase(){return this.cloneWithRules([{flag:"stringCasing",constraint:"lowercase"}])}regex(e,t,r){var n=r||{name:t};!r&&t&&(t.name||t.invert)&&(n=t);var o=Object.assign({},n,{pattern:e});return this.cloneWithRules([{flag:"regex",constraint:o}])}email(e){return this.cloneWithRules([{flag:"email",constraint:e}])}uri(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({scheme:["http","https"],allowRelative:!1,relativeOnly:!1},e),r=Array.isArray(t.scheme)?t.scheme:[t.scheme];if(t.scheme=r.map(e=>{var t="string"==typeof e;if(!(e instanceof RegExp)&&!1===t)throw new Error("scheme must be a RegExp or a String");return t?new RegExp("^".concat(a(e),"$")):e}),!t.scheme.length)throw new Error("scheme must have at least 1 scheme specified");return this.cloneWithRules([{flag:"uri",constraint:{options:t}}])}unique(e){return this.cloneWithRules([{flag:"unique",constraint:e}])}reference(){return this.cloneWithRules([{flag:"reference"}])}block(e){return this.cloneWithRules([{flag:"block",constraint:e}])}fields(e){if("Object"!==this._type)throw new Error("fields() can only be called on an object type");var t=this.cloneWithRules([]);return t._fieldRules=e,t}assetRequired(){var e=function e(t){return t&&t.type?e(t.type):t}(this._typeDef),t="Asset";return e&&["image","file"].includes(e.name)&&(t="image"===e.name?"Image":"File"),this.cloneWithRules([{flag:"assetRequired",constraint:{assetType:t}}])}}n(l,"FIELD_REF",Symbol("FIELD_REF")),n(l,"array",e=>new l(e).type("Array")),n(l,"object",e=>new l(e).type("Object")),n(l,"string",e=>new l(e).type("String")),n(l,"number",e=>new l(e).type("Number")),n(l,"boolean",e=>new l(e).type("Boolean")),n(l,"dateTime",e=>new l(e).type("Date")),n(l,"valueOfField",e=>({type:l.FIELD_REF,path:e})),e.exports=l},function(e,t,r){"use strict";
+/*!
+ * is-extendable
+ *
+ * Copyright (c) 2015, Jon Schlinkert.
+ * Licensed under the MIT License.
+ */e.exports=function(e){return null!=e&&("object"==typeof e||"function"==typeof e)}},function(e,t,r){"use strict";var n=r(34),o=n.get,a=n.flatten,i=r(75),u=r(130),s={Boolean:r(1783),Number:r(1784),String:r(1785),Array:r(1786),Object:r(1787),Date:r(1788)};e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e._rules,l=null==t;if(void 0===e._required&&l)n=n.filter(e=>"custom"===e.flag);else if(!e._required&&l)return Promise.resolve([]);var c=e._type,f=s[c]||u,d=n.map(p);return Promise.all(d).then(e=>e.filter(Boolean)).then(a);function p(n){if(void 0===n.flag)return Promise.reject(new Error('Invalid rule, did not contain "flag"-property'));var a=f[n.flag];if(!a){var i=c?'type "'.concat(c,'"'):"rule without declared type";return Promise.reject(new Error('Validator for flag "'.concat(n.flag,'" not found for ').concat(i)))}var u=n.constraint;if(u&&u.type===e.FIELD_REF){if(!r.parent)return Promise.reject(new Error("Field reference provided, but no parent received"));u=o(r.parent,u.path)}var s=a(u,t,e._message,r);return Promise.resolve(s).then(h)}function h(t){if(Array.isArray(t))return a(t.map(h));if(!(t instanceof i))return null;var r=[];return 0===t.paths.length&&r.push({level:e._level,item:t}),r.concat(t.paths.map(r=>({path:r,level:e._level,item:t})))}}},function(e,t,r){var n;n=function(){var e,t,r,n=(e=[Object,Function,Array,String,Boolean,Number,Date,RegExp,Error],t=e.length,function(r){for(var n=0;n{if(Array.isArray(e))return 0===e.length||e;if(!0===e)return!0;if("string"==typeof e)return new n(t||e);if(e&&e.message&&e.paths)return new n(t||e.message,{paths:e.paths});var a=o(r.path);throw new Error("".concat(a,": Validator must return 'true' if valid or an error message as a string on errors"))}},function(e,t,r){"use strict";var n=r(164),o={y:function(e,t){var r=e.getUTCFullYear(),o=r>0?r:1-r;return Object(n.a)("yy"===t?o%100:o,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):Object(n.a)(r+1,2)},d:function(e,t){return Object(n.a)(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return r.toUpperCase();case"aaaaa":return r[0];case"aaaa":default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return Object(n.a)(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Object(n.a)(e.getUTCHours(),t.length)},m:function(e,t){return Object(n.a)(e.getUTCMinutes(),t.length)},s:function(e,t){return Object(n.a)(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,o=e.getUTCMilliseconds(),a=Math.floor(o*Math.pow(10,r-3));return Object(n.a)(a,t.length)}};t.a=o},function(e,t,r){"use strict";t.a=function(e){Object(i.a)(1,arguments);var t=Object(n.a)(e),r=Object(o.a)(t).getTime()-Object(a.a)(t).getTime();return Math.round(r/6048e5)+1};var n=r(2),o=r(267),a=r(1800),i=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(a.a)(1,arguments);var t=Object(n.a)(e),r=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(r+1,0,4),i.setUTCHours(0,0,0,0);var u=Object(o.a)(i),s=new Date(0);s.setUTCFullYear(r,0,4),s.setUTCHours(0,0,0,0);var l=Object(o.a)(s);return t.getTime()>=u.getTime()?r+1:t.getTime()>=l.getTime()?r:r-1};var n=r(2),o=r(267),a=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(i.a)(1,arguments);var r=Object(n.a)(e),u=Object(o.a)(r,t).getTime()-Object(a.a)(r,t).getTime();return Math.round(u/6048e5)+1};var n=r(2),o=r(268),a=r(1801),i=r(1)},function(e,t,r){"use strict";function n(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function o(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var a={p:o,P:function(e,t){var r,a=e.match(/(P+)(p+)?/),i=a[1],u=a[2];if(!u)return n(e,t);switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",n(i,t)).replace("{{time}}",o(u,t))}};t.a=a},function(e,t,r){"use strict";t.a=function(e){return-1!==n.indexOf(e)},t.b=function(e){return-1!==o.indexOf(e)},t.c=function(e,t,r){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://git.io/fxCyr"))};var n=["D","DD"],o=["YY","YYYY"]},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t{var i=o&&o._key?{_key:o._key}:a,u=function(e,t){var r=null==e||!e._type&&s.string(e).toLowerCase();if(r&&"object"!==r)return t.find(e=>e.jsonType===r);return t.find(t=>t.type.name===e._type)||t.find(t=>t.name===e._type)||t.find(e=>"object"===e.name&&"object"===r)}(o,t.of),l=d(r,[i]);return f(o,u,l,{parent:e,document:n.document,path:l})});return Promise.all([...o,...a]).then(l)}(e,t,r,n):"object"==typeof e?function(e,t,r,n){if(!t)return[];var o=[];t.validation&&(o=t.validation.map(function(){var o=u((function*(o){return p(yield o.validate(e,{parent:n.parent,document:n.document,path:r,type:t}),r)}));return function(e){return o.apply(this,arguments)}}()));var a=(t.fields||[]).map(t=>{if(!(t.type&&t.type.validation))return[];var o=d(r,t.name);return f(e[t.name],t.type,o,{parent:e,document:n.document,path:o,type:t.type})});return Promise.all([...o,...a]).then(l)}(e,t,r,n):function(e,t,r,n){if(!t)return[{type:"validation",level:"error",path:r,item:new c("Unable to resolve type for item")}];if(!t.validation)return[];var o=t.validation.map(t=>{var o,a;return t.validate(e,{parent:n.parent,document:n.document,path:r,type:{name:null===(o=n.type)||void 0===o?void 0:o.name,options:null===(a=n.type)||void 0===a?void 0:a.options}}).then(e=>p(e,r))});return Promise.all(o).then(l)}(e,t,r,n)}function d(e,t){return e.concat(t)}function p(e,t){return e.map(e=>{var r=void 0===e.path?t:t.concat(e.path);return o(o({type:"validation"},e),{},{path:r})})}e.exports=function(){var e=u((function*(e,t){var r=t.get(e._type);if(!r)return console.warn('Schema type for object type "%s" not found, skipping validation',e._type),[];try{return yield f(e,r,[],{document:e})}catch(e){return console.error(e),[{type:"validation",level:"error",path:[],item:new c(e.message)}]}}));return function(t,r){return e.apply(this,arguments)}}(),e.exports.validateItem=f},function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:new Set;if(r.has(e))return e;if(r.add(e),!1===e.validation)return e.validation=[],e;var n=Array.isArray(e.validation)&&e.validation.every(e=>"function"==typeof e.validate);if(n)return c(e,t,r),f(e,t,r),e;var o=e.type,a=i[e.jsonType],h=a?a(e):new i(e);return o&&"datetime"===o.name&&(h=h.type("Date")),o&&"date"===o.name&&(h=h.type("Date")),o&&"url"===o.name&&(h=h.uri()),o&&"slug"===o.name&&(h=h.custom(u)),o&&"reference"===o.name&&(h=h.reference()),o&&"email"===o.name&&(h=h.email()),o&&"block"===o.name&&(h=h.block(s)),e.annotations&&e.annotations.forEach(e=>l(e)),e.options&&e.options.list&&Array.isArray(e.options.list)&&(h=h.valid(e.options.list.map(t=>d(t,e)))),e.validation=p(e,h),c(e,t,r),f(e,t,r),e}function c(e,t,r){if("object"===e.jsonType&&e.fields){var n=e.validation.map(e=>e._fieldRules).filter(Boolean).reduce((e,t)=>({fields:o(o({},e.fields),t),hasRules:!0}),{fields:{},hasRules:!1});e.fields.forEach(e=>{e.type.validation=n.fields[e.name]||e.type.validation,l(e.type,t,r)})}}function f(e,t,r){e.of&&"array"===e.jsonType&&e.of.forEach(e=>l(e,t,r))}function d(e,t){return"object"===t.jsonType&&function e(t){for(;!t.fields&&t.type;)return e(t.type);if(!Array.isArray(t.fields))return!1;if(t.fields.some(e=>"value"===e.name))return!0;return!1}(t)||void 0===e.value?e:e.value}function p(e,t){if(!e.validation)return[t];var r="function"==typeof e.validation?e.validation(t):e.validation;return Array.isArray(r)?r:[r]}e.exports=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createScope",{enumerable:!0,get:function(){return n.createScope}}),t.useReportedValues=t.useReporter=t.Tracker=void 0;var n=r(1848),o=(0,n.createScope)(),a=o.Tracker,i=o.useReporter,u=o.useReportedValues;t.useReportedValues=u,t.useReporter=i,t.Tracker=a},function(e,t,r){var n=r(37),o=r(123),a=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(n(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var r=u.test(e);return r||s.test(e)?l(e.slice(2),r?2:8):i.test(e)?NaN:+e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTooltip=function(){return(0,n.useContext)(o.TooltipContext)};var n=r(0),o=r(673)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TooltipContext=void 0;var n=(0,r(0).createContext)({boundaryElement:null});t.TooltipContext=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={};t.default=void 0;var o,a=(o=r(557))&&o.__esModule?o:{default:o},i=r(581);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var u=(0,a.default)();t.default=u},function(e,t,r){var n=r(83),o=r(191),a=r(96),i=r(1865),u=r(1866),s=r(120),l=r(1867),c=r(125),f=r(30);e.exports=function(e,t,r){t=t.length?n(t,(function(e){return f(e)?function(t){return o(t,1===e.length?e[0]:e)}:e})):[c];var d=-1;t=n(t,s(a));var p=i(e,(function(e,r,o){return{criteria:n(t,(function(t){return t(e)})),index:++d,value:e}}));return u(p,(function(e,t){return l(e,t,r)}))}},function(e,t,r){var n=r(248),o=r(121),a=r(244),i=r(37);e.exports=function(e,t,r){if(!i(r))return!1;var u=typeof t;return!!("number"==u?o(r)&&a(t,r.length):"string"==u&&t in r)&&n(r[t],e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldPresenceInner=_,t.FieldPresence=void 0;var n=v(r(264)),o=v(r(169)),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(0)),i=r(203),u=r(393),s=r(271),l=r(2079),c=v(r(2080)),f=r(52),d=r(389),p=r(2081),h=r(390);function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?a.default.createElement(_,{presence:n,maxAvatars:i}):null}:function(e){var t=(0,a.useContext)(d.FormFieldPresenceContext),r=e.presence,n=void 0===r?t:r,o=e.maxAvatars,i=void 0===o?s.DEFAULT_MAX_AVATARS_FIELDS:o,u=a.default.useRef(null);(0,h.useReporter)((0,f.useId)()||"",()=>({presence:n,element:u.current,maxAvatars:i}));var l=-s.AVATAR_DISTANCE+(s.AVATAR_SIZE+s.AVATAR_DISTANCE)*e.maxAvatars;return a.default.createElement("div",{ref:u,className:c.default.root,style:{minWidth:l,minHeight:s.AVATAR_SIZE}})};function O(e){return-s.AVATAR_DISTANCE+(s.AVATAR_SIZE+s.AVATAR_DISTANCE)*e}function _(e){var t=e.presence,r=e.position,f=void 0===r?"inside":r,d=e.animateArrowFrom,h=void 0===d?"inside":d,m=e.maxAvatars,v=void 0===m?s.DEFAULT_MAX_AVATARS_FIELDS:m,b=e.stack,g=void 0===b||b,_=(0,n.default)(t||[],e=>e.user.id),w=(0,o.default)(_,e=>e.lastActiveAt),j=y(g?(0,l.splitRight)(w,v):[[],w],2),E=j[0],S=[...j[1].reverse().map(e=>({key:e.user.id,element:a.default.createElement(u.UserAvatar,{animateArrowFrom:h,position:f,status:"online",user:e.user})})),E.length>=2?{key:"counter",element:a.default.createElement(i.AvatarCounter,{count:E.length})}:null].filter(Boolean),x=O(v),P=Math.min(O(_.length),x);return a.default.createElement("div",{className:c.default.root,style:{width:x}},a.default.createElement("div",null),a.default.createElement(p.PresenceTooltip,{items:_,placement:"top"},a.default.createElement("div",{className:c.default.inner,style:{width:P}},S.map((e,t)=>e&&a.default.createElement("div",{key:e.key,style:{position:"absolute",transform:"translate3d(".concat(-t*(s.AVATAR_SIZE+s.AVATAR_DISTANCE),"px, 0px, 0px)"),transitionProperty:"transform",transitionDuration:"200ms",transitionTimingFunction:"cubic-bezier(0.85, 0, 0.15, 1)",zIndex:100-t}},e.element)))))}t.FieldPresence=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvatarCounter=function(e){var t=e.count,r=e.size,a=void 0===r?"small":r,i=e.tone;return n.default.createElement("div",{className:o.default.root,"data-size":a,"data-tone":i},n.default.createElement("span",null,t))};var n=a(r(0)),o=a(r(1872));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useDocumentPresence",{enumerable:!0,get:function(){return n.useDocumentPresence}}),Object.defineProperty(t,"useGlobalPresence",{enumerable:!0,get:function(){return n.useGlobalPresence}}),Object.defineProperty(t,"useUser",{enumerable:!0,get:function(){return o.useUser}}),Object.defineProperty(t,"useUserColor",{enumerable:!0,get:function(){return a.useUserColor}}),Object.defineProperty(t,"useTimeAgo",{enumerable:!0,get:function(){return i.useTimeAgo}}),Object.defineProperty(t,"useDocumentValues",{enumerable:!0,get:function(){return u.useDocumentValues}});var n=r(1876),o=r(1894),a=r(685),i=r(1900),u=r(2025)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"nanoid",(function(){return u})),r.d(t,"customAlphabet",(function(){return i})),r.d(t,"customRandom",(function(){return a})),r.d(t,"random",(function(){return o}));var n=r(1878);r.d(t,"urlAlphabet",(function(){return n.a}));let o=e=>crypto.getRandomValues(new Uint8Array(e)),a=(e,t,r)=>{let n=(2<{let a="";for(;;){let i=r(o),u=o;for(;u--;)if(a+=e[i[u]&n]||"",a.length===t)return a}}},i=(e,t)=>a(e,t,o),u=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let n=63&r[e];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bifur=void 0;var n,o=(n=r(13))&&n.__esModule?n:{default:n};var a=(0,r(1879).fromSanityClient)(o.default);t.bifur=a},function(e,t,r){var n=r(1889);e.exports=function(e){var t=e.length;return t?e[n(0,t-1)]:void 0}},function(e,t,r){var n=r(1891),o=r(94);e.exports=function(e){return null==e?[]:n(e,o(e))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLoadable=function(e,t){var r=n.useRef(),o=(s=n.useState(()=>{var n=!0,o=void 0===t?{isLoading:!0,value:void 0,error:void 0}:{isLoading:!1,value:t,error:void 0};return r.current=e.subscribe(e=>{var t={isLoading:!1,value:e,error:void 0};n?o=t:u(t)},e=>{u({isLoading:!1,error:e,value:void 0})}),n=!1,o}),l=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}}(s,l)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(s,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],u=o[1];var s,l;return n.useEffect(()=>()=>{r.current&&r.current.unsubscribe()},[]),i};var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r(0));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r(e[t]=0,e),{}),p=new Map;null!=e&&e.userStore&&e.userStore.currentUser.pipe((0,o.filter)(e=>"snapshot"===e.type)).subscribe(e=>{return t=e.user?e.user.id:null,s=t,void(d[a]+=t?1:-1);var t});return{get:function(e){if(!e)return r;return t[h(e)]},listen:function(e){var t=c.get(e);if(t)return t;var r=h(e);return t=v(e,r),c.set(e,t),t}};function h(e){if(e===s)return a;var t=p.get(e);if(t)return t;var r=f.get(e);if(r&&(0===d[r]||!Boolean(l.find(e=>0===d[e]))))return m(e,r);var n,o,i,u=function(e){for(var t=0,r=0;r{var t=d[e];t===o?i.push(e):t{var o=t[r];return n.next(o),()=>{c.delete(e),function(e,t){p.delete(e),d[t]--}(e,r)}}).pipe((0,o.shareReplay)({refCount:!0}))}};var n=r(4),o=r(5),a=r(689),i=a.COLOR_HUES.filter(e=>"green"!==e&&"red"!==e&&"gray"!==e).reduce((e,t)=>(e[t]={background:a.color[t][100].hex,border:a.color[t][300].hex,text:a.color[t][700].hex,tints:a.color[t]},e),{}),u={background:a.color.gray[100].hex,border:a.color.gray[300].hex,text:a.color.gray[700].hex,tints:a.color.gray}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1896),o=r(1897),a=r(1898);r.d(t,"COLOR_HUES",(function(){return a.a})),r.d(t,"COLOR_TINTS",(function(){return a.b}));var i=r(1899);r.n(i);for(var u in i)["color","COLOR_HUES","COLOR_TINTS","default"].indexOf(u)<0&&function(e){r.d(t,e,(function(){return i[e]}))}(u);const s=Object.assign(Object.assign({},n),{black:{title:"Black",hex:o.a},white:{title:"White",hex:o.b}});t.color=s},function(e,t,r){"use strict";t.a=function(e,t){Object(i.a)(2,arguments);var r=Object(o.a)(e),l=Object(n.a)(r),c=Object(a.a)(t);if(isNaN(c))return new Date(NaN);var f=r.getHours(),d=c<0?-1:1,p=Object(a.a)(c/5);r.setDate(r.getDate()+7*p);var h=Math.abs(c%5);for(;h>0;)r.setDate(r.getDate()+d),Object(n.a)(r)||(h-=1);l&&Object(n.a)(r)&&0!==c&&(Object(s.a)(r)&&r.setDate(r.getDate()+(d<0?2:-1)),Object(u.a)(r)&&r.setDate(r.getDate()+(d<0?1:-2)));return r.setHours(f),r};var n=r(272),o=r(2),a=r(8),i=r(1),u=r(395),s=r(691)},function(e,t,r){"use strict";t.a=function(e){return Object(o.a)(1,arguments),6===Object(n.a)(e).getDay()};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(i.a)(2,arguments);var r=Object(n.a)(t);return Object(a.a)(e,Object(o.a)(e)+r)};var n=r(8),o=r(170),a=r(693),i=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(u.a)(2,arguments);var r=Object(o.a)(e),s=Object(n.a)(t),l=Object(i.a)(r,Object(a.a)(r)),c=new Date(0);return c.setFullYear(s,0,4),c.setHours(0,0,0,0),(r=Object(a.a)(c)).setDate(r.getDate()+l),r};var n=r(8),o=r(2),a=r(205),i=r(133),u=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(a.a)(2,arguments);var r=Object(n.a)(t);return Object(o.a)(e,6e4*r)};var n=r(8),o=r(201),a=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(a.a)(2,arguments);var r=Object(n.a)(t);return Object(o.a)(e,1e3*r)};var n=r(8),o=r(201),a=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(a.a)(2,arguments);var r=Object(n.a)(t);return Object(o.a)(e,12*r)};var n=r(8),o=r(204),a=r(1)},function(e,t,r){"use strict";t.a=function(e,t){return Object(o.a)(2,arguments),Object(n.a)(e)-Object(n.a)(t)};var n=r(170),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(o.a)(2,arguments);var r=Object(n.a)(e),a=Object(n.a)(t),i=r.getFullYear()-a.getFullYear(),u=r.getMonth()-a.getMonth();return 12*i+u};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=Math.floor(t.getMonth()/3)+1;return r};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t,r){Object(a.a)(2,arguments);var i=Object(n.a)(e,r),u=Object(n.a)(t,r),s=i.getTime()-Object(o.a)(i),l=u.getTime()-Object(o.a)(u);return Math.round((s-l)/6048e5)};var n=r(101),o=r(84),a=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(o.a)(2,arguments);var r=Object(n.a)(e),a=Object(n.a)(t);return r.getFullYear()-a.getFullYear()};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(o.a)(2,arguments);var r=Object(n.a)(e,t)/36e5;return r>0?Math.floor(r):Math.ceil(r)};var n=r(275),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(a.a)(2,arguments);var r=Object(n.a)(t);return Object(o.a)(e,-r)};var n=r(8),o=r(692),a=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(o.a)(2,arguments);var r=Object(n.a)(e,t)/6e4;return r>0?Math.floor(r):Math.ceil(r)};var n=r(275),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(i.a)(2,arguments);var r=Object(n.a)(e),u=Object(n.a)(t),s=Object(a.a)(r,u),l=Math.abs(Object(o.a)(r,u));r.setFullYear("1584"),u.setFullYear("1584");var c=Object(a.a)(r,u)===-s,f=s*(l-c);return 0===f?0:f};var n=r(2),o=r(701),a=r(134),i=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(o.a)(1,arguments);var r=e||{},a=Object(n.a)(r.start),i=Object(n.a)(r.end),u=i.getTime();if(!(a.getTime()<=u))throw new RangeError("Invalid interval");var s=[],l=a;l.setHours(0,0,0,0);var c=t&&"step"in t?Number(t.step):1;if(c<1||isNaN(c))throw new RangeError("`options.step` must be a number greater than 1");for(;l.getTime()<=u;)s.push(Object(n.a)(l)),l.setDate(l.getDate()+c),l.setHours(0,0,0,0);return s};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(a.a)(1,arguments);var r=t||{},i=r.locale,u=i&&i.options&&i.options.weekStartsOn,s=null==u?0:Object(o.a)(u),l=null==r.weekStartsOn?s:Object(o.a)(r.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=Object(n.a)(e),f=c.getDay(),d=6+(f0?(h=Object(u.a)(t),m=Object(u.a)(e)):(h=Object(u.a)(e),m=Object(u.a)(t));var y,b=Object(a.a)(m,h),g=(Object(l.a)(m)-Object(l.a)(h))/1e3,O=Math.round((b-g)/60);if(O<2)return f.includeSeconds?b<5?d.formatDistance("lessThanXSeconds",5,v):b<10?d.formatDistance("lessThanXSeconds",10,v):b<20?d.formatDistance("lessThanXSeconds",20,v):b<40?d.formatDistance("halfAMinute",null,v):b<60?d.formatDistance("lessThanXMinutes",1,v):d.formatDistance("xMinutes",1,v):0===O?d.formatDistance("lessThanXMinutes",1,v):d.formatDistance("xMinutes",O,v);if(O<45)return d.formatDistance("xMinutes",O,v);if(O<90)return d.formatDistance("aboutXHours",1,v);if(O<1440){var _=Math.round(O/60);return d.formatDistance("aboutXHours",_,v)}if(O<2520)return d.formatDistance("xDays",1,v);if(O<43200){var w=Math.round(O/1440);return d.formatDistance("xDays",w,v)}if(O<86400)return y=Math.round(O/43200),d.formatDistance("aboutXMonths",y,v);if((y=Object(o.a)(m,h))<12){var j=Math.round(O/43200);return d.formatDistance("xMonths",j,v)}var E=y%12,S=Math.floor(y/12);return E<3?d.formatDistance("aboutXYears",S,v):E<9?d.formatDistance("overXYears",S,v):d.formatDistance("almostXYears",S+1,v)};var n=r(134),o=r(276),a=r(277),i=r(163),u=r(2),s=r(710),l=r(84),c=r(1)},function(e,t,r){"use strict";t.a=function(e){return Object(n.a)({},e)};var n=r(711)},function(e,t,r){"use strict";t.a=function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t=t||{})t.hasOwnProperty(r)&&(e[r]=t[r]);return e}},function(e,t,r){"use strict";t.a=function(e,t,r){Object(l.a)(2,arguments);var c=r||{},f=c.locale||s.a;if(!f.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var d=Object(o.a)(e,t);if(isNaN(d))throw new RangeError("Invalid time value");var p,h,m=Object(u.a)(c);m.addSuffix=Boolean(c.addSuffix),m.comparison=d,d>0?(p=Object(a.a)(t),h=Object(a.a)(e)):(p=Object(a.a)(e),h=Object(a.a)(t));var v,y=null==c.roundingMethod?"round":String(c.roundingMethod);if("floor"===y)v=Math.floor;else if("ceil"===y)v=Math.ceil;else{if("round"!==y)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");v=Math.round}var b,g=Object(i.a)(h,p),O=(Object(n.a)(h)-Object(n.a)(p))/1e3,_=v((g-O)/60);b=null==c.unit?_<1?"second":_<60?"minute":_<1440?"hour":_<43200?"day":_<525600?"month":"year":String(c.unit);if("second"===b)return f.formatDistance("xSeconds",g,m);if("minute"===b)return f.formatDistance("xMinutes",_,m);if("hour"===b){var w=v(_/60);return f.formatDistance("xHours",w,m)}if("day"===b){var j=v(_/1440);return f.formatDistance("xDays",j,m)}if("month"===b){var E=v(_/43200);return f.formatDistance("xMonths",E,m)}if("year"===b){var S=v(_/525600);return f.formatDistance("xYears",S,m)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")};var n=r(84),o=r(134),a=r(2),i=r(277),u=r(710),s=r(163),l=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getDate();return r};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getDay();return r};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getFullYear(),a=t.getMonth(),i=new Date(0);return i.setFullYear(r,a+1,0),i.setHours(0,0,0,0),i.getDate()};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getFullYear();return r%400==0||r%4==0&&r%100!=0};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getDay();0===r&&(r=7);return r};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(i.a)(1,arguments);var t=Object(n.a)(e),r=Object(o.a)(t).getTime()-Object(a.a)(t).getTime();return Math.round(r/6048e5)+1};var n=r(2),o=r(132),a=r(205),i=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getTime();return r};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(i.a)(1,arguments);var r=Object(a.a)(e),u=Object(n.a)(r,t).getTime()-Object(o.a)(r,t).getTime();return Math.round(u/6048e5)+1};var n=r(101),o=r(404),a=r(2),i=r(1)},function(e,t,r){"use strict";t.a=function(e,t){Object(i.a)(1,arguments);var r=Object(o.a)(e),u=r.getFullYear(),s=t||{},l=s.locale,c=l&&l.options&&l.options.firstWeekContainsDate,f=null==c?1:Object(a.a)(c),d=null==s.firstWeekContainsDate?f:Object(a.a)(s.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(u+1,0,d),p.setHours(0,0,0,0);var h=Object(n.a)(p,t),m=new Date(0);m.setFullYear(u,0,d),m.setHours(0,0,0,0);var v=Object(n.a)(m,t);return r.getTime()>=h.getTime()?u+1:r.getTime()>=v.getTime()?u:u-1};var n=r(101),o=r(2),a=r(8),i=r(1)},function(e,t,r){"use strict";t.a=function(e){Object(o.a)(1,arguments);var t=Object(n.a)(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t};var n=r(2),o=r(1)},function(e,t,r){"use strict";t.a=function(e,t){if(Object(i.a)(2,arguments),!t||"object"!=typeof t)return new Date(NaN);var r="years"in t?Object(u.a)(t.years):0,s="months"in t?Object(u.a)(t.months):0,l="weeks"in t?Object(u.a)(t.weeks):0,c="days"in t?Object(u.a)(t.days):0,f="hours"in t?Object(u.a)(t.hours):0,d="minutes"in t?Object(u.a)(t.minutes):0,p="seconds"in t?Object(u.a)(t.seconds):0,h=Object(o.a)(Object(a.a)(e),s+12*r),m=Object(n.a)(h,c+7*l),v=d+60*f,y=p+60*v,b=1e3*y,g=new Date(m.getTime()-b);return g};var n=r(405),o=r(724),a=r(2),i=r(1),u=r(8)},function(e,t,r){"use strict";t.a=function(e,t){Object(a.a)(2,arguments);var r=Object(n.a)(t);return Object(o.a)(e,-r)};var n=r(8),o=r(204),a=r(1)},function(e,t,r){"use strict";t.a=function(e,t,r,m){Object(d.a)(3,arguments);var v=String(e),_=String(t),w=m||{},j=w.locale||n.a;if(!j.match)throw new RangeError("locale must contain match property");var E=j.options&&j.options.firstWeekContainsDate,S=null==E?1:Object(c.a)(E),x=null==w.firstWeekContainsDate?S:Object(c.a)(w.firstWeekContainsDate);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=j.options&&j.options.weekStartsOn,k=null==P?0:Object(c.a)(P),M=null==w.weekStartsOn?k:Object(c.a)(w.weekStartsOn);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===_)return""===v?Object(a.a)(r):new Date(NaN);var C,A={firstWeekContainsDate:x,weekStartsOn:M,locale:j},T=[{priority:10,subPriority:-1,set:g,index:0}],D=_.match(h).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,u.a[t])(e,j.formatLong,A):e})).join("").match(p),I=[];for(C=0;C0&&y.test(v))return new Date(NaN);var U=T.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,r){return r.indexOf(e)===t})).map((function(e){return T.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),H=Object(a.a)(r);if(isNaN(H))return new Date(NaN);var Y=Object(o.a)(H,Object(s.a)(H)),G={};for(C=0;C=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var c=Object(n.a)(e),f=c.getDay(),d=6+(fe.fields))).length>0&&r.push(function(e,t){var r=null,o=(0,u.merge)((0,u.defer)(()=>null===r?u.EMPTY:(0,u.of)(r)),function(e,t){return function(e){var t=(()=>{if(!n){var e=(0,u.from)(i.default.listen('*[!(_id in path("_.**"))]',{},{events:["welcome","mutation"],includeResult:!1,visibility:"query"})).pipe((0,s.share)()),t=e.pipe((0,s.filter)(e=>"welcome"===e.type),(0,s.publishReplay)(1),(0,s.refCount)());t.subscribe();var r=e.pipe((0,s.filter)(e=>"mutation"===e.type));n={welcome$:t,mutations$:r}}return n})();return(0,u.merge)(t.welcome$,t.mutations$.pipe((0,s.filter)(t=>t.documentId===e)))}(e).pipe((0,s.switchMap)(r=>"welcome"===r.type||"query"===r.visibility?v(e,t).pipe((0,s.mergeMap)(r=>(0,u.concat)((0,u.of)(r),void 0===r?y(e,t):[]))):y(e,t)))}(e,t)).pipe((0,s.tap)(e=>r=e),(0,s.publishReplay)(1),(0,s.refCount)());return{id:e,fields:t,changes$:o}}(e,t));var l=r.filter(e=>e.fields.some(e=>t.includes(e))).map(e=>e.changes$);return(0,u.combineLatest)(l).pipe((0,s.map)(e=>e.filter(Boolean)),(0,s.filter)(e=>(0,p.default)(e,e=>e._rev)),(0,s.map)(e=>0===e.length?null:function(e,t){return[...f.INCLUDE_FIELDS,...t].reduce((t,r)=>{var n=function(e,t){var r;return e.some(e=>t in e&&(r=e[t],!0)),r}(e,r);return void 0!==n&&(t[r]=n),t},{})}(e,t)),(0,s.distinctUntilChanged)((0,d.default)(t)))};var n,o=h(r(31)),a=h(r(367)),i=h(r(13)),u=r(4),s=r(5),l=h(r(2026)),c=r(2027),f=r(279),d=h(r(2029)),p=h(r(2030));function h(e){return e&&e.__esModule?e:{default:e}}function m(e){var t=(0,c.combineSelections)(e);return i.default.observable.fetch((0,c.toGradientQuery)(t)).pipe((0,s.map)(e=>(0,c.reassemble)(e,t)))}var v=(0,l.default)(m,100),y=(0,l.default)(m,1e3);var b={}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return function(e){e._ref in u||(u[e._ref]=o.default.fetch("*[_id == $id][0]._type",{id:e._ref}));return(0,a.from)(u[e._ref])}(e).pipe((0,i.map)(e=>t.to.find(t=>t.name===e)))};var n,o=(n=r(13))&&n.__esModule?n:{default:n},a=r(4),i=r(5);var u=Object.create(null)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createPathObserver=function(e){return(t,r)=>function e(t,r,s){if(!function(e){return(0,o.default)(e)}(t))return(0,a.of)(t);var c=function(e,t){return t.filter(t=>!(t[0]in e))}(t,r);if(c.length>0){var d=(0,n.default)(c.map(e=>e[0])),h=p(t);if(p(t)||function(e){return"_id"in e}(t)){var m=h?t._ref:t._id;return s(m,d).pipe((0,i.switchMap)(n=>null===n?(0,a.of)(null):e(f(f(f({},d.reduce((e,t)=>(e[t]=void 0,e),{})),h?{}:t),n),r,s)))}}var v={};r.forEach(e=>{var t,r=function(e){if(Array.isArray(e))return e}(t=e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],o=r.slice(1);v[n]||(v[n]=[]),v[n].push(o)});var y=Object.keys(v).reduce((r,n)=>{var o=v[n];return o.every(e=>0===e.length)?r[n]=t[n]:r[n]=e(t[n],o,s),r},f({},t));return(0,a.of)(y).pipe((0,u.default)({wait:!0}))}(function(e){return"string"==typeof e?{_id:e}:e}(t),r.map(e=>"string"==typeof e?e.split("."):e),e)};var n=s(r(74)),o=s(r(37)),a=r(4),i=r(5),u=s(r(2031));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r