@actual-app/web 23.9.0 → 23.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/build/apple-touch-icon.png +0 -0
- package/build/asset-manifest.json +25 -21
- package/build/index.html +1 -1
- package/build/kcab/kcab.worker.b835d2cdcf8004c363da.js +250 -0
- package/build/kcab/kcab.worker.b835d2cdcf8004c363da.js.map +1 -0
- package/build/kcab/xfo.xfo.kcab.worker.2ee5d7175d50b7896f28.js +1 -0
- package/build/static/css/main.476f35a5.css +359 -0
- package/build/static/css/main.476f35a5.css.map +1 -0
- package/build/static/js/231.370f17f8.chunk.js +2 -0
- package/build/static/js/231.370f17f8.chunk.js.map +1 -0
- package/build/static/js/389.c8f94185.chunk.js +2 -0
- package/build/static/js/389.c8f94185.chunk.js.map +1 -0
- package/build/static/js/473.02c273e8.chunk.js +2 -0
- package/build/static/js/473.02c273e8.chunk.js.map +1 -0
- package/build/static/js/678.bf349f5d.chunk.js +2 -0
- package/build/static/js/678.bf349f5d.chunk.js.map +1 -0
- package/build/static/js/713.1731d555.chunk.js +15 -0
- package/build/static/js/713.1731d555.chunk.js.map +1 -0
- package/build/static/js/main.7e6eedd0.js +188 -0
- package/build/static/js/main.7e6eedd0.js.map +1 -0
- package/build/static/js/narrow-components.11cf3591.chunk.js +2 -0
- package/build/static/js/narrow-components.11cf3591.chunk.js.map +1 -0
- package/build/static/js/reports.39b7254a.chunk.js +2 -0
- package/build/static/js/reports.39b7254a.chunk.js.map +1 -0
- package/build/static/js/resize-observer-polyfill.98a18736.chunk.js +2 -0
- package/build/static/js/resize-observer-polyfill.98a18736.chunk.js.map +1 -0
- package/build/static/js/wide-components.fd8595f4.chunk.js +2 -0
- package/build/static/js/wide-components.fd8595f4.chunk.js.map +1 -0
- package/build/static/media/browser-server.20abc230cfc504c53fa0.js +1 -0
- package/package.json +16 -12
- package/build/kcab/kcab.worker.903b11c4b36a7822451f.js +0 -3
- package/build/kcab/kcab.worker.903b11c4b36a7822451f.js.LICENSE.txt +0 -24
- package/build/kcab/kcab.worker.903b11c4b36a7822451f.js.map +0 -1
- package/build/kcab/xfo.xfo.kcab.worker.e800a4a41b9557f2726d.js +0 -1
- package/build/static/css/main.90cc2688.css +0 -7
- package/build/static/css/main.90cc2688.css.map +0 -1
- package/build/static/js/171.491e33e7.chunk.js +0 -2
- package/build/static/js/171.491e33e7.chunk.js.map +0 -1
- package/build/static/js/383.d7919241.chunk.js +0 -2
- package/build/static/js/383.d7919241.chunk.js.map +0 -1
- package/build/static/js/969.b56f4e53.chunk.js +0 -2
- package/build/static/js/969.b56f4e53.chunk.js.map +0 -1
- package/build/static/js/main.041e259e.js +0 -3
- package/build/static/js/main.041e259e.js.LICENSE.txt +0 -178
- package/build/static/js/main.041e259e.js.map +0 -1
- package/build/static/js/narrow-components.b48d7cb2.chunk.js +0 -2
- package/build/static/js/narrow-components.b48d7cb2.chunk.js.map +0 -1
- package/build/static/js/reports.2402a148.chunk.js +0 -2
- package/build/static/js/reports.2402a148.chunk.js.map +0 -1
- package/build/static/js/resize-observer-polyfill.68c3249b.chunk.js +0 -2
- package/build/static/js/resize-observer-polyfill.68c3249b.chunk.js.map +0 -1
- package/build/static/js/wide-components.2c2e09e4.chunk.js +0 -2
- package/build/static/js/wide-components.2c2e09e4.chunk.js.map +0 -1
- package/build/static/media/browser-server.14ed34b8682d7b10163f.js +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
(function(){var e={45058:function(e,t,n){"use strict";n.d(t,{Ep:function(){return g},J0:function(){return u},LX:function(){return Z},RQ:function(){return q},WK:function(){return ea},X3:function(){return J},Zn:function(){return W},Zq:function(){return K},aU:function(){return o},cP:function(){return m},fp:function(){return S},lX:function(){return l},pC:function(){return $}});/**
|
|
2
|
+
* @remix-run/router v1.6.2
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Remix Software Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/function r(){r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};return r.apply(this,arguments)}var o;(function(e){e["Pop"]="POP";e["Push"]="PUSH";e["Replace"]="REPLACE"})(o||(o={}));const i="popstate";function a(e){if(e===void 0){e={}}let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=false}=e;let i;i=t.map((e,t)=>h(e,typeof e==="string"?null:e.state,t===0?"default":undefined));let a=u(n==null?i.length-1:n);let l=o.Pop;let s=null;function u(e){return Math.min(Math.max(e,0),i.length-1)}function f(){return i[a]}function h(e,t,n){if(t===void 0){t=null}let r=p(i?f().pathname:"/",e,t,n);c(r.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(e));return r}function v(e){return typeof e==="string"?e:g(e)}let y={get index(){return a},get action(){return l},get location(){return f()},createHref:v,createURL(e){return new URL(v(e),"http://localhost")},encodeLocation(e){let t=typeof e==="string"?m(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,t){l=o.Push;let n=h(e,t);a+=1;i.splice(a,i.length,n);if(r&&s){s({action:l,location:n,delta:1})}},replace(e,t){l=o.Replace;let n=h(e,t);i[a]=n;if(r&&s){s({action:l,location:n,delta:0})}},go(e){l=o.Pop;let t=u(a+e);let n=i[t];a=t;if(s){s({action:l,location:n,delta:e})}},listen(e){s=e;return()=>{s=null}}};return y}function l(e){if(e===void 0){e={}}function t(e,t){let{pathname:n,search:r,hash:o}=e.location;return p("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}function n(e,t){return typeof t==="string"?t:g(t)}return v(t,n,null,e)}function s(e){if(e===void 0){e={}}function t(e,t){let{pathname:n="/",search:r="",hash:o=""}=m(e.location.hash.substr(1));return p("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}function n(e,t){let n=e.document.querySelector("base");let r="";if(n&&n.getAttribute("href")){let t=e.location.href;let n=t.indexOf("#");r=n===-1?t:t.slice(0,n)}return r+"#"+(typeof t==="string"?t:g(t))}function r(e,t){c(e.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}return v(t,n,r,e)}function u(e,t){if(e===false||e===null||typeof e==="undefined"){throw new Error(t)}}function c(e,t){if(!e){if(typeof console!=="undefined")console.warn(t);try{throw new Error(t)}catch(e){}}}function f(){return Math.random().toString(36).substr(2,8)}function h(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,n,o){if(n===void 0){n=null}let i=r({pathname:typeof e==="string"?e:e.pathname,search:"",hash:""},typeof t==="string"?m(t):t,{state:n,key:t&&t.key||o||f()});return i}function g(e){let{pathname:t="/",search:n="",hash:r=""}=e;if(n&&n!=="?")t+=n.charAt(0)==="?"?n:"?"+n;if(r&&r!=="#")t+=r.charAt(0)==="#"?r:"#"+r;return t}function m(e){let t={};if(e){let n=e.indexOf("#");if(n>=0){t.hash=e.substr(n);e=e.substr(0,n)}let r=e.indexOf("?");if(r>=0){t.search=e.substr(r);e=e.substr(0,r)}if(e){t.pathname=e}}return t}function v(e,t,n,a){if(a===void 0){a={}}let{window:l=document.defaultView,v5Compat:s=false}=a;let c=l.history;let f=o.Pop;let m=null;let v=y();if(v==null){v=0;c.replaceState(r({},c.state,{idx:v}),"")}function y(){let e=c.state||{idx:null};return e.idx}function b(){f=o.Pop;let e=y();let t=e==null?null:e-v;v=e;if(m){m({action:f,location:k.location,delta:t})}}function x(e,t){f=o.Push;let r=p(k.location,e,t);if(n)n(r,e);v=y()+1;let i=h(r,v);let a=k.createHref(r);try{c.pushState(i,"",a)}catch(e){l.location.assign(a)}if(s&&m){m({action:f,location:k.location,delta:1})}}function w(e,t){f=o.Replace;let r=p(k.location,e,t);if(n)n(r,e);v=y();let i=h(r,v);let a=k.createHref(r);c.replaceState(i,"",a);if(s&&m){m({action:f,location:k.location,delta:0})}}function S(e){let t=l.location.origin!=="null"?l.location.origin:l.location.href;let n=typeof e==="string"?e:g(e);u(t,"No window.location.(origin|href) available to create URL for href: "+n);return new URL(n,t)}let k={get action(){return f},get location(){return e(l,c)},listen(e){if(m){throw new Error("A history only accepts one active listener")}l.addEventListener(i,b);m=e;return()=>{l.removeEventListener(i,b);m=null}},createHref(e){return t(l,e)},createURL:S,encodeLocation(e){let t=S(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:x,replace:w,go(e){return c.go(e)}};return k}var y;(function(e){e["data"]="data";e["deferred"]="deferred";e["redirect"]="redirect";e["error"]="error"})(y||(y={}));const b=new Set(["lazy","caseSensitive","path","id","index","children"]);function x(e){return e.index===true}function w(e,t,n,o){if(n===void 0){n=[]}if(o===void 0){o={}}return e.map((e,i)=>{let a=[...n,i];let l=typeof e.id==="string"?e.id:a.join("-");u(e.index!==true||!e.children,"Cannot specify children on an index route");u(!o[l],'Found a route id collision on id "'+l+'". Route '+"id's must be globally unique within Data Router usages");if(x(e)){let n=r({},e,t(e),{id:l});o[l]=n;return n}else{let n=r({},e,t(e),{id:l,children:undefined});o[l]=n;if(e.children){n.children=w(e.children,t,a,o)}return n}})}function S(e,t,n){if(n===void 0){n="/"}let r=typeof t==="string"?m(t):t;let o=W(r.pathname||"/",n);if(o==null){return null}let i=k(e);E(i);let a=null;for(let e=0;a==null&&e<i.length;++e){a=A(i[e],B(o))}return a}function k(e,t,n,r){if(t===void 0){t=[]}if(n===void 0){n=[]}if(r===void 0){r=""}let o=(e,o,i)=>{let a={relativePath:i===undefined?e.path||"":i,caseSensitive:e.caseSensitive===true,childrenIndex:o,route:e};if(a.relativePath.startsWith("/")){u(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes.");a.relativePath=a.relativePath.slice(r.length)}let l=q([r,a.relativePath]);let s=n.concat(a);if(e.children&&e.children.length>0){u(e.index!==true,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".'));k(e.children,t,s,l)}if(e.path==null&&!e.index){return}t.push({path:l,score:_(l,e.index),routesMeta:s})};e.forEach((e,t)=>{var n;if(e.path===""||!((n=e.path)!=null&&n.includes("?"))){o(e,t)}else{for(let n of T(e.path)){o(e,t,n)}}});return t}function T(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t;let o=n.endsWith("?");let i=n.replace(/\?$/,"");if(r.length===0){return o?[i,""]:[i]}let a=T(r.join("/"));let l=[];l.push(...a.map(e=>e===""?i:[i,e].join("/")));if(o){l.push(...a)}return l.map(t=>e.startsWith("/")&&t===""?"/":t)}function E(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:R(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}const C=/^:\w+$/;const j=3;const I=2;const D=1;const P=10;const O=-2;const M=e=>e==="*";function _(e,t){let n=e.split("/");let r=n.length;if(n.some(M)){r+=O}if(t){r+=I}return n.filter(e=>!M(e)).reduce((e,t)=>e+(C.test(t)?j:t===""?D:P),r)}function R(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}function A(e,t){let{routesMeta:n}=e;let r={};let o="/";let i=[];for(let e=0;e<n.length;++e){let a=n[e];let l=e===n.length-1;let s=o==="/"?t:t.slice(o.length)||"/";let u=Z({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},s);if(!u)return null;Object.assign(r,u.params);let c=a.route;i.push({params:r,pathname:q([o,u.pathname]),pathnameBase:Y(q([o,u.pathnameBase])),route:c});if(u.pathnameBase!=="/"){o=q([o,u.pathnameBase])}}return i}function N(e,t){if(t===void 0){t={}}let n=e;if(n.endsWith("*")&&n!=="*"&&!n.endsWith("/*")){c(false,'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));n=n.replace(/\*$/,"/*")}const r=n.startsWith("/")?"/":"";const o=n.split(/\/+/).map((e,n,r)=>{const o=n===r.length-1;if(o&&e==="*"){const e="*";const n=t[e];return n}const i=e.match(/^:(\w+)(\??)$/);if(i){const[,e,n]=i;let r=t[e];if(n==="?"){return r==null?"":r}if(r==null){u(false,'Missing ":'+e+'" param')}return r}return e.replace(/\?$/g,"")}).filter(e=>!!e);return r+o.join("/")}function Z(e,t){if(typeof e==="string"){e={path:e,caseSensitive:false,end:true}}let[n,r]=L(e.path,e.caseSensitive,e.end);let o=t.match(n);if(!o)return null;let i=o[0];let a=i.replace(/(.)\/+$/,"$1");let l=o.slice(1);let s=r.reduce((e,t,n)=>{if(t==="*"){let e=l[n]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}e[t]=F(l[n]||"",t);return e},{});return{params:s,pathname:i,pathnameBase:a,pattern:e}}function L(e,t,n){if(t===void 0){t=false}if(n===void 0){n=true}c(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[];let o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(e,t)=>{r.push(t);return"/([^\\/]+)"});if(e.endsWith("*")){r.push("*");o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"}else if(n){o+="\\/*$"}else if(e!==""&&e!=="/"){o+="(?:(?=\\/|$))"}else;let i=new RegExp(o,t?undefined:"i");return[i,r]}function B(e){try{return decodeURI(e)}catch(t){c(false,'The URL path "'+e+'" could not be decoded because it is is a '+"malformed URL segment. This is probably due to a bad percent "+("encoding ("+t+")."));return e}}function F(e,t){try{return decodeURIComponent(e)}catch(n){c(false,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+")."));return e}}function W(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase())){return null}let n=t.endsWith("/")?t.length-1:t.length;let r=e.charAt(n);if(r&&r!=="/"){return null}return e.slice(n)||"/"}function U(e,t){if(t===void 0){t="/"}let{pathname:n,search:r="",hash:o=""}=typeof e==="string"?m(e):e;let i=n?n.startsWith("/")?n:z(n,t):t;return{pathname:i,search:G(r),hash:Q(o)}}function z(e,t){let n=t.replace(/\/+$/,"").split("/");let r=e.split("/");r.forEach(e=>{if(e===".."){if(n.length>1)n.pop()}else if(e!=="."){n.push(e)}});return n.length>1?n.join("/"):"/"}function H(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function K(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function $(e,t,n,o){if(o===void 0){o=false}let i;if(typeof e==="string"){i=m(e)}else{i=r({},e);u(!i.pathname||!i.pathname.includes("?"),H("?","pathname","search",i));u(!i.pathname||!i.pathname.includes("#"),H("#","pathname","hash",i));u(!i.search||!i.search.includes("#"),H("#","search","hash",i))}let a=e===""||i.pathname==="";let l=a?"/":i.pathname;let s;if(o||l==null){s=n}else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");while(t[0]===".."){t.shift();e-=1}i.pathname=t.join("/")}s=e>=0?t[e]:"/"}let c=U(i,s);let f=l&&l!=="/"&&l.endsWith("/");let h=(a||l===".")&&n.endsWith("/");if(!c.pathname.endsWith("/")&&(f||h)){c.pathname+="/"}return c}function V(e){return e===""||e.pathname===""?"/":typeof e==="string"?m(e).pathname:e.pathname}const q=e=>e.join("/").replace(/\/\/+/g,"/");const Y=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");const G=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e;const Q=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;const X=function e(e,t){if(t===void 0){t={}}let n=typeof t==="number"?{status:t}:t;let o=new Headers(n.headers);if(!o.has("Content-Type")){o.set("Content-Type","application/json; charset=utf-8")}return new Response(JSON.stringify(e),r({},n,{headers:o}))};class J extends Error{}class ee{constructor(e,t){this.pendingKeysSet=new Set;this.subscribers=new Set;this.deferredKeys=[];u(e&&typeof e==="object"&&!Array.isArray(e),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((e,t)=>n=t);this.controller=new AbortController;let r=()=>n(new J("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",r);this.controller.signal.addEventListener("abort",r);this.data=Object.entries(e).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})},{});if(this.done){this.unlistenAbortSignal()}this.init=t}trackPromise(e,t){if(!(t instanceof Promise)){return t}this.deferredKeys.push(e);this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(n,e,null,t),t=>this.onSettle(n,e,t));n.catch(()=>{});Object.defineProperty(n,"_tracked",{get:()=>true});return n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof J){this.unlistenAbortSignal();Object.defineProperty(e,"_error",{get:()=>n});return Promise.reject(n)}this.pendingKeysSet.delete(t);if(this.done){this.unlistenAbortSignal()}if(n){Object.defineProperty(e,"_error",{get:()=>n});this.emit(false,t);return Promise.reject(n)}Object.defineProperty(e,"_data",{get:()=>r});this.emit(false,t);return r}emit(e,t){this.subscribers.forEach(n=>n(e,t))}subscribe(e){this.subscribers.add(e);return()=>this.subscribers.delete(e)}cancel(){this.controller.abort();this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t));this.emit(true)}async resolveData(e){let t=false;if(!this.done){let n=()=>this.cancel();e.addEventListener("abort",n);t=await new Promise(t=>{this.subscribe(r=>{e.removeEventListener("abort",n);if(r||this.done){t(r)}})})}return t}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){u(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds");return Object.entries(this.data).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:en(r)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function et(e){return e instanceof Promise&&e._tracked===true}function en(e){if(!et(e)){return e}if(e._error){throw e._error}return e._data}const er=function e(e,t){if(t===void 0){t={}}let n=typeof t==="number"?{status:t}:t;return new ee(e,n)};const eo=function e(e,t){if(t===void 0){t=302}let n=t;if(typeof n==="number"){n={status:n}}else if(typeof n.status==="undefined"){n.status=302}let o=new Headers(n.headers);o.set("Location",e);return new Response(null,r({},n,{headers:o}))};class ei{constructor(e,t,n,r){if(r===void 0){r=false}this.status=e;this.statusText=t||"";this.internal=r;if(n instanceof Error){this.data=n.toString();this.error=n}else{this.data=n}}}function ea(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.internal==="boolean"&&"data"in e}const el=["post","put","patch","delete"];const es=new Set(el);const eu=["get",...el];const ec=new Set(eu);const ed=new Set([301,302,303,307,308]);const ef=new Set([307,308]);const eh={state:"idle",location:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined};const ep={state:"idle",data:undefined,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined};const eg={state:"unblocked",proceed:undefined,reset:undefined,location:undefined};const em=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;const ev=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined";const ey=!ev;const eb=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function ex(e){u(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t;if(e.mapRouteProperties){t=e.mapRouteProperties}else if(e.detectErrorBoundary){let n=e.detectErrorBoundary;t=e=>({hasErrorBoundary:n(e)})}else{t=eb}let n={};let i=w(e.routes,t,undefined,n);let a;let l=e.basename||"/";let s=r({v7_normalizeFormMethod:false,v7_prependBasename:false},e.future);let f=null;let h=new Set;let g=null;let m=null;let v=null;let b=e.hydrationData!=null;let x=S(i,e.history.location,l);let k=null;if(x==null){let t=eW(404,{pathname:e.history.location.pathname});let{matches:n,route:r}=eF(i);x=n;k={[r.id]:t}}let T=!x.some(e=>e.route.lazy)&&(!x.some(e=>e.route.loader)||e.hydrationData!=null);let E;let C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:T,navigation:eh,restoreScrollPosition:e.hydrationData!=null?false:null,preventScrollReset:false,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||k,fetchers:new Map,blockers:new Map};let j=o.Pop;let I=false;let D;let P=false;let O=false;let M=[];let _=[];let R=new Map;let A=0;let N=-1;let Z=new Map;let L=new Set;let B=new Map;let F=new Map;let U=new Map;let z=false;function H(){f=e.history.listen(t=>{let{action:n,location:r,delta:o}=t;if(z){z=false;return}c(U.size===0||o!=null,"You are trying to use a blocker on a POP navigation to a location "+"that was not created by @remix-run/router. This will fail silently in "+"production. This can happen if you are navigating outside the router "+"via `window.history.pushState`/`window.location.hash` instead of using "+"router navigation APIs. This can also happen if you are using "+"createHashRouter and the user manually changes the URL.");let i=eT({currentLocation:C.location,nextLocation:r,historyAction:n});if(i&&o!=null){z=true;e.history.go(o*-1);ek(i,{state:"blocked",location:r,proceed(){ek(i,{state:"proceeding",proceed:undefined,reset:undefined,location:r});e.history.go(o)},reset(){eS(i);V({blockers:new Map(E.state.blockers)})}});return}return Q(n,r)});if(!C.initialized){Q(o.Pop,C.location)}return E}function K(){if(f){f()}h.clear();D&&D.abort();C.fetchers.forEach((e,t)=>es(t));C.blockers.forEach((e,t)=>eS(t))}function $(e){h.add(e);return()=>h.delete(e)}function V(e){C=r({},C,e);h.forEach(e=>e(C))}function q(t,n){var l,s;let u=C.actionData!=null&&C.navigation.formMethod!=null&&eJ(C.navigation.formMethod)&&C.navigation.state==="loading"&&((l=t.state)==null?void 0:l._isRedirect)!==true;let c;if(n.actionData){if(Object.keys(n.actionData).length>0){c=n.actionData}else{c=null}}else if(u){c=C.actionData}else{c=null}let f=n.loaderData?eL(C.loaderData,n.loaderData,n.matches||[],n.errors):C.loaderData;for(let[e]of U){eS(e)}let h=I===true||C.navigation.formMethod!=null&&eJ(C.navigation.formMethod)&&((s=t.state)==null?void 0:s._isRedirect)!==true;if(a){i=a;a=undefined}V(r({},n,{actionData:c,loaderData:f,historyAction:j,location:t,initialized:true,navigation:eh,revalidation:"idle",restoreScrollPosition:eO(t,n.matches||C.matches),preventScrollReset:h,blockers:new Map(C.blockers)}));if(P);else if(j===o.Pop);else if(j===o.Push){e.history.push(t,t.state)}else if(j===o.Replace){e.history.replace(t,t.state)}j=o.Pop;I=false;P=false;O=false;M=[];_=[]}async function Y(t,n){if(typeof t==="number"){e.history.go(t);return}let i=eE(C.location,C.matches,l,s.v7_prependBasename,t,n==null?void 0:n.fromRouteId,n==null?void 0:n.relative);let{path:a,submission:u,error:c}=eC(s.v7_normalizeFormMethod,false,i,n);let f=C.location;let h=p(C.location,a,n&&n.state);h=r({},h,e.history.encodeLocation(h));let g=n&&n.replace!=null?n.replace:undefined;let m=o.Push;if(g===true){m=o.Replace}else if(g===false);else if(u!=null&&eJ(u.formMethod)&&u.formAction===C.location.pathname+C.location.search){m=o.Replace}let v=n&&"preventScrollReset"in n?n.preventScrollReset===true:undefined;let y=eT({currentLocation:f,nextLocation:h,historyAction:m});if(y){ek(y,{state:"blocked",location:h,proceed(){ek(y,{state:"proceeding",proceed:undefined,reset:undefined,location:h});Y(t,n)},reset(){eS(y);V({blockers:new Map(C.blockers)})}});return}return await Q(m,h,{submission:u,pendingError:c,preventScrollReset:v,replace:n&&n.replace})}function G(){ea();V({revalidation:"loading"});if(C.navigation.state==="submitting"){return}if(C.navigation.state==="idle"){Q(C.historyAction,C.location,{startUninterruptedRevalidation:true});return}Q(j||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation})}async function Q(t,n,o){D&&D.abort();D=null;j=t;P=(o&&o.startUninterruptedRevalidation)===true;eP(C.location,C.matches);I=(o&&o.preventScrollReset)===true;let s=a||i;let u=o&&o.overrideNavigation;let c=S(s,n,l);if(!c){let e=eW(404,{pathname:n.pathname});let{matches:t,route:r}=eF(s);ej();q(n,{matches:t,loaderData:{},errors:{[r.id]:e}});return}if(C.initialized&&eH(C.location,n)&&!(o&&o.submission&&eJ(o.submission.formMethod))){q(n,{matches:c});return}D=new AbortController;let f=eR(e.history,n,D.signal,o&&o.submission);let h;let p;if(o&&o.pendingError){p={[eB(c).route.id]:o.pendingError}}else if(o&&o.submission&&eJ(o.submission.formMethod)){let e=await X(f,n,o.submission,c,{replace:o.replace});if(e.shortCircuited){return}h=e.pendingActionData;p=e.pendingActionError;let t=r({state:"loading",location:n},o.submission);u=t;f=new Request(f.url,{signal:f.signal})}let{shortCircuited:g,loaderData:m,errors:v}=await J(f,n,c,u,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,h,p);if(g){return}D=null;q(n,r({matches:c},h?{actionData:h}:{},{loaderData:m,errors:v}))}async function X(e,i,a,s,u){ea();let c=r({state:"submitting",location:i},a);V({navigation:c});let f;let h=e5(s,i);if(!h.route.action&&!h.route.lazy){f={type:y.error,error:eW(405,{method:e.method,pathname:i.pathname,routeId:h.route.id})}}else{f=await e_("action",e,h,s,n,t,l);if(e.signal.aborted){return{shortCircuited:true}}}if(eV(f)){let e;if(u&&u.replace!=null){e=u.replace}else{e=f.location===C.location.pathname+C.location.search}await eo(C,f,{submission:a,replace:e});return{shortCircuited:true}}if(e$(f)){let e=eB(s,h.route.id);if((u&&u.replace)!==true){j=o.Push}return{pendingActionData:{},pendingActionError:{[e.route.id]:f.error}}}if(eK(f)){throw eW(400,{type:"defer-action"})}return{pendingActionData:{[h.route.id]:f.data}}}async function J(t,n,o,s,u,c,f,h,p){let g=s;if(!g){let e=r({state:"loading",location:n,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined},u);g=e}let m=u||c?u||c:g.formMethod&&g.formAction&&g.formData&&g.formEncType?{formMethod:g.formMethod,formAction:g.formAction,formData:g.formData,formEncType:g.formEncType}:undefined;let v=a||i;let[y,b]=eI(e.history,C,o,m,n,O,M,_,B,v,l,h,p);ej(e=>!(o&&o.some(t=>t.route.id===e))||y&&y.some(t=>t.route.id===e));if(y.length===0&&b.length===0){let e=ed();q(n,r({matches:o,loaderData:{},errors:p||null},h?{actionData:h}:{},e?{fetchers:new Map(C.fetchers)}:{}));return{shortCircuited:true}}if(!P){b.forEach(e=>{let t=C.fetchers.get(e.key);let n={state:"loading",data:t&&t.data,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined," _hasFetcherDoneAnything ":true};C.fetchers.set(e.key,n)});let e=h||C.actionData;V(r({navigation:g},e?Object.keys(e).length===0?{actionData:null}:{actionData:e}:{},b.length>0?{fetchers:new Map(C.fetchers)}:{}))}N=++A;b.forEach(e=>{if(e.controller){R.set(e.key,e.controller)}});let x=()=>b.forEach(e=>eu(e.key));if(D){D.signal.addEventListener("abort",x)}let{results:w,loaderResults:S,fetcherResults:k}=await ei(C.matches,o,y,b,t);if(t.signal.aborted){return{shortCircuited:true}}if(D){D.signal.removeEventListener("abort",x)}b.forEach(e=>R.delete(e.key));let T=eU(w);if(T){await eo(C,T,{replace:f});return{shortCircuited:true}}let{loaderData:E,errors:j}=eZ(C,o,y,S,p,b,k,F);F.forEach((e,t)=>{e.subscribe(n=>{if(n||e.done){F.delete(t)}})});let I=ed();let Z=ex(N);let L=I||Z||b.length>0;return r({loaderData:E,errors:j},L?{fetchers:new Map(C.fetchers)}:{})}function ee(e){return C.fetchers.get(e)||ep}function et(e,t,n,r){if(ey){throw new Error("router.fetch() was called during the server render, but it shouldn't be. "+"You are likely calling a useFetcher() method in the body of your component. "+"Try moving it to a useEffect or a callback.")}if(R.has(e))eu(e);let o=a||i;let u=eE(C.location,C.matches,l,s.v7_prependBasename,n,t,r==null?void 0:r.relative);let c=S(o,u,l);if(!c){el(e,t,eW(404,{pathname:u}));return}let{path:f,submission:h}=eC(s.v7_normalizeFormMethod,true,u,r);let p=e5(c,f);I=(r&&r.preventScrollReset)===true;if(h&&eJ(h.formMethod)){en(e,t,f,p,c,h);return}B.set(e,{routeId:t,path:f});er(e,t,f,p,c,h)}async function en(o,s,c,f,h,p){ea();B.delete(o);if(!f.route.action&&!f.route.lazy){let e=eW(405,{method:p.formMethod,pathname:c,routeId:s});el(o,s,e);return}let g=C.fetchers.get(o);let m=r({state:"submitting"},p,{data:g&&g.data," _hasFetcherDoneAnything ":true});C.fetchers.set(o,m);V({fetchers:new Map(C.fetchers)});let v=new AbortController;let y=eR(e.history,c,v.signal,p);R.set(o,v);let b=await e_("action",y,f,h,n,t,l);if(y.signal.aborted){if(R.get(o)===v){R.delete(o)}return}if(eV(b)){R.delete(o);L.add(o);let e=r({state:"loading"},p,{data:undefined," _hasFetcherDoneAnything ":true});C.fetchers.set(o,e);V({fetchers:new Map(C.fetchers)});return eo(C,b,{submission:p,isFetchActionRedirect:true})}if(e$(b)){el(o,s,b.error);return}if(eK(b)){throw eW(400,{type:"defer-action"})}let x=C.navigation.location||C.location;let w=eR(e.history,x,v.signal);let k=a||i;let T=C.navigation.state!=="idle"?S(k,C.navigation.location,l):C.matches;u(T,"Didn't find any matches after fetcher action");let E=++A;Z.set(o,E);let I=r({state:"loading",data:b.data},p,{" _hasFetcherDoneAnything ":true});C.fetchers.set(o,I);let[P,W]=eI(e.history,C,T,p,x,O,M,_,B,k,l,{[f.route.id]:b.data},undefined);W.filter(e=>e.key!==o).forEach(e=>{let t=e.key;let n=C.fetchers.get(t);let r={state:"loading",data:n&&n.data,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined," _hasFetcherDoneAnything ":true};C.fetchers.set(t,r);if(e.controller){R.set(t,e.controller)}});V({fetchers:new Map(C.fetchers)});let U=()=>W.forEach(e=>eu(e.key));v.signal.addEventListener("abort",U);let{results:z,loaderResults:H,fetcherResults:K}=await ei(C.matches,T,P,W,w);if(v.signal.aborted){return}v.signal.removeEventListener("abort",U);Z.delete(o);R.delete(o);W.forEach(e=>R.delete(e.key));let $=eU(z);if($){return eo(C,$)}let{loaderData:Y,errors:G}=eZ(C,C.matches,P,H,undefined,W,K,F);let Q={state:"idle",data:b.data,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined," _hasFetcherDoneAnything ":true};C.fetchers.set(o,Q);let X=ex(E);if(C.navigation.state==="loading"&&E>N){u(j,"Expected pending action");D&&D.abort();q(C.navigation.location,{matches:T,loaderData:Y,errors:G,fetchers:new Map(C.fetchers)})}else{V(r({errors:G,loaderData:eL(C.loaderData,Y,T,G)},X?{fetchers:new Map(C.fetchers)}:{}));O=false}}async function er(o,i,a,s,c,f){let h=C.fetchers.get(o);let p=r({state:"loading",formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined},f,{data:h&&h.data," _hasFetcherDoneAnything ":true});C.fetchers.set(o,p);V({fetchers:new Map(C.fetchers)});let g=new AbortController;let m=eR(e.history,a,g.signal);R.set(o,g);let v=await e_("loader",m,s,c,n,t,l);if(eK(v)){v=await e1(v,m.signal,true)||v}if(R.get(o)===g){R.delete(o)}if(m.signal.aborted){return}if(eV(v)){L.add(o);await eo(C,v);return}if(e$(v)){let e=eB(C.matches,i);C.fetchers.delete(o);V({fetchers:new Map(C.fetchers),errors:{[e.route.id]:v.error}});return}u(!eK(v),"Unhandled fetcher deferred data");let y={state:"idle",data:v.data,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined," _hasFetcherDoneAnything ":true};C.fetchers.set(o,y);V({fetchers:new Map(C.fetchers)})}async function eo(t,n,i){var a;let{submission:s,replace:c,isFetchActionRedirect:f}=i===void 0?{}:i;if(n.revalidate){O=true}let h=p(t.location,n.location,r({_isRedirect:true},f?{_isFetchActionRedirect:true}:{}));u(h,"Expected a location on the redirect navigation");if(em.test(n.location)&&ev&&typeof((a=window)==null?void 0:a.location)!=="undefined"){let t=e.history.createURL(n.location);let r=W(t.pathname,l)==null;if(window.location.origin!==t.origin||r){if(c){window.location.replace(n.location)}else{window.location.assign(n.location)}return}}D=null;let g=c===true?o.Replace:o.Push;let{formMethod:m,formAction:v,formEncType:y,formData:b}=t.navigation;if(!s&&m&&v&&b&&y){s={formMethod:m,formAction:v,formEncType:y,formData:b}}if(ef.has(n.status)&&s&&eJ(s.formMethod)){await Q(g,h,{submission:r({},s,{formAction:n.location}),preventScrollReset:I})}else if(f){await Q(g,h,{overrideNavigation:{state:"loading",location:h,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined},fetcherSubmission:s,preventScrollReset:I})}else{await Q(g,h,{overrideNavigation:{state:"loading",location:h,formMethod:s?s.formMethod:undefined,formAction:s?s.formAction:undefined,formEncType:s?s.formEncType:undefined,formData:s?s.formData:undefined},preventScrollReset:I})}}async function ei(r,o,i,a,s){let u=await Promise.all([...i.map(e=>e_("loader",s,e,o,n,t,l)),...a.map(r=>{if(r.matches&&r.match&&r.controller){return e_("loader",eR(e.history,r.path,r.controller.signal),r.match,r.matches,n,t,l)}else{let e={type:y.error,error:eW(404,{pathname:r.path})};return e}})]);let c=u.slice(0,i.length);let f=u.slice(i.length);await Promise.all([e0(r,i,c,c.map(()=>s.signal),false,C.loaderData),e0(r,a.map(e=>e.match),f,a.map(e=>e.controller?e.controller.signal:null),true)]);return{results:u,loaderResults:c,fetcherResults:f}}function ea(){O=true;M.push(...ej());B.forEach((e,t)=>{if(R.has(t)){_.push(t);eu(t)}})}function el(e,t,n){let r=eB(C.matches,t);es(e);V({errors:{[r.route.id]:n},fetchers:new Map(C.fetchers)})}function es(e){if(R.has(e))eu(e);B.delete(e);Z.delete(e);L.delete(e);C.fetchers.delete(e)}function eu(e){let t=R.get(e);u(t,"Expected fetch controller: "+e);t.abort();R.delete(e)}function ec(e){for(let t of e){let e=ee(t);let n={state:"idle",data:e.data,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined," _hasFetcherDoneAnything ":true};C.fetchers.set(t,n)}}function ed(){let e=[];let t=false;for(let n of L){let r=C.fetchers.get(n);u(r,"Expected fetcher: "+n);if(r.state==="loading"){L.delete(n);e.push(n);t=true}}ec(e);return t}function ex(e){let t=[];for(let[n,r]of Z){if(r<e){let e=C.fetchers.get(n);u(e,"Expected fetcher: "+n);if(e.state==="loading"){eu(n);Z.delete(n);t.push(n)}}}ec(t);return t.length>0}function ew(e,t){let n=C.blockers.get(e)||eg;if(U.get(e)!==t){U.set(e,t)}return n}function eS(e){C.blockers.delete(e);U.delete(e)}function ek(e,t){let n=C.blockers.get(e)||eg;u(n.state==="unblocked"&&t.state==="blocked"||n.state==="blocked"&&t.state==="blocked"||n.state==="blocked"&&t.state==="proceeding"||n.state==="blocked"&&t.state==="unblocked"||n.state==="proceeding"&&t.state==="unblocked","Invalid blocker state transition: "+n.state+" -> "+t.state);C.blockers.set(e,t);V({blockers:new Map(C.blockers)})}function eT(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(U.size===0){return}if(U.size>1){c(false,"A router only supports one blocker at a time")}let o=Array.from(U.entries());let[i,a]=o[o.length-1];let l=C.blockers.get(i);if(l&&l.state==="proceeding"){return}if(a({currentLocation:t,nextLocation:n,historyAction:r})){return i}}function ej(e){let t=[];F.forEach((n,r)=>{if(!e||e(r)){n.cancel();t.push(r);F.delete(r)}});return t}function eD(e,t,n){g=e;v=t;m=n||(e=>e.key);if(!b&&C.navigation===eh){b=true;let e=eO(C.location,C.matches);if(e!=null){V({restoreScrollPosition:e})}}return()=>{g=null;v=null;m=null}}function eP(e,t){if(g&&m&&v){let n=t.map(e=>e4(e,C.loaderData));let r=m(e,n)||e.key;g[r]=v()}}function eO(e,t){if(g&&m&&v){let n=t.map(e=>e4(e,C.loaderData));let r=m(e,n)||e.key;let o=g[r];if(typeof o==="number"){return o}}return null}function eM(e){n={};a=w(e,t,undefined,n)}E={get basename(){return l},get state(){return C},get routes(){return i},initialize:H,subscribe:$,enableScrollRestoration:eD,navigate:Y,fetch:et,revalidate:G,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ee,deleteFetcher:es,dispose:K,getBlocker:ew,deleteBlocker:eS,_internalFetchControllers:R,_internalActiveDeferreds:F,_internalSetRoutes:eM};return E}const ew=Symbol("deferred");function eS(e,t){u(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let n={};let o=(t?t.basename:null)||"/";let i;if(t!=null&&t.mapRouteProperties){i=t.mapRouteProperties}else if(t!=null&&t.detectErrorBoundary){let e=t.detectErrorBoundary;i=t=>({hasErrorBoundary:e(t)})}else{i=eb}let a=w(e,i,undefined,n);async function l(e,t){let{requestContext:n}=t===void 0?{}:t;let i=new URL(e.url);let l=e.method;let s=p("",g(i),null,"default");let u=S(a,s,o);if(!eX(l)&&l!=="HEAD"){let e=eW(405,{method:l});let{matches:t,route:n}=eF(a);return{basename:o,location:s,matches:t,loaderData:{},actionData:null,errors:{[n.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!u){let e=eW(404,{pathname:s.pathname});let{matches:t,route:n}=eF(a);return{basename:o,location:s,matches:t,loaderData:{},actionData:null,errors:{[n.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let f=await c(e,s,u,n);if(eY(f)){return f}return r({location:s,basename:o},f)}async function s(e,t){let{routeId:n,requestContext:r}=t===void 0?{}:t;let i=new URL(e.url);let l=e.method;let s=p("",g(i),null,"default");let u=S(a,s,o);if(!eX(l)&&l!=="HEAD"&&l!=="OPTIONS"){throw eW(405,{method:l})}else if(!u){throw eW(404,{pathname:s.pathname})}let f=n?u.find(e=>e.route.id===n):e5(u,s);if(n&&!f){throw eW(403,{pathname:s.pathname,routeId:n})}else if(!f){throw eW(404,{pathname:s.pathname})}let h=await c(e,s,u,r,f);if(eY(h)){return h}let m=h.errors?Object.values(h.errors)[0]:undefined;if(m!==undefined){throw m}if(h.actionData){return Object.values(h.actionData)[0]}if(h.loaderData){var v;let e=Object.values(h.loaderData)[0];if((v=h.activeDeferreds)!=null&&v[f.route.id]){e[ew]=h.activeDeferreds[f.route.id]}return e}return undefined}async function c(e,t,n,o,i){u(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(eJ(e.method.toLowerCase())){let r=await f(e,n,i||e5(n,t),o,i!=null);return r}let a=await h(e,n,o,i);return eY(a)?a:r({},a,{actionData:null,actionHeaders:{}})}catch(e){if(eQ(e)){if(e.type===y.error&&!eG(e.response)){throw e.response}return e.response}if(eG(e)){return e}throw e}}async function f(e,t,a,l,s){let u;if(!a.route.action&&!a.route.lazy){let t=eW(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:a.route.id});if(s){throw t}u={type:y.error,error:t}}else{u=await e_("action",e,a,t,n,i,o,true,s,l);if(e.signal.aborted){let e=s?"queryRoute":"query";throw new Error(e+"() call aborted")}}if(eV(u)){throw new Response(null,{status:u.status,headers:{Location:u.location}})}if(eK(u)){let e=eW(400,{type:"defer-action"});if(s){throw e}u={type:y.error,error:e}}if(s){if(e$(u)){throw u.error}return{matches:[a],loaderData:{},actionData:{[a.route.id]:u.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(e$(u)){let n=eB(t,a.route.id);let o=await h(e,t,l,undefined,{[n.route.id]:u.error});return r({},o,{statusCode:ea(u.error)?u.error.status:500,actionData:null,actionHeaders:r({},u.headers?{[a.route.id]:u.headers}:{})})}let c=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});let f=await h(c,t,l);return r({},f,u.statusCode?{statusCode:u.statusCode}:{},{actionData:{[a.route.id]:u.data},actionHeaders:r({},u.headers?{[a.route.id]:u.headers}:{})})}async function h(e,t,a,l,s){let u=l!=null;if(u&&!(l!=null&&l.route.loader)&&!(l!=null&&l.route.lazy)){throw eW(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:l==null?void 0:l.route.id})}let c=l?[l]:ej(t,Object.keys(s||{})[0]);let f=c.filter(e=>e.route.loader||e.route.lazy);if(f.length===0){return{matches:t,loaderData:t.reduce((e,t)=>Object.assign(e,{[t.route.id]:null}),{}),errors:s||null,statusCode:200,loaderHeaders:{},activeDeferreds:null}}let h=await Promise.all([...f.map(r=>e_("loader",e,r,t,n,i,o,true,u,a))]);if(e.signal.aborted){let e=u?"queryRoute":"query";throw new Error(e+"() call aborted")}let p=new Map;let g=eN(t,f,h,s,p);let m=new Set(f.map(e=>e.route.id));t.forEach(e=>{if(!m.has(e.route.id)){g.loaderData[e.route.id]=null}});return r({},g,{matches:t,activeDeferreds:p.size>0?Object.fromEntries(p.entries()):null})}return{dataRoutes:a,query:l,queryRoute:s}}function ek(e,t,n){let o=r({},t,{statusCode:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:n}});return o}function eT(e){return e!=null&&"formData"in e}function eE(e,t,n,r,o,i,a){let l;let s;if(i!=null&&a!=="path"){l=[];for(let e of t){l.push(e);if(e.route.id===i){s=e;break}}}else{l=t;s=t[t.length-1]}let u=$(o?o:".",K(l).map(e=>e.pathnameBase),W(e.pathname,n)||e.pathname,a==="path");if(o==null){u.search=e.search;u.hash=e.hash}if((o==null||o===""||o===".")&&s&&s.route.index&&!e2(u.search)){u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"}if(r&&n!=="/"){u.pathname=u.pathname==="/"?n:q([n,u.pathname])}return g(u)}function eC(e,t,n,r){if(!r||!eT(r)){return{path:n}}if(r.formMethod&&!eX(r.formMethod)){return{path:n,error:eW(405,{method:r.formMethod})}}let o;if(r.formData){let t=r.formMethod||"get";o={formMethod:e?t.toUpperCase():t.toLowerCase(),formAction:ez(n),formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:r.formData};if(eJ(o.formMethod)){return{path:n,submission:o}}}let i=m(n);let a=eA(r.formData);if(t&&i.search&&e2(i.search)){a.append("index","")}i.search="?"+a;return{path:g(i),submission:o}}function ej(e,t){let n=e;if(t){let r=e.findIndex(e=>e.route.id===t);if(r>=0){n=e.slice(0,r)}}return n}function eI(e,t,n,o,i,a,l,s,u,c,f,h,p){let g=p?Object.values(p)[0]:h?Object.values(h)[0]:undefined;let m=e.createURL(t.location);let v=e.createURL(i);let y=p?Object.keys(p)[0]:undefined;let b=ej(n,y);let x=b.filter((e,n)=>{if(e.route.lazy){return true}if(e.route.loader==null){return false}if(eD(t.loaderData,t.matches[n],e)||l.some(t=>t===e.route.id)){return true}let i=t.matches[n];let s=e;return eO(e,r({currentUrl:m,currentParams:i.params,nextUrl:v,nextParams:s.params},o,{actionResult:g,defaultShouldRevalidate:a||m.pathname+m.search===v.pathname+v.search||m.search!==v.search||eP(i,s)}))});let w=[];u.forEach((e,i)=>{if(!n.some(t=>t.route.id===e.routeId)){return}let l=S(c,e.path,f);if(!l){w.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}let u=e5(l,e.path);if(s.includes(i)){w.push({key:i,routeId:e.routeId,path:e.path,matches:l,match:u,controller:new AbortController});return}let h=eO(u,r({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},o,{actionResult:g,defaultShouldRevalidate:a}));if(h){w.push({key:i,routeId:e.routeId,path:e.path,matches:l,match:u,controller:new AbortController})}});return[x,w]}function eD(e,t,n){let r=!t||n.route.id!==t.route.id;let o=e[n.route.id]===undefined;return r||o}function eP(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function eO(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==="boolean"){return n}}return t.defaultShouldRevalidate}async function eM(e,t,n){if(!e.lazy){return}let o=await e.lazy();if(!e.lazy){return}let i=n[e.id];u(i,"No route found in manifest");let a={};for(let e in o){let t=i[e];let n=t!==undefined&&e!=="hasErrorBoundary";c(!n,'Route "'+i.id+'" has a static property "'+e+'" '+"defined but its lazy function is also returning a value for this property. "+('The lazy route property "'+e+'" will be ignored.'));if(!n&&!b.has(e)){a[e]=o[e]}}Object.assign(i,a);Object.assign(i,r({},t(i),{lazy:undefined}))}async function e_(e,t,n,r,o,i,a,l,s,c){if(l===void 0){l=false}if(s===void 0){s=false}let f;let h;let p;let g=e=>{let r;let o=new Promise((e,t)=>r=t);p=()=>r();t.signal.addEventListener("abort",p);return Promise.race([e({request:t,params:n.params,context:c}),o])};try{let r=n.route[e];if(n.route.lazy){if(r){let e=await Promise.all([g(r),eM(n.route,i,o)]);h=e[0]}else{await eM(n.route,i,o);r=n.route[e];if(r){h=await g(r)}else if(e==="action"){let e=new URL(t.url);let r=e.pathname+e.search;throw eW(405,{method:t.method,pathname:r,routeId:n.route.id})}else{return{type:y.data,data:undefined}}}}else if(!r){let e=new URL(t.url);let n=e.pathname+e.search;throw eW(404,{pathname:n})}else{h=await g(r)}u(h!==undefined,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(e){f=y.error;h=e}finally{if(p){t.signal.removeEventListener("abort",p)}}if(eY(h)){let e=h.status;if(ed.has(e)){let o=h.headers.get("Location");u(o,"Redirects returned/thrown from loaders/actions must have a Location header");if(!em.test(o)){o=eE(new URL(t.url),r.slice(0,r.indexOf(n)+1),a,true,o)}else if(!l){let e=new URL(t.url);let n=o.startsWith("//")?new URL(e.protocol+o):new URL(o);let r=W(n.pathname,a)!=null;if(n.origin===e.origin&&r){o=n.pathname+n.search+n.hash}}if(l){h.headers.set("Location",o);throw h}return{type:y.redirect,status:e,location:o,revalidate:h.headers.get("X-Remix-Revalidate")!==null}}if(s){throw{type:f||y.data,response:h}}let o;let i=h.headers.get("Content-Type");if(i&&/\bapplication\/json\b/.test(i)){o=await h.json()}else{o=await h.text()}if(f===y.error){return{type:f,error:new ei(e,h.statusText,o),headers:h.headers}}return{type:y.data,data:o,statusCode:h.status,headers:h.headers}}if(f===y.error){return{type:f,error:h}}if(eq(h)){var m,v;return{type:y.deferred,deferredData:h,statusCode:(m=h.init)==null?void 0:m.status,headers:((v=h.init)==null?void 0:v.headers)&&new Headers(h.init.headers)}}return{type:y.data,data:h}}function eR(e,t,n,r){let o=e.createURL(ez(t)).toString();let i={signal:n};if(r&&eJ(r.formMethod)){let{formMethod:e,formEncType:t,formData:n}=r;i.method=e.toUpperCase();i.body=t==="application/x-www-form-urlencoded"?eA(n):n}return new Request(o,i)}function eA(e){let t=new URLSearchParams;for(let[n,r]of e.entries()){t.append(n,r instanceof File?r.name:r)}return t}function eN(e,t,n,r,o){let i={};let a=null;let l;let s=false;let c={};n.forEach((n,f)=>{let h=t[f].route.id;u(!eV(n),"Cannot handle redirect results in processLoaderData");if(e$(n)){let t=eB(e,h);let o=n.error;if(r){o=Object.values(r)[0];r=undefined}a=a||{};if(a[t.route.id]==null){a[t.route.id]=o}i[h]=undefined;if(!s){s=true;l=ea(n.error)?n.error.status:500}if(n.headers){c[h]=n.headers}}else{if(eK(n)){o.set(h,n.deferredData);i[h]=n.deferredData.data}else{i[h]=n.data}if(n.statusCode!=null&&n.statusCode!==200&&!s){l=n.statusCode}if(n.headers){c[h]=n.headers}}});if(r){a=r;i[Object.keys(r)[0]]=undefined}return{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:c}}function eZ(e,t,n,o,i,a,l,s){let{loaderData:c,errors:f}=eN(t,n,o,i,s);for(let t=0;t<a.length;t++){let{key:n,match:o,controller:i}=a[t];u(l!==undefined&&l[t]!==undefined,"Did not find corresponding fetcher result");let s=l[t];if(i&&i.signal.aborted){continue}else if(e$(s)){let t=eB(e.matches,o==null?void 0:o.route.id);if(!(f&&f[t.route.id])){f=r({},f,{[t.route.id]:s.error})}e.fetchers.delete(n)}else if(eV(s)){u(false,"Unhandled fetcher revalidation redirect")}else if(eK(s)){u(false,"Unhandled fetcher deferred data")}else{let t={state:"idle",data:s.data,formMethod:undefined,formAction:undefined,formEncType:undefined,formData:undefined," _hasFetcherDoneAnything ":true};e.fetchers.set(n,t)}}return{loaderData:c,errors:f}}function eL(e,t,n,o){let i=r({},t);for(let r of n){let n=r.route.id;if(t.hasOwnProperty(n)){if(t[n]!==undefined){i[n]=t[n]}}else if(e[n]!==undefined&&r.route.loader){i[n]=e[n]}if(o&&o.hasOwnProperty(n)){break}}return i}function eB(e,t){let n=t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e];return n.reverse().find(e=>e.route.hasErrorBoundary===true)||e[0]}function eF(e){let t=e.find(e=>e.index||!e.path||e.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eW(e,t){let{pathname:n,routeId:r,method:o,type:i}=t===void 0?{}:t;let a="Unknown Server Error";let l="Unknown @remix-run/router error";if(e===400){a="Bad Request";if(o&&n&&r){l="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request."}else if(i==="defer-action"){l="defer() is not supported in actions"}}else if(e===403){a="Forbidden";l='Route "'+r+'" does not match URL "'+n+'"'}else if(e===404){a="Not Found";l='No route matches URL "'+n+'"'}else if(e===405){a="Method Not Allowed";if(o&&n&&r){l="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request."}else if(o){l='Invalid request method "'+o.toUpperCase()+'"'}}return new ei(e||500,a,new Error(l),true)}function eU(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(eV(n)){return n}}}function ez(e){let t=typeof e==="string"?m(e):e;return g(r({},t,{hash:""}))}function eH(e,t){if(e.pathname!==t.pathname||e.search!==t.search){return false}if(e.hash===""){return t.hash!==""}else if(e.hash===t.hash){return true}else if(t.hash!==""){return true}return false}function eK(e){return e.type===y.deferred}function e$(e){return e.type===y.error}function eV(e){return(e&&e.type)===y.redirect}function eq(e){let t=e;return t&&typeof t==="object"&&typeof t.data==="object"&&typeof t.subscribe==="function"&&typeof t.cancel==="function"&&typeof t.resolveData==="function"}function eY(e){return e!=null&&typeof e.status==="number"&&typeof e.statusText==="string"&&typeof e.headers==="object"&&typeof e.body!=="undefined"}function eG(e){if(!eY(e)){return false}let t=e.status;let n=e.headers.get("Location");return t>=300&&t<=399&&n!=null}function eQ(e){return e&&eY(e.response)&&(e.type===y.data||y.error)}function eX(e){return ec.has(e.toLowerCase())}function eJ(e){return es.has(e.toLowerCase())}async function e0(e,t,n,r,o,i){for(let a=0;a<n.length;a++){let l=n[a];let s=t[a];if(!s){continue}let c=e.find(e=>e.route.id===s.route.id);let f=c!=null&&!eP(c,s)&&(i&&i[s.route.id])!==undefined;if(eK(l)&&(o||f)){let e=r[a];u(e,"Expected an AbortSignal for revalidating fetcher deferred result");await e1(l,e,o).then(e=>{if(e){n[a]=e||n[a]}})}}}async function e1(e,t,n){if(n===void 0){n=false}let r=await e.deferredData.resolveData(t);if(r){return}if(n){try{return{type:y.data,data:e.deferredData.unwrappedData}}catch(e){return{type:y.error,error:e}}}return{type:y.data,data:e.deferredData.data}}function e2(e){return new URLSearchParams(e).getAll("index").some(e=>e==="")}function e4(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function e5(e,t){let n=typeof t==="string"?m(t).search:t.search;if(e[e.length-1].route.index&&e2(n||"")){return e[e.length-1]}let r=K(e);return r[r.length-1]}},66111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=a;var r=n(60357);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,o.default)(e)}e.exports=t["default"]},68052:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=r;var n=/-webkit-|-moz-|-ms-/;function r(e){return typeof e==="string"&&n.test(e)}e.exports=t["default"]},15717:function(e,t,n){"use strict";n.d(t,{Z:function(){return $}});var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var o=function e(e,t,n){var o;var i=r[e];if(typeof i==="string"){o=i}else if(t===1){o=i.one}else{o=i.other.replace("{{count}}",t.toString())}if(n!==null&&n!==void 0&&n.addSuffix){if(n.comparison&&n.comparison>0){return"in "+o}else{return o+" ago"}}return o};var i=o;function a(e){return function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=t.width?String(t.width):e.defaultWidth;var r=e.formats[n]||e.formats[e.defaultWidth];return r}};var l={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"};var s={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"};var u={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"};var c={date:a({formats:l,defaultWidth:"full"}),time:a({formats:s,defaultWidth:"full"}),dateTime:a({formats:u,defaultWidth:"full"})};var f=c;var h={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var p=function e(e,t,n,r){return h[e]};var g=p;function m(e){return function(t,n){var r=n!==null&&n!==void 0&&n.context?String(n.context):"standalone";var o;if(r==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth;var a=n!==null&&n!==void 0&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{var l=e.defaultWidth;var s=n!==null&&n!==void 0&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[l]}var u=e.argumentCallback?e.argumentCallback(t):t;return o[u]}};var v={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]};var y={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]};var b={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]};var x={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]};var w={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}};var S={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};var k=function e(e,t){var n=Number(e);var r=n%100;if(r>20||r<10){switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}}return n+"th"};var T={ordinalNumber:k,era:m({values:v,defaultWidth:"wide"}),quarter:m({values:y,defaultWidth:"wide",argumentCallback:function e(e){return e-1}}),month:m({values:b,defaultWidth:"wide"}),day:m({values:x,defaultWidth:"wide"}),dayPeriod:m({values:w,defaultWidth:"wide",formattingValues:S,defaultFormattingWidth:"wide"})};var E=T;function C(e){return function(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=n.width;var o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth];var i=t.match(o);if(!i){return null}var a=i[0];var l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth];var s=Array.isArray(l)?I(l,function(e){return e.test(a)}):j(l,function(e){return e.test(a)});var u;u=e.valueCallback?e.valueCallback(s):s;u=n.valueCallback?n.valueCallback(u):u;var c=t.slice(a.length);return{value:u,rest:c}}}function j(e,t){for(var n in e){if(e.hasOwnProperty(n)&&t(e[n])){return n}}return undefined}function I(e,t){for(var n=0;n<e.length;n++){if(t(e[n])){return n}}return undefined};function D(e){return function(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var r=t.match(e.matchPattern);if(!r)return null;var o=r[0];var i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;var l=t.slice(o.length);return{value:a,rest:l}}};var P=/^(\d+)(th|st|nd|rd)?/i;var O=/\d+/i;var M={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i};var _={any:[/^b/i,/^(a|c)/i]};var R={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i};var A={any:[/1/i,/2/i,/3/i,/4/i]};var N={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i};var Z={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]};var L={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i};var B={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]};var F={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i};var W={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}};var U={ordinalNumber:D({matchPattern:P,parsePattern:O,valueCallback:function e(e){return parseInt(e,10)}}),era:C({matchPatterns:M,defaultMatchWidth:"wide",parsePatterns:_,defaultParseWidth:"any"}),quarter:C({matchPatterns:R,defaultMatchWidth:"wide",parsePatterns:A,defaultParseWidth:"any",valueCallback:function e(e){return e+1}}),month:C({matchPatterns:N,defaultMatchWidth:"wide",parsePatterns:Z,defaultParseWidth:"any"}),day:C({matchPatterns:L,defaultMatchWidth:"wide",parsePatterns:B,defaultParseWidth:"any"}),dayPeriod:C({matchPatterns:F,defaultMatchWidth:"any",parsePatterns:W,defaultParseWidth:"any"})};var z=U;var H={code:"en-US",formatDistance:i,formatLong:f,formatRelative:g,localize:E,match:z,options:{weekStartsOn:0,firstWeekContainsDate:1}};var K=H;var $=K},8064:function(e,t,n){"use strict";n.d(t,{j:function(){return o}});var r={};function o(){return r}function i(e){r=e}},48187:function(e,t){"use strict";var n=function e(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"})}};var r=function e(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 o=function e(e,t){var o=e.match(/(P+)(p+)?/)||[];var i=o[1];var a=o[2];if(!a){return n(e,t)}var l;switch(i){case"P":l=t.dateTime({width:"short"});break;case"PP":l=t.dateTime({width:"medium"});break;case"PPP":l=t.dateTime({width:"long"});break;case"PPPP":default:l=t.dateTime({width:"full"});break}return l.replace("{{date}}",n(i,t)).replace("{{time}}",r(a,t))};var i={p:r,P:o};t.Z=i},33989:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));t.setUTCFullYear(e.getFullYear());return e.getTime()-t.getTime()}},7993:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(2864);var o=n(56925);var i=n(99340);var a=n(78354);function l(e){(0,a.Z)(1,arguments);var t=(0,i.Z)(e);var n=new Date(0);n.setUTCFullYear(t,0,4);n.setUTCHours(0,0,0,0);var r=(0,o.Z)(n);return r};var s=6048e5;function u(e){(0,a.Z)(1,arguments);var t=(0,r.Z)(e);var n=(0,o.Z)(t).getTime()-l(t).getTime();return Math.round(n/s)+1}},99340:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(2864);var o=n(78354);var i=n(56925);function a(e){(0,o.Z)(1,arguments);var t=(0,r.Z)(e);var n=t.getUTCFullYear();var a=new Date(0);a.setUTCFullYear(n+1,0,4);a.setUTCHours(0,0,0,0);var l=(0,i.Z)(a);var s=new Date(0);s.setUTCFullYear(n,0,4);s.setUTCHours(0,0,0,0);var u=(0,i.Z)(s);if(t.getTime()>=l.getTime()){return n+1}else if(t.getTime()>=u.getTime()){return n}else{return n-1}}},26168:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(2864);var o=n(87147);var i=n(72493);var a=n(78354);var l=n(71578);var s=n(8064);function u(e,t){var n,r,u,c,f,h,p,g;(0,a.Z)(1,arguments);var m=(0,s.j)();var v=(0,l.Z)((n=(r=(u=(c=t===null||t===void 0?void 0:t.firstWeekContainsDate)!==null&&c!==void 0?c:t===null||t===void 0?void 0:(f=t.locale)===null||f===void 0?void 0:(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&u!==void 0?u:m.firstWeekContainsDate)!==null&&r!==void 0?r:(p=m.locale)===null||p===void 0?void 0:(g=p.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&n!==void 0?n:1);var y=(0,i.Z)(e,t);var b=new Date(0);b.setUTCFullYear(y,0,v);b.setUTCHours(0,0,0,0);var x=(0,o.Z)(b,t);return x};var c=6048e5;function f(e,t){(0,a.Z)(1,arguments);var n=(0,r.Z)(e);var i=(0,o.Z)(n,t).getTime()-u(n,t).getTime();return Math.round(i/c)+1}},72493:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(2864);var o=n(78354);var i=n(87147);var a=n(71578);var l=n(8064);function s(e,t){var n,s,u,c,f,h,p,g;(0,o.Z)(1,arguments);var m=(0,r.Z)(e);var v=m.getUTCFullYear();var y=(0,l.j)();var b=(0,a.Z)((n=(s=(u=(c=t===null||t===void 0?void 0:t.firstWeekContainsDate)!==null&&c!==void 0?c:t===null||t===void 0?void 0:(f=t.locale)===null||f===void 0?void 0:(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&u!==void 0?u:y.firstWeekContainsDate)!==null&&s!==void 0?s:(p=y.locale)===null||p===void 0?void 0:(g=p.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(b>=1&&b<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var x=new Date(0);x.setUTCFullYear(v+1,0,b);x.setUTCHours(0,0,0,0);var w=(0,i.Z)(x,t);var S=new Date(0);S.setUTCFullYear(v,0,b);S.setUTCHours(0,0,0,0);var k=(0,i.Z)(S,t);if(m.getTime()>=w.getTime()){return v+1}else if(m.getTime()>=k.getTime()){return v}else{return v-1}}},21161:function(e,t,n){"use strict";n.d(t,{Do:function(){return a},Iu:function(){return i},qp:function(){return l}});var r=["D","DD"];var o=["YY","YYYY"];function i(e){return r.indexOf(e)!==-1}function a(e){return o.indexOf(e)!==-1}function l(e,t,n){if(e==="YYYY"){throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="YY"){throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="D"){throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}else if(e==="DD"){throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}}},78354:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e,t){if(t.length<e){throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}}},56925:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2864);var o=n(78354);function i(e){(0,o.Z)(1,arguments);var t=1;var n=(0,r.Z)(e);var i=n.getUTCDay();var a=(i<t?7:0)+i-t;n.setUTCDate(n.getUTCDate()-a);n.setUTCHours(0,0,0,0);return n}},87147:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(2864);var o=n(78354);var i=n(71578);var a=n(8064);function l(e,t){var n,l,s,u,c,f,h,p;(0,o.Z)(1,arguments);var g=(0,a.j)();var m=(0,i.Z)((n=(l=(s=(u=t===null||t===void 0?void 0:t.weekStartsOn)!==null&&u!==void 0?u:t===null||t===void 0?void 0:(c=t.locale)===null||c===void 0?void 0:(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&s!==void 0?s:g.weekStartsOn)!==null&&l!==void 0?l:(h=g.locale)===null||h===void 0?void 0:(p=h.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&n!==void 0?n:0);if(!(m>=0&&m<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var v=(0,r.Z)(e);var y=v.getUTCDay();var b=(y<m?7:0)+y-m;v.setUTCDate(v.getUTCDate()-b);v.setUTCHours(0,0,0,0);return v}},71578:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){if(e===null||e===true||e===false){return NaN}var t=Number(e);if(isNaN(t)){return t}return t<0?Math.ceil(t):Math.floor(t)}},82862:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(71578);var o=n(2864);var i=n(78354);function a(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e);var a=(0,r.Z)(t);if(isNaN(a)){return new Date(NaN)}if(!a){return n}n.setDate(n.getDate()+a);return n}},69939:function(e,t,n){"use strict";n.d(t,{qk:function(){return s},vh:function(){return l},yJ:function(){return a}});var r=7;var o=365.2425;var i=Math.pow(10,8)*24*60*60*1e3;var a=6e4;var l=36e5;var s=1e3;var u=-i;var c=60;var f=3;var h=12;var p=4;var g=3600;var m=60;var v=g*24;var y=v*7;var b=v*o;var x=b/12;var w=x*3},79982:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var r=n(25432);var o=n(94352);var i=n(2864);var a=n(78354);var l=864e5;function s(e){(0,a.Z)(1,arguments);var t=(0,i.Z)(e);var n=t.getTime();t.setUTCMonth(0,1);t.setUTCHours(0,0,0,0);var r=t.getTime();var o=n-r;return Math.floor(o/l)+1}var u=n(7993);var c=n(99340);var f=n(26168);var h=n(72493);function p(e,t){var n=e<0?"-":"";var r=Math.abs(e).toString();while(r.length<t){r="0"+r}return n+r};var g={y:function e(e,t){var n=e.getUTCFullYear();var r=n>0?n:1-n;return p(t==="yy"?r%100:r,t.length)},M:function e(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):p(n+1,2)},d:function e(e,t){return p(e.getUTCDate(),t.length)},a:function e(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function e(e,t){return p(e.getUTCHours()%12||12,t.length)},H:function e(e,t){return p(e.getUTCHours(),t.length)},m:function e(e,t){return p(e.getUTCMinutes(),t.length)},s:function e(e,t){return p(e.getUTCSeconds(),t.length)},S:function e(e,t){var n=t.length;var r=e.getUTCMilliseconds();var o=Math.floor(r*Math.pow(10,n-3));return p(o,t.length)}};var m=g;var v={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"};var y={G:function e(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function e(e,t,n){if(t==="yo"){var r=e.getUTCFullYear();var o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return m.y(e,t)},Y:function e(e,t,n,r){var o=(0,h.Z)(e,r);var i=o>0?o:1-o;if(t==="YY"){var a=i%100;return p(a,2)}if(t==="Yo"){return n.ordinalNumber(i,{unit:"year"})}return p(i,t.length)},R:function e(e,t){var n=(0,c.Z)(e);return p(n,t.length)},u:function e(e,t){var n=e.getUTCFullYear();return p(n,t.length)},Q:function e(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return p(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function e(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return p(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function e(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return m.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function e(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return p(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function e(e,t,n,r){var o=(0,f.Z)(e,r);if(t==="wo"){return n.ordinalNumber(o,{unit:"week"})}return p(o,t.length)},I:function e(e,t,n){var r=(0,u.Z)(e);if(t==="Io"){return n.ordinalNumber(r,{unit:"week"})}return p(r,t.length)},d:function e(e,t,n){if(t==="do"){return n.ordinalNumber(e.getUTCDate(),{unit:"date"})}return m.d(e,t)},D:function e(e,t,n){var r=s(e);if(t==="Do"){return n.ordinalNumber(r,{unit:"dayOfYear"})}return p(r,t.length)},E:function e(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function e(e,t,n,r){var o=e.getUTCDay();var i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return p(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function e(e,t,n,r){var o=e.getUTCDay();var i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return p(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function e(e,t,n){var r=e.getUTCDay();var o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return p(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function e(e,t,n){var r=e.getUTCHours();var o=r/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function e(e,t,n){var r=e.getUTCHours();var o;if(r===12){o=v.noon}else if(r===0){o=v.midnight}else{o=r/12>=1?"pm":"am"}switch(t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function e(e,t,n){var r=e.getUTCHours();var o;if(r>=17){o=v.evening}else if(r>=12){o=v.afternoon}else if(r>=4){o=v.morning}else{o=v.night}switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function e(e,t,n){if(t==="ho"){var r=e.getUTCHours()%12;if(r===0)r=12;return n.ordinalNumber(r,{unit:"hour"})}return m.h(e,t)},H:function e(e,t,n){if(t==="Ho"){return n.ordinalNumber(e.getUTCHours(),{unit:"hour"})}return m.H(e,t)},K:function e(e,t,n){var r=e.getUTCHours()%12;if(t==="Ko"){return n.ordinalNumber(r,{unit:"hour"})}return p(r,t.length)},k:function e(e,t,n){var r=e.getUTCHours();if(r===0)r=24;if(t==="ko"){return n.ordinalNumber(r,{unit:"hour"})}return p(r,t.length)},m:function e(e,t,n){if(t==="mo"){return n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"})}return m.m(e,t)},s:function e(e,t,n){if(t==="so"){return n.ordinalNumber(e.getUTCSeconds(),{unit:"second"})}return m.s(e,t)},S:function e(e,t){return m.S(e,t)},X:function e(e,t,n,r){var o=r._originalDate||e;var i=o.getTimezoneOffset();if(i===0){return"Z"}switch(t){case"X":return x(i);case"XXXX":case"XX":return w(i);case"XXXXX":case"XXX":default:return w(i,":")}},x:function e(e,t,n,r){var o=r._originalDate||e;var i=o.getTimezoneOffset();switch(t){case"x":return x(i);case"xxxx":case"xx":return w(i);case"xxxxx":case"xxx":default:return w(i,":")}},O:function e(e,t,n,r){var o=r._originalDate||e;var i=o.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+b(i,":");case"OOOO":default:return"GMT"+w(i,":")}},z:function e(e,t,n,r){var o=r._originalDate||e;var i=o.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+b(i,":");case"zzzz":default:return"GMT"+w(i,":")}},t:function e(e,t,n,r){var o=r._originalDate||e;var i=Math.floor(o.getTime()/1e3);return p(i,t.length)},T:function e(e,t,n,r){var o=r._originalDate||e;var i=o.getTime();return p(i,t.length)}};function b(e,t){var n=e>0?"-":"+";var r=Math.abs(e);var o=Math.floor(r/60);var i=r%60;if(i===0){return n+String(o)}var a=t||"";return n+String(o)+a+p(i,2)}function x(e,t){if(e%60===0){var n=e>0?"-":"+";return n+p(Math.abs(e)/60,2)}return w(e,t)}function w(e,t){var n=t||"";var r=e>0?"-":"+";var o=Math.abs(e);var i=p(Math.floor(o/60),2);var a=p(o%60,2);return r+i+n+a}var S=y;var k=n(48187);var T=n(33989);var E=n(21161);var C=n(71578);var j=n(8064);var I=n(15717);var D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;var P=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;var O=/^'([^]*?)'?$/;var M=/''/g;var _=/[a-zA-Z]/;function R(e,t,n){var l,s,u,c,f,h,p,g,m,v,y,b,x,w,O,M,R,N;(0,a.Z)(2,arguments);var Z=String(t);var L=(0,j.j)();var B=(l=(s=n===null||n===void 0?void 0:n.locale)!==null&&s!==void 0?s:L.locale)!==null&&l!==void 0?l:I.Z;var F=(0,C.Z)((u=(c=(f=(h=n===null||n===void 0?void 0:n.firstWeekContainsDate)!==null&&h!==void 0?h:n===null||n===void 0?void 0:(p=n.locale)===null||p===void 0?void 0:(g=p.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&f!==void 0?f:L.firstWeekContainsDate)!==null&&c!==void 0?c:(m=L.locale)===null||m===void 0?void 0:(v=m.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&u!==void 0?u:1);if(!(F>=1&&F<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var W=(0,C.Z)((y=(b=(x=(w=n===null||n===void 0?void 0:n.weekStartsOn)!==null&&w!==void 0?w:n===null||n===void 0?void 0:(O=n.locale)===null||O===void 0?void 0:(M=O.options)===null||M===void 0?void 0:M.weekStartsOn)!==null&&x!==void 0?x:L.weekStartsOn)!==null&&b!==void 0?b:(R=L.locale)===null||R===void 0?void 0:(N=R.options)===null||N===void 0?void 0:N.weekStartsOn)!==null&&y!==void 0?y:0);if(!(W>=0&&W<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}if(!B.localize){throw new RangeError("locale must contain localize property")}if(!B.formatLong){throw new RangeError("locale must contain formatLong property")}var U=(0,i.Z)(e);if(!(0,r.Z)(U)){throw new RangeError("Invalid time value")}var z=(0,T.Z)(U);var H=(0,o.Z)(U,z);var K={firstWeekContainsDate:F,weekStartsOn:W,locale:B,_originalDate:U};var $=Z.match(P).map(function(e){var t=e[0];if(t==="p"||t==="P"){var n=k.Z[t];return n(e,B.formatLong)}return e}).join("").match(D).map(function(r){if(r==="''"){return"'"}var o=r[0];if(o==="'"){return A(r)}var i=S[o];if(i){if(!(n!==null&&n!==void 0&&n.useAdditionalWeekYearTokens)&&(0,E.Do)(r)){(0,E.qp)(r,t,String(e))}if(!(n!==null&&n!==void 0&&n.useAdditionalDayOfYearTokens)&&(0,E.Iu)(r)){(0,E.qp)(r,t,String(e))}return i(H,r,B.localize,K)}if(o.match(_)){throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`")}return r}).join("");return $}function A(e){var t=e.match(O);if(!t){return e}return t[1].replace(M,"'")}},25432:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(86522);var o=n(78354);function i(e){(0,o.Z)(1,arguments);return e instanceof Date||(0,r.Z)(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}var a=n(2864);function l(e){(0,o.Z)(1,arguments);if(!i(e)&&typeof e!=="number"){return false}var t=(0,a.Z)(e);return!isNaN(Number(t))}},8780:function(e,t,n){"use strict";n.d(t,{Z:function(){return eU}});var r=n(86522);function o(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r};function i(e,t){if(!e)return;if(typeof e==="string")return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor)n=e.constructor.name;if(n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)};function a(e,t){var n=typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&typeof e.length==="number"){if(n)e=n;var r=0;var o=function e(){};return{s:o,n:function t(){if(r>=e.length)return{done:true};return{done:false,value:e[r++]}},e:function e(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a=true,l=false,s;return{s:function t(){n=n.call(e)},n:function e(){var e=n.next();a=e.done;return e},e:function e(e){l=true;s=e},f:function e(){try{if(!a&&n["return"]!=null)n["return"]()}finally{if(l)throw s}}}}var l=n(15717);var s=n(94352);var u=n(2864);function c(e,t){if(e==null){throw new TypeError("assign requires that input parameter not be null or undefined")}for(var n in t){if(Object.prototype.hasOwnProperty.call(t,n)){;e[n]=t[n]}}return e}var f=n(48187);var h=n(33989);var p=n(21161);var g=n(71578);var m=n(78354);var v=n(80753);var y=n(88960);function b(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function")}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:true,configurable:true}});Object.defineProperty(e,"prototype",{writable:false});if(t)(0,y.Z)(e,t)};function x(e){x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function e(e){return e.__proto__||Object.getPrototypeOf(e)};return x(e)};function w(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true}catch(e){return false}};function S(e,t){if(t&&((0,r.Z)(t)==="object"||typeof t==="function")){return t}else if(t!==void 0){throw new TypeError("Derived constructors may only return object or undefined")}return(0,v.Z)(e)};function k(e){var t=w();return function n(){var n=x(e),r;if(t){var o=x(this).constructor;r=Reflect.construct(n,arguments,o)}else{r=n.apply(this,arguments)}return S(this,r)}};function T(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var E=n(45850);function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,(0,E.Z)(r.key),r)}}function j(e,t,n){if(t)C(e.prototype,t);if(n)C(e,n);Object.defineProperty(e,"prototype",{writable:false});return e}var I=n(56666);var D=10;var P=function(){function e(){T(this,e);(0,I.Z)(this,"priority",void 0);(0,I.Z)(this,"subPriority",0)}j(e,[{key:"validate",value:function e(e,t){return true}}]);return e}();var O=function(e){b(n,e);var t=k(n);function n(e,r,o,i,a){var l;T(this,n);l=t.call(this);l.value=e;l.validateValue=r;l.setValue=o;l.priority=i;if(a){l.subPriority=a}return l}j(n,[{key:"validate",value:function e(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function e(e,t,n){return this.setValue(e,t,this.value,n)}}]);return n}(P);var M=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",D);(0,I.Z)((0,v.Z)(e),"subPriority",-1);return e}j(n,[{key:"set",value:function e(e,t){if(t.timestampIsSet){return e}var n=new Date(0);n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate());n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return n}}]);return n}(P);var _=function(){function e(){T(this,e);(0,I.Z)(this,"incompatibleTokens",void 0);(0,I.Z)(this,"priority",void 0);(0,I.Z)(this,"subPriority",void 0)}j(e,[{key:"run",value:function e(e,t,n,r){var o=this.parse(e,t,n,r);if(!o){return null}return{setter:new O(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}}},{key:"validate",value:function e(e,t,n){return true}}]);return e}();var R=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",140);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["R","u","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function e(e,t,n){t.era=n;e.setUTCFullYear(n,0,1);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var A=n(69939);var N={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/};var Z={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function L(e,t){if(!e){return e}return{value:t(e.value),rest:e.rest}}function B(e,t){var n=t.match(e);if(!n){return null}return{value:parseInt(n[0],10),rest:t.slice(n[0].length)}}function F(e,t){var n=t.match(e);if(!n){return null}if(n[0]==="Z"){return{value:0,rest:t.slice(1)}}var r=n[1]==="+"?1:-1;var o=n[2]?parseInt(n[2],10):0;var i=n[3]?parseInt(n[3],10):0;var a=n[5]?parseInt(n[5],10):0;return{value:r*(o*A.vh+i*A.yJ+a*A.qk),rest:t.slice(n[0].length)}}function W(e){return B(N.anyDigitsSigned,e)}function U(e,t){switch(e){case 1:return B(N.singleDigit,t);case 2:return B(N.twoDigits,t);case 3:return B(N.threeDigits,t);case 4:return B(N.fourDigits,t);default:return B(new RegExp("^\\d{1,"+e+"}"),t)}}function z(e,t){switch(e){case 1:return B(N.singleDigitSigned,t);case 2:return B(N.twoDigitsSigned,t);case 3:return B(N.threeDigitsSigned,t);case 4:return B(N.fourDigitsSigned,t);default:return B(new RegExp("^-?\\d{1,"+e+"}"),t)}}function H(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function K(e,t){var n=t>0;var r=n?t:1-t;var o;if(r<=50){o=e||100}else{var i=r+50;var a=Math.floor(i/100)*100;var l=e>=i%100;o=e+a-(l?100:0)}return n?o:1-o}function $(e){return e%400===0||e%4===0&&e%100!==0};var V=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",130);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){var r=function e(e){return{year:e,isTwoDigitYear:t==="yy"}};switch(t){case"y":return L(U(4,e),r);case"yo":return L(n.ordinalNumber(e,{unit:"year"}),r);default:return L(U(t.length,e),r)}}},{key:"validate",value:function e(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function e(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var o=K(n.year,r);e.setUTCFullYear(o,0,1);e.setUTCHours(0,0,0,0);return e}var i=!("era"in t)||t.era===1?n.year:1-n.year;e.setUTCFullYear(i,0,1);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var q=n(72493);var Y=n(87147);var G=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",130);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){var r=function e(e){return{year:e,isTwoDigitYear:t==="YY"}};switch(t){case"Y":return L(U(4,e),r);case"Yo":return L(n.ordinalNumber(e,{unit:"year"}),r);default:return L(U(t.length,e),r)}}},{key:"validate",value:function e(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function e(e,t,n,r){var o=(0,q.Z)(e,r);if(n.isTwoDigitYear){var i=K(n.year,o);e.setUTCFullYear(i,0,r.firstWeekContainsDate);e.setUTCHours(0,0,0,0);return(0,Y.Z)(e,r)}var a=!("era"in t)||t.era===1?n.year:1-n.year;e.setUTCFullYear(a,0,r.firstWeekContainsDate);e.setUTCHours(0,0,0,0);return(0,Y.Z)(e,r)}}]);return n}(_);var Q=n(56925);var X=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",130);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t){if(t==="R"){return z(4,e)}return z(t.length,e)}},{key:"set",value:function e(e,t,n){var r=new Date(0);r.setUTCFullYear(n,0,4);r.setUTCHours(0,0,0,0);return(0,Q.Z)(r)}}]);return n}(_);var J=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",130);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t){if(t==="u"){return z(4,e)}return z(t.length,e)}},{key:"set",value:function e(e,t,n){e.setUTCFullYear(n,0,1);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var ee=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",120);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"Q":case"QQ":return U(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function e(e,t){return t>=1&&t<=4}},{key:"set",value:function e(e,t,n){e.setUTCMonth((n-1)*3,1);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var et=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",120);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"q":case"qq":return U(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function e(e,t){return t>=1&&t<=4}},{key:"set",value:function e(e,t,n){e.setUTCMonth((n-1)*3,1);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var en=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);(0,I.Z)((0,v.Z)(e),"priority",110);return e}j(n,[{key:"parse",value:function e(e,t,n){var r=function e(e){return e-1};switch(t){case"M":return L(B(N.month,e),r);case"MM":return L(U(2,e),r);case"Mo":return L(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function e(e,t){return t>=0&&t<=11}},{key:"set",value:function e(e,t,n){e.setUTCMonth(n,1);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var er=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",110);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){var r=function e(e){return e-1};switch(t){case"L":return L(B(N.month,e),r);case"LL":return L(U(2,e),r);case"Lo":return L(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function e(e,t){return t>=0&&t<=11}},{key:"set",value:function e(e,t,n){e.setUTCMonth(n,1);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var eo=n(26168);function ei(e,t,n){(0,m.Z)(2,arguments);var r=(0,u.Z)(e);var o=(0,g.Z)(t);var i=(0,eo.Z)(r,n)-o;r.setUTCDate(r.getUTCDate()-i*7);return r};var ea=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",100);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"w":return B(N.week,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=1&&t<=53}},{key:"set",value:function e(e,t,n,r){return(0,Y.Z)(ei(e,n,r),r)}}]);return n}(_);var el=n(7993);function es(e,t){(0,m.Z)(2,arguments);var n=(0,u.Z)(e);var r=(0,g.Z)(t);var o=(0,el.Z)(n)-r;n.setUTCDate(n.getUTCDate()-o*7);return n};var eu=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",100);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"I":return B(N.week,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=1&&t<=53}},{key:"set",value:function e(e,t,n){return(0,Q.Z)(es(e,n))}}]);return n}(_);var ec=[31,28,31,30,31,30,31,31,30,31,30,31];var ed=[31,29,31,30,31,30,31,31,30,31,30,31];var ef=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",90);(0,I.Z)((0,v.Z)(e),"subPriority",1);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"d":return B(N.date,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){var n=e.getUTCFullYear();var r=$(n);var o=e.getUTCMonth();if(r){return t>=1&&t<=ed[o]}else{return t>=1&&t<=ec[o]}}},{key:"set",value:function e(e,t,n){e.setUTCDate(n);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var eh=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",90);(0,I.Z)((0,v.Z)(e),"subpriority",1);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"D":case"DD":return B(N.dayOfYear,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){var n=e.getUTCFullYear();var r=$(n);if(r){return t>=1&&t<=366}else{return t>=1&&t<=365}}},{key:"set",value:function e(e,t,n){e.setUTCMonth(0,n);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var ep=n(8064);function eg(e,t,n){var r,o,i,a,l,s,c,f;(0,m.Z)(2,arguments);var h=(0,ep.j)();var p=(0,g.Z)((r=(o=(i=(a=n===null||n===void 0?void 0:n.weekStartsOn)!==null&&a!==void 0?a:n===null||n===void 0?void 0:(l=n.locale)===null||l===void 0?void 0:(s=l.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:h.weekStartsOn)!==null&&o!==void 0?o:(c=h.locale)===null||c===void 0?void 0:(f=c.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&r!==void 0?r:0);if(!(p>=0&&p<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}var v=(0,u.Z)(e);var y=(0,g.Z)(t);var b=v.getUTCDay();var x=y%7;var w=(x+7)%7;var S=(w<p?7:0)+y-b;v.setUTCDate(v.getUTCDate()+S);return v};var em=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",90);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["D","i","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function e(e,t){return t>=0&&t<=6}},{key:"set",value:function e(e,t,n,r){e=eg(e,n,r);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var ev=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",90);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n,r){var o=function e(e){var t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return L(U(t.length,e),o);case"eo":return L(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function e(e,t){return t>=0&&t<=6}},{key:"set",value:function e(e,t,n,r){e=eg(e,n,r);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var ey=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",90);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n,r){var o=function e(e){var t=Math.floor((e-1)/7)*7;return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return L(U(t.length,e),o);case"co":return L(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function e(e,t){return t>=0&&t<=6}},{key:"set",value:function e(e,t,n,r){e=eg(e,n,r);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);function eb(e,t){(0,m.Z)(2,arguments);var n=(0,g.Z)(t);if(n%7===0){n=n-7}var r=1;var o=(0,u.Z)(e);var i=o.getUTCDay();var a=n%7;var l=(a+7)%7;var s=(l<r?7:0)+n-i;o.setUTCDate(o.getUTCDate()+s);return o};var ex=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",90);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){var r=function e(e){if(e===0){return 7}return e};switch(t){case"i":case"ii":return U(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return L(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return L(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return L(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiii":default:return L(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function e(e,t){return t>=1&&t<=7}},{key:"set",value:function e(e,t,n){e=eb(e,n);e.setUTCHours(0,0,0,0);return e}}]);return n}(_);var ew=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",80);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["b","B","H","k","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function e(e,t,n){e.setUTCHours(H(n),0,0,0);return e}}]);return n}(_);var eS=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",80);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["a","B","H","k","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function e(e,t,n){e.setUTCHours(H(n),0,0,0);return e}}]);return n}(_);var ek=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",80);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["a","b","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function e(e,t,n){e.setUTCHours(H(n),0,0,0);return e}}]);return n}(_);var eT=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",70);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["H","K","k","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"h":return B(N.hour12h,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=1&&t<=12}},{key:"set",value:function e(e,t,n){var r=e.getUTCHours()>=12;if(r&&n<12){e.setUTCHours(n+12,0,0,0)}else if(!r&&n===12){e.setUTCHours(0,0,0,0)}else{e.setUTCHours(n,0,0,0)}return e}}]);return n}(_);var eE=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",70);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["a","b","h","K","k","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"H":return B(N.hour23h,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=0&&t<=23}},{key:"set",value:function e(e,t,n){e.setUTCHours(n,0,0,0);return e}}]);return n}(_);var eC=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",70);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["h","H","k","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"K":return B(N.hour11h,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=0&&t<=11}},{key:"set",value:function e(e,t,n){var r=e.getUTCHours()>=12;if(r&&n<12){e.setUTCHours(n+12,0,0,0)}else{e.setUTCHours(n,0,0,0)}return e}}]);return n}(_);var ej=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",70);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["a","b","h","H","K","t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"k":return B(N.hour24h,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=1&&t<=24}},{key:"set",value:function e(e,t,n){var r=n<=24?n%24:n;e.setUTCHours(r,0,0,0);return e}}]);return n}(_);var eI=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",60);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"m":return B(N.minute,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=0&&t<=59}},{key:"set",value:function e(e,t,n){e.setUTCMinutes(n,0,0);return e}}]);return n}(_);var eD=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",50);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["t","T"]);return e}j(n,[{key:"parse",value:function e(e,t,n){switch(t){case"s":return B(N.second,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return U(t.length,e)}}},{key:"validate",value:function e(e,t){return t>=0&&t<=59}},{key:"set",value:function e(e,t,n){e.setUTCSeconds(n,0);return e}}]);return n}(_);var eP=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",30);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["t","T"]);return e}j(n,[{key:"parse",value:function e(e,t){var n=function e(e){return Math.floor(e*Math.pow(10,-t.length+3))};return L(U(t.length,e),n)}},{key:"set",value:function e(e,t,n){e.setUTCMilliseconds(n);return e}}]);return n}(_);var eO=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",10);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["t","T","x"]);return e}j(n,[{key:"parse",value:function e(e,t){switch(t){case"X":return F(Z.basicOptionalMinutes,e);case"XX":return F(Z.basic,e);case"XXXX":return F(Z.basicOptionalSeconds,e);case"XXXXX":return F(Z.extendedOptionalSeconds,e);case"XXX":default:return F(Z.extended,e)}}},{key:"set",value:function e(e,t,n){if(t.timestampIsSet){return e}return new Date(e.getTime()-n)}}]);return n}(_);var eM=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",10);(0,I.Z)((0,v.Z)(e),"incompatibleTokens",["t","T","X"]);return e}j(n,[{key:"parse",value:function e(e,t){switch(t){case"x":return F(Z.basicOptionalMinutes,e);case"xx":return F(Z.basic,e);case"xxxx":return F(Z.basicOptionalSeconds,e);case"xxxxx":return F(Z.extendedOptionalSeconds,e);case"xxx":default:return F(Z.extended,e)}}},{key:"set",value:function e(e,t,n){if(t.timestampIsSet){return e}return new Date(e.getTime()-n)}}]);return n}(_);var e_=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",40);(0,I.Z)((0,v.Z)(e),"incompatibleTokens","*");return e}j(n,[{key:"parse",value:function e(e){return W(e)}},{key:"set",value:function e(e,t,n){return[new Date(n*1e3),{timestampIsSet:true}]}}]);return n}(_);var eR=function(e){b(n,e);var t=k(n);function n(){var e;T(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}e=t.call.apply(t,[this].concat(o));(0,I.Z)((0,v.Z)(e),"priority",20);(0,I.Z)((0,v.Z)(e),"incompatibleTokens","*");return e}j(n,[{key:"parse",value:function e(e){return W(e)}},{key:"set",value:function e(e,t,n){return[new Date(n),{timestampIsSet:true}]}}]);return n}(_);var eA={G:new R,y:new V,Y:new G,R:new X,u:new J,Q:new ee,q:new et,M:new en,L:new er,w:new ea,I:new eu,d:new ef,D:new eh,E:new em,e:new ev,c:new ey,i:new ex,a:new ew,b:new eS,B:new ek,h:new eT,H:new eE,K:new eC,k:new ej,m:new eI,s:new eD,S:new eP,X:new eO,x:new eM,t:new e_,T:new eR};var eN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;var eZ=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;var eL=/^'([^]*?)'?$/;var eB=/''/g;var eF=/\S/;var eW=/[a-zA-Z]/;function eU(e,t,n,o){var i,v,y,b,x,w,S,k,T,E,C,j,I,D,P,O,_,R;(0,m.Z)(3,arguments);var A=String(e);var N=String(t);var Z=(0,ep.j)();var L=(i=(v=o===null||o===void 0?void 0:o.locale)!==null&&v!==void 0?v:Z.locale)!==null&&i!==void 0?i:l.Z;if(!L.match){throw new RangeError("locale must contain match property")}var B=(0,g.Z)((y=(b=(x=(w=o===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&w!==void 0?w:o===null||o===void 0?void 0:(S=o.locale)===null||S===void 0?void 0:(k=S.options)===null||k===void 0?void 0:k.firstWeekContainsDate)!==null&&x!==void 0?x:Z.firstWeekContainsDate)!==null&&b!==void 0?b:(T=Z.locale)===null||T===void 0?void 0:(E=T.options)===null||E===void 0?void 0:E.firstWeekContainsDate)!==null&&y!==void 0?y:1);if(!(B>=1&&B<=7)){throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively")}var F=(0,g.Z)((C=(j=(I=(D=o===null||o===void 0?void 0:o.weekStartsOn)!==null&&D!==void 0?D:o===null||o===void 0?void 0:(P=o.locale)===null||P===void 0?void 0:(O=P.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&I!==void 0?I:Z.weekStartsOn)!==null&&j!==void 0?j:(_=Z.locale)===null||_===void 0?void 0:(R=_.options)===null||R===void 0?void 0:R.weekStartsOn)!==null&&C!==void 0?C:0);if(!(F>=0&&F<=6)){throw new RangeError("weekStartsOn must be between 0 and 6 inclusively")}if(N===""){if(A===""){return(0,u.Z)(n)}else{return new Date(NaN)}}var W={firstWeekContainsDate:B,weekStartsOn:F,locale:L};var U=[new M];var z=N.match(eZ).map(function(e){var t=e[0];if(t in f.Z){var n=f.Z[t];return n(e,L.formatLong)}return e}).join("").match(eN);var H=[];var K=a(z),$;try{var V=function t(){var t=$.value;if(!(o!==null&&o!==void 0&&o.useAdditionalWeekYearTokens)&&(0,p.Do)(t)){(0,p.qp)(t,N,e)}if(!(o!==null&&o!==void 0&&o.useAdditionalDayOfYearTokens)&&(0,p.Iu)(t)){(0,p.qp)(t,N,e)}var n=t[0];var r=eA[n];if(r){var i=r.incompatibleTokens;if(Array.isArray(i)){var a=H.find(function(e){return i.includes(e.token)||e.token===n});if(a){throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(t,"` at the same time"))}}else if(r.incompatibleTokens==="*"&&H.length>0){throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"))}H.push({token:n,fullToken:t});var l=r.run(A,t,L.match,W);if(!l){return{v:new Date(NaN)}}U.push(l.setter);A=l.rest}else{if(n.match(eW)){throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`")}if(t==="''"){t="'"}else if(n==="'"){t=ez(t)}if(A.indexOf(t)===0){A=A.slice(t.length)}else{return{v:new Date(NaN)}}}};for(K.s();!($=K.n()).done;){var q=V();if((0,r.Z)(q)==="object")return q.v}}catch(e){K.e(e)}finally{K.f()}if(A.length>0&&eF.test(A)){return new Date(NaN)}var Y=U.map(function(e){return e.priority}).sort(function(e,t){return t-e}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return U.filter(function(t){return t.priority===e}).sort(function(e,t){return t.subPriority-e.subPriority})}).map(function(e){return e[0]});var G=(0,u.Z)(n);if(isNaN(G.getTime())){return new Date(NaN)}var Q=(0,s.Z)(G,(0,h.Z)(G));var X={};var J=a(Y),ee;try{for(J.s();!(ee=J.n()).done;){var et=ee.value;if(!et.validate(Q,W)){return new Date(NaN)}var en=et.set(Q,X,W);if(Array.isArray(en)){Q=en[0];c(X,en[1])}else{Q=en}}}catch(e){J.e(e)}finally{J.f()}return Q}function ez(e){return e.match(eL)[1].replace(eB,"'")}},41071:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69939);var o=n(78354);var i=n(71578);function a(e,t){var n;(0,o.Z)(1,arguments);var r=(0,i.Z)((n=t===null||t===void 0?void 0:t.additionalDigits)!==null&&n!==void 0?n:2);if(r!==2&&r!==1&&r!==0){throw new RangeError("additionalDigits must be 0, 1 or 2")}if(!(typeof e==="string"||Object.prototype.toString.call(e)==="[object String]")){return new Date(NaN)}var a=f(e);var l;if(a.date){var s=h(a.date,r);l=p(s.restDateString,s.year)}if(!l||isNaN(l.getTime())){return new Date(NaN)}var u=l.getTime();var c=0;var g;if(a.time){c=m(a.time);if(isNaN(c)){return new Date(NaN)}}if(a.timezone){g=y(a.timezone);if(isNaN(g)){return new Date(NaN)}}else{var v=new Date(u+c);var b=new Date(0);b.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate());b.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds());return b}return new Date(u+c+g)}var l={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/};var s=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/;var u=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/;var c=/^([+-])(\d{2})(?::?(\d{2}))?$/;function f(e){var t={};var n=e.split(l.dateTimeDelimiter);var r;if(n.length>2){return t}if(/:/.test(n[0])){r=n[0]}else{t.date=n[0];r=n[1];if(l.timeZoneDelimiter.test(t.date)){t.date=e.split(l.timeZoneDelimiter)[0];r=e.substr(t.date.length,e.length)}}if(r){var o=l.timezone.exec(r);if(o){t.time=r.replace(o[1],"");t.timezone=o[1]}else{t.time=r}}return t}function h(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)");var r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null;var i=r[2]?parseInt(r[2]):null;return{year:i===null?o:i*100,restDateString:e.slice((r[1]||r[2]).length)}}function p(e,t){if(t===null)return new Date(NaN);var n=e.match(s);if(!n)return new Date(NaN);var r=!!n[4];var o=g(n[1]);var i=g(n[2])-1;var a=g(n[3]);var l=g(n[4]);var u=g(n[5])-1;if(r){if(!T(t,l,u)){return new Date(NaN)}return b(t,l,u)}else{var c=new Date(0);if(!S(t,i,a)||!k(t,o)){return new Date(NaN)}c.setUTCFullYear(t,i,Math.max(o,a));return c}}function g(e){return e?parseInt(e):1}function m(e){var t=e.match(u);if(!t)return NaN;var n=v(t[1]);var o=v(t[2]);var i=v(t[3]);if(!E(n,o,i)){return NaN}return n*r.vh+o*r.yJ+i*1e3}function v(e){return e&&parseFloat(e.replace(",","."))||0}function y(e){if(e==="Z")return 0;var t=e.match(c);if(!t)return 0;var n=t[1]==="+"?-1:1;var o=parseInt(t[2]);var i=t[3]&&parseInt(t[3])||0;if(!C(o,i)){return NaN}return n*(o*r.vh+i*r.yJ)}function b(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7;var i=(t-1)*7+n+1-o;r.setUTCDate(r.getUTCDate()+i);return r}var x=[31,null,31,30,31,30,31,31,30,31,30,31];function w(e){return e%400===0||e%4===0&&e%100!==0}function S(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(x[t]||(w(e)?29:28))}function k(e,t){return t>=1&&t<=(w(e)?366:365)}function T(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function E(e,t,n){if(e===24){return t===0&&n===0}return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function C(e,t){return t>=0&&t<=59}},28548:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(82862);var o=n(78354);var i=n(71578);function a(e,t){(0,o.Z)(2,arguments);var n=(0,i.Z)(t);return(0,r.Z)(e,-n)}},94352:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(71578);var o=n(2864);var i=n(78354);function a(e,t){(0,i.Z)(2,arguments);var n=(0,o.Z)(e).getTime();var a=(0,r.Z)(t);return new Date(n+a)};function l(e,t){(0,i.Z)(2,arguments);var n=(0,r.Z)(t);return a(e,-n)}},2864:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86522);var o=n(78354);function i(e){(0,o.Z)(1,arguments);var t=Object.prototype.toString.call(e);if(e instanceof Date||(0,r.Z)(e)==="object"&&t==="[object Date]"){return new Date(e.getTime())}else if(typeof e==="number"||t==="[object Number]"){return new Date(e)}else{if((typeof e==="string"||t==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn(new Error().stack)}return new Date(NaN)}}},44510:function(e,t){"use strict";var n;/** @license React v17.0.2
|
|
11
|
+
* react-is.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var r=60103,o=60106,i=60107,a=60108,l=60114,s=60109,u=60110,c=60112,f=60113,h=60120,p=60115,g=60116,m=60121,v=60122,y=60117,b=60129,x=60131;if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element");o=w("react.portal");i=w("react.fragment");a=w("react.strict_mode");l=w("react.profiler");s=w("react.provider");u=w("react.context");c=w("react.forward_ref");f=w("react.suspense");h=w("react.suspense_list");p=w("react.memo");g=w("react.lazy");m=w("react.block");v=w("react.server.block");y=w("react.fundamental");b=w("react.debug_trace_mode");x=w("react.legacy_hidden")}function S(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type,e){case i:case l:case a:case f:case h:return e;default:switch(e=e&&e.$$typeof,e){case u:case c:case g:case p:case s:return e;default:return t}}case o:return t}}}var k=s,T=r,E=c,C=i,j=g,I=p,D=o,P=l,O=a,M=f;n=u;n=k;n=T;n=E;n=C;n=j;n=I;n=D;n=P;n=O;n=M;n=function(){return!1};n=function(){return!1};n=function(e){return S(e)===u};n=function(e){return S(e)===s};n=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r};n=function(e){return S(e)===c};n=function(e){return S(e)===i};n=function(e){return S(e)===g};n=function(e){return S(e)===p};n=function(e){return S(e)===o};n=function(e){return S(e)===l};n=function(e){return S(e)===a};n=function(e){return S(e)===f};n=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===l||e===b||e===a||e===f||e===h||e===x||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===p||e.$$typeof===s||e.$$typeof===u||e.$$typeof===c||e.$$typeof===y||e.$$typeof===m||e[0]===v)?!0:!1};n=S},55815:function(e,t,n){"use strict";if(true){n(44510)}else{}},53797:function(e,t,n){var r;/*!
|
|
18
|
+
Copyright (c) 2015 Jed Watson.
|
|
19
|
+
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
20
|
+
All rights reserved.
|
|
21
|
+
*/(function(){"use strict";var o=!!(typeof window!=="undefined"&&window.document&&window.document.createElement);var i={canUseDOM:o,canUseWorkers:typeof Worker!=="undefined",canUseEventListeners:o&&!!(window.addEventListener||window.attachEvent),canUseViewport:o&&!!window.screen};if(true){!(r=(function(){return i}).call(t,n,t,e),r!==undefined&&(e.exports=r))}else{}})()},28926:function(e){"use strict";e.exports=function e(t,n){if(t===n)return true;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return false;var r,o,i;if(Array.isArray(t)){r=t.length;if(r!=n.length)return false;for(o=r;o--!==0;)if(!e(t[o],n[o]))return false;return true}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();i=Object.keys(t);r=i.length;if(r!==Object.keys(n).length)return false;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return false;for(o=r;o--!==0;){var a=i[o];if(!e(t[a],n[a]))return false}return true}return t!==t&&n!==n}},98765:function(e){"use strict";var t=/-(.)/g;function n(e){return e.replace(t,function(e,t){return t.toUpperCase()})}e.exports=n},29024:function(e,t,n){"use strict";var r=n(98765);var o=/^-ms-/;function i(e){return r(e.replace(o,"ms-"))}e.exports=i},57285:function(e){"use strict";function t(e){return function(){return e}}var n=function e(){};n.thatReturns=t;n.thatReturnsFalse=t(false);n.thatReturnsTrue=t(true);n.thatReturnsNull=t(null);n.thatReturnsThis=function(){return this};n.thatReturnsArgument=function(e){return e};e.exports=n},49879:function(e){"use strict";var t=/([A-Z])/g;function n(e){return e.replace(t,"-$1").toLowerCase()}e.exports=n},76278:function(e,t,n){"use strict";var r=n(49879);var o=/^ms-/;function i(e){return r(e).replace(o,"-ms-")}e.exports=i},62246:function(e){"use strict";function t(e){var t={};return function(n){if(!t.hasOwnProperty(n)){t[n]=e.call(this,n)}return t[n]}}e.exports=t},17679:function(e,t,n){"use strict";var r=n(57285);var o=r;if(false){var i}e.exports=o},17401:function(){(function(e,t){true?t():0})(this,function(){"use strict";function e(){var e=true;var t=false;var n=null;var r={text:true,search:true,url:true,tel:true,email:true,password:true,number:true,date:true,month:true,week:true,time:true,datetime:true,"datetime-local":true};function o(e){if(e&&e!==document&&e.nodeName!=="HTML"&&e.nodeName!=="BODY"&&"classList"in e&&"contains"in e.classList){return true}return false}function i(e){var t=e.type;var n=e.tagName;if(n=="INPUT"&&r[t]&&!e.readOnly){return true}if(n=="TEXTAREA"&&!e.readOnly){return true}if(e.isContentEditable){return true}return false}function a(e){if(e.classList.contains("focus-visible")){return}e.classList.add("focus-visible");e.setAttribute("data-focus-visible-added","")}function l(e){if(!e.hasAttribute("data-focus-visible-added")){return}e.classList.remove("focus-visible");e.removeAttribute("data-focus-visible-added")}function s(t){if(o(document.activeElement)){a(document.activeElement)}e=true}function u(t){e=false}function c(t){if(!o(t.target)){return}if(e||i(t.target)){a(t.target)}}function f(e){if(!o(e.target)){return}if(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added")){t=true;window.clearTimeout(n);n=window.setTimeout(function(){t=false;window.clearTimeout(n)},100);l(e.target)}}function h(n){if(document.visibilityState=="hidden"){if(t){e=true}p()}}function p(){document.addEventListener("mousemove",m);document.addEventListener("mousedown",m);document.addEventListener("mouseup",m);document.addEventListener("pointermove",m);document.addEventListener("pointerdown",m);document.addEventListener("pointerup",m);document.addEventListener("touchmove",m);document.addEventListener("touchstart",m);document.addEventListener("touchend",m)}function g(){document.removeEventListener("mousemove",m);document.removeEventListener("mousedown",m);document.removeEventListener("mouseup",m);document.removeEventListener("pointermove",m);document.removeEventListener("pointerdown",m);document.removeEventListener("pointerup",m);document.removeEventListener("touchmove",m);document.removeEventListener("touchstart",m);document.removeEventListener("touchend",m)}function m(t){if(t.target.nodeName.toLowerCase()==="html"){return}e=false;g()}document.addEventListener("keydown",s,true);document.addEventListener("mousedown",u,true);document.addEventListener("pointerdown",u,true);document.addEventListener("touchstart",u,true);document.addEventListener("focus",c,true);document.addEventListener("blur",f,true);document.addEventListener("visibilitychange",h,true);p();document.body.classList.add("js-focus-visible")}function t(e){var t;function n(){if(!t){t=true;e()}}if(["interactive","complete"].indexOf(document.readyState)>=0){e()}else{t=false;document.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}}if(typeof document!=="undefined"){t(e)}})},45260:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var n={animationIterationCount:true,borderImageOutset:true,borderImageSlice:true,borderImageWidth:true,boxFlex:true,boxFlexGroup:true,boxOrdinalGroup:true,columnCount:true,flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,flexOrder:true,gridRow:true,gridRowStart:true,gridRowEnd:true,gridColumn:true,gridColumnStart:true,gridColumnEnd:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,tabSize:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeDasharray:true,strokeDashoffset:true,strokeMiterlimit:true,strokeOpacity:true,strokeWidth:true};function r(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o=["Webkit","ms","Moz","O"];Object.keys(n).forEach(function(e){o.forEach(function(t){n[r(t,e)]=n[e]})});var i={background:{backgroundAttachment:true,backgroundColor:true,backgroundImage:true,backgroundPositionX:true,backgroundPositionY:true,backgroundRepeat:true},backgroundPosition:{backgroundPositionX:true,backgroundPositionY:true},border:{borderWidth:true,borderStyle:true,borderColor:true},borderBottom:{borderBottomWidth:true,borderBottomStyle:true,borderBottomColor:true},borderLeft:{borderLeftWidth:true,borderLeftStyle:true,borderLeftColor:true},borderRight:{borderRightWidth:true,borderRightStyle:true,borderRightColor:true},borderTop:{borderTopWidth:true,borderTopStyle:true,borderTopColor:true},font:{fontStyle:true,fontVariant:true,fontWeight:true,fontSize:true,lineHeight:true,fontFamily:true},outline:{outlineWidth:true,outlineStyle:true,outlineColor:true}};var a={isUnitlessNumber:n,shorthandPropertyExpansions:i};t["default"]=a},13349:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(45260);var o=l(r);var i=n(17679);var a=l(i);function l(e){return e&&e.__esModule?e:{default:e}}var s=o.default.isUnitlessNumber;var u={};function c(e,t,n){var r=t==null||typeof t==="boolean"||t==="";if(r){return""}var o=isNaN(t);if(o||t===0||s.hasOwnProperty(e)&&s[e]){return""+t}if(typeof t==="string"){if(false){var i,a,l,u}t=t.trim()}return t+"px"}t["default"]=c},88565:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.processStyleName=undefined;t.createMarkupForStyles=j;var r=n(29024);var o=p(r);var i=n(13349);var a=p(i);var l=n(76278);var s=p(l);var u=n(62246);var c=p(u);var f=n(17679);var h=p(f);function p(e){return e&&e.__esModule?e:{default:e}}var g=t.processStyleName=(0,c.default)(s.default);if(false){var m,v,y,b,x,w,S,k,T,E,C}function j(e,t){var n="";for(var r in e){var o=r.indexOf("--")===0;if(!e.hasOwnProperty(r)){continue}if(r==="label"){continue}var i=e[r];if(false){}if(i!=null){if(o){n+=r+":"+i+";"}else{n+=g(r)+":";n+=(0,a.default)(r,i,t)+";"}}}return n||null}},57141:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t["default"]=a;function r(e){return e===null||e===undefined||e===false||(typeof e==="undefined"?"undefined":n(e))==="object"&&Object.keys(e).length===0}function o(e){if(r(e))return null;if((typeof e==="undefined"?"undefined":n(e))!=="object")return e;var t={},o=Object.keys(e),i=false;for(var l=0;l<o.length;l++){var s=e[o[l]];var u=a(s);if(u===null||u!==s){i=true}if(u!==null){t[o[l]]=u}}return Object.keys(t).length===0?null:i?t:e}function i(e){var t=false;var n=[];e.forEach(function(e){var r=a(e);if(r===null||r!==e){t=true}if(r!==null){n.push(r)}});return n.length==0?null:t?n:e}function a(e){return Array.isArray(e)?i(e):o(e)}},96881:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=n;function n(e,t){var n=1540483477;var a=24;var l=t^e.length;var s=e.length;var u=0;while(s>=4){var c=r(e,u);c=i(c,n);c^=c>>>a;c=i(c,n);l=i(l,n);l^=c;u+=4;s-=4}switch(s){case 3:l^=o(e,u);l^=e.charCodeAt(u+2)<<16;l=i(l,n);break;case 2:l^=o(e,u);l=i(l,n);break;case 1:l^=e.charCodeAt(u);l=i(l,n);break}l^=l>>>13;l=i(l,n);l^=l>>>15;return l>>>0}function r(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)+(e.charCodeAt(t++)<<16)+(e.charCodeAt(t)<<24)}function o(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)}function i(e,t){e=e|0;t=t|0;var n=e&65535;var r=e>>>16;var o=n*t+((r*t&65535)<<16)|0;return o}},99818:function(e,t,n){"use strict";var r;r={value:true};r=r=r=r=r=t.F4=r=r=r=r=r=undefined;r=y;r=C;r=j;r=D;r=M;r=_;t.iv=eu;r=em;r=ev;r=ex;r=eS;t.BC=eE;r=eC;r=ej;r=eI;r=eD;r=eP;r=eO;r=eM;r=e_;r=eR;r=eA;r=eN;r=eZ;r=eL;r=eB;r=eF;r=eW;r=eU;r=ez;r=eH;r=eK;r=e$;r=eV;r=eq;r=eY;r=eG;r=eQ;r=eX;r=eJ;r=e0;r=e1;r=e2;r=e4;r=e5;r=e3;r=e7;r=e6;r=e8;r=e9;r=te;r=tt;r=tn;r=tr;t.bb=to;r=ti;r=ta;r=tl;r=ts;r=tu;r=tc;r=td;var o=n(4439);var i=p(o);var a=n(6278);var l=n(88565);var s=n(57141);var u=p(s);var c=n(20713);var f=n(96881);var h=p(f);function p(e){return e&&e.__esModule?e:{default:e}}function g(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++){n[t]=e[t]}return n}else{return Array.from(e)}}function m(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}var v=r=new a.StyleSheet;v.inject();function y(e){return v.speedy(e)}var b=r=v.plugins=new c.PluginSet([c.prefixes,c.contentWrap,c.fallbacks]);b.media=new c.PluginSet;b.fontFace=new c.PluginSet;b.keyframes=new c.PluginSet([c.prefixes,c.fallbacks]);var x=false||!"production";var w="production"==="test";var S=typeof window!=="undefined";var k=x;var T=false,E=false;function C(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;k=!!e}function j(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++){t[n]=arguments[n]}t=(0,u.default)(t);if(!t)return{};if(!k){if(!T){console.warn("can't simulate without once calling simulations(true)");T=true}if(!x&&!w&&!E){console.warn("don't use simulation outside dev");E=true}return{}}return t.reduce(function(e,t){return e["data-simulate-"+P(t)]="",e},{})}var I=x;function D(e){I=!!e}function P(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";return e.toLowerCase().replace(/[^a-z0-9]/g,t)}function O(e){var t=JSON.stringify(e);var n=(0,h.default)(t).toString(36);if(e.label&&e.label.length>0&&x){return P(e.label.join("."),"-")+"-"+n}return n}function M(e){var t=Object.keys(e).filter(function(e){return e!=="toString"});if(t.length!==1){return false}return!!/data\-css\-([a-zA-Z0-9\-_]+)/.exec(t[0])}function _(e){var t=Object.keys(e).filter(function(e){return e!=="toString"});if(t.length!==1)throw new Error("not a rule");var n=/data\-css\-([a-zA-Z0-9\-_]+)/;var r=n.exec(t[0]);if(!r)throw new Error("not a rule");return r[1]}var R=/[(),]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\//g;function A(e){if(e.indexOf(",")===-1){return[e]}var t=[],n=[],r=0,o;while(o=R.exec(e)){switch(o[0]){case"(":r++;break;case")":r--;break;case",":if(r)break;t.push(o.index)}}for(o=t.length;o--;){n.unshift(e.slice(t[o]+1));e=e.slice(0,t[o])}n.unshift(e);return n}function N(e,t){if(!e){return t.replace(/\&/g,"")}if(!t)return".css-"+e+",[data-css-"+e+"]";var n=A(t).map(function(t){return t.indexOf("&")>=0?[t.replace(/\&/mg,".css-"+e),t.replace(/\&/mg,"[data-css-"+e+"]")].join(","):".css-"+e+t+",[data-css-"+e+"]"+t}).join(",");if(k&&/^\&\:/.exec(t)&&!/\s/.exec(t)){n+=",.css-"+e+"[data-simulate-"+P(t)+"],[data-css-"+e+"][data-simulate-"+P(t)+"]"}return n}function Z(e){var t=e.selector,n=e.style;var r=b.transform({selector:t,style:n});return r.selector+"{"+(0,l.createMarkupForStyles)(r.style)+"}"}function L(e){var t=void 0,n=void 0,r=void 0,o=void 0;Object.keys(e).forEach(function(i){if(i.indexOf("&")>=0){n=n||{};n[i]=e[i]}else if(i.indexOf("@media")===0){r=r||{};r[i]=L(e[i])}else if(i.indexOf("@supports")===0){o=o||{};o[i]=L(e[i])}else if(i==="label"){if(e.label.length>0){t=t||{};t.label=I?e.label.join("."):""}}else{t=t||{};t[i]=e[i]}});return{plain:t,selects:n,medias:r,supports:o}}function B(e,t){var n=[];var r=t.plain,o=t.selects,i=t.medias,a=t.supports;if(r){n.push(Z({style:r,selector:N(e)}))}if(o){Object.keys(o).forEach(function(t){return n.push(Z({style:o[t],selector:N(e,t)}))})}if(i){Object.keys(i).forEach(function(t){return n.push(t+"{"+B(e,i[t]).join("")+"}")})}if(a){Object.keys(a).forEach(function(t){return n.push(t+"{"+B(e,a[t]).join("")+"}")})}return n}var F=v.inserted={};function W(e){if(!F[e.id]){F[e.id]=true;var t=L(e.style);var n=B(e.id,t);F[e.id]=S?true:n;n.forEach(function(e){return v.insert(e)})}}var U=v.registered={};function z(e){if(!U[e.id]){U[e.id]=e}}function H(e){if(M(e)){var t=U[_(e)];if(t==null){throw new Error("[glamor] an unexpected rule cache miss occurred. This is probably a sign of multiple glamor instances in your app. See https://github.com/threepointone/glamor/issues/79")}return t}return e}var K={};function $(e){z(e);W(e);if(K[e.id]){return K[e.id]}var t=m({},"data-css-"+e.id,I?e.label||"":"");Object.defineProperty(t,"toString",{enumerable:false,value:function t(){return"css-"+e.id}});K[e.id]=t;return t}function V(){console.log(this);return this}function q(e){var t=[":",".","[",">"," "],n=false,r=e.charAt(0);for(var o=0;o<t.length;o++){if(r===t[o]){n=true;break}}return n||e.indexOf("&")>=0}function Y(e,t){var n=A(e).map(function(e){return!(e.indexOf("&")>=0)?"&"+e:e});var r=A(t).map(function(e){return!(e.indexOf("&")>=0)?"&"+e:e});return r.reduce(function(e,t){return e.concat(n.map(function(e){return t.replace(/\&/g,e)}))},[]).join(",")}function G(e,t){return e?"@media "+e.substring(6)+" and "+t.substring(6):t}function Q(e){return e.indexOf("@media")===0}function X(e){return e.indexOf("@supports")===0}function J(e,t){return e?"@supports "+e.substring(9)+" and "+t.substring(9):t}function ee(e){var t=[];for(var n=0;n<e.length;n++){if(Array.isArray(e[n]))t=t.concat(ee(e[n]));else t=t.concat(e[n])}return t}var et={"::placeholder":["::-webkit-input-placeholder","::-moz-placeholder","::-ms-input-placeholder"],":fullscreen":[":-webkit-full-screen",":-moz-full-screen",":-ms-fullscreen"]};function en(e,t){var n=t.selector,r=n===undefined?"":n,o=t.mq,i=o===undefined?"":o,a=t.supp,l=a===undefined?"":a,s=t.src,c=s===undefined?{}:s;if(!Array.isArray(c)){c=[c]}c=ee(c);c.forEach(function(t){if(M(t)){var n=H(t);if(n.type!=="css"){throw new Error("cannot merge this rule")}t=n.style}t=(0,u.default)(t);if(t&&t.composes){en(e,{selector:r,mq:i,supp:l,src:t.composes})}Object.keys(t||{}).forEach(function(n){if(q(n)){if(et[n]){et[n].forEach(function(o){return en(e,{selector:Y(r,o),mq:i,supp:l,src:t[n]})})}en(e,{selector:Y(r,n),mq:i,supp:l,src:t[n]})}else if(Q(n)){en(e,{selector:r,mq:G(i,n),supp:l,src:t[n]})}else if(X(n)){en(e,{selector:r,mq:i,supp:J(l,n),src:t[n]})}else if(n==="composes"){}else{var o=e;if(l){o[l]=o[l]||{};o=o[l]}if(i){o[i]=o[i]||{};o=o[i]}if(r){o[r]=o[r]||{};o=o[r]}if(n==="label"){if(I){e.label=e.label.concat(t.label)}}else{o[n]=t[n]}}})})}function er(e){var t={label:[]};en(t,{src:e});var n={id:O(t),style:t,label:I?t.label.join("."):"",type:"css"};return $(n)}var eo={};Object.defineProperty(eo,"toString",{enumerable:false,value:function e(){return"css-nil"}});var ei=typeof WeakMap!=="undefined"?[eo,new WeakMap,new WeakMap,new WeakMap]:[eo];var ea=false;function el(e){return function(t){if(ei[t.length]){var n=ei[t.length];var r=0;while(r<t.length-1){if(!n.has(t[r])){n.set(t[r],new WeakMap)}n=n.get(t[r]);r++}if(n.has(t[t.length-1])){var o=n.get(t[r]);if(U[o.toString().substring(4)]){return o}}}var i=e(t);if(ei[t.length]){var a=0,l=ei[t.length];while(a<t.length-1){l=l.get(t[a]);a++}try{l.set(t[a],i)}catch(e){if(x&&!ea){var s;ea=true;(s=console).warn.apply(s,["failed setting the WeakMap cache for args:"].concat(g(t)));console.warn("this should NOT happen, please file a bug on the github repo.")}}}return i}}var es=typeof WeakMap!=="undefined"?el(er):er;function eu(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++){t[n]=arguments[n]}if(t[0]&&t[0].length&&t[0].raw){throw new Error("you forgot to include glamor/babel in your babel plugins.")}t=(0,u.default)(t);if(!t){return eo}return es(t)}eu.insert=function(e){var t={id:O(e),css:e,type:"raw"};z(t);if(!F[t.id]){v.insert(t.css);F[t.id]=S?true:[t.css]}};var ec=r=eu.insert;eu.global=function(e,t){t=(0,u.default)(t);if(t){return eu.insert(Z({selector:e,style:t}))}};var ed=r=eu.global;function ef(e){if(!F[e.id]){var t=Object.keys(e.keyframes).map(function(t){var n=b.keyframes.transform({id:e.id,name:t,style:e.keyframes[t]});return n.name+"{"+(0,l.createMarkupForStyles)(n.style)+"}"}).join("");var n=["-webkit-","-moz-","-o-",""].map(function(n){return"@"+n+"keyframes "+(e.name+"_"+e.id)+"{"+t+"}"});n.forEach(function(e){return v.insert(e)});F[e.id]=S?true:n}}eu.keyframes=function(e,t){if(!t){t=e,e="animation"}t=(0,u.default)(t)||{};var n={id:O({name:e,kfs:t}),type:"keyframes",name:e,keyframes:t};z(n);ef(n);return e+"_"+n.id};eu.fontFace=function(e){e=(0,u.default)(e);var t={id:O(e),type:"font-face",font:e};z(t);eg(t);return e.fontFamily};var eh=r=eu.fontFace;var ep=t.F4=eu.keyframes;function eg(e){if(!F[e.id]){var t="@font-face{"+(0,l.createMarkupForStyles)(e.font)+"}";v.insert(t);F[e.id]=S?true:[t]}}function em(e){(0,i.default)(F,e.reduce(function(e,t){return e[t]=true,e},{}))}function ev(){F=v.inserted={};U=v.registered={};K={};v.flush();v.inject()}var ey=r={mobile:"(min-width: 400px)",Mobile:"@media (min-width: 400px)",phablet:"(min-width: 550px)",Phablet:"@media (min-width: 550px)",tablet:"(min-width: 750px)",Tablet:"@media (min-width: 750px)",desktop:"(min-width: 1000px)",Desktop:"@media (min-width: 1000px)",hd:"(min-width: 1200px)",Hd:"@media (min-width: 1200px)"};var eb=r=eu;function ex(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}if(!e){return eb(n)}return eu(m({},e,n))}var ew=r=ex;function eS(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}return eu(m({},e+" &",n))}var ek=r=eu;var eT=r=eu;function eE(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}return eu(m({},"@media "+e,n))}function eC(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}return eu(m({},e,n))}function ej(e){return eC(":active",e)}function eI(e){return eC(":any",e)}function eD(e){return eC(":checked",e)}function eP(e){return eC(":disabled",e)}function eO(e){return eC(":empty",e)}function eM(e){return eC(":enabled",e)}function e_(e){return eC(":default",e)}function eR(e){return eC(":first",e)}function eA(e){return eC(":first-child",e)}function eN(e){return eC(":first-of-type",e)}function eZ(e){return eC(":fullscreen",e)}function eL(e){return eC(":focus",e)}function eB(e){return eC(":hover",e)}function eF(e){return eC(":indeterminate",e)}function eW(e){return eC(":in-range",e)}function eU(e){return eC(":invalid",e)}function ez(e){return eC(":last-child",e)}function eH(e){return eC(":last-of-type",e)}function eK(e){return eC(":left",e)}function e$(e){return eC(":link",e)}function eV(e){return eC(":only-child",e)}function eq(e){return eC(":only-of-type",e)}function eY(e){return eC(":optional",e)}function eG(e){return eC(":out-of-range",e)}function eQ(e){return eC(":read-only",e)}function eX(e){return eC(":read-write",e)}function eJ(e){return eC(":required",e)}function e0(e){return eC(":right",e)}function e1(e){return eC(":root",e)}function e2(e){return eC(":scope",e)}function e4(e){return eC(":target",e)}function e5(e){return eC(":valid",e)}function e3(e){return eC(":visited",e)}function e7(e,t){return eC(":dir("+e+")",t)}function e6(e,t){return eC(":lang("+e+")",t)}function e8(e,t){var n=e.split(",").map(function(e){return e.trim()}).map(function(e){return":not("+e+")"});if(n.length===1){return eC(":not("+e+")",t)}return ex(n.join(""),t)}function e9(e,t){return eC(":nth-child("+e+")",t)}function te(e,t){return eC(":nth-last-child("+e+")",t)}function tt(e,t){return eC(":nth-last-of-type("+e+")",t)}function tn(e,t){return eC(":nth-of-type("+e+")",t)}function tr(e){return eC("::after",e)}function to(e){return eC("::before",e)}function ti(e){return eC("::first-letter",e)}function ta(e){return eC("::first-line",e)}function tl(e){return eC("::selection",e)}function ts(e){return eC("::backdrop",e)}function tu(e){return eu({"::placeholder":e})}function tc(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++){t[n]=arguments[n]}t=(0,u.default)(t);return t?t.map(function(e){var t={label:[]};en(t,{src:e});return B(O(t),L(t)).join("")}).join(""):""}function td(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++){t[n]=arguments[n]}t=(0,u.default)(t);var r=t?t.map(function(e){_(e);var t=Object.keys(e)[0],n=e[t];return t+'="'+(n||"")+'"'}).join(" "):"";return r}},20713:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};t.PluginSet=f;t.fallbacks=h;t.contentWrap=g;t.prefixes=m;var o=n(4439);var i=u(o);var a=n(88565);var l=n(25355);var s=u(l);function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){return e==="development"||!e}("production");function f(e){this.fns=e||[]}(0,i.default)(f.prototype,{add:function e(){var e=this;for(var t=arguments.length,n=Array(t),r=0;r<t;r++){n[r]=arguments[r]}n.forEach(function(t){if(e.fns.indexOf(t)>=0){if(c){console.warn("adding the same plugin again, ignoring")}}else{e.fns=[t].concat(e.fns)}})},remove:function e(e){this.fns=this.fns.filter(function(t){return t!==e})},clear:function e(){this.fns=[]},transform:function e(e){return this.fns.reduce(function(e,t){return t(e)},e)}});function h(e){var t=Object.keys(e.style).map(function(t){return Array.isArray(e.style[t])}).indexOf(true)>=0;if(t){var n=e.style;var r=Object.keys(n).reduce(function(e,t){e[t]=Array.isArray(n[t])?n[t].join("; "+(0,a.processStyleName)(t)+": "):n[t];return e},{});return(0,i.default)({},e,{style:r})}return e}var p=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit"];function g(e){if(e.style.content){var t=e.style.content;if(p.indexOf(t)>=0){return e}if(/^(attr|calc|counters?|url)\(/.test(t)){return e}if(t.charAt(0)===t.charAt(t.length-1)&&(t.charAt(0)==='"'||t.charAt(0)==="'")){return e}return r({},e,{style:r({},e.style,{content:'"'+t+'"'})})}return e}function m(e){return(0,i.default)({},e,{style:(0,s.default)(r({},e.style))})}},25355:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_;var r=n(19572);var o=P(r);var i=n(20740);var a=P(i);var l=n(64641);var s=P(l);var u=n(26054);var c=P(u);var f=n(13534);var h=P(f);var p=n(24382);var g=P(p);var m=n(58055);var v=P(m);var y=n(58617);var b=P(y);var x=n(63574);var w=P(x);var S=n(91247);var k=P(S);var T=n(34867);var E=P(T);var C=n(98904);var j=P(C);var I=n(29604);var D=P(I);function P(e){return e&&e.__esModule?e:{default:e}}var O=[h.default,c.default,g.default,b.default,w.default,k.default,E.default,j.default,D.default,v.default];var M=o.default.prefixMap;function _(e){for(var t in e){var n=e[t];var r=(0,s.default)(O,t,n,e,M);if(r){e[t]=r}(0,a.default)(M,t,e)}return e}},6278:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.StyleSheet=g;var r=n(4439);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}function a(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++){n[t]=e[t]}return n}else{return Array.from(e)}}function l(e){return e[e.length-1]}function s(e){if(e.sheet){return e.sheet}for(var t=0;t<document.styleSheets.length;t++){if(document.styleSheets[t].ownerNode===e){return document.styleSheets[t]}}}var u=typeof window!=="undefined";var c=false||!"production";var f="production"==="test";var h=function(){if(u){var e=document.createElement("div");e.innerHTML="<!--[if lt IE 10]><i></i><![endif]-->";return e.getElementsByTagName("i").length===1}}();function p(){var e=document.createElement("style");e.type="text/css";e.setAttribute("data-glamor","");e.appendChild(document.createTextNode(""));(document.head||document.getElementsByTagName("head")[0]).appendChild(e);return e}function g(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=e.speedy,n=t===undefined?!c&&!f:t,r=e.maxLength,o=r===undefined?u&&h?4e3:65e3:r;this.isSpeedy=n;this.sheet=undefined;this.tags=[];this.maxLength=o;this.ctr=0}(0,o.default)(g.prototype,{getSheet:function e(){return s(l(this.tags))},inject:function e(){var e=this;if(this.injected){throw new Error("already injected stylesheet!")}if(u){this.tags[0]=p()}else{this.sheet={cssRules:[],insertRule:function t(t){e.sheet.cssRules.push({cssText:t})}}}this.injected=true},speedy:function e(e){if(this.ctr!==0){throw new Error("cannot change speedy mode after inserting any rule to sheet. Either call speedy("+e+") earlier in your app, or call flush() before speedy("+e+")")}this.isSpeedy=!!e},_insert:function e(e){try{var t=this.getSheet();t.insertRule(e,e.indexOf("@import")!==-1?0:t.cssRules.length)}catch(t){if(c){console.warn("whoops, illegal rule inserted",e)}}},insert:function e(e){if(u){if(this.isSpeedy&&this.getSheet().insertRule){this._insert(e)}else{if(e.indexOf("@import")!==-1){var t=l(this.tags);t.insertBefore(document.createTextNode(e),t.firstChild)}else{l(this.tags).appendChild(document.createTextNode(e))}}}else{this.sheet.insertRule(e,e.indexOf("@import")!==-1?0:this.sheet.cssRules.length)}this.ctr++;if(u&&this.ctr%this.maxLength===0){this.tags.push(p())}return this.ctr-1},delete:function e(e){return this.replace(e,"")},flush:function e(){if(u){this.tags.forEach(function(e){return e.parentNode.removeChild(e)});this.tags=[];this.sheet=null;this.ctr=0}else{this.sheet.cssRules=[]}this.injected=false},rules:function e(){if(!u){return this.sheet.cssRules}var e=[];this.tags.forEach(function(t){return e.splice.apply(e,[e.length,0].concat(a(Array.from(s(t).cssRules))))});return e}})},69060:function(e,t,n){"use strict";var r=n(5356);var o={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true};var i={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true};var a={"$$typeof":true,render:true,defaultProps:true,displayName:true,propTypes:true};var l={"$$typeof":true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true};var s={};s[r.ForwardRef]=a;s[r.Memo]=l;function u(e){if(r.isMemo(e)){return l}return s[e["$$typeof"]]||o}var c=Object.defineProperty;var f=Object.getOwnPropertyNames;var h=Object.getOwnPropertySymbols;var p=Object.getOwnPropertyDescriptor;var g=Object.getPrototypeOf;var m=Object.prototype;function v(e,t,n){if(typeof t!=="string"){if(m){var r=g(t);if(r&&r!==m){v(e,r,n)}}var o=f(t);if(h){o=o.concat(h(t))}var a=u(e);var l=u(t);for(var s=0;s<o.length;++s){var y=o[s];if(!i[y]&&!(n&&n[y])&&!(l&&l[y])&&!(a&&a[y])){var b=p(t,y);try{c(e,y,b)}catch(e){}}}}return e}e.exports=v},81113:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var r=typeof navigator!=="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:false;function o(e,t,n,r){if(e.addEventListener){e.addEventListener(t,n,r)}else if(e.attachEvent){e.attachEvent("on".concat(t),function(){n(window.event)})}}function i(e,t){var n=t.slice(0,t.length-1);for(var r=0;r<n.length;r++){n[r]=e[n[r].toLowerCase()]}return n}function a(e){if(typeof e!=="string")e="";e=e.replace(/\s/g,"");var t=e.split(",");var n=t.lastIndexOf("");for(;n>=0;){t[n-1]+=",";t.splice(n,1);n=t.lastIndexOf("")}return t}function l(e,t){var n=e.length>=t.length?e:t;var r=e.length>=t.length?t:e;var o=true;for(var i=0;i<n.length;i++){if(r.indexOf(n[i])===-1)o=false}return o}var s={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":r?173:189,"=":r?61:187,";":r?59:186,"'":222,"[":219,"]":221,"\\":220};var u={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91};var c={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91};var f={16:false,18:false,17:false,91:false};var h={};for(var p=1;p<20;p++){s["f".concat(p)]=111+p}var g=[];var m=false;var v="all";var y=[];var b=function e(e){return s[e.toLowerCase()]||u[e.toLowerCase()]||e.toUpperCase().charCodeAt(0)};var x=function e(e){return Object.keys(s).find(function(t){return s[t]===e})};var w=function e(e){return Object.keys(u).find(function(t){return u[t]===e})};function S(e){v=e||"all"}function k(){return v||"all"}function T(){return g.slice(0)}function E(){return g.map(function(e){return x(e)||w(e)||String.fromCharCode(e)})}function C(e){var t=e.target||e.srcElement;var n=t.tagName;var r=true;if(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly){r=false}return r}function j(e){if(typeof e==="string"){e=b(e)}return g.indexOf(e)!==-1}function I(e,t){var n;var r;if(!e)e=k();for(var o in h){if(Object.prototype.hasOwnProperty.call(h,o)){n=h[o];for(r=0;r<n.length;){if(n[r].scope===e)n.splice(r,1);else r++}}}if(k()===e)S(t||"all")}function D(e){var t=e.keyCode||e.which||e.charCode;var n=g.indexOf(t);if(n>=0){g.splice(n,1)}if(e.key&&e.key.toLowerCase()==="meta"){g.splice(0,g.length)}if(t===93||t===224)t=91;if(t in f){f[t]=false;for(var r in u){if(u[r]===t)A[r]=false}}}function P(e){if(typeof e==="undefined"){Object.keys(h).forEach(function(e){return delete h[e]})}else if(Array.isArray(e)){e.forEach(function(e){if(e.key)O(e)})}else if(typeof e==="object"){if(e.key)O(e)}else if(typeof e==="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}var o=n[0],i=n[1];if(typeof o==="function"){i=o;o=""}O({key:e,scope:o,method:i,splitKey:"+"})}}var O=function e(e){var t=e.key,n=e.scope,r=e.method,o=e.splitKey,s=o===void 0?"+":o;var c=a(t);c.forEach(function(e){var t=e.split(s);var o=t.length;var a=t[o-1];var c=a==="*"?"*":b(a);if(!h[c])return;if(!n)n=k();var f=o>1?i(u,t):[];h[c]=h[c].filter(function(e){var t=r?e.method===r:true;return!(t&&e.scope===n&&l(e.mods,f))})})};function M(e,t,n,r){if(t.element!==r){return}var o;if(t.scope===n||t.scope==="all"){o=t.mods.length>0;for(var i in f){if(Object.prototype.hasOwnProperty.call(f,i)){if(!f[i]&&t.mods.indexOf(+i)>-1||f[i]&&t.mods.indexOf(+i)===-1){o=false}}}if(t.mods.length===0&&!f[16]&&!f[18]&&!f[17]&&!f[91]||o||t.shortcut==="*"){if(t.method(e,t)===false){if(e.preventDefault)e.preventDefault();else e.returnValue=false;if(e.stopPropagation)e.stopPropagation();if(e.cancelBubble)e.cancelBubble=true}}}}function _(e,t){var n=h["*"];var r=e.keyCode||e.which||e.charCode;if(!A.filter.call(this,e))return;if(r===93||r===224)r=91;if(g.indexOf(r)===-1&&r!==229)g.push(r);["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(t){var n=c[t];if(e[t]&&g.indexOf(n)===-1){g.push(n)}else if(!e[t]&&g.indexOf(n)>-1){g.splice(g.indexOf(n),1)}else if(t==="metaKey"&&e[t]&&g.length===3){if(!(e.ctrlKey||e.shiftKey||e.altKey)){g=g.slice(g.indexOf(n))}}});if(r in f){f[r]=true;for(var o in u){if(u[o]===r)A[o]=true}if(!n)return}for(var i in f){if(Object.prototype.hasOwnProperty.call(f,i)){f[i]=e[c[i]]}}if(e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")){if(g.indexOf(17)===-1){g.push(17)}if(g.indexOf(18)===-1){g.push(18)}f[17]=true;f[18]=true}var a=k();if(n){for(var l=0;l<n.length;l++){if(n[l].scope===a&&(e.type==="keydown"&&n[l].keydown||e.type==="keyup"&&n[l].keyup)){M(e,n[l],a,t)}}}if(!(r in h))return;for(var s=0;s<h[r].length;s++){if(e.type==="keydown"&&h[r][s].keydown||e.type==="keyup"&&h[r][s].keyup){if(h[r][s].key&&h[r][s].scope===a){var p=h[r][s];var m=p.splitKey;var v=p.key.split(m);var y=[];for(var x=0;x<v.length;x++){y.push(b(v[x]))}if(y.sort().join("")===g.slice().sort().join("")){M(e,p,a,t)}}}}}function R(e){return y.indexOf(e)>-1}function A(e,t,n){g=[];var r=a(e);var l=[];var s="all";var c=document;var f=0;var p=false;var v=true;var x="+";var w=false;if(n===undefined&&typeof t==="function"){n=t}if(Object.prototype.toString.call(t)==="[object Object]"){if(t.scope)s=t.scope;if(t.element)c=t.element;if(t.keyup)p=t.keyup;if(t.keydown!==undefined)v=t.keydown;if(t.capture!==undefined)w=t.capture;if(typeof t.splitKey==="string")x=t.splitKey}if(typeof t==="string")s=t;for(;f<r.length;f++){e=r[f].split(x);l=[];if(e.length>1)l=i(u,e);e=e[e.length-1];e=e==="*"?"*":b(e);if(!(e in h))h[e]=[];h[e].push({keyup:p,keydown:v,scope:s,mods:l,shortcut:r[f],method:n,key:r[f],splitKey:x,element:c})}if(typeof c!=="undefined"&&!R(c)&&window){y.push(c);o(c,"keydown",function(e){_(e,c)},w);if(!m){m=true;o(window,"focus",function(){g=[]},w)}o(c,"keyup",function(e){_(e,c);D(e)},w)}}function N(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"all";Object.keys(h).forEach(function(n){var r=h[n].filter(function(n){return n.scope===t&&n.shortcut===e});r.forEach(function(e){if(e&&e.method){e.method()}})})}var Z={getPressedKeyString:E,setScope:S,getScope:k,deleteScope:I,getPressedKeyCodes:T,isPressed:j,filter:C,trigger:N,unbind:P,keyMap:s,modifier:u,modifierMap:c};for(var L in Z){if(Object.prototype.hasOwnProperty.call(Z,L)){A[L]=Z[L]}}if(typeof window!=="undefined"){var B=window.hotkeys;A.noConflict=function(e){if(e&&window.hotkeys===A){window.hotkeys=B}return A};window.hotkeys=A}},60357:function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g;var o=/^ms-/;var i={};function a(e){return"-"+e.toLowerCase()}function l(e){if(i.hasOwnProperty(e)){return i[e]}var t=e.replace(r,a);return i[e]=o.test(t)?"-"+t:t}t["default"]=l},13534:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=l;var r=n(68052);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}var a=["-webkit-",""];function l(e,t){if(typeof t==="string"&&!(0,o.default)(t)&&t.indexOf("cross-fade(")>-1){return a.map(function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")})}}e.exports=t["default"]},26054:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=o;var n=["-webkit-","-moz-",""];var r={"zoom-in":true,"zoom-out":true,grab:true,grabbing:true};function o(e,t){if(e==="cursor"&&r.hasOwnProperty(t)){return n.map(function(e){return e+t})}}e.exports=t["default"]},24382:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=l;var r=n(68052);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}var a=["-webkit-",""];function l(e,t){if(typeof t==="string"&&!(0,o.default)(t)&&t.indexOf("filter(")>-1){return a.map(function(e){return t.replace(/filter\(/g,e+"filter(")})}}e.exports=t["default"]},58055:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=r;var n={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function r(e,t){if(e==="display"&&n.hasOwnProperty(t)){return n[t]}}e.exports=t["default"]},58617:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=o;var n={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"};var r={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};function o(e,t,o){if(e==="flexDirection"&&typeof t==="string"){if(t.indexOf("column")>-1){o.WebkitBoxOrient="vertical"}else{o.WebkitBoxOrient="horizontal"}if(t.indexOf("reverse")>-1){o.WebkitBoxDirection="reverse"}else{o.WebkitBoxDirection="normal"}}if(r.hasOwnProperty(e)){o[r[e]]=n[t]||t}}e.exports=t["default"]},63574:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=s;var r=n(68052);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}var a=["-webkit-","-moz-",""];var l=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;function s(e,t){if(typeof t==="string"&&!(0,o.default)(t)&&l.test(t)){return a.map(function(e){return e+t})}}e.exports=t["default"]},91247:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=l;var r=n(68052);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}var a=["-webkit-",""];function l(e,t){if(typeof t==="string"&&!(0,o.default)(t)&&t.indexOf("image-set(")>-1){return a.map(function(e){return t.replace(/image-set\(/g,e+"image-set(")})}}e.exports=t["default"]},34867:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=n;function n(e,t){if(e==="position"&&t==="sticky"){return["-webkit-sticky","sticky"]}}e.exports=t["default"]},98904:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=i;var n=["-webkit-","-moz-",""];var r={maxHeight:true,maxWidth:true,width:true,height:true,columnWidth:true,minWidth:true,minHeight:true};var o={"min-content":true,"max-content":true,"fill-available":true,"fit-content":true,"contain-floats":true};function i(e,t){if(r.hasOwnProperty(e)&&o.hasOwnProperty(t)){return n.map(function(e){return e+t})}}e.exports=t["default"]},29604:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=p;var r=n(66111);var o=u(r);var i=n(68052);var a=u(i);var l=n(43543);var s=u(l);function u(e){return e&&e.__esModule?e:{default:e}}var c={transition:true,transitionProperty:true,WebkitTransition:true,WebkitTransitionProperty:true,MozTransition:true,MozTransitionProperty:true};var f={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function h(e,t){if((0,a.default)(e)){return e}var n=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g);for(var r=0,i=n.length;r<i;++r){var l=n[r];var s=[l];for(var u in t){var c=(0,o.default)(u);if(l.indexOf(c)>-1&&c!=="order"){var h=t[u];for(var p=0,g=h.length;p<g;++p){s.unshift(l.replace(c,f[h[p]]+c))}}}n[r]=s.join(",")}return n.join(",")}function p(e,t,n,r){if(typeof t==="string"&&c.hasOwnProperty(e)){var o=h(t,r);var i=o.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(e){return!/-moz-|-ms-/.test(e)}).join(",");if(e.indexOf("Webkit")>-1){return i}var a=o.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(e){return!/-webkit-|-ms-/.test(e)}).join(",");if(e.indexOf("Moz")>-1){return a}n["Webkit"+(0,s.default)(e)]=i;n["Moz"+(0,s.default)(e)]=a;return o}}e.exports=t["default"]},19572:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});var n=["Webkit"];var r=["Moz"];var o=["ms"];var i=["Webkit","Moz"];var a=["Webkit","ms"];var l=["Webkit","Moz","ms"];t["default"]={plugins:[],prefixMap:{"appearance":i,"userSelect":l,"textEmphasisPosition":n,"textEmphasis":n,"textEmphasisStyle":n,"textEmphasisColor":n,"boxDecorationBreak":n,"clipPath":n,"maskImage":n,"maskMode":n,"maskRepeat":n,"maskPosition":n,"maskClip":n,"maskOrigin":n,"maskSize":n,"maskComposite":n,"mask":n,"maskBorderSource":n,"maskBorderMode":n,"maskBorderSlice":n,"maskBorderWidth":n,"maskBorderOutset":n,"maskBorderRepeat":n,"maskBorder":n,"maskType":n,"textDecorationStyle":n,"textDecorationSkip":n,"textDecorationLine":n,"textDecorationColor":n,"filter":n,"fontFeatureSettings":n,"breakAfter":l,"breakBefore":l,"breakInside":l,"columnCount":i,"columnFill":i,"columnGap":i,"columnRule":i,"columnRuleColor":i,"columnRuleStyle":i,"columnRuleWidth":i,"columns":i,"columnSpan":i,"columnWidth":i,"writingMode":a,"flex":n,"flexBasis":n,"flexDirection":n,"flexGrow":n,"flexFlow":n,"flexShrink":n,"flexWrap":n,"alignContent":n,"alignItems":n,"alignSelf":n,"justifyContent":n,"order":n,"transform":n,"transformOrigin":n,"transformOriginX":n,"transformOriginY":n,"backfaceVisibility":n,"perspective":n,"perspectiveOrigin":n,"transformStyle":n,"transformOriginZ":n,"animation":n,"animationDelay":n,"animationDirection":n,"animationFillMode":n,"animationDuration":n,"animationIterationCount":n,"animationName":n,"animationPlayState":n,"animationTimingFunction":n,"backdropFilter":n,"fontKerning":n,"scrollSnapType":a,"scrollSnapPointsX":a,"scrollSnapPointsY":a,"scrollSnapDestination":a,"scrollSnapCoordinate":a,"shapeImageThreshold":n,"shapeImageMargin":n,"shapeImageOutside":n,"hyphens":l,"flowInto":a,"flowFrom":a,"regionFragment":a,"textAlignLast":r,"tabSize":r,"wrapFlow":o,"wrapThrough":o,"wrapMargin":o,"gridTemplateColumns":o,"gridTemplateRows":o,"gridTemplateAreas":o,"gridTemplate":o,"gridAutoColumns":o,"gridAutoRows":o,"gridAutoFlow":o,"grid":o,"gridRowStart":o,"gridColumnStart":o,"gridRowEnd":o,"gridRow":o,"gridColumn":o,"gridColumnEnd":o,"gridColumnGap":o,"gridRowGap":o,"gridArea":o,"gridGap":o,"textSizeAdjust":a,"borderImage":n,"borderImageOutset":n,"borderImageRepeat":n,"borderImageSlice":n,"borderImageSource":n,"borderImageWidth":n,"transitionDelay":n,"transitionDuration":n,"transitionProperty":n,"transitionTimingFunction":n}};e.exports=t["default"]},43543:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=n;function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}e.exports=t["default"]},20740:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=a;var r=n(43543);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t,n){if(e.hasOwnProperty(t)){var r=e[t];for(var i=0,a=r.length;i<a;++i){n[r[i]+(0,o.default)(t)]=n[t]}}}e.exports=t["default"]},64641:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=n;function n(e,t,n,r,o){for(var i=0,a=e.length;i<a;++i){var l=e[i](t,n,r,o);if(l){return l}}}e.exports=t["default"]},42696:function(e,t,n){"use strict";const r=n(66108);const o=Symbol("max");const i=Symbol("length");const a=Symbol("lengthCalculator");const l=Symbol("allowStale");const s=Symbol("maxAge");const u=Symbol("dispose");const c=Symbol("noDisposeOnSet");const f=Symbol("lruList");const h=Symbol("cache");const p=Symbol("updateAgeOnGet");const g=()=>1;class m{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[o]=e.max||Infinity;const n=e.length||g;this[a]=typeof n!=="function"?g:n;this[l]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[s]=e.maxAge||0;this[u]=e.dispose;this[c]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||Infinity;b(this)}get max(){return this[o]}set allowStale(e){this[l]=!!e}get allowStale(){return this[l]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[s]=e;b(this)}get maxAge(){return this[s]}set lengthCalculator(e){if(typeof e!=="function")e=g;if(e!==this[a]){this[a]=e;this[i]=0;this[f].forEach(e=>{e.length=this[a](e.value,e.key);this[i]+=e.length})}b(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let n=this[f].tail;n!==null;){const r=n.prev;S(this,e,n,t);n=r}}forEach(e,t){t=t||this;for(let n=this[f].head;n!==null;){const r=n.next;S(this,e,n,t);n=r}}keys(){return this[f].toArray().map(e=>e.key)}values(){return this[f].toArray().map(e=>e.value)}reset(){if(this[u]&&this[f]&&this[f].length){this[f].forEach(e=>this[u](e.key,e.value))}this[h]=new Map;this[f]=new r;this[i]=0}dump(){return this[f].map(e=>y(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[f]}set(e,t,n){n=n||this[s];if(n&&typeof n!=="number")throw new TypeError("maxAge must be a number");const r=n?Date.now():0;const l=this[a](t,e);if(this[h].has(e)){if(l>this[o]){x(this,this[h].get(e));return false}const a=this[h].get(e);const s=a.value;if(this[u]){if(!this[c])this[u](e,s.value)}s.now=r;s.maxAge=n;s.value=t;this[i]+=l-s.length;s.length=l;this.get(e);b(this);return true}const p=new w(e,t,l,r,n);if(p.length>this[o]){if(this[u])this[u](e,t);return false}this[i]+=p.length;this[f].unshift(p);this[h].set(e,this[f].head);b(this);return true}has(e){if(!this[h].has(e))return false;const t=this[h].get(e).value;return!y(this,t)}get(e){return v(this,e,true)}peek(e){return v(this,e,false)}pop(){const e=this[f].tail;if(!e)return null;x(this,e);return e.value}del(e){x(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n];const o=r.e||0;if(o===0)this.set(r.k,r.v);else{const e=o-t;if(e>0){this.set(r.k,r.v,e)}}}}prune(){this[h].forEach((e,t)=>v(this,t,false))}}const v=(e,t,n)=>{const r=e[h].get(t);if(r){const t=r.value;if(y(e,t)){x(e,r);if(!e[l])return undefined}else{if(n){if(e[p])r.value.now=Date.now();e[f].unshiftNode(r)}}return t.value}};const y=(e,t)=>{if(!t||!t.maxAge&&!e[s])return false;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[s]&&n>e[s]};const b=e=>{if(e[i]>e[o]){for(let t=e[f].tail;e[i]>e[o]&&t!==null;){const n=t.prev;x(e,t);t=n}}};const x=(e,t)=>{if(t){const n=t.value;if(e[u])e[u](n.key,n.value);e[i]-=n.length;e[h].delete(n.key);e[f].removeNode(t)}};class w{constructor(e,t,n,r,o){this.key=e;this.value=t;this.length=n;this.now=r;this.maxAge=o||0}}const S=(e,t,n,r)=>{let o=n.value;if(y(e,o)){x(e,n);if(!e[l])o=undefined}if(o)t.call(r,o.value,o.key,e)};e.exports=m},21561:function(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},66108:function(e,t,n){"use strict";e.exports=r;r.Node=l;r.create=r;function r(e){var t=this;if(!(t instanceof r)){t=new r}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach(function(e){t.push(e)})}else if(arguments.length>0){for(var n=0,o=arguments.length;n<o;n++){t.push(arguments[n])}}return t}r.prototype.removeNode=function(e){if(e.list!==this){throw new Error("removing node which does not belong to this list")}var t=e.next;var n=e.prev;if(t){t.prev=n}if(n){n.next=t}if(e===this.head){this.head=t}if(e===this.tail){this.tail=n}e.list.length--;e.next=null;e.prev=null;e.list=null;return t};r.prototype.unshiftNode=function(e){if(e===this.head){return}if(e.list){e.list.removeNode(e)}var t=this.head;e.list=this;e.next=t;if(t){t.prev=e}this.head=e;if(!this.tail){this.tail=e}this.length++};r.prototype.pushNode=function(e){if(e===this.tail){return}if(e.list){e.list.removeNode(e)}var t=this.tail;e.list=this;e.prev=t;if(t){t.next=e}this.tail=e;if(!this.head){this.head=e}this.length++};r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++){i(this,arguments[e])}return this.length};r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++){a(this,arguments[e])}return this.length};r.prototype.pop=function(){if(!this.tail){return undefined}var e=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return e};r.prototype.shift=function(){if(!this.head){return undefined}var e=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return e};r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;n!==null;r++){e.call(t,n.value,r,this);n=n.next}};r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;n!==null;r--){e.call(t,n.value,r,this);n=n.prev}};r.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++){n=n.next}if(t===e&&n!==null){return n.value}};r.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++){n=n.prev}if(t===e&&n!==null){return n.value}};r.prototype.map=function(e,t){t=t||this;var n=new r;for(var o=this.head;o!==null;){n.push(e.call(t,o.value,this));o=o.next}return n};r.prototype.mapReverse=function(e,t){t=t||this;var n=new r;for(var o=this.tail;o!==null;){n.push(e.call(t,o.value,this));o=o.prev}return n};r.prototype.reduce=function(e,t){var n;var r=this.head;if(arguments.length>1){n=t}else if(this.head){r=this.head.next;n=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var o=0;r!==null;o++){n=e(n,r.value,o);r=r.next}return n};r.prototype.reduceReverse=function(e,t){var n;var r=this.tail;if(arguments.length>1){n=t}else if(this.tail){r=this.tail.prev;n=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var o=this.length-1;r!==null;o--){n=e(n,r.value,o);r=r.prev}return n};r.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,n=this.head;n!==null;t++){e[t]=n.value;n=n.next}return e};r.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,n=this.tail;n!==null;t++){e[t]=n.value;n=n.prev}return e};r.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var n=new r;if(t<e||t<0){return n}if(e<0){e=0}if(t>this.length){t=this.length}for(var o=0,i=this.head;i!==null&&o<e;o++){i=i.next}for(;i!==null&&o<t;o++,i=i.next){n.push(i.value)}return n};r.prototype.sliceReverse=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var n=new r;if(t<e||t<0){return n}if(e<0){e=0}if(t>this.length){t=this.length}for(var o=this.length,i=this.tail;i!==null&&o>t;o--){i=i.prev}for(;i!==null&&o>e;o--,i=i.prev){n.push(i.value)}return n};r.prototype.splice=function(e,t){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var n=0,r=this.head;r!==null&&n<e;n++){r=r.next}var i=[];for(var n=0;r&&n<t;n++){i.push(r.value);r=this.removeNode(r)}if(r===null){r=this.tail}if(r!==this.head&&r!==this.tail){r=r.prev}for(var n=2;n<arguments.length;n++){r=o(this,r,arguments[n])}return i};r.prototype.reverse=function(){var e=this.head;var t=this.tail;for(var n=e;n!==null;n=n.prev){var r=n.prev;n.prev=n.next;n.next=r}this.head=t;this.tail=e;return this};function o(e,t,n){var r=t===e.head?new l(n,null,t,e):new l(n,t,t.next,e);if(r.next===null){e.tail=r}if(r.prev===null){e.head=r}e.length++;return r}function i(e,t){e.tail=new l(t,e.tail,null,e);if(!e.head){e.head=e.tail}e.length++}function a(e,t){e.head=new l(t,null,e.head,e);if(!e.tail){e.tail=e.head}e.length++}function l(e,t,n,r){if(!(this instanceof l)){return new l(e,t,n,r)}this.list=r;this.value=e;if(t){t.next=this;this.prev=t}else{this.prev=null}if(n){n.prev=this;this.next=n}else{this.next=null}}try{n(21561)(r)}catch(e){}},99024:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=Number.isNaN||function e(e){return typeof e==="number"&&e!==e};function o(e,t){if(e===t){return true}if(r(e)&&r(t)){return true}return false}function i(e,t){if(e.length!==t.length){return false}for(var n=0;n<e.length;n++){if(!o(e[n],t[n])){return false}}return true}function a(e,t){if(t===void 0){t=i}var n=null;function r(){var r=[];for(var o=0;o<arguments.length;o++){r[o]=arguments[o]}if(n&&n.lastThis===this&&t(r,n.lastArgs)){return n.lastResult}var i=e.apply(this,r);n={lastResult:i,lastArgs:r,lastThis:this};return i}r.clear=function e(){n=null};return r}},4439:function(e){"use strict";/*
|
|
22
|
+
object-assign
|
|
23
|
+
(c) Sindre Sorhus
|
|
24
|
+
@license MIT
|
|
25
|
+
*/var t=Object.getOwnPropertySymbols;var n=Object.prototype.hasOwnProperty;var r=Object.prototype.propertyIsEnumerable;function o(e){if(e===null||e===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(e)}function i(){try{if(!Object.assign){return false}var e=new String("abc");e[5]="de";if(Object.getOwnPropertyNames(e)[0]==="5"){return false}var t={};for(var n=0;n<10;n++){t["_"+String.fromCharCode(n)]=n}var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if(r.join("")!=="0123456789"){return false}var o={};"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e});if(Object.keys(Object.assign({},o)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(e){return false}}e.exports=i()?Object.assign:function(e,i){var a;var l=o(e);var s;for(var u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var c in a){if(n.call(a,c)){l[c]=a[c]}}if(t){s=t(a);for(var f=0;f<s.length;f++){if(r.call(a,s[f])){l[s[f]]=a[s[f]]}}}}return l}},7851:function(e,t,n){/*!
|
|
26
|
+
* Pikaday
|
|
27
|
+
*
|
|
28
|
+
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
|
|
29
|
+
*/(function(t,r){"use strict";var o;if(true){try{o=n(Object(function e(){var e=new Error("Cannot find module 'moment'");e.code="MODULE_NOT_FOUND";throw e}()))}catch(e){}e.exports=r(o)}else{}})(this,function(e){"use strict";var t=typeof e==="function",n=!!window.addEventListener,r=window.document,o=window.setTimeout,i=function(e,t,r,o){if(n){e.addEventListener(t,r,!!o)}else{e.attachEvent("on"+t,r)}},a=function(e,t,r,o){if(n){e.removeEventListener(t,r,!!o)}else{e.detachEvent("on"+t,r)}},l=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},s=function(e,t){return(" "+e.className+" ").indexOf(" "+t+" ")!==-1},u=function(e,t){if(!s(e,t)){e.className=e.className===""?t:e.className+" "+t}},c=function(e,t){e.className=l((" "+e.className+" ").replace(" "+t+" "," "))},f=function(e){return/Array/.test(Object.prototype.toString.call(e))},h=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},p=function(e){var t=e.getDay();return t===0||t===6},g=function(e){return e%4===0&&e%100!==0||e%400===0},m=function(e,t){return[31,g(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},v=function(e){if(h(e))e.setHours(0,0,0,0)},y=function(e,t){return e.getTime()===t.getTime()},b=function(e,t,n){var r,o;for(r in t){o=e[r]!==undefined;if(o&&typeof t[r]==="object"&&t[r]!==null&&t[r].nodeName===undefined){if(h(t[r])){if(n){e[r]=new Date(t[r].getTime())}}else if(f(t[r])){if(n){e[r]=t[r].slice(0)}}else{e[r]=b({},t[r],n)}}else if(n||!o){e[r]=t[r]}}return e},x=function(e,t,n){var o;if(r.createEvent){o=r.createEvent("HTMLEvents");o.initEvent(t,true,false);o=b(o,n);e.dispatchEvent(o)}else if(r.createEventObject){o=r.createEventObject();o=b(o,n);e.fireEvent("on"+t,o)}},w=function(e){if(e.month<0){e.year-=Math.ceil(Math.abs(e.month)/12);e.month+=12}if(e.month>11){e.year+=Math.floor(Math.abs(e.month)/12);e.month-=12}return e},S={field:null,bound:undefined,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:true,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:false,firstDay:0,formatStrict:false,minDate:null,maxDate:null,yearRange:10,showWeekNumber:false,pickWholeWeek:false,minYear:0,maxYear:9999,minMonth:undefined,maxMonth:undefined,startRange:null,endRange:null,isRTL:false,yearSuffix:"",showMonthAfterYear:false,showDaysInNextAndPreviousMonths:false,enableSelectionDaysInNextAndPreviousMonths:false,numberOfMonths:1,mainCalendar:"left",container:undefined,blurFieldOnSelect:true,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:true},k=function(e,t,n){t+=e.firstDay;while(t>=7){t-=7}return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},T=function(e){var t=[];var n="false";if(e.isEmpty){if(e.showDaysInNextAndPreviousMonths){t.push("is-outside-current-month");if(!e.enableSelectionDaysInNextAndPreviousMonths){t.push("is-selection-disabled")}}else{return'<td class="is-empty"></td>'}}if(e.isDisabled){t.push("is-disabled")}if(e.isToday){t.push("is-today")}if(e.isSelected){t.push("is-selected");n="true"}if(e.hasEvent){t.push("has-event")}if(e.isInRange){t.push("is-inrange")}if(e.isStartRange){t.push("is-startrange")}if(e.isEndRange){t.push("is-endrange")}return'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'">'+'<button class="pika-button pika-day" type="button" '+'data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button>"+"</td>"},E=function(e,t,n){var r=new Date(n,0,1),o=Math.ceil(((new Date(n,t,e)-r)/864e5+r.getDay()+1)/7);return'<td class="pika-week">'+o+"</td>"},C=function(e,t,n,r){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(r?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},j=function(e){return"<tbody>"+e.join("")+"</tbody>"},I=function(e){var t,n=[];if(e.showWeekNumber){n.push("<th></th>")}for(t=0;t<7;t++){n.push('<th scope="col"><abbr title="'+k(e,t)+'">'+k(e,t,true)+"</abbr></th>")}return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},D=function(e,t,n,r,o,i){var a,l,s,u=e._o,c=n===u.minYear,h=n===u.maxYear,p='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',g,m,v=true,y=true;for(s=[],a=0;a<12;a++){s.push('<option value="'+(n===o?a-t:12+a-t)+'"'+(a===r?' selected="selected"':"")+(c&&a<u.minMonth||h&&a>u.maxMonth?'disabled="disabled"':"")+">"+u.i18n.months[a]+"</option>")}g='<div class="pika-label">'+u.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+s.join("")+"</select></div>";if(f(u.yearRange)){a=u.yearRange[0];l=u.yearRange[1]+1}else{a=n-u.yearRange;l=1+n+u.yearRange}for(s=[];a<l&&a<=u.maxYear;a++){if(a>=u.minYear){s.push('<option value="'+a+'"'+(a===n?' selected="selected"':"")+">"+a+"</option>")}}m='<div class="pika-label">'+n+u.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+s.join("")+"</select></div>";if(u.showMonthAfterYear){p+=m+g}else{p+=g+m}if(c&&(r===0||u.minMonth>=r)){v=false}if(h&&(r===11||u.maxMonth<=r)){y=false}if(t===0){p+='<button class="pika-prev'+(v?"":" is-disabled")+'" type="button">'+u.i18n.previousMonth+"</button>"}if(t===e._o.numberOfMonths-1){p+='<button class="pika-next'+(y?"":" is-disabled")+'" type="button">'+u.i18n.nextMonth+"</button>"}return p+="</div>"},P=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+I(e)+j(t)+"</table>"},O=function(a){var l=this,u=l.config(a);l._onMouseDown=function(e){if(!l._v){return}e=e||window.event;var t=e.target||e.srcElement;if(!t){return}if(!s(t,"is-disabled")){if(s(t,"pika-button")&&!s(t,"is-empty")&&!s(t.parentNode,"is-disabled")){l.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day")));if(u.bound){o(function(){l.hide();if(u.blurFieldOnSelect&&u.field){u.field.blur()}},100)}}else if(s(t,"pika-prev")){l.prevMonth()}else if(s(t,"pika-next")){l.nextMonth()}}if(!s(t,"pika-select")){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false;return false}}else{l._c=true}};l._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;if(!t){return}if(s(t,"pika-select-month")){l.gotoMonth(t.value)}else if(s(t,"pika-select-year")){l.gotoYear(t.value)}};l._onKeyChange=function(e){e=e||window.event;if(l.isVisible()){switch(e.keyCode){case 13:case 27:if(u.field){u.field.blur()}break;case 37:e.preventDefault();l.adjustDate("subtract",1);break;case 38:l.adjustDate("subtract",7);break;case 39:l.adjustDate("add",1);break;case 40:l.adjustDate("add",7);break}}};l._onInputChange=function(n){var r;if(n.firedBy===l){return}if(u.parse){r=u.parse(u.field.value,u.format)}else if(t){r=e(u.field.value,u.format,u.formatStrict);r=r&&r.isValid()?r.toDate():null}else{r=new Date(Date.parse(u.field.value))}if(h(r)){l.setDate(r)}if(!l._v){l.show()}};l._onInputFocus=function(){l.show()};l._onInputClick=function(){l.show()};l._onInputBlur=function(){var e=r.activeElement;do{if(s(e,"pika-single")){return}}while(e=e.parentNode);if(!l._c){l._b=o(function(){l.hide()},50)}l._c=false};l._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,r=t;if(!t){return}if(!n&&s(t,"pika-select")){if(!t.onchange){t.setAttribute("onchange","return;");i(t,"change",l._onChange)}}do{if(s(r,"pika-single")||r===u.trigger){return}}while(r=r.parentNode);if(l._v&&t!==u.trigger&&r!==u.trigger){l.hide()}};l.el=r.createElement("div");l.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:"");i(l.el,"mousedown",l._onMouseDown,true);i(l.el,"touchend",l._onMouseDown,true);i(l.el,"change",l._onChange);if(u.keyboardInput){i(r,"keydown",l._onKeyChange)}if(u.field){if(u.container){u.container.appendChild(l.el)}else if(u.bound){r.body.appendChild(l.el)}else{u.field.parentNode.insertBefore(l.el,u.field.nextSibling)}i(u.field,"change",l._onInputChange);if(!u.defaultDate){if(t&&u.field.value){u.defaultDate=e(u.field.value,u.format).toDate()}else{u.defaultDate=new Date(Date.parse(u.field.value))}u.setDefaultDate=true}}var c=u.defaultDate;if(h(c)){if(u.setDefaultDate){l.setDate(c,true)}else{l.gotoDate(c)}}else{l.gotoDate(new Date)}if(u.bound){this.hide();l.el.className+=" is-bound";i(u.trigger,"click",l._onInputClick);i(u.trigger,"focus",l._onInputFocus);i(u.trigger,"blur",l._onInputBlur)}else{this.show()}};O.prototype={config:function(e){if(!this._o){this._o=b({},S,true)}var t=b(this._o,e,true);t.isRTL=!!t.isRTL;t.field=t.field&&t.field.nodeName?t.field:null;t.theme=typeof t.theme==="string"&&t.theme?t.theme:null;t.bound=!!(t.bound!==undefined?t.field&&t.bound:t.field);t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field;t.disableWeekends=!!t.disableWeekends;t.disableDayFn=typeof t.disableDayFn==="function"?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;t.numberOfMonths=n>4?4:n;if(!h(t.minDate)){t.minDate=false}if(!h(t.maxDate)){t.maxDate=false}if(t.minDate&&t.maxDate&&t.maxDate<t.minDate){t.maxDate=t.minDate=false}if(t.minDate){this.setMinDate(t.minDate)}if(t.maxDate){this.setMaxDate(t.maxDate)}if(f(t.yearRange)){var r=new Date().getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r;t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else{t.yearRange=Math.abs(parseInt(t.yearRange,10))||S.yearRange;if(t.yearRange>100){t.yearRange=100}}return t},toString:function(n){n=n||this._o.format;if(!h(this._d)){return""}if(this._o.toString){return this._o.toString(this._d,n)}if(t){return e(this._d).format(n)}return this._d.toDateString()},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){if(t&&e.isMoment(n)){this.setDate(n.toDate(),r)}},getDate:function(){return h(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e){this._d=null;if(this._o.field){this._o.field.value="";x(this._o.field,"change",{firedBy:this})}return this.draw()}if(typeof e==="string"){e=new Date(Date.parse(e))}if(!h(e)){return}var n=this._o.minDate,r=this._o.maxDate;if(h(n)&&e<n){e=n}else if(h(r)&&e>r){e=r}this._d=new Date(e.getTime());v(this._d);this.gotoDate(this._d);if(this._o.field){this._o.field.value=this.toString();x(this._o.field,"change",{firedBy:this})}if(!t&&typeof this._o.onSelect==="function"){this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=true;if(!h(e)){return}if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=e.getTime();r.setMonth(r.getMonth()+1);r.setDate(r.getDate()-1);t=o<n.getTime()||r.getTime()<o}if(t){this.calendars=[{month:e.getMonth(),year:e.getFullYear()}];if(this._o.mainCalendar==="right"){this.calendars[0].month+=1-this._o.numberOfMonths}}this.adjustCalendars()},adjustDate:function(e,t){var n=this.getDate()||new Date;var r=parseInt(t)*24*60*60*1e3;var o;if(e==="add"){o=new Date(n.valueOf()+r)}else if(e==="subtract"){o=new Date(n.valueOf()-r)}this.setDate(o)},adjustCalendars:function(){this.calendars[0]=w(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++){this.calendars[e]=w({month:this.calendars[0].month+e,year:this.calendars[0].year})}this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){if(!isNaN(e)){this.calendars[0].month=parseInt(e,10);this.adjustCalendars()}},nextMonth:function(){this.calendars[0].month++;this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--;this.adjustCalendars()},gotoYear:function(e){if(!isNaN(e)){this.calendars[0].year=parseInt(e,10);this.adjustCalendars()}},setMinDate:function(e){if(e instanceof Date){v(e);this._o.minDate=e;this._o.minYear=e.getFullYear();this._o.minMonth=e.getMonth()}else{this._o.minDate=S.minDate;this._o.minYear=S.minYear;this._o.minMonth=S.minMonth;this._o.startRange=S.startRange}this.draw()},setMaxDate:function(e){if(e instanceof Date){v(e);this._o.maxDate=e;this._o.maxYear=e.getFullYear();this._o.maxMonth=e.getMonth()}else{this._o.maxDate=S.maxDate;this._o.maxYear=S.maxYear;this._o.maxMonth=S.maxMonth;this._o.endRange=S.endRange}this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(!this._v&&!e){return}var t=this._o,n=t.minYear,r=t.maxYear,i=t.minMonth,a=t.maxMonth,l="",s;if(this._y<=n){this._y=n;if(!isNaN(i)&&this._m<i){this._m=i}}if(this._y>=r){this._y=r;if(!isNaN(a)&&this._m>a){this._m=a}}s="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<t.numberOfMonths;u++){l+='<div class="pika-lendar">'+D(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,s)+this.render(this.calendars[u].year,this.calendars[u].month,s)+"</div>"}this.el.innerHTML=l;if(t.bound){if(t.field.type!=="hidden"){o(function(){t.trigger.focus()},1)}}if(typeof this._o.onDraw==="function"){this._o.onDraw(this)}if(t.bound){t.field.setAttribute("aria-label",t.ariaLabel)}},adjustPosition:function(){var e,t,n,o,i,a,l,s,f,h,p,g;if(this._o.container)return;this.el.style.position="absolute";e=this._o.trigger;t=e;n=this.el.offsetWidth;o=this.el.offsetHeight;i=window.innerWidth||r.documentElement.clientWidth;a=window.innerHeight||r.documentElement.clientHeight;l=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop;p=true;g=true;if(typeof e.getBoundingClientRect==="function"){h=e.getBoundingClientRect();s=h.left+window.pageXOffset;f=h.bottom+window.pageYOffset}else{s=t.offsetLeft;f=t.offsetTop+t.offsetHeight;while(t=t.offsetParent){s+=t.offsetLeft;f+=t.offsetTop}}if(this._o.reposition&&s+n>i||this._o.position.indexOf("right")>-1&&s-n+e.offsetWidth>0){s=s-n+e.offsetWidth;p=false}if(this._o.reposition&&f+o>a+l||this._o.position.indexOf("top")>-1&&f-o-e.offsetHeight>0){f=f-o-e.offsetHeight;g=false}this.el.style.left=s+"px";this.el.style.top=f+"px";u(this.el,p?"left-aligned":"right-aligned");u(this.el,g?"bottom-aligned":"top-aligned");c(this.el,!p?"left-aligned":"right-aligned");c(this.el,!g?"bottom-aligned":"top-aligned")},render:function(e,t,n){var r=this._o,o=new Date,i=m(e,t),a=new Date(e,t,1).getDay(),l=[],s=[];v(o);if(r.firstDay>0){a-=r.firstDay;if(a<0){a+=7}}var u=t===0?11:t-1,c=t===11?0:t+1,f=t===0?e-1:e,g=t===11?e+1:e,b=m(f,u);var x=i+a,w=x;while(w>7){w-=7}x+=7-w;var S=false;for(var k=0,j=0;k<x;k++){var I=new Date(e,t,1+(k-a)),D=h(this._d)?y(I,this._d):false,O=y(I,o),M=r.events.indexOf(I.toDateString())!==-1?true:false,_=k<a||k>=i+a,R=1+(k-a),A=t,N=e,Z=r.startRange&&y(r.startRange,I),L=r.endRange&&y(r.endRange,I),B=r.startRange&&r.endRange&&r.startRange<I&&I<r.endRange,F=r.minDate&&I<r.minDate||r.maxDate&&I>r.maxDate||r.disableWeekends&&p(I)||r.disableDayFn&&r.disableDayFn(I);if(_){if(k<a){R=b+R;A=u;N=f}else{R=R-i;A=c;N=g}}var W={day:R,month:A,year:N,hasEvent:M,isSelected:D,isToday:O,isDisabled:F,isEmpty:_,isStartRange:Z,isEndRange:L,isInRange:B,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};if(r.pickWholeWeek&&D){S=true}s.push(T(W));if(++j===7){if(r.showWeekNumber){s.unshift(E(k-a,t,e))}l.push(C(s,r.isRTL,r.pickWholeWeek,S));s=[];j=0;S=false}}return P(r,l,n)},isVisible:function(){return this._v},show:function(){if(!this.isVisible()){this._v=true;this.draw();c(this.el,"is-hidden");if(this._o.bound){i(r,"click",this._onClick);this.adjustPosition()}if(typeof this._o.onOpen==="function"){this._o.onOpen.call(this)}}},hide:function(){var e=this._v;if(e!==false){if(this._o.bound){a(r,"click",this._onClick)}this.el.style.position="static";this.el.style.left="auto";this.el.style.top="auto";u(this.el,"is-hidden");this._v=false;if(e!==undefined&&typeof this._o.onClose==="function"){this._o.onClose.call(this)}}},destroy:function(){var e=this._o;this.hide();a(this.el,"mousedown",this._onMouseDown,true);a(this.el,"touchend",this._onMouseDown,true);a(this.el,"change",this._onChange);if(e.keyboardInput){a(r,"keydown",this._onKeyChange)}if(e.field){a(e.field,"change",this._onInputChange);if(e.bound){a(e.trigger,"click",this._onInputClick);a(e.trigger,"focus",this._onInputFocus);a(e.trigger,"blur",this._onInputBlur)}}if(this.el.parentNode){this.el.parentNode.removeChild(this.el)}}};return O})},57730:function(e,t,n){"use strict";var r=n(12017);function o(){}function i(){}i.resetWarningCache=o;e.exports=function(){function e(e,t,n,o,i,a){if(a===r){return}var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. "+"Use PropTypes.checkPropTypes() to call them. "+"Read more at http://fb.me/use-check-prop-types");l.name="Invariant Violation";throw l};e.isRequired=e;function t(){return e};var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};n.PropTypes=n;return n}},97641:function(e,t,n){if(false){var r,o}else{e.exports=n(57730)()}},12017:function(e){"use strict";var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t},33936:function(e,t,n){"use strict";/**
|
|
30
|
+
* @license React
|
|
31
|
+
* react-dom.production.min.js
|
|
32
|
+
*
|
|
33
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license found in the
|
|
36
|
+
* LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/var r=n(66204),o=n(46489);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,l={};function s(e,t){u(e,t);u(e+"Capture",t)}function u(e,t){l[e]=t;for(e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function m(e){if(f.call(g,e))return!0;if(f.call(p,e))return!1;if(h.test(e))return g[e]=!0;p[e]=!0;return!1}function v(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;e=e.toLowerCase().slice(0,5);return"data-"!==e&&"aria-"!==e;default:return!1}}function y(e,t,n,r){if(null===t||"undefined"===typeof t||v(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function b(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t;this.attributeName=r;this.attributeNamespace=o;this.mustUseProperty=n;this.propertyName=e;this.type=t;this.sanitizeURL=i;this.removeEmptyString=a}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new b(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];x[t]=new b(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new b(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){x[e]=new b(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){x[e]=new b(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){x[e]=new b(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){x[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function S(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(w,S);x[t]=new b(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(w,S);x[t]=new b(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(w,S);x[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){x[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)});x.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){x[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,t,n,r){var o=x.hasOwnProperty(t)?x[t]:null;if(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])y(t,n,o,r)&&(n=null),r||null===o?m(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3===o.type?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(o=o.type,n=3===o||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n)))}var T=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),C=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),O=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Z=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var L=Symbol.iterator;function B(e){if(null===e||"object"!==typeof e)return null;e=L&&e[L]||e["@@iterator"];return"function"===typeof e?e:null}var F=Object.assign,W;function U(e){if(void 0===W)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||""}return"\n"+W+e}var z=!1;function H(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"===typeof t.stack){for(var o=t.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(1!==a||1!==l){do if(a--,l--,0>l||o[a]!==i[l]){var s="\n"+o[a].replace(" at new "," at ");e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName));return s}while(1<=a&&0<=l)}break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?U(e):""}function K(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1),e;case 11:return e=H(e.type.render,!1),e;case 1:return e=H(e.type,!0),e;default:return""}}function $(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case j:return"Fragment";case C:return"Portal";case D:return"Profiler";case I:return"StrictMode";case _:return"Suspense";case R:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case P:return(e._context.displayName||"Context")+".Provider";case M:var t=e.render;e=e.displayName;e||(e=t.displayName||t.name||"",e=""!==e?"ForwardRef("+e+")":"ForwardRef");return e;case A:return t=e.displayName||null,null!==t?t:$(e.type)||"Memo";case N:t=e._payload;e=e._init;try{return $(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $(t);case 8:return t===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e;i.call(this,e)}});Object.defineProperty(e,t,{enumerable:n.enumerable});return{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null;delete e[t]}}}}function Q(e){e._valueTracker||(e._valueTracker=G(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue();var r="";e&&(r=Y(e)?e.checked?"true":"false":e.value);e=r;return e!==n?(t.setValue(e),!0):!1}function J(e){e=e||("undefined"!==typeof document?document:void 0);if("undefined"===typeof e)return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ee(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function et(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=q(null!=t.value?t.value:n);e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function en(e,t){t=t.checked;null!=t&&k(e,"checked",t,!1)}function er(e,t){en(e,t);var n=q(t.value),r=t.type;if(null!=n)if("number"===r){if(0===n&&""===e.value||e.value!=n)e.value=""+n}else e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r){e.removeAttribute("value");return}t.hasOwnProperty("value")?ei(e,t.type,n):t.hasOwnProperty("defaultValue")&&ei(e,t.type,q(t.defaultValue));null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function eo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue;n||t===e.value||(e.value=t);e.defaultValue=t}n=e.name;""!==n&&(e.name="");e.defaultChecked=!!e._wrapperState.initialChecked;""!==n&&(e.name=n)}function ei(e,t,n){if("number"!==t||J(e.ownerDocument)!==e)null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n)}var ea=Array.isArray;function el(e,t,n,r){e=e.options;if(t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{n=""+q(n);t=null;for(o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0;r&&(e[o].defaultSelected=!0);return}null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function es(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eu(e,t){var n=t.value;if(null==n){n=t.children;t=t.defaultValue;if(null!=n){if(null!=t)throw Error(i(92));if(ea(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t="");n=t}e._wrapperState={initialValue:q(n)}}function ec(e,t){var n=q(t.value),r=q(t.defaultValue);null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n));null!=r&&(e.defaultValue=""+r)}function ed(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ef(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function eh(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ef(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ep,eg=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{ep=ep||document.createElement("div");ep.innerHTML="<svg>"+t.valueOf().toString()+"</svg>";for(t=ep.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function em(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var ev={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ey=["Webkit","ms","Moz","O"];Object.keys(ev).forEach(function(e){ey.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1);ev[t]=ev[e]})});function eb(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||ev.hasOwnProperty(e)&&ev[e]?(""+t).trim():t+"px"}function ex(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=eb(n,t[n],r);"float"===n&&(n="cssFloat");r?e.setProperty(n,o):e[n]=o}}var ew=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function eS(e,t){if(t){if(ew[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function ek(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var eT=null;function eE(e){e=e.target||e.srcElement||window;e.correspondingUseElement&&(e=e.correspondingUseElement);return 3===e.nodeType?e.parentNode:e}var eC=null,ej=null,eI=null;function eD(e){if(e=oo(e)){if("function"!==typeof eC)throw Error(i(280));var t=e.stateNode;t&&(t=oa(t),eC(e.stateNode,e.type,t))}}function eP(e){ej?eI?eI.push(e):eI=[e]:ej=e}function eO(){if(ej){var e=ej,t=eI;eI=ej=null;eD(e);if(t)for(e=0;e<t.length;e++)eD(t[e])}}function eM(e,t){return e(t)}function e_(){}var eR=!1;function eA(e,t,n){if(eR)return e(t,n);eR=!0;try{return eM(e,t,n)}finally{if(eR=!1,null!==ej||null!==eI)e_(),eO()}}function eN(e,t){var n=e.stateNode;if(null===n)return null;var r=oa(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!("button"===e||"input"===e||"select"===e||"textarea"===e));e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var eZ=!1;if(c)try{var eL={};Object.defineProperty(eL,"passive",{get:function(){eZ=!0}});window.addEventListener("test",eL,eL);window.removeEventListener("test",eL,eL)}catch(e){eZ=!1}function eB(e,t,n,r,o,i,a,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var eF=!1,eW=null,eU=!1,ez=null,eH={onError:function(e){eF=!0;eW=e}};function eK(e,t,n,r,o,i,a,l,s){eF=!1;eW=null;eB.apply(eH,arguments)}function e$(e,t,n,r,o,a,l,s,u){eK.apply(this,arguments);if(eF){if(eF){var c=eW;eF=!1;eW=null}else throw Error(i(198));eU||(eU=!0,ez=c)}}function eV(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,0!==(t.flags&4098)&&(n=t.return),e=t.return;while(e)}return 3===t.tag?n:null}function eq(e){if(13===e.tag){var t=e.memoizedState;null===t&&(e=e.alternate,null!==e&&(t=e.memoizedState));if(null!==t)return t.dehydrated}return null}function eY(e){if(eV(e)!==e)throw Error(i(188))}function eG(e){var t=e.alternate;if(!t){t=eV(e);if(null===t)throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){r=o.return;if(null!==r){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return eY(o),e;if(a===r)return eY(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0;n=o;r=a;break}if(s===r){l=!0;r=o;n=a;break}s=s.sibling}if(!l){for(s=a.child;s;){if(s===n){l=!0;n=a;r=o;break}if(s===r){l=!0;r=a;n=o;break}s=s.sibling}if(!l)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}function eQ(e){e=eG(e);return null!==e?eX(e):null}function eX(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=eX(e);if(null!==t)return t;e=e.sibling}return null}var eJ=o.unstable_scheduleCallback,e0=o.unstable_cancelCallback,e1=o.unstable_shouldYield,e2=o.unstable_requestPaint,e4=o.unstable_now,e5=o.unstable_getCurrentPriorityLevel,e3=o.unstable_ImmediatePriority,e7=o.unstable_UserBlockingPriority,e6=o.unstable_NormalPriority,e8=o.unstable_LowPriority,e9=o.unstable_IdlePriority,te=null,tt=null;function tn(e){if(tt&&"function"===typeof tt.onCommitFiberRoot)try{tt.onCommitFiberRoot(te,e,void 0,128===(e.current.flags&128))}catch(e){}}var tr=Math.clz32?Math.clz32:ta,to=Math.log,ti=Math.LN2;function ta(e){e>>>=0;return 0===e?32:31-(to(e)/ti|0)|0}var tl=64,ts=4194304;function tu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tc(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(0!==a){var l=a&~o;0!==l?r=tu(l):(i&=a,0!==i&&(r=tu(i)))}else a=n&~o,0!==a?r=tu(a):0!==i&&(r=tu(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&(o=r&-r,i=t&-t,o>=i||16===o&&0!==(i&4194240)))return t;0!==(r&4)&&(r|=n&16);t=e.entangledLanes;if(0!==t)for(e=e.entanglements,t&=r;0<t;)n=31-tr(t),o=1<<n,r|=e[n],t&=~o;return r}function td(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-tr(i),l=1<<a,s=o[a];if(-1===s){if(0===(l&n)||0!==(l&r))o[a]=td(l,t)}else s<=t&&(e.expiredLanes|=l);i&=~l}}function th(e){e=e.pendingLanes&-1073741825;return 0!==e?e:e&1073741824?1073741824:0}function tp(){var e=tl;tl<<=1;0===(tl&4194240)&&(tl=64);return e}function tg(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tm(e,t,n){e.pendingLanes|=t;536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0);e=e.eventTimes;t=31-tr(t);e[t]=n}function tv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t;e.suspendedLanes=0;e.pingedLanes=0;e.expiredLanes&=t;e.mutableReadLanes&=t;e.entangledLanes&=t;t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-tr(n),i=1<<o;t[o]=0;r[o]=-1;e[o]=-1;n&=~i}}function ty(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-tr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t);n&=~o}}var tb=0;function tx(e){e&=-e;return 1<e?4<e?0!==(e&268435455)?16:536870912:4:1}var tw,tS,tk,tT,tE,tC=!1,tj=[],tI=null,tD=null,tP=null,tO=new Map,tM=new Map,t_=[],tR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function tA(e,t){switch(e){case"focusin":case"focusout":tI=null;break;case"dragenter":case"dragleave":tD=null;break;case"mouseover":case"mouseout":tP=null;break;case"pointerover":case"pointerout":tO.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":tM.delete(t.pointerId)}}function tN(e,t,n,r,o,i){if(null===e||e.nativeEvent!==i)return e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(t=oo(t),null!==t&&tS(t)),e;e.eventSystemFlags|=r;t=e.targetContainers;null!==o&&-1===t.indexOf(o)&&t.push(o);return e}function tZ(e,t,n,r,o){switch(t){case"focusin":return tI=tN(tI,e,t,n,r,o),!0;case"dragenter":return tD=tN(tD,e,t,n,r,o),!0;case"mouseover":return tP=tN(tP,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;tO.set(i,tN(tO.get(i)||null,e,t,n,r,o));return!0;case"gotpointercapture":return i=o.pointerId,tM.set(i,tN(tM.get(i)||null,e,t,n,r,o)),!0}return!1}function tL(e){var t=on(e.target);if(null!==t){var n=eV(t);if(null!==n){if(t=n.tag,13===t){if(t=eq(n),null!==t){e.blockedOn=t;tE(e.priority,function(){tk(n)});return}}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=3===n.tag?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function tB(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=tG(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null===n){n=e.nativeEvent;var r=new n.constructor(n.type,n);eT=r;n.target.dispatchEvent(r);eT=null}else return t=oo(n),null!==t&&tS(t),e.blockedOn=n,!1;t.shift()}return!0}function tF(e,t,n){tB(e)&&n.delete(t)}function tW(){tC=!1;null!==tI&&tB(tI)&&(tI=null);null!==tD&&tB(tD)&&(tD=null);null!==tP&&tB(tP)&&(tP=null);tO.forEach(tF);tM.forEach(tF)}function tU(e,t){e.blockedOn===t&&(e.blockedOn=null,tC||(tC=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,tW)))}function tz(e){function t(t){return tU(t,e)}if(0<tj.length){tU(tj[0],e);for(var n=1;n<tj.length;n++){var r=tj[n];r.blockedOn===e&&(r.blockedOn=null)}}null!==tI&&tU(tI,e);null!==tD&&tU(tD,e);null!==tP&&tU(tP,e);tO.forEach(t);tM.forEach(t);for(n=0;n<t_.length;n++)r=t_[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<t_.length&&(n=t_[0],null===n.blockedOn);)tL(n),null===n.blockedOn&&t_.shift()}var tH=T.ReactCurrentBatchConfig,tK=!0;function t$(e,t,n,r){var o=tb,i=tH.transition;tH.transition=null;try{tb=1,tq(e,t,n,r)}finally{tb=o,tH.transition=i}}function tV(e,t,n,r){var o=tb,i=tH.transition;tH.transition=null;try{tb=4,tq(e,t,n,r)}finally{tb=o,tH.transition=i}}function tq(e,t,n,r){if(tK){var o=tG(e,t,n,r);if(null===o)rL(e,t,r,tY,n),tA(e,r);else if(tZ(o,e,t,n,r))r.stopPropagation();else if(tA(e,r),t&4&&-1<tR.indexOf(e)){for(;null!==o;){var i=oo(o);null!==i&&tw(i);i=tG(e,t,n,r);null===i&&rL(e,t,r,tY,n);if(i===o)break;o=i}null!==o&&r.stopPropagation()}else rL(e,t,r,null,n)}}var tY=null;function tG(e,t,n,r){tY=null;e=eE(r);e=on(e);if(null!==e)if(t=eV(e),null===t)e=null;else if(n=t.tag,13===n){e=eq(t);if(null!==e)return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);tY=e;return null}function tQ(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(e5()){case e3:return 1;case e7:return 4;case e6:case e8:return 16;case e9:return 536870912;default:return 16}default:return 16}}var tX=null,tJ=null,t0=null;function t1(){if(t0)return t0;var e,t=tJ,n=t.length,r,o="value"in tX?tX.value:tX.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return t0=o.slice(e,1<r?1-r:void 0)}function t2(e){var t=e.keyCode;"charCode"in e?(e=e.charCode,0===e&&13===t&&(e=13)):e=t;10===e&&(e=13);return 32<=e||13===e?e:0}function t4(){return!0}function t5(){return!1}function t3(e){function t(t,n,r,o,i){this._reactName=t;this._targetInst=r;this.type=n;this.nativeEvent=o;this.target=i;this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?t4:t5;this.isPropagationStopped=t5;return this}F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=t4)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=t4)},persist:function(){},isPersistent:t4});return t}var t7={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},t6=t3(t7),t8=F({},t7,{view:0,detail:0}),t9=t3(t8),ne,nt,nn,no=F({},t8,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nx,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){if("movementX"in e)return e.movementX;e!==nn&&(nn&&"mousemove"===e.type?(ne=e.screenX-nn.screenX,nt=e.screenY-nn.screenY):nt=ne=0,nn=e);return ne},movementY:function(e){return"movementY"in e?e.movementY:nt}}),ni=t3(no),na=F({},no,{dataTransfer:0}),nl=t3(na),ns=F({},t8,{relatedTarget:0}),nu=t3(ns),nc=F({},t7,{animationName:0,elapsedTime:0,pseudoElement:0}),nd=t3(nc),nf=F({},t7,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nh=t3(nf),np=F({},t7,{data:0}),ng=t3(np),nm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ny={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ny[e])?!!t[e]:!1}function nx(){return nb}var nw=F({},t8,{key:function(e){if(e.key){var t=nm[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?(e=t2(e),13===e?"Enter":String.fromCharCode(e)):"keydown"===e.type||"keyup"===e.type?nv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nx,charCode:function(e){return"keypress"===e.type?t2(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?t2(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),nS=t3(nw),nk=F({},no,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nT=t3(nk),nE=F({},t8,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nx}),nC=t3(nE),nj=F({},t7,{propertyName:0,elapsedTime:0,pseudoElement:0}),nI=t3(nj),nD=F({},no,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),nP=t3(nD),nO=[9,13,27,32],nM=c&&"CompositionEvent"in window,n_=null;c&&"documentMode"in document&&(n_=document.documentMode);var nR=c&&"TextEvent"in window&&!n_,nA=c&&(!nM||n_&&8<n_&&11>=n_),nN=String.fromCharCode(32),nZ=!1;function nL(e,t){switch(e){case"keyup":return-1!==nO.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nB(e){e=e.detail;return"object"===typeof e&&"data"in e?e.data:null}var nF=!1;function nW(e,t){switch(e){case"compositionend":return nB(t);case"keypress":if(32!==t.which)return null;nZ=!0;return nN;case"textInput":return e=t.data,e===nN&&nZ?null:e;default:return null}}function nU(e,t){if(nF)return"compositionend"===e||!nM&&nL(e,t)?(e=t1(),t0=tJ=tX=null,nF=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return nA&&"ko"!==t.locale?null:t.data;default:return null}}var nz={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nH(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!nz[e.type]:"textarea"===t?!0:!1}function nK(e,t,n,r){eP(r);t=rF(t,"onChange");0<t.length&&(n=new t6("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var n$=null,nV=null;function nq(e){rM(e,0)}function nY(e){var t=oi(e);if(X(t))return e}function nG(e,t){if("change"===e)return t}var nQ=!1;if(c){var nX;if(c){var nJ="oninput"in document;if(!nJ){var n0=document.createElement("div");n0.setAttribute("oninput","return;");nJ="function"===typeof n0.oninput}nX=nJ}else nX=!1;nQ=nX&&(!document.documentMode||9<document.documentMode)}function n1(){n$&&(n$.detachEvent("onpropertychange",n2),nV=n$=null)}function n2(e){if("value"===e.propertyName&&nY(nV)){var t=[];nK(t,nV,e,eE(e));eA(nq,t)}}function n4(e,t,n){"focusin"===e?(n1(),n$=t,nV=n,n$.attachEvent("onpropertychange",n2)):"focusout"===e&&n1()}function n5(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return nY(nV)}function n3(e,t){if("click"===e)return nY(t)}function n7(e,t){if("input"===e||"change"===e)return nY(t)}function n6(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t}var n8="function"===typeof Object.is?Object.is:n6;function n9(e,t){if(n8(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!f.call(t,o)||!n8(e[o],t[o]))return!1}return!0}function re(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rt(e,t){var n=re(e);e=0;for(var r;n;){if(3===n.nodeType){r=e+n.textContent.length;if(e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=re(n)}}function rn(e,t){return e&&t?e===t?!0:e&&3===e.nodeType?!1:t&&3===t.nodeType?rn(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ro(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=J(e.document)}return t}function ri(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ra(e){var t=ro(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&rn(n.ownerDocument.documentElement,n)){if(null!==r&&ri(n)){if(t=r.start,e=r.end,void 0===e&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o);!e.extend&&i>r&&(o=r,r=i,i=o);o=rt(n,i);var a=rt(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}t=[];for(e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});"function"===typeof n.focus&&n.focus();for(n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rl=c&&"documentMode"in document&&11>=document.documentMode,rs=null,ru=null,rc=null,rd=!1;function rf(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;rd||null==rs||rs!==J(r)||(r=rs,"selectionStart"in r&&ri(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rc&&n9(rc,r)||(rc=r,r=rF(ru,"onSelect"),0<r.length&&(t=new t6("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=rs)))}function rh(e,t){var n={};n[e.toLowerCase()]=t.toLowerCase();n["Webkit"+e]="webkit"+t;n["Moz"+e]="moz"+t;return n}var rp={animationend:rh("Animation","AnimationEnd"),animationiteration:rh("Animation","AnimationIteration"),animationstart:rh("Animation","AnimationStart"),transitionend:rh("Transition","TransitionEnd")},rg={},rm={};c&&(rm=document.createElement("div").style,"AnimationEvent"in window||(delete rp.animationend.animation,delete rp.animationiteration.animation,delete rp.animationstart.animation),"TransitionEvent"in window||delete rp.transitionend.transition);function rv(e){if(rg[e])return rg[e];if(!rp[e])return e;var t=rp[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rm)return rg[e]=t[n];return e}var ry=rv("animationend"),rb=rv("animationiteration"),rx=rv("animationstart"),rw=rv("transitionend"),rS=new Map,rk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function rT(e,t){rS.set(e,t);s(t,[e])}for(var rE=0;rE<rk.length;rE++){var rC=rk[rE],rj=rC.toLowerCase(),rI=rC[0].toUpperCase()+rC.slice(1);rT(rj,"on"+rI)}rT(ry,"onAnimationEnd");rT(rb,"onAnimationIteration");rT(rx,"onAnimationStart");rT("dblclick","onDoubleClick");rT("focusin","onFocus");rT("focusout","onBlur");rT(rw,"onTransitionEnd");u("onMouseEnter",["mouseout","mouseover"]);u("onMouseLeave",["mouseout","mouseover"]);u("onPointerEnter",["pointerout","pointerover"]);u("onPointerLeave",["pointerout","pointerover"]);s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));s("onBeforeInput",["compositionend","keypress","textInput","paste"]);s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rD="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),rP=new Set("cancel close invalid load scroll toggle".split(" ").concat(rD));function rO(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n;e$(r,t,void 0,e);e.currentTarget=null}function rM(e,t){t=0!==(t&4);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;l=l.listener;if(s!==i&&o.isPropagationStopped())break e;rO(o,l,u);i=s}else for(a=0;a<r.length;a++){l=r[a];s=l.instance;u=l.currentTarget;l=l.listener;if(s!==i&&o.isPropagationStopped())break e;rO(o,l,u);i=s}}}if(eU)throw e=ez,eU=!1,ez=null,e}function r_(e,t){var n=t[r9];void 0===n&&(n=t[r9]=new Set);var r=e+"__bubble";n.has(r)||(rZ(t,e,2,!1),n.add(r))}function rR(e,t,n){var r=0;t&&(r|=4);rZ(n,e,r,t)}var rA="_reactListening"+Math.random().toString(36).slice(2);function rN(e){if(!e[rA]){e[rA]=!0;a.forEach(function(t){"selectionchange"!==t&&(rP.has(t)||rR(t,!1,e),rR(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[rA]||(t[rA]=!0,rR("selectionchange",!1,t))}}function rZ(e,t,n,r){switch(tQ(t)){case 1:var o=t$;break;case 4:o=tV;break;default:o=tq}n=o.bind(null,t,n,e);o=void 0;!eZ||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0);r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function rL(e,t,n,r,o){var i=r;if(0===(t&1)&&0===(t&2)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var l=r.stateNode.containerInfo;if(l===o||8===l.nodeType&&l.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var s=a.tag;if(3===s||4===s){if(s=a.stateNode.containerInfo,s===o||8===s.nodeType&&s.parentNode===o)return}a=a.return}for(;null!==l;){a=on(l);if(null===a)return;s=a.tag;if(5===s||6===s){r=i=a;continue e}l=l.parentNode}}r=r.return}eA(function(){var r=i,o=eE(n),a=[];e:{var l=rS.get(e);if(void 0!==l){var s=t6,u=e;switch(e){case"keypress":if(0===t2(n))break e;case"keydown":case"keyup":s=nS;break;case"focusin":u="focus";s=nu;break;case"focusout":u="blur";s=nu;break;case"beforeblur":case"afterblur":s=nu;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=ni;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=nl;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=nC;break;case ry:case rb:case rx:s=nd;break;case rw:s=nI;break;case"scroll":s=t9;break;case"wheel":s=nP;break;case"copy":case"cut":case"paste":s=nh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=nT}var c=0!==(t&4),f=!c&&"scroll"===e,h=c?null!==l?l+"Capture":null:l;c=[];for(var p=r,g;null!==p;){g=p;var m=g.stateNode;5===g.tag&&null!==m&&(g=m,null!==h&&(m=eN(p,h),null!=m&&c.push(rB(p,m,g))));if(f)break;p=p.return}0<c.length&&(l=new s(l,u,null,n,o),a.push({event:l,listeners:c}))}}if(0===(t&7)){e:{l="mouseover"===e||"pointerover"===e;s="mouseout"===e||"pointerout"===e;if(l&&n!==eT&&(u=n.relatedTarget||n.fromElement)&&(on(u)||u[r8]))break e;if(s||l){l=o.window===o?o:(l=o.ownerDocument)?l.defaultView||l.parentWindow:window;if(s){if(u=n.relatedTarget||n.toElement,s=r,u=u?on(u):null,null!==u&&(f=eV(u),u!==f||5!==u.tag&&6!==u.tag))u=null}else s=null,u=r;if(s!==u){c=ni;m="onMouseLeave";h="onMouseEnter";p="mouse";if("pointerout"===e||"pointerover"===e)c=nT,m="onPointerLeave",h="onPointerEnter",p="pointer";f=null==s?l:oi(s);g=null==u?l:oi(u);l=new c(m,p+"leave",s,n,o);l.target=f;l.relatedTarget=g;m=null;on(o)===r&&(c=new c(h,p+"enter",u,n,o),c.target=g,c.relatedTarget=f,m=c);f=m;if(s&&u)t:{c=s;h=u;p=0;for(g=c;g;g=rW(g))p++;g=0;for(m=h;m;m=rW(m))g++;for(;0<p-g;)c=rW(c),p--;for(;0<g-p;)h=rW(h),g--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break t;c=rW(c);h=rW(h)}c=null}else c=null;null!==s&&rU(a,l,s,c,!1);null!==u&&null!==f&&rU(a,f,u,c,!0)}}}e:{l=r?oi(r):window;s=l.nodeName&&l.nodeName.toLowerCase();if("select"===s||"input"===s&&"file"===l.type)var v=nG;else if(nH(l))if(nQ)v=n7;else{v=n5;var y=n4}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(v=n3);if(v&&(v=v(e,r))){nK(a,v,n,o);break e}y&&y(e,l,r);"focusout"===e&&(y=l._wrapperState)&&y.controlled&&"number"===l.type&&ei(l,"number",l.value)}y=r?oi(r):window;switch(e){case"focusin":if(nH(y)||"true"===y.contentEditable)rs=y,ru=r,rc=null;break;case"focusout":rc=ru=rs=null;break;case"mousedown":rd=!0;break;case"contextmenu":case"mouseup":case"dragend":rd=!1;rf(a,n,o);break;case"selectionchange":if(rl)break;case"keydown":case"keyup":rf(a,n,o)}var b;if(nM)t:{switch(e){case"compositionstart":var x="onCompositionStart";break t;case"compositionend":x="onCompositionEnd";break t;case"compositionupdate":x="onCompositionUpdate";break t}x=void 0}else nF?nL(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(nA&&"ko"!==n.locale&&(nF||"onCompositionStart"!==x?"onCompositionEnd"===x&&nF&&(b=t1()):(tX=o,tJ="value"in tX?tX.value:tX.textContent,nF=!0)),y=rF(r,x),0<y.length&&(x=new ng(x,e,null,n,o),a.push({event:x,listeners:y}),b?x.data=b:(b=nB(n),null!==b&&(x.data=b))));if(b=nR?nW(e,n):nU(e,n))r=rF(r,"onBeforeInput"),0<r.length&&(o=new ng("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=b)}rM(a,t)})}function rB(e,t,n){return{instance:e,listener:t,currentTarget:n}}function rF(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,i=eN(e,n),null!=i&&r.unshift(rB(e,i,o)),i=eN(e,t),null!=i&&r.push(rB(e,i,o)));e=e.return}return r}function rW(e){if(null===e)return null;do e=e.return;while(e&&5!==e.tag);return e?e:null}function rU(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==u&&(l=u,o?(s=eN(n,i),null!=s&&a.unshift(rB(n,s,l))):o||(s=eN(n,i),null!=s&&a.push(rB(n,s,l))));n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var rz=/\r\n?/g,rH=/\u0000|\uFFFD/g;function rK(e){return("string"===typeof e?e:""+e).replace(rz,"\n").replace(rH,"")}function r$(e,t,n){t=rK(t);if(rK(e)!==t&&n)throw Error(i(425))}function rV(){}var rq=null,rY=null;function rG(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var rQ="function"===typeof setTimeout?setTimeout:void 0,rX="function"===typeof clearTimeout?clearTimeout:void 0,rJ="function"===typeof Promise?Promise:void 0,r0="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof rJ?function(e){return rJ.resolve(null).then(e).catch(r1)}:rQ;function r1(e){setTimeout(function(){throw e})}function r2(e,t){var n=t,r=0;do{var o=n.nextSibling;e.removeChild(n);if(o&&8===o.nodeType)if(n=o.data,"/$"===n){if(0===r){e.removeChild(o);tz(t);return}r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);tz(t)}function r4(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){t=e.data;if("$"===t||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function r5(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var r3=Math.random().toString(36).slice(2),r7="__reactFiber$"+r3,r6="__reactProps$"+r3,r8="__reactContainer$"+r3,r9="__reactEvents$"+r3,oe="__reactListeners$"+r3,ot="__reactHandles$"+r3;function on(e){var t=e[r7];if(t)return t;for(var n=e.parentNode;n;){if(t=n[r8]||n[r7]){n=t.alternate;if(null!==t.child||null!==n&&null!==n.child)for(e=r5(e);null!==e;){if(n=e[r7])return n;e=r5(e)}return t}e=n;n=e.parentNode}return null}function oo(e){e=e[r7]||e[r8];return!e||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function oa(e){return e[r6]||null}var ol=[],os=-1;function ou(e){return{current:e}}function oc(e){0>os||(e.current=ol[os],ol[os]=null,os--)}function od(e,t){os++;ol[os]=e.current;e.current=t}var of={},oh=ou(of),op=ou(!1),og=of;function om(e,t){var n=e.type.contextTypes;if(!n)return of;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o);return o}function ov(e){e=e.childContextTypes;return null!==e&&void 0!==e}function oy(){oc(op);oc(oh)}function ob(e,t,n){if(oh.current!==of)throw Error(i(168));od(oh,t);od(op,n)}function ox(e,t,n){var r=e.stateNode;t=t.childContextTypes;if("function"!==typeof r.getChildContext)return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(i(108,V(e)||"Unknown",o));return F({},n,r)}function ow(e){e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||of;og=oh.current;od(oh,e);od(op,op.current);return!0}function oS(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=ox(e,t,og),r.__reactInternalMemoizedMergedChildContext=e,oc(op),oc(oh),od(oh,e)):oc(op);od(op,n)}var ok=null,oT=!1,oE=!1;function oC(e){null===ok?ok=[e]:ok.push(e)}function oj(e){oT=!0;oC(e)}function oI(){if(!oE&&null!==ok){oE=!0;var e=0,t=tb;try{var n=ok;for(tb=1;e<n.length;e++){var r=n[e];do r=r(!0);while(null!==r)}ok=null;oT=!1}catch(t){throw null!==ok&&(ok=ok.slice(e+1)),eJ(e3,oI),t}finally{tb=t,oE=!1}}return null}var oD=[],oP=0,oO=null,oM=0,o_=[],oR=0,oA=null,oN=1,oZ="";function oL(e,t){oD[oP++]=oM;oD[oP++]=oO;oO=e;oM=t}function oB(e,t,n){o_[oR++]=oN;o_[oR++]=oZ;o_[oR++]=oA;oA=e;var r=oN;e=oZ;var o=32-tr(r)-1;r&=~(1<<o);n+=1;var i=32-tr(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32);r>>=a;o-=a;oN=1<<32-tr(t)+o|n<<o|r;oZ=i+e}else oN=1<<i|n<<o|r,oZ=e}function oF(e){null!==e.return&&(oL(e,1),oB(e,1,0))}function oW(e){for(;e===oO;)oO=oD[--oP],oD[oP]=null,oM=oD[--oP],oD[oP]=null;for(;e===oA;)oA=o_[--oR],o_[oR]=null,oZ=o_[--oR],o_[oR]=null,oN=o_[--oR],o_[oR]=null}var oU=null,oz=null,oH=!1,oK=null;function o$(e,t){var n=sz(5,null,null,0);n.elementType="DELETED";n.stateNode=t;n.return=e;t=e.deletions;null===t?(e.deletions=[n],e.flags|=16):t.push(n)}function oV(e,t){switch(e.tag){case 5:var n=e.type;t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t;return null!==t?(e.stateNode=t,oU=e,oz=r4(t.firstChild),!0):!1;case 6:return t=""===e.pendingProps||3!==t.nodeType?null:t,null!==t?(e.stateNode=t,oU=e,oz=null,!0):!1;case 13:return t=8!==t.nodeType?null:t,null!==t?(n=null!==oA?{id:oN,overflow:oZ}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=sz(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,oU=e,oz=null,!0):!1;default:return!1}}function oq(e){return 0!==(e.mode&1)&&0===(e.flags&128)}function oY(e){if(oH){var t=oz;if(t){var n=t;if(!oV(e,t)){if(oq(e))throw Error(i(418));t=r4(n.nextSibling);var r=oU;t&&oV(e,t)?o$(r,n):(e.flags=e.flags&-4097|2,oH=!1,oU=e)}}else{if(oq(e))throw Error(i(418));e.flags=e.flags&-4097|2;oH=!1;oU=e}}}function oG(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;oU=e}function oQ(e){if(e!==oU)return!1;if(!oH)return oG(e),oH=!0,!1;var t;(t=3!==e.tag)&&!(t=5!==e.tag)&&(t=e.type,t="head"!==t&&"body"!==t&&!rG(e.type,e.memoizedProps));if(t&&(t=oz)){if(oq(e))throw oX(),Error(i(418));for(;t;)o$(e,t),t=r4(t.nextSibling)}oG(e);if(13===e.tag){e=e.memoizedState;e=null!==e?e.dehydrated:null;if(!e)throw Error(i(317));e:{e=e.nextSibling;for(t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oz=r4(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oz=null}}else oz=oU?r4(e.stateNode.nextSibling):null;return!0}function oX(){for(var e=oz;e;)e=r4(e.nextSibling)}function oJ(){oz=oU=null;oH=!1}function o0(e){null===oK?oK=[e]:oK.push(e)}var o1=T.ReactCurrentBatchConfig;function o2(e,t){if(e&&e.defaultProps){t=F({},t);e=e.defaultProps;for(var n in e)void 0===t[n]&&(t[n]=e[n]);return t}return t}var o4=ou(null),o5=null,o3=null,o7=null;function o6(){o7=o3=o5=null}function o8(e){var t=o4.current;oc(o4);e._currentValue=t}function o9(e,t,n){for(;null!==e;){var r=e.alternate;(e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t);if(e===n)break;e=e.return}}function ie(e,t){o5=e;o7=o3=null;e=e.dependencies;null!==e&&null!==e.firstContext&&(0!==(e.lanes&t)&&(aH=!0),e.firstContext=null)}function it(e){var t=e._currentValue;if(o7!==e)if(e={context:e,memoizedValue:t,next:null},null===o3){if(null===o5)throw Error(i(308));o3=e;o5.dependencies={lanes:0,firstContext:e}}else o3=o3.next=e;return t}var io=null;function ii(e){null===io?io=[e]:io.push(e)}function ia(e,t,n,r){var o=t.interleaved;null===o?(n.next=n,ii(t)):(n.next=o.next,o.next=n);t.interleaved=n;return il(e,r)}function il(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t);n=e;for(e=e.return;null!==e;)e.childLanes|=t,n=e.alternate,null!==n&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var is=!1;function iu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ic(e,t){e=e.updateQueue;t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function id(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ih(e,t,n){var r=e.updateQueue;if(null===r)return null;r=r.shared;if(0!==(l$&2)){var o=r.pending;null===o?t.next=t:(t.next=o.next,o.next=t);r.pending=t;return il(e,n)}o=r.interleaved;null===o?(t.next=t,ii(r)):(t.next=o.next,o.next=t);r.interleaved=t;return il(e,n)}function ip(e,t,n){t=t.updateQueue;if(null!==t&&(t=t.shared,0!==(n&4194240))){var r=t.lanes;r&=e.pendingLanes;n|=r;t.lanes=n;ty(e,n)}}function ig(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&(r=r.updateQueue,n===r)){var o=null,i=null;n=n.firstBaseUpdate;if(null!==n){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a;n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects};e.updateQueue=n;return}e=n.lastBaseUpdate;null===e?n.firstBaseUpdate=t:e.next=t;n.lastBaseUpdate=t}function im(e,t,n,r){var o=e.updateQueue;is=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var s=l,u=s.next;s.next=null;null===a?i=u:a.next=u;a=s;var c=e.alternate;null!==c&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==a&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(null!==i){var f=o.baseState;a=0;c=u=s=null;l=i;do{var h=l.lane,p=l.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,m=l;h=t;p=n;switch(m.tag){case 1:g=m.payload;if("function"===typeof g){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:g=m.payload;h="function"===typeof g?g.call(p,f,h):g;if(null===h||void 0===h)break e;f=F({},f,h);break e;case 2:is=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,h=o.effects,null===h?o.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=p,s=f):c=c.next=p,a|=h;l=l.next;if(null===l)if(l=o.shared.pending,null===l)break;else h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}while(1);null===c&&(s=f);o.baseState=s;o.firstBaseUpdate=u;o.lastBaseUpdate=c;t=o.shared.interleaved;if(null!==t){o=t;do a|=o.lane,o=o.next;while(o!==t)}else null===i&&(o.shared.lanes=0);l0|=a;e.lanes=a;e.memoizedState=f}}function iv(e,t,n){e=t.effects;t.effects=null;if(null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){r.callback=null;r=n;if("function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var iy=(new r.Component).refs;function ib(e,t,n,r){t=e.memoizedState;n=n(r,t);n=null===n||void 0===n?t:F({},t,n);e.memoizedState=n;0===e.lanes&&(e.updateQueue.baseState=n)}var ix={isMounted:function(e){return(e=e._reactInternals)?eV(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=su(),o=sc(e),i=id(r,o);i.payload=t;void 0!==n&&null!==n&&(i.callback=n);t=ih(e,i,o);null!==t&&(sd(t,e,o,r),ip(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=su(),o=sc(e),i=id(r,o);i.tag=1;i.payload=t;void 0!==n&&null!==n&&(i.callback=n);t=ih(e,i,o);null!==t&&(sd(t,e,o,r),ip(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=su(),r=sc(e),o=id(n,r);o.tag=2;void 0!==t&&null!==t&&(o.callback=t);t=ih(e,o,r);null!==t&&(sd(t,e,r,n),ip(t,e,r))}};function iw(e,t,n,r,o,i,a){e=e.stateNode;return"function"===typeof e.shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!n9(n,r)||!n9(o,i):!0}function iS(e,t,n){var r=!1,o=of;var i=t.contextType;"object"===typeof i&&null!==i?i=it(i):(o=ov(t)?og:oh.current,r=t.contextTypes,i=(r=null!==r&&void 0!==r)?om(e,o):of);t=new t(n,i);e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null;t.updater=ix;e.stateNode=t;t._reactInternals=e;r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i);return t}function ik(e,t,n,r){e=t.state;"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r);"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r);t.state!==e&&ix.enqueueReplaceState(t,t.state,null)}function iT(e,t,n,r){var o=e.stateNode;o.props=n;o.state=e.memoizedState;o.refs=iy;iu(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=it(i):(i=ov(t)?og:oh.current,o.context=om(e,i));o.state=e.memoizedState;i=t.getDerivedStateFromProps;"function"===typeof i&&(ib(e,t,i,n),o.state=e.memoizedState);"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&ix.enqueueReplaceState(o,o.state,null),im(e,n,o,r),o.state=e.memoizedState);"function"===typeof o.componentDidMount&&(e.flags|=4194308)}function iE(e,t,n){e=n.ref;if(null!==e&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){n=n._owner;if(n){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;if(null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a)return t.ref;t=function(e){var t=o.refs;t===iy&&(t=o.refs={});null===e?delete t[a]:t[a]=e};t._stringRef=a;return t}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function iC(e,t){e=Object.prototype.toString.call(t);throw Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ij(e){var t=e._init;return t(e._payload)}function iI(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){e=s$(e,t);e.index=0;e.sibling=null;return e}function a(t,n,r){t.index=r;if(!e)return t.flags|=1048576,n;r=t.alternate;if(null!==r)return r=r.index,r<n?(t.flags|=2,n):r;t.flags|=2;return n}function l(t){e&&null===t.alternate&&(t.flags|=2);return t}function s(e,t,n,r){if(null===t||6!==t.tag)return t=sG(n,e.mode,r),t.return=e,t;t=o(t,n);t.return=e;return t}function u(e,t,n,r){var i=n.type;if(i===j)return f(e,t,n.props.children,r,n.key);if(null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===N&&ij(i)===t.type))return r=o(t,n.props),r.ref=iE(e,t,n),r.return=e,r;r=sV(n.type,n.key,n.props,null,e.mode,r);r.ref=iE(e,t,n);r.return=e;return r}function c(e,t,n,r){if(null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation)return t=sQ(n,e.mode,r),t.return=e,t;t=o(t,n.children||[]);t.return=e;return t}function f(e,t,n,r,i){if(null===t||7!==t.tag)return t=sq(n,e.mode,r,i),t.return=e,t;t=o(t,n);t.return=e;return t}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return t=sG(""+t,e.mode,n),t.return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case E:return n=sV(t.type,t.key,t.props,null,e.mode,n),n.ref=iE(e,null,t),n.return=e,n;case C:return t=sQ(t,e.mode,n),t.return=e,t;case N:var r=t._init;return h(e,r(t._payload),n)}if(ea(t)||B(t))return t=sq(t,e.mode,n,null),t.return=e,t;iC(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:s(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===o?u(e,t,n,r):null;case C:return n.key===o?c(e,t,n,r):null;case N:return o=n._init,p(e,t,o(n._payload),r)}if(ea(n)||B(n))return null!==o?null:f(e,t,n,r,null);iC(e,n)}return null}function g(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return e=e.get(n)||null,s(t,e,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,u(t,e,r,o);case C:return e=e.get(null===r.key?n:r.key)||null,c(t,e,r,o);case N:var i=r._init;return g(e,t,n,i(r._payload),o)}if(ea(r)||B(r))return e=e.get(n)||null,f(t,e,r,o,null);iC(t,r)}return null}function m(o,i,l,s){for(var u=null,c=null,f=i,m=i=0,v=null;null!==f&&m<l.length;m++){f.index>m?(v=f,f=null):v=f.sibling;var y=p(o,f,l[m],s);if(null===y){null===f&&(f=v);break}e&&f&&null===y.alternate&&t(o,f);i=a(y,i,m);null===c?u=y:c.sibling=y;c=y;f=v}if(m===l.length)return n(o,f),oH&&oL(o,m),u;if(null===f){for(;m<l.length;m++)f=h(o,l[m],s),null!==f&&(i=a(f,i,m),null===c?u=f:c.sibling=f,c=f);oH&&oL(o,m);return u}for(f=r(o,f);m<l.length;m++)v=g(f,o,m,l[m],s),null!==v&&(e&&null!==v.alternate&&f.delete(null===v.key?m:v.key),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);e&&f.forEach(function(e){return t(o,e)});oH&&oL(o,m);return u}function v(o,l,s,u){var c=B(s);if("function"!==typeof c)throw Error(i(150));s=c.call(s);if(null==s)throw Error(i(151));for(var f=c=null,m=l,v=l=0,y=null,b=s.next();null!==m&&!b.done;v++,b=s.next()){m.index>v?(y=m,m=null):y=m.sibling;var x=p(o,m,b.value,u);if(null===x){null===m&&(m=y);break}e&&m&&null===x.alternate&&t(o,m);l=a(x,l,v);null===f?c=x:f.sibling=x;f=x;m=y}if(b.done)return n(o,m),oH&&oL(o,v),c;if(null===m){for(;!b.done;v++,b=s.next())b=h(o,b.value,u),null!==b&&(l=a(b,l,v),null===f?c=b:f.sibling=b,f=b);oH&&oL(o,v);return c}for(m=r(o,m);!b.done;v++,b=s.next())b=g(m,o,v,b.value,u),null!==b&&(e&&null!==b.alternate&&m.delete(null===b.key?v:b.key),l=a(b,l,v),null===f?c=b:f.sibling=b,f=b);e&&m.forEach(function(e){return t(o,e)});oH&&oL(o,v);return c}function y(e,r,i,a){"object"===typeof i&&null!==i&&i.type===j&&null===i.key&&(i=i.props.children);if("object"===typeof i&&null!==i){switch(i.$$typeof){case E:e:{for(var s=i.key,u=r;null!==u;){if(u.key===s){s=i.type;if(s===j){if(7===u.tag){n(e,u.sibling);r=o(u,i.props.children);r.return=e;e=r;break e}}else if(u.elementType===s||"object"===typeof s&&null!==s&&s.$$typeof===N&&ij(s)===u.type){n(e,u.sibling);r=o(u,i.props);r.ref=iE(e,u,i);r.return=e;e=r;break e}n(e,u);break}else t(e,u);u=u.sibling}i.type===j?(r=sq(i.props.children,e.mode,a,i.key),r.return=e,e=r):(a=sV(i.type,i.key,i.props,null,e.mode,a),a.ref=iE(e,r,i),a.return=e,e=a)}return l(e);case C:e:{for(u=i.key;null!==r;){if(r.key===u)if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling);r=o(r,i.children||[]);r.return=e;e=r;break e}else{n(e,r);break}else t(e,r);r=r.sibling}r=sQ(i,e.mode,a);r.return=e;e=r}return l(e);case N:return u=i._init,y(e,r,u(i._payload),a)}if(ea(i))return m(e,r,i,a);if(B(i))return v(e,r,i,a);iC(e,i)}return"string"===typeof i&&""!==i||"number"===typeof i?(i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),r=o(r,i),r.return=e,e=r):(n(e,r),r=sG(i,e.mode,a),r.return=e,e=r),l(e)):n(e,r)}return y}var iD=iI(!0),iP=iI(!1),iO={},iM=ou(iO),i_=ou(iO),iR=ou(iO);function iA(e){if(e===iO)throw Error(i(174));return e}function iN(e,t){od(iR,t);od(i_,e);od(iM,iO);e=t.nodeType;switch(e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:eh(null,"");break;default:e=8===e?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=eh(t,e)}oc(iM);od(iM,t)}function iZ(){oc(iM);oc(i_);oc(iR)}function iL(e){iA(iR.current);var t=iA(iM.current);var n=eh(t,e.type);t!==n&&(od(i_,e),od(iM,n))}function iB(e){i_.current===e&&(oc(iM),oc(i_))}var iF=ou(0);function iW(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(n=n.dehydrated,null===n||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(t.flags&128))return t}else if(null!==t.child){t.child.return=t;t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return;t=t.sibling}return null}var iU=[];function iz(){for(var e=0;e<iU.length;e++)iU[e]._workInProgressVersionPrimary=null;iU.length=0}var iH=T.ReactCurrentDispatcher,iK=T.ReactCurrentBatchConfig,i$=0,iV=null,iq=null,iY=null,iG=!1,iQ=!1,iX=0,iJ=0;function i0(){throw Error(i(321))}function i1(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!n8(e[n],t[n]))return!1;return!0}function i2(e,t,n,r,o,a){i$=a;iV=t;t.memoizedState=null;t.updateQueue=null;t.lanes=0;iH.current=null===e||null===e.memoizedState?aO:aM;e=n(r,o);if(iQ){a=0;do{iQ=!1;iX=0;if(25<=a)throw Error(i(301));a+=1;iY=iq=null;t.updateQueue=null;iH.current=a_;e=n(r,o)}while(iQ)}iH.current=aP;t=null!==iq&&null!==iq.next;i$=0;iY=iq=iV=null;iG=!1;if(t)throw Error(i(300));return e}function i4(){var e=0!==iX;iX=0;return e}function i5(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===iY?iV.memoizedState=iY=e:iY=iY.next=e;return iY}function i3(){if(null===iq){var e=iV.alternate;e=null!==e?e.memoizedState:null}else e=iq.next;var t=null===iY?iV.memoizedState:iY.next;if(null!==t)iY=t,iq=e;else{if(null===e)throw Error(i(310));iq=e;e={memoizedState:iq.memoizedState,baseState:iq.baseState,baseQueue:iq.baseQueue,queue:iq.queue,next:null};null===iY?iV.memoizedState=iY=e:iY=iY.next=e}return iY}function i7(e,t){return"function"===typeof t?t(e):t}function i6(e){var t=i3(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=iq,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var l=o.next;o.next=a.next;a.next=l}r.baseQueue=o=a;n.pending=null}if(null!==o){a=o.next;r=r.baseState;var s=l=null,u=null,c=a;do{var f=c.lane;if((i$&f)===f)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(s=u=h,l=r):u=u.next=h;iV.lanes|=f;l0|=f}c=c.next}while(null!==c&&c!==a);null===u?l=r:u.next=s;n8(r,t.memoizedState)||(aH=!0);t.memoizedState=r;t.baseState=l;t.baseQueue=u;n.lastRenderedState=r}e=n.interleaved;if(null!==e){o=e;do a=o.lane,iV.lanes|=a,l0|=a,o=o.next;while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function i8(e){var t=i3(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do a=e(a,l.action),l=l.next;while(l!==o);n8(a,t.memoizedState)||(aH=!0);t.memoizedState=a;null===t.baseQueue&&(t.baseState=a);n.lastRenderedState=a}return[a,r]}function i9(){}function ae(e,t){var n=iV,r=i3(),o=t(),a=!n8(r.memoizedState,o);a&&(r.memoizedState=o,aH=!0);r=r.queue;ap(ai.bind(null,n,r,e),[e]);if(r.getSnapshot!==t||a||null!==iY&&iY.memoizedState.tag&1){n.flags|=2048;au(9,ao.bind(null,n,r,o,t),void 0,null);if(null===lV)throw Error(i(349));0!==(i$&30)||at(n,t,o)}return o}function at(e,t,n){e.flags|=16384;e={getSnapshot:t,value:n};t=iV.updateQueue;null===t?(t={lastEffect:null,stores:null},iV.updateQueue=t,t.stores=[e]):(n=t.stores,null===n?t.stores=[e]:n.push(e))}function ao(e,t,n,r){t.value=n;t.getSnapshot=r;aa(t)&&al(e)}function ai(e,t,n){return n(function(){aa(t)&&al(e)})}function aa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!n8(e,n)}catch(e){return!0}}function al(e){var t=il(e,1);null!==t&&sd(t,e,1,-1)}function as(e){var t=i5();"function"===typeof e&&(e=e());t.memoizedState=t.baseState=e;e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i7,lastRenderedState:e};t.queue=e;e=e.dispatch=aC.bind(null,iV,e);return[t.memoizedState,e]}function au(e,t,n,r){e={tag:e,create:t,destroy:n,deps:r,next:null};t=iV.updateQueue;null===t?(t={lastEffect:null,stores:null},iV.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,null===n?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e));return e}function ac(){return i3().memoizedState}function ad(e,t,n,r){var o=i5();iV.flags|=e;o.memoizedState=au(1|t,n,void 0,void 0===r?null:r)}function af(e,t,n,r){var o=i3();r=void 0===r?null:r;var i=void 0;if(null!==iq){var a=iq.memoizedState;i=a.destroy;if(null!==r&&i1(r,a.deps)){o.memoizedState=au(t,n,i,r);return}}iV.flags|=e;o.memoizedState=au(1|t,n,i,r)}function ah(e,t){return ad(8390656,8,e,t)}function ap(e,t){return af(2048,8,e,t)}function ag(e,t){return af(4,2,e,t)}function am(e,t){return af(4,4,e,t)}function av(e,t){if("function"===typeof t)return e=e(),t(e),function(){t(null)};if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function ay(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null;return af(4,4,av.bind(null,t,e),n)}function ab(){}function ax(e,t){var n=i3();t=void 0===t?null:t;var r=n.memoizedState;if(null!==r&&null!==t&&i1(t,r[1]))return r[0];n.memoizedState=[e,t];return e}function aw(e,t){var n=i3();t=void 0===t?null:t;var r=n.memoizedState;if(null!==r&&null!==t&&i1(t,r[1]))return r[0];e=e();n.memoizedState=[e,t];return e}function aS(e,t,n){if(0===(i$&21))return e.baseState&&(e.baseState=!1,aH=!0),e.memoizedState=n;n8(n,t)||(n=tp(),iV.lanes|=n,l0|=n,e.baseState=!0);return t}function ak(e,t){var n=tb;tb=0!==n&&4>n?n:4;e(!0);var r=iK.transition;iK.transition={};try{e(!1),t()}finally{tb=n,iK.transition=r}}function aT(){return i3().memoizedState}function aE(e,t,n){var r=sc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(aj(e))aI(t,n);else if(n=ia(e,t,n,r),null!==n){var o=su();sd(n,e,r,o);aD(n,t,r)}}function aC(e,t,n){var r=sc(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(aj(e))aI(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&(i=t.lastRenderedReducer,null!==i))try{var a=t.lastRenderedState,l=i(a,n);o.hasEagerState=!0;o.eagerState=l;if(n8(l,a)){var s=t.interleaved;null===s?(o.next=o,ii(t)):(o.next=s.next,s.next=o);t.interleaved=o;return}}catch(e){}finally{}n=ia(e,t,o,r);null!==n&&(o=su(),sd(n,e,r,o),aD(n,t,r))}}function aj(e){var t=e.alternate;return e===iV||null!==t&&t===iV}function aI(e,t){iQ=iG=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t);e.pending=t}function aD(e,t,n){if(0!==(n&4194240)){var r=t.lanes;r&=e.pendingLanes;n|=r;t.lanes=n;ty(e,n)}}var aP={readContext:it,useCallback:i0,useContext:i0,useEffect:i0,useImperativeHandle:i0,useInsertionEffect:i0,useLayoutEffect:i0,useMemo:i0,useReducer:i0,useRef:i0,useState:i0,useDebugValue:i0,useDeferredValue:i0,useTransition:i0,useMutableSource:i0,useSyncExternalStore:i0,useId:i0,unstable_isNewReconciler:!1},aO={readContext:it,useCallback:function(e,t){i5().memoizedState=[e,void 0===t?null:t];return e},useContext:it,useEffect:ah,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null;return ad(4194308,4,av.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ad(4194308,4,e,t)},useInsertionEffect:function(e,t){return ad(4,2,e,t)},useMemo:function(e,t){var n=i5();t=void 0===t?null:t;e=e();n.memoizedState=[e,t];return e},useReducer:function(e,t,n){var r=i5();t=void 0!==n?n(t):t;r.memoizedState=r.baseState=t;e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t};r.queue=e;e=e.dispatch=aE.bind(null,iV,e);return[r.memoizedState,e]},useRef:function(e){var t=i5();e={current:e};return t.memoizedState=e},useState:as,useDebugValue:ab,useDeferredValue:function(e){return i5().memoizedState=e},useTransition:function(){var e=as(!1),t=e[0];e=ak.bind(null,e[1]);i5().memoizedState=e;return[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=iV,o=i5();if(oH){if(void 0===n)throw Error(i(407));n=n()}else{n=t();if(null===lV)throw Error(i(349));0!==(i$&30)||at(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};o.queue=a;ah(ai.bind(null,r,a,e),[e]);r.flags|=2048;au(9,ao.bind(null,r,a,n,t),void 0,null);return n},useId:function(){var e=i5(),t=lV.identifierPrefix;if(oH){var n=oZ;var r=oN;n=(r&~(1<<32-tr(r)-1)).toString(32)+n;t=":"+t+"R"+n;n=iX++;0<n&&(t+="H"+n.toString(32));t+=":"}else n=iJ++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},aM={readContext:it,useCallback:ax,useContext:it,useEffect:ap,useImperativeHandle:ay,useInsertionEffect:ag,useLayoutEffect:am,useMemo:aw,useReducer:i6,useRef:ac,useState:function(){return i6(i7)},useDebugValue:ab,useDeferredValue:function(e){var t=i3();return aS(t,iq.memoizedState,e)},useTransition:function(){var e=i6(i7)[0],t=i3().memoizedState;return[e,t]},useMutableSource:i9,useSyncExternalStore:ae,useId:aT,unstable_isNewReconciler:!1},a_={readContext:it,useCallback:ax,useContext:it,useEffect:ap,useImperativeHandle:ay,useInsertionEffect:ag,useLayoutEffect:am,useMemo:aw,useReducer:i8,useRef:ac,useState:function(){return i8(i7)},useDebugValue:ab,useDeferredValue:function(e){var t=i3();return null===iq?t.memoizedState=e:aS(t,iq.memoizedState,e)},useTransition:function(){var e=i8(i7)[0],t=i3().memoizedState;return[e,t]},useMutableSource:i9,useSyncExternalStore:ae,useId:aT,unstable_isNewReconciler:!1};function aR(e,t){try{var n="",r=t;do n+=K(r),r=r.return;while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function aA(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function aN(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var aZ="function"===typeof WeakMap?WeakMap:Map;function aL(e,t,n){n=id(-1,n);n.tag=3;n.payload={element:null};var r=t.value;n.callback=function(){l8||(l8=!0,l9=r);aN(e,t)};return n}function aB(e,t,n){n=id(-1,n);n.tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)};n.callback=function(){aN(e,t)}}var i=e.stateNode;null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){aN(e,t);"function"!==typeof r&&(null===se?se=new Set([this]):se.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})});return n}function aF(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new aZ;var o=new Set;r.set(t,o)}else o=r.get(t),void 0===o&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=sN.bind(null,e,t,n),t.then(e,e))}function aW(e){do{var t;if(t=13===e.tag)t=e.memoizedState,t=null!==t?null!==t.dehydrated?!0:!1:!0;if(t)return e;e=e.return}while(null!==e);return null}function aU(e,t,n,r,o){if(0===(e.mode&1))return e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:(t=id(-1,1),t.tag=2,ih(n,t,1))),n.lanes|=1),e;e.flags|=65536;e.lanes=o;return e}var az=T.ReactCurrentOwner,aH=!1;function aK(e,t,n,r){t.child=null===e?iP(t,null,n,r):iD(t,e.child,n,r)}function a$(e,t,n,r,o){n=n.render;var i=t.ref;ie(t,o);r=i2(e,t,n,r,i,o);n=i4();if(null!==e&&!aH)return t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o);oH&&n&&oF(t);t.flags|=1;aK(e,t,r,o);return t.child}function aV(e,t,n,r,o){if(null===e){var i=n.type;if("function"===typeof i&&!sH(i)&&void 0===i.defaultProps&&null===n.compare&&void 0===n.defaultProps)return t.tag=15,t.type=i,aq(e,t,i,r,o);e=sV(n.type,null,r,t,t.mode,o);e.ref=t.ref;e.return=t;return t.child=e}i=e.child;if(0===(e.lanes&o)){var a=i.memoizedProps;n=n.compare;n=null!==n?n:n9;if(n(a,r)&&e.ref===t.ref)return ln(e,t,o)}t.flags|=1;e=s$(i,r);e.ref=t.ref;e.return=t;return t.child=e}function aq(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(n9(i,r)&&e.ref===t.ref)if(aH=!1,t.pendingProps=r=i,0!==(e.lanes&o))0!==(e.flags&131072)&&(aH=!0);else return t.lanes=e.lanes,ln(e,t,o)}return aQ(e,t,n,r,o)}function aY(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},od(lQ,lG),lG|=n;else{if(0===(n&1073741824))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,od(lQ,lG),lG|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null};r=null!==i?i.baseLanes:n;od(lQ,lG);lG|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,od(lQ,lG),lG|=r;aK(e,t,o,n);return t.child}function aG(e,t){var n=t.ref;if(null===e&&null!==n||null!==e&&e.ref!==n)t.flags|=512,t.flags|=2097152}function aQ(e,t,n,r,o){var i=ov(n)?og:oh.current;i=om(t,i);ie(t,o);n=i2(e,t,n,r,i,o);r=i4();if(null!==e&&!aH)return t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ln(e,t,o);oH&&r&&oF(t);t.flags|=1;aK(e,t,n,o);return t.child}function aX(e,t,n,r,o){if(ov(n)){var i=!0;ow(t)}else i=!1;ie(t,o);if(null===t.stateNode)lt(e,t),iS(t,n,r),iT(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=it(u):(u=ov(n)?og:oh.current,u=om(t,u));var c=n.getDerivedStateFromProps,f="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;f||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(l!==r||s!==u)&&ik(t,a,r,u);is=!1;var h=t.memoizedState;a.state=h;im(t,r,a,o);s=t.memoizedState;l!==r||h!==s||op.current||is?("function"===typeof c&&(ib(t,n,c,r),s=t.memoizedState),(l=is||iw(t,n,l,r,h,s,u))?(f||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode;ic(e,t);l=t.memoizedProps;u=t.type===t.elementType?l:o2(t.type,l);a.props=u;f=t.pendingProps;h=a.context;s=n.contextType;"object"===typeof s&&null!==s?s=it(s):(s=ov(n)?og:oh.current,s=om(t,s));var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(l!==f||h!==s)&&ik(t,a,r,s);is=!1;h=t.memoizedState;a.state=h;im(t,r,a,o);var g=t.memoizedState;l!==f||h!==g||op.current||is?("function"===typeof p&&(ib(t,n,p,r),g=t.memoizedState),(u=is||iw(t,n,u,r,h,g,s)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,g,s),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,g,s)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=s,r=u):("function"!==typeof a.componentDidUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return aJ(e,t,n,r,i,o)}function aJ(e,t,n,r,o,i){aG(e,t);var a=0!==(t.flags&128);if(!r&&!a)return o&&oS(t,n,!1),ln(e,t,i);r=t.stateNode;az.current=t;var l=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();t.flags|=1;null!==e&&a?(t.child=iD(t,e.child,null,i),t.child=iD(t,null,l,i)):aK(e,t,l,i);t.memoizedState=r.state;o&&oS(t,n,!0);return t.child}function a0(e){var t=e.stateNode;t.pendingContext?ob(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ob(e,t.context,!1);iN(e,t.containerInfo)}function a1(e,t,n,r,o){oJ();o0(o);t.flags|=256;aK(e,t,n,r);return t.child}var a2={dehydrated:null,treeContext:null,retryLane:0};function a4(e){return{baseLanes:e,cachePool:null,transitions:null}}function a5(e,t,n){var r=t.pendingProps,o=iF.current,i=!1,a=0!==(t.flags&128),l;(l=a)||(l=null!==e&&null===e.memoizedState?!1:0!==(o&2));if(l)i=!0,t.flags&=-129;else if(null===e||null!==e.memoizedState)o|=1;od(iF,o&1);if(null===e){oY(t);e=t.memoizedState;if(null!==e&&(e=e.dehydrated,null!==e))return 0===(t.mode&1)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null;a=r.children;e=r.fallback;return i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},0===(r&1)&&null!==i?(i.childLanes=0,i.pendingProps=a):i=sY(a,r,0,null),e=sq(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=a4(n),t.memoizedState=a2,e):a3(t,a)}o=e.memoizedState;if(null!==o&&(l=o.dehydrated,null!==l))return a6(e,t,a,r,l,o,n);if(i){i=r.fallback;a=t.mode;o=e.child;l=o.sibling;var s={mode:"hidden",children:r.children};0===(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=s$(o,s),r.subtreeFlags=o.subtreeFlags&14680064);null!==l?i=s$(l,i):(i=sq(i,a,n,null),i.flags|=2);i.return=t;r.return=t;r.sibling=i;t.child=r;r=i;i=t.child;a=e.child.memoizedState;a=null===a?a4(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions};i.memoizedState=a;i.childLanes=e.childLanes&~n;t.memoizedState=a2;return r}i=e.child;e=i.sibling;r=s$(i,{mode:"visible",children:r.children});0===(t.mode&1)&&(r.lanes=n);r.return=t;r.sibling=null;null!==e&&(n=t.deletions,null===n?(t.deletions=[e],t.flags|=16):n.push(e));t.child=r;t.memoizedState=null;return r}function a3(e,t){t=sY({mode:"visible",children:t},e.mode,0,null);t.return=e;return e.child=t}function a7(e,t,n,r){null!==r&&o0(r);iD(t,e.child,null,n);e=a3(t,t.pendingProps.children);e.flags|=2;t.memoizedState=null;return e}function a6(e,t,n,r,o,a,l){if(n){if(t.flags&256)return t.flags&=-257,r=aA(Error(i(422))),a7(e,t,l,r);if(null!==t.memoizedState)return t.child=e.child,t.flags|=128,null;a=r.fallback;o=t.mode;r=sY({mode:"visible",children:r.children},o,0,null);a=sq(a,o,l,null);a.flags|=2;r.return=t;a.return=t;r.sibling=a;t.child=r;0!==(t.mode&1)&&iD(t,e.child,null,l);t.child.memoizedState=a4(l);t.memoizedState=a2;return a}if(0===(t.mode&1))return a7(e,t,l,null);if("$!"===o.data){r=o.nextSibling&&o.nextSibling.dataset;if(r)var s=r.dgst;r=s;a=Error(i(419));r=aA(a,r,void 0);return a7(e,t,l,r)}s=0!==(l&e.childLanes);if(aH||s){r=lV;if(null!==r){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=0!==(o&(r.suspendedLanes|l))?0:o;0!==o&&o!==a.retryLane&&(a.retryLane=o,il(e,o),sd(r,e,o,-1))}sE();r=aA(Error(i(421)));return a7(e,t,l,r)}if("$?"===o.data)return t.flags|=128,t.child=e.child,t=sL.bind(null,e),o._reactRetry=t,null;e=a.treeContext;oz=r4(o.nextSibling);oU=t;oH=!0;oK=null;null!==e&&(o_[oR++]=oN,o_[oR++]=oZ,o_[oR++]=oA,oN=e.id,oZ=e.overflow,oA=t);t=a3(t,r.children);t.flags|=4096;return t}function a8(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t);o9(e.return,t,n)}function a9(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function le(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;aK(e,t,r.children,n);r=iF.current;if(0!==(r&2))r=r&1|2,t.flags|=128;else{if(null!==e&&0!==(e.flags&128))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&a8(e,n,t);else if(19===e.tag)a8(e,n,t);else if(null!==e.child){e.child.return=e;e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return;e=e.sibling}r&=1}od(iF,r);if(0===(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":n=t.child;for(o=null;null!==n;)e=n.alternate,null!==e&&null===iW(e)&&(o=n),n=n.sibling;n=o;null===n?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null);a9(t,!1,o,n,i);break;case"backwards":n=null;o=t.child;for(t.child=null;null!==o;){e=o.alternate;if(null!==e&&null===iW(e)){t.child=o;break}e=o.sibling;o.sibling=n;n=o;o=e}a9(t,!0,n,null,i);break;case"together":a9(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lt(e,t){0===(t.mode&1)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ln(e,t,n){null!==e&&(t.dependencies=e.dependencies);l0|=t.lanes;if(0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){e=t.child;n=s$(e,e.pendingProps);t.child=n;for(n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=s$(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lo(e,t,n){switch(t.tag){case 3:a0(t);oJ();break;case 5:iL(t);break;case 1:ov(t.type)&&ow(t);break;case 4:iN(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;od(o4,r._currentValue);r._currentValue=o;break;case 13:r=t.memoizedState;if(null!==r){if(null!==r.dehydrated)return od(iF,iF.current&1),t.flags|=128,null;if(0!==(n&t.child.childLanes))return a5(e,t,n);od(iF,iF.current&1);e=ln(e,t,n);return null!==e?e.sibling:null}od(iF,iF.current&1);break;case 19:r=0!==(n&t.childLanes);if(0!==(e.flags&128)){if(r)return le(e,t,n);t.flags|=128}o=t.memoizedState;null!==o&&(o.rendering=null,o.tail=null,o.lastEffect=null);od(iF,iF.current);if(r)break;else return null;case 22:case 23:return t.lanes=0,aY(e,t,n)}return ln(e,t,n)}var li,la,ll,ls;li=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n;n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return;n=n.sibling}};la=function(){};ll=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode;iA(iM.current);var i=null;switch(n){case"input":o=ee(e,o);r=ee(e,r);i=[];break;case"select":o=F({},o,{value:void 0});r=F({},r,{value:void 0});i=[];break;case"textarea":o=es(e,o);r=es(e,r);i=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=rV)}eS(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(l.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];s=null!=o?o[c]:void 0;if(r.hasOwnProperty(c)&&u!==s&&(null!=u||null!=s))if("style"===c)if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,s=s?s.__html:void 0,null!=u&&s!==u&&(i=i||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(i=i||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(l.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&r_("scroll",e),i||s===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;if(t.updateQueue=c)t.flags|=4}};ls=function(e,t,n,r){n!==r&&(t.flags|=4)};function lu(e,t){if(!oH)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function lc(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;e.subtreeFlags|=r;e.childLanes=n;return t}function ld(e,t,n){var r=t.pendingProps;oW(t);switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lc(t),null;case 1:return ov(t.type)&&oy(),lc(t),null;case 3:r=t.stateNode;iZ();oc(op);oc(oh);iz();r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null);if(null===e||null===e.child)oQ(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(t.flags&256)||(t.flags|=1024,null!==oK&&(sg(oK),oK=null));la(e,t);lc(t);return null;case 5:iB(t);var o=iA(iR.current);n=t.type;if(null!==e&&null!=t.stateNode)ll(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));lc(t);return null}e=iA(iM.current);if(oQ(t)){r=t.stateNode;n=t.type;var a=t.memoizedProps;r[r7]=t;r[r6]=a;e=0!==(t.mode&1);switch(n){case"dialog":r_("cancel",r);r_("close",r);break;case"iframe":case"object":case"embed":r_("load",r);break;case"video":case"audio":for(o=0;o<rD.length;o++)r_(rD[o],r);break;case"source":r_("error",r);break;case"img":case"image":case"link":r_("error",r);r_("load",r);break;case"details":r_("toggle",r);break;case"input":et(r,a);r_("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple};r_("invalid",r);break;case"textarea":eu(r,a),r_("invalid",r)}eS(n,a);o=null;for(var s in a)if(a.hasOwnProperty(s)){var u=a[s];"children"===s?"string"===typeof u?r.textContent!==u&&(!0!==a.suppressHydrationWarning&&r$(r.textContent,u,e),o=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&r$(r.textContent,u,e),o=["children",""+u]):l.hasOwnProperty(s)&&null!=u&&"onScroll"===s&&r_("scroll",r)}switch(n){case"input":Q(r);eo(r,a,!0);break;case"textarea":Q(r);ed(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=rV)}r=o;t.updateQueue=r;null!==r&&(t.flags|=4)}else{s=9===o.nodeType?o:o.ownerDocument;"http://www.w3.org/1999/xhtml"===e&&(e=ef(n));"http://www.w3.org/1999/xhtml"===e?"script"===n?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n);e[r7]=t;e[r6]=r;li(e,t,!1,!1);t.stateNode=e;e:{s=ek(n,r);switch(n){case"dialog":r_("cancel",e);r_("close",e);o=r;break;case"iframe":case"object":case"embed":r_("load",e);o=r;break;case"video":case"audio":for(o=0;o<rD.length;o++)r_(rD[o],e);o=r;break;case"source":r_("error",e);o=r;break;case"img":case"image":case"link":r_("error",e);r_("load",e);o=r;break;case"details":r_("toggle",e);o=r;break;case"input":et(e,r);o=ee(e,r);r_("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple};o=F({},r,{value:void 0});r_("invalid",e);break;case"textarea":eu(e,r);o=es(e,r);r_("invalid",e);break;default:o=r}eS(n,o);u=o;for(a in u)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?ex(e,c):"dangerouslySetInnerHTML"===a?(c=c?c.__html:void 0,null!=c&&eg(e,c)):"children"===a?"string"===typeof c?("textarea"!==n||""!==c)&&em(e,c):"number"===typeof c&&em(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(l.hasOwnProperty(a)?null!=c&&"onScroll"===a&&r_("scroll",e):null!=c&&k(e,a,c,s))}switch(n){case"input":Q(e);eo(e,r,!1);break;case"textarea":Q(e);ed(e);break;case"option":null!=r.value&&e.setAttribute("value",""+q(r.value));break;case"select":e.multiple=!!r.multiple;a=r.value;null!=a?el(e,!!r.multiple,a,!1):null!=r.defaultValue&&el(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=rV)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}lc(t);return null;case 6:if(e&&null!=t.stateNode)ls(e,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));n=iA(iR.current);iA(iM.current);if(oQ(t)){r=t.stateNode;n=t.memoizedProps;r[r7]=t;if(a=r.nodeValue!==n){if(e=oU,null!==e)switch(e.tag){case 3:r$(r.nodeValue,n,0!==(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&r$(r.nodeValue,n,0!==(e.mode&1))}}a&&(t.flags|=4)}else r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r),r[r7]=t,t.stateNode=r}lc(t);return null;case 13:oc(iF);r=t.memoizedState;if(null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(oH&&null!==oz&&0!==(t.mode&1)&&0===(t.flags&128))oX(),oJ(),t.flags|=98560,a=!1;else if(a=oQ(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));a=t.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(i(317));a[r7]=t}else oJ(),0===(t.flags&128)&&(t.memoizedState=null),t.flags|=4;lc(t);a=!1}else null!==oK&&(sg(oK),oK=null),a=!0;if(!a)return t.flags&65536?t:null}if(0!==(t.flags&128))return t.lanes=n,t;r=null!==r;r!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!==(t.mode&1)&&(null===e||0!==(iF.current&1)?0===lX&&(lX=3):sE()));null!==t.updateQueue&&(t.flags|=4);lc(t);return null;case 4:return iZ(),la(e,t),null===e&&rN(t.stateNode.containerInfo),lc(t),null;case 10:return o8(t.type._context),lc(t),null;case 17:return ov(t.type)&&oy(),lc(t),null;case 19:oc(iF);a=t.memoizedState;if(null===a)return lc(t),null;r=0!==(t.flags&128);s=a.rendering;if(null===s)if(r)lu(a,!1);else{if(0!==lX||null!==e&&0!==(e.flags&128))for(e=t.child;null!==e;){s=iW(e);if(null!==s){t.flags|=128;lu(a,!1);r=s.updateQueue;null!==r&&(t.updateQueue=r,t.flags|=4);t.subtreeFlags=0;r=n;for(n=t.child;null!==n;)a=n,e=r,a.flags&=14680066,s=a.alternate,null===s?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;od(iF,iF.current&1|2);return t.child}e=e.sibling}null!==a.tail&&e4()>l7&&(t.flags|=128,r=!0,lu(a,!1),t.lanes=4194304)}else{if(!r)if(e=iW(s),null!==e){if(t.flags|=128,r=!0,n=e.updateQueue,null!==n&&(t.updateQueue=n,t.flags|=4),lu(a,!0),null===a.tail&&"hidden"===a.tailMode&&!s.alternate&&!oH)return lc(t),null}else 2*e4()-a.renderingStartTime>l7&&1073741824!==n&&(t.flags|=128,r=!0,lu(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,null!==n?n.sibling=s:t.child=s,a.last=s)}if(null!==a.tail)return t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=e4(),t.sibling=null,n=iF.current,od(iF,r?n&1|2:n&1),t;lc(t);return null;case 22:case 23:return sw(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(t.mode&1)?0!==(lG&1073741824)&&(lc(t),t.subtreeFlags&6&&(t.flags|=8192)):lc(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function lf(e,t){oW(t);switch(t.tag){case 1:return ov(t.type)&&oy(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return iZ(),oc(op),oc(oh),iz(),e=t.flags,0!==(e&65536)&&0===(e&128)?(t.flags=e&-65537|128,t):null;case 5:return iB(t),null;case 13:oc(iF);e=t.memoizedState;if(null!==e&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));oJ()}e=t.flags;return e&65536?(t.flags=e&-65537|128,t):null;case 19:return oc(iF),null;case 4:return iZ(),null;case 10:return o8(t.type._context),null;case 22:case 23:return sw(),null;case 24:return null;default:return null}}var lh=!1,lp=!1,lg="function"===typeof WeakSet?WeakSet:Set,lm=null;function lv(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(n){sA(e,t,n)}else n.current=null}function ly(e,t,n){try{n()}catch(n){sA(e,t,n)}}var lb=!1;function lx(e,t){rq=tK;e=ro();if(ri(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var l=0,s=-1,u=-1,c=0,f=0,h=e,p=null;t:for(;;){for(var g;;){h!==n||0!==o&&3!==h.nodeType||(s=l+o);h!==a||0!==r&&3!==h.nodeType||(u=l+r);3===h.nodeType&&(l+=h.nodeValue.length);if(null===(g=h.firstChild))break;p=h;h=g}for(;;){if(h===e)break t;p===n&&++c===o&&(s=l);p===a&&++f===r&&(u=l);if(null!==(g=h.nextSibling))break;h=p;p=h.parentNode}h=g}n=-1===s||-1===u?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;rY={focusedElem:e,selectionRange:n};tK=!1;for(lm=t;null!==lm;)if(t=lm,e=t.child,0!==(t.subtreeFlags&1028)&&null!==e)e.return=t,lm=e;else for(;null!==lm;){t=lm;try{var m=t.alternate;if(0!==(t.flags&1024))switch(t.tag){case 0:case 11:case 15:break;case 1:if(null!==m){var v=m.memoizedProps,y=m.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?v:o2(t.type,v),y);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(e){sA(t,t.return,e)}e=t.sibling;if(null!==e){e.return=t.return;lm=e;break}lm=t.return}m=lb;lb=!1;return m}function lw(e,t,n){var r=t.updateQueue;r=null!==r?r.lastEffect:null;if(null!==r){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0;void 0!==i&&ly(t,n,i)}o=o.next}while(o!==r)}}function lS(e,t){t=t.updateQueue;t=null!==t?t.lastEffect:null;if(null!==t){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function lk(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}"function"===typeof t?t(e):t.current=e}}function lT(e){var t=e.alternate;null!==t&&(e.alternate=null,lT(t));e.child=null;e.deletions=null;e.sibling=null;5===e.tag&&(t=e.stateNode,null!==t&&(delete t[r7],delete t[r6],delete t[r9],delete t[oe],delete t[ot]));e.stateNode=null;e.return=null;e.dependencies=null;e.memoizedProps=null;e.memoizedState=null;e.pendingProps=null;e.stateNode=null;e.updateQueue=null}function lE(e){return 5===e.tag||3===e.tag||4===e.tag}function lC(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||lE(e.return))return null;e=e.return}e.sibling.return=e.return;for(e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(e.flags&2)continue e;if(null===e.child||4===e.tag)continue e;else e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lj(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,null!==n&&void 0!==n||null!==t.onclick||(t.onclick=rV));else if(4!==r&&(e=e.child,null!==e))for(lj(e,t,n),e=e.sibling;null!==e;)lj(e,t,n),e=e.sibling}function lI(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(e=e.child,null!==e))for(lI(e,t,n),e=e.sibling;null!==e;)lI(e,t,n),e=e.sibling}var lD=null,lP=!1;function lO(e,t,n){for(n=n.child;null!==n;)lM(e,t,n),n=n.sibling}function lM(e,t,n){if(tt&&"function"===typeof tt.onCommitFiberUnmount)try{tt.onCommitFiberUnmount(te,n)}catch(e){}switch(n.tag){case 5:lp||lv(n,t);case 6:var r=lD,o=lP;lD=null;lO(e,t,n);lD=r;lP=o;null!==lD&&(lP?(e=lD,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):lD.removeChild(n.stateNode));break;case 18:null!==lD&&(lP?(e=lD,n=n.stateNode,8===e.nodeType?r2(e.parentNode,n):1===e.nodeType&&r2(e,n),tz(e)):r2(lD,n.stateNode));break;case 4:r=lD;o=lP;lD=n.stateNode.containerInfo;lP=!0;lO(e,t,n);lD=r;lP=o;break;case 0:case 11:case 14:case 15:if(!lp&&(r=n.updateQueue,null!==r&&(r=r.lastEffect,null!==r))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag;void 0!==a&&(0!==(i&2)?ly(n,t,a):0!==(i&4)&&ly(n,t,a));o=o.next}while(o!==r)}lO(e,t,n);break;case 1:if(!lp&&(lv(n,t),r=n.stateNode,"function"===typeof r.componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){sA(n,t,e)}lO(e,t,n);break;case 21:lO(e,t,n);break;case 22:n.mode&1?(lp=(r=lp)||null!==n.memoizedState,lO(e,t,n),lp=r):lO(e,t,n);break;default:lO(e,t,n)}}function l_(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new lg);t.forEach(function(t){var r=sB.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function lR(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,l=t,s=l;e:for(;null!==s;){switch(s.tag){case 5:lD=s.stateNode;lP=!1;break e;case 3:lD=s.stateNode.containerInfo;lP=!0;break e;case 4:lD=s.stateNode.containerInfo;lP=!0;break e}s=s.return}if(null===lD)throw Error(i(160));lM(a,l,o);lD=null;lP=!1;var u=o.alternate;null!==u&&(u.return=null);o.return=null}catch(e){sA(o,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;null!==t;)lA(t,e),t=t.sibling}function lA(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:lR(t,e);lN(e);if(r&4){try{lw(3,e,e.return),lS(3,e)}catch(t){sA(e,e.return,t)}try{lw(5,e,e.return)}catch(t){sA(e,e.return,t)}}break;case 1:lR(t,e);lN(e);r&512&&null!==n&&lv(n,n.return);break;case 5:lR(t,e);lN(e);r&512&&null!==n&&lv(n,n.return);if(e.flags&32){var o=e.stateNode;try{em(o,"")}catch(t){sA(e,e.return,t)}}if(r&4&&(o=e.stateNode,null!=o)){var a=e.memoizedProps,l=null!==n?n.memoizedProps:a,s=e.type,u=e.updateQueue;e.updateQueue=null;if(null!==u)try{"input"===s&&"radio"===a.type&&null!=a.name&&en(o,a);ek(s,l);var c=ek(s,a);for(l=0;l<u.length;l+=2){var f=u[l],h=u[l+1];"style"===f?ex(o,h):"dangerouslySetInnerHTML"===f?eg(o,h):"children"===f?em(o,h):k(o,f,h,c)}switch(s){case"input":er(o,a);break;case"textarea":ec(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var g=a.value;null!=g?el(o,!!a.multiple,g,!1):p!==!!a.multiple&&(null!=a.defaultValue?el(o,!!a.multiple,a.defaultValue,!0):el(o,!!a.multiple,a.multiple?[]:"",!1))}o[r6]=a}catch(t){sA(e,e.return,t)}}break;case 6:lR(t,e);lN(e);if(r&4){if(null===e.stateNode)throw Error(i(162));o=e.stateNode;a=e.memoizedProps;try{o.nodeValue=a}catch(t){sA(e,e.return,t)}}break;case 3:lR(t,e);lN(e);if(r&4&&null!==n&&n.memoizedState.isDehydrated)try{tz(t.containerInfo)}catch(t){sA(e,e.return,t)}break;case 4:lR(t,e);lN(e);break;case 13:lR(t,e);lN(e);o=e.child;o.flags&8192&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(l3=e4()));r&4&&l_(e);break;case 22:f=null!==n&&null!==n.memoizedState;e.mode&1?(lp=(c=lp)||f,lR(t,e),lp=c):lR(t,e);lN(e);if(r&8192){c=null!==e.memoizedState;if((e.stateNode.isHidden=c)&&!f&&0!==(e.mode&1))for(lm=e,f=e.child;null!==f;){for(h=lm=f;null!==lm;){p=lm;g=p.child;switch(p.tag){case 0:case 11:case 14:case 15:lw(4,p,p.return);break;case 1:lv(p,p.return);var m=p.stateNode;if("function"===typeof m.componentWillUnmount){r=p;n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){sA(r,n,e)}}break;case 5:lv(p,p.return);break;case 22:if(null!==p.memoizedState){lF(h);continue}}null!==g?(g.return=p,lm=g):lF(h)}f=f.sibling}e:for(f=null,h=e;;){if(5===h.tag){if(null===f){f=h;try{o=h.stateNode,c?(a=o.style,"function"===typeof a.setProperty?a.setProperty("display","none","important"):a.display="none"):(s=h.stateNode,u=h.memoizedProps.style,l=void 0!==u&&null!==u&&u.hasOwnProperty("display")?u.display:null,s.style.display=eb("display",l))}catch(t){sA(e,e.return,t)}}}else if(6===h.tag){if(null===f)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(t){sA(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h;h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;f===h&&(f=null);h=h.return}f===h&&(f=null);h.sibling.return=h.return;h=h.sibling}}break;case 19:lR(t,e);lN(e);r&4&&l_(e);break;case 21:break;default:lR(t,e),lN(e)}}function lN(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;null!==n;){if(lE(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(em(o,""),r.flags&=-33);var a=lC(e);lI(e,a,o);break;case 3:case 4:var l=r.stateNode.containerInfo,s=lC(e);lj(e,s,l);break;default:throw Error(i(161))}}catch(t){sA(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lZ(e,t,n){lm=e;lL(e,t,n)}function lL(e,t,n){for(var r=0!==(e.mode&1);null!==lm;){var o=lm,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||lh;if(!a){var l=o.alternate,s=null!==l&&null!==l.memoizedState||lp;l=lh;var u=lp;lh=a;if((lp=s)&&!u)for(lm=o;null!==lm;)a=lm,s=a.child,22===a.tag&&null!==a.memoizedState?lW(o):null!==s?(s.return=a,lm=s):lW(o);for(;null!==i;)lm=i,lL(i,t,n),i=i.sibling;lm=o;lh=l;lp=u}lB(e,t,n)}else 0!==(o.subtreeFlags&8772)&&null!==i?(i.return=o,lm=i):lB(e,t,n)}}function lB(e){for(;null!==lm;){var t=lm;if(0!==(t.flags&8772)){var n=t.alternate;try{if(0!==(t.flags&8772))switch(t.tag){case 0:case 11:case 15:lp||lS(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!lp)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:o2(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&iv(t,a,r);break;case 3:var l=t.updateQueue;if(null!==l){n=null;if(null!==t.child)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}iv(t,l,n)}break;case 5:var s=t.stateNode;if(null===n&&t.flags&4){n=s;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var h=f.dehydrated;null!==h&&tz(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}lp||t.flags&512&&lk(t)}catch(e){sA(t,t.return,e)}}if(t===e){lm=null;break}n=t.sibling;if(null!==n){n.return=t.return;lm=n;break}lm=t.return}}function lF(e){for(;null!==lm;){var t=lm;if(t===e){lm=null;break}var n=t.sibling;if(null!==n){n.return=t.return;lm=n;break}lm=t.return}}function lW(e){for(;null!==lm;){var t=lm;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{lS(4,t)}catch(e){sA(t,n,e)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(e){sA(t,o,e)}}var i=t.return;try{lk(t)}catch(e){sA(t,i,e)}break;case 5:var a=t.return;try{lk(t)}catch(e){sA(t,a,e)}}}catch(e){sA(t,t.return,e)}if(t===e){lm=null;break}var l=t.sibling;if(null!==l){l.return=t.return;lm=l;break}lm=t.return}}var lU=Math.ceil,lz=T.ReactCurrentDispatcher,lH=T.ReactCurrentOwner,lK=T.ReactCurrentBatchConfig,l$=0,lV=null,lq=null,lY=0,lG=0,lQ=ou(0),lX=0,lJ=null,l0=0,l1=0,l2=0,l4=null,l5=null,l3=0,l7=Infinity,l6=null,l8=!1,l9=null,se=null,st=!1,sn=null,so=0,si=0,sa=null,sl=-1,ss=0;function su(){return 0!==(l$&6)?e4():-1!==sl?sl:sl=e4()}function sc(e){if(0===(e.mode&1))return 1;if(0!==(l$&2)&&0!==lY)return lY&-lY;if(null!==o1.transition)return 0===ss&&(ss=tp()),ss;e=tb;if(0!==e)return e;e=window.event;e=void 0===e?16:tQ(e.type);return e}function sd(e,t,n,r){if(50<si)throw si=0,sa=null,Error(i(185));tm(e,n,r);if(0===(l$&2)||e!==lV)e===lV&&(0===(l$&2)&&(l1|=n),4===lX&&sv(e,lY)),sf(e,r),1===n&&0===l$&&0===(t.mode&1)&&(l7=e4()+500,oT&&oI())}function sf(e,t){var n=e.callbackNode;tf(e,t);var r=tc(e,e===lV?lY:0);if(0===r)null!==n&&e0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){null!=n&&e0(n);if(1===t)0===e.tag?oj(sy.bind(null,e)):oC(sy.bind(null,e)),r0(function(){0===(l$&6)&&oI()}),n=null;else{switch(tx(r)){case 1:n=e3;break;case 4:n=e7;break;case 16:n=e6;break;case 536870912:n=e9;break;default:n=e6}n=sW(n,sh.bind(null,e))}e.callbackPriority=t;e.callbackNode=n}}function sh(e,t){sl=-1;ss=0;if(0!==(l$&6))throw Error(i(327));var n=e.callbackNode;if(s_()&&e.callbackNode!==n)return null;var r=tc(e,e===lV?lY:0);if(0===r)return null;if(0!==(r&30)||0!==(r&e.expiredLanes)||t)t=sC(e,r);else{t=r;var o=l$;l$|=2;var a=sT();if(lV!==e||lY!==t)l6=null,l7=e4()+500,sS(e,t);do try{sI();break}catch(t){sk(e,t)}while(1);o6();lz.current=a;l$=o;null!==lq?t=0:(lV=null,lY=0,t=lX)}if(0!==t){2===t&&(o=th(e),0!==o&&(r=o,t=sp(e,o)));if(1===t)throw n=lJ,sS(e,0),sv(e,r),sf(e,e4()),n;if(6===t)sv(e,r);else{o=e.current.alternate;if(0===(r&30)&&!sm(o)&&(t=sC(e,r),2===t&&(a=th(e),0!==a&&(r=a,t=sp(e,a))),1===t))throw n=lJ,sS(e,0),sv(e,r),sf(e,e4()),n;e.finishedWork=o;e.finishedLanes=r;switch(t){case 0:case 1:throw Error(i(345));case 2:sO(e,l5,l6);break;case 3:sv(e,r);if((r&130023424)===r&&(t=l3+500-e4(),10<t)){if(0!==tc(e,0))break;o=e.suspendedLanes;if((o&r)!==r){su();e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=rQ(sO.bind(null,e,l5,l6),t);break}sO(e,l5,l6);break;case 4:sv(e,r);if((r&4194240)===r)break;t=e.eventTimes;for(o=-1;0<r;){var l=31-tr(r);a=1<<l;l=t[l];l>o&&(o=l);r&=~a}r=o;r=e4()-r;r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lU(r/1960))-r;if(10<r){e.timeoutHandle=rQ(sO.bind(null,e,l5,l6),r);break}sO(e,l5,l6);break;case 5:sO(e,l5,l6);break;default:throw Error(i(329))}}}sf(e,e4());return e.callbackNode===n?sh.bind(null,e):null}function sp(e,t){var n=l4;e.current.memoizedState.isDehydrated&&(sS(e,t).flags|=256);e=sC(e,t);2!==e&&(t=l5,l5=n,null!==t&&sg(t));return e}function sg(e){null===l5?l5=e:l5.push.apply(l5,e)}function sm(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(null!==n&&(n=n.stores,null!==n))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!n8(i(),o))return!1}catch(e){return!1}}}n=t.child;if(t.subtreeFlags&16384&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return;t=t.sibling}}return!0}function sv(e,t){t&=~l2;t&=~l1;e.suspendedLanes|=t;e.pingedLanes&=~t;for(e=e.expirationTimes;0<t;){var n=31-tr(t),r=1<<n;e[n]=-1;t&=~r}}function sy(e){if(0!==(l$&6))throw Error(i(327));s_();var t=tc(e,0);if(0===(t&1))return sf(e,e4()),null;var n=sC(e,t);if(0!==e.tag&&2===n){var r=th(e);0!==r&&(t=r,n=sp(e,r))}if(1===n)throw n=lJ,sS(e,0),sv(e,t),sf(e,e4()),n;if(6===n)throw Error(i(345));e.finishedWork=e.current.alternate;e.finishedLanes=t;sO(e,l5,l6);sf(e,e4());return null}function sb(e,t){var n=l$;l$|=1;try{return e(t)}finally{l$=n,0===l$&&(l7=e4()+500,oT&&oI())}}function sx(e){null!==sn&&0===sn.tag&&0===(l$&6)&&s_();var t=l$;l$|=1;var n=lK.transition,r=tb;try{if(lK.transition=null,tb=1,e)return e()}finally{tb=r,lK.transition=n,l$=t,0===(l$&6)&&oI()}}function sw(){lG=lQ.current;oc(lQ)}function sS(e,t){e.finishedWork=null;e.finishedLanes=0;var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,rX(n));if(null!==lq)for(n=lq.return;null!==n;){var r=n;oW(r);switch(r.tag){case 1:r=r.type.childContextTypes;null!==r&&void 0!==r&&oy();break;case 3:iZ();oc(op);oc(oh);iz();break;case 5:iB(r);break;case 4:iZ();break;case 13:oc(iF);break;case 19:oc(iF);break;case 10:o8(r.type._context);break;case 22:case 23:sw()}n=n.return}lV=e;lq=e=s$(e.current,null);lY=lG=t;lX=0;lJ=null;l2=l1=l0=0;l5=l4=null;if(null!==io){for(t=0;t<io.length;t++)if(n=io[t],r=n.interleaved,null!==r){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o;r.next=a}n.pending=r}io=null}return e}function sk(e,t){do{var n=lq;try{o6();iH.current=aP;if(iG){for(var r=iV.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null);r=r.next}iG=!1}i$=0;iY=iq=iV=null;iQ=!1;iX=0;lH.current=null;if(null===n||null===n.return){lX=1;lJ=t;lq=null;break}e:{var a=e,l=n.return,s=n,u=t;t=lY;s.flags|=32768;if(null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,f=s,h=f.tag;if(0===(f.mode&1)&&(0===h||11===h||15===h)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var g=aW(l);if(null!==g){g.flags&=-257;aU(g,l,s,a,t);g.mode&1&&aF(a,c,t);t=g;u=c;var m=t.updateQueue;if(null===m){var v=new Set;v.add(u);t.updateQueue=v}else m.add(u);break e}else{if(0===(t&1)){aF(a,c,t);sE();break e}u=Error(i(426))}}else if(oH&&s.mode&1){var y=aW(l);if(null!==y){0===(y.flags&65536)&&(y.flags|=256);aU(y,l,s,a,t);o0(aR(u,s));break e}}a=u=aR(u,s);4!==lX&&(lX=2);null===l4?l4=[a]:l4.push(a);a=l;do{switch(a.tag){case 3:a.flags|=65536;t&=-t;a.lanes|=t;var b=aL(a,u,t);ig(a,b);break e;case 1:s=u;var x=a.type,w=a.stateNode;if(0===(a.flags&128)&&("function"===typeof x.getDerivedStateFromError||null!==w&&"function"===typeof w.componentDidCatch&&(null===se||!se.has(w)))){a.flags|=65536;t&=-t;a.lanes|=t;var S=aB(a,s,t);ig(a,S);break e}}a=a.return}while(null!==a)}sP(n)}catch(e){t=e;lq===n&&null!==n&&(lq=n=n.return);continue}break}while(1)}function sT(){var e=lz.current;lz.current=aP;return null===e?aP:e}function sE(){if(0===lX||3===lX||2===lX)lX=4;null===lV||0===(l0&268435455)&&0===(l1&268435455)||sv(lV,lY)}function sC(e,t){var n=l$;l$|=2;var r=sT();if(lV!==e||lY!==t)l6=null,sS(e,t);do try{sj();break}catch(t){sk(e,t)}while(1);o6();l$=n;lz.current=r;if(null!==lq)throw Error(i(261));lV=null;lY=0;return lX}function sj(){for(;null!==lq;)sD(lq)}function sI(){for(;null!==lq&&!e1();)sD(lq)}function sD(e){var t=sF(e.alternate,e,lG);e.memoizedProps=e.pendingProps;null===t?sP(e):lq=t;lH.current=null}function sP(e){var t=e;do{var n=t.alternate;e=t.return;if(0===(t.flags&32768)){if(n=ld(n,t,lG),null!==n){lq=n;return}}else{n=lf(n,t);if(null!==n){n.flags&=32767;lq=n;return}if(null!==e)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{lX=6;lq=null;return}}t=t.sibling;if(null!==t){lq=t;return}lq=t=e}while(null!==t);0===lX&&(lX=5)}function sO(e,t,n){var r=tb,o=lK.transition;try{lK.transition=null,tb=1,sM(e,t,n,r)}finally{lK.transition=o,tb=r}return null}function sM(e,t,n,r){do s_();while(null!==sn);if(0!==(l$&6))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;e.finishedWork=null;e.finishedLanes=0;if(n===e.current)throw Error(i(177));e.callbackNode=null;e.callbackPriority=0;var a=n.lanes|n.childLanes;tv(e,a);e===lV&&(lq=lV=null,lY=0);0===(n.subtreeFlags&2064)&&0===(n.flags&2064)||st||(st=!0,sW(e6,function(){s_();return null}));a=0!==(n.flags&15990);if(0!==(n.subtreeFlags&15990)||a){a=lK.transition;lK.transition=null;var l=tb;tb=1;var s=l$;l$|=4;lH.current=null;lx(e,n);lA(n,e);ra(rY);tK=!!rq;rY=rq=null;e.current=n;lZ(n,e,o);e2();l$=s;tb=l;lK.transition=a}else e.current=n;st&&(st=!1,sn=e,so=o);a=e.pendingLanes;0===a&&(se=null);tn(n.stateNode,r);sf(e,e4());if(null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(l8)throw l8=!1,e=l9,l9=null,e;0!==(so&1)&&0!==e.tag&&s_();a=e.pendingLanes;0!==(a&1)?e===sa?si++:(si=0,sa=e):si=0;oI();return null}function s_(){if(null!==sn){var e=tx(so),t=lK.transition,n=tb;try{lK.transition=null;tb=16>e?16:e;if(null===sn)var r=!1;else{e=sn;sn=null;so=0;if(0!==(l$&6))throw Error(i(331));var o=l$;l$|=4;for(lm=e.current;null!==lm;){var a=lm,l=a.child;if(0!==(lm.flags&16)){var s=a.deletions;if(null!==s){for(var u=0;u<s.length;u++){var c=s[u];for(lm=c;null!==lm;){var f=lm;switch(f.tag){case 0:case 11:case 15:lw(8,f,a)}var h=f.child;if(null!==h)h.return=f,lm=h;else for(;null!==lm;){f=lm;var p=f.sibling,g=f.return;lT(f);if(f===c){lm=null;break}if(null!==p){p.return=g;lm=p;break}lm=g}}}var m=a.alternate;if(null!==m){var v=m.child;if(null!==v){m.child=null;do{var y=v.sibling;v.sibling=null;v=y}while(null!==v)}}lm=a}}if(0!==(a.subtreeFlags&2064)&&null!==l)l.return=a,lm=l;else t:for(;null!==lm;){a=lm;if(0!==(a.flags&2048))switch(a.tag){case 0:case 11:case 15:lw(9,a,a.return)}var b=a.sibling;if(null!==b){b.return=a.return;lm=b;break t}lm=a.return}}var x=e.current;for(lm=x;null!==lm;){l=lm;var w=l.child;if(0!==(l.subtreeFlags&2064)&&null!==w)w.return=l,lm=w;else t:for(l=x;null!==lm;){s=lm;if(0!==(s.flags&2048))try{switch(s.tag){case 0:case 11:case 15:lS(9,s)}}catch(e){sA(s,s.return,e)}if(s===l){lm=null;break t}var S=s.sibling;if(null!==S){S.return=s.return;lm=S;break t}lm=s.return}}l$=o;oI();if(tt&&"function"===typeof tt.onPostCommitFiberRoot)try{tt.onPostCommitFiberRoot(te,e)}catch(e){}r=!0}return r}finally{tb=n,lK.transition=t}}return!1}function sR(e,t,n){t=aR(n,t);t=aL(e,t,1);e=ih(e,t,1);t=su();null!==e&&(tm(e,1,t),sf(e,t))}function sA(e,t,n){if(3===e.tag)sR(e,e,n);else for(;null!==t;){if(3===t.tag){sR(t,e,n);break}else if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===se||!se.has(r))){e=aR(n,e);e=aB(t,e,1);t=ih(t,e,1);e=su();null!==t&&(tm(t,1,e),sf(t,e));break}}t=t.return}}function sN(e,t,n){var r=e.pingCache;null!==r&&r.delete(t);t=su();e.pingedLanes|=e.suspendedLanes&n;lV===e&&(lY&n)===n&&(4===lX||3===lX&&(lY&130023424)===lY&&500>e4()-l3?sS(e,0):l2|=n);sf(e,t)}function sZ(e,t){0===t&&(0===(e.mode&1)?t=1:(t=ts,ts<<=1,0===(ts&130023424)&&(ts=4194304)));var n=su();e=il(e,t);null!==e&&(tm(e,t,n),sf(e,n))}function sL(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane);sZ(e,n)}function sB(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode;var o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t);sZ(e,n)}var sF;sF=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||op.current)aH=!0;else{if(0===(e.lanes&n)&&0===(t.flags&128))return aH=!1,lo(e,t,n);aH=0!==(e.flags&131072)?!0:!1}else aH=!1,oH&&0!==(t.flags&1048576)&&oB(t,oM,t.index);t.lanes=0;switch(t.tag){case 2:var r=t.type;lt(e,t);e=t.pendingProps;var o=om(t,oh.current);ie(t,n);o=i2(null,t,r,e,o,n);var a=i4();t.flags|=1;"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ov(r)?(a=!0,ow(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,iu(t),o.updater=ix,t.stateNode=o,o._reactInternals=t,iT(t,r,e,n),t=aJ(null,t,r,!0,a,n)):(t.tag=0,oH&&a&&oF(t),aK(null,t,o,n),t=t.child);return t;case 16:r=t.elementType;e:{lt(e,t);e=t.pendingProps;o=r._init;r=o(r._payload);t.type=r;o=t.tag=sK(r);e=o2(r,e);switch(o){case 0:t=aQ(null,t,r,e,n);break e;case 1:t=aX(null,t,r,e,n);break e;case 11:t=a$(null,t,r,e,n);break e;case 14:t=aV(null,t,r,o2(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:o2(r,o),aQ(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:o2(r,o),aX(e,t,r,o,n);case 3:e:{a0(t);if(null===e)throw Error(i(387));r=t.pendingProps;a=t.memoizedState;o=a.element;ic(e,t);im(t,r,null,n);var l=t.memoizedState;r=l.element;if(a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=aR(Error(i(423)),t);t=a1(e,t,r,n,o);break e}else if(r!==o){o=aR(Error(i(424)),t);t=a1(e,t,r,n,o);break e}else for(oz=r4(t.stateNode.containerInfo.firstChild),oU=t,oH=!0,oK=null,n=iP(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{oJ();if(r===o){t=ln(e,t,n);break e}aK(e,t,r,n)}t=t.child}return t;case 5:return iL(t),null===e&&oY(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,l=o.children,rG(r,o)?l=null:null!==a&&rG(r,a)&&(t.flags|=32),aG(e,t),aK(e,t,l,n),t.child;case 6:return null===e&&oY(t),null;case 13:return a5(e,t,n);case 4:return iN(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=iD(t,null,r,n):aK(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:o2(r,o),a$(e,t,r,o,n);case 7:return aK(e,t,t.pendingProps,n),t.child;case 8:return aK(e,t,t.pendingProps.children,n),t.child;case 12:return aK(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context;o=t.pendingProps;a=t.memoizedProps;l=o.value;od(o4,r._currentValue);r._currentValue=l;if(null!==a)if(n8(a.value,l)){if(a.children===o.children&&!op.current){t=ln(e,t,n);break e}}else for(a=t.child,null!==a&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){l=a.child;for(var u=s.firstContext;null!==u;){if(u.context===r){if(1===a.tag){u=id(-1,n&-n);u.tag=2;var c=a.updateQueue;if(null!==c){c=c.shared;var f=c.pending;null===f?u.next=u:(u.next=f.next,f.next=u);c.pending=u}}a.lanes|=n;u=a.alternate;null!==u&&(u.lanes|=n);o9(a.return,n,t);s.lanes|=n;break}u=u.next}}else if(10===a.tag)l=a.type===t.type?null:a.child;else if(18===a.tag){l=a.return;if(null===l)throw Error(i(341));l.lanes|=n;s=l.alternate;null!==s&&(s.lanes|=n);o9(l,n,t);l=a.sibling}else l=a.child;if(null!==l)l.return=a;else for(l=a;null!==l;){if(l===t){l=null;break}a=l.sibling;if(null!==a){a.return=l.return;l=a;break}l=l.return}a=l}aK(e,t,o.children,n);t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ie(t,n),o=it(o),r=r(o),t.flags|=1,aK(e,t,r,n),t.child;case 14:return r=t.type,o=o2(r,t.pendingProps),o=o2(r.type,o),aV(e,t,r,o,n);case 15:return aq(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:o2(r,o),lt(e,t),t.tag=1,ov(r)?(e=!0,ow(t)):e=!1,ie(t,n),iS(t,r,o),iT(t,r,o,n),aJ(null,t,r,!0,e,n);case 19:return le(e,t,n);case 22:return aY(e,t,n)}throw Error(i(156,t.tag))};function sW(e,t){return eJ(e,t)}function sU(e,t,n,r){this.tag=e;this.key=n;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=t;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=r;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function sz(e,t,n,r){return new sU(e,t,n,r)}function sH(e){e=e.prototype;return!(!e||!e.isReactComponent)}function sK(e){if("function"===typeof e)return sH(e)?1:0;if(void 0!==e&&null!==e){e=e.$$typeof;if(e===M)return 11;if(e===A)return 14}return 2}function s$(e,t){var n=e.alternate;null===n?(n=sz(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null);n.flags=e.flags&14680064;n.childLanes=e.childLanes;n.lanes=e.lanes;n.child=e.child;n.memoizedProps=e.memoizedProps;n.memoizedState=e.memoizedState;n.updateQueue=e.updateQueue;t=e.dependencies;n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext};n.sibling=e.sibling;n.index=e.index;n.ref=e.ref;return n}function sV(e,t,n,r,o,a){var l=2;r=e;if("function"===typeof e)sH(e)&&(l=1);else if("string"===typeof e)l=5;else e:switch(e){case j:return sq(n.children,o,a,t);case I:l=8;o|=8;break;case D:return e=sz(12,n,t,o|2),e.elementType=D,e.lanes=a,e;case _:return e=sz(13,n,t,o),e.elementType=_,e.lanes=a,e;case R:return e=sz(19,n,t,o),e.elementType=R,e.lanes=a,e;case Z:return sY(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case P:l=10;break e;case O:l=9;break e;case M:l=11;break e;case A:l=14;break e;case N:l=16;r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}t=sz(l,n,t,o);t.elementType=e;t.type=r;t.lanes=a;return t}function sq(e,t,n,r){e=sz(7,e,r,t);e.lanes=n;return e}function sY(e,t,n,r){e=sz(22,e,r,t);e.elementType=Z;e.lanes=n;e.stateNode={isHidden:!1};return e}function sG(e,t,n){e=sz(6,e,null,t);e.lanes=n;return e}function sQ(e,t,n){t=sz(4,null!==e.children?e.children:[],e.key,t);t.lanes=n;t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation};return t}function sX(e,t,n,r,o){this.tag=t;this.containerInfo=e;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=tg(0);this.expirationTimes=tg(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=tg(0);this.identifierPrefix=r;this.onRecoverableError=o;this.mutableSourceEagerHydrationData=null}function sJ(e,t,n,r,o,i,a,l,s){e=new sX(e,t,n,l,s);1===t?(t=1,!0===i&&(t|=8)):t=0;i=sz(3,null,null,t);e.current=i;i.stateNode=e;i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null};iu(i);return e}function s0(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:C,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function s1(e){if(!e)return of;e=e._reactInternals;e:{if(eV(e)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ov(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(ov(n))return ox(e,n,t)}return t}function s2(e,t,n,r,o,i,a,l,s){e=sJ(n,r,!0,e,o,i,a,l,s);e.context=s1(null);n=e.current;r=su();o=sc(n);i=id(r,o);i.callback=void 0!==t&&null!==t?t:null;ih(n,i,o);e.current.lanes=o;tm(e,o,r);sf(e,r);return e}function s4(e,t,n,r){var o=t.current,i=su(),a=sc(o);n=s1(n);null===t.context?t.context=n:t.pendingContext=n;t=id(i,a);t.payload={element:e};r=void 0===r?null:r;null!==r&&(t.callback=r);e=ih(o,t,a);null!==e&&(sd(e,o,a,i),ip(e,o,a));return a}function s5(e){e=e.current;if(!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function s3(e,t){e=e.memoizedState;if(null!==e&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function s7(e,t){s3(e,t);(e=e.alternate)&&s3(e,t)}function s6(){return null}var s8="function"===typeof reportError?reportError:function(e){console.error(e)};function s9(e){this._internalRoot=e}ue.prototype.render=s9.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));s4(e,t,null,null)};ue.prototype.unmount=s9.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;sx(function(){s4(null,e,null,null)});t[r8]=null}};function ue(e){this._internalRoot=e}ue.prototype.unstable_scheduleHydration=function(e){if(e){var t=tT();e={blockedOn:null,target:e,priority:t};for(var n=0;n<t_.length&&0!==t&&t<t_[n].priority;n++);t_.splice(n,0,e);0===n&&tL(e)}};function ut(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function un(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function uo(){}function ui(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=s5(a);i.call(e)}}var a=s2(t,r,e,0,null,!1,!1,"",uo);e._reactRootContainer=a;e[r8]=a.current;rN(8===e.nodeType?e.parentNode:e);sx();return a}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var l=r;r=function(){var e=s5(s);l.call(e)}}var s=sJ(e,0,!1,null,null,!1,!1,"",uo);e._reactRootContainer=s;e[r8]=s.current;rN(8===e.nodeType?e.parentNode:e);sx(function(){s4(t,s,n,r)});return s}function ua(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"===typeof o){var l=o;o=function(){var e=s5(a);l.call(e)}}s4(t,a,e,o)}else a=ui(n,t,e,o,r);return s5(a)}tw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=tu(t.pendingLanes);0!==n&&(ty(t,n|1),sf(t,e4()),0===(l$&6)&&(l7=e4()+500,oI()))}break;case 13:sx(function(){var t=il(e,1);if(null!==t){var n=su();sd(t,e,1,n)}}),s7(e,1)}};tS=function(e){if(13===e.tag){var t=il(e,134217728);if(null!==t){var n=su();sd(t,e,134217728,n)}s7(e,134217728)}};tk=function(e){if(13===e.tag){var t=sc(e),n=il(e,t);if(null!==n){var r=su();sd(n,e,t,r)}s7(e,t)}};tT=function(){return tb};tE=function(e,t){var n=tb;try{return tb=e,t()}finally{tb=n}};eC=function(e,t,n){switch(t){case"input":er(e,n);t=n.name;if("radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]');for(t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=oa(r);if(!o)throw Error(i(90));X(r);er(r,o)}}}break;case"textarea":ec(e,n);break;case"select":t=n.value,null!=t&&el(e,!!n.multiple,t,!1)}};eM=sb;e_=sx;var ul={usingClientEntryPoint:!1,Events:[oo,oi,oa,eP,eO,sb]},us={findFiberByHostInstance:on,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"};var uu={bundleType:us.bundleType,version:us.version,rendererPackageName:us.rendererPackageName,rendererConfig:us.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){e=eQ(e);return null===e?null:e.stateNode},findFiberByHostInstance:us.findFiberByHostInstance||s6,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uc.isDisabled&&uc.supportsFiber)try{te=uc.inject(uu),tt=uc}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ul;t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ut(t))throw Error(i(200));return s0(e,t,null,n)};t.createRoot=function(e,t){if(!ut(e))throw Error(i(299));var n=!1,r="",o=s8;null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError));t=sJ(e,1,!1,null,null,n,!1,r,o);e[r8]=t.current;rN(8===e.nodeType?e.parentNode:e);return new s9(t)};t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));e=Object.keys(e).join(",");throw Error(i(268,e))}e=eQ(t);e=null===e?null:e.stateNode;return e};t.flushSync=function(e){return sx(e)};t.hydrate=function(e,t,n){if(!un(t))throw Error(i(200));return ua(null,e,t,!0,n)};t.hydrateRoot=function(e,t,n){if(!ut(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",l=s8;null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(l=n.onRecoverableError));t=s2(t,null,e,1,null!=n?n:null,o,!1,a,l);e[r8]=t.current;rN(e);if(r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new ue(t)};t.render=function(e,t,n){if(!un(t))throw Error(i(200));return ua(null,e,t,!1,n)};t.unmountComponentAtNode=function(e){if(!un(e))throw Error(i(40));return e._reactRootContainer?(sx(function(){ua(null,null,e,!1,function(){e._reactRootContainer=null;e[r8]=null})}),!0):!1};t.unstable_batchedUpdates=sb;t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!un(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return ua(e,t,n,!1,r)};t.version="18.2.0-next-9e3b772b8-20220608"},6279:function(e,t,n){"use strict";var r;var o=n(42457);if(true){t.s=o.createRoot;r=o.hydrateRoot}else{var i}},42457:function(e,t,n){"use strict";function r(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__==="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function"){return}if(false){}try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}if(true){r();e.exports=n(33936)}else{}},51996:function(e,t){"use strict";/** @license React v16.13.1
|
|
38
|
+
* react-is.production.min.js
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the MIT license found in the
|
|
43
|
+
* LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type,e){case c:case f:case i:case l:case a:case p:return e;default:switch(e=e&&e.$$typeof,e){case u:case h:case v:case m:case s:return e;default:return t}}case o:return t}}}function k(e){return S(e)===f}t.AsyncMode=c;t.ConcurrentMode=f;t.ContextConsumer=u;t.ContextProvider=s;t.Element=r;t.ForwardRef=h;t.Fragment=i;t.Lazy=v;t.Memo=m;t.Portal=o;t.Profiler=l;t.StrictMode=a;t.Suspense=p;t.isAsyncMode=function(e){return k(e)||S(e)===c};t.isConcurrentMode=k;t.isContextConsumer=function(e){return S(e)===u};t.isContextProvider=function(e){return S(e)===s};t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r};t.isForwardRef=function(e){return S(e)===h};t.isFragment=function(e){return S(e)===i};t.isLazy=function(e){return S(e)===v};t.isMemo=function(e){return S(e)===m};t.isPortal=function(e){return S(e)===o};t.isProfiler=function(e){return S(e)===l};t.isStrictMode=function(e){return S(e)===a};t.isSuspense=function(e){return S(e)===p};t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===f||e===l||e===a||e===p||e===g||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===s||e.$$typeof===u||e.$$typeof===h||e.$$typeof===b||e.$$typeof===x||e.$$typeof===w||e.$$typeof===y)};t.typeOf=S},5356:function(e,t,n){"use strict";if(true){e.exports=n(51996)}else{}},17605:function(e,t,n){"use strict";n.r(t);n.d(t,{polyfill:function(){return a}});function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);if(e!==null&&e!==undefined){this.setState(e)}}function o(e){function t(t){var n=this.constructor.getDerivedStateFromProps(e,t);return n!==null&&n!==undefined?n:null}this.setState(t.bind(this))}function i(e,t){try{var n=this.props;var r=this.state;this.props=e;this.state=t;this.__reactInternalSnapshotFlag=true;this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n;this.state=r}}r.__suppressDeprecationWarning=true;o.__suppressDeprecationWarning=true;i.__suppressDeprecationWarning=true;function a(e){var t=e.prototype;if(!t||!t.isReactComponent){throw new Error("Can only polyfill class components")}if(typeof e.getDerivedStateFromProps!=="function"&&typeof t.getSnapshotBeforeUpdate!=="function"){return e}var n=null;var a=null;var l=null;if(typeof t.componentWillMount==="function"){n="componentWillMount"}else if(typeof t.UNSAFE_componentWillMount==="function"){n="UNSAFE_componentWillMount"}if(typeof t.componentWillReceiveProps==="function"){a="componentWillReceiveProps"}else if(typeof t.UNSAFE_componentWillReceiveProps==="function"){a="UNSAFE_componentWillReceiveProps"}if(typeof t.componentWillUpdate==="function"){l="componentWillUpdate"}else if(typeof t.UNSAFE_componentWillUpdate==="function"){l="UNSAFE_componentWillUpdate"}if(n!==null||a!==null||l!==null){var s=e.displayName||e.name;var u=typeof e.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+u+" but also contains the following legacy lifecycles:"+(n!==null?"\n "+n:"")+(a!==null?"\n "+a:"")+(l!==null?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\n"+"https://fb.me/react-async-component-lifecycle-hooks")}if(typeof e.getDerivedStateFromProps==="function"){t.componentWillMount=r;t.componentWillReceiveProps=o}if(typeof t.getSnapshotBeforeUpdate==="function"){if(typeof t.componentDidUpdate!=="function"){throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype")}t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function e(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}},62151:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.bodyOpenClassName=t.portalClassName=undefined;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,n,r){if(n)e(t.prototype,n);if(r)e(t,r);return t}}();var i=n(66204);var a=x(i);var l=n(42457);var s=x(l);var u=n(97641);var c=x(u);var f=n(65434);var h=x(f);var p=n(80377);var g=b(p);var m=n(71384);var v=x(m);var y=n(17605);function b(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n))t[n]=e[n]}}t.default=e;return t}}function x(e){return e&&e.__esModule?e:{default:e}}function w(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function S(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e}function k(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t}var T=t.portalClassName="ReactModalPortal";var E=t.bodyOpenClassName="ReactModal__Body--open";var C=m.canUseDOM&&s.default.createPortal!==undefined;var j=function e(e){return document.createElement(e)};var I=function e(){return C?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function D(e){return e()}var P=function(e){k(t,e);function t(){var e;var n,o,i;w(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++){u[c]=arguments[c]}return i=(n=(o=S(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),o),o.removePortal=function(){!C&&s.default.unmountComponentAtNode(o.node);var e=D(o.props.parentSelector);if(e&&e.contains(o.node)){e.removeChild(o.node)}else{console.warn('React-Modal: "parentSelector" prop did not returned any DOM '+"element. Make sure that the parent element is unmounted to "+"avoid any memory leaks.")}},o.portalRef=function(e){o.portal=e},o.renderPortal=function(e){var n=I();var i=n(o,a.default.createElement(h.default,r({defaultStyles:t.defaultStyles},e)),o.node);o.portalRef(i)},n),S(o,i)}o(t,[{key:"componentDidMount",value:function e(){if(!m.canUseDOM)return;if(!C){this.node=j("div")}this.node.className=this.props.portalClassName;var e=D(this.props.parentSelector);e.appendChild(this.node);!C&&this.renderPortal(this.props)}},{key:"getSnapshotBeforeUpdate",value:function e(e){var t=D(e.parentSelector);var n=D(this.props.parentSelector);return{prevParent:t,nextParent:n}}},{key:"componentDidUpdate",value:function e(e,t,n){if(!m.canUseDOM)return;var r=this.props,o=r.isOpen,i=r.portalClassName;if(e.portalClassName!==i){this.node.className=i}var a=n.prevParent,l=n.nextParent;if(l!==a){a.removeChild(this.node);l.appendChild(this.node)}if(!e.isOpen&&!o)return;!C&&this.renderPortal(this.props)}},{key:"componentWillUnmount",value:function e(){if(!m.canUseDOM||!this.node||!this.portal)return;var e=this.portal.state;var t=Date.now();var n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);if(n){if(!e.beforeClose){this.portal.closeWithTimeout()}setTimeout(this.removePortal,n-t)}else{this.removePortal()}}},{key:"render",value:function e(){if(!m.canUseDOM||!C){return null}if(!this.node&&C){this.node=j("div")}var e=I();return e(a.default.createElement(h.default,r({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function e(e){g.setElement(e)}}]);return t}(i.Component);P.propTypes={isOpen:c.default.bool.isRequired,style:c.default.shape({content:c.default.object,overlay:c.default.object}),portalClassName:c.default.string,bodyOpenClassName:c.default.string,htmlOpenClassName:c.default.string,className:c.default.oneOfType([c.default.string,c.default.shape({base:c.default.string.isRequired,afterOpen:c.default.string.isRequired,beforeClose:c.default.string.isRequired})]),overlayClassName:c.default.oneOfType([c.default.string,c.default.shape({base:c.default.string.isRequired,afterOpen:c.default.string.isRequired,beforeClose:c.default.string.isRequired})]),appElement:c.default.oneOfType([c.default.instanceOf(v.default),c.default.instanceOf(m.SafeHTMLCollection),c.default.instanceOf(m.SafeNodeList),c.default.arrayOf(c.default.instanceOf(v.default))]),onAfterOpen:c.default.func,onRequestClose:c.default.func,closeTimeoutMS:c.default.number,ariaHideApp:c.default.bool,shouldFocusAfterRender:c.default.bool,shouldCloseOnOverlayClick:c.default.bool,shouldReturnFocusAfterClose:c.default.bool,preventScroll:c.default.bool,parentSelector:c.default.func,aria:c.default.object,data:c.default.object,role:c.default.string,contentLabel:c.default.string,shouldCloseOnEsc:c.default.bool,overlayRef:c.default.func,contentRef:c.default.func,id:c.default.string,overlayElement:c.default.func,contentElement:c.default.func};P.defaultProps={isOpen:false,portalClassName:T,bodyOpenClassName:E,role:"dialog",ariaHideApp:true,closeTimeoutMS:0,shouldFocusAfterRender:true,shouldCloseOnEsc:true,shouldCloseOnOverlayClick:true,shouldReturnFocusAfterClose:true,preventScroll:false,parentSelector:function e(){return document.body},overlayElement:function e(e,t){return a.default.createElement("div",e,t)},contentElement:function e(e,t){return a.default.createElement("div",e,t)}};P.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}};(0,y.polyfill)(P);if(false){}t["default"]=P},65434:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};var o=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(t,n,r){if(n)e(t.prototype,n);if(r)e(t,r);return t}}();var a=n(66204);var l=n(97641);var s=k(l);var u=n(50313);var c=S(u);var f=n(73273);var h=k(f);var p=n(80377);var g=S(p);var m=n(53576);var v=S(m);var y=n(71384);var b=k(y);var x=n(48598);var w=k(x);n(57631);function S(e){if(e&&e.__esModule){return e}else{var t={};if(e!=null){for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n))t[n]=e[n]}}t.default=e;return t}}function k(e){return e&&e.__esModule?e:{default:e}}function T(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function E(e,t){if(!e){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t&&(typeof t==="object"||typeof t==="function")?t:e}function C(e,t){if(typeof t!=="function"&&t!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof t)}e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}});if(t)Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t}var j={overlay:"ReactModal__Overlay",content:"ReactModal__Content"};var I=function e(e){return e.code==="Tab"||e.keyCode===9};var D=function e(e){return e.code==="Escape"||e.keyCode===27};var P=0;var O=function(e){C(t,e);function t(e){T(this,t);var n=E(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.setOverlayRef=function(e){n.overlay=e;n.props.overlayRef&&n.props.overlayRef(e)};n.setContentRef=function(e){n.content=e;n.props.contentRef&&n.props.contentRef(e)};n.afterClose=function(){var e=n.props,t=e.appElement,r=e.ariaHideApp,o=e.htmlOpenClassName,i=e.bodyOpenClassName,a=e.parentSelector;var l=a&&a().ownerDocument||document;i&&v.remove(l.body,i);o&&v.remove(l.getElementsByTagName("html")[0],o);if(r&&P>0){P-=1;if(P===0){g.show(t)}}if(n.props.shouldFocusAfterRender){if(n.props.shouldReturnFocusAfterClose){c.returnFocus(n.props.preventScroll);c.teardownScopedFocus()}else{c.popWithoutFocus()}}if(n.props.onAfterClose){n.props.onAfterClose()}w.default.deregister(n)};n.open=function(){n.beforeOpen();if(n.state.afterOpen&&n.state.beforeClose){clearTimeout(n.closeTimer);n.setState({beforeClose:false})}else{if(n.props.shouldFocusAfterRender){c.setupScopedFocus(n.node);c.markForFocusLater()}n.setState({isOpen:true},function(){n.openAnimationFrame=requestAnimationFrame(function(){n.setState({afterOpen:true});if(n.props.isOpen&&n.props.onAfterOpen){n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}})})}};n.close=function(){if(n.props.closeTimeoutMS>0){n.closeWithTimeout()}else{n.closeWithoutTimeout()}};n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:true})};n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:true,closesAt:e},function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())})};n.closeWithoutTimeout=function(){n.setState({beforeClose:false,isOpen:false,afterOpen:false,closesAt:null},n.afterClose)};n.handleKeyDown=function(e){if(I(e)){(0,h.default)(n.content,e)}if(n.props.shouldCloseOnEsc&&D(e)){e.stopPropagation();n.requestClose(e)}};n.handleOverlayOnClick=function(e){if(n.shouldClose===null){n.shouldClose=true}if(n.shouldClose&&n.props.shouldCloseOnOverlayClick){if(n.ownerHandlesClose()){n.requestClose(e)}else{n.focusContent()}}n.shouldClose=null};n.handleContentOnMouseUp=function(){n.shouldClose=false};n.handleOverlayOnMouseDown=function(e){if(!n.props.shouldCloseOnOverlayClick&&e.target==n.overlay){e.preventDefault()}};n.handleContentOnClick=function(){n.shouldClose=false};n.handleContentOnMouseDown=function(){n.shouldClose=false};n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)};n.ownerHandlesClose=function(){return n.props.onRequestClose};n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose};n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)};n.buildClassName=function(e,t){var r=(typeof t==="undefined"?"undefined":o(t))==="object"?t:{base:j[e],afterOpen:j[e]+"--after-open",beforeClose:j[e]+"--before-close"};var i=r.base;if(n.state.afterOpen){i=i+" "+r.afterOpen}if(n.state.beforeClose){i=i+" "+r.beforeClose}return typeof t==="string"&&t?i+" "+t:i};n.attributesFromObject=function(e,t){return Object.keys(t).reduce(function(n,r){n[e+"-"+r]=t[r];return n},{})};n.state={afterOpen:false,beforeClose:false};n.shouldClose=null;n.moveFromContentToOverlay=null;return n}i(t,[{key:"componentDidMount",value:function e(){if(this.props.isOpen){this.open()}}},{key:"componentDidUpdate",value:function e(e,t){if(false){}if(this.props.isOpen&&!e.isOpen){this.open()}else if(!this.props.isOpen&&e.isOpen){this.close()}if(this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen){this.focusContent()}}},{key:"componentWillUnmount",value:function e(){if(this.state.isOpen){this.afterClose()}clearTimeout(this.closeTimer);cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function e(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,o=e.bodyOpenClassName,i=e.parentSelector;var a=i&&i().ownerDocument||document;o&&v.add(a.body,o);r&&v.add(a.getElementsByTagName("html")[0],r);if(n){P+=1;g.hide(t)}w.default.register(this)}},{key:"render",value:function e(){var e=this.props,t=e.id,n=e.className,o=e.overlayClassName,i=e.defaultStyles,a=e.children;var l=n?{}:i.content;var s=o?{}:i.overlay;if(this.shouldBeClosed()){return null}var u={ref:this.setOverlayRef,className:this.buildClassName("overlay",o),style:r({},s,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown};var c=r({id:t,ref:this.setContentRef,style:r({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:true},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId});var f=this.props.contentElement(c,a);return this.props.overlayElement(u,f)}}]);return t}(a.Component);O.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}};O.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),parentSelector:s.default.func,bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(b.default),s.default.instanceOf(y.SafeHTMLCollection),s.default.instanceOf(y.SafeNodeList),s.default.arrayOf(s.default.instanceOf(b.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string};t["default"]=O;e.exports=t["default"]},80377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.resetState=s;t.log=u;t.assertNodeList=c;t.setElement=f;t.validateElement=h;t.hide=p;t.show=g;t.documentNotReadyOrSSRTesting=m;var r=n(92879);var o=a(r);var i=n(71384);function a(e){return e&&e.__esModule?e:{default:e}}var l=null;function s(){if(l){if(l.removeAttribute){l.removeAttribute("aria-hidden")}else if(l.length!=null){l.forEach(function(e){return e.removeAttribute("aria-hidden")})}else{document.querySelectorAll(l).forEach(function(e){return e.removeAttribute("aria-hidden")})}}l=null}function u(){if(false){var e}}function c(e,t){if(!e||!e.length){throw new Error("react-modal: No elements were found for selector "+t+".")}}function f(e){var t=e;if(typeof t==="string"&&i.canUseDOM){var n=document.querySelectorAll(t);c(n,t);t=n}l=t||l;return l}function h(e){var t=e||l;if(t){return Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]}else{(0,o.default)(false,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" "));return[]}}function p(e){var t=true;var n=false;var r=undefined;try{for(var o=h(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=true){var a=i.value;a.setAttribute("aria-hidden","true")}}catch(e){n=true;r=e}finally{try{if(!t&&o.return){o.return()}}finally{if(n){throw r}}}}function g(e){var t=true;var n=false;var r=undefined;try{for(var o=h(e)[Symbol.iterator](),i;!(t=(i=o.next()).done);t=true){var a=i.value;a.removeAttribute("aria-hidden")}}catch(e){n=true;r=e}finally{try{if(!t&&o.return){o.return()}}finally{if(n){throw r}}}}function m(){l=null}},57631:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.resetState=u;t.log=c;var r=n(48598);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}var a=void 0,l=void 0,s=[];function u(){var e=[a,l];for(var t=0;t<e.length;t++){var n=e[t];if(!n)continue;n.parentNode&&n.parentNode.removeChild(n)}a=l=null;s=[]}function c(){console.log("bodyTrap ----------");console.log(s.length);var e=[a,l];for(var t=0;t<e.length;t++){var n=e[t];var r=n||{};console.log(r.nodeName,r.className,r.id)}console.log("edn bodyTrap ----------")}function f(){if(s.length===0){if(false){}return}s[s.length-1].focusContent()}function h(e,t){if(!a&&!l){a=document.createElement("div");a.setAttribute("data-react-modal-body-trap","");a.style.position="absolute";a.style.opacity="0";a.setAttribute("tabindex","0");a.addEventListener("focus",f);l=a.cloneNode();l.addEventListener("focus",f)}s=t;if(s.length>0){if(document.body.firstChild!==a){document.body.insertBefore(a,document.body.firstChild)}if(document.body.lastChild!==l){document.body.appendChild(l)}}else{if(a.parentElement){a.parentElement.removeChild(a)}if(l.parentElement){l.parentElement.removeChild(l)}}}o.default.subscribe(h)},53576:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.resetState=i;t.log=a;var n={};var r={};function o(e,t){e.classList.remove(t)}function i(){var e=document.getElementsByTagName("html")[0];for(var t in n){o(e,n[t])}var i=document.body;for(var a in r){o(i,r[a])}n={};r={}}function a(){if(false){var e,t,n,r}}var l=function e(e,t){if(!e[t]){e[t]=0}e[t]+=1;return t};var s=function e(e,t){if(e[t]){e[t]-=1}return t};var u=function e(e,t,n){n.forEach(function(n){l(t,n);e.add(n)})};var c=function e(e,t,n){n.forEach(function(n){s(t,n);t[n]===0&&e.remove(n)})};var f=t.add=function e(e,t){return u(e.classList,e.nodeName.toLowerCase()=="html"?n:r,t.split(" "))};var h=t.remove=function e(e,t){return c(e.classList,e.nodeName.toLowerCase()=="html"?n:r,t.split(" "))}},50313:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.resetState=u;t.log=c;t.handleBlur=f;t.handleFocus=h;t.markForFocusLater=p;t.returnFocus=g;t.popWithoutFocus=m;t.setupScopedFocus=v;t.teardownScopedFocus=y;var r=n(43674);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}var a=[];var l=null;var s=false;function u(){a=[]}function c(){if(false){}}function f(){s=true}function h(){if(s){s=false;if(!l){return}setTimeout(function(){if(l.contains(document.activeElement)){return}var e=(0,o.default)(l)[0]||l;e.focus()},0)}}function p(){a.push(document.activeElement)}function g(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var t=null;try{if(a.length!==0){t=a.pop();t.focus({preventScroll:e})}return}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}}function m(){a.length>0&&a.pop()}function v(e){l=e;if(window.addEventListener){window.addEventListener("blur",f,false);document.addEventListener("focus",h,true)}else{window.attachEvent("onBlur",f);document.attachEvent("onFocus",h)}}function y(){l=null;if(window.addEventListener){window.removeEventListener("blur",f);document.removeEventListener("focus",h)}else{window.detachEvent("onBlur",f);document.detachEvent("onFocus",h)}}},48598:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.log=i;t.resetState=a;function n(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}var r=function e(){var t=this;n(this,e);this.register=function(e){if(t.openInstances.indexOf(e)!==-1){if(false){}return}t.openInstances.push(e);t.emit("register")};this.deregister=function(e){var n=t.openInstances.indexOf(e);if(n===-1){if(false){}return}t.openInstances.splice(n,1);t.emit("deregister")};this.subscribe=function(e){t.subscribers.push(e)};this.emit=function(e){t.subscribers.forEach(function(n){return n(e,t.openInstances.slice())})};this.openInstances=[];this.subscribers=[]};var o=new r;function i(){console.log("portalOpenInstances ----------");console.log(o.openInstances.length);o.openInstances.forEach(function(e){return console.log(e)});console.log("end portalOpenInstances ----------")}function a(){o=new r}t["default"]=o},71384:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=undefined;var r=n(53797);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}var a=o.default;var l=a.canUseDOM?window.HTMLElement:{};var s=t.SafeHTMLCollection=a.canUseDOM?window.HTMLCollection:{};var u=t.SafeNodeList=a.canUseDOM?window.NodeList:{};var c=t.canUseDOM=a.canUseDOM;t["default"]=l},73273:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=l;var r=n(43674);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:document;return e.activeElement.shadowRoot?a(e.activeElement.shadowRoot):e.activeElement}function l(e,t){var n=(0,o.default)(e);if(!n.length){t.preventDefault();return}var r=void 0;var i=t.shiftKey;var l=n[0];var s=n[n.length-1];var u=a();if(e===u){if(!i)return;r=s}if(s===u&&!i){r=l}if(l===u&&i){r=s}if(r){t.preventDefault();r.focus();return}var c=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);var f=c!=null&&c[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(!f)return;var h=n.indexOf(u);if(h>-1){h+=i?-1:1}r=n[h];if(typeof r==="undefined"){t.preventDefault();r=i?s:l;r.focus();return}t.preventDefault();r.focus()}e.exports=t["default"]},43674:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=c;/*!
|
|
45
|
+
* Adapted from jQuery UI core
|
|
46
|
+
*
|
|
47
|
+
* http://jqueryui.com
|
|
48
|
+
*
|
|
49
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
|
50
|
+
* Released under the MIT license.
|
|
51
|
+
* http://jquery.org/license
|
|
52
|
+
*
|
|
53
|
+
* http://api.jqueryui.com/category/ui-core/
|
|
54
|
+
*/var n="none";var r="contents";var o=/input|select|textarea|button|object|iframe/;function i(e,t){return t.getPropertyValue("overflow")!=="visible"||e.scrollWidth<=0&&e.scrollHeight<=0}function a(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return true;try{var o=window.getComputedStyle(e);var a=o.getPropertyValue("display");return t?a!==r&&i(e,o):a===n}catch(e){console.warn("Failed to inspect element style");return false}}function l(e){var t=e;var n=e.getRootNode&&e.getRootNode();while(t){if(t===document.body)break;if(n&&t===n)t=n.host.parentNode;if(a(t))return false;t=t.parentNode}return true}function s(e,t){var n=e.nodeName.toLowerCase();var r=o.test(n)&&!e.disabled||(n==="a"?e.href||t:t);return r&&l(e)}function u(e){var t=e.getAttribute("tabindex");if(t===null)t=undefined;var n=isNaN(t);return(n||t>=0)&&s(e,!n)}function c(e){var t=[].slice.call(e.querySelectorAll("*"),0).reduce(function(e,t){return e.concat(!t.shadowRoot?[t]:c(t.shadowRoot))},[]);return t.filter(u)}e.exports=t["default"]},77216:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:true});var r=n(62151);var o=i(r);function i(e){return e&&e.__esModule?e:{default:e}}t["default"]=o.default;e.exports=t["default"]},37496:function(e,t,n){"use strict";n.d(t,{zt:function(){return g},I0:function(){return J},v9:function(){return er},oR:function(){return Q}});var r=n(66204);var o=r.createContext(null);if(false){}var i=null&&o;function a(e){e()}var l=a;var s=function e(e){return l=e};var u=function e(){return l};var c={notify:function e(){}};function f(){var e=u();var t=null;var n=null;return{clear:function e(){t=null;n=null},notify:function n(){e(function(){var e=t;while(e){e.callback();e=e.next}})},get:function e(){var e=[];var n=t;while(n){e.push(n);n=n.next}return e},subscribe:function e(e){var r=true;var o=n={callback:e,next:null,prev:n};if(o.prev){o.prev.next=o}else{t=o}return function e(){if(!r||t===null)return;r=false;if(o.next){o.next.prev=o.prev}else{n=o.prev}if(o.prev){o.prev.next=o.next}else{t=o.next}}}}}var h=function(){function e(e,t){this.store=e;this.parentSub=t;this.unsubscribe=null;this.listeners=c;this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;t.addNestedSub=function e(e){this.trySubscribe();return this.listeners.subscribe(e)};t.notifyNestedSubs=function e(){this.listeners.notify()};t.handleChangeWrapper=function e(){if(this.onStateChange){this.onStateChange()}};t.isSubscribed=function e(){return Boolean(this.unsubscribe)};t.trySubscribe=function e(){if(!this.unsubscribe){this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper);this.listeners=f()}};t.tryUnsubscribe=function e(){if(this.unsubscribe){this.unsubscribe();this.unsubscribe=null;this.listeners.clear();this.listeners=c}};return e}();function p(e){var t=e.store,n=e.context,i=e.children;var a=(0,r.useMemo)(function(){var e=new h(t);e.onStateChange=e.notifyNestedSubs;return{store:t,subscription:e}},[t]);var l=(0,r.useMemo)(function(){return t.getState()},[t]);(0,r.useEffect)(function(){var e=a.subscription;e.trySubscribe();if(l!==t.getState()){e.notifyNestedSubs()}return function(){e.tryUnsubscribe();e.onStateChange=null}},[a,l]);var s=n||o;return r.createElement(s.Provider,{value:a},i)}if(false){}var g=p;var m=n(69060);var v=n(5356);var y=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined"?r.useLayoutEffect:r.useEffect;var b=null&&[];var x=null&&[null,null];var w=function e(e){try{return JSON.stringify(e)}catch(t){return String(e)}};function S(e,t){var n=e[1];return[t.payload,n+1]}function k(e,t,n){useIsomorphicLayoutEffect(function(){return e.apply(void 0,t)},n)}function T(e,t,n,r,o,i,a){e.current=r;t.current=o;n.current=false;if(i.current){i.current=null;a()}}function E(e,t,n,r,o,i,a,l,s,u){if(!e)return;var c=false;var f=null;var h=function e(){if(c){return}var e=t.getState();var n,h;try{n=r(e,o.current)}catch(e){h=e;f=e}if(!h){f=null}if(n===i.current){if(!a.current){s()}}else{i.current=n;l.current=n;a.current=true;u({type:"STORE_UPDATED",payload:{error:h}})}};n.onStateChange=h;n.trySubscribe();h();var p=function e(){c=true;n.tryUnsubscribe();n.onStateChange=null;if(f){throw f}};return p}var C=function e(){return[null,0]};function j(e,t){if(t===void 0){t={}}var n=t,r=n.getDisplayName,o=r===void 0?function(e){return"ConnectAdvanced("+e+")"}:r,i=n.methodName,a=i===void 0?"connectAdvanced":i,l=n.renderCountProp,s=l===void 0?undefined:l,u=n.shouldHandleStateChanges,c=u===void 0?true:u,f=n.storeKey,h=f===void 0?"store":f,p=n.withRef,g=p===void 0?false:p,m=n.forwardRef,v=m===void 0?false:m,y=n.context,w=y===void 0?ReactReduxContext:y,j=_objectWithoutPropertiesLoose(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);if(false){var I}var D=w;return function t(t){if(false){}var n=t.displayName||t.name||"Component";var r=o(n);var i=_extends({},j,{getDisplayName:o,methodName:a,renderCountProp:s,shouldHandleStateChanges:c,storeKey:h,displayName:r,wrappedComponentName:n,WrappedComponent:t});var l=j.pure;function u(t){return e(t.dispatch,i)}var f=l?useMemo:function(e){return e()};function p(e){var n=useMemo(function(){var t=e.reactReduxForwardedRef,n=_objectWithoutPropertiesLoose(e,["reactReduxForwardedRef"]);return[e.context,t,n]},[e]),r=n[0],o=n[1],i=n[2];var a=useMemo(function(){return r&&r.Consumer&&isContextConsumer(React.createElement(r.Consumer,null))?r:D},[r,D]);var l=useContext(a);var s=Boolean(e.store)&&Boolean(e.store.getState)&&Boolean(e.store.dispatch);var h=Boolean(l)&&Boolean(l.store);if(false){}var p=s?e.store:l.store;var g=useMemo(function(){return u(p)},[p]);var m=useMemo(function(){if(!c)return x;var e=new Subscription(p,s?null:l.subscription);var t=e.notifyNestedSubs.bind(e);return[e,t]},[p,s,l]),v=m[0],y=m[1];var w=useMemo(function(){if(s){return l}return _extends({},l,{subscription:v})},[s,l,v]);var j=useReducer(S,b,C),I=j[0],P=I[0],O=j[1];if(P&&P.error){throw P.error}var M=useRef();var _=useRef(i);var R=useRef();var A=useRef(false);var N=f(function(){if(R.current&&i===_.current){return R.current}return g(p.getState(),i)},[p,P,i]);k(T,[_,M,A,i,N,R,y]);k(E,[c,p,v,g,_,M,A,R,y,O],[p,v,g]);var Z=useMemo(function(){return React.createElement(t,_extends({},N,{ref:o}))},[o,t,N]);var L=useMemo(function(){if(c){return React.createElement(a.Provider,{value:w},Z)}return Z},[a,Z,w]);return L}var g=l?React.memo(p):p;g.WrappedComponent=t;g.displayName=r;if(v){var m=React.forwardRef(function e(e,t){return React.createElement(g,_extends({},e,{reactReduxForwardedRef:t}))});m.displayName=r;m.WrappedComponent=t;return hoistStatics(m,t)}return hoistStatics(g,t)}}var I=n(65485);function D(e){return function t(t,n){var r=e(t,n);function o(){return r}o.dependsOnOwnProps=false;return o}}function P(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==undefined?Boolean(e.dependsOnOwnProps):e.length!==1}function O(e,t){return function t(t,n){var r=n.displayName;var o=function e(e,t){return o.dependsOnOwnProps?o.mapToProps(e,t):o.mapToProps(e)};o.dependsOnOwnProps=true;o.mapToProps=function t(t,n){o.mapToProps=e;o.dependsOnOwnProps=P(e);var r=o(t,n);if(typeof r==="function"){o.mapToProps=r;o.dependsOnOwnProps=P(r);r=o(t,n)}if(false){}return r};return o}};function M(e){return typeof e==="function"?O(e,"mapDispatchToProps"):undefined}function _(e){return!e?D(function(e){return{dispatch:e}}):undefined}function R(e){return e&&typeof e==="object"?D(function(t){return(0,I.DE)(e,t)}):undefined}var A=[M,_,R];function N(e){return typeof e==="function"?O(e,"mapStateToProps"):undefined}function Z(e){return!e?D(function(){return{}}):undefined}var L=[N,Z];var B=n(7896);function F(e,t,n){return(0,B.Z)({},n,{},e,{},t)}function W(e){return function t(t,n){var r=n.displayName,o=n.pure,i=n.areMergedPropsEqual;var a=false;var l;return function t(t,n,r){var s=e(t,n,r);if(a){if(!o||!i(s,l))l=s}else{a=true;l=s;if(false){}}return l}}}function U(e){return typeof e==="function"?W(e):undefined}function z(e){return!e?function(){return F}:undefined}var H=[U,z];function K(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function $(e,t){return e===t}function V(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?connectAdvanced:n,o=t.mapStateToPropsFactories,i=o===void 0?defaultMapStateToPropsFactories:o,a=t.mapDispatchToPropsFactories,l=a===void 0?defaultMapDispatchToPropsFactories:a,s=t.mergePropsFactories,u=s===void 0?defaultMergePropsFactories:s,c=t.selectorFactory,f=c===void 0?defaultSelectorFactory:c;return function e(e,t,n,o){if(o===void 0){o={}}var a=o,s=a.pure,c=s===void 0?true:s,h=a.areStatesEqual,p=h===void 0?$:h,g=a.areOwnPropsEqual,m=g===void 0?shallowEqual:g,v=a.areStatePropsEqual,y=v===void 0?shallowEqual:v,b=a.areMergedPropsEqual,x=b===void 0?shallowEqual:b,w=_objectWithoutPropertiesLoose(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]);var S=K(e,i,"mapStateToProps");var k=K(t,l,"mapDispatchToProps");var T=K(n,u,"mergeProps");return r(f,_extends({methodName:"connect",getDisplayName:function e(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:S,initMapDispatchToProps:k,initMergeProps:T,pure:c,areStatesEqual:p,areOwnPropsEqual:m,areStatePropsEqual:y,areMergedPropsEqual:x},w))}}var q=null&&V();function Y(){var e=(0,r.useContext)(o);if(false){}return e};function G(e){if(e===void 0){e=o}var t=e===o?Y:function(){return(0,r.useContext)(e)};return function e(){var e=t(),n=e.store;return n}}var Q=G();function X(e){if(e===void 0){e=o}var t=e===o?Q:G(e);return function e(){var e=t();return e.dispatch}}var J=X();var ee=function e(e,t){return e===t};function et(e,t,n,o){var i=(0,r.useReducer)(function(e){return e+1},0),a=i[1];var l=(0,r.useMemo)(function(){return new h(n,o)},[n,o]);var s=(0,r.useRef)();var u=(0,r.useRef)();var c=(0,r.useRef)();var f=(0,r.useRef)();var p=n.getState();var g;try{if(e!==u.current||p!==c.current||s.current){g=e(p)}else{g=f.current}}catch(e){if(s.current){e.message+="\nThe error may be correlated with this previous error:\n"+s.current.stack+"\n\n"}throw e}y(function(){u.current=e;c.current=p;f.current=g;s.current=undefined});y(function(){function e(){try{var e=u.current(n.getState());if(t(e,f.current)){return}f.current=e}catch(e){s.current=e}a()}l.onStateChange=e;l.trySubscribe();e();return function(){return l.tryUnsubscribe()}},[n,l]);return g}function en(e){if(e===void 0){e=o}var t=e===o?Y:function(){return(0,r.useContext)(e)};return function e(e,n){if(n===void 0){n=ee}if(false){}var o=t(),i=o.store,a=o.subscription;var l=et(e,n,i,a);(0,r.useDebugValue)(l);return l}}var er=en();var eo=n(42457);;s(eo.unstable_batchedUpdates)},45485:function(e,t,n){"use strict";n.d(t,{OL:function(){return _},VK:function(){return j},rU:function(){return M}});var r=n(66204);var o=n(59379);var i=n(45058);/**
|
|
55
|
+
* React Router DOM v6.11.2
|
|
56
|
+
*
|
|
57
|
+
* Copyright (c) Remix Software Inc.
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the MIT license found in the
|
|
60
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
61
|
+
*
|
|
62
|
+
* @license MIT
|
|
63
|
+
*/function a(){a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};return a.apply(this,arguments)}function l(e,t){if(e==null)return{};var n={};var r=Object.keys(e);var o,i;for(i=0;i<r.length;i++){o=r[i];if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}const s="get";const u="application/x-www-form-urlencoded";function c(e){return e!=null&&typeof e.tagName==="string"}function f(e){return c(e)&&e.tagName.toLowerCase()==="button"}function h(e){return c(e)&&e.tagName.toLowerCase()==="form"}function p(e){return c(e)&&e.tagName.toLowerCase()==="input"}function g(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function m(e,t){return e.button===0&&(!t||t==="_self")&&!g(e)}function v(e){if(e===void 0){e=""}return new URLSearchParams(typeof e==="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function y(e,t){let n=v(e);if(t){for(let e of t.keys()){if(!n.has(e)){t.getAll(e).forEach(t=>{n.append(e,t)})}}}return n}function b(e,t,n){let r;let o=null;let i;let a;if(h(e)){let l=t.submissionTrigger;if(t.action){o=t.action}else{let t=e.getAttribute("action");o=t?stripBasename(t,n):null}r=t.method||e.getAttribute("method")||s;i=t.encType||e.getAttribute("enctype")||u;a=new FormData(e);if(l&&l.name){a.append(l.name,l.value)}}else if(f(e)||p(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null){throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>')}if(t.action){o=t.action}else{let t=e.getAttribute("formaction")||l.getAttribute("action");o=t?stripBasename(t,n):null}r=t.method||e.getAttribute("formmethod")||l.getAttribute("method")||s;i=t.encType||e.getAttribute("formenctype")||l.getAttribute("enctype")||u;a=new FormData(l);if(e.name){a.append(e.name,e.value)}}else if(c(e)){throw new Error("Cannot submit element that is not <form>, <button>, or "+'<input type="submit|image">')}else{r=t.method||s;o=t.action||null;i=t.encType||u;if(e instanceof FormData){a=e}else{a=new FormData;if(e instanceof URLSearchParams){for(let[t,n]of e){a.append(t,n)}}else if(e!=null){for(let t of Object.keys(e)){a.append(t,e[t])}}}}return{action:o,method:r.toLowerCase(),encType:i,formData:a}}const x=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],w=["aria-current","caseSensitive","className","end","style","to","children"],S=null&&["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative","preventScrollReset"];function k(e,t){return createRouter({basename:t==null?void 0:t.basename,future:a({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createBrowserHistory({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||E(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties}).initialize()}function T(e,t){return createRouter({basename:t==null?void 0:t.basename,future:a({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createHashHistory({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||E(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties}).initialize()}function E(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;if(t&&t.errors){t=a({},t,{errors:C(t.errors)})}return t}function C(e){if(!e)return null;let t=Object.entries(e);let n={};for(let[e,r]of t){if(r&&r.__type==="RouteErrorResponse"){n[e]=new ErrorResponse(r.status,r.statusText,r.data,r.internal===true)}else if(r&&r.__type==="Error"){let t=new Error(r.message);t.stack="";n[e]=t}else{n[e]=r}}return n}function j(e){let{basename:t,children:n,window:a}=e;let l=r.useRef();if(l.current==null){l.current=(0,i.lX)({window:a,v5Compat:true})}let s=l.current;let[u,c]=r.useState({action:s.action,location:s.location});r.useLayoutEffect(()=>s.listen(c),[s]);return r.createElement(o.F0,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:s})}function I(e){let{basename:t,children:n,window:r}=e;let o=React.useRef();if(o.current==null){o.current=createHashHistory({window:r,v5Compat:true})}let i=o.current;let[a,l]=React.useState({action:i.action,location:i.location});React.useLayoutEffect(()=>i.listen(l),[i]);return React.createElement(Router,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i})}function D(e){let{basename:t,children:n,history:r}=e;const[o,i]=React.useState({action:r.action,location:r.location});React.useLayoutEffect(()=>r.listen(i),[r]);return React.createElement(Router,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:r})}if(false){}const P=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined";const O=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;const M=r.forwardRef(function e(e,t){let{onClick:n,relative:s,reloadDocument:u,replace:c,state:f,target:h,to:p,preventScrollReset:g}=e,m=l(e,x);let{basename:v}=r.useContext(o.Us);let y;let b=false;if(typeof p==="string"&&O.test(p)){y=p;if(P){try{let e=new URL(window.location.href);let t=p.startsWith("//")?new URL(e.protocol+p):new URL(p);let n=(0,i.Zn)(t.pathname,v);if(t.origin===e.origin&&n!=null){p=n+t.search+t.hash}else{b=true}}catch(e){false?0:void 0}}}let w=(0,o.oQ)(p,{relative:s});let S=U(p,{replace:c,state:f,target:h,preventScrollReset:g,relative:s});function k(e){if(n)n(e);if(!e.defaultPrevented){S(e)}}return r.createElement("a",a({},m,{href:y||w,onClick:b||u?n:k,ref:t,target:h}))});if(false){}const _=r.forwardRef(function e(e,t){let{"aria-current":n="page",caseSensitive:i=false,className:s="",end:u=false,style:c,to:f,children:h}=e,p=l(e,w);let g=(0,o.WU)(f,{relative:p.relative});let m=(0,o.TH)();let v=r.useContext(o.FR);let{navigator:y}=r.useContext(o.Us);let b=y.encodeLocation?y.encodeLocation(g).pathname:g.pathname;let x=m.pathname;let S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;if(!i){x=x.toLowerCase();S=S?S.toLowerCase():null;b=b.toLowerCase()}let k=x===b||!u&&x.startsWith(b)&&x.charAt(b.length)==="/";let T=S!=null&&(S===b||!u&&S.startsWith(b)&&S.charAt(b.length)==="/");let E=k?n:undefined;let C;if(typeof s==="function"){C=s({isActive:k,isPending:T})}else{C=[s,k?"active":null,T?"pending":null].filter(Boolean).join(" ")}let j=typeof c==="function"?c({isActive:k,isPending:T}):c;return r.createElement(M,a({},p,{"aria-current":E,className:C,ref:t,style:j,to:f}),typeof h==="function"?h({isActive:k,isPending:T}):h)});if(false){}const R=null&&React.forwardRef((e,t)=>{return React.createElement(A,a({},e,{ref:t}))});if(false){}const A=null&&React.forwardRef((e,t)=>{let{reloadDocument:n,replace:r,method:o=s,action:i,onSubmit:u,fetcherKey:c,routeId:f,relative:h,preventScrollReset:p}=e,g=l(e,S);let m=K(c,f);let v=o.toLowerCase()==="get"?"get":"post";let y=$(i,{relative:h});let b=e=>{u&&u(e);if(e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter;let n=(t==null?void 0:t.getAttribute("formmethod"))||o;m(t||e.currentTarget,{method:n,replace:r,relative:h,preventScrollReset:p})};return React.createElement("form",a({ref:t,method:v,action:y,onSubmit:n?u:b},g))});if(false){}function N(e){let{getKey:t,storageKey:n}=e;J({getKey:t,storageKey:n});return null}if(false){}var Z;(function(e){e["UseScrollRestoration"]="useScrollRestoration";e["UseSubmitImpl"]="useSubmitImpl";e["UseFetcher"]="useFetcher"})(Z||(Z={}));var L;(function(e){e["UseFetchers"]="useFetchers";e["UseScrollRestoration"]="useScrollRestoration"})(L||(L={}));function B(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function F(e){let t=React.useContext(UNSAFE_DataRouterContext);!t?false?0:UNSAFE_invariant(false):void 0;return t}function W(e){let t=React.useContext(UNSAFE_DataRouterStateContext);!t?false?0:UNSAFE_invariant(false):void 0;return t}function U(e,t){let{target:n,replace:a,state:l,preventScrollReset:s,relative:u}=t===void 0?{}:t;let c=(0,o.s0)();let f=(0,o.TH)();let h=(0,o.WU)(e,{relative:u});return r.useCallback(t=>{if(m(t,n)){t.preventDefault();let n=a!==undefined?a:(0,i.Ep)(f)===(0,i.Ep)(h);c(e,{replace:n,state:l,preventScrollReset:s,relative:u})}},[f,c,h,a,l,n,e,s,u])}function z(e){false?0:void 0;let t=React.useRef(v(e));let n=React.useRef(false);let r=useLocation();let o=React.useMemo(()=>y(r.search,n.current?null:t.current),[r.search]);let i=useNavigate();let a=React.useCallback((e,t)=>{const r=v(typeof e==="function"?e(o):e);n.current=true;i("?"+r,t)},[i,o]);return[o,a]}function H(){return K()}function K(e,t){let{router:n}=F(Z.UseSubmitImpl);let{basename:r}=React.useContext(UNSAFE_NavigationContext);let o=UNSAFE_useRouteId();return React.useCallback(function(i,l){if(l===void 0){l={}}if(typeof document==="undefined"){throw new Error("You are calling submit during the server render. "+"Try calling submit within a `useEffect` or callback instead.")}let{action:s,method:u,encType:c,formData:f}=b(i,l,r);let h={preventScrollReset:l.preventScrollReset,formData:f,formMethod:u,formEncType:c};if(e){!(t!=null)?false?0:UNSAFE_invariant(false):void 0;n.fetch(e,t,s,h)}else{n.navigate(s,a({},h,{replace:l.replace,fromRouteId:o}))}},[n,r,e,t,o])}function $(e,t){let{relative:n}=t===void 0?{}:t;let{basename:r}=React.useContext(UNSAFE_NavigationContext);let o=React.useContext(UNSAFE_RouteContext);!o?false?0:UNSAFE_invariant(false):void 0;let[i]=o.matches.slice(-1);let l=a({},useResolvedPath(e?e:".",{relative:n}));let s=useLocation();if(e==null){l.search=s.search;l.hash=s.hash;if(i.route.index){let e=new URLSearchParams(l.search);e.delete("index");l.search=e.toString()?"?"+e.toString():""}}if((!e||e===".")&&i.route.index){l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"}if(r!=="/"){l.pathname=l.pathname==="/"?r:joinPaths([r,l.pathname])}return createPath(l)}function V(e,t){let n=React.forwardRef((n,r)=>{return React.createElement(A,a({},n,{ref:r,fetcherKey:e,routeId:t}))});if(false){}return n}let q=0;function Y(){var e;let{router:t}=F(Z.UseFetcher);let n=React.useContext(UNSAFE_RouteContext);!n?false?0:UNSAFE_invariant(false):void 0;let r=(e=n.matches[n.matches.length-1])==null?void 0:e.route.id;!(r!=null)?false?0:UNSAFE_invariant(false):void 0;let[o]=React.useState(()=>String(++q));let[i]=React.useState(()=>{!r?false?0:UNSAFE_invariant(false):void 0;return V(o,r)});let[l]=React.useState(()=>e=>{!t?false?0:UNSAFE_invariant(false):void 0;!r?false?0:UNSAFE_invariant(false):void 0;t.fetch(o,r,e)});let s=K(o,r);let u=t.getFetcher(o);let c=React.useMemo(()=>a({Form:i,submit:s,load:l},u),[u,i,s,l]);React.useEffect(()=>{return()=>{if(!t){console.warn("No router available to clean up from useFetcher()");return}t.deleteFetcher(o)}},[t,o]);return c}function G(){let e=W(L.UseFetchers);return[...e.fetchers.values()]}const Q="react-router-scroll-positions";let X={};function J(e){let{getKey:t,storageKey:n}=e===void 0?{}:e;let{router:r}=F(Z.UseScrollRestoration);let{restoreScrollPosition:o,preventScrollReset:i}=W(L.UseScrollRestoration);let a=useLocation();let l=useMatches();let s=useNavigation();React.useEffect(()=>{window.history.scrollRestoration="manual";return()=>{window.history.scrollRestoration="auto"}},[]);et(React.useCallback(()=>{if(s.state==="idle"){let e=(t?t(a,l):null)||a.key;X[e]=window.scrollY}sessionStorage.setItem(n||Q,JSON.stringify(X));window.history.scrollRestoration="auto"},[n,t,s.state,a,l]));if(typeof document!=="undefined"){React.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(n||Q);if(e){X=JSON.parse(e)}}catch(e){}},[n]);React.useLayoutEffect(()=>{let e=r==null?void 0:r.enableScrollRestoration(X,()=>window.scrollY,t);return()=>e&&e()},[r,t]);React.useLayoutEffect(()=>{if(o===false){return}if(typeof o==="number"){window.scrollTo(0,o);return}if(a.hash){let e=document.getElementById(a.hash.slice(1));if(e){e.scrollIntoView();return}}if(i===true){return}window.scrollTo(0,0)},[a,o,i])}}function ee(e,t){let{capture:n}=t||{};React.useEffect(()=>{let t=n!=null?{capture:n}:undefined;window.addEventListener("beforeunload",e,t);return()=>{window.removeEventListener("beforeunload",e,t)}},[e,n])}function et(e,t){let{capture:n}=t||{};React.useEffect(()=>{let t=n!=null?{capture:n}:undefined;window.addEventListener("pagehide",e,t);return()=>{window.removeEventListener("pagehide",e,t)}},[e,n])}function en(e){let{when:t,message:n}=e;let r=unstable_useBlocker(t);React.useEffect(()=>{if(r.state==="blocked"&&!t){r.reset()}},[r,t]);React.useEffect(()=>{if(r.state==="blocked"){let e=window.confirm(n);if(e){setTimeout(r.proceed,0)}else{r.reset()}}},[r,n])}},59379:function(e,t,n){"use strict";n.d(t,{AW:function(){return es},F0:function(){return eu},FR:function(){return l},Fg:function(){return ea},TH:function(){return m},UO:function(){return C},Us:function(){return u},WU:function(){return j},Z5:function(){return ec},bS:function(){return y},oQ:function(){return p},s0:function(){return w}});var r=n(66204);var o=n(45058);/**
|
|
64
|
+
* React Router v6.11.2
|
|
65
|
+
*
|
|
66
|
+
* Copyright (c) Remix Software Inc.
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the MIT license found in the
|
|
69
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
70
|
+
*
|
|
71
|
+
* @license MIT
|
|
72
|
+
*/function i(){i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};return i.apply(this,arguments)}const a=r.createContext(null);if(false){}const l=r.createContext(null);if(false){}const s=r.createContext(null);if(false){}const u=r.createContext(null);if(false){}const c=r.createContext(null);if(false){}const f=r.createContext({outlet:null,matches:[],isDataRoute:false});if(false){}const h=r.createContext(null);if(false){}function p(e,t){let{relative:n}=t===void 0?{}:t;!g()?false?0:(0,o.J0)(false):void 0;let{basename:i,navigator:a}=r.useContext(u);let{hash:l,pathname:s,search:c}=j(e,{relative:n});let f=s;if(i!=="/"){f=s==="/"?i:(0,o.RQ)([i,s])}return a.createHref({pathname:f,search:c,hash:l})}function g(){return r.useContext(c)!=null}function m(){!g()?false?0:(0,o.J0)(false):void 0;return r.useContext(c).location}function v(){return React.useContext(c).navigationType}function y(e){!g()?false?0:(0,o.J0)(false):void 0;let{pathname:t}=m();return r.useMemo(()=>(0,o.LX)(e,t),[t,e])}const b=null&&"You should call navigate() in a React.useEffect(), not when "+"your component is first rendered.";function x(e){let t=r.useContext(u).static;if(!t){r.useLayoutEffect(e)}}function w(){let{isDataRoute:e}=r.useContext(f);return e?ee():S()}function S(){!g()?false?0:(0,o.J0)(false):void 0;let e=r.useContext(a);let{basename:t,navigator:n}=r.useContext(u);let{matches:i}=r.useContext(f);let{pathname:l}=m();let s=JSON.stringify((0,o.Zq)(i).map(e=>e.pathnameBase));let c=r.useRef(false);x(()=>{c.current=true});let h=r.useCallback(function(r,i){if(i===void 0){i={}}false?0:void 0;if(!c.current)return;if(typeof r==="number"){n.go(r);return}let a=(0,o.pC)(r,JSON.parse(s),l,i.relative==="path");if(e==null&&t!=="/"){a.pathname=a.pathname==="/"?t:(0,o.RQ)([t,a.pathname])}(!!i.replace?n.replace:n.push)(a,i.state,i)},[t,n,s,l,e]);return h}const k=null&&React.createContext(null);function T(){return React.useContext(k)}function E(e){let t=React.useContext(f).outlet;if(t){return React.createElement(k.Provider,{value:e},t)}return t}function C(){let{matches:e}=r.useContext(f);let t=e[e.length-1];return t?t.params:{}}function j(e,t){let{relative:n}=t===void 0?{}:t;let{matches:i}=r.useContext(f);let{pathname:a}=m();let l=JSON.stringify((0,o.Zq)(i).map(e=>e.pathnameBase));return r.useMemo(()=>(0,o.pC)(e,JSON.parse(l),a,n==="path"),[e,l,a,n])}function I(e,t){return D(e,t)}function D(e,t,n){!g()?false?0:(0,o.J0)(false):void 0;let{navigator:a}=r.useContext(u);let{matches:l}=r.useContext(f);let s=l[l.length-1];let h=s?s.params:{};let p=s?s.pathname:"/";let v=s?s.pathnameBase:"/";let y=s&&s.route;if(false){}let b=m();let x;if(t){var w;let e=typeof t==="string"?(0,o.cP)(t):t;!(v==="/"||((w=e.pathname)==null?void 0:w.startsWith(v)))?false?0:(0,o.J0)(false):void 0;x=e}else{x=b}let S=x.pathname||"/";let k=v==="/"?S:S.slice(v.length)||"/";let T=(0,o.fp)(e,{pathname:k});if(false){}let E=R(T&&T.map(e=>Object.assign({},e,{params:Object.assign({},h,e.params),pathname:(0,o.RQ)([v,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase==="/"?v:(0,o.RQ)([v,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),l,n);if(t&&E){return r.createElement(c.Provider,{value:{location:i({pathname:"/",search:"",hash:"",state:null,key:"default"},x),navigationType:o.aU.Pop}},E)}return E}function P(){let e=Y();let t=(0,o.WK)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e);let n=e instanceof Error?e.stack:null;let i="rgba(200,200,200, 0.5)";let a={padding:"0.5rem",backgroundColor:i};let l={padding:"2px 4px",backgroundColor:i};let s=null;if(false){}return r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:a},n):null,s)}const O=r.createElement(P,null);class M extends r.Component{constructor(e){super(e);this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){if(t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"){return{error:e.error,location:e.location,revalidation:e.revalidation}}return{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?r.createElement(f.Provider,{value:this.props.routeContext},r.createElement(h.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _(e){let{routeContext:t,match:n,children:o}=e;let i=r.useContext(a);if(i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)){i.staticContext._deepestRenderedBoundaryId=n.route.id}return r.createElement(f.Provider,{value:t},o)}function R(e,t,n){var i;if(t===void 0){t=[]}if(n===void 0){n=null}if(e==null){var a;if((a=n)!=null&&a.errors){e=n.matches}else{return null}}let l=e;let s=(i=n)==null?void 0:i.errors;if(s!=null){let e=l.findIndex(e=>e.route.id&&(s==null?void 0:s[e.route.id]));!(e>=0)?false?0:(0,o.J0)(false):void 0;l=l.slice(0,Math.min(l.length,e+1))}return l.reduceRight((e,o,i)=>{let a=o.route.id?s==null?void 0:s[o.route.id]:null;let u=null;if(n){u=o.route.errorElement||O}let c=t.concat(l.slice(0,i+1));let f=()=>{let t;if(a){t=u}else if(o.route.Component){t=r.createElement(o.route.Component,null)}else if(o.route.element){t=o.route.element}else{t=e}return r.createElement(_,{match:o,routeContext:{outlet:e,matches:c,isDataRoute:n!=null},children:t})};return n&&(o.route.ErrorBoundary||o.route.errorElement||i===0)?r.createElement(M,{location:n.location,revalidation:n.revalidation,component:u,error:a,children:f(),routeContext:{outlet:null,matches:c,isDataRoute:true}}):f()},null)}var A;(function(e){e["UseBlocker"]="useBlocker";e["UseRevalidator"]="useRevalidator";e["UseNavigateStable"]="useNavigate"})(A||(A={}));var N;(function(e){e["UseBlocker"]="useBlocker";e["UseLoaderData"]="useLoaderData";e["UseActionData"]="useActionData";e["UseRouteError"]="useRouteError";e["UseNavigation"]="useNavigation";e["UseRouteLoaderData"]="useRouteLoaderData";e["UseMatches"]="useMatches";e["UseRevalidator"]="useRevalidator";e["UseNavigateStable"]="useNavigate";e["UseRouteId"]="useRouteId"})(N||(N={}));function Z(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function L(e){let t=r.useContext(a);!t?false?0:(0,o.J0)(false):void 0;return t}function B(e){let t=r.useContext(l);!t?false?0:(0,o.J0)(false):void 0;return t}function F(e){let t=r.useContext(f);!t?false?0:(0,o.J0)(false):void 0;return t}function W(e){let t=F(e);let n=t.matches[t.matches.length-1];!n.route.id?false?0:(0,o.J0)(false):void 0;return n.route.id}function U(){return W(N.UseRouteId)}function z(){let e=B(N.UseNavigation);return e.navigation}function H(){let e=L(A.UseRevalidator);let t=B(N.UseRevalidator);return{revalidate:e.router.revalidate,state:t.revalidation}}function K(){let{matches:e,loaderData:t}=B(N.UseMatches);return React.useMemo(()=>e.map(e=>{let{pathname:n,params:r}=e;return{id:e.route.id,pathname:n,params:r,data:t[e.route.id],handle:e.route.handle}}),[e,t])}function $(){let e=B(N.UseLoaderData);let t=W(N.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return undefined}return e.loaderData[t]}function V(e){let t=B(N.UseRouteLoaderData);return t.loaderData[e]}function q(){let e=B(N.UseActionData);let t=React.useContext(f);!t?false?0:UNSAFE_invariant(false):void 0;return Object.values((e==null?void 0:e.actionData)||{})[0]}function Y(){var e;let t=r.useContext(h);let n=B(N.UseRouteError);let o=W(N.UseRouteError);if(t){return t}return(e=n.errors)==null?void 0:e[o]}function G(){let e=React.useContext(s);return e==null?void 0:e._data}function Q(){let e=React.useContext(s);return e==null?void 0:e._error}let X=0;function J(e){let{router:t}=L(A.UseBlocker);let n=B(N.UseBlocker);let[r]=React.useState(()=>String(++X));let o=React.useCallback(t=>{return typeof e==="function"?!!e(t):!!e},[e]);let i=t.getBlocker(r,o);React.useEffect(()=>()=>t.deleteBlocker(r),[t,r]);return n.blockers.get(r)||i}function ee(){let{router:e}=L(A.UseNavigateStable);let t=W(N.UseNavigateStable);let n=r.useRef(false);x(()=>{n.current=true});let o=r.useCallback(function(r,o){if(o===void 0){o={}}false?0:void 0;if(!n.current)return;if(typeof r==="number"){e.navigate(r)}else{e.navigate(r,i({fromRouteId:t},o))}},[e,t]);return o}const et={};function en(e,t,n){if(!t&&!et[e]){et[e]=true;false?0:void 0}}function er(e){let{fallbackElement:t,router:n}=e;let[r,o]=React.useState(n.state);React.useLayoutEffect(()=>n.subscribe(o),[n,o]);let i=React.useMemo(()=>{return{createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:r==null?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:true,state:t,preventScrollReset:r==null?void 0:r.preventScrollReset})}},[n]);let s=n.basename||"/";let u=React.useMemo(()=>({router:n,navigator:i,static:false,basename:s}),[n,i,s]);return React.createElement(React.Fragment,null,React.createElement(a.Provider,{value:u},React.createElement(l.Provider,{value:r},React.createElement(eu,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:i},n.state.initialized?React.createElement(eo,{routes:n.routes,state:r}):t))),null)}function eo(e){let{routes:t,state:n}=e;return D(t,undefined,n)}function ei(e){let{basename:t,children:n,initialEntries:r,initialIndex:o}=e;let i=React.useRef();if(i.current==null){i.current=createMemoryHistory({initialEntries:r,initialIndex:o,v5Compat:true})}let a=i.current;let[l,s]=React.useState({action:a.action,location:a.location});React.useLayoutEffect(()=>a.listen(s),[a]);return React.createElement(eu,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a})}function ea(e){let{to:t,replace:n,state:i,relative:a}=e;!g()?false?0:(0,o.J0)(false):void 0;false?0:void 0;let{matches:l}=r.useContext(f);let{pathname:s}=m();let u=w();let c=(0,o.pC)(t,(0,o.Zq)(l).map(e=>e.pathnameBase),s,a==="path");let h=JSON.stringify(c);r.useEffect(()=>u(JSON.parse(h),{replace:n,state:i,relative:a}),[u,h,a,n,i]);return null}function el(e){return E(e.context)}function es(e){false?0:(0,o.J0)(false)}function eu(e){let{basename:t="/",children:n=null,location:i,navigationType:a=o.aU.Pop,navigator:l,static:s=false}=e;!!g()?false?0:(0,o.J0)(false):void 0;let f=t.replace(/^\/*/,"/");let h=r.useMemo(()=>({basename:f,navigator:l,static:s}),[f,l,s]);if(typeof i==="string"){i=(0,o.cP)(i)}let{pathname:p="/",search:m="",hash:v="",state:y=null,key:b="default"}=i;let x=r.useMemo(()=>{let e=(0,o.Zn)(p,f);if(e==null){return null}return{location:{pathname:e,search:m,hash:v,state:y,key:b},navigationType:a}},[f,p,m,v,y,b,a]);false?0:void 0;if(x==null){return null}return r.createElement(u.Provider,{value:h},r.createElement(c.Provider,{children:n,value:x}))}function ec(e){let{children:t,location:n}=e;return I(em(t),n)}function ed(e){let{children:t,errorElement:n,resolve:r}=e;return React.createElement(ep,{resolve:r,errorElement:n},React.createElement(eg,null,t))}var ef;(function(e){e[e["pending"]=0]="pending";e[e["success"]=1]="success";e[e["error"]=2]="error"})(ef||(ef={}));const eh=new Promise(()=>{});class ep extends r.Component{constructor(e){super(e);this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props;let i=null;let a=ef.pending;if(!(n instanceof Promise)){a=ef.success;i=Promise.resolve();Object.defineProperty(i,"_tracked",{get:()=>true});Object.defineProperty(i,"_data",{get:()=>n})}else if(this.state.error){a=ef.error;let e=this.state.error;i=Promise.reject().catch(()=>{});Object.defineProperty(i,"_tracked",{get:()=>true});Object.defineProperty(i,"_error",{get:()=>e})}else if(n._tracked){i=n;a=i._error!==undefined?ef.error:i._data!==undefined?ef.success:ef.pending}else{a=ef.pending;Object.defineProperty(n,"_tracked",{get:()=>true});i=n.then(e=>Object.defineProperty(n,"_data",{get:()=>e}),e=>Object.defineProperty(n,"_error",{get:()=>e}))}if(a===ef.error&&i._error instanceof o.X3){throw eh}if(a===ef.error&&!t){throw i._error}if(a===ef.error){return r.createElement(s.Provider,{value:i,children:t})}if(a===ef.success){return r.createElement(s.Provider,{value:i,children:e})}throw i}}function eg(e){let{children:t}=e;let n=G();let r=typeof t==="function"?t(n):t;return React.createElement(React.Fragment,null,r)}function em(e,t){if(t===void 0){t=[]}let n=[];r.Children.forEach(e,(e,i)=>{if(!r.isValidElement(e)){return}let a=[...t,i];if(e.type===r.Fragment){n.push.apply(n,em(e.props.children,a));return}!(e.type===es)?false?0:(0,o.J0)(false):void 0;!(!e.props.index||!e.props.children)?false?0:(0,o.J0)(false):void 0;let l={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};if(e.props.children){l.children=em(e.props.children,a)}n.push(l)});return n}function ev(e){return R(e)}function ey(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};if(e.Component){if(false){}Object.assign(t,{element:React.createElement(e.Component),Component:undefined})}if(e.ErrorBoundary){if(false){}Object.assign(t,{errorElement:React.createElement(e.ErrorBoundary),ErrorBoundary:undefined})}return t}function eb(e,t){return createRouter({basename:t==null?void 0:t.basename,future:i({},t==null?void 0:t.future,{v7_prependBasename:true}),history:createMemoryHistory({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,mapRouteProperties:ey}).initialize()}},13015:function(e,t,n){"use strict";n.d(t,{q:function(){return rE},q_:function(){return nY},Yz:function(){return n0}});var r=w(),o=e=>m(e,r),i=w();o.write=e=>m(e,i);var a=w();o.onStart=e=>m(e,a);var l=w();o.onFrame=e=>m(e,l);var s=w();o.onFinish=e=>m(e,s);var u=[];o.setTimeout=(e,t)=>{let n=o.now()+t,r=()=>{let e=u.findIndex(e=>e.cancel==r);~e&&u.splice(e,1),p-=~e?1:0},i={time:n,handler:e,cancel:r};return u.splice(c(n),0,i),p+=1,v(),i};var c=e=>~(~u.findIndex(t=>t.time>e)||~u.length);o.cancel=e=>{a.delete(e),l.delete(e),s.delete(e),r.delete(e),i.delete(e)};o.sync=e=>{g=!0,o.batchedUpdates(e),g=!1};o.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,o.onStart(n)}return r.handler=e,r.cancel=()=>{a.delete(n),t=null},r};var f=typeof window<"u"?window.requestAnimationFrame:()=>{};o.use=e=>f=e;o.now=typeof performance<"u"?()=>performance.now():Date.now;o.batchedUpdates=e=>e();o.catch=console.error;o.frameLoop="always";o.advance=()=>{o.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):x()};var h=-1,p=0,g=!1;function m(e,t){g?(t.delete(e),e(0)):(t.add(e),v())}function v(){h<0&&(h=0,o.frameLoop!=="demand"&&f(b))}function y(){h=-1}function b(){~h&&(f(b),o.batchedUpdates(x))}function x(){let e=h;h=o.now();let t=c(h);if(t&&(S(u.splice(0,t),e=>e.handler()),p-=t),!p){y();return}a.flush(),r.flush(e?Math.min(64,h-e):16.667),l.flush(),i.flush(),s.flush()}function w(){let e=new Set,t=e;return{add(n){p+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return p-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,p-=t.size,S(t,t=>t(n)&&e.add(t)),p+=e.size,t=e)}}}function S(e,t){e.forEach(e=>{try{t(e)}catch(e){o.catch(e)}})}var k={count(){return p},isRunning(){return h>=0},clear(){h=-1,u=[],a=w(),r=w(),l=w(),i=w(),s=w(),p=0}};var T=n(66204);var E=Object.defineProperty;var C=(e,t)=>{for(var n in t)E(e,n,{get:t[n],enumerable:!0})};var j={};C(j,{assign:()=>z,colors:()=>F,createStringInterpolator:()=>L,skipAnimation:()=>W,to:()=>B,willAdvance:()=>U});function I(){}var D=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),P={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function O(e,t){if(P.arr(e)){if(!P.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var M=(e,t)=>e.forEach(t);function _(e,t,n){if(P.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var R=e=>P.und(e)?[]:P.arr(e)?e:[e];function A(e,t){if(e.size){let n=Array.from(e);e.clear(),M(n,t)}}var N=(e,...t)=>A(e,e=>e(...t)),Z=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);var L,B,F=null,W=!1,U=I,z=e=>{e.to&&(B=e.to),e.now&&(o.now=e.now),e.colors!==void 0&&(F=e.colors),e.skipAnimation!=null&&(W=e.skipAnimation),e.createStringInterpolator&&(L=e.createStringInterpolator),e.requestAnimationFrame&&o.use(e.requestAnimationFrame),e.batchedUpdates&&(o.batchedUpdates=e.batchedUpdates),e.willAdvance&&(U=e.willAdvance),e.frameLoop&&(o.frameLoop=e.frameLoop)};var H=new Set,K=[],$=[],V=0,q={get idle(){return!H.size&&!K.length},start(e){V>e.priority?(H.add(e),o.onStart(Y)):(G(e),o(X))},advance:X,sort(e){if(V)o.onFrame(()=>q.sort(e));else{let t=K.indexOf(e);~t&&(K.splice(t,1),Q(e))}},clear(){K=[],H.clear()}};function Y(){H.forEach(G),H.clear(),o(X)}function G(e){K.includes(e)||Q(e)}function Q(e){K.splice(J(K,t=>t.priority>e.priority),0,e)}function X(e){let t=$;for(let n=0;n<K.length;n++){let r=K[n];V=r.priority,r.idle||(U(r),r.advance(e),r.idle||t.push(r))}return V=0,$=K,$.length=0,K=t,K.length>0}function J(e,t){let n=e.findIndex(t);return n<0?e.length:n}var ee=(e,t,n)=>Math.min(Math.max(n,e),t);var et={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};var en="[-+]?\\d*\\.?\\d+",er=en+"%";function eo(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var ei=new RegExp("rgb"+eo(en,en,en)),ea=new RegExp("rgba"+eo(en,en,en,en)),el=new RegExp("hsl"+eo(en,er,er)),es=new RegExp("hsla"+eo(en,er,er,en)),eu=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ec=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ed=/^#([0-9a-fA-F]{6})$/,ef=/^#([0-9a-fA-F]{8})$/;function eh(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ed.exec(e))?parseInt(t[1]+"ff",16)>>>0:F&&F[e]!==void 0?F[e]:(t=ei.exec(e))?(em(t[1])<<24|em(t[2])<<16|em(t[3])<<8|255)>>>0:(t=ea.exec(e))?(em(t[1])<<24|em(t[2])<<16|em(t[3])<<8|ey(t[4]))>>>0:(t=eu.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ef.exec(e))?parseInt(t[1],16)>>>0:(t=ec.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=el.exec(e))?(eg(ev(t[1]),eb(t[2]),eb(t[3]))|255)>>>0:(t=es.exec(e))?(eg(ev(t[1]),eb(t[2]),eb(t[3]))|ey(t[4]))>>>0:null}function ep(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eg(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=ep(o,r,e+1/3),a=ep(o,r,e),l=ep(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function em(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function ev(e){return(parseFloat(e)%360+360)%360/360}function ey(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function eb(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function ex(e){let t=eh(e);if(t===null)return e;t=t||0;let n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var ew=(e,t,n)=>{if(P.fun(e))return e;if(P.arr(e))return ew({range:e,output:t,extrapolate:n});if(P.str(e.output[0]))return L(e);let r=e,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",s=r.easing||(e=>e);return e=>{let t=ek(e,i);return eS(e,i[t],i[t+1],o[t],o[t+1],s,a,l,r.map)}};function eS(e,t,n,r,o,i,a,l,s){let u=s?s(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(l==="identity")return u;l==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function ek(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var eT=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);let r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return ee(0,1,o/e)},eE=1.70158,eC=eE*1.525,ej=eE+1,eI=2*Math.PI/3,eD=2*Math.PI/4.5,eP=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,eO={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ej*e*e*e-eE*e*e,easeOutBack:e=>1+ej*Math.pow(e-1,3)+eE*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((eC+1)*2*e-eC)/2:(Math.pow(2*e-2,2)*((eC+1)*(e*2-2)+eC)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*eI),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*eI)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*eD))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*eD)/2+1,easeInBounce:e=>1-eP(1-e),easeOutBounce:eP,easeInOutBounce:e=>e<.5?(1-eP(1-2*e))/2:(1+eP(2*e-1))/2,steps:eT};var eM=Symbol.for("FluidValue.get"),e_=Symbol.for("FluidValue.observers");var eR=e=>!!(e&&e[eM]),eA=e=>e&&e[eM]?e[eM]():e,eN=e=>e[e_]||null;function eZ(e,t){e.eventObserved?e.eventObserved(t):e(t)}function eL(e,t){let n=e[e_];n&&n.forEach(e=>{eZ(e,t)})}var eB=class{[eM];[e_];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");eF(this,e)}},eF=(e,t)=>ez(e,eM,t);function eW(e,t){if(e[eM]){let n=e[e_];n||ez(e,e_,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function eU(e,t){let n=e[e_];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[e_]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var ez=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0});var eH=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,eK=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,e$=new RegExp(`(${eH.source})(%|[a-z]+)`,"i"),eV=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,eq=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;var eY=e=>{let[t,n]=eG(e);if(!t||Z())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){let t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}else{if(n&&eq.test(n))return eY(n);if(n)return n}return e},eG=e=>{let t=eq.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]};var eQ,eX=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,eJ=e=>{eQ||(eQ=F?new RegExp(`(${Object.keys(F).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map(e=>eA(e).replace(eq,eY).replace(eK,ex).replace(eQ,ex)),n=t.map(e=>e.match(eH).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})).map(t=>ew({...e,output:t}));return e=>{let n=!e$.test(t[0])&&t.find(e=>e$.test(e))?.replace(eH,""),o=0;return t[0].replace(eH,()=>`${r[o++](e)}${n||""}`).replace(eV,eX)}};var e0="react-spring: ",e1=e=>{let t=e,n=!1;if(typeof t!="function")throw new TypeError(`${e0}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},e2=e1(console.warn);function e4(){e2(`${e0}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var e5=e1(console.warn);function e3(){e5(`${e0}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function e7(e){return P.str(e)&&(e[0]=="#"||/\d/.test(e)||!Z()&&eq.test(e)||e in(F||{}))}var e6,e8=new WeakMap,e9=e=>e.forEach(({target:e,contentRect:t})=>e8.get(e)?.forEach(e=>e(t)));function te(e,t){e6||typeof ResizeObserver<"u"&&(e6=new ResizeObserver(e9));let n=e8.get(t);return n||(n=new Set,e8.set(t,n)),n.add(e),e6&&e6.observe(t),()=>{let n=e8.get(t);n&&(n.delete(e),!n.size&&e6&&e6.unobserve(t))}}var tt=new Set,tn,tr=()=>{let e=()=>{tt.forEach(e=>e({width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},to=e=>(tt.add(e),tn||(tn=tr()),()=>{tt.delete(e),!tt.size&&tn&&(tn(),tn=void 0)});var ti=(e,{container:t=document.documentElement}={})=>t===document.documentElement?to(e):te(e,t);var ta=(e,t,n)=>t-e===0?1:(n-e)/(t-e);var tl={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},ts=class{callback;container;info;constructor(e,t){this.callback=e,this.container=t,this.info={time:0,x:this.createAxis(),y:this.createAxis()}}createAxis=()=>({current:0,progress:0,scrollLength:0});updateAxis=e=>{let t=this.info[e],{length:n,position:r}=tl[e];t.current=this.container[`scroll${r}`],t.scrollLength=this.container["scroll"+n]-this.container["client"+n],t.progress=ta(0,t.scrollLength,t.current)};update=()=>{this.updateAxis("x"),this.updateAxis("y")};sendEvent=()=>{this.callback(this.info)};advance=()=>{this.update(),this.sendEvent()}};var tu=new WeakMap,tc=new WeakMap,td=new WeakMap,tf=e=>e===document.documentElement?window:e,th=(e,{container:t=document.documentElement}={})=>{let n=td.get(t);n||(n=new Set,td.set(t,n));let r=new ts(e,t);if(n.add(r),!tu.has(t)){let e=()=>(n?.forEach(e=>e.advance()),!0);tu.set(t,e);let r=tf(t);window.addEventListener("resize",e,{passive:!0}),t!==document.documentElement&&tc.set(t,ti(e,{container:t})),r.addEventListener("scroll",e,{passive:!0})}let o=tu.get(t);return Re(o),()=>{Re.cancel(o);let e=td.get(t);if(!e||(e.delete(r),e.size))return;let n=tu.get(t);tu.delete(t),n&&(tf(t).removeEventListener("scroll",n),window.removeEventListener("resize",n),tc.get(t)?.())}};function tp(e){let t=Je(null);return t.current===null&&(t.current=e()),t.current}var tg=Z()?T.useEffect:T.useLayoutEffect;var tm=()=>{let e=(0,T.useRef)(!1);return tg(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tv(){let e=(0,T.useState)()[1],t=tm();return()=>{t.current&&e(Math.random())}}function ty(e,t){let[n]=(0,T.useState)(()=>({inputs:t,result:e()})),r=(0,T.useRef)(),o=r.current,i=o;return i?t&&i.inputs&&tb(t,i.inputs)||(i={inputs:t,result:e()}):i=n,(0,T.useEffect)(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function tb(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var tx=e=>(0,T.useEffect)(e,tw),tw=[];function tS(e){let t=(0,T.useRef)();return(0,T.useEffect)(()=>{t.current=e}),t.current}var tk=()=>{let[e,t]=dt(null);return tg(()=>{let e=window.matchMedia("(prefers-reduced-motion)"),n=e=>{t(e.matches),z({skipAnimation:e.matches})};return n(e),e.addEventListener("change",n),()=>{e.removeEventListener("change",n)}},[]),e};var tT=Symbol.for("Animated:node"),tE=e=>!!e&&e[tT]===e,tC=e=>e&&e[tT],tj=(e,t)=>D(e,tT,t),tI=e=>e&&e[tT]&&e[tT].getPayload(),tD=class{payload;constructor(){tj(this,this)}getPayload(){return this.payload||[]}};var tP=class extends tD{constructor(e){super();this._value=e;P.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new tP(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return P.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,P.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}};var tO=class extends tP{_string=null;_toString;constructor(e){super(0),this._toString=ew({output:[e,e]})}static create(e){return new tO(e)}getValue(){let e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(P.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=ew({output:[this.getValue(),e]})),this._value=0,super.reset()}};var tM={dependencies:null};var t_=class extends tD{constructor(e){super();this.source=e;this.setValue(e)}getValue(e){let t={};return _(this.source,(n,r)=>{tE(n)?t[r]=n.getValue(e):eR(n)?t[r]=eA(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&M(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return _(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){tM.dependencies&&eR(e)&&tM.dependencies.add(e);let t=tI(e);t&&M(t,e=>this.add(e))}};var tR=class extends t_{constructor(e){super(e)}static create(e){return new tR(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(tA)),!0)}};function tA(e){return(e7(e)?tO:tP).create(e)}function tN(e){let t=tC(e);return t?t.constructor:P.arr(e)?tR:e7(e)?tO:tP}var tZ=(e,t)=>{let n=!P.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,T.forwardRef)((r,i)=>{let a=(0,T.useRef)(null),l=n&&(0,T.useCallback)(e=>{a.current=tF(i,e)},[i]),[s,u]=tB(r,t),c=tv(),f=()=>{let e=a.current;if(n&&!e)return;(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&c()},h=new tL(f,u),p=(0,T.useRef)();tg(()=>(p.current=h,M(u,e=>eW(e,h)),()=>{p.current&&(M(p.current.deps,e=>eU(e,p.current)),o.cancel(p.current.update))})),(0,T.useEffect)(f,[]),tx(()=>()=>{let e=p.current;M(e.deps,t=>eU(t,e))});let g=t.getComponentProps(s.getValue());return T.createElement(e,{...g,ref:l})})},tL=class{constructor(e,t){this.update=e;this.deps=t}eventObserved(e){e.type=="change"&&o.write(this.update)}};function tB(e,t){let n=new Set;return tM.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new t_(e),tM.dependencies=null,[e,n]}function tF(e,t){return e&&(P.fun(e)?e(t):e.current=t),t}var tW=Symbol.for("AnimatedComponent"),tU=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new t_(e),getComponentProps:r=e=>e}={})=>{let o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=e=>{let t=tz(e)||"Anonymous";return P.str(e)?e=i[e]||(i[e]=tZ(e,o)):e=e[tW]||(e[tW]=tZ(e,o)),e.displayName=`Animated(${t})`,e};return _(e,(t,n)=>{P.arr(e)&&(n=tz(t)),i[n]=i(t)}),{animated:i}},tz=e=>P.str(e)?e:e&&P.str(e.displayName)?e.displayName:P.fun(e)&&e.name||null;function tH(e,...t){return P.fun(e)?e(...t):e}var tK=(e,t)=>e===!0||!!(t&&e&&(P.fun(e)?e(t):R(e).includes(t))),t$=(e,t)=>P.obj(e)?t&&e[t]:e;var tV=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,tq=e=>e,tY=(e,t=tq)=>{let n=tG;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let o of n){let n=t(e[o],o);P.und(n)||(r[o]=n)}return r},tG=["config","onProps","onStart","onChange","onPause","onResume","onRest"],tQ={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function tX(e){let t={},n=0;if(_(e,(e,r)=>{tQ[r]||(t[r]=e,n++)}),n)return t}function tJ(e){let t=tX(e);if(t){let n={to:t};return _(e,(e,r)=>r in t||(n[r]=e)),n}return{...e}}function t0(e){return e=eA(e),P.arr(e)?e.map(t0):e7(e)?j.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function t1(e){for(let t in e)return!0;return!1}function t2(e){return P.fun(e)||P.arr(e)&&P.obj(e[0])}function t4(e,t){e.ref?.delete(e),t?.delete(e)}function t5(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}function t3(e,t,n=1e3){an(()=>{if(t){let r=0;ge(e,(e,o)=>{let i=e.current;if(i.length){let a=n*t[o];isNaN(a)?a=r:r=a,ge(i,e=>{ge(e.queue,e=>{let t=e.delay;e.delay=e=>a+tH(t||0,e)})}),e.start()}})}else{let t=Promise.resolve();ge(e,e=>{let n=e.current;if(n.length){let r=n.map(e=>{let t=e.queue;return e.queue=[],t});t=t.then(()=>(ge(n,(e,t)=>ge(r[t]||[],t=>e.queue.push(t))),Promise.all(e.start())))}})}})}var t7={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};var t6={...t7.default,mass:1,damping:1,easing:eO.linear,clamp:!1},t8=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,t6)}};function t9(e,t,n){n&&(n={...n},ne(n,t),t={...n,...t}),ne(e,t),Object.assign(e,t);for(let t in t6)e[t]==null&&(e[t]=t6[t]);let{frequency:r,damping:o}=e,{mass:i}=e;return P.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function ne(e,t){if(!P.und(t.decay))e.duration=void 0;else{let n=!P.und(t.tension)||!P.und(t.friction);(n||!P.und(t.frequency)||!P.und(t.damping)||!P.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var nt=[],nn=class{changed=!1;values=nt;toValues=null;fromValues=nt;to;from;config=new t8;immediate=!1};function no(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((l,s)=>{let u,c,f=tK(n.cancel??r?.cancel,t);if(f)g();else{P.und(n.pause)||(i.paused=tK(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||tK(e,t)),u=tH(n.delay||0,t),e?(i.resumeQueue.add(p),a.pause()):(a.resume(),p())}function h(){i.resumeQueue.add(p),i.timeouts.delete(c),c.cancel(),u=c.time-o.now()}function p(){u>0&&!j.skipAnimation?(i.delayed=!0,c=o.setTimeout(g,u),i.pauseQueue.add(h),i.timeouts.add(c)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(h),i.timeouts.delete(c),e<=(i.cancelId||0)&&(f=!0);try{a.start({...n,callId:e,cancel:f},l)}catch(e){s(e)}}})}var ni=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?ns(e.get()):t.every(e=>e.noop)?na(e.get()):nl(e.get(),t.every(e=>e.finished)),na=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nl=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ns=e=>({value:e,cancelled:!0,finished:!1});function nu(e,t,n,r){let{callId:i,parentId:a,onRest:l}=t,{asyncTo:s,promise:u}=n;return!a&&e===s&&!t.reset?u:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let c=tY(t,(e,t)=>t==="onRest"?void 0:e),f,h,p=new Promise((e,t)=>(f=e,h=t)),g=e=>{let t=i<=(n.cancelId||0)&&ns(r)||i!==n.asyncId&&nl(r,!1);if(t)throw e.result=t,h(e),e},m=(e,t)=>{let o=new nd,a=new nf;return(async()=>{if(j.skipAnimation)throw nc(n),a.result=nl(r,!1),h(a),a;g(o);let l=P.obj(e)?{...e}:{...t,to:e};l.parentId=i,_(c,(e,t)=>{P.und(l[t])&&(l[t]=e)});let s=await r.start(l);return g(o),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),s})()},v;if(j.skipAnimation)return nc(n),nl(r,!1);try{let t;P.arr(e)?t=(async e=>{for(let t of e)await m(t)})(e):t=Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(f),p]),v=nl(r.get(),!0,!1)}catch(e){if(e instanceof nd)v=e.result;else if(e instanceof nf)v=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?u:void 0)}return P.fun(l)&&o.batchedUpdates(()=>{l(v,r,r.item)}),v})()}function nc(e,t){A(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var nd=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},nf=class extends Error{result;constructor(){super("SkipAnimationSignal")}};var nh=e=>e instanceof ng,np=1,ng=class extends eB{id=np++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=tC(this);return e&&e.getValue()}to(...e){return j.to(this,e)}interpolate(...e){return e4(),j.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){eL(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||q.sort(this),eL(this,{type:"priority",parent:this,priority:e})}};var nm=Symbol.for("SpringPhase"),nv=1,ny=2,nb=4,nx=e=>(e[nm]&nv)>0,nw=e=>(e[nm]&ny)>0,nS=e=>(e[nm]&nb)>0,nk=(e,t)=>t?e[nm]|=ny|nv:e[nm]&=~ny,nT=(e,t)=>t?e[nm]|=nb:e[nm]&=~nb;var nE=class extends ng{key;animation=new nn;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!P.und(e)||!P.und(t)){let n=P.obj(e)?{...e}:{...t,from:e};P.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(nw(this)||this._state.asyncTo)||nS(this)}get goal(){return eA(this.animation.to)}get velocity(){let e=tC(this);return e instanceof tP?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return nx(this)}get isAnimating(){return nw(this)}get isPaused(){return nS(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{toValues:o}=r,{config:i}=r,a=tI(r.to);!a&&eR(r.to)&&(o=R(eA(r.to))),r.values.forEach((l,s)=>{if(l.done)return;let u=l.constructor==tO?1:a?a[s].lastPosition:o[s],c=r.immediate,f=u;if(!c){if(f=l.lastPosition,i.tension<=0){l.done=!0;return}let t=l.elapsedTime+=e,n=r.fromValues[s],o=l.v0!=null?l.v0:l.v0=P.arr(i.velocity)?i.velocity[s]:i.velocity,a,h=i.precision||(n==u?.005:Math.min(1,Math.abs(u-n)*.001));if(P.und(i.duration))if(i.decay){let e=i.decay===!0?.998:i.decay,r=Math.exp(-(1-e)*t);f=n+o/(1-e)*(1-r),c=Math.abs(l.lastPosition-f)<=h,a=o*r}else{a=l.lastVelocity==null?o:l.lastVelocity;let t=i.restVelocity||h/10,r=i.clamp?0:i.bounce,s=!P.und(r),p=n==u?l.v0>0:n<u,g,m=!1,v=1,y=Math.ceil(e/v);for(let e=0;e<y&&(g=Math.abs(a)>t,!(!g&&(c=Math.abs(u-f)<=h,c)));++e){s&&(m=f==u||f>u==p,m&&(a=-a*r,f=u));let e=-i.tension*1e-6*(f-u),t=-i.friction*.001*a,n=(e+t)/i.mass;a=a+n*v,f=f+a*v}}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,t=l.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,l.durationProgress=r),f=n+i.easing(r)*(u-n),a=(f-l.lastPosition)/e,c=r==1}l.lastVelocity=a,Number.isNaN(f)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[s].done&&(c=!1),c?l.done=!0:t=!1,l.setValue(f,i.round)&&(n=!0)});let l=tC(this),s=l.getValue();if(t){let e=eA(r.to);(s!==e||n)&&!i.decay?(l.setValue(e),this._onChange(e)):n&&i.decay&&this._onChange(s),this._stop()}else n&&this._onChange(s)}set(e){return o.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(nw(this)){let{to:e,config:t}=this.animation;o.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return P.und(e)?(n=this.queue||[],this.queue=[]):n=[P.obj(e)?e:{...t,to:e}],Promise.all(n.map(e=>this._update(e))).then(e=>ni(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),nc(this._state,e&&this._lastCallId),o.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:r}=e;n=P.obj(n)?n[t]:n,(n==null||t2(n))&&(n=void 0),r=P.obj(r)?r[t]:r,r==null&&(r=void 0);let o={to:n,from:r};return nx(this)||(e.reverse&&([n,r]=[r,n]),r=eA(r),P.und(r)?tC(this)||this._set(n):this._set(r)),o}_update({...e},t){let{key:n,defaultProps:r}=this;e.default&&Object.assign(r,tY(e,(e,t)=>/^on/.test(t)?t$(e,n):e)),nM(this,e,"onProps"),n_(this,"onProps",e,this);let o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let i=this._state;return no(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{nS(this)||(nT(this,!0),N(i.pauseQueue),n_(this,"onPause",nl(this,nC(this,this.animation.to)),this))},resume:()=>{nS(this)&&(nT(this,!1),nw(this)&&this._resume(),N(i.resumeQueue),n_(this,"onResume",nl(this,nC(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(n=>{if(e.loop&&n.finished&&!(t&&n.noop)){let t=nj(e);if(t)return this._update(t,!0)}return n})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ns(this));let r=!P.und(e.to),i=!P.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(ns(this));let{key:a,defaultProps:l,animation:s}=this,{to:u,from:c}=s,{to:f=u,from:h=c}=e;i&&!r&&(!t.default||P.und(f))&&(f=h),t.reverse&&([f,h]=[h,f]);let p=!O(h,c);p&&(s.from=h),h=eA(h);let g=!O(f,u);g&&this._focus(f);let m=t2(t.to),{config:v}=s,{decay:y,velocity:b}=v;(r||i)&&(v.velocity=0),t.config&&!m&&t9(v,tH(t.config,a),t.config!==l.config?tH(l.config,a):void 0);let x=tC(this);if(!x||P.und(f))return n(nl(this,!0));let w=P.und(t.reset)?i&&!t.default:!P.und(h)&&tK(t.reset,a),S=w?h:this.get(),k=t0(f),T=P.num(k)||P.arr(k)||e7(k),E=!m&&(!T||tK(l.immediate||t.immediate,a));if(g){let e=tN(f);if(e!==x.constructor)if(E)x=this._set(k);else throw Error(`Cannot animate between ${x.constructor.name} and ${e.name}, as the "to" prop suggests`)}let C=x.constructor,j=eR(f),I=!1;if(!j){let e=w||!nx(this)&&p;(g||e)&&(I=O(t0(S),k),j=!I),(!O(s.immediate,E)&&!E||!O(v.decay,y)||!O(v.velocity,b))&&(j=!0)}if(I&&nw(this)&&(s.changed&&!w?j=!0:j||this._stop(u)),!m&&((j||eR(u))&&(s.values=x.getPayload(),s.toValues=eR(f)?null:C==tO?[1]:R(k)),s.immediate!=E&&(s.immediate=E,!E&&!w&&this._set(u)),j)){let{onRest:e}=s;M(nO,e=>nM(this,t,e));let r=nl(this,nC(this,u));N(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&o.batchedUpdates(()=>{s.changed=!w,e?.(r,this),w?tH(l.onRest,r):s.onStart?.(r,this)})}w&&this._set(S),m?n(nu(t.to,t,this._state,this)):j?this._start():nw(this)&&!g?this._pendingCalls.add(n):n(na(S))}_focus(e){let t=this.animation;e!==t.to&&(eN(this)&&this._detach(),t.to=e,eN(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;eR(t)&&(eW(t,this),nh(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;eR(e)&&eU(e,this)}_set(e,t=!0){let n=eA(e);if(!P.und(n)){let e=tC(this);if(!e||!O(n,e.getValue())){let r=tN(n);!e||e.constructor!=r?tj(this,r.create(n)):e.setValue(n),e&&o.batchedUpdates(()=>{this._onChange(n,t)})}}return tC(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,n_(this,"onStart",nl(this,nC(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),tH(this.animation.onChange,e,this)),tH(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;tC(this).reset(eA(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),nw(this)||(nk(this,!0),nS(this)||this._resume())}_resume(){j.skipAnimation?this.finish():q.start(this)}_stop(e,t){if(nw(this)){nk(this,!1);let n=this.animation;M(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),eL(this,{type:"idle",parent:this});let r=t?ns(this.get()):nl(this.get(),nC(this,e??n.to));N(this._pendingCalls,r),n.changed&&(n.changed=!1,n_(this,"onRest",r,this))}}};function nC(e,t){let n=t0(t),r=t0(e.get());return O(r,n)}function nj(e,t=e.loop,n=e.to){let r=tH(t);if(r){let o=r!==!0&&tJ(r),i=(o||e).reverse,a=!o||o.reset;return nI({...e,loop:t,default:!1,pause:void 0,to:!i||t2(n)?n:void 0,from:a?e.from:void 0,reset:a,...o})}}function nI(e){let{to:t,from:n}=e=tJ(e),r=new Set;return P.obj(t)&&nP(t,r),P.obj(n)&&nP(n,r),e.keys=r.size?Array.from(r):null,e}function nD(e){let t=nI(e);return P.und(t.default)&&(t.default=tY(t)),t}function nP(e,t){_(e,(e,n)=>e!=null&&t.add(n))}var nO=["onStart","onRest","onChange","onPause","onResume"];function nM(e,t,n){e.animation[n]=t[n]!==tV(t,n)?t$(t[n],e.key):void 0}function n_(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var nR=["onStart","onChange","onRest"],nA=1,nN=class{id=nA++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];P.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(nI(e)),this}start(e){let{queue:t}=this;return e?t=R(e).map(nI):this.queue=[],this._flush?this._flush(this,t):(nz(this,t),nZ(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;M(R(t),t=>n[t].stop(!!e))}else nc(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(P.und(e))this.start({pause:!0});else{let t=this.springs;M(R(e),e=>t[e].pause())}return this}resume(e){if(P.und(e))this.start({pause:!1});else{let t=this.springs;M(R(e),e=>t[e].resume())}return this}each(e){_(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,A(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&t.size&&A(t,([e,t])=>{t.value=a,e(t,this,this._item)}),i&&(this._started=!1,A(n,([e,t])=>{t.value=a,e(t,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;o.onFrame(this._onFrame)}};function nZ(e,t){return Promise.all(t.map(t=>nL(e,t))).then(t=>ni(e,t))}async function nL(e,t,n){let{keys:r,to:i,from:a,loop:l,onRest:s,onResolve:u}=t,c=P.obj(t.default)&&t.default;l&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);let f=P.arr(i)||P.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):M(nR,n=>{let r=t[n];if(P.fun(r)){let o=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=o.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):o.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}});let h=e._state;t.pause===!h.paused?(h.paused=t.pause,N(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);let p=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),g=t.cancel===!0||tV(t,"cancel")===!0;(f||g&&h.asyncId)&&p.push(no(++e._lastAsyncId,{props:t,state:h,actions:{pause:I,resume:I,start(t,n){g?(nc(h,e._lastAsyncId),n(ns(e))):(t.onRest=s,n(nu(f,t,h,e)))}}})),h.paused&&await new Promise(e=>{h.resumeQueue.add(e)});let m=ni(e,await Promise.all(p));if(l&&m.finished&&!(n&&m.noop)){let n=nj(t,l,i);if(n)return nz(e,[n]),nL(e,n,!0)}return u&&o.batchedUpdates(()=>u(m,e,e.item)),m}function nB(e,t){let n={...e.springs};return t&&M(R(t),e=>{P.und(e.keys)&&(e=nI(e)),P.obj(e.to)||(e={...e,to:void 0}),nU(n,e,e=>nW(e))}),nF(e,n),n}function nF(e,t){_(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,eW(t,e))})}function nW(e,t){let n=new nE;return n.key=e,t&&eW(n,t),n}function nU(e,t,n){t.keys&&M(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function nz(e,t){M(t,t=>{nU(e.springs,t,t=>nW(t,e))})}var nH=({children:e,...t})=>{let n=(0,T.useContext)(nK),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=ty(()=>({pause:r,immediate:o}),[r,o]);let{Provider:i}=nK;return T.createElement(i,{value:t},e)},nK=n$(nH,{});nH.Provider=nK.Provider;nH.Consumer=nK.Consumer;function n$(e,t){return Object.assign(e,T.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var nV=()=>{let e=[],t=function(t){e3();let r=[];return M(e,(e,o)=>{if(P.und(t))r.push(e.start());else{let i=n(t,e,o);i&&r.push(e.start(i))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return M(e,e=>e.pause(...arguments)),this},t.resume=function(){return M(e,e=>e.resume(...arguments)),this},t.set=function(t){M(e,(e,n)=>{let r=P.fun(t)?t(n,e):t;r&&e.set(r)})},t.start=function(t){let n=[];return M(e,(e,r)=>{if(P.und(t))n.push(e.start());else{let o=this._getProps(t,e,r);o&&n.push(e.start(o))}}),n},t.stop=function(){return M(e,e=>e.stop(...arguments)),this},t.update=function(t){return M(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return P.fun(e)?e(n,t):e};return t._getProps=n,t};function nq(e,t,n){let r=P.fun(t)&&t;r&&!n&&(n=[]);let o=(0,T.useMemo)(()=>r||arguments.length==3?nV():void 0,[]),i=(0,T.useRef)(0),a=tv(),l=(0,T.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=nB(e,t);return i.current>0&&!l.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?nZ(e,t):new Promise(r=>{nF(e,n),l.queue.push(()=>{r(nZ(e,t))}),a()})}}),[]),s=(0,T.useRef)([...l.ctrls]),u=[],c=tS(e)||0;(0,T.useMemo)(()=>{M(s.current.slice(e,c),e=>{t4(e,o),e.stop(!0)}),s.current.length=e,f(c,e)},[e]),(0,T.useMemo)(()=>{f(0,Math.min(c,e))},n);function f(e,n){for(let o=e;o<n;o++){let e=s.current[o]||(s.current[o]=new nN(null,l.flush)),n=r?r(o,e):t[o];n&&(u[o]=nD(n))}}let h=s.current.map((e,t)=>nB(e,u[t])),p=(0,T.useContext)(nH),g=tS(p),m=p!==g&&t1(p);tg(()=>{i.current++,l.ctrls=s.current;let{queue:e}=l;e.length&&(l.queue=[],M(e,e=>e())),M(s.current,(e,t)=>{o?.add(e),m&&e.start({default:p});let n=u[t];n&&(t5(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),tx(()=>()=>{M(l.ctrls,e=>e.stop(!0))});let v=h.map(e=>({...e}));return o?[v,o]:v}function nY(e,t){let n=P.fun(e),[[r],o]=nq(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,o]:r}var nG=()=>nV(),nQ=()=>zn(nG)[0];var nX=(e,t)=>{let n=Bn(()=>new nE(e,t));return Kn(()=>()=>{n.stop()}),n};function nJ(e,t,n){let r=qt.fun(t)&&t;r&&!n&&(n=[]);let o=!0,i,a=nq(e,(e,n)=>{let a=r?r(e,n):t;return i=a.ref,o=o&&a.reverse,a},n||[{}]);if(Yn(()=>{Xn(a[1].current,(e,t)=>{let n=a[1].current[t+(o?1:-1)];if(t5(e,i),e.ref){n&&e.update({to:n.springs});return}n?e.start({to:n.springs}):e.start()})},n),r||arguments.length==3){let e=i??a[1];return e._getProps=(t,n,r)=>{let o=qt.fun(t)?t(r,n):t;if(o){let t=e.current[r+(o.reverse?1:-1)];return t&&(o.to=t.springs),o}},a}return a[0]}function n0(e,t,n){let r=P.fun(t)&&t,{reset:o,sort:i,trail:a=0,expires:l=!0,exitBeforeEnter:s=!1,onDestroyed:u,ref:c,config:f}=r?r():t,h=(0,T.useMemo)(()=>r||arguments.length==3?nV():void 0,[]),p=R(e),g=[],m=(0,T.useRef)(null),v=o?null:m.current;tg(()=>{m.current=g}),tx(()=>(M(g,e=>{h?.add(e.ctrl),e.ctrl.ref=h}),()=>{M(m.current,e=>{e.expired&&clearTimeout(e.expirationId),t4(e.ctrl,h),e.ctrl.stop(!0)})}));let y=n2(p,r?r():t,v),b=o&&m.current||[];tg(()=>M(b,({ctrl:e,item:t,key:n})=>{t4(e,h),tH(u,t,n)}));let x=[];if(v&&M(v,(e,t)=>{e.expired?(clearTimeout(e.expirationId),b.push(e)):(t=x[t]=y.indexOf(e.key),~t&&(g[t]=e))}),M(p,(e,t)=>{g[t]||(g[t]={key:y[t],item:e,phase:"mount",ctrl:new nN},g[t].ctrl.item=e)}),x.length){let e=-1,{leave:n}=r?r():t;M(x,(t,r)=>{let o=v[r];~t?(e=g.indexOf(o),g[e]={...o,item:p[t]}):n&&g.splice(++e,0,o)})}P.fun(i)&&g.sort((e,t)=>i(e.item,t.item));let w=-a,S=tv(),k=tY(t),E=new Map,C=(0,T.useRef)(new Map),j=(0,T.useRef)(!1);M(g,(e,n)=>{let o=e.key,i=e.phase,u=r?r():t,h,p,g=tH(u.delay||0,o);if(i=="mount")h=u.enter,p="enter";else{let e=y.indexOf(o)<0;if(i!="leave")if(e)h=u.leave,p="leave";else if(h=u.update)p="update";else return;else if(!e)h=u.enter,p="enter";else return}if(h=tH(h,e.item,n),h=P.obj(h)?tJ(h):{to:h},!h.config){let t=f||k.config;h.config=tH(t,e.item,n,p)}w+=a;let b={...k,delay:g+w,ref:c,immediate:u.immediate,reset:!1,...h};if(p=="enter"&&P.und(b.from)){let o=r?r():t,i=P.und(o.initial)||v?o.from:o.initial;b.from=tH(i,e.item,n)}let{onResolve:x}=b;b.onResolve=e=>{tH(x,e);let t=m.current,n=t.find(e=>e.key===o);if(n&&!(e.cancelled&&n.phase!="update")&&n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if(n.phase=="leave"){let t=tH(l,n.item);if(t!==!1){let r=t===!0?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(S,r));return}}}e&&t.some(e=>e.expired)&&(C.current.delete(n),s&&(j.current=!0),S())}};let T=nB(e.ctrl,b);p==="leave"&&s?C.current.set(e,{phase:p,springs:T,payload:b}):E.set(e,{phase:p,springs:T,payload:b})});let I=(0,T.useContext)(nH),D=tS(I),O=I!==D&&t1(I);tg(()=>{O&&M(g,e=>{e.ctrl.start({default:I})})},[I]),M(E,(e,t)=>{if(C.current.size){let e=g.findIndex(e=>e.key===t.key);g.splice(e,1)}}),tg(()=>{M(C.current.size?C.current:E,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,h?.add(r),O&&e=="enter"&&r.start({default:I}),t&&(t5(r,t.ref),(r.ref||h)&&!j.current?r.update(t):(r.start(t),j.current&&(j.current=!1)))})},o?void 0:n);let _=e=>T.createElement(T.Fragment,null,g.map((t,n)=>{let{springs:r}=E.get(t)||t.ctrl,o=e({...r},t.item,t,n);return o&&o.type?T.createElement(o.type,{...o.props,key:P.str(t.key)||P.num(t.key)?t.key:t.ctrl.id,ref:o.ref}):o}));return h?[_,h]:_}var n1=1;function n2(e,{key:t,keys:n=t},r){if(n===null){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&n.phase!=="leave"&&!t.has(n));return n?(t.add(n),n.key):n1++})}return P.und(n)?e:P.fun(n)?e.map(n):R(n)}var n4=({container:e,...t}={})=>{let[n,r]=nY(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...t}),[]);return or(()=>{let t=rr(({x:e,y:t})=>{r.start({scrollX:e.current,scrollXProgress:e.progress,scrollY:t.current,scrollYProgress:t.progress})},{container:e?.current||void 0});return()=>{nr(Object.values(n),e=>e.stop()),t()}},[]),n};var n5=({container:e,...t})=>{let[n,r]=nY(()=>({width:0,height:0,...t}),[]);return ar(()=>{let t=sr(({width:e,height:t})=>{r.start({width:e,height:t,immediate:n.width.get()===0||n.height.get()===0})},{container:e?.current||void 0});return()=>{ir(Object.values(n),e=>e.stop()),t()}},[]),n};var n3={any:0,all:1};function n7(e,t){let[n,r]=pr(!1),o=ur(),i=Bt.fun(e)&&e,a=i?i():{},{to:l={},from:s={},...u}=a,c=i?t:e,[f,h]=nY(()=>({from:s,...u}),[]);return lr(()=>{let e=o.current,{root:t,once:i,amount:a="any",...u}=c??{};if(!e||i&&n||typeof IntersectionObserver>"u")return;let f=new WeakMap,p=()=>(l&&h.start(l),r(!0),i?void 0:()=>{s&&h.start(s),r(!1)}),g=e=>{e.forEach(e=>{let t=f.get(e.target);if(e.isIntersecting!==!!t)if(e.isIntersecting){let t=p();Bt.fun(t)?f.set(e.target,t):m.unobserve(e.target)}else t&&(t(),f.delete(e.target))})},m=new IntersectionObserver(g,{root:t&&t.current||void 0,threshold:typeof a=="number"||Array.isArray(a)?a:n3[a],...u});return m.observe(e),()=>m.unobserve(e)},[c]),i?[o,f]:[o,n]}function n6({children:e,...t}){return e(nY(t))}function n8({items:e,children:t,...n}){let r=nJ(e.length,n);return e.map((e,n)=>{let o=t(e,n);return fr.fun(o)?o(r[n]):o})}function n9({items:e,children:t,...n}){return n0(e,n)(t)}var re=class extends ng{constructor(e,t){super();this.source=e;this.calc=ew(...t);let n=this._get(),r=tN(n);tj(this,r.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get(),n=this.get();O(t,n)||(tC(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&rn(this._active)&&ro(this)}_get(){let e=P.arr(this.source)?this.source.map(eA):R(eA(this.source));return this.calc(...e)}_start(){this.idle&&!rn(this._active)&&(this.idle=!1,M(tI(this),e=>{e.done=!1}),j.skipAnimation?(o.batchedUpdates(()=>this.advance()),ro(this)):q.start(this))}_attach(){let e=1;M(R(this.source),t=>{eR(t)&&eW(t,this),nh(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){M(R(this.source),e=>{eR(e)&&eU(e,this)}),this._active.clear(),ro(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=R(this.source).reduce((e,t)=>Math.max(e,(nh(t)?t.priority:0)+1),0))}};function rt(e){return e.idle!==!1}function rn(e){return!e.size||Array.from(e).every(rt)}function ro(e){e.idle||(e.idle=!0,M(tI(e),e=>{e.done=!0}),eL(e,{type:"idle",parent:e}))}var ri=(e,...t)=>new re(e,t),ra=(e,...t)=>(Cr(),new re(e,t));j.assign({createStringInterpolator:eJ,to:(e,t)=>new re(e,t)});var rl=q.advance;var rs=n(42457);var ru=/^--/;function rc(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!ru.test(e)&&!(rh.hasOwnProperty(e)&&rh[e])?t+"px":(""+t).trim()}var rd={};function rf(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:l,...s}=t,u=Object.values(s),c=Object.keys(s).map(t=>n||e.hasAttribute(t)?t:rd[t]||(rd[t]=t.replace(/([A-Z])/g,e=>"-"+e.toLowerCase())));o!==void 0&&(e.textContent=o);for(let t in r)if(r.hasOwnProperty(t)){let n=rc(t,r[t]);ru.test(t)?e.style.setProperty(t,n):e.style[t]=n}c.forEach((t,n)=>{e.setAttribute(t,u[n])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var rh={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rp=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),rg=["Webkit","Ms","Moz","O"];rh=Object.keys(rh).reduce((e,t)=>(rg.forEach(n=>e[rp(n,t)]=e[t]),e),rh);var rm=/^(matrix|translate|scale|rotate|skew)/,rv=/^(translate)/,ry=/^(rotate|skew)/,rb=(e,t)=>P.num(e)&&e!==0?e+t:e,rx=(e,t)=>P.arr(e)?e.every(e=>rx(e,t)):P.num(e)?e===t:parseFloat(e)===t,rw=class extends t_{constructor({x:e,y:t,z:n,...r}){let o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(e=>[`translate3d(${e.map(e=>rb(e,"px")).join(",")})`,rx(e,0)])),_(r,(e,t)=>{if(t==="transform")o.push([e||""]),i.push(e=>[e,e===""]);else if(rm.test(t)){if(delete r[t],P.und(e))return;let n=rv.test(t)?"px":ry.test(t)?"deg":"";o.push(R(e)),i.push(t==="rotate3d"?([e,t,r,o])=>[`rotate3d(${e},${t},${r},${rb(o,n)})`,rx(o,0)]:e=>[`${t}(${e.map(e=>rb(e,n)).join(",")})`,rx(e,t.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new rS(o,i)),super(r)}},rS=class extends eB{constructor(e,t){super();this.inputs=e;this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return M(this.inputs,(n,r)=>{let o=eA(n[0]),[i,a]=this.transforms[r](P.arr(o)?o:n.map(eA));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&M(this.inputs,e=>M(e,e=>eR(e)&&eW(e,this)))}observerRemoved(e){e==0&&M(this.inputs,e=>M(e,e=>eR(e)&&eU(e,this)))}eventObserved(e){e.type=="change"&&(this._value=null),eL(this,e)}};var rk=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];j.assign({batchedUpdates:rs.unstable_batchedUpdates,createStringInterpolator:eJ,colors:et});var rT=tU(rk,{applyAnimatedValues:rf,createAnimatedStyle:e=>new rw(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),rE=rT.animated;},38638:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(66204);var o=typeof globalThis!=="undefined"?globalThis:typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof n.g!=="undefined"?n.g:{};var i={};let a;if(typeof window!=="undefined")a=window;else if(typeof self!=="undefined")a=self;else a=o;let l=null;let s=null;const u=20;const c=a.clearTimeout;const f=a.setTimeout;const h=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame;const p=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame;if(h==null||p==null){l=c;s=function e(e){return f(e,u)}}else{l=function e([e,t]){h(e);c(t)};s=function e(e){const t=p(function t(){c(n);e()});const n=f(function n(){h(t);e()},u);return[t,n]}}function g(e){let t;let n;let r;let o;let i;let u;let c;const f=typeof document!=="undefined"&&document.attachEvent;if(!f){u=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth;r.scrollTop=r.scrollHeight;o.style.width=n.offsetWidth+1+"px";o.style.height=n.offsetHeight+1+"px";n.scrollLeft=n.scrollWidth;n.scrollTop=n.scrollHeight};i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height};c=function(e){if(e.target.className&&typeof e.target.className.indexOf==="function"&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;u(this);if(this.__resizeRAF__)l(this.__resizeRAF__);this.__resizeRAF__=s(function n(){if(i(t)){t.__resizeLast__.width=t.offsetWidth;t.__resizeLast__.height=t.offsetHeight;t.__resizeListeners__.forEach(function n(n){n.call(t,e)})}})};let e=false;let a="";r="animationstart";const f="Webkit Moz O ms".split(" ");let h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" ");let p="";{const t=document.createElement("fakeelement");if(t.style.animationName!==undefined)e=true;if(e===false){for(let n=0;n<f.length;n++)if(t.style[f[n]+"AnimationName"]!==undefined){p=f[n];a="-"+p.toLowerCase()+"-";r=h[n];e=true;break}}}n="resizeanim";t="@"+a+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ";o=a+"animation: 1ms "+n+"; "}const h=function(n){if(!n.getElementById("detectElementResize")){const r=(t?t:"")+".resize-triggers { "+(o?o:"")+"visibility: hidden; opacity: 0; } "+'.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize";a.type="text/css";if(e!=null)a.setAttribute("nonce",e);if(a.styleSheet)a.styleSheet.cssText=r;else a.appendChild(n.createTextNode(r));i.appendChild(a)}};const p=function(e,t){if(f)e.attachEvent("onresize",t);else{if(!e.__resizeTriggers__){const t=e.ownerDocument;const o=a.getComputedStyle(e);if(o&&o.position==="static")e.style.position="relative";h(t);e.__resizeLast__={};e.__resizeListeners__=[];(e.__resizeTriggers__=t.createElement("div")).className="resize-triggers";const i=t.createElement("div");i.className="expand-trigger";i.appendChild(t.createElement("div"));const l=t.createElement("div");l.className="contract-trigger";e.__resizeTriggers__.appendChild(i);e.__resizeTriggers__.appendChild(l);e.appendChild(e.__resizeTriggers__);u(e);e.addEventListener("scroll",c,true);if(r){e.__resizeTriggers__.__animationListener__=function t(t){if(t.animationName===n)u(e)};e.__resizeTriggers__.addEventListener(r,e.__resizeTriggers__.__animationListener__)}}e.__resizeListeners__.push(t)}};const g=function(e,t){if(f)e.detachEvent("onresize",t);else{e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1);if(!e.__resizeListeners__.length){e.removeEventListener("scroll",c,true);if(e.__resizeTriggers__.__animationListener__){e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__);e.__resizeTriggers__.__animationListener__=null}try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}};return{addResizeListener:p,removeResizeListener:g}}i={createDetectElementResize:g};function m(e,t,n){t=v(t);if(t in e)Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true});else e[t]=n;return e}function v(e){var t=y(e,"string");return typeof t==="symbol"?t:String(t)}function y(e,t){if(typeof e!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var r=n.call(e,t||"default");if(typeof r!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class b extends(0,r.Component){constructor(...e){super(...e);m(this,"state",{height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0});m(this,"_autoSizer",null);m(this,"_detectElementResize",null);m(this,"_parentNode",null);m(this,"_resizeObserver",null);m(this,"_onResize",()=>{const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){var r,o,i,a;const l=window.getComputedStyle(this._parentNode)||{};const s=parseInt((r=l.paddingLeft)!==null&&r!==void 0?r:"0",10);const u=parseInt((o=l.paddingRight)!==null&&o!==void 0?o:"0",10);const c=parseInt((i=l.paddingTop)!==null&&i!==void 0?i:"0",10);const f=parseInt((a=l.paddingBottom)!==null&&a!==void 0?a:"0",10);const h=this._parentNode.getBoundingClientRect();const p=h.height-c-f;const g=h.width-s-u;const m=this._parentNode.offsetHeight-c-f;const v=this._parentNode.offsetWidth-s-u;if(!e&&(this.state.height!==m||this.state.scaledHeight!==p)||!t&&(this.state.width!==v||this.state.scaledWidth!==g)){this.setState({height:m,width:v,scaledHeight:p,scaledWidth:g});if(typeof n==="function")n({height:m,scaledHeight:p,scaledWidth:g,width:v})}}});m(this,"_setRef",e=>{this._autoSizer=e})}componentDidMount(){const{nonce:e}=this.props;if(this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement){this._parentNode=this._autoSizer.parentNode;if(this._parentNode!=null){if(typeof ResizeObserver!=="undefined"){this._resizeObserver=new ResizeObserver(()=>{setTimeout(this._onResize,0)});this._resizeObserver.observe(this._parentNode)}else{this._detectElementResize=(0,i.createDetectElementResize)(e);this._detectElementResize.addResizeListener(this._parentNode,this._onResize)}this._onResize()}}}componentWillUnmount(){if(this._parentNode){if(this._detectElementResize)this._detectElementResize.removeResizeListener(this._parentNode,this._onResize);if(this._resizeObserver){this._resizeObserver.observe(this._parentNode);this._resizeObserver.disconnect()}}}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:o,disableWidth:i,nonce:a,onResize:l,style:s,tagName:u="div",...c}=this.props;const{height:f,scaledHeight:h,scaledWidth:p,width:g}=this.state;const m={overflow:"visible"};const v={};let y=false;if(!o){if(f===0)y=true;m.height=0;v.height=f;v.scaledHeight=h}if(!i){if(g===0)y=true;m.width=0;v.width=g;v.scaledWidth=p}return(0,r.createElement)(u,{ref:this._setRef,style:{...m,...s},...c},!y&&e(v))}}m(b,"defaultProps",{onResize:()=>{},disableHeight:false,disableWidth:false,style:{}});var x=(0,b)},99279:function(e,t,n){"use strict";/**
|
|
73
|
+
* @license React
|
|
74
|
+
* react-jsx-runtime.production.min.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/var r=n(66204),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;void 0!==n&&(u=""+n);void 0!==t.key&&(u=""+t.key);void 0!==t.ref&&(c=t.ref);for(r in t)a.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:l.current}}t.Fragment=i;t.jsx=u;t.jsxs=u},63481:function(e,t){"use strict";/**
|
|
81
|
+
* @license React
|
|
82
|
+
* react.production.min.js
|
|
83
|
+
*
|
|
84
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the MIT license found in the
|
|
87
|
+
* LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function g(e){if(null===e||"object"!==typeof e)return null;e=p&&e[p]||e["@@iterator"];return"function"===typeof e?e:null}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,y={};function b(e,t,n){this.props=e;this.context=t;this.refs=y;this.updater=n||m}b.prototype.isReactComponent={};b.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function x(){}x.prototype=b.prototype;function w(e,t,n){this.props=e;this.context=t;this.refs=y;this.updater=n||m}var S=w.prototype=new x;S.constructor=w;v(S,b.prototype);S.isPureReactComponent=!0;var k=Array.isArray,T=Object.prototype.hasOwnProperty,E={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function j(e,t,r){var o,i={},a=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,o)&&!C.hasOwnProperty(o)&&(i[o]=t[o]);var s=arguments.length-2;if(1===s)i.children=r;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)void 0===i[o]&&(i[o]=s[o]);return{$$typeof:n,type:e,key:a,ref:l,props:i,_owner:E.current}}function I(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}function P(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function M(e,t){return"object"===typeof e&&null!==e&&null!=e.key?P(""+e.key):t.toString(36)}function _(e,t,o,i,a){var l=typeof e;if("undefined"===l||"boolean"===l)e=null;var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return s=e,a=a(s),e=""===i?"."+M(s,0):i,k(a)?(o="",null!=e&&(o=e.replace(O,"$&/")+"/"),_(a,t,o,"",function(e){return e})):null!=a&&(D(a)&&(a=I(a,o+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+e)),t.push(a)),1;s=0;i=""===i?".":i+":";if(k(e))for(var u=0;u<e.length;u++){l=e[u];var c=i+M(l,u);s+=_(l,t,o,c,a)}else if(c=g(e),"function"===typeof c)for(e=c.call(e),u=0;!(l=e.next()).done;)l=l.value,c=i+M(l,u++),s+=_(l,t,o,c,a);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function R(e,t,n){if(null==e)return e;var r=[],o=0;_(e,r,"","",function(e){return t.call(n,e,o++)});return r}function A(e){if(-1===e._status){var t=e._result;t=t();t.then(function(t){if(0===e._status||-1===e._status)e._status=1,e._result=t},function(t){if(0===e._status||-1===e._status)e._status=2,e._result=t});-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},Z={transition:null},L={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:Z,ReactCurrentOwner:E};t.Children={map:R,forEach:function(e,t,n){R(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;R(e,function(){t++});return t},toArray:function(e){return R(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Component=b;t.Fragment=o;t.Profiler=a;t.PureComponent=w;t.StrictMode=i;t.Suspense=c;t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L;t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=v({},e.props),i=e.key,a=e.ref,l=e._owner;if(null!=t){void 0!==t.ref&&(a=t.ref,l=E.current);void 0!==t.key&&(i=""+t.key);if(e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)T.call(t,u)&&!C.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==s?s[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){s=Array(u);for(var c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:l}};t.createContext=function(e){e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};e.Provider={$$typeof:l,_context:e};return e.Consumer=e};t.createElement=j;t.createFactory=function(e){var t=j.bind(null,e);t.type=e;return t};t.createRef=function(){return{current:null}};t.forwardRef=function(e){return{$$typeof:u,render:e}};t.isValidElement=D;t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:A}};t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}};t.startTransition=function(e){var t=Z.transition;Z.transition={};try{e()}finally{Z.transition=t}};t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};t.useCallback=function(e,t){return N.current.useCallback(e,t)};t.useContext=function(e){return N.current.useContext(e)};t.useDebugValue=function(){};t.useDeferredValue=function(e){return N.current.useDeferredValue(e)};t.useEffect=function(e,t){return N.current.useEffect(e,t)};t.useId=function(){return N.current.useId()};t.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)};t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)};t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)};t.useMemo=function(e,t){return N.current.useMemo(e,t)};t.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)};t.useRef=function(e){return N.current.useRef(e)};t.useState=function(e){return N.current.useState(e)};t.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)};t.useTransition=function(){return N.current.useTransition()};t.version="18.2.0"},66204:function(e,t,n){"use strict";if(true){e.exports=n(63481)}else{}},43188:function(e,t,n){"use strict";if(true){e.exports=n(99279)}else{}},65485:function(e,t,n){"use strict";n.d(t,{md:function(){return C},DE:function(){return T},UY:function(){return S},MT:function(){return v}});var r=n(56666);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e};function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or "+"use the non-minified dev environment for full errors. "}var l=function(){return typeof Symbol==="function"&&Symbol.observable||"@@observable"}();var s=function e(){return Math.random().toString(36).substring(7).split("").join(".")};var u={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function e(){return"@@redux/PROBE_UNKNOWN_ACTION"+s()}};function c(e){if(typeof e!=="object"||e===null)return false;var t=e;while(Object.getPrototypeOf(t)!==null){t=Object.getPrototypeOf(t)}return Object.getPrototypeOf(e)===t}function f(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":{return t}}if(Array.isArray(e))return"array";if(g(e))return"date";if(p(e))return"error";var n=h(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function h(e){return typeof e.constructor==="function"?e.constructor.name:null}function p(e){return e instanceof Error||typeof e.message==="string"&&e.constructor&&typeof e.constructor.stackTraceLimit==="number"}function g(e){if(e instanceof Date)return true;return typeof e.toDateString==="function"&&typeof e.getDate==="function"&&typeof e.setDate==="function"}function m(e){var t=typeof e;if(false){}return t}function v(e,t,n){var r;if(typeof t==="function"&&typeof n==="function"||typeof n==="function"&&typeof arguments[3]==="function"){throw new Error(true?a(0):0)}if(typeof t==="function"&&typeof n==="undefined"){n=t;t=undefined}if(typeof n!=="undefined"){if(typeof n!=="function"){throw new Error(true?a(1):0)}return n(v)(e,t)}if(typeof e!=="function"){throw new Error(true?a(2):0)}var o=e;var i=t;var s=[];var f=s;var h=false;function p(){if(f===s){f=s.slice()}}function g(){if(h){throw new Error(true?a(3):0)}return i}function m(e){if(typeof e!=="function"){throw new Error(true?a(4):0)}if(h){throw new Error(true?a(5):0)}var t=true;p();f.push(e);return function n(){if(!t){return}if(h){throw new Error(true?a(6):0)}t=false;p();var n=f.indexOf(e);f.splice(n,1);s=null}}function y(e){if(!c(e)){throw new Error(true?a(7):0)}if(typeof e.type==="undefined"){throw new Error(true?a(8):0)}if(h){throw new Error(true?a(9):0)}try{h=true;i=o(i,e)}finally{h=false}var t=s=f;for(var n=0;n<t.length;n++){var r=t[n];r()}return e}function b(e){if(typeof e!=="function"){throw new Error(true?a(10):0)}o=e;y({type:u.REPLACE})}function x(){var e;var t=m;return e={subscribe:function e(e){if(typeof e!=="object"||e===null){throw new Error(true?a(11):0)}function n(){if(e.next){e.next(g())}}n();var r=t(n);return{unsubscribe:r}}},e[l]=function(){return this},e}y({type:u.INIT});return r={dispatch:y,subscribe:m,getState:g,replaceReducer:b},r[l]=x,r}var y=null&&v;function b(e){if(typeof console!=="undefined"&&typeof console.error==="function"){console.error(e)}try{throw new Error(e)}catch(e){}}function x(e,t,n,r){var o=Object.keys(t);var i=n&&n.type===u.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0){return"Store does not have a valid reducer. Make sure the argument passed "+"to combineReducers is an object whose values are reducers."}if(!c(e)){return"The "+i+' has unexpected type of "'+m(e)+'". Expected argument to be an object with the following '+('keys: "'+o.join('", "')+'"')}var a=Object.keys(e).filter(function(e){return!t.hasOwnProperty(e)&&!r[e]});a.forEach(function(e){r[e]=true});if(n&&n.type===u.REPLACE)return;if(a.length>0){return"Unexpected "+(a.length>1?"keys":"key")+" "+('"'+a.join('", "')+'" found in '+i+". ")+"Expected to find one of the known reducer keys instead: "+('"'+o.join('", "')+'". Unexpected keys will be ignored.')}}function w(e){Object.keys(e).forEach(function(t){var n=e[t];var r=n(undefined,{type:u.INIT});if(typeof r==="undefined"){throw new Error(true?a(12):0)}if(typeof n(undefined,{type:u.PROBE_UNKNOWN_ACTION()})==="undefined"){throw new Error(true?a(13):0)}})}function S(e){var t=Object.keys(e);var n={};for(var r=0;r<t.length;r++){var o=t[r];if(false){}if(typeof e[o]==="function"){n[o]=e[o]}}var i=Object.keys(n);var l;if(false){}var s;try{w(n)}catch(e){s=e}return function e(e,t){if(e===void 0){e={}}if(s){throw s}if(false){var r}var o=false;var l={};for(var u=0;u<i.length;u++){var c=i[u];var f=n[c];var h=e[c];var p=f(h,t);if(typeof p==="undefined"){var g=t&&t.type;throw new Error(true?a(14):0)}l[c]=p;o=o||p!==h}o=o||i.length!==Object.keys(e).length;return o?l:e}}function k(e,t){return function(){return t(e.apply(this,arguments))}}function T(e,t){if(typeof e==="function"){return k(e,t)}if(typeof e!=="object"||e===null){throw new Error(true?a(16):0)}var n={};for(var r in e){var o=e[r];if(typeof o==="function"){n[r]=k(o,t)}}return n}function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}if(t.length===0){return function(e){return e}}if(t.length===1){return t[0]}return t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function C(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return function(e){return function(){var n=e.apply(void 0,arguments);var r=function e(){throw new Error(true?a(15):0)};var o={getState:n.getState,dispatch:function e(){return r.apply(void 0,arguments)}};var l=t.map(function(e){return e(o)});r=E.apply(void 0,l)(n.dispatch);return i(i({},n),{},{dispatch:r})}}}},38221:function(e,t){"use strict";/**
|
|
89
|
+
* @license React
|
|
90
|
+
* scheduler.production.min.js
|
|
91
|
+
*
|
|
92
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the MIT license found in the
|
|
95
|
+
* LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<i(o,t))e[r]=t,e[n]=o,n=r;else break e}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var l=2*(r+1)-1,s=e[l],u=l+1,c=e[u];if(0>i(s,n))u<o&&0>i(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else if(u<o&&0>i(c,n))e[r]=c,e[u]=n,r=u;else break e}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],f=1,h=null,p=3,g=!1,m=!1,v=!1,y="function"===typeof setTimeout?setTimeout:null,b="function"===typeof clearTimeout?clearTimeout:null,x="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else if(t.startTime<=e)o(c),t.sortIndex=t.expirationTime,n(u,t);else break;t=r(c)}}function S(e){v=!1;w(e);if(!m)if(null!==r(u))m=!0,R(k);else{var t=r(c);null!==t&&A(S,t.startTime-e)}}function k(e,n){m=!1;v&&(v=!1,b(C),C=-1);g=!0;var i=p;try{w(n);for(h=r(u);null!==h&&(!(h.expirationTime>n)||e&&!D());){var a=h.callback;if("function"===typeof a){h.callback=null;p=h.priorityLevel;var l=a(h.expirationTime<=n);n=t.unstable_now();"function"===typeof l?h.callback=l:h===r(u)&&o(u);w(n)}else o(u);h=r(u)}if(null!==h)var s=!0;else{var f=r(c);null!==f&&A(S,f.startTime-n);s=!1}return s}finally{h=null,p=i,g=!1}}var T=!1,E=null,C=-1,j=5,I=-1;function D(){return t.unstable_now()-I<j?!1:!0}function P(){if(null!==E){var e=t.unstable_now();I=e;var n=!0;try{n=E(!0,e)}finally{n?O():(T=!1,E=null)}}else T=!1}var O;if("function"===typeof x)O=function(){x(P)};else if("undefined"!==typeof MessageChannel){var M=new MessageChannel,_=M.port2;M.port1.onmessage=P;O=function(){_.postMessage(null)}}else O=function(){y(P,0)};function R(e){E=e;T||(T=!0,O())}function A(e,n){C=y(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5;t.unstable_ImmediatePriority=1;t.unstable_LowPriority=4;t.unstable_NormalPriority=3;t.unstable_Profiling=null;t.unstable_UserBlockingPriority=2;t.unstable_cancelCallback=function(e){e.callback=null};t.unstable_continueExecution=function(){m||g||(m=!0,R(k))};t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<e?Math.floor(1e3/e):5};t.unstable_getCurrentPriorityLevel=function(){return p};t.unstable_getFirstCallbackNode=function(){return r(u)};t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}};t.unstable_pauseExecution=function(){};t.unstable_requestPaint=function(){};t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}};t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();"object"===typeof i&&null!==i?(i=i.delay,i="number"===typeof i&&0<i?a+i:a):i=a;switch(e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}l=i+l;e={id:f++,callback:o,priorityLevel:e,startTime:i,expirationTime:l,sortIndex:-1};i>a?(e.sortIndex=i,n(c,e),null===r(u)&&e===r(c)&&(v?(b(C),C=-1):v=!0,A(S,i-a))):(e.sortIndex=l,n(u,e),m||g||(m=!0,R(k)));return e};t.unstable_shouldYield=D;t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},46489:function(e,t,n){"use strict";if(true){e.exports=n(38221)}else{}},49090:function(e){e.exports=t;function t(e,t){var n,r,o,i;var a=0;return function e(){n=this;r=arguments;var e=new Date-a;if(!i)if(e>=t)l();else i=setTimeout(l,t-e);return o};function l(){i=0;a=+new Date;o=e.apply(n,r);n=null;r=null}}},26505:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});const r=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var o={randomUUID:r};let i;const a=new Uint8Array(16);function l(){if(!i){i=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto);if(!i){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return i(a)};const s=[];for(let e=0;e<256;++e){s.push((e+256).toString(16).slice(1))}function u(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}function c(e,t=0){const n=u(e,t);if(!validate(n)){throw TypeError("Stringified UUID is invalid")}return n}var f=null&&c;function h(e,t,n){if(o.randomUUID&&!t&&!e){return o.randomUUID()}e=e||{};const r=e.random||(e.rng||l)();r[6]=r[6]&15|64;r[8]=r[8]&63|128;if(t){n=n||0;for(let e=0;e<16;++e){t[n+e]=r[e]}return t}return u(r)}var p=h},92879:function(e){"use strict";var t="production"!=="production";var n=function(){};if(t){var r=function e(e,t){var n=arguments.length;t=new Array(n>1?n-1:0);for(var r=1;r<n;r++){t[r-1]=arguments[r]}var o=0;var i="Warning: "+e.replace(/%s/g,function(){return t[o++]});if(typeof console!=="undefined"){console.error(i)}try{throw new Error(i)}catch(e){}};n=function(e,t,n){var o=arguments.length;n=new Array(o>2?o-2:0);for(var i=2;i<o;i++){n[i-2]=arguments[i]}if(t===undefined){throw new Error("`warning(condition, format, ...args)` requires a warning "+"message argument")}if(!e){r.apply(null,[t].concat(n))}}}e.exports=n},76074:function(e,t,n){"use strict";n.d(t,{$:function(){return s},F:function(){return u}});var r=n(43188);var o=n(66204);var i=n(90696);var a=n(90122);const l=(0,o.createContext)(null);function s(e){(0,i.nP)();const t=document.documentElement.clientHeight;const n=document.documentElement.clientWidth;const o={atLeastMediumWidth:n>=a.A.medium,isNarrowWidth:n<a.A.small,isSmallWidth:n>=a.A.small&&n<a.A.medium,isMediumWidth:n>=a.A.medium&&n<a.A.wide,isWideWidth:n>=a.A.wide,height:t,width:n};return(0,r.jsx)(l.Provider,{value:o,children:e.children})}function u(){return(0,o.useContext)(l)}},61130:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(43188);var o=n(66204);var i=n(99818);const a=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M10 3v2a5 5 0 0 0-3.54 8.54l-1.41 1.41A7 7 0 0 1 10 3zm4.95 2.05A7 7 0 0 1 10 17v-2a5 5 0 0 0 3.54-8.54l1.41-1.41zM10 20l-4-4 4-4v8zm0-12V0l4 4-4 4z",fill:"currentColor"})});var l=a;var s=n(24307);let u=(0,i.F4)({"0%":{transform:"rotateZ(0deg)"},"100%":{transform:"rotateZ(360deg)"}});function c({animating:e,iconStyle:t}){return(0,r.jsx)(s.Z,{style:{animation:e?`${u} 1s infinite linear`:null},children:(0,r.jsx)(l,{width:14,height:14,style:t})})}},39235:function(e,t,n){"use strict";n.d(t,{U:function(){return s}});var r=n(43188);var o=n(66204);var i=n(81113);let a=(0,o.createContext)("app");i.Z.filter=e=>{let t=e.target||e.srcElement;let n=t.tagName;if(!e.metaKey&&(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t["readOnly"])){return false}return true};function l({keyName:e,eventType:t="keydown",handler:n}){let r=(0,o.useContext)(a);if(t!=="keyup"&&t!=="keydown"){throw new Error("KeyHandler: unknown event type: "+t)}(0,o.useEffect)(()=>{function o(e,r){e.preventDefault();if(e.type===t&&n){return n(e,r)}}(0,i.Z)(e,{scope:r,keyup:true},o);return()=>{i.Z.unbind({key:e,scope:r,method:o})}},[e,n,r]);return null}function s({eventType:e,keys:t={}}){let n=Object.keys(t).map(n=>{return(0,r.jsx)(l,{keyName:n,eventType:e,handler:t[n]},n)});return(0,r.jsx)(r.Fragment,{children:n})}},49886:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(1447);var l=n(45492);var s=n(56816);var u=n(31941);var c=n(77644);var f=n(24307);var h=n(11800);var p=n(63541);function g({hideIfNoServer:e,style:t,color:n}){let g=(0,i.v9)(e=>e.user.data);let{getUserData:m,signOut:v,closeBudget:y}=(0,a.o)();let[b,x]=(0,o.useState)(true);let[w,S]=(0,o.useState)(false);const k=(0,h.o1)();(0,o.useEffect)(()=>{m().then(()=>x(false))},[]);async function T(){await y();window.__navigate("/change-password")}async function E(e){S(false);switch(e){case"change-password":T();break;case"sign-in":await y();window.__navigate("/login");break;case"sign-out":v();break;case"config-server":await y();window.__navigate("/config-server");break;default:}}function C(){if(!k){return"No server"}if(g?.offline){return"Server offline"}return"Server online"}if(e&&!k){return null}if(b&&k){return(0,r.jsx)(c.Z,{style:{color:l.rS.altpageTextSubdued,fontStyle:"italic",...l.W2.delayedFadeIn,...t},children:"Connecting..."})}return(0,r.jsxs)(f.Z,{style:{flexDirection:"row",alignItems:"center",...t},children:[(0,r.jsx)(s.Z,{type:"bare",onClick:()=>S(true),style:{color:n},children:C()}),w&&(0,r.jsx)(p.u,{position:"bottom-right",style:{padding:0},onClose:()=>S(false),children:(0,r.jsx)(u.Z,{onMenuSelect:E,items:[k&&!g?.offline&&{name:"change-password",text:"Change password"},k&&{name:"sign-out",text:"Sign out"},{name:"config-server",text:k?"Change server URL":"Start using a server"}]})})]})}},13308:function(e,t,n){"use strict";n.d(t,{T:function(){return c}});var r=n(43188);var o=n(66204);var i=n(76074);var a=n(45492);var l=n(77644);var s=n(24307);function u({name:e,style:t}){const{isNarrowWidth:n}=(0,i.F)();if(n){return(0,r.jsx)(s.Z,{style:{alignItems:"center",backgroundColor:a.rS.sidebarItemBackground,color:a.rS.mobileModalText,flexDirection:"row",flex:"1 0 auto",fontSize:18,fontWeight:500,height:50,justifyContent:"center",overflowY:"auto",...t},children:e})}return(0,r.jsx)(l.Z,{style:{fontSize:25,fontWeight:500,marginBottom:15,...t},children:e})}function c({title:e,children:t,titleStyle:n}){let{isNarrowWidth:o}=(0,i.F)();let l=o?10:20;return(0,r.jsxs)(s.Z,{style:o?undefined:a.W2.page,children:[(0,r.jsx)(u,{name:e,style:{...n,paddingInline:l}}),(0,r.jsx)(s.Z,{style:o?{overflowY:"auto",padding:l}:{paddingLeft:l,paddingRight:l,flex:1},children:t})]})}},16853:function(e,t,n){"use strict";n.d(t,{wq:function(){return u},ZP:function(){return c},JS:function(){return h}});var r=n(43188);var o=n(66204);var i=n(37496);function a(){return(0,i.v9)(e=>e.prefs?.local?.isPrivacyEnabled??false)}var l=n(76074);var s=n(24307);function u({children:e,privacyFilter:t,defaultPrivacyFilterProps:n}){let i=(e,t)=>(0,r.jsx)(c,{...t,children:e});return t?typeof t==="boolean"?(0,r.jsx)(c,{...n,children:e}):i(e,h(n,t)):(0,r.jsx)(r.Fragment,{children:o.Children.toArray(e)})}function c({activationFilters:e,blurIntensity:t,children:n,...i}){let s=a();let{isNarrowWidth:u}=(0,l.F)();let c=s&&!u&&(!e||e.every(e=>typeof e==="boolean"?e:e()));let h=t!=null?`${t}px`:"3px";return!c?(0,r.jsx)(r.Fragment,{children:o.Children.toArray(n)}):(0,r.jsx)(f,{blurIntensity:h,...i,children:n})}function f({blurIntensity:e,children:t,...n}){let[i,a]=(0,o.useState)(false);let l=(0,o.useCallback)(()=>a(true),[a]);let u=(0,o.useCallback)(()=>a(false),[a]);let c={...!i&&{filter:`blur(${e})`,WebkitFilter:`blur(${e})`,transform:`translate3d(0, 0, 0)`}};let{style:f,...h}=n;return(0,r.jsx)(s.Z,{style:{display:f?.display?f.display:"inline-flex",...c,...f},onPointerEnter:l,onPointerLeave:u,...h,children:t})}function h(e={},t){if(t==null||t===false){return t}if(t===true){return e}return p(e,t)}function p(e,...t){return t.reduce((e,t)=>{Object.keys(t).forEach(n=>{const r=e[n];const o=t[n];if(Array.isArray(r)&&Array.isArray(o)){e[n]=r.concat(...o)}else if(g(r)&&g(o)){e[n]=p(r,o)}else{e[n]=o}});return e},e)}function g(e){return e&&typeof e==="object"}},11800:function(e,t,n){"use strict";n.d(t,{Mx:function(){return s},o1:function(){return l},q3:function(){return u},qc:function(){return f}});var r=n(43188);var o=n(66204);var i=n(84094);const a=(0,o.createContext)({url:null,version:"",setURL:()=>Promise.reject(new Error("ServerContext not initialized"))});const l=()=>(0,o.useContext)(a).url;const s=()=>(0,o.useContext)(a).version;const u=()=>(0,o.useContext)(a).setURL;async function c(){let e=await (0,i.lW)("get-server-version");if("version"in e){return e.version}return""}function f({children:e}){let[t,n]=(0,o.useState)("");let[l,s]=(0,o.useState)("");(0,o.useEffect)(()=>{async function e(){n(await (0,i.lW)("get-server-url"));s(await c())}e()},[]);let u=(0,o.useCallback)(async(e,t={})=>{let{error:r}=await (0,i.lW)("set-server-url",{...t,url:e});if(!r){n(await (0,i.lW)("get-server-url"));s(await c())}return{error:r}},[n]);return(0,r.jsx)(a.Provider,{value:{url:t,setURL:u,version:l?`v${l}`:"N/A"},children:e})}},75970:function(e,t,n){"use strict";n.d(t,{rD:function(){return G},CR:function(){return $},TE:function(){return V},ZP:function(){return X}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(59379);var l=n(67238);var s=n(46055);var u=n(84094);var c=n(1447);var f=n(58068);var h=n(62503);var p=n(25492);var g=n(35915);var m=n(70044);const v=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("rect",{width:23,height:3,x:.5,y:2.5,rx:1,ry:1,fill:"currentColor"}),(0,r.jsx)("rect",{width:23,height:3,x:.5,y:10.5,rx:1,ry:1,fill:"currentColor"}),(0,r.jsx)("rect",{width:23,height:3,x:.5,y:18.5,rx:1,ry:1,fill:"currentColor"})]});var y=v;var b=n(76074);var x=n(45492);var w=n(18247);var S=n(41792);var k=n(56816);var T=n(15633);var E=n(24307);var C=n(63541);function j(e,t){switch(e.toUpperCase()){case"ITEM_ERROR":switch(t.toUpperCase()){case"NO_ACCOUNTS":return"No open accounts could be found. Did you close the account? If so, unlink the account.";case"ITEM_LOGIN_REQUIRED":return"Your password or something else has changed with your bank and you need to login again.";default:}break;case"INVALID_INPUT":switch(t.toUpperCase()){case"INVALID_ACCESS_TOKEN":return"Item is no longer authorized. You need to login again.";default:}break;case"RATE_LIMIT_EXCEEDED":return"Rate limit exceeded for this item. Please try again later.";default:}return(0,r.jsxs)(r.Fragment,{children:["An internal error occurred. Try to login again, or get"," ",(0,r.jsx)(T.Z,{to:"https://actualbudget.org/contact/",children:"in touch"})," ","for support."]})}function I(){let e=(0,i.v9)(e=>e.queries.accounts);let t=(0,i.v9)(e=>e.account.failedAccounts);let{unlinkAccount:n,pushModal:l}=(0,c.o)();let{id:s}=(0,a.UO)();let[u,f]=(0,o.useState)(false);if(!t){return null}let h=t.get(s);if(!h){return null}let p=e.find(e=>e.id===s);let{type:g,code:m}=h;let v=g==="ITEM_ERROR"&&m==="ITEM_LOGIN_REQUIRED"||g==="INVALID_INPUT"&&m==="INVALID_ACCESS_TOKEN";function y(){f(false);(0,w.F)(l,{upgradingAccountId:p.account_id})}async function b(){n(p.id);f(false)}return(0,r.jsxs)(E.Z,{children:[(0,r.jsxs)(k.Z,{type:"bare",style:{flexDirection:"row",alignItems:"center",color:x.rS.errorText,backgroundColor:x.rS.errorBackground,padding:"4px 8px",borderRadius:4},onClick:()=>f(true),children:[(0,r.jsx)(S.Z,{style:{width:14,height:14,marginRight:5}})," ","This account is experiencing connection problems. Let’s fix it."]}),u&&(0,r.jsxs)(C.u,{position:"bottom-left",onClose:()=>f(false),style:{fontSize:14,padding:15,maxWidth:400},children:[(0,r.jsx)("div",{style:{marginBottom:"1.15em"},children:"The server returned the following error:"}),(0,r.jsx)("div",{style:{marginBottom:"1.25em",color:x.rS.errorText},children:j(h.type,h.code)}),(0,r.jsx)(E.Z,{style:{justifyContent:"flex-end",flexDirection:"row"},children:v?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(k.Z,{onClick:b,children:"Unlink"}),(0,r.jsx)(k.Z,{type:"primary",onClick:y,style:{marginLeft:5},children:"Reauthorize"})]}):(0,r.jsx)(k.Z,{onClick:b,children:"Unlink account"})})]})]})}var D=n(61130);var P=n(30739);var O=n(75025);function M({color:e,onClick:t}){return(0,r.jsx)(P.Z,{style:{width:13,height:13,color:e,marginRight:5},onClick:t})}function _({maxMonths:e,onChange:t}){let{displayMax:n}=(0,O.s)();if(n<=1){return null}let o=[];for(let i=1;i<=n;i++){o.push((0,r.jsx)(M,{color:e>=i?x.rS.altpageTextSubdued:x.rS.altButtonBareText,onClick:()=>t(i)},i))}return(0,r.jsx)(E.Z,{style:{flexDirection:"row",marginRight:20,marginTop:-1,WebkitAppRegion:"no-drag","& svg":{transition:"transform .15s"},"& svg:hover":{transform:"scale(1.2)"}},title:"Choose the number of months shown at a time",children:o})}var R=n(6755);var A=n(42994);var N=n(77644);var Z=n(49886);var L=n(11800);var B=n(42326);var F=n(57651);const W=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-moon-stars",viewBox:"0 0 16 16",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{d:"M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278zM4.858 1.311A7.269 7.269 0 0 0 1.025 7.71c0 4.02 3.279 7.276 7.319 7.276a7.316 7.316 0 0 0 5.205-2.162c-.337.042-.68.063-1.029.063-4.61 0-8.343-3.714-8.343-8.29 0-1.167.242-2.278.681-3.286z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z",fill:"currentColor"})]});var U=W;const z=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",className:"bi bi-sun",viewBox:"0 0 16 16",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z",fill:"currentColor"})});var H=z;function K(){let e=(0,x.Fg)();let{saveGlobalPrefs:t}=(0,c.o)();let{isNarrowWidth:n}=(0,b.F)();return n?null:(0,r.jsx)(k.Z,{type:"bare",onClick:()=>{t({theme:e==="dark"?"light":"dark"})},children:e==="light"?(0,r.jsx)(U,{style:{width:13,height:13,color:"inherit"}}):(0,r.jsx)(H,{style:{width:13,height:13,color:"inherit"}})})};let $=(0,o.createContext)(null);function V({children:e}){let t=(0,o.useRef)([]);function n(e){t.current.forEach(t=>t(e))}function i(e){t.current.push(e);return()=>t.current=t.current.filter(t=>t!==e)}return(0,r.jsx)($.Provider,{value:{sendEvent:n,subscribe:i},children:e})}function q(){let e=(0,F.Z)(s.sX());return e!==0&&(0,r.jsxs)(R.Z,{variant:"button",type:"bare",to:"/accounts/uncategorized",style:{color:x.rS.errorText},children:[e," uncategorized ",e===1?"transaction":"transactions"]})}function Y(){let e=(0,i.v9)(e=>e.prefs.local.isPrivacyEnabled);let{savePrefs:t}=(0,c.o)();let n={width:23,height:23};return(0,r.jsx)(k.Z,{type:"bare",onClick:()=>t({isPrivacyEnabled:!e}),children:e?(0,r.jsx)(m.Z,{style:n}):(0,r.jsx)(g.Z,{style:n})})}function G({style:e,isMobile:t=false}){let n=(0,i.v9)(e=>e.prefs.local.cloudFileId);let{sync:a}=(0,c.o)();let[l,s]=(0,o.useState)(false);let[f,h]=(0,o.useState)(null);(0,o.useEffect)(()=>{let e=(0,u.oL)("sync-event",({type:e,subtype:t,syncDisabled:r})=>{if(e==="start"){s(true);h(null)}else{setTimeout(()=>{s(false)},200)}if(e==="error"){if(t==="network"){h("offline")}else if(!n){h("local")}else{h("error")}}else if(e==="success"){h(r?"disabled":null)}});return e},[]);const g=f==="error"?x.rS.alt4ErrorText:f==="disabled"||f==="offline"||f==="local"?x.rS.sidebarItemText:e.color;const m=f==="error"?x.rS.alt2ErrorText:f==="disabled"||f==="offline"||f==="local"?x.rS.altTableText:null;const v=t?{color:g}:{};return(0,r.jsxs)(k.Z,{type:"bare",style:{...e,WebkitAppRegion:"none",color:t?g:m},hoveredStyle:v,activeStyle:v,onClick:a,children:[f==="error"?(0,r.jsx)(p.Z,{width:13}):(0,r.jsx)(D.Z,{animating:l}),(0,r.jsx)(N.Z,{style:{marginLeft:3},children:f==="disabled"?"Disabled":f==="offline"?"Offline":"Sync"})]})}function Q(){let e=(0,i.v9)(e=>e.prefs.global.maxMonths);let t=(0,i.v9)(e=>e.prefs.local.budgetType);let{saveGlobalPrefs:n}=(0,c.o)();let{sendEvent:a}=(0,o.useContext)($);let[l,s]=(0,o.useState)(false);let[u,h]=(0,o.useState)(false);const p=(0,f.Z)("reportBudget");function g(){s(true);if(!l){a("budget/switch-type")}}(0,o.useEffect)(()=>{s(false)},[t]);return(0,r.jsxs)(E.Z,{style:{flexDirection:"row",alignItems:"center"},children:[(0,r.jsx)(_,{maxMonths:e||1,onChange:e=>n({maxMonths:e})}),p&&(0,r.jsxs)(E.Z,{style:{marginLeft:-5},children:[(0,r.jsx)(k.y,{type:"bare",loading:l,style:{alignSelf:"flex-start",padding:"4px 7px"},title:"Learn more about budgeting",onClick:()=>h(true),children:t==="report"?"Report budget":"Rollover budget"}),u&&(0,r.jsxs)(C.u,{position:"bottom-left",onClose:()=>h(false),style:{padding:10,maxWidth:400},children:[(0,r.jsxs)(A.Z,{children:["You are currently using a"," ",(0,r.jsxs)(N.Z,{style:{fontWeight:600},children:[t==="report"?"Report budget":"Rollover budget","."]})," ","Switching will not lose any data and you can always switch back."]}),(0,r.jsx)(A.Z,{children:(0,r.jsxs)(k.y,{type:"primary",loading:l,onClick:g,children:["Switch to a"," ",t==="report"?"Rollover budget":"Report budget"]})}),(0,r.jsx)(A.Z,{isLast:true,children:(0,r.jsx)(T.Z,{to:"https://actualbudget.org/docs/experimental/report-budget",linkColor:"muted",children:"How do these types of budgeting work?"})})]})]})]})}function X({style:e}){let t=(0,a.s0)();let n=(0,a.TH)();let o=(0,B.Ap)();let{isNarrowWidth:s}=(0,b.F)();let u=(0,L.o1)();let c=(0,i.v9)(e=>e.prefs.global.floatingSidebar);let p=(0,f.Z)("themes");return s?null:(0,r.jsxs)(E.Z,{style:{flexDirection:"row",alignItems:"center",padding:"0 15px",height:36,pointerEvents:"none","& *":{pointerEvents:"auto"},...!l.jU&&l.OS==="mac"&&c&&{paddingLeft:80},...e},children:[(c||o.alwaysFloats)&&(0,r.jsx)(k.Z,{type:"bare",style:{marginRight:8},onPointerEnter:e=>{if(e.pointerType==="mouse"){o.setHidden(false)}},onPointerLeave:e=>{if(e.pointerType==="mouse"){o.setHidden(true)}},onPointerUp:e=>{if(e.pointerType!=="mouse"){o.setHidden(!o.hidden)}},children:(0,r.jsx)(y,{className:"menu",style:{width:15,height:15,color:x.rS.pageText,left:0}})}),(0,r.jsxs)(a.Z5,{children:[(0,r.jsx)(a.AW,{path:"/accounts",element:n.state?.goBack?(0,r.jsxs)(k.Z,{type:"bare",onClick:()=>t(-1),children:[(0,r.jsx)(h.Z,{width:10,height:10,style:{marginRight:5,color:"currentColor"}})," ","Back"]}):null}),(0,r.jsx)(a.AW,{path:"/accounts/:id",element:(0,r.jsx)(I,{})}),(0,r.jsx)(a.AW,{path:"/budget",element:(0,r.jsx)(Q,{})}),(0,r.jsx)(a.AW,{path:"*",element:null})]}),(0,r.jsx)(E.Z,{style:{flex:1}}),(0,r.jsx)(q,{}),p&&(0,r.jsx)(K,{}),(0,r.jsx)(Y,{}),u?(0,r.jsx)(G,{style:{marginLeft:10}}):null,(0,r.jsx)(Z.Z,{style:{marginLeft:10}})]})}},6790:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(43188);var o=n(66204);var i=n(99818);var a=n(99548);var l=n(45492);var s=n(24307);var u=n(25411);function c({items:e,getItemProps:t,highlightedIndex:n,embedded:a,groupHeaderStyle:u}){let c=null;return(0,r.jsx)(s.Z,{children:(0,r.jsx)(s.Z,{style:{overflow:"auto",padding:"5px 0",...!a&&{maxHeight:175}},children:e.map((e,s)=>{const f=c?e.offbudget!==c.offbudget&&!e.closed||e.closed!==c.closed&&!e.offbudget:true;const h=`${e.closed?"Closed Accounts":e.offbudget?"Off Budget":"For Budget"}`;c=e;return[f?(0,r.jsx)("div",{style:{color:l.rS.alt2MenuItemTextHeader,padding:"4px 9px",...u},"data-testid":"account-item-group",children:h},h):null,(0,o.createElement)("div",{...t?t({item:e}):null,role:"button",key:e.id,className:`${(0,i.iv)([{backgroundColor:n===s?l.rS.alt2MenuItemBackgroundHover:"transparent",padding:4,paddingLeft:20,borderRadius:a?4:0}])}`,"data-testid":"account-item"+(n===s?"-highlighted":"")},e.name)]})})})}function f({embedded:e,includeClosedAccounts:t=true,groupHeaderStyle:n,closeOnBlur:o,...i}){let l=(0,a.gM)()||[];l=l.filter(e=>{return t?e:!e.closed}).sort((e,t)=>{if(e.closed===t.closed){return e.offbudget===t.offbudget?0:e.offbudget?1:-1}else{return e.closed?1:-1}});return(0,r.jsx)(u.ZP,{strict:true,highlightFirst:true,embedded:e,closeOnBlur:o,suggestions:l,renderItems:(t,o,i)=>(0,r.jsx)(c,{items:t,getItemProps:o,highlightedIndex:i,embedded:e,groupHeaderStyle:n}),...i})}},25411:function(e,t,n){"use strict";n.d(t,{oo:function(){return rl},ZP:function(){return rs},PW:function(){return n7}});var r=n(43188);var o=n(66204);function i(e,t){if(e==null)return{};var n={};var r=Object.keys(e);var o,i;for(i=0;i<r.length;i++){o=r[i];if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}var a=n(7896);var l=n(80753);var s=n(88960);function u(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;(0,s.Z)(e,t)}var c=n(97641);var f=n.n(c);var h=n(55815);let p=e=>"object"==typeof e&&null!=e&&1===e.nodeType,g=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,m=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return g(n.overflowY,t)||g(n.overflowX,t)||(e=>{let t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},v=(e,t,n,r,o,i,a,l)=>i<e&&a>t||i>e&&a<t?0:i<=e&&l<=n||a>=t&&l>=n?i-e-r:a>t&&l<n||i<e&&l>n?a-t+o:0,y=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};var b=(e,t)=>{var n,r,o,i,a,l;if("undefined"==typeof document)return[];let{scrollMode:s,block:u,inline:c,boundary:f,skipOverflowHiddenElements:h}=t,g="function"==typeof f?f:e=>e!==f;if(!p(e))throw new TypeError("Invalid target");let b=document.scrollingElement||document.documentElement,x=[],w=e;for(;p(w)&&g(w);){if(w=y(w),w===b){x.push(w);break}null!=w&&w===document.body&&m(w)&&!m(document.documentElement)||null!=w&&m(w,h)&&x.push(w)}let S=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,k=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,T=null!=(a=window.scrollX)?a:pageXOffset,E=null!=(l=window.scrollY)?l:pageYOffset,{height:C,width:j,top:I,right:D,bottom:P,left:O}=e.getBoundingClientRect(),M="start"===u||"nearest"===u?I:"end"===u?P:I+C/2,_="center"===c?O+j/2:"end"===c?D:O,R=[];for(let e=0;e<x.length;e++){let t=x[e],{height:n,width:r,top:o,right:i,bottom:a,left:l}=t.getBoundingClientRect();if("if-needed"===s&&I>=0&&O>=0&&P<=k&&D<=S&&I>=o&&P<=a&&O>=l&&D<=i)return R;let f=getComputedStyle(t),h=parseInt(f.borderLeftWidth,10),p=parseInt(f.borderTopWidth,10),g=parseInt(f.borderRightWidth,10),m=parseInt(f.borderBottomWidth,10),y=0,w=0,A="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-g:0,N="offsetHeight"in t?t.offsetHeight-t.clientHeight-p-m:0,Z="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(b===t)y="start"===u?M:"end"===u?M-k:"nearest"===u?v(E,E+k,k,p,m,E+M,E+M+C,C):M-k/2,w="start"===c?_:"center"===c?_-S/2:"end"===c?_-S:v(T,T+S,S,h,g,T+_,T+_+j,j),y=Math.max(0,y+E),w=Math.max(0,w+T);else{y="start"===u?M-o-p:"end"===u?M-a+m+N:"nearest"===u?v(o,a,n,p,m+N,M,M+C,C):M-(o+n/2)+N/2,w="start"===c?_-l-h:"center"===c?_-(l+r/2)+A/2:"end"===c?_-i+g+A:v(l,i,r,h,g+A,_,_+j,j);let{scrollLeft:e,scrollTop:s}=t;y=Math.max(0,Math.min(s+y/L,t.scrollHeight-n/L+N)),w=Math.max(0,Math.min(e+w/Z,t.scrollWidth-r/Z+A)),M+=s-y,_+=e-w}R.push({el:t,top:y,left:w})}return R};var x=function(e,t){x=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]};return x(e,t)};function w(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");x(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var S=function(){S=Object.assign||function e(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return S.apply(this,arguments)};function k(e,t){var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0)n[r]=e[r];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++){if(t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o]))n[r[o]]=e[r[o]]}return n}function T(e,t,n,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,t,n,r);else for(var l=e.length-1;l>=0;l--)if(a=e[l])i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i;return o>3&&i&&Object.defineProperty(t,n,i),i}function E(e,t){return function(n,r){t(n,r,e)}}function C(e,t,n,r,o,i){function a(e){if(e!==void 0&&typeof e!=="function")throw new TypeError("Function expected");return e}var l=r.kind,s=l==="getter"?"get":l==="setter"?"set":"value";var u=!t&&e?r["static"]?e:e.prototype:null;var c=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{});var f,h=false;for(var p=n.length-1;p>=0;p--){var g={};for(var m in r)g[m]=m==="access"?{}:r[m];for(var m in r.access)g.access[m]=r.access[m];g.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,n[p])(l==="accessor"?{get:c.get,set:c.set}:c[s],g);if(l==="accessor"){if(v===void 0)continue;if(v===null||typeof v!=="object")throw new TypeError("Object expected");if(f=a(v.get))c.get=f;if(f=a(v.set))c.set=f;if(f=a(v.init))o.unshift(f)}else if(f=a(v)){if(l==="field")o.unshift(f);else c[s]=f}}if(u)Object.defineProperty(u,r.name,c);h=true};function j(e,t,n){var r=arguments.length>2;for(var o=0;o<t.length;o++){n=r?t[o].call(e,n):t[o].call(e)}return r?n:void 0};function I(e){return typeof e==="symbol"?e:"".concat(e)};function D(e,t,n){if(typeof t==="symbol")t=t.description?"[".concat(t.description,"]"):"";return Object.defineProperty(e,"name",{configurable:true,value:n?"".concat(n," ",t):t})};function P(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)}function O(e,t,n,r){function o(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function l(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?n(e.value):o(e.value).then(a,l)}s((r=r.apply(e,t||[])).next())})}function M(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:l(0),"throw":l(1),"return":l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(e){return function(t){return s([e,t])}}function s(l){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,l[0]&&(n=0)),n)try{if(r=1,o&&(i=l[0]&2?o["return"]:l[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;if(o=0,i)l=[l[0]&2,i.value];switch(l[0]){case 0:case 1:i=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1];i=l;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(l);break}if(i[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];o=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}}var _=Object.create?function(e,t,n,r){if(r===undefined)r=n;var o=Object.getOwnPropertyDescriptor(t,n);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable)){o={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,r,o)}:function(e,t,n,r){if(r===undefined)r=n;e[r]=t[n]};function R(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))_(t,e,n)}function A(e){var t=typeof Symbol==="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&r>=e.length)e=void 0;return{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function N(e,t){var n=typeof Symbol==="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{while((t===void 0||t-- >0)&&!(o=r.next()).done)i.push(o.value)}catch(e){a={error:e}}finally{try{if(o&&!o.done&&(n=r["return"]))n.call(r)}finally{if(a)throw a.error}}return i}function Z(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(N(arguments[t]));return e}function L(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)r[o]=i[a];return r}function B(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++){if(i||!(r in t)){if(!i)i=Array.prototype.slice.call(t,0,r);i[r]=t[r]}}return e.concat(i||Array.prototype.slice.call(t))}function F(e){return this instanceof F?(this.v=e,this):new F(e)}function W(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),o,i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(e){if(r[e])o[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||l(e,t)})}}function l(e,t){try{s(r[e](t))}catch(e){f(i[0][3],e)}}function s(e){e.value instanceof F?Promise.resolve(e.value.v).then(u,c):f(i[0][2],e)}function u(e){l("next",e)}function c(e){l("throw",e)}function f(e,t){if(e(t),i.shift(),i.length)l(i[0][0],i[0][1])}}function U(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:F(e[r](t)),done:false}:o?o(t):t}:o}}function z(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof A==="function"?A(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,i){n=e[t](n),o(r,i,n.done,n.value)})}}function o(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function H(e,t){if(Object.defineProperty){Object.defineProperty(e,"raw",{value:t})}else{e.raw=t}return e};var K=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t};function $(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))_(t,e,n)}K(t,e);return t}function V(e){return e&&e.__esModule?e:{default:e}}function q(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}function Y(e,t,n,r,o){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?o.call(e,n):o?o.value=n:t.set(e,n),n}function G(e,t){if(t===null||typeof t!=="object"&&typeof t!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e==="function"?t===e:e.has(t)}var Q={__extends:w,__assign:S,__rest:k,__decorate:T,__param:E,__metadata:P,__awaiter:O,__generator:M,__createBinding:_,__exportStar:R,__values:A,__read:N,__spread:Z,__spreadArrays:L,__spreadArray:B,__await:F,__asyncGenerator:W,__asyncDelegator:U,__asyncValues:z,__makeTemplateObject:H,__importStar:$,__importDefault:V,__classPrivateFieldGet:q,__classPrivateFieldSet:Y,__classPrivateFieldIn:G};var X=0;function J(e){return typeof e==="function"?e:ee}function ee(){}function et(e,t){if(!e){return}var n=b(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n;t.scrollLeft=r})}function en(e,t,n){var r=e===t||t instanceof n.Node&&e.contains&&e.contains(t);return r}function er(e,t){var n;function r(){if(n){clearTimeout(n)}}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++){i[a]=arguments[a]}r();n=setTimeout(function(){n=null;e.apply(void 0,i)},t)}o.cancel=r;return o}function eo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++){r[o-1]=arguments[o]}return t.some(function(t){if(t){t.apply(void 0,[e].concat(r))}return e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault})}}function ei(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return function(e){t.forEach(function(t){if(typeof t==="function"){t(e)}else if(t){t.current=e}})}}function ea(){return String(X++)}function el(){X=0}function es(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;if(!t){return""}if(!n){return"No results are available."}if(n!==r){return n+" result"+(n===1?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select."}return""}function eu(e,t){e=Array.isArray(e)?e[0]:e;if(!e&&t){return t}else{return e}}function ec(e){return typeof e.type==="string"}function ed(e){return e.props}function ef(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var eh=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ep(e){if(e===void 0){e={}}var t={};eh.forEach(function(n){if(e.hasOwnProperty(n)){t[n]=e[n]}});return t}function eg(e,t){return Object.keys(e).reduce(function(n,r){n[r]=em(t,r)?t[r]:e[r];return n},{})}function em(e,t){return e[t]!==undefined}function ev(e){var t=e.key,n=e.keyCode;if(n>=37&&n<=40&&t.indexOf("Arrow")!==0){return"Arrow"+t}return t}function ey(e){return Object.prototype.toString.call(e)==="[object Object]"}function eb(e,t,n,r,o){if(o===void 0){o=true}if(n===0){return-1}var i=n-1;if(typeof t!=="number"||t<0||t>=n){t=e>0?-1:i+1}var a=t+e;if(a<0){a=o?i:0}else if(a>i){a=o?0:i}var l=ex(e,a,n,r,o);if(l===-1){return t>=n?-1:t}return l}function ex(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled")){return t}if(e>0){for(var a=t+1;a<n;a++){if(!r(a).hasAttribute("disabled")){return a}}}else{for(var l=t-1;l>=0;l--){if(!r(l).hasAttribute("disabled")){return l}}}if(o){return e>0?ex(1,0,n,r,false):ex(-1,n-1,n,r,false)}return-1}function ew(e,t,n,r){if(r===void 0){r=true}return t.some(function(t){return t&&(en(t,e,n)||r&&en(t,n.document.activeElement,n))})}var eS=null&ⅇif(false){}var ek=er(function(e){eE(e).textContent=""},500);function eT(e,t){var n=eE(t);if(!e){return}n.textContent=e;ek(t)}function eE(e){if(e===void 0){e=document}var t=e.getElementById("a11y-status-message");if(t){return t}t=e.createElement("div");t.setAttribute("id","a11y-status-message");t.setAttribute("role","status");t.setAttribute("aria-live","polite");t.setAttribute("aria-relevant","additions text");Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"});e.body.appendChild(t);return t}var eC=false?0:0;var ej=false?0:1;var eI=false?0:2;var eD=false?0:3;var eP=false?0:4;var eO=false?0:5;var eM=false?0:6;var e_=false?0:7;var eR=false?0:8;var eA=false?0:9;var eN=false?0:10;var eZ=false?0:11;var eL=false?0:12;var eB=false?0:13;var eF=false?0:14;var eW=false?0:15;var eU=false?0:16;var ez=Object.freeze({__proto__:null,unknown:eC,mouseUp:ej,itemMouseEnter:eI,keyDownArrowUp:eD,keyDownArrowDown:eP,keyDownEscape:eO,keyDownEnter:eM,keyDownHome:e_,keyDownEnd:eR,clickItem:eA,blurInput:eN,changeInput:eZ,keyDownSpaceButton:eL,clickButton:eB,blurButton:eF,controlledPropUpdatedSelectedItem:eW,touchEnd:eU});var eH=["refKey","ref"],eK=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],e$=["onKeyDown","onBlur","onChange","onInput","onChangeText"],eV=["refKey","ref"],eq=["onMouseMove","onMouseDown","onClick","onPress","index","item"];var eY=function(){var e=function(e){u(t,e);function t(t){var n;n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+ea();n.menuId=n.props.menuId||n.id+"-menu";n.labelId=n.props.labelId||n.id+"-label";n.inputId=n.props.inputId||n.id+"-input";n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e};n.input=null;n.items=[];n.itemCount=null;n.previousResultCount=0;n.timeoutIds=[];n.internalSetTimeout=function(e,t){var r=setTimeout(function(){n.timeoutIds=n.timeoutIds.filter(function(e){return e!==r});e()},t);n.timeoutIds.push(r)};n.setItemCount=function(e){n.itemCount=e};n.unsetItemCount=function(){n.itemCount=null};n.setHighlightedIndex=function(e,t){if(e===void 0){e=n.props.defaultHighlightedIndex}if(t===void 0){t={}}t=ep(t);n.internalSetState((0,a.Z)({highlightedIndex:e},t))};n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)};n.selectItem=function(e,t,r){t=ep(t);n.internalSetState((0,a.Z)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)};n.selectItemAtIndex=function(e,t,r){var o=n.items[e];if(o==null){return}n.selectItem(o,t,r)};n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)};n.internalSetState=function(e,t){var r,o;var i={};var l=typeof e==="function";if(!l&&e.hasOwnProperty("inputValue")){n.props.onInputValueChange(e.inputValue,(0,a.Z)({},n.getStateAndHelpers(),e))}return n.setState(function(t){t=n.getState(t);var s=l?e(t):e;s=n.props.stateReducer(t,s);r=s.hasOwnProperty("selectedItem");var u={};if(r&&s.selectedItem!==t.selectedItem){o=s.selectedItem}s.type=s.type||eC;Object.keys(s).forEach(function(e){if(t[e]!==s[e]){i[e]=s[e]}if(e==="type"){return}s[e];if(!em(n.props,e)){u[e]=s[e]}});if(l&&s.hasOwnProperty("inputValue")){n.props.onInputValueChange(s.inputValue,(0,a.Z)({},n.getStateAndHelpers(),s))}return u},function(){J(t)();var a=Object.keys(i).length>1;if(a){n.props.onStateChange(i,n.getStateAndHelpers())}if(r){n.props.onSelect(e.selectedItem,n.getStateAndHelpers())}if(o!==undefined){n.props.onChange(o,n.getStateAndHelpers())}n.props.onUserAction(i,n.getStateAndHelpers())})};n.rootRef=function(e){return n._rootNode=e};n.getRootProps=function(e,t){var r;var o=e===void 0?{}:e,l=o.refKey,s=l===void 0?"ref":l,u=o.ref,c=i(o,eH);var f=t===void 0?{}:t,h=f.suppressRefError,p=h===void 0?false:h;n.getRootProps.called=true;n.getRootProps.refKey=s;n.getRootProps.suppressRefError=p;var g=n.getState(),m=g.isOpen;return(0,a.Z)((r={},r[s]=ei(u,n.rootRef),r.role="combobox",r["aria-expanded"]=m,r["aria-haspopup"]="listbox",r["aria-owns"]=m?n.menuId:null,r["aria-labelledby"]=n.labelId,r),c)};n.keyDownHandlers={ArrowDown:function e(e){var t=this;e.preventDefault();if(this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:eP})}else{this.internalSetState({isOpen:true,type:eP},function(){var e=t.getItemCount();if(e>0){var n=t.getState(),r=n.highlightedIndex;var o=eb(1,r,e,function(e){return t.getItemNodeFromIndex(e)});t.setHighlightedIndex(o,{type:eP})}})}},ArrowUp:function e(e){var t=this;e.preventDefault();if(this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:eD})}else{this.internalSetState({isOpen:true,type:eD},function(){var e=t.getItemCount();if(e>0){var n=t.getState(),r=n.highlightedIndex;var o=eb(-1,r,e,function(e){return t.getItemNodeFromIndex(e)});t.setHighlightedIndex(o,{type:eD})}})}},Enter:function e(e){if(e.which===229){return}var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&r!=null){e.preventDefault();var o=this.items[r];var i=this.getItemNodeFromIndex(r);if(o==null||i&&i.hasAttribute("disabled")){return}this.selectHighlightedItem({type:eM})}},Escape:function e(e){e.preventDefault();this.reset((0,a.Z)({type:eO},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}};n.buttonKeyDownHandlers=(0,a.Z)({},n.keyDownHandlers,{" ":function e(e){e.preventDefault();this.toggleMenu({type:eL})}});n.inputKeyDownHandlers=(0,a.Z)({},n.keyDownHandlers,{Home:function e(e){var t=this;var n=this.getState(),r=n.isOpen;if(!r){return}e.preventDefault();var o=this.getItemCount();if(o<=0||!r){return}var i=ex(1,0,o,function(e){return t.getItemNodeFromIndex(e)},false);this.setHighlightedIndex(i,{type:e_})},End:function e(e){var t=this;var n=this.getState(),r=n.isOpen;if(!r){return}e.preventDefault();var o=this.getItemCount();if(o<=0||!r){return}var i=ex(-1,o-1,o,function(e){return t.getItemNodeFromIndex(e)},false);this.setHighlightedIndex(i,{type:eR})}});n.getToggleButtonProps=function(e){var t=e===void 0?{}:e,r=t.onClick;t.onPress;var o=t.onKeyDown,l=t.onKeyUp,s=t.onBlur,u=i(t,eK);var c=n.getState(),f=c.isOpen;var h={onClick:eo(r,n.buttonHandleClick),onKeyDown:eo(o,n.buttonHandleKeyDown),onKeyUp:eo(l,n.buttonHandleKeyUp),onBlur:eo(s,n.buttonHandleBlur)};var p=u.disabled?{}:h;return(0,a.Z)({type:"button",role:"button","aria-label":f?"close menu":"open menu","aria-haspopup":true,"data-toggle":true},p,u)};n.buttonHandleKeyUp=function(e){e.preventDefault()};n.buttonHandleKeyDown=function(e){var t=ev(e);if(n.buttonKeyDownHandlers[t]){n.buttonKeyDownHandlers[t].call((0,l.Z)(n),e)}};n.buttonHandleClick=function(e){e.preventDefault();if(n.props.environment.document.activeElement===n.props.environment.document.body){e.target.focus()}if(false){}else{n.internalSetTimeout(function(){return n.toggleMenu({type:eB})})}};n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout(function(){if(!n.isMouseDown&&(n.props.environment.document.activeElement==null||n.props.environment.document.activeElement.id!==n.inputId)&&n.props.environment.document.activeElement!==t){n.reset({type:eF})}})};n.getLabelProps=function(e){return(0,a.Z)({htmlFor:n.inputId,id:n.labelId},e)};n.getInputProps=function(e){var t=e===void 0?{}:e,r=t.onKeyDown,o=t.onBlur,l=t.onChange,s=t.onInput;t.onChangeText;var u=i(t,e$);var c;var f={};{c="onChange"}var h=n.getState(),p=h.inputValue,g=h.isOpen,m=h.highlightedIndex;if(!u.disabled){var v;f=(v={},v[c]=eo(l,s,n.inputHandleChange),v.onKeyDown=eo(r,n.inputHandleKeyDown),v.onBlur=eo(o,n.inputHandleBlur),v)}return(0,a.Z)({"aria-autocomplete":"list","aria-activedescendant":g&&typeof m==="number"&&m>=0?n.getItemId(m):null,"aria-controls":g?n.menuId:null,"aria-labelledby":u&&u["aria-label"]?undefined:n.labelId,autoComplete:"off",value:p,id:n.inputId},f,u)};n.inputHandleKeyDown=function(e){var t=ev(e);if(t&&n.inputKeyDownHandlers[t]){n.inputKeyDownHandlers[t].call((0,l.Z)(n),e)}};n.inputHandleChange=function(e){n.internalSetState({type:eZ,isOpen:true,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})};n.inputHandleBlur=function(){n.internalSetTimeout(function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);if(!n.isMouseDown&&!e){n.reset({type:eN})}})};n.menuRef=function(e){n._menuNode=e};n.getMenuProps=function(e,t){var r;var o=e===void 0?{}:e,l=o.refKey,s=l===void 0?"ref":l,u=o.ref,c=i(o,eV);var f=t===void 0?{}:t,h=f.suppressRefError,p=h===void 0?false:h;n.getMenuProps.called=true;n.getMenuProps.refKey=s;n.getMenuProps.suppressRefError=p;return(0,a.Z)((r={},r[s]=ei(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=c&&c["aria-label"]?null:n.labelId,r.id=n.menuId,r),c)};n.getItemProps=function(e){var t;var r=e===void 0?{}:e,o=r.onMouseMove,l=r.onMouseDown,s=r.onClick;r.onPress;var u=r.index,c=r.item,f=c===void 0?true?undefined:0:c,h=i(r,eq);if(u===undefined){n.items.push(f);u=n.items.indexOf(f)}else{n.items[u]=f}var p="onClick";var g=s;var m=(t={onMouseMove:eo(o,function(){if(u===n.getState().highlightedIndex){return}n.setHighlightedIndex(u,{type:eI});n.avoidScrolling=true;n.internalSetTimeout(function(){return n.avoidScrolling=false},250)}),onMouseDown:eo(l,function(e){e.preventDefault()})},t[p]=eo(g,function(){n.selectItemAtIndex(u,{type:eA})}),t);var v=h.disabled?{onMouseDown:m.onMouseDown}:m;return(0,a.Z)({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},v,h)};n.clearItems=function(){n.items=[]};n.reset=function(e,t){if(e===void 0){e={}}e=ep(e);n.internalSetState(function(t){var r=t.selectedItem;return(0,a.Z)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)},t)};n.toggleMenu=function(e,t){if(e===void 0){e={}}e=ep(e);n.internalSetState(function(t){var r=t.isOpen;return(0,a.Z)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)},function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;if(o){if(n.getItemCount()>0&&typeof i==="number"){n.setHighlightedIndex(i,e)}}J(t)()})};n.openMenu=function(e){n.internalSetState({isOpen:true},e)};n.closeMenu=function(e){n.internalSetState({isOpen:false},e)};n.updateStatus=er(function(){var e=n.getState();var t=n.items[e.highlightedIndex];var r=n.getItemCount();var o=n.props.getA11yStatusMessage((0,a.Z)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r;eT(o,n.props.environment.document)},200);var r=n.props,o=r.defaultHighlightedIndex,s=r.initialHighlightedIndex,u=s===void 0?o:s,c=r.defaultIsOpen,f=r.initialIsOpen,h=f===void 0?c:f,p=r.initialInputValue,g=p===void 0?"":p,m=r.initialSelectedItem,v=m===void 0?null:m;var y=n.getState({highlightedIndex:u,isOpen:h,inputValue:g,selectedItem:v});if(y.selectedItem!=null&&n.props.initialInputValue===undefined){y.inputValue=n.props.itemToString(y.selectedItem)}n.state=y;return n}var n=t.prototype;n.internalClearTimeouts=function e(){this.timeoutIds.forEach(function(e){clearTimeout(e)});this.timeoutIds=[]};n.getState=function e(e){if(e===void 0){e=this.state}return eg(e,this.props)};n.getItemCount=function e(){var e=this.items.length;if(this.itemCount!=null){e=this.itemCount}else if(this.props.itemCount!==undefined){e=this.props.itemCount}return e};n.getItemNodeFromIndex=function e(e){return this.props.environment.document.getElementById(this.getItemId(e))};n.scrollHighlightedItemIntoView=function e(){{var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)}};n.moveHighlightedIndex=function e(e,t){var n=this;var r=this.getItemCount();var o=this.getState(),i=o.highlightedIndex;if(r>0){var a=eb(e,i,r,function(e){return n.getItemNodeFromIndex(e)});this.setHighlightedIndex(a,t)}};n.getStateAndHelpers=function e(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen;var i=this.props.itemToString;var a=this.id;var l=this.getRootProps,s=this.getToggleButtonProps,u=this.getLabelProps,c=this.getMenuProps,f=this.getInputProps,h=this.getItemProps,p=this.openMenu,g=this.closeMenu,m=this.toggleMenu,v=this.selectItem,y=this.selectItemAtIndex,b=this.selectHighlightedItem,x=this.setHighlightedIndex,w=this.clearSelection,S=this.clearItems,k=this.reset,T=this.setItemCount,E=this.unsetItemCount,C=this.internalSetState;return{getRootProps:l,getToggleButtonProps:s,getLabelProps:u,getMenuProps:c,getInputProps:f,getItemProps:h,reset:k,openMenu:p,closeMenu:g,toggleMenu:m,selectItem:v,selectItemAtIndex:y,selectHighlightedItem:b,setHighlightedIndex:x,clearSelection:w,clearItems:S,setItemCount:T,unsetItemCount:E,setState:C,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}};n.componentDidMount=function e(){var e=this;if(false){}{var t=function t(){e.isMouseDown=true};var n=function t(t){e.isMouseDown=false;var n=ew(t.target,[e._rootNode,e._menuNode],e.props.environment);if(!n&&e.getState().isOpen){e.reset({type:ej},function(){return e.props.onOuterClick(e.getStateAndHelpers())})}};var r=function t(){e.isTouchMove=false};var o=function t(){e.isTouchMove=true};var i=function t(t){var n=ew(t.target,[e._rootNode,e._menuNode],e.props.environment,false);if(!e.isTouchMove&&!n&&e.getState().isOpen){e.reset({type:eU},function(){return e.props.onOuterClick(e.getStateAndHelpers())})}};var a=this.props.environment;a.addEventListener("mousedown",t);a.addEventListener("mouseup",n);a.addEventListener("touchstart",r);a.addEventListener("touchmove",o);a.addEventListener("touchend",i);this.cleanup=function(){e.internalClearTimeouts();e.updateStatus.cancel();a.removeEventListener("mousedown",t);a.removeEventListener("mouseup",n);a.removeEventListener("touchstart",r);a.removeEventListener("touchmove",o);a.removeEventListener("touchend",i)}}};n.shouldScroll=function e(e,t){var n=this.props.highlightedIndex===undefined?this.getState():this.props,r=n.highlightedIndex;var o=t.highlightedIndex===undefined?e:t,i=o.highlightedIndex;var a=r&&this.getState().isOpen&&!e.isOpen;var l=r!==i;return a||l};n.componentDidUpdate=function e(e,t){if(false){}if(em(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)){this.internalSetState({type:eW,inputValue:this.props.itemToString(this.props.selectedItem)})}if(!this.avoidScrolling&&this.shouldScroll(t,e)){this.scrollHighlightedItemIntoView()}{this.updateStatus()}};n.componentWillUnmount=function e(){this.cleanup()};n.render=function e(){var e=eu(this.props.children,ee);this.clearItems();this.getRootProps.called=false;this.getRootProps.refKey=undefined;this.getRootProps.suppressRefError=undefined;this.getMenuProps.called=false;this.getMenuProps.refKey=undefined;this.getMenuProps.suppressRefError=undefined;this.getLabelProps.called=false;this.getInputProps.called=false;var t=eu(e(this.getStateAndHelpers()));if(!t){return null}if(this.getRootProps.called||this.props.suppressRefError){if(false){}return t}else if(ec(t)){return(0,o.cloneElement)(t,this.getRootProps(ed(t)))}if(false){}return undefined};return t}(o.Component);e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:false,getA11yStatusMessage:es,itemToString:function e(e){if(e==null){return""}if(false){}return String(e)},onStateChange:ee,onInputValueChange:ee,onUserAction:ee,onChange:ee,onSelect:ee,onOuterClick:ee,selectedItemChanged:function e(e,t){return e!==t},environment:typeof window==="undefined"?{}:window,stateReducer:function e(e,t){return t},suppressRefError:false,scrollIntoView:et};e.stateChangeTypes=ez;return e}();false?0:void 0;var eG=eY;function eQ(e,t){var n=t.refKey;if(!e){console.error('downshift: The ref prop "'+n+'" from getMenuProps was not applied correctly on your menu element.')}}function eX(e,t){var n=t.refKey;var r=n!=="ref";var o=!ec(e);if(o&&!r&&!isForwardRef(e)){console.error("downshift: You returned a non-DOM element. You must specify a refKey in getRootProps")}else if(!o&&r){console.error('downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "'+n+'"')}if(!isForwardRef(e)&&!ed(e)[n]){console.error('downshift: You must apply the ref prop "'+n+'" from getRootProps onto your root element.')}}var eJ=["isInitialMount","highlightedIndex","items","environment"];var e0={highlightedIndex:-1,isOpen:false,selectedItem:null,inputValue:""};function e1(e,t,n){var r=e.props,o=e.type;var i={};Object.keys(t).forEach(function(r){e2(r,e,t,n);if(n[r]!==t[r]){i[r]=n[r]}});if(r.onStateChange&&Object.keys(i).length){r.onStateChange((0,a.Z)({type:o},i))}}function e2(e,t,n,r){var o=t.props,i=t.type;var l="on"+tt(e)+"Change";if(o[l]&&r[e]!==undefined&&r[e]!==n[e]){o[l]((0,a.Z)({type:i},r))}}function e4(e,t){return t.changes}function e5(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""}var e3=er(function(e,t){eT(e(),t)},200);var e7=typeof window!=="undefined"&&typeof window.document!=="undefined"&&typeof window.document.createElement!=="undefined"?o.useLayoutEffect:o.useEffect;function e6(e){var t=e.id,n=t===void 0?"downshift-"+ea():t,r=e.labelId,i=e.menuId,a=e.getItemId,l=e.toggleButtonId,s=e.inputId;var u=(0,o.useRef)({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:a||function(e){return n+"-item-"+e},toggleButtonId:l||n+"-toggle-button",inputId:s||n+"-input"});return u.current}function e8(e,t,n,r){var o,i;if(e===undefined){if(t===undefined){throw new Error(r)}o=n[t];i=t}else{i=t===undefined?n.indexOf(e):t;o=e}return[o,i]}function e9(e){return e?String(e):""}function te(e){return/^\S{1}$/.test(e)}function tt(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function tn(e){var t=(0,o.useRef)(e);t.current=e;return t}function tr(e,t,n){var r=(0,o.useRef)();var i=(0,o.useRef)();var l=(0,o.useCallback)(function(t,n){i.current=n;t=eg(t,n.props);var r=e(t,n);var o=n.props.stateReducer(t,(0,a.Z)({},n,{changes:r}));return o},[e]);var s=(0,o.useReducer)(l,t),u=s[0],c=s[1];var f=tn(n);var h=(0,o.useCallback)(function(e){return c((0,a.Z)({props:f.current},e))},[f]);var p=i.current;(0,o.useEffect)(function(){if(p&&r.current&&r.current!==u){e1(p,eg(r.current,p.props),u)}r.current=u},[u,n,p]);return[u,h]}function to(e,t,n){var r=tr(e,t,n),o=r[0],i=r[1];return[eg(o,n),i]}var ti={itemToString:e9,stateReducer:e4,getA11ySelectionMessage:e5,scrollIntoView:et,environment:typeof window==="undefined"?{}:window};function ta(e,t,n){if(n===void 0){n=e0}var r=e["default"+tt(t)];if(r!==undefined){return r}return n[t]}function tl(e,t,n){if(n===void 0){n=e0}var r=e[t];if(r!==undefined){return r}var o=e["initial"+tt(t)];if(o!==undefined){return o}return ta(e,t,n)}function ts(e){var t=tl(e,"selectedItem");var n=tl(e,"isOpen");var r=tl(e,"highlightedIndex");var o=tl(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function tu(e,t,n){var r=e.items,o=e.initialHighlightedIndex,i=e.defaultHighlightedIndex;var a=t.selectedItem,l=t.highlightedIndex;if(r.length===0){return-1}if(o!==undefined&&l===o){return o}if(i!==undefined){return i}if(a){return r.indexOf(a)}if(n===0){return-1}return n<0?r.length-1:0}function tc(e,t,n,r){var i=(0,o.useRef)({isMouseDown:false,isTouchMove:false});(0,o.useEffect)(function(){if((n==null?void 0:n.addEventListener)==null){return}var o=function e(){i.current.isMouseDown=true};var a=function o(o){i.current.isMouseDown=false;if(e&&!ew(o.target,t.map(function(e){return e.current}),n)){r()}};var l=function e(){i.current.isTouchMove=false};var s=function e(){i.current.isTouchMove=true};var u=function o(o){if(e&&!i.current.isTouchMove&&!ew(o.target,t.map(function(e){return e.current}),n,false)){r()}};n.addEventListener("mousedown",o);n.addEventListener("mouseup",a);n.addEventListener("touchstart",l);n.addEventListener("touchmove",s);n.addEventListener("touchend",u);return function e(){n.removeEventListener("mousedown",o);n.removeEventListener("mouseup",a);n.removeEventListener("touchstart",l);n.removeEventListener("touchmove",s);n.removeEventListener("touchend",u)}},[e,n]);return i}var td=function e(){return ee};if(false){}function tf(e,t,n){var r=n.isInitialMount,l=n.highlightedIndex,s=n.items,u=n.environment,c=i(n,eJ);(0,o.useEffect)(function(){if(r||false){return}e3(function(){return e((0,a.Z)({highlightedIndex:l,highlightedItem:s[l],resultCount:s.length},c))},u.document)},t)}function th(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,a=e.menuElement,l=e.scrollIntoView;var s=(0,o.useRef)(true);e7(function(){if(t<0||!n||!Object.keys(r.current).length){return}if(s.current===false){s.current=true}else{l(i(t),a)}},[t]);return s}var tp=ee;if(false){}function tg(e,t,n){var r;if(n===void 0){n=true}var o=((r=e.items)==null?void 0:r.length)&&t>=0;return(0,a.Z)({isOpen:false,highlightedIndex:-1},o&&(0,a.Z)({selectedItem:e.items[t],isOpen:ta(e,"isOpen"),highlightedIndex:ta(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function tm(e,t,n){var r=t.type,o=t.props;var i;switch(r){case n.ItemMouseMove:i={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:i={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:i={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:tu(o,e,0)};break;case n.FunctionOpenMenu:i={isOpen:true,highlightedIndex:tu(o,e,0)};break;case n.FunctionCloseMenu:i={isOpen:false};break;case n.FunctionSetHighlightedIndex:i={highlightedIndex:t.highlightedIndex};break;case n.FunctionSetInputValue:i={inputValue:t.inputValue};break;case n.FunctionReset:i={highlightedIndex:ta(o,"highlightedIndex"),isOpen:ta(o,"isOpen"),selectedItem:ta(o,"selectedItem"),inputValue:ta(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return(0,a.Z)({},e,i)}function tv(e){var t=e.keysSoFar,n=e.highlightedIndex,r=e.items,o=e.itemToString,i=e.getItemNodeFromIndex;var a=t.toLowerCase();for(var l=0;l<r.length;l++){var s=(l+n+(t.length<2?1:0))%r.length;var u=r[s];if(u!==undefined&&o(u).toLowerCase().startsWith(a)){var c=i(s);if(!(c===null||c===void 0?void 0:c.hasAttribute("disabled"))){return s}}}return n}var ty={items:f().array.isRequired,itemToString:f().func,getA11yStatusMessage:f().func,getA11ySelectionMessage:f().func,highlightedIndex:f().number,defaultHighlightedIndex:f().number,initialHighlightedIndex:f().number,isOpen:f().bool,defaultIsOpen:f().bool,initialIsOpen:f().bool,selectedItem:f().any,initialSelectedItem:f().any,defaultSelectedItem:f().any,id:f().string,labelId:f().string,menuId:f().string,getItemId:f().func,toggleButtonId:f().string,stateReducer:f().func,onSelectedItemChange:f().func,onHighlightedIndexChange:f().func,onStateChange:f().func,onIsOpenChange:f().func,environment:f().shape({addEventListener:f().func,removeEventListener:f().func,document:f().shape({getElementById:f().func,activeElement:f().any,body:f().any})})};function tb(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;if(!t){return""}if(!n){return"No results are available."}if(n!==r){return"".concat(n," result").concat(n===1?" is":"s are"," available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.")}return""}var tx=S(S({},ti),{getA11yStatusMessage:tb});var tw=ee;if(false){}var tS=false?0:0;var tk=false?0:1;var tT=false?0:2;var tE=false?0:3;var tC=false?0:4;var tj=false?0:5;var tI=false?0:6;var tD=false?0:7;var tP=false?0:8;var tO=false?0:9;var tM=false?0:10;var t_=false?0:11;var tR=false?0:12;var tA=false?0:13;var tN=false?0:14;var tZ=false?0:15;var tL=false?0:16;var tB=false?0:17;var tF=false?0:18;var tW=false?0:19;var tU=false?0:20;var tz=false?0:21;var tH=Object.freeze({__proto__:null,ToggleButtonClick:tS,ToggleButtonKeyDownArrowDown:tk,ToggleButtonKeyDownArrowUp:tT,ToggleButtonKeyDownCharacter:tE,ToggleButtonKeyDownEscape:tC,ToggleButtonKeyDownHome:tj,ToggleButtonKeyDownEnd:tI,ToggleButtonKeyDownEnter:tD,ToggleButtonKeyDownSpaceButton:tP,ToggleButtonKeyDownPageUp:tO,ToggleButtonKeyDownPageDown:tM,ToggleButtonBlur:t_,MenuMouseLeave:tR,ItemMouseMove:tA,ItemClick:tN,FunctionToggleMenu:tZ,FunctionOpenMenu:tL,FunctionCloseMenu:tB,FunctionSetHighlightedIndex:tF,FunctionSelectItem:tW,FunctionSetInputValue:tU,FunctionReset:tz});function tK(e,t){var n;var r=t.type,o=t.props,i=t.altKey;var l;switch(r){case tN:l={isOpen:ta(o,"isOpen"),highlightedIndex:ta(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case tE:{var s=t.key;var u=""+e.inputValue+s;var c=!e.isOpen&&e.selectedItem?o.items.indexOf(e.selectedItem):e.highlightedIndex;var f=tv({keysSoFar:u,highlightedIndex:c,items:o.items,itemToString:o.itemToString,getItemNodeFromIndex:t.getItemNodeFromIndex});l={inputValue:u,highlightedIndex:f,isOpen:true}}break;case tk:{var h=e.isOpen?eb(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,false):i&&e.selectedItem==null?-1:tu(o,e,1);l={highlightedIndex:h,isOpen:true}}break;case tT:if(e.isOpen&&i){l=tg(o,e.highlightedIndex,false)}else{var p=e.isOpen?eb(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,false):tu(o,e,-1);l={highlightedIndex:p,isOpen:true}}break;case tD:case tP:l=tg(o,e.highlightedIndex,false);break;case tj:l={highlightedIndex:ex(1,0,o.items.length,t.getItemNodeFromIndex,false),isOpen:true};break;case tI:l={highlightedIndex:ex(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,false),isOpen:true};break;case tO:l={highlightedIndex:eb(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,false)};break;case tM:l={highlightedIndex:eb(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,false)};break;case tC:l={isOpen:false,highlightedIndex:-1};break;case t_:l=(0,a.Z)({isOpen:false,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&{selectedItem:o.items[e.highlightedIndex]});break;case tW:l={selectedItem:t.selectedItem};break;default:return tm(e,t,tH)}return(0,a.Z)({},e,l)}var t$=["onMouseLeave","refKey","onKeyDown","onBlur","ref"],tV=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],tq=["item","index","onMouseMove","onClick","onPress","refKey","ref","disabled"];tY.stateChangeTypes=tH;function tY(e){if(e===void 0){e={}}tw(e,tY);var t=(0,a.Z)({},tx,e);var n=t.items,r=t.scrollIntoView,l=t.environment,s=t.itemToString,u=t.getA11ySelectionMessage,c=t.getA11yStatusMessage;var f=ts(t);var h=to(tK,f,t),p=h[0],g=h[1];var m=p.isOpen,v=p.highlightedIndex,y=p.selectedItem,b=p.inputValue;var x=(0,o.useRef)(null);var w=(0,o.useRef)(null);var S=(0,o.useRef)({});var k=(0,o.useRef)(null);var T=e6(t);var E=(0,o.useRef)();var C=(0,o.useRef)(true);var j=tn({state:p,props:t});var I=(0,o.useCallback)(function(e){return S.current[T.getItemId(e)]},[T]);tf(c,[m,v,b,n],(0,a.Z)({isInitialMount:C.current,previousResultCount:E.current,items:n,environment:l,itemToString:s},p));tf(u,[y],(0,a.Z)({isInitialMount:C.current,previousResultCount:E.current,items:n,environment:l,itemToString:s},p));var D=th({menuElement:w.current,highlightedIndex:v,isOpen:m,itemRefs:S,scrollIntoView:r,getItemNodeFromIndex:I});(0,o.useEffect)(function(){k.current=er(function(e){e({type:tU,inputValue:""})},500);return function(){k.current.cancel()}},[]);(0,o.useEffect)(function(){if(!b){return}k.current(g)},[g,b]);tp({isInitialMount:C.current,props:t,state:p});(0,o.useEffect)(function(){if(C.current){return}E.current=n.length});var P=tc(m,[w,x],l,function(){g({type:t_})});var O=td("getMenuProps","getToggleButtonProps");(0,o.useEffect)(function(){C.current=false;return function(){C.current=true}},[]);(0,o.useEffect)(function(){if(!m){S.current={}}},[m]);var M=(0,o.useMemo)(function(){return{ArrowDown:function e(e){e.preventDefault();g({type:tk,getItemNodeFromIndex:I,altKey:e.altKey})},ArrowUp:function e(e){e.preventDefault();g({type:tT,getItemNodeFromIndex:I,altKey:e.altKey})},Home:function e(e){e.preventDefault();g({type:tj,getItemNodeFromIndex:I})},End:function e(e){e.preventDefault();g({type:tI,getItemNodeFromIndex:I})},Escape:function e(){if(j.current.state.isOpen){g({type:tC})}},Enter:function e(e){e.preventDefault();g({type:j.current.state.isOpen?tD:tS})},PageUp:function e(e){if(j.current.state.isOpen){e.preventDefault();g({type:tO,getItemNodeFromIndex:I})}},PageDown:function e(e){if(j.current.state.isOpen){e.preventDefault();g({type:tM,getItemNodeFromIndex:I})}}," ":function e(e){e.preventDefault();var t=j.current.state;if(!t.isOpen){g({type:tS});return}if(t.inputValue){g({type:tE,key:" ",getItemNodeFromIndex:I})}else{g({type:tP})}}}},[g,I,j]);var _=(0,o.useCallback)(function(){g({type:tZ})},[g]);var R=(0,o.useCallback)(function(){g({type:tB})},[g]);var A=(0,o.useCallback)(function(){g({type:tL})},[g]);var N=(0,o.useCallback)(function(e){g({type:tF,highlightedIndex:e})},[g]);var Z=(0,o.useCallback)(function(e){g({type:tW,selectedItem:e})},[g]);var L=(0,o.useCallback)(function(){g({type:tz})},[g]);var B=(0,o.useCallback)(function(e){g({type:tU,inputValue:e})},[g]);var F=(0,o.useCallback)(function(e){return(0,a.Z)({id:T.labelId,htmlFor:T.toggleButtonId},e)},[T]);var W=(0,o.useCallback)(function(e,t){var n;var r=e===void 0?{}:e,o=r.onMouseLeave,l=r.refKey,s=l===void 0?"ref":l;r.onKeyDown;r.onBlur;var u=r.ref,c=i(r,t$);var f=t===void 0?{}:t,h=f.suppressRefError,p=h===void 0?false:h;var m=function e(){g({type:tR})};O("getMenuProps",p,s,w);return(0,a.Z)((n={},n[s]=ei(u,function(e){w.current=e}),n.id=T.menuId,n.role="listbox",n["aria-labelledby"]=c&&c["aria-label"]?undefined:""+T.labelId,n.onMouseLeave=eo(o,m),n),c)},[g,O,T]);var U=(0,o.useCallback)(function(e,t){var n;var r=e===void 0?{}:e,o=r.onBlur,l=r.onClick;r.onPress;var s=r.onKeyDown,u=r.refKey,c=u===void 0?"ref":u,f=r.ref,h=i(r,tV);var p=t===void 0?{}:t,m=p.suppressRefError,v=m===void 0?false:m;var y=j.current.state;var b=function e(){g({type:tS})};var w=function e(){if(y.isOpen&&!P.current.isMouseDown){g({type:t_})}};var S=function e(e){var t=ev(e);if(t&&M[t]){M[t](e)}else if(te(t)){g({type:tE,key:t,getItemNodeFromIndex:I})}};var k=(0,a.Z)((n={},n[c]=ei(f,function(e){x.current=e}),n["aria-activedescendant"]=y.isOpen&&y.highlightedIndex>-1?T.getItemId(y.highlightedIndex):"",n["aria-controls"]=T.menuId,n["aria-expanded"]=j.current.state.isOpen,n["aria-haspopup"]="listbox",n["aria-labelledby"]=h&&h["aria-label"]?undefined:""+T.labelId,n.id=T.toggleButtonId,n.role="combobox",n.tabIndex=0,n.onBlur=eo(o,w),n),h);if(!h.disabled){{k.onClick=eo(l,b);k.onKeyDown=eo(s,S)}}O("getToggleButtonProps",v,c,x);return k},[j,T,O,g,P,M,I]);var z=(0,o.useCallback)(function(e){var t;var n=e===void 0?{}:e,r=n.item,o=n.index,l=n.onMouseMove,s=n.onClick;n.onPress;var u=n.refKey,c=u===void 0?"ref":u,f=n.ref,h=n.disabled,p=i(n,tq);var m=j.current,v=m.state,b=m.props;var x=e8(r,o,b.items,"Pass either item or index to getItemProps!"),w=x[0],k=x[1];var E=function e(){if(k===v.highlightedIndex){return}D.current=false;g({type:tA,index:k,disabled:h})};var C=function e(){g({type:tN,index:k})};var I=(0,a.Z)((t={disabled:h,role:"option","aria-selected":""+(w===y),id:T.getItemId(k)},t[c]=ei(f,function(e){if(e){S.current[T.getItemId(k)]=e}}),t),p);if(!h){{I.onClick=eo(s,C)}}I.onMouseMove=eo(l,E);return I},[j,y,T,D,g]);return{getToggleButtonProps:U,getLabelProps:F,getMenuProps:W,getItemProps:z,toggleMenu:_,openMenu:A,closeMenu:R,setHighlightedIndex:N,selectItem:Z,reset:L,setInputValue:B,highlightedIndex:v,isOpen:m,selectedItem:y,inputValue:b}}var tG=false?0:0;var tQ=false?0:1;var tX=false?0:2;var tJ=false?0:3;var t0=false?0:4;var t1=false?0:5;var t2=false?0:6;var t4=false?0:7;var t5=false?0:8;var t3=false?0:9;var t7=false?0:10;var t6=false?0:11;var t8=false?0:12;var t9=false?0:13;var ne=false?0:14;var nt=false?0:15;var nn=false?0:16;var no=false?0:17;var ni=false?0:18;var na=false?0:19;var nl=false?0:20;var ns=false?0:21;var nu=false?0:22;var nc=Object.freeze({__proto__:null,InputKeyDownArrowDown:tG,InputKeyDownArrowUp:tQ,InputKeyDownEscape:tX,InputKeyDownHome:tJ,InputKeyDownEnd:t0,InputKeyDownPageUp:t1,InputKeyDownPageDown:t2,InputKeyDownEnter:t4,InputChange:t5,InputBlur:t3,InputFocus:t7,MenuMouseLeave:t6,ItemMouseMove:t8,ItemClick:t9,ToggleButtonClick:ne,FunctionToggleMenu:nt,FunctionOpenMenu:nn,FunctionCloseMenu:no,FunctionSetHighlightedIndex:ni,FunctionSelectItem:na,FunctionSetInputValue:nl,FunctionReset:ns,ControlledPropUpdatedSelectedItem:nu});function nd(e){var t=ts(e);var n=t.selectedItem;var r=t.inputValue;if(r===""&&n&&e.defaultInputValue===undefined&&e.initialInputValue===undefined&&e.inputValue===undefined){r=e.itemToString(n)}return(0,a.Z)({},t,{inputValue:r})}var nf={items:f().array.isRequired,itemToString:f().func,selectedItemChanged:f().func,getA11yStatusMessage:f().func,getA11ySelectionMessage:f().func,highlightedIndex:f().number,defaultHighlightedIndex:f().number,initialHighlightedIndex:f().number,isOpen:f().bool,defaultIsOpen:f().bool,initialIsOpen:f().bool,selectedItem:f().any,initialSelectedItem:f().any,defaultSelectedItem:f().any,inputValue:f().string,defaultInputValue:f().string,initialInputValue:f().string,id:f().string,labelId:f().string,menuId:f().string,getItemId:f().func,inputId:f().string,toggleButtonId:f().string,stateReducer:f().func,onSelectedItemChange:f().func,onHighlightedIndexChange:f().func,onStateChange:f().func,onIsOpenChange:f().func,onInputValueChange:f().func,environment:f().shape({addEventListener:f().func,removeEventListener:f().func,document:f().shape({getElementById:f().func,activeElement:f().any,body:f().any})})};function nh(e,t,n){var r=(0,o.useRef)();var i=tr(e,t,n),a=i[0],l=i[1];(0,o.useEffect)(function(){if(!em(n,"selectedItem")){return}if(n.selectedItemChanged(r.current,n.selectedItem)){l({type:nu,inputValue:n.itemToString(n.selectedItem)})}r.current=a.selectedItem===r.current?n.selectedItem:a.selectedItem},[a.selectedItem,n.selectedItem]);return[eg(a,n),l]}var np=ee;if(false){}var ng=(0,a.Z)({},ti,{selectedItemChanged:function e(e,t){return e!==t},getA11yStatusMessage:es});function nm(e,t){var n;var r=t.type,o=t.props,i=t.altKey;var l;switch(r){case t9:l={isOpen:ta(o,"isOpen"),highlightedIndex:ta(o,"highlightedIndex"),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case tG:if(e.isOpen){l={highlightedIndex:eb(1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,true)}}else{l={highlightedIndex:i&&e.selectedItem==null?-1:tu(o,e,1,t.getItemNodeFromIndex),isOpen:o.items.length>=0}}break;case tQ:if(e.isOpen){if(i){l=tg(o,e.highlightedIndex)}else{l={highlightedIndex:eb(-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,true)}}}else{l={highlightedIndex:tu(o,e,-1,t.getItemNodeFromIndex),isOpen:o.items.length>=0}}break;case t4:l=tg(o,e.highlightedIndex);break;case tX:l=(0,a.Z)({isOpen:false,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case t1:l={highlightedIndex:eb(-10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,false)};break;case t2:l={highlightedIndex:eb(10,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,false)};break;case tJ:l={highlightedIndex:ex(1,0,o.items.length,t.getItemNodeFromIndex,false)};break;case t0:l={highlightedIndex:ex(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,false)};break;case t3:l=(0,a.Z)({isOpen:false,highlightedIndex:-1},e.highlightedIndex>=0&&((n=o.items)==null?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case t5:l={isOpen:true,highlightedIndex:ta(o,"highlightedIndex"),inputValue:t.inputValue};break;case t7:l={isOpen:true,highlightedIndex:tu(o,e,0)};break;case na:l={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case nu:l={inputValue:t.inputValue};break;default:return tm(e,t,nc)}return(0,a.Z)({},e,l)}var nv=["onMouseLeave","refKey","ref"],ny=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],nb=["onClick","onPress","refKey","ref"],nx=["onKeyDown","onChange","onInput","onFocus","onBlur","onChangeText","refKey","ref"];nw.stateChangeTypes=nc;function nw(e){if(e===void 0){e={}}np(e,nw);var t=(0,a.Z)({},ng,e);var n=t.initialIsOpen,r=t.defaultIsOpen,l=t.items,s=t.scrollIntoView,u=t.environment,c=t.getA11yStatusMessage,f=t.getA11ySelectionMessage,h=t.itemToString;var p=nd(t);var g=nh(nm,p,t),m=g[0],v=g[1];var y=m.isOpen,b=m.highlightedIndex,x=m.selectedItem,w=m.inputValue;var S=(0,o.useRef)(null);var k=(0,o.useRef)({});var T=(0,o.useRef)(null);var E=(0,o.useRef)(null);var C=(0,o.useRef)(true);var j=e6(t);var I=(0,o.useRef)();var D=tn({state:m,props:t});var P=(0,o.useCallback)(function(e){return k.current[j.getItemId(e)]},[j]);tf(c,[y,b,w,l],(0,a.Z)({isInitialMount:C.current,previousResultCount:I.current,items:l,environment:u,itemToString:h},m));tf(f,[x],(0,a.Z)({isInitialMount:C.current,previousResultCount:I.current,items:l,environment:u,itemToString:h},m));var O=th({menuElement:S.current,highlightedIndex:b,isOpen:y,itemRefs:k,scrollIntoView:s,getItemNodeFromIndex:P});tp({isInitialMount:C.current,props:t,state:m});(0,o.useEffect)(function(){var e=n||r||y;if(e&&T.current){T.current.focus()}},[]);(0,o.useEffect)(function(){if(C.current){return}I.current=l.length});var M=tc(y,[T,S,E],u,function(){v({type:t3,selectItem:false})});var _=td("getInputProps","getMenuProps");(0,o.useEffect)(function(){C.current=false;return function(){C.current=true}},[]);(0,o.useEffect)(function(){var e;if(!y){k.current={}}else if(((e=u.document)==null?void 0:e.activeElement)!==T.current){var t;T==null?void 0:(t=T.current)==null?void 0:t.focus()}},[y,u]);var R=(0,o.useMemo)(function(){return{ArrowDown:function e(e){e.preventDefault();v({type:tG,altKey:e.altKey,getItemNodeFromIndex:P})},ArrowUp:function e(e){e.preventDefault();v({type:tQ,altKey:e.altKey,getItemNodeFromIndex:P})},Home:function e(e){if(!D.current.state.isOpen){return}e.preventDefault();v({type:tJ,getItemNodeFromIndex:P})},End:function e(e){if(!D.current.state.isOpen){return}e.preventDefault();v({type:t0,getItemNodeFromIndex:P})},Escape:function e(e){var t=D.current.state;if(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1){e.preventDefault();v({type:tX})}},Enter:function e(e){var t=D.current.state;if(!t.isOpen||e.which===229){return}e.preventDefault();v({type:t4,getItemNodeFromIndex:P})},PageUp:function e(e){if(D.current.state.isOpen){e.preventDefault();v({type:t1,getItemNodeFromIndex:P})}},PageDown:function e(e){if(D.current.state.isOpen){e.preventDefault();v({type:t2,getItemNodeFromIndex:P})}}}},[v,D,P]);var A=(0,o.useCallback)(function(e){return(0,a.Z)({id:j.labelId,htmlFor:j.inputId},e)},[j]);var N=(0,o.useCallback)(function(e,t){var n;var r=e===void 0?{}:e,o=r.onMouseLeave,l=r.refKey,s=l===void 0?"ref":l,u=r.ref,c=i(r,nv);var f=t===void 0?{}:t,h=f.suppressRefError,p=h===void 0?false:h;_("getMenuProps",p,s,S);return(0,a.Z)((n={},n[s]=ei(u,function(e){S.current=e}),n.id=j.menuId,n.role="listbox",n["aria-labelledby"]=c&&c["aria-label"]?undefined:""+j.labelId,n.onMouseLeave=eo(o,function(){v({type:t6})}),n),c)},[v,_,j]);var Z=(0,o.useCallback)(function(e){var t,n;var r=e===void 0?{}:e,o=r.item,l=r.index,s=r.refKey,u=s===void 0?"ref":s,c=r.ref,f=r.onMouseMove,h=r.onMouseDown,p=r.onClick;r.onPress;var g=r.disabled,m=i(r,ny);var y=D.current,b=y.props,x=y.state;var w=e8(o,l,b.items,"Pass either item or index to getItemProps!"),S=w[1];var T="onClick";var E=p;var C=function e(){if(S===x.highlightedIndex){return}O.current=false;v({type:t8,index:S,disabled:g})};var I=function e(){v({type:t9,index:S})};var P=function e(e){return e.preventDefault()};return(0,a.Z)((t={},t[u]=ei(c,function(e){if(e){k.current[j.getItemId(S)]=e}}),t.disabled=g,t.role="option",t["aria-selected"]=""+(S===x.highlightedIndex),t.id=j.getItemId(S),t),!g&&(n={},n[T]=eo(E,I),n),{onMouseMove:eo(f,C),onMouseDown:eo(h,P)},m)},[v,D,O,j]);var L=(0,o.useCallback)(function(e){var t;var n=e===void 0?{}:e,r=n.onClick;n.onPress;var o=n.refKey,l=o===void 0?"ref":o,s=n.ref,u=i(n,nb);var c=D.current.state;var f=function e(){v({type:ne})};return(0,a.Z)((t={},t[l]=ei(s,function(e){E.current=e}),t["aria-controls"]=j.menuId,t["aria-expanded"]=c.isOpen,t.id=j.toggleButtonId,t.tabIndex=-1,t),!u.disabled&&(0,a.Z)({},{onClick:eo(r,f)}),u)},[v,D,j]);var B=(0,o.useCallback)(function(e,t){var n;var r=e===void 0?{}:e,o=r.onKeyDown,l=r.onChange,s=r.onInput,u=r.onFocus,c=r.onBlur;r.onChangeText;var f=r.refKey,h=f===void 0?"ref":f,p=r.ref,g=i(r,nx);var m=t===void 0?{}:t,y=m.suppressRefError,b=y===void 0?false:y;_("getInputProps",b,h,T);var x=D.current.state;var w=function e(e){var t=ev(e);if(t&&R[t]){R[t](e)}};var S=function e(e){v({type:t5,inputValue:e.target.value})};var k=function e(e){if(x.isOpen&&!M.current.isMouseDown){v({type:t3,selectItem:e.relatedTarget!==null})}};var E=function e(){if(!x.isOpen){v({type:t7})}};var C="onChange";var I={};if(!g.disabled){var P;I=(P={},P[C]=eo(l,s,S),P.onKeyDown=eo(o,w),P.onBlur=eo(c,k),P.onFocus=eo(u,E),P)}return(0,a.Z)((n={},n[h]=ei(p,function(e){T.current=e}),n["aria-activedescendant"]=x.isOpen&&x.highlightedIndex>-1?j.getItemId(x.highlightedIndex):"",n["aria-autocomplete"]="list",n["aria-controls"]=j.menuId,n["aria-expanded"]=x.isOpen,n["aria-labelledby"]=g&&g["aria-label"]?undefined:""+j.labelId,n.autoComplete="off",n.id=j.inputId,n.role="combobox",n.value=x.inputValue,n),I,g)},[v,R,D,M,_,j]);var F=(0,o.useCallback)(function(){v({type:nt})},[v]);var W=(0,o.useCallback)(function(){v({type:no})},[v]);var U=(0,o.useCallback)(function(){v({type:nn})},[v]);var z=(0,o.useCallback)(function(e){v({type:ni,highlightedIndex:e})},[v]);var H=(0,o.useCallback)(function(e){v({type:na,selectedItem:e})},[v]);var K=(0,o.useCallback)(function(e){v({type:nl,inputValue:e})},[v]);var $=(0,o.useCallback)(function(){v({type:ns})},[v]);return{getItemProps:Z,getLabelProps:A,getMenuProps:N,getInputProps:B,getToggleButtonProps:L,toggleMenu:F,openMenu:U,closeMenu:W,setHighlightedIndex:z,setInputValue:K,selectItem:H,reset:$,highlightedIndex:b,isOpen:y,selectedItem:x,inputValue:w}}var nS={activeIndex:-1,selectedItems:[]};function nk(e,t){return tl(e,t,nS)}function nT(e,t){return ta(e,t,nS)}function nE(e){var t=nk(e,"activeIndex");var n=nk(e,"selectedItems");return{activeIndex:t,selectedItems:n}}function nC(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey){return false}var t=e.target;if(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0)){return false}return true}function nj(e){var t=e.removedSelectedItem,n=e.itemToString;return n(t)+" has been removed."}var nI={selectedItems:f().array,initialSelectedItems:f().array,defaultSelectedItems:f().array,itemToString:f().func,getA11yRemovalMessage:f().func,stateReducer:f().func,activeIndex:f().number,initialActiveIndex:f().number,defaultActiveIndex:f().number,onActiveIndexChange:f().func,onSelectedItemsChange:f().func,keyNavigationNext:f().string,keyNavigationPrevious:f().string,environment:f().shape({addEventListener:f().func,removeEventListener:f().func,document:f().shape({getElementById:f().func,activeElement:f().any,body:f().any})})};var nD={itemToString:ti.itemToString,stateReducer:ti.stateReducer,environment:ti.environment,getA11yRemovalMessage:nj,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"};var nP=ee;if(false){}var nO=false?0:0;var nM=false?0:1;var n_=false?0:2;var nR=false?0:3;var nA=false?0:4;var nN=false?0:5;var nZ=false?0:6;var nL=false?0:7;var nB=false?0:8;var nF=false?0:9;var nW=false?0:10;var nU=false?0:11;var nz=false?0:12;var nH=Object.freeze({__proto__:null,SelectedItemClick:nO,SelectedItemKeyDownDelete:nM,SelectedItemKeyDownBackspace:n_,SelectedItemKeyDownNavigationNext:nR,SelectedItemKeyDownNavigationPrevious:nA,DropdownKeyDownNavigationPrevious:nN,DropdownKeyDownBackspace:nZ,DropdownClick:nL,FunctionAddSelectedItem:nB,FunctionRemoveSelectedItem:nF,FunctionSetSelectedItems:nW,FunctionSetActiveIndex:nU,FunctionReset:nz});function nK(e,t){var n=t.type,r=t.index,o=t.props,i=t.selectedItem;var l=e.activeIndex,s=e.selectedItems;var u;switch(n){case nO:u={activeIndex:r};break;case nA:u={activeIndex:l-1<0?0:l-1};break;case nR:u={activeIndex:l+1>=s.length?-1:l+1};break;case n_:case nM:{if(l<0){break}var c=l;if(s.length===1){c=-1}else if(l===s.length-1){c=s.length-2}u=(0,a.Z)({selectedItems:[].concat(s.slice(0,l),s.slice(l+1))},{activeIndex:c});break}case nN:u={activeIndex:s.length-1};break;case nZ:u={selectedItems:s.slice(0,s.length-1)};break;case nB:u={selectedItems:[].concat(s,[i])};break;case nL:u={activeIndex:-1};break;case nF:{var f=l;var h=s.indexOf(i);if(h<0){break}if(s.length===1){f=-1}else if(h===s.length-1){f=s.length-2}u={selectedItems:[].concat(s.slice(0,h),s.slice(h+1)),activeIndex:f};break}case nW:{var p=t.selectedItems;u={selectedItems:p};break}case nU:{var g=t.activeIndex;u={activeIndex:g};break}case nz:u={activeIndex:nT(o,"activeIndex"),selectedItems:nT(o,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return(0,a.Z)({},e,u)}var n$=["refKey","ref","onClick","onKeyDown","selectedItem","index"],nV=["refKey","ref","onKeyDown","onClick","preventKeyAction"];nq.stateChangeTypes=nH;function nq(e){if(e===void 0){e={}}nP(e,nq);var t=(0,a.Z)({},nD,e);var n=t.getA11yRemovalMessage,r=t.itemToString,l=t.environment,s=t.keyNavigationNext,u=t.keyNavigationPrevious;var c=to(nK,nE(t),t),f=c[0],h=c[1];var p=f.activeIndex,g=f.selectedItems;var m=(0,o.useRef)(true);var v=(0,o.useRef)(null);var y=(0,o.useRef)(g);var b=(0,o.useRef)();b.current=[];var x=tn({state:f,props:t});(0,o.useEffect)(function(){if(m.current||false){return}if(g.length<y.current.length){var e=y.current.find(function(e){return g.indexOf(e)<0});eT(n({itemToString:r,resultCount:g.length,removedSelectedItem:e,activeIndex:p,activeSelectedItem:g[p]}),l.document)}y.current=g},[g.length]);(0,o.useEffect)(function(){if(m.current){return}if(p===-1&&v.current){v.current.focus()}else if(b.current[p]){b.current[p].focus()}},[p]);tp({isInitialMount:m.current,props:t,state:f});var w=td("getDropdownProps");(0,o.useEffect)(function(){m.current=false;return function(){m.current=true}},[]);var S=(0,o.useMemo)(function(){var e;return e={},e[u]=function(){h({type:nA})},e[s]=function(){h({type:nR})},e.Delete=function e(){h({type:nM})},e.Backspace=function e(){h({type:n_})},e},[h,s,u]);var k=(0,o.useMemo)(function(){var e;return e={},e[u]=function(e){if(nC(e)){h({type:nN})}},e.Backspace=function e(e){if(nC(e)){h({type:nZ})}},e},[h,u]);var T=(0,o.useCallback)(function(e){var t;var n=e===void 0?{}:e,r=n.refKey,o=r===void 0?"ref":r,l=n.ref,s=n.onClick,u=n.onKeyDown,c=n.selectedItem,f=n.index,p=i(n,n$);var g=x.current.state;var m=e8(c,f,g.selectedItems,"Pass either item or index to getSelectedItemProps!"),v=m[1];var y=v>-1&&v===g.activeIndex;var w=function e(){h({type:nO,index:v})};var k=function e(e){var t=ev(e);if(t&&S[t]){S[t](e)}};return(0,a.Z)((t={},t[o]=ei(l,function(e){if(e){b.current.push(e)}}),t.tabIndex=y?0:-1,t.onClick=eo(s,w),t.onKeyDown=eo(u,k),t),p)},[h,x,S]);var E=(0,o.useCallback)(function(e,t){var n;var r=e===void 0?{}:e,o=r.refKey,l=o===void 0?"ref":o,s=r.ref,u=r.onKeyDown,c=r.onClick,f=r.preventKeyAction,p=f===void 0?false:f,g=i(r,nV);var m=t===void 0?{}:t,y=m.suppressRefError,b=y===void 0?false:y;w("getDropdownProps",b,l,v);var x=function e(e){var t=ev(e);if(t&&k[t]){k[t](e)}};var S=function e(){h({type:nL})};return(0,a.Z)((n={},n[l]=ei(s,function(e){if(e){v.current=e}}),n),!p&&{onKeyDown:eo(u,x),onClick:eo(c,S)},g)},[h,k,w]);var C=(0,o.useCallback)(function(e){h({type:nB,selectedItem:e})},[h]);var j=(0,o.useCallback)(function(e){h({type:nF,selectedItem:e})},[h]);var I=(0,o.useCallback)(function(e){h({type:nW,selectedItems:e})},[h]);var D=(0,o.useCallback)(function(e){h({type:nU,activeIndex:e})},[h]);var P=(0,o.useCallback)(function(){h({type:nz})},[h]);return{getSelectedItemProps:T,getDropdownProps:E,addSelectedItem:C,removeSelectedItem:j,setSelectedItems:I,setActiveIndex:D,reset:P,selectedItems:g,activeIndex:p}}var nY=n(99818);var nG=n(86334);var nQ=n(45492);var nX=n(56816);var nJ=n(383);var n0=n(24307);var n1=n(63541);const n2={};function n4(e,t,n){if(e){let e=t.findIndex(e=>e.id===n);return e===-1?null:t[e]}return n}function n5(e){if(e==null){return""}else if(typeof e==="string"){return e}return e.name||""}function n3(e){if(typeof e==="string"){return e}return e?e.id:null}function n7(e,t){return n5(e).toLowerCase().includes(t.toLowerCase())}function n6(e,t){return e.filter(e=>n7(e,t))}function n8(e,t,n,r,o){let i=null;if(!t){i=o}else{if(r==null){let e=n.find(e=>e.id===o);if(e){i=e.id}}else if(r<n.length){i=n[r].id}}e?.(i,o)}function n9(e){return(0,r.jsx)(nJ.ZP,{...e})}function re(e,t,n){return(0,r.jsx)("div",{children:e.map((e,r)=>{let i=n5(e);return(0,o.createElement)("div",{...t({item:e}),role:"button",key:i,className:`${(0,nY.iv)({padding:5,cursor:"default",backgroundColor:n===r?nQ.rS.alt2MenuItemBackgroundHover:null})}`},i)})})}function rt(e){return e.code==="Enter"}function rn(e){return e?n5(e):""}function ro({focused:e,embedded:t=false,containerProps:n,labelProps:i={},inputProps:a={},suggestions:l,tooltipStyle:s,tooltipProps:u,renderInput:c=n9,renderItems:f=re,itemToString:h=rn,shouldSaveFromKey:p=rt,filterSuggestions:g=n6,openOnFocus:m=true,getHighlightedIndex:v,highlightFirst:y,onUpdate:b,strict:x,onSelect:w,tableBehavior:S,closeOnBlur:k=true,value:T,isMulti:E=false}){const[C,j]=(0,o.useState)(()=>n4(x,l,T));const[I,D]=(0,o.useState)(C?n5(C):"");const[P,O]=(0,o.useState)(false);const[M,_]=(0,o.useState)(C);const R=(0,o.useMemo)(()=>g(l,I),[g,l,I]);const[A,N]=(0,o.useState)(null);const[Z,L]=(0,o.useState)(t);(0,o.useEffect)(()=>{j(n4(x,l,T))},[T,l,x]);function B(e){const n=e===undefined?T:e;let r=n4(x,l,n);j(r);D(r?n5(r):"");_(r);N(null);L(t);O(false)}function F(){D("");j(null);N(null);O(false)}const W=P?R||l:l;return(0,r.jsx)(eG,{onSelect:(e,{inputValue:t})=>{j(e);N(null);if(E){D("")}else{L(false)}if(w){setTimeout(()=>{w(n3(e),t)},0)}},highlightedIndex:A,selectedItem:C||null,itemToString:h,inputValue:I,isOpen:Z,onInputValueChange:(e,t)=>{if(!document.hasFocus()){return}if([eG.stateChangeTypes.controlledPropUpdatedSelectedItem,eG.stateChangeTypes.touchEnd].includes(t.type)){return}const n=g(l,e);if(e===""){if(t.type!==eG.stateChangeTypes.clickItem){n8(b,x,n,null,null)}N(null)}else{let r=e=>{return y&&e.length?0:null};let o=(v||r)(n);if(t.type!==eG.stateChangeTypes.clickItem){n8(b,x,n,o,e)}N(o)}D(e);O(true)},onStateChange:e=>{if(S&&e.type===eG.stateChangeTypes.mouseUp){return}if("highlightedIndex"in e&&e.type!==eG.stateChangeTypes.changeInput){N(e.highlightedIndex)}if("selectedItem"in e){j(e.selectedItem)}if(Z&&(e.type===eG.stateChangeTypes.keyDownArrowUp||e.type===eG.stateChangeTypes.keyDownArrowDown)){n8(b,x,R||l,e.highlightedIndex!=null?e.highlightedIndex:A,I)}n2.lastChangeType=e.type},labelId:i?.id,children:({getInputProps:o,getItemProps:i,isOpen:h,inputValue:g,highlightedIndex:v})=>(0,r.jsxs)("div",{className:`view ${(0,nY.iv)({display:"flex"})}`,...n,children:[c(o({focused:e,...a,onFocus:e=>{a.onFocus?.(e);if(m){L(true)}},onBlur:e=>{e.preventDownshiftDefault=true;a.onBlur?.(e);if(!k)return;if(!S){if(e.target.value===""){w?.(null,e.target.value);j(null);L(false);return}let t=C?n3(C):null;B(t)}else{L(false)}},onKeyDown:e=>{let{onKeyDown:n}=a||{};if(h){if(e.key==="Enter"){if(v!=null){if(n2.lastChangeType===eG.stateChangeTypes.itemMouseEnter){e.preventDefault()}else{e.stopPropagation()}}else if(!x){e.stopPropagation();w(I,e.target.value);return F()}else{e.preventDefault();n?.(e)}}else if(p(e)){e.preventDefault();n?.(e)}}if(e.key==="Escape"){e.nativeEvent["preventDownshiftDefault"]=true;if(!t){e.stopPropagation()}n8(b,x,l,null,n3(M));D(n5(M));j(n4(x,l,M));N(null);L(t?true:false)}},onChange:e=>{const{onChange:t}=a||{};t?.(e.target.value)}})),h&&W.length>0&&(t?(0,r.jsx)(n0.Z,{style:{marginTop:5},"data-testid":"autocomplete",children:f(W,i,v,g)}):(0,r.jsx)(n1.u,{position:"bottom-stretch",offset:2,style:{padding:0,backgroundColor:nQ.rS.menuItemText,color:nQ.rS.tableBackground,minWidth:200,...s},...u,"data-testid":"autocomplete",children:f(W,i,v,g)}))]})})}function ri({name:e,onRemove:t}){return(0,r.jsxs)(n0.Z,{style:{alignItems:"center",flexDirection:"row",backgroundColor:nQ.rS.pillBackgroundSelected,padding:"2px 4px",margin:"2px",borderRadius:4},children:[e,(0,r.jsx)(nX.Z,{type:"bare",style:{marginLeft:1},onClick:t,children:(0,r.jsx)(nG.Z,{style:{width:8,height:8}})})]})}function ra({value:e,onSelect:t,suggestions:n,strict:i,...a}){let[l,s]=(0,o.useState)(false);let u=(0,o.useRef)();(0,o.useEffect)(()=>{u.current=e});function c(n){let r=e.filter(e=>e!==n);t(r)}function f(n){if(n){n=n.trim();t([...e,n],n)}}function h(t,n){if(t.key==="Backspace"&&t.target.value===""){c(e[e.length-1])}n?.(t)}return(0,r.jsx)(rs,{...a,isMulti:true,value:null,suggestions:n.filter(t=>!e.includes(n3(t))),onSelect:f,highlightFirst:true,strict:i,tooltipProps:{forceLayout:u.current!==e},renderInput:t=>(0,r.jsxs)(n0.Z,{style:{display:"flex",flexWrap:"wrap",flexDirection:"row",alignItems:"center",backgroundColor:nQ.rS.tableBackground,borderRadius:4,border:"1px solid "+nQ.rS.formInputBorder,...l&&{border:"1px solid "+nQ.rS.formInputBorderSelected,boxShadow:"0 1px 1px "+nQ.rS.formInputShadowSelected}},children:[e.map((e,t)=>{e=n4(i,n,e);return e&&(0,r.jsx)(ri,{name:n5(e),onRemove:()=>c(n3(e))},n3(e)||t)}),(0,r.jsx)(nJ.ZP,{...t,onKeyDown:e=>h(e,t.onKeyDown),onFocus:e=>{s(true);t.onFocus(e)},onBlur:e=>{s(false);t.onBlur(e)},style:{flex:1,minWidth:30,border:0,":focus":{border:0,boxShadow:"none"},...t.style}})]})})}function rl({show:e=true,embedded:t,children:n}){return e&&(0,r.jsx)(n0.Z,{style:{flexShrink:0,...t?{paddingTop:5}:{padding:5}},onMouseDown:e=>e.preventDefault(),children:n})}function rs({multi:e,...t}){if(e){return(0,r.jsx)(ra,{...t})}else{return(0,r.jsx)(ro,{...t})}}},50151:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(43188);var o=n(66204);var i=n(99818);const a=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:3.5,d:"m30 9-4-4M30 9l-4 4M6 5 2 9M2 9l4 4M10 9H3M22 9h7M16 15l6-6M16 15l-6-6M16 28V15"})});var l=a;var s=n(45492);var u=n(77644);var c=n(24307);var f=n(25411);function h({items:e,getItemProps:t,highlightedIndex:n,embedded:a,footer:f,groupHeaderStyle:h}){let p=null;return(0,r.jsxs)(c.Z,{children:[(0,r.jsx)(c.Z,{style:{overflow:"auto",padding:"5px 0",...!a&&{maxHeight:175}},children:e.map((e,f)=>{if(e.id==="split"){return(0,r.jsxs)(c.Z,{...t?t({item:e}):null,role:"button",style:{backgroundColor:n===f?s.rS.alt2MenuItemBackgroundHover:"transparent",borderRadius:a?4:0,flexShrink:0,flexDirection:"row",alignItems:"center",fontSize:11,fontWeight:500,color:s.rS.noticeAccent,padding:"6px 8px",":active":{backgroundColor:"rgba(100, 100, 100, .25)"}},"data-testid":"split-transaction-button",children:[(0,r.jsx)(u.Z,{style:{lineHeight:0},children:(0,r.jsx)(l,{width:10,height:10,style:{marginRight:5}})}),"Split Transaction"]},"split")}const g=e.cat_group!==p;p=e.cat_group;return(0,r.jsxs)(o.Fragment,{children:[g&&(0,r.jsx)("div",{style:{color:s.rS.alt2MenuItemTextHeader,padding:"4px 9px",...h},"data-testid":"category-item-group",children:e.groupName}),(0,r.jsx)("div",{...t?t({item:e}):null,role:"button",className:`${(0,i.iv)([{backgroundColor:n===f?s.rS.alt2MenuItemBackgroundHover:"transparent",padding:4,paddingLeft:20,borderRadius:a?4:0}])}`,"data-testid":"category-item"+(n===f?"-highlighted":""),children:e.name})]},e.id)})}),f]})}function p({categoryGroups:e,showSplitOption:t,embedded:n,closeOnBlur:i,groupHeaderStyle:a,...l}){let s=(0,o.useMemo)(()=>e.reduce((e,t)=>e.concat(t.categories.map(e=>({...e,groupName:t.name}))),t?[{id:"split",name:""}]:[]),[e]);return(0,r.jsx)(f.ZP,{strict:true,highlightFirst:true,embedded:n,closeOnBlur:i,getHighlightedIndex:e=>{if(e.length===0){return null}else if(e[0].id==="split"){return e.length>1?1:null}return 0},filterSuggestions:(e,t)=>{return e.filter(e=>{return e.id==="split"||(0,f.PW)(e,t)})},suggestions:s,renderItems:(e,t,o)=>(0,r.jsx)(h,{items:e,embedded:n,getItemProps:t,highlightedIndex:o,groupHeaderStyle:a}),...l})}},31261:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(99818);var l=n(13910);var s=n(99548);var u=n(68761);var c=n(18748);var f=n(68587);var h=n(76074);var p=n(45492);var g=n(56816);var m=n(24307);var v=n(25411);function y(e,t,n){let r=n?(0,c.nc)(e,n):e;if(t&&r){r=r.filter(e=>!!e.transfer_acct)}return r||[]}function b(e,t){if(e==="new"&&!t.startsWith("new:")){return"new:"+t}return e}function x(e){if(typeof e==="string"&&e.startsWith("new:")){return"new"}return e}function w({items:e,getItemProps:t,highlightedIndex:n,embedded:i,inputValue:l,groupHeaderStyle:s,footer:u}){const{isNarrowWidth:c}=(0,h.F)();let g=e.filtered;let v=null;e=[...e];if(e[0].id==="new"){let[t,...n]=e;v=t;e=n}let y=v?1:0;let b=null;return(0,r.jsxs)(m.Z,{children:[(0,r.jsxs)(m.Z,{style:{overflow:"auto",padding:"5px 0",...!i&&{maxHeight:175}},children:[v&&(0,r.jsx)(m.Z,{...t?t({item:v}):null,style:{flexShrink:0,padding:"6px 9px",backgroundColor:n===0?p.rS.alt2MenuItemBackgroundHover:"transparent",borderRadius:i?4:0,":active":{backgroundColor:"rgba(100, 100, 100, .25)"}},children:(0,r.jsxs)(m.Z,{style:{display:"block",color:p.rS.noticeAccent,borderRadius:4,fontSize:c?"inherit":11,fontWeight:500},children:[(0,r.jsx)(f.Z,{width:8,height:8,style:{marginRight:5,display:"inline-block"}}),"Create Payee “",l,"”"]})}),e.map((l,u)=>{let f=l.transfer_acct?"account":"payee";let h;if(f==="payee"&&b!==f){h="Payees"}else if(f==="account"&&b!==f){h="Transfer To/From"}let m=u===e.length-1&&g;b=f;return(0,r.jsxs)(o.Fragment,{children:[h&&(0,r.jsx)("div",{style:{color:p.rS.alt2MenuItemTextHeader,padding:"4px 9px",...s},children:h},"title-"+u),(0,o.createElement)("div",{...t?t({item:l}):null,role:"button",key:l.id,className:`${(0,a.iv)([{backgroundColor:n===u+y?p.rS.alt2MenuItemBackgroundHover:"transparent",borderRadius:i?4:0,padding:4,paddingLeft:20}])}`},l.name),m&&(0,r.jsx)("div",{style:{fontSize:c?"inherit":11,padding:5,color:p.rS.altpageTextSubdued,textAlign:"center"},children:"More payees are available, search to find them"})]},l.id)})]}),u]})}function S({value:e,inputProps:t,showMakeTransfer:n=true,showManagePayees:a=false,tableBehavior:c,embedded:f,closeOnBlur:h,onUpdate:p,onSelect:m,onManagePayees:S,groupHeaderStyle:k,accounts:T,payees:E,...C}){let j=(0,u.n4)();if(!E){E=j}let I=(0,s.gM)();if(!T){T=I}let[D,P]=(0,o.useState)(false);let[O,M]=(0,o.useState)("");let _=!!O;let R=(0,o.useMemo)(()=>{const e=y(E,D,T);if(!_){return e}return[{id:"new",name:""},...e]},[E,D,T,_]);let A=(0,i.I0)();async function N(e,t){if(c){m?.(b(e,t))}else{let n=()=>A((0,l.fz)(t));if(Array.isArray(e)){e=await Promise.all(e.map(e=>e==="new"?n():e))}else{if(e==="new"){e=await n()}}m?.(e)}}const[Z,L]=(0,o.useState)(false);return(0,r.jsx)(v.ZP,{strict:true,embedded:f,value:x(e),suggestions:R,tableBehavior:c,closeOnBlur:h,itemToString:e=>{if(!e){return""}else if(e.id==="new"){return O}return e.name},focused:Z,inputProps:{...t,onBlur:()=>{M("");L(false)},onFocus:()=>L(true),onChange:M},onUpdate:(e,t)=>p&&p(b(e,t)),onSelect:N,getHighlightedIndex:e=>{if(e.length>1&&e[0].id==="new"){return 1}return 0},filterSuggestions:(e,t)=>{let n=e.filter(e=>{if(e.id==="new"){return!t||t===""||D?false:true}return(0,v.PW)(e,t)});n.sort((e,n)=>{let r=e.name.toLowerCase().startsWith(t.toLowerCase());let o=n.name.toLowerCase().startsWith(t.toLowerCase());let i=e.name.toLowerCase()===t.toLowerCase();let a=n.name.toLowerCase()===t.toLowerCase();if(e.id==="new"){return-1}else if(n.id==="new"){return 1}else{if(i&&!a){return-1}else if(!i&&a){return 1}else{if(r===o){return 0}else if(r&&!o){return-1}else{return 1}}}});let r=n.length>100;n=n.slice(0,100);n.filtered=r;if(n.length>=2&&n[0].id==="new"){if(n[1].name.toLowerCase()===t.toLowerCase()&&!n[1].transfer_acct){return n.slice(1)}}return n},renderItems:(e,t,o,i)=>(0,r.jsx)(w,{items:e,getItemProps:t,highlightedIndex:o,inputValue:i,embedded:f,groupHeaderStyle:k,footer:(0,r.jsxs)(v.oo,{embedded:f,children:[n&&(0,r.jsx)(g.Z,{type:D?"menuSelected":"menu",style:a&&{marginBottom:5},onClick:()=>{p?.(null);P(!D)},children:"Make Transfer"}),a&&(0,r.jsx)(g.Z,{type:"menu",onClick:()=>S(),children:"Manage Payees"})]})}),...C},D?"transfers":"all")}},75025:function(e,t,n){"use strict";n.d(t,{j:function(){return a},s:function(){return l}});var r=n(43188);var o=n(66204);let i=(0,o.createContext)(null);function a({children:e}){let[t,n]=(0,o.useState)(1);return(0,r.jsx)(i.Provider,{value:{displayMax:t,setDisplayMax:n},children:e})}function l(){return(0,o.useContext)(i)}},30715:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(43188);var o=n(24924);var i=n(24307);function a({left:e,right:t,style:n,leftStyle:a,rightStyle:l,truncate:s="left",...u}){const c={textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"};return(0,r.jsxs)(i.Z,{style:{flexDirection:"row",alignItems:"center",...n},...u,children:[(0,r.jsx)(o.Z,{style:{marginRight:10,...s==="left"&&c,...a},children:e}),(0,r.jsx)(o.Z,{style:{flex:1,textAlign:"right",...s==="right"&&c,...l},children:t})]})}},99147:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(43188);var o=n(59379);var i=n(45485);var a=n(99818);var l=n(45492);function s({to:e,style:t,activeStyle:n,children:s}){let u=(0,o.bS)({path:e});return(0,r.jsx)(i.OL,{to:e,className:`${(0,a.iv)([l.W2.smallText,t,u?n:null])}`,children:s})}},24924:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(43188);var o=n(99818);function i(e){const{className:t="",style:n,innerRef:i,...a}=e;return(0,r.jsx)("div",{...a,ref:i,className:`${t} ${(0,o.iv)(n)}`})}},56816:function(e,t,n){"use strict";n.d(t,{y:function(){return x}});var r=n(43188);var o=n(66204);var i=n(99818);var a=n(45931);var l=n(45492);var s=n(24307);const u={normal:l.rS.buttonNormalBackground,normalDisabled:l.rS.buttonNormalDisabledBackground,primary:l.rS.buttonPrimaryBackground,primaryDisabled:l.rS.buttonPrimaryDisabledBackground,bare:l.rS.buttonBareBackground,bareDisabled:l.rS.buttonBareDisabledBackground,menu:l.rS.buttonMenuBackground,menuSelected:l.rS.buttonMenuSelectedBackground,link:l.rS.buttonBareBackground};const c={normal:l.rS.buttonNormalBackgroundHover,primary:l.rS.buttonPrimaryBackgroundHover,bare:l.rS.buttonBareBackgroundHover,menu:l.rS.buttonMenuBackgroundHover,menuSelected:l.rS.buttonMenuSelectedBackgroundHover,link:l.rS.buttonBareBackground};const f={normal:l.rS.buttonNormalBorder,normalDisabled:l.rS.buttonNormalDisabledBorder,primary:l.rS.buttonPrimaryBorder,primaryDisabled:l.rS.buttonPrimaryDisabledBorder,menu:l.rS.buttonMenuBorder,menuSelected:l.rS.buttonMenuSelectedBorder,link:l.rS.buttonBareBackground};const h={normal:l.rS.buttonNormalText,normalDisabled:l.rS.buttonNormalDisabledText,primary:l.rS.buttonPrimaryText,primaryDisabled:l.rS.buttonPrimaryDisabledText,bare:l.rS.buttonBareText,bareDisabled:l.rS.buttonBareDisabledText,menu:l.rS.buttonMenuText,menuSelected:l.rS.buttonMenuSelectedText,link:l.rS.pageTextLink};const p={normal:l.rS.buttonNormalTextHover,primary:l.rS.buttonPrimaryTextHover,bare:l.rS.buttonBareTextHover,menu:l.rS.buttonMenuTextHover,menuSelected:l.rS.buttonMenuSelectedTextHover};const g={textDecoration:"underline",boxShadow:"none"};const m=(e,t)=>{switch(e){case"bare":case"link":return"none";default:return"1px solid "+f[t]}};const v=e=>{switch(e){case"bare":return"5px";case"link":return"0";default:return"5px 10px"}};const y=(e,t)=>{switch(e){case"bare":return{backgroundColor:l.rS.buttonBareBackgroundActive};case"link":return{transform:"none",boxShadow:"none"};default:return{transform:t&&"translateY(1px)",boxShadow:`0 1px 4px 0 ${e==="primary"?l.rS.buttonPrimaryShadow:l.rS.buttonNormalShadow}`,transition:"none"}}};const b=(0,o.forwardRef)(({children:e,pressed:t,hover:n,type:o="normal",isSubmit:a=o==="primary",color:s,style:f,disabled:b,hoveredStyle:x,activeStyle:w,bounce:S=true,as:k="button",...T},E)=>{let C=b?o+"Disabled":o;x={...o!=="bare"&&l.W2.shadow,...o==="link"&&g,backgroundColor:c[o],color:s||p[o],...x};w={...y(o,S),...w};let j=k;let I={alignItems:"center",justifyContent:"center",flexShrink:0,padding:v(o),margin:0,overflow:"hidden",display:o==="link"?"inline":"flex",borderRadius:4,backgroundColor:u[C],border:m(o,C),color:s||h[C],transition:"box-shadow .25s",WebkitAppRegion:"no-drag",...l.W2.smallText,":hover":!b&&x,":active":!b&&w,...n&&x,...t&&w,...f};return(0,r.jsx)(j,{ref:E,...typeof k==="string"?(0,i.iv)(I):{style:I},disabled:b,type:a?"submit":"button",...T,children:e})});const x=(0,o.forwardRef)((e,t)=>{let{loading:n,children:o,...i}=e;return(0,r.jsxs)(b,{...i,ref:t,style:{position:"relative",...i.style},children:[n&&(0,r.jsx)(s.Z,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center"},children:(0,r.jsx)(a.Z,{style:{width:20,height:20}})}),(0,r.jsx)(s.Z,{style:{opacity:n?0:1,flexDirection:"row",alignItems:"center"},children:o})]})});t.Z=b},15633:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);var i=n(45492);let a={purple:i.rS.pageTextPositive,blue:i.rS.pageTextLink,muted:"inherit"};const l=(0,o.forwardRef)(({children:e,to:t,linkColor:n="blue"},o)=>(0,r.jsx)("a",{ref:o,href:t,target:"_blank",rel:"noopener noreferrer",style:{color:a[n]},children:e}));t.Z=l},91871:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(66204);function o({children:e}){let t=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(t.current&&!n.g.IS_DESIGN_MODE){setTimeout(()=>{if(t.current){t.current.focus();t.current.setSelectionRange(0,1e4)}},0)}},[]);if(typeof e==="function"){return e(t)}return(0,r.cloneElement)(e,{inputRef:t})}},383:function(e,t,n){"use strict";n.d(t,{Tn:function(){return h},ZP:function(){return f},ZL:function(){return c}});var r=n(43188);var o=n(66204);function i(e){return function(t){e.forEach(function(e){if(typeof e==="function"){e(t)}else if(e!=null){e.current=t}})}}var a=i;var l=n(99818);var s=n(5904);var u=n(45492);const c={outline:0,backgroundColor:u.rS.tableBackground,color:u.rS.formInputText,margin:0,padding:5,borderRadius:4,border:"1px solid "+u.rS.formInputBorder};function f({style:e,inputRef:t,onEnter:n,onUpdate:i,focused:f,...h}){let p=(0,o.useRef)();(0,s.X)(p,f);return(0,r.jsx)("input",{ref:t?a([t,p]):p,className:`${(0,l.iv)(c,{whiteSpace:"nowrap",overflow:"hidden",flexShrink:0,":focus":{border:"1px solid "+u.rS.formInputBorderSelected,boxShadow:"0 1px 1px "+u.rS.formInputShadowSelected},"::placeholder":{color:u.rS.formInputTextPlaceholder}},u.W2.smallText,e)}`,...h,onKeyDown:e=>{if(e.key==="Enter"&&n){n(e)}h.onKeyDown?.(e)},onChange:e=>{if(i){i(e.target.value)}h.onChange?.(e)}})}function h(e){return(0,r.jsx)(f,{...e,style:{padding:10,fontSize:15,border:"none",...u.W2.shadow,":focus":{border:"none",...u.W2.shadow},...e.style}})}},46405:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(43188);var o=n(66204);var i=n(45492);var a=n(383);var l=n(24307);function s({leftContent:e,rightContent:t,inputStyle:n,focusStyle:s,style:u,getStyle:c,...f}){let[h,p]=(0,o.useState)(false);return(0,r.jsxs)(l.Z,{style:{...a.ZL,padding:0,flexDirection:"row",alignItems:"center",...u,...h&&(s??{boxShadow:"0 0 0 1px "+i.rS.formInputShadowSelected}),...c&&c(h)},children:[e,(0,r.jsx)(a.ZP,{...f,style:{...n,flex:1,"&, &:focus, &:hover":{border:0,backgroundColor:"transparent",boxShadow:"none",color:"inherit"}},onFocus:e=>{p(true);f.onFocus?.(e)},onBlur:e=>{p(false);f.onBlur?.(e)}}),t]})}},6755:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(43188);var o=n(66204);var i=n(59379);var a=n(45485);var l=n(99818);var s=n(45492);var u=n(56816);const c=({to:e,style:t,activeStyle:n,onClick:o,...a})=>{const l=(0,i.s0)();const s=(0,i.bS)({path:e});const c=t=>{o?.(t);l(e)};return(0,r.jsx)(u.Z,{style:{...t,...s?n:{}},activeStyle:n,...a,onClick:c})};const f=({to:e,style:t,activeStyle:n,children:o})=>{const u=(0,i.bS)({path:e});return(0,r.jsx)(a.OL,{to:e,className:`${(0,l.iv)([s.W2.smallText,t,u?n:null])}`,children:o})};function h({variant:e="anchor",...t}){switch(e){case"anchor":return(0,r.jsx)(f,{...t});case"button":return(0,r.jsx)(c,{...t});default:throw new Error(`Unrecognised link type: ${e}`)}}},21920:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(43188);var o=n(66204);var i=n(99818);var a=n(45492);function l({style:e,children:t,...n}){return(0,r.jsx)("button",{type:"button",className:`${(0,i.iv)([{textDecoration:"none",color:a.rS.pageTextLink,backgroundColor:"transparent",display:"inline",border:0,cursor:"pointer",padding:0,font:"inherit",":hover":{textDecoration:"underline",boxShadow:"none"},":focus":{boxShadow:"none"}},a.W2.smallText,e])}`,...n,children:t})}},31941:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(43188);var o=n(66204);var i=n(45492);var a=n(77644);var l=n(24307);function s({keyName:e}){return(0,r.jsx)(a.Z,{style:{fontSize:10,color:i.rS.menuKeybindingText},children:e})}function u({header:e,footer:t,items:n,onMenuSelect:c}){let f=(0,o.useRef)(null);let h=n.filter(e=>e);let[p,g]=(0,o.useState)(null);(0,o.useEffect)(()=>{const e=f.current;e.focus();let t=e=>{let t=h.filter(e=>e&&e!==u.line&&e.type!==u.label);let n=t.indexOf(h[p]);let r=e=>h.indexOf(t[e]);switch(e.key){case"ArrowUp":e.preventDefault();g(p===null?0:r(Math.max(n-1,0)));break;case"ArrowDown":e.preventDefault();g(p===null?0:r(Math.min(n+1,t.length-1)));break;case"Enter":e.preventDefault();const o=h[p];if(p!==null&&o!==u.line){c?.(o.name)}break;default:}};e.addEventListener("keydown",t);return()=>{e.removeEventListener("keydown",t)}},[p]);return(0,r.jsxs)(l.Z,{style:{outline:"none",borderRadius:4,overflow:"hidden"},tabIndex:1,innerRef:f,children:[e,h.map((e,t)=>{if(e===u.line){return(0,r.jsx)(l.Z,{style:{margin:"3px 0px"},children:(0,r.jsx)(l.Z,{style:{borderTop:"1px solid "+i.rS.menuBorder}})},t)}else if(e.type===u.label){return(0,r.jsx)(a.Z,{style:{color:i.rS.altMenuItemTextHeader,fontSize:11,lineHeight:"1em",textTransform:"uppercase",margin:"3px 9px",marginTop:5},children:e.name},e.name)}let n=h[t-1];return(0,r.jsxs)(l.Z,{role:"button",style:{cursor:"default",padding:"9px 10px",marginTop:t===0||n===u.line||n.type===u.label?0:-3,flexDirection:"row",alignItems:"center",color:i.rS.menuItemText,...e.disabled&&{color:i.rS.buttonBareDisabledText},...!e.disabled&&p===t&&{backgroundColor:i.rS.menuItemBackgroundHover,color:i.rS.menuItemTextHover}},onMouseEnter:()=>g(t),onMouseLeave:()=>g(null),onClick:t=>!e.disabled&&c&&c(e.name),children:[(0,r.jsx)(a.Z,{style:{lineHeight:0},children:e.icon&&(0,o.createElement)(e.icon,{width:e.iconSize||10,height:e.iconSize||10,style:{marginRight:7,width:10}})}),(0,r.jsx)(a.Z,{children:e.text}),(0,r.jsx)(l.Z,{style:{flex:1}}),e.key&&(0,r.jsx)(s,{keyName:e.key})]},e.name)}),t]})}const c=Symbol("menu-line");u.line=c;u.label=Symbol("menu-label")},8987:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(43188);var o=n(66204);var i=n(77216);var a=n.n(i);var l=n(81113);var s=n(45931);var u=n(40233);var c=n(45492);var f=n(90122);var h=n(56816);var p=n(77644);var g=n(24307);const m=({title:e,isCurrent:t,isHidden:i,size:m,padding:y=20,showHeader:b=true,showTitle:x=true,showClose:w=true,showOverlay:S=true,loading:k=false,noAnimation:T=false,focusAfterClose:E=true,stackIndex:C,parent:j,style:I,contentStyle:D,overlayStyle:P,children:O,onClose:M})=>{(0,o.useEffect)(()=>{let e=l.Z.getScope();l.Z.setScope("modal");return()=>l.Z.setScope(e)},[]);return(0,r.jsx)(a(),{isOpen:true,onRequestClose:M,shouldCloseOnOverlayClick:false,shouldFocusAfterRender:!n.g.IS_DESIGN_MODE,shouldReturnFocusAfterClose:E,appElement:document.querySelector("#root"),parentSelector:j&&(()=>j),style:{content:{top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",overflow:"visible",border:0,fontSize:14,backgroundColor:"transparent",padding:0,pointerEvents:"auto",...D},overlay:{zIndex:3e3,backgroundColor:S&&C===0?"rgba(0, 0, 0, .1)":"none",pointerEvents:S?"auto":"none",...P,...j?{position:"absolute",top:0,left:0,right:0,bottom:0}:{}}},children:(0,r.jsxs)(v,{noAnimation:T,isCurrent:t,size:m,style:{willChange:"opacity, transform",minWidth:"100%",minHeight:0,borderRadius:4,color:c.rS.pageText,backgroundColor:c.rS.modalBackground,opacity:i?0:1,[`@media (min-width: ${f.Z.breakpoint_small})`]:{minWidth:f.Z.breakpoint_small},...c.W2.shadowLarge,...I,...c.W2.lightScrollbar},children:[b&&(0,r.jsxs)(g.Z,{style:{padding:20,position:"relative",flexShrink:0},children:[x&&(0,r.jsx)(g.Z,{style:{flex:1,alignSelf:"center",textAlign:"center",width:"calc(100% - 40px)"},children:(0,r.jsx)(p.Z,{style:{fontSize:25,fontWeight:700,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e})}),(0,r.jsx)(g.Z,{style:{position:"absolute",right:0,top:0,bottom:0,justifyContent:"center",alignItems:"center"},children:(0,r.jsx)(g.Z,{style:{flexDirection:"row",marginRight:15},children:w&&(0,r.jsx)(h.Z,{type:"bare",onClick:M,style:{padding:"10px 10px"},"aria-label":"Close",children:(0,r.jsx)(u.Z,{width:10,style:{color:"inherit"}})})})})]}),(0,r.jsx)(g.Z,{style:{padding:y,paddingTop:0,flex:1},children:typeof O==="function"?O():O}),k&&(0,r.jsx)(g.Z,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:c.rS.pageBackground,alignItems:"center",justifyContent:"center",zIndex:1e3},children:(0,r.jsx)(s.Z,{style:{width:20,height:20},color:c.rS.pageText})})]})})};const v=({style:e,size:t,noAnimation:n,isCurrent:i,stackIndex:a,children:l})=>{let s=(0,o.useRef)(null);let u=(0,o.useRef)(false);let c=(0,o.useRef)(Math.random()*10-5);(0,o.useLayoutEffect)(()=>{if(s.current==null){return}function e(){if(i){s.current.style.transform="translateY(0px) scale(1)";s.current.style.pointerEvents="auto"}else{s.current.style.transform=`translateY(-40px) scale(.95) rotate(${c.current}deg)`;s.current.style.pointerEvents="none"}}if(!u.current){if(n){s.current.style.opacity=1;s.current.style.transform="translateY(0px) scale(1)";setTimeout(()=>{if(s.current){s.current.style.transition="opacity .1s, transform .1s cubic-bezier(.42, 0, .58, 1)"}},0)}else{s.current.style.opacity=0;s.current.style.transform="translateY(10px) scale(1)";setTimeout(()=>{if(s.current){u.current=true;s.current.style.transition="opacity .1s, transform .1s cubic-bezier(.42, 0, .58, 1)";s.current.style.opacity=1;e()}},0)}}else{e()}},[n,i,a]);return(0,r.jsx)(g.Z,{innerRef:s,style:{...e,...t&&{width:t.width,height:t.height},...n&&!i&&{display:"none"}},children:l})};const y=({style:e,leftContent:t,focusButton:n=false,children:i})=>{let a=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(n&&a.current){let e=a.current.querySelector("button:not([data-hidden])");if(e){e.focus()}}},[n]);return(0,r.jsxs)(g.Z,{innerRef:a,style:{flexDirection:"row",marginTop:30,...e},children:[t,(0,r.jsx)(g.Z,{style:{flex:1}}),i]})};t.C=m},42994:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(43188);var o=n(99818);function i({style:e,isLast:t,children:n,...i}){return(0,r.jsx)("div",{...i,className:`${(0,o.iv)(!t&&{marginBottom:15},e,{lineHeight:"1.5em"})}`,children:n})}},24198:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(43188);var o=n(86334);var i=n(30);var a=n(45492);var l=n(56816);var s=n(46405);function u({inputRef:e,value:t,onChange:n,placeholder:u,isInModal:c=false,width:f=250}){return(0,r.jsx)(s.Z,{inputRef:e,style:{width:f,flex:"",borderColor:c?null:"transparent",backgroundColor:c?null:a.rS.formInputBackground},focusStyle:c?null:{boxShadow:"0 0 0 1px "+a.rS.formInputShadowSelected,backgroundColor:a.rS.formInputBackgroundSelected},leftContent:(0,r.jsx)(i.Z,{style:{width:13,height:13,flexShrink:0,color:t?a.rS.altMenuItemTextSelected:"inherit",margin:5,marginRight:0}}),rightContent:t&&(0,r.jsx)(l.Z,{type:"bare",style:{padding:8},onClick:()=>n(""),title:"Clear search term",children:(0,r.jsx)(o.Z,{style:{width:8,height:8}})}),inputStyle:{"::placeholder":{color:a.rS.formInputTextPlaceholder,transition:"color .25s"},":focus":c?null:{"::placeholder":{color:a.rS.formInputTextPlaceholderSelected}}},value:t,placeholder:u,onKeyDown:e=>{if(e.key==="Escape")n("")},onChange:e=>n(e.target.value)})}},78628:function(e,t,n){"use strict";n.d(t,{Z:function(){return tJ}});var r=n(43188);var o=n(66204);var i=n.t(o,2);/**
|
|
97
|
+
* @reach/utils v0.18.0
|
|
98
|
+
*
|
|
99
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the MIT license found in the
|
|
102
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
103
|
+
*
|
|
104
|
+
* @license MIT
|
|
105
|
+
*/function a(){return!!(typeof window!=="undefined"&&window.document&&window.document.createElement)}function l(e,t,...n){return isValidElement(e)?cloneElement(e,t,...n):e}function s(e,t){return n=>{e&&e(n);if(!n.defaultPrevented){return t(n)}}}function u(e){return typeof e==="boolean"}function c(e){return!!(e&&({}).toString.call(e)=="[object Function]")}function f(e){return typeof e==="number"&&!isNaN(e)}function h(e){return typeof e==="string"}function p(e,t){if(e==null)return;if(c(e)){e(t)}else{try{e.current=t}catch(n){throw new Error(`Cannot assign value "${t}" to ref "${e}"`)}}}function g(...e){return(0,o.useCallback)(t=>{for(let n of e){p(n,t)}},e)}function m(e){return a()?e?e.ownerDocument:document:null}function v(e){let t=m(e);return t?t.defaultView||window:null}function y(e){let t=v(e);if(t){return t.getComputedStyle(e,null)}return null}function b(e,t){return y(e)?.getPropertyValue(t)||null}function x(e,t){let n=o.createContext(t);n.displayName=e;return n}function w(e,t){let n=React.createContext(t);function r(e){let{children:t,...r}=e;let o=React.useMemo(()=>r,Object.values(r));return React.createElement(n.Provider,{value:o},t)}function o(r){let o=React.useContext(n);if(o){return o}if(t){return t}throw Error(`${r} must be rendered inside of a ${e} component.`)}n.displayName=`${e}Context`;r.displayName=`${e}Provider`;return[r,o]}function S(e,t,n){if(true){let r=(0,o.useRef)(e!=null);let i=(0,o.useRef)({componentName:n,controlledPropName:t});(0,o.useEffect)(()=>{i.current={componentName:n,controlledPropName:t}},[n,t]);(0,o.useEffect)(()=>{let{current:t}=r;let{componentName:n,controlledPropName:o}=i.current;let a=e!=null;if(t!==a){console.error(`A component is changing an ${t?"":"un"}controlled \`${o}\` state of ${n} to be ${t?"un":""}controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.
|
|
106
|
+
More info: https://fb.me/react-controlled-components`)}},[e])}}function k(e){let t=m(e);let n=t.defaultView||window;if(!t){return{width:0,height:0}}return{width:t.documentElement.clientWidth??n.innerWidth,height:t.documentElement.clientHeight??n.innerHeight}}function T(e){let t=v(e);if(!t){return{scrollX:0,scrollY:0}}return{scrollX:t.scrollX,scrollY:t.scrollY}}function E(){try{if(window.innerWidth>document.documentElement.clientWidth){return window.innerWidth-document.documentElement.clientWidth}}catch(e){}return 0}function C(e){return"which"in e?e.which===3:"button"in e?e.button===2:false}function j(...e){return e.filter(e=>e!=null).join("--")}function I(){}function D(e){const t=(0,o.useRef)();if(!t.current){t.current={v:e()}}return t.current.v}function P({controlledValue:e,defaultValue:t,calledFrom:n="A component"}){let r=e!==void 0;let o=useRef3(r);if(true){if(!o.current&&r){console.warn(`${n} is changing from controlled to uncontrolled. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}if(o.current&&!r){console.warn(`${n} is changing from uncontrolled to controlled. Components should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}}let[i,a]=useState(o.current?e:t);let l=useCallback2(e=>{if(!o.current){a(e)}},[]);return[o.current?e:i,l]}function O(e,t,n=window){const r=useRef4(t);useEffect2(()=>{r.current=t},[t]);useEffect2(()=>{const t=n&&n.addEventListener;if(!t){if(true){console.warn("Event listener not supported on the element provided")}return}function o(e){r.current(e)}n.addEventListener(e,o);return()=>{n.removeEventListener(e,o)}},[e,n])}function M(e=console.log,t="focus",n=document){let r=useRef5(n.activeElement);useEffect3(()=>{r.current=n.activeElement;function o(t){if(r.current!==n.activeElement){e(n.activeElement,r.current,t);r.current=n.activeElement}}n.addEventListener(t,o,true);return()=>{n.removeEventListener(t,o)}},[t,e,n])}function _(){let[,e]=(0,o.useState)(Object.create(null));return(0,o.useCallback)(()=>{e(Object.create(null))},[])}var R=a()?o.useLayoutEffect:o.useEffect;function A(e){let t=useRef6(false);let n=useRef6();if(!t.current){t.current=true;n.current=e()}return n}function N(e){const t=useRef7(null);useEffect5(()=>{t.current=e},[e]);return t.current}function Z(e,t){let n=(0,o.useRef)(t);e(()=>{n.current=t});return(0,o.useCallback)((...e)=>{n.current&&n.current(...e)},[])}function L(e){return Z(o.useEffect,e)}function B(e){return Z(R,e)}function F(e,t){let[n,r]=(0,o.useState)(t);let i=(0,o.useCallback)(t=>{e.current=t;r(t)},[]);return[n,i]}function W(e,t){const n=useRef9(false);useEffect7(()=>{if(n.current){e()}else{n.current=true}},t)};/**
|
|
107
|
+
* @reach/auto-id v0.18.0
|
|
108
|
+
*
|
|
109
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the MIT license found in the
|
|
112
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
113
|
+
*
|
|
114
|
+
* @license MIT
|
|
115
|
+
*/var U=false;var z=0;function H(){return++z}var K=i["useId".toString()];function $(e){if(K!==void 0){let t=K();return e??t}let t=e??(U?H():null);let[n,r]=o.useState(t);R(()=>{if(n===null){r(H())}},[]);o.useEffect(()=>{if(U===false){U=true}},[]);return e??n??void 0}var V=n(42457);/**
|
|
116
|
+
* @reach/portal v0.18.0
|
|
117
|
+
*
|
|
118
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
119
|
+
*
|
|
120
|
+
* This source code is licensed under the MIT license found in the
|
|
121
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
122
|
+
*
|
|
123
|
+
* @license MIT
|
|
124
|
+
*/var q=({children:e,type:t="reach-portal",containerRef:n})=>{let r=o.useRef(null);let i=o.useRef(null);let a=_();if(true){o.useEffect(()=>{if(n!=null){if(typeof n!=="object"||!("current"in n)){console.warn("@reach/portal: Invalid value passed to the `containerRef` of a `Portal`. The portal will be appended to the document body, but if you want to attach it to another DOM node you must pass a valid React ref object to `containerRef`.")}else if(n.current==null){console.warn("@reach/portal: A ref was passed to the `containerRef` prop of a `Portal`, but no DOM node was attached to it. Be sure to pass the ref to a DOM component.\n\nIf you are forwarding the ref from another component, be sure to use the React.forwardRef API. See https://reactjs.org/docs/forwarding-refs.html.")}}},[n])}R(()=>{if(!r.current)return;let e=r.current.ownerDocument;let o=n?.current||e.body;i.current=e?.createElement(t);o.appendChild(i.current);a();return()=>{if(i.current&&o){o.removeChild(i.current)}}},[t,a,n]);return i.current?(0,V.createPortal)(e,i.current):o.createElement("span",{ref:r})};var Y=({unstable_skipInitialRender:e,...t})=>{let[n,r]=o.useState(false);o.useEffect(()=>{if(e){r(true)}},[e]);if(e&&!n){return null}return o.createElement(q,{...t})};Y.displayName="Portal";var G=["bottom","height","left","right","top","width"];var Q=function e(e,t){if(e===void 0){e={}}if(t===void 0){t={}}return G.some(function(n){return e[n]!==t[n]})};var X=new Map;var J;var ee=function e(){var t=[];X.forEach(function(e,n){var r=n.getBoundingClientRect();if(Q(r,e.rect)){e.rect=r;t.push(e)}});t.forEach(function(e){e.callbacks.forEach(function(t){return t(e.rect)})});J=window.requestAnimationFrame(e)};function et(e,t){return{observe:function n(){var n=X.size===0;if(X.has(e)){X.get(e).callbacks.push(t)}else{X.set(e,{rect:undefined,hasRectChanged:false,callbacks:[t]})}if(n)ee()},unobserve:function n(){var n=X.get(e);if(n){var r=n.callbacks.indexOf(t);if(r>=0)n.callbacks.splice(r,1);if(!n.callbacks.length)X["delete"](e);if(!X.size)cancelAnimationFrame(J)}}}}var en=et;/**
|
|
125
|
+
* @reach/rect v0.18.0
|
|
126
|
+
*
|
|
127
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the MIT license found in the
|
|
130
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
131
|
+
*
|
|
132
|
+
* @license MIT
|
|
133
|
+
*/var er=({onChange:e,observe:t=true,children:n})=>{const r=o.useRef(null);const i=eo(r,{observe:t,onChange:e});return n({ref:r,rect:i})};er.displayName="Rect";function eo(e,t,n){let r;let i;if(u(t)){r=t}else{r=t?.observe??true;i=t?.onChange}if(c(n)){i=n}if(true){o.useEffect(()=>{if(u(t)){console.warn("Passing `observe` as the second argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `observe` property as the second argument (`useRect(ref, { observe })`).\nSee https://reach.tech/rect#userect-observe")}},[t]);o.useEffect(()=>{if(c(n)){console.warn("Passing `onChange` as the third argument to `useRect` is deprecated and will be removed in a future version of Reach UI. Instead, you can pass an object of options with an `onChange` property as the second argument (`useRect(ref, { onChange })`).\nSee https://reach.tech/rect#userect-onchange")}},[n])}let[a,l]=o.useState(e.current);let s=o.useRef(false);let f=o.useRef(false);let[h,p]=o.useState(null);let g=o.useRef(i);R(()=>{g.current=i;if(e.current!==a){l(e.current)}});R(()=>{if(a&&!s.current){s.current=true;p(a.getBoundingClientRect())}},[a]);R(()=>{if(!r){return}let t=a;if(!f.current){f.current=true;t=e.current}if(!t){if(true){console.warn("You need to place the ref")}return}let n=en(t,e=>{g.current?.(e);p(e)});n.observe();return()=>{n.unobserve()}},[r,a,e]);return h};/*!
|
|
134
|
+
* tabbable 5.3.3
|
|
135
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
136
|
+
*/var ei=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"];var ea=ei.join(",");var el=typeof Element==="undefined";var es=el?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;var eu=!el&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument};var ec=function e(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(ea));if(t&&es.call(e,ea)){r.unshift(e)}r=r.filter(n);return r};var ed=function e(t,n,r){var o=[];var i=Array.from(t);while(i.length){var a=i.shift();if(a.tagName==="SLOT"){var l=a.assignedElements();var s=l.length?l:a.children;var u=e(s,true,r);if(r.flatten){o.push.apply(o,u)}else{o.push({scope:a,candidates:u})}}else{var c=es.call(a,ea);if(c&&r.filter(a)&&(n||!t.includes(a))){o.push(a)}var f=a.shadowRoot||typeof r.getShadowRoot==="function"&&r.getShadowRoot(a);var h=!r.shadowRootFilter||r.shadowRootFilter(a);if(f&&h){var p=e(f===true?a.children:f.children,true,r);if(r.flatten){o.push.apply(o,p)}else{o.push({scope:a,candidates:p})}}else{i.unshift.apply(i,a.children)}}}return o};var ef=function e(e,t){if(e.tabIndex<0){if((t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))){return 0}}return e.tabIndex};var eh=function e(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex};var ep=function e(e){return e.tagName==="INPUT"};var eg=function e(e){return ep(e)&&e.type==="hidden"};var em=function e(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName==="SUMMARY"});return t};var ev=function e(e,t){for(var n=0;n<e.length;n++){if(e[n].checked&&e[n].form===t){return e[n]}}};var ey=function e(e){if(!e.name){return true}var t=e.form||eu(e);var n=function e(e){return t.querySelectorAll('input[type="radio"][name="'+e+'"]')};var r;if(typeof window!=="undefined"&&typeof window.CSS!=="undefined"&&typeof window.CSS.escape==="function"){r=n(window.CSS.escape(e.name))}else{try{r=n(e.name)}catch(e){console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message);return false}}var o=ev(r,e.form);return!o||o===e};var eb=function e(e){return ep(e)&&e.type==="radio"};var ex=function e(e){return eb(e)&&!ey(e)};var ew=function e(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0};var eS=function e(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden"){return true}var o=es.call(e,"details>summary:first-of-type");var i=o?e.parentElement:e;if(es.call(i,"details:not([open]) *")){return true}var a=eu(e).host;var l=(a===null||a===void 0?void 0:a.ownerDocument.contains(a))||e.ownerDocument.contains(e);if(!n||n==="full"){if(typeof r==="function"){var s=e;while(e){var u=e.parentElement;var c=eu(e);if(u&&!u.shadowRoot&&r(u)===true){return ew(e)}else if(e.assignedSlot){e=e.assignedSlot}else if(!u&&c!==e.ownerDocument){e=c.host}else{e=u}}e=s}if(l){return!e.getClientRects().length}}else if(n==="non-zero-area"){return ew(e)}return false};var ek=function e(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)){var t=e.parentElement;while(t){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND"){return es.call(t,"fieldset[disabled] *")?true:!r.contains(e)}}return true}t=t.parentElement}}return false};var eT=function e(e,t){if(t.disabled||eg(t)||eS(t,e)||em(t)||ek(t)){return false}return true};var eE=function e(e,t){if(ex(t)||ef(t)<0||!eT(e,t)){return false}return true};var eC=function e(e){var t=parseInt(e.getAttribute("tabindex"),10);if(isNaN(t)||t>=0){return true}return false};var ej=function e(t){var n=[];var r=[];t.forEach(function(t,o){var i=!!t.scope;var a=i?t.scope:t;var l=ef(a,i);var s=i?e(t.candidates):a;if(l===0){i?n.push.apply(n,s):n.push(a)}else{r.push({documentOrder:o,tabIndex:l,item:t,isScope:i,content:s})}});return r.sort(eh).reduce(function(e,t){t.isScope?e.push.apply(e,t.content):e.push(t.content);return e},[]).concat(n)};var eI=function e(e,t){t=t||{};var n;if(t.getShadowRoot){n=ed([e],t.includeContainer,{filter:eE.bind(null,t),flatten:false,getShadowRoot:t.getShadowRoot,shadowRootFilter:eC})}else{n=ec(e,t.includeContainer,eE.bind(null,t))}return ej(n)};var eD=function e(e,t){t=t||{};var n;if(t.getShadowRoot){n=ed([e],t.includeContainer,{filter:eT.bind(null,t),flatten:true,getShadowRoot:t.getShadowRoot})}else{n=ec(e,t.includeContainer,eT.bind(null,t))}return n};var eP=function e(e,t){t=t||{};if(!e){throw new Error("No node provided")}if(es.call(e,ea)===false){return false}return eE(t,e)};var eO=null&&ei.concat("iframe").join(",");var eM=function e(e,t){t=t||{};if(!e){throw new Error("No node provided")}if(es.call(e,eO)===false){return false}return eT(t,e)};/**
|
|
137
|
+
* @reach/popover v0.18.0
|
|
138
|
+
*
|
|
139
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the MIT license found in the
|
|
142
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
143
|
+
*
|
|
144
|
+
* @license MIT
|
|
145
|
+
*/var e_=o.forwardRef(function e({unstable_skipInitialPortalRender:e,...t},n){return o.createElement(Y,{unstable_skipInitialRender:e},o.createElement(eR,{ref:n,...t}))});e_.displayName="Popover";var eR=o.forwardRef(function e({as:e="div",targetRef:t,position:n=eZ,unstable_observableRefs:r=[],...i},a){const l=o.useRef(null);const s=eo(l,{observe:!i.hidden});const u=eo(t,{observe:true});const c=g(l,a);eW(t,l);return o.createElement(e,{"data-reach-popover":"",ref:c,...i,style:{position:"absolute",...eA(n,u,s,...r),...i.style}})});eR.displayName="PopoverImpl";function eA(e,t,n,...r){return n?e(t,n,...r.map(e=>e.current)):{visibility:"hidden"}}function eN(e,t,n){return{top:n?`${e.top-t.height+window.pageYOffset}px`:`${e.top+e.height+window.pageYOffset}px`}}var eZ=(e,t)=>{if(!e||!t){return{}}const{directionRight:n,directionUp:r}=eF(e,t);return{left:n?`${e.right-t.width+window.pageXOffset}px`:`${e.left+window.pageXOffset}px`,...eN(e,t,r)}};var eL=(e,t)=>{if(!e||!t){return{}}const{directionLeft:n,directionUp:r}=eF(e,t);return{left:n?`${e.left+window.pageXOffset}px`:`${e.right-t.width+window.pageXOffset}px`,...eN(e,t,r)}};var eB=(e,t)=>{if(!e||!t){return{}}const{directionUp:n}=eF(e,t);return{width:e.width,left:e.left,...eN(e,t,n)}};function eF(e,t,n=0,r=0){const o={top:e.top-t.height<0,right:window.innerWidth<e.left+t.width-n,bottom:window.innerHeight<e.bottom+t.height-r,left:e.left+e.width-t.width<0};const i=o.right&&!o.left;const a=o.left&&!o.right;const l=o.bottom&&!o.top;const s=o.top&&!o.bottom;return{directionRight:i,directionLeft:a,directionUp:l,directionDown:s}}function eW(e,t){const n=m(e.current);function r(e){if(e.key==="Tab"&&t.current&&eI(t.current).length===0){return}if(e.key==="Tab"&&e.shiftKey){if(c(e)){f(e)}else if(h(e)){p(e)}else if(v(e)){b()}}else if(e.key==="Tab"){if(a()){l(e)}else if(s()){u(e)}else if(g(e)){b()}}}o.useEffect(()=>{n.addEventListener("keydown",r);return()=>{n.removeEventListener("keydown",r)}},[]);function i(){const r=eI(n);const o=r&&e.current?r.indexOf(e.current):-1;const i=r&&r[o+1];return t.current&&t.current.contains(i||null)?false:i}function a(){return e.current?e.current===n.activeElement:false}function l(e){const n=t.current&&eI(t.current);if(n&&n[0]){e.preventDefault();n[0].focus()}}function s(){const e=t.current?t.current.contains(n.activeElement||null):false;if(e){const e=t.current&&eI(t.current);return Boolean(e&&e[e.length-1]===n.activeElement)}return false}function u(e){const t=i();if(t){e.preventDefault();t.focus()}}function c(e){if(!e.shiftKey)return;const t=i();return e.target===t}function f(e){const n=t.current&&eI(t.current);const r=n&&n[n.length-1];if(r){e.preventDefault();r.focus()}}function h(e){const n=t.current&&eI(t.current);if(n){return n.length===0?false:e.target===n[0]}return false}function p(t){t.preventDefault();e.current?.focus()}function g(e){const r=t.current?eI(n).filter(e=>!t.current.contains(e)):null;return r?e.target===r[r.length-1]:false}function v(e){return e.target===eI(n)[0]}let y=[];function b(){const e=t.current&&eI(t.current);if(e){e.forEach(e=>{y.push([e,e.tabIndex]);e.tabIndex=-1});n.addEventListener("focusin",x)}}function x(){n.removeEventListener("focusin",x);y.forEach(([e,t])=>{e.tabIndex=t})}};/**
|
|
146
|
+
* @reach/descendants v0.18.0
|
|
147
|
+
*
|
|
148
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
149
|
+
*
|
|
150
|
+
* This source code is licensed under the MIT license found in the
|
|
151
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
152
|
+
*
|
|
153
|
+
* @license MIT
|
|
154
|
+
*/function eU(e,t={}){const n=[];let r=o.createContext({descendants:n,registerDescendant:()=>I,...t});r.displayName=e;return r}function ez(e,t,n){let r=_();let{registerDescendant:i,descendants:a}=o.useContext(t);let l=n??a.findIndex(t=>t.element===e.element);R(()=>{if(!e.element)r();return i({...e,index:l})},[e,r,l,i,...Object.values(e)]);return l}function eH(){return o.useState([])}function eK(e){return o.useContext(e).descendants}function e$({context:e,children:t,items:n,set:r}){let i=o.useCallback(({element:e,index:t,...n})=>{if(!e)return I;r(r=>{if(t!=null&&t!==-1){return eG(r,{element:e,index:t,...n},t)}if(r.length===0){return[{...n,element:e,index:0}]}if(true){if(r.find(t=>t.element===e)){console.warn("[reach-ui]: `useDescendant` was called with an element that was already registered.\n\nIf you are using the `@reach/descendants` package directly, make sure to only register descendants once. Registering a descendant more than once will lead to bugs in your app.\n\nIf you are using another `reach-ui` package, this is probably our bug!\n\nTo report a bug, open a new issue:\n\n https://github.com/reach/reach-ui/issues/new?assignees=&labels=&template=Bug_report.md\n\nIMPORTANT: this check will only run in the development build, so if you see this warning please be aware that your app may crash when deployed.");return eQ(r)}}let o=eY(r,e);let i;if(o===-1){i=[...r,{...n,element:e,index:r.length}]}else{i=eG(r,{...n,element:e,index:o},o)}return i});return()=>{if(!e)return;r(t=>t.filter(t=>e!==t.element))}},[]);return o.createElement(e.Provider,{value:o.useMemo(()=>{return{descendants:n,registerDescendant:i}},[n,i])},t)}function eV(e,t){let{descendants:n}=o.useContext(e);let{callback:r,currentIndex:i,filter:a,key:l="index",orientation:s="vertical",rotate:u=true,rtl:c=false}=t;return function e(e){if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(e.key)){return}let t=i??-1;let o=a?n.filter(a):n;if(!o.length){return}let f=o.findIndex(e=>e.index===i);function h(){let e=t===m().index;return e?u?g():o[f]:o[(f+1)%o.length]}function p(){let e=t===g().index;return e?u?m():o[f]:o[(f-1+o.length)%o.length]}function g(){return o[0]}function m(){return o[o.length-1]}switch(e.key){case"ArrowDown":if(s==="vertical"||s==="both"){e.preventDefault();let t=h();r(l==="option"?t:t[l])}break;case"ArrowUp":if(s==="vertical"||s==="both"){e.preventDefault();let t=p();r(l==="option"?t:t[l])}break;case"ArrowLeft":if(s==="horizontal"||s==="both"){e.preventDefault();let t=(c?h:p)();r(l==="option"?t:t[l])}break;case"ArrowRight":if(s==="horizontal"||s==="both"){e.preventDefault();let t=(c?p:h)();r(l==="option"?t:t[l])}break;case"PageUp":e.preventDefault();let v=(e.ctrlKey?p:g)();r(l==="option"?v:v[l]);break;case"Home":e.preventDefault();let y=g();r(l==="option"?y:y[l]);break;case"PageDown":e.preventDefault();let b=(e.ctrlKey?h:m)();r(l==="option"?b:b[l]);break;case"End":e.preventDefault();let x=m();r(l==="option"?x:x[l]);break}}}function eq(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function eY(e,t){if(!t)return-1;if(!e.length)return-1;let n=e.length;while(n--){let r=e[n].element;if(!r)continue;if(eq(r,t)){return n+1}}return-1}function eG(e,t,n){if(n==null||!(n in e)){return[...e,t]}return[...e.slice(0,n),t,...e.slice(n)]}function eQ(e){return e.sort((e,t)=>!e.element||!t.element?0:eq(e.element,t.element)?-1:1).map((e,t)=>({...e,index:t}))};/*! *****************************************************************************
|
|
155
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
156
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
157
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
158
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
159
|
+
|
|
160
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
161
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
162
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
163
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
164
|
+
|
|
165
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
166
|
+
and limitations under the License.
|
|
167
|
+
***************************************************************************** */var eX;!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(eX||(eX={}));var eJ={type:"xstate.init"};function e0(e){return void 0===e?[]:[].concat(e)}function e1(e){return{type:"xstate.assign",assignment:e}}function e2(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function e4(e){return function(t){return e===t}}function e5(e){return"string"==typeof e?{type:e}:e}function e3(e,t){return{value:e,context:t,actions:[],changed:!1,matches:e4(e)}}function e7(e,t){void 0===t&&(t={});var n={config:e,_options:t,initialState:{value:e.initial,actions:e0(e.states[e.initial].entry).map(function(e){return e2(e,t.actions)}),context:e.context,matches:e4(e.initial)},transition:function(t,r){var o,i,a="string"==typeof t?{value:t,context:e.context}:t,l=a.value,s=a.context,u=e5(r),c=e.states[l];if(c.on){var f=e0(c.on[u.type]),h=function(t){if(void 0===t)return{value:e3(l,s)};var r="string"==typeof t?{target:t}:t,o=r.target,i=void 0===o?l:o,a=r.actions,f=void 0===a?[]:a,h=r.cond,p=s;if((void 0===h?function(){return!0}:h)(s,u)){var g=e.states[i],m=!1,v=[].concat(c.exit,f,g.entry).filter(function(e){return e}).map(function(e){return e2(e,n._options.actions)}).filter(function(e){if("xstate.assign"===e.type){m=!0;var t=Object.assign({},p);return"function"==typeof e.assignment?t=e.assignment(p,u):Object.keys(e.assignment).forEach(function(n){t[n]="function"==typeof e.assignment[n]?e.assignment[n](p,u):e.assignment[n]}),p=t,!1}return!0});return{value:{value:i,context:p,actions:v,changed:i!==l||v.length>0||m,matches:e4(i)}}}};try{for(var p=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}(f),g=p.next();!g.done;g=p.next()){var m=h(g.value);if("object"==typeof m)return m.value}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}}return e3(l,s)}};return n}var e6=function(e,t){return e.actions.forEach(function(n){var r=n.exec;return r&&r(e.context,t)})};function e8(e){var t=e.initialState,n=eX.NotStarted,r=new Set,o={_machine:e,send:function(o){n===eX.Running&&(t=e.transition(t,o),e6(t,e5(o)),r.forEach(function(e){return e(t)}))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(){return n=eX.Running,e6(t,eJ),o},stop:function(){return n=eX.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o};/**
|
|
168
|
+
* @reach/machine v0.18.0
|
|
169
|
+
*
|
|
170
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the MIT license found in the
|
|
173
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
174
|
+
*
|
|
175
|
+
* @license MIT
|
|
176
|
+
*/var e9=e=>{let t;e.subscribe(e=>{t=e}).unsubscribe();return t};function te(e,t,n){let r=o.useRef(e);let i=D(()=>e8(r.current).start());let a=o.useRef(null);let[l,s]=o.useState(()=>e9(i));let u=o.useCallback(e=>{let r=h(e)?{type:e}:e;let o=tt(t);i.send({...r,lastEventType:a.current,refs:o});a.current=r.type;if(true){if(n){console.group("Event Sent");console.log("Event:",r);console.groupEnd()}}},[n]);o.useEffect(()=>{i.subscribe(function e(e){if(e.changed){s(e)}});return()=>{i.stop()}},[i]);o.useEffect(()=>{if(true){if(n&&l.changed){console.group("State Updated");console.log("State:",l);console.groupEnd()}}},[n,l]);const c=o.useMemo(()=>({...l,matches:e=>e===l.value}),[l.changed,l.context,l.value]);return[c,u,i]}function tt(e){return Object.entries(e).reduce((e,[t,n])=>{e[t]=n.current;return e},{})}function tn(e,t){return D(()=>e7(e,t))};/**
|
|
177
|
+
* @reach/listbox v0.18.0
|
|
178
|
+
*
|
|
179
|
+
* Copyright (c) 2018-2022, React Training LLC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the MIT license found in the
|
|
182
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
183
|
+
*
|
|
184
|
+
* @license MIT
|
|
185
|
+
*/var tr=e1({navigationValue:null});var to=e1({typeaheadQuery:null});var ti=e1({value:(e,t)=>t.value});var ta=e1({value:(e,t)=>e.initialValue});var tl=e1({navigationValue:(e,t)=>t.value});var ts=e1({navigationValue:e=>{let t=tj(e.value,e.options);if(t&&!t.disabled){return e.value}else{return e.options.find(e=>!e.disabled)?.value||null}}});function tu(e,t){if(t.type==="BLUR"){let{list:e,popover:n}=t.refs;let{relatedTarget:r}=t;let o=m(n);return!!(o?.activeElement!==e&&n&&!n.contains(r||o?.activeElement))}return false}function tc(e,t){if(t.type==="OUTSIDE_MOUSE_DOWN"||t.type==="OUTSIDE_MOUSE_UP"){let{button:e,popover:n}=t.refs;let{relatedTarget:r}=t;return!!(r!==e&&e&&!e.contains(r)&&n&&!n.contains(r))}return false}function td(e,t){return!!e.options.find(t=>t.value===e.navigationValue)}function tf(e,t){let{popover:n,list:r}=t.refs;let{relatedTarget:o}=t;if(n&&o&&n.contains(o)&&o!==r){return false}return td(e,t)}function th(e,t){requestAnimationFrame(()=>{t.refs.list&&t.refs.list.focus()})}function tp(e,t){t.refs.button&&t.refs.button.focus()}function tg(e,t){return!t.disabled}function tm(e,t){return"isControlled"in t?!t.isControlled:false}function tv(e,t){if(t.type==="OPTION_TOUCH_START"){if(t&&t.disabled){return false}}return true}function ty(e,t){if("disabled"in t&&t.disabled){return false}if("value"in t){return t.value!=null}return e.navigationValue!=null}function tb(e,t){t.callback&&t.callback(t.value)}function tx(e,t){if(t.type!=="KEY_DOWN_ENTER"){return}let{hiddenInput:n}=t.refs;if(n&&n.form){let e=n.form.querySelector("button:not([type]),[type='submit']");e&&e.click()}}var tw=e1({typeaheadQuery:(e,t)=>{return(e.typeaheadQuery||"")+t.query}});var tS=e1({value:(e,t)=>{if(t.type==="UPDATE_AFTER_TYPEAHEAD"&&t.query){let n=tC(e.options,t.query);if(n&&!n.disabled){t.callback&&t.callback(n.value);return n.value}}return e.value}});var tk=e1({navigationValue:(e,t)=>{if(t.type==="UPDATE_AFTER_TYPEAHEAD"&&t.query){let n=tC(e.options,t.query);if(n&&!n.disabled){return n.value}}return e.navigationValue}});var tT={["GET_DERIVED_DATA"]:{actions:e1((e,t)=>{return{...e,...t.data}})},["VALUE_CHANGE"]:{actions:[ti,tb]}};var tE=({value:e})=>({id:"listbox",initial:"IDLE",context:{initialValue:e,value:e,options:[],navigationValue:null,typeaheadQuery:null},states:{["IDLE"]:{on:{...tT,["BUTTON_MOUSE_DOWN"]:{target:"OPEN",actions:[ts],cond:tg},["KEY_DOWN_SPACE"]:{target:"NAVIGATING",actions:[ts,th],cond:tg},["KEY_DOWN_SEARCH"]:{target:"IDLE",actions:tw,cond:tg},["UPDATE_AFTER_TYPEAHEAD"]:{target:"IDLE",actions:[tS],cond:tg},["CLEAR_TYPEAHEAD"]:{target:"IDLE",actions:to},["KEY_DOWN_NAVIGATE"]:{target:"NAVIGATING",actions:[ts,to,th],cond:tg},["KEY_DOWN_ENTER"]:{actions:[tx],cond:tg},["RESET_VALUE"]:{actions:[ta,tb],cond:tm}}},["INTERACTING"]:{entry:[tr],on:{...tT,["CLEAR_NAV_SELECTION"]:{actions:[tr,th]},["KEY_DOWN_ENTER"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["KEY_DOWN_SPACE"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["BUTTON_MOUSE_DOWN"]:{target:"IDLE",actions:[tp]},["KEY_DOWN_ESCAPE"]:{target:"IDLE",actions:[tp]},["OPTION_MOUSE_DOWN"]:{target:"DRAGGING"},["OUTSIDE_MOUSE_DOWN"]:[{target:"IDLE",cond:tc,actions:to},{target:"DRAGGING",actions:to,cond:td}],["OUTSIDE_MOUSE_UP"]:[{target:"IDLE",cond:tc,actions:to},{target:"NAVIGATING",cond:td},{target:"INTERACTING",actions:to}],["KEY_DOWN_ENTER"]:"INTERACTING",["BLUR"]:[{target:"IDLE",cond:tu,actions:to},{target:"NAVIGATING",cond:tf},{target:"INTERACTING",actions:to}],["OPTION_TOUCH_START"]:{target:"NAVIGATING",actions:[tl,to],cond:tv},["OPTION_CLICK"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["OPTION_PRESS"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["OPTION_MOUSE_ENTER"]:{target:"NAVIGATING",actions:[tl,to],cond:tv},["KEY_DOWN_NAVIGATE"]:{target:"NAVIGATING",actions:[tl,to,th]}}},["OPEN"]:{on:{...tT,["CLEAR_NAV_SELECTION"]:{actions:[tr]},["KEY_DOWN_ENTER"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["KEY_DOWN_SPACE"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["BUTTON_MOUSE_DOWN"]:{target:"IDLE",actions:[tp]},["KEY_DOWN_ESCAPE"]:{target:"IDLE",actions:[tp]},["OPTION_MOUSE_DOWN"]:{target:"DRAGGING"},["OUTSIDE_MOUSE_DOWN"]:[{target:"IDLE",cond:tc,actions:to},{target:"DRAGGING",cond:td},{target:"INTERACTING",actions:to}],["OUTSIDE_MOUSE_UP"]:[{target:"IDLE",cond:tc,actions:to},{target:"NAVIGATING",cond:td},{target:"INTERACTING",actions:to}],["BLUR"]:[{target:"IDLE",cond:tu,actions:to},{target:"NAVIGATING",cond:tf},{target:"INTERACTING",actions:to}],["BUTTON_MOUSE_UP"]:{target:"NAVIGATING",actions:[ts,th]},["LIST_MOUSE_UP"]:{target:"NAVIGATING",actions:[ts,th]},["OPTION_TOUCH_START"]:{target:"NAVIGATING",actions:[tl,to],cond:tv},["OPTION_CLICK"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["OPTION_PRESS"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["KEY_DOWN_NAVIGATE"]:{target:"NAVIGATING",actions:[tl,to,th]},["KEY_DOWN_SEARCH"]:{target:"NAVIGATING",actions:tw},["UPDATE_AFTER_TYPEAHEAD"]:{actions:[tk]},["CLEAR_TYPEAHEAD"]:{actions:to},["OPTION_MOUSE_MOVE"]:[{target:"DRAGGING",actions:[tl],cond:tv},{target:"DRAGGING"}]}},["DRAGGING"]:{on:{...tT,["CLEAR_NAV_SELECTION"]:{actions:[tr]},["KEY_DOWN_ENTER"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["KEY_DOWN_SPACE"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["BUTTON_MOUSE_DOWN"]:{target:"IDLE",actions:[tp]},["KEY_DOWN_ESCAPE"]:{target:"IDLE",actions:[tp]},["OPTION_MOUSE_DOWN"]:{target:"DRAGGING"},["OUTSIDE_MOUSE_DOWN"]:[{target:"IDLE",cond:tc,actions:to},{target:"NAVIGATING",cond:td},{target:"INTERACTING",actions:to}],["OUTSIDE_MOUSE_UP"]:[{target:"IDLE",cond:tc,actions:to},{target:"NAVIGATING",cond:td,actions:th},{target:"INTERACTING",actions:[to,th]}],["BLUR"]:[{target:"IDLE",cond:tu,actions:to},{target:"NAVIGATING",cond:tf},{target:"INTERACTING",actions:to}],["BUTTON_MOUSE_UP"]:{target:"NAVIGATING",actions:[ts,th]},["OPTION_TOUCH_START"]:{target:"NAVIGATING",actions:[tl,to],cond:tv},["OPTION_CLICK"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["OPTION_PRESS"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["OPTION_MOUSE_ENTER"]:{target:"DRAGGING",actions:[tl,to],cond:tv},["KEY_DOWN_NAVIGATE"]:{target:"NAVIGATING",actions:[tl,to,th]},["KEY_DOWN_SEARCH"]:{target:"NAVIGATING",actions:tw},["UPDATE_AFTER_TYPEAHEAD"]:{actions:[tk]},["CLEAR_TYPEAHEAD"]:{actions:to},["OPTION_MOUSE_MOVE"]:[{target:"NAVIGATING",actions:[tl],cond:tv},{target:"NAVIGATING"}],["OPTION_MOUSE_UP"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty}}},["NAVIGATING"]:{on:{...tT,["CLEAR_NAV_SELECTION"]:{actions:[tr,th]},["KEY_DOWN_ENTER"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["KEY_DOWN_SPACE"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["BUTTON_MOUSE_DOWN"]:{target:"IDLE",actions:[tp]},["KEY_DOWN_ESCAPE"]:{target:"IDLE",actions:[tp]},["OPTION_MOUSE_DOWN"]:{target:"DRAGGING"},["OUTSIDE_MOUSE_DOWN"]:[{target:"IDLE",cond:tc,actions:to},{target:"NAVIGATING",cond:td},{target:"INTERACTING",actions:to}],["OUTSIDE_MOUSE_UP"]:[{target:"IDLE",cond:tc,actions:to},{target:"NAVIGATING",cond:td},{target:"INTERACTING",actions:to}],["BLUR"]:[{target:"IDLE",cond:tu,actions:to},{target:"NAVIGATING",cond:tf},{target:"INTERACTING",actions:to}],["BUTTON_MOUSE_UP"]:{target:"NAVIGATING",actions:[ts,th]},["OPTION_TOUCH_START"]:{target:"NAVIGATING",actions:[tl,to],cond:tv},["OPTION_CLICK"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["OPTION_PRESS"]:{target:"IDLE",actions:[ti,to,tp,tb],cond:ty},["OPTION_MOUSE_ENTER"]:{target:"NAVIGATING",actions:[tl,to],cond:tv},["KEY_DOWN_NAVIGATE"]:{target:"NAVIGATING",actions:[tl,to,th]},["KEY_DOWN_SEARCH"]:{target:"NAVIGATING",actions:tw},["UPDATE_AFTER_TYPEAHEAD"]:{actions:[tk]},["CLEAR_TYPEAHEAD"]:{actions:to},["OPTION_MOUSE_MOVE"]:[{target:"NAVIGATING",actions:[tl],cond:tv},{target:"NAVIGATING"}]}}}});function tC(e,t=""){if(!t)return null;const n=e.find(e=>!e.disabled&&e.label&&e.label.toLowerCase().startsWith(t.toLowerCase()));return n||null}function tj(e,t){return e?t.find(t=>t.value===e):void 0}var tI=false;var tD=eU("ListboxDescendantContext");var tP=x("ListboxContext",{});var tO=x("ListboxGroupContext",{});var tM=o.forwardRef(function e({as:e="div","aria-labelledby":t,"aria-label":n,children:r,defaultValue:i,disabled:a=false,form:l,name:s,onChange:u,required:f,value:h,__componentName:p="ListboxInput",...m},v){let y=o.useRef(h!=null);let[b,x]=eH();let w=o.useRef(null);let k=o.useRef(null);let T=o.useRef(null);let E=o.useRef(null);let C=o.useRef(null);let I=o.useRef(null);let D=o.useRef(null);let P=tn(tE({value:(y.current?h:i)||null}));let[O,M]=te(P,{button:w,hiddenInput:k,highlightedOption:T,input:E,list:C,popover:I,selectedOption:D},tI);function _(e){if(e!==O.context.value){u?.(e)}}let A=$(m.id);let N=m.id||j("listbox-input",A);let Z=g(E,v);let L=o.useMemo(()=>{let e=b.find(e=>e.value===O.context.value);return e?e.label:null},[b,O.context.value]);let B=tK(O.value);let F={ariaLabel:n,ariaLabelledBy:t,buttonRef:w,disabled:a,highlightedOptionRef:T,isExpanded:B,listboxId:N,listboxValueLabel:L,listRef:C,onValueChange:_,popoverRef:I,selectedOptionRef:D,send:M,state:O.value,stateData:O.context};let W=o.useRef(false);if(!y.current&&i==null&&!W.current&&b.length){W.current=true;let e=b.find(e=>!e.disabled);if(e&&e.value){M({type:"VALUE_CHANGE",value:e.value})}}S(h,"value",p);tY(h,O.context.value,()=>{M({type:"VALUE_CHANGE",value:h})});R(()=>{M({type:"GET_DERIVED_DATA",data:{options:b}})},[b,M]);o.useEffect(()=>{function e(e){let{target:t,relatedTarget:n}=e;if(!tq(I.current,t)){M({type:"OUTSIDE_MOUSE_DOWN",relatedTarget:n||t})}}if(B){window.addEventListener("mousedown",e)}return()=>{window.removeEventListener("mousedown",e)}},[M,B]);o.useEffect(()=>{function e(e){let{target:t,relatedTarget:n}=e;if(!tq(I.current,t)){M({type:"OUTSIDE_MOUSE_UP",relatedTarget:n||t})}}if(B){window.addEventListener("mouseup",e)}return()=>{window.removeEventListener("mouseup",e)}},[M,B]);o.useEffect(()=>{let e=k.current?.form;if(!e)return;function t(e){M({type:"RESET_VALUE",isControlled:y.current})}e.addEventListener("reset",t);return()=>{e?.removeEventListener("reset",t)}},[E,y,M]);return o.createElement(e,{...m,ref:Z,"data-reach-listbox-input":"","data-state":B?"expanded":"closed","data-value":O.context.value,id:N},o.createElement(tP.Provider,{value:F},o.createElement(e$,{context:tD,items:b,set:x},c(r)?r({id:N,isExpanded:B,value:O.context.value,selectedOptionRef:D,highlightedOptionRef:T,valueLabel:L,expanded:B}):r,(l||s||f)&&o.createElement("input",{ref:k,"data-reach-listbox-hidden-input":"",disabled:a,form:l,name:s,readOnly:true,required:f,tabIndex:-1,type:"hidden",value:O.context.value||""}))))});tM.displayName="ListboxInput";var t_=o.forwardRef(function e({arrow:e="▼",button:t,children:n,portal:r=true,...i},a){return o.createElement(tM,{...i,__componentName:"Listbox",ref:a},({value:i,valueLabel:a})=>o.createElement(o.Fragment,null,o.createElement(tA,{arrow:e,children:t?c(t)?t({value:i,label:a}):t:void 0}),o.createElement(tB,{portal:r},o.createElement(tF,null,n))))});t_.displayName="Listbox";var tR=o.forwardRef(function e({"aria-label":e,arrow:t=false,as:n="span",children:r,onKeyDown:i,onMouseDown:a,onMouseUp:l,...f},h){let{buttonRef:p,send:m,ariaLabelledBy:v,disabled:y,isExpanded:b,listboxId:x,stateData:w,listboxValueLabel:S}=o.useContext(tP);let k=w.value;let T=g(p,h);let E=t$();function I(e){if(!C(e.nativeEvent)){e.preventDefault();e.stopPropagation();m({type:"BUTTON_MOUSE_DOWN",disabled:y})}}function D(e){if(!C(e.nativeEvent)){e.preventDefault();e.stopPropagation();m({type:"BUTTON_MOUSE_UP"})}}let P=j("button",x);let O=o.useMemo(()=>{if(!r){return S}else if(c(r)){return r({isExpanded:b,label:S,value:k,expanded:b})}return r},[r,S,b,k]);return o.createElement(n,{"aria-disabled":y||void 0,"aria-expanded":b||void 0,"aria-haspopup":"listbox","aria-labelledby":e?void 0:[v,P].filter(Boolean).join(" "),"aria-label":e,role:"button",tabIndex:y?-1:0,...f,ref:T,"data-reach-listbox-button":"",id:P,onKeyDown:s(i,E),onMouseDown:s(a,I),onMouseUp:s(l,D)},O,t&&o.createElement(tZ,null,u(t)?null:t))});tR.displayName="ListboxButton";var tA=o.memo(tR);var tN=o.forwardRef(function e({as:e="span",children:t,...n},r){let{isExpanded:i}=o.useContext(tP);return o.createElement(e,{"aria-hidden":true,...n,ref:r,"data-reach-listbox-arrow":"","data-expanded":i?"":void 0},c(t)?t({isExpanded:i,expanded:i}):t||"▼")});tN.displayName="ListboxArrow";var tZ=o.memo(tN);var tL=o.forwardRef(function e({as:e="div",position:t=eB,onBlur:n,onKeyDown:r,onMouseUp:i,portal:a=true,unstable_observableRefs:l,...u},c){let{isExpanded:f,buttonRef:h,popoverRef:p,send:m}=o.useContext(tP);let v=g(p,c);let y=t$();function b(){m({type:"LIST_MOUSE_UP"})}let x={hidden:!f,tabIndex:-1,...u,ref:v,"data-reach-listbox-popover":"",onMouseUp:s(i,b),onBlur:s(n,w),onKeyDown:s(r,y)};function w(e){let{nativeEvent:t}=e;requestAnimationFrame(()=>{m({type:"BLUR",relatedTarget:t.relatedTarget||t.target})})}return a?o.createElement(e_,{...x,as:e,targetRef:h,position:t,unstable_observableRefs:l,unstable_skipInitialPortalRender:true}):o.createElement(e,{...x})});tL.displayName="ListboxPopover";var tB=o.memo(tL);var tF=o.forwardRef(function e({as:e="ul",...t},n){let{listRef:r,ariaLabel:i,ariaLabelledBy:a,isExpanded:l,listboxId:s,stateData:{value:u,navigationValue:c}}=o.useContext(tP);let f=g(n,r);return o.createElement(e,{"aria-activedescendant":tV(l?c:u),"aria-labelledby":i?void 0:a,"aria-label":i,role:"listbox",tabIndex:-1,...t,ref:f,"data-reach-listbox-list":"",id:j("listbox",s)})});tF.displayName="ListboxList";var tW=o.forwardRef(function e({as:e="li",children:t,disabled:n,index:r,label:i,onClick:a,onMouseDown:l,onMouseEnter:u,onMouseLeave:c,onMouseMove:f,onMouseUp:h,onTouchStart:p,value:m,...v},y){let{highlightedOptionRef:b,selectedOptionRef:x,send:w,isExpanded:S,onValueChange:k,state:T,stateData:{value:E,navigationValue:j}}=o.useContext(tP);let[I,D]=o.useState(i);let P=i||I||"";let O=o.useRef(null);let[M,_]=F(O,null);let R=o.useMemo(()=>{return{element:M,value:m,label:P,disabled:!!n}},[n,M,P,m]);ez(R,tD,r);let A=o.useCallback(e=>{if(!i&&e){D(t=>{if(e.textContent&&t!==e.textContent){return e.textContent}return t||""})}},[i]);let N=j?j===m:false;let Z=E===m;let L=g(A,y,_,Z?x:null,N?b:null);function B(){w({type:"OPTION_MOUSE_ENTER",value:m,disabled:!!n})}function W(){w({type:"OPTION_TOUCH_START",value:m,disabled:!!n})}function U(){w({type:"CLEAR_NAV_SELECTION"})}function z(e){if(!C(e.nativeEvent)){e.preventDefault();w({type:"OPTION_MOUSE_DOWN"})}}function H(e){if(!C(e.nativeEvent)){w({type:"OPTION_MOUSE_UP",value:m,callback:k,disabled:!!n})}}function K(e){if(!C(e.nativeEvent)){w({type:"OPTION_CLICK",value:m,callback:k,disabled:!!n})}}function $(){if(T==="OPEN"||j!==m){w({type:"OPTION_MOUSE_MOVE",value:m,disabled:!!n})}}return o.createElement(e,{"aria-selected":(S?N:Z)||void 0,"aria-disabled":n||void 0,role:"option",...v,ref:L,id:tV(m),"data-reach-listbox-option":"","data-current-nav":N?"":void 0,"data-current-selected":Z?"":void 0,"data-label":P,"data-value":m,onClick:s(a,K),onMouseDown:s(l,z),onMouseEnter:s(u,B),onMouseLeave:s(c,U),onMouseMove:s(f,$),onMouseUp:s(h,H),onTouchStart:s(p,W)},t)});tW.displayName="ListboxOption";var tU=o.forwardRef(function e({as:e="div",label:t,children:n,...r},i){let{listboxId:a}=o.useContext(tP);let l=j("label",$(r.id),a);return o.createElement(tO.Provider,{value:{labelId:l}},o.createElement(e,{"aria-labelledby":l,role:"group",...r,"data-reach-listbox-group":"",ref:i},t&&o.createElement(tz,null,t),n))});tU.displayName="ListboxGroup";var tz=o.forwardRef(function e({as:e="span",...t},n){let{labelId:r}=o.useContext(tO);return o.createElement(e,{role:"presentation",...t,ref:n,"data-reach-listbox-group-label":"",id:r})});tz.displayName="ListboxGroupLabel";function tH(){let{highlightedOptionRef:e,selectedOptionRef:t,listboxId:n,listboxValueLabel:r,isExpanded:o,stateData:{value:i}}=React.useContext(tP);return React.useMemo(()=>({id:n,isExpanded:o,selectedOptionRef:t,highlightedOptionRef:e,value:i,valueLabel:r}),[n,o,i,r,t,e])}function tK(e){return["NAVIGATING","OPEN","DRAGGING","INTERACTING"].includes(e)}function t$(){let{send:e,disabled:t,onValueChange:n,stateData:{navigationValue:r,typeaheadQuery:i}}=o.useContext(tP);let a=eK(tD);let l=L(n);o.useEffect(()=>{if(i){e({type:"UPDATE_AFTER_TYPEAHEAD",query:i,callback:l})}let t=window.setTimeout(()=>{if(i!=null){e({type:"CLEAR_TYPEAHEAD"})}},1e3);return()=>{window.clearTimeout(t)}},[l,e,i]);let u=a.findIndex(({value:e})=>e===r);let c=s(function(o){let{key:i}=o;let l=h(i)&&i.length===1;let s=a.find(e=>e.value===r);switch(i){case"Enter":e({type:"KEY_DOWN_ENTER",value:r,callback:n,disabled:!!(s?.disabled||t)});return;case" ":o.preventDefault();e({type:"KEY_DOWN_SPACE",value:r,callback:n,disabled:!!(s?.disabled||t)});return;case"Escape":e({type:"KEY_DOWN_ESCAPE"});return;case"Tab":let u=o.shiftKey?"KEY_DOWN_SHIFT_TAB":"KEY_DOWN_TAB";e({type:u});return;default:if(l){e({type:"KEY_DOWN_SEARCH",query:i,disabled:t})}return}},eV(tD,{currentIndex:u,orientation:"vertical",key:"index",rotate:true,filter:e=>!e.disabled,callback(n){e({type:"KEY_DOWN_NAVIGATE",value:a[n].value,disabled:t})}}));return c}function tV(e){let{listboxId:t}=o.useContext(tP);return e?j(`option-${e}`,t):void 0}function tq(e,t){return!!(e&&e.contains(t))}function tY(e,t,n){let{current:r}=o.useRef(e!=null);if(r&&e!==t){n()}}var tG=n(99818);var tQ=n(32951);var tX=n(45492);function tJ({bare:e,options:t,value:n,defaultLabel:o="",onChange:i,style:a,wrapperStyle:l,line:s,disabledKeys:u=[]}){const c=7;const f=a?.minHeight?a.minHeight:"18px";const h=t.filter(e=>e[0]===n);return(0,r.jsxs)(tM,{value:n,onChange:i,style:{color:e?"inherit":tX.rS.formInputText,backgroundColor:e?"transparent":tX.rS.cardBackground,borderRadius:tX.W2.menuBorderRadius,border:e?"none":"1px solid "+tX.rS.formInputBorder,lineHeight:"1em",...l},children:[(0,r.jsx)(tA,{className:`${(0,tG.iv)([{borderWidth:0,padding:5,borderRadius:4},a])}`,arrow:(0,r.jsx)(tQ.Z,{style:{width:c,height:c,color:"inherit"}}),children:(0,r.jsx)("span",{style:{display:"flex",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:`calc(100% - ${c+5}px)`,alignItems:"center",minHeight:f},children:h.length!==0?h[0][1]:o})}),(0,r.jsx)(tB,{style:{zIndex:1e4,outline:0,borderRadius:tX.W2.menuBorderRadius,backgroundColor:tX.rS.menuBackground,color:tX.rS.menuItemText,boxShadow:tX.W2.cardShadow,border:"1px solid "+tX.rS.menuBorder},className:`${(0,tG.iv)({"[data-reach-listbox-option]":{background:tX.rS.menuItemBackground,color:tX.rS.menuItemText},"[data-reach-listbox-option][data-current-nav]":{background:tX.rS.menuItemBackgroundHover,color:tX.rS.menuItemTextHover}})}`,children:!s?(0,r.jsx)(tF,{style:{maxHeight:250,overflowY:"auto"},children:t.map(([e,t])=>(0,r.jsx)(tW,{value:e,disabled:u.includes(e),children:t},e))}):(0,r.jsxs)(tF,{style:{maxHeight:250,overflowY:"auto"},children:[t.slice(0,s).map(([e,t])=>(0,r.jsx)(tW,{value:e,disabled:u.includes(e),children:t},e)),(0,r.jsx)("div",{style:{padding:"2px",marginTop:5,borderTop:"1px solid "+tX.rS.menuBorder}}),t.slice(s,t.length).map(([e,t])=>(0,r.jsx)(tW,{value:e,disabled:u.includes(e),children:t},e))]})})]})}},84196:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);var i=n(77644);var a=n(24307);function l(e,t){return o.Children.toArray(t).reduce((t,n)=>{if(n){if(typeof n==="object"&&"type"in n&&n.type===o.Fragment){return t.concat(l(n.key,n.props.children))}t.push({key:e+n["key"],child:n});return t}return t},[])}const s=(0,o.forwardRef)(({direction:e="column",align:t,justify:n,spacing:s=3,children:u,debug:c,style:f,...h},p)=>{const g=e.endsWith("reverse");const m=e.startsWith("row");const v=l("",u);return(0,r.jsx)(a.Z,{style:{flexDirection:e,alignItems:t,justifyContent:n,...f},innerRef:p,...h,children:v.map(({key:e,child:t},n)=>{let a=v.length===n+1;let l;if(m){l=g?"marginLeft":"marginRight"}else{l=g?"marginTop":"marginBottom"}return(0,o.cloneElement)(typeof t==="string"?(0,r.jsx)(i.Z,{children:t}):t,{key:e,style:{...c&&{borderWidth:1,borderColor:"red"},...a?null:{[l]:s*5},...t.props?t.props.style:null}})})})});t.Z=s},77644:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);var i=n(99818);const a=e=>{const{className:t="",style:n,innerRef:o,...a}=e;return(0,r.jsx)("span",{...a,ref:o,className:`${t} ${(0,i.iv)(n)}`})};t.Z=a},42308:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(43188);var o=n(77644);function i({children:e,...t}){return(0,r.jsx)(o.Z,{...t,style:{...t.style,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"},children:e})}},24307:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);var i=n(99818);const a=e=>{const{className:t="",style:n,nativeStyle:o,innerRef:a,...l}=e;return(0,r.jsx)("div",{...l,ref:a,style:o,className:`view ${t} ${(0,i.iv)(n)}`})};t.Z=a},10730:function(e,t,n){"use strict";n.d(t,{Wi:function(){return f},XZ:function(){return h},eX:function(){return u},lX:function(){return c}});var r=n(43188);var o=n(66204);var i=n(99818);var a=n(45492);var l=n(77644);var s=n(24307);const u=({title:e,style:t})=>{return(0,r.jsx)(s.Z,{style:{fontWeight:500,textTransform:"uppercase",color:a.rS.altFormLabelText,marginBottom:5,lineHeight:"1em",...t},children:e})};const c=({style:e,title:t,id:n,htmlFor:o})=>{return(0,r.jsx)(l.Z,{style:{fontSize:13,marginBottom:3,color:a.rS.tableText,...e},children:(0,r.jsx)("label",{htmlFor:o,id:n,children:t})})};const f=({style:e,children:t})=>{return(0,r.jsx)(s.Z,{style:e,children:t})};const h=e=>{return(0,r.jsx)("input",{type:"checkbox",...e,className:`${(0,i.iv)([{position:"relative",margin:0,flexShrink:0,marginRight:6,width:15,height:15,appearance:"none",outline:0,border:"1px solid "+a.rS.formInputBorder,borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",color:a.rS.tableBackground,backgroundColor:a.rS.tableBackground,":checked":{border:"1px solid "+a.rS.altFormInputBorderSelected,backgroundColor:a.rS.tableTextEditingBackground,"::after":{display:"block",background:a.rS.tableTextEditingBackground+' url(\'data:image/svg+xml; utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="white" d="M0 11l2-2 5 5L18 3l2 2L7 18z"/></svg>\') 9px 9px',width:9,height:9,content:" "}},"&.focus-visible:focus":{"::before":{position:"absolute",top:-5,bottom:-5,left:-5,right:-5,border:"2px solid "+a.rS.altFormInputBorderSelected,borderRadius:6,content:" "}}}],e.style)}`})}},24605:function(e,t,n){"use strict";n.d(t,{Jz:function(){return A},Wy:function(){return R},ZP:function(){return Y}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(13910);var l=n(62829);var s=n(10959);var u=n(84094);var c=n(73416);var f=n(3189);var h=n(89362);var p=n(11892);var g=n(59746);var m=n(12252);var v=n(43271);var y=n(45492);var b=n(56816);var x=n(8987);var w=n(78628);var S=n(84196);var k=n(77644);var T=n(24307);var E=n(41075);var C=n(63541);var j=n(5646);var I=n(57023);var D=n(41547);var P=n(54923);function O(e,t,n){return e.map(e=>e===t?n():e)}function M(e,t){return e.map((e,n)=>{return{...e,error:t[n]}})}function _(e,t){let n=["date"];if(e.find(e=>e.field==="imported_payee")){n.push("imported_payee")}n.push("payee");if(t.find(e=>e.field==="category")){n.push("category")}else if(t.length>0&&!["payee","date","amount"].includes(t[0].field)){n.push(t[0].field)}n.push("amount");return n}function R({fields:e,style:t,value:n,onChange:o}){return(0,r.jsx)(T.Z,{style:{color:y.rS.pageTextPositive,...t},children:(0,r.jsx)(w.Z,{bare:true,options:e,value:n,onChange:e=>o("field",e)})})}function A({ops:e,type:t,style:n,wrapperStyle:o,value:i,formatOp:a=f.w8,onChange:l}){let s;if(t==="id"){e=e.filter(e=>e!=="contains"&&e!=="doesNotContain");s=e.length/2}if(t==="string"){s=e.length/2}return(0,r.jsx)(w.Z,{bare:true,options:e.map(e=>[e,a(e,t)]),value:i,onChange:e=>l("op",e),line:s,style:{minHeight:"1px",...n},wrapperStyle:o})}function N({onAdd:e,onDelete:t,style:n}){return(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)(b.Z,{type:"bare",onClick:t,style:{padding:7},"aria-label":"Delete entry",children:(0,r.jsx)(m.Z,{style:{width:8,height:8,color:"inherit"}})}),e&&(0,r.jsx)(b.Z,{type:"bare",onClick:e,style:{padding:7},"aria-label":"Add entry",children:(0,r.jsx)(g.Z,{style:{width:10,height:10,color:"inherit"}})})]})}function Z({type:e}){return(0,r.jsx)(k.Z,{style:{fontSize:12,textAlign:"center",color:y.rS.errorText,marginBottom:5},children:(0,f.zQ)(e)})}function L({error:e,style:t,children:n}){return(0,r.jsxs)(T.Z,{style:t,"data-testid":"editor-row",children:[(0,r.jsx)(S.Z,{direction:"row",align:"center",spacing:1,style:{padding:"3px 5px"},children:n}),e&&(0,r.jsx)(Z,{type:e})]})}function B({ops:e,condition:t,editorStyle:n,isSchedule:o,onChange:i,onDelete:a,onAdd:l}){let{field:s,op:u,value:c,type:f,options:h,error:p}=t;if(s==="amount"&&h){if(h.inflow){s="amount-inflow"}else if(h.outflow){s="amount-outflow"}}let g;if(f==="number"&&u==="isbetween"){g=(0,r.jsx)(I.I,{defaultValue:c,onChange:e=>i("value",e)})}else{g=(0,r.jsx)(P.Z,{field:s,type:f,value:c,multi:u==="oneOf"||u==="notOneOf",onChange:e=>i("value",e)})}return(0,r.jsxs)(L,{style:n,error:p,children:[(0,r.jsx)(R,{fields:q,value:s,onChange:i}),(0,r.jsx)(A,{ops:e,value:u,type:f,onChange:i}),(0,r.jsx)(T.Z,{style:{flex:1},children:g}),(0,r.jsx)(S.Z,{direction:"row",children:(0,r.jsx)(N,{onAdd:l,onDelete:o&&s==="date"?null:a})})]})}function F(e){if(!e){return(0,h.zA)(0)}else if(typeof e==="number"){return(0,h.zA)(e)}else{return`${(0,h.zA)(e.num1)} to ${(0,h.zA)(e.num2)}`}}function W({id:e}){let t=(0,i.v9)(e=>{return e.prefs.local.dateFormat||"MM/dd/yyyy"});let n=(0,l.gZ)({transform:(0,o.useCallback)(t=>t.filter({id:e}),[])});if(n==null){return null}if(n.schedules.length===0){return(0,r.jsx)(T.Z,{style:{flex:1},children:e})}let[a]=n.schedules;let s=a&&n.statuses.get(a.id);return(0,r.jsxs)(T.Z,{style:{flex:1,flexDirection:"row",alignItems:"center"},children:[(0,r.jsxs)(T.Z,{style:{marginRight:15,flexDirection:"row"},children:[(0,r.jsxs)(k.Z,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:["Payee:"," ",(0,r.jsx)(D.Z,{type:"payees",id:a._payee,noneColor:y.rS.altpageTextSubdued})]}),(0,r.jsx)(k.Z,{style:{margin:"0 5px"},children:" — "}),(0,r.jsxs)(k.Z,{style:{flexShrink:0},children:["Amount: ",F(a._amount)]}),(0,r.jsx)(k.Z,{style:{margin:"0 5px"},children:" — "}),(0,r.jsxs)(k.Z,{style:{flexShrink:0},children:["Next: ",c.WU(a.next_date,t)]})]}),(0,r.jsx)(E.O,{status:s})]})}let U=["category","payee","notes","cleared","account","date","amount"].map(e=>[e,(0,f.gL)(e)]);function z({ops:e,action:t,editorStyle:n,onChange:o,onDelete:i,onAdd:a}){let{field:l,op:s,value:u,type:c,error:h,inputKey:p="initial"}=t;return(0,r.jsxs)(L,{style:n,error:h,children:[s==="set"?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.Z,{style:{padding:"5px 10px",lineHeight:"1em"},children:(0,f.w8)(s)}),(0,r.jsx)(R,{fields:U,value:l,onChange:o}),(0,r.jsx)(T.Z,{style:{flex:1},children:(0,r.jsx)(P.Z,{field:l,type:c,op:s,value:u,onChange:e=>o("value",e)},p)})]}):s==="link-schedule"?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T.Z,{style:{padding:"5px 10px",color:y.rS.pageTextPositive},children:(0,f.w8)(s)}),(0,r.jsx)(W,{id:u||null})]}):null,(0,r.jsx)(S.Z,{direction:"row",children:(0,r.jsx)(N,{onAdd:a,onDelete:s!=="link-schedule"&&i})})]})}function H(){let[e,t]=(0,o.useState)();return(0,r.jsxs)(T.Z,{style:{position:"relative",marginLeft:5},children:[(0,r.jsx)(T.Z,{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false),children:(0,r.jsx)(v.Z,{style:{width:11,height:11,color:y.rS.pageTextLight}})}),e&&(0,r.jsx)(C.u,{position:"bottom-left",style:{padding:10,color:y.rS.pageTextLight,maxWidth:450,lineHeight:1.5},children:"The stage of a rule allows you to force a specific order. Pre rules always run first, and post rules always run last. Within each stage rules are automatically ordered from least to most specific."})]})}function K({selected:e,children:t,style:n,onSelect:o}){return(0,r.jsx)(b.Z,{type:"bare",style:{fontSize:"inherit",...e&&{backgroundColor:y.rS.pillBackgroundSelected,":hover":{backgroundColor:y.rS.pillBackgroundSelected}},...n},onClick:o,children:t})}function $(e){return{...e,inputKey:""+Math.random()}}function V({conditionsOp:e,conditions:t,editorStyle:n,isSchedule:o,onChangeConditions:i}){function a(n){let r=q.map(e=>e[0]).filter(e=>e!=="amount-inflow"&&e!=="amount-outflow");if(t.length&&e==="or"){r=[t[0].field]}else{r=r.filter(e=>!t.some(t=>t.field.includes(e)||e.includes(t.field)))}let o=r[0]||"payee";let a=[...t];a.splice(n+1,0,{type:f.Z9.get(o),field:o,op:"is",value:null});i(a)}function l(){a(-1)}function s(e){i(t.filter(t=>t!==e))}function u(e,n,r){i(O(t,e,()=>{if(n==="field"){let t={field:r};if(r==="amount-inflow"){t.field="amount";t.options={inflow:true}}else if(r==="amount-outflow"){t.field="amount";t.options={outflow:true}}t.type=f.Z9.get(t.field);let n=f.Z9.get(e.field);if((n==="string"||n==="number")&&n===t.type&&e.op!=="isbetween"){t.op=e.op;return $((0,f.l1)(e.value,t))}else{t.op=f.wZ[t.type].ops[0];return $((0,f.l1)(null,t))}}else if(n==="op"){let t=r;if(e.op!=="oneOf"&&e.op!=="notOneOf"&&(t==="oneOf"||t==="notOneOf")){return $((0,f.l1)(e.value!=null?[e.value]:[],{...e,op:r}))}else if((e.op==="oneOf"||e.op==="notOneOf")&&t!=="oneOf"&&t!=="notOneOf"){return $((0,f.l1)(e.value.length>0?e.value[0]:null,{...e,op:r}))}else if(e.op!=="isbetween"&&t==="isbetween"){return(0,f.l1)({num1:(0,h.l9)(e.value),num2:(0,h.l9)(e.value)},{...e,op:r})}else if(e.op==="isbetween"&&t!=="isbetween"){return(0,f.l1)((0,h.Bf)(e.value.num1||0),{...e,op:r})}else{return{...e,op:r}}}else if(n==="value"){return(0,f.l1)(r,e)}return e}))}return t.length===0?(0,r.jsx)(b.Z,{style:{alignSelf:"flex-start"},onClick:l,children:"Add condition"}):(0,r.jsx)(S.Z,{spacing:2,"data-testid":"condition-list",children:t.map((e,t)=>{let i=f.wZ[e.type].ops;if(e.type==="date"&&e.value&&e.value.frequency){i=["is","isapprox"]}else if(e.options&&(e.options.inflow||e.options.outflow)){i=i.filter(e=>e!=="isbetween")}return(0,r.jsx)(T.Z,{children:(0,r.jsx)(B,{editorStyle:n,ops:i,condition:e,isSchedule:o,onChange:(t,n)=>{u(e,t,n)},onDelete:()=>s(e),onAdd:()=>a(t)})},t)})})}let q=["imported_payee","account","category","date","payee","notes","amount"].map(e=>[e,(0,f.gL)(e)]).concat([["amount-inflow",(0,f.gL)("amount",{inflow:true})],["amount-outflow",(0,f.gL)("amount",{outflow:true})]]);function Y({modalProps:e,defaultRule:t,onSave:n}){let[l,c]=(0,o.useState)(t.conditions.map(f.Qc));let[h,g]=(0,o.useState)(t.actions.map(f.Qc));let[m,v]=(0,o.useState)(t.stage);let[w,E]=(0,o.useState)(t.conditionsOp);let[C,I]=(0,o.useState)([]);let D=(0,i.I0)();let P=(0,o.useRef)();let A=h.some(e=>e.op==="link-schedule");(0,o.useEffect)(()=>{D((0,a.Rr)());(0,a.Ew)(false);return()=>(0,a.Ew)(true)},[]);(0,o.useEffect)(()=>{if(P.current){let e=P.current;let t=e.scrollTop;e.scrollTop=t+1;e.scrollTop=t}async function e(){let{filters:e}=await (0,u.lW)("make-filters-from-conditions",{conditions:l.map(f.Z2)});if(e.length>0){const t=w==="or"?"$or":"$and";let{data:n}=await (0,s.Vn)((0,s.ZP)("transactions").filter({[t]:e}).select("*"));I(n)}else{I([])}}e()},[h,l,w]);let N=(0,p.ZP)("transactions",C,[]);function Z(){L(-1)}function L(e){let t=U.map(e=>e[0]);for(let e of h){t=t.filter(t=>t!==e.field)}let n=t[0]||"category";let r=[...h];r.splice(e+1,0,{type:f.Z9.get(n),field:n,op:"set",value:null});g(r)}function B(e,t,n){g(O(h,e,()=>{let r={...e};r[t]=n;if(t==="field"){r.type=f.Z9.get(r.field);r.value=null;return $(r)}else if(t==="op"){r.value=null;r.inputKey=""+Math.random();return $(r)}return r}))}function F(e){v(e)}function W(e,t){E(t)}function q(e){g(h.filter(t=>t!==e))}function Y(){(0,u.lW)("rule-apply-actions",{transactionIds:[...N.items],actions:h}).then(()=>{g([...h])})}async function G(){let r={...t,stage:m,conditionsOp:w,conditions:l.map(f.Z2),actions:h.map(f.Z2)};let o=r.id?"rule-update":"rule-add";let{error:i,id:a}=await (0,u.lW)(o,r);if(i){if(i.conditionErrors){c(M(l,i.conditionErrors))}if(i.actionErrors){g(M(h,i.actionErrors))}}else{if(a){r.id=a}n?.(r);e.onClose()}}let Q={color:y.rS.altPillText,backgroundColor:y.rS.altPillBackground,borderRadius:4};return(0,r.jsx)(x.C,{title:"Rule",padding:0,...e,style:{...e.style,flex:"inherit",maxWidth:"90%"},children:()=>(0,r.jsxs)(T.Z,{style:{maxWidth:"100%",width:900,height:"80vh",flexGrow:0,flexShrink:0,flexBasis:"auto",overflow:"hidden",color:y.rS.pageTextLight},children:[(0,r.jsxs)(T.Z,{style:{flexDirection:"row",alignItems:"center",marginBottom:15,padding:"0 20px"},children:[(0,r.jsx)(k.Z,{style:{marginRight:15},children:"Stage of rule:"}),(0,r.jsxs)(S.Z,{direction:"row",align:"center",spacing:1,children:[(0,r.jsx)(K,{selected:m==="pre",onSelect:()=>F("pre"),children:"Pre"}),(0,r.jsx)(K,{selected:m===null,onSelect:()=>F(null),children:"Default"}),(0,r.jsx)(K,{selected:m==="post",onSelect:()=>F("post"),children:"Post"}),(0,r.jsx)(H,{})]})]}),(0,r.jsx)(T.Z,{innerRef:P,style:{borderBottom:"1px solid "+y.rS.tableBorder,padding:20,overflow:"auto",maxHeight:"calc(100% - 300px)"},children:(0,r.jsxs)(T.Z,{style:{flexShrink:0},children:[(0,r.jsxs)(T.Z,{style:{marginBottom:30},children:[(0,r.jsxs)(k.Z,{style:{marginBottom:15},children:["If",(0,r.jsx)(R,{"data-testid":"conditions-op",style:{display:"inline-flex"},fields:[["and","all"],["or","any"]],value:w,onChange:W}),"of these conditions match:"]}),(0,r.jsx)(V,{conditionsOp:w,conditions:l,editorStyle:Q,isSchedule:A,onChangeConditions:e=>c(e)})]}),(0,r.jsx)(k.Z,{style:{marginBottom:15},children:"Then apply these actions:"}),(0,r.jsx)(T.Z,{style:{flex:1},children:h.length===0?(0,r.jsx)(b.Z,{style:{alignSelf:"flex-start"},onClick:Z,children:"Add action"}):(0,r.jsx)(S.Z,{spacing:2,"data-testid":"action-list",children:h.map((e,t)=>(0,r.jsx)(T.Z,{children:(0,r.jsx)(z,{ops:["set","link-schedule"],action:e,editorStyle:Q,onChange:(t,n)=>{B(e,t,n)},onDelete:()=>q(e),onAdd:()=>L(t)})},t))})})]})}),(0,r.jsx)(p.i5,{instance:N,children:(0,r.jsxs)(T.Z,{style:{padding:"20px",flex:1},children:[(0,r.jsxs)(T.Z,{style:{flexDirection:"row",alignItems:"center",marginBottom:12},children:[(0,r.jsx)(k.Z,{style:{color:y.rS.pageTextLight,marginBottom:0},children:"This rule applies to these transactions:"}),(0,r.jsx)(T.Z,{style:{flex:1}}),(0,r.jsxs)(b.Z,{disabled:N.items.size===0,onClick:Y,children:["Apply actions (",N.items.size,")"]})]}),(0,r.jsx)(j.Z,{transactions:C,fields:_(l,h),style:{border:"1px solid "+y.rS.tableBorder}}),(0,r.jsxs)(S.Z,{direction:"row",justify:"flex-end",style:{marginTop:20},children:[(0,r.jsx)(b.Z,{onClick:()=>e.onClose(),children:"Cancel"}),(0,r.jsx)(b.Z,{type:"primary",onClick:()=>G(),children:"Save"})]})]})})]})})}},99012:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(79982);var l=n(41071);var s=n(73416);var u=n(11504);var c=n(89362);var f=n(9579);var h=n(45492);var p=n(21920);var g=n(77644);let m={color:h.rS.pageTextPositive};function v({value:e,field:t,valueIsRaw:n,inline:v=false,data:y,describe:b=e=>e.name}){let x=(0,i.v9)(e=>e.prefs.local.dateFormat||"MM/dd/yyyy");let w=(0,i.v9)(e=>e.queries.payees);let{list:S}=(0,f.Z)();let k=(0,i.v9)(e=>e.queries.accounts);let T=y||(t==="payee"?w:t==="category"?S:t==="account"?k:[]);let[E,C]=(0,o.useState)(false);function j(e){e.preventDefault();C(true)}function I(e){if(e==null||e===""){return"(nothing)"}else if(typeof e==="boolean"){return e?"true":"false"}else{switch(t){case"amount":return(0,c.zA)(e);case"date":if(e){if(e.frequency){return(0,u.o7)(e)}return(0,a.Z)((0,l.Z)(e),x)}return null;case"month":return e?(0,a.Z)((0,l.Z)(e),(0,s.LT)(x)):null;case"year":return e?(0,a.Z)((0,l.Z)(e),"yyyy"):null;case"notes":case"imported_payee":return e;case"payee":case"category":case"account":case"rule":if(n){return e}if(T&&Array.isArray(T)){let t=T.find(t=>t.id===e);if(t){return b(t)}else{return"(deleted)"}}return"…";default:throw new Error(`Unknown field ${t}`)}}}if(Array.isArray(e)){if(e.length===0){return(0,r.jsx)(g.Z,{style:m,children:"(empty)"})}else if(e.length===1){return(0,r.jsxs)(g.Z,{children:["[",(0,r.jsx)(g.Z,{style:m,children:I(e[0])}),"]"]})}let t=e;if(!E&&e.length>4){t=e.slice(0,3)}let n=e.length-t.length;return(0,r.jsxs)(g.Z,{style:{color:h.rS.tableText},children:["[",t.map((t,n)=>{let o=(0,r.jsx)(g.Z,{style:m,children:I(t)});let i;if(v){i=n!==0?" ":""}else{i=(0,r.jsxs)(r.Fragment,{children:[n===0&&(0,r.jsx)("br",{}),"\xa0\xa0"]})}return(0,r.jsxs)(g.Z,{children:[i,o,n===e.length-1?"":",",!v&&(0,r.jsx)("br",{})]},n)}),n>0&&(0,r.jsxs)(g.Z,{style:m,children:["\xa0\xa0",(0,r.jsxs)(p.Z,{onClick:j,style:m,children:[n," more items..."]}),!v&&(0,r.jsx)("br",{})]}),"]"]})}else if(e&&e.num1!=null&&e.num2!=null){const{num1:t,num2:n}=e;return(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(g.Z,{style:m,children:I(t)})," and"," ",(0,r.jsx)(g.Z,{style:m,children:I(n)})]})}else{return(0,r.jsx)(g.Z,{style:m,children:I(e)})}}},43229:function(e,t,n){"use strict";n.d(t,{dN:function(){return E},zB:function(){return j},Pz:function(){return I}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(99548);var l=n(68761);var s=n(73416);var u=n(11504);var c=n(89362);var f=n(68929);const h=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M6.847 21.429a3.408 3.408 0 0 1-2.662-1.34l-3.76-4.273a1.714 1.714 0 0 1 2.572-2.263l3.522 4.01a.429.429 0 0 0 .631.014L21.036 3.105a1.715 1.715 0 1 1 2.486 2.362l-14.06 14.8a3.327 3.327 0 0 1-2.615 1.162Z"})});var p=h;var g=n(45492);var m=n(56816);var v=n(31941);var y=n(77644);var b=n(24307);var x=n(16853);var w=n(40774);var S=n(63541);var k=n(41547);var T=n(41075);const E=43;function C({schedule:e,status:t,onAction:n}){const[i,a]=(0,o.useState)(false);const l=()=>{const e=[];if(t==="due"){e.push({name:"post-transaction",text:"Post transaction"})}if(t==="completed"){e.push({name:"restart",text:"Restart"})}else{e.push({name:"skip",text:"Skip next date"},{name:"complete",text:"Complete"})}e.push({name:"delete",text:"Delete"});return e};return(0,r.jsxs)(b.Z,{children:[(0,r.jsx)(m.Z,{type:"bare",onClick:e=>{e.stopPropagation();a(true)},children:(0,r.jsx)(f.Z,{width:15,height:15,style:{transform:"rotateZ(90deg)"}})}),i&&(0,r.jsx)(S.u,{position:"bottom-right",width:150,style:{padding:0},onClose:()=>a(false),children:(0,r.jsx)(v.Z,{onMenuSelect:t=>{n(t,e.id);a(false)},items:l()})})]})}function j({amount:e,op:t}){const n=(0,u.lP)(e);const o=(0,c.zA)(Math.abs(n||0));const i=t==="isapprox"||t==="isbetween";return(0,r.jsxs)(w.bL,{width:100,plain:true,style:{textAlign:"right",flexDirection:"row",alignItems:"center",padding:"0 5px"},name:"amount",children:[i&&(0,r.jsx)(b.Z,{style:{textAlign:"left",color:g.rS.pageTextSubdued,lineHeight:"1em",marginRight:10},title:(i?"Approximately ":"")+o,children:"~"}),(0,r.jsx)(y.Z,{style:{flex:1,color:n>0?g.rS.noticeText:g.rS.tableText,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:(i?"Approximately ":"")+o,children:(0,r.jsx)(x.ZP,{children:n>0?`+${o}`:`${o}`})})]})}function I({schedules:e,statuses:t,filter:n,minimal:f,allowCompleted:h,style:m,onSelect:v,onAction:x,tableStyle:S}){const I=(0,i.v9)(e=>{return e.prefs.local.dateFormat||"MM/dd/yyyy"});const[D,P]=(0,o.useState)(false);const O=(0,l.n4)();const M=(0,a.gM)();const _=(0,o.useMemo)(()=>{if(!n){return e}const r=e=>e?e.toLowerCase().includes(n.toLowerCase())||n.toLowerCase().includes(e.toLowerCase()):false;return e.filter(e=>{const n=O.find(t=>e._payee===t.id);const o=M.find(t=>e._account===t.id);const i=(0,u.lP)(e._amount);const a=(e._amountOp==="isapprox"||e._amountOp==="isbetween"?"~":"")+(i>0?"+":"")+(0,c.zA)(Math.abs(i||0));const l=e.next_date?(0,s.WU)(e.next_date,I):null;return r(e.name)||r(n&&n.name)||r(o&&o.name)||r(a)||r(t.get(e.id))||r(l)})},[e,n,t]);const R=(0,o.useMemo)(()=>{const e=_.filter(e=>!e.completed);if(!h){return e}if(D){return _}const t=_.find(e=>e.completed);if(!t)return e;return[...e,{id:"show-completed"}]},[_,D,h]);function A({schedule:e}){return(0,r.jsxs)(w.X2,{height:E,inset:15,onClick:()=>v(e.id),style:{cursor:"pointer",backgroundColor:g.rS.tableBackground,color:g.rS.tableText,":hover":{backgroundColor:g.rS.tableRowBackgroundHover}},children:[(0,r.jsx)(w.gN,{width:"flex",name:"name",children:(0,r.jsx)(y.Z,{style:e.name==null?{color:g.rS.buttonNormalDisabledText}:null,title:e.name?e.name:"",children:e.name?e.name:"None"})}),(0,r.jsx)(w.gN,{width:"flex",name:"payee",children:(0,r.jsx)(k.Z,{type:"payees",id:e._payee})}),(0,r.jsx)(w.gN,{width:"flex",name:"account",children:(0,r.jsx)(k.Z,{type:"accounts",id:e._account})}),(0,r.jsx)(w.gN,{width:110,name:"date",children:e.next_date?(0,s.WU)(e.next_date,I):null}),(0,r.jsx)(w.gN,{width:120,name:"status",style:{alignItems:"flex-start"},children:(0,r.jsx)(T.O,{status:t.get(e.id)})}),(0,r.jsx)(j,{amount:e._amount,op:e._amountOp}),!f&&(0,r.jsx)(w.gN,{width:80,style:{textAlign:"center"},children:e._date&&e._date.frequency&&(0,r.jsx)(p,{style:{width:13,height:13}})}),!f&&(0,r.jsx)(w.gN,{width:40,name:"actions",children:(0,r.jsx)(C,{schedule:e,status:t.get(e.id),onAction:x})})]})}function N({item:e}){if(e.id==="show-completed"){return(0,r.jsx)(w.X2,{height:E,inset:15,style:{cursor:"pointer",backgroundColor:"transparent",":hover":{backgroundColor:g.rS.tableRowBackgroundHover}},onClick:()=>P(true),children:(0,r.jsx)(w.gN,{width:"flex",style:{fontStyle:"italic",textAlign:"center",color:g.rS.tableText},children:"Show completed schedules"})})}return A({schedule:e})}return(0,r.jsxs)(b.Z,{style:{flex:1,...S},children:[(0,r.jsxs)(w.xD,{height:E,inset:15,version:"v2",children:[(0,r.jsx)(w.gN,{width:"flex",children:"Name"}),(0,r.jsx)(w.gN,{width:"flex",children:"Payee"}),(0,r.jsx)(w.gN,{width:"flex",children:"Account"}),(0,r.jsx)(w.gN,{width:110,children:"Next date"}),(0,r.jsx)(w.gN,{width:120,children:"Status"}),(0,r.jsx)(w.gN,{width:100,style:{textAlign:"right"},children:"Amount"}),!f&&(0,r.jsx)(w.gN,{width:80,style:{textAlign:"center"},children:"Recurring"}),!f&&(0,r.jsx)(w.gN,{width:40})]}),(0,r.jsx)(w.iA,{rowHeight:E,backgroundColor:"transparent",version:"v2",style:{flex:1,backgroundColor:"transparent",...m},items:R,renderItem:N,renderEmpty:n?"No matching schedules":"No schedules",allowPopupsEscape:R.length<6})]})}},41075:function(e,t,n){"use strict";n.d(t,{O:function(){return S},V:function(){return w}});var r=n(43188);var o=n(66204);var i=n(89362);var a=n(25492);var l=n(30739);var s=n(7269);const u=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M12 0C1.308 0-4.044 12.925 3.516 20.484 11.075 28.044 24 22.692 24 12 23.992 5.376 18.624.008 12 0zm.01 1.988c5.521.007 9.995 4.48 10.002 10.002 0 8.912-10.774 13.373-17.075 7.072-6.3-6.3-1.839-17.074 7.073-17.074zm6.234 4.588a1 1 0 0 0-.928.442l-6.226 8.45-4.076-3.261a1 1 0 1 0-1.25 1.563l4.888 3.908a1.011 1.011 0 0 0 1.43-.19L18.928 8.2a1 1 0 0 0-.684-1.623z",fill:"currentColor"})});var c=u;const f=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M12 0a10.286 10.286 0 0 0-6.243 18.45 1.714 1.714 0 0 1 .672 1.36v1.619A2.571 2.571 0 0 0 9 24a1.714 1.714 0 0 0 1.714-1.714V21a1.286 1.286 0 0 1 2.572 0v1.286A1.714 1.714 0 0 0 15 24a2.571 2.571 0 0 0 2.571-2.571V19.81a1.714 1.714 0 0 1 .672-1.36A10.286 10.286 0 0 0 12 0ZM7.714 12.429a2.143 2.143 0 1 1 2.143-2.143 2.143 2.143 0 0 1-2.143 2.143Zm8.572 0a2.143 2.143 0 1 1 2.143-2.143 2.143 2.143 0 0 1-2.143 2.143Z"})});var h=f;const p=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M23.91 9.113a1.785 1.785 0 0 0-1.453-1.227l-6.132-.926-2.714-5.506a1.863 1.863 0 0 0-3.222 0l-2.78 5.552-6.066.88a1.798 1.798 0 0 0-1 3.068l4.428 4.361-1.028 6.055a1.797 1.797 0 0 0 2.607 1.895l5.488-2.865 5.429 2.858a1.797 1.797 0 0 0 2.607-1.895l-1.011-6.128 4.394-4.286a1.786 1.786 0 0 0 .454-1.836Z"})});var g=p;const m=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M7.176 22.5a4.111 4.111 0 0 1-3.17-1.486l-3.62-4.6a1.8 1.8 0 1 1 2.828-2.228l3.6 4.56a.384.384 0 0 0 .379.152.52.52 0 0 0 .408-.197L20.794 2.177a1.8 1.8 0 1 1 2.812 2.246L10.39 20.964A4.12 4.12 0 0 1 7.2 22.5Z"})});var v=m;var y=n(45492);var b=n(77644);var x=n(24307);function w(e){switch(e){case"missed":return{color:y.rS.altErrorText,backgroundColor:y.rS.altErrorBackground,Icon:h};case"due":return{color:y.rS.altWarningText,backgroundColor:y.rS.altWarningBackground,Icon:a.Z};case"upcoming":return{color:y.rS.upcomingText,backgroundColor:y.rS.upcomingBackground,Icon:l.Z};case"paid":return{color:y.rS.alt2NoticeText,backgroundColor:y.rS.altNoticeBackground,Icon:v};case"completed":return{color:y.rS.alt2TableText,backgroundColor:y.rS.altTableBackground,Icon:g};case"pending":return{color:y.rS.alt3NoticeText,backgroundColor:y.rS.alt2NoticeBackground,Icon:l.Z};case"scheduled":return{color:y.rS.menuItemText,backgroundColor:y.rS.altTableBackground,Icon:l.Z};case"cleared":return{color:y.rS.noticeText,backgroundColor:y.rS.altTableBackground,Icon:s.Z};default:return{color:y.rS.buttonNormalDisabledText,backgroundColor:y.rS.altTableBackground,Icon:c}}}function S({status:e}){const{color:t,backgroundColor:n,Icon:o}=w(e);return(0,r.jsxs)(x.Z,{style:{color:t,backgroundColor:n,padding:"6px 8px",borderRadius:4,flexDirection:"row",alignItems:"center",flexShrink:0},children:[(0,r.jsx)(o,{style:{width:13,height:13,marginRight:7}}),(0,r.jsx)(b.Z,{style:{lineHeight:"1em"},children:(0,i.VL)(e)})]})}},22966:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(28548);var l=n(82862);var s=n(8780);var u=n(79982);var c=n(41071);var f=n(25432);var h=n(7851);var p=n.n(h);var g={};var m=n(73416);var v=n(89362);var y=n(45492);var b=n(383);var x=n(24307);var w=n(63541);var S="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAQAAACGG/bgAAAAQ0lEQVR4Ae3KIQ4AIBTD0N0/IeHGI3UIRA3ut/Zl+ltXc5++htVAmIAwAWECwgSEKbgthEoIlRAqIVRCqINQB9nDgQd7ktwFo6UpWQAAAABJRU5ErkJggg==";var k="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAQAAACGG/bgAAAAP0lEQVQ4y+3TMQoAMAgEwfwfAvvjTZ1uGzuvHhBPPGczEG+FRqqRaqQaqUaqkX6QBmmjacvQ6qEVTjsh+xizebvlaWptGXZAAAAAAElFTkSuQmCC";let T={"& .pika-single.actual-date-picker":{color:y.rS.sidebarItemTextHover,background:y.rS.sidebarBackground,border:"none",boxShadow:"0 0px 4px rgba(0, 0, 0, .25)",borderRadius:4},"& .actual-date-picker":{"& .pika-lendar":{float:"none",width:"auto"},"& .pika-label":{backgroundColor:y.rS.sidebarBackground},"& .pika-prev":{backgroundImage:`url(${S})`},"& .pika-next":{backgroundImage:`url(${k})`},"& .pika-table th":{color:y.rS.sidebarItemText,"& abbr":{textDecoration:"none"}},"& .pika-button":{backgroundColor:y.rS.sidebarItemBackgroundHover,color:y.rS.sidebarItemText},"& .is-today .pika-button":{textDecoration:"underline"},"& .is-selected .pika-button":{backgroundColor:y.rS.altButtonNormalSelectedBackground,boxShadow:"none"}}};let E=(0,o.forwardRef)(({value:e,firstDayOfWeekIdx:t,dateFormat:n,onUpdate:i,onSelect:c},f)=>{let h=(0,o.useRef)(null);let g=(0,o.useRef)(null);(0,o.useImperativeHandle)(f,()=>({handleInputKeyDown(e){let t=null;switch(e.key){case"ArrowLeft":e.preventDefault();t=a.Z(h.current.getDate(),1);break;case"ArrowUp":e.preventDefault();t=a.Z(h.current.getDate(),7);break;case"ArrowRight":e.preventDefault();t=l.Z(h.current.getDate(),1);break;case"ArrowDown":e.preventDefault();t=l.Z(h.current.getDate(),7);break;default:}if(t){h.current.setDate(t,true);i?.(t)}}}),[]);(0,o.useLayoutEffect)(()=>{h.current=new(p())({theme:"actual-date-picker",keyboardInput:false,firstDay:(0,v.CD)(t),defaultDate:e?s.Z(e,n,(0,m.cQ)()):(0,m.cQ)(),setDefaultDate:true,toString(e){return u.Z(e,n)},parse(e){return s.Z(e,n,new Date)},onSelect:c});g.current.appendChild(h.current.el);return()=>{h.current.destroy()}},[]);(0,o.useEffect)(()=>{if(h.current.getDate()!==e){h.current.setDate(s.Z(e,n,new Date),true)}},[e,n]);return(0,r.jsx)(x.Z,{style:{...T,flex:1},innerRef:g})});function C(e){return e.key==="Enter"}function j({containerProps:e,inputProps:t,tooltipStyle:n,value:a,isOpen:l,embedded:h,dateFormat:p="yyyy-MM-dd",focused:g,openOnFocus:v=true,inputRef:y,shouldSaveFromKey:S=C,tableBehavior:k,onUpdate:T,onSelect:j}){let I=(0,o.useMemo)(()=>{if(a){let e=c.Z(a);if(f.Z(e)){return u.Z(e,p)}}return""},[a,p]);let D=(0,o.useRef)(null);let[P,O]=(0,o.useState)(I);let[M,_]=(0,o.useState)(h||l||false);let R=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{if(y){y.current=R.current}},[]);let[A,N]=(0,o.useState)(P);let Z=(0,o.useRef)(A);const L=(0,i.v9)(e=>e.prefs.local?.firstDayOfWeekIdx?e.prefs.local.firstDayOfWeekIdx:"0");(0,o.useEffect)(()=>{Z.current=P},[P]);(0,o.useEffect)(()=>O(I),[I]);(0,o.useEffect)(()=>{if((0,m.Ze)(p).test(P)){let e=s.Z(P,(0,m.D1)(p),new Date);if(f.Z(e)){T?.(u.Z(e,"yyyy-MM-dd"));N(u.Z(e,p))}}else if((0,m._y)(p).test(P)){let e=s.Z(P,(0,m.JC)(p),new Date);if(f.Z(e)){T?.(u.Z(e,"yyyy-MM-dd"));N(u.Z(e,p))}}else{let e=s.Z(P,p,new Date);if(f.Z(e)){let t=u.Z(e,"yyyy-MM-dd");T?.(t);N(P)}}},[P]);function B(e){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(e.key)&&!e.shiftKey&&!e.metaKey&&!e.altKey&&M){D.current.handleInputKeyDown(e)}else if(e.key==="Escape"){O(I);N(I);if(I===P){if(M){if(!h){e.stopPropagation()}_(false)}}else{_(true);T?.(a)}}else if(S(e)){O(A);_(false);let n=s.Z(A,p,new Date);j(u.Z(n,"yyyy-MM-dd"));if(M&&e.key==="Enter"){e.stopPropagation();e.preventDefault()}let{onKeyDown:r}=t||{};r?.(e)}else if(!M){_(true);if(R.current){R.current.setSelectionRange(0,1e4)}}}function F(e){O(e.target.value)}let W=e=>{return h?e:(0,r.jsx)(w.u,{position:"bottom-left",offset:2,style:{padding:0,minWidth:225,...n},"data-testid":"date-select-tooltip",children:e})};return(0,r.jsxs)(x.Z,{...e,children:[(0,r.jsx)(b.ZP,{focused:g,...t,inputRef:R,value:P,onPointerUp:e=>{if(!h){_(true)}},onKeyDown:B,onChange:F,onFocus:e=>{if(!h&&v){_(true)}t?.onFocus?.(e)},onBlur:e=>{if(!h){_(false)}t?.onBlur?.(e);if(!k){if(P===""){N(null);j(null)}else{O(A||"");let e=s.Z(A,p,new Date);if(e instanceof Date&&!isNaN(e)){j(u.Z(e,"yyyy-MM-dd"))}}}}}),M&&W((0,r.jsx)(E,{ref:D,value:A,firstDayOfWeekIdx:L,dateFormat:p,onUpdate:e=>{N(u.Z(e,p));T?.(u.Z(e,"yyyy-MM-dd"))},onSelect:e=>{O(u.Z(e,p));j(u.Z(e,"yyyy-MM-dd"));_(false)}}))]})}},14644:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(84094);var l=n(73416);var s=n(11504);var u=n(59746);var c=n(12252);var f=n(45492);var h=n(56816);var p=n(383);var g=n(78628);var m=n(84196);var v=n(77644);var y=n(24307);var b=n(10730);var x=n(63541);var w=n(22966);const S=5;const k=[{id:"daily",name:"Days"},{id:"weekly",name:"Weeks"},{id:"monthly",name:"Months"},{id:"yearly",name:"Years"}];const T=[...Array(31).keys()].map(e=>e+1);const E=[{id:"SU",name:"Sunday"},{id:"MO",name:"Monday"},{id:"TU",name:"Tuesday"},{id:"WE",name:"Wednesday"},{id:"TH",name:"Thursday"},{id:"FR",name:"Friday"},{id:"SA",name:"Saturday"}];function C(e){if(e==="last"){return-1}return Number(e)}function j(e){return e||{start:l.PR(),interval:1,frequency:"monthly",patterns:[D(l.PR())],skipWeekend:false,weekendSolveMode:"before"}}function I(e){return{...e,interval:_(e.interval)}}function D(e){return{value:parseInt(l.WU(e,"d")),type:"day"}}function P({field:e,value:t,recurrence:n}){if(e==="value"&&n.type!=="day"&&t>S||e==="type"&&t!=="day"&&n.value>S){return{[e]:t,value:S}}return{[e]:t}}function O(e,t){switch(t.type){case"replace-config":return{...e,config:t.config};case"change-field":return{...e,config:{...e.config,[t.field]:t.value,patterns:e.config.frequency!=="monthly"?[]:e.config.patterns}};case"update-recurrence":return{...e,config:{...e.config,patterns:e.config.patterns.map(e=>e===t.recurrence?{...t.recurrence,...P(t)}:e)}};case"add-recurrence":return{...e,config:{...e.config,patterns:[...e.config.patterns||[],D(e.config.start)]}};case"remove-recurrence":return{...e,config:{...e.config,patterns:e.config.patterns.filter(e=>e!==t.recurrence)}};case"set-skip-weekend":return{...e,config:{...e.config,skipWeekend:t.skipWeekend}};case"set-weekend-solve":return{...e,config:{...e.config,weekendSolveMode:t.value}};default:return e}}function M({previewDates:e}){const t=(0,i.v9)(e=>(e.prefs.local.dateFormat||"MM/dd/yyyy").replace("MM","M").replace("dd","d"));if(!e){return null}let n=null;if(typeof e==="string"){n=(0,r.jsx)(v.Z,{children:e})}else{n=(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(v.Z,{style:{fontWeight:600},children:"Upcoming dates"}),(0,r.jsx)(m.Z,{direction:"row",spacing:4,style:{marginTop:10},children:e.map((e,n)=>(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(v.Z,{children:l.WU(e,t)}),(0,r.jsx)(v.Z,{children:l.WU(e,"EEEE")})]},n))})]})}return(0,r.jsx)(m.Z,{direction:"column",spacing:1,style:{marginTop:15,color:f.rS.tableText},children:n})}function _(e){const t=parseInt(e);return Number.isInteger(t)&&t>0?t:1}function R({config:e,dispatch:t}){let n=(e,n,r)=>t({type:"update-recurrence",recurrence:e,field:n,value:r});return(0,r.jsx)(m.Z,{spacing:2,style:{marginTop:10},children:e.patterns.map((e,o)=>(0,r.jsxs)(y.Z,{style:{display:"flex",flexDirection:"row"},children:[(0,r.jsx)(g.Z,{options:[[-1,"Last"],["-","---"],...T.map(e=>[e,e])],value:e.value,onChange:t=>n(e,"value",C(t)),disabledKeys:["-"],wrapperStyle:{flex:1,marginRight:10},style:{minHeight:"1px",width:"100%"}}),(0,r.jsx)(g.Z,{options:[["day","Day"],["-","---"],...E.map(e=>[e.id,e.name])],value:e.type,onChange:t=>n(e,"type",t),disabledKeys:["-"],wrapperStyle:{flex:1,marginRight:10},style:{minHeight:"1px",width:"100%"}}),(0,r.jsx)(h.Z,{type:"bare",style:{padding:7},onClick:()=>t({type:"remove-recurrence",recurrence:e}),children:(0,r.jsx)(c.Z,{style:{width:8,height:8}})}),(0,r.jsx)(h.Z,{type:"bare",style:{padding:7,marginLeft:5},onClick:()=>t({type:"add-recurrence"}),children:(0,r.jsx)(u.Z,{style:{width:10,height:10}})})]},o))})}function A({config:e,onClose:t,onSave:n}){let[l,s]=(0,o.useState)(null);let[u,c]=(0,o.useReducer)(O,{config:j(e)});let S=u.config.hasOwnProperty("skipWeekend")?u.config.skipWeekend:false;let T=(0,i.v9)(e=>e.prefs.local.dateFormat||"MM/dd/yyyy");(0,o.useEffect)(()=>{c({type:"replace-config",config:j(e)})},[e]);let{config:E}=u;let C=(e,t)=>c({type:"change-field",field:e,value:t});(0,o.useEffect)(()=>{async function e(){let{data:e,error:t}=await (0,a.OK)("schedule/get-upcoming-dates",{config:I(E),count:4});s(t?"Invalid rule":e)}e()},[E]);if(l==null){return null}return(0,r.jsxs)(x.u,{style:{padding:10,width:380},offset:1,position:"bottom-left",onClose:t,children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("label",{htmlFor:"start",style:{marginRight:5},children:"Starts:"}),(0,r.jsx)(w.Z,{id:"start",inputProps:{placeholder:"Start Date"},value:E.start,onSelect:e=>C("start",e),containerProps:{style:{width:100}},dateFormat:T})]}),(0,r.jsxs)(m.Z,{direction:"row",align:"center",justify:"flex-start",style:{marginTop:10},spacing:2,children:[(0,r.jsx)(v.Z,{style:{whiteSpace:"nowrap"},children:"Repeat every"}),(0,r.jsx)(p.ZP,{id:"interval",style:{width:40},type:"text",onBlur:e=>C("interval",e.target.value),onEnter:e=>C("interval",e.target.value),defaultValue:E.interval||1}),(0,r.jsx)(g.Z,{bare:true,options:k.map(e=>[e.id,e.name]),value:E.frequency,onChange:e=>C("frequency",e),style:{border:"1px solid "+f.rS.formInputBorder,height:27.5}}),E.frequency==="monthly"&&(E.patterns==null||E.patterns.length===0)?(0,r.jsx)(h.Z,{style:{backgroundColor:f.rS.tableBackground,":hover":{backgroundColor:f.rS.tableBackground}},onClick:()=>c({type:"add-recurrence"}),children:"Add specific days"}):null]}),E.frequency==="monthly"&&E.patterns&&E.patterns.length>0&&(0,r.jsx)(R,{config:E,dispatch:c}),(0,r.jsx)(m.Z,{direction:"column",style:{marginTop:5},children:(0,r.jsxs)(y.Z,{style:{marginTop:5,flex:1,flexDirection:"row",alignItems:"center",userSelect:"none"},children:[(0,r.jsx)(b.XZ,{id:"form_skipwe",checked:S,onChange:e=>{c({type:"set-skip-weekend",skipWeekend:e.target.checked})}}),(0,r.jsxs)("label",{htmlFor:"form_skipwe",style:{userSelect:"none",marginRight:5},children:["Move schedule"," "]}),(0,r.jsx)(g.Z,{id:"solve_dropdown",options:[["before","before"],["after","after"]],value:u.config.weekendSolveMode,onChange:e=>c({type:"set-weekend-solve",value:e}),style:{minHeight:"1px",width:"5rem"}}),(0,r.jsxs)("label",{htmlFor:"solve_dropdown",style:{userSelect:"none",marginLeft:5},children:[" ","weekend"]})]})}),(0,r.jsx)(M,{previewDates:l}),(0,r.jsxs)("div",{style:{display:"flex",marginTop:15,justifyContent:"flex-end"},children:[(0,r.jsx)(h.Z,{onClick:t,children:"Cancel"}),(0,r.jsx)(h.Z,{type:"primary",onClick:()=>n(I(E)),style:{marginLeft:10},children:"Apply"})]})]})}function N({value:e,buttonStyle:t,onChange:n}){let{isOpen:o,close:i,getOpenEvents:a}=(0,x.lL)();function l(e){n(e);i()}return(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(h.Z,{...a(),style:{textAlign:"left",...t},children:e?(0,s.o7)(e):"No recurring date"}),o&&(0,r.jsx)(A,{config:e,onClose:i,onSave:l})]})}},42326:function(e,t,n){"use strict";n.d(t,{Hn:function(){return em},ZP:function(){return eb},Ap:function(){return ev}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(76074);var l=n(24307);var s=n(67238);const u=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M19 18h-1v-8c0-.6-.4-1-1-1s-1 .4-1 1v8h-3V1c0-.6-.4-1-1-1s-1 .4-1 1v17H8V7c0-.6-.4-1-1-1s-1 .4-1 1v11H3V3c0-.6-.4-1-1-1s-1 .4-1 1v15c-.6 0-1 .4-1 1s.4 1 1 1h18c.6 0 1-.4 1-1s-.4-1-1-1z",fill:"currentColor"})});var c=u;var f=n(10895);var h=n(30739);var p=n(45492);var g=n(68587);var m=n(99818);var v=n(30715);var y=n(99147);var b=n(35562);var x=n(52582);const w={marginTop:-2,marginBottom:2,paddingTop:4,paddingBottom:4,paddingRight:15,paddingLeft:10,textDecoration:"none",color:p.rS.sidebarItemText,":hover":{backgroundColor:p.rS.sidebarItemBackgroundHover},...p.W2.smallText};function S({name:e,account:t,connected:n,failed:o,updated:i,to:a,query:s,style:u,outerStyle:c,onDragChange:f,onDrop:h}){let g=t?t.closed?"account-closed":t.offbudget?"account-offbudget":"account-onbudget":"title";let{dragRef:S}=(0,b.O1)({type:g,onDragChange:f,item:{id:t&&t.id},canDrag:t!=null});let{dropRef:k,dropPos:T}=(0,b.Zj)({types:t?[g]:[],id:t&&t.id,onDrop:h});return(0,r.jsx)(l.Z,{innerRef:k,style:{flexShrink:0,...c},children:(0,r.jsxs)(l.Z,{children:[(0,r.jsx)(b.OJ,{pos:T}),(0,r.jsx)(l.Z,{innerRef:S,children:(0,r.jsxs)(y.Z,{to:a,style:{...w,...u,position:"relative",borderLeft:"4px solid transparent",...i&&{fontWeight:700}},activeStyle:{borderColor:p.rS.sidebarItemAccentSelected,color:p.rS.sidebarItemTextSelected,fontWeight:u&&u.fontWeight||"normal","& .dot":{backgroundColor:p.rS.sidebarItemBackgroundSelected,transform:"translateX(-4.5px)"}},children:[(0,r.jsx)(l.Z,{style:{position:"absolute",left:0,top:0,bottom:0,flexDirection:"row",alignItems:"center"},children:(0,r.jsx)("div",{className:`dot ${(0,m.iv)({marginRight:3,width:5,height:5,borderRadius:5,backgroundColor:o?p.rS.sidebarItemBackgroundFailed:p.rS.sidebarItemBackgroundPositive,marginLeft:2,transition:"transform .3s",opacity:n?1:0})}`})}),(0,r.jsx)(v.Z,{left:e,right:(0,r.jsx)(x.Z,{binding:s,type:"financial"})})]})})]})})}var k=S;var T=n(24924);function E({style:e,to:t,onClick:n,activeStyle:o,forceActive:i,children:a}){return n?(0,r.jsx)(l.Z,{role:"button",tabIndex:0,style:{...e,touchAction:"auto",userSelect:"none",userDrag:"none",cursor:"pointer",...i?o:{}},onClick:n,children:a}):(0,r.jsx)(y.Z,{to:t,style:e,activeStyle:o,children:a})}var C=E;const j=600;function I({Icon:e,title:t,style:n,to:o,onClick:i,bold:a,indent:s=0}){const u=(0,r.jsxs)(l.Z,{style:{flexDirection:"row",alignItems:"center",height:16},children:[e&&(0,r.jsx)(e,{width:12,height:12}),(0,r.jsx)(T.Z,{style:{marginLeft:e?8:0,color:"inherit"},children:t})]});return(0,r.jsx)(l.Z,{style:{flexShrink:0,...n},children:(0,r.jsx)(C,{style:{...w,color:p.rS.sidebarItemText,paddingLeft:14+s,fontWeight:a?j:null,":hover":{backgroundColor:p.rS.sidebarItemBackgroundHover}},to:o,onClick:i,activeStyle:{borderLeft:"4px solid "+p.rS.sidebarItemTextSelected,paddingLeft:14-4+s,color:p.rS.sidebarItemTextSelected,fontWeight:a?j:null},children:u})})}var D=I;const P=600;function O({accounts:e,failedAccounts:t,updatedAccounts:n,getAccountPath:i,allAccountsPath:a,budgetedAccountPath:s,offBudgetAccountPath:u,getBalanceQuery:c,getAllAccountBalance:f,getOnBudgetBalance:h,getOffBudgetBalance:p,showClosedAccounts:m,onAddAccount:v,onToggleClosedAccounts:y,onReorder:b}){let[x,w]=(0,o.useState)(false);let S=(0,o.useMemo)(()=>e.filter(e=>e.closed===0&&e.offbudget===1),[e]);let T=(0,o.useMemo)(()=>e.filter(e=>e.closed===0&&e.offbudget===0),[e]);let E=(0,o.useMemo)(()=>e.filter(e=>e.closed===1),[e]);function C(e){w(e.state==="start")}let j=(e,t)=>{if(e===0){return{paddingTop:x?15:0,marginTop:x?-15:0}}return null};return(0,r.jsxs)(l.Z,{children:[(0,r.jsx)(k,{name:"All accounts",to:a,query:f(),style:{fontWeight:P,marginTop:15}}),T.length>0&&(0,r.jsx)(k,{name:"For budget",to:s,query:h(),style:{fontWeight:P,marginTop:13}}),T.map((e,o)=>(0,r.jsx)(k,{name:e.name,account:e,connected:!!e.bank,failed:t&&t.has(e.id),updated:n&&n.includes(e.id),to:i(e),query:c(e),onDragChange:C,onDrop:b,outerStyle:j(o,T.length)},e.id)),S.length>0&&(0,r.jsx)(k,{name:"Off budget",to:u,query:p(),style:{fontWeight:P,marginTop:13}}),S.map((e,o)=>(0,r.jsx)(k,{name:e.name,account:e,connected:!!e.bank,failed:t&&t.has(e.id),updated:n&&n.includes(e.id),to:i(e),query:c(e),onDragChange:C,onDrop:b,outerStyle:j(o,S.length)},e.id)),E.length>0&&(0,r.jsx)(D,{style:{marginTop:15},title:"Closed accounts"+(m?"":"..."),onClick:y,bold:true}),m&&E.map((e,t)=>(0,r.jsx)(k,{name:e.name,account:e,to:i(e),query:c(e),onDragChange:C,onDrop:b},e.id)),(0,r.jsx)(D,{style:{marginTop:15,marginBottom:9},onClick:v,Icon:g.Z,title:"Add account"})]})}var M=O;function _({children:e,Icon:t,title:n,style:o,to:i,onClick:a,indent:s=0,forceHover:u=false,forceActive:c=false}){const f={backgroundColor:p.rS.sidebarItemBackgroundHover};const h=(0,r.jsxs)(l.Z,{style:{flexDirection:"row",alignItems:"center",height:20},children:[(0,r.jsx)(t,{width:15,height:15}),(0,r.jsx)(T.Z,{style:{marginLeft:8},children:n}),(0,r.jsx)(l.Z,{style:{flex:1}})]});return(0,r.jsxs)(l.Z,{style:{flexShrink:0,...o},children:[(0,r.jsx)(C,{style:{...p.W2.mediumText,paddingTop:9,paddingBottom:9,paddingLeft:19+s,paddingRight:10,textDecoration:"none",color:p.rS.sidebarItemText,...u?f:{},":hover":f},to:i,onClick:a,activeStyle:{borderLeft:"4px solid "+p.rS.sidebarItemTextSelected,paddingLeft:19+s-4,color:p.rS.sidebarItemTextSelected},forceActive:c,children:h}),e?(0,r.jsx)(l.Z,{style:{marginTop:5},children:e}):null]})}var R=_;const A=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M11 12h6v-1l-3-1V2l3-1V0H3v1l3 1v8l-3 1v1h6v7l1 1 1-1v-7z",fill:"currentColor"})});var N=A;const Z=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{d:"M10.416 12a2.643 2.643 0 0 1 .775-1.875L20.732.584a1.768 1.768 0 0 1 2.5 2.5l-8.739 8.739a.25.25 0 0 0 0 .354l8.739 8.739a1.768 1.768 0 0 1-2.5 2.5l-9.541-9.541A2.643 2.643 0 0 1 10.416 12Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M.25 12a2.643 2.643 0 0 1 .775-1.875L10.566.584a1.768 1.768 0 0 1 2.5 2.5l-8.739 8.739a.25.25 0 0 0 0 .354l8.739 8.739a1.768 1.768 0 0 1-2.5 2.5l-9.541-9.541A2.643 2.643 0 0 1 .25 12Z",fill:"currentColor"})]});var L=Z;var B=n(56816);function F({style:e,isFloating:t,onFloat:n}){return(0,r.jsx)(l.Z,{className:"float",style:{...e,flexShrink:0},children:(0,r.jsx)(B.Z,{type:"bare",onClick:n,color:p.rS.buttonMenuBorder,children:t?(0,r.jsx)(N,{style:{margin:-2,width:15,height:15,transform:"rotate(45deg)"}}):(0,r.jsx)(L,{style:{width:13,height:13}})})})}var W=F;var U=n(59379);var z=n(60481);const H=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m12.95 10.707.707-.707L8 4.343 6.586 5.757 10.828 10l-4.242 4.243L8 15.657l4.95-4.95z",fill:"currentColor"})});var K=H;var $=n(91237);const V=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M18 9.87V20H2V9.87a4.25 4.25 0 0 0 3-.38V14h10V9.5a4.26 4.26 0 0 0 3 .37zM3 0h4l-.67 6.03A3.43 3.43 0 0 1 3 9C1.34 9 .42 7.73.95 6.15L3 0zm5 0h4l.7 6.3c.17 1.5-.91 2.7-2.42 2.7h-.56A2.38 2.38 0 0 1 7.3 6.3L8 0zm5 0h4l2.05 6.15C19.58 7.73 18.65 9 17 9a3.42 3.42 0 0 1-3.33-2.97L13 0z",fill:"currentColor"})});var q=V;const Y=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M17 16v4h-2v-4h-2v-3h6v3h-2zM1 9h6v3H1V9zm6-4h6v3H7V5zM3 0h2v8H3V0zm12 0h2v12h-2V0zM9 0h2v4H9V0zM3 12h2v8H3v-8zm6-4h2v12H9V8z",fill:"currentColor"})});var G=Y;function Q(){let[e,t]=(0,o.useState)(false);let n=(0,o.useCallback)(()=>t(e=>!e),[]);let i=(0,U.TH)();const a=["/payees","/rules","/settings","/tools"].some(e=>i.pathname.startsWith(e));(0,o.useEffect)(()=>{if(a){t(true)}},[i.pathname]);return(0,r.jsxs)(l.Z,{style:{flexShrink:0},children:[(0,r.jsx)(R,{title:"More",Icon:e?z.Z:K,onClick:n,style:{marginBottom:e?8:0},forceActive:!e&&a}),e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(D,{title:"Payees",Icon:q,to:"/payees",indent:15}),(0,r.jsx)(D,{title:"Rules",Icon:G,to:"/rules",indent:15}),(0,r.jsx)(D,{title:"Settings",Icon:$.Z,to:"/settings",indent:15})]})]})}var X=Q;const J=240;function ee({style:e,budgetName:t,accounts:n,failedAccounts:o,updatedAccounts:i,getBalanceQuery:a,getAllAccountBalance:u,getOnBudgetBalance:g,getOffBudgetBalance:m,showClosedAccounts:v,isFloating:y,onFloat:b,onAddAccount:x,onToggleClosedAccounts:w,onReorder:S}){let k=!s.jU&&s.OS==="mac";const T=ev();return(0,r.jsxs)(l.Z,{style:{width:J,color:p.rS.sidebarItemText,backgroundColor:p.rS.sidebarBackground,"& .float":{opacity:y?1:0,transition:"opacity .25s, width .25s",width:k||y?null:0},"&:hover .float":{opacity:1,width:k?null:"auto"},...e},children:[(0,r.jsxs)(l.Z,{style:{paddingTop:35,height:30,flexDirection:"row",alignItems:"center",margin:"0 8px 23px 20px",transition:"padding .4s",...k&&{paddingTop:20,justifyContent:"flex-start"}},children:[t,(0,r.jsx)(l.Z,{style:{flex:1,flexDirection:"row"}}),!T.alwaysFloats&&(0,r.jsx)(W,{isFloating:y,onFloat:b})]}),(0,r.jsxs)(l.Z,{style:{overflow:"auto"},children:[(0,r.jsx)(R,{title:"Budget",Icon:f.Z,to:"/budget"}),(0,r.jsx)(R,{title:"Reports",Icon:c,to:"/reports"}),(0,r.jsx)(R,{title:"Schedules",Icon:h.Z,to:"/schedules"}),(0,r.jsx)(X,{}),(0,r.jsx)(l.Z,{style:{height:1,backgroundColor:p.rS.sidebarItemBackgroundHover,marginTop:15,flexShrink:0}}),(0,r.jsx)(M,{accounts:n,failedAccounts:o,updatedAccounts:i,getAccountPath:e=>`/accounts/${e.id}`,allAccountsPath:"/accounts",budgetedAccountPath:"/accounts/budgeted",offBudgetAccountPath:"/accounts/offbudget",getBalanceQuery:a,getAllAccountBalance:u,getOnBudgetBalance:g,getOffBudgetBalance:m,showClosedAccounts:v,onAddAccount:x,onToggleClosedAccounts:w,onReorder:S})]})]})}var et=ee;var en=n(99103);var er=n(46055);var eo=n(84094);var ei=n(1447);var ea=n(32951);var el=n(91871);var es=n(383);var eu=n(31941);var ec=n(77644);var ed=n(63541);function ef({prefs:e,savePrefs:t}){let n=(0,i.I0)();let a=(0,U.s0)();const[l,u]=(0,o.useState)(false);const[c,f]=(0,o.useState)(false);function h(e){f(false);switch(e){case"rename":u(true);break;case"settings":a("/settings");break;case"help":window.open("https://actualbudget.org/docs/","_blank");break;case"close":n((0,en.ej)());break;default:}}let g=[{name:"rename",text:"Rename budget"},{name:"settings",text:"Settings"},...s.jU?[{name:"help",text:"Help"}]:[],{name:"close",text:"Close file"}];if(l){return(0,r.jsx)(el.Z,{children:(0,r.jsx)(es.ZP,{style:{width:160,fontSize:16,fontWeight:500},defaultValue:e.budgetName,onEnter:async e=>{const n=e.target;const r=n.value;if(r.trim()!==""){await t({budgetName:n.value});u(false)}},onBlur:()=>u(false)})})}else{return(0,r.jsxs)(B.Z,{type:"bare",color:p.rS.buttonNormalBorder,style:{fontSize:16,fontWeight:500,marginLeft:-5,flex:"0 auto"},onClick:()=>f(true),children:[(0,r.jsx)(ec.Z,{style:{whiteSpace:"nowrap",overflow:"hidden"},children:e.budgetName||"A budget has no name"}),(0,r.jsx)(ea.Z,{width:7,height:7,style:{marginLeft:5}}),c&&(0,r.jsx)(ed.u,{position:"bottom-left",style:{padding:0},onClose:()=>f(false),children:(0,r.jsx)(eu.Z,{onMenuSelect:h,items:g})})]})}}function eh(){let e=(0,i.v9)(e=>e.queries.accounts);let t=(0,i.v9)(e=>e.account.failedAccounts);let n=(0,i.v9)(e=>e.queries.updatedAccounts);let a=(0,i.v9)(e=>e.prefs.local);let l=(0,i.v9)(e=>e.prefs.global.floatingSidebar);let{getAccounts:s,replaceModal:u,savePrefs:c,saveGlobalPrefs:f}=(0,ei.o)();(0,o.useEffect)(()=>void s(),[s]);async function h(t,n,r){if(n==="bottom"){let t=e.findIndex(e=>e.id===r)+1;r=t<e.length?e[t].id:null}await (0,eo.lW)("account-move",{id:t,targetId:r});await s()}return(0,r.jsx)(et,{budgetName:(0,r.jsx)(ef,{prefs:a,savePrefs:c}),isFloating:l,accounts:e,failedAccounts:t,updatedAccounts:n,getBalanceQuery:er.cW,getAllAccountBalance:er.Gm,getOnBudgetBalance:er.SZ,getOffBudgetBalance:er.An,onFloat:()=>f({floatingSidebar:!l}),onReorder:h,onAddAccount:()=>u("add-account"),showClosedAccounts:a["ui.showClosedAccounts"],onToggleClosedAccounts:()=>c({"ui.showClosedAccounts":!a["ui.showClosedAccounts"]}),style:{flex:1,...p.W2.darkScrollbar}})}var ep=eh;const eg=(0,o.createContext)(null);function em({children:e}){let t=(0,i.v9)(e=>e.prefs.global.floatingSidebar);let[n,l]=(0,o.useState)(true);let{width:s}=(0,a.F)();let u=s<668;let c=t||u;return(0,r.jsx)(eg.Provider,{value:{hidden:n,setHidden:l,floating:c,alwaysFloats:u},children:e})}function ev(){let{hidden:e,setHidden:t,floating:n,alwaysFloats:r}=(0,o.useContext)(eg);return(0,o.useMemo)(()=>({hidden:e,setHidden:t,floating:n,alwaysFloats:r}),[e,t,n,r])}function ey(){let e=(0,i.v9)(e=>e.prefs.global.floatingSidebar);let t=ev();let{isNarrowWidth:n}=(0,a.F)();let o=e||t.alwaysFloats;return n?null:(0,r.jsx)(l.Z,{onMouseOver:o?e=>{e.stopPropagation();t.setHidden(false)}:null,onMouseLeave:o?()=>t.setHidden(true):null,style:{position:o?"absolute":null,top:12,bottom:o?12:-50,zIndex:1001,borderRadius:o?"0 6px 6px 0":0,overflow:"hidden",boxShadow:!o||t.hidden?"none":"0 15px 30px 0 rgba(0,0,0,0.25), 0 3px 15px 0 rgba(0,0,0,.5)",transform:`translateY(${!o?-12:0}px)
|
|
186
|
+
translateX(${o&&t.hidden?-J:0}px)`,transition:"transform .5s, box-shadow .5s, border-radius .5s, bottom .5s"},children:(0,r.jsx)(ep,{})})}var eb=ey},35562:function(e,t,n){"use strict";n.d(t,{OJ:function(){return ee},aB:function(){return J},O1:function(){return Q},Zj:function(){return X}});var r=n(43188);var o=n(66204);var i=n(21251);var a=n(28926);const l=typeof window!=="undefined"?o.useLayoutEffect:o.useEffect;function s(e,t,n){const[r,i]=(0,o.useState)(()=>t(e));const s=(0,o.useCallback)(()=>{const o=t(e);if(!a(r,o)){i(o);if(n){n()}}},[r,e,n]);l(s);return[r,s]};function u(e,t,n){const[r,o]=s(e,t,n);l(function t(){const t=e.getHandlerId();if(t==null){return}return e.subscribeToStateChange(o,{handlerIds:[t]})},[e,o]);return r};function c(e,t,n){return u(t,e||(()=>({})),()=>n.reconnect())};function f(e,t){const n=[...t||[]];if(t==null&&typeof e!=="function"){n.push(e)}return(0,o.useMemo)(()=>{return typeof e==="function"?e():e},n)};function h(e){return(0,o.useMemo)(()=>e.hooks.dragSource(),[e])}function p(e){return(0,o.useMemo)(()=>e.hooks.dragPreview(),[e])};function g(e,t,n,r){let o=n?n.call(r,e,t):void 0;if(o!==void 0){return!!o}if(e===t){return true}if(typeof e!=="object"||!e||typeof t!=="object"||!t){return false}const i=Object.keys(e);const a=Object.keys(t);if(i.length!==a.length){return false}const l=Object.prototype.hasOwnProperty.bind(t);for(let a=0;a<i.length;a++){const s=i[a];if(!l(s)){return false}const u=e[s];const c=t[s];o=n?n.call(r,u,c,s):void 0;if(o===false||o===void 0&&u!==c){return false}}return true};function m(e){return e!==null&&typeof e==="object"&&Object.prototype.hasOwnProperty.call(e,"current")};function v(e){if(typeof e.type==="string"){return}const t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+`You can either wrap ${t} into a <div>, or turn it into a `+"drag source or a drop target itself.")}function y(e){return(t=null,n=null)=>{if(!(0,o.isValidElement)(t)){const r=t;e(r,n);return r}const r=t;v(r);const i=n?t=>e(t,n):e;return w(r,i)}}function b(e){const t={};Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref")){t[n]=e[n]}else{const e=y(r);t[n]=()=>e}});return t}function x(e,t){if(typeof e==="function"){e(t)}else{e.current=t}}function w(e,t){const n=e.ref;(0,i.k)(typeof n!=="string","Cannot connect React DnD to an element with an existing string ref. "+"Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. "+"Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs");if(!n){return(0,o.cloneElement)(e,{ref:t})}else{return(0,o.cloneElement)(e,{ref:e=>{x(n,e);x(t,e)}})}};class S{receiveHandlerId(e){if(this.handlerId===e){return}this.handlerId=e;this.reconnect()}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource;const t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(t){this.disconnectDragSource()}if(!this.handlerId){return t}if(!e){this.lastConnectedDragSource=e;return t}if(t){this.lastConnectedHandlerId=this.handlerId;this.lastConnectedDragSource=e;this.lastConnectedDragSourceOptions=this.dragSourceOptions;this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)}return t}reconnectDragPreview(e=false){const t=this.dragPreview;const n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n){this.disconnectDragPreview()}if(!this.handlerId){return}if(!t){this.lastConnectedDragPreview=t;return}if(n){this.lastConnectedHandlerId=this.handlerId;this.lastConnectedDragPreview=t;this.lastConnectedDragPreviewOptions=this.dragPreviewOptions;this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!g(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!g(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){if(this.dragSourceUnsubscribe){this.dragSourceUnsubscribe();this.dragSourceUnsubscribe=undefined}}disconnectDragPreview(){if(this.dragPreviewUnsubscribe){this.dragPreviewUnsubscribe();this.dragPreviewUnsubscribe=undefined;this.dragPreviewNode=null;this.dragPreviewRef=null}}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null;this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null;this.dragPreviewRef=null}constructor(e){this.hooks=b({dragSource:(e,t)=>{this.clearDragSource();this.dragSourceOptions=t||null;if(m(e)){this.dragSourceRef=e}else{this.dragSourceNode=e}this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview();this.dragPreviewOptions=t||null;if(m(e)){this.dragPreviewRef=e}else{this.dragPreviewNode=e}this.reconnectDragPreview()}});this.handlerId=null;this.dragSourceRef=null;this.dragSourceOptionsInternal=null;this.dragPreviewRef=null;this.dragPreviewOptionsInternal=null;this.lastConnectedHandlerId=null;this.lastConnectedDragSource=null;this.lastConnectedDragSourceOptions=null;this.lastConnectedDragPreview=null;this.lastConnectedDragPreviewOptions=null;this.backend=e}}var k=n(13577);function T(){const{dragDropManager:e}=(0,o.useContext)(k.L);(0,i.k)(e!=null,"Expected drag drop context");return e};function E(e,t){const n=T();const r=(0,o.useMemo)(()=>new S(n.getBackend()),[n]);l(()=>{r.dragSourceOptions=e||null;r.reconnect();return()=>r.disconnectDragSource()},[r,e]);l(()=>{r.dragPreviewOptions=t||null;r.reconnect();return()=>r.disconnectDragPreview()},[r,t]);return r};let C=false;let j=false;class I{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){(0,i.k)(!C,"You may not call monitor.canDrag() inside your canDrag() implementation. "+"Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{C=true;return this.internalMonitor.canDragSource(this.sourceId)}finally{C=false}}isDragging(){if(!this.sourceId){return false}(0,i.k)(!j,"You may not call monitor.isDragging() inside your isDragging() implementation. "+"Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{j=true;return this.internalMonitor.isDraggingSource(this.sourceId)}finally{j=false}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null;this.internalMonitor=e.getMonitor()}};function D(){const e=T();return(0,o.useMemo)(()=>new I(e),[e])};function P(e,t,n){const r=n.getRegistry();const o=r.addTarget(e,t);return[o,()=>r.removeTarget(o)]}function O(e,t,n){const r=n.getRegistry();const o=r.addSource(e,t);return[o,()=>r.removeSource(o)]};class M{beginDrag(){const e=this.spec;const t=this.monitor;let n=null;if(typeof e.item==="object"){n=e.item}else if(typeof e.item==="function"){n=e.item(t)}else{n={}}return n!==null&&n!==void 0?n:null}canDrag(){const e=this.spec;const t=this.monitor;if(typeof e.canDrag==="boolean"){return e.canDrag}else if(typeof e.canDrag==="function"){return e.canDrag(t)}else{return true}}isDragging(e,t){const n=this.spec;const r=this.monitor;const{isDragging:o}=n;return o?o(r):t===e.getSourceId()}endDrag(){const e=this.spec;const t=this.monitor;const n=this.connector;const{end:r}=e;if(r){r(t.getItem(),t)}n.reconnect()}constructor(e,t,n){this.spec=e;this.monitor=t;this.connector=n}};function _(e,t,n){const r=(0,o.useMemo)(()=>new M(e,t,n),[t,n]);(0,o.useEffect)(()=>{r.spec=e},[e]);return r};function R(e){return(0,o.useMemo)(()=>{const t=e.type;(0,i.k)(t!=null,"spec.type must be defined");return t},[e])};function A(e,t,n){const r=T();const o=_(e,t,n);const i=R(e);l(function e(){if(i!=null){const[e,a]=O(i,o,r);t.receiveHandlerId(e);n.receiveHandlerId(e);return a}return},[r,t,n,o,i])};function N(e,t){const n=f(e,t);(0,i.k)(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);const r=D();const o=E(n.options,n.previewOptions);A(n,r,o);return[c(n.collect,r,o),h(o),p(o)]};function Z(e){return(0,o.useMemo)(()=>e.hooks.dropTarget(),[e])};class L{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();if(e){this.disconnectDropTarget()}const t=this.dropTarget;if(!this.handlerId){return}if(!t){this.lastConnectedDropTarget=t;return}if(e){this.lastConnectedHandlerId=this.handlerId;this.lastConnectedDropTarget=t;this.lastConnectedDropTargetOptions=this.dropTargetOptions;this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)}}receiveHandlerId(e){if(e===this.handlerId){return}this.handlerId=e;this.reconnect()}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!g(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){if(this.unsubscribeDropTarget){this.unsubscribeDropTarget();this.unsubscribeDropTarget=undefined}}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null;this.dropTargetNode=null}constructor(e){this.hooks=b({dropTarget:(e,t)=>{this.clearDropTarget();this.dropTargetOptions=t;if(m(e)){this.dropTargetRef=e}else{this.dropTargetNode=e}this.reconnect()}});this.handlerId=null;this.dropTargetRef=null;this.dropTargetOptionsInternal=null;this.lastConnectedHandlerId=null;this.lastConnectedDropTarget=null;this.lastConnectedDropTargetOptions=null;this.backend=e}};function B(e){const t=T();const n=(0,o.useMemo)(()=>new L(t.getBackend()),[t]);l(()=>{n.dropTargetOptions=e||null;n.reconnect();return()=>n.disconnectDropTarget()},[e]);return n};let F=false;class W{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId){return false}(0,i.k)(!F,"You may not call monitor.canDrop() inside your canDrop() implementation. "+"Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{F=true;return this.internalMonitor.canDropOnTarget(this.targetId)}finally{F=false}}isOver(e){if(!this.targetId){return false}return this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null;this.internalMonitor=e.getMonitor()}};function U(){const e=T();return(0,o.useMemo)(()=>new W(e),[e])};function z(e){const{accept:t}=e;return(0,o.useMemo)(()=>{(0,i.k)(e.accept!=null,"accept must be defined");return Array.isArray(t)?t:[t]},[t])};class H{canDrop(){const e=this.spec;const t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):true}hover(){const e=this.spec;const t=this.monitor;if(e.hover){e.hover(t.getItem(),t)}}drop(){const e=this.spec;const t=this.monitor;if(e.drop){return e.drop(t.getItem(),t)}return}constructor(e,t){this.spec=e;this.monitor=t}};function K(e,t){const n=(0,o.useMemo)(()=>new H(e,t),[t]);(0,o.useEffect)(()=>{n.spec=e},[e]);return n};function $(e,t,n){const r=T();const o=K(e,t);const i=z(e);l(function e(){const[e,a]=P(i,o,r);t.receiveHandlerId(e);n.receiveHandlerId(e);return a},[r,t,o,n,i.map(e=>e.toString()).join("|")])};function V(e,t){const n=f(e,t);const r=U();const o=B(n.options);$(n,r,o);return[c(n.collect,r,o),Z(o)]}var q=n(15685);var Y=n(45492);var G=n(24307);function Q({item:e,type:t,canDrag:n,onDragChange:r}){let i=(0,o.useRef)(r);const[,a]=N({type:t,item:()=>{i.current({state:"start-preview",type:t,item:e});setTimeout(()=>{i.current({state:"start"})},0);return{type:t,item:e}},collect:e=>({isDragging:e.isDragging()}),end(e){i.current({state:"end",type:t,item:e})},canDrag(){return n}});(0,o.useLayoutEffect)(()=>{i.current=r});return{dragRef:a}}function X({types:e,id:t,onDrop:n,onLongHover:r}){let i=(0,o.useRef)(null);let[a,l]=(0,o.useState)(null);let[{isOver:s},u]=V({accept:e,drop({item:e}){n(e.id,a,t)},hover(e,t){let n=i.current.getBoundingClientRect();let r=(n.bottom-n.top)/2;let o=t.getClientOffset();let a=o.y-n.top;let s=a<r?"top":"bottom";l(s)},collect(e){return{isOver:e.isOver()}}});(0,o.useEffect)(()=>{let e;if(r&&s){e=setTimeout(r,700)}return()=>e&&clearTimeout(e)},[s]);return{dropRef:(0,q.r)(u,i),dropPos:s?a:null}}const J=(0,o.createContext)(null);function ee({pos:e,offset:t}){let n=(0,o.useContext)(J);if(e==null){return null}let i=(n==="first"?2:0)+(t?.top||0);let a=(n==="last"?2:0)+(t?.bottom||0);let l=e==="top"?{top:-2+i}:{bottom:-1+a};return(0,r.jsx)(G.Z,{style:{position:"absolute",left:2,right:2,borderRadius:3,height:3,background:Y.rS.pageTextLink,zIndex:1e4,pointerEvents:"none",...l}})}},52582:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);var i=n(45492);var a=n(77644);var l=n(16853);var s=n(5291);var u=n(50606);var c=n(57651);function f({binding:e,type:t,formatter:n,style:f,getStyle:h,privacyFilter:p,"data-testid":g}){let{fullSheetName:m}=(0,u.Z)(e);let v=(0,c.Z)(e);let y=(0,s.Z)();return(0,o.useMemo)(()=>(0,r.jsx)(l.wq,{privacyFilter:p!=null?p:t==="financial"?true:undefined,children:(0,r.jsx)(a.Z,{style:{...t==="financial"&&i.W2.tnum,...f,...h&&h(v)},"data-testid":g||m,"data-cellname":m,children:n?n(v):y(v,t)})}),[p,t,f,h,m,n,y,v])}t.Z=f},57201:function(e,t,n){"use strict";var r=n(66204);t.Z=(0,r.createContext)(undefined)},5291:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(66204);var o=n(37496);var i="NOT_FOUND";function a(e){var t;return{get:function n(n){if(t&&e(t.key,n)){return t.value}return i},put:function e(e,n){t={key:e,value:n}},getEntries:function e(){return t?[t]:[]},clear:function e(){t=undefined}}}function l(e,t){var n=[];function r(e){var r=n.findIndex(function(n){return t(e,n.key)});if(r>-1){var o=n[r];if(r>0){n.splice(r,1);n.unshift(o)}return o.value}return i}function o(t,o){if(r(t)===i){n.unshift({key:t,value:o});if(n.length>e){n.pop()}}}function a(){return n}function l(){n=[]}return{get:r,put:o,getEntries:a,clear:l}}var s=function e(e,t){return e===t};function u(e){return function t(t,n){if(t===null||n===null||t.length!==n.length){return false}var r=t.length;for(var o=0;o<r;o++){if(!e(t[o],n[o])){return false}}return true}}function c(e,t){var n=typeof t==="object"?t:{equalityCheck:t};var r=n.equalityCheck,o=r===void 0?s:r,c=n.maxSize,f=c===void 0?1:c,h=n.resultEqualityCheck;var p=u(o);var g=f===1?a(p):l(f,p);function m(){var t=g.get(arguments);if(t===i){t=e.apply(null,arguments);if(h){var n=g.getEntries();var r=n.find(function(e){return h(e.value,t)});if(r){t=r.value}}g.put(arguments,t)}return t}m.clearCache=function(){return g.clear()};return m};function f(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return typeof e==="function"})){var n=t.map(function(e){return typeof e==="function"?"function "+(e.name||"unnamed")+"()":typeof e}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function h(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}var o=function t(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++){r[o]=arguments[o]}var i=0;var a;var l={memoizeOptions:undefined};var s=r.pop();if(typeof s==="object"){l=s;s=r.pop()}if(typeof s!=="function"){throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof s+"]")}var u=l,c=u.memoizeOptions,h=c===void 0?n:c;var p=Array.isArray(h)?h:[h];var g=f(r);var m=e.apply(void 0,[function e(){i++;return s.apply(null,arguments)}].concat(p));var v=e(function e(){var e=[];var t=g.length;for(var n=0;n<t;n++){e.push(g[n].apply(null,arguments))}a=m.apply(null,e);return a});Object.assign(v,{resultFunc:s,memoizedResultFunc:m,dependencies:g,lastResult:function e(){return a},recomputations:function e(){return i},resetRecomputations:function e(){return i=0}});return v};return o}var p=h(c);var g=function e(e,t){if(t===void 0){t=p}if(typeof e!=="object"){throw new Error("createStructuredSelector expects first argument to be an object "+("where each property is a selector, instead received a "+typeof e))}var n=Object.keys(e);var r=t(n.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return t.reduce(function(e,t,r){e[n[r]]=t;return e},{})});return r};var m=n(89362);const v=e=>e;const y=p(v,e=>e.prefs);const b=p(y,e=>e.local);const x=p(b,e=>(0,m.ff)({format:e.numberFormat,hideFraction:e.hideFraction}));function w(e,t="string",n){switch(t){case"string":const r=JSON.stringify(e);if(r.charAt(0)==='"'&&r.charAt(r.length-1)==='"'){return r.slice(1,-1)}return r;case"number":return""+e;case"financial-with-sign":let o=w(e,"financial",n);if(typeof e==="number"&&e>=0){return"+"+o}return o;case"financial":if(e==null||e===""||e===0){return(0,m.zA)(0,n)}else if(typeof e==="string"){const t=parseFloat(e);e=isNaN(t)?0:t}if(typeof e!=="number"){throw new Error("Value is not a number ("+typeof e+"): "+e)}return(0,m.zA)(e,n);default:throw new Error("Unknown format type: "+t)}}function S(){const e=(0,o.v9)(x);return(0,r.useCallback)((t,n="string")=>w(t,n,e.formatter),[e])}},50606:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(66204);var o=n(57201);function i(e){let t=e.indexOf("!");if(t!==-1){return{sheet:e.slice(0,t),name:e.slice(t+1)}}return{sheet:null,name:e}}function a(e){if(!e){throw new Error("Sheet binding is required")}const t=typeof e==="string";let a=t?e:e.name;if(n.g.IS_TESTING&&!t&&!a){a=e.value.toString()}if(a==null){throw new Error("Binding name is now required")}let l=(0,r.useContext)(o.Z)||"__global";let s=i(a);if(s.sheet){l=s.sheet;a=s.name}return{sheetName:l,bindingName:a,fullSheetName:`${l}!${a}`}}},57651:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(66204);var o=n(55833);var i=n(50606);function a(e,t){let{sheetName:n,fullSheetName:a}=(0,i.Z)(e);const l=typeof e==="string"?{name:e,value:null}:e;let s=(0,o.M)();let[u,c]=(0,r.useState)({name:a,value:l.value===undefined?null:l.value,query:l.query});let f=(0,r.useRef)(t);let h=(0,r.useRef)(u.value);(0,r.useLayoutEffect)(()=>{f.current=t;h.current=u.value});(0,r.useLayoutEffect)(()=>{if(l.query){s.createQuery(n,l.name,l.query)}return s.bind(n,e,null,e=>{if(f.current){f.current(e)}if(e.value!==h.current){c(e)}})},[n,l.name]);return u.value}},40774:function(e,t,n){"use strict";n.d(t,{bL:function(){return N},Sx:function(){return K},wh:function(){return z},nu:function(){return H},gN:function(){return R},F3:function(){return W},dN:function(){return M},X2:function(){return Z},_7:function(){return $},Vg:function(){return Y},OX:function(){return V},iA:function(){return X},xD:function(){return q},pX:function(){return Q},rt:function(){return A},wz:function(){return J}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(38638);var l=n(5904);var s=n(11892);var u=n(45931);var c=n(40233);var f=n(32951);const h=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m0 11 2-2 5 5L18 3l2 2L7 18z",fill:"currentColor"})});var p=h;var g=n(45492);var m=n(56816);var v=n(383);var y=n(31941);var b=n(77644);var x=n(24307);var w=n(99024);var S=n(37418);const k=150;const T=(e,t)=>e;function E({onResize:e,children:t}){let n=(0,S.Z)(e);return t(n)}class C extends o.PureComponent{_outerRef;_resetIsScrollingTimeoutId=null;static defaultProps={direction:"ltr",renderRow:undefined,layout:"vertical",overscanCount:2,useIsScrolling:false,headerHeight:0};constructor(e){super(e);this.lastPositions=(0,o.createRef)();this.lastPositions.current=new Map;this.needsAnimationRerender=(0,o.createRef)();this.needsAnimationRerender.current=false;this.animationEnabled=false;this.state={instance:this,isScrolling:false,scrollDirection:"forward",scrollOffset:typeof this.props.initialScrollOffset==="number"?this.props.initialScrollOffset:0,scrollUpdateWasRequested:false}}scrollTo(e){e=Math.max(0,e);this.setState(t=>{if(t.scrollOffset===e){return null}this.requestScrollUpdateHandled=false;return{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:true}},this._resetIsScrollingDebounced)}scrollToItem(e,t="auto"){const{itemCount:n}=this.props;const{scrollOffset:r}=this.state;e=Math.max(0,Math.min(e,n-1));this.scrollTo(this.getOffsetForIndexAndAlignment(e,t,r))}componentDidMount(){const{initialScrollOffset:e}=this.props;if(typeof e==="number"&&this._outerRef!=null){let t=this._outerRef;t=this._outerRef;t.scrollTop=e}this._callPropsCallbacks()}getAnchoredScrollPos(){if(this.anchored&&this.props.indexForKey&&this._outerRef!=null){let e=this.props.indexForKey(this.anchored.key);let t=this.getOffsetForIndexAndAlignment(e,"start");return t+this.anchored.offset}return null}componentDidUpdate(){const{scrollOffset:e,scrollUpdateWasRequested:t}=this.state;let n=this.getAnchoredScrollPos();if(n!=null){const e=this._outerRef;e.scrollTop=n}else if(t&&!this.requestScrollUpdateHandled&&this._outerRef!=null){this.requestScrollUpdateHandled=true;const t=this._outerRef;t.scrollTop=e}if(this.needsAnimationRerender.current){this.needsAnimationRerender.current=false;this.rerenderTimeout=setTimeout(()=>{this.forceUpdate()},10)}this._callPropsCallbacks()}componentWillUnmount(){if(this._resetIsScrollingTimeoutId!==null){clearTimeout(this._resetIsScrollingTimeoutId)}}render(){const{className:e,height:t,header:n,innerRef:o,innerElementType:i,innerTagName:a,itemCount:l,renderRow:s,itemKey:u=T,outerElementType:c,outerTagName:f,style:h,useIsScrolling:p,width:g}=this.props;const{isScrolling:m}=this.state;const[v,y]=this._getRangeToRender();const b=new Map;const w=[];if(l>0){for(let e=v;e<=y;e++){let t=u(e);let n=this._getItemStyle(e);let r=this.lastPositions.current.get(t);let o=false;b.set(t,n.top);if(this.animationEnabled&&r!=null&&r!==n.top){n={...n,top:r};this.needsAnimationRerender.current=true;o=true}w.push(s({index:e,key:t,style:n,isScrolling:p?m:undefined,isAnimating:o}))}}this.lastPositions.current=b;let S=this.getEstimatedTotalSize();let k=c||f||"div";let C=i||a||"div";return(0,r.jsx)(E,{onResize:this.onHeaderResize,children:i=>(0,r.jsxs)(k,{className:e,onScroll:this._onScrollVertical,ref:this._outerRefSetter,style:{height:t,width:g,overflow:"hidden auto",...h},children:[(0,r.jsx)(x.Z,{innerRef:i,children:n}),(0,r.jsx)(C,{ref:o,style:{position:"relative",height:S,width:"100%",pointerEvents:m?"none":undefined},children:w})]})})}setRowAnimation=e=>{this.animationEnabled=e;let t=this._outerRef;if(t){if(this.animationEnabled){t.classList.add("animated")}else{t.classList.remove("animated")}}};onHeaderResize=e=>{};anchor(){let e=this.props.itemKey||T;let t=this._outerRef;let n=t?t.scrollTop:0;let r=this.getStartIndexForOffset(n);let o=e(r);this.anchored={key:o,offset:n-this.getItemOffset(r)}}unanchor(){this.anchored=null}isAnchored(){return this.anchored!=null}getItemOffset=e=>e*this.props.itemSize;getItemSize=e=>this.props.itemSize;getEstimatedTotalSize=()=>this.props.itemSize*this.props.itemCount;getOffsetForIndexAndAlignment=(e,t,n)=>{const r=this.props.height;const o=Math.max(0,this.props.itemCount*this.props.itemSize-r);const i=Math.min(o,e*this.props.itemSize);const a=Math.max(0,e*this.props.itemSize-r+this.props.itemSize);if(t==="smart"){if(n>=a-r&&n<=i+r){t="auto"}else{t="center"}}switch(t){case"start":return i;case"end":return a;case"center":{const e=Math.round(a+(i-a)/2);if(e<Math.ceil(r/2)){return 0}else if(e>o+Math.floor(r/2)){return o}else{return e}}case"auto":default:if(n>=a&&n<=i){return n}else if(n<a){return a}else{return i}}};getStartIndexForOffset=e=>Math.max(0,Math.min(this.props.itemCount-1,Math.floor(e/this.props.itemSize)));getStopIndexForStartIndex=(e,t)=>{const n=e*this.props.itemSize;const r=this.props.height;const o=Math.ceil((r+t-n)/this.props.itemSize);return Math.max(0,Math.min(this.props.itemCount-1,e+o-1))};_callOnItemsRendered=(0,w.Z)((e,t,n,r)=>this.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:r}));_callOnScroll=(0,w.Z)((e,t,n)=>this.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n}));_callPropsCallbacks(){if(typeof this.props.onItemsRendered==="function"){const{itemCount:e}=this.props;if(e>0){const[e,t,n,r]=this._getRangeToRender();this._callOnItemsRendered(e,t,n,r)}}if(typeof this.props.onScroll==="function"){const{scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n}=this.state;this._callOnScroll(e,t,n)}}_getItemStyle=e=>{const{direction:t,itemSize:n,layout:r}=this.props;const o=this._getItemStyleCache(n,r,t);let i;if(o.hasOwnProperty(e)){i=o[e]}else{const t=this.getItemOffset(e);const n=this.getItemSize(e);o[e]=i={position:"absolute",left:0,top:t,height:n,width:"100%"}}return i};_getItemStyleCache=(0,w.Z)((e,t,n)=>({}));_getRangeToRender(){let{itemCount:e,overscanCount:t}=this.props;let{isScrolling:n,scrollDirection:r,scrollOffset:o}=this.state;let i=this.getAnchoredScrollPos();if(i!=null){o=i}if(e===0){return[0,0,0,0]}const a=this.getStartIndexForOffset(o);const l=this.getStopIndexForStartIndex(a,o);const s=!n||r==="backward"?Math.max(1,t):1;const u=!n||r==="forward"?Math.max(1,t):1;return[Math.max(0,a-s),Math.max(0,Math.min(e-1,l+u)),a,l]}_onScrollVertical=e=>{let{scrollTop:t}=e.currentTarget;this.setState(e=>{if(e.scrollOffset===t){return null}let n=t;return{isScrolling:true,scrollDirection:e.scrollOffset<n?"forward":"backward",scrollOffset:n,scrollUpdateWasRequested:false}},this._resetIsScrollingDebounced)};_outerRefSetter=e=>{const{outerRef:t}=this.props;this._outerRef=e;if(typeof t==="function"){t(e)}else if(t!=null&&typeof t==="object"&&t.hasOwnProperty("current")){t.current=e}};_resetIsScrollingDebounced=()=>{if(this._resetIsScrollingTimeoutId!==null){clearTimeout(this._resetIsScrollingTimeoutId)}this._resetIsScrollingTimeoutId=setTimeout(this._resetIsScrolling,k)};_resetIsScrolling=()=>{this._resetIsScrollingTimeoutId=null;this.setState({isScrolling:false},()=>{this._getItemStyleCache(-1,null)})}}var j=n(39235);var I=n(16853);var D=n(5291);var P=n(57651);var O=n(63541);const M=32;function _(e,t){if(document.hasFocus()){e?.(t)}else{t.stopPropagation()}}const R=(0,o.forwardRef)(function e({width:e,name:t,truncate:n=true,children:o,style:i,contentStyle:a,...l},s){return(0,r.jsx)(x.Z,{innerRef:s,...l,style:{...e==="flex"?{flex:1,flexBasis:0}:{width:e},borderTopWidth:1,borderBottomWidth:1,borderColor:g.rS.tableBorder,...g.W2.smallText,...i},"data-testid":t,children:(0,r.jsx)(x.Z,{style:{flex:1,padding:"0 5px",justifyContent:"center",...a},children:n?(0,r.jsx)(b.Z,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:o}):o})})});function A({value:e,formatter:t}){return(0,r.jsx)(b.Z,{style:{flexGrow:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t?t(e):e})}function N({width:e,name:t,exposed:i,focused:a,value:s,formatter:u,textAlign:c,alignItems:f,onExpose:h,children:p,plain:m,style:v,valueStyle:y,unexposedContent:b,privacyFilter:w,...S}){let k=(0,o.useRef)(null);let T=(0,o.useRef)(null);(0,l.X)(T,a!==undefined?a:i);const E=e==="flex"?{flex:1,flexBasis:0}:{width:e};const C={position:"relative",textAlign:c||"left",justifyContent:"center",borderTopWidth:1,borderBottomWidth:1,borderColor:g.rS.tableBorder,alignItems:f};let j=(0,o.useMemo)(()=>(0,r.jsx)(I.wq,{privacyFilter:(0,I.JS)({activationFilters:[!a,!i],style:{position:"absolute",width:"100%",height:"100%"}},w),children:m?p:i?p():(0,r.jsx)(x.Z,{style:{flexDirection:"row",flex:1,padding:"0 5px",alignItems:"center",...g.W2.smallText,...y},onMouseDown:e=>k.current=[e.clientX,e.clientY],onClick:n.g.IS_TESTING?()=>h?.(t):e=>{if(k.current&&Math.abs(e.clientX-k.current[0])<5&&Math.abs(e.clientY-k.current[1])<5){h?.(t)}},children:b||(0,r.jsx)(A,{value:s,formatter:u})})}),[w,a,i,p,m,i,y,h,t,b,s,u]);return(0,r.jsx)(x.Z,{innerRef:T,style:{...E,...C,...v},...S,"data-testid":t,children:j})}function Z({inset:e=0,collapsed:t,children:n,height:o,style:i,...a}){return(0,r.jsxs)(x.Z,{style:{flexDirection:"row",height:o||M,flex:"0 0 "+(o||M)+"px",userSelect:"text",...t&&{marginTop:-1},...i},"data-testid":"row",...a,children:[e!==0&&(0,r.jsx)(R,{width:e}),n,e!==0&&(0,r.jsx)(R,{width:e})]})}const L={padding:"5px 3px",margin:"0 1px"};const B={backgroundColor:"transparent","::selection":{backgroundColor:g.rS.formInputTextReadOnlySelection}};function F({value:e,onUpdate:t,onBlur:n,...i}){let[a,l]=(0,o.useState)(e);function s(e){t?.(a);if(n){_(n,e)}}function u(n){if(n.key!=="Enter"&&n.key!=="Tab"){n.stopPropagation()}if(n.key==="Escape"){if(a!==e){l(e)}}else if(U(n)){t?.(a)}}return(0,r.jsx)(v.ZP,{...i,value:a,onUpdate:e=>l(e),onBlur:s,onKeyDown:u,style:{...L,...i.readOnly?B:null,...i.style}})}function W({inputProps:e,onUpdate:t,onBlur:n,textAlign:o,error:i,...a}){return(0,r.jsx)(N,{textAlign:o,...a,children:()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(F,{value:a.value,onUpdate:t,onBlur:n,style:{textAlign:o,...e&&e.style},...e}),i&&(0,r.jsx)(O.u,{targetHeight:M,width:180,position:"bottom-left",children:i},"error")]})})}function U(e){switch(e.key){case"Tab":case"Enter":e.preventDefault();return true;default:}}function z({value:e,children:t,onUpdate:n,onBlur:i,...a}){let[l,s]=(0,o.useState)(e);let[u,c]=(0,o.useState)(e);if(u!==e){s(e);c(e)}function f(e){if(document.hasFocus()){n?.(l);_(i,e)}}function h(e){if(U(e)){n?.(l)}}return(0,r.jsx)(N,{...a,value:e,children:()=>t({onBlur:f,onKeyDown:h,onUpdate:e=>s(e),onSave:e=>{s(e);n?.(e)},shouldSaveFromKey:U,inputStyle:L})})}function H({onDelete:e,style:t,...n}){return(0,r.jsx)(N,{...n,name:"delete",width:20,style:{alignItems:"center",userSelect:"none",...t},onClick:t=>{t.stopPropagation();e?.()},children:()=>(0,r.jsx)(c.Z,{width:7,height:7})})}const K=(0,o.forwardRef)(({children:e,style:t,primary:n,bare:o,disabled:i,clickBehavior:a,onSelect:l,onEdit:s,className:u},c)=>{return(0,r.jsx)(x.Z,{innerRef:c,className:u,tabIndex:0,onKeyDown:e=>{if(e.key==="x"||e.key===" "){e.preventDefault();if(!i){l?.(e)}}},style:{flexDirection:"row",alignItems:"center",cursor:"default",transition:"box-shadow .15s",backgroundColor:o?"transparent":i?g.rS.buttonNormalDisabledBackground:n?g.rS.buttonPrimaryBackground:g.rS.buttonNormalBackground,border:o?"none":"1px solid "+(i?g.rS.buttonNormalDisabledBorder:n?g.rS.buttonPrimaryBorder:g.rS.buttonNormalBorder),color:o?"inherit":i?g.rS.buttonNormalDisabledText:n?g.rS.buttonPrimaryText:g.rS.buttonNormalText,":focus":o?null:{outline:0,boxShadow:`1px 1px 2px ${g.rS.buttonNormalShadow}`},...t},onFocus:()=>s&&s(),"data-testid":"cell-button",onClick:a==="none"?null:e=>{if(!i){l?.(e);s?.()}},children:e})});function $({focused:e,selected:t,style:n,onSelect:o,onEdit:i,buttonProps:a={},...l}){return(0,r.jsx)(N,{...l,focused:e,name:"select",width:20,style:{alignItems:"center",userSelect:"none",...n},onClick:e=>{e.stopPropagation();o?.(e);i?.()},children:()=>(0,r.jsx)(K,{style:{width:12,height:12,justifyContent:"center",alignItems:"center",borderRadius:3,border:t?"1px solid "+g.rS.altFormInputBorderSelected:"1px solid "+g.rS.formInputBorder,color:g.rS.tableBackground,backgroundColor:t?g.rS.tableTextEditingBackground:g.rS.tableBackground,":focus":{border:"1px solid "+g.rS.altFormInputBorderSelected,boxShadow:"0 1px 2px "+g.rS.altFormInputShadowSelected}},onEdit:i,onSelect:o,clickBehavior:"none",...a,children:t&&(0,r.jsx)(p,{width:6,height:6})})})}function V({valueProps:e,valueStyle:t,inputProps:n,textAlign:o,onSave:i,...a}){const{binding:l,type:s,getValueStyle:u,formatExpr:c,unformatExpr:f,privacyFilter:h}=e;let p=(0,P.Z)(l,e=>{if(a.exposed&&n&&n.onBlur){n.onBlur(e)}});let g=(0,D.Z)();return(0,r.jsx)(N,{valueStyle:u?{...t,...u(p)}:t,textAlign:o,...a,value:p,formatter:e=>a.formatter?a.formatter(e,s):g(e,s),privacyFilter:h!=null?h:s==="financial"?true:undefined,"data-cellname":p,children:()=>{return(0,r.jsx)(F,{value:c?c(p):p,onUpdate:e=>{i(f?f(e):e)},...n,style:{textAlign:o,...n?.style||{}}})}})}function q({headers:e,children:t,version:n,...o}){return(0,r.jsx)(x.Z,{style:{borderRadius:"6px 6px 0 0",overflow:"hidden",flexShrink:0},children:(0,r.jsx)(Z,{collapsed:true,...o,style:{color:g.rS.tableHeaderText,backgroundColor:g.rS.tableHeaderBackground,zIndex:200,fontWeight:500,...o.style},children:e?e.map(e=>{return(0,r.jsx)(N,{value:e.name,width:e.width,style:e.style,valueStyle:e.valueStyle},e.name)}):t})})}function Y({name:e,keyHandlers:t,items:n,onSelect:i}){let a=(0,s.D9)();let[l,u]=(0,o.useState)(null);if(a.size===0){return null}return(0,r.jsxs)(x.Z,{style:{marginLeft:10,flexShrink:0},children:[(0,r.jsx)(j.U,{keys:t||{}}),(0,r.jsxs)(m.Z,{type:"bare",style:{color:g.rS.pageTextPositive},onClick:()=>u(true),children:[(0,r.jsx)(f.Z,{width:8,height:8,style:{marginRight:5,color:g.rS.pageText}}),a.size," ",e]}),l&&(0,r.jsx)(O.u,{position:"bottom-right",width:200,style:{padding:0,backgroundColor:g.rS.menuBackground},onClose:()=>u(false),children:(0,r.jsx)(y.Z,{onMenuSelect:e=>{i(e,[...a]);u(false)},items:n})})]})}let G={position:"absolute",willChange:"transform",width:"100%"};const Q=(0,o.forwardRef)(({fields:e,...t},n)=>{let o=J(t.items,e);return(0,r.jsx)(X,{...t,navigator:o})});const X=(0,o.forwardRef)(({items:e,count:t,headers:n,contentHeader:i,loading:s,rowHeight:c=M,backgroundColor:f=g.rS.tableHeaderBackground,renderItem:h,renderEmpty:p,getItemKey:m,loadMore:v,style:y,navigator:b,onScroll:w,version:S="v1",allowPopupsEscape:k,isSelected:T,saveScrollWidth:E,...j},I)=>{if(!b){b={onEdit:()=>{},editingId:null,focusedField:null,getNavigatorProps:e=>e}}let{onEdit:D,editingId:P,focusedField:_,getNavigatorProps:R}=b;let A=(0,o.useRef)(null);let N=(0,o.useRef)(null);let Z=(0,o.useRef)(null);let L=(0,o.useRef)(null);let B=(0,o.useRef)(false);(0,o.useImperativeHandle)(I,()=>({scrollTo:(t,n="smart")=>{let r=e.findIndex(e=>e.id===t);if(r!==-1){if(!A.current){L.current=r}else{A.current.scrollToItem(r,n)}}},scrollToTop:()=>{A.current?.scrollTo(0)},getScrolledItem:()=>{if(Z.current){let t=Z.current.scrollTop;let n=A.current.getStartIndexForOffset(t);return e[n].id}return 0},setRowAnimation:e=>{A.current?.setRowAnimation(e)},edit(e,t,n){D(e,t);if(e&&n){I.scrollTo(e)}},anchor(){A.current?.anchor()},unanchor(){A.current?.unanchor()},isAnchored(){return A.current&&A.current.isAnchored()}}));(0,o.useLayoutEffect)(()=>{if(!B.current&&N.current){A.current?.setRowAnimation(true);B.current=true}if(Z.current&&E){E(Z.current.offsetParent?Z.current.offsetParent.clientWidth:0,Z.current?Z.current.clientWidth:0)}});function F({index:t,style:n,key:o}){let i=e[t];let a=P===i.id;let l=T&&T(i.id);let s=h({item:i,editing:a,focusedField:a&&_,onEdit:D,index:t,position:n.top});return(0,r.jsx)(x.Z,{style:{...G,zIndex:a||l?101:"auto",transform:"translateY(var(--pos))"},nativeStyle:{"--pos":`${n.top-1}px`},"data-focus-key":i.id,children:s},o)}function W(e,t){return t*(c-1)+(c-1)/2-e/2+(c-1)*2}function U({overscanStartIndex:t,overscanStopIndex:n}){if(v&&n>e.length-100){v()}}function z(e){if(e==null){return null}else if(typeof e==="function"){return e()}return(0,r.jsx)(x.Z,{style:{justifyContent:"center",alignItems:"center",fontStyle:"italic",color:g.rS.tableText,flex:1},children:e})}if(s){return(0,r.jsx)(x.Z,{style:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:f},children:(0,r.jsx)(u.Z,{width:25,color:g.rS.tableText})})}let H=(t||e.length)===0;return(0,r.jsxs)(x.Z,{style:{flex:1,outline:"none",...y},tabIndex:"1",...R(j),"data-testid":"table",children:[n&&(0,r.jsx)(q,{height:c,...Array.isArray(n)?{headers:n}:{children:n}}),(0,r.jsx)(x.Z,{style:{flex:`1 1 ${c*Math.max(2,e.length)}px`,backgroundColor:f},children:H?z(p):(0,r.jsx)(a.Z,{children:({width:n,height:o})=>{if(n===0||o===0){return null}return(0,r.jsx)(O.Hp.Provider,{value:!k&&N,children:(0,r.jsx)(l.M,{children:(0,r.jsx)(C,{ref:A,header:i,innerRef:N,outerRef:Z,width:n,height:o,renderRow:F,itemCount:t||e.length,itemSize:c-1,itemKey:m||((t,n)=>e[t].id),indexForKey:t=>e.findIndex(e=>e.id===t),initialScrollOffset:L.current?W(o,L.current):0,overscanCount:5,onItemsRendered:U,onScroll:w})})})}})})]})});function J(e,t){let n=typeof t!=="function"?()=>t:t;let[r,a]=(0,o.useState)(null);let[l,s]=(0,o.useState)(null);let u=(0,o.useRef)();let c=(0,i.oR)();let f=(0,o.useRef)(0);let h=(0,o.useCallback)((e,t)=>{a(e);s(e?t:null)},[]);(0,o.useEffect)(()=>{f.current=c.getState().modals.modalStack.length},[]);function p(){u.current.focus();h(null);setTimeout(()=>{h(r,l)},100)}function g(){let t=e.findIndex(e=>e.id===r);if(t>0){let r=e[t-1];let o=n(r);h(r.id,o[o.length-1])}else{p()}}function m(){let t=e.findIndex(e=>e.id===r);if(t<e.length-1){let r=e[t+1];let o=n(r);h(r.id,o[0])}else{p()}}function v(t){if(r){let o=n(e.find(e=>e.id===r));let i=o.indexOf(l)+t;if(i<0){g()}else if(i>=o.length){m()}else{s(o[i])}}}function y(t){if(r){let o=e.findIndex(e=>e.id===r);let i=o;while(true){i=i+t;if(i>=0&&i<e.length){const t=e[i];if(n(t).includes(l)){h(t.id,l);break}}else{p();break}}}}function b(e){switch(e){case"left":v(-1);break;case"right":v(1);break;case"up":y(-1);break;case"down":y(1);break;default:throw new Error("Unknown direction: "+e)}}function x(e){return{...e,innerRef:u,onKeyDown:t=>{e?.onKeyDown?.(t);if(t.isPropagationStopped()){return}switch(t.key){case"ArrowUp":case"k":if(t.target.tagName!=="INPUT"){b("up")}break;case"ArrowDown":case"j":if(t.target.tagName!=="INPUT"){b("down")}break;case"Enter":case"Tab":t.preventDefault();t.stopPropagation();b(t.key==="Enter"?t.shiftKey?"up":"down":t.shiftKey?"left":"right");break;default:}},onBlur:e=>{let t=f.current;let n=c.getState().modals.modalStack.length;if(document.hasFocus()&&(e.relatedTarget==null||!u.current.contains(e.relatedTarget)||u.current===e.relatedTarget)&&t===n){h(null)}}}}return{onEdit:h,editingId:r,focusedField:l,getNavigatorProps:x}}},63541:function(e,t,n){"use strict";n.d(t,{Hp:function(){return s},lL:function(){return u},u:function(){return c}});var r=n(43188);var o=n(66204);var i=n(42457);var a=n(99818);var l=n(45492);const s=(0,o.createContext)();function u(){let[e,t]=(0,o.useState)(false);return{getOpenEvents:(e={})=>({onClick:n=>{n.stopPropagation();e.onClick?.(n);t(true)}}),isOpen:e,close:()=>t(false)}}class c extends o.Component{static contextType=s;state={position:null};constructor(e){super(e);this.position=e.position||"bottom-right";this.contentRef=(0,o.createRef)()}setup(){this.layout();let e=e=>{let t=e.target;while(t&&t!==document.documentElement){if(t.dataset.istooltip||t.dataset.reachPopover!=null){break}t=t.parentNode}if(t===document.documentElement){this.props.onClose?.()}};let t=e=>{if(e.key==="Escape"){this.props.onClose?.()}};window.document.addEventListener("mousedown",e,false);this.contentRef.current.addEventListener("keydown",t,false);this.cleanup=()=>{window.document.removeEventListener("mousedown",e)}}componentDidMount(){if(this.getContainer()){this.setup()}else{this.forceUpdate(()=>{if(this.getContainer()){this.setup()}else{console.log("Warning: could not mount tooltip, container missing")}})}}componentDidUpdate(e){if(e.targetRect!==this.props.targetRect||e.forceTop!==this.props.forceTop||this.props.forceLayout){this.layout()}}getContainer(){let{ignoreBoundary:e=false}=this.props;if(!e&&this.context){return this.context.current}return document.body}getBoundsContainer(){let e=this.getContainer();if(e.parentNode&&e.parentNode.style.overflow==="auto"){return e.parentNode}return e}layout(){let{targetRect:e,offset:t=0}=this.props;let n=this.contentRef.current;if(!n){return}let r=n.getBoundingClientRect();let o=this.target.parentNode;let i=e||o.getBoundingClientRect();i={top:i.top,left:i.left,width:i.width,height:i.height};let a=this.getBoundsContainer();if(!a){return}let l=a.getBoundingClientRect();i.left-=l.left;i.top-=l.top;if(this.props.forceTop){i.top=this.props.forceTop}else{let e=r.height+t;let n=i.top-e;let o=i.top+i.height+e;if(this.position.indexOf("top")!==-1&&n<l.top||this.position.indexOf("bottom")!==-1&&o>l.height&&n>0){this.position=this.getOppositePosition(this.position)}i.top+=a.scrollTop}const s=this.getStyleForPosition(this.position,r,i,this.getContainer().getBoundingClientRect(),t);n.style.top=s.top;n.style.bottom=s.bottom;n.style.left=s.left;n.style.right=s.right;n.style.width=s.width}componentWillUnmount(){if(this.cleanup){this.cleanup()}}getOppositePosition(e){switch(e){case"top":case"top-left":return"bottom";case"top-right":return"bottom-right";case"bottom":case"bottom-left":return"top";case"bottom-right":return"top-right";case"bottom-stretch":return"top-stretch";case"top-stretch":return"bottom-stretch";case"bottom-center":return"top-center";case"top-center":return"bottom-center";case"right":return"right";default:}}getStyleForPosition(e,t,n,r,o){const i={top:"inherit",bottom:"inherit",left:"inherit",right:"inherit"};if(e==="top"||e==="top-right"||e==="top-left"){i.top=n.top-t.height-o+"px";if(e==="top-right"){i.left=n.left+(n.width-t.width)+"px"}else{i.left=n.left+"px"}}else if(e==="bottom"||e==="bottom-right"||e==="bottom-left"){i.top=n.top+n.height+o+"px";if(e==="bottom-right"){i.left=n.left+(n.width-t.width)+"px"}else{i.left=n.left+"px"}}else if(e==="bottom-center"){i.top=n.top+n.height+o+"px";i.left=n.left-(t.width-n.width)/2+"px"}else if(e==="top-center"){i.top=n.top-t.height-o+"px";i.left=n.left-(t.width-n.width)/2+"px"}else if(e==="left-center"){i.top=n.top-(t.height-n.height)/2+"px";i.left=n.left-t.width+"px"}else if(e==="top-stretch"){i.bottom=r.height-n.top+o+"px";i.left=n.left+"px";i.width=n.width+"px"}else if(e==="bottom-stretch"){i.top=n.top+n.height+o+"px";i.left=n.left+"px";i.width=n.width+"px"}else if(e==="right"){i.top=n.top+"px";i.left=n.left+n.width+o+"px"}else{throw new Error("Invalid position for Tooltip: "+e)}return i}render(){const{children:e,width:t,style:n}=this.props;const o={position:"absolute",zIndex:3e3,padding:5,width:t,...l.W2.shadowLarge,borderRadius:4,backgroundColor:l.rS.menuBackground,color:l.rS.menuItemText};if(!this.getContainer()){return null}return(0,r.jsx)("div",{ref:e=>this.target=e,children:i.createPortal((0,r.jsx)("div",{className:`${(0,a.iv)(o,n,l.W2.darkScrollbar)}`,ref:this.contentRef,"data-testid":this.props["data-testid"]||"tooltip","data-istooltip":true,onClick:e=>{e.stopPropagation()},children:e}),this.getContainer())})}}},83172:function(e,t,n){"use strict";n.d(t,{$b:function(){return ty},z4:function(){return tx}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(45485);var l=n(59379);var s=n(14313);var u=n(90696);var c=n(4689);function f(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":o,labelElementType:i="label"}=e;t=(0,u.Me)(t);let a=(0,u.Me)();let l={};if(n){r=r?`${a} ${r}`:a;l={id:a,htmlFor:i==="label"?t:undefined}}else if(!r&&!o)console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let s=(0,u.bE)({id:t,"aria-label":o,"aria-labelledby":r});return{labelProps:l,fieldProps:s}}function h(e){let{description:t,errorMessage:n,validationState:r}=e;let{labelProps:o,fieldProps:i}=(0,f)(e);let a=(0,$iD7q0$useSlotId)([Boolean(t),Boolean(n),r]);let l=(0,$iD7q0$useSlotId)([Boolean(t),Boolean(n),r]);i=(0,$iD7q0$mergeProps)(i,{"aria-describedby":[a,l,e["aria-describedby"]].filter(Boolean).join(" ")||undefined});return{labelProps:o,fieldProps:i,descriptionProps:{id:a},errorMessageProps:{id:l}}}var p=n(6860);const g=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]);const m=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function v(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize().script;return g.has(t)}let t=e.split("-")[0];return m.has(t)}function y(){let e=typeof navigator!=="undefined"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch(t){e="en-US"}return{locale:e,direction:(0,v)(e)?"rtl":"ltr"}}let b=y();let x=new Set;function w(){b=y();for(let e of x)e(b)}function S(){let e=(0,p.Av)();let[t,n]=(0,o.useState)(b);(0,o.useEffect)(()=>{if(x.size===0)window.addEventListener("languagechange",w);x.add(n);return()=>{x.delete(n);if(x.size===0)window.removeEventListener("languagechange",w)}},[]);if(e)return{locale:"en-US",direction:"ltr"};return t}const k=(0,o).createContext(null);function T(e){let{locale:t,children:n}=e;let r=(0,S)();let o=t?{locale:t,direction:(0,v)(t)?"rtl":"ltr"}:r;return(0,$iFADg$react).createElement(k.Provider,{value:o},n)}function E(){let e=(0,S)();let t=(0,o.useContext)(k);return t||e}var C={};"use strict";const j=new WeakMap;function I(e){let t=j.get(e);if(!t){t=new(0,$iFADg$LocalizedStringDictionary)(e);j.set(e,t)}return t}function D(e){let{locale:t}=(0,E)();let n=(0,$iFADg$useMemo)(()=>I(e),[e]);return(0,$iFADg$useMemo)(()=>new(0,$iFADg$LocalizedStringFormatter)(t,n),[t,n])}function P(e={}){let{locale:t}=(0,E)();return(0,$iFADg$useMemo)(()=>new Intl.ListFormat(t,e),[t,e])}function O(e){e=(0,$iFADg$useDeepMemo)(e,M);let{locale:t}=(0,E)();return(0,$iFADg$useMemo)(()=>new(0,$iFADg$DateFormatter)(t,e),[t,e])}function M(e,t){if(e===t)return true;let n=Object.keys(e);let r=Object.keys(t);if(n.length!==r.length)return false;for(let r of n){if(t[r]!==e[r])return false}return true}function _(e={}){let{locale:t}=(0,E)();return(0,$iFADg$useMemo)(()=>new(0,$iFADg$NumberFormatter)(t,e),[t,e])}let R=new Map;function A(e){let{locale:t}=(0,E)();let n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(R.has(n))return R.get(n);let r=new Intl.Collator(t,e);R.set(n,r);return r}function N(e){let t=(0,A)({usage:"search",...e});let n=(0,$iFADg$useCallback)((e,n)=>{if(n.length===0)return true;e=e.normalize("NFC");n=n.normalize("NFC");return t.compare(e.slice(0,n.length),n)===0},[t]);let r=(0,$iFADg$useCallback)((e,n)=>{if(n.length===0)return true;e=e.normalize("NFC");n=n.normalize("NFC");return t.compare(e.slice(-n.length),n)===0},[t]);let o=(0,$iFADg$useCallback)((e,n)=>{if(n.length===0)return true;e=e.normalize("NFC");n=n.normalize("NFC");let r=0;let o=n.length;for(;r+o<=e.length;r++){let i=e.slice(r,r+o);if(t.compare(n,i)===0)return true}return false},[t]);return(0,$iFADg$useMemo)(()=>({startsWith:n,endsWith:r,contains:o}),[n,r,o])};function Z(e){return(0,u.ad)()?e.altKey:e.ctrlKey}function L(e){if((0,u.V5)())return e.metaKey;return e.ctrlKey}const B=1e3;function F(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e;let i=(0,o.useRef)({search:"",timeout:null}).current;let a=e=>{let o=W(e.key);if(!o||e.ctrlKey||e.metaKey||!e.currentTarget.contains(e.target))return;if(o===" "&&i.search.trim().length>0){e.preventDefault();if(!("continuePropagation"in e))e.stopPropagation()}i.search+=o;let a=t.getKeyForSearch(i.search,n.focusedKey);if(a==null)a=t.getKeyForSearch(i.search);if(a!=null){n.setFocusedKey(a);if(r)r(a)}clearTimeout(i.timeout);i.timeout=setTimeout(()=>{i.search=""},B)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?a:null}}}function W(e){if(e.length===1||!/^[A-Z]/i.test(e))return e;return""}function U(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=false,shouldFocusWrap:a=false,disallowEmptySelection:l=false,disallowSelectAll:f=false,selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:p=false,shouldUseVirtualFocus:g,allowsTabNavigation:m=false,isVirtualized:v,scrollRef:y=r}=e;let{direction:b}=(0,E)();let x=e=>{if(e.altKey&&e.key==="Tab")e.preventDefault();if(!r.current.contains(e.target))return;const o=(n,r)=>{if(n!=null){t.setFocusedKey(n,r);if(e.shiftKey&&t.selectionMode==="multiple")t.extendSelection(n);else if(h&&!(0,Z)(e))t.replaceSelection(n)}};switch(e.key){case"ArrowDown":if(n.getKeyBelow){var i,c;e.preventDefault();let r=t.focusedKey!=null?n.getKeyBelow(t.focusedKey):(i=n.getFirstKey)===null||i===void 0?void 0:i.call(n);if(r==null&&a)r=(c=n.getFirstKey)===null||c===void 0?void 0:c.call(n,t.focusedKey);o(r)}break;case"ArrowUp":if(n.getKeyAbove){var p,g;e.preventDefault();let r=t.focusedKey!=null?n.getKeyAbove(t.focusedKey):(p=n.getLastKey)===null||p===void 0?void 0:p.call(n);if(r==null&&a)r=(g=n.getLastKey)===null||g===void 0?void 0:g.call(n,t.focusedKey);o(r)}break;case"ArrowLeft":if(n.getKeyLeftOf){var v,y;e.preventDefault();let r=n.getKeyLeftOf(t.focusedKey);if(r==null&&a)r=b==="rtl"?(v=n.getFirstKey)===null||v===void 0?void 0:v.call(n,t.focusedKey):(y=n.getLastKey)===null||y===void 0?void 0:y.call(n,t.focusedKey);o(r,b==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){var x,w;e.preventDefault();let r=n.getKeyRightOf(t.focusedKey);if(r==null&&a)r=b==="rtl"?(x=n.getLastKey)===null||x===void 0?void 0:x.call(n,t.focusedKey):(w=n.getFirstKey)===null||w===void 0?void 0:w.call(n,t.focusedKey);o(r,b==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){e.preventDefault();let r=n.getFirstKey(t.focusedKey,(0,L)(e));t.setFocusedKey(r);if((0,L)(e)&&e.shiftKey&&t.selectionMode==="multiple")t.extendSelection(r);else if(h)t.replaceSelection(r)}break;case"End":if(n.getLastKey){e.preventDefault();let r=n.getLastKey(t.focusedKey,(0,L)(e));t.setFocusedKey(r);if((0,L)(e)&&e.shiftKey&&t.selectionMode==="multiple")t.extendSelection(r);else if(h)t.replaceSelection(r)}break;case"PageDown":if(n.getKeyPageBelow){e.preventDefault();let r=n.getKeyPageBelow(t.focusedKey);o(r)}break;case"PageUp":if(n.getKeyPageAbove){e.preventDefault();let r=n.getKeyPageAbove(t.focusedKey);o(r)}break;case"a":if((0,L)(e)&&t.selectionMode==="multiple"&&f!==true){e.preventDefault();t.selectAll()}break;case"Escape":e.preventDefault();if(!l)t.clearSelection();break;case"Tab":if(!m){if(e.shiftKey)r.current.focus();else{let e=(0,s.QL)(r.current,{tabbable:true});let t;let n;do{n=e.lastChild();if(n)t=n}while(n);if(t&&!t.contains(document.activeElement))(0,u.Ao)(t)}break}}};let w=(0,o.useRef)({top:0,left:0});(0,u.zX)(y,"scroll",v?null:()=>{w.current={top:y.current.scrollTop,left:y.current.scrollLeft}});let S=e=>{if(t.isFocused){if(!e.currentTarget.contains(e.target))t.setFocused(false);return}if(!e.currentTarget.contains(e.target))return;t.setFocused(true);if(t.focusedKey==null){let r=e=>{if(e!=null){t.setFocusedKey(e);if(h)t.replaceSelection(e)}};let a=e.relatedTarget;var o,i;if(a&&e.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING)r((o=t.lastSelectedKey)!==null&&o!==void 0?o:n.getLastKey());else r((i=t.firstSelectedKey)!==null&&i!==void 0?i:n.getFirstKey())}else if(!v){y.current.scrollTop=w.current.top;y.current.scrollLeft=w.current.left}if(!v&&t.focusedKey!=null){let e=y.current.querySelector(`[data-key="${t.focusedKey}"]`);if(e){if(!e.contains(document.activeElement))(0,u.Ao)(e);let t=(0,c.Jz)();if(t==="keyboard")(0,u.Gt)(e,{containingElement:r.current})}}};let k=e=>{if(!e.currentTarget.contains(e.relatedTarget))t.setFocused(false)};const T=(0,o.useRef)(i);(0,o.useEffect)(()=>{if(T.current){let e=null;if(i==="first")e=n.getFirstKey();if(i==="last")e=n.getLastKey();let o=t.selectedKeys;if(o.size)e=o.values().next().value;t.setFocused(true);t.setFocusedKey(e);if(e==null&&!g)(0,s.ex)(r.current)}T.current=false},[]);let C=(0,o.useRef)(t.focusedKey);(0,o.useEffect)(()=>{let e=(0,c.Jz)();if(t.isFocused&&t.focusedKey!=null&&(y===null||y===void 0?void 0:y.current)){let n=y.current.querySelector(`[data-key="${t.focusedKey}"]`);if(n&&e==="keyboard"){if(!v)(0,u.zT)(y.current,n);(0,u.Gt)(n,{containingElement:r.current})}}if(t.isFocused&&t.focusedKey==null&&C.current!=null)(0,s.ex)(r.current);C.current=t.focusedKey},[v,y,t.focusedKey,t.isFocused,r]);let j={onKeyDown:x,onFocus:S,onBlur:k,onMouseDown(e){if(y.current===e.target)e.preventDefault()}};let{typeSelectProps:I}=(0,F)({keyboardDelegate:n,selectionManager:t});if(!p)j=(0,u.dG)(I,j);let D;if(!g)D=t.focusedKey==null?0:-1;return{collectionProps:{...j,tabIndex:D}}}function z(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:a,focus:l,isDisabled:f,onAction:h,allowsDifferentPressOrigin:p}=e;let g=e=>{if(e.pointerType==="keyboard"&&(0,Z)(e))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.selectionMode==="single"){if(t.isSelected(n)&&!t.disallowEmptySelection)t.toggleSelection(n);else t.replaceSelection(n)}else if(e&&e.shiftKey)t.extendSelection(n);else if(t.selectionBehavior==="toggle"||e&&((0,L)(e)||e.pointerType==="touch"||e.pointerType==="virtual"))t.toggleSelection(n);else t.replaceSelection(n)}};(0,o.useEffect)(()=>{let e=n===t.focusedKey;if(e&&t.isFocused&&!a){if(l)l();else if(document.activeElement!==r.current)(0,s.ex)(r.current)}},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,a]);f=f||t.isDisabled(n);let m={};if(!a&&!f)m={tabIndex:n===t.focusedKey?0:-1,onFocus(e){if(e.target===r.current)t.setFocusedKey(n)}};else if(f)m.onMouseDown=e=>{e.preventDefault()};let v=!f&&t.canSelectItem(n);let y=h&&!f;let b=y&&(t.selectionBehavior==="replace"?!v:t.isEmpty);let x=y&&v&&t.selectionBehavior==="replace";let w=b||x;let S=(0,o.useRef)(null);let k=w&&v;let T=(0,o.useRef)(false);let E=(0,o.useRef)(false);let C={};if(i){C.onPressStart=e=>{S.current=e.pointerType;T.current=k;if(e.pointerType==="keyboard"&&(!w||K()))g(e)};if(!p)C.onPress=e=>{if(b||x&&e.pointerType!=="mouse"){if(e.pointerType==="keyboard"&&!H())return;h()}else if(e.pointerType!=="keyboard")g(e)};else{C.onPressUp=e=>{if(e.pointerType!=="keyboard")g(e)};C.onPress=b?()=>h():null}}else{C.onPressStart=e=>{S.current=e.pointerType;T.current=k;E.current=b;if(e.pointerType==="mouse"&&!b||e.pointerType==="keyboard"&&(!h||K()))g(e)};C.onPress=e=>{if(e.pointerType==="touch"||e.pointerType==="pen"||e.pointerType==="virtual"||e.pointerType==="keyboard"&&w&&H()||e.pointerType==="mouse"&&E.current){if(w)h();else g(e)}}}m["data-key"]=n;C.preventFocusOnPress=a;let{pressProps:j,isPressed:I}=(0,c.r7)(C);let D=x?e=>{if(S.current==="mouse"){e.stopPropagation();e.preventDefault();h()}}:undefined;let{longPressProps:P}=(0,c.TA)({isDisabled:!k,onLongPress(e){if(e.pointerType==="touch"){g(e);t.setSelectionBehavior("toggle")}}});let O=e=>{if(S.current==="touch"&&T.current)e.preventDefault()};return{itemProps:(0,u.dG)(m,v||b?j:{},k?P:{},{onDoubleClick:D,onDragStartCapture:O}),isPressed:I,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:f,allowsSelection:v,hasAction:w}}function H(){let e=window.event;return(e===null||e===void 0?void 0:e.key)==="Enter"}function K(){let e=window.event;return(e===null||e===void 0?void 0:e.key)===" "||(e===null||e===void 0?void 0:e.code)==="Space"}class ${getNextKey(e){e=this.collection.getKeyAfter(e);while(e!=null){let t=this.collection.getItem(e);if(t.type==="item"&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyAfter(e)}return null}getPreviousKey(e){e=this.collection.getKeyBefore(e);while(e!=null){let t=this.collection.getItem(e);if(t.type==="item"&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyBefore(e)}return null}findKey(e,t,n){let r=this.getItem(e);if(!r)return null;let o=r.getBoundingClientRect();do{e=t(e);r=this.getItem(e)}while(r&&n(o,r.getBoundingClientRect()));return e}isSameRow(e,t){return e.top===t.top||e.left!==t.left}isSameColumn(e,t){return e.left===t.left||e.top!==t.top}getKeyBelow(e){if(this.layout==="grid"&&this.orientation==="vertical")return this.findKey(e,e=>this.getNextKey(e),this.isSameRow);else return this.getNextKey(e)}getKeyAbove(e){if(this.layout==="grid"&&this.orientation==="vertical")return this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow);else return this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){if(this.layout==="grid"){if(this.orientation==="vertical")return this.getNextColumn(e,this.direction==="rtl");else return this.findKey(e,e=>this.getNextColumn(e,this.direction==="rtl"),this.isSameColumn)}else if(this.orientation==="horizontal")return this.getNextColumn(e,this.direction==="rtl");return null}getKeyLeftOf(e){if(this.layout==="grid"){if(this.orientation==="vertical")return this.getNextColumn(e,this.direction==="ltr");else return this.findKey(e,e=>this.getNextColumn(e,this.direction==="ltr"),this.isSameColumn)}else if(this.orientation==="horizontal")return this.getNextColumn(e,this.direction==="ltr");return null}getFirstKey(){let e=this.collection.getFirstKey();while(e!=null){let t=this.collection.getItem(e);if(t.type==="item"&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyAfter(e)}return null}getLastKey(){let e=this.collection.getLastKey();while(e!=null){let t=this.collection.getItem(e);if(t.type==="item"&&!this.disabledKeys.has(e))return e;e=this.collection.getKeyBefore(e)}return null}getItem(e){return this.ref.current.querySelector(`[data-key="${e}"]`)}getKeyPageAbove(e){let t=this.ref.current;let n=this.getItem(e);if(!n)return null;if(!(0,u.a9)(t))return this.getFirstKey();let r=t.getBoundingClientRect();let o=n.getBoundingClientRect();if(this.orientation==="horizontal"){let i=r.x-t.scrollLeft;let a=Math.max(0,o.x-i+o.width-r.width);while(n&&o.x-i>a){e=this.getKeyAbove(e);n=e==null?null:this.getItem(e);o=n===null||n===void 0?void 0:n.getBoundingClientRect()}}else{let i=r.y-t.scrollTop;let a=Math.max(0,o.y-i+o.height-r.height);while(n&&o.y-i>a){e=this.getKeyAbove(e);n=e==null?null:this.getItem(e);o=n===null||n===void 0?void 0:n.getBoundingClientRect()}}return e!==null&&e!==void 0?e:this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current;let n=this.getItem(e);if(!n)return null;if(!(0,u.a9)(t))return this.getLastKey();let r=t.getBoundingClientRect();let o=n.getBoundingClientRect();if(this.orientation==="horizontal"){let i=r.x-t.scrollLeft;let a=Math.min(t.scrollWidth,o.x-i-o.width+r.width);while(n&&o.x-i<a){e=this.getKeyBelow(e);n=e==null?null:this.getItem(e);o=n===null||n===void 0?void 0:n.getBoundingClientRect()}}else{let i=r.y-t.scrollTop;let a=Math.min(t.scrollHeight,o.y-i-o.height+r.height);while(n&&o.y-i<a){e=this.getKeyBelow(e);n=e==null?null:this.getItem(e);o=n===null||n===void 0?void 0:n.getBoundingClientRect()}}return e!==null&&e!==void 0?e:this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection;let r=t||this.getFirstKey();while(r!=null){let t=n.getItem(r);let o=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(o,e)===0)return r;r=this.getKeyBelow(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection;this.ref=t.ref;this.disabledKeys=t.disabledKeys||new Set;this.orientation=t.orientation;this.direction=t.direction;this.layout=t.layout||"stack"}else{this.collection=e[0];this.disabledKeys=e[1];this.ref=e[2];this.collator=e[3];this.layout="stack";this.orientation="vertical"}if(this.layout==="stack"&&this.orientation==="vertical"){this.getKeyLeftOf=undefined;this.getKeyRightOf=undefined}}}function V(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,autoFocus:l,shouldFocusWrap:s,isVirtualized:u,disallowEmptySelection:c,selectOnFocus:f=t.selectionBehavior==="replace",disallowTypeAhead:h,shouldUseVirtualFocus:p,allowsTabNavigation:g}=e;let m=(0,A)({usage:"search",sensitivity:"base"});let v=t.disabledBehavior;let y=(0,o.useMemo)(()=>a||new(0,$)(n,v==="selection"?new Set:r,i,m),[a,n,r,i,m,v]);let{collectionProps:b}=(0,U)({ref:i,selectionManager:t,keyboardDelegate:y,autoFocus:l,shouldFocusWrap:s,disallowEmptySelection:c,selectOnFocus:f,disallowTypeAhead:h,shouldUseVirtualFocus:p,allowsTabNavigation:g,isVirtualized:u,scrollRef:i});return{listProps:b}};function q(e){return null}q.getCollectionNode=function* e(e,t){let{childItems:n,title:r,children:i}=e;let a=e.title||e.children;let l=e.textValue||(typeof a==="string"?a:"")||e["aria-label"]||"";if(!l&&!(t===null||t===void 0?void 0:t.suppressTextValueWarning))console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop.");yield{type:"item",props:e,rendered:a,textValue:l,"aria-label":e["aria-label"],hasChildNodes:Y(e),*childNodes(){if(n)for(let e of n)yield{type:"item",value:e};else if(r){let e=[];(0,o).Children.forEach(i,t=>{e.push({type:"item",element:t})});yield*e}}}};function Y(e){if(e.hasChildItems!=null)return e.hasChildItems;if(e.childItems)return true;if(e.title&&(0,o).Children.count(e.children)>0)return true;return false}let G=q;function Q(e){return null}Q.getCollectionNode=function* e(e){let{children:t,title:n,items:r}=e;yield{type:"section",props:e,hasChildNodes:true,rendered:n,"aria-label":e["aria-label"],*childNodes(){if(typeof t==="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let e of r)yield{type:"item",value:e,renderer:t}}else{let e=[];(0,o).Children.forEach(t,t=>{e.push({type:"item",element:t})});yield*e}}}};let X=Q;class J{build(e,t){this.context=t;return ee(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(typeof t==="function"){if(!n)throw new Error("props.children was a function but props.items is missing");for(let n of e.items)yield*this.getFullNode({value:n},{renderer:t})}else{let e=[];(0,o).Children.forEach(t,t=>{e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e){n++;yield t}}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type==="cell"&&t.key!=null)return`${r}${t.key}`;let o=t.value;if(o!=null){var i;let e=(i=o.key)!==null&&i!==void 0?i:o.id;if(e==null)throw new Error("No key found for item");return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index;n.parentKey=r?r.key:null;yield n;return}i=t.renderer(e.value)}if((0,o).isValidElement(i)){let o=i.type;if(typeof o!=="function"&&typeof o.getCollectionNode!=="function"){let e=typeof i.type==="function"?i.type.name:i.type;throw new Error(`Unknown element <${e}> in collection.`)}let a=o.getCollectionNode(i.props,this.context);let l=e.index;let s=a.next();while(!s.done&&s.value){let o=s.value;e.index=l;let u=o.key;if(!u)u=o.element?null:this.getKey(i,e,t,n);let c=this.getFullNode({...o,key:u,index:l,wrapper:et(e.wrapper,o.wrapper)},this.getChildState(t,o),n?`${n}${i.key}`:i.key,r);let f=[...c];for(let t of f){t.value=o.value||e.value;if(t.value)this.cache.set(t.value,t);if(e.type&&t.type!==e.type)throw new Error(`Unsupported type <${en(t.type)}> in <${en(r.type)}>. Only <${en(e.type)}> is supported.`);l++;yield t}s=a.next(f)}return}if(e.key==null)return;let a=this;let l={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue,"aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes,childNodes:ee(function*(){if(!e.hasChildNodes)return;let n=0;for(let r of e.childNodes()){if(r.key!=null)r.key=`${l.key}${r.key}`;r.index=n;let e=a.getFullNode(r,a.getChildState(t,r),l.key,l);for(let t of e){n++;yield t}}})};yield l}constructor(){this.cache=new WeakMap}}function ee(e){let t=[];let n=null;return{*[Symbol.iterator](){for(let e of t)yield e;if(!n)n=e();for(let e of n){t.push(e);yield e}}}}function et(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function en(e){return e[0].toUpperCase()+e.slice(1)}function er(e,t,n){let r=(0,o.useMemo)(()=>new(0,J),[]);let{children:i,items:a,collection:l}=e;let s=(0,o.useMemo)(()=>{if(l)return l;let e=r.build({children:i,items:a},n);return t(e)},[r,i,a,l,n,t]);return s}function eo(e,t){if(typeof t.getChildren==="function")return t.getChildren(e.key);return e.childNodes}function ei(e){return ea(e,0)}function ea(e,t){if(t<0)return undefined;let n=0;for(let r of e){if(n===t)return r;n++}}function el(e){let t=undefined;for(let n of e)t=n;return t}function es(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...eu(e,t),t];let o=[...eu(e,n),n];let i=r.slice(0,o.length).findIndex((e,t)=>e!==o[t]);if(i!==-1){t=r[i];n=o[i];return t.index-n.index}if(r.findIndex(e=>e===n)>=0)return 1;else if(o.findIndex(e=>e===t)>=0)return-1;return-1}function eu(e,t){let n=[];while((t===null||t===void 0?void 0:t.parentKey)!=null){t=e.getItem(t.parentKey);n.unshift(t)}return n}const ec=new WeakMap;function ed(e){let t=ec.get(e);if(t!=null)return t;t=0;let n=r=>{for(let o of r)if(o.type==="section")n((0,eo)(o,e));else t++};n(e);ec.set(e,t);return t};const ef=new WeakMap;function eh(e){if(typeof e==="string")return e.replace(/\s*/g,"");return""+e}function ep(e,t){let n=ef.get(e);if(!n)throw new Error("Unknown list");return`${n.id}-option-${eh(t)}`}function eg(e,t,n){let r=(0,u.zL)(e,{labelable:true});let{listProps:o}=(0,V)({...e,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys});let{focusWithinProps:i}=(0,c.L_)({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange});let a=(0,u.Me)(e.id);(0,ef).set(t,{id:a,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction});let{labelProps:l,fieldProps:s}=(0,f)({...e,id:a,labelElementType:"span"});return{labelProps:l,listBoxProps:(0,u.dG)(r,i,t.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox",...(0,u.dG)(s,o)})}}function em(e,t,n){let{key:r}=e;let o=(0,ef).get(t);var i;let a=(i=e.isDisabled)!==null&&i!==void 0?i:t.disabledKeys.has(r);var l;let s=(l=e.isSelected)!==null&&l!==void 0?l:t.selectionManager.isSelected(r);var f;let h=(f=e.shouldSelectOnPressUp)!==null&&f!==void 0?f:o===null||o===void 0?void 0:o.shouldSelectOnPressUp;var p;let g=(p=e.shouldFocusOnHover)!==null&&p!==void 0?p:o===null||o===void 0?void 0:o.shouldFocusOnHover;var m;let v=(m=e.shouldUseVirtualFocus)!==null&&m!==void 0?m:o===null||o===void 0?void 0:o.shouldUseVirtualFocus;var y;let b=(y=e.isVirtualized)!==null&&y!==void 0?y:o===null||o===void 0?void 0:o.isVirtualized;let x=(0,u.mp)();let w=(0,u.mp)();let S={role:"option","aria-disabled":a||undefined,"aria-selected":t.selectionManager.selectionMode!=="none"?s:undefined};if(!((0,u.V5)()&&(0,u.Pf)())){S["aria-label"]=e["aria-label"];S["aria-labelledby"]=x;S["aria-describedby"]=w}if(b){var k;let e=Number((k=t.collection.getItem(r))===null||k===void 0?void 0:k.index);S["aria-posinset"]=Number.isNaN(e)?undefined:e+1;S["aria-setsize"]=(0,ed)(t.collection)}let{itemProps:T,isPressed:E,isFocused:C,hasAction:j,allowsSelection:I}=(0,z)({selectionManager:t.selectionManager,key:r,ref:n,shouldSelectOnPressUp:h,allowsDifferentPressOrigin:h&&g,isVirtualized:b,shouldUseVirtualFocus:v,isDisabled:a,onAction:(o===null||o===void 0?void 0:o.onAction)?()=>{var e;return o===null||o===void 0?void 0:(e=o.onAction)===null||e===void 0?void 0:e.call(o,r)}:undefined});let{hoverProps:D}=(0,c.XI)({isDisabled:a||!g,onHoverStart(){if(!(0,c.E)()){t.selectionManager.setFocused(true);t.selectionManager.setFocusedKey(r)}}});return{optionProps:{...S,...(0,u.dG)(T,D),id:(0,ep)(t,r)},labelProps:{id:x},descriptionProps:{id:w},isFocused:C,isFocusVisible:C&&(0,c.E)(),isSelected:s,isDisabled:a,isPressed:E,allowsSelection:I,hasAction:j}}function ev(e){let{heading:t,"aria-label":n}=e;let r=(0,u.Me)();return{itemProps:{role:"presentation"},headingProps:t?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":t?r:undefined}}};function ey(e,t,n){let[r,i]=(0,o.useState)(e||t);let a=(0,o.useRef)(e!==undefined);let l=e!==undefined;(0,o.useEffect)(()=>{let e=a.current;if(e!==l)console.warn(`WARN: A component changed from ${e?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`);a.current=l},[l]);let s=l?e:r;let u=(0,o.useCallback)((e,...t)=>{let r=(e,...t)=>{if(n){if(!Object.is(s,e))n(e,...t)}if(!l)s=e};if(typeof e==="function"){console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320");let n=(n,...o)=>{let i=e(l?s:n,...o);r(i,...t);if(!l)return i;return n};i(n)}else{if(!l)i(e);r(e,...t)}},[l,s,n]);return[s,u]}function eb(e,t=-Infinity,n=Infinity){let r=Math.min(Math.max(e,t),n);return r}function ex(e,t,n,r){let o=(e-(isNaN(t)?0:t))%r;let i=Math.abs(o)*2>=r?e+Math.sign(o)*(r-Math.abs(o)):e-o;if(!isNaN(t)){if(i<t)i=t;else if(!isNaN(n)&&i>n)i=t+Math.floor((n-t)/r)*r}else if(!isNaN(n)&&i>n)i=Math.floor(n/r)*r;let a=r.toString();let l=a.indexOf(".");let s=l>=0?a.length-l:0;if(s>0){let e=Math.pow(10,s);i=Math.round(i*e)/e}return i}function ew(e,t,n=10){const r=Math.pow(n,t);return Math.round(e*r)/r};class eS extends Set{constructor(e,t,n){super(e);if(e instanceof eS){this.anchorKey=t||e.anchorKey;this.currentKey=n||e.currentKey}else{this.anchorKey=t;this.currentKey=n}}}function ek(e,t){if(e.size!==t.size)return false;for(let n of e){if(!t.has(n))return false}return true}function eT(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:a="all"}=e;let l=(0,o.useRef)(false);let[,s]=(0,o.useState)(false);let u=(0,o.useRef)(null);let c=(0,o.useRef)(null);let[,f]=(0,o.useState)(null);let h=(0,o.useMemo)(()=>eE(e.selectedKeys),[e.selectedKeys]);let p=(0,o.useMemo)(()=>eE(e.defaultSelectedKeys,new(0,eS)),[e.defaultSelectedKeys]);let[g,m]=(0,ey)(h,p,e.onSelectionChange);let v=(0,o.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]);let[y,b]=(0,o.useState)(i);if(i==="replace"&&y==="toggle"&&typeof g==="object"&&g.size===0)b("replace");let x=(0,o.useRef)(i);(0,o.useEffect)(()=>{if(i!==x.current){b(i);x.current=i}},[i]);return{selectionMode:t,disallowEmptySelection:n,selectionBehavior:y,setSelectionBehavior:b,get isFocused(){return l.current},setFocused(e){l.current=e;s(e)},get focusedKey(){return u.current},get childFocusStrategy(){return c.current},setFocusedKey(e,t="first"){u.current=e;c.current=t;f(e)},selectedKeys:g,setSelectedKeys(e){if(r||!ek(e,g))m(e)},disabledKeys:v,disabledBehavior:a}}function eE(e,t){if(!e)return t;return e==="all"?"all":new(0,eS)(e)}class eC{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){if(e==null||this.collection.getItem(e))this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return false;e=this.getKey(e);return this.state.selectedKeys==="all"?this.canSelectItem(e):this.state.selectedKeys.has(e)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return false;if(this.state.selectedKeys==="all")return true;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys();let t=this.state.selectedKeys;this._isSelectAll=e.every(e=>t.has(e));return this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);if(!e||n&&(0,es)(this.collection,n,e)<0)e=n}return e===null||e===void 0?void 0:e.key}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);if(!e||n&&(0,es)(this.collection,n,e)>0)e=n}return e===null||e===void 0?void 0:e.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}e=this.getKey(e);let t;if(this.state.selectedKeys==="all")t=new(0,eS)([e],e,e);else{let n=this.state.selectedKeys;let r=n.anchorKey||e;t=new(0,eS)(n,r,e);for(let o of this.getKeyRange(r,n.currentKey||e))t.delete(o);for(let n of this.getKeyRange(e,r))if(this.canSelectItem(n))t.add(n)}this.state.setSelectedKeys(t)}getKeyRange(e,t){let n=this.collection.getItem(e);let r=this.collection.getItem(t);if(n&&r){if((0,es)(this.collection,n,r)<=0)return this.getKeyRangeInternal(e,t);return this.getKeyRangeInternal(t,e)}return[]}getKeyRangeInternal(e,t){let n=[];let r=e;while(r){let e=this.collection.getItem(r);if(e&&e.type==="item"||e.type==="cell"&&this.allowsCellSelection)n.push(r);if(r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t)return e;if(t.type==="cell"&&this.allowsCellSelection)return e;while(t.type!=="item"&&t.parentKey!=null)t=this.collection.getItem(t.parentKey);if(!t||t.type!=="item")return null;return t.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}e=this.getKey(e);if(e==null)return;let t=new(0,eS)(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);if(t.has(e))t.delete(e);else if(this.canSelectItem(e)){t.add(e);t.anchorKey=e;t.currentKey=e}if(this.disallowEmptySelection&&t.size===0)return;this.state.setSelectedKeys(t)}replaceSelection(e){if(this.selectionMode==="none")return;e=this.getKey(e);if(e==null)return;let t=this.canSelectItem(e)?new(0,eS)([e],e,e):new(0,eS);this.state.setSelectedKeys(t)}setSelectedKeys(e){if(this.selectionMode==="none")return;let t=new(0,eS);for(let n of e){n=this.getKey(n);if(n!=null){t.add(n);if(this.selectionMode==="single")break}}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[];let t=n=>{while(n){if(this.canSelectItem(n)){let r=this.collection.getItem(n);if(r.type==="item")e.push(n);if(r.hasChildNodes&&(this.allowsCellSelection||r.type!=="item"))t((0,ei)((0,eo)(r,this.collection)).key)}n=this.collection.getKeyAfter(n)}};t(this.collection.getFirstKey());return e}selectAll(){if(!this.isSelectAll&&this.selectionMode==="multiple")this.state.setSelectedKeys("all")}clearSelection(){if(!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0))this.state.setSelectedKeys(new(0,eS))}toggleSelectAll(){if(this.isSelectAll)this.clearSelection();else this.selectAll()}select(e,t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){if(this.isSelected(e)&&!this.disallowEmptySelection)this.toggleSelection(e);else this.replaceSelection(e)}else if(this.selectionBehavior==="toggle"||t&&(t.pointerType==="touch"||t.pointerType==="virtual"))this.toggleSelection(e);else this.replaceSelection(e)}isSelectionEqual(e){if(e===this.state.selectedKeys)return true;let t=this.selectedKeys;if(e.size!==t.size)return false;for(let n of e){if(!t.has(n))return false}for(let n of t){if(!e.has(n))return false}return true}canSelectItem(e){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return false;let t=this.collection.getItem(e);if(!t||t.type==="cell"&&!this.allowsCellSelection)return false;return true}isDisabled(e){return this.state.disabledKeys.has(e)&&this.state.disabledBehavior==="all"}constructor(e,t,n){this.collection=e;this.state=t;var r;this.allowsCellSelection=(r=n===null||n===void 0?void 0:n.allowsCellSelection)!==null&&r!==void 0?r:false;this._isSelectAll=null}};class ej{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){let t=this.keyMap.get(e);return(t===null||t===void 0?void 0:t.childNodes)||[]}constructor(e){this.keyMap=new Map;this.iterable=e;let t=e=>{this.keyMap.set(e.key,e);if(e.childNodes&&e.type==="section")for(let n of e.childNodes)t(n)};for(let n of e)t(n);let n;let r=0;for(let[e,t]of this.keyMap){if(n){n.nextKey=e;t.prevKey=n.key}else{this.firstKey=e;t.prevKey=undefined}if(t.type==="item")t.index=r++;n=t;n.nextKey=undefined}this.lastKey=n===null||n===void 0?void 0:n.key}}function eI(e){let{filter:t}=e;let n=(0,eT)(e);let r=(0,o.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]);let i=(0,o.useCallback)(e=>t?new(0,ej)(t(e)):new(0,ej)(e),[t]);let a=(0,o.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]);let l=(0,er)(e,i,a);let s=(0,o.useMemo)(()=>new(0,eC)(l,n),[l,n]);const u=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(n.focusedKey!=null&&!l.getItem(n.focusedKey)){const e=u.current.getItem(n.focusedKey);const t=[...u.current.getKeys()].map(e=>{const t=u.current.getItem(e);return t.type==="item"?t:null}).filter(e=>e!==null);const r=[...l.getKeys()].map(e=>{const t=l.getItem(e);return t.type==="item"?t:null}).filter(e=>e!==null);const o=t.length-r.length;let i=Math.min(o>1?Math.max(e.index-o+1,0):e.index,r.length-1);let a;while(i>=0){if(!s.isDisabled(r[i].key)){a=r[i];break}if(i<r.length-1)i++;else{if(i>e.index)i=e.index;i--}}n.setFocusedKey(a?a.key:null)}u.current=l},[l,s,n,n.focusedKey]);return{collection:l,disabledKeys:r,selectionManager:s}}function eD(e){var t;let[n,r]=(0,$58Phs$useControlledState)(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange);let o=(0,$58Phs$useMemo)(()=>n!=null?[n]:[],[n]);let{collection:i,disabledKeys:a,selectionManager:l}=(0,eI)({...e,selectionMode:"single",disallowEmptySelection:true,allowDuplicateSelectionEvents:true,selectedKeys:o,onSelectionChange:t=>{let o=t.values().next().value;if(o===n&&e.onSelectionChange)e.onSelectionChange(o);r(o)}});let s=n!=null?i.getItem(n):null;return{collection:i,disabledKeys:a,selectionManager:l,selectedKey:n,setSelectedKey:r,selectedItem:s}}var eP=n(79982);var eO=n(41071);var eM=n(8780);var e_=n(25432);var eR=n(99818);var eA=n(99024);var eN=n(10959);var eZ=n(84094);var eL=n(73416);var eB=n(11504);var eF=n(76804);var eW=n(89362);var eU=n(1447);var ez=n(9579);var eH=n(76926);var eK=n(68587);var e$=n(74436);const eV=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m6 2 2-2h4l2 2h4v2H2V2h4zM3 6h14l-1 14H4L3 6zm5 2v10h1V8H8zm3 0v10h1V8h-1z",fill:"currentColor"})});var eq=eV;var eY=n(15741);var eG=n(7269);const eQ=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{d:"M20 11.491a1 1 0 0 0-1 1v8.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-17a1 1 0 0 1 1-1h10a1 1 0 0 0 0-2H3a3 3 0 0 0-3 3v17a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3v-8.5a1 1 0 0 0-1-1Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M18.818 3.051a.516.516 0 0 0-.707 0L10.3 10.865a.5.5 0 0 0-.111.168l-1.416 3.535a.5.5 0 0 0 .111.539.519.519 0 0 0 .539.11l3.535-1.417a.5.5 0 0 0 .168-.111L20.94 5.88a.5.5 0 0 0 0-.707ZM23.415.577a2.047 2.047 0 0 0-2.828 0l-1.061 1.06a.5.5 0 0 0 0 .707l2.12 2.121a.5.5 0 0 0 .707 0l1.061-1.06a2 2 0 0 0 0-2.828Z",fill:"currentColor"})]});var eX=eQ;var eJ=n(45492);var e0=n(56816);var e1=n(77644);var e2=n(42308);var e4=n(24307);function e5(e){const{value:t}=e;return t}class e3 extends o.PureComponent{static getDerivedStateFromProps(e,t){return{editing:t.text!==""||t.editing}}constructor(e){super(e);this.backgroundValue=0;this.id=Math.random().toString().slice(0,5);this.state={editing:false,text:"",value:0}}componentDidMount(){if(this.props.focused){this.focus()}}componentWillUnmount(){if(this.removeListeners){this.removeListeners()}}componentDidUpdate(e,t){if(!e.focused&&this.props.focused){this.focus()}if(e.value!==this.props.value){this.setState({editing:false,text:"",...this.getInitialValue()})}}parseText(){return(0,eW.sD)(this.state.text.replace(/[,.]/,(0,eW.ff)().separator))}onKeyPress=e=>{if(e.nativeEvent.key==="Backspace"&&this.state.text===""){this.setState({editing:true})}};getInitialValue(){return{value:Math.abs(this.props.value)}}focus(){this.input.focus();const e=this.getInitialValue();this.setState(e)}applyText=()=>{const{editing:e}=this.state;const t=this.parseText();const n=e?t:e5(this.state);this.setState({value:Math.abs(n),editing:false,text:""});return n};onBlur=()=>{const e=this.applyText();this.props.onBlur?.(e);if(this.removeListeners){this.removeListeners()}};onChangeText=e=>{let{onChange:t}=this.props;this.setState({text:e});t(e)};render(){const{style:e,textStyle:t}=this.props;const{editing:n,value:o,text:i}=this.state;let a=(0,r.jsx)("input",{type:"text",ref:e=>this.input=e,value:i,inputMode:"decimal",autoCapitalize:"none",onChange:e=>this.onChangeText(e.target.value),onBlur:this.onBlur,onKeyPress:this.onKeyPress,"data-testid":"amount-input",style:{flex:1,textAlign:"center",position:"absolute"}});return(0,r.jsxs)(e4.Z,{style:{justifyContent:"center",borderWidth:1,borderColor:eJ.rS.pillBorderSelected,borderRadius:4,padding:5,backgroundColor:"white",...e},children:[(0,r.jsx)(e4.Z,{style:{overflowY:"auto"},children:a}),(0,r.jsx)(e1.Z,{style:t,"data-testid":"amount-fake-input",pointerEvents:"none",children:n?i:(0,eW.eY)(o)})]})}}class e7 extends o.PureComponent{state={focused:false,isNegative:true};componentDidMount(){if(this.props.sign){this.setState({isNegative:this.props.sign==="negative"})}else if(this.props.value>0||!this.props.zeroIsNegative&&this.props.value===0){this.setState({isNegative:false})}}focus=()=>{this.setState({focused:true})};onFocus=()=>{this.focus()};toggleIsNegative=()=>{this.setState({isNegative:!this.state.isNegative},()=>{this.onBlur(this.props.value)})};maybeApplyNegative=e=>{const t=Math.abs(e);return this.state.isNegative?-t:t};onBlur=e=>{this.setState({focused:false,reallyFocused:false});this.props.onBlur?.(this.maybeApplyNegative(e))};onChange=e=>this.props.onChange?.(this.maybeApplyNegative(e));render(){const{textStyle:e,style:t,focusedStyle:n,buttonProps:o}=this.props;const{focused:i}=this.state;return(0,r.jsxs)(e4.Z,{children:[(0,r.jsx)(e3,{...this.props,ref:e=>this.amount=e,onChange:this.onChange,onBlur:this.onBlur,focused:i,style:{width:80,transform:[{translateX:6}],justifyContent:"center",...t,...n,...!i&&{opacity:0,position:"absolute",top:0}},textStyle:{fontSize:15,textAlign:"right",...e}}),(0,r.jsxs)(e4.Z,{children:[!i&&(0,r.jsx)(e0.Z,{style:{position:"absolute",right:"calc(100% + 5px)",top:"8px"},onClick:this.toggleIsNegative,children:this.state.isNegative?"−":"+"}),(0,r.jsx)(e0.Z,{onClick:this.onFocus,...o,style:{...o&&o.style,...i&&{display:"none"},":hover":{backgroundColor:"transparent"}},type:"bare",children:(0,r.jsx)(e4.Z,{style:{borderBottomWidth:1,borderColor:"#e0e0e0",justifyContent:"center",transform:[{translateY:.5}],...t},children:(0,r.jsx)(e1.Z,{style:{fontSize:15,userSelect:"none",...e},children:(0,eW.eY)(Math.abs(this.props.value))})})})]})]})}}var e6=n(383);const e8=40;function e9({title:e,flush:t,style:n}){return(0,r.jsx)(e1.Z,{style:{marginBottom:5,marginTop:t?0:25,fontSize:13,color:eJ.rS.tableRowHeaderText,paddingLeft:eJ.W2.mobileEditingPadding,textTransform:"uppercase",userSelect:"none",...n},children:e})}const te={borderWidth:1,borderColor:eJ.rS.formInputBorder,marginLeft:-1,marginRight:-1,height:e8,paddingHorizontal:eJ.W2.mobileEditingPadding};const tt=(0,o.forwardRef)(function e({disabled:e,style:t,onUpdate:n,...o},i){return(0,r.jsx)(e6.ZP,{ref:i,autoCorrect:"false",autoCapitalize:"none",disabled:e,onBlur:e=>{n?.(e.target.value)},style:{...te,...t,backgroundColor:e?eJ.rS.formInputTextReadOnlySelection:"white"},...o})});function tn({value:e,children:t,disabled:n,rightContent:o,style:i,textStyle:a,onClick:l,...s}){return(0,r.jsxs)(e0.Z,{as:e4.Z,onClick:!n?l:undefined,style:{flexDirection:"row",alignItems:"center",...i,...te,backgroundColor:"white",...n&&{backgroundColor:eJ.rS.formInputTextReadOnlySelection}},bounce:false,activeStyle:{opacity:.5,boxShadow:"none"},hoveredStyle:{boxShadow:"none"},...s,children:[t?t:(0,r.jsx)(e1.Z,{style:{flex:1,userSelect:"none",...a},children:e}),!n&&o]})}function tr({checked:e,onUpdate:t,style:n}){return(0,r.jsx)("input",{type:"checkbox",checked:e,onChange:e=>t(e.target.checked),className:`${(0,eR.iv)([{marginInline:eJ.W2.mobileEditingPadding},n])}`})};const to={SECTION_HEADING:10};let ti=(0,eA.Z)(e=>(0,eW.ZZ)(e));let ta=(0,eA.Z)(e=>(0,eW.ZZ)(e));function tl(e,t,n){let{amount:r}=e;if(n){return`Transfer ${r>0?"from":"to"} ${n.name}`}else if(t){return t.name}return""}function ts(e,t){let{date:n,amount:r}=e;return{...e,date:(0,eP.Z)((0,eO.Z)(n),t),amount:(0,eW.Bf)(r||0)}}function tu(e,t,n){let{amount:r,date:o,...i}=e;let a=eL.Ze(n);if(a.test(o)){let e=(0,eM.Z)(o,eL.D1(n),new Date);if((0,e_.Z)(e)){o=eL.is(e)}else{o=null}}else{let e=(0,eM.Z)(o,n,new Date);if(e.getFullYear()>2e3&&(0,e_.Z)(e)){o=eL.is(e)}else{o=null}}if(o==null){o=t&&t.date||eL.PR()}return{...i,date:o,amount:(0,eW.l9)(r||0)}}function tc(e,t){return e.find(e=>e.id===t).name}function td({date:e}){return _jsx(tE,{style:{height:25,backgroundColor:theme.mobileDateBackground,borderColor:theme.tableBorder,justifyContent:"center"},children:_jsx(Text,{style:{...styles.text,fontSize:13,color:theme.alt2TableText},children:monthUtils.format(e,"MMMM dd, yyyy")})})}function tf({status:e}){let t;switch(e){case"missed":t=eJ.rS.alt3ErrorText;break;case"due":t=eJ.rS.alt2WarningText;break;case"upcoming":t=eJ.rS.alt2TableText;break;default:}return(0,r.jsx)(e1.Z,{style:{fontSize:11,color:t,fontStyle:"italic",textAlign:"left"},children:(0,eW.VL)(e)})}const th=70;class tp extends o.PureComponent{constructor(e){super(e);this.state={transactions:e.transactions,editingChild:null}}serializeTransactions=(0,eA.Z)(e=>{return e.map(e=>ts(e,this.props.dateFormat))});componentDidMount(){if(this.props.adding){this.amount.focus()}}componentWillUnmount(){document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")}openChildEdit=e=>{this.setState({editingChild:e.id})};onAdd=()=>{this.onSave()};onSave=async()=>{let{transactions:e}=this.state;const[t,...n]=e;const{account:r}=t;let o=ta(this.props.accounts)[r];if(e.find(e=>e.account==null)){return}if(this._queuedChange){let[t,n,r]=this._queuedChange;e=await this.onEdit(t,n,r)}if(this.props.adding){e=(0,eF.V6)(e)}this.props.onSave(e);this.props.navigate(`/accounts/${o.id}`,{replace:true})};onSaveChild=e=>{this.setState({editingChild:null})};onEdit=async(e,t,n)=>{let{transactions:r}=this.state;let o={...e,[t]:n};if(this.props.onEdit){o=await this.props.onEdit(o)}let{data:i}=(0,eF.Ld)(r,tu(o,null,this.props.dateFormat));this._queuedChange=null;this.setState({transactions:i});return i};onQueueChange=(e,t,n)=>{this._queuedChange=[e,t,n]};onClick=(e,t)=>{let{dateFormat:n}=this.props;this.props.pushModal("edit-field",{name:t,onSubmit:(t,r)=>{let{transactions:o}=this.state;let i=o.find(t=>t.id===e);this.onEdit(ts(i,n),t,r)}})};onDelete=()=>{this.props.onDelete();const{transactions:e}=this.state;const[t,...n]=e;const{account:r}=t;if(r){this.props.navigate(`/accounts/${r}`,{replace:true})}else{this.props.navigate(-1)}};render(){const{adding:e,categories:t,accounts:n,payees:o,renderChildEdit:i,navigate:l}=this.props;const{editingChild:s}=this.state;const u=this.serializeTransactions(this.state.transactions||[]);const[c,...f]=u;const{payee:h,category:p,account:g}=c;let m=c.amount<0?"negative":"positive";let v=ta(n)[g];let y=o&&h&&ti(o)[h];let b=y&&y.transfer_acct&&ta(n)[y.transfer_acct];let x=tl(c,y,b);const w=(0,eM.Z)(c.date,this.props.dateFormat,new Date);const S=eL.is(w);return(0,r.jsx)(e4.Z,{style:{margin:10,marginTop:3,backgroundColor:eJ.rS.tableHeaderBackground,flex:1,borderRadius:4,shadowColor:eJ.rS.cardShadow,shadowOffset:{width:0,height:0},shadowRadius:4,shadowOpacity:1},children:(0,r.jsxs)(e4.Z,{style:{borderRadius:4,overflow:"hidden",display:"flex",flex:"auto"},children:[(0,r.jsxs)(e4.Z,{style:{borderBottomWidth:1,borderColor:eJ.rS.tableBorder,backgroundColor:eJ.rS.tableBackground,alignItems:"center",flexDirection:"row",flexShrink:0,justifyContent:"space-between",width:"100%",padding:10},children:[(0,r.jsxs)(a.rU,{to:-1,style:{alignItems:"center",display:"flex",textDecoration:"none",width:th},children:[(0,r.jsx)(e$.Z,{style:{color:eJ.rS.formLabelText,width:32,height:32}}),(0,r.jsx)(e1.Z,{style:{...eJ.W2.text,color:eJ.rS.formLabelText,fontWeight:500},children:"Back"})]}),(0,r.jsx)(e2.Z,{style:{color:eJ.rS.formInputText,fontSize:15,fontWeight:600,userSelect:"none"},role:"heading",children:h==null?e?"New Transaction":"Transaction":x}),(0,r.jsx)(e4.Z,{style:{width:th}})]}),(0,r.jsxs)(e4.Z,{style:{overflowY:"auto",overflowX:"hidden",display:"block"},children:[(0,r.jsxs)(e4.Z,{style:{alignItems:"center",marginTop:20},children:[(0,r.jsx)(e9,{title:"Amount",flush:true,style:{marginBottom:0,paddingLeft:0}}),(0,r.jsx)(e7,{ref:e=>this.amount=e,value:c.amount,zeroIsNegative:true,onBlur:e=>this.onEdit(c,"amount",e.toString()),onChange:e=>this.onQueueChange(c,"amount",e),style:{transform:[]},focusedStyle:{width:"auto",padding:"5px",paddingLeft:"20px",paddingRight:"20px",minWidth:120,transform:[{translateY:-.5}]},textStyle:{fontSize:30,textAlign:"center"}})]}),(0,r.jsxs)(e4.Z,{children:[(0,r.jsx)(e9,{title:"Payee"}),(0,r.jsx)(tn,{value:x,onClick:()=>this.onClick(c.id,"payee"),"data-testid":"payee-field"})]}),(0,r.jsxs)(e4.Z,{children:[(0,r.jsx)(e9,{title:c.is_parent?"Categories (split)":"Category"}),!c.is_parent?(0,r.jsx)(tn,{value:p?tc(t,p):null,disabled:v&&!!v.offbudget||b,onClick:()=>this.onClick(c.id,"category"),"data-testid":"category-field"}):(0,r.jsx)(e1.Z,{style:{paddingLeft:eJ.W2.mobileEditingPadding},children:"Split transaction editing is not supported on mobile at this time."})]}),(0,r.jsxs)(e4.Z,{children:[(0,r.jsx)(e9,{title:"Account"}),(0,r.jsx)(tn,{disabled:!e,value:v?v.name:null,onClick:()=>this.onClick(c.id,"account"),"data-testid":"account-field"})]}),(0,r.jsxs)(e4.Z,{style:{flexDirection:"row"},children:[(0,r.jsxs)(e4.Z,{style:{flex:1},children:[(0,r.jsx)(e9,{title:"Date"}),(0,r.jsx)(tt,{type:"date",required:true,style:{color:"canvastext",minWidth:"150px"},defaultValue:S,onUpdate:e=>this.onEdit(c,"date",(0,eP.Z)((0,eO.Z)(e),this.props.dateFormat)),onChange:e=>this.onQueueChange(c,"date",(0,eP.Z)((0,eO.Z)(e.target.value),this.props.dateFormat))})]}),(0,r.jsxs)(e4.Z,{style:{marginLeft:35,marginRight:35},children:[(0,r.jsx)(e9,{title:"Cleared"}),(0,r.jsx)(tr,{checked:c.cleared,onUpdate:e=>this.onEdit(c,"cleared",e),style:{marginTop:4}})]})]}),(0,r.jsxs)(e4.Z,{children:[(0,r.jsx)(e9,{title:"Notes"}),(0,r.jsx)(tt,{defaultValue:c.notes,onUpdate:e=>this.onEdit(c,"notes",e),onChange:e=>this.onQueueChange(c,"notes",e.target.value)})]}),!e&&(0,r.jsx)(e4.Z,{style:{alignItems:"center"},children:(0,r.jsxs)(e0.Z,{onClick:()=>this.onDelete(),style:{borderWidth:0,paddingVertical:5,marginLeft:eJ.W2.mobileEditingPadding,marginRight:eJ.W2.mobileEditingPadding,marginTop:20,marginBottom:15,backgroundColor:"transparent"},type:"bare",children:[(0,r.jsx)(eq,{width:17,height:17,style:{color:eJ.rS.errorText}}),(0,r.jsx)(e1.Z,{style:{color:eJ.rS.errorText,marginLeft:5,userSelect:"none"},children:"Delete transaction"})]})})]}),(0,r.jsx)(e4.Z,{style:{paddingLeft:eJ.W2.mobileEditingPadding,paddingRight:eJ.W2.mobileEditingPadding,paddingTop:15,paddingBottom:15,backgroundColor:eJ.rS.tableHeaderBackground,borderTopWidth:1,borderColor:eJ.rS.tableBorder,marginTop:"auto",flexShrink:0},children:e?(0,r.jsxs)(e0.Z,{onClick:()=>this.onAdd(),children:[(0,r.jsx)(eK.Z,{width:17,height:17,style:{color:eJ.rS.altFormLabelText}}),(0,r.jsx)(e1.Z,{style:{...eJ.W2.text,color:eJ.rS.altFormLabelText,marginLeft:5},children:"Add transaction"})]}):(0,r.jsxs)(e0.Z,{onClick:()=>this.onSave(),children:[(0,r.jsx)(eX,{style:{width:16,height:16,color:eJ.rS.formInputText}}),(0,r.jsx)(e1.Z,{style:{...eJ.W2.text,marginLeft:6,color:eJ.rS.formInputText},children:"Save changes"})]})}),i({transaction:s&&u.find(e=>e.id===s),amountSign:m,getCategoryName:e=>e?tc(t,e):null,navigate:l,onEdit:this.onEdit,onStartClose:this.onSaveChild})]})})}}function tg(e){return e.id.indexOf("temp")===0}function tm(e,t){return[{id:"temp",date:t||eL.PR(),account:e,amount:0,cleared:false}]}function tv(e){const{categories:t,accounts:n,payees:i,lastTransaction:a,dateFormat:s}=e;let{id:u,transactionId:c}=(0,l.UO)();let f=(0,l.s0)();let[h,p]=(0,o.useState)(null);let g=[];let m=false;let v=false;(0,eH.j)(eJ.rS.mobileTransactionViewTheme);(0,o.useEffect)(()=>{e.getCategories();e.getAccounts();e.getPayees();async function t(){let e=[];if(c){let{data:t}=await (0,eN.Vn)((0,eN.ZP)("transactions").filter({id:c}).select("*").options({splits:"grouped"}));e=(0,eF.Xt)(t);p(e)}}t()},[c]);if(t.length===0||n.length===0||c&&!h){return null}if(!c){g=tm(u||a&&a.account||null,a&&a.date);m=true}else{g=h}const y=async e=>{if(tg(e)){let t=await (0,eZ.lW)("rules-run",{transaction:e});let n=(0,eW.k4)(e,t);let r={...e};if(n){Object.keys(n).forEach(e=>{if(r[e]==null){r[e]=n[e]}})}return r}return e};const b=async t=>{if(v){return}const n=(0,eW.Th)(g||[],t);if(n.added.length>0||n.updated.length>0||n.deleted.length){const e=await (0,eZ.lW)("transactions-batch-update",{added:n.added,deleted:n.deleted,updated:n.updated})}if(m){e.setLastTransaction(t[0])}};const x=async()=>{if(m){v=true}else{const e={deleted:g};const t=await (0,eZ.lW)("transactions-batch-update",e)}};return(0,r.jsx)(e4.Z,{style:{flex:1,backgroundColor:eJ.rS.buttonPrimaryBackground},children:(0,r.jsx)(tp,{transactions:g,adding:m,categories:t,accounts:n,payees:i,pushModal:e.pushModal,navigate:f,renderChildEdit:e=>{},dateFormat:s,onEdit:y,onSave:b,onDelete:x})})}const ty=e=>{const{list:t}=(0,ez.Z)();const n=(0,i.v9)(e=>e.queries.payees);const o=(0,i.v9)(e=>e.queries.lastTransaction);const a=(0,i.v9)(e=>e.queries.accounts);const l=(0,i.v9)(e=>e.prefs.local.dateFormat||"MM/dd/yyyy");const s=(0,eU.o)();return(0,r.jsx)(tv,{...e,...s,categories:t,payees:n,lastTransaction:o,accounts:a,dateFormat:l})};class tb extends o.PureComponent{render(){const{transaction:e,accounts:t,categories:n,payees:o,showCategory:i,added:a,onSelect:l,style:s}=this.props;let{id:u,payee:c,amount:f,category:h,cleared:p,is_parent:g,notes:m,schedule:v}=e;if((0,eF.J4)(u)){f=(0,eB.lP)(f)}let y=h?tc(n,h):null;let b=o&&c&&ti(o)[c];let x=b&&b.transfer_acct&&ta(t)[b.transfer_acct];let w=tl(e,b,x);let S=x?"Transfer":g?"Split":y;let k=(0,eF.J4)(u);let T=k&&{fontStyle:"italic",color:eJ.rS.altpageTextSubdued};return(0,r.jsx)(e0.Z,{onClick:()=>l(e),style:{backgroundColor:"white",border:"none",width:"100%"},children:(0,r.jsxs)(tE,{style:{flex:1,height:60,padding:"5px 10px",...k&&{backgroundColor:eJ.rS.tableRowHeaderBackground},...s},children:[(0,r.jsxs)(e4.Z,{style:{flex:1},children:[(0,r.jsxs)(e4.Z,{style:{flexDirection:"row",alignItems:"center"},children:[v&&(0,r.jsx)(eY.Z,{style:{width:12,height:12,marginRight:5,color:T.color||eJ.rS.menuItemText}}),(0,r.jsx)(e2.Z,{style:{...eJ.W2.text,...T,fontSize:14,fontWeight:a?"600":"400",...w===""&&{color:eJ.rS.altTableText,fontStyle:"italic"}},children:w||"Empty"})]}),k?(0,r.jsx)(tf,{status:m}):(0,r.jsxs)(e4.Z,{style:{flexDirection:"row",alignItems:"center",marginTop:3},children:[(0,r.jsx)(eG.Z,{style:{width:11,height:11,color:p?eJ.rS.noticeText:eJ.rS.altButtonBareText,marginRight:5}}),i&&(0,r.jsx)(e2.Z,{style:{fontSize:11,marginTop:1,fontWeight:"400",color:S?eJ.rS.tableTextSelected:eJ.rS.altMenuItemTextSelected,fontStyle:S?null:"italic",textAlign:"left"},children:S||"Uncategorized"})]})]}),(0,r.jsx)(e1.Z,{style:{...eJ.W2.text,...T,marginLeft:25,marginRight:5,fontSize:14},children:(0,eW.zA)(f)})]})})}}class tx extends o.Component{makeData=(0,eA.Z)(e=>{const t=[];e.forEach(e=>{if(t.length===0||e.date!==t[t.length-1].date){let n=t[t.length-1];if(n&&n.data.length>0){let e=n.data;e[e.length-1].isLast=true}t.push({id:`${(0,eF.J4)(e.id)?"preview/":""}${e.date}`,date:e.date,data:[]})}if(!e.is_child){t[t.length-1].data.push(e)}});return t});render(){const{transactions:e,scrollProps:t={},onLoadMore:n}=this.props;const o=this.makeData(e);return(0,r.jsxs)(r.Fragment,{children:[t.ListHeaderComponent,(0,r.jsxs)(tw,{...t,"aria-label":"transaction list",label:"",loadMore:n,selectionMode:"none",children:[o.length===0?(0,r.jsx)(X,{children:(0,r.jsx)(G,{textValue:"No transactions",children:(0,r.jsx)("div",{style:{display:"flex",justifyContent:"center",width:"100%"},children:(0,r.jsx)(e1.Z,{style:{fontSize:15},children:"No transactions"})})})}):null,o.map(e=>{return(0,r.jsx)(X,{title:(0,r.jsx)("span",{children:eL.WU(e.date,"MMMM dd, yyyy")}),children:e.data.map((e,t,n)=>{return(0,r.jsx)(G,{style:{fontSize:t===n.length-1?98:"inherit"},textValue:e.id,children:(0,r.jsx)(tb,{transaction:e,categories:this.props.categories,accounts:this.props.accounts,payees:this.props.payees,showCategory:this.props.showCategory,added:this.props.isNew(e.id),onSelect:this.props.onSelect})},e.id)})},e.id)})]})]})}}function tw(e){let t=eI(e);let n=(0,o.useRef)();let{listBoxProps:i,labelProps:a}=eg(e,t,n);(0,o.useEffect)(()=>{function t(){if(Math.abs(n.current.scrollHeight-n.current.clientHeight-n.current.scrollTop)<n.current.clientHeight){e.loadMore()}}n.current.addEventListener("scroll",t);return()=>{n.current?.removeEventListener("scroll",t)}},[t.collection]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{...a,children:e.label}),(0,r.jsx)("ul",{...i,ref:n,style:{padding:0,listStyle:"none",margin:0,width:"100%"},children:[...t.collection].map(e=>(0,r.jsx)(tS,{section:e,state:t},e.key))})]})}function tS({section:e,state:t}){let{itemProps:n,headingProps:o,groupProps:i}=ev({heading:e.rendered,"aria-label":e["aria-label"]});return(0,r.jsxs)("li",{...n,style:{width:"100%"},children:[e.rendered&&(0,r.jsx)("div",{...o,className:`${(0,eR.iv)(eJ.W2.smallText,{backgroundColor:eJ.rS.mobileDateBackground,borderBottom:`1px solid ${eJ.rS.tableBorder}`,borderTop:`1px solid ${eJ.rS.tableBorder}`,color:eJ.rS.alt2TableText,display:"flex",justifyContent:"center",paddingBottom:4,paddingTop:4,position:"sticky",top:"0",width:"100%",zIndex:to.SECTION_HEADING})}`,children:e.rendered}),(0,r.jsx)("ul",{...i,style:{padding:0,listStyle:"none"},children:[...e.childNodes].map((e,n,o)=>(0,r.jsx)(tk,{item:e,state:t,isLast:n===o.length-1},e.key))})]})}function tk({isLast:e,item:t,state:n}){let i=(0,o.useRef)();let{optionProps:a,isSelected:l}=em({key:t.key},n,i);let{isFocusVisible:c,focusProps:f}=(0,s.Fx)();return(0,r.jsx)("li",{...(0,u.dG)(a,f),ref:i,style:{background:l?eJ.rS.tableRowBackgroundHighlight:eJ.rS.tableBackground,color:l?eJ.rS.mobileModalText:null,outline:c?"2px solid orange":"none",...!e&&{borderBottom:`1px solid ${eJ.rS.tableBorder}`}},children:t.rendered})}const tT=50;const tE=(0,o.forwardRef)(({children:e,style:t,...n},o)=>{return(0,r.jsx)(e4.Z,{style:{height:tT,flexDirection:"row",alignItems:"center",paddingLeft:10,paddingRight:10,...t},ref:o,...n,children:e})})},5646:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(25432);var l=n(41071);var s=n(79982);var u=n(18748);var c=n(89362);var f=n(9579);var h=n(11892);var p=n(15741);var g=n(45492);var m=n(40774);var v=n(41547);function y(e,t){let{date:n}=e;if(!(0,a.Z)((0,l.Z)(n))){n=null}return{...e,date:n?(0,s.Z)((0,l.Z)(n),t):null}}const b=(0,o.memo)(function e({transaction:e,fields:t,payees:n,categories:o,accounts:i,selected:a}){let l=(0,u.ch)(o)[e.category];let s=(0,u.gI)(i)[e.account];let f=(0,h.YP)();return(0,r.jsxs)(m.X2,{style:{color:g.rS.tableText},children:[(0,r.jsx)(m._7,{exposed:true,focused:false,onSelect:t=>{f({type:"select",id:e.id,event:t})},selected:a}),t.map((t,n)=>{switch(t){case"date":return(0,r.jsx)(m.gN,{width:100,children:e.date},n);case"imported_payee":return(0,r.jsx)(m.gN,{width:"flex",children:e.imported_payee},n);case"payee":return(0,r.jsx)(m.bL,{width:"flex",exposed:true,style:{flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:()=>(0,r.jsxs)(r.Fragment,{children:[e.schedule&&(0,r.jsx)(p.Z,{style:{width:13,height:13,margin:"0 5px"}}),(0,r.jsx)(v.Z,{type:"payees",id:e.payee})]})},n);case"category":return(0,r.jsx)(m.gN,{width:"flex",title:l&&l.name,children:l?l.name:""},n);case"account":return(0,r.jsx)(m.gN,{width:"flex",title:s.name,children:s.name},n);case"notes":return(0,r.jsx)(m.gN,{width:"flex",title:e.notes,children:e.notes},n);case"amount":return(0,r.jsx)(m.gN,{width:75,style:{textAlign:"right",...g.W2.tnum},children:(0,c.zA)(e.amount)},n);default:return null}})]})});function x({transactions:e,schedules:t,renderEmpty:n,fields:a=["date","payee","amount"],style:l}){let{grouped:s}=(0,f.Z)();let{payees:u,accounts:c,dateFormat:p}=(0,i.v9)(e=>{return{payees:e.queries.payees,accounts:e.queries.accounts,dateFormat:e.prefs.local.dateFormat||"MM/dd/yyyy"}});let g=(0,h.D9)();let v=(0,h.YP)();let x=(0,o.useMemo)(()=>a,[JSON.stringify(a)]);let w=(0,o.useMemo)(()=>{return e.map(e=>y(e,p))},[e]);let S=(0,o.useCallback)(({item:e})=>{return(0,r.jsx)(b,{transaction:e,payees:u,categories:s,accounts:c,fields:x,selected:g&&g.has(e.id)})},[u,s,x,g]);return(0,r.jsx)(m.iA,{style:l,items:w,renderEmpty:n,headers:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m._7,{exposed:true,focused:false,selected:g.size>0,width:20,onSelect:e=>v({type:"select-all",event:e})}),a.map((e,t)=>{switch(e){case"date":return(0,r.jsx)(m.gN,{width:100,children:"Date"},t);case"imported_payee":return(0,r.jsx)(m.gN,{width:"flex",children:"Imported payee"},t);case"payee":return(0,r.jsx)(m.gN,{width:"flex",children:"Payee"},t);case"category":return(0,r.jsx)(m.gN,{width:"flex",children:"Category"},t);case"account":return(0,r.jsx)(m.gN,{width:"flex",children:"Account"},t);case"notes":return(0,r.jsx)(m.gN,{width:"flex",children:"Notes"},t);case"amount":return(0,r.jsx)(m.gN,{width:75,style:{textAlign:"right"},children:"Amount"},t);default:return null}})]}),renderItem:S})}},57023:function(e,t,n){"use strict";n.d(t,{_:function(){return p},I:function(){return g}});var r=n(43188);var o=n(66204);var i=n(89362);var a=n(68587);const l=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 3",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"nonzero",d:"M23 1.5A1.5 1.5 0 0 1 21.5 3h-20a1.5 1.5 0 0 1 0-3h20A1.5 1.5 0 0 1 23 1.5z"})});var s=l;var u=n(45492);var c=n(56816);var f=n(46405);var h=n(24307);function p({id:e,defaultValue:t=0,onChange:n,style:l}){let[u,h]=(0,o.useState)(t<=0);let[p,g]=(0,o.useState)((0,i.zA)(Math.abs(t)));function m(){h(!u);v(!u)}function v(e=u){let t=(0,i.qT)(p);let r=e?t<0?t:-t:t>0?t:-t;n(r)}return(0,r.jsx)(f.Z,{id:e,leftContent:(0,r.jsx)(c.Z,{type:"bare",style:{padding:"0 7px"},onClick:m,children:u?(0,r.jsx)(s,{style:{width:8,height:8,color:"inherit"}}):(0,r.jsx)(a.Z,{style:{width:8,height:8,color:"inherit"}})}),value:p,style:{flex:1,alignItems:"stretch",...l},inputStyle:{paddingLeft:0},onChange:e=>g(e.target.value),onBlur:e=>v()})}function g({defaultValue:e,onChange:t}){let[n,i]=(0,o.useState)(e.num1);let[a,l]=(0,o.useState)(e.num2);return(0,r.jsxs)(h.Z,{style:{flexDirection:"row",alignItems:"center"},children:[(0,r.jsx)(p,{defaultValue:n,onChange:e=>{i(e);t({num1:e,num2:a})},style:{color:u.rS.formInputText}}),(0,r.jsx)(h.Z,{style:{margin:"0 5px"},children:"and"}),(0,r.jsx)(p,{defaultValue:a,onChange:e=>{l(e);t({num1:n,num2:e})},style:{color:u.rS.formInputText}})]})}},41547:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(43188);var o=n(66204);var i=n(99548);var a=n(68761);var l=n(45492);var s=n(77644);function u({type:e,id:t,noneColor:n=l.rS.pageTextSubdued}){let o;switch(e){case"payees":o=a.mp;break;case"accounts":o=i.Re;break;default:throw new Error("DisplayId: unknown object type: "+e)}return(0,r.jsx)(o,{idKey:true,children:e=>{let o=e[t];return(0,r.jsx)(s.Z,{style:o==null?{color:n}:null,title:o?o.name:"None",children:o?o.name:"None"})}})}},54923:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(73416);var l=n(9579);var s=n(6790);var u=n(25411);var c=n(50151);var f=n(31261);var h=n(17853);var p=n(45492);var g=n(24307);function m({items:e,getItemProps:t,highlightedIndex:n,embedded:i}){return(0,r.jsx)(g.Z,{children:(0,r.jsx)(g.Z,{style:{overflow:"auto",padding:"5px 0",...!i&&{maxHeight:175}},children:e.map((e,r)=>{return[(0,o.createElement)("div",{...t?t({item:e}):null,key:e.id,style:{backgroundColor:n===r?p.rS.alt2MenuItemBackgroundHover:"transparent",padding:4,paddingLeft:20,borderRadius:i?4:0},"data-testid":"filter-item"+(n===r?"-highlighted":"")},e.name)]})})})}function v({embedded:e,...t}){let n=(0,h.m)()||[];return(0,r.jsx)(u.ZP,{strict:true,highlightFirst:true,embedded:e,suggestions:n,renderItems:(t,n,o)=>(0,r.jsx)(m,{items:t,getItemProps:n,highlightedIndex:o,embedded:e}),...t})}var y=n(383);var b=n(10730);var x=n(22966);var w=n(14644);function S({field:e,subfield:t,type:n,multi:o,value:h,inputRef:p,style:m,onChange:S}){let{grouped:k}=(0,l.Z)();let T=(0,i.v9)(e=>e.queries.saved);let E=(0,i.v9)(e=>e.prefs.local.dateFormat||"MM/dd/yyyy");if(o&&!Array.isArray(h)){h=[]}else if(!o&&Array.isArray(h)){return null}let C=o?h.length===0:true;let j;switch(n){case"id":switch(e){case"payee":j=(0,r.jsx)(f.Z,{multi:o,showMakeTransfer:false,openOnFocus:true,value:h,onSelect:S,inputProps:{inputRef:p,...C?{placeholder:"nothing"}:null}});break;case"account":j=(0,r.jsx)(s.Z,{value:h,multi:o,openOnFocus:true,onSelect:S,inputProps:{inputRef:p,...C?{placeholder:"nothing"}:null}});break;case"category":j=(0,r.jsx)(c.Z,{categoryGroups:k,value:h,multi:o,openOnFocus:true,onSelect:S,inputProps:{inputRef:p,...C?{placeholder:"nothing"}:null}});break;default:}break;case"saved":switch(e){case"saved":j=(0,r.jsx)(v,{saved:T,value:h,multi:o,openOnFocus:true,onSelect:S,inputProps:{inputRef:p,...C?{placeholder:"nothing"}:null}});break;default:}break;case"date":switch(t){case"month":j=(0,r.jsx)(y.ZP,{inputRef:p,defaultValue:h||"",placeholder:(0,a.LT)(E).toLowerCase(),onEnter:e=>S(e.target.value),onBlur:e=>S(e.target.value)});break;case"year":j=(0,r.jsx)(y.ZP,{inputRef:p,defaultValue:h||"",placeholder:"yyyy",onEnter:e=>S(e.target.value),onBlur:e=>S(e.target.value)});break;default:if(h&&h.frequency){j=(0,r.jsx)(w.Z,{value:h,buttonStyle:{justifyContent:"flex-start"},onChange:S})}else{j=(0,r.jsx)(x.Z,{value:h,dateFormat:E,openOnFocus:false,inputRef:p,inputProps:{placeholder:E.toLowerCase()},onSelect:S})}break}break;case"boolean":j=(0,r.jsx)(b.XZ,{checked:h,value:h,onChange:()=>S(!h)});break;default:if(o){j=(0,r.jsx)(u.ZP,{multi:true,suggestions:[],value:h,inputProps:{inputRef:p},onSelect:S})}else{j=(0,r.jsx)(y.ZP,{inputRef:p,defaultValue:h||"",placeholder:"nothing",onEnter:e=>S(e.target.value),onBlur:e=>S(e.target.value)})}break}return(0,r.jsx)(g.Z,{style:{flex:1,...m},children:j})}},18247:function(e,t,n){"use strict";n.d(t,{F:function(){return i}});var r=n(84094);function o(e,t,{onSuccess:n,onClose:o}){e("gocardless-external-msg",{onMoveExternal:async({institutionId:e})=>{const n=30;const o=await (0,r.lW)("gocardless-create-web-token",{upgradingAccountId:t,institutionId:e,accessValidForDays:n});if(o.error)return o;const{link:i,requisitionId:a}=o;window.Actual.openURLInBrowser(i);let{error:l,data:s}=await (0,r.lW)("gocardless-poll-web-token",{upgradingAccountId:t,requisitionId:a});return{error:l,data:s}},onClose:o,onSuccess:n})}async function i(e,{upgradingAccountId:t}={}){o(e,t,{onSuccess:async n=>{e("select-linked-accounts",{accounts:n.accounts,requisitionId:n.id,upgradingAccountId:t})}})}},1447:function(e,t,n){"use strict";n.d(t,{o:function(){return l}});var r=n(66204);var o=n(37496);var i=n(65485);var a=n(43044);function l(){const e=(0,o.I0)();return(0,r.useMemo)(()=>{return(0,i.DE)(a,e)},[e])}},9579:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(66204);var o=n(37496);var i=n(1447);function a(){const{getCategories:e}=(0,i.o)();const t=(0,o.v9)(e=>e.queries.categories.list);(0,r.useEffect)(()=>{if(t.length===0){e()}},[]);return(0,o.v9)(e=>e.queries.categories)}},58068:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(37496);const o={categorySpendingReport:false,reportBudget:false,goalTemplatesEnabled:false,themes:false,experimentalOfxParser:true};function i(e){return(0,r.v9)(t=>{const n=t.prefs.local[`flags.${e}`];return n===undefined?o[e]||false:n})}},15685:function(e,t,n){"use strict";n.d(t,{r:function(){return o}});var r=n(66204);function o(e,t){return(0,r.useMemo)(()=>{function n(n){[e,t].forEach(e=>{if(typeof e==="function"){e(n)}else if(e!=null){e.current=n}})}return n},[e,t])}},5904:function(e,t,n){"use strict";n.d(t,{M:function(){return s},X:function(){return u}});var r=n(43188);var o=n(66204);function i(e){let t=e;for(let e=0;e<10&&t;e++){let e="dataset"in t?t.dataset?.focusKey:undefined;if(e){return e}t=t.parentNode}return null}function a(e,t){if(t){let n=i(e);e.focus({preventScroll:n&&n===t.keyRef.current});t.onKeyChange(n)}else{e.focus()}if(e instanceof HTMLInputElement){e.setSelectionRange(0,1e4)}}let l=(0,o.createContext)(null);function s({children:e}){let t=(0,o.useRef)(null);let n=(0,o.useMemo)(()=>({keyRef:t,onKeyChange:e=>{t.current=e}}),[t]);return(0,r.jsx)(l.Provider,{value:n,children:e})}function u(e,t){let n=(0,o.useContext)(l);let r=(0,o.useRef)(null);(0,o.useLayoutEffect)(()=>{let o=r.current;let i=e.current;if(i&&t&&(o===null||o===false)){let e="input,button,div[tabindex]";let r=i.matches(e)?i:i.querySelector(e);if(t&&r){a(r,n)}}r.current=t},[t])}},37418:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(66204);function o(e){let t=(0,r.useRef)(null);if(!t.current){t.current=new ResizeObserver(t=>{e(t[0].contentRect)})}let n=(0,r.useCallback)(e=>{t.current.disconnect();if(e){t.current.observe(e,{box:"border-box"})}},[]);return n}},11892:function(e,t,n){"use strict";n.d(t,{D9:function(){return g},YP:function(){return p},ZP:function(){return c},i5:function(){return m},mL:function(){return v}});var r=n(43188);var o=n(66204);var i=n(37496);var a=n(84094);var l=n(57555);var s=n(50102);function u(e,t){let n=Math.min(e.start,e.end);let r=Math.max(e.start,e.end);for(let e=n;e<=r;e++){t(e)}}function c(e,t,n){let[r,s]=(0,o.useReducer)((e,n)=>{switch(n.type){case"select":{let{selectedRange:r}=e;let o=new Set(e.selectedItems);let{id:i,event:a}=n;if(a.shiftKey&&r){let n=t.findIndex(e=>e.id===i);let a=t.findIndex(e=>e.id===r.start);let l=t.findIndex(e=>e.id===r.end);let s;let c;if(l===-1){s={start:a,end:n}}else if(l<a){if(n<=a){s={start:a,end:n};if(n>l){c={start:n-1,end:l}}}else{s={start:l,end:n}}}else{if(n>=a){s={start:a,end:n};if(n<l){c={start:n+1,end:l}}}else{s={start:l,end:n}}}u(s,e=>o.add(t[e].id));if(c){u(c,e=>o.delete(t[e].id))}return{...e,selectedItems:o,selectedRange:{start:t[s.start].id,end:t[s.end].id}}}else{let t=null;if(!o.delete(i)){o.add(i);t={start:i,end:null}}return{...e,selectedItems:o,selectedRange:t}}}case"select-none":return{...e,selectedItems:new Set};case"select-all":return{...e,selectedItems:new Set(n.ids||t.map(e=>e.id)),selectedRange:n.ids&&n.ids.length===1?{start:n.ids[0],end:null}:null};default:throw new Error("Unexpected action: "+JSON.stringify(n))}},null,()=>({selectedItems:new Set(n||[]),selectedRange:n&&n.length===1?{start:n[0],end:null}:null}));let c=(0,o.useRef)(t);(0,o.useEffect)(()=>{if(r.selectedItems.size>0){let e=new Set(t.map(e=>e.id));let n=c.current.length===t.length&&c.current.every(t=>e.has(t.id));if(!n){let t=[...r.selectedItems];let n=t.filter(t=>e.has(t));if(t.length!==n.length){s({type:"select-all",ids:n})}}}c.current=t},[t,r.selectedItems]);(0,o.useEffect)(()=>{let t=l.a2("selectedItems");l.kp("selectedItems",{name:e,items:r.selectedItems});return()=>l.kp("selectedItems",t)},[r.selectedItems]);let f=(0,i.v9)(e=>e.app.lastUndoState);(0,o.useEffect)(()=>{function t({messages:t,undoTag:n}){let r=l.r8(n);let o=new Set(t.filter(e=>e.column==="tombstone"&&e.value===1).map(e=>e.row));if(r?.selectedItems?.name===e){s({type:"select-all",ids:[...r.selectedItems.items].filter(e=>!o.has(e))})}}if(f&&f.current){t(f.current)}return(0,a.oL)("undo-event",t)},[]);return{items:r.selectedItems,dispatch:s}}let f=(0,o.createContext)(null);let h=(0,o.createContext)(null);function p(){return(0,o.useContext)(f)}function g(){return(0,o.useContext)(h)}function m({instance:e,fetchAllIds:t,children:n}){let i=(0,o.useRef)(null);(0,o.useEffect)(()=>{i.current=e.items},[e.items]);let a=(0,o.useCallback)(async n=>{if(!n.event&&(0,s.Ry)()){throw new Error("SelectedDispatch actions must have an event")}if(n.type==="select-all"){if(i.current&&i.current.size>0){return e.dispatch({type:"select-none",event:n.event})}else{if(t){return e.dispatch({type:"select-all",ids:await t(),event:n.event})}return e.dispatch({type:"select-all",event:n.event})}}return e.dispatch(n)},[e.dispatch,t]);return(0,r.jsx)(h.Provider,{value:e.items,children:(0,r.jsx)(f.Provider,{value:a,children:n})})}function v({name:e,items:t,initialSelectedIds:n,fetchAllIds:i,registerDispatch:a,children:l}){let s=c(e,t,n);(0,o.useEffect)(()=>{a?.(s.dispatch)},[a]);return(0,r.jsx)(m,{instance:s,fetchAllIds:i,children:l})}},76926:function(e,t,n){"use strict";n.d(t,{j:function(){return i}});var r=n(66204);const o=/^var\((--.*)\)$/;function i(e){(0,r.useEffect)(()=>{a(l(e))},[e])}function a(e){const t=document.getElementsByTagName("meta");const n=[...t].find(e=>e.name==="theme-color");n.setAttribute("content",e)}function l(e){return o.test(e)?window.getComputedStyle(document.documentElement).getPropertyValue(e.match(o)[1]):e}},63495:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(37496);var o=n(11800);function i(){const e=(0,o.o1)();const t=(0,r.v9)(e=>e.user.data);if(!e){return"no-server"}return!t||t.offline?"offline":"online"}},45931:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(43188);var o=n(66204);var i=n(99818);const a=e=>{let{color:t="currentColor"}=e;let[n]=(0,o.useState)("gradient-"+Math.random());return(0,r.jsxs)("svg",{...e,viewBox:"0 0 38 38",style:{...e.style},children:[(0,r.jsx)("defs",{children:(0,r.jsxs)("linearGradient",{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:n,children:[(0,r.jsx)("stop",{stopColor:t,stopOpacity:0,offset:"0%"}),(0,r.jsx)("stop",{stopColor:t,stopOpacity:.631,offset:"63.146%"}),(0,r.jsx)("stop",{stopColor:t,offset:"100%"})]})}),(0,r.jsxs)("g",{transform:"translate(1 2)",fill:"none",fillRule:"evenodd",children:[(0,r.jsx)("path",{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#"+n+")",strokeWidth:2,fill:"none"}),(0,r.jsx)("circle",{fill:t,cx:36,cy:18,r:1})]})]})};var l=a;const s=i.iv.keyframes({"0%":{transform:"rotate(-90deg)"},"100%":{transform:"rotate(666deg)"}});function u(e){return(0,r.jsx)("span",{className:`${(0,i.iv)({animationName:s,animationDuration:"1.6s",animationTimingFunction:"cubic-bezier(0.17, 0.67, 0.83, 0.67)",animationIterationCount:"infinite",lineHeight:0})}`,children:(0,r.jsx)(l,{...e})})}var c=u},59746:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{d:"M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M11.5 23a1.5 1.5 0 0 1-1.5-1.5v-20a1.5 1.5 0 0 1 3 0v20a1.5 1.5 0 0 1-1.5 1.5Z",fill:"currentColor"})]});t.Z=i},40233:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"none",stroke:"currentColor",d:"m2 2 20 20M22 2 2 22",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:4})});t.Z=i},32951:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 15",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M24.483.576c-.309-.327-.674-.49-1.097-.49H1.56C1.137.086.771.25.463.576A1.635 1.635 0 0 0 0 1.737c0 .448.154.834.463 1.161l10.913 11.558c.31.327.675.49 1.097.49.422 0 .788-.163 1.096-.49L24.483 2.898c.308-.327.463-.713.463-1.16 0-.448-.155-.835-.463-1.162Z"})});t.Z=i},86918:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 91 51",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{fill:"currentColor",d:"M63.004.003a3 3 0 0 0-1.875 5.219L79.44 22.034H3.16a3.257 3.257 0 0 0-.313 0c-1.57.082-2.925 1.585-2.843 3.156.081 1.571 1.585 2.926 3.156 2.844H79.44L61.129 44.815a3 3 0 1 0 4.062 4.407l24-22a3 3 0 0 0 0-4.407l-24-22a3 3 0 0 0-2.187-.812Z"})});t.Z=i},12252:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5Z",fill:"currentColor"})});t.Z=i},68587:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{fill:"currentColor",d:"M23 11.5a1.5 1.5 0 0 1-1.5 1.5h-20a1.5 1.5 0 0 1 0-3h20a1.5 1.5 0 0 1 1.5 1.5Z",className:"path"}),(0,r.jsx)("path",{fill:"currentColor",d:"M11.5 23a1.5 1.5 0 0 1-1.5-1.5v-20a1.5 1.5 0 0 1 3 0v20a1.5 1.5 0 0 1-1.5 1.5Z",className:"path"})]});t.Z=i},62503:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m3.828 9 6.071-6.071-1.414-1.414L0 10l.707.707 7.778 7.778 1.414-1.414L3.828 11H20V9H3.828z",fill:"currentColor"})});t.Z=i},1071:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m16.172 9-6.071-6.071 1.414-1.414L20 10l-.707.707-7.778 7.778-1.414-1.414L16.172 11H0V9z",fill:"currentColor"})});t.Z=i},60481:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m9.293 12.95.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z",fill:"currentColor"})});t.Z=i},74436:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M7.05 9.293 6.343 10 12 15.657l1.414-1.414L9.172 10l4.242-4.243L12 4.343z",fill:"currentColor"})});t.Z=i},91237:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M3.94 6.5 2.22 3.64l1.42-1.42L6.5 3.94c.52-.3 1.1-.54 1.7-.7L9 0h2l.8 3.24c.6.16 1.18.4 1.7.7l2.86-1.72 1.42 1.42-1.72 2.86c.3.52.54 1.1.7 1.7L20 9v2l-3.24.8c-.16.6-.4 1.18-.7 1.7l1.72 2.86-1.42 1.42-2.86-1.72c-.52.3-1.1.54-1.7.7L11 20H9l-.8-3.24c-.6-.16-1.18-.4-1.7-.7l-2.86 1.72-1.42-1.42 1.72-2.86c-.3-.52-.54-1.1-.7-1.7L0 11V9l3.24-.8c.16-.6.4-1.18.7-1.7zM10 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",fill:"currentColor"})});t.Z=i},68929:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M10 12a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0-6a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0 12a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fill:"currentColor"})});t.Z=i},41792:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 5h2v6H9V5zm0 8h2v2H9v-2z",fill:"currentColor"})});t.Z=i},43271:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM9 11V9h2v6H9v-4zm0-6h2v2H9V5z",fill:"currentColor"})});t.Z=i},10895:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M0 4c0-1.1.9-2 2-2h15a1 1 0 0 1 1 1v1H2v1h17a1 1 0 0 1 1 1v10a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V4zm16.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z",fill:"currentColor"})});t.Z=i},25492:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M23.119 20 13.772 2.15a2 2 0 0 0-3.543 0L.881 20a2 2 0 0 0 1.772 2.928h18.694A2 2 0 0 0 23.119 20ZM11 8.423a1 1 0 0 1 2 0v6a1 1 0 1 1-2 0Zm1.05 11.51h-.028a1.528 1.528 0 0 1-1.522-1.47 1.476 1.476 0 0 1 1.448-1.53h.028A1.527 1.527 0 0 1 13.5 18.4a1.475 1.475 0 0 1-1.45 1.533Z",fill:"currentColor"})});t.Z=i},15741:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("g",{fill:"#000",children:(0,r.jsx)("path",{d:"m23.962 17.457-.82-3.297a1.287 1.287 0 0 0-1.56-.934l-3.294.823a1.286 1.286 0 0 0-.343 2.35L19 17.03A9.538 9.538 0 0 1 12 20.604a8.652 8.652 0 0 1-8.085-5.667 1.286 1.286 0 0 0-2.415.884A11.232 11.232 0 0 0 12 23.175a12.108 12.108 0 0 0 9.214-4.8l.839.503a1.286 1.286 0 0 0 1.91-1.415ZM2.422 10.774l3.295-.823a1.286 1.286 0 0 0 .352-2.35l-.972-.583A9.588 9.588 0 0 1 12 3.396a8.652 8.652 0 0 1 8.085 5.667A1.286 1.286 0 0 0 22.5 8.18 11.232 11.232 0 0 0 12 .825 12.242 12.242 0 0 0 2.866 5.68l-.919-.552a1.286 1.286 0 0 0-1.91 1.414l.82 3.297a1.287 1.287 0 0 0 1.246.974 1.311 1.311 0 0 0 .32-.04Z",fill:"currentColor"})})});t.Z=i},30739:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M21.5 3h-2.75a.25.25 0 0 1-.25-.25V1a1 1 0 0 0-2 0v4.75a.75.75 0 0 1-.75.75.75.75 0 0 1-.75-.75V3.5a.5.5 0 0 0-.5-.5H8.25A.25.25 0 0 1 8 2.751V1a1 1 0 1 0-2 0v4.75a.75.75 0 0 1-.75.75.75.75 0 0 1-.75-.75V3.5A.5.5 0 0 0 4 3H2.5a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h19a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2ZM21 22H3a.5.5 0 0 1-.5-.5v-12A.5.5 0 0 1 3 9h18a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5Z",fill:"currentColor"})});t.Z=i},7269:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M12 0a12 12 0 1 0 12 12A12.014 12.014 0 0 0 12 0Zm6.927 8.2-6.845 9.289a1.011 1.011 0 0 1-1.43.188l-4.888-3.908a1 1 0 1 1 1.25-1.562l4.076 3.261 6.227-8.451a1 1 0 1 1 1.61 1.183Z",fill:"currentColor"})});t.Z=i},35915:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,r.jsx)("path",{d:"M18.502 12.712c0 2.368-3.137 4.289-7.003 4.289S4.5 15.08 4.5 12.712c0-2.364 3.133-4.285 6.999-4.285 3.866 0 7.003 1.921 7.003 4.285Zm0 0",style:{fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",stroke:"currentColor",strokeOpacity:1,strokeMiterlimit:4},transform:"matrix(.96 0 0 .96 1 .48)"}),(0,r.jsx)("path",{d:"M13.249 12.712a1.749 1.749 0 0 1-1.054 1.644 1.757 1.757 0 0 1-1.92-.354 1.752 1.752 0 0 1 1.225-3.003c.459-.004.902.175 1.232.496.325.322.513.761.517 1.217Zm0 0",style:{fill:"none",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",stroke:"currentColor",strokeOpacity:1,strokeMiterlimit:4},transform:"matrix(.96 0 0 .96 1 .48)"}),(0,r.jsx)("path",{d:"M10.32 8.57a.72.72 0 1 0 1.442 0Zm1.442-3.289a.72.72 0 1 0-1.441 0Zm5.8 1.973a.72.72 0 0 0-.316-.969.718.718 0 0 0-.969.313Zm-2.664 2.05a.722.722 0 0 0 .317.97c.351.18.785.039.969-.317ZM5.801 6.599a.715.715 0 0 0-.969-.313.722.722 0 0 0-.312.969Zm.097 3.359a.72.72 0 0 0 .97.316.718.718 0 0 0 .312-.968Zm5.864-1.387V5.281H10.32v3.29Zm4.515-1.972-1.379 2.707 1.286.652 1.378-2.703ZM4.52 7.254l1.378 2.703 1.282-.652L5.8 6.598Zm0 0",style:{stroke:"none",fillRule:"nonzero",fillOpacity:1},transform:"translate(1)",fill:"currentColor"})]});t.Z=i},70044:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M12 9.387c.398 0 .719-.32.719-.719A.717.717 0 0 0 12 7.949Zm-4.523 7.465a.72.72 0 0 0 .648-1.285Zm3.804-8.184c0 .398.32.719.719.719.398 0 .719-.32.719-.719Zm1.438-3.387A.72.72 0 0 0 12 4.56a.72.72 0 0 0-.719.722Zm-.723 2.668a.717.717 0 0 0-.715.723c0 .394.324.719.723.715Zm2.473 1.758a.72.72 0 1 0 .37-1.39Zm-7.703-3.05a.72.72 0 1 0-1.29.636Zm.09 3.421c.18.356.609.504.964.324a.718.718 0 0 0 .325-.964Zm.414 9.113c-.27.293-.25.75.043 1.02.292.27.746.25 1.015-.043Zm3.53-1.707a.72.72 0 0 0-1.058-.976Zm8.45-9.175a.717.717 0 0 0-.043-1.016.717.717 0 0 0-1.016.039Zm-3 1.132c-.27.29-.25.746.043 1.016s.75.25 1.016-.043Zm-6.508 7.067c-.27.293-.25.75.043 1.02.293.269.746.25 1.016-.044Zm2.832-2.012.531.488Zm1.043-1.133-.527-.488h-.004Zm3.692-2.949a.717.717 0 0 0-.04-1.016.722.722 0 0 0-1.019.043Zm-6.918 5.871a.72.72 0 0 0-.238 1.422Zm1.609.856v-.723Zm6.719-4.239h.722c0-.015-.003-.03-.003-.05ZM17.117 9.29a.722.722 0 0 0-.972.3.718.718 0 0 0 .3.973Zm-7.062 5.031c.23.32.68.395 1.004.164a.727.727 0 0 0 .164-1.007Zm.445-2.18.64.325Zm1.5-.933v-.719h-.004Zm.504.867c.336.211.781.106.992-.23a.722.722 0 0 0-.23-.992ZM12 7.95c-1.969 0-3.79.5-5.137 1.352-1.336.844-2.304 2.097-2.304 3.601H6c0-.832.54-1.695 1.633-2.386 1.082-.68 2.625-1.13 4.367-1.13Zm-7.441 4.953c0 1.723 1.257 3.114 2.918 3.95l.648-1.286C6.711 14.852 6 13.856 6 12.902Zm8.16-4.234V5.281H11.28v3.387Zm-.715.719c.832 0 1.66.105 2.465.32l.37-1.39a10.903 10.903 0 0 0-2.843-.368ZM5.477 7.293l1.378 2.785 1.29-.64-1.38-2.782Zm2.851 12.875 2.473-2.684-1.059-.976L7.27 19.19Zm9.863-12.836-1.941 2.11 1.059.972L19.25 8.31Zm-7.39 10.152 2.304-2.5-1.058-.976-2.305 2.5Zm2.304-2.5 1.043-1.136-1.062-.973-1.04 1.133Zm1.043-1.132 3.16-3.438-1.058-.973-3.16 3.434Zm-3.996 3.855c.614.102 1.23.152 1.848.152v-1.441c-.54 0-1.078-.043-1.61-.133Zm1.848.152c1.969 0 3.79-.504 5.137-1.351 1.336-.844 2.304-2.102 2.304-3.606H18c0 .836-.54 1.7-1.633 2.387-1.082.684-2.625 1.129-4.367 1.129Zm7.438-5.007a4.385 4.385 0 0 0-2.32-3.563l-.673 1.274A2.943 2.943 0 0 1 18 12.953Zm-8.215.625a.975.975 0 0 1-.082-1.012l-1.286-.652a2.42 2.42 0 0 0 .2 2.507Zm-.082-1.012a.98.98 0 0 1 .863-.535l-.008-1.442c-.906.008-1.73.52-2.14 1.325ZM12 11.93c.18 0 .352.047.504.144l.762-1.222A2.383 2.383 0 0 0 12 10.488Zm0 0",fill:"currentColor"})});t.Z=i},86334:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"M.439 21.44a1.5 1.5 0 0 0 2.122 2.121l9.262-9.261a.25.25 0 0 1 .354 0l9.262 9.263a1.5 1.5 0 1 0 2.122-2.121L14.3 12.177a.25.25 0 0 1 0-.354l9.263-9.262A1.5 1.5 0 0 0 21.439.44L12.177 9.7a.25.25 0 0 1-.354 0L2.561.44A1.5 1.5 0 0 0 .439 2.561L9.7 11.823a.25.25 0 0 1 0 .354Z",fill:"currentColor"})});t.Z=i},30:function(e,t,n){"use strict";var r=n(43188);var o=n(66204);const i=e=>(0,r.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,r.jsx)("path",{d:"m23.384 21.619-6.529-6.529a9.284 9.284 0 1 0-1.768 1.768l6.529 6.529a1.266 1.266 0 0 0 1.768 0 1.251 1.251 0 0 0 0-1.768ZM2.75 9.5a6.75 6.75 0 1 1 6.75 6.75A6.758 6.758 0 0 1 2.75 9.5Z",fill:"currentColor"})});t.Z=i},45492:function(e,t,n){"use strict";n.d(t,{jy:function(){return ds},bA:function(){return p},W2:function(){return u},rS:function(){return du},Or:function(){return da},Fg:function(){return dl}});var r={};n.r(r);n.d(r,{alt2ErrorText:function(){return og},alt2MenuBackground:function(){return n1},alt2MenuItemBackgroundHover:function(){return n5},alt2MenuItemText:function(){return n7},alt2MenuItemTextHeader:function(){return re},alt2NoticeBackground:function(){return r6},alt2NoticeText:function(){return oe},alt2PillText:function(){return oY},alt2TableBackground:function(){return ns},alt2TableText:function(){return nf},alt2WarningText:function(){return os},alt3NoticeText:function(){return ot},alt3WarningText:function(){return ou},altButtonBareText:function(){return rX},altButtonNormalSelectedBackground:function(){return rV},altErrorBackground:function(){return of},altErrorText:function(){return op},altFormInputBorderSelected:function(){return oP},altFormInputShadowSelected:function(){return oZ},altFormLabelText:function(){return oS},altMenuBackground:function(){return n0},altMenuBorder:function(){return rt},altMenuBorderHover:function(){return rn},altMenuItemBackground:function(){return n2},altMenuItemBackgroundHover:function(){return n4},altMenuItemText:function(){return n3},altMenuItemTextHeader:function(){return n9},altMenuItemTextHover:function(){return n6},altMenuItemTextSelected:function(){return n8},altMobileModalText:function(){return rd},altNoticeBackground:function(){return r7},altNoticeText:function(){return r9},altPageTextLink:function(){return t9},altPillBackground:function(){return oV},altPillBorder:function(){return oz},altPillText:function(){return oq},altTableBackground:function(){return nl},altTableText:function(){return nd},altTableTextEditing:function(){return nm},altUpcomingText:function(){return ob},altWarningBackground:function(){return oi},altWarningText:function(){return ol},altbuttonMenuBackground:function(){return rH},altpageTextSubdued:function(){return t3},alttableBorderSelected:function(){return nk},buttonBareBackground:function(){return r0},buttonBareBackgroundActive:function(){return r2},buttonBareBackgroundHover:function(){return r1},buttonBareDisabledBackground:function(){return r5},buttonBareDisabledText:function(){return r4},buttonBareText:function(){return rQ},buttonBareTextHover:function(){return rJ},buttonMenuBackground:function(){return rw},buttonMenuBackgroundHover:function(){return rS},buttonMenuBorder:function(){return rk},buttonMenuSelectedBackground:function(){return rC},buttonMenuSelectedBackgroundHover:function(){return rj},buttonMenuSelectedBorder:function(){return rI},buttonMenuSelectedText:function(){return rT},buttonMenuSelectedTextHover:function(){return rE},buttonMenuText:function(){return rb},buttonMenuTextHover:function(){return rx},buttonNormalBackground:function(){return rF},buttonNormalBackgroundHover:function(){return rW},buttonNormalBorder:function(){return rU},buttonNormalDisabledBackground:function(){return rY},buttonNormalDisabledBorder:function(){return rG},buttonNormalDisabledText:function(){return rq},buttonNormalSelectedBackground:function(){return r$},buttonNormalSelectedText:function(){return rK},buttonNormalShadow:function(){return rz},buttonNormalText:function(){return rL},buttonNormalTextHover:function(){return rB},buttonPrimaryBackground:function(){return rO},buttonPrimaryBackgroundHover:function(){return rM},buttonPrimaryBorder:function(){return r_},buttonPrimaryDisabledBackground:function(){return rN},buttonPrimaryDisabledBorder:function(){return rZ},buttonPrimaryDisabledText:function(){return rA},buttonPrimaryShadow:function(){return rR},buttonPrimaryText:function(){return rD},buttonPrimaryTextHover:function(){return rP},cardBackground:function(){return nn},cardBorder:function(){return no},cardShadow:function(){return ni},errorAccent:function(){return om},errorBackground:function(){return od},errorText:function(){return oh},formInputBackground:function(){return oT},formInputBackgroundSelected:function(){return oE},formInputBackgroundSelection:function(){return oC},formInputBorder:function(){return oj},formInputBorderSelected:function(){return oD},formInputShadowSelected:function(){return oN},formInputText:function(){return oO},formInputTextHighlight:function(){return oL},formInputTextPlaceholder:function(){return o_},formInputTextPlaceholderSelected:function(){return oR},formInputTextReadOnlySelection:function(){return oI},formInputTextSelected:function(){return oM},formInputTextSelection:function(){return oA},formLabelBackground:function(){return ok},formLabelText:function(){return ow},menuBackground:function(){return nH},menuBorder:function(){return nQ},menuBorderHover:function(){return nX},menuItemBackground:function(){return nK},menuItemBackgroundHover:function(){return n$},menuItemText:function(){return nV},menuItemTextHeader:function(){return nG},menuItemTextHover:function(){return nq},menuItemTextSelected:function(){return nY},menuKeybindingText:function(){return nJ},mobileAccountShadow:function(){return rl},mobileAccountText:function(){return rs},mobileAccountViewTheme:function(){return rh},mobileAccountsViewTheme:function(){return rp},mobileBudgetViewTheme:function(){return rg},mobileConfigServerViewTheme:function(){return rm},mobileDateBackground:function(){return rf},mobileModalBackground:function(){return ru},mobileModalText:function(){return rc},mobileNavBackground:function(){return ro},mobileNavItem:function(){return ri},mobileNavItemSelected:function(){return ra},mobileSettingsViewTheme:function(){return rv},mobileTransactionViewTheme:function(){return ry},modalBackground:function(){return ne},modalBorder:function(){return nt},noticeAccent:function(){return on},noticeBackground:function(){return r3},noticeText:function(){return r8},pageBackground:function(){return tY},pageBackgroundBottomRight:function(){return tX},pageBackgroundLineBottom:function(){return t1},pageBackgroundLineMid:function(){return t0},pageBackgroundLineTop:function(){return tJ},pageBackgroundModalActive:function(){return tG},pageBackgroundTopLeft:function(){return tQ},pageText:function(){return t2},pageTextDark:function(){return t7},pageTextLight:function(){return t4},pageTextLink:function(){return t8},pageTextPositive:function(){return t6},pageTextSubdued:function(){return t5},pillBackground:function(){return oB},pillBackgroundSelected:function(){return oH},pillBorder:function(){return oU},pillBorderSelected:function(){return o$},pillText:function(){return oF},pillTextHighlighted:function(){return oW},pillTextSelected:function(){return oK},reportsBlue:function(){return oQ},reportsLabel:function(){return oX},reportsRed:function(){return oG},sidebarBackground:function(){return nP},sidebarItemAccent:function(){return nN},sidebarItemAccentHover:function(){return nL},sidebarItemAccentSelected:function(){return nZ},sidebarItemBackground:function(){return nO},sidebarItemBackgroundFailed:function(){return n_},sidebarItemBackgroundHover:function(){return nA},sidebarItemBackgroundPositive:function(){return nM},sidebarItemBackgroundSelected:function(){return nR},sidebarItemText:function(){return nB},sidebarItemTextHover:function(){return nW},sidebarItemTextSelected:function(){return nF},tableBackground:function(){return na},tableBorder:function(){return nw},tableBorderHover:function(){return nT},tableBorderSelected:function(){return nS},tableBorderSeparator:function(){return nE},tableHeaderBackground:function(){return nx},tableHeaderText:function(){return nb},tableRowBackgroundHighlight:function(){return nC},tableRowBackgroundHighlightText:function(){return nj},tableRowBackgroundHover:function(){return nu},tableRowHeaderBackground:function(){return nI},tableRowHeaderText:function(){return nD},tableText:function(){return nc},tableTextEditing:function(){return ng},tableTextEditingBackground:function(){return nv},tableTextHover:function(){return np},tableTextInactive:function(){return ny},tableTextSelected:function(){return nh},tooltipBackground:function(){return nU},tooltipBorder:function(){return nz},upcomingAccent:function(){return ox},upcomingBackground:function(){return ov},upcomingText:function(){return oy},warningAccent:function(){return oc},warningBackground:function(){return oo},warningText:function(){return oa}});var o={};n.r(o);n.d(o,{alt2ErrorText:function(){return lf},alt2MenuBackground:function(){return i4},alt2MenuItemBackgroundHover:function(){return i7},alt2MenuItemText:function(){return i8},alt2MenuItemTextHeader:function(){return ao},alt2NoticeBackground:function(){return a5},alt2NoticeText:function(){return a6},alt2PillText:function(){return l$},alt2TableBackground:function(){return ih},alt2TableText:function(){return iv},alt2WarningText:function(){return li},alt3NoticeText:function(){return a8},alt3WarningText:function(){return la},altButtonBareText:function(){return aY},altButtonNormalSelectedBackground:function(){return aH},altErrorBackground:function(){return lu},altErrorText:function(){return ld},altFormInputBorderSelected:function(){return lj},altFormInputShadowSelected:function(){return lR},altFormLabelText:function(){return lb},altMenuBackground:function(){return i2},altMenuBorder:function(){return ai},altMenuBorderHover:function(){return aa},altMenuItemBackground:function(){return i5},altMenuItemBackgroundHover:function(){return i3},altMenuItemText:function(){return i6},altMenuItemTextHeader:function(){return at},altMenuItemTextHover:function(){return i9},altMenuItemTextSelected:function(){return ae},altMobileModalText:function(){return ap},altNoticeBackground:function(){return a4},altNoticeText:function(){return a7},altPageTextLink:function(){return io},altPillBackground:function(){return lH},altPillBorder:function(){return lF},altPillText:function(){return lK},altTableBackground:function(){return id},altTableText:function(){return im},altTableTextEditing:function(){return iw},altUpcomingText:function(){return lm},altWarningBackground:function(){return lt},altWarningText:function(){return lo},altbuttonMenuBackground:function(){return aW},altpageTextSubdued:function(){return o9},buttonBareBackground:function(){return aQ},buttonBareBackgroundActive:function(){return aJ},buttonBareBackgroundHover:function(){return aX},buttonBareDisabledBackground:function(){return a1},buttonBareDisabledText:function(){return a0},buttonBareText:function(){return aq},buttonBareTextHover:function(){return aG},buttonMenuBackground:function(){return ay},buttonMenuBackgroundHover:function(){return ab},buttonMenuBorder:function(){return ax},buttonMenuSelectedBackground:function(){return ak},buttonMenuSelectedBackgroundHover:function(){return aT},buttonMenuSelectedBorder:function(){return aE},buttonMenuSelectedText:function(){return aw},buttonMenuSelectedTextHover:function(){return aS},buttonMenuText:function(){return am},buttonMenuTextHover:function(){return av},buttonNormalBackground:function(){return aZ},buttonNormalBackgroundHover:function(){return aL},buttonNormalBorder:function(){return aB},buttonNormalDisabledBackground:function(){return a$},buttonNormalDisabledBorder:function(){return aV},buttonNormalDisabledText:function(){return aK},buttonNormalSelectedBackground:function(){return az},buttonNormalSelectedText:function(){return aU},buttonNormalShadow:function(){return aF},buttonNormalText:function(){return aA},buttonNormalTextHover:function(){return aN},buttonPrimaryBackground:function(){return aI},buttonPrimaryBackgroundHover:function(){return aD},buttonPrimaryBorder:function(){return aP},buttonPrimaryDisabledBackground:function(){return a_},buttonPrimaryDisabledBorder:function(){return aR},buttonPrimaryDisabledText:function(){return aM},buttonPrimaryShadow:function(){return aO},buttonPrimaryText:function(){return aC},buttonPrimaryTextHover:function(){return aj},cardBackground:function(){return il},cardBorder:function(){return is},cardShadow:function(){return iu},errorAccent:function(){return lh},errorBackground:function(){return ls},errorText:function(){return lc},formInputBackground:function(){return lw},formInputBackgroundSelected:function(){return lS},formInputBackgroundSelection:function(){return lk},formInputBorder:function(){return lT},formInputBorderSelected:function(){return lC},formInputShadowSelected:function(){return l_},formInputText:function(){return lI},formInputTextHighlight:function(){return lA},formInputTextPlaceholder:function(){return lP},formInputTextPlaceholderSelected:function(){return lO},formInputTextReadOnlySelection:function(){return lE},formInputTextSelected:function(){return lD},formInputTextSelection:function(){return lM},formLabelBackground:function(){return lx},formLabelText:function(){return ly},menuBackground:function(){return i$},menuBorder:function(){return iJ},menuBorderHover:function(){return i0},menuItemBackground:function(){return iV},menuItemBackgroundHover:function(){return iq},menuItemText:function(){return iY},menuItemTextHeader:function(){return iX},menuItemTextHover:function(){return iG},menuItemTextSelected:function(){return iQ},menuKeybindingText:function(){return i1},mobileAccountShadow:function(){return ac},mobileAccountText:function(){return ad},mobileDateBackground:function(){return ag},mobileModalBackground:function(){return af},mobileModalText:function(){return ah},mobileNavBackground:function(){return al},mobileNavItem:function(){return as},mobileNavItemSelected:function(){return au},modalBackground:function(){return ii},modalBorder:function(){return ia},noticeAccent:function(){return a9},noticeBackground:function(){return a2},noticeText:function(){return a3},pageBackground:function(){return oJ},pageBackgroundBottomRight:function(){return o2},pageBackgroundLineBottom:function(){return o3},pageBackgroundLineMid:function(){return o5},pageBackgroundLineTop:function(){return o4},pageBackgroundModalActive:function(){return o0},pageBackgroundTopLeft:function(){return o1},pageText:function(){return o7},pageTextLight:function(){return o6},pageTextLink:function(){return it},pageTextPositive:function(){return ie},pageTextSubdued:function(){return o8},pillBackground:function(){return lN},pillBackgroundSelected:function(){return lW},pillBorder:function(){return lB},pillBorderSelected:function(){return lz},pillText:function(){return lZ},pillTextHighlighted:function(){return lL},pillTextSelected:function(){return lU},reportsBlue:function(){return lq},reportsLabel:function(){return lY},reportsRed:function(){return lV},sidebarBackground:function(){return iR},sidebarItemAccent:function(){return iL},sidebarItemAccentHover:function(){return iF},sidebarItemAccentSelected:function(){return iB},sidebarItemBackground:function(){return iA},sidebarItemBackgroundHover:function(){return iZ},sidebarItemBackgroundSelected:function(){return iN},sidebarItemText:function(){return iW},sidebarItemTextHover:function(){return iz},sidebarItemTextSelected:function(){return iU},tableBackground:function(){return ic},tableBorder:function(){return iC},tableBorderHover:function(){return iI},tableBorderSelected:function(){return ij},tableBorderSeparator:function(){return iD},tableHeaderBackground:function(){return iE},tableHeaderText:function(){return iT},tableRowBackgroundHighlight:function(){return iP},tableRowBackgroundHighlightText:function(){return iO},tableRowBackgroundHover:function(){return ip},tableRowHeaderBackground:function(){return iM},tableRowHeaderText:function(){return i_},tableText:function(){return ig},tableTextEditing:function(){return ix},tableTextEditingBackground:function(){return iS},tableTextHover:function(){return ib},tableTextInactive:function(){return ik},tableTextSelected:function(){return iy},tooltipBackground:function(){return iH},tooltipBorder:function(){return iK},upcomingAccent:function(){return lv},upcomingBackground:function(){return lp},upcomingText:function(){return lg},warningAccent:function(){return ll},warningBackground:function(){return le},warningText:function(){return ln}});var i={};n.r(i);n.d(i,{alt2ErrorText:function(){return cE},alt2MenuBackground:function(){return s4},alt2MenuItemBackgroundHover:function(){return s7},alt2MenuItemText:function(){return s8},alt2MenuItemTextHeader:function(){return un},alt2NoticeBackground:function(){return cn},alt2NoticeText:function(){return ci},alt2PillText:function(){return c9},alt2TableBackground:function(){return sc},alt2TableText:function(){return sp},alt2WarningBackground:function(){return cf},alt2WarningText:function(){return cg},alt3ErrorText:function(){return cC},alt3NoticeText:function(){return ca},alt3WarningText:function(){return cm},alt4ErrorText:function(){return cj},alt4NoticeText:function(){return cl},alt4WarningText:function(){return cv},alt5ErrorText:function(){return cI},alt5WarningText:function(){return cy},altButtonBareText:function(){return u4},altButtonNormalSelectedBackground:function(){return uX},altErrorAccent:function(){return cP},altErrorBackground:function(){return cS},altErrorText:function(){return cT},altFormInputBorderSelected:function(){return cH},altFormInputShadowSelected:function(){return cQ},altFormLabelText:function(){return cN},altMenuBackground:function(){return s2},altMenuBorder:function(){return uo},altMenuBorderHover:function(){return ui},altMenuItemBackground:function(){return s5},altMenuItemBackgroundHover:function(){return s3},altMenuItemText:function(){return s6},altMenuItemTextHeader:function(){return ut},altMenuItemTextHover:function(){return s9},altMenuItemTextSelected:function(){return ue},altMobileModalText:function(){return uh},altNoticeAccent:function(){return cu},altNoticeBackground:function(){return ct},altNoticeText:function(){return co},altPageTextLink:function(){return st},altPageTextPositive:function(){return l9},altPillBackground:function(){return c6},altPillBorder:function(){return c4},altPillText:function(){return c8},altTableBackground:function(){return su},altTableText:function(){return sh},altTableTextEditing:function(){return sy},altUpcomingText:function(){return c_},altWarningAccent:function(){return cx},altWarningBackground:function(){return cd},altWarningText:function(){return cp},altbuttonMenuBackground:function(){return uY},altpageTextSubdued:function(){return l7},alttableBorderSelected:function(){return sE},buttonBareBackground:function(){return u3},buttonBareBackgroundActive:function(){return u6},buttonBareBackgroundHover:function(){return u7},buttonBareDisabledBackground:function(){return u9},buttonBareDisabledText:function(){return u8},buttonBareText:function(){return u2},buttonBareTextHover:function(){return u5},buttonMenuBackground:function(){return uC},buttonMenuBackgroundHover:function(){return uj},buttonMenuBorder:function(){return uI},buttonMenuSelectedBackground:function(){return uO},buttonMenuSelectedBackgroundHover:function(){return uM},buttonMenuSelectedBorder:function(){return u_},buttonMenuSelectedText:function(){return uD},buttonMenuSelectedTextHover:function(){return uP},buttonMenuText:function(){return uT},buttonMenuTextHover:function(){return uE},buttonNormalBackground:function(){return uK},buttonNormalBackgroundHover:function(){return u$},buttonNormalBorder:function(){return uV},buttonNormalDisabledBackground:function(){return u0},buttonNormalDisabledBorder:function(){return u1},buttonNormalDisabledText:function(){return uJ},buttonNormalSelectedBackground:function(){return uQ},buttonNormalSelectedText:function(){return uG},buttonNormalShadow:function(){return uq},buttonNormalText:function(){return uz},buttonNormalTextHover:function(){return uH},buttonPrimaryBackground:function(){return uN},buttonPrimaryBackgroundHover:function(){return uZ},buttonPrimaryBorder:function(){return uL},buttonPrimaryDisabledBackground:function(){return uW},buttonPrimaryDisabledBorder:function(){return uU},buttonPrimaryDisabledText:function(){return uF},buttonPrimaryShadow:function(){return uB},buttonPrimaryText:function(){return uR},buttonPrimaryTextHover:function(){return uA},cardBackground:function(){return si},cardBorder:function(){return sa},cardShadow:function(){return sl},errorAccent:function(){return cD},errorBackground:function(){return cw},errorText:function(){return ck},formInputBackground:function(){return cL},formInputBackgroundSelected:function(){return cB},formInputBackgroundSelection:function(){return cF},formInputBorder:function(){return cW},formInputBorderSelected:function(){return cz},formInputShadowSelected:function(){return cG},formInputText:function(){return cK},formInputTextHighlight:function(){return cX},formInputTextPlaceholder:function(){return cV},formInputTextPlaceholderSelected:function(){return cq},formInputTextReadOnlySelection:function(){return cU},formInputTextSelected:function(){return c$},formInputTextSelection:function(){return cY},formLabelBackground:function(){return cZ},formLabelText:function(){return cA},markdownDark:function(){return uS},markdownLight:function(){return uk},markdownNormal:function(){return uw},menuBackground:function(){return s$},menuBorder:function(){return sJ},menuBorderHover:function(){return s0},menuItemBackground:function(){return sV},menuItemBackgroundHover:function(){return sq},menuItemText:function(){return sY},menuItemTextHeader:function(){return sX},menuItemTextHover:function(){return sG},menuItemTextSelected:function(){return sQ},menuKeybindingText:function(){return s1},mobileAccountShadow:function(){return uu},mobileAccountText:function(){return uc},mobileAccountViewTheme:function(){return ug},mobileAccountsViewTheme:function(){return um},mobileBudgetViewTheme:function(){return uv},mobileConfigServerViewTheme:function(){return uy},mobileDateBackground:function(){return up},mobileModalBackground:function(){return ud},mobileModalText:function(){return uf},mobileNavBackground:function(){return ua},mobileNavItem:function(){return ul},mobileNavItemSelected:function(){return us},mobileSettingsViewTheme:function(){return ub},mobileTransactionViewTheme:function(){return ux},modalBackground:function(){return sn},modalBorder:function(){return so},noticeAccent:function(){return cs},noticeBackground:function(){return ce},noticeText:function(){return cr},pageBackground:function(){return lG},pageBackgroundBottomRight:function(){return lJ},pageBackgroundLineBottom:function(){return l2},pageBackgroundLineMid:function(){return l1},pageBackgroundLineTop:function(){return l0},pageBackgroundModalActive:function(){return lQ},pageBackgroundTopLeft:function(){return lX},pageText:function(){return l4},pageTextDark:function(){return l6},pageTextLight:function(){return l5},pageTextLink:function(){return se},pageTextPositive:function(){return l8},pageTextSubdued:function(){return l3},pillBackground:function(){return cJ},pillBackgroundSelected:function(){return c5},pillBorder:function(){return c2},pillBorderSelected:function(){return c7},pillText:function(){return c0},pillTextHighlighted:function(){return c1},pillTextSelected:function(){return c3},reportsBlue:function(){return dn},reportsLabel:function(){return dr},reportsRed:function(){return de},sidebarBackground:function(){return sM},sidebarItemAccent:function(){return sL},sidebarItemAccentHover:function(){return sF},sidebarItemAccentSelected:function(){return sB},sidebarItemBackground:function(){return s_},sidebarItemBackgroundFailed:function(){return sA},sidebarItemBackgroundHover:function(){return sZ},sidebarItemBackgroundPositive:function(){return sR},sidebarItemBackgroundSelected:function(){return sN},sidebarItemText:function(){return sW},sidebarItemTextHover:function(){return sz},sidebarItemTextSelected:function(){return sU},tableBackground:function(){return ss},tableBorder:function(){return sk},tableBorderHover:function(){return sC},tableBorderSelected:function(){return sT},tableBorderSeparator:function(){return sj},tableHeaderBackground:function(){return sS},tableHeaderText:function(){return sw},tableRowBackgroundHighlight:function(){return sI},tableRowBackgroundHighlightText:function(){return sD},tableRowBackgroundHover:function(){return sd},tableRowHeaderBackground:function(){return sP},tableRowHeaderText:function(){return sO},tableText:function(){return sf},tableTextEditing:function(){return sv},tableTextEditingBackground:function(){return sb},tableTextHover:function(){return sm},tableTextInactive:function(){return sx},tableTextSelected:function(){return sg},tooltipBackground:function(){return sH},tooltipBorder:function(){return sK},upcomingAccent:function(){return cR},upcomingBackground:function(){return cO},upcomingText:function(){return cM},warningAccent:function(){return cb},warningBackground:function(){return cc},warningText:function(){return ch}});var a=n(99818);var l=n(67238);var s=n(90122);const u={incomeHeaderHeight:70,cardShadow:"0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24)",monthRightPadding:5,menuBorderRadius:4,mobileEditingPadding:12,altMenuMaxHeight:250,altMenuText:{fontSize:13},altMenuHeaderText:{fontSize:13,fontWeight:700},veryLargeText:{fontSize:30,fontWeight:600},largeText:{fontSize:20,fontWeight:700,letterSpacing:.5},mediumText:{fontSize:15,fontWeight:500},smallText:{fontSize:13},verySmallText:{fontSize:13},page:{flex:1,"@media (max-height: 550px)":{minHeight:700},paddingTop:8,[`@media (min-width: ${s.Z.breakpoint_small})`]:{paddingTop:36}},pageContent:{paddingLeft:2,paddingRight:2,[`@media (min-width: ${s.Z.breakpoint_small})`]:{paddingLeft:20,paddingRight:20}},settingsPageContent:{padding:20,[`@media (min-width: ${s.Z.breakpoint_small})`]:{padding:"inherit"}},staticText:{cursor:"default",userSelect:"none"},shadow:{boxShadow:"0 2px 4px 0 rgba(0,0,0,0.1)"},shadowLarge:{boxShadow:"0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)"},tnum:{fontFeatureSettings:'"tnum"'},notFixed:{fontFeatureSettings:""},text:{fontSize:16},delayedFadeIn:{animationName:(0,a.F4)({"0%":{opacity:0},"100%":{opacity:1}}),animationDuration:"1s",animationFillMode:"both",animationDelay:"0.5s"},lightScrollbar:null,darkScrollbar:null,scrollbarWidth:null};let c=false;function f(){u.lightScrollbar=!c&&{"& ::-webkit-scrollbar":{width:11,backgroundColor:"rgba(200, 200, 200, .2)"},"& ::-webkit-scrollbar-thumb":{width:7,borderRadius:30,backgroundClip:"padding-box",border:"2px solid rgba(0, 0, 0, 0)"},"& ::-webkit-scrollbar-thumb:vertical":{backgroundColor:"#d0d0d0"}};u.darkScrollbar=!c&&{"& ::-webkit-scrollbar":{width:7,backgroundColor:"rgba(0, 0, 0, 0)"},"& ::-webkit-scrollbar-thumb:vertical":{backgroundColor:"rgba(200, 200, 200, .5)"}};u.scrollbarWidth=c?0:13}if(l.OB==="web"){function h(){let e=document.createElement("div");e.innerHTML='<div style="width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;"/>';document.body.appendChild(e);let t=e.childNodes[0];if(t.offsetWidth===t.clientWidth){return true}return false}c=h();f();window.addEventListener("focus",()=>{c=h();f()})}const p=()=>c;var g=n(43188);var m=n(37496);var v=n(50102);const y="#733309";const b="#87540d";const x="#B88115";const w="#D4A31C";const S="#E6BB20";const k="#F2D047";const T="#F5E35D";const E="#FCF088";const C="#FFF7C4";const j="#FFFBEA";const I="#FFFEFA";const D="#610316";const P="#8A041A";const O="#AB091E";const M="#CF1124";const _="#E12D39";const R="#EF4E4E";const A="#F86A6A";const N="#FF9B9B";const Z="#FFBDBD";const L="#FFE3E3";const B="#FFF1F1";const F="#034388";const W="#0B5FA3";const U="#1271BF";const z="#1980D4";const H="#2B8FED";const K="#40A5F7";const $="#66B5FA";const V="#8BCAFD";const q="#B3D9FF";const Y="#E3F0FF";const G="#F5FCFF";const Q="#102A43";const X="#243B53";const J="#334E68";const ee="#486581";const et="#627D98";const en="#829AB1";const er="#9FB3C8";const eo="#BCCCDC";const ei="#D9E2EC";const ea="#E8ECF0";const el="#F7FAFC";const es="#014D40";const eu="#0C6B58";const ec="#147D64";const ed="#199473";const ef="#27AB83";const eh="#3EBD93";const ep="#65D6AD";const eg="#8EEDC7";const em="#C6F7E2";const ev="#EFFCF6";const ey="#FAFFFD";const eb="#44056E";const ex="#580A94";const ew="#690CB0";const eS="#7A0ECC";const ek="#8719E0";const eT="#9446ED";const eE="#A368FC";const eC="#B990FF";const ej="#DAC4FF";const eI="#F2EBFE";const eD="#F9F6FE";const eP=null&&ea;const eO="#fafafa";const eM=null&&q;const e_="#f6f8fa";const eR="#e8ecf0";const eA="#d4dae0";const eN="#bdc5cf";const eZ="#98a1ae";const eL="#747c8b";const eB="#4d5768";const eF="#373b4a";const eW="#242733";const eU="#141520";const ez="#080811";const eH=el;const eK=ea;const e$=ei;const eV=eo;const eq=er;const eY=en;const eG=et;const eQ=ee;const eX=J;const eJ=X;const e0=Q;const e1=G;const e2=Y;const e4=q;const e5=V;const e3=$;const e7=K;const e6=H;const e8=z;const e9=U;const te=W;const tt=F;const tn=ey;const tr=ev;const to=em;const ti=eg;const ta=ep;const tl=eh;const ts=ef;const tu=ed;const tc=ec;const td=eu;const tf=es;const th=I;const tp=j;const tg=C;const tm=E;const tv=T;const ty=k;const tb=S;const tx=w;const tw=x;const tS=b;const tk=y;const tT=B;const tE=L;const tC=Z;const tj=N;const tI=A;const tD=R;const tP=_;const tO=M;const tM=O;const t_=P;const tR=D;const tA=eD;const tN=eI;const tZ=ej;const tL=eC;const tB=eE;const tF=eT;const tW=ek;const tU=eS;const tz=ew;const tH=ex;const tK=eb;const t$="#ffffff";const tV="#000000";const tq=eO;const tY=ez;const tG=eU;const tQ=eJ;const tX=eW;const tJ=tF;const t0=e0;const t1=e$;const t2=e$;const t4=t2;const t5=eG;const t3=t5;const t7=eJ;const t6=tL;const t8=tF;const t9=t8;const ne=eU;const nt=eQ;const nn=eU;const no=tF;const ni=eX;const na=eJ;const nl=na;const ns=na;const nu=eX;const nc=e$;const nd=nc;const nf=nc;const nh=e$;const np=eY;const ng=tV;const nm=ng;const nv=tF;const ny=eG;const nb=eq;const nx=eX;const nw=eQ;const nS=tF;const nk=nS;const nT=tB;const nE=eY;const nC=tH;const nj=e$;const nI=eX;const nD=e$;const nP=eJ;const nO=eJ;const nM=ts;const n_=tI;const nR=eJ;const nA=eX;const nN=eJ;const nZ=tF;const nL=eX;const nB=e$;const nF=tF;const nW=e$;const nU=eQ;const nz=eG;const nH=eQ;const nK=eQ;const n$=eG;const nV=eK;const nq=eH;const nY=eV;const nG=tB;const nQ=eJ;const nX=tF;const nJ=eG;const n0=eX;const n1=n0;const n2=eX;const n4=eQ;const n5=n4;const n3=e$;const n7=n3;const n6=e$;const n8=tF;const n9=tW;const re=n9;const rt=eV;const rn=tF;const ro=eJ;const ri=e$;const ra=tF;const rl=ni;const rs=te;const ru=e0;const rc=t$;const rd=e2;const rf=eK;const rh=eH;const rp=te;const rg=tW;const rm=tW;const rv=eH;const ry=tW;const rb=eK;const rx=eH;const rw="transparent";const rS="rgba(200, 200, 200, .25)";const rk=eG;const rT=td;const rE=tS;const rC=tm;const rj=tv;const rI=rC;const rD=t$;const rP=rD;const rO=tF;const rM=rO;const r_=rO;const rR="rgba(0, 0, 0, 0.6)";const rA=eX;const rN=eY;const rZ=rN;const rL=e$;const rB=e$;const rF=eJ;const rW=eQ;const rU=eq;const rz="rgba(0, 0, 0, 0.4)";const rH=rF;const rK=t$;const r$=tU;const rV=r$;const rq=eG;const rY=eJ;const rG=eG;const rQ=rL;const rX=rQ;const rJ=rL;const r0="transparent";const r1="rgba(200, 200, 200, .3)";const r2="rgba(200, 200, 200, .5)";const r4=rq;const r5=r0;const r3=td;const r7=r3;const r6=r3;const r8=ta;const r9=r8;const oe=r8;const ot=r8;const on=ts;const oo=tS;const oi=oo;const oa=tm;const ol=oa;const os=oa;const ou=oa;const oc=tb;const od=t_;const of=od;const oh=tj;const op=oh;const og=oh;const om=tP;const ov=na;const oy=ny;const ob=oy;const ox=nw;const ow=tZ;const oS=ow;const ok=tt;const oT=eJ;const oE=eX;const oC=tF;const oj=eQ;const oI=eJ;const oD=tF;const oP=oD;const oO=e$;const oM=tV;const o_=e$;const oR=eK;const oA=eJ;const oN=tL;const oZ=oN;const oL=tF;const oB=eQ;const oF=eV;const oW=tW;const oU=eX;const oz=oU;const oH=tU;const oK=e$;const o$=tF;const oV=oB;const oq=oF;const oY=oF;const oG=tI;const oQ=e7;const oX=e0;const oJ=e8;const o0=e9;const o1=ta;const o2=tO;const o4=eH;const o5=ts;const o3=tm;const o7=e3;const o6=eQ;const o8=e6;const o9=eG;const ie=e1;const it=e7;const io=it;const ii=e0;const ia=eV;const il=tz;const is=tF;const iu=tN;const ic=tR;const id=ic;const ih=ic;const ip=t_;const ig=tj;const im=eY;const iv=im;const iy=tC;const ib=tD;const ix=tV;const iw=ix;const iS=tj;const ik=tP;const iT=tM;const iE=tI;const iC=tj;const ij=tF;const iI=tB;const iD=eY;const iP=tM;const iO=tj;const iM=tE;const i_=tM;const iR=tS;const iA=tw;const iN=tk;const iZ=tb;const iL=tm;const iB=ty;const iF=tm;const iW=tm;const iU=ty;const iz=tg;const iH=t$;const iK=tV;const i$=td;const iV=tc;const iq=ts;const iY=ti;const iG=tn;const iQ=ts;const iX=ta;const iJ=ts;const i0=tf;const i1=eY;const i2=eX;const i4=i2;const i5=eX;const i3=eQ;const i7=eQ;const i6=e$;const i8=i6;const i9=e$;const ae=e$;const at=tW;const ao=tg;const ai=eV;const aa=tF;const al=t$;const as=eZ;const au=tW;const ac=eq;const ad=te;const af=e0;const ah=t$;const ap=e2;const ag=eK;const am=e$;const av=eK;const ay=eJ;const ab=eQ;const ax=eQ;const aw=eK;const aS=tS;const ak=tm;const aT=tv;const aE=ak;const aC=t$;const aj=aC;const aI=tW;const aD=aI;const aP=aI;const aO="rgba(0, 0, 0, 0.3)";const aM=t$;const a_=eq;const aR=a_;const aA=eH;const aN=eV;const aZ=eY;const aL=eG;const aB=eJ;const aF=eX;const aW=eK;const aU=tL;const az=tF;const aH=az;const aK=eG;const a$=eJ;const aV=eG;const aq=eH;const aY=aq;const aG=eV;const aQ=eY;const aX=tH;const aJ="rgba(100, 100, 100, .25)";const a0=aK;const a1=aQ;const a2=td;const a4=a2;const a5=a2;const a3=ta;const a7=a3;const a6=a3;const a8=a3;const a9=ts;const le=tS;const lt=le;const ln=tm;const lo=ln;const li=ln;const la=ln;const ll=tb;const ls=t_;const lu=ls;const lc=tj;const ld=lc;const lf=lc;const lh=tP;const lp=tN;const lg=tK;const lm=tW;const lv=tN;const ly=tL;const lb=ly;const lx=e5;const lw=tz;const lS=tF;const lk=tF;const lT=tU;const lE=tH;const lC=tN;const lj=lC;const lI=tZ;const lD=tH;const lP=e$;const lO=lP;const lM=eJ;const l_=tF;const lR=l_;const lA=tF;const lN=td;const lZ=tu;const lL=tU;const lB=ti;const lF=lB;const lW=tr;const lU=tc;const lz=tf;const lH=lN;const lK=lZ;const l$=lZ;const lV=tI;const lq=e7;const lY=e0;const lG=eK;const lQ=eV;const lX=eK;const lJ=e4;const l0=t$;const l1=eK;const l2=e4;const l4="#272630";const l5=eQ;const l3=eq;const l7=eG;const l6=eJ;const l8=tU;const l9=tF;const se=e8;const st=e3;const sn=t$;const so=t$;const si=t$;const sa=tz;const sl=eX;const ss=t$;const su=eH;const sc=eK;const sd=eH;const sf=l4;const sh=eY;const sp=eQ;const sg=eX;const sm=e0;const sv=eH;const sy=tA;const sb=e6;const sx=eG;const sw=eQ;const sS=t$;const sk=eK;const sT=tW;const sE=e5;const sC=tF;const sj=eY;const sI=e4;const sD=eX;const sP=eH;const sO=eJ;const sM=e0;const s_=te;const sR=ts;const sA=tI;const sN=tL;const sZ=eJ;const sL=te;const sB=tL;const sF=e9;const sW=e$;const sU=tL;const sz=eH;const sH=eH;const sK=eH;const s$=t$;const sV=eH;const sq=eK;const sY=e0;const sG=sY;const sQ=sY;const sX=tU;const sJ=eK;const s0=tN;const s1=eY;const s2=te;const s4=e0;const s5=te;const s3=e9;const s7=eQ;const s6=eK;const s8=t$;const s9=eH;const ue=tB;const ut=eY;const un=tg;const uo=e9;const ui=tB;const ua=t$;const ul=eZ;const us=tW;const uu=eq;const uc=te;const ud=e0;const uf=t$;const uh=e2;const up=eK;const ug=eH;const um=te;const uv=tW;const uy=tW;const ub=eH;const ux=tW;const uw=tZ;const uS=tF;const uk=tN;const uT=eK;const uE=eH;const uC="transparent";const uj="rgba(200, 200, 200, .25)";const uI=eG;const uD=td;const uP=tS;const uO=tm;const uM=tv;const u_=uO;const uR=t$;const uA=uR;const uN=tW;const uZ=uN;const uL=uN;const uB="rgba(0, 0, 0, 0.3)";const uF=t$;const uW=eq;const uU=uW;const uz=e0;const uH=uz;const uK=t$;const u$=uK;const uV=e$;const uq="rgba(0, 0, 0, 0.2)";const uY=eK;const uG=t$;const uQ=e8;const uX=eG;const uJ=eq;const u0=uK;const u1=uV;const u2=uz;const u4=eV;const u5=uz;const u3="transparent";const u7="rgba(100, 100, 100, .15)";const u6="rgba(100, 100, 100, .25)";const u8=uJ;const u9=u3;const ce=to;const ct=tr;const cn=tn;const cr=ts;const co=tf;const ci=td;const ca=tu;const cl=tc;const cs=ti;const cu=ts;const cc=tm;const cd=tg;const cf=tp;const ch=tS;const cp=tk;const cg=tw;const cm=tb;const cv=tS;const cy=tx;const cb=ty;const cx=tx;const cw=tT;const cS=tE;const ck=tP;const cT=tR;const cE=tO;const cC=tM;const cj=tI;const cI=tD;const cD=tj;const cP=tP;const cO=tN;const cM=tK;const c_=tW;const cR=tN;const cA=e6;const cN=e9;const cZ=e5;const cL=eH;const cB=t$;const cF=tW;const cW=e$;const cU=eH;const cz=tW;const cH=e6;const cK=e0;const c$=eH;const cV=eq;const cq=eV;const cY=eK;const cG=tB;const cQ=e3;const cX=tL;const cJ=e$;const c0=eJ;const c1=tU;const c2=e$;const c4=eV;const c5=e4;const c3=tt;const c7=tW;const c6=eK;const c8=e0;const c9=eG;const de=tI;const dn=e7;const dr=e0;const di={light:i,dark:r,...(0,v.Ry)()&&{development:o}};const da=Object.keys(di);function dl(){return(0,m.v9)(e=>e.prefs.global?.theme)||"light"}function ds(){let e=dl();let t=di[e];let n=Object.keys(t).map(e=>` --color-${e}: ${t[e]};`).join("\n");return(0,g.jsx)("style",{children:`:root {
|
|
187
|
+
${n}}`})}const du=Object.fromEntries(Object.keys(i).map(e=>[e,`var(--color-${e})`]));},90122:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r;(function(e){e["small"]="small";e["medium"]="medium";e["wide"]="wide"})(r||(r={}));const o={small:512,medium:730,wide:1100};const i=Object.entries(o).reduce((e,[t,n])=>{e[`breakpoint_${t}`]=`${n}px`;return e},{});t.Z=i},55833:function(e,t,n){"use strict";n.d(t,{M:function(){return s},Y:function(){return c}});var r=n(66204);var o=n(42696);var i=n.n(o);var a=n(84094);const l=(0,r.createContext)(undefined);function s(){return(0,r.useContext)(l)}function u(){const e={};const t=new(i())({max:1200});const n={};let r=false;class o{observeCell(t,r){if(!e[t]){e[t]=[]}e[t].push(r);return()=>{e[t]=e[t].filter(e=>e!==r);if(e[t].length===0){n[t]=null}}}disableObservers(){r=true}enableObservers(){r=false}prewarmCache(e,n){t.set(e,n)}listen(){return(0,a.oL)("cells-changed",function(o){if(!r){o.forEach(r=>{const o=e[r.name];if(o){o.forEach(e=>e(r));n[r.name]=Promise.resolve(r);t.set(r.name,r)}})}})}bind(e="__global",r,o,i){r=typeof r==="string"?{name:r,value:null}:r;let a=`${e}!${r.name}`;let l=this.observeCell(a,i);if(t.has(a)){i(t.get(a))}if(n[a]!=null){n[a].then(i)}else{const o=this.get(e,r.name);n[a]=o;o.then(e=>{if(n[a]===o){t.set(a,e);i(e)}})}return l}get(e,t){return(0,a.lW)("getCell",{sheetName:e,name:t})}getCellNames(e){return(0,a.lW)("getCellNamesInSheet",{sheetName:e})}createQuery(e,t,n){return(0,a.lW)("create-query",{sheetName:e,name:t,query:n.serialize()})}}return new o}function c({children:e}){let t=(0,r.useMemo)(()=>u(),[]);(0,r.useEffect)(()=>{return t.listen()},[t]);return r.createElement(l.Provider,{value:t},e)}},13265:function(e,t,n){"use strict";n.d(t,{KT:function(){return a},Np:function(){return i},cT:function(){return s},ht:function(){return l},si:function(){return u}});var r=n(84094);var o=n(62601);function i(e){return{type:o.wH,state:e}}function a(){return async e=>{n.g.Actual.applyAppUpdate();e(i({updateInfo:null}))}}function l(e){return{type:o.HT,undoState:e}}function s(e,t){return()=>{return(0,r.lW)("upload-file-web",{filename:e,contents:t})}}function u(){return()=>{return(0,r.lW)("app-focused")}}},99103:function(e,t,n){"use strict";n.d(t,{$u:function(){return f},NK:function(){return p},Rb:function(){return u},S2:function(){return w},VM:function(){return m},aK:function(){return c},ef:function(){return b},ej:function(){return g},g4:function(){return S},il:function(){return x},nu:function(){return h},sX:function(){return v},xp:function(){return y}});var r=n(84094);var o=n(40400);var i=n(62601);var a=n(13265);var l=n(24418);var s=n(50389);function u(e){return(t,n)=>{const{loadingText:r}=n().app;if(r!=null){t((0,a.Np)({loadingText:e}))}}}function c(){return async e=>{const t=await (0,r.lW)("get-budgets");e({type:i.Ud,budgets:t})}}function f(){return async e=>{const t=await (0,r.lW)("get-remote-files");e({type:i.Oi,files:t})}}function h(){return async(e,t)=>{const n=await (0,r.lW)("get-budgets");const o=await (0,r.lW)("get-remote-files");e({type:i.GY,budgets:n,remoteFiles:o});return t().budgets.allFiles}}function p(e,t="",n={}){return async i=>{i((0,a.Np)({loadingText:t}));let{error:u}=await (0,r.lW)("load-budget",{id:e,...n});if(u){let t=(0,o.FL)(u,e);if(u==="out-of-sync-migrations"||u==="out-of-sync-data"){if(typeof window.confirm!=="undefined"){let n=window.confirm(t+" Make sure the app is up-to-date. Do you want to load a backup?");if(n){i((0,l.Ll)("load-backup",{budgetId:e}))}}else{alert(t+" Make sure the app is up-to-date.")}}else{alert(t)}i((0,a.Np)({loadingText:null}));return}i((0,l.Mr)());await i((0,s.D0)());i((0,a.Np)({loadingText:null}))}}function g(){return async(e,t)=>{const n=t().prefs.local;if(n&&n.id){e({type:i.DC});e((0,a.Np)({loadingText:"Closing..."}));await (0,r.lW)("close-budget");e((0,a.Np)({loadingText:null}));if(localStorage.getItem("SharedArrayBufferOverride")){window.location.reload()}}}}function m(){return async(e,t)=>{let n=t().prefs.local;if(n&&n.id){e({type:i.DC})}}}function v(e,t){return async n=>{await (0,r.lW)("delete-budget",{id:e,cloudFileId:t});await n(h())}}function y({testMode:e=false,demoMode:t=false}={}){return async n=>{n((0,a.Np)({loadingText:e||t?"Making demo...":""}));if(t){await (0,r.lW)("create-demo-budget")}else{await (0,r.lW)("create-budget",{testMode:e})}n((0,l.Mr)());await n(h());await n((0,s.D0)());n((0,a.Np)({loadingText:null}))}}function b(e,t){return async n=>{const{error:o}=await (0,r.lW)("import-budget",{filepath:e,type:t});if(o){throw new Error(o)}n((0,l.Mr)());await n((0,s.D0)());window.__navigate("/budget")}}function x(e){return async t=>{let{error:n}=await (0,r.lW)("upload-budget",{id:e});if(n){return{error:n}}await t(h());return{}}}function w(e){return async t=>{t((0,a.Np)({loadingText:"Downloading..."}));await t(g());t(S(e,{replace:true}))}}function S(e,{replace:t=false}={}){return async n=>{n((0,a.Np)({loadingText:"Downloading..."}));let{id:i,error:u}=await (0,r.lW)("download-budget",{fileId:e,replace:t});if(u){if(u.reason==="decrypt-failure"){let r={hasExistingKey:u.meta&&u.meta.isMissingKey,cloudFileId:e,onSuccess:()=>{n(S(e,{replace:t}))}};n((0,l.Ll)("fix-encryption-key",r));n((0,a.Np)({loadingText:null}))}else if(u.reason==="file-exists"){alert(`A file with id “${u.meta.id}” already exists with the name “${u.meta.name}.” `+"This file will be replaced. This probably happened because files were manually "+"moved around outside of Actual.");return n(S(e,{replace:true}))}else{n((0,a.Np)({loadingText:null}));alert((0,o.Ip)(u))}return null}else{await Promise.all([n((0,s.Pt)()),n(h()),n(p(i))]);n((0,a.Np)({loadingText:null}))}return i}}},43044:function(e,t,n){"use strict";n.r(t);n.d(t,{addGenericErrorNotification:function(){return a.R},addNotification:function(){return a.wN},applyBudgetAction:function(){return r.qu},closeAccount:function(){return r.Rc},closeAndDownloadBudget:function(){return T.S2},closeBudget:function(){return T.ej},closeBudgetUI:function(){return T.VM},closeModal:function(){return S.Mr},connectAccounts:function(){return p},connectGoCardlessAccounts:function(){return g},createAccount:function(){return r.o1},createBudget:function(){return T.xp},createCategory:function(){return r.k4},createGroup:function(){return r.sS},createPayee:function(){return r.fz},deleteBudget:function(){return T.sX},deleteCategory:function(){return r.uu},deleteGroup:function(){return r.iE},downloadBudget:function(){return T.g4},focused:function(){return E.si},forceCloseAccount:function(){return r.X_},getAccounts:function(){return r.T8},getCategories:function(){return r.CP},getPayees:function(){return r.WJ},getUserData:function(){return M.is},importBudget:function(){return T.ef},importTransactions:function(){return b},initiallyLoadPayees:function(){return r.Rr},linkAccount:function(){return h},loadAllFiles:function(){return T.nu},loadBackup:function(){return C},loadBudget:function(){return T.NK},loadBudgets:function(){return T.aK},loadGlobalPrefs:function(){return k.Pt},loadPrefs:function(){return k.D0},loadRemoteFiles:function(){return T.$u},loggedIn:function(){return M.Pl},makeBackup:function(){return j},markAccountFailed:function(){return s},markAccountRead:function(){return w},markAccountSuccess:function(){return u},moveCategory:function(){return r.Wr},moveCategoryGroup:function(){return r.eq},openAccountCloseModal:function(){return r.bJ},parseTransactions:function(){return y},popModal:function(){return S.GZ},pushModal:function(){return S.Ll},redo:function(){return r.KX},removeNotification:function(){return a.FV},reopenAccount:function(){return r.ly},replaceModal:function(){return S.OB},resetSync:function(){return D},saveGlobalPrefs:function(){return k.EY},savePrefs:function(){return k.p},setAccountsSyncing:function(){return l},setAppState:function(){return E.Np},setFailedAccounts:function(){return c},setLastTransaction:function(){return v},setLastUndoState:function(){return E.ht},setUndoEnabled:function(){return r.Ew},signOut:function(){return M.w7},sync:function(){return P},syncAccounts:function(){return m},syncAndDownload:function(){return O},undo:function(){return r.Yw},unlinkAccount:function(){return f},updateAccount:function(){return r.sG},updateApp:function(){return E.KT},updateCategory:function(){return r.yr},updateGroup:function(){return r.mD},updateNewTransactions:function(){return x},updateStatusText:function(){return T.Rb},uploadBudget:function(){return T.il},uploadFile:function(){return E.cT}});var r=n(13910);var o=n(84094);var i=n(62601);var a=n(50898);function l(e){return{type:i._V,name:e}}function s(e,t,n){return{type:"ACCOUNT_SYNC_STATUS",id:e,failed:true,errorType:t,errorCode:n}}function u(e){return{type:"ACCOUNT_SYNC_STATUS",id:e,failed:false}}function c(e){return{type:i.Co,syncErrors:e}}function f(e){return async t=>{await (0,o.lW)("account-unlink",{id:e});t(u(e));t((0,r.T8)())}}function h(e,t,n){return async i=>{await (0,o.lW)("gocardless-accounts-link",{requisitionId:e,account:t,upgradingId:n});await i((0,r.WJ)());await i((0,r.T8)())}}function p(e,t,n,i){return async a=>{let l=await (0,o.lW)("accounts-connect",{institution:e,publicToken:t,accountIds:n,offbudgetIds:i});await a((0,r.WJ)());await a((0,r.T8)());return l}}function g(e,t,n,i){return async a=>{let l=await (0,o.lW)("gocardless-accounts-connect",{institution:e,publicToken:t,accountIds:n,offbudgetIds:i});await a((0,r.WJ)());await a((0,r.T8)());return l}}function m(e){return async(t,n)=>{if(n().account.accountsSyncing){return false}if(e){let r=n().queries.accounts.find(t=>t.id===e);t(l(r.name))}else{t(l("__all"))}const{errors:r,newTransactions:f,matchedTransactions:h,updatedAccounts:p}=await (0,o.lW)("gocardless-accounts-sync",{id:e});t(l(null));if(e){let n=r.find(t=>t.accountId===e);if(n){if(n.type==="SyncError"){t(s(e,n.category,n.code))}}else{t(u(e))}}else{t(c(r.filter(e=>e.type==="SyncError").map(e=>({id:e.accountId,type:e.category,code:e.code}))))}r.forEach(e=>{if(e.type==="SyncError"){t((0,a.wN)({type:"error",message:e.message}))}else{t((0,a.wN)({type:"error",message:e.message,internal:e.internal}))}});t({type:i.GZ,newTransactions:f,matchedTransactions:h,updatedAccounts:p});return f.length>0||h.length>0}}function v(e){return{type:i.Vi,transaction:e}}function y(e,t){return async n=>{return await (0,o.lW)("transactions-parse-file",{filepath:e,options:t})}}function b(e,t){return async n=>{let{errors:r=[],added:l,updated:s}=await (0,o.lW)("transactions-import",{accountId:e,transactions:t});r.forEach(e=>{n((0,a.wN)({type:"error",message:e.message}))});n({type:i.GZ,newTransactions:l,matchedTransactions:s,updatedAccounts:l.length>0?[e]:[]});return l.length>0||s.length>0}}function x(e){return{type:i.kY,changedId:e}}function w(e){return{type:i.ER,accountId:e}}var S=n(24418);var k=n(50389);var T=n(99103);var E=n(13265);function C(e,t){return async(n,r)=>{const i=r().prefs.local;if(i&&i.id){await n((0,T.ej)())}await (0,o.lW)("backup-load",{id:e,backupId:t});n((0,T.NK)(e))}}function j(){return async(e,t)=>{const n=t().prefs.local;if(n&&n.id){await (0,o.lW)("backup-make",{id:n.id})}}}var I=n(40400);function D(){return async e=>{let{error:t}=await (0,o.lW)("sync-reset");if(t){alert((0,I.wg)(t));if(t.reason==="encrypt-failure"&&t.meta.isMissingKey||t.reason==="file-has-new-key"){e((0,S.Ll)("fix-encryption-key",{onSuccess:()=>{e(D())}}))}else if(t.reason==="encrypt-failure"){e((0,S.Ll)("create-encryption-key",{recreate:true}))}}else{await e(P());await e((0,k.D0)())}}}function P(){return async(e,t)=>{const n=t().prefs.local;if(n&&n.id){let e=await (0,o.lW)("sync");if("error"in e){return{error:e.error}}return{}}}}function O(e){return async t=>{let n=await t(P());if(n.error){return{error:n.error}}let r=await t(m(e));if(r){let e=await t(P());if(e.error){return{error:e.error}}return true}return{hasUpdated:r}}}var M=n(92178);},24418:function(e,t,n){"use strict";n.d(t,{GZ:function(){return a},Ll:function(){return o},Mr:function(){return l},OB:function(){return i}});var r=n(62601);function o(e,t){const n={name:e,options:t};return{type:r.jw,modal:n}}function i(e,t){let n={name:e,options:t};return{type:r.JA,modal:n}}function a(){return{type:r.TZ}}function l(){return{type:r.et}}},50898:function(e,t,n){"use strict";n.d(t,{FV:function(){return l},R:function(){return a},wN:function(){return i}});var r=n(26505);var o=n(62601);function i(e){return{type:o.Dv,notification:{...e,id:e.id||(0,r.Z)()}}}function a(){return i({type:"error",message:"Something internally went wrong. You may want to restart the app if anything looks wrong. "+"Please report this as a new issue on Github."})}function l(e){return{type:o.Kf,id:e}}},50389:function(e,t,n){"use strict";n.d(t,{D0:function(){return a},EY:function(){return u},Pt:function(){return s},p:function(){return l}});var r=n(84094);var o=n(62601);var i=n(24418);function a(){return async(e,t)=>{let n=await (0,r.lW)("load-prefs");let a=t().prefs.local;if(n&&n.id&&!a){e((0,i.Mr)())}e({type:o.px,prefs:n,globalPrefs:await (0,r.lW)("load-global-prefs")});return n}}function l(e){return async t=>{await (0,r.lW)("save-prefs",e);t({type:o.uF,prefs:e})}}function s(){return async(e,t)=>{let n=await (0,r.lW)("load-global-prefs");e({type:o.px,prefs:t().prefs.local,globalPrefs:n});return n}}function u(e){return async t=>{await (0,r.lW)("save-global-prefs",e);t({type:o.CH,globalPrefs:e})}}},13910:function(e,t,n){"use strict";n.d(t,{CP:function(){return c},Ew:function(){return _},KX:function(){return A},Rc:function(){return j},Rr:function(){return w},T8:function(){return k},WJ:function(){return x},Wr:function(){return g},X_:function(){return D},Yw:function(){return R},bJ:function(){return C},eq:function(){return m},fz:function(){return S},iE:function(){return b},k4:function(){return f},ly:function(){return I},mD:function(){return y},o1:function(){return E},qu:function(){return u},sG:function(){return T},sS:function(){return v},uu:function(){return h},yr:function(){return p}});var r=n(49090);var o=n.n(r);var i=n(84094);var a=n(62601);var l=n(24418);var s=n(50898);function u(e,t,n){return async r=>{switch(t){case"budget-amount":await (0,i.lW)("budget/budget-amount",{month:e,category:n.category,amount:n.amount});break;case"copy-last":await (0,i.lW)("budget/copy-previous-month",{month:e});break;case"set-zero":await (0,i.lW)("budget/set-zero",{month:e});break;case"set-3-avg":await (0,i.lW)("budget/set-3month-avg",{month:e});break;case"check-templates":r((0,s.wN)(await (0,i.lW)("budget/check-templates")));break;case"apply-goal-template":await (0,i.lW)("budget/apply-goal-template",{month:e});break;case"overwrite-goal-template":await (0,i.lW)("budget/overwrite-goal-template",{month:e});break;case"cleanup-goal-template":r((0,s.wN)(await (0,i.lW)("budget/cleanup-goal-template",{month:e})));break;case"hold":await (0,i.lW)("budget/hold-for-next-month",{month:e,amount:n.amount});break;case"reset-hold":await (0,i.lW)("budget/reset-hold",{month:e});break;case"cover":await (0,i.lW)("budget/cover-overspending",{month:e,to:n.to,from:n.from});break;case"transfer-available":await (0,i.lW)("budget/transfer-available",{month:e,amount:n.amount,category:n.category});break;case"transfer-category":await (0,i.lW)("budget/transfer-category",{month:e,amount:n.amount,from:n.from,to:n.to});break;case"carryover":{await (0,i.lW)("budget/set-carryover",{startMonth:e,category:n.category,flag:n.flag});break}case"apply-single-category-template":await (0,i.lW)("budget/apply-single-template",{month:e,category:n.category});break;case"set-single-3-avg":await (0,i.lW)("budget/set-n-month-avg",{month:e,N:3,category:n.category});break;case"set-single-6-avg":await (0,i.lW)("budget/set-n-month-avg",{month:e,N:6,category:n.category});break;case"set-single-12-avg":await (0,i.lW)("budget/set-n-month-avg",{month:e,N:12,category:n.category});break;case"copy-single-last":await (0,i.lW)("budget/copy-single-month",{month:e,category:n.category});break;default:}}}function c(){return async e=>{const t=await (0,i.lW)("get-categories");e({type:a.X6,categories:t});return t}}function f(e,t,n){return async r=>{let o=await (0,i.lW)("category-create",{name:e,groupId:t,isIncome:n});r(c());return o}}function h(e,t){return async n=>{let{error:r}=await (0,i.lW)("category-delete",{id:e,transferId:t});if(r){switch(r){case"category-type":n((0,s.wN)({type:"error",message:"A category must be transferred to another of the same type (expense or income)"}));break;default:n((0,s.R)())}throw new Error(r)}else{n(c());n(x())}}}function p(e){return async t=>{await (0,i.lW)("category-update",e);t(c())}}function g(e,t,n){return async r=>{await (0,i.lW)("category-move",{id:e,groupId:t,targetId:n});await r(c())}}function m(e,t){return async n=>{await (0,i.lW)("category-group-move",{id:e,targetId:t});await n(c())}}function v(e){return async t=>{let n=await (0,i.lW)("category-group-create",{name:e});t(c());return n}}function y(e){const{categories:t,...n}=e;return async e=>{await (0,i.lW)("category-group-update",n);await e(c())}}function b(e,t){return async function(n,r){await (0,i.lW)("category-group-delete",{id:e,transferId:t});await n(c());await n(x())}}function x(){return async e=>{let t=await (0,i.lW)("payees-get");e({type:a.gp,payees:t});return t}}function w(){return async(e,t)=>{if(t().queries.payees.length===0){return e(x())}}}function S(e){return async()=>{return(0,i.lW)("payee-create",{name:e.trim()})}}function k(){return async e=>{const t=await (0,i.lW)("accounts-get");e({type:a.WF,accounts:t});return t}}function T(e){return async t=>{t({type:a.$E,account:e});await (0,i.lW)("account-update",e)}}function E(e,t,n){return async r=>{let o=await (0,i.lW)("account-create",{name:e,balance:t,offBudget:n});await r(k());await r(x());return o}}function C(e){return async(t,n)=>{const{balance:r,numTransactions:o}=await (0,i.lW)("account-properties",{id:e});const a=n().queries.accounts.find(t=>t.id===e);t((0,l.Ll)("close-account",{account:a,balance:r,canDelete:o===0}))}}function j(e,t,n,r){return async o=>{await (0,i.lW)("account-close",{id:e,transferAccountId:t,categoryId:n,forced:r});o(k())}}function I(e){return async t=>{await (0,i.lW)("account-reopen",{id:e});t(k())}}function D(e){return j(e,null,null,true)}let P=o()(()=>(0,i.lW)("undo"),100);let O=o()(()=>(0,i.lW)("redo"),100);let M=true;function _(e){M=e}function R(){return async()=>{if(M){P()}}}function A(){return async()=>{if(M){O()}}}},92178:function(e,t,n){"use strict";n.d(t,{Pl:function(){return s},is:function(){return l},w7:function(){return u}});var r=n(84094);var o=n(62601);var i=n(99103);var a=n(50389);function l(){return async e=>{const t=await (0,r.lW)("subscribe-get-user");e({type:o.q1,data:t});return t}}function s(){return async e=>{await e(l());e((0,i.nu)())}}function u(){return async e=>{await (0,r.lW)("subscribe-sign-out");e(l());e((0,a.Pt)());e((0,i.ej)());e({type:o.dp})}}},62601:function(e,t,n){"use strict";n.d(t,{$E:function(){return s},CH:function(){return p},Co:function(){return O},DC:function(){return y},Dv:function(){return T},ER:function(){return a},GY:function(){return v},GZ:function(){return r},HT:function(){return j},JA:function(){return w},Kf:function(){return E},Oi:function(){return m},TZ:function(){return k},Ud:function(){return g},VM:function(){return I},Vi:function(){return i},WF:function(){return l},X6:function(){return u},_V:function(){return D},cV:function(){return P},dp:function(){return M},et:function(){return S},gp:function(){return c},jw:function(){return x},kY:function(){return o},px:function(){return f},q1:function(){return C},uF:function(){return h},wH:function(){return b}});const r="SET_NEW_TRANSACTIONS";const o="UPDATE_NEW_TRANSACTIONS";const i="SET_LAST_TRANSACTION";const a="MARK_ACCOUNT_READ";const l="LOAD_ACCOUNTS";const s="UPDATE_ACCOUNT";const u="LOAD_CATEGORIES";const c="LOAD_PAYEES";const f="SET_PREFS";const h="MERGE_LOCAL_PREFS";const p="MERGE_GLOBAL_PREFS";const g="SET_BUDGETS";const m="SET_REMOTE_FILES";const v="SET_ALL_FILES";const y="CLOSE_BUDGET";const b="SET_APP_STATE";const x="PUSH_MODAL";const w="REPLACE_MODAL";const S="CLOSE_MODAL";const k="POP_MODAL";const T="ADD_NOTIFICATION";const E="REMOVE_NOTIFICATION";const C="GET_USER_DATA";const j="SET_LAST_UNDO_STATE";const I="SET_LAST_SPLIT_STATE";const D="SET_ACCOUNTS_SYNCING";const P="ACCOUNT_SYNC_STATUS";const O="ACCOUNT_SYNC_FAILURES";const M="SIGN_OUT"},99548:function(e,t,n){"use strict";n.d(t,{BB:function(){return u},Re:function(){return c},gM:function(){return f}});var r=n(66204);var o=n(10959);var i=n(69304);var a=n(18748);function l(){return(0,i.y)(()=>(0,o.ZP)("accounts").select("*"),[])}const s=(0,r.createContext)(null);function u({children:e}){const t=l();return r.createElement(s.Provider,{value:t,children:e})}function c({children:e,idKey:t}){const n=f({idKey:t});return e(n)}function f({idKey:e}={}){const t=(0,r.useContext)(s);return e&&t?(0,a.gI)(t):t}},17853:function(e,t,n){"use strict";n.d(t,{m:function(){return l}});var r=n(66204);var o=n(10959);var i=n(69304);function a(e){let t=e.map(e=>{return{...e.fields,id:e.id,name:e.name,tombstone:e.tombstone,conditionsOp:e.conditions_op,conditions:e.conditions}});return t}function l(){const e=a((0,i.y)(()=>(0,o.ZP)("transaction_filters").select("*"),[])||[]);function t(e){return e.sort((e,t)=>e.name.trim().localeCompare(t.name.trim(),{ignorePunctuation:true}))}return(0,r.useMemo)(()=>t(e),[e])}},68761:function(e,t,n){"use strict";n.d(t,{Zr:function(){return u},mp:function(){return c},n4:function(){return f}});var r=n(66204);var o=n(10959);var i=n(69304);var a=n(18748);function l(){return(0,i.y)(()=>(0,o.ZP)("payees").select("*"),[])}const s=(0,r.createContext)(null);function u({children:e}){const t=l();return r.createElement(s.Provider,{value:t,children:e})}function c({children:e,idKey:t}){const n=f({idKey:t});return e(n)}function f({idKey:e}={}){const t=(0,r.useContext)(s);return e&&t?(0,a.yG)(t):t}},62829:function(e,t,n){"use strict";n.d(t,{gZ:function(){return l},oF:function(){return c},up:function(){return u}});var r=n(66204);var o=n(11504);var i=n(10959);function a(e,t){return(0,i.Y1)((0,o.eJ)(e),t,{mapper:t=>{let n=new Set(t.filter(Boolean).map(e=>e.schedule));return new Map(e.map(e=>[e.id,(0,o.lR)(e.next_date,e.completed,n.has(e.id))]))}})}function l({transform:e}={}){const[t,n]=(0,r.useState)(null);(0,r.useEffect)(()=>{const t=(0,i.ZP)("schedules").select("*");let r,o;r=(0,i.Y1)(e?e(t):t,async e=>{if(r){if(o){o.unsubscribe()}o=a(e,t=>n({schedules:e,statuses:t}))}});return()=>{if(r){r.unsubscribe()}if(o){o.unsubscribe()}}},[e]);return t}let s=(0,r.createContext)(null);function u({transform:e,children:t}){const n=l({transform:e});return r.createElement(s.Provider,{value:n,children:t})}function c(){return(0,r.useContext)(s)}},67238:function(e,t,n){"use strict";n.d(t,{$8:function(){return i},OB:function(){return l},OS:function(){return a},jU:function(){return s}});const r=navigator.platform&&navigator.platform.toLowerCase()==="win32";const o=navigator.platform&&navigator.platform.toUpperCase().indexOf("MAC")>=0;const i=navigator.userAgent==="playwright";const a=r?"windows":o?"mac":"linux";const l="web";const s=true},46055:function(e,t,n){"use strict";n.d(t,{An:function(){return g},Gm:function(){return h},PK:function(){return s},SZ:function(){return p},aK:function(){return b},cW:function(){return f},jS:function(){return c},sX:function(){return y},u8:function(){return x},yf:function(){return u}});var r=n(8780);var o=n(25432);var i=n(73416);var a=n(63654);var l=n(89362);function s(e,t="account"){if(e){if(e==="budgeted"){return{[`${t}.offbudget`]:false,[`${t}.closed`]:false}}else if(e==="offbudget"){return{[`${t}.offbudget`]:true,[`${t}.closed`]:false}}else if(e==="uncategorized"){return{[`${t}.offbudget`]:false,category:null,is_parent:false,$or:[{"payee.transfer_acct.offbudget":true,"payee.transfer_acct":null}]}}else{return{[t]:e}}}return null}function u(e){let t=(0,a.ZP)("transactions").options({splits:"grouped"});let n=s(e);if(n){t=t.filter(n)}return t}function c(e,t,n){let a=(0,l.Dz)(t);let s;if((0,i.Ze)(n).test(t)){s=(0,r.Z)(t,(0,i.D1)(n),new Date)}else if((0,i._y)(n).test(t)){s=(0,r.Z)(t,(0,i.JC)(n),new Date)}else{s=(0,r.Z)(t,n,new Date)}return e.filter({$or:{"payee.name":{$like:`%${t}%`},notes:{$like:`%${t}%`},"category.name":{$like:`%${t}%`},"account.name":{$like:`%${t}%`},$or:[(0,o.Z)(s)&&{date:(0,i.is)(s)},a!=null&&{amount:{$transform:"$abs",$eq:(0,l.l9)(a)}},a!=null&&Number.isInteger(a)&&{amount:{$transform:{$abs:{$idiv:["$",100]}},$eq:a}}].filter(Boolean)}})}function f(e){return{name:`balance-${e.id}`,query:(0,a.ZP)("transactions").filter({account:e.id}).options({splits:"none"}).calculate({$sum:"$amount"})}}function h(){return{query:(0,a.ZP)("transactions").filter({"account.closed":false}).calculate({$sum:"$amount"}),name:"accounts-balance"}}function p(){return{name:`budgeted-accounts-balance`,query:(0,a.ZP)("transactions").filter({"account.offbudget":false,"account.closed":false}).calculate({$sum:"$amount"})}}function g(){return{name:`offbudget-accounts-balance`,query:(0,a.ZP)("transactions").filter({"account.offbudget":true,"account.closed":false}).calculate({$sum:"$amount"})}}let m=(0,a.ZP)("transactions").filter({"account.offbudget":false,category:null,$or:[{"payee.transfer_acct.offbudget":true,"payee.transfer_acct":null}]});function v(){return{name:"uncategorized-balance",query:m.calculate({$sum:"$amount"})}}function y(){return{name:"uncategorized-amount",query:m.calculate({$count:"$id"})}}const b={incomeAvailable:"available-funds",lastMonthOverspent:"last-month-overspent",forNextMonth:"buffered",totalBudgeted:"total-budgeted",toBudget:"to-budget",fromLastMonth:"from-last-month",totalIncome:"total-income",totalSpent:"total-spent",totalBalance:"total-leftover",groupSumAmount:e=>`group-sum-amount-${e}`,groupIncomeReceived:"total-income",groupBudgeted:e=>`group-budget-${e}`,groupBalance:e=>`group-leftover-${e}`,catBudgeted:e=>`budget-${e}`,catSumAmount:e=>`sum-amount-${e}`,catBalance:e=>`leftover-${e}`,catCarryover:e=>`carryover-${e}`};const x={totalBudgetedExpense:"total-budgeted",totalBudgetedIncome:"total-budget-income",totalBudgetedSaved:"total-saved",totalIncome:"total-income",totalSpent:"total-spent",totalSaved:"real-saved",totalLeftover:"total-leftover",groupSumAmount:e=>`group-sum-amount-${e}`,groupIncomeReceived:"total-income",groupBudgeted:e=>`group-budget-${e}`,groupBalance:e=>`group-leftover-${e}`,catBudgeted:e=>`budget-${e}`,catSumAmount:e=>`sum-amount-${e}`,catBalance:e=>`leftover-${e}`,catCarryover:e=>`carryover-${e}`}},10959:function(e,t,n){"use strict";n.d(t,{Zn:function(){return f},ZP:function(){return l},Y1:function(){return u},Fr:function(){return c},Vn:function(){return s}});var r=n(84094);function o(e){let t={running:null,queue:[]};function n(){if(t.queue.length>0){const e=t.queue.shift();r(e.args,e.resolve,e.reject)}else{t.running=null}}function r(r,o,i){t.running=e(...r);t.running.then(e=>{n();o(e)},e=>{n();i(e)})}return(...e)=>{if(!t.running){return new Promise((t,n)=>{return r(e,t,n)})}else{return new Promise((n,r)=>{t.queue.push({resolve:n,reject:r,args:e})})}}}function i(e){let t=null;let n=(...n)=>{if(!t){t=e(...n).finally(()=>{t=null});return t}return t};return n}var a=n(63654);var l=a.ZP;async function s(e){return(0,r.lW)("query",e.serialize())}function u(e,t,n){let r=new f(e,t,n);r.run();return r}function c(e,t,n){let r=new h(e,t,n);r.run();return r}class f{_unsubscribe;data;dependencies;error;listeners;mappedData;mapper;onlySync;query;inflight;inflightRequestId;restart;constructor(e,t,n={}){this.error=new Error;this.query=e;this.data=null;this.mappedData=null;this.dependencies=null;this.mapper=n.mapper;this.onlySync=n.onlySync;this.listeners=[];this.inflight=false;this.restart=false;if(t){this.addListener(t)}}addListener(e){this.listeners.push(e);return()=>{this.listeners=this.listeners.filter(t=>t!==e)}}onData=(e,t)=>{for(let n=0;n<this.listeners.length;n++){this.listeners[n](e,t)}};onUpdate=e=>{if(this.dependencies==null||e.find(e=>this.dependencies.has(e))){this.run()}};run=()=>{this.subscribe();return this._fetchData(()=>s(this.query))};_fetchData=async e=>{let t=Math.random();this.inflightRequestId=t;let{data:n,dependencies:r}=await e();if(this.dependencies==null){this.dependencies=new Set(r)}if(this.inflightRequestId===t&&this._unsubscribe){let e=this.mappedData;this.data=n;this.mappedData=this.mapData(n);this.onData(this.mappedData,e);this.inflightRequestId=null}};subscribe=()=>{if(this._unsubscribe==null){this._unsubscribe=(0,r.oL)("sync-event",({type:e,tables:t})=>{let n=this.onlySync?["success"]:["applied","success"];if(n.indexOf(e)!==-1){this.onUpdate(t)}})}};unsubscribe=()=>{if(this._unsubscribe){this._unsubscribe();this._unsubscribe=null}};mapData=e=>{if(this.mapper){return this.mapper(e)}return e};getQuery=()=>{return this.query};getData=()=>{return this.mappedData};getNumListeners=()=>{return this.listeners.length};isRunning=()=>{return this._unsubscribe!=null};_optimisticUpdate=(e,t)=>{this.data=e(this.data);this.mappedData=t(this.mappedData)};optimisticUpdate=(e,t)=>{let n=this.mappedData;this._optimisticUpdate(e,t);this.onData(this.mappedData,n)}}class h extends f{done;onPageData;pageCount;runPromise;totalCount;constructor(e,t,n={}){super(e,t,n);this.totalCount=null;this.pageCount=n.pageCount||500;this.runPromise=null;this.done=false;this.onPageData=n.onPageData||(()=>{})}_fetchCount=()=>{return s(this.query.calculate({$count:"*"})).then(({data:e})=>{this.totalCount=e})};run=()=>{this.subscribe();this.runPromise=this._fetchData(async()=>{this.done=false;this._fetchCount();return s(this.query.limit(this.data==null?this.pageCount:Math.max(this.data.length,this.pageCount)))});return this.runPromise};refetchUpToRow=async(e,t)=>{this.runPromise=this._fetchData(async()=>{this.done=false;this._fetchCount();let n=(0,a.zW)(this.query,t);if(n==null){throw new Error(`refetchUpToRow requires a query with orderBy`)}let{field:r,order:o}=n;let i=await s(this.query.filter({id:e}).select(r));if(i.data.length===0){return}let l=i.data[0];i=await s(this.query.filter({[r]:{[o==="asc"?"$lte":"$gte"]:l[r]}}));let u=i.data;i=await s(this.query.filter({[r]:{[o==="asc"?"$gt":"$lt"]:l[r]}}).limit(this.pageCount));return{data:u.concat(i.data),dependencies:i.dependencies}});return this.runPromise};_fetchNext=async()=>{while(this.inflightRequestId){await this.runPromise}let e=this.data;if(!this.done){let{data:t}=await s(this.query.limit(this.pageCount).offset(e.length));if(this.inflightRequestId||e!==this.data){return this._fetchNext()}else{if(t.length===0){this.done=true}else{this.done=t.length<this.pageCount;this.data=this.data.concat(t);let e=this.mappedData;let n=this.mapData(t);this.mappedData=this.mappedData.concat(n);this.onPageData(n);this.onData(this.mappedData,e)}}}};fetchNext=i(this._fetchNext);isFinished=()=>{return this.done};getTotalCount=()=>{return this.totalCount};optimisticUpdate=(e,t)=>{let n=this.data;let r=this.mappedData;this._optimisticUpdate(e,t);this.totalCount+=this.data.length-n.length;this.onData(this.mappedData,r)}}},69304:function(e,t,n){"use strict";n.d(t,{n:function(){return a},y:function(){return l}});var r=n(66204);var o=n(10959);function i(e,t,n){let o=new n(e,null,t);let i=(0,r.createContext)(null);function a({children:e}){let[t,n]=(0,r.useState)(o.getData());let a=(0,r.useMemo)(()=>({data:t,query:o}),[t,o]);(0,r.useEffect)(()=>{if(o.getNumListeners()!==0){throw new Error("Query already has listeners. You cannot use the same query context `Provider` twice")}let e=o.addListener(e=>n(e));if(!o.isRunning()){o.run()}n(o.getData());return()=>{e();o.unsubscribe()}},[]);return r.createElement(i.Provider,{value:a,children:e})}function l(){let e=(0,r.useContext)(i);if(e==null){throw new Error("`useQuery` tried to access a query that hasn’t been run. You need to put its `Provider` in a parent component")}return e}return{Provider:a,useQuery:l}}function a(e,t){return i(e,t,o.Zn)}function l(e,t){let[n,i]=(0,r.useState)(null);let a=(0,r.useMemo)(e,t);(0,r.useEffect)(()=>{let e=(0,o.Y1)(a,async t=>{if(e){i(t)}});return()=>{e.unsubscribe();e=null}},[a]);return n}},18748:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l},ch:function(){return c},gI:function(){return s},nc:function(){return f},yG:function(){return u}});var r=n(99024);var o=n(89362);var i=n(62601);const a={newTransactions:[],matchedTransactions:[],lastTransaction:null,updatedAccounts:[],accounts:[],categories:{grouped:[],list:[]},payees:[],earliestTransaction:null};function l(e=a,t){switch(t.type){case i.GZ:return{...e,newTransactions:t.newTransactions||[],matchedTransactions:t.matchedTransactions||[],updatedAccounts:t.updatedAccounts||[]};case i.kY:return{...e,newTransactions:e.newTransactions.filter(e=>e!==t.changedId),matchedTransactions:e.matchedTransactions.filter(e=>e!==t.changedId)};case i.Vi:return{...e,lastTransaction:t.transaction};case i.ER:return{...e,updatedAccounts:e.updatedAccounts.filter(e=>e!==t.accountId)};case i.WF:return{...e,accounts:t.accounts};case i.$E:{return{...e,accounts:e.accounts.map(e=>{if(e.id===t.account.id){return{...e,...t.account}}return e})}}case i.X6:return{...e,categories:t.categories};case i.gp:return{...e,payees:t.payees};default:}return e}const s=(0,r.Z)(e=>(0,o.ZZ)(e));const u=(0,r.Z)(e=>(0,o.ZZ)(e));const c=(0,r.Z)(e=>{let t={};e.forEach(e=>{e.categories.forEach(e=>{t[e.id]=e})});return t});const f=(0,r.Z)((e,t)=>{let n=s(t);return e.filter(e=>{if(e.transfer_acct){let t=n[e.transfer_acct];return t!=null&&!t.closed}return true})})},84094:function(e,t,n){"use strict";n.d(t,{S1:function(){return g},oL:function(){return y},lW:function(){return m},OK:function(){return v},Ev:function(){return b}});var r=n(26505);const o=function(e){console.log("[Exception]",e)};const i=function(e){};var a=n(57555);let l=new Map;let s=new Map;let u=[];let c=null;class f extends Error{url;line;column;constructor(e,t,n,r,o){super(e);this.name=this.constructor.name;this.message=e;Object.defineProperty(this,"stack",{get:function(){return"extended "+this._stack},set:function(e){this._stack=e}});this.stack=t;this.url=n;this.line=r;this.column=o}}function h(e){if(e.type==="error"){const{id:t}=e;l.delete(t)}else if(e.type==="reply"){const{id:t,result:n,mutated:r,undoTag:o}=e;const i=l.get(t);if(i){l.delete(t);if(!r){a.gc(o)}i.resolve(n)}}else if(e.type==="push"){const{name:t,args:n}=e;const r=s.get(t);if(r){for(let e=0;e<r.length;e++){let t=r[e](n);if(t===true){break}}}}else{if(!e.type.startsWith("__")){throw new Error("Unknown message type: "+JSON.stringify(e))}}}function p(e,t,n){c=e;e.onmessage=r=>{let a=r.data;if(a.type==="connect"){if(u.length>0){u.forEach(t=>e.postMessage(t));u=null}t()}else if(a.type==="app-init-failure"){n(a)}else if(a.type==="capture-exception"){o(a.stack?new f(a.message,a.stack,a.url,a.line,a.column):a.exc);if(a.message&&a.message.includes("indexeddb-quota-error")){alert("We hit a limit on the local storage available. Edits may not be saved. Please get in touch https://actualbudget.org/contact/ so we can help debug this.")}}else if(a.type==="capture-breadcrumb"){i(a.data)}else{h(a)}};if(e instanceof MessagePort){e.start()}}const g=async function(e){return new Promise((t,n)=>p(e,t,n))};const m=function(e,t,{catchErrors:n=false}={}){return new Promise((o,i)=>{let s=(0,r.Z)();l.set(s,{resolve:o,reject:i});let f={id:s,name:e,args:t,undoTag:a.CO(),catchErrors:n};if(u){u.push(f)}else{c.postMessage(f)}})};const v=function(e,t){return m(e,t,{catchErrors:true})};const y=function(e,t){if(!s.get(e)){s.set(e,[])}s.get(e).push(t);return()=>{let n=s.get(e);s.set(e,n.filter(e=>e!==t))}};const b=function(e){s.set(e,[])};const x=async function(){}},57555:function(e,t,n){"use strict";n.d(t,{CO:function(){return c},a2:function(){return s},gc:function(){return f},kp:function(){return l},r8:function(){return u}});var r=n(26505);let o=40;let i=[];let a={url:null,openModal:null,selectedItems:null};const l=function(e,t){a[e]=t;a.id=(0,r.Z)()};const s=function(e){return a[e]};const u=function(e){return i.find(t=>t.id===e)};const c=function(){let e={...a,id:(0,r.Z)()};i.unshift(e);i=i.slice(0,o);return e.id};const f=function(e){i=i.filter(t=>t.id!==e)}},50102:function(e,t,n){"use strict";n.d(t,{Ry:function(){return i},d:function(){return a}});function r(){return String({"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_BACKEND_WORKER_HASH":"b835d2cdcf8004c363da"}.REACT_APP_NETLIFY)==="true"}function o(){return"production"==="development"}function i(){return r()||o()}function a(){if(navigator.userAgent.indexOf("Electron")>=0){return true}return false}},40400:function(e,t,n){"use strict";n.d(t,{Ez:function(){return a},FL:function(){return l},Ip:function(){return o},wg:function(){return r},zJ:function(){return i}});function r({reason:e,meta:t}){switch(e){case"unauthorized":return"You are not logged in.";case"encrypt-failure":if(t.isMissingKey){return"Encrypting your file failed because you are missing your encryption key. Create your key in the next step."}return"Encrypting the file failed. You have the correct key so this is an internal bug. To fix this, generate a new key in the next step.";case"file-has-reset":return"Something went wrong while resetting your file. Please try again.";case"file-has-new-key":return"Unable to encrypt your data because you are missing the key. Create the latest key in the next step.";case"network":return"Uploading the file failed. Check your network connection.";default:return`An internal error occurred, sorry! Visit https://actualbudget.org/contact/ for support. (ref: ${e})`}}function o({reason:e,meta:t,fileName:n}){switch(e){case"network":case"download-failure":return"Downloading the file failed. Check your network connection.";case"not-zip-file":case"invalid-zip-file":case"invalid-meta-file":return"Downloaded file is invalid, sorry! Visit https://actualbudget.org/contact/ for support.";case"decrypt-failure":return"Unable to decrypt file "+(n||"(unknown)")+". To change your key, first "+"download this file with the proper password.";case"out-of-sync-migrations":return"This budget cannot be loaded with this version of the app. "+"Make sure the app is up-to-date.";default:let r=t&&t.fileId?`, fileId: ${t.fileId}`:"";return"Something went wrong trying to download that file, sorry! "+"Visit https://actualbudget.org/contact/ for support. "+`(reason: ${e}${r})`}}function i(e){return r(e)}function a({reason:e}){switch(e){case"network":return"Unable to connect to the server. We need to access the server to get some information about your keys.";case"old-key-style":return"This file is encrypted with an old unsupported key style. Recreate the key "+"on a device where the file is available, or use an older version of Actual to download "+"it.";case"decrypt-failure":return"Unable to decrypt file with this password. Please try again.";default:return"Something went wrong trying to create a key, sorry! Visit https://actualbudget.org/contact/ for support."}}function l(e,t){if(e==="out-of-sync-migrations"||e==="out-of-sync-data"){return"This budget cannot be loaded with this version of the app."}else if(e==="budget-not-found"){return`Budget “${t}” not found. Check the id of your budget in the Advanced section of the settings page.`}else{return`We had an unknown problem opening “${t}”.`}}},73416:function(e,t,n){"use strict";n.d(t,{E4:function(){return O},zI:function(){return j},cQ:function(){return k},PR:function(){return T},dK:function(){return S},is:function(){return w},Gn:function(){return W},WU:function(){return Y},D1:function(){return Q},Ze:function(){return X},jw:function(){return H},LT:function(){return J},JC:function(){return et},_y:function(){return en},So:function(){return z},Ax:function(){return R},DT:function(){return x},dy:function(){return C},Do:function(){return L},cv:function(){return V},kw:function(){return M},W9:function(){return P}});var r=n(79982);var o=n(8780);var i=n(71578);var a=n(2864);var l=n(78354);function s(e,t){(0,l.Z)(2,arguments);var n=(0,a.Z)(e);var r=(0,i.Z)(t);if(isNaN(r)){return new Date(NaN)}if(!r){return n}var o=n.getDate();var s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var u=s.getDate();if(o>=u){return s}else{n.setFullYear(s.getFullYear(),s.getMonth(),o);return n}};function u(e,t){(0,l.Z)(2,arguments);var n=(0,i.Z)(t);return s(e,-n)}var c=n(82862);var f=n(28548);function h(e,t){(0,l.Z)(2,arguments);var n=(0,a.Z)(e);var r=(0,a.Z)(t);return n.getTime()>r.getTime()};function p(e,t){(0,l.Z)(2,arguments);var n=(0,a.Z)(e);var r=(0,a.Z)(t);return n.getTime()<r.getTime()}var g=n(99024);var m=n(67238);function v(e){if(typeof e==="string"){let[t,n,r]=e.split("-");if(r!=null){return new Date(parseInt(t),parseInt(n)-1,parseInt(r),12)}else if(n!=null){return new Date(parseInt(t),parseInt(n)-1,1,12)}else{return new Date(parseInt(t),0,1,12)}}if(typeof e==="number"){return new Date(e)}return e}const y=null&&v;function b(e){return d.format(v(e),"yyyy")}function x(e){return r.Z(v(e),"yyyy-MM")}function w(e){return r.Z(v(e),"yyyy-MM-dd")}function S(){if(n.g.IS_TESTING||m.$8){return n.g.currentMonth||"2017-01"}else{return r.Z(new Date,"yyyy-MM")}}function k(){if(n.g.IS_TESTING||m.$8){return o.Z(T(),"yyyy-MM-dd",new Date)}return new Date}function T(){if(n.g.IS_TESTING||m.$8){return"2017-01-01"}else{return r.Z(new Date,"yyyy-MM-dd")}}function E(e){return d.format(d.addMonths(v(e),1),"yyyy-MM")}function C(e){return r.Z(u(v(e),1),"yyyy-MM")}function j(e,t){return r.Z(s(v(e),t),"yyyy-MM")}function I(e,t){return d.format(d.addWeeks(v(e),t),"yyyy-MM-dd")}function D(e,t){return d.differenceInCalendarMonths(v(e),v(t))}function P(e,t){return r.Z(u(v(e),t),"yyyy-MM")}function O(e,t){return r.Z(c.Z(v(e),t),"yyyy-MM-dd")}function M(e,t){return r.Z(f.Z(v(e),t),"yyyy-MM-dd")}function _(e,t){return d.isBefore(v(e),v(t))}function R(e,t){return h(v(e),v(t))}function A(e){return{start:parseInt(d.format(d.startOfMonth(v(e)),"yyyyMMdd")),end:parseInt(d.format(d.endOfMonth(v(e)),"yyyyMMdd"))}}function N(e,t,n=false){const r=[];let o=x(e);while(p(v(o),v(t))){r.push(o);o=j(o,1)}if(n){r.push(o)}return r}function Z(e,t){return N(e,t)}function L(e,t){return N(e,t,true)}function B(e,t,n=false){const r=[];let o=e;while(p(v(o),v(t))){r.push(o);o=O(o,1)}if(n){r.push(o)}return r}function F(e,t){return B(e,t)}function W(e,t){return B(e,t,true)}function U(e){return parseInt(e.slice(5,7))-1}function z(e){return e.slice(0,4)}function H(e){return e.slice(0,7)}function K(e){return z(e)+"-01"}function $(e){return z(e)+"-12"}function V(e){return"budget"+e.replace("-","")}function q(e){return d.format(v(e),"MMMM 'yy")}function Y(e,t){return r.Z(v(e),t)}const G=(0,g.Z)(e=>{return new RegExp(e.replace(/d+/g,"\\d{1,2}").replace(/M+/g,"\\d{1,2}").replace(/y+/g,"\\d{4}"))});const Q=(0,g.Z)(e=>{return e.replace(/y+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,"")});const X=(0,g.Z)(e=>{let t=e.replace(/y+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/d+/g,"\\d{1,2}").replace(/M+/g,"\\d{1,2}");return new RegExp("^"+t+"$")});const J=(0,g.Z)(e=>{return e.replace(/d+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/\/\//,"/").replace(/\.\./,".").replace(/--/,"-")});const ee=(0,g.Z)(e=>{let t=e.replace(/d+/g,"").replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/\/\//,"/").replace(/M+/g,"\\d{1,2}").replace(/y+/g,"\\d{2,4}");return new RegExp("^"+t+"$")});const et=(0,g.Z)(e=>{return e.replace(/y+/g,"yy")});const en=(0,g.Z)(e=>{let t=e.replace(/[^\w]$/,"").replace(/^[^\w]/,"").replace(/d+/g,"\\d{1,2}").replace(/M+/g,"\\d{1,2}").replace(/y+/g,"\\d{2}");return new RegExp("^"+t+"$")})},63654:function(e,t,n){"use strict";n.d(t,{ZP:function(){return i},zW:function(){return o}});class r{state;constructor(e){this.state={filterExpressions:e.filterExpressions||[],selectExpressions:e.selectExpressions||[],groupExpressions:e.groupExpressions||[],orderExpressions:e.orderExpressions||[],calculation:false,rawMode:false,withDead:false,validateRefs:true,limit:null,offset:null,...e}}filter(e){return new r({...this.state,filterExpressions:[...this.state.filterExpressions,e]})}unfilter(e){let t=new Set(e);return new r({...this.state,filterExpressions:this.state.filterExpressions.filter(e=>!t.has(Object.keys(e)[0]))})}select(e=[]){if(!Array.isArray(e)){e=[e]}let t=new r({...this.state,selectExpressions:e});t.state.calculation=false;return t}calculate(e){let t=this.select({result:e});t.state.calculation=true;return t}groupBy(e){if(!Array.isArray(e)){e=[e]}return new r({...this.state,groupExpressions:[...this.state.groupExpressions,...e]})}orderBy(e){if(!Array.isArray(e)){e=[e]}return new r({...this.state,orderExpressions:[...this.state.orderExpressions,...e]})}limit(e){return new r({...this.state,limit:e})}offset(e){return new r({...this.state,offset:e})}raw(){return new r({...this.state,rawMode:true})}withDead(){return new r({...this.state,withDead:true})}withoutValidatedRefs(){return new r({...this.state,validateRefs:false})}options(e){return new r({...this.state,tableOptions:e})}serialize(){return this.state}}function o(e,t){let n=e.serialize().orderExpressions;if(n.length===0){if(t){return{order:"asc",...t}}return null}let r=n[0];if(typeof r==="string"){return{field:r,order:"asc"}}let[o]=Object.keys(r);return{field:o,order:r[o]}}function i(e){return new r({table:e})}},3189:function(e,t,n){"use strict";n.d(t,{Qc:function(){return f},Z:function(){return s},Z2:function(){return h},Z9:function(){return i},gL:function(){return a},l1:function(){return p},w8:function(){return l},wZ:function(){return o},zQ:function(){return u}});var r=n(89362);const o={date:{ops:["is","isapprox","gt","gte","lt","lte"],nullable:false},id:{ops:["is","contains","oneOf","isNot","doesNotContain","notOneOf"],nullable:true},saved:{ops:[],nullable:false},string:{ops:["is","contains","oneOf","isNot","doesNotContain","notOneOf"],nullable:true},number:{ops:["is","isapprox","isbetween","gt","gte","lt","lte"],nullable:false},boolean:{ops:["is"],nullable:false}};const i=new Map(Object.entries({imported_payee:"string",payee:"id",date:"date",notes:"string",amount:"number",amountInflow:"number",amountOutfow:"number",category:"id",account:"id",cleared:"boolean",saved:"saved"}));function a(e,t){t=t||{};switch(e){case"imported_payee":return"imported payee";case"amount":if(t.inflow){return"amount (inflow)"}else if(t.outflow){return"amount (outflow)"}return"amount";case"amount-inflow":return"amount (inflow)";case"amount-outflow":return"amount (outflow)";default:return e}}function l(e,t){switch(e){case"oneOf":return"one of";case"notOneOf":return"not one of";case"is":return"is";case"isNot":return"is not";case"isapprox":return"is approx";case"isbetween":return"is between";case"contains":return"contains";case"doesNotContain":return"does not contain";case"gt":if(t==="date"){return"is after"}return"is greater than";case"gte":if(t==="date"){return"is after or equals"}return"is greater than or equals";case"lt":if(t==="date"){return"is before"}return"is less than";case"lte":if(t==="date"){return"is before or equals"}return"is less than or equals";case"true":return"is true";case"false":return"is false";case"set":return"set";case"link-schedule":return"link schedule";case"and":return"and";case"or":return"or";default:return""}}function s(e){if(e==="amount-inflow"){return{field:"amount",options:{inflow:true}}}else if(e==="amount-outflow"){return{field:"amount",options:{outflow:true}}}else{return{field:e}}}function u(e){switch(e){case"date-format":return"Invalid date format";case"no-null":case"no-empty-array":case"no-empty-string":return"Value cannot be empty";case"not-number":return"Value must be a number";case"invalid-field":return"Please choose a valid field for this type of rule";default:return"Internal error, sorry! Please get in touch https://actualbudget.org/contact/ for support"}}function c(e,t){if(e<t){return[e,t]}return[t,e]}function f(e){switch(e.type){case"number":{let t=e.value;if(e.field==="amount"&&e.op!=="isbetween"&&t!=null){t=(0,r.Bf)(t)}return{...e,value:t}}case"string":{let t=e.value==null?"":e.value;return{...e,value:t}}case"boolean":{let t=e.value;return{...e,value:t}}default:}return{...e,error:null}}function h({error:e,inputKey:t,...n}){switch(n.type){case"number":{let e=n.value;if(n.field==="amount"&&n.op!=="isbetween"){e=(0,r.l9)(e)}return{...n,value:e}}case"string":{let e=n.value==null?"":n.value;return{...n,value:e}}case"boolean":{let e=n.value==null?false:n.value;return{...n,value:e}}default:}return n}function p(e,t){switch(t.type){case"number":{if(t.op!=="isbetween"){return{...t,error:null,value:e?(0,r.Dz)(String(e))||0:0}}break}default:}return{...t,error:null,value:e}}function g(e){return Math.round(Math.abs(e)*.075)}},11504:function(e,t,n){"use strict";n.d(t,{b5:function(){return p},eJ:function(){return a},lP:function(){return h},lR:function(){return i},lq:function(){return f},o7:function(){return u}});var r=n(73416);var o=n(63654);function i(e,t,n){let o=r.PR();if(t){return"completed"}else if(n){return"paid"}else if(e===o){return"due"}else if(e>o&&e<=r.E4(o,7)){return"upcoming"}else if(e<o){return"missed"}else{return"scheduled"}}function a(e){let t=e.map(e=>{let t=e._conditions.find(e=>e.field==="date");return{$and:{schedule:e.id,date:{$gte:t&&t.op==="is"?e.next_date:r.kw(e.next_date,2)}}}});return(0,o.ZP)("transactions").filter({$or:t}).orderBy({date:"desc"}).groupBy("schedule").select(["schedule","date"])}function l(e){return r.WU(new Date(2020,0,e,12),"do")}function s(e){let t={SU:"Sunday",MO:"Monday",TU:"Tuesday",WE:"Wednesday",TH:"Thursday",FR:"Friday",SA:"Saturday"};return t[e]}function u(e){let t=e.interval||1;switch(e.frequency){case"daily":{let e="Every ";e+=t!==1?`${t} days`:"day";return e}case"weekly":{let n="Every ";n+=t!==1?`${t} weeks`:"week";n+=" on "+r.WU(e.start,"EEEE");return n}case"monthly":{let n="Every ";n+=t!==1?`${t} months`:"month";if(e.patterns&&e.patterns.length>0){let t=[...e.patterns].sort((e,t)=>{let n=(e.type==="day"?1:0)-(t.type==="day"?1:0);let r=e.value-t.value;if(n===0){return r}return n}).filter(e=>e.value!==-1);t=t.concat(e.patterns.filter(e=>e.value===-1));n+=" on the ";let r=[];let o=new Set(t.map(e=>e.type));let i=o.size===1&&!o.has("day");for(let e of t){if(e.type==="day"){if(e.value===-1){r.push("last day")}else{r.push(l(e.value))}}else{let t=i?"":" "+s(e.type);if(e.value===-1){r.push("last"+t)}else{r.push(l(e.value)+t)}}}if(r.length>2){n+=r.slice(0,r.length-1).join(", ");n+=", and ";n+=r[r.length-1]}else{n+=r.join(" and ")}if(i){n+=" "+s(t[0].type)}}else{n+=" on the "+r.WU(e.start,"do")}return n}case"yearly":{let n="Every ";n+=t!==1?`${t} years`:"year";n+=" on "+r.WU(e.start,"LLL do");return n}default:return"Recurring error"}}function c(e){let t={start:monthUtils.parseDate(e.start),frequency:e.frequency.toUpperCase(),byHourOfDay:[12]};if(e.interval){t.interval=e.interval}let n=e=>e.slice(0,2).toUpperCase();switch(e.frequency){case"daily":return[t];case"weekly":return[t];case"monthly":if(e.patterns&&e.patterns.length>0){let r=e.patterns.filter(e=>e.type==="day");let o=e.patterns.filter(e=>e.type!=="day");return[r.length>0&&{...t,byDayOfMonth:r.map(e=>e.value)},o.length>0&&{...t,byDayOfWeek:o.map(e=>[n(e.type),e.value])}].filter(Boolean)}else{return[t]}case"yearly":return[t];default:throw new Error("Invalid recurring date config")}}function f(e){return{payee:e.find(e=>e.op==="is"&&e.field==="payee")||e.find(e=>e.op==="is"&&e.field==="description")||null,account:e.find(e=>e.op==="is"&&e.field==="account")||e.find(e=>e.op==="is"&&e.field==="acct")||null,amount:e.find(e=>(e.op==="is"||e.op==="isapprox"||e.op==="isbetween")&&e.field==="amount")||null,date:e.find(e=>(e.op==="is"||e.op==="isapprox")&&e.field==="date")||null}}function h(e){if(e&&typeof e!=="number"){return Math.round((e.num1+e.num2)/2)}return e}function p(e,t){if(t){return`${t.name} (${e.next_date})`}else{return`Next: ${e.next_date}`}}},76804:function(e,t,n){"use strict";n.d(t,{CX:function(){return y},F6:function(){return g},J4:function(){return i},Ks:function(){return x},Ld:function(){return b},V6:function(){return S},Xt:function(){return h},_n:function(){return m},oQ:function(){return w}});var r=n(26505);var o=n(89362);function i(e){return e.indexOf("preview/")!==-1}function a(e){return typeof e==="number"?e:0}function l(e,t){let n=a(t.amount)-e;return{type:"SplitTransactionError",version:1,difference:n}}function s(e,t){let n=e.id==="temp"?"temp":"";return{amount:0,...t,payee:t.payee||e.payee,id:t.id?t.id:n+(0,r.Z)(),account:e.account,date:e.date,cleared:e.cleared!=null?e.cleared:null,starting_balance_flag:e.starting_balance_flag!=null?e.starting_balance_flag:null,is_child:true,parent_id:e.id,error:null}}function u(e){const t=e.subtransactions.reduce((e,t)=>e+a(t.amount),0);return{...e,error:t===a(e.amount)?null:l(t,e)}}function c(e,t){while(t>=0){let n=e[t];if(n.is_parent){return t}t--}return null}function f(e,t){let n=[e[t]];let r=t+1;while(r<e.length&&e[r].is_child){n.push(e[r]);r++}return n}function h(e){let t=e.reduce((e,t)=>{let{subtransactions:n,...r}=t;n=n||[];e.push(r);for(let t=0;t<n.length;t++){e.push(n[t])}return e},[]);return t}function p(e){return{...e[0],subtransactions:e.slice(1)}}function g(e){if(e==null){return null}return h([e])}function m(e,t){return p((0,o.zb)(t,g(e)))}function v(e,t,n){let r=e.findIndex(e=>e.id===t);let i=e[r];let a=[...e];if(r===-1){throw new Error("Tried to edit unknown transaction id: "+t)}if(i.is_parent||i.is_child){let t=c(e,r);if(t==null){console.log("Cannot find parent index");return{diff:{deleted:[],updated:[]}}}let i=f(e,t);let l=n(p(i));let s=g(l);let u;if(s==null){u={deleted:[{id:i[0].id}],updated:[]};l={id:i[0].id,_deleted:true};a.splice(t,i.length)}else{u=(0,o.Th)(i,s);a.splice(t,i.length,...s)}return{data:a,newTransaction:l,diff:u}}else{let e=n(i);let t=g(e)||[];if(e){e.subtransactions=e.subtransactions||[]}a.splice(r,1,...t);return{data:a,newTransaction:e||{id:i.id,_deleted:true},diff:(0,o.Th)([i],t)}}}function y(e,t){return v(e,t,e=>{if(!e.is_parent){return e}let t=(0,o.Z$)(e.subtransactions);e.subtransactions.push(s(e,{amount:0,sort_order:a(t&&t.sort_order)-1}));return e})}function b(e,t){return v(e,t.id,e=>{if(e.is_parent){let n=e.id===t.id?t:e;let r=e.subtransactions.map(r=>{let o=r;if(e.id===t.id){o={...r,payee:r.payee===e.payee?t.payee:r.payee}}else if(r.id===t.id){o=t}return s(n,o)});return u({...n,subtransactions:r})}else{return t}})}function x(e,t){return v(e,t,e=>{if(e.is_parent){if(e.id===t){return null}else if(e.subtransactions.length===1){return{...e,subtransactions:null,is_parent:false,error:null}}else{let n=e.subtransactions.filter(e=>e.id!==t);return u({...e,subtransactions:n})}}else{return null}})}function w(e,t){return v(e,t,e=>{if(e.is_parent||e.is_child){return e}return{...e,is_parent:true,error:a(e.amount)===0?null:l(0,e),subtransactions:[s(e,{amount:0,sort_order:-1})]}})}function S(e){let t=e.find(e=>!e.is_child);t={...t,id:(0,r.Z)()};let n=e.filter(e=>e.is_child);return[t,...n.map(e=>({...e,id:(0,r.Z)(),parent_id:t.id}))]}},89362:function(e,t,n){"use strict";n.d(t,{Bf:function(){return O},CD:function(){return D},Dz:function(){return j},Th:function(){return c},VL:function(){return m},Z$:function(){return r},ZZ:function(){return f},eY:function(){return C},ff:function(){return x},id:function(){return v},k4:function(){return o},l9:function(){return P},qP:function(){return M},qT:function(){return I},sD:function(){return T},yC:function(){return b},zA:function(){return E},zb:function(){return a}});function r(e){return e[e.length-1]}function o(e,t){const n=e.id?{id:e.id}:{};const r=Object.keys(t);let o=false;for(let i=0;i<r.length;i++){let a=r[i];if(e[a]!==t[a]){n[a]=t[a];o=true}}return o?n:null}function i(e,t,n){let r=false;for(let o=0;o<n.length;o++){let i=n[o];if(e[i]!==t[i]){r=true;break}}return r}function a(e,t){t=[...t];if(e.added){e.added.forEach(e=>{t.push(e)})}if(e.updated){e.updated.forEach(({id:e,...n})=>{const r=t.findIndex(t=>t.id===e);t[r]={...t[r],...n}})}if(e.deleted){e.deleted.forEach(e=>{const n=t.findIndex(t=>e.id===t.id);if(n!==-1){t.splice(n,1)}})}return t}function l(e,t){let n=new Map;for(let r=0;r<e.length;r++){let o=e[r];let i=o[t];let a=n.get(i)||[];a.push(o);n.set(i,a)}return n}function s(e,t){let n=new Map;for(let r=0;r<e.length;r++){let o=e[r];let i=o[t];let a=n.get(i)||[];n.set(i,a.concat([o]))}return n}function u(e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n];t.set(r.id,r)}return t}function c(e,t){let n=u(e);let r=u(t);let i=[];let a=[];let l=e.filter(e=>!r.has(e.id)).map(e=>({id:e.id}));t.forEach(e=>{let t=n.get(e.id);if(!t){i.push(e)}else{const n=o(t,e);if(n){a.push(n)}}});return{added:i,updated:a,deleted:l}}function f(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];t[r.id]=r}return t}function h(e,t,n){for(let r=0;r<t.length;r++){const o=t[r];if(r===t.length-1){e.set(o,n)}else{if(!e.has(o)){e.set(o,new Map)}e=e.get(o)}}}function p(e,t){let n=e;for(let e=0;e<t.length;e++){n=n.get(t[e]);if(n==null){return n}}return n}function g(e,t){let n=new Set(e);let r=t.values();let o=r.next();while(!o.done){n.add(o.value);o=r.next()}return n}function m(e){return e[0].toUpperCase()+e.slice(1)}const v=[{value:"comma-dot",label:"1,000.33",labelNoFraction:"1,000"},{value:"dot-comma",label:"1.000,33",labelNoFraction:"1.000"},{value:"space-comma",label:"1 000,33",labelNoFraction:"1 000"},{value:"space-dot",label:"1 000.33",labelNoFraction:"1 000"},{value:"comma-dot-in",label:"1,00,000.33",labelNoFraction:"1,00,000"}];let y={format:"comma-dot",hideFraction:false};function b(e){y=e}function x({format:e,hideFraction:t}=y){let n,r,o;switch(e){case"space-comma":n="en-ZA";r=/[^-0-9,]/g;o=",";break;case"dot-comma":n="de-DE";r=/[^-0-9,]/g;o=",";break;case"space-dot":n="dje";r=/[^-0-9.]/g;o=".";break;case"comma-dot-in":n="en-IN";r=/[^-0-9.]/g;o=".";break;case"comma-dot":default:n="en-US";r=/[^-0-9.]/g;o="."}return{value:e,separator:o,formatter:new Intl.NumberFormat(n,{minimumFractionDigits:t?0:2,maximumFractionDigits:t?0:2}),regex:r}}const w=2**51-1;const S=-w;function k(e){if(!Number.isInteger(e)){throw new Error("safeNumber: number is not an integer: "+JSON.stringify(e))}if(e>w||e<S){throw new Error("safeNumber: can’t safely perform arithmetic with number: "+e)}return e}function T(e){return O(I(e)||0)}function E(e,t=x().formatter){return t.format(k(e)/100)}function C(e){return x().formatter.format(e)}function j(e){let t=parseFloat(e.replace(x().regex,"").replace(x().separator,"."));return isNaN(t)?null:t}function I(e){let t=j(e);return t==null?null:P(t)}function D(e){let t=parseInt(e.replace(/[^-0-9.,]/g,""));if(!isNaN(t)){return t}return null}function P(e){return Math.round(e*100)}function O(e){return parseFloat((k(e)/100).toFixed(2))}function M(e){function t(e){return isNaN(e)?null:e}function n(e){return e.replace(/[^0-9-]/g,"")}if(e.startsWith("(")&&e.endsWith(")")){e=e.replace("(","-").replace(")","")}let r=e.match(/[.,][^.,]*$/);if(!r||r.index===0){return t(parseFloat(n(e)))}let o=n(e.slice(0,r.index));let i=n(e.slice(r.index+1));return t(parseFloat(o+"."+i))}function _(e,t){return[...e].sort((e,n)=>{if(e[t]<n[t]){return-1}else if(e[t]>n[t]){return 1}return 0})}},1718:function(e,t,n){"use strict";e.exports=n.p+"static/media/browser-server.20abc230cfc504c53fa0.js"},80753:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}},56666:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(45850);function o(e,t,n){t=(0,r.Z)(t);if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}},7896:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(){r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){if(Object.prototype.hasOwnProperty.call(n,r)){e[r]=n[r]}}}return e};return r.apply(this,arguments)}},88960:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e,t){r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function e(e,t){e.__proto__=t;return e};return r(e,t)}},45850:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86522);function o(e,t){if((0,r.Z)(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==undefined){var o=n.call(e,t||"default");if((0,r.Z)(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)};function i(e){var t=o(e,"string");return(0,r.Z)(t)==="symbol"?t:String(t)}},86522:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){"@babel/helpers - typeof";return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}},14313:function(e,t,n){"use strict";n.d(t,{Fx:function(){return B},MT:function(){return h},QL:function(){return _},ex:function(){return a}});var r=n(66204);var o=n(90696);var i=n(4689);function a(e){if((0,i.Jz)()==="virtual"){let t=document.activeElement;(0,o.QB)(()=>{if(document.activeElement===t&&document.contains(e))(0,o.Ao)(e)})}else(0,o.Ao)(e)}function l(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return false;let{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){const{getComputedStyle:t}=e.ownerDocument.defaultView;let{display:n,visibility:o}=t(e);r=n!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function s(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):true)}function u(e,t){return e.nodeName!=="#comment"&&l(e)&&s(e,t)&&(!e.parentElement||u(e.parentElement,e))}const c=(0,r).createContext(null);let f=null;function h(e){let{children:t,contain:n,restoreFocus:i,autoFocus:a}=e;let l=(0,r.useRef)();let s=(0,r.useRef)();let u=(0,r.useRef)([]);let{parentNode:h}=(0,r.useContext)(c)||{};let p=(0,r.useMemo)(()=>new Z({scopeRef:u}),[u]);(0,o.bt)(()=>{let e=h||L.root;if(L.getTreeNode(e.scopeRef)&&f&&!C(f,e.scopeRef)){let t=L.getTreeNode(f);if(t)e=t}e.addChild(p);L.addNode(p)},[p,h]);(0,o.bt)(()=>{let e=L.getTreeNode(u);e.contain=n},[n]);(0,o.bt)(()=>{let e=l.current.nextSibling;let t=[];while(e&&e!==s.current){t.push(e);e=e.nextSibling}u.current=t},[t]);P(u,i,n);w(u,n);M(u,i,n);D(u,a);(0,r.useEffect)(()=>{if(u){let e=document.activeElement;let t=null;if(k(e,u.current)){for(let n of L.traverse())if(k(e,n.scopeRef.current))t=n;if(t===L.getTreeNode(u))f=t.scopeRef}return()=>{let e=L.getTreeNode(u).parent.scopeRef;if((u===f||C(u,f))&&(!e||L.getTreeNode(e)))f=e;L.removeTreeNode(u)}}},[u]);let m=(0,r.useMemo)(()=>g(u),[]);let v=(0,r.useMemo)(()=>({focusManager:m,parentNode:p}),[p,m]);return(0,r).createElement(c.Provider,{value:v},(0,r).createElement("span",{"data-focus-scope-start":true,hidden:true,ref:l}),t,(0,r).createElement("span",{"data-focus-scope-end":true,hidden:true,ref:s}))}function p(){var e;return(e=(0,$6nfFC$useContext)(c))===null||e===void 0?void 0:e.focusManager}function g(e){return{focusNext(t={}){let n=e.current;let{from:r,tabbable:o,wrap:i,accept:a}=t;let l=r||document.activeElement;let s=n[0].previousElementSibling;let u=_(b(n),{tabbable:o,accept:a},n);u.currentNode=k(l,n)?l:s;let c=u.nextNode();if(!c&&i){u.currentNode=s;c=u.nextNode()}if(c)j(c,true);return c},focusPrevious(t={}){let n=e.current;let{from:r,tabbable:o,wrap:i,accept:a}=t;let l=r||document.activeElement;let s=n[n.length-1].nextElementSibling;let u=_(b(n),{tabbable:o,accept:a},n);u.currentNode=k(l,n)?l:s;let c=u.previousNode();if(!c&&i){u.currentNode=s;c=u.previousNode()}if(c)j(c,true);return c},focusFirst(t={}){let n=e.current;let{tabbable:r,accept:o}=t;let i=_(b(n),{tabbable:r,accept:o},n);i.currentNode=n[0].previousElementSibling;let a=i.nextNode();if(a)j(a,true);return a},focusLast(t={}){let n=e.current;let{tabbable:r,accept:o}=t;let i=_(b(n),{tabbable:r,accept:o},n);i.currentNode=n[n.length-1].nextElementSibling;let a=i.previousNode();if(a)j(a,true);return a}}}const m=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"];const v=m.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";m.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const y=m.join(':not([hidden]):not([tabindex="-1"]),');function b(e){return e[0].parentElement}function x(e){let t=L.getTreeNode(f);while(t&&t.scopeRef!==e){if(t.contain)return false;t=t.parent}return true}function w(e,t){let n=(0,r.useRef)();let i=(0,r.useRef)(null);(0,o.bt)(()=>{let r=e.current;if(!t){if(i.current){cancelAnimationFrame(i.current);i.current=null}return}let o=t=>{if(t.key!=="Tab"||t.altKey||t.ctrlKey||t.metaKey||!x(e))return;let n=document.activeElement;let r=e.current;if(!k(n,r))return;let o=_(b(r),{tabbable:true},r);o.currentNode=n;let i=t.shiftKey?o.previousNode():o.nextNode();if(!i){o.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling;i=t.shiftKey?o.previousNode():o.nextNode()}t.preventDefault();if(i)j(i,true)};let a=t=>{if((!f||C(f,e))&&k(t.target,e.current)){f=e;n.current=t.target}else if(x(e)&&!T(t.target,e)){if(n.current)n.current.focus();else if(f)I(f.current)}else if(x(e))n.current=t.target};let l=t=>{if(i.current)cancelAnimationFrame(i.current);i.current=requestAnimationFrame(()=>{if(x(e)&&!T(document.activeElement,e)){f=e;if(document.body.contains(t.target)){n.current=t.target;n.current.focus()}else if(f)I(f.current)}})};document.addEventListener("keydown",o,false);document.addEventListener("focusin",a,false);r.forEach(e=>e.addEventListener("focusin",a,false));r.forEach(e=>e.addEventListener("focusout",l,false));return()=>{document.removeEventListener("keydown",o,false);document.removeEventListener("focusin",a,false);r.forEach(e=>e.removeEventListener("focusin",a,false));r.forEach(e=>e.removeEventListener("focusout",l,false))}},[e,t]);(0,o.bt)(()=>{return()=>{if(i.current)cancelAnimationFrame(i.current)}},[i])}function S(e){return T(e)}function k(e,t){return t.some(t=>t.contains(e))}function T(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return true;for(let{scopeRef:n}of L.traverse(L.getTreeNode(t))){if(k(e,n.current))return true}return false}function E(e){return T(e,f)}function C(e,t){var n;let r=(n=L.getTreeNode(t))===null||n===void 0?void 0:n.parent;while(r){if(r.scopeRef===e)return true;r=r.parent}return false}function j(e,t=false){if(e!=null&&!t)try{(0,a)(e)}catch(e){}else if(e!=null)try{e.focus()}catch(e){}}function I(e,t=true){let n=e[0].previousElementSibling;let r=_(b(e),{tabbable:t},e);r.currentNode=n;let o=r.nextNode();if(t&&!o){r=_(b(e),{tabbable:false},e);r.currentNode=n;o=r.nextNode()}j(o)}function D(e,t){const n=(0,r).useRef(t);(0,r.useEffect)(()=>{if(n.current){f=e;if(!k(document.activeElement,f.current))I(e.current)}n.current=false},[e])}function P(e,t,n){(0,o.bt)(()=>{if(t||n)return;let r=e.current;let o=t=>{let n=t.target;if(k(n,e.current))f=e;else if(!S(n))f=null};document.addEventListener("focusin",o,false);r.forEach(e=>e.addEventListener("focusin",o,false));return()=>{document.removeEventListener("focusin",o,false);r.forEach(e=>e.removeEventListener("focusin",o,false))}},[e,t,n])}function O(e){let t=L.getTreeNode(f);while(t&&t.scopeRef!==e){if(t.nodeToRestore)return false;t=t.parent}return(t===null||t===void 0?void 0:t.scopeRef)===e}function M(e,t,n){const i=(0,r.useRef)(typeof document!=="undefined"?document.activeElement:null);(0,o.bt)(()=>{let r=e.current;if(!t||n)return;let o=()=>{if((!f||C(f,e))&&k(document.activeElement,e.current))f=e};document.addEventListener("focusin",o,false);r.forEach(e=>e.addEventListener("focusin",o,false));return()=>{document.removeEventListener("focusin",o,false);r.forEach(e=>e.removeEventListener("focusin",o,false))}},[e,n]);(0,o.bt)(()=>{if(!t)return;let r=t=>{if(t.key!=="Tab"||t.altKey||t.ctrlKey||t.metaKey||!x(e))return;let n=document.activeElement;if(!k(n,e.current))return;let r=L.getTreeNode(e).nodeToRestore;let o=_(document.body,{tabbable:true});o.currentNode=n;let i=t.shiftKey?o.previousNode():o.nextNode();if(!document.body.contains(r)||r===document.body){r=null;L.getTreeNode(e).nodeToRestore=null}if((!i||!k(i,e.current))&&r){o.currentNode=r;do i=t.shiftKey?o.previousNode():o.nextNode();while(k(i,e.current));t.preventDefault();t.stopPropagation();if(i)j(i,true);else if(!S(r))n.blur();else j(r,true)}};if(!n)document.addEventListener("keydown",r,true);return()=>{if(!n)document.removeEventListener("keydown",r,true)}},[e,t,n]);(0,o.bt)(()=>{if(!t)return;L.getTreeNode(e).nodeToRestore=i.current;return()=>{let n=L.getTreeNode(e).nodeToRestore;if(t&&n&&(k(document.activeElement,e.current)||document.activeElement===document.body&&O(e))){let t=L.clone();requestAnimationFrame(()=>{if(document.activeElement===document.body){let n=t.getTreeNode(e);while(n){if(n.nodeToRestore&&document.body.contains(n.nodeToRestore)){j(n.nodeToRestore);return}n=n.parent}n=t.getTreeNode(e);while(n){if(n.scopeRef&&L.getTreeNode(n.scopeRef)){I(n.scopeRef.current,true);return}n=n.parent}}})}}},[e,t])}function _(e,t,n){let r=(t===null||t===void 0?void 0:t.tabbable)?y:v;let o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var o;if(t===null||t===void 0?void 0:(o=t.from)===null||o===void 0?void 0:o.contains(e))return NodeFilter.FILTER_REJECT;if(e.matches(r)&&(0,u)(e)&&(!n||k(e,n))&&(!(t===null||t===void 0?void 0:t.accept)||t.accept(e)))return NodeFilter.FILTER_ACCEPT;return NodeFilter.FILTER_SKIP}});if(t===null||t===void 0?void 0:t.from)o.currentNode=t.from;return o}function R(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:l=t.accept}=n;let s=o||document.activeElement;let u=_(r,{tabbable:i,accept:l});if(r.contains(s))u.currentNode=s;let c=u.nextNode();if(!c&&a){u.currentNode=r;c=u.nextNode()}if(c)j(c,true);return c},focusPrevious(n=t){let r=e.current;if(!r)return;let{from:o,tabbable:i=t.tabbable,wrap:a=t.wrap,accept:l=t.accept}=n;let s=o||document.activeElement;let u=_(r,{tabbable:i,accept:l});if(r.contains(s))u.currentNode=s;else{let e=A(u);if(e)j(e,true);return e}let c=u.previousNode();if(!c&&a){u.currentNode=r;c=A(u)}if(c)j(c,true);return c},focusFirst(n=t){let r=e.current;if(!r)return;let{tabbable:o=t.tabbable,accept:i=t.accept}=n;let a=_(r,{tabbable:o,accept:i});let l=a.nextNode();if(l)j(l,true);return l},focusLast(n=t){let r=e.current;if(!r)return;let{tabbable:o=t.tabbable,accept:i=t.accept}=n;let a=_(r,{tabbable:o,accept:i});let l=A(a);if(l)j(l,true);return l}}}function A(e){let t;let n;do{n=e.lastChild();if(n)t=n}while(n);return t}class N{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t!==null&&t!==void 0?t:null);let o=new Z({scopeRef:e});r.addChild(o);o.parent=r;this.fastMap.set(e,o);if(n)o.nodeToRestore=n}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);let n=t.parent;for(let e of this.traverse())if(e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef.current&&k(e.nodeToRestore,t.scopeRef.current))e.nodeToRestore=t.nodeToRestore;let r=t.children;n.removeChild(t);if(r.size>0)r.forEach(e=>n.addChild(e));this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null)yield e;if(e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new N;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent.scopeRef,t.nodeToRestore);return e}constructor(){this.fastMap=new Map;this.root=new Z({scopeRef:null});this.fastMap.set(null,this.root)}}class Z{addChild(e){this.children.add(e);e.parent=this}removeChild(e){this.children.delete(e);e.parent=undefined}constructor(e){this.children=new Set;this.contain=false;this.scopeRef=e.scopeRef}}let L=new N;function B(e={}){let{autoFocus:t=false,isTextInput:n,within:o}=e;let a=(0,r.useRef)({isFocused:false,isFocusVisible:t||(0,i.E)()});let[l,s]=(0,r.useState)(false);let[u,c]=(0,r.useState)(()=>a.current.isFocused&&a.current.isFocusVisible);let f=(0,r.useCallback)(()=>c(a.current.isFocused&&a.current.isFocusVisible),[]);let h=(0,r.useCallback)(e=>{a.current.isFocused=e;s(e);f()},[f]);(0,i.mG)(e=>{a.current.isFocusVisible=e;f()},[],{isTextInput:n});let{focusProps:p}=(0,i.KK)({isDisabled:o,onFocusChange:h});let{focusWithinProps:g}=(0,i.L_)({isDisabled:!o,onFocusWithinChange:h});return{isFocused:l,isFocusVisible:u,focusProps:o?g:p}}function F(e){let{children:t,focusClass:n,focusRingClass:r}=e;let{isFocused:o,isFocusVisible:i,focusProps:a}=(0,B)(e);let l=(0,$6nfFC$react).Children.only(t);return(0,$6nfFC$react).cloneElement(l,(0,$6nfFC$mergeProps)(l.props,{...a,className:(0,$6nfFC$clsx)({[n||""]:o,[r||""]:i})}))}let W=null&&(0,$6nfFC$react).createContext(null);function U(e){let t=(0,$6nfFC$useContext)(W)||{};(0,$6nfFC$useSyncRef)(t,e);let{ref:n,...r}=t;return r}function z(e,t){let{children:n,...r}=e;let o={...r,ref:t};return(0,$6nfFC$react).createElement(W.Provider,{value:o},n)}let H=null&&(0,$6nfFC$react).forwardRef(z);function K(e,t){let{focusProps:n}=(0,$6nfFC$useFocus)(e);let{keyboardProps:r}=(0,$6nfFC$useKeyboard)(e);let o=(0,$6nfFC$mergeProps)(n,r);let i=U(t);let l=e.isDisabled?{}:i;let s=(0,$6nfFC$useRef)(e.autoFocus);(0,$6nfFC$useEffect)(()=>{if(s.current&&t.current)(0,a)(t.current);s.current=false},[t]);return{focusableProps:(0,$6nfFC$mergeProps)({...o,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:undefined},l)}}function $(e,t){let n=t===null||t===void 0?void 0:t.isDisabled;let[r,o]=(0,$6nfFC$useState)(false);(0,$6nfFC$useLayoutEffect)(()=>{if((e===null||e===void 0?void 0:e.current)&&!n){let t=()=>{if(e.current){let t=(0,_)(e.current,{tabbable:true});o(!!t.nextNode())}};t();let n=new MutationObserver(t);n.observe(e.current,{subtree:true,childList:true,attributes:true,attributeFilter:["tabIndex","disabled"]});return()=>{n.disconnect()}}});return n?false:r}},4689:function(e,t,n){"use strict";n.d(t,{Jz:function(){return et},E:function(){return ee},KK:function(){return B},mG:function(){return ea},L_:function(){return el},XI:function(){return eh},TA:function(){return ew},r7:function(){return S}});var r=n(90696);var o=n(66204);function i(e,t){if(t.get)return t.get.call(e);return t.value};function a(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)};function l(e,t){var n=a(e,t,"get");return i(e,n)};function s(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}};function u(e,t,n){s(e,t);t.set(e,n)};function c(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable){throw new TypeError("attempted to set read only private field")}t.value=n}};function f(e,t,n){var r=a(e,t,"set");c(e,r,n);return n};let h="default";let p="";let g=new WeakMap;function m(e){if((0,r.gn)()){if(h==="default"){p=document.documentElement.style.webkitUserSelect;document.documentElement.style.webkitUserSelect="none"}h="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){g.set(e,e.style.userSelect);e.style.userSelect="none"}}function v(e){if((0,r.gn)()){if(h!=="disabled")return;h="restoring";setTimeout(()=>{(0,r.QB)(()=>{if(h==="restoring"){if(document.documentElement.style.webkitUserSelect==="none")document.documentElement.style.webkitUserSelect=p||"";p="";h="default"}})},300)}else if(e instanceof HTMLElement||e instanceof SVGElement){if(e&&g.has(e)){let t=g.get(e);if(e.style.userSelect==="none")e.style.userSelect=t;if(e.getAttribute("style")==="")e.removeAttribute("style");g.delete(e)}}}const y=(0,o).createContext(null);y.displayName="PressResponderContext";function b(e){let t=(0,o.useContext)((0,y));if(t){let{register:n,...o}=t;e=(0,r.dG)(o,e);n()}(0,r.lE)(t,e.ref);return e}var x=new WeakMap;class w{continuePropagation(){(0,f)(this,x,false)}get shouldStopPropagation(){return(0,l)(this,x)}constructor(e,t,n){(0,u)(this,x,{writable:true,value:void 0});(0,f)(this,x,true);this.type=e;this.pointerType=t;this.target=n.currentTarget;this.shiftKey=n.shiftKey;this.metaKey=n.metaKey;this.ctrlKey=n.ctrlKey;this.altKey=n.altKey}}function S(e){let{onPress:t,onPressChange:n,onPressStart:i,onPressEnd:a,onPressUp:l,isDisabled:s,isPressed:u,preventFocusOnPress:c,shouldCancelOnPointerExit:f,allowTextSelectionOnPress:h,ref:p,...g}=b(e);let[y,x]=(0,o.useState)(false);let S=(0,o.useRef)({isPressed:false,ignoreEmulatedMouseEvents:false,ignoreClickAfterPress:false,didFirePressStart:false,activePointerId:null,target:null,isOverTarget:false,pointerType:null});let{addGlobalListener:I,removeAllGlobalListeners:D}=(0,r.xi)();let _=(0,r.iW)((e,t)=>{let r=S.current;if(s||r.didFirePressStart)return;let o=true;if(i){let n=new w("pressstart",t,e);i(n);o=n.shouldStopPropagation}if(n)n(true);r.didFirePressStart=true;x(true);return o});let R=(0,r.iW)((e,r,o=true)=>{let i=S.current;if(!i.didFirePressStart)return;i.ignoreClickAfterPress=true;i.didFirePressStart=false;let l=true;if(a){let t=new w("pressend",r,e);a(t);l=t.shouldStopPropagation}if(n)n(false);x(false);if(t&&o&&!s){let n=new w("press",r,e);t(n);l&&(l=n.shouldStopPropagation)}return l});let A=(0,r.iW)((e,t)=>{if(s)return;if(l){let n=new w("pressup",t,e);l(n);return n.shouldStopPropagation}return true});let N=(0,r.iW)(e=>{let t=S.current;if(t.isPressed){if(t.isOverTarget)R(j(t.target,e),t.pointerType,false);t.isPressed=false;t.isOverTarget=false;t.activePointerId=null;t.pointerType=null;D();if(!h)(0,v)(t.target)}});let Z=(0,r.iW)(e=>{if(f)N(e)});let L=(0,o.useMemo)(()=>{let e=S.current;let t={onKeyDown(t){if(T(t.nativeEvent,t.currentTarget)&&t.currentTarget.contains(t.target)){if(M(t.target,t.key))t.preventDefault();let r=true;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget;e.isPressed=true;r=_(t,"keyboard");I(document,"keyup",n,false)}if(r)t.stopPropagation()}else if(t.key==="Enter"&&k(t.currentTarget))t.stopPropagation()},onKeyUp(t){if(T(t.nativeEvent,t.currentTarget)&&!t.repeat&&t.currentTarget.contains(t.target))A(j(e.target,t),"keyboard")},onClick(t){if(t&&!t.currentTarget.contains(t.target))return;if(t&&t.button===0){let n=true;if(s)t.preventDefault();if(!e.ignoreClickAfterPress&&!e.ignoreEmulatedMouseEvents&&(e.pointerType==="virtual"||(0,r.Zj)(t.nativeEvent))){if(!s&&!c)(0,r.Ao)(t.currentTarget);let e=_(t,"virtual");let o=A(t,"virtual");let i=R(t,"virtual");n=e&&o&&i}e.ignoreEmulatedMouseEvents=false;e.ignoreClickAfterPress=false;if(n)t.stopPropagation()}}};let n=t=>{if(e.isPressed&&T(t,e.target)){if(M(t.target,t.key))t.preventDefault();e.isPressed=false;let n=t.target;let r=R(j(e.target,t),"keyboard",e.target.contains(n));D();if(r)t.stopPropagation();if(e.target instanceof HTMLElement&&e.target.contains(n)&&(k(e.target)||e.target.getAttribute("role")==="link"))e.target.click()}};if(typeof PointerEvent!=="undefined"){t.onPointerDown=t=>{if(t.button!==0||!t.currentTarget.contains(t.target))return;if((0,r.cr)(t.nativeEvent)){e.pointerType="virtual";return}if(O(t.currentTarget))t.preventDefault();e.pointerType=t.pointerType;let a=true;if(!e.isPressed){e.isPressed=true;e.isOverTarget=true;e.activePointerId=t.pointerId;e.target=t.currentTarget;if(!s&&!c)(0,r.Ao)(t.currentTarget);if(!h)(0,m)(e.target);a=_(t,e.pointerType);I(document,"pointermove",n,false);I(document,"pointerup",o,false);I(document,"pointercancel",i,false)}if(a)t.stopPropagation()};t.onMouseDown=e=>{if(!e.currentTarget.contains(e.target))return;if(e.button===0){if(O(e.currentTarget))e.preventDefault();e.stopPropagation()}};t.onPointerUp=t=>{if(!t.currentTarget.contains(t.target)||e.pointerType==="virtual")return;if(t.button===0&&P(t,t.currentTarget))A(t,e.pointerType||t.pointerType)};let n=t=>{if(t.pointerId!==e.activePointerId)return;if(P(t,e.target)){if(!e.isOverTarget){e.isOverTarget=true;_(j(e.target,t),e.pointerType)}}else if(e.isOverTarget){e.isOverTarget=false;R(j(e.target,t),e.pointerType,false);Z(t)}};let o=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0){if(P(t,e.target))R(j(e.target,t),e.pointerType);else if(e.isOverTarget)R(j(e.target,t),e.pointerType,false);e.isPressed=false;e.isOverTarget=false;e.activePointerId=null;e.pointerType=null;D();if(!h)(0,v)(e.target)}};let i=e=>{N(e)};t.onDragStart=e=>{if(!e.currentTarget.contains(e.target))return;N(e)}}else{t.onMouseDown=t=>{if(t.button!==0||!t.currentTarget.contains(t.target))return;if(O(t.currentTarget))t.preventDefault();if(e.ignoreEmulatedMouseEvents){t.stopPropagation();return}e.isPressed=true;e.isOverTarget=true;e.target=t.currentTarget;e.pointerType=(0,r.Zj)(t.nativeEvent)?"virtual":"mouse";if(!s&&!c)(0,r.Ao)(t.currentTarget);let o=_(t,e.pointerType);if(o)t.stopPropagation();I(document,"mouseup",n,false)};t.onMouseEnter=t=>{if(!t.currentTarget.contains(t.target))return;let n=true;if(e.isPressed&&!e.ignoreEmulatedMouseEvents){e.isOverTarget=true;n=_(t,e.pointerType)}if(n)t.stopPropagation()};t.onMouseLeave=t=>{if(!t.currentTarget.contains(t.target))return;let n=true;if(e.isPressed&&!e.ignoreEmulatedMouseEvents){e.isOverTarget=false;n=R(t,e.pointerType,false);Z(t)}if(n)t.stopPropagation()};t.onMouseUp=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.ignoreEmulatedMouseEvents&&t.button===0)A(t,e.pointerType)};let n=t=>{if(t.button!==0)return;e.isPressed=false;D();if(e.ignoreEmulatedMouseEvents){e.ignoreEmulatedMouseEvents=false;return}if(P(t,e.target))R(j(e.target,t),e.pointerType);else if(e.isOverTarget)R(j(e.target,t),e.pointerType,false);e.isOverTarget=false};t.onTouchStart=t=>{if(!t.currentTarget.contains(t.target))return;let n=E(t.nativeEvent);if(!n)return;e.activePointerId=n.identifier;e.ignoreEmulatedMouseEvents=true;e.isOverTarget=true;e.isPressed=true;e.target=t.currentTarget;e.pointerType="touch";if(!s&&!c)(0,r.Ao)(t.currentTarget);if(!h)(0,m)(e.target);let i=_(t,e.pointerType);if(i)t.stopPropagation();I(window,"scroll",o,true)};t.onTouchMove=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let n=C(t.nativeEvent,e.activePointerId);let r=true;if(n&&P(n,t.currentTarget)){if(!e.isOverTarget){e.isOverTarget=true;r=_(t,e.pointerType)}}else if(e.isOverTarget){e.isOverTarget=false;r=R(t,e.pointerType,false);Z(t)}if(r)t.stopPropagation()};t.onTouchEnd=t=>{if(!t.currentTarget.contains(t.target))return;if(!e.isPressed){t.stopPropagation();return}let n=C(t.nativeEvent,e.activePointerId);let r=true;if(n&&P(n,t.currentTarget)){A(t,e.pointerType);r=R(t,e.pointerType)}else if(e.isOverTarget)r=R(t,e.pointerType,false);if(r)t.stopPropagation();e.isPressed=false;e.activePointerId=null;e.isOverTarget=false;e.ignoreEmulatedMouseEvents=true;if(!h)(0,v)(e.target);D()};t.onTouchCancel=t=>{if(!t.currentTarget.contains(t.target))return;t.stopPropagation();if(e.isPressed)N(t)};let o=t=>{if(e.isPressed&&t.target.contains(e.target))N({currentTarget:e.target,shiftKey:false,ctrlKey:false,metaKey:false,altKey:false})};t.onDragStart=e=>{if(!e.currentTarget.contains(e.target))return;N(e)}}return t},[I,s,c,D,h,N,Z,R,_,A]);(0,o.useEffect)(()=>{return()=>{if(!h)(0,v)(S.current.target)}},[h]);return{isPressed:u||y,pressProps:(0,r.dG)(g,L)}}function k(e){return e.tagName==="A"&&e.hasAttribute("href")}function T(e,t){const{key:n,code:r}=e;const o=t;const i=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof HTMLInputElement&&!R(o,n)||o instanceof HTMLTextAreaElement||o.isContentEditable)&&(!k(o)||i==="button"&&n!=="Enter")&&!(i==="link"&&n!=="Enter")}function E(e){const{targetTouches:t}=e;if(t.length>0)return t[0];return null}function C(e,t){const n=e.changedTouches;for(let e=0;e<n.length;e++){const r=n[e];if(r.identifier===t)return r}return null}function j(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function I(e){let t=e.width/2||e.radiusX||0;let n=e.height/2||e.radiusY||0;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function D(e,t){if(e.left>t.right||t.left>e.right)return false;if(e.top>t.bottom||t.top>e.bottom)return false;return true}function P(e,t){let n=t.getBoundingClientRect();let r=I(e);return D(n,r)}function O(e){return!(e instanceof HTMLElement)||!e.draggable}function M(e,t){if(e instanceof HTMLInputElement)return!R(e,t);if(e instanceof HTMLButtonElement)return e.type!=="submit"&&e.type!=="reset";return true}const _=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function R(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":_.has(e.type)}const A=null&&(0,$bx7SL$react).forwardRef(({children:e,...t},n)=>{let r=(0,$bx7SL$useRef)();n=n!==null&&n!==void 0?n:r;let{pressProps:o}=(0,S)({...t,ref:n});let i=(0,$bx7SL$react).Children.only(e);return(0,$bx7SL$react).cloneElement(i,{ref:n,...(0,$bx7SL$mergeProps)(i.props,o)})});const N=null&&(0,$bx7SL$react).forwardRef(({children:e,...t},n)=>{let r=(0,$bx7SL$useRef)(false);let o=(0,$bx7SL$useContext)((0,y));let i=(0,$bx7SL$mergeProps)(o||{},{...t,ref:n||(o===null||o===void 0?void 0:o.ref),register(){r.current=true;if(o)o.register()}});(0,$bx7SL$useSyncRef)(o,n);(0,$bx7SL$useEffect)(()=>{if(!r.current){console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");r.current=true}},[]);return(0,$bx7SL$react).createElement((0,y).Provider,{value:i},e)});class Z{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=true;this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation();this.isPropagationStopped=()=>true}isPropagationStopped(){return false}persist(){}constructor(e,t){this.nativeEvent=t;this.target=t.target;this.currentTarget=t.currentTarget;this.relatedTarget=t.relatedTarget;this.bubbles=t.bubbles;this.cancelable=t.cancelable;this.defaultPrevented=t.defaultPrevented;this.eventPhase=t.eventPhase;this.isTrusted=t.isTrusted;this.timeStamp=t.timeStamp;this.type=e}}function L(e){let t=(0,o.useRef)({isFocused:false,observer:null});(0,r.bt)(()=>{const e=t.current;return()=>{if(e.observer){e.observer.disconnect();e.observer=null}}},[]);let n=(0,r.iW)(t=>{e===null||e===void 0?void 0:e(t)});return(0,o.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=true;let r=e.target;let o=e=>{t.current.isFocused=false;if(r.disabled)n(new Z("blur",e));if(t.current.observer){t.current.observer.disconnect();t.current.observer=null}};r.addEventListener("focusout",o,{once:true});t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){t.current.observer.disconnect();let e=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e}));r.dispatchEvent(new FocusEvent("focusout",{bubbles:true,relatedTarget:e}))}});t.current.observer.observe(r,{attributes:true,attributeFilter:["disabled"]})}},[n])}function B(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const a=(0,o.useCallback)(e=>{if(e.target===e.currentTarget){if(r)r(e);if(i)i(false);return true}},[r,i]);const l=(0,L)(a);const s=(0,o.useCallback)(e=>{if(e.target===e.currentTarget&&document.activeElement===e.target){if(n)n(e);if(i)i(true);l(e)}},[i,n,l]);return{focusProps:{onFocus:!t&&(n||i||r)?s:undefined,onBlur:!t&&(r||i)?a:undefined}}}let F=null;let W=new Set;let U=false;let z=false;let H=false;const K={Tab:true,Escape:true};function $(e,t){for(let n of W)n(e,t)}function V(e){return!(e.metaKey||!(0,r.V5)()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function q(e){z=true;if(V(e)){F="keyboard";$("keyboard",e)}}function Y(e){F="pointer";if(e.type==="mousedown"||e.type==="pointerdown"){z=true;$("pointer",e)}}function G(e){if((0,r.Zj)(e)){z=true;F="virtual"}}function Q(e){if(e.target===window||e.target===document)return;if(!z&&!H){F="virtual";$("virtual",e)}z=false;H=false}function X(){z=false;H=true}function J(){if(typeof window==="undefined"||U)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){z=true;e.apply(this,arguments)};document.addEventListener("keydown",q,true);document.addEventListener("keyup",q,true);document.addEventListener("click",G,true);window.addEventListener("focus",Q,true);window.addEventListener("blur",X,false);if(typeof PointerEvent!=="undefined"){document.addEventListener("pointerdown",Y,true);document.addEventListener("pointermove",Y,true);document.addEventListener("pointerup",Y,true)}else{document.addEventListener("mousedown",Y,true);document.addEventListener("mousemove",Y,true);document.addEventListener("mouseup",Y,true)}U=true}if(typeof document!=="undefined"){if(document.readyState!=="loading")J();else document.addEventListener("DOMContentLoaded",J)}function ee(){return F!=="pointer"}function et(){return F}function en(e){F=e;$(e,null)}function er(){J();let[e,t]=(0,$bx7SL$useState)(F);(0,$bx7SL$useEffect)(()=>{let e=()=>{t(F)};W.add(e);return()=>{W.delete(e)}},[]);return(0,$bx7SL$useIsSSR)()?null:e}function eo(e,t,n){return!(e&&t==="keyboard"&&n instanceof KeyboardEvent&&!K[n.key])}function ei(e={}){let{isTextInput:t,autoFocus:n}=e;let[r,o]=(0,$bx7SL$useState)(n||ee());ea(e=>{o(e)},[t],{isTextInput:t});return{isFocusVisible:r}}function ea(e,t,n){J();(0,o.useEffect)(()=>{let t=(t,r)=>{if(!eo(n===null||n===void 0?void 0:n.isTextInput,t,r))return;e(ee())};W.add(t);return()=>{W.delete(t)}},t)}function el(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e;let a=(0,o.useRef)({isFocusWithin:false});let l=(0,o.useCallback)(e=>{if(a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)){a.current.isFocusWithin=false;if(n)n(e);if(i)i(false)}},[n,i,a]);let s=(0,L)(l);let u=(0,o.useCallback)(e=>{if(!a.current.isFocusWithin&&document.activeElement===e.target){if(r)r(e);if(i)i(true);a.current.isFocusWithin=true;s(e)}},[r,i,s]);if(t)return{focusWithinProps:{onFocus:null,onBlur:null}};return{focusWithinProps:{onFocus:u,onBlur:l}}}let es=false;let eu=0;function ec(){es=true;setTimeout(()=>{es=false},50)}function ed(e){if(e.pointerType==="touch")ec()}function ef(){if(typeof document==="undefined")return;if(typeof PointerEvent!=="undefined")document.addEventListener("pointerup",ed);else document.addEventListener("touchend",ec);eu++;return()=>{eu--;if(eu>0)return;if(typeof PointerEvent!=="undefined")document.removeEventListener("pointerup",ed);else document.removeEventListener("touchend",ec)}}function eh(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e;let[a,l]=(0,o.useState)(false);let s=(0,o.useRef)({isHovered:false,ignoreEmulatedMouseEvents:false,pointerType:"",target:null}).current;(0,o.useEffect)(ef,[]);let{hoverProps:u,triggerHoverEnd:c}=(0,o.useMemo)(()=>{let e=(e,r)=>{s.pointerType=r;if(i||r==="touch"||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=true;let o=e.currentTarget;s.target=o;if(t)t({type:"hoverstart",target:o,pointerType:r});if(n)n(true);l(true)};let o=(e,t)=>{s.pointerType="";s.target=null;if(t==="touch"||!s.isHovered)return;s.isHovered=false;let o=e.currentTarget;if(r)r({type:"hoverend",target:o,pointerType:t});if(n)n(false);l(false)};let a={};if(typeof PointerEvent!=="undefined"){a.onPointerEnter=t=>{if(es&&t.pointerType==="mouse")return;e(t,t.pointerType)};a.onPointerLeave=e=>{if(!i&&e.currentTarget.contains(e.target))o(e,e.pointerType)}}else{a.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=true};a.onMouseEnter=t=>{if(!s.ignoreEmulatedMouseEvents&&!es)e(t,"mouse");s.ignoreEmulatedMouseEvents=false};a.onMouseLeave=e=>{if(!i&&e.currentTarget.contains(e.target))o(e,"mouse")}}return{hoverProps:a,triggerHoverEnd:o}},[t,n,r,i,s]);(0,o.useEffect)(()=>{if(i)c({currentTarget:s.target},s.pointerType)},[i]);return{hoverProps:u,isHovered:a}}function ep(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:o}=e;let i=(0,$bx7SL$useRef)({isPointerDown:false,ignoreEmulatedMouseEvents:false});let a=(0,$bx7SL$useEffectEvent)(e=>{if(n&&eg(e,t)){if(o)o(e);i.current.isPointerDown=true}});let l=(0,$bx7SL$useEffectEvent)(e=>{if(n)n(e)});(0,$bx7SL$useEffect)(()=>{let e=i.current;if(r)return;if(typeof PointerEvent!=="undefined"){let n=n=>{if(e.isPointerDown&&eg(n,t))l(n);e.isPointerDown=false};document.addEventListener("pointerdown",a,true);document.addEventListener("pointerup",n,true);return()=>{document.removeEventListener("pointerdown",a,true);document.removeEventListener("pointerup",n,true)}}else{let n=n=>{if(e.ignoreEmulatedMouseEvents)e.ignoreEmulatedMouseEvents=false;else if(e.isPointerDown&&eg(n,t))l(n);e.isPointerDown=false};let r=n=>{e.ignoreEmulatedMouseEvents=true;if(e.isPointerDown&&eg(n,t))l(n);e.isPointerDown=false};document.addEventListener("mousedown",a,true);document.addEventListener("mouseup",n,true);document.addEventListener("touchstart",a,true);document.addEventListener("touchend",r,true);return()=>{document.removeEventListener("mousedown",a,true);document.removeEventListener("mouseup",n,true);document.removeEventListener("touchstart",a,true);document.removeEventListener("touchend",r,true)}}},[t,r,a,l])}function eg(e,t){if(e.button>0)return false;if(e.target){const t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target))return false;if(e.target.closest("[data-react-aria-top-layer]"))return false}return t.current&&!t.current.contains(e.target)}function em(e){if(!e)return;let t=true;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=false}};e(r);if(t)n.stopPropagation()}}function ev(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:(0,em)(e.onKeyDown),onKeyUp:(0,em)(e.onKeyUp)}}}function ey(e){let{onMoveStart:t,onMove:n,onMoveEnd:r}=e;let o=(0,$bx7SL$useRef)({didMove:false,lastPosition:null,id:null});let{addGlobalListener:i,removeGlobalListener:a}=(0,$bx7SL$useGlobalListeners)();let l=(0,$bx7SL$useEffectEvent)((e,r,i,a)=>{if(i===0&&a===0)return;if(!o.current.didMove){o.current.didMove=true;t===null||t===void 0?void 0:t({type:"movestart",pointerType:r,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})}n({type:"move",pointerType:r,deltaX:i,deltaY:a,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})});let s=(0,$bx7SL$useEffectEvent)((e,t)=>{(0,v)();if(o.current.didMove)r===null||r===void 0?void 0:r({type:"moveend",pointerType:t,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey})});let u=(0,$bx7SL$useMemo)(()=>{let e={};let t=()=>{(0,m)();o.current.didMove=false};if(typeof PointerEvent==="undefined"){let n=e=>{if(e.button===0){l(e,"mouse",e.pageX-o.current.lastPosition.pageX,e.pageY-o.current.lastPosition.pageY);o.current.lastPosition={pageX:e.pageX,pageY:e.pageY}}};let r=e=>{if(e.button===0){s(e,"mouse");a(window,"mousemove",n,false);a(window,"mouseup",r,false)}};e.onMouseDown=e=>{if(e.button===0){t();e.stopPropagation();e.preventDefault();o.current.lastPosition={pageX:e.pageX,pageY:e.pageY};i(window,"mousemove",n,false);i(window,"mouseup",r,false)}};let u=e=>{let t=[...e.changedTouches].findIndex(({identifier:e})=>e===o.current.id);if(t>=0){let{pageX:n,pageY:r}=e.changedTouches[t];l(e,"touch",n-o.current.lastPosition.pageX,r-o.current.lastPosition.pageY);o.current.lastPosition={pageX:n,pageY:r}}};let c=e=>{let t=[...e.changedTouches].findIndex(({identifier:e})=>e===o.current.id);if(t>=0){s(e,"touch");o.current.id=null;a(window,"touchmove",u);a(window,"touchend",c);a(window,"touchcancel",c)}};e.onTouchStart=e=>{if(e.changedTouches.length===0||o.current.id!=null)return;let{pageX:n,pageY:r,identifier:a}=e.changedTouches[0];t();e.stopPropagation();e.preventDefault();o.current.lastPosition={pageX:n,pageY:r};o.current.id=a;i(window,"touchmove",u,false);i(window,"touchend",c,false);i(window,"touchcancel",c,false)}}else{let n=e=>{if(e.pointerId===o.current.id){let t=e.pointerType||"mouse";l(e,t,e.pageX-o.current.lastPosition.pageX,e.pageY-o.current.lastPosition.pageY);o.current.lastPosition={pageX:e.pageX,pageY:e.pageY}}};let r=e=>{if(e.pointerId===o.current.id){let t=e.pointerType||"mouse";s(e,t);o.current.id=null;a(window,"pointermove",n,false);a(window,"pointerup",r,false);a(window,"pointercancel",r,false)}};e.onPointerDown=e=>{if(e.button===0&&o.current.id==null){t();e.stopPropagation();e.preventDefault();o.current.lastPosition={pageX:e.pageX,pageY:e.pageY};o.current.id=e.pointerId;i(window,"pointermove",n,false);i(window,"pointerup",r,false);i(window,"pointercancel",r,false)}}}let n=(e,n,r)=>{t();l(e,"keyboard",n,r);s(e,"keyboard")};e.onKeyDown=e=>{switch(e.key){case"Left":case"ArrowLeft":e.preventDefault();e.stopPropagation();n(e,-1,0);break;case"Right":case"ArrowRight":e.preventDefault();e.stopPropagation();n(e,1,0);break;case"Up":case"ArrowUp":e.preventDefault();e.stopPropagation();n(e,0,-1);break;case"Down":case"ArrowDown":e.preventDefault();e.stopPropagation();n(e,0,1);break}};return e},[o,i,a,l,s]);return{moveProps:u}}function eb(e,t){let{onScroll:n,isDisabled:r}=e;let o=(0,$bx7SL$useCallback)(e=>{if(e.ctrlKey)return;e.preventDefault();e.stopPropagation();if(n)n({deltaX:e.deltaX,deltaY:e.deltaY})},[n]);(0,$bx7SL$useEvent)(t,"wheel",r?null:o)}const ex=500;function ew(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:i,onLongPress:a,threshold:l=ex,accessibilityDescription:s}=e;const u=(0,o.useRef)(null);let{addGlobalListener:c,removeGlobalListener:f}=(0,r.xi)();let{pressProps:h}=(0,S)({isDisabled:t,onPressStart(e){e.continuePropagation();if(e.pointerType==="mouse"||e.pointerType==="touch"){if(n)n({...e,type:"longpressstart"});u.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:true}));if(a)a({...e,type:"longpress"});u.current=null},l);if(e.pointerType==="touch"){let t=e=>{e.preventDefault()};c(e.target,"contextmenu",t,{once:true});c(window,"pointerup",()=>{setTimeout(()=>{f(e.target,"contextmenu",t)},30)},{once:true})}}},onPressEnd(e){if(u.current)clearTimeout(u.current);if(i&&(e.pointerType==="mouse"||e.pointerType==="touch"))i({...e,type:"longpressend"})}});let p=(0,r.PK)(a&&!t?s:null);return{longPressProps:(0,r.dG)(h,p)}}},6860:function(e,t,n){"use strict";n.d(t,{Av:function(){return b},gP:function(){return g}});var r=n(66204);const o={prefix:String(Math.round(Math.random()*1e10)),current:0,isSSR:false};const i=(0,r).createContext(o);function a(e){let t=(0,$73SJx$useContext)(i);let n=f(t===o);let[r,a]=(0,$73SJx$useState)(true);let l=(0,$73SJx$useMemo)(()=>({prefix:t===o?"":`${t.prefix}-${n}`,current:0,isSSR:r}),[t,n,r]);if(typeof document!=="undefined")(0,$73SJx$useLayoutEffect)(()=>{a(false)},[]);return(0,$73SJx$react).createElement(i.Provider,{value:l},e.children)}let l=false;function s(e){if(typeof(0,$73SJx$react)["useId"]==="function"){if(true&&!l){console.warn("In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.");l=true}return(0,$73SJx$react).createElement((0,$73SJx$react).Fragment,null,e.children)}return(0,$73SJx$react).createElement(a,e)}let u=Boolean(typeof window!=="undefined"&&window.document&&window.document.createElement);let c=new WeakMap;function f(e=false){let t=(0,r.useContext)(i);let n=(0,r.useRef)(null);if(n.current===null&&!e){var o,a;let e=(o=(0,r).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0?void 0:(a=o.ReactCurrentOwner)===null||a===void 0?void 0:a.current;if(e){let n=c.get(e);if(n==null)c.set(e,{id:t.current,state:e.memoizedState});else if(e.memoizedState!==n.state){t.current=n.id;c.delete(e)}}n.current=++t.current}return n.current}function h(e){let t=(0,r.useContext)(i);if(t===o&&!u)console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=f(!!e);let a=t===o&&"production"==="test"?0:`react-aria${t.prefix}`;return e||`${a}-${n}`}function p(e){let t=(0,r).useId();let[n]=(0,r.useState)(b());let i=n||"production"==="test"?"react-aria":`react-aria${o.prefix}`;return e||`${i}-${t}`}const g=typeof(0,r)["useId"]==="function"?p:h;function m(){return false}function v(){return true}function y(e){return()=>{}}function b(){if(typeof(0,r)["useSyncExternalStore"]==="function")return(0,r)["useSyncExternalStore"](y,m,v);let e=(0,r.useContext)(i);return e.isSSR}},90696:function(e,t,n){"use strict";n.d(t,{zL:function(){return w},Ao:function(){return S},ad:function(){return et},gn:function(){return ee},V5:function(){return Q},a9:function(){return U},Zj:function(){return ec},cr:function(){return ed},Pf:function(){return en},dG:function(){return m},QB:function(){return O},zT:function(){return el},Gt:function(){return eu},PK:function(){return q},iW:function(){return ei},zX:function(){return ea},xi:function(){return R},Me:function(){return f},bE:function(){return A},bt:function(){return s},mp:function(){return p},lE:function(){return F},nP:function(){return H}});var r=n(66204);var o=n(6860);function i(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=i(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function a(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=i(e))&&(r&&(r+=" "),r+=t);return r}var l=a;const s=typeof document!=="undefined"?(0,r).useLayoutEffect:()=>{};function u(e){let[t,n]=(0,r.useState)(e);let o=(0,r.useRef)(t);let i=(0,r.useRef)(null);let a=(0,r.useCallback)(()=>{let e=i.current.next();while(!e.done&&o.current===e.value)e=i.current.next();if(e.done){i.current=null;return}n(e.value);o.current=e.value},[n,o,i]);(0,s)(()=>{if(i.current)a()});let l=(0,r.useCallback)(e=>{i.current=e(o.current);a()},[a,i,o]);return[t,l]}let c=new Map;function f(e){let[t,n]=(0,r.useState)(e);let i=(0,r.useRef)(null);let a=(0,o.gP)(t);let l=(0,r.useCallback)(e=>{i.current=e},[]);c.set(a,l);(0,s)(()=>{let e=a;return()=>{c.delete(e)}},[a]);(0,r.useEffect)(()=>{let e=i.current;if(e){i.current=null;n(e)}});return a}function h(e,t){if(e===t)return e;let n=c.get(e);if(n){n(t);return t}let r=c.get(t);if(r){r(e);return e}return t}function p(e=[]){let t=f();let[n,o]=(0,u)(t);let i=(0,r.useCallback)(()=>{o(function*(){yield t;yield document.getElementById(t)?t:undefined})},[t,o]);(0,s)(i,[t,i,...e]);return n}function g(...e){return(...t)=>{for(let n of e)if(typeof n==="function")n(...t)}}function m(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e];let o=r[e];if(typeof n==="function"&&typeof o==="function"&&e[0]==="o"&&e[1]==="n"&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90)t[e]=(0,g)(n,o);else if((e==="className"||e==="UNSAFE_className")&&typeof n==="string"&&typeof o==="string")t[e]=(0,l)(n,o);else if(e==="id"&&n&&o)t.id=(0,h)(n,o);else t[e]=o!==undefined?o:n}}return t}function v(...e){if(e.length===1)return e[0];return t=>{for(let n of e){if(typeof n==="function")n(t);else if(n!=null)n.current=t}}}const y=new Set(["id"]);const b=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]);const x=/^(data-.*)$/;function w(e,t={}){let{labelable:n,propNames:r}=t;let o={};for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(y.has(t)||n&&b.has(t)||(r===null||r===void 0?void 0:r.has(t))||x.test(t)))o[t]=e[t];return o}function S(e){if(T())e.focus({preventScroll:true});else{let t=E(e);e.focus();C(t)}}let k=null;function T(){if(k==null){k=false;try{var e=document.createElement("div");e.focus({get preventScroll(){k=true;return true}})}catch(e){}}return k}function E(e){var t=e.parentNode;var n=[];var r=document.scrollingElement||document.documentElement;while(t instanceof HTMLElement&&t!==r){if(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft});t=t.parentNode}if(r instanceof HTMLElement)n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft});return n}function C(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e){t.scrollTop=n;t.scrollLeft=r}}function j(e,t,n="horizontal"){let r=e.getBoundingClientRect();if(t)return n==="horizontal"?r.right:r.bottom;return n==="horizontal"?r.left:r.top}let I=new Map;let D=new Set;function P(){if(typeof window==="undefined")return;let e=e=>{let n=I.get(e.target);if(!n){n=new Set;I.set(e.target,n);e.target.addEventListener("transitioncancel",t)}n.add(e.propertyName)};let t=e=>{let n=I.get(e.target);if(!n)return;n.delete(e.propertyName);if(n.size===0){e.target.removeEventListener("transitioncancel",t);I.delete(e.target)}if(I.size===0){for(let e of D)e();D.clear()}};document.body.addEventListener("transitionrun",e);document.body.addEventListener("transitionend",t)}if(typeof document!=="undefined"){if(document.readyState!=="loading")P();else document.addEventListener("DOMContentLoaded",P)}function O(e){requestAnimationFrame(()=>{if(I.size===0)e();else D.add(e)})}const M=null&&[];function _(e){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:t,reverse:n,orientation:r,onHover:o,onDrag:i,onPositionChange:a,onIncrement:l,onDecrement:s,onIncrementToMax:u,onDecrementToMin:c,onCollapseToggle:f}=e;let h=e=>r==="horizontal"?e.clientX:e.clientY;let p=e=>{let o=(0,j)(t.current,n,r);let i=h(e);let a=n?o-i:i-o;return a};let g=(0,$12uGp$useRef)(false);let m=(0,$12uGp$useRef)(0);let v=(0,$12uGp$useRef)({onPositionChange:a,onDrag:i});v.current.onDrag=i;v.current.onPositionChange=a;let y=e=>{e.preventDefault();let t=p(e);if(!g.current){g.current=true;if(v.current.onDrag)v.current.onDrag(true);if(v.current.onPositionChange)v.current.onPositionChange(t)}if(m.current===t)return;m.current=t;if(a)a(t)};let b=e=>{const t=e.target;g.current=false;let n=p(e);if(v.current.onDrag)v.current.onDrag(false);if(v.current.onPositionChange)v.current.onPositionChange(n);M.splice(M.indexOf(t),1);window.removeEventListener("mouseup",b,false);window.removeEventListener("mousemove",y,false)};let x=e=>{const t=e.currentTarget;if(M.some(e=>t.contains(e)))return;M.push(t);window.addEventListener("mousemove",y,false);window.addEventListener("mouseup",b,false)};let w=()=>{if(o)o(true)};let S=()=>{if(o)o(false)};let k=e=>{switch(e.key){case"Left":case"ArrowLeft":if(r==="horizontal"){e.preventDefault();if(s&&!n)s();else if(l&&n)l()}break;case"Up":case"ArrowUp":if(r==="vertical"){e.preventDefault();if(s&&!n)s();else if(l&&n)l()}break;case"Right":case"ArrowRight":if(r==="horizontal"){e.preventDefault();if(l&&!n)l();else if(s&&n)s()}break;case"Down":case"ArrowDown":if(r==="vertical"){e.preventDefault();if(l&&!n)l();else if(s&&n)s()}break;case"Home":e.preventDefault();if(c)c();break;case"End":e.preventDefault();if(u)u();break;case"Enter":e.preventDefault();if(f)f();break}};return{onMouseDown:x,onMouseEnter:w,onMouseOut:S,onKeyDown:k}}function R(){let e=(0,r.useRef)(new Map);let t=(0,r.useCallback)((t,n,r,o)=>{let i=(o===null||o===void 0?void 0:o.once)?(...t)=>{e.current.delete(r);r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:i,options:o});t.addEventListener(n,r,o)},[]);let n=(0,r.useCallback)((t,n,r,o)=>{var i;let a=((i=e.current.get(r))===null||i===void 0?void 0:i.fn)||r;t.removeEventListener(n,a,o);e.current.delete(r)},[]);let o=(0,r.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);(0,r.useEffect)(()=>{return o},[o]);return{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:o}}function A(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;n=(0,f)(n);if(o&&r){let e=new Set([n,...o.trim().split(/\s+/)]);o=[...e].join(" ")}else if(o)o=o.trim().split(/\s+/).join(" ");if(!r&&!o&&t)r=t;return{id:n,"aria-label":r,"aria-labelledby":o}}function N(e){const t=(0,$12uGp$useRef)();return(0,$12uGp$useMemo)(()=>({get current(){return t.current},set current(value){t.current=value;if(typeof e==="function")e(value);else if(e)e.current=value}}),[e])}function Z(e,t){const n=(0,$12uGp$useRef)(true);const r=(0,$12uGp$useRef)(null);(0,$12uGp$useEffect)(()=>{n.current=true;return()=>{n.current=false}},[]);(0,$12uGp$useEffect)(()=>{if(n.current)n.current=false;else if(!r.current||t.some((e,t)=>!Object.is(e,r[t])))e();r.current=t},t)}function L(){return typeof window.ResizeObserver!=="undefined"}function B(e){const{ref:t,onResize:n}=e;(0,$12uGp$useEffect)(()=>{let e=t===null||t===void 0?void 0:t.current;if(!e)return;if(!L()){window.addEventListener("resize",n,false);return()=>{window.removeEventListener("resize",n,false)}}else{const t=new window.ResizeObserver(e=>{if(!e.length)return;n()});t.observe(e);return()=>{if(e)t.unobserve(e)}}},[n,t])}function F(e,t){(0,s)(()=>{if(e&&e.ref&&t){e.ref.current=t.current;return()=>{e.ref.current=null}}},[e,t])}function W(e){if(U(e))e=e.parentElement;while(e&&!U(e))e=e.parentElement;return e||document.scrollingElement||document.documentElement}function U(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}let z=typeof document!=="undefined"&&window.visualViewport;function H(){let[e,t]=(0,r.useState)(()=>K());(0,r.useEffect)(()=>{let e=()=>{t(e=>{let t=K();if(t.width===e.width&&t.height===e.height)return e;return t})};if(!z)window.addEventListener("resize",e);else z.addEventListener("resize",e);return()=>{if(!z)window.removeEventListener("resize",e);else z.removeEventListener("resize",e)}},[]);return e}function K(){return{width:(z===null||z===void 0?void 0:z.width)||window.innerWidth,height:(z===null||z===void 0?void 0:z.height)||window.innerHeight}}let $=0;const V=new Map;function q(e){let[t,n]=(0,r.useState)(undefined);(0,s)(()=>{if(!e)return;let t=V.get(e);if(!t){let r=`react-aria-description-${$++}`;n(r);let o=document.createElement("div");o.id=r;o.style.display="none";o.textContent=e;document.body.appendChild(o);t={refCount:0,element:o};V.set(e,t)}else n(t.element.id);t.refCount++;return()=>{if(--t.refCount===0){t.element.remove();V.delete(e)}}},[e]);return{"aria-describedby":e?t:undefined}}function Y(e){var t;if(typeof window==="undefined"||window.navigator==null)return false;return((t=window.navigator["userAgentData"])===null||t===void 0?void 0:t.brands.some(t=>e.test(t.brand)))||e.test(window.navigator.userAgent)}function G(e){var t;return typeof window!=="undefined"&&window.navigator!=null?e.test(((t=window.navigator["userAgentData"])===null||t===void 0?void 0:t.platform)||window.navigator.platform):false}function Q(){return G(/^Mac/i)}function X(){return G(/^iPhone/i)}function J(){return G(/^iPad/i)||Q()&&navigator.maxTouchPoints>1}function ee(){return X()||J()}function et(){return Q()||ee()}function en(){return Y(/AppleWebKit/i)&&!er()}function er(){return Y(/Chrome/i)}function eo(){return Y(/Android/i)}function ei(e){const t=(0,r.useRef)(null);(0,s)(()=>{t.current=e},[e]);return(0,r.useCallback)((...e)=>{const n=t.current;return n(...e)},[])}function ea(e,t,n,o){let i=(0,ei)(n);let a=n==null;(0,r.useEffect)(()=>{if(a)return;let n=e.current;n.addEventListener(t,i,o);return()=>{n.removeEventListener(t,i,o)}},[e,t,o,a,i])}function el(e,t){let n=es(e,t,"left");let r=es(e,t,"top");let o=t.offsetWidth;let i=t.offsetHeight;let a=e.scrollLeft;let l=e.scrollTop;let{borderTopWidth:s,borderLeftWidth:u}=getComputedStyle(e);let c=e.scrollLeft+parseInt(u,10);let f=e.scrollTop+parseInt(s,10);let h=c+e.clientWidth;let p=f+e.clientHeight;if(n<=a)a=n-parseInt(u,10);else if(n+o>h)a+=n+o-h;if(r<=f)l=r-parseInt(s,10);else if(r+i>p)l+=r+i-p;e.scrollLeft=a;e.scrollTop=l}function es(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;while(t.offsetParent){o+=t[r];if(t.offsetParent===e)break;else if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function eu(e,t){if(document.contains(e)){let a=document.scrollingElement||document.documentElement;let l=window.getComputedStyle(a).overflow==="hidden";if(!l){var n;let{left:a,top:l}=e.getBoundingClientRect();e===null||e===void 0?void 0:(n=e.scrollIntoView)===null||n===void 0?void 0:n.call(e,{block:"nearest"});let{left:s,top:u}=e.getBoundingClientRect();if(Math.abs(a-s)>1||Math.abs(l-u)>1){var r,o,i;t===null||t===void 0?void 0:(r=t.containingElement)===null||r===void 0?void 0:(o=r.scrollIntoView)===null||o===void 0?void 0:o.call(r,{block:"center",inline:"center"});(i=e.scrollIntoView)===null||i===void 0?void 0:i.call(e,{block:"nearest"})}}else{let t=(0,W)(e);while(e&&t&&e!==a&&t!==a){el(t,e);e=t;t=(0,W)(e)}}}}function ec(e){if(e.mozInputSource===0&&e.isTrusted)return true;if((0,eo)()&&e.pointerType)return e.type==="click"&&e.buttons===1;return e.detail===0&&!e.pointerType}function ed(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function ef(e,t){let n=(0,$12uGp$useRef)(null);if(e&&n.current&&t(e,n.current))e=n.current;n.current=e;return e}function eh(e,t,n){let r=(0,$12uGp$useRef)(t);let o=(0,ei)(()=>{if(n)n(r.current)});(0,$12uGp$useEffect)(()=>{var t;let n=e===null||e===void 0?void 0:(t=e.current)===null||t===void 0?void 0:t.form;n===null||n===void 0?void 0:n.addEventListener("reset",o);return()=>{n===null||n===void 0?void 0:n.removeEventListener("reset",o)}},[e,o])}},21251:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});function r(e,t,...n){if(o()){if(t===undefined){throw new Error("invariant requires an error message argument")}}if(!e){let e;if(t===undefined){e=new Error("Minified exception occurred; use the non-minified dev environment "+"for the full error message and additional helpful warnings.")}else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]}));e.name="Invariant Violation"}e.framesToPop=1;throw e}}function o(){return typeof process!=="undefined"&&"production"==="production"}},13577:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var r=n(66204);const o=(0,r.createContext)({dragDropManager:undefined})}};var t={};function n(r){var o=t[r];if(o!==undefined){return o.exports}var i=t[r]={id:r,loaded:false,exports:{}};e[r].call(i.exports,i,i.exports,n);i.loaded=true;return i.exports}n.m=e;!function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};n.d(t,{a:t});return t}}();!function(){var e=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__};var t;n.t=function(r,o){if(o&1)r=this(r);if(o&8)return r;if(typeof r==="object"&&r){if(o&4&&r.__esModule)return r;if(o&16&&typeof r.then==="function")return r}var i=Object.create(null);n.r(i);var a={};t=t||[null,e({}),e([]),e(e)];for(var l=o&2&&r;typeof l=="object"&&!~t.indexOf(l);l=e(l)){Object.getOwnPropertyNames(l).forEach(function(e){a[e]=function(){return r[e]}})}a["default"]=function(){return r};n.d(i,a);return i}}();!function(){n.d=function(e,t){for(var r in t){if(n.o(t,r)&&!n.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}}();!function(){n.f={};n.e=function(e){return Promise.all(Object.keys(n.f).reduce(function(t,r){n.f[r](e,t);return t},[]))}}();!function(){n.u=function(e){return"static/js/"+(({"162":"wide-components","447":"narrow-components","737":"resize-observer-polyfill","992":"reports"})[e]||e)+"."+({"162":"fd8595f4","231":"370f17f8","389":"c8f94185","447":"11cf3591","473":"02c273e8","678":"bf349f5d","713":"1731d555","737":"98a18736","992":"39b7254a"})[e]+".chunk.js"}}();!function(){n.miniCssF=function(e){return undefined}}();!function(){n.g=function(){if(typeof globalThis==="object")return globalThis;try{return this||new Function("return this")()}catch(e){if(typeof window==="object")return window}}()}();!function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();!function(){var e={};var t="@actual-app/web:";n.l=function(r,o,i,a){if(e[r]){e[r].push(o);return}var l,s;if(i!==undefined){var u=document.getElementsByTagName("script");for(var c=0;c<u.length;c++){var f=u[c];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+i){l=f;break}}}if(!l){s=true;l=document.createElement("script");l.charset="utf-8";l.timeout=120;if(n.nc){l.setAttribute("nonce",n.nc)}l.setAttribute("data-webpack",t+i);l.src=r}e[r]=[o];var h=function(t,n){l.onerror=l.onload=null;clearTimeout(p);var o=e[r];delete e[r];l.parentNode&&l.parentNode.removeChild(l);o&&o.forEach(function(e){return e(n)});if(t)return t(n)};var p=setTimeout(h.bind(null,undefined,{type:"timeout",target:l}),12e4);l.onerror=h.bind(null,l.onerror);l.onload=h.bind(null,l.onload);s&&document.head.appendChild(l)}}();!function(){n.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){n.nmd=function(e){e.paths=[];if(!e.children)e.children=[];return e}}();!function(){n.p="/"}();!function(){n.b=document.baseURI||self.location.href;var e={179:0};n.f.j=function(t,r){var o=n.o(e,t)?e[t]:undefined;if(o!==0){if(o){r.push(o[2])}else{if(true){var i=new Promise(function(n,r){o=e[t]=[n,r]});r.push(o[2]=i);var a=n.p+n.u(t);var l=new Error;var s=function(r){if(n.o(e,t)){o=e[t];if(o!==0)e[t]=undefined;if(o){var i=r&&(r.type==="load"?"missing":r.type);var a=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+i+": "+a+")";l.name="ChunkLoadError";l.type=i;l.request=a;o[1](l)}}};n.l(a,s,"chunk-"+t,t)}}}};var t=function(t,r){var o=r[0];var i=r[1];var a=r[2];var l,s,u=0;if(o.some(function(t){return e[t]!==0})){for(l in i){if(n.o(i,l)){n.m[l]=i[l]}}if(a)var c=a(n)}if(t)t(r);for(;u<o.length;u++){s=o[u];if(n.o(e,s)&&e[s]){e[s][0]()}e[s]=0}};var r=self["webpackChunk_actual_app_web"]=self["webpackChunk_actual_app_web"]||[];r.forEach(t.bind(null,0));r.push=t.bind(null,r.push.bind(r))}();var r={};!function(){"use strict";var e={};n.r(e);n.d(e,{FILE:function(){return nc},HTML:function(){return nh},TEXT:function(){return nf},URL:function(){return nd}});var t=n(43188);function r(){return typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope}function o(e){return(t,n,o)=>{if(r()){throw new Error("`startWorkerFromMain` should only be called from the main thread")}if(typeof Worker==="undefined"){throw new Error("Web workers not available. sqlite3 requires web workers to work.")}e().then(({default:e})=>{let r=new e;r.postMessage({type:"init",buffers:[t,n]});r.addEventListener("message",e=>{o.postMessage(e.data)})})}}function i(e,t){const n=o(t);return t=>{t.addEventListener("message",r=>{switch(r.data.type){case e:n(r.data.argBuffer,r.data.resultBuffer,t);break}})}}const a=i("__absurd:spawn-idb-worker",()=>n.e(473).then(n.bind(n,83473)));var l=n(67238);var s={"i8":"23.10.0"};const u=new URL(n(1718),n.b);let c="production"==="development";let f=l.$8?"99.9.9":s.i8;let h;function p(){h=new Worker(u);a(h);if(window.SharedArrayBuffer){localStorage.removeItem("SharedArrayBufferOverride")}h.postMessage({type:"init",version:f,isDev:c,publicUrl:"",hash:"b835d2cdcf8004c363da",isSharedArrayBufferOverrideEnabled:localStorage.getItem("SharedArrayBufferOverride")})}p();n.g.Actual={IS_DEV:c,ACTUAL_VERSION:f,logToTerminal:(...e)=>{console.log(...e)},relaunch:()=>{window.location.reload()},openFileDialog:async({filters:e=[],properties:t})=>{return new Promise(t=>{let n=false;let r=document.body.querySelector('input[id="open-file-dialog-input"]');if(!r){n=true;r=document.createElement("input")}r.type="file";r.id="open-file-dialog-input";r.value=null;let o=e.find(e=>e.extensions);if(o){r.accept=o.extensions.map(e=>"."+e).join(",")}r.style.position="absolute";r.style.top="0px";r.style.left="0px";r.style.display="none";r.onchange=e=>{let n=e.target.files[0];let r=n.name.replace(/.*(\.[^.]*)/,"file$1");if(n){var o=new FileReader;o.readAsArrayBuffer(n);o.onload=async function(e){let n=`/uploads/${r}`;window.__actionsForMenu.uploadFile(r,e.target.result).then(()=>t([n]))};o.onerror=function(e){alert("Error reading file")}}};if(n){document.body.appendChild(r)}r.click()})},saveFile:(e,t,n)=>{const r=document.createElement("a");r.style="display: none";r.download=t;r.rel="noopener";const o=new Blob([e]);r.href=URL.createObjectURL(o);r.dispatchEvent(new MouseEvent("click"))},openURLInBrowser:e=>{window.open(e,"_blank")},onEventFromMain:(e,t)=>{},applyAppUpdate:()=>{},updateAppMenu:e=>{},getServerSocket:async()=>{return h}};document.addEventListener("keydown",e=>{if(e.metaKey||e.ctrlKey){if(e.key==="o"){e.preventDefault();window.__actionsForMenu.closeBudget()}else if(e.key.toLowerCase()==="z"){if(e.target.tagName==="INPUT"||e.target.tagName==="TEXTAREA"||e.target.isContentEditable){return}e.preventDefault();if(e.shiftKey){window.__actionsForMenu.redo()}else{window.__actionsForMenu.undo()}}}});var g={};var m={};var v=n(66204);var y=n(37496);var b=n(6279);var x=n(65485);function w(e){var t=function t(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){if(typeof o==="function"){return o(n,r,e)}return t(o)}}};return t}var S=w();S.withExtraArgument=w;var k=S;var T=n(43044);var E=n(62601);var C=n(10959);const j={failedAccounts:new Map,accountsSyncing:null};function I(e=j,t){switch(t.type){case E._V:return{...e,accountsSyncing:t.name};case E.cV:{let n=new Map(e.failedAccounts);if(t.failed){n.set(t.id,{type:t.errorType,code:t.errorCode})}else{n.delete(t.id)}return{...e,failedAccounts:n}}case E.Co:{let n=new Map;t.syncErrors.forEach(e=>{n.set(e.id,{type:e.type,code:e.code})});return{...e,failedAccounts:n}}default:}return e};const D={loadingText:null,updateInfo:null,showUpdateNotification:true,managerHasInitialized:false,lastUndoState:{current:null},lastSplitState:{current:null}};function P(e=D,t){switch(t.type){case E.wH:return{...e,...t.state};case E.HT:e.lastUndoState.current=t.undoState;return e;case E.VM:e.lastSplitState.current=t.splitState;return e;default:}return e};function O(e){e.sort((e,t)=>{let n=e.name.toLowerCase();let r=t.name.toLowerCase();let o=n<r?-1:n>r?1:0;if(o===0){let t=e.state==="remote"?e.cloudFileId:e.id;let n=e.state==="remote"?e.cloudFileId:e.id;o=t<n?-1:t>n?1:0}return o});return e}function M(e,t){console.log({localFiles:e,remoteFiles:t});let n=new Set;let r=e.map(e=>{let{cloudFileId:r,groupId:o}=e;if(r&&o){if(t==null){return{...e,cloudFileId:r,groupId:o,deleted:false,state:"unknown"}}let i=t.find(t=>e.cloudFileId===t.fileId);if(i){n.add(i.fileId);if(i.groupId===e.groupId){return{...e,cloudFileId:r,groupId:o,name:i.name,deleted:i.deleted,encryptKeyId:i.encryptKeyId,hasKey:i.hasKey,state:"synced"}}else{return{...e,cloudFileId:r,groupId:o,name:i.name,deleted:i.deleted,encryptKeyId:i.encryptKeyId,hasKey:i.hasKey,state:"detached"}}}else{return{...e,cloudFileId:r,groupId:o,deleted:false,state:"broken"}}}else{return{...e,deleted:false,state:"local"}}});let o=O(r.concat((t||[]).filter(e=>!n.has(e.fileId)).map(e=>{return{cloudFileId:e.fileId,groupId:e.groupId,name:e.name,deleted:e.deleted,encryptKeyId:e.encryptKeyId,hasKey:e.hasKey,state:"remote"}})).filter(e=>!e.deleted));return o.filter(e=>e.state!=="broken").concat(o.filter(e=>e.state==="broken"))}const _={budgets:[],remoteFiles:null,allFiles:null};function R(e=_,t){switch(t.type){case E.Ud:return{...e,budgets:t.budgets,allFiles:M(t.budgets,e.remoteFiles)};case E.Oi:return{...e,remoteFiles:t.files,allFiles:M(e.budgets,t.files)};case E.GY:return{...e,budgets:t.budgets,remoteFiles:t.remoteFiles,allFiles:M(t.budgets,t.remoteFiles)};case E.dp:return{...e,allFiles:null};default:}return e};const A={modalStack:[],isHidden:false};function N(e=A,t){switch(t.type){case E.jw:return{...e,modalStack:[...e.modalStack,t.modal]};case E.JA:return{...e,modalStack:[t.modal]};case E.TZ:return{...e,modalStack:e.modalStack.slice(0,-1)};case E.et:return{...e,modalStack:[]};case E.wH:if("loadingText"in t.state){return{...e,isHidden:t.state.loadingText!=null}}break;case E.dp:return A;default:}return e}var Z=N;const L={notifications:[]};function B(e=L,t){switch(t.type){case E.Dv:if(e.notifications.find(e=>e.id===t.notification.id)){return e}return{...e,notifications:[...e.notifications,t.notification]};case E.Kf:return{...e,notifications:e.notifications.filter(e=>e.id!==t.id)};default:}return e}var F=n(89362);const W={local:null,global:null};function U(e=W,t){switch(t.type){case E.px:if(t.prefs){(0,F.yC)({format:t.prefs.numberFormat||"comma-dot",hideFraction:t.prefs.hideFraction})}return{local:t.prefs,global:t.globalPrefs};case E.uF:if(t.prefs.numberFormat||t.prefs.hideFraction!=null){(0,F.yC)({format:t.prefs.numberFormat||e.local.numberFormat,hideFraction:t.prefs.hideFraction!=null?t.prefs.hideFraction:e.local.hideFraction})}return{...e,local:{...e.local,...t.prefs}};case E.CH:return{...e,global:{...e.global,...t.globalPrefs}};default:}return e}var z=n(18748);const H={data:null};function K(e=H,t){switch(t.type){case E.q1:return{...e,data:t.data};default:}return e};const $={app:P,queries:z.ZP,account:I,prefs:U,modals:Z,notifications:B,budgets:R,user:K};var V=$;var q=n(84094);"use client";const Y=(0,v.createContext)(null);const G={didCatch:false,error:null};class Q extends v.Component{constructor(e){super(e);this.resetErrorBoundary=this.resetErrorBoundary.bind(this);this.state=G}static getDerivedStateFromError(e){return{didCatch:true,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){var t,n;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++){o[i]=arguments[i]}(t=(n=this.props).onReset)===null||t===void 0?void 0:t.call(n,{args:o,reason:"imperative-api"});this.setState(G)}}componentDidCatch(e,t){var n,r;(n=(r=this.props).onError)===null||n===void 0?void 0:n.call(r,e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state;const{resetKeys:r}=this.props;if(n&&t.error!==null&&X(e.resetKeys,r)){var o,i;(o=(i=this.props).onReset)===null||o===void 0?void 0:o.call(i,{next:r,prev:e.resetKeys,reason:"keys"});this.setState(G)}}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props;const{didCatch:o,error:i}=this.state;let a=e;if(o){const e={error:i,resetErrorBoundary:this.resetErrorBoundary};if((0,v.isValidElement)(r)){a=r}else if(typeof t==="function"){a=t(e)}else if(n){a=(0,v.createElement)(n,e)}else{throw i}}return(0,v.createElement)(Y.Provider,{value:{didCatch:o,error:i,resetErrorBoundary:this.resetErrorBoundary}},a)}}function X(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}function J(e){if(e==null||typeof e.didCatch!=="boolean"||typeof e.resetErrorBoundary!=="function"){throw new Error("ErrorBoundaryContext not found")}return true}function ee(){const e=(0,v.useContext)(Y);J(e);const[t,n]=(0,v.useState)({error:null,hasError:false});const r=(0,v.useMemo)(()=>({resetBoundary:()=>{e===null||e===void 0?void 0:e.resetErrorBoundary();n({error:null,hasError:false})},showBoundary:e=>n({error:e,hasError:true})}),[e===null||e===void 0?void 0:e.resetErrorBoundary]);if(t.hasError){throw t.error}return r}function et(e,t){const n=forwardRef((n,r)=>createElement(Q,t,createElement(e,{...n,ref:r})));const r=e.displayName||e.name||"Unknown";n.displayName="withErrorBoundary(".concat(r,")");return n}var en=n(1447);async function er(){if("ResizeObserver"in window===false){const e=await n.e(737).then(n.bind(n,81518));window.ResizeObserver=e.ResizeObserver}}var eo=n(76074);var ei=n(45492);var ea=n(99818);var el=n(45931);var es=n(24924);var eu=n(24307);function ec(e){return(0,t.jsx)(ed,{...e},e.name)}function ed({name:e,message:n,importer:r}){let[o,i]=(0,v.useState)(null);(0,v.useEffect)(()=>{r().then(t=>i(()=>t[e]))},[e,r]);if(!o){return(0,t.jsxs)(eu.Z,{style:{flex:1,gap:20,justifyContent:"center",alignItems:"center",...ei.W2.delayedFadeIn},children:[n&&(0,t.jsx)(es.Z,{style:{marginBottom:20,fontSize:18},children:n}),(0,t.jsx)(el.Z,{width:25,color:ei.rS.pageTextDark})]})}return(0,t.jsx)(o,{})};function ef(){return(0,t.jsx)("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:ei.rS.pageBackground},children:(0,t.jsxs)("svg",{viewBox:"0 0 642 535",fill:"none",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",style:{position:"absolute",top:0,left:0,height:"100%",width:"100%"},children:[(0,t.jsx)("path",{fill:"url(#paint0_linear)",d:"M0 0h642v535H0z"}),(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"paint0_linear",x1:"162",y1:"23.261",x2:"468.904",y2:"520.44",gradientUnits:"userSpaceOnUse",children:[(0,t.jsx)("stop",{stopColor:ei.rS.pageBackgroundTopLeft}),(0,t.jsx)("stop",{offset:"1",stopColor:ei.rS.pageBackgroundBottomRight,stopOpacity:"0.5"})]})}),(0,t.jsx)(ec,{importer:()=>n.e(231).then(n.bind(n,31231)),name:"BackgroundImage"})]})})};function eh({initializing:e,loadingText:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ef,{}),(n!=null||e)&&(0,t.jsxs)(eu.Z,{className:`${(0,ea.iv)({position:"absolute",top:0,left:0,right:0,padding:50,paddingTop:200,color:ei.rS.pageText,alignItems:"center"})}`,children:[(0,t.jsx)(es.Z,{style:{marginBottom:20,fontSize:18},children:n}),(0,t.jsx)(el.Z,{width:25,color:ei.rS.pageText})]})]})}var ep=eh;var eg=n(15633);function em(){return(0,t.jsxs)(eu.Z,{style:{padding:"6px 20px",display:"flex",flexDirection:"row",justifyContent:"space-between",color:ei.rS.warningText,backgroundColor:ei.rS.warningBackground,borderBottom:`1px solid ${ei.rS.warningAccent}`,zIndex:1,flexShrink:0},children:[(0,t.jsx)(eu.Z,{children:"This is a demo build of Actual."}),(0,t.jsx)(eu.Z,{children:(0,t.jsxs)(eg.Z,{linkColor:"blue",to:`https://github.com/actualbudget/actual/pull/${{"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_BACKEND_WORKER_HASH":"b835d2cdcf8004c363da"}.REACT_APP_REVIEW_ID}`,children:["Open the PR: #",{"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_BACKEND_WORKER_HASH":"b835d2cdcf8004c363da"}.REACT_APP_REVIEW_ID]})})]})}var ev=n(56816);var ey=n(21920);var eb=n(8987);var ex=n(42994);var ew=n(84196);var eS=n(77644);var ek=n(10730);function eT({error:e}){let n;if("IDBFailure"in e&&e.IDBFailure){n=(0,t.jsx)(eS.Z,{children:"Your browser doesn’t support IndexedDB in this environment, a feature that Actual requires to run. This might happen if you are in private browsing mode. Please try a different browser or turn off private browsing."})}else if("SharedArrayBufferMissing"in e&&e.SharedArrayBufferMissing){n=(0,t.jsxs)(eS.Z,{children:["Actual requires access to ",(0,t.jsx)("code",{children:"SharedArrayBuffer"})," in order to function properly. If you’re seeing this error, either your browser does not support ",(0,t.jsx)("code",{children:"SharedArrayBuffer"}),", or your server is not sending the appropriate headers, or you are not using HTTPS. See"," ",(0,t.jsx)(eg.Z,{linkColor:"muted",to:"https://actualbudget.org/docs/troubleshooting/shared-array-buffer",children:"our troubleshooting documentation"})," ","to learn more. ",(0,t.jsx)(eC,{})]})}else{n=(0,t.jsxs)(eS.Z,{children:["There was a problem loading the app in this browser version. If this continues to be a problem, you can"," ",(0,t.jsx)(eg.Z,{linkColor:"muted",to:"https://github.com/actualbudget/releases",children:"download the desktop app"}),"."]})}return(0,t.jsxs)(ew.Z,{style:{paddingBottom:15,lineHeight:"1.5em",fontSize:15},children:[(0,t.jsx)(eS.Z,{children:n}),(0,t.jsxs)(eS.Z,{children:["Please get"," ",(0,t.jsx)(eg.Z,{linkColor:"muted",to:"https://actualbudget.org/contact",children:"in touch"})," ","for support"]})]})}function eE(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ex.Z,{children:"There was an unrecoverable error in the UI. Sorry!"}),(0,t.jsxs)(ex.Z,{children:["If this error persists, please get"," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/contact",children:"in touch"})," ","so it can be investigated."]})]})}function eC(){let[e,n]=(0,v.useState)(false);let[r,o]=(0,v.useState)(false);return e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ex.Z,{style:{marginTop:10},children:["Actual uses ",(0,t.jsx)("code",{children:"SharedArrayBuffer"})," to allow usage from multiple tabs at once and to ensure correct behavior when switching files. While it can run without access to ",(0,t.jsx)("code",{children:"SharedArrayBuffer"}),", you may encounter data loss or notice multiple budget files being merged with each other."]}),(0,t.jsxs)("label",{style:{display:"flex",alignItems:"center",marginBottom:10},children:[(0,t.jsx)(ek.XZ,{checked:r,onChange:e=>o(!r)})," ","I understand the risks, run Actual in the unsupported fallback mode"]}),(0,t.jsx)(ev.Z,{disabled:!r,onClick:()=>{window.localStorage.setItem("SharedArrayBufferOverride","true");window.location.reload()},children:"Open Actual"})]}):(0,t.jsx)(ey.Z,{onClick:()=>n(true),style:{marginLeft:5},children:"Advanced options"})}function ej({buttonText:e,error:n}){let[r,o]=(0,v.useState)(false);const i="type"in n&&n.type==="app-init-failure";return(0,t.jsx)(eb.C,{isCurrent:true,showClose:false,title:"Fatal Error",children:(0,t.jsxs)(eu.Z,{style:{maxWidth:500},children:[i?(0,t.jsx)(eT,{error:n}):(0,t.jsx)(eE,{}),(0,t.jsx)(ex.Z,{children:(0,t.jsx)(ev.Z,{onClick:()=>window.Actual.relaunch(),children:e})}),(0,t.jsxs)(ex.Z,{isLast:true,style:{fontSize:11},children:[(0,t.jsx)(ey.Z,{onClick:()=>o(true),children:"Show Error"}),r&&(0,t.jsx)(es.Z,{style:{marginTop:5,height:100,overflow:"auto"},children:n.stack})]})]})})}var eI=ej;var eD=n(21251);function eP(e,t,n){return t.split(".").reduce((e,t)=>e&&e[t]?e[t]:n||null,e)}function eO(e,t){return e.filter(e=>e!==t)}function eM(e){return typeof e==="string"}function e_(e){return typeof e==="object"}function eR(e,t){const n=new Map;const r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r);t.forEach(r);const o=[];n.forEach((e,t)=>{if(e===1){o.push(t)}});return o}function eA(e,t){return e.filter(e=>t.indexOf(e)>-1)};const eN="dnd-core/INIT_COORDS";const eZ="dnd-core/BEGIN_DRAG";const eL="dnd-core/PUBLISH_DRAG_SOURCE";const eB="dnd-core/HOVER";const eF="dnd-core/DROP";const eW="dnd-core/END_DRAG";function eU(e,t){return{type:eN,payload:{sourceClientOffset:t||null,clientOffset:e||null}}};const ez={type:eN,payload:{clientOffset:null,sourceClientOffset:null}};function eH(e){return function t(t=[],n={publishSource:true}){const{publishSource:r=true,clientOffset:o,getSourceClientOffset:i}=n;const a=e.getMonitor();const l=e.getRegistry();e.dispatch(eU(o));eK(t,a,l);const s=eq(t,a);if(s==null){e.dispatch(ez);return}let u=null;if(o){if(!i){throw new Error("getSourceClientOffset must be defined")}e$(i);u=i(s)}e.dispatch(eU(o,u));const c=l.getSource(s);const f=c.beginDrag(a,s);if(f==null){return undefined}eV(f);l.pinSource(s);const h=l.getSourceType(s);return{type:eZ,payload:{itemType:h,item:f,sourceId:s,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}function eK(e,t,n){(0,eD.k)(!t.isDragging(),"Cannot call beginDrag while dragging.");e.forEach(function(e){(0,eD.k)(n.getSource(e),"Expected sourceIds to be registered.")})}function e$(e){(0,eD.k)(typeof e==="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function eV(e){(0,eD.k)(e_(e),"Item must be an object.")}function eq(e,t){let n=null;for(let r=e.length-1;r>=0;r--){if(t.canDragSource(e[r])){n=e[r];break}}return n};function eY(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function eG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){eY(e,t,n[t])})}return e}function eQ(e){return function t(t={}){const n=e.getMonitor();const r=e.getRegistry();eX(n);const o=e1(n);o.forEach((o,i)=>{const a=eJ(o,i,r,n);const l={type:eF,payload:{dropResult:eG({},t,a)}};e.dispatch(l)})}}function eX(e){(0,eD.k)(e.isDragging(),"Cannot call drop while not dragging.");(0,eD.k)(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function eJ(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):undefined;e0(i);if(typeof i==="undefined"){i=t===0?{}:r.getDropResult()}return i}function e0(e){(0,eD.k)(typeof e==="undefined"||e_(e),"Drop result must either be an object or undefined.")}function e1(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);t.reverse();return t};function e2(e){return function t(){const t=e.getMonitor();const n=e.getRegistry();e4(t);const r=t.getSourceId();if(r!=null){const e=n.getSource(r,true);e.endDrag(t,r);n.unpinSource()}return{type:eW}}}function e4(e){(0,eD.k)(e.isDragging(),"Cannot call endDrag while not dragging.")};function e5(e,t){if(t===null){return e===null}return Array.isArray(e)?e.some(e=>e===t):e===t};function e3(e){return function t(t,{clientOffset:n}={}){e7(t);const r=t.slice(0);const o=e.getMonitor();const i=e.getRegistry();const a=o.getItemType();e8(r,i,a);e6(r,o,i);e9(r,o,i);return{type:eB,payload:{targetIds:r,clientOffset:n||null}}}}function e7(e){(0,eD.k)(Array.isArray(e),"Expected targetIds to be an array.")}function e6(e,t,n){(0,eD.k)(t.isDragging(),"Cannot call hover while not dragging.");(0,eD.k)(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];(0,eD.k)(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");const o=n.getTarget(r);(0,eD.k)(o,"Expected targetIds to be registered.")}}function e8(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];const i=t.getTargetType(o);if(!e5(i,n)){e.splice(r,1)}}}function e9(e,t,n){e.forEach(function(e){const r=n.getTarget(e);r.hover(t,e)})};function te(e){return function t(){const t=e.getMonitor();if(t.isDragging()){return{type:eL}}return}};function tt(e){return{beginDrag:eH(e),publishDragSource:te(e),hover:e3(e),drop:eQ(e),endDrag:e2(e)}};class tn{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this;const{dispatch:t}=this.store;function n(n){return(...r)=>{const o=n.apply(e,r);if(typeof o!=="undefined"){t(o)}}}const r=tt(this);return Object.keys(r).reduce((e,t)=>{const o=r[t];e[t]=n(o);return e},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=false;this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;if(this.backend){if(e&&!this.isSetUp){this.backend.setup();this.isSetUp=true}else if(!e&&this.isSetUp){this.backend.teardown();this.isSetUp=false}}};this.store=e;this.monitor=t;e.subscribe(this.handleRefCountChange)}};function tr(e,t){return{x:e.x+t.x,y:e.y+t.y}}function to(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ti(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;if(!t||!n||!r){return null}return to(tr(t,r),n)}function ta(e){const{clientOffset:t,initialClientOffset:n}=e;if(!t||!n){return null}return to(t,n)};const tl=[];const ts=[];tl.__IS_NONE__=true;ts.__IS_ALL__=true;function tu(e,t){if(e===tl){return false}if(e===ts||typeof t==="undefined"){return true}const n=eA(t,e);return n.length>0};class tc{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;(0,eD.k)(typeof e==="function","listener must be a function.");(0,eD.k)(typeof n==="undefined"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;const o=()=>{const t=this.store.getState();const o=t.stateId;try{const i=o===r||o===r+1&&!tu(t.dirtyHandlerIds,n);if(!i){e()}}finally{r=o}};return this.store.subscribe(o)}subscribeToOffsetChange(e){(0,eD.k)(typeof e==="function","listener must be a function.");let t=this.store.getState().dragOffset;const n=()=>{const n=this.store.getState().dragOffset;if(n===t){return}t=n;e()};return this.store.subscribe(n)}canDragSource(e){if(!e){return false}const t=this.registry.getSource(e);(0,eD.k)(t,`Expected to find a valid source. sourceId=${e}`);if(this.isDragging()){return false}return t.canDrag(this,e)}canDropOnTarget(e){if(!e){return false}const t=this.registry.getTarget(e);(0,eD.k)(t,`Expected to find a valid target. targetId=${e}`);if(!this.isDragging()||this.didDrop()){return false}const n=this.registry.getTargetType(e);const r=this.getItemType();return e5(n,r)&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e){return false}const t=this.registry.getSource(e,true);(0,eD.k)(t,`Expected to find a valid source. sourceId=${e}`);if(!this.isDragging()||!this.isSourcePublic()){return false}const n=this.registry.getSourceType(e);const r=this.getItemType();if(n!==r){return false}return t.isDragging(this,e)}isOverTarget(e,t={shallow:false}){if(!e){return false}const{shallow:n}=t;if(!this.isDragging()){return false}const r=this.registry.getTargetType(e);const o=this.getItemType();if(o&&!e5(r,o)){return false}const i=this.getTargetIds();if(!i.length){return false}const a=i.indexOf(e);if(n){return a===i.length-1}else{return a>-1}}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return ti(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ta(this.store.getState().dragOffset)}constructor(e,t){this.store=e;this.registry=t}};const td=typeof global!=="undefined"?global:self;const tf=td.MutationObserver||td.WebKitMutationObserver;function th(e){return function t(){const t=setTimeout(r,0);const n=setInterval(r,50);function r(){clearTimeout(t);clearInterval(n);e()}}}function tp(e){let t=1;const n=new tf(e);const r=document.createTextNode("");n.observe(r,{characterData:true});return function e(){t=-t;r.data=t}}const tg=typeof tf==="function"?tp:th;class tm{enqueueTask(e){const{queue:t,requestFlush:n}=this;if(!t.length){n();this.flushing=true}t[t.length]=e}constructor(){this.queue=[];this.pendingErrors=[];this.flushing=false;this.index=0;this.capacity=1024;this.flush=()=>{const{queue:e}=this;while(this.index<e.length){const t=this.index;this.index++;e[t].call();if(this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++){e[t]=e[t+this.index]}e.length-=this.index;this.index=0}}e.length=0;this.index=0;this.flushing=false};this.registerPendingError=e=>{this.pendingErrors.push(e);this.requestErrorThrow()};this.requestFlush=tg(this.flush);this.requestErrorThrow=th(()=>{if(this.pendingErrors.length){throw this.pendingErrors.shift()}})}};class tv{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null;this.release(this)}}constructor(e,t){this.onError=e;this.release=t;this.task=null}};class ty{create(e){const t=this.freeTasks;const n=t.length?t.pop():new tv(this.onError,e=>t[t.length]=e);n.task=e;return n}constructor(e){this.onError=e;this.freeTasks=[]}};const tb=new tm;const tx=new ty(tb.registerPendingError);function tw(e){tb.enqueueTask(tx.create(e))};;const tS="dnd-core/ADD_SOURCE";const tk="dnd-core/ADD_TARGET";const tT="dnd-core/REMOVE_SOURCE";const tE="dnd-core/REMOVE_TARGET";function tC(e){return{type:tS,payload:{sourceId:e}}}function tj(e){return{type:tk,payload:{targetId:e}}}function tI(e){return{type:tT,payload:{sourceId:e}}}function tD(e){return{type:tE,payload:{targetId:e}}};function tP(e){(0,eD.k)(typeof e.canDrag==="function","Expected canDrag to be a function.");(0,eD.k)(typeof e.beginDrag==="function","Expected beginDrag to be a function.");(0,eD.k)(typeof e.endDrag==="function","Expected endDrag to be a function.")}function tO(e){(0,eD.k)(typeof e.canDrop==="function","Expected canDrop to be a function.");(0,eD.k)(typeof e.hover==="function","Expected hover to be a function.");(0,eD.k)(typeof e.drop==="function","Expected beginDrag to be a function.")}function tM(e,t){if(t&&Array.isArray(e)){e.forEach(e=>tM(e,false));return}(0,eD.k)(typeof e==="string"||typeof e==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")};var t_;(function(e){e["SOURCE"]="SOURCE";e["TARGET"]="TARGET"})(t_||(t_={}));let tR=0;function tA(){return tR++};function tN(e){const t=tA().toString();switch(e){case t_.SOURCE:return`S${t}`;case t_.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function tZ(e){switch(e[0]){case"S":return t_.SOURCE;case"T":return t_.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function tL(e,t){const n=e.entries();let r=false;do{const{done:e,value:[,o]}=n.next();if(o===t){return true}r=!!e}while(!r);return false}class tB{addSource(e,t){tM(e);tP(t);const n=this.addHandler(t_.SOURCE,e,t);this.store.dispatch(tC(n));return n}addTarget(e,t){tM(e,true);tO(t);const n=this.addHandler(t_.TARGET,e,t);this.store.dispatch(tj(n));return n}containsHandler(e){return tL(this.dragSources,e)||tL(this.dropTargets,e)}getSource(e,t=false){(0,eD.k)(this.isSourceId(e),"Expected a valid source ID.");const n=t&&e===this.pinnedSourceId;const r=n?this.pinnedSource:this.dragSources.get(e);return r}getTarget(e){(0,eD.k)(this.isTargetId(e),"Expected a valid target ID.");return this.dropTargets.get(e)}getSourceType(e){(0,eD.k)(this.isSourceId(e),"Expected a valid source ID.");return this.types.get(e)}getTargetType(e){(0,eD.k)(this.isTargetId(e),"Expected a valid target ID.");return this.types.get(e)}isSourceId(e){const t=tZ(e);return t===t_.SOURCE}isTargetId(e){const t=tZ(e);return t===t_.TARGET}removeSource(e){(0,eD.k)(this.getSource(e),"Expected an existing source.");this.store.dispatch(tI(e));tw(()=>{this.dragSources.delete(e);this.types.delete(e)})}removeTarget(e){(0,eD.k)(this.getTarget(e),"Expected an existing target.");this.store.dispatch(tD(e));this.dropTargets.delete(e);this.types.delete(e)}pinSource(e){const t=this.getSource(e);(0,eD.k)(t,"Expected an existing source.");this.pinnedSourceId=e;this.pinnedSource=t}unpinSource(){(0,eD.k)(this.pinnedSource,"No source is pinned at the time.");this.pinnedSourceId=null;this.pinnedSource=null}addHandler(e,t,n){const r=tN(e);this.types.set(r,t);if(e===t_.SOURCE){this.dragSources.set(r,n)}else if(e===t_.TARGET){this.dropTargets.set(r,n)}return r}constructor(e){this.types=new Map;this.dragSources=new Map;this.dropTargets=new Map;this.pinnedSourceId=null;this.pinnedSource=null;this.store=e}};const tF=(e,t)=>e===t;function tW(e,t){if(!e&&!t){return true}else if(!e||!t){return false}else{return e.x===t.x&&e.y===t.y}}function tU(e,t,n=tF){if(e.length!==t.length){return false}for(let r=0;r<e.length;++r){if(!n(e[r],t[r])){return false}}return true};function tz(e=tl,t){switch(t.type){case eB:break;case tS:case tk:case tE:case tT:return tl;case eZ:case eL:case eW:case eF:default:return ts}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload;const o=eR(n,r);const i=o.length>0||!tU(n,r);if(!i){return tl}const a=r[r.length-1];const l=n[n.length-1];if(a!==l){if(a){o.push(a)}if(l){o.push(l)}}return o};function tH(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function tK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){tH(e,t,n[t])})}return e}const t$={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function tV(e=t$,t){const{payload:n}=t;switch(t.type){case eN:case eZ:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case eB:if(tW(e.clientOffset,n.clientOffset)){return e}return tK({},e,{clientOffset:n.clientOffset});case eW:case eF:return t$;default:return e}};function tq(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function tY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){tq(e,t,n[t])})}return e}const tG={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:false,isSourcePublic:null};function tQ(e=tG,t){const{payload:n}=t;switch(t.type){case eZ:return tY({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:false});case eL:return tY({},e,{isSourcePublic:true});case eB:return tY({},e,{targetIds:n.targetIds});case tE:if(e.targetIds.indexOf(n.targetId)===-1){return e}return tY({},e,{targetIds:eO(e.targetIds,n.targetId)});case eF:return tY({},e,{dropResult:n.dropResult,didDrop:true,targetIds:[]});case eW:return tY({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:false,isSourcePublic:null,targetIds:[]});default:return e}};function tX(e=0,t){switch(t.type){case tS:case tk:return e+1;case tT:case tE:return e-1;default:return e}};function tJ(e=0){return e+1};function t0(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function t1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){t0(e,t,n[t])})}return e}function t2(e={},t){return{dirtyHandlerIds:tz(e.dirtyHandlerIds,{type:t.type,payload:t1({},t.payload,{prevTargetIds:eP(e,"dragOperation.targetIds",[])})}),dragOffset:tV(e.dragOffset,t),refCount:tX(e.refCount,t),dragOperation:tQ(e.dragOperation,t),stateId:tJ(e.stateId)}};function t4(e,t=undefined,n={},r=false){const o=t5(r);const i=new tc(o,new tB(o));const a=new tn(o,i);const l=e(a,t,n);a.receiveBackend(l);return a}function t5(e){const t=typeof window!=="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__;return(0,x.MT)(t2,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var t3=n(13577);function t7(e,t){if(e==null)return{};var n=t6(e,t);var r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++){r=i[o];if(t.indexOf(r)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;n[r]=e[r]}}return n}function t6(e,t){if(e==null)return{};var n={};var r=Object.keys(e);var o,i;for(i=0;i<r.length;i++){o=r[i];if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}let t8=0;const t9=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var ne=(0,v.memo)(function e(e){var{children:n}=e,r=t7(e,["children"]);const[o,i]=nt(r);(0,v.useEffect)(()=>{if(i){const e=no();++t8;return()=>{if(--t8===0){e[t9]=null}}}return},[]);return(0,t.jsx)(t3.L.Provider,{value:o,children:n})});function nt(e){if("manager"in e){const t={dragDropManager:e.manager};return[t,false]}const t=nn(e.backend,e.context,e.options,e.debugMode);const n=!e.context;return[t,n]}function nn(e,t=no(),n,r){const o=t;if(!o[t9]){o[t9]={dragDropManager:t4(e,t,n,r)}}return o[t9]}function no(){return typeof global!=="undefined"?global:window};function ni(e){let t=null;const n=()=>{if(t==null){t=e()}return t};return n}function na(e,t){return e.filter(e=>e!==t)}function nl(e,t){const n=new Set;const r=e=>n.add(e);e.forEach(r);t.forEach(r);const o=[];n.forEach(e=>o.push(e));return o};class ns{enter(e){const t=this.entered.length;const n=t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e));this.entered=nl(this.entered.filter(n),[e]);return t===0&&this.entered.length>0}leave(e){const t=this.entered.length;this.entered=na(this.entered.filter(this.isNodeInDocument),e);return t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[];this.isNodeInDocument=e}};class nu{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:true,enumerable:true,get(){console.warn(`Browser doesn't allow reading "${e}" until the drop event.`);return null}})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];if(r!=null){t[n]={value:r(e,this.config.matchesTypes),configurable:true,enumerable:true}}});Object.defineProperties(this.item,t)}}canDrag(){return true}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e;this.item={};this.initializeExposedProperties()}};const nc="__NATIVE_FILE__";const nd="__NATIVE_URL__";const nf="__NATIVE_TEXT__";const nh="__NATIVE_HTML__";function np(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return r!=null?r:n};const ng={[nc]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[nh]:{exposeProperties:{html:(e,t)=>np(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[nd]:{exposeProperties:{urls:(e,t)=>np(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[nf]:{exposeProperties:{text:(e,t)=>np(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function nm(e,t){const n=ng[e];if(!n){throw new Error(`native type ${e} has no configuration`)}const r=new nu(n);r.loadDataTransfer(t);return r}function nv(e){if(!e){return null}const t=Array.prototype.slice.call(e.types||[]);return Object.keys(ng).filter(e=>{const n=ng[e];if(!(n===null||n===void 0?void 0:n.matchesTypes)){return false}return n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null};const ny=ni(()=>/firefox/i.test(navigator.userAgent));const nb=ni(()=>Boolean(window.safari));class nx{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:i}=this;let a=t.length-1;if(e===t[a]){return n[a]}let l=0;let s=i.length-1;let u;while(l<=s){u=Math.floor(.5*(l+s));const r=t[u];if(r<e){l=u+1}else if(r>e){s=u-1}else{return n[u]}}a=Math.max(0,s);const c=e-t[a];const f=c*c;return n[a]+r[a]*c+o[a]*f+i[a]*c*f}constructor(e,t){const{length:n}=e;const r=[];for(let e=0;e<n;e++){r.push(e)}r.sort((t,n)=>e[t]<e[n]?-1:1);const o=[];const i=[];const a=[];let l;let s;for(let r=0;r<n-1;r++){l=e[r+1]-e[r];s=t[r+1]-t[r];i.push(l);o.push(s);a.push(s/l)}const u=[a[0]];for(let e=0;e<i.length-1;e++){const t=a[e];const n=a[e+1];if(t*n<=0){u.push(0)}else{l=i[e];const r=i[e+1];const o=l+r;u.push(3*o/((o+r)/t+(o+l)/n))}}u.push(a[a.length-1]);const c=[];const f=[];let h;for(let e=0;e<u.length-1;e++){h=a[e];const t=u[e];const n=1/i[e];const r=t+u[e+1]-h-h;c.push((h-t-r)*n);f.push(r*n*n)}this.xs=e;this.ys=t;this.c1s=u;this.c2s=c;this.c3s=f}};const nw=1;function nS(e){const t=e.nodeType===nw?e:e.parentElement;if(!t){return null}const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function nk(e){return{x:e.clientX,y:e.clientY}}function nT(e){var t;return e.nodeName==="IMG"&&(ny()||!((t=document.documentElement)===null||t===void 0?void 0:t.contains(e)))}function nE(e,t,n,r){let o=e?t.width:n;let i=e?t.height:r;if(nb()&&e){i/=window.devicePixelRatio;o/=window.devicePixelRatio}return{dragPreviewWidth:o,dragPreviewHeight:i}}function nC(e,t,n,r,o){const i=nT(t);const a=i?e:t;const l=nS(a);const s={x:n.x-l.x,y:n.y-l.y};const{offsetWidth:u,offsetHeight:c}=e;const{anchorX:f,anchorY:h}=r;const{dragPreviewWidth:p,dragPreviewHeight:g}=nE(i,t,u,c);const m=()=>{const e=new nx([0,.5,1],[s.y,s.y/c*g,s.y+g-c]);let t=e.interpolate(h);if(nb()&&i){t+=(window.devicePixelRatio-1)*g}return t};const v=()=>{const e=new nx([0,.5,1],[s.x,s.x/u*p,s.x+p-u]);return e.interpolate(f)};const{offsetX:y,offsetY:b}=o;const x=y===0||y;const w=b===0||b;return{x:x?y:v(),y:w?b:m()}};class nj{get window(){if(this.globalContext){return this.globalContext}else if(typeof window!=="undefined"){return window}return undefined}get document(){var e;if((e=this.globalContext)===null||e===void 0?void 0:e.document){return this.globalContext.document}else if(this.window){return this.window.document}else{return undefined}}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null;this.globalContext=e;this.optionsArgs=t}};function nI(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function nD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){nI(e,t,n[t])})}return e}class nP{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e===undefined){return}if(e.__isReactDndBackendSetUp){throw new Error("Cannot have two HTML5 backends at the same time.")}e.__isReactDndBackendSetUp=true;this.addEventListeners(e)}teardown(){const e=this.rootElement;if(e===undefined){return}e.__isReactDndBackendSetUp=false;this.removeEventListeners(this.rootElement);this.clearCurrentDragSourceNode();if(this.asyncEndDragFrameId){var t;(t=this.window)===null||t===void 0?void 0:t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,n){this.sourcePreviewNodeOptions.set(e,n);this.sourcePreviewNodes.set(e,t);return()=>{this.sourcePreviewNodes.delete(e);this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t);this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e);const o=e=>this.handleSelectStart(e);t.setAttribute("draggable","true");t.addEventListener("dragstart",r);t.addEventListener("selectstart",o);return()=>{this.sourceNodes.delete(e);this.sourceNodeOptions.delete(e);t.removeEventListener("dragstart",r);t.removeEventListener("selectstart",o);t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e);const r=t=>this.handleDragOver(t,e);const o=t=>this.handleDrop(t,e);t.addEventListener("dragenter",n);t.addEventListener("dragover",r);t.addEventListener("drop",o);return()=>{t.removeEventListener("dragenter",n);t.removeEventListener("dragover",r);t.removeEventListener("drop",o)}}addEventListeners(e){if(!e.addEventListener){return}e.addEventListener("dragstart",this.handleTopDragStart);e.addEventListener("dragstart",this.handleTopDragStartCapture,true);e.addEventListener("dragend",this.handleTopDragEndCapture,true);e.addEventListener("dragenter",this.handleTopDragEnter);e.addEventListener("dragenter",this.handleTopDragEnterCapture,true);e.addEventListener("dragleave",this.handleTopDragLeaveCapture,true);e.addEventListener("dragover",this.handleTopDragOver);e.addEventListener("dragover",this.handleTopDragOverCapture,true);e.addEventListener("drop",this.handleTopDrop);e.addEventListener("drop",this.handleTopDropCapture,true)}removeEventListeners(e){if(!e.removeEventListener){return}e.removeEventListener("dragstart",this.handleTopDragStart);e.removeEventListener("dragstart",this.handleTopDragStartCapture,true);e.removeEventListener("dragend",this.handleTopDragEndCapture,true);e.removeEventListener("dragenter",this.handleTopDragEnter);e.removeEventListener("dragenter",this.handleTopDragEnterCapture,true);e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,true);e.removeEventListener("dragover",this.handleTopDragOver);e.removeEventListener("dragover",this.handleTopDragOverCapture,true);e.removeEventListener("drop",this.handleTopDrop);e.removeEventListener("drop",this.handleTopDropCapture,true)}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId();const t=this.sourceNodeOptions.get(e);return nD({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){if(this.isDraggingNativeItem()){return"copy"}return this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();const t=this.sourcePreviewNodeOptions.get(e);return nD({anchorX:.5,anchorY:.5,captureDraggingState:false},t||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(e).some(n=>e[n]===t)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode();this.currentNativeSource=nm(e,t);this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource);this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode();this.currentDragSourceNode=e;const t=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)===null||e===void 0?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,true)},t)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){this.currentDragSourceNode=null;if(this.rootElement){var e;(e=this.window)===null||e===void 0?void 0:e.clearTimeout(this.mouseMoveTimeoutTimer||undefined);this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,true)}this.mouseMoveTimeoutTimer=null;return true}return false}handleDragStart(e,t){if(e.defaultPrevented){return}if(!this.dragStartSourceIds){this.dragStartSourceIds=[]}this.dragStartSourceIds.unshift(t)}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){if(this.dragOverTargetIds===null){this.dragOverTargetIds=[]}this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map;this.sourcePreviewNodeOptions=new Map;this.sourceNodes=new Map;this.sourceNodeOptions=new Map;this.dragStartSourceIds=null;this.dropTargetIds=[];this.dragEnterTargetIds=[];this.currentNativeSource=null;this.currentNativeHandle=null;this.currentDragSourceNode=null;this.altKeyPressed=false;this.mouseMoveTimeoutTimer=null;this.asyncEndDragFrameId=null;this.dragOverTargetIds=null;this.lastClientOffset=null;this.hoverRafId=null;this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&nS(t)||null};this.endDragNativeItem=()=>{if(!this.isDraggingNativeItem()){return}this.actions.endDrag();if(this.currentNativeHandle){this.registry.removeSource(this.currentNativeHandle)}this.currentNativeHandle=null;this.currentNativeSource=null};this.isNodeInDocument=e=>{return Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e))};this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;if(e==null||this.isNodeInDocument(e)){return}if(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()){this.actions.endDrag()}this.cancelHover()};this.scheduleHover=e=>{if(this.hoverRafId===null&&typeof requestAnimationFrame!=="undefined"){this.hoverRafId=requestAnimationFrame(()=>{if(this.monitor.isDragging()){this.actions.hover(e||[],{clientOffset:this.lastClientOffset})}this.hoverRafId=null})}};this.cancelHover=()=>{if(this.hoverRafId!==null&&typeof cancelAnimationFrame!=="undefined"){cancelAnimationFrame(this.hoverRafId);this.hoverRafId=null}};this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode();this.dragStartSourceIds=[]};this.handleTopDragStart=e=>{if(e.defaultPrevented){return}const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=nk(e);if(this.monitor.isDragging()){this.actions.endDrag();this.cancelHover()}this.actions.beginDrag(t||[],{publishSource:false,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e;const o=nv(r);if(this.monitor.isDragging()){if(r&&typeof r.setDragImage==="function"){const e=this.monitor.getSourceId();const t=this.sourceNodes.get(e);const o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:i,offsetX:a,offsetY:l}=this.getCurrentSourcePreviewNodeOptions();const s={anchorX:e,anchorY:i};const u={offsetX:a,offsetY:l};const c=nC(t,o,n,s,u);r.setDragImage(o,c.x,c.y)}}try{r===null||r===void 0?void 0:r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();if(!t){setTimeout(()=>this.actions.publishDragSource(),0)}else{this.actions.publishDragSource()}}else if(o){this.beginDragNativeItem(o)}else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable"))){return}else{e.preventDefault()}};this.handleTopDragEndCapture=()=>{if(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()){this.actions.endDrag()}this.cancelHover()};this.handleTopDragEnterCapture=e=>{this.dragEnterTargetIds=[];if(this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)===null||t===void 0?void 0:t.loadDataTransfer(e.dataTransfer)}const n=this.enterLeaveCounter.enter(e.target);if(!n||this.monitor.isDragging()){return}const{dataTransfer:r}=e;const o=nv(r);if(o){this.beginDragNativeItem(o,r)}};this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[];if(!this.monitor.isDragging()){return}this.altKeyPressed=e.altKey;if(t.length>0){this.actions.hover(t,{clientOffset:nk(e)})}const n=t.some(e=>this.monitor.canDropOnTarget(e));if(n){e.preventDefault();if(e.dataTransfer){e.dataTransfer.dropEffect=this.getCurrentDropEffect()}}};this.handleTopDragOverCapture=e=>{this.dragOverTargetIds=[];if(this.isDraggingNativeItem()){var t;(t=this.currentNativeSource)===null||t===void 0?void 0:t.loadDataTransfer(e.dataTransfer)}};this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;this.dragOverTargetIds=[];if(!this.monitor.isDragging()){e.preventDefault();if(e.dataTransfer){e.dataTransfer.dropEffect="none"}return}this.altKeyPressed=e.altKey;this.lastClientOffset=nk(e);this.scheduleHover(t);const n=(t||[]).some(e=>this.monitor.canDropOnTarget(e));if(n){e.preventDefault();if(e.dataTransfer){e.dataTransfer.dropEffect=this.getCurrentDropEffect()}}else if(this.isDraggingNativeItem()){e.preventDefault()}else{e.preventDefault();if(e.dataTransfer){e.dataTransfer.dropEffect="none"}}};this.handleTopDragLeaveCapture=e=>{if(this.isDraggingNativeItem()){e.preventDefault()}const t=this.enterLeaveCounter.leave(e.target);if(!t){return}if(this.isDraggingNativeItem()){setTimeout(()=>this.endDragNativeItem(),0)}this.cancelHover()};this.handleTopDropCapture=e=>{this.dropTargetIds=[];if(this.isDraggingNativeItem()){var t;e.preventDefault();(t=this.currentNativeSource)===null||t===void 0?void 0:t.loadDataTransfer(e.dataTransfer)}else if(nv(e.dataTransfer)){e.preventDefault()}this.enterLeaveCounter.reset()};this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[];this.actions.hover(t,{clientOffset:nk(e)});this.actions.drop({dropEffect:this.getCurrentDropEffect()});if(this.isDraggingNativeItem()){this.endDragNativeItem()}else if(this.monitor.isDragging()){this.actions.endDrag()}this.cancelHover()};this.handleSelectStart=e=>{const t=e.target;if(typeof t.dragDrop!=="function"){return}if(t.tagName==="INPUT"||t.tagName==="SELECT"||t.tagName==="TEXTAREA"||t.isContentEditable){return}e.preventDefault();t.dragDrop()};this.options=new nj(t,n);this.actions=e.getActions();this.monitor=e.getMonitor();this.registry=e.getRegistry();this.enterLeaveCounter=new ns(this.isNodeInDocument)}};const nO=function e(e,t,n){return new nP(e,t,n)};var nM=n(59379);var n_=n(45485);var nR=n(81113);var nA=n(99548);var nN=n(68761);var nZ=n(55833);async function nL(e,t,n,r,o){let i=await n();let a=await t(i);if(!a||(await r())["flags.updateNotificationShownForVersion"]===i){return}e({type:"message",title:"A new version of Actual is available!",message:`Version ${i} of Actual was recently released.`,sticky:true,id:"update-notification",button:{title:"Open changelog",action:()=>{window.open("https://actualbudget.org/docs/releases")}},onClose:async()=>{await o({"flags.updateNotificationShownForVersion":i})}})}var nB=n(57555);var nF=n(68587);var nW=n(91237);const nU=e=>(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:[(0,t.jsx)("g",{clipPath:"url(#a)",children:(0,t.jsx)("path",{fill:"currentColor",d:"M1.857 7.612H.98a.98.98 0 0 0-.98.98v2.224c0 .449.184.857.51 1.163.612.551 1.816 1.49 3.735 2.368a.571.571 0 0 1 .306.346l.939 3.286a.484.484 0 0 0 .469.347h1.47a.479.479 0 0 0 .469-.367l.47-1.817a.262.262 0 0 1 .326-.183c.571.122 1.183.163 1.795.163.613 0 1.225-.061 1.796-.163.143-.02.286.06.327.183l.47 1.817a.502.502 0 0 0 .468.367h1.47a.484.484 0 0 0 .47-.347l1.224-4.245a.487.487 0 0 1 .122-.224c.919-.98 1.53-2.163 1.735-3.47h.49c.53 0 .959-.448.938-.979-.02-.51-.47-.918-.98-.918h-.448C18.06 4.673 14.632 2 10.489 2c-1.775 0-3.428.49-4.755 1.326-.591-.408-1.469-.734-2.693-.632-.49.04-.715.612-.388.959.408.429.796 1 .877 1.735L1.857 7.612Zm3.122.98a.862.862 0 0 1-.857-.858c0-.469.388-.857.857-.857.47 0 .858.388.858.857 0 .47-.388.858-.858.858Z"})}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"a",children:(0,t.jsx)("path",{fill:"currentColor",d:"M0 0h20v20H0z"})})})]});var nz=nU;var nH=n(10895);function nK(){let e=(0,nM.s0)();(0,v.useLayoutEffect)(()=>{window.__navigate=e},[e]);return null};function n$(e){return e.replace("v","").split(".").map(e=>parseInt(e))}function nV(e,t){let n=n$(e);let r=n$(t);return n[0]-r[0]||n[1]-r[1]||n[2]-r[2]}async function nq(){if(l.$8){return Promise.resolve("v99.9.9")}try{let e=await fetch("https://api.github.com/repos/actualbudget/actual/tags");let t=await e.json();let n=t.map(e=>e.name).concat([`v${window.Actual.ACTUAL_VERSION}`]);n.sort(nV);return n[n.length-1]}catch{return"unknown"}}async function nY(e){let t=window.Actual.ACTUAL_VERSION;if(e==="unknown"){return Promise.resolve(false)}return nV(t,e)<0}var nG=n(13015);var nQ=n(61130);function nX(){let e=(0,y.v9)(e=>e.account.accountsSyncing);let n=e?e==="__all"?"accounts":e:null;const r=(0,nG.Yz)(n,{from:{opacity:0,transform:"translateY(-100px)"},enter:{opacity:1,transform:"translateY(0)"},leave:{opacity:0,transform:"translateY(-100px)"},unique:true});return(0,t.jsx)(eu.Z,{style:{position:"absolute",top:0,left:0,right:0,marginTop:5,alignItems:"center",zIndex:501},children:r((e,n)=>n&&(0,t.jsx)(nG.q.div,{style:e,children:(0,t.jsxs)(eu.Z,{style:{borderRadius:4,backgroundColor:ei.rS.pillBackgroundSelected,color:ei.rS.pillTextSelected,padding:"5px 13px",flexDirection:"row",alignItems:"center",...ei.W2.shadow},children:[(0,t.jsx)(nQ.Z,{animating:true,iconStyle:{color:ei.rS.pillTextSelected}}),(0,t.jsxs)(eS.Z,{children:["Syncing ",n]})]})},n))})}var nJ=n(75025);function n0(){let e=(0,nM.s0)();(0,v.useEffect)(()=>{const t=t=>{if(l.jU){return}if(t.metaKey){switch(t.key){case"1":e("/budget");break;case"2":e("/reports");break;case"3":e("/accounts");break;case",":if(l.OS==="mac"){e("/settings")}break;default:}}};document.addEventListener("keydown",t);return()=>document.removeEventListener("keydown",t)},[]);return null}var n1=n(24418);var n2=n(13910);var n4=n(3189);var n5=n(11504);var n3=n(9579);var n7=n(11892);var n6=n(24198);var n8=n(40774);function n9(){let e=(0,n7.D9)();let n=(0,n7.YP)();return(0,t.jsxs)(n8.xD,{version:"v2",style:{},children:[(0,t.jsx)(n8._7,{exposed:true,focused:false,selected:e.size>0,onSelect:e=>n({type:"select-all",event:e})}),(0,t.jsx)(n8.bL,{value:"Stage",width:50}),(0,t.jsx)(n8.bL,{value:"Rule",width:"flex"})]})}var re=n(86918);var rt=n(69304);const rn=(0,rt.n)((0,C.ZP)("schedules").select("*"));var ro=n(99012);function ri({value:e}){let n=(0,y.v9)(e=>e.queries.payees);let r=(0,z.yG)(n);let{data:o}=rn.useQuery();return(0,t.jsx)(ro.Z,{value:e,field:"rule",data:o,describe:e=>(0,n5.b5)(e,r[e._payee])})};let ra={color:ei.rS.pageTextPositive};function rl({style:e,...n}){return(0,t.jsx)(eu.Z,{style:{display:"block",maxWidth:"100%",color:ei.rS.altPillText,backgroundColor:ei.rS.altPillBackground,borderRadius:4,padding:"3px 5px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",...e},children:n.op==="set"?(0,t.jsx)(rs,{...n}):n.op==="link-schedule"?(0,t.jsx)(ru,{...n}):null})}function rs({op:e,field:n,value:r,options:o}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eS.Z,{children:(0,n4.w8)(e)})," ",(0,t.jsx)(eS.Z,{style:ra,children:(0,n4.gL)(n,o)})," ",(0,t.jsx)(eS.Z,{children:"to "}),(0,t.jsx)(ro.Z,{value:r,field:n})]})}function ru({op:e,value:n}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eS.Z,{children:(0,n4.w8)(e)})," ",(0,t.jsx)(ri,{value:n})]})};let rc={color:ei.rS.pageTextPositive};function rd({field:e,op:n,value:r,options:o,prefix:i,style:a,inline:l}){return(0,t.jsxs)(eu.Z,{style:{display:"block",maxWidth:"100%",color:ei.rS.altPillText,backgroundColor:ei.rS.altPillBackground,borderRadius:4,padding:"3px 5px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",...a},children:[i&&(0,t.jsxs)(eS.Z,{children:[i," "]}),(0,t.jsx)(eS.Z,{style:rc,children:(0,n4.gL)(e,o)})," ",(0,t.jsx)(eS.Z,{children:(0,n4.w8)(n)})," ",(0,t.jsx)(ro.Z,{value:r,field:e,inline:l})]})};const rf=(0,v.memo)(({rule:e,hovered:n,selected:r,onHover:o,onEditRule:i})=>{let a=(0,n7.YP)();let l=r?ei.rS.tableBorderSelected:"none";let s=n;return(0,t.jsxs)(n8.X2,{height:"auto",style:{fontSize:13,zIndex:r?101:"auto",borderColor:l,backgroundColor:r?ei.rS.tableRowBackgroundHighlight:s?ei.rS.tableRowBackgroundHover:ei.rS.tableBackground},collapsed:true,onMouseEnter:()=>o&&o(e.id),onMouseLeave:()=>o&&o(null),children:[(0,t.jsx)(n8._7,{exposed:n||r,focused:true,onSelect:t=>{a({type:"select",id:e.id,event:t})},selected:r}),(0,t.jsx)(n8.bL,{name:"stage",width:50,plain:true,style:{color:ei.rS.tableText},children:e.stage&&(0,t.jsx)(eu.Z,{style:{alignSelf:"flex-start",margin:5,backgroundColor:ei.rS.pillBackgroundSelected,color:ei.rS.pillTextSelected,borderRadius:4,padding:"3px 5px"},children:e.stage})}),(0,t.jsx)(n8.gN,{width:"flex",style:{padding:"15px 0"},truncate:false,children:(0,t.jsxs)(ew.Z,{direction:"row",align:"center",children:[(0,t.jsx)(eu.Z,{style:{flex:1,alignItems:"flex-start"},"data-testid":"conditions",children:e.conditions.map((n,r)=>(0,t.jsx)(rd,{field:n.field,op:n.op,inline:true,value:n.value,options:n.options,prefix:r>0?(0,n4.w8)(e.conditionsOp):null,style:r!==0&&{marginTop:3}},r))}),(0,t.jsx)(eS.Z,{children:(0,t.jsx)(re.Z,{style:{width:12,height:12,color:ei.rS.tableText}})}),(0,t.jsx)(eu.Z,{style:{flex:1,alignItems:"flex-start"},"data-testid":"actions",children:e.actions.map((e,n)=>(0,t.jsx)(rl,{...e,style:n!==0&&{marginTop:3}},n))})]})}),(0,t.jsx)(n8.bL,{name:"edit",plain:true,style:{padding:"0 15px",paddingLeft:5},children:(0,t.jsx)(ev.Z,{as:n8.Sx,onSelect:()=>i(e),children:"Edit"})})]})});var rh=rf;function rp({rules:e,selectedItems:n,hoveredRule:r,onHover:o,onEditRule:i}){if(e.length===0){return null}return(0,t.jsx)(eu.Z,{children:e.map(e=>{let a=r===e.id;let l=n.has(e.id);return(0,t.jsx)(rh,{rule:e,hovered:a,selected:l,onHover:o,onEditRule:i},e.id)})})};function rg({data:e,loadMore:n,style:r,onHoverLeave:o,children:i}){let a=(0,v.useRef)();let l=(0,v.useRef)();let s=(0,v.useRef)();function u(e){if(l.current!=null){if(n&&e.target.scrollTop>l.current-750){n()}}}(0,v.useEffect)(()=>{if(a.current){l.current=a.current.getBoundingClientRect().height}else{l.current=null}},[a.current,e]);return(0,t.jsx)(eu.Z,{style:{flex:1,outline:"none","& .animated .animated-row":{transition:".25s transform"},...r},tabIndex:1,"data-testid":"table",children:(0,t.jsx)(eu.Z,{innerRef:s,style:{maxWidth:"100%",overflow:"auto"},onScroll:u,children:(0,t.jsx)("div",{ref:a,onMouseLeave:o,children:i})})})};function rm(e,t,{payees:n,categories:r,accounts:o}){if(!t)return"";let i=null;if(e==="payee"){i=n.find(e=>e.id===t)}else if(e==="category"){i=r.find(e=>e.id===t)}else if(e==="account"){i=o.find(e=>e.id===t)}else{return t}if(i){return i.name}return"(deleted)"}function rv(e,t){let n=e.conditions.flatMap(e=>[(0,n4.gL)(e.field),(0,n4.w8)(e.op),e.op==="oneOf"||e.op==="notOneOf"?e.value.map(n=>rm(e.field,n,t)).join(", "):rm(e.field,e.value,t)]);let r=e.actions.flatMap(e=>{if(e.op==="set"){return[(0,n4.w8)(e.op),(0,n4.gL)(e.field),"to",rm(e.field,e.value,t)]}else if(e.op==="link-schedule"){let n=t.schedules.find(t=>t.id===e.value);return[(0,n4.w8)(e.op),(0,n5.b5)(n,t.payees.find(e=>e.id===n._payee))]}else{return[]}});return(e.stage||"")+" "+n.join(" ")+" "+r.join(" ")}function ry({isModal:e,payeeId:n,setLoading:r}){let[o,i]=(0,v.useState)(null);let[a,l]=(0,v.useState)(null);let[s,u]=(0,v.useState)("");let c=(0,y.I0)();let{data:f}=rn.useQuery();let{list:h}=(0,n3.Z)();let p=(0,y.v9)(e=>({payees:e.queries.payees,accounts:e.queries.accounts,schedules:f}));let g=(0,v.useMemo)(()=>({...p,categories:h}),[p,h]);let m=(0,v.useMemo)(()=>s===""||!a?a:a.filter(e=>rv(e,g).toLowerCase().includes(s.toLowerCase())),[a,s,g]);let b=(0,n7.ZP)("manage-rules",o,[]);let[x,w]=(0,v.useState)(null);async function S(){r(true);let e=null;if(n){e=await (0,q.lW)("payees-get-rules",{id:n})}else{e=await (0,q.lW)("rules-get")}i(e);return e}(0,v.useEffect)(()=>{async function e(){let e=await S();l(e.slice(0,100));r(false);await c((0,n2.Rr)())}nB.kp("openModal","manage-rules");e();return()=>{nB.kp("openModal",null)}},[]);function k(){l(a.concat(o.slice(a.length,a.length+50)))}async function T(){r(true);let{someDeletionsFailed:e}=await (0,q.lW)("rule-delete-all",[...b.items]);if(e){alert("Some rules were not deleted because they are linked to schedules")}let t=await S();l(e=>{return t.slice(0,e.length)});b.dispatch({type:"select-none"});r(false)}let E=(0,v.useCallback)(e=>{c((0,n1.Ll)("edit-rule",{rule:e,onSave:async e=>{let t=await S();l(n=>{let r=t.findIndex(t=>t.id===e.id);if(r>n.length){return t.slice(0,r+75)}else{return t.slice(0,n.length)}});r(false)}}))},[]);function C(){let e={stage:null,conditionsOp:"and",conditions:[{field:"payee",op:"is",value:n||null,type:"id"}],actions:[{op:"set",field:"category",value:null,type:"id"}]};c((0,n1.Ll)("edit-rule",{rule:e,onSave:async e=>{let t=await S();l(n=>{let r=t.findIndex(t=>t.id===e.id);return t.slice(0,r+75)});r(false)}}))}let j=(0,v.useCallback)(e=>{w(e)},[]);if(a===null){return null}return(0,t.jsx)(n7.i5,{instance:b,children:(0,t.jsxs)(eu.Z,{children:[(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",alignItems:"center",padding:e?"0 13px 15px":"0 0 15px",flexShrink:0},children:[(0,t.jsx)(eu.Z,{style:{color:ei.rS.pageTextLight,flexDirection:"row",alignItems:"center",width:"50%"},children:(0,t.jsxs)(eS.Z,{children:["Rules are always run in the order that you see them."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/budgeting/rules/",linkColor:"muted",children:"Learn more"})]})}),(0,t.jsx)(eu.Z,{style:{flex:1}}),(0,t.jsx)(n6.Z,{placeholder:"Filter rules...",value:s,onChange:u})]}),(0,t.jsxs)(eu.Z,{style:{flex:1},children:[(0,t.jsx)(n9,{}),(0,t.jsx)(rg,{data:m,loadMore:k,style:{marginBottom:-1},children:(0,t.jsx)(rp,{rules:m,selectedItems:b.items,hoveredRule:x,onHover:j,onEditRule:E})})]}),(0,t.jsx)(eu.Z,{style:{paddingBlock:15,paddingInline:e?13:0,borderTop:e&&"1px solid "+ei.rS.pillBorder,flexShrink:0},children:(0,t.jsxs)(ew.Z,{direction:"row",align:"center",justify:"flex-end",spacing:2,children:[b.items.size>0&&(0,t.jsxs)(ev.Z,{onClick:T,children:["Delete ",b.items.size," rules"]}),(0,t.jsx)(ev.Z,{type:"primary",onClick:C,children:"Create new rule"})]})})]})})}function rb({isModal:e,payeeId:n,setLoading:r=()=>{}}){return(0,t.jsx)(rn.Provider,{children:(0,t.jsx)(ry,{isModal:e,payeeId:n,setLoading:r})})}var rx=n(13308);function rw(){return(0,t.jsx)(rx.T,{title:"Rules",children:(0,t.jsx)(rb,{isModal:false,payeeId:null})})}var rS=n(63495);var rk=n(46055);var rT=n(73416);var rE=n(52582);var rC=n(57201);var rj=n(5291);var rI=n(57651);function rD({toBudget:e}){let n=(0,rI.Z)(e);let r=(0,rj.Z)();return(0,t.jsxs)(eu.Z,{style:{alignItems:"center",marginBottom:15},children:[(0,t.jsx)(eS.Z,{style:ei.W2.text,children:n<0?"Overbudget:":"To budget:"}),(0,t.jsx)(eS.Z,{style:{...ei.W2.text,fontWeight:"600",fontSize:22,color:n<0?ei.rS.errorText:ei.rS.formInputText},children:r(n,"financial")})]})}function rP({month:e,modalProps:n}){const r=rT.WU(rT.dy(e),"MMM");return(0,t.jsx)(eb.C,{title:"Budget Details",...n,animate:true,children:()=>(0,t.jsxs)(rC.Z.Provider,{value:rT.cv(e),children:[(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",justifyContent:"center",paddingTop:15,paddingBottom:15},children:[(0,t.jsxs)(eu.Z,{style:{...ei.W2.text,fontWeight:"600",textAlign:"right",marginRight:10},children:[(0,t.jsx)(rE.Z,{binding:rk.aK.incomeAvailable,type:"financial"}),(0,t.jsx)(rE.Z,{binding:rk.aK.lastMonthOverspent,type:"financial"}),(0,t.jsx)(rE.Z,{binding:rk.aK.totalBudgeted,type:"financial"}),(0,t.jsx)(rE.Z,{binding:rk.aK.forNextMonth,type:"financial"})]}),(0,t.jsxs)(eu.Z,{style:{...ei.W2.text,display:"flex",flexDirection:"column",textAlign:"left"},children:[(0,t.jsx)(eS.Z,{children:"Available Funds"}),(0,t.jsxs)(eS.Z,{children:["Overspent in ",r]}),(0,t.jsx)(eS.Z,{children:"Budgeted"}),(0,t.jsx)(eS.Z,{children:"For Next Month"})]})]}),(0,t.jsx)(rD,{toBudget:rk.aK.toBudget}),(0,t.jsx)(eu.Z,{style:{flexDirection:"row",justifyContent:"center",paddingBottom:15},children:(0,t.jsx)(ev.Z,{style:{marginRight:10},onClick:n.onClose,children:"Close"})})]})})}var rO=rP;var rM=n(6790);var r_=n(50151);function rR({style:e,children:n}){return(0,t.jsx)(eu.Z,{style:{color:"red",fontSize:13,...e},children:n})};function rA(e,t,n){const r=n.find(e=>e.id===t);const o=r&&r.offbudget===1;return e.offbudget===0&&o}function rN({account:e,accounts:n,categoryGroups:r,balance:o,canDelete:i,actions:a,modalProps:l}){let[s,u]=(0,v.useState)(false);let[c,f]=(0,v.useState)("");let[h,p]=(0,v.useState)("");let[g,m]=(0,v.useState)(false);let[y,b]=(0,v.useState)(false);return(0,t.jsx)(eb.C,{title:"Close Account",...l,style:{flex:0},loading:s,children:()=>(0,t.jsxs)(eu.Z,{children:[(0,t.jsxs)(ex.Z,{children:["Are you sure you want to close ",(0,t.jsx)("strong",{children:e.name}),"?"," ",i?(0,t.jsx)("span",{children:"This account has no transactions so it will be permanently deleted."}):(0,t.jsx)("span",{children:"This account has transactions so we can’t permanently delete it."})]}),(0,t.jsxs)("form",{onSubmit:t=>{t.preventDefault();let r=o!==0&&c==="";m(r);let i=rA(e,c,n)&&h==="";b(i);if(!r&&!i){u(true);a.closeAccount(e.id,c||null,h||null).then(()=>{l.onClose()})}},children:[o!==0&&(0,t.jsxs)(eu.Z,{children:[(0,t.jsxs)(ex.Z,{children:["This account has a balance of"," ",(0,t.jsx)("strong",{children:(0,F.zA)(o)}),". To close this account, select a different account to transfer this balance to:"]}),(0,t.jsx)(eu.Z,{style:{marginBottom:15},children:(0,t.jsx)(rM.Z,{includeClosedAccounts:false,value:c,accounts:n,inputProps:{placeholder:"Select account..."},onSelect:e=>{f(e);if(g&&e){m(false)}}})}),g&&(0,t.jsx)(rR,{style:{marginBottom:15},children:"Transfer is required"}),rA(e,c,n)&&(0,t.jsxs)(eu.Z,{style:{marginBottom:15},children:[(0,t.jsx)(ex.Z,{children:"Since you are transferring the balance from a budgeted account to an off-budget account, this transaction must be categorized. Select a category:"}),(0,t.jsx)(r_.Z,{categoryGroups:r,value:h,inputProps:{placeholder:"Select category..."},onSelect:e=>{p(e);if(y&&e){b(false)}}}),y&&(0,t.jsx)(rR,{children:"Category is required"})]})]}),!i&&(0,t.jsx)(eu.Z,{style:{marginBottom:15},children:(0,t.jsxs)(eS.Z,{style:{fontSize:12},children:["You can also"," ",(0,t.jsx)(ey.Z,{onClick:()=>{u(true);a.forceCloseAccount(e.id).then(()=>l.onClose())},style:{color:ei.rS.errorText},children:"force close"})," ","the account which will delete it and all its transactions permanently. Doing so may change your budget unexpectedly since money in it may vanish."]})}),(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",justifyContent:"flex-end"},children:[(0,t.jsx)(ev.Z,{style:{marginRight:10},onClick:l.onClose,children:"Cancel"}),(0,t.jsx)(ev.Z,{type:"primary",children:"Close Account"})]})]})]})})}var rZ=rN;function rL({modalProps:e,category:n,group:r,categoryGroups:o,onDelete:i}){const[a,l]=(0,v.useState)(null);const[s,u]=(0,v.useState)(null);const c=e=>{let n;switch(e){case"required-transfer":n="You must select a category";break;default:n="Something bad happened, sorry!"}return(0,t.jsx)(eS.Z,{style:{marginTop:15,color:ei.rS.errorText},children:n})};const f=!!(n||r).is_income;return(0,t.jsx)(eb.C,{title:"Confirm Delete",...e,style:{flex:0},children:()=>(0,t.jsxs)(eu.Z,{style:{lineHeight:1.5},children:[r?(0,t.jsxs)(es.Z,{children:["Categories in the group ",(0,t.jsx)("strong",{children:r.name})," are used by existing transaction",!f&&" or it has a positive leftover balance currently","."," ",(0,t.jsx)("strong",{children:"Are you sure you want to delete it?"})," If so, you must select another category to transfer existing transactions and balance to."]}):(0,t.jsxs)(es.Z,{children:[(0,t.jsx)("strong",{children:n.name})," is used by existing transactions",!f&&" or it has a positive leftover balance currently","."," ",(0,t.jsx)("strong",{children:"Are you sure you want to delete it?"})," If so, you must select another category to transfer existing transactions and balance to."]}),s&&c(s),(0,t.jsxs)(eu.Z,{style:{marginTop:20,flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[(0,t.jsx)(eS.Z,{children:"Transfer to:"}),(0,t.jsx)(eu.Z,{style:{flex:1,marginLeft:10,marginRight:30},children:(0,t.jsx)(r_.Z,{categoryGroups:r?o.filter(e=>e.id!==r.id&&!!e.is_income===f):o.filter(e=>!!e.is_income===f).map(e=>({...e,categories:e.categories.filter(e=>e.id!==n.id)})),value:a,inputProps:{placeholder:"Select category..."},onSelect:e=>l(e)})}),(0,t.jsx)(ev.Z,{type:"primary",onClick:()=>{if(!a){u("required-transfer")}else{i(a);e.onClose()}},children:"Delete"})]})]})})}var rB=n(18247);function rF(){const[e,t]=(0,v.useState)(null);const[n,r]=(0,v.useState)(false);const o=(0,rS.Z)();(0,v.useEffect)(()=>{async function e(){r(true);const e=await (0,q.lW)("gocardless-status");t(e.configured||false);r(false)}if(o==="online"){e()}},[o]);return{configured:e,isLoading:n}};function rW({modalProps:e,syncServerStatus:n}){const r=(0,y.I0)();const[o,i]=(0,v.useState)(null);const a=()=>{if(!o){l();return}(0,rB.F)((e,t)=>r((0,n1.Ll)(e,t)))};const l=()=>{r((0,n1.Ll)("gocardless-init",{onSuccess:()=>i(true)}))};const s=()=>{r((0,n1.Ll)("add-local-account"))};const{configured:u}=rF();(0,v.useEffect)(()=>{i(u)},[u]);return(0,t.jsx)(eb.C,{title:"Add Account",...e,children:()=>(0,t.jsxs)(eu.Z,{style:{maxWidth:500,gap:30,color:ei.rS.pageText},children:[(0,t.jsxs)(eu.Z,{style:{gap:10},children:[(0,t.jsx)(ev.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600},onClick:s,children:"Create local account"}),(0,t.jsx)(eu.Z,{style:{lineHeight:"1.4em",fontSize:15},children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Create a local account"})," if you want to add transactions manually. You can also"," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/transactions/importing",linkColor:"muted",children:"import QIF/OFX/QFX files into a local account"}),"."]})})]}),(0,t.jsx)(eu.Z,{style:{gap:10},children:n==="online"?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ev.y,{disabled:n!=="online",style:{padding:"10px 0",fontSize:15,fontWeight:600,flex:1},onClick:a,children:o?"Link bank account with GoCardless":"Set up GoCardless for bank sync"}),(0,t.jsxs)(eS.Z,{style:{lineHeight:"1.4em",fontSize:15},children:[(0,t.jsx)("strong",{children:"Link a bank account"})," to automatically download transactions. GoCardless provides reliable, up-to-date information from hundreds of banks."]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ev.Z,{disabled:true,style:{padding:"10px 0",fontSize:15,fontWeight:600},children:"Set up GoCardless for bank sync"}),(0,t.jsxs)(ex.Z,{style:{fontSize:15},children:["Connect to an Actual server to set up"," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/advanced/bank-sync",linkColor:"muted",children:"automatic syncing with GoCardless"}),"."]})]})})]})})}var rU=n(40400);var rz=n(91871);var rH=n(383);function rK({modalProps:e,actions:n,options:r={}}){let[o,i]=(0,v.useState)("");let[a,l]=(0,v.useState)(false);let[s,u]=(0,v.useState)("");let[c,f]=(0,v.useState)(false);let h=r.recreate;async function p(){if(o!==""&&!a){l(true);u(null);let e=await (0,q.lW)("key-make",{password:o});if(e.error){l(null);u((0,rU.zJ)(e.error));return}n.loadGlobalPrefs();n.loadAllFiles();n.sync();l(false);n.popModal()}}return(0,t.jsx)(eb.C,{...e,style:{width:600},title:h?"Generate new key":"Enable encryption",onClose:()=>n.popModal(),children:()=>(0,t.jsxs)(t.Fragment,{children:[!h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ex.Z,{style:{marginTop:5},children:["To enable end-to-end encryption, you need to create a key. We will generate a key based on a password and use it to encrypt from now on. ",(0,t.jsx)("strong",{children:"This requires a sync reset"})," and all other devices will have to revert to this version of your data."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}),(0,t.jsx)(ex.Z,{children:(0,t.jsxs)("ul",{className:`${(0,ea.iv)({marginTop:0,"& li":{marginBottom:8}})}`,children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Important:"})," if you forget this password"," ",(0,t.jsx)("em",{children:"and"})," you don’t have any local copies of your data, you will lose access to all your data. The data cannot be decrypted without the password."]}),(0,t.jsx)("li",{children:"This key only applies to this file. You will need to generate a new key for each file you want to encrypt."}),(0,t.jsx)("li",{children:"If you’ve already downloaded your data on other devices, you will need to reset them. Actual will automatically take you through this process."}),(0,t.jsx)("li",{children:"It is recommended for the encryption password to be different than the log-in password in order to better protect your data."})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(ex.Z,{style:{marginTop:5},children:["This will generate a new key for encrypting your data."," ",(0,t.jsx)("strong",{children:"This requires a sync reset"})," and all other devices will have to revert to this version of your data. Actual will take you through that process on those devices."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}),(0,t.jsx)(ex.Z,{children:"Key generation is randomized. The same password will create different keys, so this will change your key regardless of the password being different."})]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();p()},children:[(0,t.jsxs)(eu.Z,{style:{alignItems:"center"},children:[(0,t.jsx)(eS.Z,{style:{fontWeight:600,marginBottom:3},children:"Password"}),s&&(0,t.jsx)(eu.Z,{style:{color:ei.rS.errorText,textAlign:"center",fontSize:13,marginBottom:3},children:s}),(0,t.jsx)(rz.Z,{children:(0,t.jsx)(rH.ZP,{type:c?"text":"password",style:{width:300},onChange:e=>i(e.target.value)})}),(0,t.jsx)(eS.Z,{style:{marginTop:5},children:(0,t.jsxs)("label",{style:{userSelect:"none"},children:[(0,t.jsx)("input",{type:"checkbox",onClick:()=>f(!c)})," ","Show password"]})})]}),(0,t.jsx)(eb.Z,{style:{marginTop:20},children:(0,t.jsx)(ev.y,{loading:a,type:"primary",children:"Enable"})})]})]})})};function r$({label:e,labelWidth:n,children:r,width:o,style:i}){return(0,t.jsxs)("label",{className:`${(0,ea.iv)({display:"flex",flexDirection:"row",alignItems:"center",margin:"7px 0",width:o},i)}`,children:[(0,t.jsxs)("div",{style:{width:n||75,textAlign:"right",paddingRight:10},children:[e,":"]}),r]})};function rV({modalProps:e,actions:n}){let r=(0,nM.s0)();let[o,i]=(0,v.useState)("");let[a,l]=(0,v.useState)(false);let[s,u]=(0,v.useState)("0");let[c,f]=(0,v.useState)(false);let[h,p]=(0,v.useState)(false);let g=e=>!isNaN(parseFloat(e));return(0,t.jsx)(eb.C,{title:"Create Local Account",...e,showBack:false,children:()=>(0,t.jsx)(eu.Z,{children:(0,t.jsxs)("form",{onSubmit:async e=>{e.preventDefault();let t=!o;f(t);let i=!g(s);p(i);if(!t&&!i){n.closeModal();let e=await n.createAccount(o,(0,F.sD)(s),a);r("/accounts/"+e)}},children:[(0,t.jsx)(r$,{label:"Name",width:"75%",children:(0,t.jsx)(rz.Z,{children:(0,t.jsx)(rH.ZP,{name:"name",value:o,onChange:e=>i(e.target.value),onBlur:e=>{let t=e.target.value.trim();i(t);if(t&&c){f(false)}},style:{flex:1}})})}),c&&(0,t.jsx)(rR,{style:{marginLeft:75},children:"Name is required"}),(0,t.jsx)(eu.Z,{style:{width:"75%",flexDirection:"row",justifyContent:"flex-end"},children:(0,t.jsxs)(eu.Z,{style:{flexDirection:"column"},children:[(0,t.jsxs)("label",{style:{userSelect:"none",textAlign:"right",width:"100%",display:"flex",verticalAlign:"center",justifyContent:"flex-end"},htmlFor:"offbudget",children:[(0,t.jsx)("input",{id:"offbudget",name:"offbudget",type:"checkbox",checked:a,onChange:e=>l(e.target.checked)}),"Off-budget"]}),(0,t.jsx)("div",{style:{textAlign:"right",fontSize:"0.7em",color:ei.rS.altpageTextSubdued,marginTop:3},children:(0,t.jsxs)(eS.Z,{children:["This cannot be changed later. ",(0,t.jsx)("br",{})," ","\n","See"," ",(0,t.jsx)(eg.Z,{linkColor:"muted",to:"https://actualbudget.org/docs/accounts/#off-budget-accounts",children:"Accounts Overview"})," ","for more information."]})})]})}),(0,t.jsx)(r$,{label:"Balance",width:"75%",children:(0,t.jsx)(rH.ZP,{name:"balance",value:s,onChange:e=>u(e.target.value),onBlur:e=>{let t=e.target.value.trim();u(t);if(g(t)&&h){p(false)}},style:{flex:1}})}),h&&(0,t.jsx)(rR,{style:{marginLeft:75},children:"Balance must be a number"}),(0,t.jsxs)(eb.Z,{children:[(0,t.jsx)(ev.Z,{onClick:()=>e.onBack(),children:"Back"}),(0,t.jsx)(ev.Z,{type:"primary",style:{marginLeft:10},children:"Create"})]})]})})})}var rq=rV;var rY=n(79982);var rG=n(41071);var rQ=n(8780);var rX=n(31261);var rJ=n(22966);function r0({modalProps:e,name:n,onSubmit:r}){let o=(0,y.v9)(e=>e.prefs.local.dateFormat||"MM/dd/yyyy");let{grouped:i}=(0,n3.Z)();let a=(0,y.v9)(e=>e.queries.accounts);let l=(0,y.v9)(e=>e.queries.payees);let{createPayee:s}=(0,en.o)();function u(t){if(t!=null){if(n==="amount"){t=(0,F.l9)(t)}r(n,t)}e.onClose()}const{isNarrowWidth:c}=(0,eo.F)();let f,h,p;let g={":focus":{boxShadow:0}};let m={inputProps:{style:g},containerProps:{style:{height:c?"90vh":275}}};switch(n){case"date":{let e=(0,rT.PR)();f="Date";p=350;h=(0,t.jsx)(rJ.Z,{value:(0,rY.Z)((0,rG.Z)(e),o),dateFormat:o,focused:true,embedded:true,onUpdate:()=>{},onSelect:e=>{u((0,rT.is)((0,rQ.Z)(e,"yyyy-MM-dd",new Date)))}});break}case"account":f="Account";h=(0,t.jsx)(rM.Z,{value:null,accounts:a,focused:true,embedded:true,closeOnBlur:false,onSelect:e=>{if(e){u(e)}},groupHeaderStyle:c?{color:ei.rS.altTableText}:undefined,...m});break;case"payee":f="Payee";h=(0,t.jsx)(rX.Z,{payees:l,accounts:a,value:null,focused:true,embedded:true,closeOnBlur:false,showManagePayees:false,showMakeTransfer:!c,onSelect:async e=>{if(e&&e.startsWith("new:")){e=await s(e.slice("new:".length))}u(e)},isCreatable:true,groupHeaderStyle:c?{color:ei.rS.altTableText}:undefined,...m});break;case"notes":f="Notes";h=(0,t.jsx)(rH.ZP,{focused:true,onEnter:e=>u(e.target.value),style:g});break;case"category":f="Category";h=(0,t.jsx)(r_.Z,{categoryGroups:i,value:null,focused:true,embedded:true,closeOnBlur:false,showSplitOption:false,onUpdate:()=>{},onSelect:e=>{u(e)},groupHeaderStyle:c?{color:ei.rS.altTableText}:undefined,...m});break;case"amount":f="Amount";h=(0,t.jsx)(rH.ZP,{focused:true,onEnter:e=>u(e.target.value),style:g});break;default:}return(0,t.jsx)(eb.C,{title:f,noAnimation:!c,showHeader:c,focusAfterClose:false,...e,padding:0,style:{flex:0,height:c?"85vh":275,padding:"15px 10px",borderRadius:"6px",...p&&{minWidth:p},...!c&&{backgroundColor:ei.rS.mobileModalBackground,color:ei.rS.mobileModalText}},children:()=>(0,t.jsxs)(eu.Z,{children:[!c&&(0,t.jsx)(ek.eX,{title:f,style:{alignSelf:"center",color:ei.rS.altMobileModalText,marginBottom:10}}),(0,t.jsx)(eu.Z,{style:{flex:1},children:h})]})})}var r1=n(24605);function r2({modalProps:e,actions:n,options:r={}}){let{hasExistingKey:o,cloudFileId:i,onSuccess:a}=r;let[l,s]=(0,v.useState)("");let[u,c]=(0,v.useState)("");let[f,h]=(0,v.useState)(false);let[p,g]=(0,v.useState)(false);async function m(){if(l!==""&&!f){h(true);c(null);let{error:e}=await (0,q.lW)("key-test",{password:l,fileId:i});if(e){c((0,rU.Ez)(e));h(false);return}n.popModal();a?.()}}return(0,t.jsx)(eb.C,{...e,showHeader:false,style:{width:600},children:()=>(0,t.jsxs)(eu.Z,{style:{flex:1},children:[(0,t.jsx)(eS.Z,{style:{fontSize:25,fontWeight:700,color:ei.rS.pageTextDark,margin:"20px 0"},children:o?"Unable to decrypt file":"This file is encrypted"}),o?(0,t.jsxs)(ex.Z,{children:["This file was encrypted with a different key than you are currently using. This probably means you changed your password. Enter your current password to update your key."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}):(0,t.jsxs)(ex.Z,{children:["We don’t have a key that encrypts or decrypts this file. Enter the password for this file to create the key for encryption."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more"})]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();m()},children:[(0,t.jsxs)(eu.Z,{style:{marginTop:15,flexDirection:"column",alignItems:"center"},children:[(0,t.jsx)(eS.Z,{style:{fontWeight:600,marginBottom:5},children:"Password"})," ",u&&(0,t.jsx)(eu.Z,{style:{color:ei.rS.errorText,textAlign:"center",fontSize:13,marginBottom:3},children:u}),(0,t.jsx)(rz.Z,{children:(0,t.jsx)(rH.ZP,{type:p?"text":"password",style:{width:"50%"},onChange:e=>s(e.target.value)})}),(0,t.jsx)(eS.Z,{style:{marginTop:5},children:(0,t.jsxs)("label",{style:{userSelect:"none"},children:[(0,t.jsx)("input",{type:"checkbox",onClick:()=>g(!p)})," ","Show password"]})})]}),(0,t.jsxs)(eb.Z,{style:{marginTop:20},children:[(0,t.jsx)(ev.Z,{style:{marginRight:10},onClick:()=>e.onBack(),type:"normal",children:"Back"}),(0,t.jsx)(ev.y,{type:"primary",loading:f,onClick:m,children:o?"Update key":"Create key"})]})]})]})})}var r4=n(68929);var r5=n(41792);var r3=n(43271);const r7=({icon:e,color:n,backgroundColor:r,style:o,children:i})=>{return(0,t.jsxs)(eu.Z,{style:{color:n,fontSize:13,...ei.W2.shadow,borderRadius:4,backgroundColor:r,padding:10,flexDirection:"row","& a, & a:active, & a:visited":{color:ei.rS.altFormLabelText},...o},children:[(0,t.jsx)(eu.Z,{style:{paddingLeft:2,paddingTop:".11em",alignSelf:"stretch",flexShrink:0,marginRight:5},children:(0,t.jsx)(e,{width:13,style:{marginTop:2}})}),(0,t.jsx)(eS.Z,{style:{zIndex:1,lineHeight:1.5},children:i})]})};const r6=({style:e,children:n})=>{return(0,t.jsx)(r7,{icon:r3.Z,color:ei.rS.pageTextLight,backgroundColor:"transparent",style:{...e,boxShadow:"none",padding:5},children:n})};const r8=({style:e,children:n})=>{return(0,t.jsx)(r7,{icon:r5.Z,color:ei.rS.warningText,backgroundColor:ei.rS.warningBackground,style:e,children:n})};const r9=({style:e,children:n})=>{return(0,t.jsx)(r7,{icon:r5.Z,color:ei.rS.altErrorText,backgroundColor:ei.rS.altErrorBackground,style:e,children:n})};var oe=n(25411);var ot=n(31941);var on=n(63541);const oo=[{id:"AT",name:"Austria"},{id:"BE",name:"Belgium"},{id:"BG",name:"Bulgaria"},{id:"HR",name:"Croatia"},{id:"CY",name:"Cyprus"},{id:"CZ",name:"Czechia"},{id:"DK",name:"Denmark"},{id:"EE",name:"Estonia"},{id:"FI",name:"Finland"},{id:"FR",name:"France"},{id:"DE",name:"Germany"},{id:"GR",name:"Greece"},{id:"HU",name:"Hungary"},{id:"IS",name:"Iceland"},{id:"IE",name:"Ireland"},{id:"IT",name:"Italy"},{id:"LV",name:"Latvia"},{id:"LI",name:"Liechtenstein"},{id:"LT",name:"Lithuania"},{id:"LU",name:"Luxembourg"},{id:"MT",name:"Malta"},{id:"NL",name:"Netherlands"},{id:"NO",name:"Norway"},{id:"PL",name:"Poland"},{id:"PT",name:"Portugal"},{id:"RO",name:"Romania"},{id:"SK",name:"Slovakia"},{id:"SI",name:"Slovenia"},{id:"ES",name:"Spain"},{id:"SE",name:"Sweden"},{id:"GB",name:"United Kingdom"}];function oi(e){const[t,n]=(0,v.useState)([]);const[r,o]=(0,v.useState)(false);const[i,a]=(0,v.useState)(false);(0,v.useEffect)(()=>{async function t(){a(false);if(!e){n([]);o(false);return}o(true);const{data:t,error:r}=await (0,q.OK)("gocardless-get-banks",e);if(r){a(true);n([])}else{n(t)}o(false)}t()},[n,o,e]);return{data:t,isLoading:r,isError:i}}function oa(e){return(0,t.jsx)(r9,{style:{alignSelf:"center"},children:e==="timeout"?"Timed out. Please try again.":"An error occurred while linking your account, sorry!"})}function ol({modalProps:e,onMoveExternal:n,onSuccess:r,onClose:o}){const i=(0,y.I0)();let[a,l]=(0,v.useState)(null);let[s,u]=(0,v.useState)(false);let[c,f]=(0,v.useState)();let[h,p]=(0,v.useState)();let[g,m]=(0,v.useState)(null);let[b,x]=(0,v.useState)(null);let[w,S]=(0,v.useState)(false);let k=(0,v.useRef)(null);const{data:T,isLoading:E,isError:C}=oi(h);const{configured:j,isLoading:I}=rF();async function D(){m(null);l("browser");let e=await n({institutionId:c});if(e.error){m(e.error);l(null);return}k.current=e.data;l(null);u(true)}function P(){o?.();e.onClose()}async function O(){l("accounts");await r(k.current);l(null)}const M=()=>{i((0,n1.Ll)("gocardless-init",{onSuccess:()=>x(true)}))};const _=()=>{return(0,t.jsxs)(eu.Z,{style:{gap:10},children:[(0,t.jsxs)(ek.Wi,{children:[(0,t.jsx)(ek.lX,{title:"Choose your country:",htmlFor:"country-field"}),(0,t.jsx)(oe.ZP,{strict:true,highlightFirst:true,disabled:I,suggestions:oo,onSelect:p,value:h,inputProps:{id:"country-field",placeholder:"(please select)"}})]}),C?(0,t.jsxs)(r9,{children:["Failed loading available banks: GoCardless access credentials might be misconfigured. Please"," ",(0,t.jsx)(ey.Z,{onClick:M,style:{color:ei.rS.altFormLabelText,display:"inline"},children:"set them up"})," ","again."]}):h&&(E?"Loading banks...":(0,t.jsxs)(ek.Wi,{children:[(0,t.jsx)(ek.lX,{title:"Choose your bank:",htmlFor:"bank-field"}),(0,t.jsx)(oe.ZP,{focused:true,strict:true,highlightFirst:true,suggestions:T,onSelect:f,value:c,inputProps:{id:"bank-field",placeholder:"(please select)"}})]})),(0,t.jsxs)(r8,{children:["By enabling bank-sync, you will be granting GoCardless (a third party service) read-only access to your entire account’s transaction history. This service is not affiliated with Actual in any way. Make sure you’ve read and understand GoCardless’s"," ",(0,t.jsx)(eg.Z,{to:"https://gocardless.com/privacy/",children:"Privacy Policy"})," ","before proceeding."]}),(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",gap:10,alignItems:"center"},children:[(0,t.jsx)(ev.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,flexGrow:1},onClick:D,disabled:!c||!h,children:"Link bank in browser →"}),(0,t.jsxs)(ev.Z,{type:"bare",onClick:()=>S(true),"aria-label":"Menu",children:[(0,t.jsx)(r4.Z,{width:15,height:15,style:{transform:"rotateZ(90deg)"}}),w&&(0,t.jsx)(on.u,{position:"bottom-right",width:200,style:{padding:0},onClose:()=>S(false),children:(0,t.jsx)(ot.Z,{onMenuSelect:e=>{if(e==="reconfigure"){M()}},items:[{name:"reconfigure",text:"Set new API secrets"}]})})]})]})]})};return(0,t.jsx)(eb.C,{title:"Link Your Bank",...e,onClose:P,style:{flex:0},children:()=>(0,t.jsxs)(eu.Z,{children:[(0,t.jsx)(ex.Z,{style:{fontSize:15},children:"To link your bank account, you will be redirected to a new page where GoCardless will ask to connect to your bank. GoCardless will not be able to withdraw funds from your accounts."}),g&&oa(g),a||I?(0,t.jsxs)(eu.Z,{style:{alignItems:"center",marginTop:15},children:[(0,t.jsx)(el.Z,{color:ei.rS.pageTextDark,style:{width:20,height:20}}),(0,t.jsx)(eu.Z,{style:{marginTop:10,color:ei.rS.pageText},children:I?"Checking GoCardless configuration..":a==="browser"?"Waiting on GoCardless...":a==="accounts"?"Loading accounts...":null}),a==="browser"&&(0,t.jsx)(ey.Z,{onClick:D,style:{marginTop:10},children:"(Account linking not opening in a new tab? Click here)"})]}):s?(0,t.jsx)(ev.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,marginTop:10,backgroundColor:ei.rS.alt3NoticeText,borderColor:ei.rS.alt3NoticeText},onClick:O,children:"Success! Click to continue →"}):j||b?_():(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ex.Z,{style:{color:ei.rS.errorText},children:"GoCardless integration has not yet been configured."}),(0,t.jsx)(ev.Z,{type:"primary",onClick:M,children:"Configure GoCardless integration"})]})]})})};const os=({modalProps:e,onSuccess:n})=>{const[r,o]=(0,v.useState)("");const[i,a]=(0,v.useState)("");const[l,s]=(0,v.useState)(true);const[u,c]=(0,v.useState)(false);const f=async()=>{if(!r||!i){s(false);return}c(true);await Promise.all([(0,q.lW)("secret-set",{name:"nordigen_secretId",value:r}),(0,q.lW)("secret-set",{name:"nordigen_secretKey",value:i})]);n();e.onClose();c(false)};return(0,t.jsxs)(eb.C,{title:"Set-up GoCardless",size:{width:300},...e,children:[(0,t.jsxs)(eu.Z,{style:{display:"flex",gap:10},children:[(0,t.jsxs)(eS.Z,{children:["In order to enable bank-sync via GoCardless (only for EU banks) you will need to create access credentials. This can be done by creating an account with"," ",(0,t.jsx)(eg.Z,{to:"https://gocardless.com/",children:"GoCardless"}),"."]}),(0,t.jsxs)(ek.Wi,{children:[(0,t.jsx)(ek.lX,{title:"Secret ID:",htmlFor:"secret-id-field"}),(0,t.jsx)(rH.ZP,{id:"secret-id-field",type:"password",value:r,onUpdate:o,onChange:()=>s(true)})]}),(0,t.jsxs)(ek.Wi,{children:[(0,t.jsx)(ek.lX,{title:"Secret Key:",htmlFor:"secret-key-field"}),(0,t.jsx)(rH.ZP,{id:"secret-key-field",type:"password",value:i,onUpdate:a,onChange:()=>s(true)})]}),!l&&(0,t.jsx)(r9,{children:"It is required to provide both the secret id and secret key."})]}),(0,t.jsx)(eb.Z,{children:(0,t.jsx)(ev.y,{type:"primary",loading:u,onClick:f,children:"Save and continue"})})]})};var ou=os;var oc=n(25432);var od=n(58068);var of=n(78628);let oh=[{format:"yyyy mm dd",label:"YYYY MM DD"},{format:"yy mm dd",label:"YY MM DD"},{format:"mm dd yyyy",label:"MM DD YYYY"},{format:"mm dd yy",label:"MM DD YY"},{format:"dd mm yyyy",label:"DD MM YYYY"},{format:"dd mm yy",label:"DD MM YY"}];function op(e,t){if(typeof e!=="string"){return null}function n(e){return e&&e.length===1?"0"+e:e}const r=(e,t)=>n=>{const r=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"").split(/[^\d]+/);if(r.length>=3){return r.slice(0,3)}const o=n.replace(/[^\d]/g,"");return[o.slice(0,e),o.slice(e,e+t),o.slice(e+t)]};const o=r(4,2);const i=r(2,2);let a,l,s,u;switch(t){case"dd mm yyyy":a=i(e);l=a[2];s=a[1];u=a[0];break;case"dd mm yy":a=i(e);l=`20${a[2]}`;s=a[1];u=a[0];break;case"yyyy mm dd":a=o(e);l=a[0];s=a[1];u=a[2];break;case"yy mm dd":a=i(e);l=`20${a[0]}`;s=a[1];u=a[2];break;case"mm dd yy":a=i(e);l=`20${a[2]}`;s=a[0];u=a[1];break;default:case"mm dd yyyy":a=i(e);l=a[2];s=a[0];u=a[1]}let c=`${l}-${n(s)}-${n(u)}`;if(!oc.Z(rG.Z(c))){return null}return c}function og(e,t){if(!e){return null}try{return(0,rT.WU)(e,t)}catch(e){}return null}function om(e){let t=e.match(/\.([^.]*)$/);if(!t)return"ofx";let n=t[1].toLowerCase();if(n==="tsv")return"csv";return n}function ov({parseDateFormat:e,showParsed:n,dateFormat:r,date:o}){let i=o&&og(e?op(o,e):o,r);return(0,t.jsxs)(eS.Z,{children:[(0,t.jsxs)(eS.Z,{children:[o||(0,t.jsx)(eS.Z,{style:{color:ei.rS.pageTextLight,fontStyle:"italic"},children:"Empty"})," ","→"," "]}),(0,t.jsx)(eS.Z,{style:{color:i?ei.rS.alt3NoticeText:ei.rS.errorText},children:i||"Invalid"})]})}function oy(e,t){if(e.length===0||t.date==null){return"yyyy mm dd"}let n=e[0];let r=n[t.date];let o=r==null?null:oh.find(e=>op(r,e.format)!=null);return o?o.format:"mm dd yyyy"}function ob(e){if(e.length===0){return{}}let t=e[0];let n=Object.entries(t);function r(e){return e?e[0]:null}let o=r(n.find(([e,t])=>e.toLowerCase().includes("date"))||n.find(([e,t])=>t.match(/^\d+[-/]\d+[-/]\d+$/)));let i=r(n.find(([e,t])=>e.toLowerCase().includes("amount"))||n.find(([e,t])=>t.match(/^-?[.,\d]+$/)));let a=r(n.find(([e,t])=>e!==o&&e!==i));let l=r(n.find(([e,t])=>e!==o&&e!==i&&e!==a));return{date:o,amount:i,payee:a,notes:l}}function ox(e,t){let n={};for(let[r,o]of Object.entries(t)){if(r==="payee"){r="payee_name"}n[r]=e[o||r]}return n}function ow(e,t){if(e==null){return null}let n=typeof e==="string"?(0,F.qP)(e):e;let r=t(n);return r}function oS(e,t,n,r){const o=parseFloat(r)||1;if(t){let t=ow(e.outflow,e=>-Math.abs(e))*o;let n=t?0:ow(e.inflow,e=>Math.abs(e))*o;return{amount:t||n,outflow:t,inflow:n}}return{amount:ow(e.amount,e=>n?e*-1:e)*o,outflow:null,inflow:null}}function ok({transaction:e,fieldMappings:n,showParsed:r,parseDateFormat:o,dateFormat:i,splitMode:a,flipAmount:l,multiplierAmount:s}){let u=(0,v.useMemo)(()=>n?ox(e,n):e,[e,n]);let{amount:c,outflow:f,inflow:h}=oS(u,a,l,s);c=(0,F.eY)(c);f=(0,F.eY)(f);h=(0,F.eY)(h);return(0,t.jsxs)(n8.X2,{style:{backgroundColor:ei.rS.tableBackground},children:[(0,t.jsx)(n8.gN,{width:200,children:r?(0,t.jsx)(ov,{parseDateFormat:o,dateFormat:i,date:u.date}):og(u.date,i)}),(0,t.jsx)(n8.gN,{width:"flex",title:u.imported_payee||u.payee_name,children:u.payee_name}),(0,t.jsx)(n8.gN,{width:"flex",title:u.notes,children:u.notes}),a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n8.gN,{width:90,contentStyle:{textAlign:"right",...ei.W2.tnum},title:f,children:f}),(0,t.jsx)(n8.gN,{width:90,contentStyle:{textAlign:"right",...ei.W2.tnum},title:h,children:h})]}):(0,t.jsx)(n8.gN,{width:90,contentStyle:{textAlign:"right",...ei.W2.tnum},title:c,children:c})]})}function oT({title:e}){return(0,t.jsx)(eS.Z,{style:{fontSize:13,marginBottom:3,color:ei.rS.pageText},children:e})}function oE({style:e,options:n,value:r,onChange:o,hasHeaderRow:i,firstTransaction:a}){return(0,t.jsx)(of.Z,{options:[["choose-field","Choose field..."],...n.map(e=>[e,i?e:`Column ${parseInt(e)+1} (${a[e]})`])],value:r===null?"choose-field":r,style:{width:"100%"},wrapperStyle:e,onChange:e=>o(e)})}function oC({transactions:e,fieldMappings:n,parseDateFormat:r,onChange:o}){let i="-";if(e.length>0&&n&&n.date!=null){let t=e[0][n.date];let r=t&&t.match(/[/.,-/\\]/);i=r?r[0]:" "}return(0,t.jsxs)(eu.Z,{style:{width:120},children:[(0,t.jsx)(ek.eX,{title:"Date format"}),(0,t.jsx)(of.Z,{options:oh.map(e=>[e.format,e.label.replace(/ /g,i)]),value:r||"",onChange:e=>o(e),style:{width:"100%"}})]})}function oj({id:e,checked:n,disabled:r,onChange:o,children:i,style:a}){return(0,t.jsxs)(eu.Z,{style:{flex:1,flexDirection:"row",alignItems:"center",userSelect:"none",minHeight:28,...a},children:[(0,t.jsx)(ek.XZ,{id:e,checked:n,disabled:r,onChange:o}),(0,t.jsx)("label",{htmlFor:e,style:{userSelect:"none",color:r?ei.rS.pageTextSubdued:null},children:i})]})}function oI({multiplierEnabled:e,multiplierAmount:n,onToggle:r,onChangeAmount:o}){return(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",gap:10,height:28},children:[(0,t.jsx)(oj,{id:"add_multiplier",checked:e,onChange:r,children:"Add multiplier"}),(0,t.jsx)(rH.ZP,{type:"text",style:{display:e?"inherit":"none"},value:n,placeholder:"Multiplier",onUpdate:o})]})}function oD({transactions:e,mappings:n,onChange:r,splitMode:o,hasHeaderRow:i}){if(e.length===0){return null}let a=Object.keys(e[0]);n=n||{};return(0,t.jsxs)(eu.Z,{children:[(0,t.jsx)(ek.eX,{title:"CSV FIELDS"}),(0,t.jsxs)(ew.Z,{direction:"row",align:"flex-start",spacing:1,style:{marginTop:5},children:[(0,t.jsxs)(eu.Z,{style:{flex:1},children:[(0,t.jsx)(oT,{title:"Date"}),(0,t.jsx)(oE,{options:a,value:n.date,style:{marginRight:5},onChange:e=>r("date",e),hasHeaderRow:i,firstTransaction:e[0]})]}),(0,t.jsxs)(eu.Z,{style:{flex:1},children:[(0,t.jsx)(oT,{title:"Payee"}),(0,t.jsx)(oE,{options:a,value:n.payee,style:{marginRight:5},onChange:e=>r("payee",e),hasHeaderRow:i,firstTransaction:e[0]})]}),(0,t.jsxs)(eu.Z,{style:{flex:1},children:[(0,t.jsx)(oT,{title:"Notes"}),(0,t.jsx)(oE,{options:a,value:n.notes,style:{marginRight:5},onChange:e=>r("notes",e),hasHeaderRow:i,firstTransaction:e[0]})]}),o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eu.Z,{style:{flex:.5},children:[(0,t.jsx)(oT,{title:"Outflow"}),(0,t.jsx)(oE,{options:a,value:n.outflow,onChange:e=>r("outflow",e),hasHeaderRow:i,firstTransaction:e[0]})]}),(0,t.jsxs)(eu.Z,{style:{flex:.5},children:[(0,t.jsx)(oT,{title:"Inflow"}),(0,t.jsx)(oE,{options:a,value:n.inflow,onChange:e=>r("inflow",e),hasHeaderRow:i,firstTransaction:e[0]})]})]}):(0,t.jsxs)(eu.Z,{style:{flex:1},children:[(0,t.jsx)(oT,{title:"Amount"}),(0,t.jsx)(oE,{options:a,value:n.amount,onChange:e=>r("amount",e),hasHeaderRow:i,firstTransaction:e[0]})]})]})]})}function oP({modalProps:e,options:n}){let r=(0,y.v9)(e=>e.prefs.local.dateFormat||"MM/dd/yyyy");let o=(0,y.v9)(e=>e.prefs.local);let{parseTransactions:i,importTransactions:a,getPayees:l,savePrefs:s}=(0,en.o)();let[u,c]=(0,v.useState)("");let[f,h]=(0,v.useState)("parsing");let[p,g]=(0,v.useState)(null);let[m,b]=(0,v.useState)(n.filename);let[x,w]=(0,v.useState)([]);let[S,k]=(0,v.useState)(null);let[T,E]=(0,v.useState)(null);let[C,j]=(0,v.useState)(false);let[I,D]=(0,v.useState)(false);let[P,O]=(0,v.useState)(false);let{accountId:M,onImported:_}=n;let[R,A]=(0,v.useState)(o[`csv-delimiter-${M}`]||(m.endsWith(".tsv")?" ":","));let[N,Z]=(0,v.useState)(o[`csv-has-header-${M}`]??true);let[L,B]=(0,v.useState)(o[`ofx-fallback-missing-payee-${M}`]??true);let[W,U]=(0,v.useState)(null);let[z,H]=(0,v.useState)(true);const K=(0,od.Z)("experimentalOfxParser");async function $(e,t){h("parsing");let n=om(e);b(e);k(n);t={...t,enableExperimentalOfxParser:K};let{errors:r,transactions:a}=await i(e,t);h(null);g(null);if(r.length>0){g({parsed:true,message:r[0].message||"Internal error"})}else{if(n==="csv"||n==="qif"){D(o[`flip-amount-${M}-${n}`]||false)}if(n==="csv"){let e=o[`csv-mappings-${M}`];e=e?JSON.parse(e):ob(a);E(e);let t=!!(e.outflow||e.inflow);j(t);U(o[`parse-date-${M}-${n}`]||oy(a,e))}else if(n==="qif"){U(o[`parse-date-${M}-${n}`]||oy(a,{date:"date"}))}else{E(null);U(null)}w(a.reverse())}}function V(e){const t=e;if(!t||t.match(/^\d{1,}(\.\d{0,4})?$/)){c(t)}}(0,v.useEffect)(()=>{const e=om(n.filename);const t=oO(e,{csvDelimiter:R,hasHeaderRow:N},{fallbackMissingPayeeToMemo:L});$(n.filename,t)},[i,n.filename]);function q(){if(T==null){return}if(I===true){D(!I)}let e=!C;j(e);let t=ob(x);let n=e?{amount:null,outflow:t.amount,inflow:null}:{amount:t.amount,outflow:null,inflow:null};E({...T,...n})}async function Y(){const e=await window.Actual.openFileDialog({filters:[{name:"Financial Files",extensions:["qif","ofx","qfx","csv","tsv"]}]});const t=om(e[0]);const n=oO(t,{csvDelimiter:R,hasHeaderRow:N},{fallbackMissingPayeeToMemo:L});$(e[0],n)}function G(e,t){E({...T,[e]:t===""?null:t})}async function Q(){h("importing");let t=[];let n;for(let e of x){e=T?ox(e,T):e;let r=oM(S)?e.date:op(e.date,W);if(r==null){n=`Unable to parse date ${e.date||"(empty)"} with given date format`;break}let{amount:o}=oS(e,C,I,u);if(o==null){n=`Transaction on ${e.date} has no amount`;break}let{inflow:i,outflow:a,...l}=e;t.push({...l,date:r,amount:(0,F.l9)(o),cleared:z})}if(n){h(null);g({parsed:false,message:n});return}if(!oM(S)){let e=`parse-date-${M}-${S}`;s({[e]:W})}if(oM(S)){s({[`ofx-fallback-missing-payee-${M}`]:L})}if(S==="csv"){s({[`csv-mappings-${M}`]:JSON.stringify(T)});s({[`csv-delimiter-${M}`]:R})}if(S==="csv"||S==="qif"){s({[`flip-amount-${M}-${S}`]:I})}let r=await a(M,t);if(r){await l()}if(_){_(r)}e.onClose()}let X=[{name:"Date",width:200},{name:"Payee",width:"flex"},{name:"Notes",width:"flex"}];if(C){X.push({name:"Outflow",width:90,style:{textAlign:"right"}});X.push({name:"Inflow",width:90,style:{textAlign:"right"}})}else{X.push({name:"Amount",width:90,style:{textAlign:"right"}})}return(0,t.jsxs)(eb.C,{title:"Import transactions"+(S?` (${S.toUpperCase()})`:""),...e,loading:f==="parsing",style:{width:800},children:[p&&!p.parsed&&(0,t.jsx)(eu.Z,{style:{alignItems:"center",marginBottom:15},children:(0,t.jsxs)(eS.Z,{style:{marginRight:10,color:ei.rS.errorText},children:[(0,t.jsx)("strong",{children:"Error:"})," ",p.message]})}),(!p||!p.parsed)&&(0,t.jsxs)(eu.Z,{style:{flex:"unset",height:300,border:"1px solid "+ei.rS.tableBorder},children:[(0,t.jsx)(n8.xD,{headers:X}),(0,t.jsx)(n8.pX,{items:x,fields:["payee","amount"],style:{backgroundColor:ei.rS.tableHeaderBackground},getItemKey:e=>e,renderEmpty:()=>{return(0,t.jsx)(eu.Z,{style:{textAlign:"center",marginTop:25,color:ei.rS.tableHeaderText,fontStyle:"italic"},children:"No transactions found"})},renderItem:({key:e,style:n,item:o,editing:i,focusedField:a})=>(0,t.jsx)(eu.Z,{style:n,children:(0,t.jsx)(ok,{transaction:o,showParsed:S==="csv"||S==="qif",parseDateFormat:W,dateFormat:r,fieldMappings:T,splitMode:C,flipAmount:I,multiplierAmount:u})},e)})]}),p&&p.parsed&&(0,t.jsxs)(eu.Z,{style:{color:ei.rS.errorText,alignItems:"center",marginTop:10},children:[(0,t.jsxs)(eS.Z,{style:{maxWidth:450,marginBottom:15},children:[(0,t.jsx)("strong",{children:"Error:"})," ",p.message]}),p.parsed&&(0,t.jsx)(ev.Z,{onClick:()=>Y(),children:"Select new file..."})]}),S==="csv"&&(0,t.jsx)(eu.Z,{style:{marginTop:25},children:(0,t.jsx)(oD,{transactions:x,onChange:G,mappings:T,splitMode:C,hasHeaderRow:N})}),oM(S)&&(0,t.jsx)(oj,{id:"form_fallback_missing_payee",checked:L,onChange:()=>{B(e=>!e);$(m,oO("ofx",{fallbackMissingPayeeToMemo:!L}))},children:"Use Memo as a fallback for empty Payees"}),(S==="qif"||S==="csv")&&(0,t.jsx)(eu.Z,{style:{marginTop:25},children:(0,t.jsxs)(ew.Z,{direction:"row",align:"flex-start",spacing:1,style:{marginTop:5},children:[(0,t.jsx)(eu.Z,{children:(S==="qif"||S==="csv")&&(0,t.jsx)(oC,{transactions:x,fieldMappings:T,parseDateFormat:W,onChange:U})}),S==="csv"&&(0,t.jsxs)(eu.Z,{style:{marginLeft:25,gap:5},children:[(0,t.jsx)(ek.eX,{title:"CSV OPTIONS"}),(0,t.jsxs)("label",{style:{display:"flex",flexDirection:"row",gap:5,alignItems:"baseline"},children:["Delimiter:",(0,t.jsx)(of.Z,{options:[[",",","],[";",";"],[" ","tab"]],value:R,onChange:e=>{A(e);$(m,oO("csv",{delimiter:e,hasHeaderRow:N}))},style:{width:50}})]}),(0,t.jsx)(oj,{id:"form_has_header",checked:N,onChange:()=>{Z(!N);$(m,oO("csv",{delimiter:R,hasHeaderRow:!N}))},children:"File has header row"}),(0,t.jsx)(oj,{id:"clear_on_import",checked:z,onChange:()=>{H(!z)},children:"Clear transactions on import"})]}),(0,t.jsx)(eu.Z,{style:{flex:1}}),(0,t.jsxs)(eu.Z,{style:{marginRight:25,gap:5},children:[(0,t.jsx)(ek.eX,{title:"AMOUNT OPTIONS"}),(0,t.jsx)(oj,{id:"form_flip",checked:I,disabled:C,onChange:()=>D(!I),children:"Flip amount"}),S==="csv"&&(0,t.jsx)(oj,{id:"form_split",checked:C,onChange:q,children:"Split amount into separate inflow/outflow columns"}),(0,t.jsx)(oI,{multiplierEnabled:P,multiplierAmount:u,onToggle:()=>{O(!P);c("")},onChangeAmount:V})]})]})}),(0,t.jsx)(eu.Z,{style:{flexDirection:"row",marginTop:5},children:(0,t.jsx)(eu.Z,{style:{alignSelf:"flex-end",flexDirection:"row",alignItems:"center"},children:(0,t.jsxs)(ev.y,{type:"primary",disabled:x.length===0,loading:f==="importing",onClick:Q,children:["Import ",x.length," transactions"]})})})]})}function oO(e,t,n){if(e==="csv"){const{csvDelimiter:e,hasHeaderRow:n}=t;return{csvDelimiter:e,hasHeaderRow:n}}else if(oM(e)){const{fallbackMissingPayeeToMemo:e}=n;return{fallbackMissingPayeeToMemo:e}}return{}}function oM(e){return e==="ofx"||e==="qfx"};class o_ extends v.Component{state={hoveredBackup:null};onHover=e=>{this.setState({hoveredBackup:e})};render(){const{backups:e,onSelect:n}=this.props;const{hoveredBackup:r}=this.state;return(0,t.jsx)(eu.Z,{style:{flex:1,maxHeight:200,overflow:"auto"},onMouseLeave:()=>this.onHover(null),children:e.map((e,o)=>(0,t.jsx)(n8.X2,{collapsed:o!==0,focused:r===e.id,onMouseEnter:()=>this.onHover(e.id),onClick:()=>n(e.id),style:{cursor:"pointer"},children:(0,t.jsx)(n8.bL,{width:"flex",value:e.date?e.date:"Revert to Latest",valueStyle:{paddingLeft:20}})},e.id))})}}function oR({budgetId:e,watchUpdates:n,backupDisabled:r,actions:o,modalProps:i}){let[a,l]=(0,v.useState)([]);(0,v.useEffect)(()=>{(0,q.lW)("backups-get",{id:e}).then(l)},[e]);(0,v.useEffect)(()=>{if(n){(0,q.oL)("backups-updated",l);return()=>(0,q.Ev)("backups-updated",l)}},[n]);const s=a.find(e=>e.isLatest);const u=a.filter(e=>!e.isLatest);return(0,t.jsx)(eb.C,{title:"Load Backup",padding:0,...i,style:{flex:0},children:()=>(0,t.jsxs)(eu.Z,{style:{marginBottom:30},children:[(0,t.jsx)(eu.Z,{style:{margin:20,marginTop:0,marginBottom:15,lineHeight:1.5},children:s?(0,t.jsxs)(es.Z,{children:[(0,t.jsxs)(es.Z,{style:{marginBottom:10},children:[(0,t.jsx)(eS.Z,{style:{fontWeight:600},children:"You are currently working from a backup."})," ","You can load a different backup or revert to the original version below."]}),(0,t.jsx)(ev.Z,{type:"primary",onClick:()=>o.loadBackup(e,s.id),children:"Revert to original version"})]}):(0,t.jsxs)(eu.Z,{style:{alignItems:"flex-start"},children:[(0,t.jsxs)(es.Z,{style:{marginBottom:10},children:["Select a backup to load. After loading a backup, you will have a chance to revert to the current version in this screen."," ",(0,t.jsx)(eS.Z,{style:{fontWeight:600},children:"If you use a backup, you will have to setup all your devices to sync from the new budget."})]}),(0,t.jsx)(ev.Z,{type:"primary",disabled:r,onClick:()=>o.makeBackup(),children:"Backup Now"})]})}),u.length===0?(0,t.jsx)(es.Z,{style:{color:ei.rS.altTableText,marginLeft:20},children:"No backups available"}):(0,t.jsx)(o_,{backups:u,onSelect:t=>o.loadBackup(e,t)})]})})}var oA=oR;var oN=n(50102);function oZ({modalProps:e,payeeId:n}){let[r,o]=(0,v.useState)(true);let i=(0,nM.TH)();if((0,oN.Ry)()){if(i.pathname!=="/payees"){throw new Error(`Possibly invalid use of ManageRulesModal, add the current url \`${i.pathname}\` to the allowlist if you’re confident the modal can never appear on top of the \`/rules\` page.`)}}return(0,t.jsx)(eb.C,{title:"Rules",padding:0,loading:r,...e,style:{...e.style,flex:1,maxWidth:"90%",maxHeight:"90%"},children:()=>(0,t.jsx)(rb,{isModal:true,payeeId:n,setLoading:o})})};let oL={color:ei.rS.pageTextPositive};function oB({modalProps:e,payeeIds:n,targetPayeeId:r}){let{payees:o,modalStack:i}=(0,y.v9)(e=>({payees:e.queries.payees,modalStack:e.modals.modalStack}));let a=!!i.find(e=>e.name==="edit-rule");let l=(0,y.I0)();let[s,u]=(0,v.useState)(true);let c=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(c.current){let e=c.current;let t=e.scrollTop;e.scrollTop=t+1;e.scrollTop=t}},[c.current,true]);let[f]=(0,v.useState)(()=>n.map(e=>o.find(t=>t.id===e)));let h=o.find(e=>e.id===r);if(!h){return null}async function p(){await (0,q.lW)("payees-merge",{targetId:h.id,mergeIds:f.map(e=>e.id)});let t;if(s&&!a){let e=await (0,q.lW)("rule-add-payee-rename",{fromNames:f.map(e=>e.name),to:h.id});t=e}e.onClose();return t}async function g(){let e=await p();if(e){let t=await (0,q.lW)("rule-get",{id:e});l((0,n1.OB)("edit-rule",{rule:t}))}}return(0,t.jsx)(eb.C,{title:"Merge payee?",padding:0,showHeader:false,...e,style:e.style,children:()=>(0,t.jsx)(eu.Z,{style:{padding:20,maxWidth:500},children:(0,t.jsxs)(eu.Z,{children:[(0,t.jsx)(ex.Z,{style:{marginBottom:10,fontWeight:500},children:f.length===1?(0,t.jsxs)(t.Fragment,{children:["The payee ",(0,t.jsx)(eS.Z,{style:oL,children:f[0].name})," ","is not used by transactions any more. Would like to merge it with ",(0,t.jsx)(eS.Z,{style:oL,children:h.name}),"?"]}):(0,t.jsxs)(t.Fragment,{children:["The following payees are not used by transactions any more. Would like to merge them with"," ",(0,t.jsx)(eS.Z,{style:oL,children:h.name}),"?",(0,t.jsx)("ul",{ref:c,style:{margin:0,marginTop:10,maxHeight:140,overflow:"auto"},children:f.map(e=>(0,t.jsx)("li",{children:(0,t.jsx)(eS.Z,{style:oL,children:e.name})},e.id))})]})}),(0,t.jsxs)(r6,{children:["Merging will remove the payee and transfer any existing rules to the new payee.",!a&&(0,t.jsxs)(t.Fragment,{children:[" ","If checked below, a rule will be created to do this rename while importing transactions."]})]}),!a&&(0,t.jsxs)("label",{style:{fontSize:13,marginTop:10,color:ei.rS.pageTextLight,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:e=>u(e.target.checked)}),(0,t.jsxs)(eS.Z,{style:{marginLeft:3},children:["Automatically rename"," ",f.length===1?"this payee":"these payees"," in the future"]})]}),(0,t.jsxs)(eb.Z,{style:{marginTop:20},focusButton:true,children:[(0,t.jsx)(ev.Z,{type:"primary",isSubmit:false,style:{marginRight:10},onClick:p,children:"Merge"}),!a&&(0,t.jsx)(ev.Z,{style:{marginRight:10},onClick:g,children:"Merge and edit rule"}),(0,t.jsx)(ev.Z,{style:{marginRight:10},onClick:()=>e.onBack(),children:"Do nothing"})]})]})})})};function oF(e){return(0,t.jsx)(r9,{style:{alignSelf:"center"},children:e==="timeout"?"Timed out. Please try again.":"An error occurred while linking your account, sorry!"})}function oW({modalProps:e,onMoveExternal:n,onSuccess:r,onClose:o}){let[i,a]=(0,v.useState)(null);let[l,s]=(0,v.useState)(false);let[u,c]=(0,v.useState)(null);let f=(0,v.useRef)(null);async function h(){c(null);a("browser");let e=await n();if(e.error){c(e.error);a(null);return}f.current=e.data;a(null);s(true)}function p(){o?.();e.onClose()}async function g(){a("accounts");await r(f.current);a(null)}return(0,t.jsx)(eb.C,{title:"Link Your Bank",...e,onClose:p,style:{flex:0},children:()=>(0,t.jsxs)(eu.Z,{children:[(0,t.jsx)(ex.Z,{style:{fontSize:15},children:"To link your bank account, you will be moved to your browser for enhanced security. Click below and Actual will automatically resume when you have given your bank’s credentials."}),u&&oF(u),i?(0,t.jsxs)(eu.Z,{style:{alignItems:"center",marginTop:15},children:[(0,t.jsx)(el.Z,{color:ei.rS.pageTextDark,style:{width:20,height:20}}),(0,t.jsx)(eu.Z,{style:{marginTop:10,color:ei.rS.pageText},children:i==="browser"?"Waiting on browser...":i==="accounts"?"Loading accounts...":null})]}):l?(0,t.jsx)(ev.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,marginTop:10,backgroundColor:ei.rS.alt3NoticeText,borderColor:ei.rS.alt3NoticeText},onClick:g,children:"Success! Click to continue →"}):(0,t.jsx)(ev.Z,{type:"primary",style:{padding:"10px 0",fontSize:15,fontWeight:600,marginTop:10},onClick:h,children:"Link bank in browser →"}),(0,t.jsx)("div",{style:{marginTop:i?30:35},children:(0,t.jsx)(eS.Z,{style:{color:ei.rS.pageText,fontWeight:600},children:"Why not link it in the app?"})}),(0,t.jsx)(eS.Z,{style:{marginTop:10,color:ei.rS.pageText,fontSize:13,"& a, & a:visited":{color:ei.rS.pageText}},children:"Typing your bank’s username and password is one of the most security-sensitive things you can do, and the browser is the most secure app in the world. Why not use it to make sure your information is safe? [TODO: Link to docs article]"}),(0,t.jsx)(eb.Z,{style:{marginTop:10},children:(0,t.jsx)(ev.Z,{onClick:()=>e.onBack(),children:"Back"})})]})})};const oU={id:"new",name:"Create new account"};function oz({modalProps:e,requisitionId:n,externalAccounts:r,localAccounts:o,actions:i}){const[a,l]=(0,v.useState)(()=>{return Object.fromEntries(o.filter(e=>e.account_id).map(e=>[e.account_id,e.id]))});async function s(){const e=Object.values(a);o.filter(e=>e.account_id).filter(t=>!e.includes(t.id)).forEach(e=>i.unlinkAccount(e.id));Object.entries(a).forEach(([e,t])=>{const o=r.find(t=>t.account_id===e);if(!o){return}i.linkAccount(n,o,t!==oU.id?t:undefined)});i.closeModal()}const u=o.filter(e=>!Object.values(a).includes(e.id));function c(e,t){l(n=>{const r={...n};if(t){r[e.account_id]=t}else{delete r[e.account_id]}return r})}return(0,t.jsx)(eb.C,{title:"Link Accounts",...e,style:{width:800},children:()=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eS.Z,{style:{marginBottom:10},children:"We found the following accounts. Select which ones you want to add:"}),(0,t.jsxs)(eu.Z,{style:{flex:"unset",height:300,border:"1px solid "+ei.rS.tableBorder},children:[(0,t.jsx)(n8.xD,{headers:[{name:"Bank Account To Sync",width:200},{name:"Account in Actual",width:"flex"},{name:"Actions",width:"flex"}]}),(0,t.jsx)(n8.iA,{items:r,style:{backgroundColor:ei.rS.tableHeaderBackground},getItemKey:e=>e,renderItem:({key:e,item:n})=>(0,t.jsx)(eu.Z,{children:(0,t.jsx)(oH,{externalAccount:n,chosenAccount:a[n.account_id]===oU.id?oU:o.find(e=>a[n.account_id]===e.id),unlinkedAccounts:u,onSetLinkedAccount:c})},e)})]}),(0,t.jsx)(eu.Z,{style:{flexDirection:"row",justifyContent:"flex-end",marginTop:10},children:(0,t.jsx)(ev.Z,{type:"primary",onClick:s,disabled:!Object.keys(a).length,children:"Link accounts"})})]})})}function oH({externalAccount:e,chosenAccount:n,unlinkedAccounts:r,onSetLinkedAccount:o}){const[i,a]=(0,v.useState)(null);const l=[...r,n?.id!==oU.id&&n,oU].filter(Boolean);return(0,t.jsxs)(n8.X2,{style:{backgroundColor:ei.rS.tableBackground},children:[(0,t.jsx)(n8.gN,{width:200,children:e.name}),(0,t.jsx)(n8.gN,{width:"flex",truncate:i!=="account",onClick:()=>a("account"),children:i==="account"?(0,t.jsx)(oe.ZP,{focused:true,strict:true,highlightFirst:true,suggestions:l,onSelect:t=>{o(e,t)},inputProps:{onBlur:()=>a(null)},value:n?.id}):(n?.name)}),(0,t.jsx)(n8.gN,{width:"flex",children:n?(0,t.jsx)(ev.Z,{onClick:()=>{o(e,null)},style:{float:"right"},children:"Remove bank-sync"}):(0,t.jsx)(ev.Z,{type:"primary",onClick:()=>{a("account")},style:{float:"right"},children:"Setup bank-sync"})})]})};function oK(e,t,n){const[r,o]=(0,v.useState)(null);const[i,a]=(0,v.useState)(null);(0,v.useEffect)(()=>{async function r(){a(true);o(await (0,q.lW)(e,t,n));a(false)}r()},[e,t,n]);return{data:r,isLoading:i}}var o$=n(41547);var oV=n(43229);let oq=43;function oY({schedules:e,loading:n}){let r=(0,n7.D9)();let o=(0,n7.YP)();function i({item:e}){let n=r.has(e.id);let i=e._conditions.find(e=>e.field==="amount").op;let a=(0,n5.o7)(e.date);return(0,t.jsxs)(n8.X2,{height:oq,inset:15,onClick:t=>{o({type:"select",id:e.id,event:t})},style:{borderColor:n?ei.rS.alttableBorderSelected:ei.rS.tableBorder,cursor:"pointer",color:n?ei.rS.tableRowBackgroundHighlightText:ei.rS.tableText,backgroundColor:n?ei.rS.tableRowBackgroundHighlight:ei.rS.tableBackground,":hover":{backgroundColor:ei.rS.tableRowBackgroundHover,color:ei.rS.tableText}},children:[(0,t.jsx)(n8._7,{exposed:true,focused:false,selected:n,onSelect:t=>{o({type:"select",id:e.id,event:t})}}),(0,t.jsx)(n8.gN,{width:"flex",children:(0,t.jsx)(o$.Z,{type:"payees",id:e.payee})}),(0,t.jsx)(n8.gN,{width:"flex",children:(0,t.jsx)(o$.Z,{type:"accounts",id:e.account})}),(0,t.jsx)(n8.gN,{width:"auto",title:a,style:{flex:1.5},children:a}),(0,t.jsx)(oV.zB,{amount:e.amount,op:i})]})}return(0,t.jsxs)(eu.Z,{style:{flex:1},children:[(0,t.jsxs)(n8.xD,{height:oq,inset:15,children:[(0,t.jsx)(n8._7,{exposed:!n,focused:false,selected:r.size>0,onSelect:e=>o({type:"select-all",event:e})}),(0,t.jsx)(n8.gN,{width:"flex",children:"Payee"}),(0,t.jsx)(n8.gN,{width:"flex",children:"Account"}),(0,t.jsx)(n8.gN,{width:"auto",style:{flex:1.5},children:"When"}),(0,t.jsx)(n8.gN,{width:100,style:{textAlign:"right"},children:"Amount"})]}),(0,t.jsx)(n8.iA,{rowHeight:oq,style:{flex:1,backgroundColor:"transparent"},items:e,loading:n,isSelected:e=>r.has(e),renderItem:i,renderEmpty:"No schedules found"})]})}function oG({modalProps:e,actions:n}){let{data:r,isLoading:o}=oK("schedule/discover");if(!r)r=[];let[i,a]=(0,v.useState)(false);let l=(0,n7.ZP)("discover-schedules",r,[]);async function s(){let e=r.filter(e=>l.items.has(e.id));a(true);for(let t of e){let e=await (0,q.lW)("schedule/create",{conditions:t._conditions});let{filters:n}=await (0,q.lW)("make-filters-from-conditions",{conditions:t._conditions});if(n.length>0){let{data:t}=await (0,C.Vn)((0,C.ZP)("transactions").filter({$and:n}).select("id"));await (0,q.lW)("transactions-batch-update",{updated:t.map(t=>({id:t.id,schedule:e}))})}}a(false);n.popModal()}return(0,t.jsxs)(eb.C,{title:"Found schedules",size:{width:850,height:650},...e,children:[(0,t.jsx)(ex.Z,{children:"We found some possible schedules in your current transactions. Select the ones you want to create."}),(0,t.jsx)(ex.Z,{children:"If you expected a schedule here and don’t see it, it might be because the payees of the transactions don’t match. Make sure you rename payees on all transactions for a schedule to be the same payee."}),(0,t.jsx)(n7.i5,{instance:l,children:(0,t.jsx)(oY,{loading:o,schedules:r})}),(0,t.jsx)(ew.Z,{direction:"row",align:"center",justify:"flex-end",style:{paddingTop:20,paddingBottom:0},children:(0,t.jsx)(ev.y,{type:"primary",loading:i,disabled:l.items.size===0,onClick:s,children:"Create schedules"})})]})}var oQ=n(14644);var oX=n(5646);var oJ=n(57023);var o0=n(54923);function o1(e,t){let n=(0,n5.lq)(e._conditions);let r=(e,t,n,r)=>{if(e){return{...e,value:r}}if(r!=null){return{op:t,field:n,value:r}}return null};if(t.date==null){return{error:"Date is required"}}if(t.amount==null){return{error:"A valid amount is required"}}return{conditions:[r(n.payee,"is","payee",t.payee),r(n.account,"is","account",t.account),r(n.date,"isapprox","date",t.date),{op:t.amountOp,field:"amount",value:t.amount}].filter(Boolean)}}function o2({modalProps:e,actions:n,id:r}){let o=r==null;let i=(0,nN.n4)({idKey:true});let a=(0,y.I0)();let l=(0,y.v9)(e=>{return e.prefs.local.dateFormat||"MM/dd/yyyy"});let[s,u]=(0,v.useReducer)((e,t)=>{switch(t.type){case"set-schedule":{let n=t.schedule;let r=(0,n5.lq)(n._conditions);let o=new Set(Object.values(r));let i=n._conditions.find(e=>!o.has(e))||n._actions.find(e=>e.op!=="link-schedule");return{...e,schedule:t.schedule,isCustom:i,fields:{payee:n._payee,account:n._account,amount:n._amount||0,amountOp:n._amountOp||"isapprox",date:n._date,posts_transaction:t.schedule.posts_transaction,name:n.name}}}case"set-field":if(!(t.field in e.fields)){throw new Error("Unknown field: "+t.field)}let n={[t.field]:t.value};if(t.field==="amountOp"&&t.value!==e.fields.amountOp){if(t.value==="isbetween"){n.amount=typeof e.fields.amount==="number"?{num1:e.fields.amount,num2:e.fields.amount}:{num1:0,num2:0}}else if(e.fields.amountOp==="isbetween"){n.amount=typeof e.fields.amount==="number"?e.fields.amount:e.fields.amount.num1}}return{...e,fields:{...e.fields,...n}};case"set-transactions":return{...e,transactions:t.transactions};case"set-repeats":return{...e,fields:{...e.fields,date:t.repeats?{frequency:"monthly",start:rT.PR(),patterns:[]}:rT.PR()}};case"set-upcoming-dates":return{...e,upcomingDates:t.dates};case"form-error":return{...e,error:t.error};case"switch-transactions":return{...e,transactionsMode:t.mode};default:throw new Error("Unknown action: "+t.type)}},{schedule:null,upcomingDates:null,error:null,fields:{payee:null,account:null,amount:null,amountOp:null,date:null,posts_transaction:false,name:null},transactions:[],transactionsMode:o?"matched":"linked"});async function c(){let{data:e}=await (0,C.Vn)((0,C.ZP)("schedules").filter({id:r}).select("*"));return e[0]}(0,v.useEffect)(()=>{async function e(){if(o){let e={start:rT.PR(),frequency:"monthly",patterns:[],skipWeekend:false,weekendSolveMode:"after"};let t={posts_transaction:false,_date:e,_conditions:[{op:"isapprox",field:"date",value:e}],_actions:[]};u({type:"set-schedule",schedule:t})}else{let e=await c();if(e&&s.schedule==null){u({type:"set-schedule",schedule:e})}}}e()},[]);(0,v.useEffect)(()=>{async function e(){let e=s.fields.date;if(e==null){u({type:"set-upcoming-dates",dates:null})}else{if(e.frequency){let{data:t}=await (0,q.OK)("schedule/get-upcoming-dates",{config:e,count:3});u({type:"set-upcoming-dates",dates:t})}else{let t=rT.PR();if(e===t||rT.Ax(e,t)){u({type:"set-upcoming-dates",dates:[e]})}else{u({type:"set-upcoming-dates",dates:null})}}}}e()},[s.fields.date]);(0,v.useEffect)(()=>{if(s.schedule&&s.schedule.id&&s.transactionsMode==="linked"){let e=(0,C.Y1)((0,C.ZP)("transactions").filter({schedule:s.schedule.id}).select("*").options({splits:"none"}),e=>u({type:"set-transactions",transactions:e}));return e.unsubscribe}},[s.schedule,s.transactionsMode]);(0,v.useEffect)(()=>{let e=true;let t;if(s.schedule&&s.transactionsMode==="matched"){let{error:n,conditions:r}=o1(s.schedule,s.fields);if(n){u({type:"form-error",error:n});return}r=r.map(e=>{if(e.field==="description"){return{...e,field:"payee"}}else if(e.field==="acct"){return{...e,field:"account"}}return e});(0,q.lW)("make-filters-from-conditions",{conditions:r}).then(({filters:n})=>{if(e){let e=(0,C.Y1)((0,C.ZP)("transactions").filter({$and:n}).select("*").options({splits:"none"}),e=>u({type:"set-transactions",transactions:e}));t=e.unsubscribe}})}return()=>{e=false;if(t){t()}}},[s.schedule,s.transactionsMode,s.fields]);let f=(0,n7.ZP)("transactions",s.transactions,[]);async function h(){u({type:"form-error",error:null});if(s.fields.name){let{data:e}=await (0,C.Vn)((0,C.ZP)("schedules").filter({name:s.fields.name}).select("id"));if(e.length>0&&e[0].id!==s.schedule.id){u({type:"form-error",error:"There is already a schedule with this name"});return}}let{error:e,conditions:t}=o1(s.schedule,s.fields);if(e){u({type:"form-error",error:e});return}let r=await (0,q.OK)(o?"schedule/create":"schedule/update",{schedule:{id:s.schedule.id,posts_transaction:s.fields.posts_transaction,name:s.fields.name},conditions:t});if(r.error){u({type:"form-error",error:"An error occurred while saving. Please visit https://actualbudget.org/contact/ for support."})}else{if(o){await g([...f.items],r.data)}n.popModal()}}async function p(e){let t=await (0,q.lW)("rule-get",{id:e||s.schedule.rule});a((0,n1.Ll)("edit-rule",{rule:t,onSave:async()=>{let e=await c();u({type:"set-schedule",schedule:e})}}))}async function g(e,t){await (0,q.lW)("transactions-batch-update",{updated:e.map(e=>({id:e,schedule:t||s.schedule.id}))});f.dispatch({type:"select-none"})}async function m(e){await (0,q.lW)("transactions-batch-update",{updated:e.map(e=>({id:e,schedule:null}))});f.dispatch({type:"select-none"})}if(s.schedule==null){return null}function b(e){u({type:"switch-transactions",mode:e});f.dispatch({type:"select-none"})}let x=i?i[s.fields.payee]:null;let w=s.fields.date?!!s.fields.date.frequency:false;return(0,t.jsxs)(eb.C,{title:x?`Schedule: ${x.name}`:"Schedule",size:"medium",...e,children:[(0,t.jsx)(ew.Z,{direction:"row",style:{marginTop:10},children:(0,t.jsxs)(ek.Wi,{style:{flex:1},children:[(0,t.jsx)(ek.lX,{title:"Schedule Name",htmlFor:"name-field"}),(0,t.jsx)(o0.Z,{field:"string",type:"string",value:s.fields.name,multi:false,onChange:e=>{u({type:"set-field",field:"name",value:e})}})]})}),(0,t.jsxs)(ew.Z,{direction:"row",style:{marginTop:20},children:[(0,t.jsxs)(ek.Wi,{style:{flex:1},children:[(0,t.jsx)(ek.lX,{title:"Payee",id:"payee-label",htmlFor:"payee-field"}),(0,t.jsx)(rX.Z,{value:s.fields.payee,labelProps:{id:"payee-label"},inputProps:{id:"payee-field",placeholder:"(none)"},onSelect:e=>u({type:"set-field",field:"payee",value:e}),isCreatable:true})]}),(0,t.jsxs)(ek.Wi,{style:{flex:1},children:[(0,t.jsx)(ek.lX,{title:"Account",id:"account-label",htmlFor:"account-field"}),(0,t.jsx)(rM.Z,{includeClosedAccounts:false,value:s.fields.account,labelProps:{id:"account-label"},inputProps:{id:"account-field",placeholder:"(none)"},onSelect:e=>u({type:"set-field",field:"account",value:e})})]}),(0,t.jsxs)(ek.Wi,{style:{flex:1},children:[(0,t.jsxs)(ew.Z,{direction:"row",align:"center",style:{marginBottom:3},children:[(0,t.jsx)(ek.lX,{title:"Amount",htmlFor:"amount-field",style:{margin:0,flex:1}}),(0,t.jsx)(r1.Jz,{ops:["isapprox","is","isbetween"],value:s.fields.amountOp,formatOp:e=>{switch(e){case"is":return"is exactly";case"isapprox":return"is approximately";case"isbetween":return"is between";default:throw new Error("Invalid op for select: "+e)}},style:{padding:"0 10px",color:ei.rS.altpageTextSubdued,fontSize:12},onChange:(e,t)=>u({type:"set-field",field:"amountOp",value:t})})]}),s.fields.amountOp==="isbetween"?(0,t.jsx)(oJ.I,{defaultValue:s.fields.amount,onChange:e=>u({type:"set-field",field:"amount",value:e})}):(0,t.jsx)(oJ._,{id:"amount-field",defaultValue:s.fields.amount,onChange:e=>u({type:"set-field",field:"amount",value:e})})]})]}),(0,t.jsx)(eu.Z,{style:{marginTop:20},children:(0,t.jsx)(ek.lX,{title:"Date"})}),(0,t.jsxs)(ew.Z,{direction:"row",align:"flex-start",justify:"space-between",children:[(0,t.jsxs)(eu.Z,{style:{width:"13.44rem"},children:[w?(0,t.jsx)(oQ.Z,{value:s.fields.date,onChange:e=>u({type:"set-field",field:"date",value:e})}):(0,t.jsx)(rJ.Z,{value:s.fields.date,onSelect:e=>u({type:"set-field",field:"date",value:e}),dateFormat:l}),s.upcomingDates&&(0,t.jsxs)(eu.Z,{style:{fontSize:13,marginTop:20},children:[(0,t.jsx)(eS.Z,{style:{color:ei.rS.pageTextLight,fontWeight:600},children:"Upcoming dates"}),(0,t.jsx)(ew.Z,{direction:"column",spacing:1,style:{marginTop:10,color:ei.rS.pageTextLight},children:s.upcomingDates.map(e=>(0,t.jsx)(eu.Z,{children:rT.WU(e,`${l} EEEE`)},e))})]})]}),(0,t.jsxs)(eu.Z,{style:{marginTop:5,flexDirection:"row",alignItems:"center",userSelect:"none"},children:[(0,t.jsx)(ek.XZ,{id:"form_repeats",checked:w,onChange:e=>{u({type:"set-repeats",repeats:e.target.checked})}}),(0,t.jsx)("label",{htmlFor:"form_repeats",style:{userSelect:"none"},children:"Repeats"})]}),(0,t.jsxs)(ew.Z,{align:"flex-end",children:[(0,t.jsxs)(eu.Z,{style:{marginTop:5,flexDirection:"row",alignItems:"center",userSelect:"none",justifyContent:"flex-end"},children:[(0,t.jsx)(ek.XZ,{id:"form_posts_transaction",checked:s.fields.posts_transaction,onChange:e=>{u({type:"set-field",field:"posts_transaction",value:e.target.checked})}}),(0,t.jsx)("label",{htmlFor:"form_posts_transaction",style:{userSelect:"none"},children:"Automatically add transaction"})]}),(0,t.jsx)(eS.Z,{style:{width:350,textAlign:"right",color:ei.rS.pageTextLight,marginTop:10,fontSize:13,lineHeight:"1.4em"},children:"If checked, the schedule will automatically create transactions for you in the specified account"}),!o&&s.schedule.rule&&(0,t.jsxs)(ew.Z,{direction:"row",align:"center",style:{marginTop:20},children:[s.isCustom&&(0,t.jsx)(eS.Z,{style:{color:ei.rS.altpageTextSubdued,fontSize:13,textAlign:"right",width:350},children:"This schedule has custom conditions and actions"}),(0,t.jsx)(ev.Z,{onClick:()=>p(),disabled:o,children:"Edit as rule"})]})]})]}),(0,t.jsx)(eu.Z,{style:{marginTop:30,flex:1},children:(0,t.jsxs)(n7.i5,{instance:f,children:[o?(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",padding:"5px 0"},children:[(0,t.jsx)(eS.Z,{style:{color:ei.rS.pageTextLight},children:"These transactions match this schedule:"}),(0,t.jsx)(eu.Z,{style:{flex:1}}),(0,t.jsx)(eS.Z,{style:{color:ei.rS.pageTextLight},children:"Select transactions to link on save"})]}):(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",alignItems:"center"},children:[(0,t.jsx)(ev.Z,{type:"bare",style:{color:s.transactionsMode==="linked"?ei.rS.pageTextLink:ei.rS.pageTextSubdued,marginRight:10,fontSize:14},onClick:()=>b("linked"),children:"Linked transactions"})," ",(0,t.jsx)(ev.Z,{type:"bare",style:{color:s.transactionsMode==="matched"?ei.rS.pageTextLink:ei.rS.pageTextSubdued,fontSize:14},onClick:()=>b("matched"),children:"Find matching transactions"}),(0,t.jsx)(eu.Z,{style:{flex:1}}),(0,t.jsx)(n8.Vg,{name:"transactions",items:s.transactionsMode==="linked"?[{name:"unlink",text:"Unlink from schedule"}]:[{name:"link",text:"Link to schedule"}],onSelect:(e,t)=>{switch(e){case"link":g(t);break;case"unlink":m(t);break;default:}}})]}),(0,t.jsx)(oX.Z,{renderEmpty:(0,t.jsx)(o4,{error:s.error,transactionsMode:s.transactionsMode}),transactions:s.transactions,fields:["date","payee","amount"],style:{border:"1px solid "+ei.rS.tableBorder,borderRadius:4,overflow:"hidden",marginTop:5,maxHeight:200}})]})}),(0,t.jsxs)(ew.Z,{direction:"row",justify:"flex-end",align:"center",style:{marginTop:20},children:[s.error&&(0,t.jsx)(eS.Z,{style:{color:ei.rS.errorText},children:s.error}),(0,t.jsx)(ev.Z,{style:{marginRight:10},onClick:n.popModal,children:"Cancel"}),(0,t.jsx)(ev.Z,{type:"primary",onClick:h,children:o?"Add":"Save"})]})]})}function o4(e){return(0,t.jsx)(eu.Z,{style:{padding:20,color:ei.rS.pageTextLight,textAlign:"center"},children:e.error?(0,t.jsxs)(eS.Z,{style:{color:ei.rS.errorText},children:["Could not search: ",e.error]}):e.transactionsMode==="matched"?"No matching transactions":"No linked transactions"})}var o5=n(62829);function o3({modalProps:e,actions:n,transactionIds:r}){let[o,i]=(0,v.useState)("");let a=(0,o5.gZ)({transform:(0,v.useCallback)(e=>e.filter({completed:false}),[])});let l=(0,v.useRef)(null);if(a==null){return null}let{schedules:s,statuses:u}=a;async function c(e){if(r?.length>0){await (0,q.lW)("transactions-batch-update",{updated:r.map(t=>({id:t,schedule:e}))})}n.popModal()}return(0,t.jsxs)(eb.C,{title:"Link Schedule",size:{width:600},...e,children:[(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",gap:4,marginBottom:20,alignItems:"center"},children:[(0,t.jsxs)(eS.Z,{children:["Choose the schedule"," ",r?.length>1?`these ${r.length} transactions belong`:`this transaction belongs`," ","to:"]}),(0,t.jsx)(n6.Z,{inputRef:l,isInModal:true,width:300,placeholder:"Filter schedules…",value:o,onChange:i})]}),(0,t.jsx)(eu.Z,{style:{flex:`1 1 ${(oV.dN-1)*(Math.max(s.length,1)+1)}px`,marginTop:15,maxHeight:"50vh"},children:(0,t.jsx)(oV.Pz,{allowCompleted:false,filter:o,minimal:true,onAction:()=>{},onSelect:c,schedules:s,statuses:u,style:null,tableStyle:{marginInline:-20}})})]})};function o7({modalProps:e,actions:n}){let r=(0,nM.TH)();let o=r.state&&r.state.payees||[];let i=o.length>1;async function a(){await (0,q.lW)("schedule/force-run-service");n.popModal()}return(0,t.jsxs)(eb.C,{title:"Post transactions?",size:"small",...e,children:[(0,t.jsxs)(ex.Z,{children:[o.length>0?(0,t.jsxs)(eS.Z,{children:["The ",i?"payees ":"payee ",o.map((e,n)=>(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)(eS.Z,{style:{color:ei.rS.pageTextPositive},children:(0,t.jsx)(o$.Z,{id:e,type:"payees"})}),n===o.length-1?" ":n===o.length-2?", and ":", "]},e))]}):(0,t.jsxs)(eS.Z,{children:["There ",i?"are payees ":"is a payee "," that "]}),(0,t.jsxs)(eS.Z,{children:[i?"have ":"has "," schedules that are due today. Usually we automatically post transactions for these, but you are offline or syncing failed. In order to avoid duplicate transactions, we let you choose whether or not to create transactions for these schedules."]})]}),(0,t.jsx)(ex.Z,{children:"Be aware that other devices may have already created these transactions. If you have multiple devices, make sure you only do this on one device or you will have duplicate transactions."}),(0,t.jsx)(ex.Z,{children:"You can always manually post a transaction later for a due schedule by selecting the schedule and clicking “Post transaction” in the action menu."}),(0,t.jsxs)(ew.Z,{direction:"row",justify:"flex-end",style:{marginTop:20},spacing:2,children:[(0,t.jsx)(ev.Z,{onClick:n.popModal,children:"Decide later"}),(0,t.jsx)(ev.Z,{type:"primary",onClick:a,children:"Post transactions"})]})]})};function o6(){const e=(0,y.v9)(e=>e.modals.modalStack);const n=(0,y.v9)(e=>e.modals.isHidden);const r=(0,y.v9)(e=>e.queries.accounts);const{grouped:o,list:i}=(0,n3.Z)();const a=(0,y.v9)(e=>e.prefs.local&&e.prefs.local.id);const l=(0,en.o)();const s=(0,nM.TH)();(0,v.useEffect)(()=>{if(e.length>0){l.closeModal()}},[s]);const u=(0,rS.Z)();let c=e.map(({name:s,options:c},f)=>{const h={onClose:l.popModal,onBack:l.popModal,showBack:f>0,isCurrent:f===e.length-1,isHidden:n,stackIndex:f};switch(s){case"import-transactions":return(0,t.jsx)(oP,{modalProps:h,options:c});case"add-account":return(0,t.jsx)(rW,{modalProps:h,syncServerStatus:u});case"add-local-account":return(0,t.jsx)(rq,{modalProps:h,actions:l});case"close-account":return(0,t.jsx)(rZ,{modalProps:h,account:c.account,balance:c.balance,canDelete:c.canDelete,accounts:r.filter(e=>e.closed===0),categoryGroups:o,actions:l});case"select-linked-accounts":return(0,t.jsx)(oz,{modalProps:h,externalAccounts:c.accounts,requisitionId:c.requisitionId,localAccounts:r.filter(e=>e.closed===0),actions:l});case"confirm-category-delete":return(0,t.jsx)(rL,{modalProps:h,category:"category"in c&&i.find(e=>e.id===c.category),group:"group"in c&&o.find(e=>e.id===c.group),categoryGroups:o,onDelete:c.onDelete});case"load-backup":return(0,t.jsx)(oA,{watchUpdates:true,budgetId:a,modalProps:h,actions:l,backupDisabled:false});case"manage-rules":return(0,t.jsx)(oZ,{modalProps:h,payeeId:c.payeeId});case"edit-rule":return(0,t.jsx)(r1.ZP,{modalProps:h,defaultRule:c.rule,onSave:c.onSave});case"merge-unused-payees":return(0,t.jsx)(oB,{modalProps:h,payeeIds:c.payeeIds,targetPayeeId:c.targetPayeeId});case"plaid-external-msg":return(0,t.jsx)(oW,{modalProps:h,onMoveExternal:c.onMoveExternal,onClose:()=>{c.onClose?.();(0,q.lW)("poll-web-token-stop")},onSuccess:c.onSuccess});case"gocardless-init":return(0,t.jsx)(ou,{modalProps:h,onSuccess:c.onSuccess});case"gocardless-external-msg":return(0,t.jsx)(ol,{modalProps:h,onMoveExternal:c.onMoveExternal,onClose:()=>{c.onClose?.();(0,q.lW)("gocardless-poll-web-token-stop")},onSuccess:c.onSuccess});case"create-encryption-key":return(0,t.jsx)(rK,{modalProps:h,actions:l,options:c},s);case"fix-encryption-key":return(0,t.jsx)(r2,{modalProps:h,actions:l,options:c},s);case"edit-field":return(0,t.jsx)(r0,{modalProps:h,name:c.name,onSubmit:c.onSubmit},s);case"budget-summary":return(0,t.jsx)(rO,{modalProps:h,month:c.month},s);case"schedule-edit":return(0,t.jsx)(o2,{modalProps:h,id:c?.id||null,actions:l},s);case"schedule-link":return(0,t.jsx)(o3,{modalProps:h,actions:l,transactionIds:c?.transactionIds},s);case"schedules-discover":return(0,t.jsx)(oG,{modalProps:h,actions:l},s);case"schedule-posts-offline-notification":return(0,t.jsx)(o7,{modalProps:h,actions:l},s);default:console.error("Unknown modal:",s);return null}}).map((n,r)=>(0,t.jsx)(v.Fragment,{children:n},e[r].name));return(0,t.jsx)(t.Fragment,{children:c})}var o8=n(40233);function o9(e,n,r,o){return(0,t.jsx)(ew.Z,{spacing:2,children:e.split(/\n\n/).map((e,i)=>{let a=e.split(/(\[[^\]]*\]\([^)]*\))/g);return(0,t.jsx)(eS.Z,{style:{lineHeight:"1.4em"},children:a.map((e,i)=>{let a=e.match(/\[([^\]]*)\]\(([^)]*)\)/);if(a){let[e,l,s]=a;if(s[0]==="#"){let e=s.slice(1);return(0,t.jsx)(ey.Z,{onClick:async t=>{t.preventDefault();if(n[e]){r(true);await n[e]();o()}},children:l},i)}return(0,t.jsx)(eg.Z,{to:a[2],children:a[1]},i)}return(0,t.jsx)(eS.Z,{children:e},i)})},i)})})}function ie({notification:e,onRemove:n}){let{type:r,title:o,message:i,pre:a,messageActions:l,sticky:s,internal:u,button:c}=e;let[f,h]=(0,v.useState)(false);let[p,g]=(0,v.useState)(false);(0,v.useEffect)(()=>{if(r==="error"&&u){console.error("Internal error:",u)}if(!s){setTimeout(n,6500)}},[]);let m=r==="message";let y=r==="error";let b=(0,v.useMemo)(()=>o9(i,l,g,n),[i,l]);return(0,t.jsxs)(eu.Z,{style:{marginTop:10,color:m?ei.rS.alt4NoticeText:y?ei.rS.alt3ErrorText:ei.rS.alt4WarningText},children:[(0,t.jsxs)(ew.Z,{align:"center",direction:"row",style:{padding:"14px 14px",fontSize:14,backgroundColor:m?ei.rS.alt2NoticeBackground:y?ei.rS.errorBackground:ei.rS.alt2WarningBackground,borderTop:`3px solid ${m?ei.rS.altNoticeAccent:y?ei.rS.altErrorAccent:ei.rS.altWarningAccent}`,...ei.W2.shadowLarge,maxWidth:550,"& a":{color:"currentColor"}},children:[(0,t.jsxs)(ew.Z,{align:"flex-start",children:[o&&(0,t.jsx)(eu.Z,{style:{fontWeight:700,marginBottom:10},children:o}),(0,t.jsx)(eu.Z,{children:b}),a?a.split("\n\n").map((e,n)=>(0,t.jsx)(eu.Z,{style:{whiteSpace:"pre-wrap",fontFamily:"monospace",fontSize:12,backgroundColor:"rgba(0, 0, 0, .05)",padding:10,borderRadius:4},children:e},n)):null,c&&(0,t.jsx)(ev.y,{type:"bare",loading:f,onClick:async()=>{h(true);await c.action();n();h(false)},style:{backgroundColor:"transparent",border:`1px solid ${m?ei.rS.altNoticeAccent:y?ei.rS.altErrorAccent:ei.rS.altWarningAccent}`,color:"currentColor",fontSize:14,flexShrink:0,"&:hover, &:active":{backgroundColor:m?ei.rS.noticeBackground:y?ei.rS.altErrorBackground:ei.rS.altWarningBackground}},children:c.title})]}),s&&(0,t.jsx)(ev.Z,{type:"bare",style:{flexShrink:0,color:"currentColor"},onClick:n,children:(0,t.jsx)(o8.Z,{style:{width:9,height:9,color:"currentColor"}})})]}),p&&(0,t.jsx)(eu.Z,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:ei.rS.tableBackground,alignItems:"center",justifyContent:"center"},children:(0,t.jsx)(el.Z,{style:{width:20,height:20,color:"currentColor"}})})]})}function it({style:e}){let{removeNotification:n}=(0,en.o)();let r=(0,y.v9)(e=>e.notifications.notifications);return(0,t.jsx)(eu.Z,{style:{position:"fixed",bottom:20,right:13,zIndex:1e4,...e},children:r.map(e=>(0,t.jsx)(ie,{notification:e,onRemove:()=>{if(e.onClose){e.onClose()}n(e.id)}},e.id))})}var io=n(99024);function ii(e){const t=(0,v.useRef)();const n=(0,v.useCallback)((...e)=>t.current&&t.current(...e),[]);(0,v.useLayoutEffect)(()=>{t.current=e});return n}var ia=n(32951);const il=e=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32",style:{color:"inherit",...e.style},children:(0,t.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:3.5,d:"M24 29h5.333M8 29H2.667M16 21l-8 8M16 21l8 8M16 2.667v18.666M16 2.667 8 9.333M16 2.667l8 6.666"})});var is=il;var iu=n(1071);let ic=(0,io.Z)(e=>(0,F.ZZ)(e));function id(e,t,n){return e===1?t:n}function ih({ruleCount:e,focused:n,onEdit:r,onClick:o}){return(0,t.jsx)(n8.bL,{name:"rule-count",width:"auto",focused:n,style:{padding:"0 10px"},plain:true,children:(0,t.jsxs)(n8.Sx,{style:{borderRadius:4,padding:"3px 6px",backgroundColor:ei.rS.noticeBackground,border:"1px solid "+ei.rS.noticeBackground,color:ei.rS.altNoticeText,fontSize:12},onEdit:r,onSelect:o,onFocus:r,children:[(0,t.jsx)(eS.Z,{style:{paddingRight:5},children:e>0?(0,t.jsxs)(t.Fragment,{children:[e," associated ",id(e,"rule","rules")]}):(0,t.jsx)(t.Fragment,{children:"Create rule"})}),(0,t.jsx)(iu.Z,{style:{width:8,height:8}})]})})}let ip=(0,v.memo)(({style:e,payee:n,ruleCount:r,selected:o,hovered:i,editing:a,focusedField:l,onViewRules:s,onCreateRule:u,onHover:c,onEdit:f,onUpdate:h})=>{let{id:p}=n;let g=(0,n7.YP)();let m=o?ei.rS.tableBorderSelected:ei.rS.tableBorder;let v=i||l==="select";return(0,t.jsxs)(n8.X2,{style:{alignItems:"stretch",...e,borderColor:m,backgroundColor:i?ei.rS.tableRowBackgroundHover:o?ei.rS.tableRowBackgroundHighlight:v?ei.rS.tableRowBackgroundHover:ei.rS.tableBackground,...o&&{backgroundColor:ei.rS.tableRowBackgroundHighlight,zIndex:100}},"data-focus-key":n.id,onMouseEnter:()=>c&&c(n.id),children:[(0,t.jsx)(n8._7,{exposed:n.transfer_acct==null&&(i||o||a),focused:l==="select",selected:o,onSelect:e=>{g({type:"select",id:n.id,event:e})}}),(0,t.jsx)(n8.F3,{value:(n.transfer_acct?"Transfer: ":"")+n.name,valueStyle:!o&&n.transfer_acct&&{color:ei.rS.pageTextSubdued},exposed:l==="name",width:"flex",onUpdate:e=>!n.transfer_acct&&h(p,"name",e),onExpose:()=>f(p,"name"),inputProps:{readOnly:!!n.transfer_acct}}),(0,t.jsx)(ih,{ruleCount:r,focused:l==="rule-count",onEdit:()=>f(p,"rule-count"),onClick:()=>r>0?s(n.id):u(n.id)})]})});const ig=(0,v.forwardRef)(({payees:e,ruleCounts:n,navigator:r,categoryGroups:o,highlightedRows:i,ruleActions:a,onUpdate:l,onViewRules:s,onCreateRule:u},c)=>{let[f,h]=(0,v.useState)(null);let p=(0,n7.D9)();(0,v.useLayoutEffect)(()=>{let e=[...p][0];c.current.scrollTo(e,"center");r.onEdit(e,"select")},[]);let g=(0,v.useCallback)(e=>{h(e)},[]);return(0,t.jsx)(eu.Z,{style:{flex:1},onMouseLeave:()=>h(null),children:(0,t.jsx)(n8.iA,{ref:c,items:e,navigator:r,renderItem:({item:e,editing:r,focusedField:a,onEdit:c})=>{return(0,t.jsx)(ip,{payee:e,ruleCount:n.get(e.id)||0,categoryGroups:o,selected:p.has(e.id),highlighted:i&&i.has(e.id),editing:r,focusedField:a,hovered:f===e.id,onHover:g,onEdit:c,onUpdate:l,onViewRules:s,onCreateRule:u})}})})});function im(){let e=ei.rS.tableborder;let n=(0,n7.YP)();let r=(0,n7.D9)();return(0,t.jsx)(eu.Z,{children:(0,t.jsxs)(n8.xD,{style:{borderColor:e,backgroundColor:ei.rS.tableBackground,color:ei.rS.pageTextLight,zIndex:200,userSelect:"none"},collapsed:true,children:[(0,t.jsx)(n8._7,{exposed:true,focused:false,selected:r.size>0,onSelect:e=>n({type:"select-all",event:e})}),(0,t.jsx)(n8.bL,{value:"Name",width:"flex"})]})})}function iv({text:e,style:n}){return(0,t.jsx)(eu.Z,{style:{textAlign:"center",color:ei.rS.pageTextSubdued,fontStyle:"italic",fontSize:13,marginTop:5,style:n},children:e})}function iy({payeesById:e,selectedPayees:n,onDelete:r,onMerge:o,onClose:i}){let a=[...n].some(t=>e[t]==null||e[t].transfer_acct);return(0,t.jsx)(on.u,{position:"bottom",width:250,style:{padding:0},onClose:i,children:(0,t.jsx)(ot.Z,{onMenuSelect:e=>{i();switch(e){case"delete":r();break;case"merge":o();break;default:}},footer:(0,t.jsx)(eu.Z,{style:{padding:3,fontSize:11,fontStyle:"italic",color:ei.rS.pageTextSubdued},children:[...n].slice(0,4).map(t=>e[t].name).join(", ")+(n.size>4?", and more":"")}),items:[{icon:o8.Z,name:"delete",text:"Delete",disabled:a},{icon:is,iconSize:9,name:"merge",text:"Merge",disabled:a||n.size<2},ot.Z.line]})})}const ib=(0,v.forwardRef)(({payees:e,ruleCounts:n,orphanedPayees:r,categoryGroups:o,initialSelectedIds:i,ruleActions:a,onBatchChange:l,onViewRules:s,onCreateRule:u,...c},f)=>{let[h,p]=(0,v.useState)(null);let[g,m]=(0,v.useState)("");let y=(0,v.useRef)(null);let b=(0,v.useRef)(null);let x=(0,v.useRef)(false);const[w,S]=(0,v.useState)(false);let k=(0,v.useMemo)(()=>{let t=e;if(g){t=t.filter(e=>e.name.toLowerCase().includes(g.toLowerCase()))}if(w){t=t.filter(e=>r.map(e=>e.id).includes(e.id))}return t},[e,g,w]);let T=(0,n7.ZP)("payees",k,i);function E(e){if(g!==e){y.current?.setRowAnimation(false);m(e);x.current=true}}function C(e){E("");b.current=e}(0,v.useEffect)(()=>{if(x.current){setTimeout(()=>{y.current?.setRowAnimation(true)},0);x.current=false}});(0,v.useImperativeHandle)(f,()=>({selectRows:(e,t)=>{M.onEdit(null);T.dispatch({type:"select-all",ids:e});p(null);if(t&&e.length>0){C(e[0])}},highlightRow:e=>{M.onEdit(null);p(new Set([e]));C(e)}}));(0,v.useEffect)(()=>{if(h){p(null)}},[h]);(0,v.useLayoutEffect)(()=>{if(b.current){y.current.scrollTo(b.current);b.current=null}});let j=ii((t,n,r)=>{let o=e.find(e=>e.id===t);if(o[n]!==r){l({updated:[{id:t,[n]:r}]})}});let I=(0,v.useCallback)(()=>{return k.filter(e=>e.transfer_acct==null).map(e=>e.id)},[k]);function D(){l({deleted:[...T.items].map(e=>({id:e}))});T.dispatch({type:"select-none"})}async function P(){let e=[...T.items];await c.onMerge(e);M.onEdit(e[0],"name");T.dispatch({type:"select-none"});C(e[0])}let O=T.items.size===0;let M=(0,n8.wz)(k,e=>["select","name","rule-count"].filter(t=>{switch(t){case"select":return e.transfer_acct==null;default:return true}}));let _=ic(e);let[R,A]=(0,v.useState)(false);return(0,t.jsxs)(eu.Z,{style:{height:"100%"},children:[(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",alignItems:"center",padding:"0 0 15px"},children:[(0,t.jsxs)(eu.Z,{style:{flexShrink:0},children:[(0,t.jsxs)(ev.Z,{type:"bare",style:{marginRight:10},disabled:O,onClick:()=>A(true),children:[O?"No payees selected":T.items.size+" "+id(T.items.size,"payee","payees"),(0,t.jsx)(ia.Z,{width:8,height:8,style:{marginLeft:5}})]}),R&&(0,t.jsx)(iy,{payeesById:_,selectedPayees:T.items,onClose:()=>A(false),onDelete:D,onMerge:P})]}),(0,t.jsx)(eu.Z,{style:{flexShrink:0},children:(w||r&&r.length>0)&&(0,t.jsx)(ev.Z,{type:"bare",style:{marginRight:10},onClick:()=>{S(!w);E(g);M.onEdit(null)},children:w?"Show all payees":`Show ${r.length===1?"1 unused payee":`${r.length} unused payees`}`})}),(0,t.jsx)(eu.Z,{style:{flex:1}}),(0,t.jsx)(n6.Z,{id:"filter-input",placeholder:"Filter payees...",value:g,onChange:E})]}),(0,t.jsx)(n7.i5,{instance:T,fetchAllIds:I,children:(0,t.jsxs)(eu.Z,{style:{flex:1,border:"1px solid "+ei.rS.tableBorder,borderTopLeftRadius:4,borderTopRightRadius:4,overflow:"hidden"},children:[(0,t.jsx)(im,{}),k.length===0?(0,t.jsx)(iv,{text:"No payees",style:{marginTop:15}}):(0,t.jsx)(ig,{ref:y,payees:k,ruleCounts:n,categoryGroups:o,highlightedRows:h,navigator:M,onUpdate:j,onViewRules:s,onCreateRule:u})]})})]})});function ix({initialSelectedIds:e}){let n=(0,y.v9)(e=>e.queries.payees);let r=(0,y.v9)(e=>e.app.lastUndoState);let{grouped:o}=(0,n3.Z)();let{initiallyLoadPayees:i,getPayees:a,setLastUndoState:l,pushModal:s}=(0,en.o)();let[u,c]=(0,v.useState)(n);let[f,h]=(0,v.useState)({value:new Map});let[p,g]=(0,v.useState)({value:new Map});let m=(0,v.useRef)();async function b(){let e=await (0,q.lW)("payees-get-orphaned");g(e)}async function x(){let e=await (0,q.lW)("payees-get-rule-counts");e=new Map(Object.entries(e));h({value:e})}(0,v.useEffect)(()=>{async function e(){let e=await i();await new Promise(e=>setTimeout(e,100));if(e){c(e)}x();b()}e();let t=(0,q.oL)("sync-event",async({type:e,tables:t})=>{if(e==="applied"){if(t.includes("rules")){x()}}});return()=>{t()}},[]);async function w({tables:e,messages:t,meta:n,url:r},o=false){if(!e.includes("payees")&&!e.includes("payee_mapping")){return}c(await a());b();if(n&&n.targetId||t.find(e=>e.dataset==="rules")){x()}l(null)}(0,v.useEffect)(()=>{if(r.current){w(r.current,true)}return(0,q.oL)("undo-event",w)},[]);function S(e){s("manage-rules",{payeeId:e})}function k(e){let t={stage:null,conditionsOp:"and",conditions:[{field:"payee",op:"is",value:e,type:"id"}],actions:[{op:"set",field:"category",value:null,type:"id"}]};s("edit-rule",{rule:t})}return(0,t.jsx)(ib,{ref:m,payees:u,ruleCounts:f.value,orphanedPayees:p,categoryGroups:o,initialSelectedIds:e,lastUndoState:r,onBatchChange:e=>{(0,q.lW)("payees-batch-change",e);c((0,F.zb)(e,u));g((0,F.zb)(e,p))},onMerge:async([e,...t])=>{await (0,q.lW)("payees-merge",{targetId:e,mergeIds:t});let n=p.map(e=>e.id).includes(e);let r=t.filter(e=>p.map(e=>e.id).includes(e));if(n&&r.length!==t.length){p=p.filter(t=>t.id!==e)}p=p.filter(e=>!t.includes(e.id));let o=u.filter(e=>!t.includes(e.id));t.forEach(t=>{let n=f.value.get(t)||0;f.value.set(e,(f.value.get(e)||0)+n)});c(o);g(p);h({value:f.value})},onViewRules:S,onCreateRule:k})};function iw(){let e=(0,nM.TH)();return(0,t.jsx)(rx.T,{title:"Payees",children:(0,t.jsx)(ix,{initialSelectedIds:e.state&&e.state.selectedPayee?[e.state.selectedPayee]:null})})};function iS(){return(0,t.jsx)(eu.Z,{style:{flex:1},"data-testid":"reports-page",children:(0,t.jsx)(ec,{name:"ReportRouter",message:"Loading reports...",importer:()=>Promise.all([n.e(678),n.e(389),n.e(992)]).then(n.bind(n,29696))})})};let ik=()=>n.e(447).then(n.bind(n,25930));let iT=()=>Promise.all([n.e(713),n.e(389),n.e(162)]).then(n.bind(n,71462));function iE({name:e}){return(0,t.jsx)(ec,{name:e,importer:iT})}function iC({name:e}){const{isNarrowWidth:n}=(0,eo.F)();return(0,t.jsx)(ec,{name:e,importer:n?ik:iT})};function ij(){let[e,t]=(0,v.useState)(false);const n=iI();(0,v.useEffect)(()=>{(async()=>{t(await nY(n))})()},[n]);return e}function iI(){let[e,t]=(0,v.useState)("");(0,v.useEffect)(()=>{(async()=>{t(await nq())})()},[]);return e}var iD=iI;var iP=n(76926);var iO=n(90122);var iM=n(11800);const i_=({primaryAction:e,style:n,children:r})=>{return(0,t.jsxs)(eu.Z,{className:`${(0,ea.iv)([{backgroundColor:ei.rS.pillBackground,alignSelf:"flex-start",alignItems:"flex-start",padding:15,borderRadius:4,border:"1px solid "+ei.rS.altPillBorder,width:"100%"},n])}`,children:[(0,t.jsx)(eu.Z,{style:{marginBottom:e?10:0,maxWidth:500,lineHeight:1.5,gap:10},children:r}),e||null]})};const iR=({children:e})=>{let n=(0,nM.TH)();let[r,o]=(0,v.useState)(n.hash==="#advanced");return r?(0,t.jsxs)(eu.Z,{id:"advanced",style:{gap:20,alignItems:"flex-start",marginBottom:25,width:"100%"},className:`${(0,ea.BC)(`(min-width: ${iO.Z.breakpoint_small})`,{width:"auto"})}`,innerRef:e=>{if(e&&n.hash==="#advanced"){e.scrollIntoView(true)}},children:[(0,t.jsx)(eu.Z,{style:{fontSize:20,fontWeight:500,flexShrink:0},children:"Advanced Settings"}),e]}):(0,t.jsx)(ev.Z,{id:"advanced",type:"link",onClick:()=>o(true),style:{flexShrink:0,alignSelf:"flex-start",color:ei.rS.pageTextPositive,marginBottom:25},children:"Show advanced settings"})};function iA(){const{pushModal:e}=(0,en.o)();const n=(0,iM.o1)();const r=(0,y.v9)(e=>e.prefs.local.encryptKeyId);const o=!(window.crypto&&crypto.subtle);function i(){e("create-encryption-key",{recreate:true})}return r?(0,t.jsx)(i_,{primaryAction:(0,t.jsx)(ev.Z,{onClick:i,children:"Generate new key"}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)(eS.Z,{style:{color:ei.rS.noticeText,fontWeight:600},children:"End-to-end Encryption is turned on."})," ","Your data is encrypted with a key that only you have before sending it it out to the cloud. Local data remains unencrypted so if you forget your password you can re-encrypt it."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more…"})]})}):o?(0,t.jsx)(i_,{primaryAction:(0,t.jsx)(ev.Z,{disabled:true,children:"Enable encryption…"}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"End-to-end encryption"})," is not available when making an unencrypted connection to a remote server. You’ll need to enable HTTPS on your server to use end-to-end encryption. This problem may also occur if your browser is too old to work with Actual."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/config/https",children:"Learn more…"})]})}):n?(0,t.jsx)(i_,{primaryAction:(0,t.jsx)(ev.Z,{onClick:()=>e("create-encryption-key"),children:"Enable encryption…"}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"End-to-end encryption"})," is not enabled. Any data on the server is still protected by the server password, but it’s not end-to-end encrypted which means the server owners have the ability to read it. If you want, you can use an additional password to encrypt your data on the server."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more…"})]})}):(0,t.jsx)(i_,{primaryAction:(0,t.jsx)(ev.Z,{disabled:true,children:"Enable encryption…"}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"End-to-end encryption"})," is not available when running without a server. Budget files are always kept unencrypted locally, and encryption is only applied when sending data to a server."," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/getting-started/sync/#end-to-end-encryption",children:"Learn more…"})]})})};function iN({flag:e,disableToggle:n=false,error:r,children:o}){let{savePrefs:i}=(0,en.o)();let a=(0,od.Z)(e);return(0,t.jsxs)("label",{style:{display:"flex"},children:[(0,t.jsx)(ek.XZ,{checked:a,onChange:()=>{i({[`flags.${e}`]:!a})},disabled:n}),(0,t.jsxs)(eu.Z,{style:{color:n?ei.rS.pageTextSubdued:"inherit"},children:[o,n&&(0,t.jsx)(eS.Z,{style:{color:ei.rS.errorText,fontWeight:500},children:r})]})]})}function iZ(){let e=(0,y.v9)(e=>e.prefs.local?.budgetType);let n=(0,od.Z)("reportBudget");let r=e==="report"&&n;return(0,t.jsx)(iN,{flag:"reportBudget",disableToggle:r,error:"Switch to a rollover budget before turning off this feature",children:"Budget mode toggle"})}function iL(){let e=(0,ei.Fg)();let n=(0,od.Z)("themes");let r=e!=="light"&&n;return(0,t.jsx)(iN,{flag:"themes",disableToggle:r,error:"Switch to the light theme before turning off this feature",children:"Dark mode"})}function iB(){let[e,n]=(0,v.useState)(false);return(0,t.jsx)(i_,{primaryAction:e?(0,t.jsxs)(eu.Z,{style:{gap:"1em"},children:[(0,t.jsx)(iN,{flag:"categorySpendingReport",children:"Category spending report"}),(0,t.jsx)(iZ,{}),(0,t.jsx)(iN,{flag:"goalTemplatesEnabled",children:"Goal templates"}),(0,t.jsx)(iN,{flag:"experimentalOfxParser",children:"Experimental OFX parser"}),(0,t.jsx)(iL,{})]}):(0,t.jsx)(ey.Z,{onClick:()=>n(true),style:{flexShrink:0,alignSelf:"flex-start",color:ei.rS.pageTextPositive},children:"I understand the risks, show experimental features"}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Experimental features."})," These features are not fully tested and may not work as expected. THEY MAY CAUSE IRRECOVERABLE DATA LOSS. They may do nothing at all. Only enable them if you know what you are doing."]})})};function iF(){let[e,n]=(0,v.useState)(false);let[r,o]=(0,v.useState)(null);let i=(0,y.v9)(e=>e.prefs.local.id);let a=(0,y.v9)(e=>e.prefs.local.encryptKeyId);async function l(){n(true);o(null);let e=await (0,q.lW)("export-budget");if("error"in e){o(e.error);n(false);console.log("Export error code:",e.error);return}window.Actual.saveFile(e.data,`${(0,rY.Z)(new Date,"yyyy-MM-dd")}-${i}.zip`,"Export budget");n(false)}return(0,t.jsxs)(i_,{primaryAction:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ev.y,{onClick:l,loading:e,children:"Export data"}),r&&(0,t.jsx)(es.Z,{style:{color:ei.rS.errorText,marginTop:15},children:"An unknown error occurred while exporting. Please report this as a new issue on Github."})]}),children:[(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Export"})," your data as a zip file containing"," ",(0,t.jsx)("code",{children:"db.sqlite"})," and ",(0,t.jsx)("code",{children:"metadata.json"})," files. It can be imported into another Actual instance by closing an open file (if any), then clicking the “Import file” button, then choosing “Actual.”"]}),a?(0,t.jsx)(eS.Z,{children:"Even though encryption is enabled, the exported zip file will not have any encryption."}):null]})};function iW(e){let{numBlankPayees:n,numCleared:r,numDeleted:o}=e;let i="";if(n===0&&r===0&&o===0){i="No split transactions found needing repair."}else{if(n>0){i+=`Fixed ${n} splits with a blank payee.`}if(r>0){if(i!==""){i+="\n"}i+=`Fixed ${r} splits with the wrong cleared flag.`}if(o>0){if(i!==""){i+="\n"}i+=`Fixed ${o} splits that weren’t properly deleted.`}}return(0,t.jsx)(ex.Z,{style:{color:ei.rS.alt3NoticeText,marginBottom:0,marginLeft:"1em",textAlign:"right",whiteSpace:"pre-wrap"},children:i})}function iU(){let[e,n]=(0,v.useState)(false);let[r,o]=(0,v.useState)(null);async function i(){n(true);let e=await (0,q.lW)("tools/fix-split-transactions");o(e);n(false)}return(0,t.jsxs)(i_,{primaryAction:(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",justifyContent:"space-between",maxWidth:500,width:"100%",alignItems:"center"},children:[(0,t.jsx)(ev.y,{loading:e,onClick:i,children:"Repair split transactions"}),r&&iW(r)]}),children:[(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Repair split transactions"})," if you are experiencing bugs relating to split transactions and the “Reset budget cache” button above does not help, this tool may fix them. Some examples of bugs include seeing blank payees on splits or incorrect account balances. This tool does two things:"]}),(0,t.jsxs)("ul",{style:{margin:0,paddingLeft:"1.5em"},children:[(0,t.jsx)("li",{style:{marginBottom:"0.5em"},children:"Ensures that deleted split transactions are fully deleted. In previous versions of the app, certain split transactions may appear deleted but not all of them are actually deleted. This causes the transactions list to look correct, but certain balances may be incorrect when filtering."}),(0,t.jsx)("li",{children:"Sync the payee and cleared flag of a split transaction to the main or “parent” transaction, if appropriate. The payee will only be set if it currently doesn’t have one."})]})]})}var iz=n(42326);let iH=[{value:"0",label:"Sunday"},{value:"1",label:"Monday"},{value:"2",label:"Tuesday"},{value:"3",label:"Wednesday"},{value:"4",label:"Thursday"},{value:"5",label:"Friday"},{value:"6",label:"Saturday"}];let iK=[{value:"MM/dd/yyyy",label:"MM/DD/YYYY"},{value:"dd/MM/yyyy",label:"DD/MM/YYYY"},{value:"yyyy-MM-dd",label:"YYYY-MM-DD"},{value:"MM.dd.yyyy",label:"MM.DD.YYYY"},{value:"dd.MM.yyyy",label:"DD.MM.YYYY"}];function i$({title:e,children:n}){return(0,t.jsxs)(eu.Z,{style:{alignItems:"flex-start",flexGrow:1,gap:"0.5em",width:"100%"},children:[(0,t.jsx)(eS.Z,{style:{fontWeight:500},children:e}),(0,t.jsx)(eu.Z,{style:{alignItems:"flex-start",gap:"1em"},children:n})]})}function iV(){let{savePrefs:e}=(0,en.o)();let n=(0,iz.Ap)();let r=(0,y.v9)(e=>e.prefs.local.firstDayOfWeekIdx||"0");let o=(0,y.v9)(e=>e.prefs.local.dateFormat||"MM/dd/yyyy");let i=(0,y.v9)(e=>e.prefs.local.numberFormat||"comma-dot");let a=(0,y.v9)(e=>e.prefs.local.hideFraction);return(0,t.jsx)(i_,{primaryAction:(0,t.jsxs)(eu.Z,{style:{flexDirection:"column",gap:"1em",width:"100%",[`@media (min-width: ${n.floating?iO.Z.breakpoint_small:iO.Z.breakpoint_medium})`]:{flexDirection:"row"}},children:[(0,t.jsxs)(i$,{title:"Numbers",children:[(0,t.jsx)(ev.Z,{bounce:false,style:{padding:0},children:(0,t.jsx)(of.Z,{value:i,onChange:t=>e({numberFormat:t}),options:F.id.map(e=>[e.value,a?e.labelNoFraction:e.label]),style:{padding:"2px 10px",fontSize:15}},String(a))}),(0,t.jsxs)(eS.Z,{style:{display:"flex"},children:[(0,t.jsx)(ek.XZ,{id:"settings-textDecimal",checked:!!a,onChange:t=>e({hideFraction:t.currentTarget.checked})}),(0,t.jsx)("label",{htmlFor:"settings-textDecimal",children:"Hide decimal places"})]})]}),(0,t.jsx)(i$,{title:"Dates",children:(0,t.jsx)(ev.Z,{bounce:false,style:{padding:0},children:(0,t.jsx)(of.Z,{value:o,onChange:t=>e({dateFormat:t}),options:iK.map(e=>[e.value,e.label]),style:{padding:"2px 10px",fontSize:15}})})}),(0,t.jsx)(i$,{title:"First day of the week",children:(0,t.jsx)(ev.Z,{bounce:false,style:{padding:0},children:(0,t.jsx)(of.Z,{value:r,onChange:t=>e({firstDayOfWeekIdx:t}),options:iH.map(e=>[e.value,e.label]),style:{padding:"2px 10px",fontSize:15}})})})]}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Formatting"})," does not affect how budget data is stored, and can be changed at any time."]})})};function iq(){let e=(0,y.v9)(e=>e.prefs.global.documentDir);let{saveGlobalPrefs:n}=(0,en.o)();let[r,o]=(0,v.useState)(false);let i=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(i.current){i.current.scrollTo(1e4,0)}},[]);async function a(){let e=await window.Actual.openFileDialog({properties:["openDirectory"]});if(e){n({documentDir:e[0]});o(true)}}return(0,t.jsxs)(i_,{primaryAction:(0,t.jsxs)(eu.Z,{style:{flexDirection:"row"},children:[(0,t.jsx)(ev.Z,{onClick:a,children:"Change location"}),r&&(0,t.jsx)(r6,{children:"A restart is required for this change to take effect"})]}),children:[(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Actual’s files"})," are stored in a folder on your computer. Currently, that’s:"]}),(0,t.jsx)(eS.Z,{innerRef:i,style:{backgroundColor:ei.rS.pageBackground,padding:"7px 10px",borderRadius:4,overflow:"auto",whiteSpace:"nowrap","::-webkit-scrollbar":{display:"none"}},children:e})]})};function iY(){let[e,n]=(0,v.useState)(false);async function r(){n(true);await (0,q.lW)("reset-budget-cache");n(false)}return(0,t.jsx)(i_,{primaryAction:(0,t.jsx)(ev.y,{loading:e,onClick:r,children:"Reset budget cache"}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Reset budget cache"})," will clear all cached values for the budget and recalculate the entire budget. All values in the budget are cached for performance reasons, and if there is a bug in the cache you won’t see correct values. There is no danger in resetting the cache. Hopefully you never have to do this."]})})}function iG(){let e=(0,y.v9)(e=>!!e.prefs.local.groupId);let{resetSync:n}=(0,en.o)();let[r,o]=(0,v.useState)(false);async function i(){o(true);await n();o(false)}return(0,t.jsx)(i_,{primaryAction:(0,t.jsx)(ev.y,{loading:r,disabled:!e,onClick:i,children:"Reset sync"}),children:e?(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Reset sync"})," will remove all local data used to track changes for syncing, and create a fresh sync ID on the server. This file on other devices will have to be re-downloaded to use the new sync ID. Use this if there is a problem with syncing and you want to start fresh."]}):(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Reset sync"})," is only available when syncing is enabled."]})})};function iQ(){let e=(0,ei.Fg)();let{saveGlobalPrefs:n}=(0,en.o)();return(0,t.jsx)(i_,{primaryAction:(0,t.jsx)(ev.Z,{bounce:false,style:{padding:0},children:(0,t.jsx)(of.Z,{onChange:e=>{n({theme:e})},value:e,options:ei.Or.map(e=>[e,e])})}),children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Themes"})," change the user interface colors."]})})};function iX(){const e=(0,iM.Mx)();const n=iD();const r=ij();return(0,t.jsxs)(i_,{children:[(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"Actual"})," is a super fast privacy-focused app for managing your finances."]}),(0,t.jsxs)(eu.Z,{style:{flexDirection:"column",gap:10},className:`${(0,ea.BC)(`(min-width: ${iO.Z.breakpoint_small})`,{display:"grid",gridTemplateRows:"1fr 1fr",gridTemplateColumns:"50% 50%",columnGap:"2em",gridAutoFlow:"column"})}`,"data-vrt-mask":true,children:[(0,t.jsxs)(eS.Z,{children:["Client version: v",window.Actual.ACTUAL_VERSION]}),(0,t.jsxs)(eS.Z,{children:["Server version: ",e]}),r?(0,t.jsxs)(eg.Z,{to:"https://actualbudget.org/docs/releases",linkColor:"purple",children:["New version available: ",n]}):(0,t.jsx)(eS.Z,{style:{color:ei.rS.alt2NoticeText,fontWeight:600},children:"You’re up to date!"}),(0,t.jsx)(eS.Z,{children:(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/releases",children:"Release Notes"})})]})]})}function iJ({children:e}){return(0,t.jsx)(eS.Z,{style:{fontWeight:500},children:e})}function i0(){let e=(0,y.v9)(e=>e.prefs.local.id);let n=(0,y.v9)(e=>e.prefs.local.groupId);return(0,t.jsxs)(i_,{children:[(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)("strong",{children:"IDs"})," are the names Actual uses to identify your budget internally. There are several different IDs associated with your budget. The Budget ID is used to identify your budget file. The Sync ID is used to access the budget on the server."]}),(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)(iJ,{children:"Budget ID:"})," ",e]}),(0,t.jsxs)(eS.Z,{style:{color:ei.rS.pageText},children:[(0,t.jsx)(iJ,{children:"Sync ID:"})," ",n||"(none)"]})]})}function i1(){let e=(0,y.v9)(e=>e.prefs.global.floatingSidebar);let n=(0,y.v9)(e=>e.prefs.local.budgetName);let{loadPrefs:r,closeBudget:o}=(0,en.o)();(0,v.useEffect)(()=>{let e=(0,q.oL)("prefs-updated",()=>{r()});r();return()=>e()},[r]);const{isNarrowWidth:i}=(0,eo.F)();const a=(0,od.Z)("themes");(0,iP.j)(ei.rS.mobileSettingsViewTheme);return(0,t.jsx)(eu.Z,{style:{marginInline:e&&!i?"auto":0},children:(0,t.jsx)(rx.T,{title:"Settings",titleStyle:i?{backgroundColor:ei.rS.menuItemBackground,color:ei.rS.menuItemText}:undefined,children:(0,t.jsxs)(eu.Z,{style:{flexShrink:0,gap:30},children:[i&&(0,t.jsxs)(eu.Z,{style:{gap:10,flexDirection:"row",alignItems:"flex-end"},children:[(0,t.jsxs)(ek.Wi,{children:[(0,t.jsx)(ek.lX,{title:"Budget Name"}),(0,t.jsx)(rH.ZP,{value:n,disabled:true,style:{color:ei.rS.buttonNormalDisabledText}})]}),(0,t.jsx)(ev.Z,{onClick:o,children:"Close Budget"})]}),(0,t.jsx)(iX,{}),!l.jU&&(0,t.jsx)(iq,{}),a&&(0,t.jsx)(iQ,{}),(0,t.jsx)(iV,{}),(0,t.jsx)(iA,{}),(0,t.jsx)(iF,{}),(0,t.jsxs)(iR,{children:[(0,t.jsx)(i0,{}),(0,t.jsx)(iY,{}),(0,t.jsx)(iG,{}),(0,t.jsx)(iU,{}),(0,t.jsx)(iB,{})]})]})})})}var i2=n(75970);var i4=n(83172);function i5({redirectTo:e="/budget",children:t}){const{isNarrowWidth:n}=(0,eo.F)();const r=(0,nM.s0)();(0,v.useEffect)(()=>{if(n){r(e)}},[n,r,e]);return n?null:t}function i3({children:e,redirectTo:t="/budget"}){const{isNarrowWidth:n}=(0,eo.F)();const r=(0,nM.s0)();(0,v.useEffect)(()=>{if(!n){r(t)}},[n,r,t]);return n?e:null}function i7({icon:e,name:n,path:r}){return(0,t.jsxs)(n_.OL,{to:r,style:({isActive:e})=>({alignItems:"center",color:e?ei.rS.mobileNavItemSelected:ei.rS.mobileNavItem,display:"flex",flexDirection:"column",textDecoration:"none"}),children:[(0,t.jsx)(e,{width:22,height:22,style:{marginBottom:"5px"}}),n]})}function i6(){const{isNarrowWidth:e}=(0,eo.F)();return(0,t.jsxs)("div",{style:{backgroundColor:ei.rS.mobileNavBackground,borderTop:`1px solid ${ei.rS.menuBorder}`,bottom:0,...ei.W2.shadow,display:e?"flex":"none",height:"80px",justifyContent:"space-around",paddingTop:10,width:"100%"},children:[(0,t.jsx)(i7,{name:"Budget",path:"/budget",icon:nH.Z}),(0,t.jsx)(i7,{name:"Accounts",path:"/accounts",icon:nz}),(0,t.jsx)(i7,{name:"Transaction",path:"/transactions/new",icon:nF.Z}),(0,t.jsx)(i7,{name:"Settings",path:"/settings",icon:nW.Z})]})}function i8({getAccounts:e}){let t=(0,nM.s0)();(0,v.useEffect)(()=>{e().then(e=>{if(e.length===0){t("/accounts")}})},[]);let n=(0,nM.TH)();let r=(0,nM.oQ)(n);(0,v.useEffect)(()=>{nB.kp("url",r)},[r]);return null}function i9(){let e=(0,en.o)();(0,v.useEffect)(()=>{nR.Z.setScope("app");setTimeout(async()=>{await e.sync();await nL(e.addNotification,nY,nq,e.loadPrefs,e.savePrefs)},100)},[]);return(0,t.jsxs)(n_.VK,{children:[(0,t.jsx)(i8,{getAccounts:e.getAccounts}),(0,t.jsx)(nK,{}),(0,t.jsxs)(eu.Z,{style:{height:"100%"},children:[(0,t.jsx)(n0,{}),(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",flex:1},children:[(0,t.jsx)(iz.ZP,{}),(0,t.jsxs)(eu.Z,{style:{color:ei.rS.pageText,backgroundColor:ei.rS.pageBackground,flex:1,overflow:"hidden",width:"100%"},children:[(0,t.jsxs)("div",{style:{flex:1,display:"flex",overflow:"auto",position:"relative"},children:[(0,t.jsx)(i2.ZP,{style:{WebkitAppRegion:"drag",position:"absolute",top:0,left:0,right:0,zIndex:1e3}}),(0,t.jsx)(it,{}),(0,t.jsx)(nX,{}),(0,t.jsxs)(nM.Z5,{children:[(0,t.jsx)(nM.AW,{path:"/",element:(0,t.jsx)(nM.Fg,{to:"/budget",replace:true})}),(0,t.jsx)(nM.AW,{path:"/reports/*",element:(0,t.jsx)(i5,{children:(0,t.jsx)(iS,{})})}),(0,t.jsx)(nM.AW,{path:"/budget",element:(0,t.jsx)(iC,{name:"Budget"})}),(0,t.jsx)(nM.AW,{path:"/schedules",element:(0,t.jsx)(i5,{children:(0,t.jsx)(iE,{name:"Schedules"})})}),(0,t.jsx)(nM.AW,{path:"/payees",element:(0,t.jsx)(iw,{})}),(0,t.jsx)(nM.AW,{path:"/rules",element:(0,t.jsx)(rw,{})}),(0,t.jsx)(nM.AW,{path:"/settings",element:(0,t.jsx)(i1,{})}),(0,t.jsx)(nM.AW,{path:"/gocardless/link",element:(0,t.jsx)(i5,{children:(0,t.jsx)(iE,{name:"GoCardlessLink"})})}),(0,t.jsx)(nM.AW,{path:"/accounts",element:(0,t.jsx)(iC,{name:"Accounts"})}),(0,t.jsx)(nM.AW,{path:"/accounts/:id",element:(0,t.jsx)(iC,{name:"Account"})}),(0,t.jsx)(nM.AW,{path:"/accounts/:id/transactions/:transactionId",element:(0,t.jsx)(i3,{children:(0,t.jsx)(i4.$b,{})})}),(0,t.jsx)(nM.AW,{path:"/accounts/:id/transactions/new",element:(0,t.jsx)(i3,{children:(0,t.jsx)(i4.$b,{})})}),(0,t.jsx)(nM.AW,{path:"/transactions/new",element:(0,t.jsx)(i3,{children:(0,t.jsx)(i4.$b,{})})}),(0,t.jsx)(nM.AW,{path:"/*",element:(0,t.jsx)(nM.Fg,{to:"/budget",replace:true})})]}),(0,t.jsx)(o6,{})]}),(0,t.jsxs)(nM.Z5,{children:[(0,t.jsx)(nM.AW,{path:"/budget",element:(0,t.jsx)(i6,{})}),(0,t.jsx)(nM.AW,{path:"/accounts",element:(0,t.jsx)(i6,{})}),(0,t.jsx)(nM.AW,{path:"/settings",element:(0,t.jsx)(i6,{})}),(0,t.jsx)(nM.AW,{path:"*",element:null})]})]})]})]})]})}function ae(){let e=(0,v.useMemo)(()=>(0,t.jsx)(i9,{}),[]);return(0,t.jsx)(nZ.Y,{children:(0,t.jsx)(i2.TE,{children:(0,t.jsx)(iz.Hn,{children:(0,t.jsx)(nJ.j,{children:(0,t.jsx)(nN.Zr,{children:(0,t.jsx)(nA.BB,{children:(0,t.jsx)(ne,{backend:nO,children:e})})})})})})})}var at=n(49886);const ao=e=>(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,t.jsx)("path",{d:"M24 11.113a5.765 5.765 0 0 0-5.216-5.952.249.249 0 0 1-.191-.12 7.684 7.684 0 0 0-14.1 2.294.251.251 0 0 1-.227.2A4.643 4.643 0 0 0 .624 9.774 4.47 4.47 0 0 0 0 12.223a4.293 4.293 0 0 0 1.235 3.1 4.624 4.624 0 0 0 1.78 1.062.963.963 0 0 0 1.243-.86v-.026a.985.985 0 0 0-.658-1.033 2.58 2.58 0 0 1-.96-.572A2.374 2.374 0 0 1 2 12.109a2.588 2.588 0 0 1 2.586-2.588 2.7 2.7 0 0 1 .535.054.989.989 0 0 0 .811-.184 1 1 0 0 0 .392-.779c.085-5.736 8.293-7.372 10.818-2.044a.974.974 0 0 0 .941.57 3.733 3.733 0 0 1 3 1.309 3.888 3.888 0 0 1 .9 2.812 3.428 3.428 0 0 1-1.473 2.667.973.973 0 0 0-.4.964l.01.059a.968.968 0 0 0 1.525.608A5.4 5.4 0 0 0 24 11.113Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M12.231 9.7a6.5 6.5 0 1 0 6.5 6.5 6.508 6.508 0 0 0-6.5-6.5Zm3.124 4.155a.75.75 0 0 1 .15 1.05l-2.905 3.87a1.493 1.493 0 0 1-1.1.6h-.111a1.485 1.485 0 0 1-1.055-.443l-1.5-1.5a.75.75 0 0 1 1.066-1.06l1.3 1.3a.249.249 0 0 0 .376-.026L14.305 14a.751.751 0 0 1 1.05-.149Z",fill:"currentColor"})]});var ai=ao;const aa=e=>(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,t.jsx)("path",{d:"M24 10.663A5.817 5.817 0 0 0 22.228 6.5a5.711 5.711 0 0 0-3.447-1.585.249.249 0 0 1-.191-.12 7.684 7.684 0 0 0-14.1 2.294.251.251 0 0 1-.227.2A4.59 4.59 0 0 0 0 11.859a4.324 4.324 0 0 0 1.236 3.21 5.529 5.529 0 0 0 3.605 1.377 1 1 0 0 0 .985-1.015 1.023 1.023 0 0 0-1.015-.985 3.3 3.3 0 0 1-2.172-.8A2.374 2.374 0 0 1 2 11.859a2.576 2.576 0 0 1 .954-2.007 2.6 2.6 0 0 1 2.167-.527 1 1 0 0 0 1.2-.919 5.686 5.686 0 0 1 10.82-2.088.959.959 0 0 0 .941.57 3.687 3.687 0 0 1 2.758 1.049A3.752 3.752 0 0 1 22 10.663a3.835 3.835 0 0 1-3.438 3.791 1 1 0 0 0 .132 1.992.961.961 0 0 0 .131-.009A5.807 5.807 0 0 0 24 10.663Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M15.5 17.446h-1.75a.25.25 0 0 1-.25-.25v-7.25a1.5 1.5 0 1 0-3 0V17.2a.25.25 0 0 1-.25.25H8.5a1 1 0 0 0-.707 1.707l3.5 3.5a1 1 0 0 0 1.414 0l3.5-3.5a1 1 0 0 0-.707-1.707Z",fill:"currentColor"})]});var al=aa;const as=e=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,t.jsx)("path",{d:"M21.941 3.607 18.87.554A1.912 1.912 0 0 0 17.527 0H8.9A1.9 1.9 0 0 0 7 1.9V5H3.4a1.9 1.9 0 0 0-1.9 1.9v15.21A1.9 1.9 0 0 0 3.4 24h11.7a1.9 1.9 0 0 0 1.9-1.895V19h3.6a1.9 1.9 0 0 0 1.9-1.895V4.949a1.882 1.882 0 0 0-.559-1.342ZM14.5 22H4a.5.5 0 0 1-.5-.5v-14A.5.5 0 0 1 4 7h7.784a.5.5 0 0 1 .35.143L14.85 9.8a.5.5 0 0 1 .15.357V21.5a.5.5 0 0 1-.5.5Zm5.5-5h-2.75a.25.25 0 0 1-.25-.25v-6.8a1.892 1.892 0 0 0-.558-1.341L13.37 5.554A1.9 1.9 0 0 0 12.028 5H9.25A.25.25 0 0 1 9 4.75V2.5a.5.5 0 0 1 .5-.5l7.756-.026a.5.5 0 0 1 .351.143L20.35 4.8a.5.5 0 0 1 .15.357V16.5a.5.5 0 0 1-.5.5Z",fill:"currentColor"})});var au=as;const ac=e=>(0,t.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:[(0,t.jsx)("path",{d:"M3.566 15.457a1 1 0 0 0-.5-.844 2.248 2.248 0 0 1-.431-.329A2.371 2.371 0 0 1 2 12.5a2.588 2.588 0 0 1 2.585-2.588 2.645 2.645 0 0 1 .536.056A1 1 0 0 0 6.324 9c.081-5.754 8.3-7.363 10.818-2.045a.97.97 0 0 0 .941.571 3.7 3.7 0 0 1 3 1.3 3.874 3.874 0 0 1 .908 2.811 3.428 3.428 0 0 1-1.1 2.375 1.316 1.316 0 0 0-.42 1.089.912.912 0 0 0 1.476.628A5.408 5.408 0 0 0 24 11.418a5.763 5.763 0 0 0-5.22-5.866.25.25 0 0 1-.19-.12 7.685 7.685 0 0 0-14.1 2.3.251.251 0 0 1-.227.2 4.642 4.642 0 0 0-3.643 2.24A4.471 4.471 0 0 0 0 12.619a4.287 4.287 0 0 0 1.235 3.09 4.177 4.177 0 0 0 .852.645 1 1 0 0 0 1.478-.9Z",fill:"currentColor"}),(0,t.jsx)("path",{d:"M18.5 15.8a6.5 6.5 0 1 0-6.5 6.5 6.508 6.508 0 0 0 6.5-6.5Zm-7.25 1.25v-.55a1.257 1.257 0 0 1 .986-1.221 1.125 1.125 0 1 0-1.361-1.1.75.75 0 1 1-1.5 0 2.625 2.625 0 1 1 3.538 2.461.25.25 0 0 0-.163.234v.18a.75.75 0 0 1-1.5 0ZM12 18.8a1 1 0 1 1-1 1 1 1 0 0 1 1-1Z",fill:"currentColor"})]});var ad=ac;const af=e=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,t.jsx)("path",{d:"M23.113 5.954 21.849 4.69l.881-.88a1.914 1.914 0 1 0-2.707-2.71L9.04 12.085a6.014 6.014 0 1 0 2.707 2.707l3.739-3.737.762.762a1.75 1.75 0 1 0 2.475-2.475l-.763-.762 1.416-1.417 1.264 1.263a1.788 1.788 0 0 0 2.473 0 1.751 1.751 0 0 0 0-2.472Zm-16.737 8.5a3 3 0 1 1-3 3 3 3 0 0 1 3-2.998Z",fill:"currentColor"})});var ah=af;const ap=e=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{color:"inherit",...e.style},children:(0,t.jsx)("path",{d:"M10.664 20.073a1.249 1.249 0 1 0-.507 2.447A10.739 10.739 0 1 0 2.4 16.1a.25.25 0 0 1-.084.3l-1 .726a1 1 0 0 0 .377 1.787l3.946.849a1.062 1.062 0 0 0 .21.022 1 1 0 0 0 .978-.79l.945-4.4a1 1 0 0 0-1.565-1.02l-1.361.989a.25.25 0 0 1-.386-.128 8.255 8.255 0 1 1 6.205 5.643Z",fill:"currentColor"})});var ag=ap;function am(e){if(e.state==="unknown"){return"This is a cloud-based file but its state is unknown because you "+"are offline."}if(e.encryptKeyId){if(e.hasKey){return"This file is encrypted and you have key to access it."}return"This file is encrypted and you do not have the key for it."}return null}function av({onDelete:e,onClose:n}){function r(t){n();switch(t){case"delete":e();break;default:}}let o=[{name:"delete",text:"Delete"}];return(0,t.jsx)(ot.Z,{onMenuSelect:r,items:o})}function ay({state:e,onDelete:n}){let[r,o]=(0,v.useState)(false);return(0,t.jsxs)(eu.Z,{children:[(0,t.jsx)(ev.Z,{type:"bare",onClick:e=>{e.stopPropagation();o(true)},children:(0,t.jsx)(r4.Z,{style:{width:16,height:16}})}),r&&(0,t.jsx)(on.u,{position:"bottom-right",style:{padding:0},onClose:()=>o(false),children:(0,t.jsx)(av,{state:e,onDelete:n,onClose:()=>o(false)})})]})}function ab({file:e}){let n;let r;let o;switch(e.state){case"unknown":n=ad;r="Network unavailable";o=ei.rS.buttonNormalDisabledText;break;case"remote":n=al;r="Available for download";break;case"local":case"broken":n=au;r="Local";break;default:n=ai;r="Syncing";break}return(0,t.jsxs)(eu.Z,{style:{color:o,alignItems:"center",flexDirection:"row",marginTop:8},children:[(0,t.jsx)(n,{style:{width:18,height:18,color:"currentColor"}}),(0,t.jsx)(eS.Z,{style:{marginLeft:5},children:r})]})}function ax({file:e,onSelect:n,onDelete:r}){let o=(0,v.useRef)(false);async function i(e){if(!o.current){o.current=true;await n(e);o.current=false}}return(0,t.jsxs)(eu.Z,{onClick:()=>i(e),title:am(e),style:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",...ei.W2.shadow,margin:10,padding:"12px 15px",backgroundColor:ei.rS.buttonNormalBackground,borderRadius:6,flexShrink:0,cursor:"pointer",":hover":{backgroundColor:ei.rS.hover}},children:[(0,t.jsxs)(eu.Z,{style:{alignItems:"flex-start"},children:[(0,t.jsx)(eS.Z,{style:{fontSize:16,fontWeight:700},children:e.name}),(0,t.jsx)(ab,{file:e})]}),(0,t.jsxs)(eu.Z,{style:{flex:"0 0 auto",flexDirection:"row",alignItems:"center"},children:[e.encryptKeyId&&(0,t.jsx)(ah,{style:{width:13,height:13,marginRight:8,color:e.hasKey?ei.rS.formLabelText:ei.rS.buttonNormalDisabledText}}),(0,t.jsx)(ay,{state:e.state,onDelete:()=>r(e)})]})]})}function aw({files:e,onSelect:n,onDelete:r}){return(0,t.jsx)(eu.Z,{style:{flexGrow:1,[`@media (min-width: ${iO.Z.breakpoint_small})`]:{flexGrow:0,maxHeight:310},overflow:"auto","& *":{userSelect:"none"}},children:e.map(e=>(0,t.jsx)(ax,{file:e,onSelect:n,onDelete:r},e.id||e.cloudFileId))})}function aS({onRefresh:e}){let[n,r]=(0,v.useState)(false);async function o(){r(true);await e();r(false)}let i=n?el.Z:ag;return(0,t.jsx)(ev.Z,{type:"bare",style:{padding:10,marginRight:5},onClick:o,children:(0,t.jsx)(i,{style:{width:18,height:18}})})}function ak(){let e=(0,y.v9)(e=>e.budgets.allFiles||[]);let{getUserData:n,loadAllFiles:r,pushModal:o,loadBudget:i,createBudget:a,downloadBudget:l}=(0,en.o)();const[s,u]=(0,v.useState)(false);const c=({testMode:e}={})=>{if(!s){u(true);a({testMode:e})}};return(0,t.jsxs)(eu.Z,{style:{flex:1,justifyContent:"center",marginInline:-20,marginTop:20,width:"100vw",[`@media (min-width: ${iO.Z.breakpoint_small})`]:{maxWidth:iO.Z.breakpoint_small,width:"100%"}},children:[(0,t.jsxs)(eu.Z,{children:[(0,t.jsx)(eS.Z,{style:{...ei.W2.veryLargeText,margin:20},children:"Files"}),(0,t.jsx)(eu.Z,{style:{position:"absolute",right:0,top:0,bottom:0,justifyContent:"center",marginRight:5},children:(0,t.jsx)(aS,{onRefresh:()=>{n();r()}})})]}),(0,t.jsx)(aw,{files:e,actions:T,onSelect:e=>{if(e.state==="remote"){l(e.cloudFileId)}else{i(e.id)}},onDelete:e=>o("delete-budget",{file:e})}),(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",justifyContent:"flex-end",padding:25,paddingLeft:5},children:[(0,t.jsx)(ev.Z,{type:"bare",style:{marginLeft:10,color:ei.rS.pageTextLight},onClick:e=>{e.preventDefault();o("import")},children:"Import file"}),(0,t.jsx)(ev.Z,{type:"primary",onClick:c,style:{marginLeft:15},children:"Create new file"}),(0,oN.Ry)()&&(0,t.jsx)(ev.Z,{type:"primary",isSubmit:false,onClick:()=>c({testMode:true}),style:{marginLeft:15},children:"Create test file"})]})]})};function aT(){let[e,t]=(0,v.useState)(false);let n=(0,nM.s0)();let r=(0,nM.TH)();let o=(0,iM.q3)();(0,v.useEffect)(()=>{async function e(){let e=e=>{if(r.pathname!==e){n(e)}else{t(true)}};let i=await (0,q.lW)("get-server-url");let a=await (0,q.lW)("get-did-bootstrap");if(i==null&&!a){let t=window.location.origin;let r=await (0,q.lW)("subscribe-needs-bootstrap",{url:t});if("error"in r||!r.hasServer){console.log("error"in r&&r.error);n("/config-server");return}await o(t,{validate:false});if(r.bootstrapped){e("/login")}else{e("/bootstrap")}}else{let t=await (0,q.lW)("subscribe-needs-bootstrap");if("error"in t){n("/error",{state:{error:t.error}})}else if(t.bootstrapped){e("/login")}else{e("/bootstrap")}}}e()},[r]);return{checked:e}}function aE({text:e}){return(0,t.jsx)("h1",{style:{fontSize:40,fontWeight:700,color:ei.rS.pageTextPositive,marginBottom:20},children:e})};function aC(){(0,iP.j)(ei.rS.mobileConfigServerViewTheme);let{createBudget:e,signOut:n,loggedIn:r}=(0,en.o)();let o=(0,nM.s0)();let[i,a]=(0,v.useState)("");let l=(0,iM.o1)();let s=(0,iM.q3)();(0,v.useEffect)(()=>{a(l)},[l]);let[u,c]=(0,v.useState)(false);let[f,h]=(0,v.useState)(null);function p(e){switch(e){case"network-failure":return"Server is not running at this URL. Make sure you have HTTPS set up properly.";default:return"Server does not look like an Actual server. Is it set up correctly?"}}async function g(){if(i===""||u){return}h(null);c(true);let{error:e}=await s(i);if(["network-failure","get-server-failure"].includes(e)&&!i.startsWith("http://")&&!i.startsWith("https://")){let{error:e}=await s("https://"+i);if(e){a("https://"+i);h(e)}else{await n();o("/")}c(false)}else if(e){c(false);h(e)}else{c(false);await n();o("/")}}function m(){a(window.location.origin)}async function y(){await s(null);await r();o("/")}async function b(){await s(null);await e({testMode:true});window.__navigate("/")}return(0,t.jsxs)(eu.Z,{style:{maxWidth:500,marginTop:-30},children:[(0,t.jsx)(aE,{text:"Where’s the server?"}),(0,t.jsx)(eS.Z,{style:{fontSize:16,color:ei.rS.tableRowHeaderText,lineHeight:1.5},children:l?(0,t.jsx)(t.Fragment,{children:"Existing sessions will be logged out and you will log in to this server. We will validate that Actual is running at this URL."}):(0,t.jsx)(t.Fragment,{children:"There is no server configured. After running the server, specify the URL here to use the app. You can always change this later. We will validate that Actual is running at this URL."})}),f&&(0,t.jsx)(eS.Z,{style:{marginTop:20,color:ei.rS.errorText,borderRadius:4,fontSize:15},children:p(f)}),(0,t.jsxs)("form",{style:{display:"flex",flexDirection:"row",marginTop:30},onSubmit:e=>{e.preventDefault();g()},children:[(0,t.jsx)(rH.Tn,{autoFocus:true,placeholder:"https://example.com",value:i||"",onUpdate:a,style:{flex:1,marginRight:10}}),(0,t.jsx)(ev.y,{type:"primary",loading:u,style:{fontSize:15},children:"OK"}),l&&(0,t.jsx)(ev.Z,{type:"bare",style:{fontSize:15,marginLeft:10},onClick:()=>o(-1),children:"Cancel"})]}),(0,t.jsx)(eu.Z,{style:{flexDirection:"row",flexFlow:"row wrap",justifyContent:"center",marginTop:15},children:l?(0,t.jsx)(ev.Z,{type:"bare",style:{color:ei.rS.pageTextLight},onClick:y,children:"Stop using a server"}):(0,t.jsxs)(t.Fragment,{children:[!(0,oN.d)()&&(0,t.jsx)(ev.Z,{type:"bare",style:{color:ei.rS.pageTextLight,margin:5,marginRight:15},onClick:m,children:"Use current domain"}),(0,t.jsx)(ev.Z,{type:"bare",style:{color:ei.rS.pageTextLight,margin:5},onClick:y,children:"Don’t use a server"}),(0,oN.Ry)()&&(0,t.jsx)(ev.Z,{type:"primary",style:{marginLeft:15},onClick:b,children:"Create test file"})]})})]})};function aj({modalProps:e,actions:n,file:r}){let[o,i]=(0,v.useState)(null);async function a(){i("cloud");await n.deleteBudget(r.id,r.cloudFileId);i(null);e.onBack()}async function l(){i("local");await n.deleteBudget(r.id);i(null);e.onBack()}let s=r.cloudFileId&&r.state!=="broken";return(0,t.jsx)(eb.C,{...e,title:"Delete "+r.name,padding:0,showOverlay:false,onClose:e.onBack,children:()=>(0,t.jsxs)(eu.Z,{style:{padding:15,gap:15,paddingTop:0,paddingBottom:25,maxWidth:512,lineHeight:"1.5em"},children:[s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(eS.Z,{children:["This is a ",(0,t.jsx)("strong",{children:"hosted file"})," which means it is stored on your server to make it available for download on any device. You can delete it from the server, which will also remove it from all of your devices."]}),(0,t.jsx)(ev.y,{type:"primary",loading:o==="cloud",style:{backgroundColor:ei.rS.errorText,alignSelf:"center",border:0,padding:"10px 30px",fontSize:14},onClick:a,children:"Delete file from all devices"})]}),r.id&&(0,t.jsxs)(t.Fragment,{children:[s?(0,t.jsx)(eS.Z,{children:"You can also delete just the local copy. This will remove all local data and the file will be listed as available for download."}):(0,t.jsxs)(eS.Z,{children:[r.state==="broken"?(0,t.jsxs)(t.Fragment,{children:["This is a ",(0,t.jsx)("strong",{children:"hosted file"})," but it was created by another user. You can only delete the local copy."]}):(0,t.jsxs)(t.Fragment,{children:["This a ",(0,t.jsx)("strong",{children:"local file"})," which is not stored on a server."]})," ","Deleting it will remove it and all of its backups permanently."]}),(0,t.jsx)(ev.y,{type:s?"normal":"primary",loading:o==="local",style:{alignSelf:"center",marginTop:10,padding:"10px 30px",fontSize:14,...s?{color:ei.rS.errorText,borderColor:ei.rS.errorText}:{border:0,backgroundColor:ei.rS.errorText}},onClick:l,children:"Delete file locally"})]})]})})};function aI(e){switch(e){case"not-ynab4":return"This file is not valid. Please select a .ynab4 file";default:return"An unknown error occurred while importing. Please report this as a new issue on Github."}}function aD({modalProps:e,actions:n}){const[r]=(0,v.useState)(false);function o(e){switch(e){case"ynab4":n.pushModal("import-ynab4");break;case"ynab5":n.pushModal("import-ynab5");break;case"actual":n.pushModal("import-actual");break;default:}}let i={padding:10,border:"1px solid "+ei.rS.tableBorder,borderRadius:6,marginBottom:10,display:"block"};return(0,t.jsx)(eb.C,{...e,title:"Import From",style:{width:400},children:()=>(0,t.jsxs)(eu.Z,{style:{...ei.W2.smallText,lineHeight:1.5},children:[r&&(0,t.jsx)(es.Z,{style:{color:ei.rS.errorText,marginBottom:15},children:aI(r)}),(0,t.jsx)(eS.Z,{style:{marginBottom:15},children:"Select an app to import from, and we’ll guide you through the process."}),(0,t.jsxs)(ev.Z,{style:i,onClick:()=>o("ynab4"),children:[(0,t.jsx)("span",{style:{fontWeight:700},children:"YNAB4"}),(0,t.jsx)(eu.Z,{style:{color:ei.rS.alt2PillText},children:"The old unsupported desktop app"})]}),(0,t.jsxs)(ev.Z,{style:i,onClick:()=>o("ynab5"),children:[(0,t.jsx)("span",{style:{fontWeight:700},children:"nYNAB"}),(0,t.jsx)(eu.Z,{style:{color:ei.rS.alt2PillText},children:(0,t.jsx)("div",{children:"The newer web app"})})]}),(0,t.jsxs)(ev.Z,{style:i,onClick:()=>o("actual"),children:[(0,t.jsx)("span",{style:{fontWeight:700},children:"Actual"}),(0,t.jsx)(eu.Z,{style:{color:ei.rS.alt2PillText},children:(0,t.jsx)("div",{children:"Import a file exported from Actual"})})]})]})})}var aP=aD;var aO=n(99103);function aM(e){switch(e){case"parse-error":return"Unable to parse file. Please select a JSON file exported from nYNAB.";case"not-ynab5":return"This file is not valid. Please select a JSON file exported from nYNAB.";case"not-zip-file":return"This file is not valid. Please select an unencrypted archive of Actual data.";case"invalid-zip-file":return"This archive is not a valid Actual export file.";case"invalid-metadata-file":return"The metadata file in the given archive is corrupted.";default:return"An unknown error occurred while importing. Please report this as a new issue on Github."}}function a_({modalProps:e}){const n=(0,y.I0)();const[r,o]=(0,v.useState)(null);const[i,a]=(0,v.useState)(false);async function l(){const e=await window.Actual.openFileDialog({properties:["openFile"],filters:[{name:"actual",extensions:["zip","blob"]}]});if(e){a(true);o(null);try{await n((0,aO.ef)(e[0],"actual"))}catch(e){o(e.message)}finally{a(false)}}}return(0,t.jsx)(eb.C,{...e,title:"Import from Actual export",style:{width:400},children:()=>(0,t.jsxs)(eu.Z,{style:{...ei.W2.smallText,lineHeight:1.5,marginTop:20},children:[r&&(0,t.jsx)(es.Z,{style:{color:ei.rS.errorText,marginBottom:15},children:aM(r)}),(0,t.jsxs)(eu.Z,{style:{"& > div":{lineHeight:"1.7em"}},children:[(0,t.jsxs)(ex.Z,{children:["You can import data from another Actual account or instance. First export your data from a different account, and it will give you a compressed file. This file is a simple zip file that contains the"," ",(0,t.jsx)("code",{children:"db.sqlite"})," and ",(0,t.jsx)("code",{children:"metadata.json"})," files."]}),(0,t.jsx)(ex.Z,{children:"Select one of these compressed files and import it here."}),(0,t.jsx)(eu.Z,{style:{alignSelf:"center"},children:(0,t.jsx)(ev.y,{type:"primary",loading:i,onClick:l,children:"Select file..."})})]})]})})}var aR=a_;function aA(e){switch(e){case"not-ynab4":return"This file is not valid. Please select a compressed ynab4 zip file.";default:return"An unknown error occurred while importing. Please report this as a new issue on Github."}}function aN({modalProps:e}){const n=(0,y.I0)();const[r,o]=(0,v.useState)(null);const[i,a]=(0,v.useState)(false);async function l(){const e=await window.Actual.openFileDialog({properties:["openFile"],filters:[{name:"ynab",extensions:["zip"]}]});if(e){a(true);o(null);try{await n((0,aO.ef)(e[0],"ynab4"))}catch(e){o(e.message)}finally{a(false)}}}return(0,t.jsx)(eb.C,{...e,title:"Import from YNAB4",style:{width:400},children:()=>(0,t.jsxs)(eu.Z,{style:{...ei.W2.smallText,lineHeight:1.5,marginTop:20},children:[r&&(0,t.jsx)(es.Z,{style:{color:ei.rS.errorText,marginBottom:15},children:aA(r)}),(0,t.jsxs)(eu.Z,{style:{alignItems:"center"},children:[(0,t.jsxs)(ex.Z,{children:["To import data from YNAB4, locate where your YNAB4 data is stored. It is usually in your Documents folder under YNAB. Your data is a directory inside that with the ",(0,t.jsx)("code",{children:".ynab4"})," suffix."]}),(0,t.jsxs)(ex.Z,{children:["When you’ve located your data,"," ",(0,t.jsx)("strong",{children:"compress it into a zip file"}),". On macOS, right-click the folder and select “Compress”. On Windows, right-click and select “Send to → Compressed (zipped) folder”. Upload the zipped folder for importing."]}),(0,t.jsx)(eu.Z,{children:(0,t.jsx)(ev.y,{type:"primary",loading:i,onClick:l,children:"Select zip file..."})})]})]})})}var aZ=aN;function aL(e){switch(e){case"parse-error":return"Unable to parse file. Please select a JSON file exported from nYNAB.";case"not-ynab5":return"This file is not valid. Please select a JSON file exported from nYNAB.";default:return"An unknown error occurred while importing. Please report this as a new issue on Github."}}function aB({modalProps:e}){const n=(0,y.I0)();const[r,o]=(0,v.useState)(null);const[i,a]=(0,v.useState)(false);async function l(){const e=await window.Actual.openFileDialog({properties:["openFile"],filters:[{name:"ynab",extensions:["json"]}]});if(e){a(true);o(null);try{await n((0,aO.ef)(e[0],"ynab5"))}catch(e){o(e.message)}finally{a(false)}}}return(0,t.jsx)(eb.C,{...e,title:"Import from nYNAB",style:{width:400},children:()=>(0,t.jsxs)(eu.Z,{style:{...ei.W2.smallText,lineHeight:1.5,marginTop:20},children:[r&&(0,t.jsx)(es.Z,{style:{color:ei.rS.errorText,marginBottom:15},children:aL(r)}),(0,t.jsxs)(eu.Z,{style:{alignItems:"center","& > div":{lineHeight:"1.7em"}},children:[(0,t.jsxs)(ex.Z,{children:[(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/migration/nynab",children:"Read here"})," ","for instructions on how to migrate your data from YNAB. You need to export your data as JSON, and that page explains how to do that."]}),(0,t.jsx)(ex.Z,{children:"Once you have exported your data, select the file and Actual will import it. Budgets may not match up exactly because things work slightly differently, but you should be able to fix up any problems."}),(0,t.jsx)(eu.Z,{children:(0,t.jsx)(ev.y,{type:"primary",loading:i,onClick:l,children:"Select file..."})})]})]})})}var aF=aB;function aW(){let e=(0,y.v9)(e=>e.modals.modalStack);let n=(0,y.v9)(e=>e.modals.isHidden);let r=(0,en.o)();let o=e.map(({name:o,options:i={}},a)=>{const l={onClose:r.popModal,onPush:r.pushModal,onBack:r.popModal,isCurrent:a===e.length-1,isHidden:n,stackIndex:a};switch(o){case"delete-budget":return(0,t.jsx)(aj,{modalProps:l,actions:r,file:i.file},o);case"import":return(0,t.jsx)(aP,{modalProps:l,actions:r},o);case"import-ynab4":return(0,t.jsx)(aZ,{modalProps:l,actions:r},o);case"import-ynab5":return(0,t.jsx)(aF,{modalProps:l,actions:r},o);case"import-actual":return(0,t.jsx)(aR,{modalProps:l,actions:r},o);case"load-backup":{return(0,t.jsx)(oA,{budgetId:i.budgetId,modalProps:{...l,onClose:r.popModal},backupDisabled:true,actions:r})}case"create-encryption-key":return(0,t.jsx)(rK,{modalProps:l,actions:r,options:i},o);case"fix-encryption-key":return(0,t.jsx)(r2,{modalProps:l,actions:r,options:i},o);default:throw new Error("Unknown modal: "+o)}});return(0,t.jsx)(eu.Z,{style:{flex:1,padding:50},children:o})}var aU=n(6755);function az(){const e=(0,iM.o1)();return(0,t.jsxs)(eu.Z,{style:{position:"absolute",bottom:0,left:0,right:0,justifyContent:"center",flexDirection:"row",marginBottom:15,zIndex:5e3},children:[(0,t.jsx)(eS.Z,{children:e?(0,t.jsxs)(t.Fragment,{children:["Using server: ",(0,t.jsx)("strong",{children:e})]}):(0,t.jsx)("strong",{children:"No server configured"})}),(0,t.jsx)(aU.Z,{to:"/config-server",style:{marginLeft:15},children:"Change"})]})}var aH=n(92178);function aK({buttons:e,onSetPassword:n,onError:r}){let[o,i]=(0,v.useState)("");let[a,l]=(0,v.useState)("");let[s,u]=(0,v.useState)(false);let[c,f]=(0,v.useState)(false);async function h(e){e.preventDefault();if(c){return}if(o===a){f(true);await n(o);f(false)}else{r("password-match")}}function p(e){u(e.target.checked)}return(0,t.jsxs)("form",{style:{display:"flex",flexDirection:"column",alignItems:"stretch",marginTop:30},onSubmit:h,children:[(0,t.jsx)(rH.Tn,{autoFocus:true,placeholder:"Password",type:s?"text":"password",value:o,onChange:e=>i(e.target.value),onEnter:h}),(0,t.jsx)(rH.Tn,{placeholder:"Confirm password",type:s?"text":"password",value:a,onChange:e=>l(e.target.value),style:{marginTop:10},onEnter:h}),(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",alignItems:"center",fontSize:15,marginTop:20},children:[(0,t.jsxs)("label",{style:{userSelect:"none"},children:[(0,t.jsx)("input",{type:"checkbox",onChange:p})," Show password"]}),(0,t.jsx)(eu.Z,{style:{flex:1}}),e,(0,t.jsx)(ev.y,{type:"primary",loading:c,children:"OK"})]})]})};function a$(){let e=(0,y.I0)();let[n,r]=(0,v.useState)(null);let{checked:o}=aT();function i(e){switch(e){case"invalid-password":return"Password cannot be empty";case"password-match":return"Passwords do not match";case"network-failure":return"Unable to contact the server";default:return`An unknown error occurred: ${e}`}}async function a(t){r(null);let{error:n}=await (0,q.lW)("subscribe-bootstrap",{password:t});if(n){r(n)}else{e((0,aH.Pl)())}}async function l(){await e((0,aO.xp)({demoMode:true}))}if(!o){return null}return(0,t.jsxs)(eu.Z,{style:{maxWidth:450,marginTop:-30},children:[(0,t.jsx)(aE,{text:"Welcome to Actual!"}),(0,t.jsx)(ex.Z,{style:{fontSize:16,color:ei.rS.pageTextDark},children:"Actual is a super fast privacy-focused app for managing your finances. To secure your data, you’ll need to set a password for your server."}),(0,t.jsxs)(ex.Z,{isLast:true,style:{fontSize:16,color:ei.rS.pageTextDark},children:["Consider opening"," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/tour/",children:"our tour"})," ","in a new tab for some guidance on what to do when you’ve set your password."]}),n&&(0,t.jsx)(eS.Z,{style:{marginTop:20,color:ei.rS.errorText,borderRadius:4,fontSize:15},children:i(n)}),(0,t.jsx)(aK,{buttons:(0,t.jsx)(ev.Z,{type:"bare",style:{fontSize:15,color:ei.rS.pageTextLink,marginRight:15},onClick:l,children:"Try Demo"}),onSetPassword:a,onError:r})]})};function aV(){let e=(0,nM.s0)();let[n,r]=(0,v.useState)(null);let[o,i]=(0,v.useState)(null);function a(e){switch(e){case"invalid-password":return"Password cannot be empty";case"password-match":return"Passwords do not match";case"network-failure":return"Unable to contact the server";default:return"Internal server error"}}async function l(t){r(null);let{error:n}=await (0,q.lW)("subscribe-change-password",{password:t});if(n){r(n)}else{i("Password successfully changed");await (0,q.lW)("subscribe-sign-in",{password:t});e("/")}}return(0,t.jsxs)(eu.Z,{style:{maxWidth:500,marginTop:-30},children:[(0,t.jsx)(aE,{text:"Change server password"}),(0,t.jsx)(eS.Z,{style:{fontSize:16,color:ei.rS.pageTextDark,lineHeight:1.4},children:"This will change the password for this server instance. All existing sessions will stay logged in."}),n&&(0,t.jsx)(eS.Z,{style:{marginTop:20,color:ei.rS.errorText,borderRadius:4,fontSize:15},children:a(n)}),o&&(0,t.jsx)(eS.Z,{style:{marginTop:20,color:ei.rS.noticeText,borderRadius:4,fontSize:15},children:o}),(0,t.jsx)(aK,{buttons:(0,t.jsx)(ev.Z,{type:"bare",style:{fontSize:15,marginRight:10},onClick:()=>e("/"),children:"Cancel"}),onSetPassword:l,onError:r})]})};function aq(e){switch(e){case"network-failure":return"Unable to access server. Make sure the configured URL for the server is accessible.";default:return"Server returned an error while checking its status."}}function aY(){let e=(0,nM.s0)();let n=(0,nM.TH)();let{error:r}=n.state||{};function o(){e("/")}return(0,t.jsxs)(eu.Z,{style:{alignItems:"center",color:ei.rS.pageText},children:[(0,t.jsx)(eS.Z,{style:{fontSize:16,color:ei.rS.pageTextDark,lineHeight:1.4},children:aq(r)}),(0,t.jsx)(ev.Z,{onClick:o,style:{marginTop:20},children:"Try again"})]})};function aG(){let e=(0,y.I0)();let[n,r]=(0,v.useState)("");let[o,i]=(0,v.useState)(false);let[a,l]=(0,v.useState)(null);let{checked:s}=aT();function u(e){switch(e){case"invalid-password":return"Invalid password";case"network-failure":return"Unable to contact the server";default:return`An unknown error occurred: ${e}`}}async function c(t){t.preventDefault();if(n===""||o){return}l(null);i(true);let{error:r}=await (0,q.lW)("subscribe-sign-in",{password:n});i(false);if(r){l(r)}else{e((0,aH.Pl)())}}async function f(){await e((0,aO.xp)({demoMode:true}))}if(!s){return null}return(0,t.jsxs)(eu.Z,{style:{maxWidth:450,marginTop:-30,color:ei.rS.pageText},children:[(0,t.jsx)(aE,{text:"Sign in to this Actual instance"}),(0,t.jsx)(eS.Z,{style:{fontSize:16,color:ei.rS.pageTextDark,lineHeight:1.4},children:"If you lost your password, you likely still have access to your server to manually reset it."}),a&&(0,t.jsx)(eS.Z,{style:{marginTop:20,color:ei.rS.errorText,borderRadius:4,fontSize:15},children:u(a)}),(0,t.jsxs)("form",{style:{display:"flex",flexDirection:"row",marginTop:30},onSubmit:c,children:[(0,t.jsx)(rH.Tn,{autoFocus:true,placeholder:"Password",type:"password",onChange:e=>r(e.target.value),style:{flex:1,marginRight:10}}),(0,t.jsx)(ev.y,{type:"primary",loading:o,style:{fontSize:15},children:"Sign in"})]}),(0,t.jsx)(eu.Z,{style:{flexDirection:"row",justifyContent:"center",marginTop:15},children:(0,t.jsx)(ev.Z,{type:"bare",style:{fontSize:15,color:ei.rS.pageTextLink,marginLeft:10},onClick:f,children:"Try Demo →"})})]})};function aQ(){let{createBudget:e,pushModal:n}=(0,en.o)();return(0,t.jsxs)(eu.Z,{style:{gap:10,maxWidth:500,fontSize:15,maxHeight:"100vh",marginBlock:20},children:[(0,t.jsx)(eS.Z,{style:ei.W2.veryLargeText,children:"Let’s get started!"}),(0,t.jsxs)(eu.Z,{style:{overflowY:"auto"},children:[(0,t.jsxs)(ex.Z,{children:["Actual is a personal finance tool that focuses on beautiful design and a slick user experience."," ",(0,t.jsx)("strong",{children:"Editing your data should be as fast as possible."})," On top of that, we want to provide powerful tools to allow you to do whatever you want with your data."]}),(0,t.jsxs)(ex.Z,{children:["Currently, Actual implements budgeting based on a"," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/budgeting/",linkColor:"purple",children:"monthly envelope system"}),". Consider taking our"," ",(0,t.jsx)(eg.Z,{to:"https://actualbudget.org/docs/tour/",linkColor:"purple",children:"guided tour"})," ","to help you get your bearings, and check out the rest of the documentation while you’re there to learn more about advanced topics."]}),(0,t.jsx)(ex.Z,{style:{color:ei.rS.altpageTextSubdued},children:"Get started by importing an existing budget file from Actual or another budgeting app, or start fresh with an empty budget. You can always create or import another budget later."})]}),(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end",flexShrink:0},children:[(0,t.jsx)(ev.Z,{onClick:()=>n("import"),children:"Import my budget"}),(0,t.jsx)(ev.Z,{type:"primary",onClick:e,children:"Start fresh"})]})]})};function aX(){const e=(0,iM.Mx)();return(0,t.jsx)(eS.Z,{style:{color:ei.rS.pageTextSubdued,":hover":{color:ei.rS.pageText},margin:15,marginLeft:17,[`@media (min-width: ${iO.Z.breakpoint_small})`]:{position:"absolute",bottom:0,right:0,marginLeft:15,marginRight:17,zIndex:5001}},children:`App: v${window.Actual.ACTUAL_VERSION} | Server: ${e}`})}function aJ({isLoading:e}){let n=(0,y.v9)(e=>e.budgets.allFiles);let r=(0,y.v9)(e=>e.user.data);let o=(0,y.v9)(e=>e.app.managerHasInitialized);let{setAppState:i,getUserData:a,loadAllFiles:l}=(0,en.o)();(0,v.useEffect)(()=>{if(!o){if(!e){i({loadingText:""})}}async function t(){let t=await a();if(t){await l()}i({managerHasInitialized:true,...!e?{loadingText:null}:null})}t()},[]);if(!o){return null}if(e){return null}return(0,t.jsxs)(n_.VK,{children:[(0,t.jsx)(nK,{}),(0,t.jsxs)(eu.Z,{style:{height:"100%",color:ei.rS.pageText},children:[(0,t.jsx)(eu.Z,{style:{position:"absolute",top:0,left:0,right:0,height:40,WebkitAppRegion:"drag"}}),(0,t.jsx)(eu.Z,{style:{position:"absolute",bottom:40,right:15},children:(0,t.jsx)(it,{style:{position:"relative",left:"initial",right:"initial"}})}),o&&(0,t.jsx)(eu.Z,{style:{alignItems:"center",bottom:0,justifyContent:"center",left:0,padding:20,position:"absolute",right:0,top:0},children:r&&n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(nM.Z5,{children:[(0,t.jsx)(nM.AW,{path:"/config-server",element:(0,t.jsx)(aC,{})}),(0,t.jsx)(nM.AW,{path:"/change-password",element:(0,t.jsx)(aV,{})}),n&&n.length>0?(0,t.jsx)(nM.AW,{path:"/",element:(0,t.jsx)(ak,{})}):(0,t.jsx)(nM.AW,{path:"/",element:(0,t.jsx)(aQ,{})}),(0,t.jsx)(nM.AW,{path:"/*",element:(0,t.jsx)(nM.Fg,{to:"/"})})]}),(0,t.jsx)(eu.Z,{style:{position:"absolute",top:0,right:0,padding:"6px 10px",zIndex:4e3},children:(0,t.jsxs)(nM.Z5,{children:[(0,t.jsx)(nM.AW,{path:"/config-server",element:null}),(0,t.jsx)(nM.AW,{path:"/*",element:(0,t.jsx)(at.Z,{hideIfNoServer:true,style:{padding:"4px 7px"}})})]})})]}):(0,t.jsxs)(nM.Z5,{children:[(0,t.jsx)(nM.AW,{path:"/login",element:(0,t.jsx)(aG,{})}),(0,t.jsx)(nM.AW,{path:"/error",element:(0,t.jsx)(aY,{})}),(0,t.jsx)(nM.AW,{path:"/config-server",element:(0,t.jsx)(aC,{})}),(0,t.jsx)(nM.AW,{path:"/bootstrap",element:(0,t.jsx)(a$,{})}),(0,t.jsx)(nM.AW,{path:"/*",element:(0,t.jsx)(nM.Fg,{to:"/bootstrap",replace:true})})]})}),(0,t.jsxs)(nM.Z5,{children:[(0,t.jsx)(nM.AW,{path:"/config-server",element:null}),(0,t.jsx)(nM.AW,{path:"/*",element:(0,t.jsx)(az,{})})]}),(0,t.jsx)(aX,{})]}),(0,t.jsx)(aW,{})]})};let a0={border:0,fontSize:15,padding:"10px 13px"};function a1(){const e=(0,y.v9)(e=>{return e.prefs.local&&e.prefs.local.hideMobileMessage||true});const{isNarrowWidth:n}=(0,eo.F)();let[r,o]=(0,v.useState)(n&&!e&&!document.cookie.match(/hideMobileMessage=true/));let[i,a]=(0,v.useState)(false);let l=(0,y.I0)();function s(){o(false);if(i){l((0,T.savePrefs)({hideMobileMessage:true}))}else{let e=new Date;e.setTime(e.getTime()+1e3*60*5);document.cookie="hideMobileMessage=true;path=/;expires="+e.toUTCString()}}if(!r){return null}return(0,t.jsxs)(eu.Z,{style:{position:"absolute",bottom:0,left:0,right:0,backgroundColor:ei.rS.mobileModalBackground,color:ei.rS.mobileModalText,padding:10,margin:10,borderRadius:6,zIndex:1e4,fontSize:15,...ei.W2.shadowLarge},children:[(0,t.jsxs)(eS.Z,{style:{lineHeight:"1.5em"},children:[(0,t.jsx)("strong",{children:"Actual features are limited on small screens."}),(0,t.jsx)("br",{}),(0,t.jsx)("span",{children:"While we work to improve this experience, you may find the full Actual feature set on devices with larger screens."})]}),(0,t.jsxs)(eu.Z,{style:{gap:16,marginTop:20,justifyContent:"center"},children:[(0,t.jsx)(ev.Z,{style:a0,onClick:s,children:"Try it anyway"}),(0,t.jsxs)(eu.Z,{style:{alignItems:"center",flexDirection:"row",justifyContent:"flex-end"},children:[(0,t.jsx)(ek.XZ,{id:"dont_remind_me",checked:i,onChange:()=>{a(!i)}}),(0,t.jsx)("label",{htmlFor:"dont_remind_me",style:{userSelect:"none"},children:"Don’t remind me again"})]})]})]})};const a2=e=>(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",style:{color:"inherit",...e.style},children:(0,t.jsx)("path",{d:"M10 8.586 2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z",fill:"currentColor"})});var a4=a2;function a5(e){e({updateInfo:null,showUpdateNotification:false})}function a3(){let e=(0,y.v9)(e=>e.app.updateInfo);let n=(0,y.v9)(e=>e.app.showUpdateNotification);let{updateApp:r,setAppState:o}=(0,en.o)();if(e&&n){let n=e.releaseNotes;return(0,t.jsxs)(eu.Z,{style:{position:"absolute",bottom:0,right:0,margin:"15px 17px",backgroundColor:ei.rS.altPageTextPositive,color:ei.rS.tableBackground,padding:"7px 10px",borderRadius:4,zIndex:1e4,maxWidth:450},children:[(0,t.jsxs)(eu.Z,{style:{flexDirection:"row",alignItems:"center"},children:[(0,t.jsx)(eu.Z,{style:{marginRight:10,fontWeight:700},children:(0,t.jsxs)(eS.Z,{children:["App updated to ",e.version]})}),(0,t.jsx)(eu.Z,{style:{flex:1}}),(0,t.jsx)(eu.Z,{style:{marginTop:-1},children:(0,t.jsxs)(eS.Z,{children:[(0,t.jsx)(ey.Z,{onClick:r,style:{color:ei.rS.buttonPrimaryText,textDecoration:"underline"},children:"Restart"})," ","(",(0,t.jsx)(ey.Z,{style:{color:ei.rS.buttonPrimaryText,textDecoration:"underline"},onClick:()=>window.Actual.openURLInBrowser("https://actualbudget.org/docs/releases"),children:"notes"}),")",(0,t.jsx)(ev.Z,{type:"bare",style:{display:"inline",padding:"1px 7px 2px 7px"},onClick:()=>a5(o),children:(0,t.jsx)(a4,{width:9,style:{color:ei.rS.buttonPrimaryText}})})]})})]}),n&&(0,t.jsx)(eu.Z,{style:{marginTop:10,fontWeight:500},children:n})]})}return null};function a7({budgetId:e,cloudFileId:r,loadingText:o,loadBudget:i,closeBudget:a,loadGlobalPrefs:l}){const[s,u]=(0,v.useState)(true);const{showBoundary:c}=ee();async function f(){const e=await n.g.Actual.getServerSocket();await (0,q.S1)(e);await l();const t=await (0,q.lW)("get-last-opened-backup");if(t){await i(t);(0,q.lW)("get-remote-files").then(e=>{if(e){let t=e.find(e=>e.fileId===r);if(t&&t.deleted){a()}}})}}(0,v.useEffect)(()=>{async function e(){await Promise.all([er(),f()]);u(false)}e().catch(c)},[]);(0,v.useEffect)(()=>{n.g.Actual.updateAppMenu(!!e)},[e]);return(0,t.jsxs)(t.Fragment,{children:[s?(0,t.jsx)(ep,{initializing:s,loadingText:o}):e?(0,t.jsx)(ae,{}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{initializing:s,loadingText:o}),(0,t.jsx)(aJ,{isLoading:o!=null})]}),(0,t.jsx)(a3,{}),(0,t.jsx)(a1,{})]})}function a6({error:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ep,{}),(0,t.jsx)(eI,{error:e,buttonText:"Restart app"})]})}function a8(){let e=(0,y.v9)(e=>e.prefs.local&&e.prefs.local.id);let n=(0,y.v9)(e=>e.prefs.local&&e.prefs.local.cloudFileId);let r=(0,y.v9)(e=>e.app.loadingText);let{loadBudget:o,closeBudget:i,loadGlobalPrefs:a,sync:s}=(0,en.o)();const[u,c]=(0,v.useState)((0,ei.bA)());(0,v.useEffect)(()=>{function e(){if(u!==(0,ei.bA)()){c((0,ei.bA)())}}let t=false;async function n(){if(!t){console.debug("triggering sync because of visibility change");t=true;await s();t=false}}window.addEventListener("focus",e);window.addEventListener("visibilitychange",n);return()=>{window.removeEventListener("focus",e);window.removeEventListener("visibilitychange",n)}},[s]);return(0,t.jsx)(eo.$,{children:(0,t.jsx)(eu.Z,{style:{height:"100%",display:"flex",flexDirection:"column"},children:(0,t.jsxs)(eu.Z,{style:{flexGrow:1,overflow:"hidden",...ei.W2.lightScrollbar},children:[(0,t.jsxs)(Q,{FallbackComponent:a6,children:[{"NODE_ENV":"production","PUBLIC_URL":"","WDS_SOCKET_HOST":undefined,"WDS_SOCKET_PATH":undefined,"WDS_SOCKET_PORT":undefined,"FAST_REFRESH":true,"REACT_APP_BACKEND_WORKER_HASH":"b835d2cdcf8004c363da"}.REACT_APP_REVIEW_ID&&!l.$8&&(0,t.jsx)(em,{}),(0,t.jsx)(a7,{budgetId:e,cloudFileId:n,loadingText:r,loadBudget:o,closeBudget:i,loadGlobalPrefs:a})]}),(0,t.jsx)(ei.jy,{})]},u?"hidden-scrollbars":"scrollbars")})})}var a9=a8;function le(e,t){let n=false;(0,q.oL)("sync-event",r=>{let{type:o,subtype:i,meta:a,tables:l}=r;let s=t.getState().prefs.local;if(!s||!s.id){return}if(o==="success"){if(n){n=false;e.addNotification({title:"Syncing has been fixed!",message:"Happy budgeting!",type:"message"})}if(l.includes("prefs")){e.loadPrefs()}if(l.includes("categories")||l.includes("category_groups")||l.includes("category_mapping")){e.getCategories()}if(l.includes("payees")||l.includes("payee_mapping")){e.getPayees()}if(l.includes("accounts")){e.getAccounts()}}else if(o==="error"){let o=null;let l="[Learn more](https://actualbudget.org/docs/getting-started/sync/#debugging-sync-issues)";const s="https://github.com/actualbudget/actual/issues/new?assignees=&labels=bug&template=bug-report.yml&title=%5BBug%5D%3A+";switch(i){case"out-of-sync":if(n){o={title:"Your data is still out of sync",message:"We were unable to repair your sync state, sorry! You need to reset your sync state. "+l,sticky:true,id:"reset-sync",button:{title:"Reset sync",action:e.resetSync}}}else{o={title:"Your data is out of sync",message:"There was a problem syncing your data. We can try to repair your sync state "+"to fix it. "+l,type:"warning",sticky:true,id:"repair-sync",button:{title:"Repair",action:async()=>{n=true;await (0,q.lW)("sync-repair");e.sync()}}}}break;case"file-old-version":o={title:"Actual has updated the syncing format",message:"This happens rarely (if ever again). The internal syncing format "+"has changed and you need to reset sync. This will upload data from "+"this device and revert all other devices. "+"[Learn more about what this means](https://actualbudget.org/docs/getting-started/sync/#what-does-resetting-sync-mean)."+"\n\nOld encryption keys are not migrated. If using "+"encryption, [reset encryption here](#makeKey).",messageActions:{makeKey:()=>e.pushModal("create-encryption-key")},sticky:true,id:"old-file",button:{title:"Reset sync",action:e.resetSync}};break;case"file-key-mismatch":o={title:"Your encryption key need to be reset",message:"Something went wrong when registering your encryption key id. "+"You need to recreate your key. "+l,sticky:true,id:"invalid-key-state",button:{title:"Reset key",action:()=>e.pushModal("create-encryption-key")}};break;case"file-not-found":o={title:"This file is not a cloud file",message:"You need to register it to take advantage "+"of syncing which allows you to use it across devices and never worry "+"about losing your data. "+l,type:"warning",sticky:true,id:"register-file",button:{title:"Register",action:async()=>{await e.uploadBudget();e.sync();e.loadPrefs()}}};break;case"file-needs-upload":o={title:"File needs upload",message:"Something went wrong when creating this cloud file. You need "+"to upload this file to fix it. "+l,sticky:true,id:"upload-file",button:{title:"Upload",action:e.resetSync}};break;case"file-has-reset":case"file-has-new-key":let{cloudFileId:u}=t.getState().prefs.local;o={title:"Syncing has been reset on this cloud file",message:"You need to revert it to continue syncing. Any unsynced "+"data will be lost. If you like, you can instead "+"[upload this file](#upload) to be the latest version. "+l,messageActions:{upload:e.resetSync},sticky:true,id:"needs-revert",button:{title:"Revert",action:()=>e.closeAndDownloadBudget(u)}};break;case"encrypt-failure":case"decrypt-failure":if(a.isMissingKey){o={title:"Missing encryption key",message:"Unable to encrypt your data because you are missing the key. "+"Create your key to sync your data.",sticky:true,id:"encrypt-failure-missing",button:{title:"Create key",action:()=>e.pushModal("fix-encryption-key",{onSuccess:()=>e.sync()})}}}else{o={message:"Unable to encrypt your data. You have the correct "+"key so this is likely an internal failure. To fix this, "+"reset your sync data with a new key.",sticky:true,id:"encrypt-failure",button:{title:"Reset key",action:()=>e.pushModal("create-encryption-key",{onSuccess:()=>e.sync()})}}}break;case"invalid-schema":console.trace("invalid-schema",a);o={title:"Update required",message:"We couldn’t apply changes from the server. This probably means you "+"need to update the app to support the latest database.",type:"warning"};break;case"apply-failure":console.trace("apply-failure",a);o={message:`We couldn’t apply that change to the database. Please report this as a bug by [opening a Github issue](${s}).`};break;case"network":break;default:console.trace("unkown error",r);o={message:`We had problems syncing your changes. Please report this as a bug by [opening a Github issue](${s}).`}}if(o){e.addNotification({type:"error",...o})}}})};function lt(e,t){n.g.Actual.onEventFromMain("update-downloaded",(t,n)=>{e.setAppState({updateInfo:n})});n.g.Actual.onEventFromMain("update-error",e=>{});(0,q.oL)("server-error",t=>{e.addGenericErrorNotification()});(0,q.oL)("update-loading-status",t=>{switch(t){case"updating":e.updateStatusText("Updating...");break;default:}});(0,q.oL)("orphaned-payees",({orphanedIds:t,updatedPayeeIds:n})=>{e.pushModal("merge-unused-payees",{payeeIds:t,targetPayeeId:n[0]})});(0,q.oL)("schedules-offline",({payees:t})=>{e.pushModal(`schedule-posts-offline-notification`,{payees:t})});(0,q.oL)("sync-event",async({type:n,tables:r})=>{let o=t.getState().prefs.local;if(o&&o.id){if(n==="applied"){if(r.includes("payees")||r.includes("payee_mapping")){e.getPayees()}}}});(0,q.oL)("sync-event",async({type:t})=>{if(t==="unauthorized"){e.addNotification({type:"warning",message:"Unable to authenticate with server",sticky:true,id:"auth-issue"})}});le(e,t);(0,q.oL)("undo-event",n=>{let{tables:r,undoTag:o}=n;let i=[];if(r.includes("categories")||r.includes("category_groups")||r.includes("category_mapping")){i.push(e.getCategories())}if(r.includes("accounts")){i.push(e.getAccounts())}let a=nB.r8(o);if(a){Promise.all(i).then(()=>{e.setLastUndoState(n);if(a.openModal){let{modalStack:n}=t.getState().modals;if(n.length===0||n[n.length-1].name!==a.openModal){e.replaceModal(a.openModal)}}else{e.closeModal();if(window.location.href.replace(window.location.origin,"")!==a.url){window.__navigate(a.url);return true}}})}});(0,q.oL)("fallback-write-error",()=>{e.addNotification({type:"error",title:"Unable to save changes",sticky:true,message:"This browser only supports using the app in one tab at a time, "+"and another tab has opened the app. No changes will be saved "+"from this tab; please close it and continue working in the other one."})});(0,q.oL)("start-load",()=>{e.closeBudgetUI();e.setAppState({loadingText:""})});(0,q.oL)("finish-load",()=>{e.closeModal();e.setAppState({loadingText:null});e.loadPrefs()});(0,q.oL)("start-import",()=>{e.closeBudgetUI()});(0,q.oL)("finish-import",()=>{e.closeModal();e.setAppState({loadingText:null});e.loadPrefs()});(0,q.oL)("show-budgets",()=>{e.closeBudgetUI();e.setAppState({loadingText:null})})}var ln=n(17401);const lo=(0,x.UY)(V);function li(e,t){if(t.type===E.DC){e={budgets:e.budgets,user:e.user,prefs:{local:null,global:e.prefs.global},app:{...D,updateInfo:e.updateInfo,showUpdateNotification:e.showUpdateNotification,managerHasInitialized:e.app.managerHasInitialized,loadingText:e.app.loadingText}}}return lo(e,t)}const la=(0,x.MT)(li,undefined,(0,x.md)(k));const ll=(0,x.DE)(T,la.dispatch);lt(ll,la);window.__actionsForMenu=ll;window.$send=q.lW;window.$query=C.Vn;window.$q=C.ZP;const ls=document.getElementById("root");const lu=(0,b.s)(ls);lu.render((0,t.jsx)(y.zt,{store:la,children:(0,t.jsx)(iM.qc,{children:(0,t.jsx)(a9,{})})}))}()})();
|
|
188
|
+
//# sourceMappingURL=main.7e6eedd0.js.map
|