@medplum/app 2.0.28 → 2.0.30

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.
@@ -1,234 +0,0 @@
1
- function e3(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(n,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function Pv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var e$={exports:{}},kp={},t$={exports:{}},ke={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var zs=Symbol.for("react.element"),t3=Symbol.for("react.portal"),r3=Symbol.for("react.fragment"),n3=Symbol.for("react.strict_mode"),o3=Symbol.for("react.profiler"),a3=Symbol.for("react.provider"),i3=Symbol.for("react.context"),l3=Symbol.for("react.forward_ref"),s3=Symbol.for("react.suspense"),c3=Symbol.for("react.memo"),u3=Symbol.for("react.lazy"),q0=Symbol.iterator;function d3(e){return e===null||typeof e!="object"?null:(e=q0&&e[q0]||e["@@iterator"],typeof e=="function"?e:null)}var r$={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},n$=Object.assign,o$={};function ll(e,t,r){this.props=e,this.context=t,this.refs=o$,this.updater=r||r$}ll.prototype.isReactComponent={};ll.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};ll.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function a$(){}a$.prototype=ll.prototype;function $v(e,t,r){this.props=e,this.context=t,this.refs=o$,this.updater=r||r$}var Ov=$v.prototype=new a$;Ov.constructor=$v;n$(Ov,ll.prototype);Ov.isPureReactComponent=!0;var Q0=Array.isArray,i$=Object.prototype.hasOwnProperty,Cv={current:null},l$={key:!0,ref:!0,__self:!0,__source:!0};function s$(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)i$.call(t,n)&&!l$.hasOwnProperty(n)&&(o[n]=t[n]);var l=arguments.length-2;if(l===1)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)o[n]===void 0&&(o[n]=l[n]);return{$$typeof:zs,type:e,key:a,ref:i,props:o,_owner:Cv.current}}function f3(e,t){return{$$typeof:zs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kv(e){return typeof e=="object"&&e!==null&&e.$$typeof===zs}function p3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var G0=/\/+/g;function Fm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p3(""+e.key):t.toString(36)}function mu(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case zs:case t3:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Fm(i,0):n,Q0(o)?(r="",e!=null&&(r=e.replace(G0,"$&/")+"/"),mu(o,t,r,"",function(u){return u})):o!=null&&(kv(o)&&(o=f3(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(G0,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",Q0(e))for(var l=0;l<e.length;l++){a=e[l];var c=n+Fm(a,l);i+=mu(a,t,r,c,o)}else if(c=d3(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=n+Fm(a,l++),i+=mu(a,t,r,c,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function wc(e,t,r){if(e==null)return e;var n=[],o=0;return mu(e,n,"","",function(a){return t.call(r,a,o++)}),n}function m3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var lr={current:null},hu={transition:null},h3={ReactCurrentDispatcher:lr,ReactCurrentBatchConfig:hu,ReactCurrentOwner:Cv};ke.Children={map:wc,forEach:function(e,t,r){wc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return wc(e,function(){t++}),t},toArray:function(e){return wc(e,function(t){return t})||[]},only:function(e){if(!kv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Component=ll;ke.Fragment=r3;ke.Profiler=o3;ke.PureComponent=$v;ke.StrictMode=n3;ke.Suspense=s3;ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=h3;ke.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=n$({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Cv.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)i$.call(t,c)&&!l$.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:zs,type:e.type,key:o,ref:a,props:n,_owner:i}};ke.createContext=function(e){return e={$$typeof:i3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:a3,_context:e},e.Consumer=e};ke.createElement=s$;ke.createFactory=function(e){var t=s$.bind(null,e);return t.type=e,t};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:l3,render:e}};ke.isValidElement=kv;ke.lazy=function(e){return{$$typeof:u3,_payload:{_status:-1,_result:e},_init:m3}};ke.memo=function(e,t){return{$$typeof:c3,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=hu.transition;hu.transition={};try{e()}finally{hu.transition=t}};ke.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ke.useCallback=function(e,t){return lr.current.useCallback(e,t)};ke.useContext=function(e){return lr.current.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e){return lr.current.useDeferredValue(e)};ke.useEffect=function(e,t){return lr.current.useEffect(e,t)};ke.useId=function(){return lr.current.useId()};ke.useImperativeHandle=function(e,t,r){return lr.current.useImperativeHandle(e,t,r)};ke.useInsertionEffect=function(e,t){return lr.current.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return lr.current.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return lr.current.useMemo(e,t)};ke.useReducer=function(e,t,r){return lr.current.useReducer(e,t,r)};ke.useRef=function(e){return lr.current.useRef(e)};ke.useState=function(e){return lr.current.useState(e)};ke.useSyncExternalStore=function(e,t,r){return lr.current.useSyncExternalStore(e,t,r)};ke.useTransition=function(){return lr.current.useTransition()};ke.version="18.2.0";t$.exports=ke;var f=t$.exports;const s=Pv(f),Mu=e3({__proto__:null,default:s},[f]);/**
10
- * @license React
11
- * react-jsx-runtime.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 g3=f,v3=Symbol.for("react.element"),y3=Symbol.for("react.fragment"),w3=Object.prototype.hasOwnProperty,_3=g3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b3={key:!0,ref:!0,__self:!0,__source:!0};function c$(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)w3.call(t,n)&&!b3.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:v3,type:e,key:a,ref:i,props:o,_owner:_3.current}}kp.Fragment=y3;kp.jsx=c$;kp.jsxs=c$;e$.exports=kp;var p=e$.exports,In=function(){return In=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},In.apply(this,arguments)};function u$(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function sl(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function l(d){try{u(n.next(d))}catch(m){i(m)}}function c(d){try{u(n.throw(d))}catch(m){i(m)}}function u(d){d.done?a(d.value):o(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function cl(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(r=0)),r;)try{if(n=1,o&&(a=u[0]&2?o.return:u[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;switch(o=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],o=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function K0(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],i;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(l){i={error:l}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a}function Uh(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var gu="right-scroll-bar-position",vu="width-before-scroll-bar",x3="with-scroll-bars-hidden",E3="--removed-body-scroll-bar-size";function S3(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function P3(e,t){var r=f.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function $3(e,t){return P3(t||null,function(r){return e.forEach(function(n){return S3(n,r)})})}function O3(e){return e}function C3(e,t){t===void 0&&(t=O3);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var c=function(){var d=i;i=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),r}}}};return o}function k3(e){e===void 0&&(e={});var t=C3(null);return t.options=In({async:!0,ssr:!1},e),t}var d$=function(e){var t=e.sideCar,r=u$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return f.createElement(n,In({},r))};d$.isSideCarExport=!0;function j3(e,t){return e.useMedium(t),d$}var f$=k3(),Vm=function(){},jp=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:Vm,onWheelCapture:Vm,onTouchMoveCapture:Vm}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,m=e.shards,h=e.sideCar,g=e.noIsolation,y=e.inert,_=e.allowPinchZoom,E=e.as,w=E===void 0?"div":E,v=e.gapMode,b=u$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=h,P=$3([r,t]),O=In(In({},b),o);return f.createElement(f.Fragment,null,d&&f.createElement(x,{sideCar:f$,removeScrollBar:u,shards:m,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!_,lockRef:r,gapMode:v}),i?f.cloneElement(f.Children.only(l),In(In({},O),{ref:P})):f.createElement(w,In({},O,{className:c,ref:P}),l))});jp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};jp.classNames={fullWidth:vu,zeroRight:gu};var Y0,R3=function(){if(Y0)return Y0;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function T3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=R3();return t&&e.setAttribute("nonce",t),e}function I3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function D3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var N3=function(){var e=0,t=null;return{add:function(r){e==0&&(t=T3())&&(I3(t,r),D3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},A3=function(){var e=N3();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},p$=function(){var e=A3(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},M3={left:0,top:0,right:0,gap:0},Bm=function(e){return parseInt(e||"",10)||0},z3=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Bm(r),Bm(n),Bm(o)]},L3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M3;var t=z3(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},F3=p$(),V3=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
18
- .`.concat(x3,` {
19
- overflow: hidden `).concat(n,`;
20
- padding-right: `).concat(l,"px ").concat(n,`;
21
- }
22
- body {
23
- overflow: hidden `).concat(n,`;
24
- overscroll-behavior: contain;
25
- `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
26
- padding-left: `.concat(o,`px;
27
- padding-top: `).concat(a,`px;
28
- padding-right: `).concat(i,`px;
29
- margin-left:0;
30
- margin-top:0;
31
- margin-right: `).concat(l,"px ").concat(n,`;
32
- `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";")].filter(Boolean).join(""),`
33
- }
34
-
35
- .`).concat(gu,` {
36
- right: `).concat(l,"px ").concat(n,`;
37
- }
38
-
39
- .`).concat(vu,` {
40
- margin-right: `).concat(l,"px ").concat(n,`;
41
- }
42
-
43
- .`).concat(gu," .").concat(gu,` {
44
- right: 0 `).concat(n,`;
45
- }
46
-
47
- .`).concat(vu," .").concat(vu,` {
48
- margin-right: 0 `).concat(n,`;
49
- }
50
-
51
- body {
52
- `).concat(E3,": ").concat(l,`px;
53
- }
54
- `)},B3=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,a=f.useMemo(function(){return L3(o)},[o]);return f.createElement(F3,{styles:V3(a,!t,o,r?"":"!important")})},Wh=!1;if(typeof window<"u")try{var _c=Object.defineProperty({},"passive",{get:function(){return Wh=!0,!0}});window.addEventListener("test",_c,_c),window.removeEventListener("test",_c,_c)}catch{Wh=!1}var li=Wh?{passive:!1}:!1,U3=function(e){return e.tagName==="TEXTAREA"},m$=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!U3(e)&&r[t]==="visible")},W3=function(e){return m$(e,"overflowY")},H3=function(e){return m$(e,"overflowX")},X0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=h$(e,n);if(o){var a=g$(e,n),i=a[1],l=a[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},q3=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Q3=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},h$=function(e,t){return e==="v"?W3(t):H3(t)},g$=function(e,t){return e==="v"?q3(t):Q3(t)},G3=function(e,t){return e==="h"&&t==="rtl"?-1:1},K3=function(e,t,r,n,o){var a=G3(e,window.getComputedStyle(t).direction),i=a*n,l=r.target,c=t.contains(l),u=!1,d=i>0,m=0,h=0;do{var g=g$(e,l),y=g[0],_=g[1],E=g[2],w=_-E-a*y;(y||w)&&h$(e,l)&&(m+=w,h+=y),l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(o&&m===0||!o&&i>m)||!d&&(o&&h===0||!o&&-i>h))&&(u=!0),u},bc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},J0=function(e){return[e.deltaX,e.deltaY]},Z0=function(e){return e&&"current"in e?e.current:e},Y3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},X3=function(e){return`
55
- .block-interactivity-`.concat(e,` {pointer-events: none;}
56
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
57
- `)},J3=0,si=[];function Z3(e){var t=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),o=f.useState(J3++)[0],a=f.useState(p$)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var _=Uh([e.lockRef.current],(e.shards||[]).map(Z0),!0).filter(Boolean);return _.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),_.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(_,E){if("touches"in _&&_.touches.length===2)return!i.current.allowPinchZoom;var w=bc(_),v=r.current,b="deltaX"in _?_.deltaX:v[0]-w[0],x="deltaY"in _?_.deltaY:v[1]-w[1],P,O=_.target,$=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in _&&$==="h"&&O.type==="range")return!1;var C=X0($,O);if(!C)return!0;if(C?P=$:(P=$==="v"?"h":"v",C=X0($,O)),!C)return!1;if(!n.current&&"changedTouches"in _&&(b||x)&&(n.current=P),!P)return!0;var R=n.current||P;return K3(R,E,_,R==="h"?b:x,!0)},[]),c=f.useCallback(function(_){var E=_;if(!(!si.length||si[si.length-1]!==a)){var w="deltaY"in E?J0(E):bc(E),v=t.current.filter(function(P){return P.name===E.type&&P.target===E.target&&Y3(P.delta,w)})[0];if(v&&v.should){E.cancelable&&E.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(Z0).filter(Boolean).filter(function(P){return P.contains(E.target)}),x=b.length>0?l(E,b[0]):!i.current.noIsolation;x&&E.cancelable&&E.preventDefault()}}},[]),u=f.useCallback(function(_,E,w,v){var b={name:_,delta:E,target:w,should:v};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),d=f.useCallback(function(_){r.current=bc(_),n.current=void 0},[]),m=f.useCallback(function(_){u(_.type,J0(_),_.target,l(_,e.lockRef.current))},[]),h=f.useCallback(function(_){u(_.type,bc(_),_.target,l(_,e.lockRef.current))},[]);f.useEffect(function(){return si.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",c,li),document.addEventListener("touchmove",c,li),document.addEventListener("touchstart",d,li),function(){si=si.filter(function(_){return _!==a}),document.removeEventListener("wheel",c,li),document.removeEventListener("touchmove",c,li),document.removeEventListener("touchstart",d,li)}},[]);var g=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:X3(o)}):null,g?f.createElement(B3,{gapMode:e.gapMode}):null)}const eN=j3(f$,Z3);var v$=f.forwardRef(function(e,t){return f.createElement(jp,In({},e,{ref:t,sideCar:eN}))});v$.classNames=jp.classNames;const tN=v$;function zu(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function rN(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function nN(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].disabled)return n}return e}function oN(e,t,r){return zu(e,r)===zu(t,r)}function y$({parentSelector:e,siblingSelector:t,onKeyDown:r,loop:n=!0,activateOnFocus:o=!1,dir:a="rtl",orientation:i}){return l=>{var c;r==null||r(l);const u=Array.from(((c=zu(l.currentTarget,e))==null?void 0:c.querySelectorAll(t))||[]).filter(_=>oN(l.currentTarget,_,e)),d=u.findIndex(_=>l.currentTarget===_),m=nN(d,u,n),h=rN(d,u,n),g=a==="rtl"?h:m,y=a==="rtl"?m:h;switch(l.key){case"ArrowRight":{i==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[g].focus(),o&&u[g].click());break}case"ArrowLeft":{i==="horizontal"&&(l.stopPropagation(),l.preventDefault(),u[y].focus(),o&&u[y].click());break}case"ArrowUp":{i==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[h].focus(),o&&u[h].click());break}case"ArrowDown":{i==="vertical"&&(l.stopPropagation(),l.preventDefault(),u[m].focus(),o&&u[m].click());break}case"Home":{l.stopPropagation(),l.preventDefault(),!u[0].disabled&&u[0].focus();break}case"End":{l.stopPropagation(),l.preventDefault();const _=u.length-1;!u[_].disabled&&u[_].focus();break}}}}function aN(e,t,r){var n;return r?Array.from(((n=zu(r,t))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===r):null}function ho(e){const t=f.createContext(null);return[({children:o,value:a})=>s.createElement(t.Provider,{value:a},o),()=>{const o=f.useContext(t);if(o===null)throw new Error(e);return o}]}function Rp(e){return Array.isArray(e)?e:[e]}function e1(e,t){return r=>{if(typeof r!="string"||r.trim().length===0)throw new Error(t);return`${e}-${r}`}}const iN=()=>{};function lN(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||iN:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function Rr(e,t){return r=>{e==null||e(r),t==null||t(r)}}function sN(){const[e,t]=f.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function cN({data:e}){const t=[],r=[],n=e.reduce((o,a,i)=>(a.group?o[a.group]?o[a.group].push(i):o[a.group]=[i]:r.push(i),o),{});return Object.keys(n).forEach(o=>{t.push(...n[o].map(a=>e[a]))}),t.push(...r.map(o=>e[o])),t}function uN(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const dN=typeof window<"u"?f.useLayoutEffect:f.useEffect;function fN(e){function t(n){const o=Object.keys(n).reduce((a,i)=>(a[`${e}:${i}`]=l=>n[i](l.detail),a),{});dN(()=>(Object.keys(o).forEach(a=>{window.removeEventListener(a,o[a]),window.addEventListener(a,o[a])}),()=>Object.keys(o).forEach(a=>{window.removeEventListener(a,o[a])})),[o])}function r(n){return(...o)=>uN(`${e}:${String(n)}`,o[0])}return[t,r]}function Tp(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==s.Fragment:!1}function w$(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=w$(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function _$(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=w$(t))&&(n&&(n+=" "),n+=r);return n}const pN={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function mN(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var hN=Object.defineProperty,t1=Object.getOwnPropertySymbols,gN=Object.prototype.hasOwnProperty,vN=Object.prototype.propertyIsEnumerable,r1=(e,t,r)=>t in e?hN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,n1=(e,t)=>{for(var r in t||(t={}))gN.call(t,r)&&r1(e,r,t[r]);if(t1)for(var r of t1(t))vN.call(t,r)&&r1(e,r,t[r]);return e};function yN(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:n1({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:n1({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Ls(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function jv(e){const t=Ls(e);return(r,n,o=!0,a=!0)=>{if(typeof r=="string"&&r.includes(".")){const[l,c]=r.split("."),u=parseInt(c,10);if(l in e.colors&&u>=0&&u<10)return e.colors[l][typeof n=="number"&&!a?n:u]}const i=typeof n=="number"?n:t();return r in e.colors?e.colors[r][i]:o?e.colors[e.primaryColor][i]:r}}function b$(e){let t="";for(let r=1;r<e.length-1;r+=1)t+=`${e[r]} ${r/(e.length-1)*100}%, `;return`${e[0]} 0%, ${t}${e[e.length-1]} 100%`}function wN(e,...t){return`linear-gradient(${e}deg, ${b$(t)})`}function _N(...e){return`radial-gradient(circle, ${b$(e)})`}function x$(e){const t=jv(e),r=Ls(e);return n=>{const o={from:(n==null?void 0:n.from)||e.defaultGradient.from,to:(n==null?void 0:n.to)||e.defaultGradient.to,deg:(n==null?void 0:n.deg)||e.defaultGradient.deg};return`linear-gradient(${o.deg}deg, ${t(o.from,r(),!1)} 0%, ${t(o.to,r(),!1)} 100%)`}}function E$(e){return t=>{if(typeof t=="number")return`${t/16}${e}`;if(typeof t=="string"){const r=t.replace("px","");if(!Number.isNaN(Number(r)))return`${Number(r)/16}${e}`}return t}}const S=E$("rem"),Dr=E$("em");function N({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?Dr(e):S(e):e||t.md}function wn(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function bN(e){return t=>`@media (min-width: ${Dr(wn(N({size:t,sizes:e.breakpoints})))})`}function xN(e){return t=>`@media (max-width: ${Dr(wn(N({size:t,sizes:e.breakpoints}))-1)})`}function EN(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function SN(e){let t=e.replace("#","");if(t.length===3){const i=t.split("");t=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}const r=parseInt(t,16),n=r>>16&255,o=r>>8&255,a=r&255;return{r:n,g:o,b:a,a:1}}function PN(e){const[t,r,n,o]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:t,g:r,b:n,a:o||1}}function Rv(e){return EN(e)?SN(e):e.startsWith("rgb")?PN(e):{r:0,g:0,b:0,a:1}}function vi(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r,g:n,b:o}=Rv(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function $N(e=0){return{position:"absolute",top:S(e),right:S(e),left:S(e),bottom:S(e)}}function ON(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a}=Rv(e),i=1-t,l=c=>Math.round(c*i);return`rgba(${l(r)}, ${l(n)}, ${l(o)}, ${a})`}function CN(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a}=Rv(e),i=l=>Math.round(l+(255-l)*t);return`rgba(${i(r)}, ${i(n)}, ${i(o)}, ${a})`}function kN(e){return t=>{if(typeof t=="number")return S(t);const r=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||r}}function jN(e,t){if(typeof e=="string"&&e.includes(".")){const[r,n]=e.split("."),o=parseInt(n,10);if(r in t.colors&&o>=0&&o<10)return{isSplittedColor:!0,key:r,shade:o}}return{isSplittedColor:!1}}function RN(e){const t=jv(e),r=Ls(e),n=x$(e);return({variant:o,color:a,gradient:i,primaryFallback:l})=>{const c=jN(a,e);switch(o){case"light":return{border:"transparent",background:vi(t(a,e.colorScheme==="dark"?8:0,l,!1),e.colorScheme==="dark"?.2:1),color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:r("light")),hover:vi(t(a,e.colorScheme==="dark"?7:1,l,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:r("light")),hover:vi(t(a,e.colorScheme==="dark"?8:0,l,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:t(a,e.colorScheme==="dark"?5:r("light")),background:"transparent",color:t(a,e.colorScheme==="dark"?5:r("light")),hover:e.colorScheme==="dark"?vi(t(a,5,l,!1),.05):vi(t(a,0,l,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(a,r()),hover:null};case"transparent":return{border:"transparent",color:a==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:t(a,e.colorScheme==="dark"?2:r("light")),background:"transparent",hover:null};case"gradient":return{background:n(i),color:e.white,border:"transparent",hover:null};default:{const u=r(),d=c.isSplittedColor?c.shade:u,m=c.isSplittedColor?c.key:a;return{border:"transparent",background:t(m,d,l),color:e.white,hover:t(m,d===9?8:d+1)}}}}}function TN(e){return t=>{const r=Ls(e)(t);return e.colors[e.primaryColor][r]}}function IN(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function DN(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function NN(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const Tt={fontStyles:mN,themeColor:jv,focusStyles:yN,linearGradient:wN,radialGradient:_N,smallerThan:xN,largerThan:bN,rgba:vi,cover:$N,darken:ON,lighten:CN,radius:kN,variant:RN,primaryShade:Ls,hover:IN,gradient:x$,primaryColor:TN,placeholderStyles:DN,dimmed:NN};var AN=Object.defineProperty,MN=Object.defineProperties,zN=Object.getOwnPropertyDescriptors,o1=Object.getOwnPropertySymbols,LN=Object.prototype.hasOwnProperty,FN=Object.prototype.propertyIsEnumerable,a1=(e,t,r)=>t in e?AN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VN=(e,t)=>{for(var r in t||(t={}))LN.call(t,r)&&a1(e,r,t[r]);if(o1)for(var r of o1(t))FN.call(t,r)&&a1(e,r,t[r]);return e},BN=(e,t)=>MN(e,zN(t));function S$(e){return BN(VN({},e),{fn:{fontStyles:Tt.fontStyles(e),themeColor:Tt.themeColor(e),focusStyles:Tt.focusStyles(e),largerThan:Tt.largerThan(e),smallerThan:Tt.smallerThan(e),radialGradient:Tt.radialGradient,linearGradient:Tt.linearGradient,gradient:Tt.gradient(e),rgba:Tt.rgba,cover:Tt.cover,lighten:Tt.lighten,darken:Tt.darken,primaryShade:Tt.primaryShade(e),radius:Tt.radius(e),variant:Tt.variant(e),hover:Tt.hover,primaryColor:Tt.primaryColor(e),placeholderStyles:Tt.placeholderStyles(e),dimmed:Tt.dimmed(e)}})}const P$=["xs","sm","md","lg","xl"],UN={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:pN,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},Tv=S$(UN);function WN(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]}function HN(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var qN=function(){function e(r){var n=this;this._insertTag=function(o){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,a),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(HN(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=WN(o);try{a.insertRule(n,a.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Jt="-ms-",Lu="-moz-",De="-webkit-",$$="comm",Iv="rule",Dv="decl",QN="@import",O$="@keyframes",GN="@layer",KN=Math.abs,Ip=String.fromCharCode,YN=Object.assign;function XN(e,t){return Ut(e,0)^45?(((t<<2^Ut(e,0))<<2^Ut(e,1))<<2^Ut(e,2))<<2^Ut(e,3):0}function C$(e){return e.trim()}function JN(e,t){return(e=t.exec(e))?e[0]:e}function Ae(e,t,r){return e.replace(t,r)}function Hh(e,t){return e.indexOf(t)}function Ut(e,t){return e.charCodeAt(t)|0}function fs(e,t,r){return e.slice(t,r)}function kn(e){return e.length}function Nv(e){return e.length}function xc(e,t){return t.push(e),e}function ZN(e,t){return e.map(t).join("")}var Dp=1,Qi=1,k$=0,yr=0,Ct=0,ul="";function Np(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Dp,column:Qi,length:i,return:""}}function _l(e,t){return YN(Np("",null,null,"",null,null,0),e,{length:-e.length},t)}function e4(){return Ct}function t4(){return Ct=yr>0?Ut(ul,--yr):0,Qi--,Ct===10&&(Qi=1,Dp--),Ct}function Nr(){return Ct=yr<k$?Ut(ul,yr++):0,Qi++,Ct===10&&(Qi=1,Dp++),Ct}function Nn(){return Ut(ul,yr)}function yu(){return yr}function Fs(e,t){return fs(ul,e,t)}function ps(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function j$(e){return Dp=Qi=1,k$=kn(ul=e),yr=0,[]}function R$(e){return ul="",e}function wu(e){return C$(Fs(yr-1,qh(e===91?e+2:e===40?e+1:e)))}function r4(e){for(;(Ct=Nn())&&Ct<33;)Nr();return ps(e)>2||ps(Ct)>3?"":" "}function n4(e,t){for(;--t&&Nr()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return Fs(e,yu()+(t<6&&Nn()==32&&Nr()==32))}function qh(e){for(;Nr();)switch(Ct){case e:return yr;case 34:case 39:e!==34&&e!==39&&qh(Ct);break;case 40:e===41&&qh(e);break;case 92:Nr();break}return yr}function o4(e,t){for(;Nr()&&e+Ct!==47+10;)if(e+Ct===42+42&&Nn()===47)break;return"/*"+Fs(t,yr-1)+"*"+Ip(e===47?e:Nr())}function a4(e){for(;!ps(Nn());)Nr();return Fs(e,yr)}function i4(e){return R$(_u("",null,null,null,[""],e=j$(e),0,[0],e))}function _u(e,t,r,n,o,a,i,l,c){for(var u=0,d=0,m=i,h=0,g=0,y=0,_=1,E=1,w=1,v=0,b="",x=o,P=a,O=n,$=b;E;)switch(y=v,v=Nr()){case 40:if(y!=108&&Ut($,m-1)==58){Hh($+=Ae(wu(v),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:$+=wu(v);break;case 9:case 10:case 13:case 32:$+=r4(y);break;case 92:$+=n4(yu()-1,7);continue;case 47:switch(Nn()){case 42:case 47:xc(l4(o4(Nr(),yu()),t,r),c);break;default:$+="/"}break;case 123*_:l[u++]=kn($)*w;case 125*_:case 59:case 0:switch(v){case 0:case 125:E=0;case 59+d:w==-1&&($=Ae($,/\f/g,"")),g>0&&kn($)-m&&xc(g>32?l1($+";",n,r,m-1):l1(Ae($," ","")+";",n,r,m-2),c);break;case 59:$+=";";default:if(xc(O=i1($,t,r,u,d,o,l,b,x=[],P=[],m),a),v===123)if(d===0)_u($,t,O,O,x,a,m,l,P);else switch(h===99&&Ut($,3)===110?100:h){case 100:case 108:case 109:case 115:_u(e,O,O,n&&xc(i1(e,O,O,0,0,o,l,b,o,x=[],m),P),o,P,m,l,n?x:P);break;default:_u($,O,O,O,[""],P,0,l,P)}}u=d=g=0,_=w=1,b=$="",m=i;break;case 58:m=1+kn($),g=y;default:if(_<1){if(v==123)--_;else if(v==125&&_++==0&&t4()==125)continue}switch($+=Ip(v),v*_){case 38:w=d>0?1:($+="\f",-1);break;case 44:l[u++]=(kn($)-1)*w,w=1;break;case 64:Nn()===45&&($+=wu(Nr())),h=Nn(),d=m=kn(b=$+=a4(yu())),v++;break;case 45:y===45&&kn($)==2&&(_=0)}}return a}function i1(e,t,r,n,o,a,i,l,c,u,d){for(var m=o-1,h=o===0?a:[""],g=Nv(h),y=0,_=0,E=0;y<n;++y)for(var w=0,v=fs(e,m+1,m=KN(_=i[y])),b=e;w<g;++w)(b=C$(_>0?h[w]+" "+v:Ae(v,/&\f/g,h[w])))&&(c[E++]=b);return Np(e,t,r,o===0?Iv:l,c,u,d)}function l4(e,t,r){return Np(e,t,r,$$,Ip(e4()),fs(e,2,-2),0)}function l1(e,t,r,n){return Np(e,t,r,Dv,fs(e,0,n),fs(e,n+1,-1),n)}function Ni(e,t){for(var r="",n=Nv(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function s4(e,t,r,n){switch(e.type){case GN:if(e.children.length)break;case QN:case Dv:return e.return=e.return||e.value;case $$:return"";case O$:return e.return=e.value+"{"+Ni(e.children,n)+"}";case Iv:e.value=e.props.join(",")}return kn(r=Ni(e.children,n))?e.return=e.value+"{"+r+"}":""}function c4(e){var t=Nv(e);return function(r,n,o,a){for(var i="",l=0;l<t;l++)i+=e[l](r,n,o,a)||"";return i}}function u4(e){return function(t){t.root||(t=t.return)&&e(t)}}var s1=function(t){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var o=t(n);return r.set(n,o),o}};function d4(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var f4=function(t,r,n){for(var o=0,a=0;o=a,a=Nn(),o===38&&a===12&&(r[n]=1),!ps(a);)Nr();return Fs(t,yr)},p4=function(t,r){var n=-1,o=44;do switch(ps(o)){case 0:o===38&&Nn()===12&&(r[n]=1),t[n]+=f4(yr-1,r,n);break;case 2:t[n]+=wu(o);break;case 4:if(o===44){t[++n]=Nn()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Ip(o)}while(o=Nr());return t},m4=function(t,r){return R$(p4(j$(t),r))},c1=new WeakMap,h4=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!c1.get(n))&&!o){c1.set(t,!0);for(var a=[],i=m4(r,a),l=n.props,c=0,u=0;c<i.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=a[c]?i[c].replace(/&\f/g,l[d]):l[d]+" "+i[c]}}},g4=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function T$(e,t){switch(XN(e,t)){case 5103:return De+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return De+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return De+e+Lu+e+Jt+e+e;case 6828:case 4268:return De+e+Jt+e+e;case 6165:return De+e+Jt+"flex-"+e+e;case 5187:return De+e+Ae(e,/(\w+).+(:[^]+)/,De+"box-$1$2"+Jt+"flex-$1$2")+e;case 5443:return De+e+Jt+"flex-item-"+Ae(e,/flex-|-self/,"")+e;case 4675:return De+e+Jt+"flex-line-pack"+Ae(e,/align-content|flex-|-self/,"")+e;case 5548:return De+e+Jt+Ae(e,"shrink","negative")+e;case 5292:return De+e+Jt+Ae(e,"basis","preferred-size")+e;case 6060:return De+"box-"+Ae(e,"-grow","")+De+e+Jt+Ae(e,"grow","positive")+e;case 4554:return De+Ae(e,/([^-])(transform)/g,"$1"+De+"$2")+e;case 6187:return Ae(Ae(Ae(e,/(zoom-|grab)/,De+"$1"),/(image-set)/,De+"$1"),e,"")+e;case 5495:case 3959:return Ae(e,/(image-set\([^]*)/,De+"$1$`$1");case 4968:return Ae(Ae(e,/(.+:)(flex-)?(.*)/,De+"box-pack:$3"+Jt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+De+e+e;case 4095:case 3583:case 4068:case 2532:return Ae(e,/(.+)-inline(.+)/,De+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(kn(e)-1-t>6)switch(Ut(e,t+1)){case 109:if(Ut(e,t+4)!==45)break;case 102:return Ae(e,/(.+:)(.+)-([^]+)/,"$1"+De+"$2-$3$1"+Lu+(Ut(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Hh(e,"stretch")?T$(Ae(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ut(e,t+1)!==115)break;case 6444:switch(Ut(e,kn(e)-3-(~Hh(e,"!important")&&10))){case 107:return Ae(e,":",":"+De)+e;case 101:return Ae(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+De+(Ut(e,14)===45?"inline-":"")+"box$3$1"+De+"$2$3$1"+Jt+"$2box$3")+e}break;case 5936:switch(Ut(e,t+11)){case 114:return De+e+Jt+Ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return De+e+Jt+Ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return De+e+Jt+Ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return De+e+Jt+e+e}return e}var v4=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Dv:t.return=T$(t.value,t.length);break;case O$:return Ni([_l(t,{value:Ae(t.value,"@","@"+De)})],o);case Iv:if(t.length)return ZN(t.props,function(a){switch(JN(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ni([_l(t,{props:[Ae(a,/:(read-\w+)/,":"+Lu+"$1")]})],o);case"::placeholder":return Ni([_l(t,{props:[Ae(a,/:(plac\w+)/,":"+De+"input-$1")]}),_l(t,{props:[Ae(a,/:(plac\w+)/,":"+Lu+"$1")]}),_l(t,{props:[Ae(a,/:(plac\w+)/,Jt+"input-$1")]})],o)}return""})}},y4=[v4],I$=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(_){var E=_.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var o=t.stylisPlugins||y4,a={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(_){for(var E=_.getAttribute("data-emotion").split(" "),w=1;w<E.length;w++)a[E[w]]=!0;l.push(_)});var c,u=[h4,g4];{var d,m=[s4,u4(function(_){d.insert(_)})],h=c4(u.concat(o,m)),g=function(E){return Ni(i4(E),h)};c=function(E,w,v,b){d=v,g(E?E+"{"+w.styles+"}":w.styles),b&&(y.inserted[w.name]=!0)}}var y={key:r,sheet:new qN({key:r,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:c};return y.sheet.hydrate(l),y};function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ye.apply(this,arguments)}var D$={exports:{}},Fe={};/** @license React v16.13.1
58
- * react-is.production.min.js
59
- *
60
- * Copyright (c) Facebook, Inc. and its affiliates.
61
- *
62
- * This source code is licensed under the MIT license found in the
63
- * LICENSE file in the root directory of this source tree.
64
- */var Ft=typeof Symbol=="function"&&Symbol.for,Av=Ft?Symbol.for("react.element"):60103,Mv=Ft?Symbol.for("react.portal"):60106,Ap=Ft?Symbol.for("react.fragment"):60107,Mp=Ft?Symbol.for("react.strict_mode"):60108,zp=Ft?Symbol.for("react.profiler"):60114,Lp=Ft?Symbol.for("react.provider"):60109,Fp=Ft?Symbol.for("react.context"):60110,zv=Ft?Symbol.for("react.async_mode"):60111,Vp=Ft?Symbol.for("react.concurrent_mode"):60111,Bp=Ft?Symbol.for("react.forward_ref"):60112,Up=Ft?Symbol.for("react.suspense"):60113,w4=Ft?Symbol.for("react.suspense_list"):60120,Wp=Ft?Symbol.for("react.memo"):60115,Hp=Ft?Symbol.for("react.lazy"):60116,_4=Ft?Symbol.for("react.block"):60121,b4=Ft?Symbol.for("react.fundamental"):60117,x4=Ft?Symbol.for("react.responder"):60118,E4=Ft?Symbol.for("react.scope"):60119;function Lr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Av:switch(e=e.type,e){case zv:case Vp:case Ap:case zp:case Mp:case Up:return e;default:switch(e=e&&e.$$typeof,e){case Fp:case Bp:case Hp:case Wp:case Lp:return e;default:return t}}case Mv:return t}}}function N$(e){return Lr(e)===Vp}Fe.AsyncMode=zv;Fe.ConcurrentMode=Vp;Fe.ContextConsumer=Fp;Fe.ContextProvider=Lp;Fe.Element=Av;Fe.ForwardRef=Bp;Fe.Fragment=Ap;Fe.Lazy=Hp;Fe.Memo=Wp;Fe.Portal=Mv;Fe.Profiler=zp;Fe.StrictMode=Mp;Fe.Suspense=Up;Fe.isAsyncMode=function(e){return N$(e)||Lr(e)===zv};Fe.isConcurrentMode=N$;Fe.isContextConsumer=function(e){return Lr(e)===Fp};Fe.isContextProvider=function(e){return Lr(e)===Lp};Fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Av};Fe.isForwardRef=function(e){return Lr(e)===Bp};Fe.isFragment=function(e){return Lr(e)===Ap};Fe.isLazy=function(e){return Lr(e)===Hp};Fe.isMemo=function(e){return Lr(e)===Wp};Fe.isPortal=function(e){return Lr(e)===Mv};Fe.isProfiler=function(e){return Lr(e)===zp};Fe.isStrictMode=function(e){return Lr(e)===Mp};Fe.isSuspense=function(e){return Lr(e)===Up};Fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ap||e===Vp||e===zp||e===Mp||e===Up||e===w4||typeof e=="object"&&e!==null&&(e.$$typeof===Hp||e.$$typeof===Wp||e.$$typeof===Lp||e.$$typeof===Fp||e.$$typeof===Bp||e.$$typeof===b4||e.$$typeof===x4||e.$$typeof===E4||e.$$typeof===_4)};Fe.typeOf=Lr;D$.exports=Fe;var S4=D$.exports,A$=S4,P4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},M$={};M$[A$.ForwardRef]=P4;M$[A$.Memo]=$4;var O4=!0;function C4(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var k4=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||O4===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},z$=function(t,r,n){k4(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+o:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function j4(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var R4={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},T4=/[A-Z]|^ms/g,I4=/_EMO_([^_]+?)_([^]*?)_EMO_/g,L$=function(t){return t.charCodeAt(1)===45},u1=function(t){return t!=null&&typeof t!="boolean"},Um=d4(function(e){return L$(e)?e:e.replace(T4,"-$&").toLowerCase()}),d1=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(I4,function(n,o,a){return jn={name:o,styles:a,next:jn},o})}return R4[t]!==1&&!L$(t)&&typeof r=="number"&&r!==0?r+"px":r};function ms(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return jn={name:r.name,styles:r.styles,next:jn},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)jn={name:n.name,styles:n.styles,next:jn},n=n.next;var o=r.styles+";";return o}return D4(e,t,r)}case"function":{if(e!==void 0){var a=jn,i=r(e);return jn=a,ms(e,t,i)}break}}if(t==null)return r;var l=t[r];return l!==void 0?l:r}function D4(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=ms(e,t,r[o])+";";else for(var a in r){var i=r[a];if(typeof i!="object")t!=null&&t[i]!==void 0?n+=a+"{"+t[i]+"}":u1(i)&&(n+=Um(a)+":"+d1(a,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)u1(i[l])&&(n+=Um(a)+":"+d1(a,i[l])+";");else{var c=ms(e,t,i);switch(a){case"animation":case"animationName":{n+=Um(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var f1=/label:\s*([^\s;\n{]+)\s*(;|$)/g,jn,Lv=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,a="";jn=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,a+=ms(n,r,i)):a+=i[0];for(var l=1;l<t.length;l++)a+=ms(n,r,t[l]),o&&(a+=i[l]);f1.lastIndex=0;for(var c="",u;(u=f1.exec(a))!==null;)c+="-"+u[1];var d=j4(a)+c;return{name:d,styles:a,next:jn}},N4=Mu["useInsertionEffect"]?Mu["useInsertionEffect"]:!1,p1=N4||f.useLayoutEffect,F$=f.createContext(typeof HTMLElement<"u"?I$({key:"css"}):null);F$.Provider;var A4=function(t){return f.forwardRef(function(r,n){var o=f.useContext(F$);return t(r,o,n)})},Qh=f.createContext({}),M4=function(t,r){if(typeof r=="function"){var n=r(t);return n}return Ye({},t,r)},z4=s1(function(e){return s1(function(t){return M4(e,t)})}),L4=function(t){var r=f.useContext(Qh);return t.theme!==r&&(r=z4(r)(t.theme)),f.createElement(Qh.Provider,{value:r},t.children)},Vs=A4(function(e,t){var r=e.styles,n=Lv([r],void 0,f.useContext(Qh)),o=f.useRef();return p1(function(){var a=t.key+"-global",i=new t.sheet.constructor({key:a,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),l=!1,c=document.querySelector('style[data-emotion="'+a+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),c!==null&&(l=!0,c.setAttribute("data-emotion",a),i.hydrate([c])),o.current=[i,l],function(){i.flush()}},[t]),p1(function(){var a=o.current,i=a[0],l=a[1];if(l){a[1]=!1;return}if(n.next!==void 0&&z$(t,n.next,!0),i.tags.length){var c=i.tags[i.tags.length-1].nextElementSibling;i.before=c,i.flush()}t.insert("",n,i,!1)},[t,n.name]),null});function F4(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Lv(t)}var V4=Object.defineProperty,B4=Object.defineProperties,U4=Object.getOwnPropertyDescriptors,m1=Object.getOwnPropertySymbols,W4=Object.prototype.hasOwnProperty,H4=Object.prototype.propertyIsEnumerable,h1=(e,t,r)=>t in e?V4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q4=(e,t)=>{for(var r in t||(t={}))W4.call(t,r)&&h1(e,r,t[r]);if(m1)for(var r of m1(t))H4.call(t,r)&&h1(e,r,t[r]);return e},Q4=(e,t)=>B4(e,U4(t));function G4({theme:e}){return s.createElement(Vs,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:Q4(q4({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function bl(e,t,r,n=S){Object.keys(t).forEach(o=>{e[`--mantine-${r}-${o}`]=n(t[o])})}function K4({theme:e}){const t={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};bl(t,e.shadows,"shadow"),bl(t,e.fontSizes,"font-size"),bl(t,e.radius,"radius"),bl(t,e.spacing,"spacing"),bl(t,e.breakpoints,"breakpoints",Dr),Object.keys(e.colors).forEach(n=>{e.colors[n].forEach((o,a)=>{t[`--mantine-color-${n}-${a}`]=o})});const r=e.headings.sizes;return Object.keys(r).forEach(n=>{t[`--mantine-${n}-font-size`]=r[n].fontSize,t[`--mantine-${n}-line-height`]=`${r[n].lineHeight}`}),s.createElement(Vs,{styles:{":root":t}})}var Y4=Object.defineProperty,X4=Object.defineProperties,J4=Object.getOwnPropertyDescriptors,g1=Object.getOwnPropertySymbols,Z4=Object.prototype.hasOwnProperty,eA=Object.prototype.propertyIsEnumerable,v1=(e,t,r)=>t in e?Y4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,En=(e,t)=>{for(var r in t||(t={}))Z4.call(t,r)&&v1(e,r,t[r]);if(g1)for(var r of g1(t))eA.call(t,r)&&v1(e,r,t[r]);return e},Wm=(e,t)=>X4(e,J4(t));function tA(e,t){var r;if(!t)return e;const n=Object.keys(e).reduce((o,a)=>{if(a==="headings"&&t.headings){const i=t.headings.sizes?Object.keys(e.headings.sizes).reduce((l,c)=>(l[c]=En(En({},e.headings.sizes[c]),t.headings.sizes[c]),l),{}):e.headings.sizes;return Wm(En({},o),{headings:Wm(En(En({},e.headings),t.headings),{sizes:i})})}if(a==="breakpoints"&&t.breakpoints){const i=En(En({},e.breakpoints),t.breakpoints);return Wm(En({},o),{breakpoints:Object.fromEntries(Object.entries(i).sort((l,c)=>wn(l[1])-wn(c[1])))})}return o[a]=typeof t[a]=="object"?En(En({},e[a]),t[a]):typeof t[a]=="number"||typeof t[a]=="boolean"||typeof t[a]=="function"?t[a]:t[a]||e[a],o},{});if(t!=null&&t.fontFamily&&!((r=t==null?void 0:t.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=t.fontFamily),!(n.primaryColor in n.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return n}function rA(e,t){return S$(tA(e,t))}function V$(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const nA={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${S(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function oA(){return s.createElement(Vs,{styles:nA})}var aA=Object.defineProperty,y1=Object.getOwnPropertySymbols,iA=Object.prototype.hasOwnProperty,lA=Object.prototype.propertyIsEnumerable,w1=(e,t,r)=>t in e?aA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jl=(e,t)=>{for(var r in t||(t={}))iA.call(t,r)&&w1(e,r,t[r]);if(y1)for(var r of y1(t))lA.call(t,r)&&w1(e,r,t[r]);return e};const Fu=f.createContext({theme:Tv});function nr(){var e;return((e=f.useContext(Fu))==null?void 0:e.theme)||Tv}function sA(e){const t=nr(),r=n=>{var o,a,i,l;return{styles:((o=t.components[n])==null?void 0:o.styles)||{},classNames:((a=t.components[n])==null?void 0:a.classNames)||{},variants:(i=t.components[n])==null?void 0:i.variants,sizes:(l=t.components[n])==null?void 0:l.sizes}};return Array.isArray(e)?e.map(r):[r(e)]}function B$(){var e;return(e=f.useContext(Fu))==null?void 0:e.emotionCache}function H(e,t,r){var n;const o=nr(),a=(n=o.components[e])==null?void 0:n.defaultProps,i=typeof a=="function"?a(o):a;return Jl(Jl(Jl({},t),i),V$(r))}function U$({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:a=!1,children:i}){const l=f.useContext(Fu),c=rA(Tv,a?Jl(Jl({},l.theme),e):e);return s.createElement(L4,{theme:c},s.createElement(Fu.Provider,{value:{theme:c,emotionCache:t}},r&&s.createElement(oA,null),n&&s.createElement(G4,{theme:c}),o&&s.createElement(K4,{theme:c}),typeof c.globalStyles=="function"&&s.createElement(Vs,{styles:c.globalStyles(c)}),i))}U$.displayName="@mantine/core/MantineProvider";const cA={app:100,modal:200,popover:300,overlay:400,max:9999};function go(e){return cA[e]}function uA(e,t){const r=f.useRef();return(!r.current||t.length!==r.current.prevDeps.length||r.current.prevDeps.map((n,o)=>n===t[o]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}const dA=I$({key:"mantine",prepend:!0});function fA(){return B$()||dA}var pA=Object.defineProperty,_1=Object.getOwnPropertySymbols,mA=Object.prototype.hasOwnProperty,hA=Object.prototype.propertyIsEnumerable,b1=(e,t,r)=>t in e?pA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gA=(e,t)=>{for(var r in t||(t={}))mA.call(t,r)&&b1(e,r,t[r]);if(_1)for(var r of _1(t))hA.call(t,r)&&b1(e,r,t[r]);return e};const Hm="ref";function vA(e){let t;if(e.length!==1)return{args:e,ref:t};const[r]=e;if(!(r instanceof Object))return{args:e,ref:t};if(!(Hm in r))return{args:e,ref:t};t=r[Hm];const n=gA({},r);return delete n[Hm],{args:[n],ref:t}}const{cssFactory:yA}=(()=>{function e(r,n,o){const a=[],i=C4(r,a,o);return a.length<2?o:i+n(a)}function t(r){const{cache:n}=r,o=(...i)=>{const{ref:l,args:c}=vA(i),u=Lv(c,n.registered);return z$(n,u,!1),`${n.key}-${u.name}${l===void 0?"":` ${l}`}`};return{css:o,cx:(...i)=>e(n.registered,o,_$(i))}}return{cssFactory:t}})();function W$(){const e=fA();return uA(()=>yA({cache:e}),[e])}function wA({cx:e,classes:t,context:r,classNames:n,name:o,cache:a}){const i=r.reduce((l,c)=>(Object.keys(c.classNames).forEach(u=>{typeof l[u]!="string"?l[u]=`${c.classNames[u]}`:l[u]=`${l[u]} ${c.classNames[u]}`}),l),{});return Object.keys(t).reduce((l,c)=>(l[c]=e(t[c],i[c],n!=null&&n[c],Array.isArray(o)?o.filter(Boolean).map(u=>`${(a==null?void 0:a.key)||"mantine"}-${u}-${c}`).join(" "):o?`${(a==null?void 0:a.key)||"mantine"}-${o}-${c}`:null),l),{})}var _A=Object.defineProperty,x1=Object.getOwnPropertySymbols,bA=Object.prototype.hasOwnProperty,xA=Object.prototype.propertyIsEnumerable,E1=(e,t,r)=>t in e?_A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qm=(e,t)=>{for(var r in t||(t={}))bA.call(t,r)&&E1(e,r,t[r]);if(x1)for(var r of x1(t))xA.call(t,r)&&E1(e,r,t[r]);return e};function Gh(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=qm(qm({},e[r]),t[r]):e[r]=qm({},t[r])}),e}function S1(e,t,r,n){const o=a=>typeof a=="function"?a(t,r||{},n):a||{};return Array.isArray(e)?e.map(a=>o(a.styles)).reduce((a,i)=>Gh(a,i),{}):o(e)}function EA({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((a,i)=>(i.variants&&n in i.variants&&Gh(a,i.variants[n](t,r,{variant:n,size:o})),i.sizes&&o in i.sizes&&Gh(a,i.sizes[o](t,r,{variant:n,size:o})),a),{})}function W(e){const t=typeof e=="function"?e:()=>e;function r(n,o){const a=nr(),i=sA(o==null?void 0:o.name),l=B$(),c={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:u,cx:d}=W$(),m=t(a,n,c),h=S1(o==null?void 0:o.styles,a,n,c),g=S1(i,a,n,c),y=EA({ctx:i,theme:a,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),_=Object.fromEntries(Object.keys(m).map(E=>{const w=d({[u(m[E])]:!(o!=null&&o.unstyled)},u(y[E]),u(g[E]),u(h[E]));return[E,w]}));return{classes:wA({cx:d,classes:_,context:i,classNames:o==null?void 0:o.classNames,name:o==null?void 0:o.name,cache:l}),cx:d,theme:a}}return r}function Zt(e){return`___ref-${e||""}`}function H$({styles:e}){const t=nr();return s.createElement(Vs,{styles:F4(typeof e=="function"?e(t):e)})}var SA=Object.defineProperty,PA=Object.defineProperties,$A=Object.getOwnPropertyDescriptors,P1=Object.getOwnPropertySymbols,OA=Object.prototype.hasOwnProperty,CA=Object.prototype.propertyIsEnumerable,$1=(e,t,r)=>t in e?SA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xl=(e,t)=>{for(var r in t||(t={}))OA.call(t,r)&&$1(e,r,t[r]);if(P1)for(var r of P1(t))CA.call(t,r)&&$1(e,r,t[r]);return e},El=(e,t)=>PA(e,$A(t));const Sl={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${S(10)})`},transitionProperty:"transform, opacity"},Ec={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${S(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${S(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${S(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${S(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:El(xl({},Sl),{common:{transformOrigin:"center center"}}),"pop-bottom-left":El(xl({},Sl),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":El(xl({},Sl),{common:{transformOrigin:"bottom right"}}),"pop-top-left":El(xl({},Sl),{common:{transformOrigin:"top left"}}),"pop-top-right":El(xl({},Sl),{common:{transformOrigin:"top right"}})},O1=["mousedown","touchstart"];function kA(e,t,r){const n=f.useRef();return f.useEffect(()=>{const o=a=>{const{target:i}=a??{};if(Array.isArray(r)){const l=(i==null?void 0:i.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(i)&&i.tagName!=="HTML";r.every(u=>!!u&&!a.composedPath().includes(u))&&!l&&e()}else n.current&&!n.current.contains(i)&&e()};return(t||O1).forEach(a=>document.addEventListener(a,o)),()=>{(t||O1).forEach(a=>document.removeEventListener(a,o))}},[n,e,r]),n}function jA(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function RA(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function TA(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=f.useState(r?t:RA(e,t)),a=f.useRef();return f.useEffect(()=>{if("matchMedia"in window)return a.current=window.matchMedia(e),o(a.current.matches),jA(a.current,i=>o(i.matches))},[e]),n}const q$=typeof document<"u"?f.useLayoutEffect:f.useEffect;function mn(e,t){const r=f.useRef(!1);f.useEffect(()=>()=>{r.current=!1},[]),f.useEffect(()=>{if(r.current)return e();r.current=!0},t)}function Q$({opened:e,shouldReturnFocus:t=!0}){const r=f.useRef(),n=()=>{var o;r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&((o=r.current)==null||o.focus({preventScroll:!0}))};return mn(()=>{let o=-1;const a=i=>{i.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",a),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",a)}},[e,t]),n}const IA=/input|select|textarea|button|object/,G$="a, input, select, textarea, button, object, [tabindex]";function DA(e){return e.style.display==="none"}function NA(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(DA(r))return!1;r=r.parentNode}return!0}function K$(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Kh(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(K$(e));return(IA.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&NA(e)}function Y$(e){const t=K$(e);return(Number.isNaN(t)||t>=0)&&Kh(e)}function AA(e){return Array.from(e.querySelectorAll(G$)).filter(Y$)}function MA(e,t){const r=AA(e);if(!r.length){t.preventDefault();return}const n=r[t.shiftKey?0:r.length-1],o=e.getRootNode();if(!(n===o.activeElement||e===o.activeElement))return;t.preventDefault();const i=r[t.shiftKey?r.length-1:0];i&&i.focus()}function qp(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function zA(e,t="body > :not(script)"){const r=qp(),n=Array.from(document.querySelectorAll(t)).map(o=>{var a;if((a=o==null?void 0:o.shadowRoot)!=null&&a.contains(e)||o.contains(e))return;const i=o.getAttribute("aria-hidden"),l=o.getAttribute("data-hidden"),c=o.getAttribute("data-focus-id");return o.setAttribute("data-focus-id",r),i===null||i==="false"?o.setAttribute("aria-hidden","true"):!l&&!c&&o.setAttribute("data-hidden",i),{node:o,ariaHidden:l||null}});return()=>{n.forEach(o=>{!o||r!==o.node.getAttribute("data-focus-id")||(o.ariaHidden===null?o.node.removeAttribute("aria-hidden"):o.node.setAttribute("aria-hidden",o.ariaHidden),o.node.removeAttribute("data-focus-id"),o.node.removeAttribute("data-hidden"))})}}function LA(e=!0){const t=f.useRef(),r=f.useRef(null),n=a=>{let i=a.querySelector("[data-autofocus]");if(!i){const l=Array.from(a.querySelectorAll(G$));i=l.find(Y$)||l.find(Kh)||null,!i&&Kh(a)&&(i=a)}i&&i.focus({preventScroll:!0})},o=f.useCallback(a=>{if(e){if(a===null){r.current&&(r.current(),r.current=null);return}r.current=zA(a),t.current!==a&&(a?(setTimeout(()=>{a.getRootNode()&&n(a)}),t.current=a):t.current=null)}},[e]);return f.useEffect(()=>{if(!e)return;t.current&&setTimeout(()=>n(t.current));const a=i=>{i.key==="Tab"&&t.current&&MA(t.current,i)};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),r.current&&r.current()}},[e]),o}const FA=e=>(e+1)%1e6;function VA(){const[,e]=f.useReducer(FA,0);return e}const BA=s["useId".toString()]||(()=>{});function UA(){const e=BA();return e?`mantine-${e.replace(/:/g,"")}`:""}function Fr(e){const t=UA(),[r,n]=f.useState(t);return q$(()=>{n(qp())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function Yh(e,t,r){f.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function X$(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function WA(...e){return t=>{e.forEach(r=>X$(r,t))}}function Qp(...e){return f.useCallback(WA(...e),e)}function wr({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){const[o,a]=f.useState(t!==void 0?t:r),i=l=>{a(l),n==null||n(l)};return e!==void 0?[e,n,!0]:[o,i,!1]}function ko(e,t){const r=t-e+1;return Array.from({length:r},(n,o)=>o+e)}const Sc="dots";function HA({total:e,siblings:t=1,boundaries:r=1,page:n,initialPage:o=1,onChange:a}){const i=Math.max(Math.trunc(e),0),[l,c]=wr({value:n,onChange:a,defaultValue:o,finalValue:o}),u=_=>{_<=0?c(1):_>i?c(i):c(_)},d=()=>u(l+1),m=()=>u(l-1),h=()=>u(1),g=()=>u(i);return{range:f.useMemo(()=>{if(t*2+3+r*2>=i)return ko(1,i);const E=Math.max(l-t,r),w=Math.min(l+t,i-r),v=E>r+2,b=w<i-(r+1);if(!v&&b){const x=t*2+r+2;return[...ko(1,x),Sc,...ko(i-(r-1),i)]}if(v&&!b){const x=r+1+2*t;return[...ko(1,r),Sc,...ko(i-x,i)]}return[...ko(1,r),Sc,...ko(E,w),Sc,...ko(i-r+1,i)]},[i,t,l]),active:l,setPage:u,next:d,previous:m,first:h,last:g}}function qA({initialValues:e=[],limit:t}){const[{state:r,queue:n},o]=f.useState({state:e.slice(0,t),queue:e.slice(t)});return{state:r,queue:n,add:(...c)=>o(u=>{const d=[...u.state,...u.queue,...c];return{state:d.slice(0,t),queue:d.slice(t)}}),update:c=>o(u=>{const d=c([...u.state,...u.queue]);return{state:d.slice(0,t),queue:d.slice(t)}}),cleanQueue:()=>o(c=>({state:c.state,queue:[]}))}}function Gp(e,t){return TA("(prefers-reduced-motion: reduce)",e,t)}const QA=e=>e<.5?2*e*e:-1+(4-2*e)*e,GA=({axis:e,target:t,parent:r,alignment:n,offset:o,isList:a})=>{if(!t||!r&&typeof document>"u")return 0;const i=!!r,c=(r||document.body).getBoundingClientRect(),u=t.getBoundingClientRect(),d=m=>u[m]-c[m];if(e==="y"){const m=d("top");if(m===0)return 0;if(n==="start"){const g=m-o;return g<=u.height*(a?0:1)||!a?g:0}const h=i?c.height:window.innerHeight;if(n==="end"){const g=m+o-h+u.height;return g>=-u.height*(a?0:1)||!a?g:0}return n==="center"?m-h/2+u.height/2:0}if(e==="x"){const m=d("left");if(m===0)return 0;if(n==="start"){const g=m-o;return g<=u.width||!a?g:0}const h=i?c.width:window.innerWidth;if(n==="end"){const g=m+o-h+u.width;return g>=-u.width||!a?g:0}return n==="center"?m-h/2+u.width/2:0}return 0},KA=({axis:e,parent:t})=>{if(!t&&typeof document>"u")return 0;const r=e==="y"?"scrollTop":"scrollLeft";if(t)return t[r];const{body:n,documentElement:o}=document;return n[r]+o[r]},YA=({axis:e,parent:t,distance:r})=>{if(!t&&typeof document>"u")return;const n=e==="y"?"scrollTop":"scrollLeft";if(t)t[n]=r;else{const{body:o,documentElement:a}=document;o[n]=r,a[n]=r}};function XA({duration:e=1250,axis:t="y",onScrollFinish:r,easing:n=QA,offset:o=0,cancelable:a=!0,isList:i=!1}={}){const l=f.useRef(0),c=f.useRef(0),u=f.useRef(!1),d=f.useRef(null),m=f.useRef(null),h=Gp(),g=()=>{l.current&&cancelAnimationFrame(l.current)},y=f.useCallback(({alignment:E="start"}={})=>{var w;u.current=!1,l.current&&g();const v=(w=KA({parent:d.current,axis:t}))!=null?w:0,b=GA({parent:d.current,target:m.current,axis:t,alignment:E,offset:o,isList:i})-(d.current?0:v);function x(){c.current===0&&(c.current=performance.now());const O=performance.now()-c.current,$=h||e===0?1:O/e,C=v+b*n($);YA({parent:d.current,axis:t,distance:C}),!u.current&&$<1?l.current=requestAnimationFrame(x):(typeof r=="function"&&r(),c.current=0,l.current=0,g())}x()},[t,e,n,i,o,r,h]),_=()=>{a&&(u.current=!0)};return Yh("wheel",_,{passive:!0}),Yh("touchmove",_,{passive:!0}),f.useEffect(()=>g,[]),{scrollableRef:d,targetRef:m,scrollIntoView:y,cancel:g}}function JA(e=!1,t){const{onOpen:r,onClose:n}=t||{},[o,a]=f.useState(e),i=f.useCallback(()=>{a(u=>u||(r==null||r(),!0))},[r]),l=f.useCallback(()=>{a(u=>u&&(n==null||n(),!1))},[n]),c=f.useCallback(()=>{o?l():i()},[l,i,o]);return[o,{open:i,close:l,toggle:c}]}function C1(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}var k1=Object.getOwnPropertySymbols,ZA=Object.prototype.hasOwnProperty,e6=Object.prototype.propertyIsEnumerable,t6=(e,t)=>{var r={};for(var n in e)ZA.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&k1)for(var n of k1(e))t.indexOf(n)<0&&e6.call(e,n)&&(r[n]=e[n]);return r};function Bn(e){const t=e,{m:r,mx:n,my:o,mt:a,mb:i,ml:l,mr:c,p:u,px:d,py:m,pt:h,pb:g,pl:y,pr:_,bg:E,c:w,opacity:v,ff:b,fz:x,fw:P,lts:O,ta:$,lh:C,fs:R,tt:j,td:k,w:T,miw:L,maw:U,h:V,mih:M,mah:Q,bgsz:A,bgp:z,bgr:q,bga:le,pos:ye,top:Re,left:me,bottom:qe,right:ze,inset:it,display:wt}=t,qt=t6(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:V$({m:r,mx:n,my:o,mt:a,mb:i,ml:l,mr:c,p:u,px:d,py:m,pt:h,pb:g,pl:y,pr:_,bg:E,c:w,opacity:v,ff:b,fz:x,fw:P,lts:O,ta:$,lh:C,fs:R,tt:j,td:k,w:T,miw:L,maw:U,h:V,mih:M,mah:Q,bgsz:A,bgp:z,bgr:q,bga:le,pos:ye,top:Re,left:me,bottom:qe,right:ze,inset:it,display:wt}),rest:qt}}function r6(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>wn(N({size:n,sizes:t.breakpoints}))-wn(N({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function n6({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return r6(e,t).reduce((i,l)=>{if(l==="base"&&e.base!==void 0){const u=r(e.base,t);return Array.isArray(n)?(n.forEach(d=>{i[d]=u}),i):(i[n]=u,i)}const c=r(e[l],t);return Array.isArray(n)?(i[t.fn.largerThan(l)]={},n.forEach(u=>{i[t.fn.largerThan(l)][u]=c}),i):(i[t.fn.largerThan(l)]={[n]:c},i)},{});const o=r(e,t);return Array.isArray(n)?n.reduce((a,i)=>(a[i]=o,a),{}):{[n]:o}}function o6(e,t){return e==="dimmed"?t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background}function a6(e){return S(e)}function i6(e){return e}function l6(e,t){return N({size:e,sizes:t.fontSizes})}const s6=["-xs","-sm","-md","-lg","-xl"];function c6(e,t){return s6.includes(e)?`calc(${N({size:e.replace("-",""),sizes:t.spacing})} * -1)`:N({size:e,sizes:t.spacing})}const u6={identity:i6,color:o6,size:a6,fontSize:l6,spacing:c6},d6={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var f6=Object.defineProperty,j1=Object.getOwnPropertySymbols,p6=Object.prototype.hasOwnProperty,m6=Object.prototype.propertyIsEnumerable,R1=(e,t,r)=>t in e?f6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T1=(e,t)=>{for(var r in t||(t={}))p6.call(t,r)&&R1(e,r,t[r]);if(j1)for(var r of j1(t))m6.call(t,r)&&R1(e,r,t[r]);return e};function I1(e,t,r=d6){return Object.keys(r).reduce((o,a)=>(a in e&&e[a]!==void 0&&o.push(n6({value:e[a],getValue:u6[r[a].type],property:r[a].property,theme:t})),o),[]).reduce((o,a)=>(Object.keys(a).forEach(i=>{typeof a[i]=="object"&&a[i]!==null&&i in o?o[i]=T1(T1({},o[i]),a[i]):o[i]=a[i]}),o),{})}function D1(e,t){return typeof e=="function"?e(t):e}function h6(e,t,r){const n=nr(),{css:o,cx:a}=W$();return Array.isArray(e)?a(r,o(I1(t,n)),e.map(i=>o(D1(i,n)))):a(r,o(D1(e,n)),o(I1(t,n)))}var g6=Object.defineProperty,Vu=Object.getOwnPropertySymbols,J$=Object.prototype.hasOwnProperty,Z$=Object.prototype.propertyIsEnumerable,N1=(e,t,r)=>t in e?g6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,v6=(e,t)=>{for(var r in t||(t={}))J$.call(t,r)&&N1(e,r,t[r]);if(Vu)for(var r of Vu(t))Z$.call(t,r)&&N1(e,r,t[r]);return e},y6=(e,t)=>{var r={};for(var n in e)J$.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vu)for(var n of Vu(e))t.indexOf(n)<0&&Z$.call(e,n)&&(r[n]=e[n]);return r};const eO=f.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:a,sx:i}=r,l=y6(r,["className","component","style","sx"]);const{systemStyles:c,rest:u}=Bn(l),d=o||"div";return s.createElement(d,v6({ref:t,className:h6(i,c,n),style:a},u))});eO.displayName="@mantine/core/Box";const ue=eO;var w6=Object.defineProperty,_6=Object.defineProperties,b6=Object.getOwnPropertyDescriptors,A1=Object.getOwnPropertySymbols,x6=Object.prototype.hasOwnProperty,E6=Object.prototype.propertyIsEnumerable,M1=(e,t,r)=>t in e?w6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z1=(e,t)=>{for(var r in t||(t={}))x6.call(t,r)&&M1(e,r,t[r]);if(A1)for(var r of A1(t))E6.call(t,r)&&M1(e,r,t[r]);return e},S6=(e,t)=>_6(e,b6(t)),P6=W(e=>({root:S6(z1(z1({},e.fn.focusStyles()),e.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"})}));const $6=P6;var O6=Object.defineProperty,Bu=Object.getOwnPropertySymbols,tO=Object.prototype.hasOwnProperty,rO=Object.prototype.propertyIsEnumerable,L1=(e,t,r)=>t in e?O6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C6=(e,t)=>{for(var r in t||(t={}))tO.call(t,r)&&L1(e,r,t[r]);if(Bu)for(var r of Bu(t))rO.call(t,r)&&L1(e,r,t[r]);return e},k6=(e,t)=>{var r={};for(var n in e)tO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bu)for(var n of Bu(e))t.indexOf(n)<0&&rO.call(e,n)&&(r[n]=e[n]);return r};const nO=f.forwardRef((e,t)=>{const r=H("UnstyledButton",{},e),{className:n,component:o="button",unstyled:a,variant:i}=r,l=k6(r,["className","component","unstyled","variant"]),{classes:c,cx:u}=$6(null,{name:"UnstyledButton",unstyled:a,variant:i});return s.createElement(ue,C6({component:o,ref:t,className:u(c.root,n),type:o==="button"?"button":void 0},l))});nO.displayName="@mantine/core/UnstyledButton";const Jo=nO;var oO={exports:{}},Vr={},aO={exports:{}},iO={};/**
65
- * @license React
66
- * scheduler.production.min.js
67
- *
68
- * Copyright (c) Facebook, Inc. and its affiliates.
69
- *
70
- * This source code is licensed under the MIT license found in the
71
- * LICENSE file in the root directory of this source tree.
72
- */(function(e){function t(A,z){var q=A.length;A.push(z);e:for(;0<q;){var le=q-1>>>1,ye=A[le];if(0<o(ye,z))A[le]=z,A[q]=ye,q=le;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var z=A[0],q=A.pop();if(q!==z){A[0]=q;e:for(var le=0,ye=A.length,Re=ye>>>1;le<Re;){var me=2*(le+1)-1,qe=A[me],ze=me+1,it=A[ze];if(0>o(qe,q))ze<ye&&0>o(it,qe)?(A[le]=it,A[ze]=q,le=ze):(A[le]=qe,A[me]=q,le=me);else if(ze<ye&&0>o(it,q))A[le]=it,A[ze]=q,le=ze;else break e}}return z}function o(A,z){var q=A.sortIndex-z.sortIndex;return q!==0?q:A.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,m=null,h=3,g=!1,y=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(A){for(var z=r(u);z!==null;){if(z.callback===null)n(u);else if(z.startTime<=A)n(u),z.sortIndex=z.expirationTime,t(c,z);else break;z=r(u)}}function x(A){if(_=!1,b(A),!y)if(r(c)!==null)y=!0,M(P);else{var z=r(u);z!==null&&Q(x,z.startTime-A)}}function P(A,z){y=!1,_&&(_=!1,w(C),C=-1),g=!0;var q=h;try{for(b(z),m=r(c);m!==null&&(!(m.expirationTime>z)||A&&!k());){var le=m.callback;if(typeof le=="function"){m.callback=null,h=m.priorityLevel;var ye=le(m.expirationTime<=z);z=e.unstable_now(),typeof ye=="function"?m.callback=ye:m===r(c)&&n(c),b(z)}else n(c);m=r(c)}if(m!==null)var Re=!0;else{var me=r(u);me!==null&&Q(x,me.startTime-z),Re=!1}return Re}finally{m=null,h=q,g=!1}}var O=!1,$=null,C=-1,R=5,j=-1;function k(){return!(e.unstable_now()-j<R)}function T(){if($!==null){var A=e.unstable_now();j=A;var z=!0;try{z=$(!0,A)}finally{z?L():(O=!1,$=null)}}else O=!1}var L;if(typeof v=="function")L=function(){v(T)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,V=U.port2;U.port1.onmessage=T,L=function(){V.postMessage(null)}}else L=function(){E(T,0)};function M(A){$=A,O||(O=!0,L())}function Q(A,z){C=E(function(){A(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,M(P))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(A){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var q=h;h=z;try{return A()}finally{h=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,z){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var q=h;h=A;try{return z()}finally{h=q}},e.unstable_scheduleCallback=function(A,z,q){var le=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?le+q:le):q=le,A){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=q+ye,A={id:d++,callback:z,priorityLevel:A,startTime:q,expirationTime:ye,sortIndex:-1},q>le?(A.sortIndex=q,t(u,A),r(c)===null&&A===r(u)&&(_?(w(C),C=-1):_=!0,Q(x,q-le))):(A.sortIndex=ye,t(c,A),y||g||(y=!0,M(P))),A},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(A){var z=h;return function(){var q=h;h=z;try{return A.apply(this,arguments)}finally{h=q}}}})(iO);aO.exports=iO;var j6=aO.exports;/**
73
- * @license React
74
- * react-dom.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 lO=f,zr=j6;function B(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 sO=new Set,hs={};function Qa(e,t){Gi(e,t),Gi(e+"Capture",t)}function Gi(e,t){for(hs[e]=t,e=0;e<t.length;e++)sO.add(t[e])}var io=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xh=Object.prototype.hasOwnProperty,R6=/^[: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]*$/,F1={},V1={};function T6(e){return Xh.call(V1,e)?!0:Xh.call(F1,e)?!1:R6.test(e)?V1[e]=!0:(F1[e]=!0,!1)}function I6(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function D6(e,t,r,n){if(t===null||typeof t>"u"||I6(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sr(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var Ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ht[e]=new sr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ht[t]=new sr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new sr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new sr(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){Ht[e]=new sr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new sr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new sr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new sr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new sr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fv=/[\-:]([a-z])/g;function Vv(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(Fv,Vv);Ht[t]=new sr(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(Fv,Vv);Ht[t]=new sr(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(Fv,Vv);Ht[t]=new sr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new sr(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new sr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new sr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bv(e,t,r,n){var o=Ht.hasOwnProperty(t)?Ht[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(D6(t,r,o,n)&&(r=null),n||o===null?T6(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var vo=lO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Pc=Symbol.for("react.element"),wi=Symbol.for("react.portal"),_i=Symbol.for("react.fragment"),Uv=Symbol.for("react.strict_mode"),Jh=Symbol.for("react.profiler"),cO=Symbol.for("react.provider"),uO=Symbol.for("react.context"),Wv=Symbol.for("react.forward_ref"),Zh=Symbol.for("react.suspense"),eg=Symbol.for("react.suspense_list"),Hv=Symbol.for("react.memo"),Io=Symbol.for("react.lazy"),dO=Symbol.for("react.offscreen"),B1=Symbol.iterator;function Pl(e){return e===null||typeof e!="object"?null:(e=B1&&e[B1]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,Qm;function Hl(e){if(Qm===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Qm=t&&t[1]||""}return`
81
- `+Qm+e}var Gm=!1;function Km(e,t){if(!e||Gm)return"";Gm=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var o=u.stack.split(`
82
- `),a=n.stack.split(`
83
- `),i=o.length-1,l=a.length-1;1<=i&&0<=l&&o[i]!==a[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==a[l]){if(i!==1||l!==1)do if(i--,l--,0>l||o[i]!==a[l]){var c=`
84
- `+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{Gm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Hl(e):""}function N6(e){switch(e.tag){case 5:return Hl(e.type);case 16:return Hl("Lazy");case 13:return Hl("Suspense");case 19:return Hl("SuspenseList");case 0:case 2:case 15:return e=Km(e.type,!1),e;case 11:return e=Km(e.type.render,!1),e;case 1:return e=Km(e.type,!0),e;default:return""}}function tg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _i:return"Fragment";case wi:return"Portal";case Jh:return"Profiler";case Uv:return"StrictMode";case Zh:return"Suspense";case eg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uO:return(e.displayName||"Context")+".Consumer";case cO:return(e._context.displayName||"Context")+".Provider";case Wv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hv:return t=e.displayName||null,t!==null?t:tg(e.type)||"Memo";case Io:t=e._payload,e=e._init;try{return tg(e(t))}catch{}}return null}function A6(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 tg(t);case 8:return t===Uv?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Zo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function M6(e){var t=fO(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $c(e){e._valueTracker||(e._valueTracker=M6(e))}function pO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=fO(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Uu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function rg(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function U1(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Zo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mO(e,t){t=t.checked,t!=null&&Bv(e,"checked",t,!1)}function ng(e,t){mO(e,t);var r=Zo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?og(e,t.type,r):t.hasOwnProperty("defaultValue")&&og(e,t.type,Zo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function W1(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function og(e,t,r){(t!=="number"||Uu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ql=Array.isArray;function Ai(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Zo(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ag(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function H1(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(B(92));if(ql(r)){if(1<r.length)throw Error(B(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Zo(r)}}function hO(e,t){var r=Zo(t.value),n=Zo(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function q1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function gO(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 ig(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?gO(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Oc,vO=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Oc=Oc||document.createElement("div"),Oc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Oc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gs(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Zl={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},z6=["Webkit","ms","Moz","O"];Object.keys(Zl).forEach(function(e){z6.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zl[t]=Zl[e]})});function yO(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Zl.hasOwnProperty(e)&&Zl[e]?(""+t).trim():t+"px"}function wO(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=yO(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var L6=pt({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 lg(e,t){if(t){if(L6[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function sg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 cg=null;function qv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ug=null,Mi=null,zi=null;function Q1(e){if(e=Ws(e)){if(typeof ug!="function")throw Error(B(280));var t=e.stateNode;t&&(t=Zp(t),ug(e.stateNode,e.type,t))}}function _O(e){Mi?zi?zi.push(e):zi=[e]:Mi=e}function bO(){if(Mi){var e=Mi,t=zi;if(zi=Mi=null,Q1(e),t)for(e=0;e<t.length;e++)Q1(t[e])}}function xO(e,t){return e(t)}function EO(){}var Ym=!1;function SO(e,t,r){if(Ym)return e(t,r);Ym=!0;try{return xO(e,t,r)}finally{Ym=!1,(Mi!==null||zi!==null)&&(EO(),bO())}}function vs(e,t){var r=e.stateNode;if(r===null)return null;var n=Zp(r);if(n===null)return null;r=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(B(231,t,typeof r));return r}var dg=!1;if(io)try{var $l={};Object.defineProperty($l,"passive",{get:function(){dg=!0}}),window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{dg=!1}function F6(e,t,r,n,o,a,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var es=!1,Wu=null,Hu=!1,fg=null,V6={onError:function(e){es=!0,Wu=e}};function B6(e,t,r,n,o,a,i,l,c){es=!1,Wu=null,F6.apply(V6,arguments)}function U6(e,t,r,n,o,a,i,l,c){if(B6.apply(this,arguments),es){if(es){var u=Wu;es=!1,Wu=null}else throw Error(B(198));Hu||(Hu=!0,fg=u)}}function Ga(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function PO(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function G1(e){if(Ga(e)!==e)throw Error(B(188))}function W6(e){var t=e.alternate;if(!t){if(t=Ga(e),t===null)throw Error(B(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var a=o.alternate;if(a===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return G1(o),e;if(a===n)return G1(o),t;a=a.sibling}throw Error(B(188))}if(r.return!==n.return)r=o,n=a;else{for(var i=!1,l=o.child;l;){if(l===r){i=!0,r=o,n=a;break}if(l===n){i=!0,n=o,r=a;break}l=l.sibling}if(!i){for(l=a.child;l;){if(l===r){i=!0,r=a,n=o;break}if(l===n){i=!0,n=a,r=o;break}l=l.sibling}if(!i)throw Error(B(189))}}if(r.alternate!==n)throw Error(B(190))}if(r.tag!==3)throw Error(B(188));return r.stateNode.current===r?e:t}function $O(e){return e=W6(e),e!==null?OO(e):null}function OO(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=OO(e);if(t!==null)return t;e=e.sibling}return null}var CO=zr.unstable_scheduleCallback,K1=zr.unstable_cancelCallback,H6=zr.unstable_shouldYield,q6=zr.unstable_requestPaint,Et=zr.unstable_now,Q6=zr.unstable_getCurrentPriorityLevel,Qv=zr.unstable_ImmediatePriority,kO=zr.unstable_UserBlockingPriority,qu=zr.unstable_NormalPriority,G6=zr.unstable_LowPriority,jO=zr.unstable_IdlePriority,Kp=null,An=null;function K6(e){if(An&&typeof An.onCommitFiberRoot=="function")try{An.onCommitFiberRoot(Kp,e,void 0,(e.current.flags&128)===128)}catch{}}var hn=Math.clz32?Math.clz32:J6,Y6=Math.log,X6=Math.LN2;function J6(e){return e>>>=0,e===0?32:31-(Y6(e)/X6|0)|0}var Cc=64,kc=4194304;function Ql(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 Qu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var l=i&~o;l!==0?n=Ql(l):(a&=i,a!==0&&(n=Ql(a)))}else i=r&~o,i!==0?n=Ql(i):a!==0&&(n=Ql(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,a=t&-t,o>=a||o===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-hn(t),o=1<<r,n|=e[r],t&=~o;return n}function Z6(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 eM(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-hn(a),l=1<<i,c=o[i];c===-1?(!(l&r)||l&n)&&(o[i]=Z6(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function pg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function RO(){var e=Cc;return Cc<<=1,!(Cc&4194240)&&(Cc=64),e}function Xm(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Bs(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hn(t),e[t]=r}function tM(e,t){var r=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 n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-hn(r),a=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~a}}function Gv(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-hn(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Le=0;function TO(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var IO,Kv,DO,NO,AO,mg=!1,jc=[],Bo=null,Uo=null,Wo=null,ys=new Map,ws=new Map,Mo=[],rM="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 Y1(e,t){switch(e){case"focusin":case"focusout":Bo=null;break;case"dragenter":case"dragleave":Uo=null;break;case"mouseover":case"mouseout":Wo=null;break;case"pointerover":case"pointerout":ys.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ws.delete(t.pointerId)}}function Ol(e,t,r,n,o,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[o]},t!==null&&(t=Ws(t),t!==null&&Kv(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function nM(e,t,r,n,o){switch(t){case"focusin":return Bo=Ol(Bo,e,t,r,n,o),!0;case"dragenter":return Uo=Ol(Uo,e,t,r,n,o),!0;case"mouseover":return Wo=Ol(Wo,e,t,r,n,o),!0;case"pointerover":var a=o.pointerId;return ys.set(a,Ol(ys.get(a)||null,e,t,r,n,o)),!0;case"gotpointercapture":return a=o.pointerId,ws.set(a,Ol(ws.get(a)||null,e,t,r,n,o)),!0}return!1}function MO(e){var t=Sa(e.target);if(t!==null){var r=Ga(t);if(r!==null){if(t=r.tag,t===13){if(t=PO(r),t!==null){e.blockedOn=t,AO(e.priority,function(){DO(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=hg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);cg=n,r.target.dispatchEvent(n),cg=null}else return t=Ws(r),t!==null&&Kv(t),e.blockedOn=r,!1;t.shift()}return!0}function X1(e,t,r){bu(e)&&r.delete(t)}function oM(){mg=!1,Bo!==null&&bu(Bo)&&(Bo=null),Uo!==null&&bu(Uo)&&(Uo=null),Wo!==null&&bu(Wo)&&(Wo=null),ys.forEach(X1),ws.forEach(X1)}function Cl(e,t){e.blockedOn===t&&(e.blockedOn=null,mg||(mg=!0,zr.unstable_scheduleCallback(zr.unstable_NormalPriority,oM)))}function _s(e){function t(o){return Cl(o,e)}if(0<jc.length){Cl(jc[0],e);for(var r=1;r<jc.length;r++){var n=jc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Bo!==null&&Cl(Bo,e),Uo!==null&&Cl(Uo,e),Wo!==null&&Cl(Wo,e),ys.forEach(t),ws.forEach(t),r=0;r<Mo.length;r++)n=Mo[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Mo.length&&(r=Mo[0],r.blockedOn===null);)MO(r),r.blockedOn===null&&Mo.shift()}var Li=vo.ReactCurrentBatchConfig,Gu=!0;function aM(e,t,r,n){var o=Le,a=Li.transition;Li.transition=null;try{Le=1,Yv(e,t,r,n)}finally{Le=o,Li.transition=a}}function iM(e,t,r,n){var o=Le,a=Li.transition;Li.transition=null;try{Le=4,Yv(e,t,r,n)}finally{Le=o,Li.transition=a}}function Yv(e,t,r,n){if(Gu){var o=hg(e,t,r,n);if(o===null)lh(e,t,n,Ku,r),Y1(e,n);else if(nM(o,e,t,r,n))n.stopPropagation();else if(Y1(e,n),t&4&&-1<rM.indexOf(e)){for(;o!==null;){var a=Ws(o);if(a!==null&&IO(a),a=hg(e,t,r,n),a===null&&lh(e,t,n,Ku,r),a===o)break;o=a}o!==null&&n.stopPropagation()}else lh(e,t,n,null,r)}}var Ku=null;function hg(e,t,r,n){if(Ku=null,e=qv(n),e=Sa(e),e!==null)if(t=Ga(e),t===null)e=null;else if(r=t.tag,r===13){if(e=PO(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ku=e,null}function zO(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(Q6()){case Qv:return 1;case kO:return 4;case qu:case G6:return 16;case jO:return 536870912;default:return 16}default:return 16}}var Lo=null,Xv=null,xu=null;function LO(){if(xu)return xu;var e,t=Xv,r=t.length,n,o="value"in Lo?Lo.value:Lo.textContent,a=o.length;for(e=0;e<r&&t[e]===o[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===o[a-n];n++);return xu=o.slice(e,1<n?1-n:void 0)}function Eu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rc(){return!0}function J1(){return!1}function Br(e){function t(r,n,o,a,i){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Rc:J1,this.isPropagationStopped=J1,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Rc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Rc)},persist:function(){},isPersistent:Rc}),t}var dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jv=Br(dl),Us=pt({},dl,{view:0,detail:0}),lM=Br(Us),Jm,Zm,kl,Yp=pt({},Us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==kl&&(kl&&e.type==="mousemove"?(Jm=e.screenX-kl.screenX,Zm=e.screenY-kl.screenY):Zm=Jm=0,kl=e),Jm)},movementY:function(e){return"movementY"in e?e.movementY:Zm}}),Z1=Br(Yp),sM=pt({},Yp,{dataTransfer:0}),cM=Br(sM),uM=pt({},Us,{relatedTarget:0}),eh=Br(uM),dM=pt({},dl,{animationName:0,elapsedTime:0,pseudoElement:0}),fM=Br(dM),pM=pt({},dl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mM=Br(pM),hM=pt({},dl,{data:0}),ew=Br(hM),gM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vM={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"},yM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wM(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yM[e])?!!t[e]:!1}function Zv(){return wM}var _M=pt({},Us,{key:function(e){if(e.key){var t=gM[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Eu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vM[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zv,charCode:function(e){return e.type==="keypress"?Eu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Eu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bM=Br(_M),xM=pt({},Yp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tw=Br(xM),EM=pt({},Us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zv}),SM=Br(EM),PM=pt({},dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),$M=Br(PM),OM=pt({},Yp,{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}),CM=Br(OM),kM=[9,13,27,32],ey=io&&"CompositionEvent"in window,ts=null;io&&"documentMode"in document&&(ts=document.documentMode);var jM=io&&"TextEvent"in window&&!ts,FO=io&&(!ey||ts&&8<ts&&11>=ts),rw=String.fromCharCode(32),nw=!1;function VO(e,t){switch(e){case"keyup":return kM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bi=!1;function RM(e,t){switch(e){case"compositionend":return BO(t);case"keypress":return t.which!==32?null:(nw=!0,rw);case"textInput":return e=t.data,e===rw&&nw?null:e;default:return null}}function TM(e,t){if(bi)return e==="compositionend"||!ey&&VO(e,t)?(e=LO(),xu=Xv=Lo=null,bi=!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 FO&&t.locale!=="ko"?null:t.data;default:return null}}var IM={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 ow(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!IM[e.type]:t==="textarea"}function UO(e,t,r,n){_O(n),t=Yu(t,"onChange"),0<t.length&&(r=new Jv("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var rs=null,bs=null;function DM(e){eC(e,0)}function Xp(e){var t=Si(e);if(pO(t))return e}function NM(e,t){if(e==="change")return t}var WO=!1;if(io){var th;if(io){var rh="oninput"in document;if(!rh){var aw=document.createElement("div");aw.setAttribute("oninput","return;"),rh=typeof aw.oninput=="function"}th=rh}else th=!1;WO=th&&(!document.documentMode||9<document.documentMode)}function iw(){rs&&(rs.detachEvent("onpropertychange",HO),bs=rs=null)}function HO(e){if(e.propertyName==="value"&&Xp(bs)){var t=[];UO(t,bs,e,qv(e)),SO(DM,t)}}function AM(e,t,r){e==="focusin"?(iw(),rs=t,bs=r,rs.attachEvent("onpropertychange",HO)):e==="focusout"&&iw()}function MM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xp(bs)}function zM(e,t){if(e==="click")return Xp(t)}function LM(e,t){if(e==="input"||e==="change")return Xp(t)}function FM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _n=typeof Object.is=="function"?Object.is:FM;function xs(e,t){if(_n(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!Xh.call(t,o)||!_n(e[o],t[o]))return!1}return!0}function lw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sw(e,t){var r=lw(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lw(r)}}function qO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function QO(){for(var e=window,t=Uu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Uu(e.document)}return t}function ty(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function VM(e){var t=QO(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&qO(r.ownerDocument.documentElement,r)){if(n!==null&&ty(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,a=Math.min(n.start,o);n=n.end===void 0?a:Math.min(n.end,o),!e.extend&&a>n&&(o=n,n=a,a=o),o=sw(r,a);var i=sw(r,n);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var BM=io&&"documentMode"in document&&11>=document.documentMode,xi=null,gg=null,ns=null,vg=!1;function cw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;vg||xi==null||xi!==Uu(n)||(n=xi,"selectionStart"in n&&ty(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ns&&xs(ns,n)||(ns=n,n=Yu(gg,"onSelect"),0<n.length&&(t=new Jv("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=xi)))}function Tc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ei={animationend:Tc("Animation","AnimationEnd"),animationiteration:Tc("Animation","AnimationIteration"),animationstart:Tc("Animation","AnimationStart"),transitionend:Tc("Transition","TransitionEnd")},nh={},GO={};io&&(GO=document.createElement("div").style,"AnimationEvent"in window||(delete Ei.animationend.animation,delete Ei.animationiteration.animation,delete Ei.animationstart.animation),"TransitionEvent"in window||delete Ei.transitionend.transition);function Jp(e){if(nh[e])return nh[e];if(!Ei[e])return e;var t=Ei[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in GO)return nh[e]=t[r];return e}var KO=Jp("animationend"),YO=Jp("animationiteration"),XO=Jp("animationstart"),JO=Jp("transitionend"),ZO=new Map,uw="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 ia(e,t){ZO.set(e,t),Qa(t,[e])}for(var oh=0;oh<uw.length;oh++){var ah=uw[oh],UM=ah.toLowerCase(),WM=ah[0].toUpperCase()+ah.slice(1);ia(UM,"on"+WM)}ia(KO,"onAnimationEnd");ia(YO,"onAnimationIteration");ia(XO,"onAnimationStart");ia("dblclick","onDoubleClick");ia("focusin","onFocus");ia("focusout","onBlur");ia(JO,"onTransitionEnd");Gi("onMouseEnter",["mouseout","mouseover"]);Gi("onMouseLeave",["mouseout","mouseover"]);Gi("onPointerEnter",["pointerout","pointerover"]);Gi("onPointerLeave",["pointerout","pointerover"]);Qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qa("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gl="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(" "),HM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gl));function dw(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,U6(n,t,void 0,e),e.currentTarget=null}function eC(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var i=n.length-1;0<=i;i--){var l=n[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&o.isPropagationStopped())break e;dw(o,l,u),a=c}else for(i=0;i<n.length;i++){if(l=n[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&o.isPropagationStopped())break e;dw(o,l,u),a=c}}}if(Hu)throw e=fg,Hu=!1,fg=null,e}function Ze(e,t){var r=t[xg];r===void 0&&(r=t[xg]=new Set);var n=e+"__bubble";r.has(n)||(tC(t,e,2,!1),r.add(n))}function ih(e,t,r){var n=0;t&&(n|=4),tC(r,e,n,t)}var Ic="_reactListening"+Math.random().toString(36).slice(2);function Es(e){if(!e[Ic]){e[Ic]=!0,sO.forEach(function(r){r!=="selectionchange"&&(HM.has(r)||ih(r,!1,e),ih(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ic]||(t[Ic]=!0,ih("selectionchange",!1,t))}}function tC(e,t,r,n){switch(zO(t)){case 1:var o=aM;break;case 4:o=iM;break;default:o=Yv}r=o.bind(null,t,r,e),o=void 0,!dg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function lh(e,t,r,n,o){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var l=n.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=n.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;l!==null;){if(i=Sa(l),i===null)return;if(c=i.tag,c===5||c===6){n=a=i;continue e}l=l.parentNode}}n=n.return}SO(function(){var u=a,d=qv(r),m=[];e:{var h=ZO.get(e);if(h!==void 0){var g=Jv,y=e;switch(e){case"keypress":if(Eu(r)===0)break e;case"keydown":case"keyup":g=bM;break;case"focusin":y="focus",g=eh;break;case"focusout":y="blur",g=eh;break;case"beforeblur":case"afterblur":g=eh;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=Z1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=cM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=SM;break;case KO:case YO:case XO:g=fM;break;case JO:g=$M;break;case"scroll":g=lM;break;case"wheel":g=CM;break;case"copy":case"cut":case"paste":g=mM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=tw}var _=(t&4)!==0,E=!_&&e==="scroll",w=_?h!==null?h+"Capture":null:h;_=[];for(var v=u,b;v!==null;){b=v;var x=b.stateNode;if(b.tag===5&&x!==null&&(b=x,w!==null&&(x=vs(v,w),x!=null&&_.push(Ss(v,x,b)))),E)break;v=v.return}0<_.length&&(h=new g(h,y,null,r,d),m.push({event:h,listeners:_}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&r!==cg&&(y=r.relatedTarget||r.fromElement)&&(Sa(y)||y[lo]))break e;if((g||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,g?(y=r.relatedTarget||r.toElement,g=u,y=y?Sa(y):null,y!==null&&(E=Ga(y),y!==E||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=u),g!==y)){if(_=Z1,x="onMouseLeave",w="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(_=tw,x="onPointerLeave",w="onPointerEnter",v="pointer"),E=g==null?h:Si(g),b=y==null?h:Si(y),h=new _(x,v+"leave",g,r,d),h.target=E,h.relatedTarget=b,x=null,Sa(d)===u&&(_=new _(w,v+"enter",y,r,d),_.target=b,_.relatedTarget=E,x=_),E=x,g&&y)t:{for(_=g,w=y,v=0,b=_;b;b=ci(b))v++;for(b=0,x=w;x;x=ci(x))b++;for(;0<v-b;)_=ci(_),v--;for(;0<b-v;)w=ci(w),b--;for(;v--;){if(_===w||w!==null&&_===w.alternate)break t;_=ci(_),w=ci(w)}_=null}else _=null;g!==null&&fw(m,h,g,_,!1),y!==null&&E!==null&&fw(m,E,y,_,!0)}}e:{if(h=u?Si(u):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var P=NM;else if(ow(h))if(WO)P=LM;else{P=MM;var O=AM}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(P=zM);if(P&&(P=P(e,u))){UO(m,P,r,d);break e}O&&O(e,h,u),e==="focusout"&&(O=h._wrapperState)&&O.controlled&&h.type==="number"&&og(h,"number",h.value)}switch(O=u?Si(u):window,e){case"focusin":(ow(O)||O.contentEditable==="true")&&(xi=O,gg=u,ns=null);break;case"focusout":ns=gg=xi=null;break;case"mousedown":vg=!0;break;case"contextmenu":case"mouseup":case"dragend":vg=!1,cw(m,r,d);break;case"selectionchange":if(BM)break;case"keydown":case"keyup":cw(m,r,d)}var $;if(ey)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else bi?VO(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(FO&&r.locale!=="ko"&&(bi||C!=="onCompositionStart"?C==="onCompositionEnd"&&bi&&($=LO()):(Lo=d,Xv="value"in Lo?Lo.value:Lo.textContent,bi=!0)),O=Yu(u,C),0<O.length&&(C=new ew(C,e,null,r,d),m.push({event:C,listeners:O}),$?C.data=$:($=BO(r),$!==null&&(C.data=$)))),($=jM?RM(e,r):TM(e,r))&&(u=Yu(u,"onBeforeInput"),0<u.length&&(d=new ew("onBeforeInput","beforeinput",null,r,d),m.push({event:d,listeners:u}),d.data=$))}eC(m,t)})}function Ss(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Yu(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,a=o.stateNode;o.tag===5&&a!==null&&(o=a,a=vs(e,r),a!=null&&n.unshift(Ss(e,a,o)),a=vs(e,t),a!=null&&n.push(Ss(e,a,o))),e=e.return}return n}function ci(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function fw(e,t,r,n,o){for(var a=t._reactName,i=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,o?(c=vs(r,a),c!=null&&i.unshift(Ss(r,c,l))):o||(c=vs(r,a),c!=null&&i.push(Ss(r,c,l)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var qM=/\r\n?/g,QM=/\u0000|\uFFFD/g;function pw(e){return(typeof e=="string"?e:""+e).replace(qM,`
85
- `).replace(QM,"")}function Dc(e,t,r){if(t=pw(t),pw(e)!==t&&r)throw Error(B(425))}function Xu(){}var yg=null,wg=null;function _g(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bg=typeof setTimeout=="function"?setTimeout:void 0,GM=typeof clearTimeout=="function"?clearTimeout:void 0,mw=typeof Promise=="function"?Promise:void 0,KM=typeof queueMicrotask=="function"?queueMicrotask:typeof mw<"u"?function(e){return mw.resolve(null).then(e).catch(YM)}:bg;function YM(e){setTimeout(function(){throw e})}function sh(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),_s(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);_s(t)}function Ho(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function hw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var fl=Math.random().toString(36).slice(2),Dn="__reactFiber$"+fl,Ps="__reactProps$"+fl,lo="__reactContainer$"+fl,xg="__reactEvents$"+fl,XM="__reactListeners$"+fl,JM="__reactHandles$"+fl;function Sa(e){var t=e[Dn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[lo]||r[Dn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=hw(e);e!==null;){if(r=e[Dn])return r;e=hw(e)}return t}e=r,r=e.parentNode}return null}function Ws(e){return e=e[Dn]||e[lo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Si(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function Zp(e){return e[Ps]||null}var Eg=[],Pi=-1;function la(e){return{current:e}}function et(e){0>Pi||(e.current=Eg[Pi],Eg[Pi]=null,Pi--)}function Ge(e,t){Pi++,Eg[Pi]=e.current,e.current=t}var ea={},rr=la(ea),hr=la(!1),Da=ea;function Ki(e,t){var r=e.type.contextTypes;if(!r)return ea;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function gr(e){return e=e.childContextTypes,e!=null}function Ju(){et(hr),et(rr)}function gw(e,t,r){if(rr.current!==ea)throw Error(B(168));Ge(rr,t),Ge(hr,r)}function rC(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(B(108,A6(e)||"Unknown",o));return pt({},r,n)}function Zu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ea,Da=rr.current,Ge(rr,e),Ge(hr,hr.current),!0}function vw(e,t,r){var n=e.stateNode;if(!n)throw Error(B(169));r?(e=rC(e,t,Da),n.__reactInternalMemoizedMergedChildContext=e,et(hr),et(rr),Ge(rr,e)):et(hr),Ge(hr,r)}var Xn=null,em=!1,ch=!1;function nC(e){Xn===null?Xn=[e]:Xn.push(e)}function ZM(e){em=!0,nC(e)}function sa(){if(!ch&&Xn!==null){ch=!0;var e=0,t=Le;try{var r=Xn;for(Le=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Xn=null,em=!1}catch(o){throw Xn!==null&&(Xn=Xn.slice(e+1)),CO(Qv,sa),o}finally{Le=t,ch=!1}}return null}var $i=[],Oi=0,ed=null,td=0,Kr=[],Yr=0,Na=null,Zn=1,eo="";function ya(e,t){$i[Oi++]=td,$i[Oi++]=ed,ed=e,td=t}function oC(e,t,r){Kr[Yr++]=Zn,Kr[Yr++]=eo,Kr[Yr++]=Na,Na=e;var n=Zn;e=eo;var o=32-hn(n)-1;n&=~(1<<o),r+=1;var a=32-hn(t)+o;if(30<a){var i=o-o%5;a=(n&(1<<i)-1).toString(32),n>>=i,o-=i,Zn=1<<32-hn(t)+o|r<<o|n,eo=a+e}else Zn=1<<a|r<<o|n,eo=e}function ry(e){e.return!==null&&(ya(e,1),oC(e,1,0))}function ny(e){for(;e===ed;)ed=$i[--Oi],$i[Oi]=null,td=$i[--Oi],$i[Oi]=null;for(;e===Na;)Na=Kr[--Yr],Kr[Yr]=null,eo=Kr[--Yr],Kr[Yr]=null,Zn=Kr[--Yr],Kr[Yr]=null}var Ar=null,Tr=null,nt=!1,fn=null;function aC(e,t){var r=Xr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function yw(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ar=e,Tr=Ho(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ar=e,Tr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Na!==null?{id:Zn,overflow:eo}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Xr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ar=e,Tr=null,!0):!1;default:return!1}}function Sg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pg(e){if(nt){var t=Tr;if(t){var r=t;if(!yw(e,t)){if(Sg(e))throw Error(B(418));t=Ho(r.nextSibling);var n=Ar;t&&yw(e,t)?aC(n,r):(e.flags=e.flags&-4097|2,nt=!1,Ar=e)}}else{if(Sg(e))throw Error(B(418));e.flags=e.flags&-4097|2,nt=!1,Ar=e}}}function ww(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ar=e}function Nc(e){if(e!==Ar)return!1;if(!nt)return ww(e),nt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!_g(e.type,e.memoizedProps)),t&&(t=Tr)){if(Sg(e))throw iC(),Error(B(418));for(;t;)aC(e,t),t=Ho(t.nextSibling)}if(ww(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Tr=Ho(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Tr=null}}else Tr=Ar?Ho(e.stateNode.nextSibling):null;return!0}function iC(){for(var e=Tr;e;)e=Ho(e.nextSibling)}function Yi(){Tr=Ar=null,nt=!1}function oy(e){fn===null?fn=[e]:fn.push(e)}var ez=vo.ReactCurrentBatchConfig;function cn(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}var rd=la(null),nd=null,Ci=null,ay=null;function iy(){ay=Ci=nd=null}function ly(e){var t=rd.current;et(rd),e._currentValue=t}function $g(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Fi(e,t){nd=e,ay=Ci=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(pr=!0),e.firstContext=null)}function tn(e){var t=e._currentValue;if(ay!==e)if(e={context:e,memoizedValue:t,next:null},Ci===null){if(nd===null)throw Error(B(308));Ci=e,nd.dependencies={lanes:0,firstContext:e}}else Ci=Ci.next=e;return t}var Pa=null;function sy(e){Pa===null?Pa=[e]:Pa.push(e)}function lC(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,sy(t)):(r.next=o.next,o.next=r),t.interleaved=r,so(e,n)}function so(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Do=!1;function cy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sC(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 to(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qo(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Te&2){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,so(e,r)}return o=n.interleaved,o===null?(t.next=t,sy(n)):(t.next=o.next,o.next=t),n.interleaved=t,so(e,r)}function Su(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Gv(e,r)}}function _w(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?o=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?o=a=t:a=a.next=t}else o=a=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function od(e,t,r,n){var o=e.updateQueue;Do=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?a=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(a!==null){var m=o.baseState;i=0,d=u=c=null,l=a;do{var h=l.lane,g=l.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,_=l;switch(h=t,g=r,_.tag){case 1:if(y=_.payload,typeof y=="function"){m=y.call(g,m,h);break e}m=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=_.payload,h=typeof y=="function"?y.call(g,m,h):y,h==null)break e;m=pt({},m,h);break e;case 2:Do=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else g={eventTime:g,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=g,c=m):d=d.next=g,i|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(1);if(d===null&&(c=m),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else a===null&&(o.shared.lanes=0);Ma|=i,e.lanes=i,e.memoizedState=m}}function bw(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(B(191,o));o.call(n)}}}var cC=new lO.Component().refs;function Og(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:pt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var tm={isMounted:function(e){return(e=e._reactInternals)?Ga(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=ir(),o=Go(e),a=to(n,o);a.payload=t,r!=null&&(a.callback=r),t=qo(e,a,o),t!==null&&(gn(t,e,o,n),Su(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=ir(),o=Go(e),a=to(n,o);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=qo(e,a,o),t!==null&&(gn(t,e,o,n),Su(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ir(),n=Go(e),o=to(r,n);o.tag=2,t!=null&&(o.callback=t),t=qo(e,o,n),t!==null&&(gn(t,e,n,r),Su(t,e,n))}};function xw(e,t,r,n,o,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,i):t.prototype&&t.prototype.isPureReactComponent?!xs(r,n)||!xs(o,a):!0}function uC(e,t,r){var n=!1,o=ea,a=t.contextType;return typeof a=="object"&&a!==null?a=tn(a):(o=gr(t)?Da:rr.current,n=t.contextTypes,a=(n=n!=null)?Ki(e,o):ea),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=tm,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ew(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&tm.enqueueReplaceState(t,t.state,null)}function Cg(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs=cC,cy(e);var a=t.contextType;typeof a=="object"&&a!==null?o.context=tn(a):(a=gr(t)?Da:rr.current,o.context=Ki(e,a)),o.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Og(e,t,a,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&tm.enqueueReplaceState(o,o.state,null),od(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function jl(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(B(309));var n=r.stateNode}if(!n)throw Error(B(147,e));var o=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var l=o.refs;l===cC&&(l=o.refs={}),i===null?delete l[a]:l[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(B(284));if(!r._owner)throw Error(B(290,e))}return e}function Ac(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sw(e){var t=e._init;return t(e._payload)}function dC(e){function t(w,v){if(e){var b=w.deletions;b===null?(w.deletions=[v],w.flags|=16):b.push(v)}}function r(w,v){if(!e)return null;for(;v!==null;)t(w,v),v=v.sibling;return null}function n(w,v){for(w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function o(w,v){return w=Ko(w,v),w.index=0,w.sibling=null,w}function a(w,v,b){return w.index=b,e?(b=w.alternate,b!==null?(b=b.index,b<v?(w.flags|=2,v):b):(w.flags|=2,v)):(w.flags|=1048576,v)}function i(w){return e&&w.alternate===null&&(w.flags|=2),w}function l(w,v,b,x){return v===null||v.tag!==6?(v=gh(b,w.mode,x),v.return=w,v):(v=o(v,b),v.return=w,v)}function c(w,v,b,x){var P=b.type;return P===_i?d(w,v,b.props.children,x,b.key):v!==null&&(v.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Io&&Sw(P)===v.type)?(x=o(v,b.props),x.ref=jl(w,v,b),x.return=w,x):(x=ju(b.type,b.key,b.props,null,w.mode,x),x.ref=jl(w,v,b),x.return=w,x)}function u(w,v,b,x){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=vh(b,w.mode,x),v.return=w,v):(v=o(v,b.children||[]),v.return=w,v)}function d(w,v,b,x,P){return v===null||v.tag!==7?(v=Ra(b,w.mode,x,P),v.return=w,v):(v=o(v,b),v.return=w,v)}function m(w,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=gh(""+v,w.mode,b),v.return=w,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Pc:return b=ju(v.type,v.key,v.props,null,w.mode,b),b.ref=jl(w,null,v),b.return=w,b;case wi:return v=vh(v,w.mode,b),v.return=w,v;case Io:var x=v._init;return m(w,x(v._payload),b)}if(ql(v)||Pl(v))return v=Ra(v,w.mode,b,null),v.return=w,v;Ac(w,v)}return null}function h(w,v,b,x){var P=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return P!==null?null:l(w,v,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Pc:return b.key===P?c(w,v,b,x):null;case wi:return b.key===P?u(w,v,b,x):null;case Io:return P=b._init,h(w,v,P(b._payload),x)}if(ql(b)||Pl(b))return P!==null?null:d(w,v,b,x,null);Ac(w,b)}return null}function g(w,v,b,x,P){if(typeof x=="string"&&x!==""||typeof x=="number")return w=w.get(b)||null,l(v,w,""+x,P);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Pc:return w=w.get(x.key===null?b:x.key)||null,c(v,w,x,P);case wi:return w=w.get(x.key===null?b:x.key)||null,u(v,w,x,P);case Io:var O=x._init;return g(w,v,b,O(x._payload),P)}if(ql(x)||Pl(x))return w=w.get(b)||null,d(v,w,x,P,null);Ac(v,x)}return null}function y(w,v,b,x){for(var P=null,O=null,$=v,C=v=0,R=null;$!==null&&C<b.length;C++){$.index>C?(R=$,$=null):R=$.sibling;var j=h(w,$,b[C],x);if(j===null){$===null&&($=R);break}e&&$&&j.alternate===null&&t(w,$),v=a(j,v,C),O===null?P=j:O.sibling=j,O=j,$=R}if(C===b.length)return r(w,$),nt&&ya(w,C),P;if($===null){for(;C<b.length;C++)$=m(w,b[C],x),$!==null&&(v=a($,v,C),O===null?P=$:O.sibling=$,O=$);return nt&&ya(w,C),P}for($=n(w,$);C<b.length;C++)R=g($,w,C,b[C],x),R!==null&&(e&&R.alternate!==null&&$.delete(R.key===null?C:R.key),v=a(R,v,C),O===null?P=R:O.sibling=R,O=R);return e&&$.forEach(function(k){return t(w,k)}),nt&&ya(w,C),P}function _(w,v,b,x){var P=Pl(b);if(typeof P!="function")throw Error(B(150));if(b=P.call(b),b==null)throw Error(B(151));for(var O=P=null,$=v,C=v=0,R=null,j=b.next();$!==null&&!j.done;C++,j=b.next()){$.index>C?(R=$,$=null):R=$.sibling;var k=h(w,$,j.value,x);if(k===null){$===null&&($=R);break}e&&$&&k.alternate===null&&t(w,$),v=a(k,v,C),O===null?P=k:O.sibling=k,O=k,$=R}if(j.done)return r(w,$),nt&&ya(w,C),P;if($===null){for(;!j.done;C++,j=b.next())j=m(w,j.value,x),j!==null&&(v=a(j,v,C),O===null?P=j:O.sibling=j,O=j);return nt&&ya(w,C),P}for($=n(w,$);!j.done;C++,j=b.next())j=g($,w,C,j.value,x),j!==null&&(e&&j.alternate!==null&&$.delete(j.key===null?C:j.key),v=a(j,v,C),O===null?P=j:O.sibling=j,O=j);return e&&$.forEach(function(T){return t(w,T)}),nt&&ya(w,C),P}function E(w,v,b,x){if(typeof b=="object"&&b!==null&&b.type===_i&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Pc:e:{for(var P=b.key,O=v;O!==null;){if(O.key===P){if(P=b.type,P===_i){if(O.tag===7){r(w,O.sibling),v=o(O,b.props.children),v.return=w,w=v;break e}}else if(O.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Io&&Sw(P)===O.type){r(w,O.sibling),v=o(O,b.props),v.ref=jl(w,O,b),v.return=w,w=v;break e}r(w,O);break}else t(w,O);O=O.sibling}b.type===_i?(v=Ra(b.props.children,w.mode,x,b.key),v.return=w,w=v):(x=ju(b.type,b.key,b.props,null,w.mode,x),x.ref=jl(w,v,b),x.return=w,w=x)}return i(w);case wi:e:{for(O=b.key;v!==null;){if(v.key===O)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){r(w,v.sibling),v=o(v,b.children||[]),v.return=w,w=v;break e}else{r(w,v);break}else t(w,v);v=v.sibling}v=vh(b,w.mode,x),v.return=w,w=v}return i(w);case Io:return O=b._init,E(w,v,O(b._payload),x)}if(ql(b))return y(w,v,b,x);if(Pl(b))return _(w,v,b,x);Ac(w,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(r(w,v.sibling),v=o(v,b),v.return=w,w=v):(r(w,v),v=gh(b,w.mode,x),v.return=w,w=v),i(w)):r(w,v)}return E}var Xi=dC(!0),fC=dC(!1),Hs={},Mn=la(Hs),$s=la(Hs),Os=la(Hs);function $a(e){if(e===Hs)throw Error(B(174));return e}function uy(e,t){switch(Ge(Os,t),Ge($s,e),Ge(Mn,Hs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ig(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ig(t,e)}et(Mn),Ge(Mn,t)}function Ji(){et(Mn),et($s),et(Os)}function pC(e){$a(Os.current);var t=$a(Mn.current),r=ig(t,e.type);t!==r&&(Ge($s,e),Ge(Mn,r))}function dy(e){$s.current===e&&(et(Mn),et($s))}var ut=la(0);function ad(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var uh=[];function fy(){for(var e=0;e<uh.length;e++)uh[e]._workInProgressVersionPrimary=null;uh.length=0}var Pu=vo.ReactCurrentDispatcher,dh=vo.ReactCurrentBatchConfig,Aa=0,ft=null,Dt=null,Mt=null,id=!1,os=!1,Cs=0,tz=0;function Yt(){throw Error(B(321))}function py(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!_n(e[r],t[r]))return!1;return!0}function my(e,t,r,n,o,a){if(Aa=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pu.current=e===null||e.memoizedState===null?az:iz,e=r(n,o),os){a=0;do{if(os=!1,Cs=0,25<=a)throw Error(B(301));a+=1,Mt=Dt=null,t.updateQueue=null,Pu.current=lz,e=r(n,o)}while(os)}if(Pu.current=ld,t=Dt!==null&&Dt.next!==null,Aa=0,Mt=Dt=ft=null,id=!1,t)throw Error(B(300));return e}function hy(){var e=Cs!==0;return Cs=0,e}function On(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?ft.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function rn(){if(Dt===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Dt.next;var t=Mt===null?ft.memoizedState:Mt.next;if(t!==null)Mt=t,Dt=e;else{if(e===null)throw Error(B(310));Dt=e,e={memoizedState:Dt.memoizedState,baseState:Dt.baseState,baseQueue:Dt.baseQueue,queue:Dt.queue,next:null},Mt===null?ft.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function ks(e,t){return typeof t=="function"?t(e):t}function fh(e){var t=rn(),r=t.queue;if(r===null)throw Error(B(311));r.lastRenderedReducer=e;var n=Dt,o=n.baseQueue,a=r.pending;if(a!==null){if(o!==null){var i=o.next;o.next=a.next,a.next=i}n.baseQueue=o=a,r.pending=null}if(o!==null){a=o.next,n=n.baseState;var l=i=null,c=null,u=a;do{var d=u.lane;if((Aa&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var m={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=m,i=n):c=c.next=m,ft.lanes|=d,Ma|=d}u=u.next}while(u!==null&&u!==a);c===null?i=n:c.next=l,_n(n,t.memoizedState)||(pr=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do a=o.lane,ft.lanes|=a,Ma|=a,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ph(e){var t=rn(),r=t.queue;if(r===null)throw Error(B(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,a=t.memoizedState;if(o!==null){r.pending=null;var i=o=o.next;do a=e(a,i.action),i=i.next;while(i!==o);_n(a,t.memoizedState)||(pr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function mC(){}function hC(e,t){var r=ft,n=rn(),o=t(),a=!_n(n.memoizedState,o);if(a&&(n.memoizedState=o,pr=!0),n=n.queue,gy(yC.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Mt!==null&&Mt.memoizedState.tag&1){if(r.flags|=2048,js(9,vC.bind(null,r,n,o,t),void 0,null),zt===null)throw Error(B(349));Aa&30||gC(r,t,o)}return o}function gC(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function vC(e,t,r,n){t.value=r,t.getSnapshot=n,wC(t)&&_C(e)}function yC(e,t,r){return r(function(){wC(t)&&_C(e)})}function wC(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!_n(e,r)}catch{return!0}}function _C(e){var t=so(e,1);t!==null&&gn(t,e,1,-1)}function Pw(e){var t=On();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ks,lastRenderedState:e},t.queue=e,e=e.dispatch=oz.bind(null,ft,e),[t.memoizedState,e]}function js(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function bC(){return rn().memoizedState}function $u(e,t,r,n){var o=On();ft.flags|=e,o.memoizedState=js(1|t,r,void 0,n===void 0?null:n)}function rm(e,t,r,n){var o=rn();n=n===void 0?null:n;var a=void 0;if(Dt!==null){var i=Dt.memoizedState;if(a=i.destroy,n!==null&&py(n,i.deps)){o.memoizedState=js(t,r,a,n);return}}ft.flags|=e,o.memoizedState=js(1|t,r,a,n)}function $w(e,t){return $u(8390656,8,e,t)}function gy(e,t){return rm(2048,8,e,t)}function xC(e,t){return rm(4,2,e,t)}function EC(e,t){return rm(4,4,e,t)}function SC(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function PC(e,t,r){return r=r!=null?r.concat([e]):null,rm(4,4,SC.bind(null,t,e),r)}function vy(){}function $C(e,t){var r=rn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&py(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function OC(e,t){var r=rn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&py(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function CC(e,t,r){return Aa&21?(_n(r,t)||(r=RO(),ft.lanes|=r,Ma|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,pr=!0),e.memoizedState=r)}function rz(e,t){var r=Le;Le=r!==0&&4>r?r:4,e(!0);var n=dh.transition;dh.transition={};try{e(!1),t()}finally{Le=r,dh.transition=n}}function kC(){return rn().memoizedState}function nz(e,t,r){var n=Go(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},jC(e))RC(t,r);else if(r=lC(e,t,r,n),r!==null){var o=ir();gn(r,e,n,o),TC(r,t,n)}}function oz(e,t,r){var n=Go(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(jC(e))RC(t,o);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,l=a(i,r);if(o.hasEagerState=!0,o.eagerState=l,_n(l,i)){var c=t.interleaved;c===null?(o.next=o,sy(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}r=lC(e,t,o,n),r!==null&&(o=ir(),gn(r,e,n,o),TC(r,t,n))}}function jC(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function RC(e,t){os=id=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function TC(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Gv(e,r)}}var ld={readContext:tn,useCallback:Yt,useContext:Yt,useEffect:Yt,useImperativeHandle:Yt,useInsertionEffect:Yt,useLayoutEffect:Yt,useMemo:Yt,useReducer:Yt,useRef:Yt,useState:Yt,useDebugValue:Yt,useDeferredValue:Yt,useTransition:Yt,useMutableSource:Yt,useSyncExternalStore:Yt,useId:Yt,unstable_isNewReconciler:!1},az={readContext:tn,useCallback:function(e,t){return On().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:$w,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,$u(4194308,4,SC.bind(null,t,e),r)},useLayoutEffect:function(e,t){return $u(4194308,4,e,t)},useInsertionEffect:function(e,t){return $u(4,2,e,t)},useMemo:function(e,t){var r=On();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=On();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=nz.bind(null,ft,e),[n.memoizedState,e]},useRef:function(e){var t=On();return e={current:e},t.memoizedState=e},useState:Pw,useDebugValue:vy,useDeferredValue:function(e){return On().memoizedState=e},useTransition:function(){var e=Pw(!1),t=e[0];return e=rz.bind(null,e[1]),On().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ft,o=On();if(nt){if(r===void 0)throw Error(B(407));r=r()}else{if(r=t(),zt===null)throw Error(B(349));Aa&30||gC(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,$w(yC.bind(null,n,a,e),[e]),n.flags|=2048,js(9,vC.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=On(),t=zt.identifierPrefix;if(nt){var r=eo,n=Zn;r=(n&~(1<<32-hn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Cs++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=tz++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},iz={readContext:tn,useCallback:$C,useContext:tn,useEffect:gy,useImperativeHandle:PC,useInsertionEffect:xC,useLayoutEffect:EC,useMemo:OC,useReducer:fh,useRef:bC,useState:function(){return fh(ks)},useDebugValue:vy,useDeferredValue:function(e){var t=rn();return CC(t,Dt.memoizedState,e)},useTransition:function(){var e=fh(ks)[0],t=rn().memoizedState;return[e,t]},useMutableSource:mC,useSyncExternalStore:hC,useId:kC,unstable_isNewReconciler:!1},lz={readContext:tn,useCallback:$C,useContext:tn,useEffect:gy,useImperativeHandle:PC,useInsertionEffect:xC,useLayoutEffect:EC,useMemo:OC,useReducer:ph,useRef:bC,useState:function(){return ph(ks)},useDebugValue:vy,useDeferredValue:function(e){var t=rn();return Dt===null?t.memoizedState=e:CC(t,Dt.memoizedState,e)},useTransition:function(){var e=ph(ks)[0],t=rn().memoizedState;return[e,t]},useMutableSource:mC,useSyncExternalStore:hC,useId:kC,unstable_isNewReconciler:!1};function Zi(e,t){try{var r="",n=t;do r+=N6(n),n=n.return;while(n);var o=r}catch(a){o=`
86
- Error generating stack: `+a.message+`
87
- `+a.stack}return{value:e,source:t,stack:o,digest:null}}function mh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function kg(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var sz=typeof WeakMap=="function"?WeakMap:Map;function IC(e,t,r){r=to(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){cd||(cd=!0,Lg=n),kg(e,t)},r}function DC(e,t,r){r=to(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){kg(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){kg(e,t),typeof n!="function"&&(Qo===null?Qo=new Set([this]):Qo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Ow(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new sz;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=xz.bind(null,e,t,r),t.then(e,e))}function Cw(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kw(e,t,r,n,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=to(-1,1),t.tag=2,qo(r,t,1))),r.lanes|=1),e)}var cz=vo.ReactCurrentOwner,pr=!1;function ar(e,t,r,n){t.child=e===null?fC(t,null,r,n):Xi(t,e.child,r,n)}function jw(e,t,r,n,o){r=r.render;var a=t.ref;return Fi(t,o),n=my(e,t,r,n,a,o),r=hy(),e!==null&&!pr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,co(e,t,o)):(nt&&r&&ry(t),t.flags|=1,ar(e,t,n,o),t.child)}function Rw(e,t,r,n,o){if(e===null){var a=r.type;return typeof a=="function"&&!Py(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,NC(e,t,a,n,o)):(e=ju(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&o)){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:xs,r(i,n)&&e.ref===t.ref)return co(e,t,o)}return t.flags|=1,e=Ko(a,n),e.ref=t.ref,e.return=t,t.child=e}function NC(e,t,r,n,o){if(e!==null){var a=e.memoizedProps;if(xs(a,n)&&e.ref===t.ref)if(pr=!1,t.pendingProps=n=a,(e.lanes&o)!==0)e.flags&131072&&(pr=!0);else return t.lanes=e.lanes,co(e,t,o)}return jg(e,t,r,n,o)}function AC(e,t,r){var n=t.pendingProps,o=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ge(ji,jr),jr|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ge(ji,jr),jr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Ge(ji,jr),jr|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Ge(ji,jr),jr|=n;return ar(e,t,o,r),t.child}function MC(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function jg(e,t,r,n,o){var a=gr(r)?Da:rr.current;return a=Ki(t,a),Fi(t,o),r=my(e,t,r,n,a,o),n=hy(),e!==null&&!pr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,co(e,t,o)):(nt&&n&&ry(t),t.flags|=1,ar(e,t,r,o),t.child)}function Tw(e,t,r,n,o){if(gr(r)){var a=!0;Zu(t)}else a=!1;if(Fi(t,o),t.stateNode===null)Ou(e,t),uC(t,r,n),Cg(t,r,n,o),n=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=tn(u):(u=gr(r)?Da:rr.current,u=Ki(t,u));var d=r.getDerivedStateFromProps,m=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==n||c!==u)&&Ew(t,i,n,u),Do=!1;var h=t.memoizedState;i.state=h,od(t,n,i,o),c=t.memoizedState,l!==n||h!==c||hr.current||Do?(typeof d=="function"&&(Og(t,r,d,n),c=t.memoizedState),(l=Do||xw(t,r,l,n,h,c,u))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),i.props=n,i.state=c,i.context=u,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,sC(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:cn(t.type,l),i.props=u,m=t.pendingProps,h=i.context,c=r.contextType,typeof c=="object"&&c!==null?c=tn(c):(c=gr(r)?Da:rr.current,c=Ki(t,c));var g=r.getDerivedStateFromProps;(d=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==m||h!==c)&&Ew(t,i,n,c),Do=!1,h=t.memoizedState,i.state=h,od(t,n,i,o);var y=t.memoizedState;l!==m||h!==y||hr.current||Do?(typeof g=="function"&&(Og(t,r,g,n),y=t.memoizedState),(u=Do||xw(t,r,u,n,h,y,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,y,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,y,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),i.props=n,i.state=y,i.context=c,n=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return Rg(e,t,r,n,a,o)}function Rg(e,t,r,n,o,a){MC(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return o&&vw(t,r,!1),co(e,t,a);n=t.stateNode,cz.current=t;var l=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Xi(t,e.child,null,a),t.child=Xi(t,null,l,a)):ar(e,t,l,a),t.memoizedState=n.state,o&&vw(t,r,!0),t.child}function zC(e){var t=e.stateNode;t.pendingContext?gw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gw(e,t.context,!1),uy(e,t.containerInfo)}function Iw(e,t,r,n,o){return Yi(),oy(o),t.flags|=256,ar(e,t,r,n),t.child}var Tg={dehydrated:null,treeContext:null,retryLane:0};function Ig(e){return{baseLanes:e,cachePool:null,transitions:null}}function LC(e,t,r){var n=t.pendingProps,o=ut.current,a=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Ge(ut,o&1),e===null)return Pg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,a?(n=t.mode,a=t.child,i={mode:"hidden",children:i},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=am(i,n,0,null),e=Ra(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ig(r),t.memoizedState=Tg,e):yy(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return uz(e,t,i,n,l,o,r);if(a){a=n.fallback,i=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:n.children};return!(i&1)&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=Ko(o,c),n.subtreeFlags=o.subtreeFlags&14680064),l!==null?a=Ko(l,a):(a=Ra(a,i,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,i=e.child.memoizedState,i=i===null?Ig(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=Tg,n}return a=e.child,e=a.sibling,n=Ko(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function yy(e,t){return t=am({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Mc(e,t,r,n){return n!==null&&oy(n),Xi(t,e.child,null,r),e=yy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uz(e,t,r,n,o,a,i){if(r)return t.flags&256?(t.flags&=-257,n=mh(Error(B(422))),Mc(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,o=t.mode,n=am({mode:"visible",children:n.children},o,0,null),a=Ra(a,o,i,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Xi(t,e.child,null,i),t.child.memoizedState=Ig(i),t.memoizedState=Tg,a);if(!(t.mode&1))return Mc(e,t,i,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(B(419)),n=mh(a,n,void 0),Mc(e,t,i,n)}if(l=(i&e.childLanes)!==0,pr||l){if(n=zt,n!==null){switch(i&-i){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=o&(n.suspendedLanes|i)?0:o,o!==0&&o!==a.retryLane&&(a.retryLane=o,so(e,o),gn(n,e,o,-1))}return Sy(),n=mh(Error(B(421))),Mc(e,t,i,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Ez.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,Tr=Ho(o.nextSibling),Ar=t,nt=!0,fn=null,e!==null&&(Kr[Yr++]=Zn,Kr[Yr++]=eo,Kr[Yr++]=Na,Zn=e.id,eo=e.overflow,Na=t),t=yy(t,n.children),t.flags|=4096,t)}function Dw(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),$g(e.return,t,r)}function hh(e,t,r,n,o){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=o)}function FC(e,t,r){var n=t.pendingProps,o=n.revealOrder,a=n.tail;if(ar(e,t,n.children,r),n=ut.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dw(e,r,t);else if(e.tag===19)Dw(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ge(ut,n),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&ad(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),hh(t,!1,o,r,a);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ad(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}hh(t,!0,r,null,a);break;case"together":hh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ou(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function co(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ma|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,r=Ko(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ko(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function dz(e,t,r){switch(t.tag){case 3:zC(t),Yi();break;case 5:pC(t);break;case 1:gr(t.type)&&Zu(t);break;case 4:uy(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Ge(rd,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ge(ut,ut.current&1),t.flags|=128,null):r&t.child.childLanes?LC(e,t,r):(Ge(ut,ut.current&1),e=co(e,t,r),e!==null?e.sibling:null);Ge(ut,ut.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return FC(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ge(ut,ut.current),n)break;return null;case 22:case 23:return t.lanes=0,AC(e,t,r)}return co(e,t,r)}var VC,Dg,BC,UC;VC=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Dg=function(){};BC=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,$a(Mn.current);var a=null;switch(r){case"input":o=rg(e,o),n=rg(e,n),a=[];break;case"select":o=pt({},o,{value:void 0}),n=pt({},n,{value:void 0}),a=[];break;case"textarea":o=ag(e,o),n=ag(e,n),a=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Xu)}lg(r,n);var i;r=null;for(u in o)if(!n.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(hs.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in n){var c=n[u];if(l=o!=null?o[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(a||(a=[]),a.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(hs.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Ze("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};UC=function(e,t,r,n){r!==n&&(t.flags|=4)};function Rl(e,t){if(!nt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function fz(e,t,r){var n=t.pendingProps;switch(ny(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(t),null;case 1:return gr(t.type)&&Ju(),Xt(t),null;case 3:return n=t.stateNode,Ji(),et(hr),et(rr),fy(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Nc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,fn!==null&&(Bg(fn),fn=null))),Dg(e,t),Xt(t),null;case 5:dy(t);var o=$a(Os.current);if(r=t.type,e!==null&&t.stateNode!=null)BC(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(B(166));return Xt(t),null}if(e=$a(Mn.current),Nc(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Dn]=t,n[Ps]=a,e=(t.mode&1)!==0,r){case"dialog":Ze("cancel",n),Ze("close",n);break;case"iframe":case"object":case"embed":Ze("load",n);break;case"video":case"audio":for(o=0;o<Gl.length;o++)Ze(Gl[o],n);break;case"source":Ze("error",n);break;case"img":case"image":case"link":Ze("error",n),Ze("load",n);break;case"details":Ze("toggle",n);break;case"input":U1(n,a),Ze("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Ze("invalid",n);break;case"textarea":H1(n,a),Ze("invalid",n)}lg(r,a),o=null;for(var i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&Dc(n.textContent,l,e),o=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Dc(n.textContent,l,e),o=["children",""+l]):hs.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&Ze("scroll",n)}switch(r){case"input":$c(n),W1(n,a,!0);break;case"textarea":$c(n),q1(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=Xu)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=gO(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Dn]=t,e[Ps]=n,VC(e,t,!1,!1),t.stateNode=e;e:{switch(i=sg(r,n),r){case"dialog":Ze("cancel",e),Ze("close",e),o=n;break;case"iframe":case"object":case"embed":Ze("load",e),o=n;break;case"video":case"audio":for(o=0;o<Gl.length;o++)Ze(Gl[o],e);o=n;break;case"source":Ze("error",e),o=n;break;case"img":case"image":case"link":Ze("error",e),Ze("load",e),o=n;break;case"details":Ze("toggle",e),o=n;break;case"input":U1(e,n),o=rg(e,n),Ze("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=pt({},n,{value:void 0}),Ze("invalid",e);break;case"textarea":H1(e,n),o=ag(e,n),Ze("invalid",e);break;default:o=n}lg(r,o),l=o;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?wO(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&vO(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&gs(e,c):typeof c=="number"&&gs(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(hs.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Ze("scroll",e):c!=null&&Bv(e,a,c,i))}switch(r){case"input":$c(e),W1(e,n,!1);break;case"textarea":$c(e),q1(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Zo(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?Ai(e,!!n.multiple,a,!1):n.defaultValue!=null&&Ai(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Xu)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xt(t),null;case 6:if(e&&t.stateNode!=null)UC(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(B(166));if(r=$a(Os.current),$a(Mn.current),Nc(t)){if(n=t.stateNode,r=t.memoizedProps,n[Dn]=t,(a=n.nodeValue!==r)&&(e=Ar,e!==null))switch(e.tag){case 3:Dc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Dc(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Dn]=t,t.stateNode=n}return Xt(t),null;case 13:if(et(ut),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(nt&&Tr!==null&&t.mode&1&&!(t.flags&128))iC(),Yi(),t.flags|=98560,a=!1;else if(a=Nc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(B(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(B(317));a[Dn]=t}else Yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xt(t),a=!1}else fn!==null&&(Bg(fn),fn=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||ut.current&1?Nt===0&&(Nt=3):Sy())),t.updateQueue!==null&&(t.flags|=4),Xt(t),null);case 4:return Ji(),Dg(e,t),e===null&&Es(t.stateNode.containerInfo),Xt(t),null;case 10:return ly(t.type._context),Xt(t),null;case 17:return gr(t.type)&&Ju(),Xt(t),null;case 19:if(et(ut),a=t.memoizedState,a===null)return Xt(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Rl(a,!1);else{if(Nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ad(e),i!==null){for(t.flags|=128,Rl(a,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,i=a.alternate,i===null?(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=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ge(ut,ut.current&1|2),t.child}e=e.sibling}a.tail!==null&&Et()>el&&(t.flags|=128,n=!0,Rl(a,!1),t.lanes=4194304)}else{if(!n)if(e=ad(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Rl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!nt)return Xt(t),null}else 2*Et()-a.renderingStartTime>el&&r!==1073741824&&(t.flags|=128,n=!0,Rl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Et(),t.sibling=null,r=ut.current,Ge(ut,n?r&1|2:r&1),t):(Xt(t),null);case 22:case 23:return Ey(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?jr&1073741824&&(Xt(t),t.subtreeFlags&6&&(t.flags|=8192)):Xt(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function pz(e,t){switch(ny(t),t.tag){case 1:return gr(t.type)&&Ju(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ji(),et(hr),et(rr),fy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dy(t),null;case 13:if(et(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return et(ut),null;case 4:return Ji(),null;case 10:return ly(t.type._context),null;case 22:case 23:return Ey(),null;case 24:return null;default:return null}}var zc=!1,er=!1,mz=typeof WeakSet=="function"?WeakSet:Set,re=null;function ki(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){mt(e,t,n)}else r.current=null}function Ng(e,t,r){try{r()}catch(n){mt(e,t,n)}}var Nw=!1;function hz(e,t){if(yg=Gu,e=QO(),ty(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,l=-1,c=-1,u=0,d=0,m=e,h=null;t:for(;;){for(var g;m!==r||o!==0&&m.nodeType!==3||(l=i+o),m!==a||n!==0&&m.nodeType!==3||(c=i+n),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)h=m,m=g;for(;;){if(m===e)break t;if(h===r&&++u===o&&(l=i),h===a&&++d===n&&(c=i),(g=m.nextSibling)!==null)break;m=h,h=m.parentNode}m=g}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(wg={focusedElem:e,selectionRange:r},Gu=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,E=y.memoizedState,w=t.stateNode,v=w.getSnapshotBeforeUpdate(t.elementType===t.type?_:cn(t.type,_),E);w.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(x){mt(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return y=Nw,Nw=!1,y}function as(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,a!==void 0&&Ng(t,r,a)}o=o.next}while(o!==n)}}function nm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ag(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function WC(e){var t=e.alternate;t!==null&&(e.alternate=null,WC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Dn],delete t[Ps],delete t[xg],delete t[XM],delete t[JM])),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 HC(e){return e.tag===5||e.tag===3||e.tag===4}function Aw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||HC(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mg(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Xu));else if(n!==4&&(e=e.child,e!==null))for(Mg(e,t,r),e=e.sibling;e!==null;)Mg(e,t,r),e=e.sibling}function zg(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(zg(e,t,r),e=e.sibling;e!==null;)zg(e,t,r),e=e.sibling}var Bt=null,un=!1;function jo(e,t,r){for(r=r.child;r!==null;)qC(e,t,r),r=r.sibling}function qC(e,t,r){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(Kp,r)}catch{}switch(r.tag){case 5:er||ki(r,t);case 6:var n=Bt,o=un;Bt=null,jo(e,t,r),Bt=n,un=o,Bt!==null&&(un?(e=Bt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Bt.removeChild(r.stateNode));break;case 18:Bt!==null&&(un?(e=Bt,r=r.stateNode,e.nodeType===8?sh(e.parentNode,r):e.nodeType===1&&sh(e,r),_s(e)):sh(Bt,r.stateNode));break;case 4:n=Bt,o=un,Bt=r.stateNode.containerInfo,un=!0,jo(e,t,r),Bt=n,un=o;break;case 0:case 11:case 14:case 15:if(!er&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var a=o,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&Ng(r,t,i),o=o.next}while(o!==n)}jo(e,t,r);break;case 1:if(!er&&(ki(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){mt(r,t,l)}jo(e,t,r);break;case 21:jo(e,t,r);break;case 22:r.mode&1?(er=(n=er)||r.memoizedState!==null,jo(e,t,r),er=n):jo(e,t,r);break;default:jo(e,t,r)}}function Mw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new mz),t.forEach(function(n){var o=Sz.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function ln(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var a=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:Bt=l.stateNode,un=!1;break e;case 3:Bt=l.stateNode.containerInfo,un=!0;break e;case 4:Bt=l.stateNode.containerInfo,un=!0;break e}l=l.return}if(Bt===null)throw Error(B(160));qC(a,i,o),Bt=null,un=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){mt(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)QC(t,e),t=t.sibling}function QC(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ln(t,e),Sn(e),n&4){try{as(3,e,e.return),nm(3,e)}catch(_){mt(e,e.return,_)}try{as(5,e,e.return)}catch(_){mt(e,e.return,_)}}break;case 1:ln(t,e),Sn(e),n&512&&r!==null&&ki(r,r.return);break;case 5:if(ln(t,e),Sn(e),n&512&&r!==null&&ki(r,r.return),e.flags&32){var o=e.stateNode;try{gs(o,"")}catch(_){mt(e,e.return,_)}}if(n&4&&(o=e.stateNode,o!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&mO(o,a),sg(l,i);var u=sg(l,a);for(i=0;i<c.length;i+=2){var d=c[i],m=c[i+1];d==="style"?wO(o,m):d==="dangerouslySetInnerHTML"?vO(o,m):d==="children"?gs(o,m):Bv(o,d,m,u)}switch(l){case"input":ng(o,a);break;case"textarea":hO(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var g=a.value;g!=null?Ai(o,!!a.multiple,g,!1):h!==!!a.multiple&&(a.defaultValue!=null?Ai(o,!!a.multiple,a.defaultValue,!0):Ai(o,!!a.multiple,a.multiple?[]:"",!1))}o[Ps]=a}catch(_){mt(e,e.return,_)}}break;case 6:if(ln(t,e),Sn(e),n&4){if(e.stateNode===null)throw Error(B(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(_){mt(e,e.return,_)}}break;case 3:if(ln(t,e),Sn(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{_s(t.containerInfo)}catch(_){mt(e,e.return,_)}break;case 4:ln(t,e),Sn(e);break;case 13:ln(t,e),Sn(e),o=e.child,o.flags&8192&&(a=o.memoizedState!==null,o.stateNode.isHidden=a,!a||o.alternate!==null&&o.alternate.memoizedState!==null||(by=Et())),n&4&&Mw(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(er=(u=er)||d,ln(t,e),er=u):ln(t,e),Sn(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(re=e,d=e.child;d!==null;){for(m=re=d;re!==null;){switch(h=re,g=h.child,h.tag){case 0:case 11:case 14:case 15:as(4,h,h.return);break;case 1:ki(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(_){mt(n,r,_)}}break;case 5:ki(h,h.return);break;case 22:if(h.memoizedState!==null){Lw(m);continue}}g!==null?(g.return=h,re=g):Lw(m)}d=d.sibling}e:for(d=null,m=e;;){if(m.tag===5){if(d===null){d=m;try{o=m.stateNode,u?(a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=m.stateNode,c=m.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=yO("display",i))}catch(_){mt(e,e.return,_)}}}else if(m.tag===6){if(d===null)try{m.stateNode.nodeValue=u?"":m.memoizedProps}catch(_){mt(e,e.return,_)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;d===m&&(d=null),m=m.return}d===m&&(d=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:ln(t,e),Sn(e),n&4&&Mw(e);break;case 21:break;default:ln(t,e),Sn(e)}}function Sn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(HC(r)){var n=r;break e}r=r.return}throw Error(B(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(gs(o,""),n.flags&=-33);var a=Aw(e);zg(e,a,o);break;case 3:case 4:var i=n.stateNode.containerInfo,l=Aw(e);Mg(e,l,i);break;default:throw Error(B(161))}}catch(c){mt(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gz(e,t,r){re=e,GC(e)}function GC(e,t,r){for(var n=(e.mode&1)!==0;re!==null;){var o=re,a=o.child;if(o.tag===22&&n){var i=o.memoizedState!==null||zc;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||er;l=zc;var u=er;if(zc=i,(er=c)&&!u)for(re=o;re!==null;)i=re,c=i.child,i.tag===22&&i.memoizedState!==null?Fw(o):c!==null?(c.return=i,re=c):Fw(o);for(;a!==null;)re=a,GC(a),a=a.sibling;re=o,zc=l,er=u}zw(e)}else o.subtreeFlags&8772&&a!==null?(a.return=o,re=a):zw(e)}}function zw(e){for(;re!==null;){var t=re;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:er||nm(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!er)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:cn(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&bw(t,a,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}bw(t,i,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var m=d.dehydrated;m!==null&&_s(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}er||t.flags&512&&Ag(t)}catch(h){mt(t,t.return,h)}}if(t===e){re=null;break}if(r=t.sibling,r!==null){r.return=t.return,re=r;break}re=t.return}}function Lw(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var r=t.sibling;if(r!==null){r.return=t.return,re=r;break}re=t.return}}function Fw(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{nm(4,t)}catch(c){mt(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(c){mt(t,o,c)}}var a=t.return;try{Ag(t)}catch(c){mt(t,a,c)}break;case 5:var i=t.return;try{Ag(t)}catch(c){mt(t,i,c)}}}catch(c){mt(t,t.return,c)}if(t===e){re=null;break}var l=t.sibling;if(l!==null){l.return=t.return,re=l;break}re=t.return}}var vz=Math.ceil,sd=vo.ReactCurrentDispatcher,wy=vo.ReactCurrentOwner,Zr=vo.ReactCurrentBatchConfig,Te=0,zt=null,kt=null,Wt=0,jr=0,ji=la(0),Nt=0,Rs=null,Ma=0,om=0,_y=0,is=null,fr=null,by=0,el=1/0,Yn=null,cd=!1,Lg=null,Qo=null,Lc=!1,Fo=null,ud=0,ls=0,Fg=null,Cu=-1,ku=0;function ir(){return Te&6?Et():Cu!==-1?Cu:Cu=Et()}function Go(e){return e.mode&1?Te&2&&Wt!==0?Wt&-Wt:ez.transition!==null?(ku===0&&(ku=RO()),ku):(e=Le,e!==0||(e=window.event,e=e===void 0?16:zO(e.type)),e):1}function gn(e,t,r,n){if(50<ls)throw ls=0,Fg=null,Error(B(185));Bs(e,r,n),(!(Te&2)||e!==zt)&&(e===zt&&(!(Te&2)&&(om|=r),Nt===4&&zo(e,Wt)),vr(e,n),r===1&&Te===0&&!(t.mode&1)&&(el=Et()+500,em&&sa()))}function vr(e,t){var r=e.callbackNode;eM(e,t);var n=Qu(e,e===zt?Wt:0);if(n===0)r!==null&&K1(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&K1(r),t===1)e.tag===0?ZM(Vw.bind(null,e)):nC(Vw.bind(null,e)),KM(function(){!(Te&6)&&sa()}),r=null;else{switch(TO(n)){case 1:r=Qv;break;case 4:r=kO;break;case 16:r=qu;break;case 536870912:r=jO;break;default:r=qu}r=r2(r,KC.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function KC(e,t){if(Cu=-1,ku=0,Te&6)throw Error(B(327));var r=e.callbackNode;if(Vi()&&e.callbackNode!==r)return null;var n=Qu(e,e===zt?Wt:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=dd(e,n);else{t=n;var o=Te;Te|=2;var a=XC();(zt!==e||Wt!==t)&&(Yn=null,el=Et()+500,ja(e,t));do try{_z();break}catch(l){YC(e,l)}while(1);iy(),sd.current=a,Te=o,kt!==null?t=0:(zt=null,Wt=0,t=Nt)}if(t!==0){if(t===2&&(o=pg(e),o!==0&&(n=o,t=Vg(e,o))),t===1)throw r=Rs,ja(e,0),zo(e,n),vr(e,Et()),r;if(t===6)zo(e,n);else{if(o=e.current.alternate,!(n&30)&&!yz(o)&&(t=dd(e,n),t===2&&(a=pg(e),a!==0&&(n=a,t=Vg(e,a))),t===1))throw r=Rs,ja(e,0),zo(e,n),vr(e,Et()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(B(345));case 2:wa(e,fr,Yn);break;case 3:if(zo(e,n),(n&130023424)===n&&(t=by+500-Et(),10<t)){if(Qu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){ir(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=bg(wa.bind(null,e,fr,Yn),t);break}wa(e,fr,Yn);break;case 4:if(zo(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var i=31-hn(n);a=1<<i,i=t[i],i>o&&(o=i),n&=~a}if(n=o,n=Et()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*vz(n/1960))-n,10<n){e.timeoutHandle=bg(wa.bind(null,e,fr,Yn),n);break}wa(e,fr,Yn);break;case 5:wa(e,fr,Yn);break;default:throw Error(B(329))}}}return vr(e,Et()),e.callbackNode===r?KC.bind(null,e):null}function Vg(e,t){var r=is;return e.current.memoizedState.isDehydrated&&(ja(e,t).flags|=256),e=dd(e,t),e!==2&&(t=fr,fr=r,t!==null&&Bg(t)),e}function Bg(e){fr===null?fr=e:fr.push.apply(fr,e)}function yz(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],a=o.getSnapshot;o=o.value;try{if(!_n(a(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zo(e,t){for(t&=~_y,t&=~om,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-hn(t),n=1<<r;e[r]=-1,t&=~n}}function Vw(e){if(Te&6)throw Error(B(327));Vi();var t=Qu(e,0);if(!(t&1))return vr(e,Et()),null;var r=dd(e,t);if(e.tag!==0&&r===2){var n=pg(e);n!==0&&(t=n,r=Vg(e,n))}if(r===1)throw r=Rs,ja(e,0),zo(e,t),vr(e,Et()),r;if(r===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wa(e,fr,Yn),vr(e,Et()),null}function xy(e,t){var r=Te;Te|=1;try{return e(t)}finally{Te=r,Te===0&&(el=Et()+500,em&&sa())}}function za(e){Fo!==null&&Fo.tag===0&&!(Te&6)&&Vi();var t=Te;Te|=1;var r=Zr.transition,n=Le;try{if(Zr.transition=null,Le=1,e)return e()}finally{Le=n,Zr.transition=r,Te=t,!(Te&6)&&sa()}}function Ey(){jr=ji.current,et(ji)}function ja(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,GM(r)),kt!==null)for(r=kt.return;r!==null;){var n=r;switch(ny(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Ju();break;case 3:Ji(),et(hr),et(rr),fy();break;case 5:dy(n);break;case 4:Ji();break;case 13:et(ut);break;case 19:et(ut);break;case 10:ly(n.type._context);break;case 22:case 23:Ey()}r=r.return}if(zt=e,kt=e=Ko(e.current,null),Wt=jr=t,Nt=0,Rs=null,_y=om=Ma=0,fr=is=null,Pa!==null){for(t=0;t<Pa.length;t++)if(r=Pa[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,a=r.pending;if(a!==null){var i=a.next;a.next=o,n.next=i}r.pending=n}Pa=null}return e}function YC(e,t){do{var r=kt;try{if(iy(),Pu.current=ld,id){for(var n=ft.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}id=!1}if(Aa=0,Mt=Dt=ft=null,os=!1,Cs=0,wy.current=null,r===null||r.return===null){Nt=1,Rs=t,kt=null;break}e:{var a=e,i=r.return,l=r,c=t;if(t=Wt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,m=d.tag;if(!(d.mode&1)&&(m===0||m===11||m===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=Cw(i);if(g!==null){g.flags&=-257,kw(g,i,l,a,t),g.mode&1&&Ow(a,u,t),t=g,c=u;var y=t.updateQueue;if(y===null){var _=new Set;_.add(c),t.updateQueue=_}else y.add(c);break e}else{if(!(t&1)){Ow(a,u,t),Sy();break e}c=Error(B(426))}}else if(nt&&l.mode&1){var E=Cw(i);if(E!==null){!(E.flags&65536)&&(E.flags|=256),kw(E,i,l,a,t),oy(Zi(c,l));break e}}a=c=Zi(c,l),Nt!==4&&(Nt=2),is===null?is=[a]:is.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var w=IC(a,c,t);_w(a,w);break e;case 1:l=c;var v=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Qo===null||!Qo.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var x=DC(a,l,t);_w(a,x);break e}}a=a.return}while(a!==null)}ZC(r)}catch(P){t=P,kt===r&&r!==null&&(kt=r=r.return);continue}break}while(1)}function XC(){var e=sd.current;return sd.current=ld,e===null?ld:e}function Sy(){(Nt===0||Nt===3||Nt===2)&&(Nt=4),zt===null||!(Ma&268435455)&&!(om&268435455)||zo(zt,Wt)}function dd(e,t){var r=Te;Te|=2;var n=XC();(zt!==e||Wt!==t)&&(Yn=null,ja(e,t));do try{wz();break}catch(o){YC(e,o)}while(1);if(iy(),Te=r,sd.current=n,kt!==null)throw Error(B(261));return zt=null,Wt=0,Nt}function wz(){for(;kt!==null;)JC(kt)}function _z(){for(;kt!==null&&!H6();)JC(kt)}function JC(e){var t=t2(e.alternate,e,jr);e.memoizedProps=e.pendingProps,t===null?ZC(e):kt=t,wy.current=null}function ZC(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=pz(r,t),r!==null){r.flags&=32767,kt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Nt=6,kt=null;return}}else if(r=fz(r,t,jr),r!==null){kt=r;return}if(t=t.sibling,t!==null){kt=t;return}kt=t=e}while(t!==null);Nt===0&&(Nt=5)}function wa(e,t,r){var n=Le,o=Zr.transition;try{Zr.transition=null,Le=1,bz(e,t,r,n)}finally{Zr.transition=o,Le=n}return null}function bz(e,t,r,n){do Vi();while(Fo!==null);if(Te&6)throw Error(B(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(B(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(tM(e,a),e===zt&&(kt=zt=null,Wt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Lc||(Lc=!0,r2(qu,function(){return Vi(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Zr.transition,Zr.transition=null;var i=Le;Le=1;var l=Te;Te|=4,wy.current=null,hz(e,r),QC(r,e),VM(wg),Gu=!!yg,wg=yg=null,e.current=r,gz(r),q6(),Te=l,Le=i,Zr.transition=a}else e.current=r;if(Lc&&(Lc=!1,Fo=e,ud=o),a=e.pendingLanes,a===0&&(Qo=null),K6(r.stateNode),vr(e,Et()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(cd)throw cd=!1,e=Lg,Lg=null,e;return ud&1&&e.tag!==0&&Vi(),a=e.pendingLanes,a&1?e===Fg?ls++:(ls=0,Fg=e):ls=0,sa(),null}function Vi(){if(Fo!==null){var e=TO(ud),t=Zr.transition,r=Le;try{if(Zr.transition=null,Le=16>e?16:e,Fo===null)var n=!1;else{if(e=Fo,Fo=null,ud=0,Te&6)throw Error(B(331));var o=Te;for(Te|=4,re=e.current;re!==null;){var a=re,i=a.child;if(re.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(re=u;re!==null;){var d=re;switch(d.tag){case 0:case 11:case 15:as(8,d,a)}var m=d.child;if(m!==null)m.return=d,re=m;else for(;re!==null;){d=re;var h=d.sibling,g=d.return;if(WC(d),d===u){re=null;break}if(h!==null){h.return=g,re=h;break}re=g}}}var y=a.alternate;if(y!==null){var _=y.child;if(_!==null){y.child=null;do{var E=_.sibling;_.sibling=null,_=E}while(_!==null)}}re=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,re=i;else e:for(;re!==null;){if(a=re,a.flags&2048)switch(a.tag){case 0:case 11:case 15:as(9,a,a.return)}var w=a.sibling;if(w!==null){w.return=a.return,re=w;break e}re=a.return}}var v=e.current;for(re=v;re!==null;){i=re;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,re=b;else e:for(i=v;re!==null;){if(l=re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:nm(9,l)}}catch(P){mt(l,l.return,P)}if(l===i){re=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,re=x;break e}re=l.return}}if(Te=o,sa(),An&&typeof An.onPostCommitFiberRoot=="function")try{An.onPostCommitFiberRoot(Kp,e)}catch{}n=!0}return n}finally{Le=r,Zr.transition=t}}return!1}function Bw(e,t,r){t=Zi(r,t),t=IC(e,t,1),e=qo(e,t,1),t=ir(),e!==null&&(Bs(e,1,t),vr(e,t))}function mt(e,t,r){if(e.tag===3)Bw(e,e,r);else for(;t!==null;){if(t.tag===3){Bw(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Qo===null||!Qo.has(n))){e=Zi(r,e),e=DC(t,e,1),t=qo(t,e,1),e=ir(),t!==null&&(Bs(t,1,e),vr(t,e));break}}t=t.return}}function xz(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=ir(),e.pingedLanes|=e.suspendedLanes&r,zt===e&&(Wt&r)===r&&(Nt===4||Nt===3&&(Wt&130023424)===Wt&&500>Et()-by?ja(e,0):_y|=r),vr(e,t)}function e2(e,t){t===0&&(e.mode&1?(t=kc,kc<<=1,!(kc&130023424)&&(kc=4194304)):t=1);var r=ir();e=so(e,t),e!==null&&(Bs(e,t,r),vr(e,r))}function Ez(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),e2(e,r)}function Sz(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(B(314))}n!==null&&n.delete(t),e2(e,r)}var t2;t2=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||hr.current)pr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return pr=!1,dz(e,t,r);pr=!!(e.flags&131072)}else pr=!1,nt&&t.flags&1048576&&oC(t,td,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ou(e,t),e=t.pendingProps;var o=Ki(t,rr.current);Fi(t,r),o=my(null,t,n,e,o,r);var a=hy();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gr(n)?(a=!0,Zu(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,cy(t),o.updater=tm,t.stateNode=o,o._reactInternals=t,Cg(t,n,e,r),t=Rg(null,t,n,!0,a,r)):(t.tag=0,nt&&a&&ry(t),ar(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ou(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=$z(n),e=cn(n,e),o){case 0:t=jg(null,t,n,e,r);break e;case 1:t=Tw(null,t,n,e,r);break e;case 11:t=jw(null,t,n,e,r);break e;case 14:t=Rw(null,t,n,cn(n.type,e),r);break e}throw Error(B(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:cn(n,o),jg(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:cn(n,o),Tw(e,t,n,o,r);case 3:e:{if(zC(t),e===null)throw Error(B(387));n=t.pendingProps,a=t.memoizedState,o=a.element,sC(e,t),od(t,n,null,r);var i=t.memoizedState;if(n=i.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){o=Zi(Error(B(423)),t),t=Iw(e,t,n,r,o);break e}else if(n!==o){o=Zi(Error(B(424)),t),t=Iw(e,t,n,r,o);break e}else for(Tr=Ho(t.stateNode.containerInfo.firstChild),Ar=t,nt=!0,fn=null,r=fC(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Yi(),n===o){t=co(e,t,r);break e}ar(e,t,n,r)}t=t.child}return t;case 5:return pC(t),e===null&&Pg(t),n=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,_g(n,o)?i=null:a!==null&&_g(n,a)&&(t.flags|=32),MC(e,t),ar(e,t,i,r),t.child;case 6:return e===null&&Pg(t),null;case 13:return LC(e,t,r);case 4:return uy(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Xi(t,null,n,r):ar(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:cn(n,o),jw(e,t,n,o,r);case 7:return ar(e,t,t.pendingProps,r),t.child;case 8:return ar(e,t,t.pendingProps.children,r),t.child;case 12:return ar(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Ge(rd,n._currentValue),n._currentValue=i,a!==null)if(_n(a.value,i)){if(a.children===o.children&&!hr.current){t=co(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){i=a.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(a.tag===1){c=to(-1,r&-r),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,c=a.alternate,c!==null&&(c.lanes|=r),$g(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(B(341));i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),$g(i,r,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}ar(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Fi(t,r),o=tn(o),n=n(o),t.flags|=1,ar(e,t,n,r),t.child;case 14:return n=t.type,o=cn(n,t.pendingProps),o=cn(n.type,o),Rw(e,t,n,o,r);case 15:return NC(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:cn(n,o),Ou(e,t),t.tag=1,gr(n)?(e=!0,Zu(t)):e=!1,Fi(t,r),uC(t,n,o),Cg(t,n,o,r),Rg(null,t,n,!0,e,r);case 19:return FC(e,t,r);case 22:return AC(e,t,r)}throw Error(B(156,t.tag))};function r2(e,t){return CO(e,t)}function Pz(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xr(e,t,r,n){return new Pz(e,t,r,n)}function Py(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $z(e){if(typeof e=="function")return Py(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Wv)return 11;if(e===Hv)return 14}return 2}function Ko(e,t){var r=e.alternate;return r===null?(r=Xr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function ju(e,t,r,n,o,a){var i=2;if(n=e,typeof e=="function")Py(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case _i:return Ra(r.children,o,a,t);case Uv:i=8,o|=8;break;case Jh:return e=Xr(12,r,t,o|2),e.elementType=Jh,e.lanes=a,e;case Zh:return e=Xr(13,r,t,o),e.elementType=Zh,e.lanes=a,e;case eg:return e=Xr(19,r,t,o),e.elementType=eg,e.lanes=a,e;case dO:return am(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cO:i=10;break e;case uO:i=9;break e;case Wv:i=11;break e;case Hv:i=14;break e;case Io:i=16,n=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=Xr(i,r,t,o),t.elementType=e,t.type=n,t.lanes=a,t}function Ra(e,t,r,n){return e=Xr(7,e,n,t),e.lanes=r,e}function am(e,t,r,n){return e=Xr(22,e,n,t),e.elementType=dO,e.lanes=r,e.stateNode={isHidden:!1},e}function gh(e,t,r){return e=Xr(6,e,null,t),e.lanes=r,e}function vh(e,t,r){return t=Xr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Oz(e,t,r,n,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=Xm(0),this.expirationTimes=Xm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xm(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function $y(e,t,r,n,o,a,i,l,c){return e=new Oz(e,t,r,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Xr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},cy(a),e}function Cz(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function n2(e){if(!e)return ea;e=e._reactInternals;e:{if(Ga(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var r=e.type;if(gr(r))return rC(e,r,t)}return t}function o2(e,t,r,n,o,a,i,l,c){return e=$y(r,n,!0,e,o,a,i,l,c),e.context=n2(null),r=e.current,n=ir(),o=Go(r),a=to(n,o),a.callback=t??null,qo(r,a,o),e.current.lanes=o,Bs(e,o,n),vr(e,n),e}function im(e,t,r,n){var o=t.current,a=ir(),i=Go(o);return r=n2(r),t.context===null?t.context=r:t.pendingContext=r,t=to(a,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=qo(o,t,i),e!==null&&(gn(e,o,i,a),Su(e,o,i)),i}function fd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Uw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Oy(e,t){Uw(e,t),(e=e.alternate)&&Uw(e,t)}function kz(){return null}var a2=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cy(e){this._internalRoot=e}lm.prototype.render=Cy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));im(e,t,null,null)};lm.prototype.unmount=Cy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;za(function(){im(null,e,null,null)}),t[lo]=null}};function lm(e){this._internalRoot=e}lm.prototype.unstable_scheduleHydration=function(e){if(e){var t=NO();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Mo.length&&t!==0&&t<Mo[r].priority;r++);Mo.splice(r,0,e),r===0&&MO(e)}};function ky(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function sm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ww(){}function jz(e,t,r,n,o){if(o){if(typeof n=="function"){var a=n;n=function(){var u=fd(i);a.call(u)}}var i=o2(t,n,e,0,null,!1,!1,"",Ww);return e._reactRootContainer=i,e[lo]=i.current,Es(e.nodeType===8?e.parentNode:e),za(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var l=n;n=function(){var u=fd(c);l.call(u)}}var c=$y(e,0,!1,null,null,!1,!1,"",Ww);return e._reactRootContainer=c,e[lo]=c.current,Es(e.nodeType===8?e.parentNode:e),za(function(){im(t,c,r,n)}),c}function cm(e,t,r,n,o){var a=r._reactRootContainer;if(a){var i=a;if(typeof o=="function"){var l=o;o=function(){var c=fd(i);l.call(c)}}im(t,i,e,o)}else i=jz(r,t,e,o,n);return fd(i)}IO=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ql(t.pendingLanes);r!==0&&(Gv(t,r|1),vr(t,Et()),!(Te&6)&&(el=Et()+500,sa()))}break;case 13:za(function(){var n=so(e,1);if(n!==null){var o=ir();gn(n,e,1,o)}}),Oy(e,1)}};Kv=function(e){if(e.tag===13){var t=so(e,134217728);if(t!==null){var r=ir();gn(t,e,134217728,r)}Oy(e,134217728)}};DO=function(e){if(e.tag===13){var t=Go(e),r=so(e,t);if(r!==null){var n=ir();gn(r,e,t,n)}Oy(e,t)}};NO=function(){return Le};AO=function(e,t){var r=Le;try{return Le=e,t()}finally{Le=r}};ug=function(e,t,r){switch(t){case"input":if(ng(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=Zp(n);if(!o)throw Error(B(90));pO(n),ng(n,o)}}}break;case"textarea":hO(e,r);break;case"select":t=r.value,t!=null&&Ai(e,!!r.multiple,t,!1)}};xO=xy;EO=za;var Rz={usingClientEntryPoint:!1,Events:[Ws,Si,Zp,_O,bO,xy]},Tl={findFiberByHostInstance:Sa,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Tz={bundleType:Tl.bundleType,version:Tl.version,rendererPackageName:Tl.rendererPackageName,rendererConfig:Tl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=$O(e),e===null?null:e.stateNode},findFiberByHostInstance:Tl.findFiberByHostInstance||kz,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fc.isDisabled&&Fc.supportsFiber)try{Kp=Fc.inject(Tz),An=Fc}catch{}}Vr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Rz;Vr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ky(t))throw Error(B(200));return Cz(e,t,null,r)};Vr.createRoot=function(e,t){if(!ky(e))throw Error(B(299));var r=!1,n="",o=a2;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=$y(e,1,!1,null,null,r,!1,n,o),e[lo]=t.current,Es(e.nodeType===8?e.parentNode:e),new Cy(t)};Vr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=$O(t),e=e===null?null:e.stateNode,e};Vr.flushSync=function(e){return za(e)};Vr.hydrate=function(e,t,r){if(!sm(t))throw Error(B(200));return cm(null,e,t,!0,r)};Vr.hydrateRoot=function(e,t,r){if(!ky(e))throw Error(B(405));var n=r!=null&&r.hydratedSources||null,o=!1,a="",i=a2;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=o2(t,null,e,1,r??null,o,!1,a,i),e[lo]=t.current,Es(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new lm(t)};Vr.render=function(e,t,r){if(!sm(t))throw Error(B(200));return cm(null,e,t,!1,r)};Vr.unmountComponentAtNode=function(e){if(!sm(e))throw Error(B(40));return e._reactRootContainer?(za(function(){cm(null,null,e,!1,function(){e._reactRootContainer=null,e[lo]=null})}),!0):!1};Vr.unstable_batchedUpdates=xy;Vr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!sm(r))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return cm(e,t,r,!1,n)};Vr.version="18.2.0-next-9e3b772b8-20220608";function i2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i2)}catch(e){console.error(e)}}i2(),oO.exports=Vr;var qs=oO.exports;const yh=Pv(qs);var Iz=Object.defineProperty,Dz=Object.defineProperties,Nz=Object.getOwnPropertyDescriptors,Hw=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,Mz=Object.prototype.propertyIsEnumerable,qw=(e,t,r)=>t in e?Iz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ug=(e,t)=>{for(var r in t||(t={}))Az.call(t,r)&&qw(e,r,t[r]);if(Hw)for(var r of Hw(t))Mz.call(t,r)&&qw(e,r,t[r]);return e},Qw=(e,t)=>Dz(e,Nz(t));const zz=["subtle","filled","outline","light","default","transparent","gradient"],Vc={xs:S(18),sm:S(22),md:S(28),lg:S(34),xl:S(44)};function Lz({variant:e,theme:t,color:r,gradient:n}){const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?{border:0,backgroundImage:o.background,color:o.color,"&:hover":t.fn.hover({backgroundSize:"200%"})}:zz.includes(e)?Ug({border:`${S(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var Fz=W((e,{radius:t,color:r,gradient:n},{variant:o,size:a})=>({root:Qw(Ug({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:N({size:a,sizes:Vc}),minHeight:N({size:a,sizes:Vc}),width:N({size:a,sizes:Vc}),minWidth:N({size:a,sizes:Vc})},Lz({variant:o,theme:e,color:r,gradient:n})),{"&:active":e.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:e.colors.gray[e.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),borderColor:o==="transparent"?void 0:e.fn.themeColor("gray",e.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":Qw(Ug({content:'""'},e.fn.cover(S(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}})}));const Vz=Fz;var Bz=Object.defineProperty,pd=Object.getOwnPropertySymbols,l2=Object.prototype.hasOwnProperty,s2=Object.prototype.propertyIsEnumerable,Gw=(e,t,r)=>t in e?Bz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kw=(e,t)=>{for(var r in t||(t={}))l2.call(t,r)&&Gw(e,r,t[r]);if(pd)for(var r of pd(t))s2.call(t,r)&&Gw(e,r,t[r]);return e},Yw=(e,t)=>{var r={};for(var n in e)l2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pd)for(var n of pd(e))t.indexOf(n)<0&&s2.call(e,n)&&(r[n]=e[n]);return r};function Uz(e){var t=e,{size:r,color:n}=t,o=Yw(t,["size","color"]);const a=o,{style:i}=a,l=Yw(a,["style"]);return s.createElement("svg",Kw({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:Kw({width:r},i)},l),s.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},s.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var Wz=Object.defineProperty,md=Object.getOwnPropertySymbols,c2=Object.prototype.hasOwnProperty,u2=Object.prototype.propertyIsEnumerable,Xw=(e,t,r)=>t in e?Wz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jw=(e,t)=>{for(var r in t||(t={}))c2.call(t,r)&&Xw(e,r,t[r]);if(md)for(var r of md(t))u2.call(t,r)&&Xw(e,r,t[r]);return e},Zw=(e,t)=>{var r={};for(var n in e)c2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&md)for(var n of md(e))t.indexOf(n)<0&&u2.call(e,n)&&(r[n]=e[n]);return r};function Hz(e){var t=e,{size:r,color:n}=t,o=Zw(t,["size","color"]);const a=o,{style:i}=a,l=Zw(a,["style"]);return s.createElement("svg",Jw({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:Jw({width:r,height:r},i)},l),s.createElement("g",{fill:"none",fillRule:"evenodd"},s.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},s.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),s.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},s.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var qz=Object.defineProperty,hd=Object.getOwnPropertySymbols,d2=Object.prototype.hasOwnProperty,f2=Object.prototype.propertyIsEnumerable,e_=(e,t,r)=>t in e?qz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,t_=(e,t)=>{for(var r in t||(t={}))d2.call(t,r)&&e_(e,r,t[r]);if(hd)for(var r of hd(t))f2.call(t,r)&&e_(e,r,t[r]);return e},r_=(e,t)=>{var r={};for(var n in e)d2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hd)for(var n of hd(e))t.indexOf(n)<0&&f2.call(e,n)&&(r[n]=e[n]);return r};function Qz(e){var t=e,{size:r,color:n}=t,o=r_(t,["size","color"]);const a=o,{style:i}=a,l=r_(a,["style"]);return s.createElement("svg",t_({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:t_({width:r},i)},l),s.createElement("circle",{cx:"15",cy:"15",r:"15"},s.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},s.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),s.createElement("circle",{cx:"105",cy:"15",r:"15"},s.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),s.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Gz=Object.defineProperty,gd=Object.getOwnPropertySymbols,p2=Object.prototype.hasOwnProperty,m2=Object.prototype.propertyIsEnumerable,n_=(e,t,r)=>t in e?Gz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kz=(e,t)=>{for(var r in t||(t={}))p2.call(t,r)&&n_(e,r,t[r]);if(gd)for(var r of gd(t))m2.call(t,r)&&n_(e,r,t[r]);return e},Yz=(e,t)=>{var r={};for(var n in e)p2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gd)for(var n of gd(e))t.indexOf(n)<0&&m2.call(e,n)&&(r[n]=e[n]);return r};const wh={bars:Uz,oval:Hz,dots:Qz},Xz={xs:S(18),sm:S(22),md:S(36),lg:S(44),xl:S(58)},Jz={size:"md"};function Un(e){const t=H("Loader",Jz,e),{size:r,color:n,variant:o}=t,a=Yz(t,["size","color","variant"]),i=nr(),l=o in wh?o:i.loader;return s.createElement(ue,Kz({role:"presentation",component:wh[l]||wh.bars,size:N({size:r,sizes:Xz}),color:i.fn.variant({variant:"filled",primaryFallback:!1,color:n||i.primaryColor}).background},a))}Un.displayName="@mantine/core/Loader";var Zz=Object.defineProperty,vd=Object.getOwnPropertySymbols,h2=Object.prototype.hasOwnProperty,g2=Object.prototype.propertyIsEnumerable,o_=(e,t,r)=>t in e?Zz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a_=(e,t)=>{for(var r in t||(t={}))h2.call(t,r)&&o_(e,r,t[r]);if(vd)for(var r of vd(t))g2.call(t,r)&&o_(e,r,t[r]);return e},eL=(e,t)=>{var r={};for(var n in e)h2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vd)for(var n of vd(e))t.indexOf(n)<0&&g2.call(e,n)&&(r[n]=e[n]);return r};const tL={color:"gray",size:"md",variant:"subtle"},v2=f.forwardRef((e,t)=>{const r=H("ActionIcon",tL,e),{className:n,color:o,children:a,radius:i,size:l,variant:c,gradient:u,disabled:d,loaderProps:m,loading:h,unstyled:g,__staticSelector:y}=r,_=eL(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:E,cx:w,theme:v}=Vz({radius:i,color:o,gradient:u},{name:["ActionIcon",y],unstyled:g,size:l,variant:c}),b=s.createElement(Un,a_({color:v.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},m));return s.createElement(Jo,a_({className:w(E.root,n),ref:t,disabled:d,"data-disabled":d||void 0,"data-loading":h||void 0,unstyled:g},_),h?b:a)});v2.displayName="@mantine/core/ActionIcon";const Mr=v2;var rL=Object.defineProperty,nL=Object.defineProperties,oL=Object.getOwnPropertyDescriptors,yd=Object.getOwnPropertySymbols,y2=Object.prototype.hasOwnProperty,w2=Object.prototype.propertyIsEnumerable,i_=(e,t,r)=>t in e?rL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aL=(e,t)=>{for(var r in t||(t={}))y2.call(t,r)&&i_(e,r,t[r]);if(yd)for(var r of yd(t))w2.call(t,r)&&i_(e,r,t[r]);return e},iL=(e,t)=>nL(e,oL(t)),lL=(e,t)=>{var r={};for(var n in e)y2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yd)for(var n of yd(e))t.indexOf(n)<0&&w2.call(e,n)&&(r[n]=e[n]);return r};function jy(e){const t=H("Portal",{},e),{children:r,target:n,className:o,innerRef:a}=t,i=lL(t,["children","target","className","innerRef"]),l=nr(),[c,u]=f.useState(!1),d=f.useRef();return q$(()=>(u(!0),d.current=n?typeof n=="string"?document.querySelector(n):n:document.createElement("div"),n||document.body.appendChild(d.current),()=>{!n&&document.body.removeChild(d.current)}),[n]),c?qs.createPortal(s.createElement("div",iL(aL({className:o,dir:l.dir},i),{ref:a}),r),d.current):null}jy.displayName="@mantine/core/Portal";var sL=Object.defineProperty,wd=Object.getOwnPropertySymbols,_2=Object.prototype.hasOwnProperty,b2=Object.prototype.propertyIsEnumerable,l_=(e,t,r)=>t in e?sL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cL=(e,t)=>{for(var r in t||(t={}))_2.call(t,r)&&l_(e,r,t[r]);if(wd)for(var r of wd(t))b2.call(t,r)&&l_(e,r,t[r]);return e},uL=(e,t)=>{var r={};for(var n in e)_2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wd)for(var n of wd(e))t.indexOf(n)<0&&b2.call(e,n)&&(r[n]=e[n]);return r};function um(e){var t=e,{withinPortal:r=!0,children:n}=t,o=uL(t,["withinPortal","children"]);return r?s.createElement(jy,cL({},o),n):s.createElement(s.Fragment,null,n)}um.displayName="@mantine/core/OptionalPortal";var dL=Object.defineProperty,fL=Object.defineProperties,pL=Object.getOwnPropertyDescriptors,s_=Object.getOwnPropertySymbols,mL=Object.prototype.hasOwnProperty,hL=Object.prototype.propertyIsEnumerable,c_=(e,t,r)=>t in e?dL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_h=(e,t)=>{for(var r in t||(t={}))mL.call(t,r)&&c_(e,r,t[r]);if(s_)for(var r of s_(t))hL.call(t,r)&&c_(e,r,t[r]);return e},u_=(e,t)=>fL(e,pL(t));function gL({variant:e,color:t,theme:r}){if(e==="filled")return{backgroundColor:r.fn.variant({variant:"filled",color:t}).background,color:r.white};if(e==="outline"){const n=r.fn.variant({variant:"outline",color:t});return{color:n.color,borderColor:n.border,backgroundColor:r.colorScheme==="dark"?r.colors.dark[6]:r.white}}if(e==="light"){const n=r.fn.variant({variant:"light",color:t});return{backgroundColor:n.background,color:n.color}}return null}var vL=W((e,{radius:t,color:r},{variant:n})=>({root:_h(u_(_h({},e.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:e.spacing.sm,paddingBottom:e.spacing.sm,paddingLeft:e.spacing.md,paddingRight:e.spacing.sm,borderRadius:e.fn.radius(t),border:`${S(1)} solid transparent`}),gL({variant:n,color:r,theme:e})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:e.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:e.lineHeight,fontSize:e.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:e.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:S(20),height:S(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:e.spacing.md,marginTop:1},message:u_(_h({},e.fn.fontStyles()),{lineHeight:e.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:e.fontSizes.sm,color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}),closeButton:{width:S(10),height:S(10),color:n==="filled"?e.white:e.colorScheme==="dark"?n==="light"?e.white:e.colors.dark[0]:e.black}}));const yL=vL;var wL=Object.defineProperty,_d=Object.getOwnPropertySymbols,x2=Object.prototype.hasOwnProperty,E2=Object.prototype.propertyIsEnumerable,d_=(e,t,r)=>t in e?wL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f_=(e,t)=>{for(var r in t||(t={}))x2.call(t,r)&&d_(e,r,t[r]);if(_d)for(var r of _d(t))E2.call(t,r)&&d_(e,r,t[r]);return e},_L=(e,t)=>{var r={};for(var n in e)x2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_d)for(var n of _d(e))t.indexOf(n)<0&&E2.call(e,n)&&(r[n]=e[n]);return r};function S2(e){const t=e,{width:r,height:n,style:o}=t,a=_L(t,["width","height","style"]);return s.createElement("svg",f_({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:f_({width:r,height:n},o)},a),s.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}S2.displayName="@mantine/core/CloseIcon";var bL=Object.defineProperty,bd=Object.getOwnPropertySymbols,P2=Object.prototype.hasOwnProperty,$2=Object.prototype.propertyIsEnumerable,p_=(e,t,r)=>t in e?bL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xL=(e,t)=>{for(var r in t||(t={}))P2.call(t,r)&&p_(e,r,t[r]);if(bd)for(var r of bd(t))$2.call(t,r)&&p_(e,r,t[r]);return e},EL=(e,t)=>{var r={};for(var n in e)P2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bd)for(var n of bd(e))t.indexOf(n)<0&&$2.call(e,n)&&(r[n]=e[n]);return r};const SL={xs:S(12),sm:S(16),md:S(20),lg:S(28),xl:S(34)},PL={size:"sm"},O2=f.forwardRef((e,t)=>{const r=H("CloseButton",PL,e),{iconSize:n,size:o,children:a}=r,i=EL(r,["iconSize","size","children"]),l=S(n||SL[o]);return s.createElement(Mr,xL({ref:t,__staticSelector:"CloseButton",size:o},i),a||s.createElement(S2,{width:l,height:l}))});O2.displayName="@mantine/core/CloseButton";const Qs=O2;var $L=Object.defineProperty,xd=Object.getOwnPropertySymbols,C2=Object.prototype.hasOwnProperty,k2=Object.prototype.propertyIsEnumerable,m_=(e,t,r)=>t in e?$L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,OL=(e,t)=>{for(var r in t||(t={}))C2.call(t,r)&&m_(e,r,t[r]);if(xd)for(var r of xd(t))k2.call(t,r)&&m_(e,r,t[r]);return e},CL=(e,t)=>{var r={};for(var n in e)C2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xd)for(var n of xd(e))t.indexOf(n)<0&&k2.call(e,n)&&(r[n]=e[n]);return r};const kL={variant:"light"},Gs=f.forwardRef((e,t)=>{const r=H("Alert",kL,e),{id:n,className:o,title:a,variant:i,children:l,color:c,classNames:u,icon:d,styles:m,onClose:h,radius:g,withCloseButton:y,closeButtonLabel:_,unstyled:E}=r,w=CL(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:v,cx:b}=yL({color:c,radius:g},{classNames:u,styles:m,unstyled:E,variant:i,name:"Alert"}),x=Fr(n),P=a&&`${x}-title`,O=`${x}-body`;return s.createElement(ue,OL({id:x,role:"alert","aria-labelledby":P,"aria-describedby":O,className:b(v.root,v[i],o),ref:t},w),s.createElement("div",{className:v.wrapper},d&&s.createElement("div",{className:v.icon},d),s.createElement("div",{className:v.body},a&&s.createElement("div",{className:v.title,"data-with-close-button":y||void 0},s.createElement("span",{id:P,className:v.label},a)),s.createElement("div",{id:O,className:v.message},l)),y&&s.createElement(Qs,{className:v.closeButton,onClick:h,variant:"transparent",size:16,iconSize:16,"aria-label":_})))});Gs.displayName="@mantine/core/Alert";var jL=Object.defineProperty,RL=Object.defineProperties,TL=Object.getOwnPropertyDescriptors,h_=Object.getOwnPropertySymbols,IL=Object.prototype.hasOwnProperty,DL=Object.prototype.propertyIsEnumerable,g_=(e,t,r)=>t in e?jL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bc=(e,t)=>{for(var r in t||(t={}))IL.call(t,r)&&g_(e,r,t[r]);if(h_)for(var r of h_(t))DL.call(t,r)&&g_(e,r,t[r]);return e},NL=(e,t)=>RL(e,TL(t));function AL({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function ML({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?e.fn.variant({variant:"filled",color:t}).background:t||"inherit"}function zL(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function LL({theme:e,truncate:t}){return t==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:e.dir==="ltr"?"rtl":"ltr",textAlign:e.dir==="ltr"?"right":"left"}:t?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var FL=W((e,{color:t,lineClamp:r,truncate:n,inline:o,inherit:a,underline:i,gradient:l,weight:c,transform:u,align:d,strikethrough:m,italic:h},{size:g})=>{const y=e.fn.variant({variant:"gradient",gradient:l});return{root:NL(Bc(Bc(Bc(Bc({},e.fn.fontStyles()),e.fn.focusStyles()),zL(r)),LL({theme:e,truncate:n})),{color:ML({color:t,theme:e}),fontFamily:a?"inherit":e.fontFamily,fontSize:a||g===void 0?"inherit":N({size:g,sizes:e.fontSizes}),lineHeight:a?"inherit":o?1:e.lineHeight,textDecoration:AL({underline:i,strikethrough:m}),WebkitTapHighlightColor:"transparent",fontWeight:a?"inherit":c,textTransform:u,textAlign:d,fontStyle:h?"italic":void 0}),gradient:{backgroundImage:y.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const VL=FL;var BL=Object.defineProperty,Ed=Object.getOwnPropertySymbols,j2=Object.prototype.hasOwnProperty,R2=Object.prototype.propertyIsEnumerable,v_=(e,t,r)=>t in e?BL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UL=(e,t)=>{for(var r in t||(t={}))j2.call(t,r)&&v_(e,r,t[r]);if(Ed)for(var r of Ed(t))R2.call(t,r)&&v_(e,r,t[r]);return e},WL=(e,t)=>{var r={};for(var n in e)j2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ed)for(var n of Ed(e))t.indexOf(n)<0&&R2.call(e,n)&&(r[n]=e[n]);return r};const HL={variant:"text"},T2=f.forwardRef((e,t)=>{const r=H("Text",HL,e),{className:n,size:o,weight:a,transform:i,color:l,align:c,variant:u,lineClamp:d,truncate:m,gradient:h,inline:g,inherit:y,underline:_,strikethrough:E,italic:w,classNames:v,styles:b,unstyled:x,span:P,__staticSelector:O}=r,$=WL(r,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:C,cx:R}=VL({color:l,lineClamp:d,truncate:m,inline:g,inherit:y,underline:_,strikethrough:E,italic:w,weight:a,transform:i,align:c,gradient:h},{unstyled:x,name:O||"Text",variant:u,size:o});return s.createElement(ue,UL({ref:t,className:R(C.root,{[C.gradient]:u==="gradient"},n),component:P?"span":"div"},$))});T2.displayName="@mantine/core/Text";const ae=T2;var qL=Object.defineProperty,y_=Object.getOwnPropertySymbols,QL=Object.prototype.hasOwnProperty,GL=Object.prototype.propertyIsEnumerable,w_=(e,t,r)=>t in e?qL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,KL=(e,t)=>{for(var r in t||(t={}))QL.call(t,r)&&w_(e,r,t[r]);if(y_)for(var r of y_(t))GL.call(t,r)&&w_(e,r,t[r]);return e};function YL({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():e.fn.themeColor(t||e.primaryColor,e.colorScheme==="dark"?4:7,!1,!0)}var XL=W((e,{color:t,underline:r})=>({root:KL({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:YL({theme:e,color:t})},e.fn.hover({textDecoration:r?"underline":"none"}))}));const JL=XL;var ZL=Object.defineProperty,Sd=Object.getOwnPropertySymbols,I2=Object.prototype.hasOwnProperty,D2=Object.prototype.propertyIsEnumerable,__=(e,t,r)=>t in e?ZL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b_=(e,t)=>{for(var r in t||(t={}))I2.call(t,r)&&__(e,r,t[r]);if(Sd)for(var r of Sd(t))D2.call(t,r)&&__(e,r,t[r]);return e},e8=(e,t)=>{var r={};for(var n in e)I2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sd)for(var n of Sd(e))t.indexOf(n)<0&&D2.call(e,n)&&(r[n]=e[n]);return r};const t8={underline:!0},N2=f.forwardRef((e,t)=>{const r=H("Anchor",t8,e),{component:n,className:o,unstyled:a,variant:i,size:l,color:c,underline:u}=r,d=e8(r,["component","className","unstyled","variant","size","color","underline"]),{classes:m,cx:h}=JL({color:c,underline:u},{name:"Anchor",unstyled:a,variant:i,size:l}),g=n==="button"?{type:"button"}:null;return s.createElement(ae,b_(b_({component:n||"a",ref:t,className:h(m.root,o),size:l},g),d))});N2.displayName="@mantine/core/Anchor";const dt=N2,A2=f.createContext({zIndex:1e3,fixed:!1,layout:"default"}),r8=A2.Provider;function M2(){return f.useContext(A2)}function dm(e,t){if(!e)return[];const r=Object.keys(e).filter(n=>n!=="base").map(n=>[N({size:n,sizes:t.breakpoints,units:"em"}),e[n]]);return r.sort((n,o)=>wn(n[0])-wn(o[0])),r}var n8=Object.defineProperty,o8=Object.defineProperties,a8=Object.getOwnPropertyDescriptors,x_=Object.getOwnPropertySymbols,i8=Object.prototype.hasOwnProperty,l8=Object.prototype.propertyIsEnumerable,E_=(e,t,r)=>t in e?n8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Uc=(e,t)=>{for(var r in t||(t={}))i8.call(t,r)&&E_(e,r,t[r]);if(x_)for(var r of x_(t))l8.call(t,r)&&E_(e,r,t[r]);return e},S_=(e,t)=>o8(e,a8(t)),s8=W((e,{height:t,width:r,fixed:n,position:o,hiddenBreakpoint:a,zIndex:i,section:l,withBorder:c,layout:u})=>{const d=typeof r=="object"&&r!==null?dm(r,e).reduce((h,[g,y])=>(h[`@media (min-width: ${Dr(g)})`]={width:S(y),minWidth:S(y)},h),{}):null,m=c?{[l==="navbar"?"borderRight":"borderLeft"]:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`}:{};return{root:S_(Uc(Uc(S_(Uc(Uc({},e.fn.fontStyles()),o),{top:u==="alt"?0:(o==null?void 0:o.top)||"var(--mantine-header-height)",bottom:0,zIndex:i,height:t?S(t):u==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:r!=null&&r.base?S(r==null?void 0:r.base):"100%",position:n?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),m),d),{"&[data-hidden]":{[`@media (max-width: ${Dr(wn(N({size:a,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const c8=s8;var u8=Object.defineProperty,Pd=Object.getOwnPropertySymbols,z2=Object.prototype.hasOwnProperty,L2=Object.prototype.propertyIsEnumerable,P_=(e,t,r)=>t in e?u8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$_=(e,t)=>{for(var r in t||(t={}))z2.call(t,r)&&P_(e,r,t[r]);if(Pd)for(var r of Pd(t))L2.call(t,r)&&P_(e,r,t[r]);return e},d8=(e,t)=>{var r={};for(var n in e)z2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pd)for(var n of Pd(e))t.indexOf(n)<0&&L2.call(e,n)&&(r[n]=e[n]);return r};const F2=f.forwardRef((e,t)=>{var r=e,{width:n,height:o,fixed:a=!1,position:i,zIndex:l,hiddenBreakpoint:c="md",hidden:u=!1,withBorder:d=!0,className:m,classNames:h,styles:g,children:y,section:_,__staticSelector:E,unstyled:w,variant:v}=r,b=d8(r,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const x=M2(),{classes:P,cx:O,theme:$}=c8({width:n,height:o,fixed:x.fixed||a,position:i,hiddenBreakpoint:c,zIndex:l||x.zIndex||go("app"),section:_,withBorder:d,layout:x.layout},{classNames:h,styles:g,name:E,unstyled:w,variant:v}),C=dm(n,$).reduce((R,[j,k])=>(R[`@media (min-width: ${Dr(j)})`]={[`--mantine-${_}-width`]:S(k)},R),{});return s.createElement(ue,$_({component:_==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:O(P.root,m)},b),y,s.createElement(H$,{styles:()=>({":root":$_({[`--mantine-${_}-width`]:n!=null&&n.base?S(n.base):"0rem"},C)})}))});F2.displayName="@mantine/core/HorizontalSection";var f8=Object.defineProperty,$d=Object.getOwnPropertySymbols,V2=Object.prototype.hasOwnProperty,B2=Object.prototype.propertyIsEnumerable,O_=(e,t,r)=>t in e?f8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p8=(e,t)=>{for(var r in t||(t={}))V2.call(t,r)&&O_(e,r,t[r]);if($d)for(var r of $d(t))B2.call(t,r)&&O_(e,r,t[r]);return e},m8=(e,t)=>{var r={};for(var n in e)V2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$d)for(var n of $d(e))t.indexOf(n)<0&&B2.call(e,n)&&(r[n]=e[n]);return r};const U2=f.forwardRef((e,t)=>{var r=e,{children:n,grow:o=!1,sx:a}=r,i=m8(r,["children","grow","sx"]);return s.createElement(ue,p8({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...Rp(a)]},i),n)});U2.displayName="@mantine/core/Section";const h8=U2;var g8=Object.defineProperty,C_=Object.getOwnPropertySymbols,v8=Object.prototype.hasOwnProperty,y8=Object.prototype.propertyIsEnumerable,k_=(e,t,r)=>t in e?g8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w8=(e,t)=>{for(var r in t||(t={}))v8.call(t,r)&&k_(e,r,t[r]);if(C_)for(var r of C_(t))y8.call(t,r)&&k_(e,r,t[r]);return e};const _8={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},ss=f.forwardRef((e,t)=>{const r=H("Navbar",_8,e);return s.createElement(F2,w8({section:"navbar",__staticSelector:"Navbar",ref:t},r))});ss.Section=h8;ss.displayName="@mantine/core/Navbar";var b8=Object.defineProperty,x8=Object.defineProperties,E8=Object.getOwnPropertyDescriptors,j_=Object.getOwnPropertySymbols,S8=Object.prototype.hasOwnProperty,P8=Object.prototype.propertyIsEnumerable,R_=(e,t,r)=>t in e?b8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bh=(e,t)=>{for(var r in t||(t={}))S8.call(t,r)&&R_(e,r,t[r]);if(j_)for(var r of j_(t))P8.call(t,r)&&R_(e,r,t[r]);return e},T_=(e,t)=>x8(e,E8(t)),$8=W((e,{height:t,fixed:r,position:n,zIndex:o,borderPosition:a,layout:i})=>{const l=typeof t=="object"&&t!==null?dm(t,e).reduce((c,[u,d])=>(c[`@media (min-width: ${Dr(u)})`]={height:S(d),minHeight:S(d)},c),{}):null;return{root:T_(bh(T_(bh(bh({},e.fn.fontStyles()),n),{zIndex:o,left:i==="alt"?"var(--mantine-navbar-width, 0)":0,right:i==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof t=="object"?S(t==null?void 0:t.base)||"100%":S(t),maxHeight:typeof t=="object"?S(t==null?void 0:t.base)||"100%":S(t),position:r?"fixed":"static",boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white}),l),{borderBottom:a==="bottom"?`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0,borderTop:a==="top"?`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}`:void 0})}});const O8=$8;var C8=Object.defineProperty,Od=Object.getOwnPropertySymbols,W2=Object.prototype.hasOwnProperty,H2=Object.prototype.propertyIsEnumerable,I_=(e,t,r)=>t in e?C8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,D_=(e,t)=>{for(var r in t||(t={}))W2.call(t,r)&&I_(e,r,t[r]);if(Od)for(var r of Od(t))H2.call(t,r)&&I_(e,r,t[r]);return e},k8=(e,t)=>{var r={};for(var n in e)W2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Od)for(var n of Od(e))t.indexOf(n)<0&&H2.call(e,n)&&(r[n]=e[n]);return r};const q2=f.forwardRef((e,t)=>{var r=e,{children:n,className:o,classNames:a,styles:i,height:l,fixed:c=!1,withBorder:u=!0,position:d,zIndex:m,section:h,unstyled:g,__staticSelector:y,variant:_}=r,E=k8(r,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const w=M2(),v=m||w.zIndex||go("app"),{classes:b,cx:x,theme:P}=O8({height:l,fixed:w.fixed||c,position:d,zIndex:typeof v=="number"&&w.layout==="default"?v+1:v,layout:w.layout,borderPosition:u?h==="header"?"bottom":"top":"none"},{name:y,classNames:a,styles:i,unstyled:g,variant:_}),O=typeof l=="object"&&l!==null?dm(l,P).reduce(($,[C,R])=>($[`@media (min-width: ${Dr(C)})`]={[`--mantine-${h}-height`]:S(R)},$),{}):null;return s.createElement(ue,D_({component:h==="header"?"header":"footer",className:x(b.root,o),ref:t},E),n,s.createElement(H$,{styles:()=>({":root":D_({[`--mantine-${h}-height`]:typeof l=="object"?S(l==null?void 0:l.base)||"100%":S(l)},O)})}))});q2.displayName="@mantine/core/VerticalSection";var j8=Object.defineProperty,R8=Object.defineProperties,T8=Object.getOwnPropertyDescriptors,N_=Object.getOwnPropertySymbols,I8=Object.prototype.hasOwnProperty,D8=Object.prototype.propertyIsEnumerable,A_=(e,t,r)=>t in e?j8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N8=(e,t)=>{for(var r in t||(t={}))I8.call(t,r)&&A_(e,r,t[r]);if(N_)for(var r of N_(t))D8.call(t,r)&&A_(e,r,t[r]);return e},A8=(e,t)=>R8(e,T8(t));const M8={fixed:!1,position:{top:0,left:0,right:0}},Q2=f.forwardRef((e,t)=>{const r=H("Header",M8,e);return s.createElement(q2,A8(N8({section:"header",__staticSelector:"Header"},r),{ref:t}))});Q2.displayName="@mantine/core/Header";var z8=Object.defineProperty,M_=Object.getOwnPropertySymbols,L8=Object.prototype.hasOwnProperty,F8=Object.prototype.propertyIsEnumerable,z_=(e,t,r)=>t in e?z8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G2=(e,t)=>{for(var r in t||(t={}))L8.call(t,r)&&z_(e,r,t[r]);if(M_)for(var r of M_(t))F8.call(t,r)&&z_(e,r,t[r]);return e};function V8(e,t){const r=N({size:e.padding,sizes:t.spacing}),n=e.navbarOffsetBreakpoint?N({size:e.navbarOffsetBreakpoint,sizes:t.breakpoints}):null,o=e.asideOffsetBreakpoint?N({size:e.asideOffsetBreakpoint,sizes:t.breakpoints}):null;if(!e.fixed)return{padding:r};const a=wn(n),i=wn(o);return G2({minHeight:"100vh",paddingTop:`calc(var(--mantine-header-height, 0px) + ${r})`,paddingBottom:`calc(var(--mantine-footer-height, 0px) + ${r})`,paddingLeft:`calc(var(--mantine-navbar-width, 0px) + ${r})`,paddingRight:`calc(var(--mantine-aside-width, 0px) + ${r})`},a===i?{[`@media (max-width: ${Dr(a-1)})`]:{paddingLeft:r,paddingRight:r}}:{[`@media (max-width: ${Dr(a-1)})`]:{paddingLeft:r},[`@media (max-width: ${Dr(i-1)})`]:{paddingRight:r}})}var B8=W((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:G2({flex:1,width:"100vw",boxSizing:"border-box"},V8(t,e))}));const U8=B8;var W8=Object.defineProperty,Cd=Object.getOwnPropertySymbols,K2=Object.prototype.hasOwnProperty,Y2=Object.prototype.propertyIsEnumerable,L_=(e,t,r)=>t in e?W8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H8=(e,t)=>{for(var r in t||(t={}))K2.call(t,r)&&L_(e,r,t[r]);if(Cd)for(var r of Cd(t))Y2.call(t,r)&&L_(e,r,t[r]);return e},q8=(e,t)=>{var r={};for(var n in e)K2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cd)for(var n of Cd(e))t.indexOf(n)<0&&Y2.call(e,n)&&(r[n]=e[n]);return r};const Q8={fixed:!0,padding:"md"},X2=f.forwardRef((e,t)=>{const r=H("AppShell",Q8,e),{children:n,navbar:o,header:a,footer:i,aside:l,fixed:c,zIndex:u,padding:d,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:h,className:g,styles:y,classNames:_,unstyled:E,hidden:w,layout:v,variant:b}=r,x=q8(r,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:P,cx:O}=U8({padding:d,fixed:c,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:h},{styles:y,classNames:_,unstyled:E,name:"AppShell",variant:b});return w?s.createElement(s.Fragment,null,n):s.createElement(r8,{value:{fixed:c,zIndex:u,layout:v}},s.createElement(ue,H8({className:O(P.root,g),ref:t},x),a,s.createElement("div",{className:P.body},o,s.createElement("main",{className:P.main},n),l),i))});X2.displayName="@mantine/core/AppShell";const Wc={xs:S(1),sm:S(2),md:S(3),lg:S(4),xl:S(5)};function Hc(e,t){const r=e.fn.variant({variant:"outline",color:t}).border;return typeof t=="string"&&(t in e.colors||t.split(".")[0]in e.colors)?r:t===void 0?e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]:t}var G8=W((e,{color:t},{size:r,variant:n})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:S(1),borderTop:`${N({size:r,sizes:Wc})} ${n} ${Hc(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${N({size:r,sizes:Wc})} ${n} ${Hc(e,t)}`,marginLeft:e.spacing.xs}},labelDefaultStyles:{color:t==="dark"?e.colors.dark[1]:e.fn.themeColor(t,e.colorScheme==="dark"?5:e.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:S(N({size:r,sizes:Wc})),borderTopColor:Hc(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:S(N({size:r,sizes:Wc})),borderLeftColor:Hc(e,t),borderLeftStyle:n}}));const K8=G8;var Y8=Object.defineProperty,X8=Object.defineProperties,J8=Object.getOwnPropertyDescriptors,kd=Object.getOwnPropertySymbols,J2=Object.prototype.hasOwnProperty,Z2=Object.prototype.propertyIsEnumerable,F_=(e,t,r)=>t in e?Y8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V_=(e,t)=>{for(var r in t||(t={}))J2.call(t,r)&&F_(e,r,t[r]);if(kd)for(var r of kd(t))Z2.call(t,r)&&F_(e,r,t[r]);return e},Z8=(e,t)=>X8(e,J8(t)),e7=(e,t)=>{var r={};for(var n in e)J2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kd)for(var n of kd(e))t.indexOf(n)<0&&Z2.call(e,n)&&(r[n]=e[n]);return r};const t7={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},dr=f.forwardRef((e,t)=>{const r=H("Divider",t7,e),{className:n,color:o,orientation:a,size:i,label:l,labelPosition:c,labelProps:u,variant:d,styles:m,classNames:h,unstyled:g}=r,y=e7(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:_,cx:E}=K8({color:o},{classNames:h,styles:m,unstyled:g,name:"Divider",variant:d,size:i}),w=a==="vertical",v=a==="horizontal",b=!!l&&v,x=!(u!=null&&u.color);return s.createElement(ue,V_({ref:t,className:E(_.root,{[_.vertical]:w,[_.horizontal]:v,[_.withLabel]:b},n),role:"separator"},y),b&&s.createElement(ae,Z8(V_({},u),{size:(u==null?void 0:u.size)||"xs",mt:S(2),className:E(_.label,_[c],{[_.labelDefaultStyles]:x})}),l))});dr.displayName="@mantine/core/Divider";var r7=Object.defineProperty,n7=Object.defineProperties,o7=Object.getOwnPropertyDescriptors,B_=Object.getOwnPropertySymbols,a7=Object.prototype.hasOwnProperty,i7=Object.prototype.propertyIsEnumerable,U_=(e,t,r)=>t in e?r7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,W_=(e,t)=>{for(var r in t||(t={}))a7.call(t,r)&&U_(e,r,t[r]);if(B_)for(var r of B_(t))i7.call(t,r)&&U_(e,r,t[r]);return e},l7=(e,t)=>n7(e,o7(t)),s7=W((e,t,{size:r})=>({item:l7(W_({},e.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${N({size:r,sizes:e.spacing})} / 1.5) ${N({size:r,sizes:e.spacing})}`,cursor:"pointer",fontSize:N({size:r,sizes:e.fontSizes}),color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,borderRadius:e.fn.radius(),"&[data-hovered]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[1]},"&[data-selected]":W_({backgroundColor:e.fn.variant({variant:"filled"}).background,color:e.fn.variant({variant:"filled"}).color},e.fn.hover({backgroundColor:e.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:e.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:e.colors.gray[6],paddingTop:`calc(${N({size:r,sizes:e.spacing})} / 2)`,paddingBottom:`calc(${N({size:r,sizes:e.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${N({size:r,sizes:e.spacing})} / 1.5) ${N({size:r,sizes:e.spacing})}`},separatorLabel:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}));const c7=s7;var u7=Object.defineProperty,H_=Object.getOwnPropertySymbols,d7=Object.prototype.hasOwnProperty,f7=Object.prototype.propertyIsEnumerable,q_=(e,t,r)=>t in e?u7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p7=(e,t)=>{for(var r in t||(t={}))d7.call(t,r)&&q_(e,r,t[r]);if(H_)for(var r of H_(t))f7.call(t,r)&&q_(e,r,t[r]);return e};function ek({data:e,hovered:t,classNames:r,styles:n,isItemSelected:o,uuid:a,__staticSelector:i,onItemHover:l,onItemSelect:c,itemsRefs:u,itemComponent:d,size:m,nothingFound:h,creatable:g,createLabel:y,unstyled:_,variant:E}){const{classes:w}=c7(null,{classNames:r,styles:n,unstyled:_,name:i,variant:E,size:m}),v=[],b=[];let x=null;const P=($,C)=>{const R=typeof o=="function"?o($.value):!1;return s.createElement(d,p7({key:$.value,className:w.item,"data-disabled":$.disabled||void 0,"data-hovered":!$.disabled&&t===C||void 0,"data-selected":!$.disabled&&R||void 0,selected:R,onMouseEnter:()=>l(C),id:`${a}-${C}`,role:"option",tabIndex:-1,"aria-selected":t===C,ref:j=>{u&&u.current&&(u.current[$.value]=j)},onMouseDown:$.disabled?null:j=>{j.preventDefault(),c($)},disabled:$.disabled,variant:E},$))};let O=null;if(e.forEach(($,C)=>{$.creatable?x=C:$.group?(O!==$.group&&(O=$.group,b.push(s.createElement("div",{className:w.separator,key:`__mantine-divider-${C}`},s.createElement(dr,{classNames:{label:w.separatorLabel},label:$.group})))),b.push(P($,C))):v.push(P($,C))}),g){const $=e[x];v.push(s.createElement("div",{key:qp(),className:w.item,"data-hovered":t===x||void 0,onMouseEnter:()=>l(x),onMouseDown:C=>{C.preventDefault(),c($)},tabIndex:-1,ref:C=>{u&&u.current&&(u.current[$.value]=C)}},y))}return b.length>0&&v.length>0&&v.unshift(s.createElement("div",{className:w.separator,key:"empty-group-separator"},s.createElement(dr,null))),b.length>0||v.length>0?s.createElement(s.Fragment,null,b,v):s.createElement(ae,{size:m,unstyled:_,className:w.nothingFound},h)}ek.displayName="@mantine/core/SelectItems";var m7=Object.defineProperty,jd=Object.getOwnPropertySymbols,tk=Object.prototype.hasOwnProperty,rk=Object.prototype.propertyIsEnumerable,Q_=(e,t,r)=>t in e?m7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h7=(e,t)=>{for(var r in t||(t={}))tk.call(t,r)&&Q_(e,r,t[r]);if(jd)for(var r of jd(t))rk.call(t,r)&&Q_(e,r,t[r]);return e},g7=(e,t)=>{var r={};for(var n in e)tk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jd)for(var n of jd(e))t.indexOf(n)<0&&rk.call(e,n)&&(r[n]=e[n]);return r};const nk=f.forwardRef((e,t)=>{var r=e,{label:n,value:o}=r,a=g7(r,["label","value"]);return s.createElement("div",h7({ref:t},a),n||o)});nk.displayName="@mantine/core/DefaultItem";function v7(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ok(...e){return t=>e.forEach(r=>v7(r,t))}function Ka(...e){return f.useCallback(ok(...e),e)}const ak=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find(w7);if(a){const i=a.props.children,l=o.map(c=>c===a?f.Children.count(i)>1?f.Children.only(null):f.isValidElement(i)?i.props.children:null:c);return f.createElement(Wg,Ye({},n,{ref:t}),f.isValidElement(i)?f.cloneElement(i,void 0,l):null)}return f.createElement(Wg,Ye({},n,{ref:t}),r)});ak.displayName="Slot";const Wg=f.forwardRef((e,t)=>{const{children:r,...n}=e;return f.isValidElement(r)?f.cloneElement(r,{..._7(n,r.props),ref:ok(t,r.ref)}):f.Children.count(r)>1?f.Children.only(null):null});Wg.displayName="SlotClone";const y7=({children:e})=>f.createElement(f.Fragment,null,e);function w7(e){return f.isValidElement(e)&&e.type===y7}function _7(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...l)=>{a(...l),o(...l)}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}const b7=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Ks=b7.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...i}=n,l=a?ak:t;return f.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),f.createElement(l,Ye({},i,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Hg=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function x7(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ys=e=>{const{present:t,children:r}=e,n=E7(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=Ka(n.ref,o.ref);return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};Ys.displayName="Presence";function E7(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),i=e?"mounted":"unmounted",[l,c]=x7(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=qc(n.current);a.current=l==="mounted"?u:"none"},[l]),Hg(()=>{const u=n.current,d=o.current;if(d!==e){const h=a.current,g=qc(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Hg(()=>{if(t){const u=m=>{const g=qc(n.current).includes(m.animationName);m.target===t&&g&&qs.flushSync(()=>c("ANIMATION_END"))},d=m=>{m.target===t&&(a.current=qc(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function qc(e){return(e==null?void 0:e.animationName)||"none"}function S7(e,t=[]){let r=[];function n(a,i){const l=f.createContext(i),c=r.length;r=[...r,i];function u(m){const{scope:h,children:g,...y}=m,_=(h==null?void 0:h[e][c])||l,E=f.useMemo(()=>y,Object.values(y));return f.createElement(_.Provider,{value:E},g)}function d(m,h){const g=(h==null?void 0:h[e][c])||l,y=f.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return u.displayName=a+"Provider",[u,d]}const o=()=>{const a=r.map(i=>f.createContext(i));return function(l){const c=(l==null?void 0:l[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[n,P7(o,...t)]}function P7(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=n.reduce((l,{useScope:c,scopeName:u})=>{const m=c(a)[`__scope${u}`];return{...l,...m}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function xa(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const $7=f.createContext(void 0);function O7(e){const t=f.useContext($7);return e||t||"ltr"}function C7(e,[t,r]){return Math.min(r,Math.max(t,e))}function Ta(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function k7(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const ik="ScrollArea",[lk,Zue]=S7(ik),[j7,on]=lk(ik),R7=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[l,c]=f.useState(null),[u,d]=f.useState(null),[m,h]=f.useState(null),[g,y]=f.useState(null),[_,E]=f.useState(null),[w,v]=f.useState(0),[b,x]=f.useState(0),[P,O]=f.useState(!1),[$,C]=f.useState(!1),R=Ka(t,k=>c(k)),j=O7(o);return f.createElement(j7,{scope:r,type:n,dir:j,scrollHideDelay:a,scrollArea:l,viewport:u,onViewportChange:d,content:m,onContentChange:h,scrollbarX:g,onScrollbarXChange:y,scrollbarXEnabled:P,onScrollbarXEnabledChange:O,scrollbarY:_,onScrollbarYChange:E,scrollbarYEnabled:$,onScrollbarYEnabledChange:C,onCornerWidthChange:v,onCornerHeightChange:x},f.createElement(Ks.div,Ye({dir:j},i,{ref:R,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})))}),T7="ScrollAreaViewport",I7=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,a=on(T7,r),i=f.useRef(null),l=Ka(t,i,a.onViewportChange);return f.createElement(f.Fragment,null,f.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),f.createElement(Ks.div,Ye({"data-radix-scroll-area-viewport":""},o,{ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style}}),f.createElement("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),yo="ScrollAreaScrollbar",D7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=on(yo,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,l=e.orientation==="horizontal";return f.useEffect(()=>(l?a(!0):i(!0),()=>{l?a(!1):i(!1)}),[l,a,i]),o.type==="hover"?f.createElement(N7,Ye({},n,{ref:t,forceMount:r})):o.type==="scroll"?f.createElement(A7,Ye({},n,{ref:t,forceMount:r})):o.type==="auto"?f.createElement(sk,Ye({},n,{ref:t,forceMount:r})):o.type==="always"?f.createElement(Ry,Ye({},n,{ref:t})):null}),N7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=on(yo,e.__scopeScrollArea),[a,i]=f.useState(!1);return f.useEffect(()=>{const l=o.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),i(!0)},d=()=>{c=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),f.createElement(Ys,{present:r||a},f.createElement(sk,Ye({"data-state":a?"visible":"hidden"},n,{ref:t})))}),A7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=on(yo,e.__scopeScrollArea),a=e.orientation==="horizontal",i=pm(()=>c("SCROLL_END"),100),[l,c]=k7("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,o.scrollHideDelay,c]),f.useEffect(()=>{const u=o.viewport,d=a?"scrollLeft":"scrollTop";if(u){let m=u[d];const h=()=>{const g=u[d];m!==g&&(c("SCROLL"),i()),m=g};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[o.viewport,a,c,i]),f.createElement(Ys,{present:r||l!=="hidden"},f.createElement(Ry,Ye({"data-state":l==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:Ta(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Ta(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),sk=f.forwardRef((e,t)=>{const r=on(yo,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=f.useState(!1),l=e.orientation==="horizontal",c=pm(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;i(l?u:d)}},10);return tl(r.viewport,c),tl(r.content,c),f.createElement(Ys,{present:n||a},f.createElement(Ry,Ye({"data-state":a?"visible":"hidden"},o,{ref:t})))}),Ry=f.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=on(yo,e.__scopeScrollArea),a=f.useRef(null),i=f.useRef(0),[l,c]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=fk(l.viewport,l.content),d={...n,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:h=>a.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function m(h,g){return W7(h,i.current,l,g)}return r==="horizontal"?f.createElement(M7,Ye({},d,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollLeft,g=G_(h,l,o.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=m(h,o.dir))}})):r==="vertical"?f.createElement(z7,Ye({},d,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollTop,g=G_(h,l);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=m(h))}})):null}),M7=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,a=on(yo,e.__scopeScrollArea),[i,l]=f.useState(),c=f.useRef(null),u=Ka(t,c,a.onScrollbarXChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),f.createElement(uk,Ye({"data-orientation":"horizontal"},o,{ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":fm(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,m)=>{if(a.viewport){const h=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),mk(h,m)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Rd(i.paddingLeft),paddingEnd:Rd(i.paddingRight)}})}}))}),z7=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,a=on(yo,e.__scopeScrollArea),[i,l]=f.useState(),c=f.useRef(null),u=Ka(t,c,a.onScrollbarYChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),f.createElement(uk,Ye({"data-orientation":"vertical"},o,{ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":fm(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,m)=>{if(a.viewport){const h=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),mk(h,m)&&d.preventDefault()}},onResize:()=>{c.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Rd(i.paddingTop),paddingEnd:Rd(i.paddingBottom)}})}}))}),[L7,ck]=lk(yo),uk=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:m,...h}=e,g=on(yo,r),[y,_]=f.useState(null),E=Ka(t,R=>_(R)),w=f.useRef(null),v=f.useRef(""),b=g.viewport,x=n.content-n.viewport,P=xa(d),O=xa(c),$=pm(m,10);function C(R){if(w.current){const j=R.clientX-w.current.left,k=R.clientY-w.current.top;u({x:j,y:k})}}return f.useEffect(()=>{const R=j=>{const k=j.target;(y==null?void 0:y.contains(k))&&P(j,x)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[b,y,x,P]),f.useEffect(O,[n,O]),tl(y,$),tl(g.content,$),f.createElement(L7,{scope:r,scrollbar:y,hasThumb:o,onThumbChange:xa(a),onThumbPointerUp:xa(i),onThumbPositionChange:O,onThumbPointerDown:xa(l)},f.createElement(Ks.div,Ye({},h,{ref:E,style:{position:"absolute",...h.style},onPointerDown:Ta(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),w.current=y.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C(R))}),onPointerMove:Ta(e.onPointerMove,C),onPointerUp:Ta(e.onPointerUp,R=>{const j=R.target;j.hasPointerCapture(R.pointerId)&&j.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=v.current,w.current=null})})))}),qg="ScrollAreaThumb",F7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ck(qg,e.__scopeScrollArea);return f.createElement(Ys,{present:r||o.hasThumb},f.createElement(V7,Ye({ref:t},n)))}),V7=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,a=on(qg,r),i=ck(qg,r),{onThumbPositionChange:l}=i,c=Ka(t,m=>i.onThumbChange(m)),u=f.useRef(),d=pm(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const m=a.viewport;if(m){const h=()=>{if(d(),!u.current){const g=H7(m,l);u.current=g,l()}};return l(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[a.viewport,d,l]),f.createElement(Ks.div,Ye({"data-state":i.hasThumb?"visible":"hidden"},o,{ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Ta(e.onPointerDownCapture,m=>{const g=m.target.getBoundingClientRect(),y=m.clientX-g.left,_=m.clientY-g.top;i.onThumbPointerDown({x:y,y:_})}),onPointerUp:Ta(e.onPointerUp,i.onThumbPointerUp)}))}),dk="ScrollAreaCorner",B7=f.forwardRef((e,t)=>{const r=on(dk,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?f.createElement(U7,Ye({},e,{ref:t})):null}),U7=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=on(dk,r),[a,i]=f.useState(0),[l,c]=f.useState(0),u=!!(a&&l);return tl(o.scrollbarX,()=>{var d;const m=((d=o.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;o.onCornerHeightChange(m),c(m)}),tl(o.scrollbarY,()=>{var d;const m=((d=o.scrollbarY)===null||d===void 0?void 0:d.offsetWidth)||0;o.onCornerWidthChange(m),i(m)}),u?f.createElement(Ks.div,Ye({},n,{ref:t,style:{width:a,height:l,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Rd(e){return e?parseInt(e,10):0}function fk(e,t){const r=e/t;return isNaN(r)?0:r}function fm(e){const t=fk(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function W7(e,t,r,n="ltr"){const o=fm(r),a=o/2,i=t||a,l=o-i,c=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-l,d=r.content-r.viewport,m=n==="ltr"?[0,d]:[d*-1,0];return pk([c,u],m)(e)}function G_(e,t,r="ltr"){const n=fm(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,l=a-n,c=r==="ltr"?[0,i]:[i*-1,0],u=C7(e,c);return pk([0,i],[0,l])(u)}function pk(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function mk(e,t){return e>0&&e<t}const H7=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,l=r.top!==a.top;(i||l)&&t(),r=a,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function pm(e,t){const r=xa(e),n=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(n.current),[]),f.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function tl(e,t){const r=xa(t);Hg(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const q7=R7,Q7=I7,K_=D7,Y_=F7,G7=B7;var K7=W((e,{scrollbarSize:t,offsetScrollbars:r,scrollbarHovered:n,hidden:o})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:r?S(t):void 0,paddingBottom:r?S(t):void 0},scrollbar:{display:o?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${S(t)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0],[`& .${Zt("thumb")}`]:{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.5):e.fn.rgba(e.black,.5)}},'&[data-orientation="vertical"]':{width:S(t)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:S(t)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Zt("thumb"),flex:1,backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.white,.4):e.fn.rgba(e.black,.4),borderRadius:S(t),position:"relative",transition:"background-color 150ms ease",display:o?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:S(44),minHeight:S(44)}},corner:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],transition:"opacity 150ms ease",opacity:n?1:0,display:o?"none":void 0}}));const Y7=K7;var X7=Object.defineProperty,J7=Object.defineProperties,Z7=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,hk=Object.prototype.hasOwnProperty,gk=Object.prototype.propertyIsEnumerable,X_=(e,t,r)=>t in e?X7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qg=(e,t)=>{for(var r in t||(t={}))hk.call(t,r)&&X_(e,r,t[r]);if(Td)for(var r of Td(t))gk.call(t,r)&&X_(e,r,t[r]);return e},vk=(e,t)=>J7(e,Z7(t)),yk=(e,t)=>{var r={};for(var n in e)hk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Td)for(var n of Td(e))t.indexOf(n)<0&&gk.call(e,n)&&(r[n]=e[n]);return r};const wk={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},mm=f.forwardRef((e,t)=>{const r=H("ScrollArea",wk,e),{children:n,className:o,classNames:a,styles:i,scrollbarSize:l,scrollHideDelay:c,type:u,dir:d,offsetScrollbars:m,viewportRef:h,onScrollPositionChange:g,unstyled:y,variant:_,viewportProps:E}=r,w=yk(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[v,b]=f.useState(!1),x=nr(),{classes:P,cx:O}=Y7({scrollbarSize:l,offsetScrollbars:m,scrollbarHovered:v,hidden:u==="never"},{name:"ScrollArea",classNames:a,styles:i,unstyled:y,variant:_});return s.createElement(q7,{type:u==="never"?"always":u,scrollHideDelay:c,dir:d||x.dir,ref:t,asChild:!0},s.createElement(ue,Qg({className:O(P.root,o)},w),s.createElement(Q7,vk(Qg({},E),{className:P.viewport,ref:h,onScroll:typeof g=="function"?({currentTarget:$})=>g({x:$.scrollLeft,y:$.scrollTop}):void 0}),n),s.createElement(K_,{orientation:"horizontal",className:P.scrollbar,forceMount:!0,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1)},s.createElement(Y_,{className:P.thumb})),s.createElement(K_,{orientation:"vertical",className:P.scrollbar,forceMount:!0,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1)},s.createElement(Y_,{className:P.thumb})),s.createElement(G7,{className:P.corner})))}),_k=f.forwardRef((e,t)=>{const r=H("ScrollAreaAutosize",wk,e),{children:n,classNames:o,styles:a,scrollbarSize:i,scrollHideDelay:l,type:c,dir:u,offsetScrollbars:d,viewportRef:m,onScrollPositionChange:h,unstyled:g,sx:y,variant:_,viewportProps:E}=r,w=yk(r,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return s.createElement(ue,vk(Qg({},w),{ref:t,sx:[{display:"flex"},...Rp(y)]}),s.createElement(ue,{sx:{display:"flex",flexDirection:"column",flex:1}},s.createElement(mm,{classNames:o,styles:a,scrollHideDelay:l,scrollbarSize:i,type:c,dir:u,offsetScrollbars:d,viewportRef:m,onScrollPositionChange:h,unstyled:g,variant:_,viewportProps:E},n)))});_k.displayName="@mantine/core/ScrollAreaAutosize";mm.displayName="@mantine/core/ScrollArea";mm.Autosize=_k;const pl=mm;var e9=Object.defineProperty,t9=Object.defineProperties,r9=Object.getOwnPropertyDescriptors,Id=Object.getOwnPropertySymbols,bk=Object.prototype.hasOwnProperty,xk=Object.prototype.propertyIsEnumerable,J_=(e,t,r)=>t in e?e9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z_=(e,t)=>{for(var r in t||(t={}))bk.call(t,r)&&J_(e,r,t[r]);if(Id)for(var r of Id(t))xk.call(t,r)&&J_(e,r,t[r]);return e},n9=(e,t)=>t9(e,r9(t)),o9=(e,t)=>{var r={};for(var n in e)bk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Id)for(var n of Id(e))t.indexOf(n)<0&&xk.call(e,n)&&(r[n]=e[n]);return r};const Ty=f.forwardRef((e,t)=>{var r=e,{style:n}=r,o=o9(r,["style"]);return s.createElement(pl,n9(Z_({},o),{style:Z_({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});Ty.displayName="@mantine/core/SelectScrollArea";var a9=W(()=>({dropdown:{},itemsWrapper:{padding:S(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const i9=a9;function ml(e){return e.split("-")[1]}function Iy(e){return e==="y"?"height":"width"}function vn(e){return e.split("-")[0]}function ca(e){return["top","bottom"].includes(vn(e))?"x":"y"}function eb(e,t,r){let{reference:n,floating:o}=e;const a=n.x+n.width/2-o.width/2,i=n.y+n.height/2-o.height/2,l=ca(t),c=Iy(l),u=n[c]/2-o[c]/2,d=l==="x";let m;switch(vn(t)){case"top":m={x:a,y:n.y-o.height};break;case"bottom":m={x:a,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:i};break;case"left":m={x:n.x-o.width,y:i};break;default:m={x:n.x,y:n.y}}switch(ml(t)){case"start":m[l]-=u*(r&&d?-1:1);break;case"end":m[l]+=u*(r&&d?-1:1)}return m}const l9=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:m}=eb(u,n,c),h=n,g={},y=0;for(let _=0;_<l.length;_++){const{name:E,fn:w}=l[_],{x:v,y:b,data:x,reset:P}=await w({x:d,y:m,initialPlacement:n,placement:h,strategy:o,middlewareData:g,rects:u,platform:i,elements:{reference:e,floating:t}});d=v??d,m=b??m,g={...g,[E]:{...g[E],...x}},P&&y<=50&&(y++,typeof P=="object"&&(P.placement&&(h=P.placement),P.rects&&(u=P.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:d,y:m}=eb(u,h,c)),_=-1)}return{x:d,y:m,placement:h,strategy:o,middlewareData:g}};function uo(e,t){return typeof e=="function"?e(t):e}function Dy(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function rl(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Ny(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:h=!1,padding:g=0}=uo(t,e),y=Dy(g),_=l[h?m==="floating"?"reference":"floating":m],E=rl(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(_)))==null||r?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=m==="floating"?{...i.floating,x:n,y:o}:i.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),b=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},x=rl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:v,strategy:c}):w);return{top:(E.top-x.top+y.top)/b.y,bottom:(x.bottom-E.bottom+y.bottom)/b.y,left:(E.left-x.left+y.left)/b.x,right:(x.right-E.right+y.right)/b.x}}const ta=Math.min,Rn=Math.max;function Gg(e,t,r){return Rn(e,ta(t,r))}const tb=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l}=t,{element:c,padding:u=0}=uo(e,t)||{};if(c==null)return{};const d=Dy(u),m={x:r,y:n},h=ca(o),g=Iy(h),y=await i.getDimensions(c),_=h==="y",E=_?"top":"left",w=_?"bottom":"right",v=_?"clientHeight":"clientWidth",b=a.reference[g]+a.reference[h]-m[h]-a.floating[g],x=m[h]-a.reference[h],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let O=P?P[v]:0;O&&await(i.isElement==null?void 0:i.isElement(P))||(O=l.floating[v]||a.floating[g]);const $=b/2-x/2,C=O/2-y[g]/2-1,R=ta(d[E],C),j=ta(d[w],C),k=R,T=O-y[g]-j,L=O/2-y[g]/2+$,U=Gg(k,L,T),V=ml(o)!=null&&L!=U&&a.reference[g]/2-(L<k?R:j)-y[g]/2<0?L<k?k-L:T-L:0;return{[h]:m[h]-V,data:{[h]:U,centerOffset:L-U+V}}}}),s9=["top","right","bottom","left"];s9.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const c9={left:"right",right:"left",bottom:"top",top:"bottom"};function Dd(e){return e.replace(/left|right|bottom|top/g,t=>c9[t])}function u9(e,t,r){r===void 0&&(r=!1);const n=ml(e),o=ca(e),a=Iy(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Dd(i)),{main:i,cross:Dd(i)}}const d9={start:"end",end:"start"};function xh(e){return e.replace(/start|end/g,t=>d9[t])}const f9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,..._}=uo(e,t),E=vn(n),w=vn(i)===i,v=await(l.isRTL==null?void 0:l.isRTL(c.floating)),b=m||(w||!y?[Dd(i)]:function(k){const T=Dd(k);return[xh(k),T,xh(T)]}(i));m||g==="none"||b.push(...function(k,T,L,U){const V=ml(k);let M=function(Q,A,z){const q=["left","right"],le=["right","left"],ye=["top","bottom"],Re=["bottom","top"];switch(Q){case"top":case"bottom":return z?A?le:q:A?q:le;case"left":case"right":return A?ye:Re;default:return[]}}(vn(k),L==="start",U);return V&&(M=M.map(Q=>Q+"-"+V),T&&(M=M.concat(M.map(xh)))),M}(i,y,g,v));const x=[i,...b],P=await Ny(t,_),O=[];let $=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&O.push(P[E]),d){const{main:k,cross:T}=u9(n,a,v);O.push(P[k],P[T])}if($=[...$,{placement:n,overflows:O}],!O.every(k=>k<=0)){var C,R;const k=(((C=o.flip)==null?void 0:C.index)||0)+1,T=x[k];if(T)return{data:{index:k,overflows:$},reset:{placement:T}};let L=(R=$.filter(U=>U.overflows[0]<=0).sort((U,V)=>U.overflows[1]-V.overflows[1])[0])==null?void 0:R.placement;if(!L)switch(h){case"bestFit":{var j;const U=(j=$.map(V=>[V.placement,V.overflows.filter(M=>M>0).reduce((M,Q)=>M+Q,0)]).sort((V,M)=>V[1]-M[1])[0])==null?void 0:j[0];U&&(L=U);break}case"initialPlacement":L=i}if(n!==L)return{reset:{placement:L}}}return{}}}};function rb(e){const t=ta(...e.map(n=>n.left)),r=ta(...e.map(n=>n.top));return{x:t,y:r,width:Rn(...e.map(n=>n.right))-t,height:Rn(...e.map(n=>n.bottom))-r}}const p9=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:r,elements:n,rects:o,platform:a,strategy:i}=t,{padding:l=2,x:c,y:u}=uo(e,t),d=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(n.reference))||[]),m=function(_){const E=_.slice().sort((b,x)=>b.y-x.y),w=[];let v=null;for(let b=0;b<E.length;b++){const x=E[b];!v||x.y-v.y>v.height/2?w.push([x]):w[w.length-1].push(x),v=x}return w.map(b=>rl(rb(b)))}(d),h=rl(rb(d)),g=Dy(l),y=await a.getElementRects({reference:{getBoundingClientRect:function(){if(m.length===2&&m[0].left>m[1].right&&c!=null&&u!=null)return m.find(_=>c>_.left-g.left&&c<_.right+g.right&&u>_.top-g.top&&u<_.bottom+g.bottom)||h;if(m.length>=2){if(ca(r)==="x"){const P=m[0],O=m[m.length-1],$=vn(r)==="top",C=P.top,R=O.bottom,j=$?P.left:O.left,k=$?P.right:O.right;return{top:C,bottom:R,left:j,right:k,width:k-j,height:R-C,x:j,y:C}}const _=vn(r)==="left",E=Rn(...m.map(P=>P.right)),w=ta(...m.map(P=>P.left)),v=m.filter(P=>_?P.left===w:P.right===E),b=v[0].top,x=v[v.length-1].bottom;return{top:b,bottom:x,left:w,right:E,width:E-w,height:x-b,x:w,y:b}}return h}},floating:n.floating,strategy:i});return o.reference.x!==y.reference.x||o.reference.y!==y.reference.y||o.reference.width!==y.reference.width||o.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},m9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(a,i){const{placement:l,platform:c,elements:u}=a,d=await(c.isRTL==null?void 0:c.isRTL(u.floating)),m=vn(l),h=ml(l),g=ca(l)==="x",y=["left","top"].includes(m)?-1:1,_=d&&g?-1:1,E=uo(i,a);let{mainAxis:w,crossAxis:v,alignmentAxis:b}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...E};return h&&typeof b=="number"&&(v=h==="end"?-1*b:b),g?{x:v*_,y:w*y}:{x:w*y,y:v*_}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function Ek(e){return e==="x"?"y":"x"}const h9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:E=>{let{x:w,y:v}=E;return{x:w,y:v}}},...c}=uo(e,t),u={x:r,y:n},d=await Ny(t,c),m=ca(vn(o)),h=Ek(m);let g=u[m],y=u[h];if(a){const E=m==="y"?"bottom":"right";g=Gg(g+d[m==="y"?"top":"left"],g,g-d[E])}if(i){const E=h==="y"?"bottom":"right";y=Gg(y+d[h==="y"?"top":"left"],y,y-d[E])}const _=l.fn({...t,[m]:g,[h]:y});return{..._,data:{x:_.x-r,y:_.y-n}}}}},g9=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=uo(e,t),d={x:r,y:n},m=ca(o),h=Ek(m);let g=d[m],y=d[h];const _=uo(l,t),E=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(c){const b=m==="y"?"height":"width",x=a.reference[m]-a.floating[b]+E.mainAxis,P=a.reference[m]+a.reference[b]-E.mainAxis;g<x?g=x:g>P&&(g=P)}if(u){var w,v;const b=m==="y"?"width":"height",x=["top","left"].includes(vn(o)),P=a.reference[h]-a.floating[b]+(x&&((w=i.offset)==null?void 0:w[h])||0)+(x?0:E.crossAxis),O=a.reference[h]+a.reference[b]+(x?0:((v=i.offset)==null?void 0:v[h])||0)-(x?E.crossAxis:0);y<P?y=P:y>O&&(y=O)}return{[m]:g,[h]:y}}}},v9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:a}=t,{apply:i=()=>{},...l}=uo(e,t),c=await Ny(t,l),u=vn(r),d=ml(r),m=ca(r)==="x",{width:h,height:g}=n.floating;let y,_;u==="top"||u==="bottom"?(y=u,_=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(_=u,y=d==="end"?"top":"bottom");const E=g-c[y],w=h-c[_],v=!t.middlewareData.shift;let b=E,x=w;if(m){const O=h-c.left-c.right;x=d||v?ta(w,O):O}else{const O=g-c.top-c.bottom;b=d||v?ta(E,O):O}if(v&&!d){const O=Rn(c.left,0),$=Rn(c.right,0),C=Rn(c.top,0),R=Rn(c.bottom,0);m?x=h-2*(O!==0||$!==0?O+$:Rn(c.left,c.right)):b=g-2*(C!==0||R!==0?C+R:Rn(c.top,c.bottom))}await i({...t,availableWidth:x,availableHeight:b});const P=await o.getDimensions(a.floating);return h!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function Ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fn(e){return Ir(e).getComputedStyle(e)}function Sk(e){return e instanceof Ir(e).Node}function ra(e){return Sk(e)?(e.nodeName||"").toLowerCase():"#document"}function bn(e){return e instanceof HTMLElement||e instanceof Ir(e).HTMLElement}function nb(e){return typeof ShadowRoot<"u"&&(e instanceof Ir(e).ShadowRoot||e instanceof ShadowRoot)}function Ts(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function y9(e){return["table","td","th"].includes(ra(e))}function Kg(e){const t=Ay(),r=Fn(e);return r.transform!=="none"||r.perspective!=="none"||!!r.containerType&&r.containerType!=="normal"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function Ay(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function hm(e){return["html","body","#document"].includes(ra(e))}const Yg=Math.min,Bi=Math.max,Nd=Math.round,Qc=Math.floor,na=e=>({x:e,y:e});function Pk(e){const t=Fn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=bn(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=Nd(r)!==a||Nd(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function ro(e){return e instanceof Element||e instanceof Ir(e).Element}function My(e){return ro(e)?e:e.contextElement}function Ui(e){const t=My(e);if(!bn(t))return na(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Pk(t);let i=(a?Nd(r.width):r.width)/n,l=(a?Nd(r.height):r.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const w9=na(0);function $k(e){const t=Ir(e);return Ay()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:w9}function La(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=My(e);let i=na(1);t&&(n?ro(n)&&(i=Ui(n)):i=Ui(e));const l=function(h,g,y){return g===void 0&&(g=!1),!(!y||g&&y!==Ir(h))&&g}(a,r,n)?$k(a):na(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,m=o.height/i.y;if(a){const h=Ir(a),g=n&&ro(n)?Ir(n):n;let y=h.frameElement;for(;y&&n&&g!==h;){const _=Ui(y),E=y.getBoundingClientRect(),w=getComputedStyle(y),v=E.left+(y.clientLeft+parseFloat(w.paddingLeft))*_.x,b=E.top+(y.clientTop+parseFloat(w.paddingTop))*_.y;c*=_.x,u*=_.y,d*=_.x,m*=_.y,c+=v,u+=b,y=Ir(y).frameElement}}return rl({width:d,height:m,x:c,y:u})}function gm(e){return ro(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function no(e){var t;return(t=(Sk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ok(e){return La(no(e)).left+gm(e).scrollLeft}function nl(e){if(ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||nb(e)&&e.host||no(e);return nb(t)?t.host:t}function Ck(e){const t=nl(e);return hm(t)?e.ownerDocument?e.ownerDocument.body:e.body:bn(t)&&Ts(t)?t:Ck(t)}function Ad(e,t){var r;t===void 0&&(t=[]);const n=Ck(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),a=Ir(n);return o?t.concat(a,a.visualViewport||[],Ts(n)?n:[]):t.concat(n,Ad(n))}function ob(e,t,r){let n;if(t==="viewport")n=function(o,a){const i=Ir(o),l=no(o),c=i.visualViewport;let u=l.clientWidth,d=l.clientHeight,m=0,h=0;if(c){u=c.width,d=c.height;const g=Ay();(!g||g&&a==="fixed")&&(m=c.offsetLeft,h=c.offsetTop)}return{width:u,height:d,x:m,y:h}}(e,r);else if(t==="document")n=function(o){const a=no(o),i=gm(o),l=o.ownerDocument.body,c=Bi(a.scrollWidth,a.clientWidth,l.scrollWidth,l.clientWidth),u=Bi(a.scrollHeight,a.clientHeight,l.scrollHeight,l.clientHeight);let d=-i.scrollLeft+Ok(o);const m=-i.scrollTop;return Fn(l).direction==="rtl"&&(d+=Bi(a.clientWidth,l.clientWidth)-c),{width:c,height:u,x:d,y:m}}(no(e));else if(ro(t))n=function(o,a){const i=La(o,!0,a==="fixed"),l=i.top+o.clientTop,c=i.left+o.clientLeft,u=bn(o)?Ui(o):na(1);return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:c*u.x,y:l*u.y}}(t,r);else{const o=$k(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return rl(n)}function kk(e,t){const r=nl(e);return!(r===t||!ro(r)||hm(r))&&(Fn(r).position==="fixed"||kk(r,t))}function _9(e,t,r){const n=bn(t),o=no(t),a=r==="fixed",i=La(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=na(0);if(n||!n&&!a)if((ra(t)!=="body"||Ts(o))&&(l=gm(t)),bn(t)){const u=La(t,!0,a,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=Ok(o));return{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function ab(e,t){return bn(e)&&Fn(e).position!=="fixed"?t?t(e):e.offsetParent:null}function ib(e,t){const r=Ir(e);if(!bn(e))return r;let n=ab(e,t);for(;n&&y9(n)&&Fn(n).position==="static";)n=ab(n,t);return n&&(ra(n)==="html"||ra(n)==="body"&&Fn(n).position==="static"&&!Kg(n))?r:n||function(o){let a=nl(o);for(;bn(a)&&!hm(a);){if(Kg(a))return a;a=nl(a)}return null}(e)||r}const b9={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=bn(r),a=no(r);if(r===a)return t;let i={scrollLeft:0,scrollTop:0},l=na(1);const c=na(0);if((o||!o&&n!=="fixed")&&((ra(r)!=="body"||Ts(a))&&(i=gm(r)),bn(r))){const u=La(r);l=Ui(r),c.x=u.x+r.clientLeft,c.y=u.y+r.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-i.scrollLeft*l.x+c.x,y:t.y*l.y-i.scrollTop*l.y+c.y}},getDocumentElement:no,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?function(c,u){const d=u.get(c);if(d)return d;let m=Ad(c).filter(_=>ro(_)&&ra(_)!=="body"),h=null;const g=Fn(c).position==="fixed";let y=g?nl(c):c;for(;ro(y)&&!hm(y);){const _=Fn(y),E=Kg(y);E||_.position!=="fixed"||(h=null),(g?!E&&!h:!E&&_.position==="static"&&h&&["absolute","fixed"].includes(h.position)||Ts(y)&&!E&&kk(c,y))?m=m.filter(w=>w!==y):h=_,y=nl(y)}return u.set(c,m),m}(t,this._c):[].concat(r),n],i=a[0],l=a.reduce((c,u)=>{const d=ob(t,u,o);return c.top=Bi(d.top,c.top),c.right=Yg(d.right,c.right),c.bottom=Yg(d.bottom,c.bottom),c.left=Bi(d.left,c.left),c},ob(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:ib,getElementRects:async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||ib,a=this.getDimensions;return{reference:_9(t,await o(r),n),floating:{x:0,y:0,...await a(r)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){return Pk(e)},getScale:Ui,isElement:ro,isRTL:function(e){return getComputedStyle(e).direction==="rtl"}};function x9(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=My(e),d=o||a?[...u?Ad(u):[],...Ad(t)]:[];d.forEach(E=>{o&&E.addEventListener("scroll",r,{passive:!0}),a&&E.addEventListener("resize",r)});const m=u&&l?function(E,w){let v,b=null;const x=no(E);function P(){clearTimeout(v),b&&b.disconnect(),b=null}return function O($,C){$===void 0&&($=!1),C===void 0&&(C=1),P();const{left:R,top:j,width:k,height:T}=E.getBoundingClientRect();if($||w(),!k||!T)return;const L={rootMargin:-Qc(j)+"px "+-Qc(x.clientWidth-(R+k))+"px "+-Qc(x.clientHeight-(j+T))+"px "+-Qc(R)+"px",threshold:Bi(0,Yg(1,C))||1};let U=!0;function V(M){const Q=M[0].intersectionRatio;if(Q!==C){if(!U)return O();Q?O(!1,Q):v=setTimeout(()=>{O(!1,1e-7)},100)}U=!1}try{b=new IntersectionObserver(V,{...L,root:x.ownerDocument})}catch{b=new IntersectionObserver(V,L)}b.observe(E)}(!0),P}(u,r):null;let h,g=-1,y=null;i&&(y=new ResizeObserver(E=>{let[w]=E;w&&w.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{y&&y.observe(t)})),r()}),u&&!c&&y.observe(u),y.observe(t));let _=c?La(e):null;return c&&function E(){const w=La(e);!_||w.x===_.x&&w.y===_.y&&w.width===_.width&&w.height===_.height||r(),_=w,h=requestAnimationFrame(E)}(),r(),()=>{d.forEach(E=>{o&&E.removeEventListener("scroll",r),a&&E.removeEventListener("resize",r)}),m&&m(),y&&y.disconnect(),y=null,c&&cancelAnimationFrame(h)}}const E9=(e,t,r)=>{const n=new Map,o={platform:b9,...r},a={...o.platform,_c:n};return l9(e,t,{...o,platform:a})},S9=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?tb({element:t.current,padding:r}).fn(o):{}:t?tb({element:t,padding:r}).fn(o):{}}}};var Ru=typeof document<"u"?f.useLayoutEffect:f.useEffect;function Md(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Md(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Md(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function lb(e){const t=f.useRef(e);return Ru(()=>{t.current=e}),t}function P9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,whileElementsMounted:a,open:i}=e,[l,c]=f.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[u,d]=f.useState(n);Md(u,n)||d(n);const m=f.useRef(null),h=f.useRef(null),g=f.useRef(l),y=lb(a),_=lb(o),[E,w]=f.useState(null),[v,b]=f.useState(null),x=f.useCallback(j=>{m.current!==j&&(m.current=j,w(j))},[]),P=f.useCallback(j=>{h.current!==j&&(h.current=j,b(j))},[]),O=f.useCallback(()=>{if(!m.current||!h.current)return;const j={placement:t,strategy:r,middleware:u};_.current&&(j.platform=_.current),E9(m.current,h.current,j).then(k=>{const T={...k,isPositioned:!0};$.current&&!Md(g.current,T)&&(g.current=T,qs.flushSync(()=>{c(T)}))})},[u,t,r,_]);Ru(()=>{i===!1&&g.current.isPositioned&&(g.current.isPositioned=!1,c(j=>({...j,isPositioned:!1})))},[i]);const $=f.useRef(!1);Ru(()=>($.current=!0,()=>{$.current=!1}),[]),Ru(()=>{if(E&&v){if(y.current)return y.current(E,v,O);O()}},[E,v,O,y]);const C=f.useMemo(()=>({reference:m,floating:h,setReference:x,setFloating:P}),[x,P]),R=f.useMemo(()=>({reference:E,floating:v}),[E,v]);return f.useMemo(()=>({...l,update:O,refs:C,elements:R,reference:x,floating:P}),[l,O,C,R,x,P])}var $9=typeof document<"u"?f.useLayoutEffect:f.useEffect;function O9(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const C9=f.createContext(null),k9=()=>f.useContext(C9);function j9(e){return(e==null?void 0:e.ownerDocument)||document}function R9(e){return j9(e).defaultView||window}function Gc(e){return e?e instanceof R9(e).Element:!1}const T9=Mu["useInsertionEffect".toString()],I9=T9||(e=>e());function D9(e){const t=f.useRef(()=>{});return I9(()=>{t.current=e}),f.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function N9(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=P9(e),a=k9(),i=f.useRef(null),l=f.useRef({}),c=f.useState(()=>O9())[0],[u,d]=f.useState(null),m=f.useCallback(w=>{const v=Gc(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),contextElement:w}:w;o.refs.setReference(v)},[o.refs]),h=f.useCallback(w=>{(Gc(w)||w===null)&&(i.current=w,d(w)),(Gc(o.refs.reference.current)||o.refs.reference.current===null||w!==null&&!Gc(w))&&o.refs.setReference(w)},[o.refs]),g=f.useMemo(()=>({...o.refs,setReference:h,setPositionReference:m,domReference:i}),[o.refs,h,m]),y=f.useMemo(()=>({...o.elements,domReference:u}),[o.elements,u]),_=D9(r),E=f.useMemo(()=>({...o,refs:g,elements:y,dataRef:l,nodeId:n,events:c,open:t,onOpenChange:_}),[o,n,c,t,_,g,y]);return $9(()=>{const w=a==null?void 0:a.nodesRef.current.find(v=>v.id===n);w&&(w.context=E)}),f.useMemo(()=>({...o,context:E,refs:g,reference:h,positionReference:m}),[o,g,E,h,m])}function A9({opened:e,floating:t,position:r,positionDependencies:n}){const[o,a]=f.useState(0);f.useEffect(()=>{if(t.refs.reference.current&&t.refs.floating.current)return x9(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),mn(()=>{t.update()},n),mn(()=>{a(i=>i+1)},[e])}function M9(e){const t=[m9(e.offset)];return e.middlewares.shift&&t.push(h9({limiter:g9()})),e.middlewares.flip&&t.push(f9()),e.middlewares.inline&&t.push(p9()),t.push(S9({element:e.arrowRef,padding:e.arrowOffset})),t}function z9(e){const[t,r]=wr({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=()=>{var i;(i=e.onClose)==null||i.call(e),r(!1)},o=()=>{var i,l;t?((i=e.onClose)==null||i.call(e),r(!1)):((l=e.onOpen)==null||l.call(e),r(!0))},a=N9({placement:e.position,middleware:[...M9(e),...e.width==="target"?[v9({apply({rects:i}){var l,c;Object.assign((c=(l=a.refs.floating.current)==null?void 0:l.style)!=null?c:{},{width:`${i.reference.width}px`})}})]:[]]});return A9({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:a}),mn(()=>{var i;(i=e.onPositionChange)==null||i.call(e,a.placement)},[a.placement]),mn(()=>{var i,l;e.opened?(l=e.onOpen)==null||l.call(e):(i=e.onClose)==null||i.call(e)},[e.opened]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:n,onToggle:o}}const jk={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[L9,Rk]=ho(jk.context);var F9=Object.defineProperty,V9=Object.defineProperties,B9=Object.getOwnPropertyDescriptors,zd=Object.getOwnPropertySymbols,Tk=Object.prototype.hasOwnProperty,Ik=Object.prototype.propertyIsEnumerable,sb=(e,t,r)=>t in e?F9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kc=(e,t)=>{for(var r in t||(t={}))Tk.call(t,r)&&sb(e,r,t[r]);if(zd)for(var r of zd(t))Ik.call(t,r)&&sb(e,r,t[r]);return e},U9=(e,t)=>V9(e,B9(t)),W9=(e,t)=>{var r={};for(var n in e)Tk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zd)for(var n of zd(e))t.indexOf(n)<0&&Ik.call(e,n)&&(r[n]=e[n]);return r};const H9={refProp:"ref",popupType:"dialog"},Dk=f.forwardRef((e,t)=>{const r=H("PopoverTarget",H9,e),{children:n,refProp:o,popupType:a}=r,i=W9(r,["children","refProp","popupType"]);if(!Tp(n))throw new Error(jk.children);const l=i,c=Rk(),u=Qp(c.reference,n.ref,t),d=c.withRoles?{"aria-haspopup":a,"aria-expanded":c.opened,"aria-controls":c.getDropdownId(),id:c.getTargetId()}:{};return f.cloneElement(n,Kc(U9(Kc(Kc(Kc({},l),d),c.targetProps),{className:_$(c.targetProps.className,l.className,n.props.className),[o]:u}),c.controlled?null:{onClick:c.onToggle}))});Dk.displayName="@mantine/core/PopoverTarget";var q9=W((e,{radius:t,shadow:r})=>({dropdown:{position:"absolute",backgroundColor:e.white,background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,padding:`${e.spacing.sm} ${e.spacing.md}`,boxShadow:e.shadows[r]||r||"none",borderRadius:e.fn.radius(t),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`,zIndex:1}}));const Q9=q9;var G9=Object.defineProperty,cb=Object.getOwnPropertySymbols,K9=Object.prototype.hasOwnProperty,Y9=Object.prototype.propertyIsEnumerable,ub=(e,t,r)=>t in e?G9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ui=(e,t)=>{for(var r in t||(t={}))K9.call(t,r)&&ub(e,r,t[r]);if(cb)for(var r of cb(t))Y9.call(t,r)&&ub(e,r,t[r]);return e};const db={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function X9({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in Ec?ui(ui(ui({transitionProperty:Ec[e].transitionProperty},o),Ec[e].common),Ec[e][db[t]]):null:ui(ui(ui({transitionProperty:e.transitionProperty},o),e.common),e[db[t]])}function J9({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:a,onEntered:i,onExited:l}){const c=nr(),u=Gp(),d=c.respectReducedMotion?u:!1,[m,h]=f.useState(d?0:e),[g,y]=f.useState(n?"entered":"exited"),_=f.useRef(-1),E=w=>{const v=w?o:a,b=w?i:l;y(w?"pre-entering":"pre-exiting"),window.clearTimeout(_.current);const x=d?0:w?e:t;if(h(x),x===0)typeof v=="function"&&v(),typeof b=="function"&&b(),y(w?"entered":"exited");else{const P=window.setTimeout(()=>{typeof v=="function"&&v(),y(w?"entering":"exiting")},10);_.current=window.setTimeout(()=>{window.clearTimeout(P),typeof b=="function"&&b(),y(w?"entered":"exited")},x)}};return mn(()=>{E(n)},[n]),f.useEffect(()=>()=>window.clearTimeout(_.current),[]),{transitionDuration:m,transitionStatus:g,transitionTimingFunction:r||c.transitionTimingFunction}}function Xs({keepMounted:e,transition:t,duration:r=250,exitDuration:n=r,mounted:o,children:a,timingFunction:i,onExit:l,onEntered:c,onEnter:u,onExited:d}){const{transitionDuration:m,transitionStatus:h,transitionTimingFunction:g}=J9({mounted:o,exitDuration:n,duration:r,timingFunction:i,onExit:l,onEntered:c,onEnter:u,onExited:d});return m===0?o?s.createElement(s.Fragment,null,a({})):e?a({display:"none"}):null:h==="exited"?e?a({display:"none"}):null:s.createElement(s.Fragment,null,a(X9({transition:t,duration:m,state:h,timingFunction:g})))}Xs.displayName="@mantine/core/Transition";function zy({children:e,active:t=!0,refProp:r="ref"}){const n=LA(t),o=Qp(n,e==null?void 0:e.ref);return Tp(e)?f.cloneElement(e,{[r]:o}):e}zy.displayName="@mantine/core/FocusTrap";var Z9=Object.defineProperty,eF=Object.defineProperties,tF=Object.getOwnPropertyDescriptors,fb=Object.getOwnPropertySymbols,rF=Object.prototype.hasOwnProperty,nF=Object.prototype.propertyIsEnumerable,pb=(e,t,r)=>t in e?Z9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ro=(e,t)=>{for(var r in t||(t={}))rF.call(t,r)&&pb(e,r,t[r]);if(fb)for(var r of fb(t))nF.call(t,r)&&pb(e,r,t[r]);return e},Yc=(e,t)=>eF(e,tF(t));function mb(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function hb(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}const oF={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function aF({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:a,arrowY:i,dir:l}){const[c,u="center"]=e.split("-"),d={width:S(t),height:S(t),transform:"rotate(45deg)",position:"absolute",[oF[c]]:S(n)},m=S(-t/2);return c==="left"?Yc(Ro(Ro({},d),mb(u,i,r,o)),{right:m,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?Yc(Ro(Ro({},d),mb(u,i,r,o)),{left:m,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?Yc(Ro(Ro({},d),hb(u,a,r,o,l)),{bottom:m,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?Yc(Ro(Ro({},d),hb(u,a,r,o,l)),{top:m,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var iF=Object.defineProperty,lF=Object.defineProperties,sF=Object.getOwnPropertyDescriptors,Ld=Object.getOwnPropertySymbols,Nk=Object.prototype.hasOwnProperty,Ak=Object.prototype.propertyIsEnumerable,gb=(e,t,r)=>t in e?iF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cF=(e,t)=>{for(var r in t||(t={}))Nk.call(t,r)&&gb(e,r,t[r]);if(Ld)for(var r of Ld(t))Ak.call(t,r)&&gb(e,r,t[r]);return e},uF=(e,t)=>lF(e,sF(t)),dF=(e,t)=>{var r={};for(var n in e)Nk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ld)for(var n of Ld(e))t.indexOf(n)<0&&Ak.call(e,n)&&(r[n]=e[n]);return r};const Mk=f.forwardRef((e,t)=>{var r=e,{position:n,arrowSize:o,arrowOffset:a,arrowRadius:i,arrowPosition:l,visible:c,arrowX:u,arrowY:d}=r,m=dF(r,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const h=nr();return c?s.createElement("div",uF(cF({},m),{ref:t,style:aF({position:n,arrowSize:o,arrowOffset:a,arrowRadius:i,arrowPosition:l,dir:h.dir,arrowX:u,arrowY:d})})):null});Mk.displayName="@mantine/core/FloatingArrow";var fF=Object.defineProperty,pF=Object.defineProperties,mF=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,zk=Object.prototype.hasOwnProperty,Lk=Object.prototype.propertyIsEnumerable,vb=(e,t,r)=>t in e?fF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,di=(e,t)=>{for(var r in t||(t={}))zk.call(t,r)&&vb(e,r,t[r]);if(Fd)for(var r of Fd(t))Lk.call(t,r)&&vb(e,r,t[r]);return e},Xc=(e,t)=>pF(e,mF(t)),hF=(e,t)=>{var r={};for(var n in e)zk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Fd)for(var n of Fd(e))t.indexOf(n)<0&&Lk.call(e,n)&&(r[n]=e[n]);return r};const gF={};function Fk(e){var t;const r=H("PopoverDropdown",gF,e),{style:n,className:o,children:a,onKeyDownCapture:i}=r,l=hF(r,["style","className","children","onKeyDownCapture"]),c=Rk(),{classes:u,cx:d}=Q9({radius:c.radius,shadow:c.shadow},{name:c.__staticSelector,classNames:c.classNames,styles:c.styles,unstyled:c.unstyled,variant:c.variant}),m=Q$({opened:c.opened,shouldReturnFocus:c.returnFocus}),h=c.withRoles?{"aria-labelledby":c.getTargetId(),id:c.getDropdownId(),role:"dialog"}:{};return c.disabled?null:s.createElement(um,Xc(di({},c.portalProps),{withinPortal:c.withinPortal}),s.createElement(Xs,Xc(di({mounted:c.opened},c.transitionProps),{transition:c.transitionProps.transition||"fade",duration:(t=c.transitionProps.duration)!=null?t:150,keepMounted:c.keepMounted,exitDuration:typeof c.transitionProps.exitDuration=="number"?c.transitionProps.exitDuration:c.transitionProps.duration}),g=>{var y,_;return s.createElement(zy,{active:c.trapFocus},s.createElement(ue,di(Xc(di({},h),{tabIndex:-1,ref:c.floating,style:Xc(di(di({},n),g),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(_=c.x)!=null?_:0,width:c.width==="target"?void 0:S(c.width)}),className:d(u.dropdown,o),onKeyDownCapture:lN(c.onClose,{active:c.closeOnEscape,onTrigger:m,onKeyDown:i}),"data-position":c.placement}),l),a,s.createElement(Mk,{ref:c.arrowRef,arrowX:c.arrowX,arrowY:c.arrowY,visible:c.withArrow,position:c.placement,arrowSize:c.arrowSize,arrowRadius:c.arrowRadius,arrowOffset:c.arrowOffset,arrowPosition:c.arrowPosition,className:u.arrow})))}))}Fk.displayName="@mantine/core/PopoverDropdown";function vF(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){const[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var yb=Object.getOwnPropertySymbols,yF=Object.prototype.hasOwnProperty,wF=Object.prototype.propertyIsEnumerable,_F=(e,t)=>{var r={};for(var n in e)yF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yb)for(var n of yb(e))t.indexOf(n)<0&&wF.call(e,n)&&(r[n]=e[n]);return r};const bF={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:go("popover"),__staticSelector:"Popover",width:"max-content"};function wo(e){var t,r,n,o,a,i;const l=f.useRef(null),c=H("Popover",bF,e),{children:u,position:d,offset:m,onPositionChange:h,positionDependencies:g,opened:y,transitionProps:_,width:E,middlewares:w,withArrow:v,arrowSize:b,arrowOffset:x,arrowRadius:P,arrowPosition:O,unstyled:$,classNames:C,styles:R,closeOnClickOutside:j,withinPortal:k,portalProps:T,closeOnEscape:L,clickOutsideEvents:U,trapFocus:V,onClose:M,onOpen:Q,onChange:A,zIndex:z,radius:q,shadow:le,id:ye,defaultOpened:Re,__staticSelector:me,withRoles:qe,disabled:ze,returnFocus:it,variant:wt,keepMounted:qt}=c,Pr=_F(c,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[Qt,Ur]=f.useState(null),[Eo,jt]=f.useState(null),$r=Fr(ye),Hn=nr(),Ve=z9({middlewares:w,width:E,position:vF(Hn.dir,d),offset:typeof m=="number"?m+(v?b/2:0):m,arrowRef:l,arrowOffset:x,onPositionChange:h,positionDependencies:g,opened:y,defaultOpened:Re,onChange:A,onOpen:Q,onClose:M});kA(()=>Ve.opened&&j&&Ve.onClose(),U,[Qt,Eo]);const Wr=f.useCallback(_t=>{Ur(_t),Ve.floating.reference(_t)},[Ve.floating.reference]),Hr=f.useCallback(_t=>{jt(_t),Ve.floating.floating(_t)},[Ve.floating.floating]);return s.createElement(L9,{value:{returnFocus:it,disabled:ze,controlled:Ve.controlled,reference:Wr,floating:Hr,x:Ve.floating.x,y:Ve.floating.y,arrowX:(n=(r=(t=Ve.floating)==null?void 0:t.middlewareData)==null?void 0:r.arrow)==null?void 0:n.x,arrowY:(i=(a=(o=Ve.floating)==null?void 0:o.middlewareData)==null?void 0:a.arrow)==null?void 0:i.y,opened:Ve.opened,arrowRef:l,transitionProps:_,width:E,withArrow:v,arrowSize:b,arrowOffset:x,arrowRadius:P,arrowPosition:O,placement:Ve.floating.placement,trapFocus:V,withinPortal:k,portalProps:T,zIndex:z,radius:q,shadow:le,closeOnEscape:L,onClose:Ve.onClose,onToggle:Ve.onToggle,getTargetId:()=>`${$r}-target`,getDropdownId:()=>`${$r}-dropdown`,withRoles:qe,targetProps:Pr,__staticSelector:me,classNames:C,styles:R,unstyled:$,variant:wt,keepMounted:qt}},u)}wo.Target=Dk;wo.Dropdown=Fk;wo.displayName="@mantine/core/Popover";var xF=Object.defineProperty,Vd=Object.getOwnPropertySymbols,Vk=Object.prototype.hasOwnProperty,Bk=Object.prototype.propertyIsEnumerable,wb=(e,t,r)=>t in e?xF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,EF=(e,t)=>{for(var r in t||(t={}))Vk.call(t,r)&&wb(e,r,t[r]);if(Vd)for(var r of Vd(t))Bk.call(t,r)&&wb(e,r,t[r]);return e},SF=(e,t)=>{var r={};for(var n in e)Vk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vd)for(var n of Vd(e))t.indexOf(n)<0&&Bk.call(e,n)&&(r[n]=e[n]);return r};function PF(e){var t=e,{children:r,component:n="div",maxHeight:o=220,direction:a="column",id:i,innerRef:l,__staticSelector:c,styles:u,classNames:d,unstyled:m}=t,h=SF(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:g}=i9(null,{name:c,styles:u,classNames:d,unstyled:m});return s.createElement(wo.Dropdown,EF({p:0,onMouseDown:y=>y.preventDefault()},h),s.createElement("div",{style:{maxHeight:S(o),display:"flex"}},s.createElement(ue,{component:n||"div",id:`${i}-items`,"aria-labelledby":`${i}-label`,role:"listbox",onMouseDown:y=>y.preventDefault(),style:{flex:1,overflowY:n!==Ty?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:l},s.createElement("div",{className:g.itemsWrapper,style:{flexDirection:a}},r))))}function cs({opened:e,transitionProps:t={transition:"fade",duration:0},shadow:r,withinPortal:n,portalProps:o,children:a,__staticSelector:i,onDirectionChange:l,switchDirectionOnFlip:c,zIndex:u,dropdownPosition:d,positionDependencies:m=[],classNames:h,styles:g,unstyled:y,readOnly:_,variant:E}){return s.createElement(wo,{unstyled:y,classNames:h,styles:g,width:"target",withRoles:!1,opened:e,middlewares:{flip:d==="flip",shift:!1},position:d==="flip"?"bottom":d,positionDependencies:m,zIndex:u,__staticSelector:i,withinPortal:n,portalProps:o,transitionProps:t,shadow:r,disabled:_,onPositionChange:w=>c&&(l==null?void 0:l(w==="top"?"column-reverse":"column")),variant:E},a)}cs.Target=wo.Target;cs.Dropdown=PF;var $F=Object.defineProperty,OF=Object.defineProperties,CF=Object.getOwnPropertyDescriptors,Bd=Object.getOwnPropertySymbols,Uk=Object.prototype.hasOwnProperty,Wk=Object.prototype.propertyIsEnumerable,_b=(e,t,r)=>t in e?$F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jc=(e,t)=>{for(var r in t||(t={}))Uk.call(t,r)&&_b(e,r,t[r]);if(Bd)for(var r of Bd(t))Wk.call(t,r)&&_b(e,r,t[r]);return e},kF=(e,t)=>OF(e,CF(t)),jF=(e,t)=>{var r={};for(var n in e)Uk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bd)for(var n of Bd(e))t.indexOf(n)<0&&Wk.call(e,n)&&(r[n]=e[n]);return r};function Hk(e,t,r){const n=H(e,t,r),{label:o,description:a,error:i,required:l,classNames:c,styles:u,className:d,unstyled:m,__staticSelector:h,sx:g,errorProps:y,labelProps:_,descriptionProps:E,wrapperProps:w,id:v,size:b,style:x,inputContainer:P,inputWrapperOrder:O,withAsterisk:$,variant:C}=n,R=jF(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),j=Fr(v),{systemStyles:k,rest:T}=Bn(R),L=Jc({label:o,description:a,error:i,required:l,classNames:c,className:d,__staticSelector:h,sx:g,errorProps:y,labelProps:_,descriptionProps:E,unstyled:m,styles:u,id:j,size:b,style:x,inputContainer:P,inputWrapperOrder:O,withAsterisk:$,variant:C},w);return kF(Jc({},T),{classNames:c,styles:u,unstyled:m,wrapperProps:Jc(Jc({},L),k),inputProps:{required:l,classNames:c,styles:u,unstyled:m,id:j,size:b,__staticSelector:h,error:i,variant:C}})}var RF=W((e,t,{size:r})=>({label:{display:"inline-block",fontSize:N({size:r,sizes:e.fontSizes}),fontWeight:500,color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:e.fn.variant({variant:"filled",color:"red"}).background}}));const TF=RF;var IF=Object.defineProperty,Ud=Object.getOwnPropertySymbols,qk=Object.prototype.hasOwnProperty,Qk=Object.prototype.propertyIsEnumerable,bb=(e,t,r)=>t in e?IF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,DF=(e,t)=>{for(var r in t||(t={}))qk.call(t,r)&&bb(e,r,t[r]);if(Ud)for(var r of Ud(t))Qk.call(t,r)&&bb(e,r,t[r]);return e},NF=(e,t)=>{var r={};for(var n in e)qk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ud)for(var n of Ud(e))t.indexOf(n)<0&&Qk.call(e,n)&&(r[n]=e[n]);return r};const AF={labelElement:"label",size:"sm"},Ly=f.forwardRef((e,t)=>{const r=H("InputLabel",AF,e),{labelElement:n,children:o,required:a,size:i,classNames:l,styles:c,unstyled:u,className:d,htmlFor:m,__staticSelector:h,variant:g,onMouseDown:y}=r,_=NF(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:E,cx:w}=TF(null,{name:["InputWrapper",h],classNames:l,styles:c,unstyled:u,variant:g,size:i});return s.createElement(ue,DF({component:n,ref:t,className:w(E.label,d),htmlFor:n==="label"?m:void 0,onMouseDown:v=>{y==null||y(v),!v.defaultPrevented&&v.detail>1&&v.preventDefault()}},_),o,a&&s.createElement("span",{className:E.required,"aria-hidden":!0}," *"))});Ly.displayName="@mantine/core/InputLabel";var MF=W((e,t,{size:r})=>({error:{wordBreak:"break-word",color:e.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${N({size:r,sizes:e.fontSizes})} - ${S(2)})`,lineHeight:1.2,display:"block"}}));const zF=MF;var LF=Object.defineProperty,Wd=Object.getOwnPropertySymbols,Gk=Object.prototype.hasOwnProperty,Kk=Object.prototype.propertyIsEnumerable,xb=(e,t,r)=>t in e?LF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,FF=(e,t)=>{for(var r in t||(t={}))Gk.call(t,r)&&xb(e,r,t[r]);if(Wd)for(var r of Wd(t))Kk.call(t,r)&&xb(e,r,t[r]);return e},VF=(e,t)=>{var r={};for(var n in e)Gk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wd)for(var n of Wd(e))t.indexOf(n)<0&&Kk.call(e,n)&&(r[n]=e[n]);return r};const BF={size:"sm"},Fy=f.forwardRef((e,t)=>{const r=H("InputError",BF,e),{children:n,className:o,classNames:a,styles:i,unstyled:l,size:c,__staticSelector:u,variant:d}=r,m=VF(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=zF(null,{name:["InputWrapper",u],classNames:a,styles:i,unstyled:l,variant:d,size:c});return s.createElement(ae,FF({className:g(h.error,o),ref:t},m),n)});Fy.displayName="@mantine/core/InputError";var UF=W((e,t,{size:r})=>({description:{wordBreak:"break-word",color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontSize:`calc(${N({size:r,sizes:e.fontSizes})} - ${S(2)})`,lineHeight:1.2,display:"block"}}));const WF=UF;var HF=Object.defineProperty,Hd=Object.getOwnPropertySymbols,Yk=Object.prototype.hasOwnProperty,Xk=Object.prototype.propertyIsEnumerable,Eb=(e,t,r)=>t in e?HF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qF=(e,t)=>{for(var r in t||(t={}))Yk.call(t,r)&&Eb(e,r,t[r]);if(Hd)for(var r of Hd(t))Xk.call(t,r)&&Eb(e,r,t[r]);return e},QF=(e,t)=>{var r={};for(var n in e)Yk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hd)for(var n of Hd(e))t.indexOf(n)<0&&Xk.call(e,n)&&(r[n]=e[n]);return r};const GF={size:"sm"},Vy=f.forwardRef((e,t)=>{const r=H("InputDescription",GF,e),{children:n,className:o,classNames:a,styles:i,unstyled:l,size:c,__staticSelector:u,variant:d}=r,m=QF(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=WF(null,{name:["InputWrapper",u],classNames:a,styles:i,unstyled:l,variant:d,size:c});return s.createElement(ae,qF({color:"dimmed",className:g(h.description,o),ref:t,unstyled:l},m),n)});Vy.displayName="@mantine/core/InputDescription";const Jk=f.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),KF=Jk.Provider,YF=()=>f.useContext(Jk);function XF(e,{hasDescription:t,hasError:r}){const n=e.findIndex(c=>c==="input"),o=e[n-1],a=e[n+1];return{offsetBottom:t&&a==="description"||r&&a==="error",offsetTop:t&&o==="description"||r&&o==="error"}}var JF=Object.defineProperty,ZF=Object.defineProperties,eV=Object.getOwnPropertyDescriptors,Sb=Object.getOwnPropertySymbols,tV=Object.prototype.hasOwnProperty,rV=Object.prototype.propertyIsEnumerable,Pb=(e,t,r)=>t in e?JF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nV=(e,t)=>{for(var r in t||(t={}))tV.call(t,r)&&Pb(e,r,t[r]);if(Sb)for(var r of Sb(t))rV.call(t,r)&&Pb(e,r,t[r]);return e},oV=(e,t)=>ZF(e,eV(t)),aV=W(e=>({root:oV(nV({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const iV=aV;var lV=Object.defineProperty,sV=Object.defineProperties,cV=Object.getOwnPropertyDescriptors,qd=Object.getOwnPropertySymbols,Zk=Object.prototype.hasOwnProperty,ej=Object.prototype.propertyIsEnumerable,$b=(e,t,r)=>t in e?lV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,To=(e,t)=>{for(var r in t||(t={}))Zk.call(t,r)&&$b(e,r,t[r]);if(qd)for(var r of qd(t))ej.call(t,r)&&$b(e,r,t[r]);return e},Ob=(e,t)=>sV(e,cV(t)),uV=(e,t)=>{var r={};for(var n in e)Zk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qd)for(var n of qd(e))t.indexOf(n)<0&&ej.call(e,n)&&(r[n]=e[n]);return r};const dV={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},tj=f.forwardRef((e,t)=>{const r=H("InputWrapper",dV,e),{className:n,label:o,children:a,required:i,id:l,error:c,description:u,labelElement:d,labelProps:m,descriptionProps:h,errorProps:g,classNames:y,styles:_,size:E,inputContainer:w,__staticSelector:v,unstyled:b,inputWrapperOrder:x,withAsterisk:P,variant:O}=r,$=uV(r,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:C,cx:R}=iV(null,{classNames:y,styles:_,name:["InputWrapper",v],unstyled:b,variant:O,size:E}),j={classNames:y,styles:_,unstyled:b,size:E,variant:O,__staticSelector:v},k=typeof P=="boolean"?P:i,T=l?`${l}-error`:g==null?void 0:g.id,L=l?`${l}-description`:h==null?void 0:h.id,V=`${!!c&&typeof c!="boolean"?T:""} ${u?L:""}`,M=V.trim().length>0?V.trim():void 0,Q=o&&s.createElement(Ly,To(To({key:"label",labelElement:d,id:l?`${l}-label`:void 0,htmlFor:l,required:k},j),m),o),A=u&&s.createElement(Vy,Ob(To(To({key:"description"},h),j),{size:(h==null?void 0:h.size)||j.size,id:(h==null?void 0:h.id)||L}),u),z=s.createElement(f.Fragment,{key:"input"},w(a)),q=typeof c!="boolean"&&c&&s.createElement(Fy,Ob(To(To({},g),j),{size:(g==null?void 0:g.size)||j.size,key:"error",id:(g==null?void 0:g.id)||T}),c),le=x.map(ye=>{switch(ye){case"label":return Q;case"input":return z;case"description":return A;case"error":return q;default:return null}});return s.createElement(KF,{value:To({describedBy:M},XF(x,{hasDescription:!!A,hasError:!!q}))},s.createElement(ue,To({className:R(C.root,n),ref:t},$),le))});tj.displayName="@mantine/core/InputWrapper";var fV=Object.defineProperty,Qd=Object.getOwnPropertySymbols,rj=Object.prototype.hasOwnProperty,nj=Object.prototype.propertyIsEnumerable,Cb=(e,t,r)=>t in e?fV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pV=(e,t)=>{for(var r in t||(t={}))rj.call(t,r)&&Cb(e,r,t[r]);if(Qd)for(var r of Qd(t))nj.call(t,r)&&Cb(e,r,t[r]);return e},mV=(e,t)=>{var r={};for(var n in e)rj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qd)for(var n of Qd(e))t.indexOf(n)<0&&nj.call(e,n)&&(r[n]=e[n]);return r};const hV={},oj=f.forwardRef((e,t)=>{const r=H("InputPlaceholder",hV,e),{sx:n}=r,o=mV(r,["sx"]);return s.createElement(ue,pV({component:"span",sx:[a=>a.fn.placeholderStyles(),...Rp(n)],ref:t},o))});oj.displayName="@mantine/core/InputPlaceholder";var gV=Object.defineProperty,vV=Object.defineProperties,yV=Object.getOwnPropertyDescriptors,kb=Object.getOwnPropertySymbols,wV=Object.prototype.hasOwnProperty,_V=Object.prototype.propertyIsEnumerable,jb=(e,t,r)=>t in e?gV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zc=(e,t)=>{for(var r in t||(t={}))wV.call(t,r)&&jb(e,r,t[r]);if(kb)for(var r of kb(t))_V.call(t,r)&&jb(e,r,t[r]);return e},Eh=(e,t)=>vV(e,yV(t));const xt={xs:S(30),sm:S(36),md:S(42),lg:S(50),xl:S(60)},bV=["default","filled","unstyled"];function xV({theme:e,variant:t}){return bV.includes(t)?t==="default"?{border:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,transition:"border-color 100ms ease","&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:t==="filled"?{border:`${S(1)} solid transparent`,backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],"&:focus, &:focus-within":e.focusRingStyles.inputStyles(e)}:{borderWidth:0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:"transparent",minHeight:S(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var EV=W((e,{multiline:t,radius:r,invalid:n,rightSectionWidth:o,withRightSection:a,iconWidth:i,offsetBottom:l,offsetTop:c,pointer:u},{variant:d,size:m})=>{const h=e.fn.variant({variant:"filled",color:"red"}).background,g=d==="default"||d==="filled"?{minHeight:N({size:m,sizes:xt}),paddingLeft:`calc(${N({size:m,sizes:xt})} / 3)`,paddingRight:a?o||N({size:m,sizes:xt}):`calc(${N({size:m,sizes:xt})} / 3)`,borderRadius:e.fn.radius(r)}:d==="unstyled"&&a?{paddingRight:o||N({size:m,sizes:xt})}:null;return{wrapper:{position:"relative",marginTop:c?`calc(${e.spacing.xs} / 2)`:void 0,marginBottom:l?`calc(${e.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:Eh(Zc(Zc(Eh(Zc({},e.fn.fontStyles()),{height:t?d==="unstyled"?void 0:"auto":N({size:m,sizes:xt}),WebkitTapHighlightColor:"transparent",lineHeight:t?e.lineHeight:`calc(${N({size:m,sizes:xt})} - ${S(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:N({size:m,sizes:e.fontSizes}),width:"100%",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"block",textAlign:"left",cursor:u?"pointer":void 0}),xV({theme:e,variant:d})),g),{"&:disabled, &[data-disabled]":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:e.colors.dark[2]}},"&[data-invalid]":{color:h,borderColor:h,"&::placeholder":{opacity:1,color:h}},"&[data-with-icon]":{paddingLeft:typeof i=="number"?S(i):N({size:m,sizes:xt})},"&::placeholder":Eh(Zc({},e.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:i?S(i):N({size:m,sizes:xt}),color:n?e.colors.red[e.colorScheme==="dark"?6:7]:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:o||N({size:m,sizes:xt})}}}),SV=Object.defineProperty,PV=Object.defineProperties,$V=Object.getOwnPropertyDescriptors,Gd=Object.getOwnPropertySymbols,aj=Object.prototype.hasOwnProperty,ij=Object.prototype.propertyIsEnumerable,Rb=(e,t,r)=>t in e?SV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eu=(e,t)=>{for(var r in t||(t={}))aj.call(t,r)&&Rb(e,r,t[r]);if(Gd)for(var r of Gd(t))ij.call(t,r)&&Rb(e,r,t[r]);return e},Tb=(e,t)=>PV(e,$V(t)),OV=(e,t)=>{var r={};for(var n in e)aj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gd)for(var n of Gd(e))t.indexOf(n)<0&&ij.call(e,n)&&(r[n]=e[n]);return r};const CV={size:"sm",variant:"default"},Ya=f.forwardRef((e,t)=>{const r=H("Input",CV,e),{className:n,error:o,required:a,disabled:i,variant:l,icon:c,style:u,rightSectionWidth:d,iconWidth:m,rightSection:h,rightSectionProps:g,radius:y,size:_,wrapperProps:E,classNames:w,styles:v,__staticSelector:b,multiline:x,sx:P,unstyled:O,pointer:$}=r,C=OV(r,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:R,offsetTop:j,describedBy:k}=YF(),{classes:T,cx:L}=EV({radius:y,multiline:x,invalid:!!o,rightSectionWidth:d?S(d):void 0,iconWidth:m,withRightSection:!!h,offsetBottom:R,offsetTop:j,pointer:$},{classNames:w,styles:v,name:["Input",b],unstyled:O,variant:l,size:_}),{systemStyles:U,rest:V}=Bn(C);return s.createElement(ue,eu(eu({className:L(T.wrapper,n),sx:P,style:u},U),E),c&&s.createElement("div",{className:T.icon},c),s.createElement(ue,Tb(eu({component:"input"},V),{ref:t,required:a,"aria-invalid":!!o,"aria-describedby":k,disabled:i,"data-disabled":i||void 0,"data-with-icon":!!c||void 0,"data-invalid":!!o||void 0,className:T.input})),h&&s.createElement("div",Tb(eu({},g),{className:T.rightSection}),h))});Ya.displayName="@mantine/core/Input";Ya.Wrapper=tj;Ya.Label=Ly;Ya.Description=Vy;Ya.Error=Fy;Ya.Placeholder=oj;const Lt=Ya;var kV=Object.defineProperty,Kd=Object.getOwnPropertySymbols,lj=Object.prototype.hasOwnProperty,sj=Object.prototype.propertyIsEnumerable,Ib=(e,t,r)=>t in e?kV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Db=(e,t)=>{for(var r in t||(t={}))lj.call(t,r)&&Ib(e,r,t[r]);if(Kd)for(var r of Kd(t))sj.call(t,r)&&Ib(e,r,t[r]);return e},jV=(e,t)=>{var r={};for(var n in e)lj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kd)for(var n of Kd(e))t.indexOf(n)<0&&sj.call(e,n)&&(r[n]=e[n]);return r};function RV(e){const t=e,{style:r}=t,n=jV(t,["style"]);return s.createElement("svg",Db({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Db({width:S(15),height:S(15)},r)},n),s.createElement("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var TV=Object.defineProperty,IV=Object.defineProperties,DV=Object.getOwnPropertyDescriptors,Nb=Object.getOwnPropertySymbols,NV=Object.prototype.hasOwnProperty,AV=Object.prototype.propertyIsEnumerable,Ab=(e,t,r)=>t in e?TV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,MV=(e,t)=>{for(var r in t||(t={}))NV.call(t,r)&&Ab(e,r,t[r]);if(Nb)for(var r of Nb(t))AV.call(t,r)&&Ab(e,r,t[r]);return e},zV=(e,t)=>IV(e,DV(t));const cj=f.createContext(null);function LV({spacing:e,children:t}){return s.createElement(cj.Provider,{value:{spacing:e}},t)}function FV(){const e=f.useContext(cj);return e?zV(MV({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var VV=W((e,{spacing:t})=>({root:{display:"flex",paddingLeft:N({size:t,sizes:e.spacing})}}));const BV=VV;var UV=Object.defineProperty,Yd=Object.getOwnPropertySymbols,uj=Object.prototype.hasOwnProperty,dj=Object.prototype.propertyIsEnumerable,Mb=(e,t,r)=>t in e?UV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WV=(e,t)=>{for(var r in t||(t={}))uj.call(t,r)&&Mb(e,r,t[r]);if(Yd)for(var r of Yd(t))dj.call(t,r)&&Mb(e,r,t[r]);return e},HV=(e,t)=>{var r={};for(var n in e)uj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yd)for(var n of Yd(e))t.indexOf(n)<0&&dj.call(e,n)&&(r[n]=e[n]);return r};const qV={},fj=f.forwardRef((e,t)=>{const r=H("AvatarGroup",qV,e),{children:n,spacing:o="sm",unstyled:a,className:i,variant:l}=r,c=HV(r,["children","spacing","unstyled","className","variant"]),{classes:u,cx:d}=BV({spacing:o},{name:"AvatarGroup",unstyled:a,variant:l});return s.createElement(LV,{spacing:o},s.createElement(ue,WV({ref:t,className:d(u.root,i)},c),n))});fj.displayName="@mantine/core/AvatarGroup";var QV=Object.defineProperty,GV=Object.defineProperties,KV=Object.getOwnPropertyDescriptors,zb=Object.getOwnPropertySymbols,YV=Object.prototype.hasOwnProperty,XV=Object.prototype.propertyIsEnumerable,Lb=(e,t,r)=>t in e?QV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Il=(e,t)=>{for(var r in t||(t={}))YV.call(t,r)&&Lb(e,r,t[r]);if(zb)for(var r of zb(t))XV.call(t,r)&&Lb(e,r,t[r]);return e},Fb=(e,t)=>GV(e,KV(t));const JV=["filled","light","gradient","outline"],tu={xs:S(16),sm:S(26),md:S(38),lg:S(56),xl:S(84)};function ZV({withinGroup:e,spacing:t,theme:r}){return e?{marginLeft:`calc(${N({size:t,sizes:r.spacing})} * -1)`,backgroundColor:`${r.colorScheme==="dark"?r.colors.dark[7]:r.white}`,border:`${S(2)} solid ${r.colorScheme==="dark"?r.colors.dark[7]:r.white}`}:null}function eB({theme:e,variant:t,color:r,gradient:n}){const o=e.fn.variant({variant:t,color:r,gradient:n});return JV.includes(t)?{placeholder:{color:o.color,backgroundColor:o.background,backgroundImage:t==="gradient"?o.background:void 0,border:`${S(t==="gradient"?0:1)} solid ${o.border}`},placeholderIcon:{color:o.color}}:{}}var tB=W((e,{radius:t,withinGroup:r,spacing:n,color:o,gradient:a},{variant:i,size:l})=>{const c=eB({theme:e,color:o,gradient:a,variant:i});return{root:Il(Fb(Il({},e.fn.focusStyles()),{WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"relative",display:"block",userSelect:"none",overflow:"hidden",borderRadius:e.fn.radius(t),textDecoration:"none",border:0,backgroundColor:"transparent",padding:0,width:N({size:l,sizes:tu}),minWidth:N({size:l,sizes:tu}),height:N({size:l,sizes:tu})}),ZV({withinGroup:r,spacing:n,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:Il(Fb(Il({},e.fn.fontStyles()),{fontWeight:700,display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",userSelect:"none",borderRadius:e.fn.radius(t),fontSize:`calc(${N({size:l,sizes:tu})} / 2.5)`}),c.placeholder),placeholderIcon:Il({width:"70%",height:"70%"},c.placeholderIcon)}});const rB=tB;var nB=Object.defineProperty,oB=Object.defineProperties,aB=Object.getOwnPropertyDescriptors,Xd=Object.getOwnPropertySymbols,pj=Object.prototype.hasOwnProperty,mj=Object.prototype.propertyIsEnumerable,Vb=(e,t,r)=>t in e?nB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bb=(e,t)=>{for(var r in t||(t={}))pj.call(t,r)&&Vb(e,r,t[r]);if(Xd)for(var r of Xd(t))mj.call(t,r)&&Vb(e,r,t[r]);return e},iB=(e,t)=>oB(e,aB(t)),lB=(e,t)=>{var r={};for(var n in e)pj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xd)for(var n of Xd(e))t.indexOf(n)<0&&mj.call(e,n)&&(r[n]=e[n]);return r};const sB={size:"md",color:"gray",variant:"light"},By=f.forwardRef((e,t)=>{const r=H("Avatar",sB,e),{className:n,size:o,src:a,alt:i,radius:l,children:c,color:u,variant:d,gradient:m,classNames:h,styles:g,imageProps:y,unstyled:_}=r,E=lB(r,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),w=FV(),[v,b]=f.useState(!a),{classes:x,cx:P}=rB({color:u,radius:l,withinGroup:w.withinGroup,spacing:w.spacing,gradient:m},{classNames:h,styles:g,unstyled:_,name:"Avatar",variant:d,size:o});return f.useEffect(()=>{b(!a)},[a]),s.createElement(ue,Bb({component:"div",className:P(x.root,n),ref:t},E),v?s.createElement("div",{className:x.placeholder,title:i},c||s.createElement(RV,{className:x.placeholderIcon})):s.createElement("img",iB(Bb({},y),{className:x.image,src:a,alt:i,onError:()=>b(!0)})))});By.displayName="@mantine/core/Avatar";By.Group=fj;const Jd=By;var cB=Object.defineProperty,uB=Object.defineProperties,dB=Object.getOwnPropertyDescriptors,Ub=Object.getOwnPropertySymbols,fB=Object.prototype.hasOwnProperty,pB=Object.prototype.propertyIsEnumerable,Wb=(e,t,r)=>t in e?cB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sh=(e,t)=>{for(var r in t||(t={}))fB.call(t,r)&&Wb(e,r,t[r]);if(Ub)for(var r of Ub(t))pB.call(t,r)&&Wb(e,r,t[r]);return e},mB=(e,t)=>uB(e,dB(t));const hB=["light","filled","outline","dot","gradient"],Ph={xs:{fontSize:S(9),height:S(16)},sm:{fontSize:S(10),height:S(18)},md:{fontSize:S(11),height:S(20)},lg:{fontSize:S(13),height:S(26)},xl:{fontSize:S(16),height:S(32)}},gB={xs:S(4),sm:S(4),md:S(6),lg:S(8),xl:S(10)};function vB({theme:e,variant:t,color:r,size:n,gradient:o}){if(!hB.includes(t))return null;if(t==="dot"){const i=N({size:n,sizes:gB});return{backgroundColor:"transparent",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],border:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[3]}`,paddingLeft:`calc(${N({size:n,sizes:e.spacing})} / 1.5 - ${i} / 2)`,"&::before":{content:'""',display:"block",width:i,height:i,borderRadius:i,backgroundColor:e.fn.themeColor(r,e.colorScheme==="dark"?4:e.fn.primaryShade("light"),!0),marginRight:i}}}const a=e.fn.variant({color:r,variant:t,gradient:o});return{background:a.background,color:a.color,border:`${S(t==="gradient"?0:1)} solid ${a.border}`}}var yB=W((e,{color:t,radius:r,gradient:n,fullWidth:o},{variant:a,size:i})=>{const{fontSize:l,height:c}=i in Ph?Ph[i]:Ph.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:Sh(mB(Sh(Sh({},e.fn.focusStyles()),e.fn.fontStyles()),{fontSize:l,height:c,WebkitTapHighlightColor:"transparent",lineHeight:`calc(${c} - ${S(2)})`,textDecoration:"none",padding:`0 calc(${N({size:i,sizes:e.spacing})} / 1.5)`,boxSizing:"border-box",display:o?"flex":"inline-flex",alignItems:"center",justifyContent:"center",width:o?"100%":"auto",textTransform:"uppercase",borderRadius:e.fn.radius(r),fontWeight:700,letterSpacing:S(.25),cursor:"inherit",textOverflow:"ellipsis",overflow:"hidden"}),vB({theme:e,variant:a,color:t,size:i,gradient:n}))}});const wB=yB;var _B=Object.defineProperty,Zd=Object.getOwnPropertySymbols,hj=Object.prototype.hasOwnProperty,gj=Object.prototype.propertyIsEnumerable,Hb=(e,t,r)=>t in e?_B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bB=(e,t)=>{for(var r in t||(t={}))hj.call(t,r)&&Hb(e,r,t[r]);if(Zd)for(var r of Zd(t))gj.call(t,r)&&Hb(e,r,t[r]);return e},xB=(e,t)=>{var r={};for(var n in e)hj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zd)for(var n of Zd(e))t.indexOf(n)<0&&gj.call(e,n)&&(r[n]=e[n]);return r};const EB={variant:"light",size:"md",radius:"xl"},vj=f.forwardRef((e,t)=>{const r=H("Badge",EB,e),{className:n,color:o,variant:a,fullWidth:i,children:l,size:c,leftSection:u,rightSection:d,radius:m,gradient:h,classNames:g,styles:y,unstyled:_}=r,E=xB(r,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:w,cx:v}=wB({fullWidth:i,color:o,radius:m,gradient:h},{classNames:g,styles:y,name:"Badge",unstyled:_,variant:a,size:c});return s.createElement(ue,bB({className:v(w.root,n),ref:t},E),u&&s.createElement("span",{className:w.leftSection},u),s.createElement("span",{className:w.inner},l),d&&s.createElement("span",{className:w.rightSection},d))});vj.displayName="@mantine/core/Badge";const SB=vj;var PB=Object.defineProperty,ef=Object.getOwnPropertySymbols,yj=Object.prototype.hasOwnProperty,wj=Object.prototype.propertyIsEnumerable,qb=(e,t,r)=>t in e?PB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qb=(e,t)=>{for(var r in t||(t={}))yj.call(t,r)&&qb(e,r,t[r]);if(ef)for(var r of ef(t))wj.call(t,r)&&qb(e,r,t[r]);return e},$B=(e,t)=>{var r={};for(var n in e)yj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ef)for(var n of ef(e))t.indexOf(n)<0&&wj.call(e,n)&&(r[n]=e[n]);return r};function OB(e){const t=e,{style:r}=t,n=$B(t,["style"]);return s.createElement("svg",Qb({viewBox:"0 0 409.294 409.294",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",style:Qb({width:S(20),height:S(20)},r)},n),s.createElement("path",{d:"M0 204.647v175.412h175.412V204.647H58.471c0-64.48 52.461-116.941 116.941-116.941V29.235C78.684 29.235 0 107.919 0 204.647zM409.294 87.706V29.235c-96.728 0-175.412 78.684-175.412 175.412v175.412h175.412V204.647H292.353c0-64.48 52.461-116.941 116.941-116.941z"}))}var CB=Object.defineProperty,kB=Object.defineProperties,jB=Object.getOwnPropertyDescriptors,Gb=Object.getOwnPropertySymbols,RB=Object.prototype.hasOwnProperty,TB=Object.prototype.propertyIsEnumerable,Kb=(e,t,r)=>t in e?CB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,IB=(e,t)=>{for(var r in t||(t={}))RB.call(t,r)&&Kb(e,r,t[r]);if(Gb)for(var r of Gb(t))TB.call(t,r)&&Kb(e,r,t[r]);return e},DB=(e,t)=>kB(e,jB(t)),NB=W((e,{color:t})=>({root:DB(IB({},e.fn.fontStyles()),{fontSize:e.fontSizes.lg,lineHeight:e.lineHeight,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,margin:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm,padding:`${e.spacing.md} ${e.spacing.lg}`}),inner:{display:"flex"},body:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},icon:{color:e.fn.variant({variant:"filled",color:t}).background,marginRight:e.spacing.lg,marginTop:S(2),width:S(22)},cite:{display:"block",fontSize:e.fontSizes.sm,marginTop:e.spacing.xs,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],overflow:"hidden",textOverflow:"ellipsis"}}));const AB=NB;var MB=Object.defineProperty,tf=Object.getOwnPropertySymbols,_j=Object.prototype.hasOwnProperty,bj=Object.prototype.propertyIsEnumerable,Yb=(e,t,r)=>t in e?MB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zB=(e,t)=>{for(var r in t||(t={}))_j.call(t,r)&&Yb(e,r,t[r]);if(tf)for(var r of tf(t))bj.call(t,r)&&Yb(e,r,t[r]);return e},LB=(e,t)=>{var r={};for(var n in e)_j.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tf)for(var n of tf(e))t.indexOf(n)<0&&bj.call(e,n)&&(r[n]=e[n]);return r};const FB={color:"gray",icon:s.createElement(OB,null)},xj=f.forwardRef((e,t)=>{const r=H("Blockquote",FB,e),{className:n,color:o,icon:a,cite:i,children:l,classNames:c,styles:u,unstyled:d,variant:m}=r,h=LB(r,["className","color","icon","cite","children","classNames","styles","unstyled","variant"]),{classes:g,cx:y}=AB({color:o},{classNames:c,styles:u,unstyled:d,name:"Blockquote",variant:m});return s.createElement(ue,zB({component:"blockquote",className:y(g.root,n),ref:t},h),s.createElement("div",{className:g.inner},a&&s.createElement("div",{className:g.icon},a),s.createElement("div",{className:g.body},l,i&&s.createElement("cite",{className:g.cite},i))))});xj.displayName="@mantine/core/Blockquote";var VB=W((e,{orientation:t,buttonBorderWidth:r})=>({root:{display:"flex",flexDirection:t==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[t==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${S(r)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[t==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${S(r)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[t==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${S(r)} / 2)`,[t==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${S(r)} / 2)`},"& + [data-button]":{[t==="vertical"?"marginTop":"marginLeft"]:`calc(${r} * -1)`,"@media (min-resolution: 192dpi)":{[t==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const BB=VB;var UB=Object.defineProperty,rf=Object.getOwnPropertySymbols,Ej=Object.prototype.hasOwnProperty,Sj=Object.prototype.propertyIsEnumerable,Xb=(e,t,r)=>t in e?UB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WB=(e,t)=>{for(var r in t||(t={}))Ej.call(t,r)&&Xb(e,r,t[r]);if(rf)for(var r of rf(t))Sj.call(t,r)&&Xb(e,r,t[r]);return e},HB=(e,t)=>{var r={};for(var n in e)Ej.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rf)for(var n of rf(e))t.indexOf(n)<0&&Sj.call(e,n)&&(r[n]=e[n]);return r};const qB={orientation:"horizontal",buttonBorderWidth:1},Pj=f.forwardRef((e,t)=>{const r=H("ButtonGroup",qB,e),{className:n,orientation:o,buttonBorderWidth:a,unstyled:i}=r,l=HB(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=BB({orientation:o,buttonBorderWidth:a},{name:"ButtonGroup",unstyled:i});return s.createElement(ue,WB({className:u(c.root,n),ref:t},l))});Pj.displayName="@mantine/core/ButtonGroup";var QB=Object.defineProperty,GB=Object.defineProperties,KB=Object.getOwnPropertyDescriptors,Jb=Object.getOwnPropertySymbols,YB=Object.prototype.hasOwnProperty,XB=Object.prototype.propertyIsEnumerable,Zb=(e,t,r)=>t in e?QB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jn=(e,t)=>{for(var r in t||(t={}))YB.call(t,r)&&Zb(e,r,t[r]);if(Jb)for(var r of Jb(t))XB.call(t,r)&&Zb(e,r,t[r]);return e},Tu=(e,t)=>GB(e,KB(t));const JB=["filled","outline","light","white","default","subtle","gradient"],Xg={xs:{height:xt.xs,paddingLeft:S(14),paddingRight:S(14)},sm:{height:xt.sm,paddingLeft:S(18),paddingRight:S(18)},md:{height:xt.md,paddingLeft:S(22),paddingRight:S(22)},lg:{height:xt.lg,paddingLeft:S(26),paddingRight:S(26)},xl:{height:xt.xl,paddingLeft:S(32),paddingRight:S(32)},"compact-xs":{height:S(22),paddingLeft:S(7),paddingRight:S(7)},"compact-sm":{height:S(26),paddingLeft:S(8),paddingRight:S(8)},"compact-md":{height:S(30),paddingLeft:S(10),paddingRight:S(10)},"compact-lg":{height:S(34),paddingLeft:S(12),paddingRight:S(12)},"compact-xl":{height:S(40),paddingLeft:S(14),paddingRight:S(14)}};function ZB({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return Xg[`compact-${t}`];const o=Xg[t];return o?Tu(Jn({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const eU=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function tU({variant:e,theme:t,color:r,gradient:n}){if(!JB.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?Jn({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):Jn({border:`${S(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var rU=W((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:a,color:i,gradient:l},{variant:c,size:u})=>({root:Tu(Jn(Tu(Jn(Jn(Jn(Jn({},ZB({compact:n,size:u,withLeftIcon:o,withRightIcon:a})),e.fn.fontStyles()),e.fn.focusStyles()),eU(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:N({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),tU({variant:c,theme:e,color:i,gradient:l})),{"&:active":e.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":Tu(Jn({content:'""'},e.fn.cover(S(-1))),{backgroundColor:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:e.fn.radius(t),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:e.spacing.xs},rightIcon:{marginLeft:e.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const nU=rU;var oU=Object.defineProperty,nf=Object.getOwnPropertySymbols,$j=Object.prototype.hasOwnProperty,Oj=Object.prototype.propertyIsEnumerable,ex=(e,t,r)=>t in e?oU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tx=(e,t)=>{for(var r in t||(t={}))$j.call(t,r)&&ex(e,r,t[r]);if(nf)for(var r of nf(t))Oj.call(t,r)&&ex(e,r,t[r]);return e},aU=(e,t)=>{var r={};for(var n in e)$j.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&nf)for(var n of nf(e))t.indexOf(n)<0&&Oj.call(e,n)&&(r[n]=e[n]);return r};const iU={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},Uy=f.forwardRef((e,t)=>{const r=H("Button",iU,e),{className:n,size:o,color:a,type:i,disabled:l,children:c,leftIcon:u,rightIcon:d,fullWidth:m,variant:h,radius:g,uppercase:y,compact:_,loading:E,loaderPosition:w,loaderProps:v,gradient:b,classNames:x,styles:P,unstyled:O}=r,$=aU(r,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:C,cx:R,theme:j}=nU({radius:g,color:a,fullWidth:m,compact:_,gradient:b,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:O,classNames:x,styles:P,variant:h,size:o}),k=j.fn.variant({color:a,variant:h}),T=s.createElement(Un,tx({color:k.color,size:`calc(${N({size:o,sizes:Xg}).height} / 2)`},v));return s.createElement(Jo,tx({className:R(C.root,n),type:i,disabled:l,"data-button":!0,"data-disabled":l||void 0,"data-loading":E||void 0,ref:t,unstyled:O},$),s.createElement("div",{className:C.inner},(u||E&&w==="left")&&s.createElement("span",{className:R(C.icon,C.leftIcon)},E&&w==="left"?T:u),E&&w==="center"&&s.createElement("span",{className:C.centerLoader},T),s.createElement("span",{className:C.label,style:{textTransform:y?"uppercase":void 0}},c),(d||E&&w==="right")&&s.createElement("span",{className:R(C.icon,C.rightIcon)},E&&w==="right"?T:d)))});Uy.displayName="@mantine/core/Button";Uy.Group=Pj;const Z=Uy;var lU=W((e,{radius:t,shadow:r})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,boxSizing:"border-box",borderRadius:e.fn.radius(t),boxShadow:e.shadows[r]||r||"none","&[data-with-border]":{border:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}}}));const sU=lU;var cU=Object.defineProperty,of=Object.getOwnPropertySymbols,Cj=Object.prototype.hasOwnProperty,kj=Object.prototype.propertyIsEnumerable,rx=(e,t,r)=>t in e?cU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uU=(e,t)=>{for(var r in t||(t={}))Cj.call(t,r)&&rx(e,r,t[r]);if(of)for(var r of of(t))kj.call(t,r)&&rx(e,r,t[r]);return e},dU=(e,t)=>{var r={};for(var n in e)Cj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&of)for(var n of of(e))t.indexOf(n)<0&&kj.call(e,n)&&(r[n]=e[n]);return r};const fU={},jj=f.forwardRef((e,t)=>{const r=H("Paper",fU,e),{className:n,children:o,radius:a,withBorder:i,shadow:l,unstyled:c,variant:u}=r,d=dU(r,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:m,cx:h}=sU({radius:a,shadow:l},{name:"Paper",unstyled:c,variant:u});return s.createElement(ue,uU({className:h(m.root,n),"data-with-border":i||void 0,ref:t},d),o)});jj.displayName="@mantine/core/Paper";const yn=jj;var pU=W((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const mU=pU;var hU=Object.defineProperty,af=Object.getOwnPropertySymbols,Rj=Object.prototype.hasOwnProperty,Tj=Object.prototype.propertyIsEnumerable,nx=(e,t,r)=>t in e?hU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gU=(e,t)=>{for(var r in t||(t={}))Rj.call(t,r)&&nx(e,r,t[r]);if(af)for(var r of af(t))Tj.call(t,r)&&nx(e,r,t[r]);return e},vU=(e,t)=>{var r={};for(var n in e)Rj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&af)for(var n of af(e))t.indexOf(n)<0&&Tj.call(e,n)&&(r[n]=e[n]);return r};const Ij=f.forwardRef((e,t)=>{const r=H("Center",{},e),{inline:n,className:o,unstyled:a,variant:i}=r,l=vU(r,["inline","className","unstyled","variant"]),{classes:c,cx:u}=mU({inline:n},{name:"Center",unstyled:a,variant:i});return s.createElement(ue,gU({ref:t,className:u(c.root,o)},l))});Ij.displayName="@mantine/core/Center";const tr=Ij,Dj=f.createContext(null),yU=Dj.Provider,wU=()=>f.useContext(Dj);var _U=Object.defineProperty,lf=Object.getOwnPropertySymbols,Nj=Object.prototype.hasOwnProperty,Aj=Object.prototype.propertyIsEnumerable,ox=(e,t,r)=>t in e?_U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ax=(e,t)=>{for(var r in t||(t={}))Nj.call(t,r)&&ox(e,r,t[r]);if(lf)for(var r of lf(t))Aj.call(t,r)&&ox(e,r,t[r]);return e},bU=(e,t)=>{var r={};for(var n in e)Nj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lf)for(var n of lf(e))t.indexOf(n)<0&&Aj.call(e,n)&&(r[n]=e[n]);return r};const xU={size:"sm"},Mj=f.forwardRef((e,t)=>{const r=H("CheckboxGroup",xU,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c}=r,u=bU(r,["children","value","defaultValue","onChange","size","wrapperProps"]),[d,m]=wr({value:o,defaultValue:a,finalValue:[],onChange:i}),h=g=>{const y=g.currentTarget.value;m(d.includes(y)?d.filter(_=>_!==y):[...d,y])};return s.createElement(yU,{value:{value:d,onChange:h,size:l}},s.createElement(Lt.Wrapper,ax(ax({labelElement:"div",size:l,__staticSelector:"CheckboxGroup",ref:t},c),u),n))});Mj.displayName="@mantine/core/CheckboxGroup";var EU=Object.defineProperty,sf=Object.getOwnPropertySymbols,zj=Object.prototype.hasOwnProperty,Lj=Object.prototype.propertyIsEnumerable,ix=(e,t,r)=>t in e?EU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cf=(e,t)=>{for(var r in t||(t={}))zj.call(t,r)&&ix(e,r,t[r]);if(sf)for(var r of sf(t))Lj.call(t,r)&&ix(e,r,t[r]);return e},Fj=(e,t)=>{var r={};for(var n in e)zj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sf)for(var n of sf(e))t.indexOf(n)<0&&Lj.call(e,n)&&(r[n]=e[n]);return r};function Vj(e){const t=e,{width:r,height:n,style:o}=t,a=Fj(t,["width","height","style"]);return s.createElement("svg",cf({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:cf({width:r,height:n},o)},a),s.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function SU(e){var t=e,{indeterminate:r}=t,n=Fj(t,["indeterminate"]);return r?s.createElement("svg",cf({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},n),s.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):s.createElement(Vj,cf({},n))}var PU=Object.defineProperty,$U=Object.defineProperties,OU=Object.getOwnPropertyDescriptors,lx=Object.getOwnPropertySymbols,CU=Object.prototype.hasOwnProperty,kU=Object.prototype.propertyIsEnumerable,sx=(e,t,r)=>t in e?PU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cx=(e,t)=>{for(var r in t||(t={}))CU.call(t,r)&&sx(e,r,t[r]);if(lx)for(var r of lx(t))kU.call(t,r)&&sx(e,r,t[r]);return e},ux=(e,t)=>$U(e,OU(t));const jU={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)};var RU=W((e,{radius:t,color:r,transitionDuration:n,labelPosition:o,error:a,indeterminate:i},{size:l})=>{const c=N({size:l,sizes:jU}),u=e.fn.variant({variant:"filled",color:r});return{icon:ux(cx({},e.fn.cover()),{ref:Zt("icon"),color:i?"inherit":e.white,transform:i?"none":`translateY(${S(5)}) scale(0.5)`,opacity:i?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${n}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:c,height:c,order:o==="left"?2:1},input:ux(cx({},e.fn.focusStyles()),{appearance:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${S(1)} solid ${a?e.fn.variant({variant:"filled",color:"red"}).background:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,width:c,height:c,borderRadius:e.fn.radius(t),padding:0,display:"block",margin:0,transition:`border-color ${n}ms ease, background-color ${n}ms ease`,cursor:e.cursorType,"&:checked":{backgroundColor:u.background,borderColor:u.background,[`& + .${Zt("icon")}`]:{opacity:1,color:e.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${Zt("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const TU=RU;var IU=Object.defineProperty,DU=Object.defineProperties,NU=Object.getOwnPropertyDescriptors,dx=Object.getOwnPropertySymbols,AU=Object.prototype.hasOwnProperty,MU=Object.prototype.propertyIsEnumerable,fx=(e,t,r)=>t in e?IU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zU=(e,t)=>{for(var r in t||(t={}))AU.call(t,r)&&fx(e,r,t[r]);if(dx)for(var r of dx(t))MU.call(t,r)&&fx(e,r,t[r]);return e},LU=(e,t)=>DU(e,NU(t));const $h={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)};var FU=W((e,{labelPosition:t},{size:r})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}},labelWrapper:LU(zU({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:r in $h?N({size:r,sizes:e.fontSizes}):void 0,lineHeight:r in $h?N({size:r,sizes:$h}):void 0,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,cursor:e.cursorType,order:t==="left"?1:2}),description:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},error:{marginTop:`calc(${e.spacing.xs} / 2)`,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm},label:{cursor:e.cursorType,[t==="left"?"paddingRight":"paddingLeft"]:e.spacing.sm,"&:disabled, &[data-disabled]":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}));const VU=FU;var BU=Object.defineProperty,uf=Object.getOwnPropertySymbols,Bj=Object.prototype.hasOwnProperty,Uj=Object.prototype.propertyIsEnumerable,px=(e,t,r)=>t in e?BU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UU=(e,t)=>{for(var r in t||(t={}))Bj.call(t,r)&&px(e,r,t[r]);if(uf)for(var r of uf(t))Uj.call(t,r)&&px(e,r,t[r]);return e},WU=(e,t)=>{var r={};for(var n in e)Bj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&uf)for(var n of uf(e))t.indexOf(n)<0&&Uj.call(e,n)&&(r[n]=e[n]);return r};const vm=f.forwardRef((e,t)=>{var r=e,{__staticSelector:n,className:o,classNames:a,styles:i,unstyled:l,children:c,label:u,description:d,id:m,disabled:h,error:g,size:y,labelPosition:_,variant:E}=r,w=WU(r,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:v,cx:b}=VU({labelPosition:_},{name:n,styles:i,classNames:a,unstyled:l,variant:E,size:y});return s.createElement(ue,UU({className:b(v.root,o),ref:t},w),s.createElement("div",{className:b(v.body)},c,s.createElement("div",{className:v.labelWrapper},u&&s.createElement("label",{className:v.label,"data-disabled":h||void 0,htmlFor:m},u),d&&s.createElement(Lt.Description,{className:v.description},d),g&&g!=="boolean"&&s.createElement(Lt.Error,{className:v.error},g))))});vm.displayName="@mantine/core/InlineInput";var HU=Object.defineProperty,df=Object.getOwnPropertySymbols,Wj=Object.prototype.hasOwnProperty,Hj=Object.prototype.propertyIsEnumerable,mx=(e,t,r)=>t in e?HU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ru=(e,t)=>{for(var r in t||(t={}))Wj.call(t,r)&&mx(e,r,t[r]);if(df)for(var r of df(t))Hj.call(t,r)&&mx(e,r,t[r]);return e},qU=(e,t)=>{var r={};for(var n in e)Wj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&df)for(var n of df(e))t.indexOf(n)<0&&Hj.call(e,n)&&(r[n]=e[n]);return r};const QU={size:"sm",transitionDuration:100,icon:SU,labelPosition:"right"},nn=f.forwardRef((e,t)=>{const r=H("Checkbox",QU,e),{className:n,style:o,sx:a,checked:i,disabled:l,color:c,label:u,indeterminate:d,id:m,size:h,radius:g,wrapperProps:y,children:_,classNames:E,styles:w,transitionDuration:v,icon:b,unstyled:x,labelPosition:P,description:O,error:$,variant:C}=r,R=qU(r,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),j=wU(),k=Fr(m),{systemStyles:T,rest:L}=Bn(R),{classes:U}=TU({radius:g,color:c,transitionDuration:v,labelPosition:P,error:!!$,indeterminate:d},{name:"Checkbox",classNames:E,styles:w,unstyled:x,variant:C,size:(j==null?void 0:j.size)||h}),V=j?{checked:j.value.includes(L.value),onChange:j.onChange}:{};return s.createElement(vm,ru(ru({className:n,sx:a,style:o,id:k,size:(j==null?void 0:j.size)||h,labelPosition:P,label:u,description:O,error:$,disabled:l,__staticSelector:"Checkbox",classNames:E,styles:w,unstyled:x,"data-checked":V.checked||void 0,variant:C},T),y),s.createElement("div",{className:U.inner},s.createElement("input",ru(ru({id:k,ref:t,type:"checkbox",className:U.input,checked:i,disabled:l},L),V)),s.createElement(b,{indeterminate:d,className:U.icon})))});nn.displayName="@mantine/core/Checkbox";nn.Group=Mj;const qj=f.createContext(null),GU=qj.Provider,KU=()=>f.useContext(qj),YU={};function Qj(e){const{value:t,defaultValue:r,onChange:n,multiple:o,children:a}=H("ChipGroup",YU,e),[i,l]=wr({value:t,defaultValue:r,finalValue:o?[]:null,onChange:n}),c=d=>Array.isArray(i)?i.includes(d):d===i,u=d=>{const m=d.currentTarget.value;Array.isArray(i)?l(i.includes(m)?i.filter(h=>h!==m):[...i,m]):l(m)};return s.createElement(GU,{value:{isChipSelected:c,onChange:u,multiple:o}},a)}Qj.displayName="@mantine/core/ChipGroup";var XU=Object.defineProperty,JU=Object.defineProperties,ZU=Object.getOwnPropertyDescriptors,hx=Object.getOwnPropertySymbols,eW=Object.prototype.hasOwnProperty,tW=Object.prototype.propertyIsEnumerable,gx=(e,t,r)=>t in e?XU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pn=(e,t)=>{for(var r in t||(t={}))eW.call(t,r)&&gx(e,r,t[r]);if(hx)for(var r of hx(t))tW.call(t,r)&&gx(e,r,t[r]);return e},Kl=(e,t)=>JU(e,ZU(t));const vx={xs:S(24),sm:S(28),md:S(32),lg:S(36),xl:S(40)},Dl={xs:S(10),sm:S(12),md:S(14),lg:S(16),xl:S(18)},yx={xs:S(16),sm:S(20),md:S(24),lg:S(28),xl:S(32)},nu={xs:S(7.5),sm:S(10),md:S(11.5),lg:S(13),xl:S(15)};function rW(e,{color:t},r){const n=e.fn.variant({variant:"filled",color:t}),o=e.fn.variant({variant:"light",color:t});return r==="light"?{label:pn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:Kl(pn({color:o.color,backgroundColor:o.background},e.fn.hover({backgroundColor:o.hover})),{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:t}).background}})}:r==="filled"?{label:pn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:pn({color:n.color,backgroundColor:n.background},e.fn.hover({backgroundColor:n.hover}))}:r==="outline"?{label:pn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]})),checked:{border:`${S(1)} solid ${n.background}`}}:{label:null,checked:null}}var nW=W((e,{radius:t,color:r},{size:n,variant:o})=>{const a=rW(e,{color:r},o);return{root:{},label:Kl(pn(Kl(pn({ref:Zt("label")},e.fn.fontStyles()),{boxSizing:"border-box",color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${S(1)} solid transparent`,borderRadius:e.fn.radius(t),height:N({size:n,sizes:vx}),fontSize:N({size:n,sizes:e.fontSizes}),lineHeight:`calc(${N({size:n,sizes:vx})} - ${S(2)})`,paddingLeft:N({size:n,sizes:yx}),paddingRight:N({size:n,sizes:yx}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),a.label),{"&[data-disabled]":Kl(pn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${Zt("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:N({size:n,sizes:nu}),paddingRight:N({size:n,sizes:nu}),"&:not([data-disabled])":a.checked}}),iconWrapper:{ref:Zt("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:r}).background,width:`calc(${N({size:n,sizes:Dl})} + (${N({size:n,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${N({size:n,sizes:Dl})} + (${N({size:n,sizes:e.spacing})} / 1.5))`,height:N({size:n,sizes:Dl}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:N({size:n,sizes:Dl}),height:`calc(${N({size:n,sizes:Dl})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":Kl(pn({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})),{[`& .${Zt("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&[data-checked]":{paddingLeft:N({size:n,sizes:nu}),paddingRight:N({size:n,sizes:nu}),"&:not([data-disabled])":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${Zt("label")}`]:pn({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${Zt("label")}`]:pn({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const oW=nW;var aW=Object.defineProperty,ff=Object.getOwnPropertySymbols,Gj=Object.prototype.hasOwnProperty,Kj=Object.prototype.propertyIsEnumerable,wx=(e,t,r)=>t in e?aW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ou=(e,t)=>{for(var r in t||(t={}))Gj.call(t,r)&&wx(e,r,t[r]);if(ff)for(var r of ff(t))Kj.call(t,r)&&wx(e,r,t[r]);return e},iW=(e,t)=>{var r={};for(var n in e)Gj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ff)for(var n of ff(e))t.indexOf(n)<0&&Kj.call(e,n)&&(r[n]=e[n]);return r};const lW={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},pf=f.forwardRef((e,t)=>{const r=H("Chip",lW,e),{radius:n,type:o,size:a,variant:i,disabled:l,id:c,color:u,children:d,className:m,classNames:h,style:g,styles:y,checked:_,defaultChecked:E,onChange:w,sx:v,wrapperProps:b,value:x,unstyled:P}=r,O=iW(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),$=KU(),C=Fr(c),{systemStyles:R,rest:j}=Bn(O),{classes:k,cx:T}=oW({radius:n,color:u},{classNames:h,styles:y,unstyled:P,name:"Chip",variant:i,size:a}),[L,U]=wr({value:_,defaultValue:E,finalValue:!1,onChange:w}),V=$?{checked:$.isChipSelected(x),onChange:$.onChange,type:$.multiple?"checkbox":"radio"}:{},M=V.checked||L;return s.createElement(ue,ou(ou({className:T(k.root,m),style:g,sx:v},R),b),s.createElement("input",ou(ou({type:o,className:k.input,checked:M,onChange:Q=>U(Q.currentTarget.checked),id:C,disabled:l,ref:t,value:x},V),j)),s.createElement("label",{htmlFor:C,"data-checked":M||void 0,"data-disabled":l||void 0,className:k.label},M&&s.createElement("span",{className:k.iconWrapper},s.createElement(Vj,{className:k.checkIcon})),d))});pf.displayName="@mantine/core/Chip";pf.Group=Qj;var sW=W((e,{fluid:t,sizes:r},{size:n})=>({root:{paddingLeft:e.spacing.md,paddingRight:e.spacing.md,maxWidth:t?"100%":N({size:n,sizes:r}),marginLeft:"auto",marginRight:"auto"}}));const cW=sW;var uW=Object.defineProperty,mf=Object.getOwnPropertySymbols,Yj=Object.prototype.hasOwnProperty,Xj=Object.prototype.propertyIsEnumerable,_x=(e,t,r)=>t in e?uW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dW=(e,t)=>{for(var r in t||(t={}))Yj.call(t,r)&&_x(e,r,t[r]);if(mf)for(var r of mf(t))Xj.call(t,r)&&_x(e,r,t[r]);return e},fW=(e,t)=>{var r={};for(var n in e)Yj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&mf)for(var n of mf(e))t.indexOf(n)<0&&Xj.call(e,n)&&(r[n]=e[n]);return r};const pW={sizes:{xs:S(540),sm:S(720),md:S(960),lg:S(1140),xl:S(1320)}},Jj=f.forwardRef((e,t)=>{const r=H("Container",pW,e),{className:n,fluid:o,size:a,unstyled:i,sizes:l,variant:c}=r,u=fW(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:d,cx:m}=cW({fluid:o,sizes:l},{unstyled:i,name:"Container",variant:c,size:a});return s.createElement(ue,dW({className:m(d.root,n),ref:t},u))});Jj.displayName="@mantine/core/Container";const[mW,hl]=ho("ModalBase component was not found in tree");var hW=W(()=>({close:{marginLeft:"auto",marginRight:0}}));const gW=hW;var vW=Object.defineProperty,hf=Object.getOwnPropertySymbols,Zj=Object.prototype.hasOwnProperty,eR=Object.prototype.propertyIsEnumerable,bx=(e,t,r)=>t in e?vW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yW=(e,t)=>{for(var r in t||(t={}))Zj.call(t,r)&&bx(e,r,t[r]);if(hf)for(var r of hf(t))eR.call(t,r)&&bx(e,r,t[r]);return e},wW=(e,t)=>{var r={};for(var n in e)Zj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hf)for(var n of hf(e))t.indexOf(n)<0&&eR.call(e,n)&&(r[n]=e[n]);return r};const _W={size:"sm"},bW=f.forwardRef((e,t)=>{const r=hl(),n=H(`${r.__staticSelector}CloseButton`,_W,e),{className:o}=n,a=wW(n,["className"]),{classes:i,cx:l}=gW(null,r.stylesApi);return s.createElement(Qs,yW({className:l(i.close,o),ref:t,onClick:r.onClose},a))});var xW=W(()=>({overlay:{}}));const EW=xW;var SW=Object.defineProperty,PW=Object.defineProperties,$W=Object.getOwnPropertyDescriptors,xx=Object.getOwnPropertySymbols,OW=Object.prototype.hasOwnProperty,CW=Object.prototype.propertyIsEnumerable,Ex=(e,t,r)=>t in e?SW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kW=(e,t)=>{for(var r in t||(t={}))OW.call(t,r)&&Ex(e,r,t[r]);if(xx)for(var r of xx(t))CW.call(t,r)&&Ex(e,r,t[r]);return e},jW=(e,t)=>PW(e,$W(t)),RW=W((e,{color:t,opacity:r,blur:n,radius:o,gradient:a,fixed:i,zIndex:l})=>({root:jW(kW({},e.fn.cover(0)),{position:i?"fixed":"absolute",backgroundColor:a?void 0:e.fn.rgba(t,r),backgroundImage:a,backdropFilter:n?`blur(${S(n)})`:void 0,borderRadius:e.fn.radius(o),zIndex:l,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const TW=RW;var IW=Object.defineProperty,gf=Object.getOwnPropertySymbols,tR=Object.prototype.hasOwnProperty,rR=Object.prototype.propertyIsEnumerable,Sx=(e,t,r)=>t in e?IW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,DW=(e,t)=>{for(var r in t||(t={}))tR.call(t,r)&&Sx(e,r,t[r]);if(gf)for(var r of gf(t))rR.call(t,r)&&Sx(e,r,t[r]);return e},NW=(e,t)=>{var r={};for(var n in e)tR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gf)for(var n of gf(e))t.indexOf(n)<0&&rR.call(e,n)&&(r[n]=e[n]);return r};const AW={opacity:.6,color:"#000",zIndex:go("modal"),radius:0},nR=f.forwardRef((e,t)=>{const r=H("Overlay",AW,e),{variant:n,opacity:o,color:a,blur:i,gradient:l,zIndex:c,radius:u,children:d,className:m,classNames:h,styles:g,unstyled:y,center:_,fixed:E}=r,w=NW(r,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:v,cx:b}=TW({color:a,opacity:o,blur:i,radius:u,gradient:l,fixed:E,zIndex:c},{name:"Overlay",classNames:h,styles:g,unstyled:y,variant:n});return s.createElement(ue,DW({ref:t,className:b(v.root,m),"data-center":_||void 0},w),d)});nR.displayName="@mantine/core/Overlay";const oR=nR;var MW=Object.defineProperty,zW=Object.defineProperties,LW=Object.getOwnPropertyDescriptors,vf=Object.getOwnPropertySymbols,aR=Object.prototype.hasOwnProperty,iR=Object.prototype.propertyIsEnumerable,Px=(e,t,r)=>t in e?MW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nl=(e,t)=>{for(var r in t||(t={}))aR.call(t,r)&&Px(e,r,t[r]);if(vf)for(var r of vf(t))iR.call(t,r)&&Px(e,r,t[r]);return e},FW=(e,t)=>zW(e,LW(t)),VW=(e,t)=>{var r={};for(var n in e)aR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vf)for(var n of vf(e))t.indexOf(n)<0&&iR.call(e,n)&&(r[n]=e[n]);return r};const BW={},UW=f.forwardRef((e,t)=>{const r=hl(),n=H(`${r.__staticSelector}Overlay`,BW,e),{onClick:o,transitionProps:a,style:i,className:l}=n,c=VW(n,["onClick","transitionProps","style","className"]),{classes:u,cx:d}=EW(null,r.stylesApi),m=h=>{o==null||o(h),r.closeOnClickOutside&&r.onClose()};return s.createElement(Xs,FW(Nl(Nl({mounted:r.opened},r.transitionProps),a),{transition:"fade"}),h=>s.createElement(oR,Nl({ref:t,onClick:m,fixed:!0,style:Nl(Nl({},i),h),className:d(u.overlay,l),zIndex:r.zIndex},c)))});var WW=W((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const HW=WW;var qW=Object.defineProperty,yf=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty,sR=Object.prototype.propertyIsEnumerable,$x=(e,t,r)=>t in e?qW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Al=(e,t)=>{for(var r in t||(t={}))lR.call(t,r)&&$x(e,r,t[r]);if(yf)for(var r of yf(t))sR.call(t,r)&&$x(e,r,t[r]);return e},QW=(e,t)=>{var r={};for(var n in e)lR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yf)for(var n of yf(e))t.indexOf(n)<0&&sR.call(e,n)&&(r[n]=e[n]);return r};const GW={},KW=f.forwardRef((e,t)=>{const r=hl(),n=H(`${r.__staticSelector}Content`,GW,e),{className:o,transitionProps:a,style:i,onKeyDown:l}=n,c=QW(n,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:d}=HW({zIndex:r.zIndex+1},r.stylesApi),m=h=>{var g;((g=h.target)==null?void 0:g.getAttribute("data-mantine-stop-propagation"))!=="true"&&h.key==="Escape"&&r.closeOnEscape&&r.onClose(),l==null||l(h)};return s.createElement(Xs,Al(Al({mounted:r.opened,transition:"pop"},r.transitionProps),a),h=>s.createElement("div",{className:d(u.inner)},s.createElement(zy,{active:r.opened&&r.trapFocus},s.createElement(yn,Al({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":r.bodyMounted?r.getBodyId():void 0,"aria-labelledby":r.titleMounted?r.getTitleId():void 0,onKeyDown:m,ref:t,className:d(u.content,o),style:Al(Al({},i),h),shadow:r.shadow},c),c.children))))});var YW=W((e,{padding:t})=>{const r=N({size:t,sizes:e.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:r,paddingRight:`calc(${r} - ${S(5)})`,position:"sticky",top:0,backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,zIndex:1e3}}});const XW=YW;var JW=Object.defineProperty,wf=Object.getOwnPropertySymbols,cR=Object.prototype.hasOwnProperty,uR=Object.prototype.propertyIsEnumerable,Ox=(e,t,r)=>t in e?JW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ZW=(e,t)=>{for(var r in t||(t={}))cR.call(t,r)&&Ox(e,r,t[r]);if(wf)for(var r of wf(t))uR.call(t,r)&&Ox(e,r,t[r]);return e},eH=(e,t)=>{var r={};for(var n in e)cR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wf)for(var n of wf(e))t.indexOf(n)<0&&uR.call(e,n)&&(r[n]=e[n]);return r};const tH={},rH=f.forwardRef((e,t)=>{const r=hl(),n=H(`${r.__staticSelector}Header`,tH,e),{className:o}=n,a=eH(n,["className"]),{classes:i,cx:l}=XW({padding:r.padding},r.stylesApi);return s.createElement(ue,ZW({ref:t,className:l(i.header,o)},a))});var nH=W(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const oH=nH;var aH=Object.defineProperty,_f=Object.getOwnPropertySymbols,dR=Object.prototype.hasOwnProperty,fR=Object.prototype.propertyIsEnumerable,Cx=(e,t,r)=>t in e?aH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iH=(e,t)=>{for(var r in t||(t={}))dR.call(t,r)&&Cx(e,r,t[r]);if(_f)for(var r of _f(t))fR.call(t,r)&&Cx(e,r,t[r]);return e},lH=(e,t)=>{var r={};for(var n in e)dR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_f)for(var n of _f(e))t.indexOf(n)<0&&fR.call(e,n)&&(r[n]=e[n]);return r};const sH={},cH=f.forwardRef((e,t)=>{const r=hl(),n=H(`${r.__staticSelector}Title`,sH,e),{className:o}=n,a=lH(n,["className"]),{classes:i,cx:l}=oH(null,r.stylesApi);return f.useEffect(()=>(r.setTitleMounted(!0),()=>r.setTitleMounted(!1)),[]),s.createElement(ue,iH({component:"h2",id:r.getTitleId(),className:l(i.title,o),ref:t},a))});var uH=W((e,{padding:t})=>({body:{padding:N({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const dH=uH;var fH=Object.defineProperty,bf=Object.getOwnPropertySymbols,pR=Object.prototype.hasOwnProperty,mR=Object.prototype.propertyIsEnumerable,kx=(e,t,r)=>t in e?fH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pH=(e,t)=>{for(var r in t||(t={}))pR.call(t,r)&&kx(e,r,t[r]);if(bf)for(var r of bf(t))mR.call(t,r)&&kx(e,r,t[r]);return e},mH=(e,t)=>{var r={};for(var n in e)pR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&bf)for(var n of bf(e))t.indexOf(n)<0&&mR.call(e,n)&&(r[n]=e[n]);return r};const hH={},gH=f.forwardRef((e,t)=>{const r=hl(),n=H(`${r.__staticSelector}Body`,hH,e),{className:o}=n,a=mH(n,["className"]),{classes:i,cx:l}=dH({padding:r.padding},r.stylesApi);return f.useEffect(()=>(r.setBodyMounted(!0),()=>r.setBodyMounted(!1)),[]),s.createElement(ue,pH({id:r.getBodyId(),className:l(i.body,o),ref:t},a))});function vH({children:e}){return s.createElement(s.Fragment,null,e)}function yH({opened:e,transitionDuration:t}){const[r,n]=f.useState(e),o=f.useRef(),i=Gp()?0:t;return f.useEffect(()=>(e?(n(!0),window.clearTimeout(o.current)):i===0?n(!1):o.current=window.setTimeout(()=>n(!1),i),()=>window.clearTimeout(o.current)),[e,i]),r}var wH=W(()=>({root:{}}));const _H=wH;var bH=Object.defineProperty,xH=Object.defineProperties,EH=Object.getOwnPropertyDescriptors,xf=Object.getOwnPropertySymbols,hR=Object.prototype.hasOwnProperty,gR=Object.prototype.propertyIsEnumerable,jx=(e,t,r)=>t in e?bH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Oh=(e,t)=>{for(var r in t||(t={}))hR.call(t,r)&&jx(e,r,t[r]);if(xf)for(var r of xf(t))gR.call(t,r)&&jx(e,r,t[r]);return e},Rx=(e,t)=>xH(e,EH(t)),SH=(e,t)=>{var r={};for(var n in e)hR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xf)for(var n of xf(e))t.indexOf(n)<0&&gR.call(e,n)&&(r[n]=e[n]);return r};const Wy={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:go("modal"),padding:"md",size:"md",shadow:"xl"};function St(e){const t=H("ModalBase",Wy,e),{opened:r,onClose:n,children:o,closeOnClickOutside:a,__staticSelector:i,transitionProps:l,withinPortal:c,portalProps:u,keepMounted:d,target:m,zIndex:h,lockScroll:g,trapFocus:y,closeOnEscape:_,returnFocus:E,padding:w,shadow:v,id:b,size:x,variant:P,classNames:O,unstyled:$,styles:C,className:R}=t,j=SH(t,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:k,cx:T}=_H(null,{name:i,classNames:O,styles:C,unstyled:$,variant:P,size:x}),L=Fr(b),[U,V]=f.useState(!1),[M,Q]=f.useState(!1),A=typeof(l==null?void 0:l.duration)=="number"?l==null?void 0:l.duration:200,z=yH({opened:r,transitionDuration:A});return Yh("keydown",q=>{!y&&q.key==="Escape"&&_&&n()}),Q$({opened:r,shouldReturnFocus:y&&E}),s.createElement(um,Rx(Oh({},u),{withinPortal:c,target:m}),s.createElement(mW,{value:{__staticSelector:i,opened:r,onClose:n,closeOnClickOutside:a,transitionProps:Rx(Oh({},l),{duration:A,keepMounted:d}),zIndex:h,padding:w,id:L,getTitleId:()=>`${L}-title`,getBodyId:()=>`${L}-body`,titleMounted:U,bodyMounted:M,setTitleMounted:V,setBodyMounted:Q,trapFocus:y,closeOnEscape:_,shadow:v,stylesApi:{name:i,size:x,variant:P,classNames:O,styles:C,unstyled:$}}},s.createElement(tN,{enabled:z&&g},s.createElement(ue,Oh({className:T(k.root,R)},j),o))))}St.CloseButton=bW;St.Overlay=UW;St.Content=KW;St.Header=rH;St.Title=cH;St.Body=gH;St.NativeScrollArea=vH;const[PH,$H]=ho("Grid component was not found in tree");var OH=Object.defineProperty,Tx=Object.getOwnPropertySymbols,CH=Object.prototype.hasOwnProperty,kH=Object.prototype.propertyIsEnumerable,Ix=(e,t,r)=>t in e?OH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jH=(e,t)=>{for(var r in t||(t={}))CH.call(t,r)&&Ix(e,r,t[r]);if(Tx)for(var r of Tx(t))kH.call(t,r)&&Ix(e,r,t[r]);return e};const Hy=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,vR=(e,t,r)=>r||e==="auto"||e==="content"?"unset":Hy(e,t),yR=(e,t)=>{if(e)return e==="auto"||t?1:0},wR=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,_R=(e,t)=>typeof e<"u"?`calc(${N({size:e,sizes:t.spacing})} / 2)`:void 0;function RH({sizes:e,offsets:t,orders:r,theme:n,columns:o,gutters:a,grow:i}){return P$.reduce((l,c)=>(l[`@media (min-width: ${Dr(n.breakpoints[c])})`]={order:r[c],flexBasis:Hy(e[c],o),padding:_R(a[c],n),flexShrink:0,width:e[c]==="content"?"auto":void 0,maxWidth:vR(e[c],o,i),marginLeft:wR(t[c],o),flexGrow:yR(e[c],i)},l),{})}var TH=W((e,{gutter:t,gutterXs:r,gutterSm:n,gutterMd:o,gutterLg:a,gutterXl:i,grow:l,offset:c,offsetXs:u,offsetSm:d,offsetMd:m,offsetLg:h,offsetXl:g,columns:y,span:_,xs:E,sm:w,md:v,lg:b,xl:x,order:P,orderXs:O,orderSm:$,orderMd:C,orderLg:R,orderXl:j})=>({col:jH({boxSizing:"border-box",flexGrow:yR(_,l),order:P,padding:_R(t,e),marginLeft:wR(c,y),flexBasis:Hy(_,y),flexShrink:0,width:_==="content"?"auto":void 0,maxWidth:vR(_,y,l)},RH({sizes:{xs:E,sm:w,md:v,lg:b,xl:x},offsets:{xs:u,sm:d,md:m,lg:h,xl:g},orders:{xs:O,sm:$,md:C,lg:R,xl:j},gutters:{xs:r,sm:n,md:o,lg:a,xl:i},theme:e,columns:y,grow:l}))}));const IH=TH;var DH=Object.defineProperty,Ef=Object.getOwnPropertySymbols,bR=Object.prototype.hasOwnProperty,xR=Object.prototype.propertyIsEnumerable,Dx=(e,t,r)=>t in e?DH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NH=(e,t)=>{for(var r in t||(t={}))bR.call(t,r)&&Dx(e,r,t[r]);if(Ef)for(var r of Ef(t))xR.call(t,r)&&Dx(e,r,t[r]);return e},AH=(e,t)=>{var r={};for(var n in e)bR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ef)for(var n of Ef(e))t.indexOf(n)<0&&xR.call(e,n)&&(r[n]=e[n]);return r};const MH={};function zH(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const ER=f.forwardRef((e,t)=>{const r=H("GridCol",MH,e),{children:n,span:o,offset:a,offsetXs:i,offsetSm:l,offsetMd:c,offsetLg:u,offsetXl:d,xs:m,sm:h,md:g,lg:y,xl:_,order:E,orderXs:w,orderSm:v,orderMd:b,orderLg:x,orderXl:P,className:O,id:$,unstyled:C,variant:R}=r,j=AH(r,["children","span","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","xs","sm","md","lg","xl","order","orderXs","orderSm","orderMd","orderLg","orderXl","className","id","unstyled","variant"]),k=$H(),T=o||k.columns,{classes:L,cx:U}=IH({gutter:k.gutter,gutterXs:k.gutterXs,gutterSm:k.gutterSm,gutterMd:k.gutterMd,gutterLg:k.gutterLg,gutterXl:k.gutterXl,offset:a,offsetXs:i,offsetSm:l,offsetMd:c,offsetLg:u,offsetXl:d,xs:m,sm:h,md:g,lg:y,xl:_,order:E,orderXs:w,orderSm:v,orderMd:b,orderLg:x,orderXl:P,grow:k.grow,columns:k.columns,span:T},{unstyled:C,name:"Grid",variant:R});return!zH(T)||T>k.columns?null:s.createElement(ue,NH({className:U(L.col,O),ref:t},j),n)});ER.displayName="@mantine/core/Col";var LH=Object.defineProperty,Nx=Object.getOwnPropertySymbols,FH=Object.prototype.hasOwnProperty,VH=Object.prototype.propertyIsEnumerable,Ax=(e,t,r)=>t in e?LH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BH=(e,t)=>{for(var r in t||(t={}))FH.call(t,r)&&Ax(e,r,t[r]);if(Nx)for(var r of Nx(t))VH.call(t,r)&&Ax(e,r,t[r]);return e};function UH(e,t){return P$.reduce((r,n)=>(typeof e[n]<"u"&&(r[`@media (min-width: ${t.breakpoints[n]})`]={margin:`calc(-${N({size:e[n],sizes:t.spacing})} / 2)`}),r),{})}var WH=W((e,{justify:t,align:r,gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c})=>({root:BH({margin:`calc(-${N({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},UH({xs:o,sm:a,md:i,lg:l,xl:c},e))}));const HH=WH;var qH=Object.defineProperty,Sf=Object.getOwnPropertySymbols,SR=Object.prototype.hasOwnProperty,PR=Object.prototype.propertyIsEnumerable,Mx=(e,t,r)=>t in e?qH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QH=(e,t)=>{for(var r in t||(t={}))SR.call(t,r)&&Mx(e,r,t[r]);if(Sf)for(var r of Sf(t))PR.call(t,r)&&Mx(e,r,t[r]);return e},GH=(e,t)=>{var r={};for(var n in e)SR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Sf)for(var n of Sf(e))t.indexOf(n)<0&&PR.call(e,n)&&(r[n]=e[n]);return r};const KH={gutter:"md",justify:"flex-start",align:"stretch",columns:12},Jr=f.forwardRef((e,t)=>{const r=H("Grid",KH,e),{gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c,children:u,grow:d,justify:m,align:h,columns:g,className:y,id:_,unstyled:E,variant:w}=r,v=GH(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled","variant"]),{classes:b,cx:x}=HH({gutter:n,justify:m,align:h,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c},{unstyled:E,name:"Grid",variant:w});return s.createElement(PH,{value:{gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c,grow:d,columns:g}},s.createElement(ue,QH({className:x(b.root,y),ref:t},v),u))});Jr.Col=ER;Jr.displayName="@mantine/core/Grid";function YH(e){return f.Children.toArray(e).filter(Boolean)}const $R={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var XH=W((e,{spacing:t,position:r,noWrap:n,grow:o,align:a,count:i})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:a||"center",flexWrap:n?"nowrap":"wrap",justifyContent:$R[r],gap:N({size:t,sizes:e.spacing}),"& > *":{boxSizing:"border-box",maxWidth:o?`calc(${100/i}% - (${S(N({size:t,sizes:e.spacing}))} - ${N({size:t,sizes:e.spacing})} / ${i}))`:void 0,flexGrow:o?1:0}}}));const JH=XH;var ZH=Object.defineProperty,Pf=Object.getOwnPropertySymbols,OR=Object.prototype.hasOwnProperty,CR=Object.prototype.propertyIsEnumerable,zx=(e,t,r)=>t in e?ZH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eq=(e,t)=>{for(var r in t||(t={}))OR.call(t,r)&&zx(e,r,t[r]);if(Pf)for(var r of Pf(t))CR.call(t,r)&&zx(e,r,t[r]);return e},tq=(e,t)=>{var r={};for(var n in e)OR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pf)for(var n of Pf(e))t.indexOf(n)<0&&CR.call(e,n)&&(r[n]=e[n]);return r};const rq={position:"left",spacing:"md"},J=f.forwardRef((e,t)=>{const r=H("Group",rq,e),{className:n,position:o,align:a,children:i,noWrap:l,grow:c,spacing:u,unstyled:d,variant:m}=r,h=tq(r,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),g=YH(i),{classes:y,cx:_}=JH({align:a,grow:c,noWrap:l,spacing:u,position:o,count:g.length},{unstyled:d,name:"Group",variant:m});return s.createElement(ue,eq({className:_(y.root,n),ref:t},h),g)});J.displayName="@mantine/core/Group";function nq({open:e,close:t,openDelay:r,closeDelay:n}){const o=f.useRef(-1),a=f.useRef(-1),i=()=>{window.clearTimeout(o.current),window.clearTimeout(a.current)},l=()=>{i(),r===0?e():o.current=window.setTimeout(e,r)},c=()=>{i(),n===0?t():a.current=window.setTimeout(t,n)};return f.useEffect(()=>i,[]),{openDropdown:l,closeDropdown:c}}function Lx(e,t){if(typeof e=="string"&&e.trim().length===0)return!0;try{return t(e),!0}catch{return!1}}var oq=W((e,t,{size:r})=>({input:{fontFamily:e.fontFamilyMonospace,fontSize:`calc(${N({size:r,sizes:e.fontSizes})} - ${S(2)})`}}));const aq=oq;function qy(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var iq=f.useLayoutEffect,lq=function(t){var r=f.useRef(t);return iq(function(){r.current=t}),r},Fx=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},sq=function(t,r){var n=f.useRef();return f.useCallback(function(o){t.current=o,n.current&&Fx(n.current,null),n.current=r,r&&Fx(r,o)},[r])},Vx={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Bx=function(t){Object.keys(Vx).forEach(function(r){t.style.setProperty(r,Vx[r],"important")})},kr=null,cq=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function uq(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),kr||(kr=document.createElement("textarea"),kr.setAttribute("tabindex","-1"),kr.setAttribute("aria-hidden","true"),Bx(kr)),kr.parentNode===null&&document.body.appendChild(kr);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,l=i.boxSizing;Object.keys(i).forEach(function(h){var g=h;kr.style[g]=i[g]}),Bx(kr),kr.value=t;var c=cq(kr,e);kr.value="x";var u=kr.scrollHeight-o,d=u*r;l==="border-box"&&(d=d+o+a),c=Math.max(d,c);var m=u*n;return l==="border-box"&&(m=m+o+a),c=Math.min(m,c),[c,u]}var Ux=function(){},dq=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},fq=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],pq=!!document.documentElement.currentStyle,mq=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=dq(fq,r),o=n.boxSizing;if(o==="")return null;pq&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var a=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),i=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:a,borderSize:i}},hq=function(t){var r=lq(t);f.useLayoutEffect(function(){var n=function(a){r.current(a)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[])},gq=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,a=t.minRows,i=t.onChange,l=i===void 0?Ux:i,c=t.onHeightChange,u=c===void 0?Ux:c,d=qy(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),m=d.value!==void 0,h=f.useRef(null),g=sq(h,r),y=f.useRef(0),_=f.useRef(),E=function(){var b=h.current,x=n&&_.current?_.current:mq(b);if(x){_.current=x;var P=uq(x,b.value||b.placeholder||"x",a,o),O=P[0],$=P[1];y.current!==O&&(y.current=O,b.style.setProperty("height",O+"px","important"),u(O,{rowHeight:$}))}},w=function(b){m||E(),l(b)};return f.useLayoutEffect(E),hq(E),f.createElement("textarea",Ye({},d,{onChange:w,ref:g}))},vq=f.forwardRef(gq);const yq=vq;var wq=W(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const _q=wq;var bq=Object.defineProperty,xq=Object.defineProperties,Eq=Object.getOwnPropertyDescriptors,$f=Object.getOwnPropertySymbols,kR=Object.prototype.hasOwnProperty,jR=Object.prototype.propertyIsEnumerable,Wx=(e,t,r)=>t in e?bq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fi=(e,t)=>{for(var r in t||(t={}))kR.call(t,r)&&Wx(e,r,t[r]);if($f)for(var r of $f(t))jR.call(t,r)&&Wx(e,r,t[r]);return e},Ch=(e,t)=>xq(e,Eq(t)),Sq=(e,t)=>{var r={};for(var n in e)kR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$f)for(var n of $f(e))t.indexOf(n)<0&&jR.call(e,n)&&(r[n]=e[n]);return r};const Pq={autosize:!1,size:"sm",__staticSelector:"Textarea"},Js=f.forwardRef((e,t)=>{const r=H("Textarea",Pq,e),{autosize:n,maxRows:o,minRows:a,label:i,error:l,description:c,id:u,className:d,required:m,style:h,wrapperProps:g,classNames:y,styles:_,size:E,__staticSelector:w,sx:v,errorProps:b,descriptionProps:x,labelProps:P,inputWrapperOrder:O,inputContainer:$,unstyled:C,withAsterisk:R,variant:j}=r,k=Sq(r,["autosize","maxRows","minRows","label","error","description","id","className","required","style","wrapperProps","classNames","styles","size","__staticSelector","sx","errorProps","descriptionProps","labelProps","inputWrapperOrder","inputContainer","unstyled","withAsterisk","variant"]),T=Fr(u),{classes:L,cx:U}=_q(),{systemStyles:V,rest:M}=Bn(k),Q=fi({required:m,ref:t,error:l,id:T,classNames:Ch(fi({},y),{input:U(L.input,y==null?void 0:y.input)}),styles:_,__staticSelector:w,size:E,multiline:!0,unstyled:C,variant:j},M);return s.createElement(Lt.Wrapper,fi(fi({label:i,error:l,id:T,description:c,required:m,style:h,className:d,classNames:y,styles:_,size:E,__staticSelector:w,sx:v,errorProps:b,labelProps:P,descriptionProps:x,inputContainer:$,inputWrapperOrder:O,unstyled:C,withAsterisk:R,variant:j},V),g),n?s.createElement(Lt,Ch(fi({},Q),{component:yq,maxRows:o,minRows:a})):s.createElement(Lt,Ch(fi({},Q),{component:"textarea",rows:a})))});Js.displayName="@mantine/core/Textarea";var $q=Object.defineProperty,Oq=Object.defineProperties,Cq=Object.getOwnPropertyDescriptors,Of=Object.getOwnPropertySymbols,RR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,Hx=(e,t,r)=>t in e?$q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qx=(e,t)=>{for(var r in t||(t={}))RR.call(t,r)&&Hx(e,r,t[r]);if(Of)for(var r of Of(t))TR.call(t,r)&&Hx(e,r,t[r]);return e},kq=(e,t)=>Oq(e,Cq(t)),jq=(e,t)=>{var r={};for(var n in e)RR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Of)for(var n of Of(e))t.indexOf(n)<0&&TR.call(e,n)&&(r[n]=e[n]);return r};const Rq={formatOnBlur:!1,size:"sm",serialize:JSON.stringify,deserialize:JSON.parse},ym=f.forwardRef((e,t)=>{const r=H("JsonInput",Rq,e),{value:n,defaultValue:o,onChange:a,onFocus:i,onBlur:l,error:c,formatOnBlur:u,size:d,validationError:m,classNames:h,unstyled:g,readOnly:y,variant:_,serialize:E,deserialize:w}=r,v=jq(r,["value","defaultValue","onChange","onFocus","onBlur","error","formatOnBlur","size","validationError","classNames","unstyled","readOnly","variant","serialize","deserialize"]),{classes:b,cx:x}=aq(null,{name:"JsonInput",unstyled:g,size:d,variant:_}),[P,O]=wr({value:n,defaultValue:o,finalValue:"",onChange:a}),[$,C]=f.useState(Lx(P,w)),R=k=>{typeof i=="function"&&i(k),C(!0)},j=k=>{typeof l=="function"&&l(k);const T=Lx(k.currentTarget.value,w);u&&!y&&T&&k.currentTarget.value.trim()!==""&&O(E(w(k.currentTarget.value),null,2)),C(T)};return s.createElement(Js,qx({value:P,onChange:k=>O(k.currentTarget.value),onFocus:R,onBlur:j,error:$?c:m||!0,__staticSelector:"JsonInput",classNames:kq(qx({},h),{input:x(b.input,h==null?void 0:h.input)}),autoComplete:"off",ref:t,unstyled:g,readOnly:y,size:d,variant:_},v))});ym.displayName="@mantine/core/JsonInput";const[Tq,Iq]=ho("List component was not found in tree");var Dq=W((e,{spacing:t,center:r})=>({itemWrapper:{ref:Zt("itemWrapper"),display:"inline-flex",flexDirection:"column",whiteSpace:"normal"},item:{whiteSpace:"nowrap",lineHeight:r?1:e.lineHeight,"&:not(:first-of-type)":{marginTop:N({size:t,sizes:e.spacing})},"&[data-with-icon]":{listStyle:"none",[`& .${Zt("itemWrapper")}`]:{display:"inline-flex",alignItems:r?"center":"flex-start",flexDirection:"row"}}},itemIcon:{display:"inline-block",verticalAlign:"middle",marginRight:e.spacing.sm}}));const Nq=Dq;var Aq=Object.defineProperty,Cf=Object.getOwnPropertySymbols,IR=Object.prototype.hasOwnProperty,DR=Object.prototype.propertyIsEnumerable,Qx=(e,t,r)=>t in e?Aq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mq=(e,t)=>{for(var r in t||(t={}))IR.call(t,r)&&Qx(e,r,t[r]);if(Cf)for(var r of Cf(t))DR.call(t,r)&&Qx(e,r,t[r]);return e},zq=(e,t)=>{var r={};for(var n in e)IR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cf)for(var n of Cf(e))t.indexOf(n)<0&&DR.call(e,n)&&(r[n]=e[n]);return r};const Lq={},NR=f.forwardRef((e,t)=>{const r=H("ListItem",Lq,e),{className:n,children:o,icon:a}=r,i=zq(r,["className","children","icon"]),{icon:l,spacing:c,center:u,listStyleType:d,size:m,withPadding:h,classNames:g,styles:y,unstyled:_,variant:E}=Iq(),w=a||l,{classes:v,cx:b}=Nq({withPadding:h,listStyleType:d,center:u,spacing:c},{classNames:g,styles:y,unstyled:_,name:"List",variant:E,size:m});return s.createElement(ue,Mq({component:"li",className:b(v.item,n),"data-with-icon":!!w||void 0,ref:t},i),s.createElement("div",{className:v.itemWrapper},w&&s.createElement("span",{className:v.itemIcon},w),s.createElement("span",null,o)))});NR.displayName="@mantine/core/ListItem";var Fq=Object.defineProperty,Vq=Object.defineProperties,Bq=Object.getOwnPropertyDescriptors,Gx=Object.getOwnPropertySymbols,Uq=Object.prototype.hasOwnProperty,Wq=Object.prototype.propertyIsEnumerable,Kx=(e,t,r)=>t in e?Fq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hq=(e,t)=>{for(var r in t||(t={}))Uq.call(t,r)&&Kx(e,r,t[r]);if(Gx)for(var r of Gx(t))Wq.call(t,r)&&Kx(e,r,t[r]);return e},qq=(e,t)=>Vq(e,Bq(t)),Qq=W((e,{withPadding:t,listStyleType:r},{size:n})=>({root:qq(Hq({},e.fn.fontStyles()),{listStyleType:r,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,fontSize:N({size:n,sizes:e.fontSizes}),lineHeight:e.lineHeight,margin:0,paddingLeft:t?e.spacing.xl:0,listStylePosition:"inside"})}));const Gq=Qq;var Kq=Object.defineProperty,kf=Object.getOwnPropertySymbols,AR=Object.prototype.hasOwnProperty,MR=Object.prototype.propertyIsEnumerable,Yx=(e,t,r)=>t in e?Kq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yq=(e,t)=>{for(var r in t||(t={}))AR.call(t,r)&&Yx(e,r,t[r]);if(kf)for(var r of kf(t))MR.call(t,r)&&Yx(e,r,t[r]);return e},Xq=(e,t)=>{var r={};for(var n in e)AR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&kf)for(var n of kf(e))t.indexOf(n)<0&&MR.call(e,n)&&(r[n]=e[n]);return r};const Jq={type:"unordered",size:"md",spacing:0},mr=f.forwardRef((e,t)=>{const r=H("List",Jq,e),{children:n,type:o,size:a,listStyleType:i,withPadding:l,center:c,spacing:u,icon:d,className:m,styles:h,classNames:g,unstyled:y,variant:_}=r,E=Xq(r,["children","type","size","listStyleType","withPadding","center","spacing","icon","className","styles","classNames","unstyled","variant"]),{classes:w,cx:v}=Gq({withPadding:l,listStyleType:i,center:c,spacing:u},{classNames:g,styles:h,name:"List",unstyled:y,size:a,variant:_});return s.createElement(Tq,{value:{spacing:u,center:c,icon:d,listStyleType:i,size:a,withPadding:l,classNames:g,styles:h,unstyled:y,variant:_}},s.createElement(ue,Yq({component:o==="unordered"?"ul":"ol",className:v(w.root,m),ref:t},E),n))});mr.Item=NR;mr.displayName="@mantine/core/List";var Zq=Object.defineProperty,eQ=Object.defineProperties,tQ=Object.getOwnPropertyDescriptors,Xx=Object.getOwnPropertySymbols,rQ=Object.prototype.hasOwnProperty,nQ=Object.prototype.propertyIsEnumerable,Jx=(e,t,r)=>t in e?Zq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oQ=(e,t)=>{for(var r in t||(t={}))rQ.call(t,r)&&Jx(e,r,t[r]);if(Xx)for(var r of Xx(t))nQ.call(t,r)&&Jx(e,r,t[r]);return e},aQ=(e,t)=>eQ(e,tQ(t)),iQ=W(e=>({root:aQ(oQ({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const lQ=iQ;var sQ=Object.defineProperty,cQ=Object.defineProperties,uQ=Object.getOwnPropertyDescriptors,jf=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,LR=Object.prototype.propertyIsEnumerable,Zx=(e,t,r)=>t in e?sQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,au=(e,t)=>{for(var r in t||(t={}))zR.call(t,r)&&Zx(e,r,t[r]);if(jf)for(var r of jf(t))LR.call(t,r)&&Zx(e,r,t[r]);return e},dQ=(e,t)=>cQ(e,uQ(t)),fQ=(e,t)=>{var r={};for(var n in e)zR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jf)for(var n of jf(e))t.indexOf(n)<0&&LR.call(e,n)&&(r[n]=e[n]);return r};const pQ={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:go("overlay")},FR=f.forwardRef((e,t)=>{const r=H("LoadingOverlay",pQ,e),{className:n,visible:o,loaderProps:a,overlayOpacity:i,overlayColor:l,transitionDuration:c,exitTransitionDuration:u,zIndex:d,style:m,loader:h,radius:g,overlayBlur:y,unstyled:_,variant:E,keepMounted:w}=r,v=fQ(r,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:b,cx:x,theme:P}=lQ(null,{name:"LoadingOverlay",unstyled:_,variant:E}),O=`calc(${d} + 1)`;return s.createElement(Xs,{keepMounted:w,duration:c,exitDuration:u,mounted:o,transition:"fade"},$=>s.createElement(ue,au({className:x(b.root,n),style:dQ(au(au({},$),m),{zIndex:d}),ref:t},v),h?s.createElement("div",{style:{zIndex:O}},h):s.createElement(Un,au({style:{zIndex:O}},a)),s.createElement(oR,{opacity:i,zIndex:d,radius:g,blur:y,unstyled:_,color:l||(P.colorScheme==="dark"?P.colors.dark[5]:P.white)})))});FR.displayName="@mantine/core/LoadingOverlay";const VR={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[mQ,Zs]=ho(VR.context);var hQ=W(e=>({divider:{marginTop:S(4),marginBottom:S(4),borderTop:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2]}`}}));const gQ=hQ;var vQ=Object.defineProperty,Rf=Object.getOwnPropertySymbols,BR=Object.prototype.hasOwnProperty,UR=Object.prototype.propertyIsEnumerable,eE=(e,t,r)=>t in e?vQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yQ=(e,t)=>{for(var r in t||(t={}))BR.call(t,r)&&eE(e,r,t[r]);if(Rf)for(var r of Rf(t))UR.call(t,r)&&eE(e,r,t[r]);return e},wQ=(e,t)=>{var r={};for(var n in e)BR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rf)for(var n of Rf(e))t.indexOf(n)<0&&UR.call(e,n)&&(r[n]=e[n]);return r};const _Q={},WR=f.forwardRef((e,t)=>{const r=H("MenuDivider",_Q,e),{children:n,className:o}=r,a=wQ(r,["children","className"]),{classNames:i,styles:l,unstyled:c,variant:u}=Zs(),{classes:d,cx:m}=gQ(null,{name:"Menu",classNames:i,styles:l,unstyled:c,variant:u});return s.createElement(ue,yQ({className:m(d.divider,o),ref:t},a))});WR.displayName="@mantine/core/MenuDivider";var bQ=Object.defineProperty,Tf=Object.getOwnPropertySymbols,HR=Object.prototype.hasOwnProperty,qR=Object.prototype.propertyIsEnumerable,tE=(e,t,r)=>t in e?bQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xQ=(e,t)=>{for(var r in t||(t={}))HR.call(t,r)&&tE(e,r,t[r]);if(Tf)for(var r of Tf(t))qR.call(t,r)&&tE(e,r,t[r]);return e},EQ=(e,t)=>{var r={};for(var n in e)HR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Tf)for(var n of Tf(e))t.indexOf(n)<0&&qR.call(e,n)&&(r[n]=e[n]);return r};const SQ={};function QR(e){const t=H("MenuDropdown",SQ,e),{children:r,onMouseEnter:n,onMouseLeave:o}=t,a=EQ(t,["children","onMouseEnter","onMouseLeave"]),i=f.useRef(),l=Zs(),c=m=>{(m.key==="ArrowUp"||m.key==="ArrowDown")&&(m.preventDefault(),i.current.querySelectorAll("[data-menu-item]")[0].focus())},u=Rr(n,()=>l.trigger==="hover"&&l.openDropdown()),d=Rr(o,()=>l.trigger==="hover"&&l.closeDropdown());return s.createElement(wo.Dropdown,xQ({onMouseEnter:u,onMouseLeave:d,role:"menu","aria-orientation":"vertical"},a),s.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:c,ref:i,style:{outline:0}},r))}QR.displayName="@mantine/core/MenuDropdown";var PQ=Object.defineProperty,$Q=Object.defineProperties,OQ=Object.getOwnPropertyDescriptors,rE=Object.getOwnPropertySymbols,CQ=Object.prototype.hasOwnProperty,kQ=Object.prototype.propertyIsEnumerable,nE=(e,t,r)=>t in e?PQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jQ=(e,t)=>{for(var r in t||(t={}))CQ.call(t,r)&&nE(e,r,t[r]);if(rE)for(var r of rE(t))kQ.call(t,r)&&nE(e,r,t[r]);return e},RQ=(e,t)=>$Q(e,OQ(t)),TQ=W((e,{color:t,radius:r})=>({item:RQ(jQ({},e.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:e.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${e.spacing.xs} ${e.spacing.sm}`,cursor:"pointer",borderRadius:e.fn.radius(r),color:t?e.fn.variant({variant:"filled",primaryFallback:!1,color:t}).background:e.colorScheme==="dark"?e.colors.dark[0]:e.black,display:"flex",alignItems:"center","&:disabled":{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:t?e.fn.variant({variant:"light",color:t}).background:e.colorScheme==="dark"?e.fn.rgba(e.colors.dark[3],.35):e.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:e.spacing.xs},itemRightSection:{}}));const IQ=TQ;var DQ=Object.defineProperty,NQ=Object.defineProperties,AQ=Object.getOwnPropertyDescriptors,If=Object.getOwnPropertySymbols,GR=Object.prototype.hasOwnProperty,KR=Object.prototype.propertyIsEnumerable,oE=(e,t,r)=>t in e?DQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,MQ=(e,t)=>{for(var r in t||(t={}))GR.call(t,r)&&oE(e,r,t[r]);if(If)for(var r of If(t))KR.call(t,r)&&oE(e,r,t[r]);return e},zQ=(e,t)=>NQ(e,AQ(t)),LQ=(e,t)=>{var r={};for(var n in e)GR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&If)for(var n of If(e))t.indexOf(n)<0&&KR.call(e,n)&&(r[n]=e[n]);return r};const FQ={},YR=f.forwardRef((e,t)=>{const r=H("MenuItem",FQ,e),{children:n,className:o,color:a,closeMenuOnClick:i,icon:l,rightSection:c}=r,u=LQ(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),d=Zs(),{classes:m,cx:h,theme:g}=IQ({radius:d.radius,color:a},{name:"Menu",classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),y=f.useRef(),_=d.getItemIndex(y.current),E=u,w=Rr(E.onMouseLeave,()=>d.setHovered(-1)),v=Rr(E.onMouseEnter,()=>d.setHovered(d.getItemIndex(y.current))),b=Rr(E.onClick,()=>{typeof i=="boolean"?i&&d.closeDropdownImmediately():d.closeOnItemClick&&d.closeDropdownImmediately()}),x=Rr(E.onFocus,()=>d.setHovered(d.getItemIndex(y.current)));return s.createElement(ue,zQ(MQ({component:"button",type:"button"},u),{tabIndex:-1,onFocus:x,className:h(m.item,o),ref:Qp(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":d.hovered===_?!0:void 0,onMouseEnter:v,onMouseLeave:w,onClick:b,onKeyDown:y$({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:d.loop,dir:g.dir,orientation:"vertical",onKeyDown:E.onKeydown})}),l&&s.createElement("div",{className:m.itemIcon},l),n&&s.createElement("div",{className:m.itemLabel},n),c&&s.createElement("div",{className:m.itemRightSection},c))});YR.displayName="@mantine/core/MenuItem";const VQ=YR;var BQ=W(e=>({label:{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],fontWeight:500,fontSize:e.fontSizes.xs,padding:`calc(${e.spacing.xs} / 2) ${e.spacing.sm}`,cursor:"default"}}));const UQ=BQ;var WQ=Object.defineProperty,Df=Object.getOwnPropertySymbols,XR=Object.prototype.hasOwnProperty,JR=Object.prototype.propertyIsEnumerable,aE=(e,t,r)=>t in e?WQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HQ=(e,t)=>{for(var r in t||(t={}))XR.call(t,r)&&aE(e,r,t[r]);if(Df)for(var r of Df(t))JR.call(t,r)&&aE(e,r,t[r]);return e},qQ=(e,t)=>{var r={};for(var n in e)XR.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Df)for(var n of Df(e))t.indexOf(n)<0&&JR.call(e,n)&&(r[n]=e[n]);return r};const QQ={},ZR=f.forwardRef((e,t)=>{const r=H("MenuLabel",QQ,e),{children:n,className:o}=r,a=qQ(r,["children","className"]),{classNames:i,styles:l,unstyled:c,variant:u}=Zs(),{classes:d,cx:m}=UQ(null,{name:"Menu",classNames:i,styles:l,unstyled:c,variant:u});return s.createElement(ae,HQ({className:m(d.label,o),ref:t},a),n)});ZR.displayName="@mantine/core/MenuLabel";var GQ=Object.defineProperty,Nf=Object.getOwnPropertySymbols,eT=Object.prototype.hasOwnProperty,tT=Object.prototype.propertyIsEnumerable,iE=(e,t,r)=>t in e?GQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,KQ=(e,t)=>{for(var r in t||(t={}))eT.call(t,r)&&iE(e,r,t[r]);if(Nf)for(var r of Nf(t))tT.call(t,r)&&iE(e,r,t[r]);return e},YQ=(e,t)=>{var r={};for(var n in e)eT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nf)for(var n of Nf(e))t.indexOf(n)<0&&tT.call(e,n)&&(r[n]=e[n]);return r};const XQ={refProp:"ref"},rT=f.forwardRef((e,t)=>{const r=H("MenuTarget",XQ,e),{children:n,refProp:o}=r,a=YQ(r,["children","refProp"]);if(!Tp(n))throw new Error(VR.children);const i=Zs(),l=Rr(n.props.onClick,()=>i.trigger==="click"&&i.toggleDropdown()),c=Rr(n.props.onMouseEnter,()=>i.trigger==="hover"&&i.openDropdown()),u=Rr(n.props.onMouseLeave,()=>i.trigger==="hover"&&i.closeDropdown());return s.createElement(wo.Target,KQ({refProp:o,popupType:"menu",ref:t},a),f.cloneElement(n,{onClick:l,onMouseEnter:c,onMouseLeave:u,"data-expanded":i.opened?!0:void 0}))});rT.displayName="@mantine/core/MenuTarget";var JQ=W({dropdown:{padding:S(4)}});const ZQ=JQ;var eG=Object.defineProperty,tG=Object.defineProperties,rG=Object.getOwnPropertyDescriptors,Af=Object.getOwnPropertySymbols,nT=Object.prototype.hasOwnProperty,oT=Object.prototype.propertyIsEnumerable,lE=(e,t,r)=>t in e?eG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sE=(e,t)=>{for(var r in t||(t={}))nT.call(t,r)&&lE(e,r,t[r]);if(Af)for(var r of Af(t))oT.call(t,r)&&lE(e,r,t[r]);return e},cE=(e,t)=>tG(e,rG(t)),nG=(e,t)=>{var r={};for(var n in e)nT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Af)for(var n of Af(e))t.indexOf(n)<0&&oT.call(e,n)&&(r[n]=e[n]);return r};const oG={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function G(e){const t=H("Menu",oG,e),{children:r,onOpen:n,onClose:o,opened:a,defaultOpened:i,onChange:l,closeOnItemClick:c,loop:u,closeOnEscape:d,trigger:m,openDelay:h,closeDelay:g,classNames:y,styles:_,unstyled:E,radius:w,variant:v}=t,b=nG(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:x,cx:P}=ZQ(),[O,{setHovered:$,resetHovered:C}]=sN(),[R,j]=wr({value:a,defaultValue:i,finalValue:!1,onChange:l}),k=()=>{j(!1),R&&(o==null||o())},T=()=>{j(!0),!R&&(n==null||n())},L=()=>R?k():T(),{openDropdown:U,closeDropdown:V}=nq({open:T,close:k,closeDelay:g,openDelay:h}),M=Q=>aN("[data-menu-item]","[data-menu-dropdown]",Q);return mn(()=>{C()},[R]),s.createElement(mQ,{value:{opened:R,toggleDropdown:L,getItemIndex:M,hovered:O,setHovered:$,closeOnItemClick:c,closeDropdown:m==="click"?k:V,openDropdown:m==="click"?T:U,closeDropdownImmediately:k,loop:u,trigger:m,radius:w,classNames:y,styles:_,unstyled:E,variant:v}},s.createElement(wo,cE(sE({},b),{radius:w,opened:R,onChange:L,defaultOpened:i,trapFocus:m==="click",closeOnEscape:d&&m==="click",__staticSelector:"Menu",classNames:cE(sE({},y),{dropdown:P(x.dropdown,y==null?void 0:y.dropdown)}),styles:_,unstyled:E,variant:v}),r))}G.displayName="@mantine/core/Menu";G.Item=VQ;G.Label=ZR;G.Dropdown=QR;G.Target=rT;G.Divider=WR;const[aG,iG]=ho("Modal component was not found in tree"),lG={xs:S(320),sm:S(380),md:S(440),lg:S(620),xl:S(780)};var sG=W((e,{yOffset:t,xOffset:r,centered:n,fullScreen:o},{size:a})=>({content:{flex:o?"0 0 100%":`0 0 ${N({size:a,sizes:lG})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100vh - (${S(t)} * 2))`,height:o?"100vh":void 0,borderRadius:o?0:void 0,overflowY:"auto"},inner:{paddingTop:o?0:t,paddingBottom:o?0:t,paddingLeft:o?0:r,paddingRight:o?0:r,display:"flex",justifyContent:"center",alignItems:n?"center":"flex-start"}}));const cG=sG;var uG=Object.defineProperty,dG=Object.defineProperties,fG=Object.getOwnPropertyDescriptors,Mf=Object.getOwnPropertySymbols,aT=Object.prototype.hasOwnProperty,iT=Object.prototype.propertyIsEnumerable,uE=(e,t,r)=>t in e?uG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jg=(e,t)=>{for(var r in t||(t={}))aT.call(t,r)&&uE(e,r,t[r]);if(Mf)for(var r of Mf(t))iT.call(t,r)&&uE(e,r,t[r]);return e},lT=(e,t)=>dG(e,fG(t)),pG=(e,t)=>{var r={};for(var n in e)aT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mf)for(var n of Mf(e))t.indexOf(n)<0&&iT.call(e,n)&&(r[n]=e[n]);return r};const mG=lT(Jg({},Wy),{yOffset:"5vh",xOffset:"5vw"});function sT(e){const t=H("ModalRoot",mG,e),{classNames:r,variant:n,size:o,yOffset:a,xOffset:i,scrollAreaComponent:l,radius:c,centered:u,fullScreen:d}=t,m=pG(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:h,cx:g}=cG({yOffset:a,xOffset:i,centered:u,fullScreen:d},{name:"Modal",variant:n,size:o});return s.createElement(aG,{value:{yOffset:a,scrollAreaComponent:l,radius:c}},s.createElement(St,Jg({__staticSelector:"Modal",size:o,variant:n,classNames:lT(Jg({},r),{content:g(h.content,r==null?void 0:r.content),inner:g(h.inner,r==null?void 0:r.inner)})},m)))}var hG=Object.defineProperty,zf=Object.getOwnPropertySymbols,cT=Object.prototype.hasOwnProperty,uT=Object.prototype.propertyIsEnumerable,dE=(e,t,r)=>t in e?hG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gG=(e,t)=>{for(var r in t||(t={}))cT.call(t,r)&&dE(e,r,t[r]);if(zf)for(var r of zf(t))uT.call(t,r)&&dE(e,r,t[r]);return e},vG=(e,t)=>{var r={};for(var n in e)cT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zf)for(var n of zf(e))t.indexOf(n)<0&&uT.call(e,n)&&(r[n]=e[n]);return r};const yG={shadow:"xl"},dT=f.forwardRef((e,t)=>{const r=H("ModalContent",yG,e),{children:n,scrollAreaComponent:o}=r,a=vG(r,["children","scrollAreaComponent"]),i=iG(),l=o||i.scrollAreaComponent||St.NativeScrollArea;return s.createElement(St.Content,gG({ref:t,radius:i.radius},a),s.createElement(l,{style:{maxHeight:`calc(100vh - (${S(i.yOffset)} * 2))`}},n))});var wG=Object.defineProperty,_G=Object.defineProperties,bG=Object.getOwnPropertyDescriptors,Lf=Object.getOwnPropertySymbols,fT=Object.prototype.hasOwnProperty,pT=Object.prototype.propertyIsEnumerable,fE=(e,t,r)=>t in e?wG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Iu=(e,t)=>{for(var r in t||(t={}))fT.call(t,r)&&fE(e,r,t[r]);if(Lf)for(var r of Lf(t))pT.call(t,r)&&fE(e,r,t[r]);return e},xG=(e,t)=>_G(e,bG(t)),EG=(e,t)=>{var r={};for(var n in e)fT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Lf)for(var n of Lf(e))t.indexOf(n)<0&&pT.call(e,n)&&(r[n]=e[n]);return r};const SG=xG(Iu({},Wy),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Er(e){const t=H("Modal",SG,e),{title:r,withOverlay:n,overlayProps:o,withCloseButton:a,closeButtonProps:i,children:l}=t,c=EG(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!r||a;return s.createElement(sT,Iu({},c),n&&s.createElement(St.Overlay,Iu({},o)),s.createElement(dT,null,u&&s.createElement(St.Header,null,r&&s.createElement(St.Title,null,r),a&&s.createElement(St.CloseButton,Iu({},i))),s.createElement(St.Body,null,l)))}Er.Root=sT;Er.CloseButton=St.CloseButton;Er.Overlay=St.Overlay;Er.Content=dT;Er.Header=St.Header;Er.Title=St.Title;Er.Body=St.Body;Er.NativeScrollArea=St.NativeScrollArea;const mT={xs:S(16),sm:S(22),md:S(26),lg:S(30),xl:S(36)},PG={xs:S(10),sm:S(12),md:S(14),lg:S(16),xl:S(18)};var $G=W((e,{disabled:t,radius:r,readOnly:n},{size:o,variant:a})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:t?e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3]:e.colorScheme==="dark"?e.colors.dark[7]:a==="filled"?e.white:e.colors.gray[1],color:t?e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],height:N({size:o,sizes:mT}),paddingLeft:`calc(${N({size:o,sizes:e.spacing})} / 1.5)`,paddingRight:t||n?N({size:o,sizes:e.spacing}):0,fontWeight:500,fontSize:N({size:o,sizes:PG}),borderRadius:N({size:r,sizes:e.radius}),cursor:t?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${S(10)})`},defaultValueRemove:{color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],marginLeft:`calc(${N({size:o,sizes:e.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}})),OG=Object.defineProperty,Ff=Object.getOwnPropertySymbols,hT=Object.prototype.hasOwnProperty,gT=Object.prototype.propertyIsEnumerable,pE=(e,t,r)=>t in e?OG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CG=(e,t)=>{for(var r in t||(t={}))hT.call(t,r)&&pE(e,r,t[r]);if(Ff)for(var r of Ff(t))gT.call(t,r)&&pE(e,r,t[r]);return e},kG=(e,t)=>{var r={};for(var n in e)hT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ff)for(var n of Ff(e))t.indexOf(n)<0&&gT.call(e,n)&&(r[n]=e[n]);return r};const jG={xs:16,sm:22,md:24,lg:26,xl:30};function vT(e){var t=e,{label:r,classNames:n,styles:o,className:a,onRemove:i,disabled:l,readOnly:c,size:u,radius:d="sm",variant:m,unstyled:h}=t,g=kG(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:_}=$G({disabled:l,readOnly:c,radius:d},{name:"MultiSelect",classNames:n,styles:o,unstyled:h,size:u,variant:m});return s.createElement("div",CG({className:_(y.defaultValue,a)},g),s.createElement("span",{className:y.defaultValueLabel},r),!l&&!c&&s.createElement(Qs,{"aria-hidden":!0,onMouseDown:i,size:jG[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:h}))}vT.displayName="@mantine/core/MultiSelect/DefaultValue";function RG({data:e,searchable:t,limit:r,searchValue:n,filter:o,value:a,disableSelectedItemFiltering:i}){if(!t&&a.length===0)return e;if(!t){const c=[];for(let u=0;u<e.length;u+=1)(i||!a.some(d=>d===e[u].value&&!e[u].disabled))&&c.push(e[u]);return c}const l=[];for(let c=0;c<e.length&&(o(n,!i&&a.some(u=>u===e[c].value&&!e[c].disabled),e[c])&&l.push(e[c]),!(l.length>=r));c+=1);return l}var TG=Object.defineProperty,Vf=Object.getOwnPropertySymbols,yT=Object.prototype.hasOwnProperty,wT=Object.prototype.propertyIsEnumerable,mE=(e,t,r)=>t in e?TG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hE=(e,t)=>{for(var r in t||(t={}))yT.call(t,r)&&mE(e,r,t[r]);if(Vf)for(var r of Vf(t))wT.call(t,r)&&mE(e,r,t[r]);return e},IG=(e,t)=>{var r={};for(var n in e)yT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Vf)for(var n of Vf(e))t.indexOf(n)<0&&wT.call(e,n)&&(r[n]=e[n]);return r};const DG={xs:S(14),sm:S(18),md:S(20),lg:S(24),xl:S(28)};function NG(e){var t=e,{size:r,error:n,style:o}=t,a=IG(t,["size","error","style"]);const i=nr(),l=N({size:r,sizes:DG});return s.createElement("svg",hE({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:hE({color:n?i.colors.red[6]:i.colors.gray[6],width:l,height:l},o),"data-chevron":!0},a),s.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var AG=Object.defineProperty,MG=Object.defineProperties,zG=Object.getOwnPropertyDescriptors,gE=Object.getOwnPropertySymbols,LG=Object.prototype.hasOwnProperty,FG=Object.prototype.propertyIsEnumerable,vE=(e,t,r)=>t in e?AG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VG=(e,t)=>{for(var r in t||(t={}))LG.call(t,r)&&vE(e,r,t[r]);if(gE)for(var r of gE(t))FG.call(t,r)&&vE(e,r,t[r]);return e},BG=(e,t)=>MG(e,zG(t));function _T({shouldClear:e,clearButtonProps:t,onClear:r,size:n,error:o}){return e?s.createElement(Qs,BG(VG({},t),{variant:"transparent",onClick:r,size:n,onMouseDown:a=>a.preventDefault()})):s.createElement(NG,{error:o,size:n})}_T.displayName="@mantine/core/SelectRightSection";var UG=Object.defineProperty,WG=Object.defineProperties,HG=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertySymbols,bT=Object.prototype.hasOwnProperty,xT=Object.prototype.propertyIsEnumerable,yE=(e,t,r)=>t in e?UG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kh=(e,t)=>{for(var r in t||(t={}))bT.call(t,r)&&yE(e,r,t[r]);if(Bf)for(var r of Bf(t))xT.call(t,r)&&yE(e,r,t[r]);return e},wE=(e,t)=>WG(e,HG(t)),qG=(e,t)=>{var r={};for(var n in e)bT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Bf)for(var n of Bf(e))t.indexOf(n)<0&&xT.call(e,n)&&(r[n]=e[n]);return r};function ET(e){var t=e,{styles:r,rightSection:n,rightSectionWidth:o,theme:a}=t,i=qG(t,["styles","rightSection","rightSectionWidth","theme"]);if(n)return{rightSection:n,rightSectionWidth:o,styles:r};const l=typeof r=="function"?r(a):r;return{rightSection:!i.readOnly&&!(i.disabled&&i.shouldClear)&&s.createElement(_T,kh({},i)),styles:wE(kh({},l),{rightSection:wE(kh({},l==null?void 0:l.rightSection),{pointerEvents:i.shouldClear?void 0:"none"})})}}var QG=Object.defineProperty,GG=Object.defineProperties,KG=Object.getOwnPropertyDescriptors,_E=Object.getOwnPropertySymbols,YG=Object.prototype.hasOwnProperty,XG=Object.prototype.propertyIsEnumerable,bE=(e,t,r)=>t in e?QG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,JG=(e,t)=>{for(var r in t||(t={}))YG.call(t,r)&&bE(e,r,t[r]);if(_E)for(var r of _E(t))XG.call(t,r)&&bE(e,r,t[r]);return e},ZG=(e,t)=>GG(e,KG(t)),eK=W((e,{invalid:t},{size:r})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[3],color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7]}}},values:{minHeight:`calc(${N({size:r,sizes:xt})} - ${S(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${e.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:N({size:r,sizes:xt})}},value:{margin:`calc(${e.spacing.xs} / 2 - ${S(2)}) calc(${e.spacing.xs} / 2)`},searchInput:ZG(JG({},e.fn.fontStyles()),{flex:1,minWidth:S(60),backgroundColor:"transparent",border:0,outline:0,fontSize:N({size:r,sizes:e.fontSizes}),padding:0,marginLeft:`calc(${e.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:N({size:r,sizes:mT}),"&::placeholder":{opacity:1,color:t?e.colors.red[e.fn.primaryShade()]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const tK=eK;var rK=Object.defineProperty,nK=Object.defineProperties,oK=Object.getOwnPropertyDescriptors,Uf=Object.getOwnPropertySymbols,ST=Object.prototype.hasOwnProperty,PT=Object.prototype.propertyIsEnumerable,xE=(e,t,r)=>t in e?rK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pi=(e,t)=>{for(var r in t||(t={}))ST.call(t,r)&&xE(e,r,t[r]);if(Uf)for(var r of Uf(t))PT.call(t,r)&&xE(e,r,t[r]);return e},EE=(e,t)=>nK(e,oK(t)),aK=(e,t)=>{var r={};for(var n in e)ST.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Uf)for(var n of Uf(e))t.indexOf(n)<0&&PT.call(e,n)&&(r[n]=e[n]);return r};function iK(e,t,r){return t?!1:r.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function lK(e,t){return!!e&&!t.some(r=>r.value.toLowerCase()===e.toLowerCase())}function SE(e,t){if(!Array.isArray(e))return;if(t.length===0)return[];const r=t.map(n=>typeof n=="object"?n.value:n);return e.filter(n=>r.includes(n))}const sK={size:"sm",valueComponent:vT,itemComponent:nk,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:iK,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:lK,switchDirectionOnFlip:!1,zIndex:go("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},$T=f.forwardRef((e,t)=>{const r=H("MultiSelect",sK,e),{className:n,style:o,required:a,label:i,description:l,size:c,error:u,classNames:d,styles:m,wrapperProps:h,value:g,defaultValue:y,data:_,onChange:E,valueComponent:w,itemComponent:v,id:b,transitionProps:x,maxDropdownHeight:P,shadow:O,nothingFound:$,onFocus:C,onBlur:R,searchable:j,placeholder:k,filter:T,limit:L,clearSearchOnChange:U,clearable:V,clearSearchOnBlur:M,variant:Q,onSearchChange:A,searchValue:z,disabled:q,initiallyOpened:le,radius:ye,icon:Re,rightSection:me,rightSectionWidth:qe,creatable:ze,getCreateLabel:it,shouldCreate:wt,onCreate:qt,sx:Pr,dropdownComponent:Qt,onDropdownClose:Ur,onDropdownOpen:Eo,maxSelectedValues:jt,withinPortal:$r,portalProps:Hn,switchDirectionOnFlip:Ve,zIndex:Wr,selectOnBlur:Hr,name:_t,dropdownPosition:ei,errorProps:ti,labelProps:ri,descriptionProps:Y,form:de,positionDependencies:We,onKeyDown:lt,unstyled:st,inputContainer:qn,inputWrapperOrder:an,readOnly:Or,withAsterisk:So,clearButtonProps:pa,hoverOnSearchChange:I,disableSelectedItemFiltering:D}=r,F=aK(r,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","portalProps","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:K,cx:he,theme:ge}=tK({invalid:!!u},{name:"MultiSelect",classNames:d,styles:m,unstyled:st,size:c,variant:Q}),{systemStyles:we,rest:fe}=Bn(F),oe=f.useRef(),Me=f.useRef({}),Se=Fr(b),[Be,je]=f.useState(le),[Gt,Rt]=f.useState(-1),[Po,yl]=f.useState("column"),[or,cr]=wr({value:z,defaultValue:"",finalValue:void 0,onChange:A}),[ni,oi]=f.useState(!1),{scrollIntoView:$o,targetRef:ai,scrollableRef:ii}=XA({duration:0,offset:5,cancelable:!1,isList:!0}),He=ze&&typeof it=="function";let Kt=null;const Oo=_.map(pe=>typeof pe=="string"?{label:pe,value:pe}:pe),bt=cN({data:Oo}),[Ue,Qn]=wr({value:SE(g,_),defaultValue:SE(y,_),finalValue:[],onChange:E}),Cr=f.useRef(!!jt&&jt<Ue.length),W0=pe=>{if(!Or){const Qe=Ue.filter(qr=>qr!==pe);Qn(Qe),jt&&Qe.length<jt&&(Cr.current=!1)}},QD=pe=>{cr(pe.currentTarget.value),!q&&!Cr.current&&j&&je(!0)},GD=pe=>{typeof C=="function"&&C(pe),!q&&!Cr.current&&j&&je(!0)},Vt=RG({data:bt,searchable:j,searchValue:or,limit:L,filter:T,value:Ue,disableSelectedItemFiltering:D});He&&wt(or,bt)&&(Kt=it(or),Vt.push({label:or,value:or,creatable:!0}));const ma=Math.min(Gt,Vt.length-1),H0=(pe,Qe,qr)=>{let Co=pe;for(;qr(Co);)if(Co=Qe(Co),!Vt[Co].disabled)return Co;return pe};mn(()=>{Rt(I&&or?0:-1)},[or,I]),mn(()=>{!q&&Ue.length>_.length&&je(!1),jt&&Ue.length<jt&&(Cr.current=!1),jt&&Ue.length>=jt&&(Cr.current=!0,je(!1))},[Ue]);const vc=pe=>{if(!Or)if(U&&cr(""),Ue.includes(pe.value))W0(pe.value);else{if(pe.creatable&&typeof qt=="function"){const Qe=qt(pe.value);typeof Qe<"u"&&Qe!==null&&Qn(typeof Qe=="string"?[...Ue,Qe]:[...Ue,Qe.value])}else Qn([...Ue,pe.value]);Ue.length===jt-1&&(Cr.current=!0,je(!1)),Vt.length===1&&je(!1)}},KD=pe=>{typeof R=="function"&&R(pe),Hr&&Vt[ma]&&Be&&vc(Vt[ma]),M&&cr(""),je(!1)},YD=pe=>{if(ni||(lt==null||lt(pe),Or)||pe.key!=="Backspace"&&jt&&Cr.current)return;const Qe=Po==="column",qr=()=>{Rt(ha=>{var Gn;const wl=H0(ha,ga=>ga+1,ga=>ga<Vt.length-1);return Be&&(ai.current=Me.current[(Gn=Vt[wl])==null?void 0:Gn.value],$o({alignment:Qe?"end":"start"})),wl})},Co=()=>{Rt(ha=>{var Gn;const wl=H0(ha,ga=>ga-1,ga=>ga>0);return Be&&(ai.current=Me.current[(Gn=Vt[wl])==null?void 0:Gn.value],$o({alignment:Qe?"start":"end"})),wl})};switch(pe.key){case"ArrowUp":{pe.preventDefault(),je(!0),Qe?Co():qr();break}case"ArrowDown":{pe.preventDefault(),je(!0),Qe?qr():Co();break}case"Enter":{pe.preventDefault(),Vt[ma]&&Be?vc(Vt[ma]):je(!0);break}case" ":{j||(pe.preventDefault(),Vt[ma]&&Be?vc(Vt[ma]):je(!0));break}case"Backspace":{Ue.length>0&&or.length===0&&(Qn(Ue.slice(0,-1)),je(!0),jt&&(Cr.current=!1));break}case"Home":{if(!j){pe.preventDefault(),Be||je(!0);const ha=Vt.findIndex(Gn=>!Gn.disabled);Rt(ha),$o({alignment:Qe?"end":"start"})}break}case"End":{if(!j){pe.preventDefault(),Be||je(!0);const ha=Vt.map(Gn=>!!Gn.disabled).lastIndexOf(!1);Rt(ha),$o({alignment:Qe?"end":"start"})}break}case"Escape":je(!1)}},XD=Ue.map(pe=>{let Qe=bt.find(qr=>qr.value===pe&&!qr.disabled);return!Qe&&He&&(Qe={value:pe,label:pe}),Qe}).filter(pe=>!!pe).map((pe,Qe)=>s.createElement(w,EE(pi({},pe),{variant:Q,disabled:q,className:K.value,readOnly:Or,onRemove:qr=>{qr.preventDefault(),qr.stopPropagation(),W0(pe.value)},key:pe.value,size:c,styles:m,classNames:d,radius:ye,index:Qe}))),JD=pe=>Ue.includes(pe),ZD=()=>{var pe;cr(""),Qn([]),(pe=oe.current)==null||pe.focus(),jt&&(Cr.current=!1)},yc=!Or&&(Vt.length>0?Be:Be&&!!$);return mn(()=>{const pe=yc?Eo:Ur;typeof pe=="function"&&pe()},[yc]),s.createElement(Lt.Wrapper,pi(pi({required:a,id:Se,label:i,error:u,description:l,size:c,className:n,style:o,classNames:d,styles:m,__staticSelector:"MultiSelect",sx:Pr,errorProps:ti,descriptionProps:Y,labelProps:ri,inputContainer:qn,inputWrapperOrder:an,unstyled:st,withAsterisk:So,variant:Q},we),h),s.createElement(cs,{opened:yc,transitionProps:x,shadow:"sm",withinPortal:$r,portalProps:Hn,__staticSelector:"MultiSelect",onDirectionChange:yl,switchDirectionOnFlip:Ve,zIndex:Wr,dropdownPosition:ei,positionDependencies:[...We,or],classNames:d,styles:m,unstyled:st,variant:Q},s.createElement(cs.Target,null,s.createElement("div",{className:K.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":Be&&yc?`${Se}-items`:null,"aria-controls":Se,"aria-expanded":Be,onMouseLeave:()=>Rt(-1),tabIndex:-1},s.createElement("input",{type:"hidden",name:_t,value:Ue.join(","),form:de,disabled:q}),s.createElement(Lt,pi({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:Q,disabled:q,error:u,required:a,radius:ye,icon:Re,unstyled:st,onMouseDown:pe=>{var Qe;pe.preventDefault(),!q&&!Cr.current&&je(!Be),(Qe=oe.current)==null||Qe.focus()},classNames:EE(pi({},d),{input:he({[K.input]:!j},d==null?void 0:d.input)})},ET({theme:ge,rightSection:me,rightSectionWidth:qe,styles:m,size:c,shouldClear:V&&Ue.length>0,onClear:ZD,error:u,disabled:q,clearButtonProps:pa,readOnly:Or})),s.createElement("div",{className:K.values,"data-clearable":V||void 0},XD,s.createElement("input",pi({ref:Qp(t,oe),type:"search",id:Se,className:he(K.searchInput,{[K.searchInputPointer]:!j,[K.searchInputInputHidden]:!Be&&Ue.length>0||!j&&Ue.length>0,[K.searchInputEmpty]:Ue.length===0}),onKeyDown:YD,value:or,onChange:QD,onFocus:GD,onBlur:KD,readOnly:!j||Cr.current||Or,placeholder:Ue.length===0?k:void 0,disabled:q,"data-mantine-stop-propagation":Be,autoComplete:"off",onCompositionStart:()=>oi(!0),onCompositionEnd:()=>oi(!1)},fe)))))),s.createElement(cs.Dropdown,{component:Qt||Ty,maxHeight:P,direction:Po,id:Se,innerRef:ii,__staticSelector:"MultiSelect",classNames:d,styles:m},s.createElement(ek,{data:Vt,hovered:ma,classNames:d,styles:m,uuid:Se,__staticSelector:"MultiSelect",onItemHover:Rt,onItemSelect:vc,itemsRefs:Me,itemComponent:v,size:c,nothingFound:$,isItemSelected:JD,creatable:ze&&!!Kt,createLabel:Kt,unstyled:st,variant:Q}))))});$T.displayName="@mantine/core/MultiSelect";var cK=Object.defineProperty,uK=Object.defineProperties,dK=Object.getOwnPropertyDescriptors,Wf=Object.getOwnPropertySymbols,OT=Object.prototype.hasOwnProperty,CT=Object.prototype.propertyIsEnumerable,PE=(e,t,r)=>t in e?cK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iu=(e,t)=>{for(var r in t||(t={}))OT.call(t,r)&&PE(e,r,t[r]);if(Wf)for(var r of Wf(t))CT.call(t,r)&&PE(e,r,t[r]);return e},$E=(e,t)=>uK(e,dK(t)),fK=(e,t)=>{var r={};for(var n in e)OT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wf)for(var n of Wf(e))t.indexOf(n)<0&&CT.call(e,n)&&(r[n]=e[n]);return r};const pK={size:"sm"},vt=f.forwardRef((e,t)=>{const r=Hk("NativeSelect",pK,e),{inputProps:n,wrapperProps:o,data:a,onChange:i,value:l,classNames:c,styles:u,rightSection:d,rightSectionWidth:m}=r,h=fK(r,["inputProps","wrapperProps","data","onChange","value","classNames","styles","rightSection","rightSectionWidth"]),g=nr(),_=a.map(E=>typeof E=="string"?{label:E,value:E}:E).map(E=>s.createElement("option",{key:E.value,value:E.value,disabled:E.disabled},E.label));return s.createElement(Lt.Wrapper,$E(iu({},o),{__staticSelector:"NativeSelect"}),s.createElement(Lt,iu($E(iu(iu({},n),h),{onChange:i,component:"select",ref:t,value:l===null?"":l,__staticSelector:"NativeSelect",pointer:g.cursorType==="pointer"}),ET({theme:g,rightSection:d,rightSectionWidth:m,styles:u,shouldClear:!1,size:n.size,error:o.error,readOnly:!1})),_))});vt.displayName="@mantine/core/NativeSelect";var mK=W((e,{color:t,radius:r,withTitle:n})=>{const o=e.fn.radius(r),a=e.fn.variant({variant:"filled",color:t});return{closeButton:e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[8]:e.colors.gray[0]}),icon:{boxSizing:"border-box",marginRight:e.spacing.md,width:S(28),height:S(28),borderRadius:S(28),display:"flex",flex:"none",alignItems:"center",justifyContent:"center",backgroundColor:a.background,color:e.white},root:{overflow:"hidden",boxSizing:"border-box",position:"relative",display:"flex",alignItems:"center",paddingLeft:S(22),paddingRight:e.spacing.xs,paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs,borderRadius:o,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,boxShadow:e.shadows.lg,"&::before":{content:'""',display:"block",position:"absolute",width:S(6),top:o,bottom:o,left:S(4),borderRadius:o,backgroundColor:a.background},"&[data-with-icon]":{paddingLeft:e.spacing.xs,"&::before":{display:"none"}},"&[data-with-border]":{border:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`}},body:{flex:1,overflow:"hidden",marginRight:e.spacing.xs},loader:{marginRight:e.spacing.md},title:{lineHeight:1.4,marginBottom:S(2),overflow:"hidden",textOverflow:"ellipsis",color:e.colorScheme==="dark"?e.white:e.colors.gray[9]},description:{color:n?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:1.4,overflow:"hidden",textOverflow:"ellipsis"}}});const hK=mK;var gK=Object.defineProperty,vK=Object.defineProperties,yK=Object.getOwnPropertyDescriptors,Hf=Object.getOwnPropertySymbols,kT=Object.prototype.hasOwnProperty,jT=Object.prototype.propertyIsEnumerable,OE=(e,t,r)=>t in e?gK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CE=(e,t)=>{for(var r in t||(t={}))kT.call(t,r)&&OE(e,r,t[r]);if(Hf)for(var r of Hf(t))jT.call(t,r)&&OE(e,r,t[r]);return e},wK=(e,t)=>vK(e,yK(t)),_K=(e,t)=>{var r={};for(var n in e)kT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hf)for(var n of Hf(e))t.indexOf(n)<0&&jT.call(e,n)&&(r[n]=e[n]);return r};const bK={withCloseButton:!0},RT=f.forwardRef((e,t)=>{const r=H("Notification",bK,e),{className:n,color:o,radius:a,loading:i,withCloseButton:l,withBorder:c,title:u,icon:d,children:m,onClose:h,closeButtonProps:g,classNames:y,styles:_,unstyled:E,variant:w}=r,v=_K(r,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:b,cx:x}=hK({color:o,radius:a,withTitle:!!u},{name:"Notification",classNames:y,styles:_,unstyled:E,variant:w});return s.createElement(ue,CE({className:x(b.root,n),"data-with-icon":!!d||i||void 0,"data-with-border":c||void 0,role:"alert",ref:t},v),d&&!i&&s.createElement("div",{className:b.icon},d),i&&s.createElement(Un,{size:28,color:o,className:b.loader}),s.createElement("div",{className:b.body},u&&s.createElement(ae,{className:b.title,size:"sm",weight:500},u),s.createElement(ae,{color:"dimmed",className:b.description,size:"sm"},m)),l&&s.createElement(Qs,wK(CE({iconSize:16,color:"gray"},g),{onClick:h,className:b.closeButton})))});RT.displayName="@mantine/core/Notification";var xK=Object.defineProperty,EK=Object.defineProperties,SK=Object.getOwnPropertyDescriptors,qf=Object.getOwnPropertySymbols,TT=Object.prototype.hasOwnProperty,IT=Object.prototype.propertyIsEnumerable,kE=(e,t,r)=>t in e?xK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jh=(e,t)=>{for(var r in t||(t={}))TT.call(t,r)&&kE(e,r,t[r]);if(qf)for(var r of qf(t))IT.call(t,r)&&kE(e,r,t[r]);return e},PK=(e,t)=>EK(e,SK(t)),$K=(e,t)=>{var r={};for(var n in e)TT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&qf)for(var n of qf(e))t.indexOf(n)<0&&IT.call(e,n)&&(r[n]=e[n]);return r};const OK={type:"text",size:"sm",__staticSelector:"TextInput"},ne=f.forwardRef((e,t)=>{const r=Hk("TextInput",OK,e),{inputProps:n,wrapperProps:o}=r,a=$K(r,["inputProps","wrapperProps"]);return s.createElement(Lt.Wrapper,jh({},o),s.createElement(Lt,PK(jh(jh({},n),a),{ref:t})))});ne.displayName="@mantine/core/TextInput";const[CK,wm]=ho("Pagination.Root component was not found in tree"),kK={siblings:1,boundaries:1};function DT(e){const{total:t,value:r,defaultValue:n,onChange:o,disabled:a,children:i,siblings:l,boundaries:c,color:u,radius:d,onNextPage:m,onPreviousPage:h,onFirstPage:g,onLastPage:y,getItemProps:_,classNames:E,styles:w,unstyled:v,variant:b,size:x}=H("PaginationRoot",kK,e),{range:P,setPage:O,next:$,previous:C,active:R,first:j,last:k}=HA({page:r,initialPage:n,onChange:o,total:t,siblings:l,boundaries:c}),T=Rr(m,$),L=Rr(h,C),U=Rr(g,j),V=Rr(y,k);return s.createElement(CK,{value:{total:t,range:P,active:R,disabled:a,color:u,radius:d,getItemProps:_,onChange:O,onNext:T,onPrevious:L,onFirst:U,onLast:V,stylesApi:{name:"Pagination",classNames:E,styles:w,unstyled:v,variant:b,size:x}}},i)}const Is={xs:S(22),sm:S(26),md:S(32),lg:S(38),xl:S(44)};var jK=W((e,{color:t,radius:r,withPadding:n},{size:o})=>{const a=e.fn.variant({color:t,variant:"filled"});return{control:{cursor:"pointer",userSelect:"none",display:"flex",alignItems:"center",justifyContent:"center",border:`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,height:N({size:o,sizes:Is}),minWidth:N({size:o,sizes:Is}),padding:n?`0 calc(${N({size:o,sizes:e.spacing})} / 2)`:void 0,fontSize:N({size:o,sizes:e.fontSizes}),borderRadius:e.fn.radius(r),lineHeight:1,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,"&:not([data-disabled])":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]}),"&:active:not([data-disabled])":e.activeStyles,"&[data-disabled]":{opacity:.4,cursor:"not-allowed"},"&[data-active]":{borderColor:"transparent",color:a.color,backgroundColor:a.background,"&:not([data-disabled])":e.fn.hover({backgroundColor:a.hover})}}}});const RK=jK;var TK=Object.defineProperty,IK=Object.defineProperties,DK=Object.getOwnPropertyDescriptors,Qf=Object.getOwnPropertySymbols,NT=Object.prototype.hasOwnProperty,AT=Object.prototype.propertyIsEnumerable,jE=(e,t,r)=>t in e?TK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NK=(e,t)=>{for(var r in t||(t={}))NT.call(t,r)&&jE(e,r,t[r]);if(Qf)for(var r of Qf(t))AT.call(t,r)&&jE(e,r,t[r]);return e},AK=(e,t)=>IK(e,DK(t)),MK=(e,t)=>{var r={};for(var n in e)NT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qf)for(var n of Qf(e))t.indexOf(n)<0&&AT.call(e,n)&&(r[n]=e[n]);return r};const zK={withPadding:!0},_m=f.forwardRef((e,t)=>{const r=H("PaginationControl",zK,e),{active:n,className:o,disabled:a,withPadding:i}=r,l=MK(r,["active","className","disabled","withPadding"]),c=wm(),{classes:u,cx:d}=RK({color:c.color,radius:c.radius,withPadding:i},c.stylesApi);return s.createElement(Jo,AK(NK({},l),{disabled:a,"data-active":n||void 0,"data-disabled":a||void 0,ref:t,className:d(u.control,o)}))});_m.displayName="@mantine/core/PaginationControl";var LK=Object.defineProperty,FK=Object.defineProperties,VK=Object.getOwnPropertyDescriptors,Gf=Object.getOwnPropertySymbols,MT=Object.prototype.hasOwnProperty,zT=Object.prototype.propertyIsEnumerable,RE=(e,t,r)=>t in e?LK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fa=(e,t)=>{for(var r in t||(t={}))MT.call(t,r)&&RE(e,r,t[r]);if(Gf)for(var r of Gf(t))zT.call(t,r)&&RE(e,r,t[r]);return e},ec=(e,t)=>FK(e,VK(t)),BK=(e,t)=>{var r={};for(var n in e)MT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gf)for(var n of Gf(e))t.indexOf(n)<0&&zT.call(e,n)&&(r[n]=e[n]);return r};function LT(e){return`calc(${N({size:e,sizes:Is})} / 2)`}function tc(e){var t=e,{size:r,style:n,children:o,path:a}=t,i=BK(t,["size","style","children","path"]);return s.createElement("svg",Fa({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:Fa({width:r,height:r},n)},i),s.createElement("path",{d:a,fill:"currentColor"}))}const UK=e=>s.createElement(tc,ec(Fa({},e),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),WK=e=>s.createElement(tc,ec(Fa({},e),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),HK=e=>s.createElement(tc,ec(Fa({},e),{path:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z"})),qK=e=>s.createElement(tc,ec(Fa({},e),{path:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z"})),QK=e=>s.createElement(tc,ec(Fa({},e),{path:"M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z"}));var GK=W((e,t,{size:r})=>({dots:{height:N({size:r,sizes:Is}),minWidth:N({size:r,sizes:Is}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}));const KK=GK;var YK=Object.defineProperty,Kf=Object.getOwnPropertySymbols,FT=Object.prototype.hasOwnProperty,VT=Object.prototype.propertyIsEnumerable,TE=(e,t,r)=>t in e?YK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XK=(e,t)=>{for(var r in t||(t={}))FT.call(t,r)&&TE(e,r,t[r]);if(Kf)for(var r of Kf(t))VT.call(t,r)&&TE(e,r,t[r]);return e},JK=(e,t)=>{var r={};for(var n in e)FT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Kf)for(var n of Kf(e))t.indexOf(n)<0&&VT.call(e,n)&&(r[n]=e[n]);return r};const ZK={icon:QK},Qy=f.forwardRef((e,t)=>{const r=H("PaginationDots",ZK,e),{className:n,icon:o}=r,a=JK(r,["className","icon"]),i=wm(),{classes:l,cx:c}=KK(null,i.stylesApi);return s.createElement(ue,XK({ref:t,className:c(l.dots,n)},a),s.createElement(o,{size:LT(i.stylesApi.size)}))});Qy.displayName="@mantine/core/PaginationDots";var eY=Object.defineProperty,IE=Object.getOwnPropertySymbols,tY=Object.prototype.hasOwnProperty,rY=Object.prototype.propertyIsEnumerable,DE=(e,t,r)=>t in e?eY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nY=(e,t)=>{for(var r in t||(t={}))tY.call(t,r)&&DE(e,r,t[r]);if(IE)for(var r of IE(t))rY.call(t,r)&&DE(e,r,t[r]);return e};function Gy({dotsIcon:e}){const t=wm(),r=t.range.map((n,o)=>{var a;return n==="dots"?s.createElement(Qy,{icon:e,key:o}):s.createElement(_m,nY({key:o,active:n===t.active,"aria-current":n===t.active?"page":void 0,onClick:()=>t.onChange(n),disabled:t.disabled},(a=t.getItemProps)==null?void 0:a.call(t,n)),n)});return s.createElement(s.Fragment,null,r)}Gy.displayName="@mantine/core/PaginationItems";var oY=W(e=>({icon:{transform:e.dir==="rtl"?"rotate(180deg)":"unset"}}));const aY=oY;var iY=Object.defineProperty,Yf=Object.getOwnPropertySymbols,BT=Object.prototype.hasOwnProperty,UT=Object.prototype.propertyIsEnumerable,NE=(e,t,r)=>t in e?iY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lY=(e,t)=>{for(var r in t||(t={}))BT.call(t,r)&&NE(e,r,t[r]);if(Yf)for(var r of Yf(t))UT.call(t,r)&&NE(e,r,t[r]);return e},sY=(e,t)=>{var r={};for(var n in e)BT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Yf)for(var n of Yf(e))t.indexOf(n)<0&&UT.call(e,n)&&(r[n]=e[n]);return r};function bm({icon:e,name:t,action:r,type:n}){const o={icon:e},a=f.forwardRef((i,l)=>{const c=H(t,o,i),{icon:u}=c,d=sY(c,["icon"]),{classes:m}=aY(),h=wm(),g=n==="next"?h.active===h.total:h.active===1;return s.createElement(_m,lY({disabled:h.disabled||g,ref:l,onClick:h[r],withPadding:!1},d),s.createElement(u,{className:m.icon,size:LT(h.stylesApi.size)}))});return a.displayName=`@mantine/core/${t}`,a}const WT=bm({icon:UK,name:"PaginationNext",action:"onNext",type:"next"}),HT=bm({icon:WK,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),qT=bm({icon:HK,name:"PaginationFirst",action:"onFirst",type:"previous"}),QT=bm({icon:qK,name:"PaginationLast",action:"onLast",type:"next"});var cY=Object.defineProperty,Xf=Object.getOwnPropertySymbols,GT=Object.prototype.hasOwnProperty,KT=Object.prototype.propertyIsEnumerable,AE=(e,t,r)=>t in e?cY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ml=(e,t)=>{for(var r in t||(t={}))GT.call(t,r)&&AE(e,r,t[r]);if(Xf)for(var r of Xf(t))KT.call(t,r)&&AE(e,r,t[r]);return e},uY=(e,t)=>{var r={};for(var n in e)GT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xf)for(var n of Xf(e))t.indexOf(n)<0&&KT.call(e,n)&&(r[n]=e[n]);return r};const dY={withControls:!0,siblings:1,boundaries:1};function Wn(e){const t=H("Pagination",dY,e),{withEdges:r,withControls:n,classNames:o,styles:a,unstyled:i,variant:l,size:c,total:u,value:d,defaultValue:m,onChange:h,disabled:g,siblings:y,boundaries:_,color:E,radius:w,onNextPage:v,onPreviousPage:b,onFirstPage:x,onLastPage:P,getItemProps:O,getControlProps:$,spacing:C,nextIcon:R,previousIcon:j,lastIcon:k,firstIcon:T,dotsIcon:L}=t,U=uY(t,["withEdges","withControls","classNames","styles","unstyled","variant","size","total","value","defaultValue","onChange","disabled","siblings","boundaries","color","radius","onNextPage","onPreviousPage","onFirstPage","onLastPage","getItemProps","getControlProps","spacing","nextIcon","previousIcon","lastIcon","firstIcon","dotsIcon"]),V=nr();return u<=0?null:s.createElement(DT,{classNames:o,styles:a,unstyled:i,variant:l,size:c,total:u,value:d,defaultValue:m,onChange:h,disabled:g,siblings:y,boundaries:_,color:E,radius:w,onNextPage:v,onPreviousPage:b,onFirstPage:x,onLastPage:P,getItemProps:O},s.createElement(J,Ml({spacing:C??`calc(${N({size:c,sizes:V.spacing})} / 2)`},U),r&&s.createElement(qT,Ml({icon:T},$==null?void 0:$("first"))),n&&s.createElement(HT,Ml({icon:j},$==null?void 0:$("previous"))),s.createElement(Gy,{dotsIcon:L}),n&&s.createElement(WT,Ml({icon:R},$==null?void 0:$("next"))),r&&s.createElement(QT,Ml({icon:k},$==null?void 0:$("last")))))}Wn.displayName="@mantine/core/Pagination";Wn.Root=DT;Wn.Items=Gy;Wn.Control=_m;Wn.Dots=Qy;Wn.Next=WT;Wn.Previous=HT;Wn.Last=QT;Wn.First=qT;const fY=({reveal:e,size:t})=>s.createElement("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:t,height:t}},s.createElement("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}));var pY=Object.defineProperty,mY=Object.defineProperties,hY=Object.getOwnPropertyDescriptors,ME=Object.getOwnPropertySymbols,gY=Object.prototype.hasOwnProperty,vY=Object.prototype.propertyIsEnumerable,zE=(e,t,r)=>t in e?pY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Rh=(e,t)=>{for(var r in t||(t={}))gY.call(t,r)&&zE(e,r,t[r]);if(ME)for(var r of ME(t))vY.call(t,r)&&zE(e,r,t[r]);return e},LE=(e,t)=>mY(e,hY(t)),yY=W((e,{rightSectionWidth:t},{size:r})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:LE(Rh(Rh({},e.fn.fontStyles()),e.fn.cover(0)),{backgroundColor:"transparent",border:`${S(1)} solid transparent`,borderLeftWidth:0,borderRightWidth:0,boxSizing:"border-box",display:"block",width:`calc(100% - ${S(t)})`,paddingLeft:`calc(${N({size:r,sizes:xt})} / 3)`,fontSize:N({size:r,sizes:e.fontSizes}),height:`calc(${N({size:r,sizes:xt})} - ${S(2)})`,lineHeight:`calc(${N({size:r,sizes:xt})} - ${S(4)})`,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,"&::-ms-reveal, &::-ms-clear":{display:"none"},"&:focus":{outline:0},"&:disabled":{cursor:"not-allowed",pointerEvents:"none",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[1],color:e.colors.dark[2],opacity:.6,"&::placeholder":{color:e.colors.dark[2]}},"&::placeholder":LE(Rh({},e.fn.placeholderStyles()),{opacity:1}),"&[data-invalid]":{color:e.fn.variant({variant:"filled",color:"red"}).background,"&::placeholder":{opacity:1,color:e.fn.variant({variant:"filled",color:"red"}).background}},"&[data-with-icon]":{paddingLeft:N({size:r,sizes:xt})}})}));const wY=yY;var _Y=Object.defineProperty,bY=Object.defineProperties,xY=Object.getOwnPropertyDescriptors,Jf=Object.getOwnPropertySymbols,YT=Object.prototype.hasOwnProperty,XT=Object.prototype.propertyIsEnumerable,FE=(e,t,r)=>t in e?_Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lu=(e,t)=>{for(var r in t||(t={}))YT.call(t,r)&&FE(e,r,t[r]);if(Jf)for(var r of Jf(t))XT.call(t,r)&&FE(e,r,t[r]);return e},EY=(e,t)=>bY(e,xY(t)),SY=(e,t)=>{var r={};for(var n in e)YT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Jf)for(var n of Jf(e))t.indexOf(n)<0&&XT.call(e,n)&&(r[n]=e[n]);return r};const PY={xs:S(22),sm:S(26),md:S(28),lg:S(32),xl:S(40)},$Y={xs:S(12),sm:S(15),md:S(17),lg:S(19),xl:S(21)},OY={xs:S(28),sm:S(32),md:S(34),lg:S(44),xl:S(54)},CY={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:fY,__staticSelector:"PasswordInput"},oo=f.forwardRef((e,t)=>{const r=H("PasswordInput",CY,e),{radius:n,disabled:o,size:a,toggleTabIndex:i,className:l,id:c,label:u,error:d,required:m,style:h,icon:g,description:y,wrapperProps:_,classNames:E,styles:w,variant:v,visibilityToggleIcon:b,__staticSelector:x,rightSection:P,rightSectionWidth:O,rightSectionProps:$,sx:C,labelProps:R,descriptionProps:j,errorProps:k,unstyled:T,visibilityToggleLabel:L,withAsterisk:U,inputContainer:V,iconWidth:M,inputWrapperOrder:Q,visible:A,defaultVisible:z,onVisibilityChange:q}=r,le=SY(r,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","rightSection","rightSectionWidth","rightSectionProps","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),ye=N({size:a,sizes:OY}),{classes:Re}=wY({rightSectionWidth:ye},{name:"PasswordInput",classNames:E,styles:w,unstyled:T,size:a,variant:v}),me=Fr(c),{systemStyles:qe,rest:ze}=Bn(le),[it,wt]=wr({value:A,defaultValue:z,finalValue:!1,onChange:q}),qt=()=>wt(!it),Pr=s.createElement(Mr,{className:Re.visibilityToggle,tabIndex:i,radius:n,size:N({size:a,sizes:PY}),"aria-hidden":!L,"aria-label":L,unstyled:T,onMouseDown:Qt=>{Qt.preventDefault(),qt()},onKeyDown:Qt=>{Qt.key===" "&&(Qt.preventDefault(),qt())}},s.createElement(b,{reveal:it,size:N({size:a,sizes:$Y})}));return s.createElement(Lt.Wrapper,lu(lu({required:m,id:me,label:u,error:d,description:y,size:a,className:l,style:h,classNames:E,styles:w,__staticSelector:x,sx:C,errorProps:k,descriptionProps:j,labelProps:R,unstyled:T,withAsterisk:U,inputWrapperOrder:Q,inputContainer:V,variant:v},qe),_),s.createElement(Lt,{component:"div",error:d,icon:g,size:a,classNames:EY(lu({},E),{input:Re.input}),styles:w,radius:n,disabled:o,__staticSelector:x,rightSectionWidth:ye,rightSection:!o&&Pr,variant:v,unstyled:T,iconWidth:M},s.createElement("input",lu({type:it?"text":"password",required:m,"data-invalid":!!d||void 0,"data-with-icon":!!g||void 0,className:Re.innerInput,disabled:o,id:me,ref:t},ze))))});oo.displayName="@mantine/core/PasswordInput";var kY=Object.defineProperty,Zf=Object.getOwnPropertySymbols,JT=Object.prototype.hasOwnProperty,ZT=Object.prototype.propertyIsEnumerable,VE=(e,t,r)=>t in e?kY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BE=(e,t)=>{for(var r in t||(t={}))JT.call(t,r)&&VE(e,r,t[r]);if(Zf)for(var r of Zf(t))ZT.call(t,r)&&VE(e,r,t[r]);return e},jY=(e,t)=>{var r={};for(var n in e)JT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Zf)for(var n of Zf(e))t.indexOf(n)<0&&ZT.call(e,n)&&(r[n]=e[n]);return r};function RY(e){const t=e,{width:r,height:n,style:o}=t,a=jY(t,["width","height","style"]);return s.createElement("svg",BE({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:BE({width:r,height:n},o)},a),s.createElement("path",{fill:"currentColor",d:"M0 2.5a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z"}))}const eI=f.createContext(null),TY=eI.Provider,IY=()=>f.useContext(eI);var DY=Object.defineProperty,ep=Object.getOwnPropertySymbols,tI=Object.prototype.hasOwnProperty,rI=Object.prototype.propertyIsEnumerable,UE=(e,t,r)=>t in e?DY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WE=(e,t)=>{for(var r in t||(t={}))tI.call(t,r)&&UE(e,r,t[r]);if(ep)for(var r of ep(t))rI.call(t,r)&&UE(e,r,t[r]);return e},NY=(e,t)=>{var r={};for(var n in e)tI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ep)for(var n of ep(e))t.indexOf(n)<0&&rI.call(e,n)&&(r[n]=e[n]);return r};const AY={size:"sm"},nI=f.forwardRef((e,t)=>{const r=H("RadioGroup",AY,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c,unstyled:u,name:d}=r,m=NY(r,["children","value","defaultValue","onChange","size","wrapperProps","unstyled","name"]),h=Fr(d),[g,y]=wr({value:o,defaultValue:a,finalValue:"",onChange:i}),_=E=>y(E.currentTarget.value);return s.createElement(TY,{value:{value:g,onChange:_,size:l,name:h}},s.createElement(Lt.Wrapper,WE(WE({labelElement:"div",size:l,__staticSelector:"RadioGroup",ref:t,unstyled:u},c),m),n))});nI.displayName="@mantine/core/RadioGroup";var MY=Object.defineProperty,zY=Object.defineProperties,LY=Object.getOwnPropertyDescriptors,HE=Object.getOwnPropertySymbols,FY=Object.prototype.hasOwnProperty,VY=Object.prototype.propertyIsEnumerable,qE=(e,t,r)=>t in e?MY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BY=(e,t)=>{for(var r in t||(t={}))FY.call(t,r)&&qE(e,r,t[r]);if(HE)for(var r of HE(t))VY.call(t,r)&&qE(e,r,t[r]);return e},UY=(e,t)=>zY(e,LY(t));const Th={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)},su={xs:S(6),sm:S(8),md:S(10),lg:S(14),xl:S(16)};var WY=W((e,{color:t,transitionDuration:r,labelPosition:n,error:o},{size:a})=>{const i=e.fn.variant({variant:"filled",color:t}),l=e.fn.variant({variant:"filled",color:"red"}).background;return{inner:{order:n==="left"?2:1,position:"relative",alignSelf:"flex-start"},icon:{ref:Zt("icon"),color:e.white,opacity:0,transform:`scale(0.75) translateY(${S(2)})`,transition:`opacity ${r}ms ${e.transitionTimingFunction}`,pointerEvents:"none",width:N({sizes:su,size:a}),height:N({sizes:su,size:a}),position:"absolute",top:`calc(50% - ${N({sizes:su,size:a})} / 2)`,left:`calc(50% - ${N({sizes:su,size:a})} / 2)`},radio:UY(BY({},e.fn.focusStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${S(1)} solid ${o?l:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,position:"relative",appearance:"none",width:N({sizes:Th,size:a}),height:N({sizes:Th,size:a}),borderRadius:N({sizes:Th,size:a}),margin:0,display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:`${r}ms`,cursor:e.cursorType,"&:checked":{background:i.background,borderColor:i.background,[`& + .${Zt("icon")}`]:{opacity:1,transform:"scale(1)"}},"&:disabled":{borderColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[4],backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1],[`& + .${Zt("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[4]}}})}});const HY=WY;var qY=Object.defineProperty,tp=Object.getOwnPropertySymbols,oI=Object.prototype.hasOwnProperty,aI=Object.prototype.propertyIsEnumerable,QE=(e,t,r)=>t in e?qY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cu=(e,t)=>{for(var r in t||(t={}))oI.call(t,r)&&QE(e,r,t[r]);if(tp)for(var r of tp(t))aI.call(t,r)&&QE(e,r,t[r]);return e},QY=(e,t)=>{var r={};for(var n in e)oI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&tp)for(var n of tp(e))t.indexOf(n)<0&&aI.call(e,n)&&(r[n]=e[n]);return r};const GY={icon:RY,transitionDuration:100,size:"sm",labelPosition:"right"},rp=f.forwardRef((e,t)=>{var r,n;const o=H("Radio",GY,e),{className:a,style:i,id:l,label:c,size:u,title:d,disabled:m,color:h,classNames:g,styles:y,sx:_,icon:E,transitionDuration:w,wrapperProps:v,unstyled:b,labelPosition:x,description:P,error:O,variant:$}=o,C=QY(o,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error","variant"]),R=IY(),j=(r=R==null?void 0:R.size)!=null?r:u,k=e.size?u:j,{classes:T}=HY({color:h,transitionDuration:w,labelPosition:x,error:!!O},{name:"Radio",classNames:g,styles:y,unstyled:b,variant:$,size:k}),{systemStyles:L,rest:U}=Bn(C),V=Fr(l),M=R?{checked:R.value===U.value,name:(n=U.name)!=null?n:R.name,onChange:R.onChange}:{};return s.createElement(vm,cu(cu({className:a,sx:_,style:i,id:V,size:k,labelPosition:x,label:c,description:P,error:O,disabled:m,__staticSelector:"Radio",classNames:g,styles:y,unstyled:b,"data-checked":M.checked||void 0,variant:$},L),v),s.createElement("div",{className:T.inner},s.createElement("input",cu(cu({ref:t,className:T.radio,type:"radio",id:V,disabled:m},U),M)),s.createElement(E,{className:T.icon,"aria-hidden":!0})))});rp.displayName="@mantine/core/Radio";rp.Group=nI;var KY=Object.defineProperty,np=Object.getOwnPropertySymbols,iI=Object.prototype.hasOwnProperty,lI=Object.prototype.propertyIsEnumerable,GE=(e,t,r)=>t in e?KY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YY=(e,t)=>{for(var r in t||(t={}))iI.call(t,r)&&GE(e,r,t[r]);if(np)for(var r of np(t))lI.call(t,r)&&GE(e,r,t[r]);return e},XY=(e,t)=>{var r={};for(var n in e)iI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&np)for(var n of np(e))t.indexOf(n)<0&&lI.call(e,n)&&(r[n]=e[n]);return r};const JY={w:0,h:0},Ky=f.forwardRef((e,t)=>{const r=H("Space",JY,e),{w:n,h:o}=r,a=XY(r,["w","h"]);return s.createElement(ue,YY({ref:t,w:n,miw:n,h:o,mih:o},a))});Ky.displayName="@mantine/core/Space";var ZY=W((e,{spacing:t,align:r,justify:n})=>({root:{display:"flex",flexDirection:"column",alignItems:r,justifyContent:n,gap:N({size:t,sizes:e.spacing})}}));const eX=ZY;var tX=Object.defineProperty,op=Object.getOwnPropertySymbols,sI=Object.prototype.hasOwnProperty,cI=Object.prototype.propertyIsEnumerable,KE=(e,t,r)=>t in e?tX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rX=(e,t)=>{for(var r in t||(t={}))sI.call(t,r)&&KE(e,r,t[r]);if(op)for(var r of op(t))cI.call(t,r)&&KE(e,r,t[r]);return e},nX=(e,t)=>{var r={};for(var n in e)sI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&op)for(var n of op(e))t.indexOf(n)<0&&cI.call(e,n)&&(r[n]=e[n]);return r};const oX={spacing:"md",align:"stretch",justify:"flex-start"},Oe=f.forwardRef((e,t)=>{const r=H("Stack",oX,e),{spacing:n,className:o,align:a,justify:i,unstyled:l,variant:c}=r,u=nX(r,["spacing","className","align","justify","unstyled","variant"]),{classes:d,cx:m}=eX({spacing:n,align:a,justify:i},{name:"Stack",unstyled:l,variant:c});return s.createElement(ue,rX({className:m(d.root,o),ref:t},u))});Oe.displayName="@mantine/core/Stack";const uI=f.createContext(null),aX=uI.Provider,iX=()=>f.useContext(uI);var lX=Object.defineProperty,ap=Object.getOwnPropertySymbols,dI=Object.prototype.hasOwnProperty,fI=Object.prototype.propertyIsEnumerable,YE=(e,t,r)=>t in e?lX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XE=(e,t)=>{for(var r in t||(t={}))dI.call(t,r)&&YE(e,r,t[r]);if(ap)for(var r of ap(t))fI.call(t,r)&&YE(e,r,t[r]);return e},sX=(e,t)=>{var r={};for(var n in e)dI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ap)for(var n of ap(e))t.indexOf(n)<0&&fI.call(e,n)&&(r[n]=e[n]);return r};const cX={size:"sm"},pI=f.forwardRef((e,t)=>{const r=H("SwitchGroup",cX,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c}=r,u=sX(r,["children","value","defaultValue","onChange","size","wrapperProps"]),[d,m]=wr({value:o,defaultValue:a,finalValue:[],onChange:i}),h=g=>{const y=g.currentTarget.value;m(d.includes(y)?d.filter(_=>_!==y):[...d,y])};return s.createElement(aX,{value:{value:d,onChange:h,size:l}},s.createElement(Lt.Wrapper,XE(XE({labelElement:"div",size:l,__staticSelector:"SwitchGroup",ref:t},c),u),n))});pI.displayName="@mantine/core/SwitchGroup";var uX=Object.defineProperty,dX=Object.defineProperties,fX=Object.getOwnPropertyDescriptors,JE=Object.getOwnPropertySymbols,pX=Object.prototype.hasOwnProperty,mX=Object.prototype.propertyIsEnumerable,ZE=(e,t,r)=>t in e?uX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hX=(e,t)=>{for(var r in t||(t={}))pX.call(t,r)&&ZE(e,r,t[r]);if(JE)for(var r of JE(t))mX.call(t,r)&&ZE(e,r,t[r]);return e},gX=(e,t)=>dX(e,fX(t));const vX={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)},yX={xs:S(32),sm:S(38),md:S(46),lg:S(56),xl:S(72)},wX={xs:S(12),sm:S(14),md:S(18),lg:S(22),xl:S(28)},_X={xs:S(5),sm:S(6),md:S(7),lg:S(9),xl:S(11)},bX={xs:S(4),sm:S(5),md:S(6),lg:S(8),xl:S(10)};var xX=W((e,{radius:t,color:r,labelPosition:n,error:o},{size:a})=>{const i=N({size:a,sizes:wX}),l=N({size:t,sizes:e.radius}),c=e.fn.variant({variant:"filled",color:r}),u=N({size:a,sizes:yX}),d=S(a==="xs"?1:2),m=e.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:gX(hX({},e.fn.focusStyles("input:focus + &")),{cursor:e.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:l,backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[2],border:`${S(1)} solid ${o?m:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,height:N({size:a,sizes:vX}),minWidth:u,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:e.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:N({size:a,sizes:_X}),fontWeight:600,order:n==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[6],transition:`color 150ms ${e.transitionTimingFunction}`,"input:checked + &":{backgroundColor:c.background,borderColor:c.background,color:e.white,transition:`color 150ms ${e.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:l,boxSizing:"border-box",display:"flex",backgroundColor:e.white,height:i,width:i,border:`${S(1)} solid ${e.colorScheme==="dark"?e.white:e.colors.gray[3]}`,left:d,transition:`left 150ms ${e.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:e.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${i} - ${d})`,borderColor:e.white},"input:disabled + * > &":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[2],backgroundColor:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${u} - ${i})`,paddingInline:N({size:a,sizes:bX}),margin:`0 0 0 calc(${i} + ${d})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{margin:`0 calc(${i} + ${d}) 0 0`}}}});const EX=xX;var SX=Object.defineProperty,PX=Object.defineProperties,$X=Object.getOwnPropertyDescriptors,ip=Object.getOwnPropertySymbols,mI=Object.prototype.hasOwnProperty,hI=Object.prototype.propertyIsEnumerable,eS=(e,t,r)=>t in e?SX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ih=(e,t)=>{for(var r in t||(t={}))mI.call(t,r)&&eS(e,r,t[r]);if(ip)for(var r of ip(t))hI.call(t,r)&&eS(e,r,t[r]);return e},OX=(e,t)=>PX(e,$X(t)),CX=(e,t)=>{var r={};for(var n in e)mI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ip)for(var n of ip(e))t.indexOf(n)<0&&hI.call(e,n)&&(r[n]=e[n]);return r};const kX={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},Yy=f.forwardRef((e,t)=>{var r;const n=H("Switch",kX,e),{className:o,color:a,label:i,offLabel:l,onLabel:c,id:u,style:d,size:m,radius:h,wrapperProps:g,children:y,unstyled:_,styles:E,classNames:w,thumbIcon:v,sx:b,checked:x,defaultChecked:P,onChange:O,labelPosition:$,description:C,error:R,disabled:j,variant:k}=n,T=CX(n,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),L=iX(),U=(L==null?void 0:L.size)||m,{classes:V,cx:M}=EX({color:a,radius:h,labelPosition:$,error:!!R},{name:"Switch",classNames:w,styles:E,unstyled:_,size:U,variant:k}),{systemStyles:Q,rest:A}=Bn(T),z=Fr(u),q=L?{checked:L.value.includes(A.value),onChange:L.onChange}:{},[le,ye]=wr({value:(r=q.checked)!=null?r:x,defaultValue:P,finalValue:!1});return s.createElement(vm,Ih(Ih({className:M(o,V.root),sx:b,style:d,id:z,size:(L==null?void 0:L.size)||m,labelPosition:$,label:i,description:C,error:R,disabled:j,__staticSelector:"Switch",classNames:w,styles:E,unstyled:_,"data-checked":q.checked||void 0,variant:k},Q),g),s.createElement("input",OX(Ih({},A),{disabled:j,checked:le,onChange:Re=>{L?q.onChange(Re):O==null||O(Re),ye(Re.currentTarget.checked)},id:z,ref:t,type:"checkbox",className:V.input})),s.createElement("label",{htmlFor:z,className:V.track},s.createElement("div",{className:V.thumb},v),s.createElement("div",{className:V.trackLabel},le?c:l)))});Yy.displayName="@mantine/core/Switch";Yy.Group=pI;var jX=Object.defineProperty,RX=Object.defineProperties,TX=Object.getOwnPropertyDescriptors,tS=Object.getOwnPropertySymbols,IX=Object.prototype.hasOwnProperty,DX=Object.prototype.propertyIsEnumerable,rS=(e,t,r)=>t in e?jX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NX=(e,t)=>{for(var r in t||(t={}))IX.call(t,r)&&rS(e,r,t[r]);if(tS)for(var r of tS(t))DX.call(t,r)&&rS(e,r,t[r]);return e},AX=(e,t)=>RX(e,TX(t)),MX=W((e,{captionSide:t,horizontalSpacing:r,verticalSpacing:n,fontSize:o,withBorder:a,withColumnBorders:i})=>{const l=`${S(1)} solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`;return{root:AX(NX({},e.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:t,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,border:a?l:void 0,"& > caption":{marginTop:t==="top"?0:e.spacing.xs,marginBottom:t==="bottom"?0:e.spacing.xs,fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]},"& > thead > tr > th, & > tfoot > tr > th, & > tbody > tr > th":{textAlign:"left",fontWeight:"bold",color:e.colorScheme==="dark"?e.colors.dark[0]:e.colors.gray[7],fontSize:N({size:o,sizes:e.fontSizes}),padding:`${N({size:n,sizes:e.spacing})} ${N({size:r,sizes:e.spacing})}`},"& > thead > tr > th":{borderBottom:l},"& > tfoot > tr > th, & > tbody > tr > th":{borderTop:l},"& > tbody > tr > td":{padding:`${N({size:n,sizes:e.spacing})} ${N({size:r,sizes:e.spacing})}`,borderTop:l,fontSize:N({size:o,sizes:e.fontSizes})},"& > tbody > tr:first-of-type > td, & > tbody > tr:first-of-type > th":{borderTop:"none"},"& > thead > tr > th, & > tbody > tr > td":{borderRight:i?l:"none","&:last-of-type":{borderRight:"none",borderLeft:i?l:"none"}},"& > tbody > tr > th":{borderRight:i?l:"none"},"&[data-striped] > tbody > tr:nth-of-type(odd)":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]},"&[data-hover] > tbody > tr":e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]})})}});const zX=MX;var LX=Object.defineProperty,FX=Object.defineProperties,VX=Object.getOwnPropertyDescriptors,lp=Object.getOwnPropertySymbols,gI=Object.prototype.hasOwnProperty,vI=Object.prototype.propertyIsEnumerable,nS=(e,t,r)=>t in e?LX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BX=(e,t)=>{for(var r in t||(t={}))gI.call(t,r)&&nS(e,r,t[r]);if(lp)for(var r of lp(t))vI.call(t,r)&&nS(e,r,t[r]);return e},UX=(e,t)=>FX(e,VX(t)),WX=(e,t)=>{var r={};for(var n in e)gI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lp)for(var n of lp(e))t.indexOf(n)<0&&vI.call(e,n)&&(r[n]=e[n]);return r};const HX={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},Xa=f.forwardRef((e,t)=>{const r=H("Table",HX,e),{className:n,children:o,striped:a,highlightOnHover:i,captionSide:l,horizontalSpacing:c,verticalSpacing:u,fontSize:d,unstyled:m,withBorder:h,withColumnBorders:g,variant:y}=r,_=WX(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:E,cx:w}=zX({captionSide:l,verticalSpacing:u,horizontalSpacing:c,fontSize:d,withBorder:h,withColumnBorders:g},{unstyled:m,name:"Table",variant:y});return s.createElement(ue,UX(BX({},_),{component:"table",ref:t,className:w(E.root,n),"data-striped":a||void 0,"data-hover":i||void 0}),o)});Xa.displayName="@mantine/core/Table";const Zg={context:"Tabs component was not found in the tree",value:"Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value"},[qX,Xy]=ho(Zg.context);var QX=Object.defineProperty,oS=Object.getOwnPropertySymbols,GX=Object.prototype.hasOwnProperty,KX=Object.prototype.propertyIsEnumerable,aS=(e,t,r)=>t in e?QX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YX=(e,t)=>{for(var r in t||(t={}))GX.call(t,r)&&aS(e,r,t[r]);if(oS)for(var r of oS(t))KX.call(t,r)&&aS(e,r,t[r]);return e};function XX({orientation:e,inverted:t,placement:r},n,o){const a=e==="vertical";return o==="default"?{[a?r==="left"?"borderRight":"borderLeft":t?"borderTop":"borderBottom"]:`${S(2)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:o==="outline"?{[a?r==="left"?"borderRight":"borderLeft":t?"borderTop":"borderBottom"]:`${S(1)} solid ${n.colorScheme==="dark"?n.colors.dark[4]:n.colors.gray[3]}`}:o==="pills"?{gap:`calc(${n.spacing.sm} / 2)`}:{}}var JX=W((e,t,{variant:r})=>{const n=t.orientation==="vertical";return{tabsList:YX({display:"flex",flexWrap:"wrap",flexDirection:n?"column":"row",justifyContent:$R[t.position],'& [role="tab"]':{flex:t.grow?1:void 0}},XX(t,e,r))}});const ZX=JX;var eJ=Object.defineProperty,tJ=Object.defineProperties,rJ=Object.getOwnPropertyDescriptors,sp=Object.getOwnPropertySymbols,yI=Object.prototype.hasOwnProperty,wI=Object.prototype.propertyIsEnumerable,iS=(e,t,r)=>t in e?eJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nJ=(e,t)=>{for(var r in t||(t={}))yI.call(t,r)&&iS(e,r,t[r]);if(sp)for(var r of sp(t))wI.call(t,r)&&iS(e,r,t[r]);return e},oJ=(e,t)=>tJ(e,rJ(t)),aJ=(e,t)=>{var r={};for(var n in e)yI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sp)for(var n of sp(e))t.indexOf(n)<0&&wI.call(e,n)&&(r[n]=e[n]);return r};const iJ={grow:!1,position:"left"},_I=f.forwardRef((e,t)=>{const r=H("TabsList",iJ,e),{children:n,className:o,grow:a,position:i}=r,l=aJ(r,["children","className","grow","position"]),{orientation:c,variant:u,color:d,radius:m,inverted:h,placement:g,classNames:y,styles:_,unstyled:E}=Xy(),{classes:w,cx:v}=ZX({orientation:c,grow:a,color:d,position:i,radius:m,inverted:h,placement:g},{name:"Tabs",unstyled:E,classNames:y,styles:_,variant:u});return s.createElement(ue,oJ(nJ({},l),{className:v(w.tabsList,o),ref:t,role:"tablist","aria-orientation":c}),n)});_I.displayName="@mantine/core/TabsList";var lJ=W((e,{orientation:t})=>({panel:{flex:t==="vertical"?1:void 0}}));const sJ=lJ;var cJ=Object.defineProperty,uJ=Object.defineProperties,dJ=Object.getOwnPropertyDescriptors,cp=Object.getOwnPropertySymbols,bI=Object.prototype.hasOwnProperty,xI=Object.prototype.propertyIsEnumerable,lS=(e,t,r)=>t in e?cJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fJ=(e,t)=>{for(var r in t||(t={}))bI.call(t,r)&&lS(e,r,t[r]);if(cp)for(var r of cp(t))xI.call(t,r)&&lS(e,r,t[r]);return e},pJ=(e,t)=>uJ(e,dJ(t)),mJ=(e,t)=>{var r={};for(var n in e)bI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cp)for(var n of cp(e))t.indexOf(n)<0&&xI.call(e,n)&&(r[n]=e[n]);return r};const hJ={},EI=f.forwardRef((e,t)=>{const r=H("TabsPanel",hJ,e),{value:n,children:o,sx:a,className:i}=r,l=mJ(r,["value","children","sx","className"]),c=Xy(),{classes:u,cx:d}=sJ({orientation:c.orientation,color:c.color,radius:c.radius,inverted:c.inverted,placement:c.placement},{name:"Tabs",unstyled:c.unstyled,classNames:c.classNames,styles:c.styles,variant:c.variant}),m=c.getPanelId(n),h=c.value===n,g=c.keepMounted||h?o:null;return f.useEffect(()=>(c.setMountedPanelIds(y=>[...y,m]),c.setMountedPanelIds(y=>y.filter(_=>_!==m))),[m]),s.createElement(ue,pJ(fJ({},l),{ref:t,sx:[{display:h?void 0:"none"},...Rp(a)],className:d(u.panel,i),role:"tabpanel",id:m,"aria-labelledby":c.getTabId(n)}),g)});EI.displayName="@mantine/core/TabsPanel";var gJ=Object.defineProperty,vJ=Object.defineProperties,yJ=Object.getOwnPropertyDescriptors,sS=Object.getOwnPropertySymbols,wJ=Object.prototype.hasOwnProperty,_J=Object.prototype.propertyIsEnumerable,cS=(e,t,r)=>t in e?gJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ri=(e,t)=>{for(var r in t||(t={}))wJ.call(t,r)&&cS(e,r,t[r]);if(sS)for(var r of sS(t))_J.call(t,r)&&cS(e,r,t[r]);return e},uS=(e,t)=>vJ(e,yJ(t));function bJ(e,{orientation:t,color:r,radius:n,inverted:o,placement:a},i){const l=t==="vertical",c=e.fn.variant({color:r,variant:"filled"}),u=S(e.fn.radius(n)),d=t==="vertical"?a==="left"?`${u} 0 0 ${u}`:` 0 ${u} ${u} 0`:o?`0 0 ${u} ${u}`:`${u} ${u} 0 0`;return i==="default"?uS(Ri({[l?a==="left"?"borderRight":"borderLeft":o?"borderTop":"borderBottom"]:`${S(2)} solid transparent`,[l?a==="left"?"marginRight":"marginLeft":o?"marginTop":"marginBottom"]:S(-2),borderRadius:d},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]})),{"&[data-active]":Ri({borderColor:c.background,color:e.colorScheme==="dark"?e.white:e.black},e.fn.hover({borderColor:c.background}))}):i==="outline"?{borderRadius:d,border:`${S(1)} solid transparent`,[l?a==="left"?"borderRight":"borderLeft":o?"borderTop":"borderBottom"]:"none","&[data-active]":{borderColor:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3],"&::before":{content:'""',backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,position:"absolute",bottom:l?0:o?"unset":S(-1),top:l?0:o?S(-1):"unset",[l?"width":"height"]:S(1),right:l?a==="left"?S(-1):"unset":0,left:l?a==="left"?"unset":S(-1):0}}}:i==="pills"?uS(Ri({borderRadius:e.fn.radius(n)},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})),{"&[data-active]":Ri({backgroundColor:c.background,color:e.white},e.fn.hover({backgroundColor:c.background}))}):{}}var xJ=W((e,t,{variant:r})=>({tabLabel:{},tab:Ri({position:"relative",padding:`${e.spacing.xs} ${e.spacing.md}`,paddingLeft:t.withIcon?e.spacing.xs:void 0,paddingRight:t.withRightSection?e.spacing.xs:void 0,fontSize:e.fontSizes.sm,whiteSpace:"nowrap",zIndex:0,display:"flex",alignItems:"center",justifyContent:t.orientation==="horizontal"?"center":void 0,lineHeight:1,"&:disabled":Ri({opacity:.5,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),"&:focus":{zIndex:1}},bJ(e,t,r)),tabRightSection:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginLeft:S(7)}},tabIcon:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginRight:S(7)}}}));const EJ=xJ;var SJ=Object.defineProperty,PJ=Object.defineProperties,$J=Object.getOwnPropertyDescriptors,up=Object.getOwnPropertySymbols,SI=Object.prototype.hasOwnProperty,PI=Object.prototype.propertyIsEnumerable,dS=(e,t,r)=>t in e?SJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,OJ=(e,t)=>{for(var r in t||(t={}))SI.call(t,r)&&dS(e,r,t[r]);if(up)for(var r of up(t))PI.call(t,r)&&dS(e,r,t[r]);return e},CJ=(e,t)=>PJ(e,$J(t)),kJ=(e,t)=>{var r={};for(var n in e)SI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&up)for(var n of up(e))t.indexOf(n)<0&&PI.call(e,n)&&(r[n]=e[n]);return r};const jJ={},$I=f.forwardRef((e,t)=>{const r=H("TabsTab",jJ,e),{value:n,children:o,onKeyDown:a,onClick:i,className:l,icon:c,rightSection:u,color:d}=r,m=kJ(r,["value","children","onKeyDown","onClick","className","icon","rightSection","color"]),h=Xy(),g=!!c,y=!!u,{theme:_,classes:E,cx:w}=EJ({withIcon:g||y&&!o,withRightSection:y||g&&!o,orientation:h.orientation,color:d||h.color,radius:h.radius,inverted:h.inverted,placement:h.placement},{name:"Tabs",unstyled:h.unstyled,classNames:h.classNames,styles:h.styles,variant:h.variant}),v=n===h.value,b=h.getPanelId(n),x=h.mountedPanelIds.includes(n)?b:void 0,P=O=>{h.onTabChange(h.allowTabDeactivation&&n===h.value?null:n),i==null||i(O)};return s.createElement(Jo,CJ(OJ({},m),{unstyled:h.unstyled,className:w(E.tab,l),"data-active":v||void 0,ref:t,type:"button",role:"tab",id:h.getTabId(n),"aria-selected":v,tabIndex:v||h.value===null?0:-1,"aria-controls":x,onClick:P,onKeyDown:y$({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:h.activateTabWithKeyboard,loop:h.loop,dir:_.dir,orientation:h.orientation,onKeyDown:a})}),c&&s.createElement("span",{className:E.tabIcon},c),o&&s.createElement("span",{className:E.tabLabel},o),u&&s.createElement("span",{className:E.tabRightSection},u))});$I.displayName="@mantine/core/Tab";function OI({defaultValue:e,value:t,onTabChange:r,orientation:n,children:o,loop:a,id:i,activateTabWithKeyboard:l,allowTabDeactivation:c,variant:u,color:d,radius:m,inverted:h,placement:g,keepMounted:y=!0,classNames:_,styles:E,unstyled:w}){const v=Fr(i),[b,x]=f.useState([]),[P,O]=wr({value:t,defaultValue:e,finalValue:null,onChange:r});return s.createElement(qX,{value:{placement:g,value:P,orientation:n,id:v,loop:a,activateTabWithKeyboard:l,getTabId:e1(`${v}-tab`,Zg.value),getPanelId:e1(`${v}-panel`,Zg.value),onTabChange:O,setMountedPanelIds:x,mountedPanelIds:b,allowTabDeactivation:c,variant:u,color:d,radius:m,inverted:h,keepMounted:y,classNames:_,styles:E,unstyled:w}},o)}OI.displayName="@mantine/core/TabsProvider";var RJ=W((e,{orientation:t,placement:r})=>({root:{display:t==="vertical"?"flex":void 0,flexDirection:r==="right"?"row-reverse":"row"}}));const TJ=RJ;var IJ=Object.defineProperty,DJ=Object.defineProperties,NJ=Object.getOwnPropertyDescriptors,dp=Object.getOwnPropertySymbols,CI=Object.prototype.hasOwnProperty,kI=Object.prototype.propertyIsEnumerable,fS=(e,t,r)=>t in e?IJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AJ=(e,t)=>{for(var r in t||(t={}))CI.call(t,r)&&fS(e,r,t[r]);if(dp)for(var r of dp(t))kI.call(t,r)&&fS(e,r,t[r]);return e},MJ=(e,t)=>DJ(e,NJ(t)),zJ=(e,t)=>{var r={};for(var n in e)CI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dp)for(var n of dp(e))t.indexOf(n)<0&&kI.call(e,n)&&(r[n]=e[n]);return r};const LJ={orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},ht=f.forwardRef((e,t)=>{const r=H("Tabs",LJ,e),{defaultValue:n,value:o,orientation:a,loop:i,activateTabWithKeyboard:l,allowTabDeactivation:c,children:u,id:d,onTabChange:m,variant:h,color:g,className:y,unstyled:_,classNames:E,styles:w,radius:v,inverted:b,keepMounted:x,placement:P}=r,O=zJ(r,["defaultValue","value","orientation","loop","activateTabWithKeyboard","allowTabDeactivation","children","id","onTabChange","variant","color","className","unstyled","classNames","styles","radius","inverted","keepMounted","placement"]),{classes:$,cx:C}=TJ({orientation:a,color:g,radius:v,inverted:b,placement:P},{unstyled:_,name:"Tabs",classNames:E,styles:w,variant:h});return s.createElement(OI,{activateTabWithKeyboard:l,defaultValue:n,orientation:a,onTabChange:m,value:o,id:d,loop:i,allowTabDeactivation:c,color:g,variant:h,radius:v,inverted:b,keepMounted:x,placement:P,classNames:E,styles:w,unstyled:_},s.createElement(ue,MJ(AJ({},O),{className:C($.root,y),id:d,ref:t}),u))});ht.List=_I;ht.Tab=$I;ht.Panel=EI;ht.displayName="@mantine/core/Tabs";var FJ=Object.defineProperty,VJ=Object.defineProperties,BJ=Object.getOwnPropertyDescriptors,pS=Object.getOwnPropertySymbols,UJ=Object.prototype.hasOwnProperty,WJ=Object.prototype.propertyIsEnumerable,mS=(e,t,r)=>t in e?FJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HJ=(e,t)=>{for(var r in t||(t={}))UJ.call(t,r)&&mS(e,r,t[r]);if(pS)for(var r of pS(t))WJ.call(t,r)&&mS(e,r,t[r]);return e},qJ=(e,t)=>VJ(e,BJ(t));function QJ(e,t,r){return typeof e<"u"?e in r.headings.sizes?r.headings.sizes[e].fontSize:S(e):r.headings.sizes[t].fontSize}function GJ(e,t,r){return typeof e<"u"&&e in r.headings.sizes?r.headings.sizes[e].lineHeight:r.headings.sizes[t].lineHeight}var KJ=W((e,{element:t,weight:r,inline:n},{size:o})=>({root:qJ(HJ({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:QJ(o,t,e),lineHeight:n?1:GJ(o,t,e),margin:0})}));const YJ=KJ;var XJ=Object.defineProperty,fp=Object.getOwnPropertySymbols,jI=Object.prototype.hasOwnProperty,RI=Object.prototype.propertyIsEnumerable,hS=(e,t,r)=>t in e?XJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,JJ=(e,t)=>{for(var r in t||(t={}))jI.call(t,r)&&hS(e,r,t[r]);if(fp)for(var r of fp(t))RI.call(t,r)&&hS(e,r,t[r]);return e},ZJ=(e,t)=>{var r={};for(var n in e)jI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fp)for(var n of fp(e))t.indexOf(n)<0&&RI.call(e,n)&&(r[n]=e[n]);return r};const eZ={order:1},ce=f.forwardRef((e,t)=>{const r=H("Title",eZ,e),{className:n,order:o,children:a,unstyled:i,size:l,weight:c,inline:u,variant:d}=r,m=ZJ(r,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:h,cx:g}=YJ({element:`h${o}`,weight:c,inline:u},{name:"Title",unstyled:i,variant:d,size:l});return[1,2,3,4,5,6].includes(o)?s.createElement(ae,JJ({variant:d,component:`h${o}`,ref:t,className:g(h.root,n)},m),a):null});ce.displayName="@mantine/core/Title";function ev(e,t){return ev=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ev(e,t)}function TI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ev(e,t)}var II={exports:{}},tZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",rZ=tZ,nZ=rZ;function DI(){}function NI(){}NI.resetWarningCache=DI;var oZ=function(){function e(n,o,a,i,l,c){if(c!==nZ){var u=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");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={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:NI,resetWarningCache:DI};return r.PropTypes=r,r};II.exports=oZ();var aZ=II.exports;const xe=Pv(aZ),gS={disabled:!1},pp=s.createContext(null);var Yl="unmounted",_a="exited",ba="entering",yi="entered",tv="exiting",_o=function(e){TI(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=o,l=i&&!i.isMounting?n.enter:n.appear,c;return a.appearStatus=null,n.in?l?(c=_a,a.appearStatus=ba):c=yi:n.unmountOnExit||n.mountOnEnter?c=Yl:c=_a,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var i=o.in;return i&&a.status===Yl?{status:_a}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var a=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==ba&&i!==yi&&(a=ba):(i===ba||i===yi)&&(a=tv)}this.updateStatus(!1,a)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,a,i,l;return a=i=l=o,o!=null&&typeof o!="number"&&(a=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:a,enter:i,appear:l}},r.updateStatus=function(o,a){o===void 0&&(o=!1),a!==null?(this.cancelNextCallback(),a===ba?this.performEnter(o):this.performExit()):this.props.unmountOnExit&&this.state.status===_a&&this.setState({status:Yl})},r.performEnter=function(o){var a=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[yh.findDOMNode(this),l],u=c[0],d=c[1],m=this.getTimeouts(),h=l?m.appear:m.enter;if(!o&&!i||gS.disabled){this.safeSetState({status:yi},function(){a.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:ba},function(){a.props.onEntering(u,d),a.onTransitionEnd(h,function(){a.safeSetState({status:yi},function(){a.props.onEntered(u,d)})})})},r.performExit=function(){var o=this,a=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:yh.findDOMNode(this);if(!a||gS.disabled){this.safeSetState({status:_a},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:tv},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:_a},function(){o.props.onExited(l)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,a){a=this.setNextCallback(a),this.setState(o,a)},r.setNextCallback=function(o){var a=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,a.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(o,a){this.setNextCallback(a);var i=this.props.nodeRef?this.props.nodeRef.current:yh.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Yl)return null;var a=this.props,i=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var l=qy(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return s.createElement(pp.Provider,{value:null},typeof i=="function"?i(o,l):s.cloneElement(s.Children.only(i),l))},t}(s.Component);_o.contextType=pp;_o.propTypes={};function mi(){}_o.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:mi,onEntering:mi,onEntered:mi,onExit:mi,onExiting:mi,onExited:mi};_o.UNMOUNTED=Yl;_o.EXITED=_a;_o.ENTERING=ba;_o.ENTERED=yi;_o.EXITING=tv;const iZ=_o;function lZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jy(e,t){var r=function(a){return t&&f.isValidElement(a)?t(a):a},n=Object.create(null);return e&&f.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function sZ(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var a in e)a in t?o.length&&(n[a]=o,o=[]):o.push(a);var i,l={};for(var c in t){if(n[c])for(i=0;i<n[c].length;i++){var u=n[c][i];l[n[c][i]]=r(u)}l[c]=r(c)}for(i=0;i<o.length;i++)l[o[i]]=r(o[i]);return l}function Oa(e,t,r){return r[t]!=null?r[t]:e.props[t]}function cZ(e,t){return Jy(e.children,function(r){return f.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Oa(r,"appear",e),enter:Oa(r,"enter",e),exit:Oa(r,"exit",e)})})}function uZ(e,t,r){var n=Jy(e.children),o=sZ(t,n);return Object.keys(o).forEach(function(a){var i=o[a];if(f.isValidElement(i)){var l=a in t,c=a in n,u=t[a],d=f.isValidElement(u)&&!u.props.in;c&&(!l||d)?o[a]=f.cloneElement(i,{onExited:r.bind(null,i),in:!0,exit:Oa(i,"exit",e),enter:Oa(i,"enter",e)}):!c&&l&&!d?o[a]=f.cloneElement(i,{in:!1}):c&&l&&f.isValidElement(u)&&(o[a]=f.cloneElement(i,{onExited:r.bind(null,i),in:u.props.in,exit:Oa(i,"exit",e),enter:Oa(i,"enter",e)}))}}),o}var dZ=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},fZ={component:"div",childFactory:function(t){return t}},Zy=function(e){TI(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=a.handleExited.bind(lZ(a));return a.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},a}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,a){var i=a.children,l=a.handleExited,c=a.firstRender;return{children:c?cZ(o,l):uZ(o,i,l),firstRender:!1}},r.handleExited=function(o,a){var i=Jy(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(a),this.mounted&&this.setState(function(l){var c=Ye({},l.children);return delete c[o.key],{children:c}}))},r.render=function(){var o=this.props,a=o.component,i=o.childFactory,l=qy(o,["component","childFactory"]),c=this.state.contextValue,u=dZ(this.state.children).map(i);return delete l.appear,delete l.enter,delete l.exit,a===null?s.createElement(pp.Provider,{value:c},u):s.createElement(pp.Provider,{value:c},s.createElement(a,l,u))},t}(s.Component);Zy.propTypes={};Zy.defaultProps=fZ;const pZ=Zy,[mZ,rc]=fN("mantine-notifications"),ie=rc("show"),hZ=rc("hide"),gZ=rc("clean"),vZ=rc("cleanQueue"),Du=rc("update"),Yo={show:ie,hide:hZ,clean:gZ,cleanQueue:vZ,update:Du};function yZ([e,t],r){const n={};return e==="top"&&(n.top=r),e==="bottom"&&(n.bottom=r),t==="left"&&(n.left=r),t==="right"&&(n.right=r),t==="center"&&(n.left="50%",n.transform="translateX(-50%)"),n}var wZ=Object.defineProperty,vS=Object.getOwnPropertySymbols,_Z=Object.prototype.hasOwnProperty,bZ=Object.prototype.propertyIsEnumerable,yS=(e,t,r)=>t in e?wZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wS=(e,t)=>{for(var r in t||(t={}))_Z.call(t,r)&&yS(e,r,t[r]);if(vS)for(var r of vS(t))bZ.call(t,r)&&yS(e,r,t[r]);return e};const _S={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},xZ={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function EZ({state:e,maxHeight:t,positioning:r,transitionDuration:n}){const[o,a]=r,i=a==="center"?`${o}-center`:a,l={opacity:0,maxHeight:t,transform:_S[i],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},c={opacity:1,transform:xZ[i]},u={opacity:0,maxHeight:0,transform:_S[i]},d={entering:c,entered:c,exiting:u,exited:u};return wS(wS({},l),d[e])}function SZ(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var PZ=Object.defineProperty,$Z=Object.defineProperties,OZ=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertySymbols,AI=Object.prototype.hasOwnProperty,MI=Object.prototype.propertyIsEnumerable,bS=(e,t,r)=>t in e?PZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xS=(e,t)=>{for(var r in t||(t={}))AI.call(t,r)&&bS(e,r,t[r]);if(mp)for(var r of mp(t))MI.call(t,r)&&bS(e,r,t[r]);return e},CZ=(e,t)=>$Z(e,OZ(t)),ES=(e,t)=>{var r={};for(var n in e)AI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&mp)for(var n of mp(e))t.indexOf(n)<0&&MI.call(e,n)&&(r[n]=e[n]);return r};function zI(e){var t=e,{notification:r,autoClose:n,onHide:o,innerRef:a}=t,i=ES(t,["notification","autoClose","onHide","innerRef"]);const l=r,{autoClose:c,message:u}=l,d=ES(l,["autoClose","message"]),m=SZ(n,c),h=f.useRef(),g=()=>{o(r.id),window.clearTimeout(h.current)},y=()=>{clearTimeout(h.current)},_=()=>{typeof m=="number"&&(h.current=window.setTimeout(g,m))};return f.useEffect(()=>{typeof r.onOpen=="function"&&r.onOpen(r)},[]),f.useEffect(()=>(_(),y),[n,r.autoClose]),s.createElement(RT,CZ(xS(xS({},d),i),{onClose:g,onMouseEnter:y,onMouseLeave:_,ref:a}),u)}zI.displayName="@mantine/notifications/NotificationContainer";var kZ=W((e,{zIndex:t})=>({notifications:{width:`calc(100% - ${e.spacing.md} * 2)`,boxSizing:"border-box",position:"fixed",zIndex:t},notification:{"&:not(:first-of-type)":{marginTop:e.spacing.sm}}}));const jZ=kZ;var RZ=Object.defineProperty,TZ=Object.defineProperties,IZ=Object.getOwnPropertyDescriptors,SS=Object.getOwnPropertySymbols,DZ=Object.prototype.hasOwnProperty,NZ=Object.prototype.propertyIsEnumerable,PS=(e,t,r)=>t in e?RZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AZ=(e,t)=>{for(var r in t||(t={}))DZ.call(t,r)&&PS(e,r,t[r]);if(SS)for(var r of SS(t))NZ.call(t,r)&&PS(e,r,t[r]);return e},MZ=(e,t)=>TZ(e,IZ(t));function zZ({limit:e}){const{state:t,queue:r,update:n,cleanQueue:o}=qA({initialValues:[],limit:e});return{notifications:t,queue:r,showNotification:u=>{const d=u.id||qp();return n(m=>u.id&&m.some(h=>h.id===u.id)?m:[...m,MZ(AZ({},u),{id:d})]),d},updateNotification:u=>n(d=>{const m=d.findIndex(g=>g.id===u.id);if(m===-1)return d;const h=[...d];return h[m]=u,h}),hideNotification:u=>n(d=>d.filter(m=>m.id===u?(typeof m.onClose=="function"&&m.onClose(m),!1):!0)),cleanQueue:o,clean:()=>n(()=>[])}}var LZ=Object.defineProperty,hp=Object.getOwnPropertySymbols,LI=Object.prototype.hasOwnProperty,FI=Object.prototype.propertyIsEnumerable,$S=(e,t,r)=>t in e?LZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dh=(e,t)=>{for(var r in t||(t={}))LI.call(t,r)&&$S(e,r,t[r]);if(hp)for(var r of hp(t))FI.call(t,r)&&$S(e,r,t[r]);return e},FZ=(e,t)=>{var r={};for(var n in e)LI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&hp)for(var n of hp(e))t.indexOf(n)<0&&FI.call(e,n)&&(r[n]=e[n]);return r};const VZ=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],Ja=e=>{var t=e,{className:r,position:n="bottom-right",autoClose:o=4e3,transitionDuration:a=250,containerWidth:i=S(440),notificationMaxHeight:l=S(200),limit:c=5,zIndex:u=go("overlay"),style:d,children:m,target:h}=t,g=FZ(t,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const y=VA(),_=f.useRef({}),E=f.useRef(0),{notifications:w,showNotification:v,updateNotification:b,hideNotification:x,clean:P,cleanQueue:O}=zZ({limit:c}),{classes:$,cx:C,theme:R}=jZ({zIndex:u}),j=Gp(),T=(R.respectReducedMotion?j:!1)?1:a,L=(VZ.includes(n)?n:"bottom-right").split("-");mn(()=>{w.length>E.current&&setTimeout(()=>y(),0),E.current=w.length},[w]),mZ({show:v,hide:x,update:b,clean:P,cleanQueue:O});const U=w.map(V=>s.createElement(iZ,{key:V.id,timeout:T,onEnter:()=>_.current[V.id].offsetHeight,nodeRef:{current:_.current[V.id]}},M=>s.createElement(zI,{innerRef:Q=>{_.current[V.id]=Q},notification:V,onHide:x,className:$.notification,autoClose:o,sx:[Dh({},EZ({state:M,positioning:L,transitionDuration:T,maxHeight:l})),...Array.isArray(V.sx)?V.sx:[V.sx]]})));return s.createElement(jy,{target:h},s.createElement(ue,Dh({className:C($.notifications,r),style:d,sx:Dh({maxWidth:i},yZ(L,R.spacing.md))},g),s.createElement(pZ,null,U)))};Ja.displayName="@mantine/notifications/Notifications";Ja.show=Yo.show;Ja.hide=Yo.hide;Ja.update=Yo.update;Ja.clean=Yo.clean;Ja.cleanQueue=Yo.cleanQueue;var BZ="ok",UZ="created",WZ="gone",HZ="not-modified",qZ="not-found",QZ="forbidden",GZ="accepted",KZ={resourceType:"OperationOutcome",id:qZ,issue:[{severity:"error",code:"not-found",details:{text:"Not found"}}]},YZ={resourceType:"OperationOutcome",id:QZ,issue:[{severity:"error",code:"forbidden",details:{text:"Forbidden"}}]};function Ia(e,t){return{resourceType:"OperationOutcome",issue:[{severity:"error",code:"invalid",details:{text:e},expression:t?[t]:void 0}]}}function xm(e){return typeof e=="object"&&e!==null&&e.resourceType==="OperationOutcome"}function VI(e){return e.id===BZ||e.id===UZ||e.id===HZ||e.id===GZ}function XZ(e){return e.id===WZ}var Tn=class extends Error{constructor(t,r){super(BI(t)),this.outcome=t,this.cause=r}};function yt(e){return e instanceof Tn?e.outcome:xm(e)?e:Ia($e(e))}function $e(e){return e?typeof e=="string"?e:e instanceof Error?e.message:xm(e)?BI(e):typeof e=="object"&&"code"in e&&typeof e.code=="string"?e.code:JSON.stringify(e):"Unknown error"}function BI(e){var r;let t=((r=e.issue)==null?void 0:r.map(JZ))??[];return t.length>0?t.join("; "):"Unknown error"}function JZ(e){var r,n;let t=((r=e.details)==null?void 0:r.text)??e.diagnostics??"Unknown error";return(n=e.expression)!=null&&n.length&&(t+=` (${e.expression.join(", ")})`),t}var ZZ={types:{Element:{display:"Element",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]}}},BackboneElement:{display:"BackboneElement",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]}}},Address:{display:"Address",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},use:{type:[{code:"code"}]},type:{type:[{code:"code"}]},text:{type:[{code:"string"}]},line:{max:"*",type:[{code:"string"}]},city:{type:[{code:"string"}]},district:{type:[{code:"string"}]},state:{type:[{code:"string"}]},postalCode:{type:[{code:"string"}]},country:{type:[{code:"string"}]},period:{type:[{code:"Period"}]}}},Age:{display:"Age",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},Annotation:{display:"Annotation",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},"author[x]":{type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Organization"]},{code:"string"}]},time:{type:[{code:"dateTime"}]},text:{min:1,type:[{code:"markdown"}]}}},Attachment:{display:"Attachment",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},contentType:{type:[{code:"code"}]},language:{type:[{code:"code"}]},data:{type:[{code:"base64Binary"}]},url:{type:[{code:"url"}]},size:{type:[{code:"unsignedInt"}]},hash:{type:[{code:"base64Binary"}]},title:{type:[{code:"string"}]},creation:{type:[{code:"dateTime"}]}}},CodeableConcept:{display:"CodeableConcept",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},coding:{max:"*",type:[{code:"Coding"}]},text:{type:[{code:"string"}]}}},Coding:{display:"Coding",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},system:{type:[{code:"uri"}]},version:{type:[{code:"string"}]},code:{type:[{code:"code"}]},display:{type:[{code:"string"}]},userSelected:{type:[{code:"boolean"}]}}},ContactDetail:{display:"ContactDetail",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},name:{type:[{code:"string"}]},telecom:{max:"*",type:[{code:"ContactPoint"}]}}},ContactPoint:{display:"ContactPoint",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},system:{type:[{code:"code"}]},value:{type:[{code:"string"}]},use:{type:[{code:"code"}]},rank:{type:[{code:"positiveInt"}]},period:{type:[{code:"Period"}]}}},Contributor:{display:"Contributor",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},name:{min:1,type:[{code:"string"}]},contact:{max:"*",type:[{code:"ContactDetail"}]}}},Count:{display:"Count",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},DataRequirement:{display:"DataRequirement",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},profile:{max:"*",type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}]},"subject[x]":{type:[{code:"CodeableConcept"},{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Group"]}]},mustSupport:{max:"*",type:[{code:"string"}]},codeFilter:{max:"*",type:[{code:"Element"}]},dateFilter:{max:"*",type:[{code:"Element"}]},limit:{type:[{code:"positiveInt"}]},sort:{max:"*",type:[{code:"Element"}]}}},DataRequirementCodeFilter:{display:"DataRequirementCodeFilter",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},path:{type:[{code:"string"}]},searchParam:{type:[{code:"string"}]},valueSet:{type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/ValueSet"]}]},code:{max:"*",type:[{code:"Coding"}]}}},DataRequirementDateFilter:{display:"DataRequirementDateFilter",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},path:{type:[{code:"string"}]},searchParam:{type:[{code:"string"}]},"value[x]":{type:[{code:"dateTime"},{code:"Period"},{code:"Duration"}]}}},DataRequirementSort:{display:"DataRequirementSort",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},path:{min:1,type:[{code:"string"}]},direction:{min:1,type:[{code:"code"}]}}},Distance:{display:"Distance",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},Dosage:{display:"Dosage",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},sequence:{type:[{code:"integer"}]},text:{type:[{code:"string"}]},additionalInstruction:{max:"*",type:[{code:"CodeableConcept"}]},patientInstruction:{type:[{code:"string"}]},timing:{type:[{code:"Timing"}]},"asNeeded[x]":{type:[{code:"boolean"},{code:"CodeableConcept"}]},site:{type:[{code:"CodeableConcept"}]},route:{type:[{code:"CodeableConcept"}]},method:{type:[{code:"CodeableConcept"}]},doseAndRate:{max:"*",type:[{code:"Element"}]},maxDosePerPeriod:{type:[{code:"Ratio"}]},maxDosePerAdministration:{type:[{code:"Quantity",profile:["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]}]},maxDosePerLifetime:{type:[{code:"Quantity",profile:["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]}]}}},DosageDoseAndRate:{display:"DosageDoseAndRate",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},type:{type:[{code:"CodeableConcept"}]},"dose[x]":{type:[{code:"Range"},{code:"Quantity",profile:["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]}]},"rate[x]":{type:[{code:"Ratio"},{code:"Range"},{code:"Quantity",profile:["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]}]}}},Duration:{display:"Duration",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},ElementDefinition:{display:"ElementDefinition",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},path:{min:1,type:[{code:"string"}]},representation:{max:"*",type:[{code:"code"}]},sliceName:{type:[{code:"string"}]},sliceIsConstraining:{type:[{code:"boolean"}]},label:{type:[{code:"string"}]},code:{max:"*",type:[{code:"Coding"}]},slicing:{type:[{code:"Element"}]},short:{type:[{code:"string"}]},definition:{type:[{code:"markdown"}]},comment:{type:[{code:"markdown"}]},requirements:{type:[{code:"markdown"}]},alias:{max:"*",type:[{code:"string"}]},min:{type:[{code:"unsignedInt"}]},max:{type:[{code:"string"}]},base:{type:[{code:"Element"}]},contentReference:{type:[{code:"uri"}]},type:{max:"*",type:[{code:"Element"}]},"defaultValue[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]},meaningWhenMissing:{type:[{code:"markdown"}]},orderMeaning:{type:[{code:"string"}]},"fixed[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]},"pattern[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]},example:{max:"*",type:[{code:"Element"}]},"minValue[x]":{type:[{code:"date"},{code:"dateTime"},{code:"instant"},{code:"time"},{code:"decimal"},{code:"integer"},{code:"positiveInt"},{code:"unsignedInt"},{code:"Quantity"}]},"maxValue[x]":{type:[{code:"date"},{code:"dateTime"},{code:"instant"},{code:"time"},{code:"decimal"},{code:"integer"},{code:"positiveInt"},{code:"unsignedInt"},{code:"Quantity"}]},maxLength:{type:[{code:"integer"}]},condition:{max:"*",type:[{code:"id"}]},constraint:{max:"*",type:[{code:"Element"}]},mustSupport:{type:[{code:"boolean"}]},isModifier:{type:[{code:"boolean"}]},isModifierReason:{type:[{code:"string"}]},isSummary:{type:[{code:"boolean"}]},binding:{type:[{code:"Element"}]},mapping:{max:"*",type:[{code:"Element"}]}}},ElementDefinitionSlicing:{display:"ElementDefinitionSlicing",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},discriminator:{max:"*",type:[{code:"Element"}]},description:{type:[{code:"string"}]},ordered:{type:[{code:"boolean"}]},rules:{min:1,type:[{code:"code"}]}}},ElementDefinitionSlicingDiscriminator:{display:"ElementDefinitionSlicingDiscriminator",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},path:{min:1,type:[{code:"string"}]}}},ElementDefinitionBase:{display:"ElementDefinitionBase",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},path:{min:1,type:[{code:"string"}]},min:{min:1,type:[{code:"unsignedInt"}]},max:{min:1,type:[{code:"string"}]}}},ElementDefinitionType:{display:"ElementDefinitionType",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},code:{min:1,type:[{code:"uri"}]},profile:{max:"*",type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition","http://hl7.org/fhir/StructureDefinition/ImplementationGuide"]}]},targetProfile:{max:"*",type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition","http://hl7.org/fhir/StructureDefinition/ImplementationGuide"]}]},aggregation:{max:"*",type:[{code:"code"}]},versioning:{type:[{code:"code"}]}}},ElementDefinitionExample:{display:"ElementDefinitionExample",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},label:{min:1,type:[{code:"string"}]},"value[x]":{min:1,type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]}}},ElementDefinitionConstraint:{display:"ElementDefinitionConstraint",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},key:{min:1,type:[{code:"id"}]},requirements:{type:[{code:"string"}]},severity:{min:1,type:[{code:"code"}]},human:{min:1,type:[{code:"string"}]},expression:{type:[{code:"string"}]},xpath:{type:[{code:"string"}]},source:{type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}]}}},ElementDefinitionBinding:{display:"ElementDefinitionBinding",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},strength:{min:1,type:[{code:"code"}]},description:{type:[{code:"string"}]},valueSet:{type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/ValueSet"]}]}}},ElementDefinitionMapping:{display:"ElementDefinitionMapping",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},identity:{min:1,type:[{code:"id"}]},language:{type:[{code:"code"}]},map:{min:1,type:[{code:"string"}]},comment:{type:[{code:"string"}]}}},Expression:{display:"Expression",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},description:{type:[{code:"string"}]},name:{type:[{code:"id"}]},language:{min:1,type:[{code:"code"}]},expression:{type:[{code:"string"}]},reference:{type:[{code:"uri"}]}}},Extension:{display:"Extension",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},url:{min:1,type:[{code:"string"}]},"value[x]":{type:[{code:"base64Binary"},{code:"boolean"},{code:"canonical"},{code:"code"},{code:"date"},{code:"dateTime"},{code:"decimal"},{code:"id"},{code:"instant"},{code:"integer"},{code:"markdown"},{code:"oid"},{code:"positiveInt"},{code:"string"},{code:"time"},{code:"unsignedInt"},{code:"uri"},{code:"url"},{code:"uuid"},{code:"Address"},{code:"Age"},{code:"Annotation"},{code:"Attachment"},{code:"CodeableConcept"},{code:"Coding"},{code:"ContactPoint"},{code:"Count"},{code:"Distance"},{code:"Duration"},{code:"HumanName"},{code:"Identifier"},{code:"Money"},{code:"Period"},{code:"Quantity"},{code:"Range"},{code:"Ratio"},{code:"Reference"},{code:"SampledData"},{code:"Signature"},{code:"Timing"},{code:"ContactDetail"},{code:"Contributor"},{code:"DataRequirement"},{code:"Expression"},{code:"ParameterDefinition"},{code:"RelatedArtifact"},{code:"TriggerDefinition"},{code:"UsageContext"},{code:"Dosage"},{code:"Meta"}]}}},HumanName:{display:"HumanName",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},use:{type:[{code:"code"}]},text:{type:[{code:"string"}]},family:{type:[{code:"string"}]},given:{max:"*",type:[{code:"string"}]},prefix:{max:"*",type:[{code:"string"}]},suffix:{max:"*",type:[{code:"string"}]},period:{type:[{code:"Period"}]}}},Identifier:{display:"Identifier",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},use:{type:[{code:"code"}]},type:{type:[{code:"CodeableConcept"}]},system:{type:[{code:"uri"}]},value:{type:[{code:"string"}]},period:{type:[{code:"Period"}]},assigner:{type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Organization"]}]}}},MarketingStatus:{display:"MarketingStatus",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},country:{min:1,type:[{code:"CodeableConcept"}]},jurisdiction:{type:[{code:"CodeableConcept"}]},status:{min:1,type:[{code:"CodeableConcept"}]},dateRange:{min:1,type:[{code:"Period"}]},restoreDate:{type:[{code:"dateTime"}]}}},Meta:{display:"Meta",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},versionId:{type:[{code:"id"}]},lastUpdated:{type:[{code:"instant"}]},source:{type:[{code:"uri"}]},profile:{max:"*",type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}]},security:{max:"*",type:[{code:"Coding"}]},tag:{max:"*",type:[{code:"Coding"}]},project:{type:[{code:"uri"}]},author:{type:[{code:"Reference"}]},account:{type:[{code:"Reference"}]},compartment:{max:"*",type:[{code:"Reference"}]}}},Money:{display:"Money",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},currency:{type:[{code:"code"}]}}},Narrative:{display:"Narrative",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},status:{min:1,type:[{code:"code"}]},div:{min:1,type:[{code:"xhtml"}]}}},ParameterDefinition:{display:"ParameterDefinition",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},name:{type:[{code:"code"}]},use:{min:1,type:[{code:"code"}]},min:{type:[{code:"integer"}]},max:{type:[{code:"string"}]},documentation:{type:[{code:"string"}]},type:{min:1,type:[{code:"code"}]},profile:{type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/StructureDefinition"]}]}}},Period:{display:"Period",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},start:{type:[{code:"dateTime"}]},end:{type:[{code:"dateTime"}]}}},Population:{display:"Population",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},"age[x]":{type:[{code:"Range"},{code:"CodeableConcept"}]},gender:{type:[{code:"CodeableConcept"}]},race:{type:[{code:"CodeableConcept"}]},physiologicalCondition:{type:[{code:"CodeableConcept"}]}}},ProdCharacteristic:{display:"ProdCharacteristic",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},height:{type:[{code:"Quantity"}]},width:{type:[{code:"Quantity"}]},depth:{type:[{code:"Quantity"}]},weight:{type:[{code:"Quantity"}]},nominalVolume:{type:[{code:"Quantity"}]},externalDiameter:{type:[{code:"Quantity"}]},shape:{type:[{code:"string"}]},color:{max:"*",type:[{code:"string"}]},imprint:{max:"*",type:[{code:"string"}]},image:{max:"*",type:[{code:"Attachment"}]},scoring:{type:[{code:"CodeableConcept"}]}}},ProductShelfLife:{display:"ProductShelfLife",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},identifier:{type:[{code:"Identifier"}]},type:{min:1,type:[{code:"CodeableConcept"}]},period:{min:1,type:[{code:"Quantity"}]},specialPrecautionsForStorage:{max:"*",type:[{code:"CodeableConcept"}]}}},Quantity:{display:"Quantity",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},value:{type:[{code:"decimal"}]},comparator:{max:"0",type:[{code:"code"}]},unit:{type:[{code:"string"}]},system:{type:[{code:"uri"}]},code:{type:[{code:"code"}]}}},Range:{display:"Range",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},low:{type:[{code:"Quantity",profile:["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]}]},high:{type:[{code:"Quantity",profile:["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]}]}}},Ratio:{display:"Ratio",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},numerator:{type:[{code:"Quantity"}]},denominator:{type:[{code:"Quantity"}]}}},Reference:{display:"Reference",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},reference:{type:[{code:"string"}]},type:{type:[{code:"uri"}]},identifier:{type:[{code:"Identifier"}]},display:{type:[{code:"string"}]}}},RelatedArtifact:{display:"RelatedArtifact",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},label:{type:[{code:"string"}]},display:{type:[{code:"string"}]},citation:{type:[{code:"markdown"}]},url:{type:[{code:"url"}]},document:{type:[{code:"Attachment"}]},resource:{type:[{code:"canonical",targetProfile:["http://hl7.org/fhir/StructureDefinition/Resource"]}]}}},SampledData:{display:"SampledData",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},origin:{min:1,type:[{code:"Quantity",profile:["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"]}]},period:{min:1,type:[{code:"decimal"}]},factor:{type:[{code:"decimal"}]},lowerLimit:{type:[{code:"decimal"}]},upperLimit:{type:[{code:"decimal"}]},dimensions:{min:1,type:[{code:"positiveInt"}]},data:{type:[{code:"string"}]}}},Signature:{display:"Signature",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},type:{min:1,max:"*",type:[{code:"Coding"}]},when:{min:1,type:[{code:"instant"}]},who:{min:1,type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}]},onBehalfOf:{type:[{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Practitioner","http://hl7.org/fhir/StructureDefinition/PractitionerRole","http://hl7.org/fhir/StructureDefinition/RelatedPerson","http://hl7.org/fhir/StructureDefinition/Patient","http://hl7.org/fhir/StructureDefinition/Device","http://hl7.org/fhir/StructureDefinition/Organization"]}]},targetFormat:{type:[{code:"code"}]},sigFormat:{type:[{code:"code"}]},data:{type:[{code:"base64Binary"}]}}},SubstanceAmount:{display:"SubstanceAmount",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},"amount[x]":{type:[{code:"Quantity"},{code:"Range"},{code:"string"}]},amountType:{type:[{code:"CodeableConcept"}]},amountText:{type:[{code:"string"}]},referenceRange:{type:[{code:"Element"}]}}},SubstanceAmountReferenceRange:{display:"SubstanceAmountReferenceRange",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},lowLimit:{type:[{code:"Quantity"}]},highLimit:{type:[{code:"Quantity"}]}}},Timing:{display:"Timing",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},event:{max:"*",type:[{code:"dateTime"}]},repeat:{type:[{code:"Element"}]},code:{type:[{code:"CodeableConcept"}]}}},TimingRepeat:{display:"TimingRepeat",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},"bounds[x]":{type:[{code:"Duration"},{code:"Range"},{code:"Period"}]},count:{type:[{code:"positiveInt"}]},countMax:{type:[{code:"positiveInt"}]},duration:{type:[{code:"decimal"}]},durationMax:{type:[{code:"decimal"}]},durationUnit:{type:[{code:"code"}]},frequency:{type:[{code:"positiveInt"}]},frequencyMax:{type:[{code:"positiveInt"}]},period:{type:[{code:"decimal"}]},periodMax:{type:[{code:"decimal"}]},periodUnit:{type:[{code:"code"}]},dayOfWeek:{max:"*",type:[{code:"code"}]},timeOfDay:{max:"*",type:[{code:"time"}]},when:{max:"*",type:[{code:"code"}]},offset:{type:[{code:"unsignedInt"}]}}},TriggerDefinition:{display:"TriggerDefinition",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},type:{min:1,type:[{code:"code"}]},name:{type:[{code:"string"}]},"timing[x]":{type:[{code:"Timing"},{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/Schedule"]},{code:"date"},{code:"dateTime"}]},data:{max:"*",type:[{code:"DataRequirement"}]},condition:{type:[{code:"Expression"}]}}},UsageContext:{display:"UsageContext",properties:{id:{type:[{code:"string"}]},extension:{max:"*",type:[{code:"Extension"}]},code:{min:1,type:[{code:"Coding"}]},"value[x]":{min:1,type:[{code:"CodeableConcept"},{code:"Quantity"},{code:"Range"},{code:"Reference",targetProfile:["http://hl7.org/fhir/StructureDefinition/PlanDefinition","http://hl7.org/fhir/StructureDefinition/ResearchStudy","http://hl7.org/fhir/StructureDefinition/InsurancePlan","http://hl7.org/fhir/StructureDefinition/HealthcareService","http://hl7.org/fhir/StructureDefinition/Group","http://hl7.org/fhir/StructureDefinition/Location","http://hl7.org/fhir/StructureDefinition/Organization"]}]}}},MetadataResource:{display:"MetadataResource",properties:{id:{type:[{code:"string"}]},meta:{type:[{code:"Meta"}]},implicitRules:{type:[{code:"uri"}]},language:{type:[{code:"code"}]},text:{type:[{code:"Narrative"}]},contained:{max:"*",type:[{code:"Resource"}]},extension:{max:"*",type:[{code:"Extension"}]},modifierExtension:{max:"*",type:[{code:"Extension"}]},url:{type:[{code:"uri"}]},version:{type:[{code:"string"}]},name:{type:[{code:"string"}]},title:{type:[{code:"string"}]},status:{min:1,type:[{code:"code"}]},experimental:{type:[{code:"boolean"}]},date:{type:[{code:"dateTime"}]},publisher:{type:[{code:"string"}]},contact:{max:"*",type:[{code:"ContactDetail"}]},description:{type:[{code:"markdown"}]},useContext:{max:"*",type:[{code:"UsageContext"}]},jurisdiction:{max:"*",type:[{code:"CodeableConcept"}]}}},IdentityProvider:{display:"IdentityProvider",properties:{authorizeUrl:{min:1,type:[{code:"string"}]},tokenUrl:{min:1,type:[{code:"string"}]},userInfoUrl:{min:1,type:[{code:"string"}]},clientId:{min:1,type:[{code:"string"}]},clientSecret:{min:1,type:[{code:"string"}]},useSubject:{type:[{code:"boolean"}]}}}}};function eee(e,t){let r=[];if(e.line&&r.push(...e.line),e.city||e.state||e.postalCode){let n=[];e.city&&n.push(e.city),e.state&&n.push(e.state),e.postalCode&&n.push(e.postalCode),r.push(n.join(", "))}return e.use&&(t!=null&&t.all||t!=null&&t.use)&&r.push("["+e.use+"]"),r.join((t==null?void 0:t.lineSeparator)??", ").trim()}function nc(e,t){let r=[];return e.prefix&&(t==null?void 0:t.prefix)!==!1&&r.push(...e.prefix),e.given&&r.push(...e.given),e.family&&r.push(e.family),e.suffix&&(t==null?void 0:t.suffix)!==!1&&r.push(...e.suffix),e.use&&(t!=null&&t.all||t!=null&&t.use)&&r.push("["+e.use+"]"),r.join(" ").trim()}function Em(e){return e instanceof Date&&!isNaN(e.getTime())}function tee(e,t,r){if(!e)return"";let n=new Date("2000-01-01T"+e+"Z");return Em(n)?n.toLocaleTimeString(t,r):""}function _r(e,t,r){if(!e)return"";let n=new Date(e);return Em(n)?n.toLocaleString(t,r):""}function ree(e,t,r){return!e||!e.start&&!e.end?"":_r(e.start,t,r)+" - "+_r(e.end,t,r)}var nee={s:"every second",min:"every minute",h:"hourly",d:"daily",wk:"weekly",mo:"monthly",a:"annually"},oee={s:"second",min:"minute",h:"hour",d:"day",wk:"week",mo:"month",a:"year"},aee={s:"seconds",min:"minutes",h:"hours",d:"days",wk:"weeks",mo:"months",a:"years"};function UI(e){var r;if(!e)return"";let t=[];if((r=e.repeat)!=null&&r.periodUnit){let n=e.repeat.frequency??1,o=e.repeat.period??1,a=e.repeat.periodUnit;n===1&&o===1?t.push(nee[a]):(n===1?t.push("once"):t.push(n+" times"),o===1?t.push("per "+oee[a]):t.push("per "+o+" "+aee[a])),e.repeat.dayOfWeek&&t.push("on "+e.repeat.dayOfWeek.map(xr).join(", ")),e.repeat.timeOfDay&&t.push("at "+e.repeat.timeOfDay.map(i=>tee(i)).join(", "))}return e.event&&t.push(e.event.map(n=>_r(n)).join(", ")),xr(t.join(" ").trim())}function Ds(e,t,r=!1){if(r&&t===void 0)throw new Error("Precision must be specified for exclusive ranges");let n=(e==null?void 0:e.low)&&{...e.low,comparator:void 0},o=(e==null?void 0:e.high)&&{...e.high,comparator:void 0};return(n==null?void 0:n.value)===void 0&&(o==null?void 0:o.value)===void 0?"":(n==null?void 0:n.value)!==void 0&&(o==null?void 0:o.value)===void 0?r&&t!==void 0?(n.value=see(n.value,t),`> ${No(n,t)}`):`>= ${No(n,t)}`:(n==null?void 0:n.value)===void 0&&(o==null?void 0:o.value)!==void 0?r&&t!==void 0?(o.value=lee(o.value,t),`< ${No(o,t)}`):`<= ${No(o,t)}`:((n==null?void 0:n.unit)===(o==null?void 0:o.unit)&&(n==null||delete n.unit),`${No(n,t)} - ${No(o,t)}`)}function No(e,t){if(!e)return"";let r=[];return e.comparator&&(r.push(e.comparator),r.push(" ")),e.value!==void 0&&(t!==void 0?r.push(e.value.toFixed(t)):r.push(e.value)),e.unit&&(e.unit!=="%"&&r[r.length-1]!==" "&&r.push(" "),r.push(e.unit)),r.join("").trim()}function iee(e){return(e==null?void 0:e.value)===void 0?"":e.value.toLocaleString(void 0,{style:"currency",currency:e.currency??"USD",currencyDisplay:"narrowSymbol"})}function WI(e){return e?e.text?e.text:e.coding?e.coding.map(t=>HI(t)).join(", "):"":""}function HI(e){return(e==null?void 0:e.display)??(e==null?void 0:e.code)??""}function qI(e){return e?"component"in e?e.component.map(t=>qI(t)).join(" / "):e.valueQuantity?No(e.valueQuantity):e.valueCodeableConcept?WI(e.valueCodeableConcept):e.valueString?e.valueString:"":""}function lee(e,t,r=1){return(QI(e,t)+r)*Math.pow(10,-t)}function see(e,t,r=1){return(QI(e,t)-r)*Math.pow(10,-t)}function QI(e,t){return t===void 0?e:Math.round(e*Math.pow(10,t))}function at(e){let t=ot(e),r=fo(e);return r===t?{reference:t}:{reference:t,display:r}}function ot(e){return e.resourceType+"/"+e.id}function GI(e){var t;return(t=e==null?void 0:e.reference)==null?void 0:t.split("/")[1]}function cee(e){return e.resourceType==="Patient"||e.resourceType==="Practitioner"||e.resourceType==="RelatedPerson"}function fo(e){var t;if(cee(e)){let r=uee(e);if(r)return r}if(e.resourceType==="Device"){let r=dee(e);if(r)return r}return e.resourceType==="Observation"&&"code"in e&&((t=e.code)!=null&&t.text)?e.code.text:e.resourceType==="User"&&e.email?e.email:"name"in e&&e.name&&typeof e.name=="string"?e.name:ot(e)}function uee(e){let t=e.name;if(t&&t.length>0)return nc(t[0])}function dee(e){let t=e.deviceName;if(t&&t.length>0)return t[0].name}function fee(e){if(!("photo"in e))return;let t=e.photo;if(t)if(Array.isArray(t))for(let r of t){let n=OS(r);if(n)return n}else return OS(t)}function OS(e){if(e.url&&e.contentType&&e.contentType.startsWith("image/"))return e.url}function KI(e,t){let r=new Date(e);r.setUTCHours(0,0,0,0);let n=t?new Date(t):new Date;n.setUTCHours(0,0,0,0);let o=r.getUTCFullYear(),a=r.getUTCMonth(),i=r.getUTCDate(),l=n.getUTCFullYear(),c=n.getUTCMonth(),u=n.getUTCDate(),d=l-o;(c<a||c===a&&u<i)&&d--;let m=l*12+c-(o*12+a);u<i&&m--;let h=Math.floor((n.getTime()-r.getTime())/(1e3*60*60*24));return{years:d,months:m,days:h}}function pee(e,t){let{years:r,months:n,days:o}=KI(e,t);return r>=2?r.toString().padStart(3,"0")+"Y":n>=1?n.toString().padStart(3,"0")+"M":o.toString().padStart(3,"0")+"D"}function mee(e){let t={};return YI(e.item,t),t}function YI(e,t){if(e)for(let r of e)r.linkId&&r.answer&&r.answer.length>0&&(t[r.linkId]=r.answer[0]),YI(r.item,t)}function br(e,t){return JSON.stringify(e,hee,t?2:void 0)}function hee(e,t){return!gee(e)&&Ca(t)?void 0:t}function gee(e){return!!/\d+$/.exec(e)}function Ca(e){if(e==null)return!0;let t=typeof e;return t==="string"&&e===""||t==="object"&&Object.keys(e).length===0}function Sm(e,t,r){return e===t||Ca(e)&&Ca(t)?!0:Ca(e)||Ca(t)?!1:Array.isArray(e)&&Array.isArray(t)?vee(e,t):Array.isArray(e)||Array.isArray(t)?!1:CS(e)&&CS(t)?yee(e,t,r):!1}function vee(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Sm(e[r],t[r]))return!1;return!0}function yee(e,t,r){let n=new Set;Object.keys(e).forEach(o=>n.add(o)),Object.keys(t).forEach(o=>n.add(o)),r==="meta"&&(n.delete("versionId"),n.delete("lastUpdated"),n.delete("author"));for(let o of n){let a=e[o],i=t[o];if(!Sm(a,i,o))return!1}return!0}function oc(e){return JSON.parse(JSON.stringify(e))}function XI(e){return!!/^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/i.exec(e)}function CS(e){return e!==null&&typeof e=="object"}var JI=[];for(let e=0;e<256;e++)JI.push(e.toString(16).padStart(2,"0"));function wee(e){let t=new Uint8Array(e),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=JI[t[n]];return r.join("")}function _ee(e){let t=new Uint8Array(e),r=[];for(let n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return window.btoa(r.join(""))}function xr(e){return e.charAt(0).toUpperCase()+e.substring(1)}function bee(e,t){var r,n;return(n=(r=e.coding)==null?void 0:r.find(o=>o.system===t))==null?void 0:n.code}var kS=e=>new Promise(t=>{setTimeout(t,e)}),X=(e=>(e.Address="Address",e.Age="Age",e.Annotation="Annotation",e.Attachment="Attachment",e.BackboneElement="BackboneElement",e.CodeableConcept="CodeableConcept",e.Coding="Coding",e.ContactDetail="ContactDetail",e.ContactPoint="ContactPoint",e.Contributor="Contributor",e.Count="Count",e.DataRequirement="DataRequirement",e.Distance="Distance",e.Dosage="Dosage",e.Duration="Duration",e.Expression="Expression",e.Extension="Extension",e.HumanName="HumanName",e.Identifier="Identifier",e.MarketingStatus="MarketingStatus",e.Meta="Meta",e.Money="Money",e.Narrative="Narrative",e.ParameterDefinition="ParameterDefinition",e.Period="Period",e.Population="Population",e.ProdCharacteristic="ProdCharacteristic",e.ProductShelfLife="ProductShelfLife",e.Quantity="Quantity",e.Range="Range",e.Ratio="Ratio",e.Reference="Reference",e.RelatedArtifact="RelatedArtifact",e.SampledData="SampledData",e.Signature="Signature",e.SubstanceAmount="SubstanceAmount",e.SystemString="http://hl7.org/fhirpath/System.String",e.Timing="Timing",e.TriggerDefinition="TriggerDefinition",e.UsageContext="UsageContext",e.base64Binary="base64Binary",e.boolean="boolean",e.canonical="canonical",e.code="code",e.date="date",e.dateTime="dateTime",e.decimal="decimal",e.id="id",e.instant="instant",e.integer="integer",e.markdown="markdown",e.oid="oid",e.positiveInt="positiveInt",e.string="string",e.time="time",e.unsignedInt="unsignedInt",e.uri="uri",e.url="url",e.uuid="uuid",e))(X||{});function xee(e){var r;if(!e.name)return;let t=(r=e.snapshot)==null?void 0:r.element;t&&(t.forEach(n=>Eee(e,n)),t.forEach(n=>See(e,n)))}function Eee(e,t){var l,c;let r=t.path,n=(c=(l=t.type)==null?void 0:l[0])==null?void 0:c.code;if(n!==void 0&&n!=="Element"&&n!=="BackboneElement")return;let o=r.split(".");o[0]=e.name;let a=Va(o),i=Pt.types[a];i||(Pt.types[a]=i={}),i.parentType=i.parentType??Va(o.slice(0,o.length-1)),i.display=i.display??a,i.structureDefinition=i.structureDefinition??e,i.elementDefinition=i.elementDefinition??t,i.description=i.description??t.definition,i.properties=i.properties??{}}function See(e,t){let r=t.path.split(".");if(r.length===1)return;r[0]=e.name;let n=Va(r.slice(0,r.length-1)),o=Pt.types[n];if(!o)return;let a=r[r.length-1];o.properties[a]=t}function Pee(e){for(let t of e.base??[]){let r=Pt.types[t];r&&(r.searchParams||(r.searchParams={_id:{base:[t],code:"_id",type:"token",expression:t+".id"},_lastUpdated:{base:[t],code:"_lastUpdated",type:"date",expression:t+".meta.lastUpdated"},_compartment:{base:[t],code:"_compartment",type:"reference",expression:t+".meta.compartment"},_profile:{base:[t],code:"_profile",type:"uri",expression:t+".meta.profile"},_security:{base:[t],code:"_security",type:"token",expression:t+".meta.security"},_source:{base:[t],code:"_source",type:"uri",expression:t+".meta.source"},_tag:{base:[t],code:"_tag",type:"token",expression:t+".meta.tag"}}),r.searchParams[e.code]=e)}}function ZI(e){var r,n,o;let t=(n=(r=e.type)==null?void 0:r[0])==null?void 0:n.code;return t==="BackboneElement"||t==="Element"?Va((o=e.path)==null?void 0:o.split(".")):t}function Va(e){return e.length===1?e[0]:e.map(xr).join("")}function gp(e){return e.replaceAll("[x]","").split(".").pop().split(/(?=[A-Z])/).map(Oee).join(" ").replace("_"," ").replace(/\s+/g," ")}var $ee=new Set(["ID","IP","PKCE","JWKS","URI","URL"]);function Oee(e){let t=e.toUpperCase();return $ee.has(t)?t:t.charAt(0)+e.slice(1)}function e0(e,t){let r=Pt.types[e];if(!r)return;let n=r.properties[t]??r.properties[t+"[x]"];if(n){if(n.contentReference){let o=n.contentReference.substring(1).split("."),a=o.pop(),i=Va(o);return e0(i,a)}return n}}function bo(e){return!!(e&&typeof e=="object"&&"resourceType"in e)}function t0(e){return!!(e&&typeof e=="object"&&"reference"in e)}var Pt=ZZ,ac=20,ee=(e=>(e.EQUALS="eq",e.NOT_EQUALS="ne",e.GREATER_THAN="gt",e.LESS_THAN="lt",e.GREATER_THAN_OR_EQUALS="ge",e.LESS_THAN_OR_EQUALS="le",e.STARTS_AFTER="sa",e.ENDS_BEFORE="eb",e.APPROXIMATELY="ap",e.CONTAINS="contains",e.EXACT="exact",e.TEXT="text",e.NOT="not",e.ABOVE="above",e.BELOW="below",e.IN="in",e.NOT_IN="not-in",e.OF_TYPE="of-type",e.MISSING="missing",e.IDENTIFIER="identifier",e.ITERATE="iterate",e))(ee||{}),e5={contains:"contains",exact:"exact",above:"above",below:"below",text:"text",not:"not",in:"in","not-in":"not-in","of-type":"of-type",missing:"missing",identifier:"identifier",iterate:"iterate"},r0={eq:"eq",ne:"ne",lt:"lt",le:"le",gt:"gt",ge:"ge",sa:"sa",eb:"eb",ap:"ap"};function Cee(e){let t=e.pathname.split("/").filter(Boolean).pop();return jee(t,e.searchParams.entries())}function kee(e){return Cee(new URL(e,"https://example.com/"))}function jee(e,t){let r={resourceType:e};for(let[n,o]of t)Ree(r,n,o);return r}function Ree(e,t,r){var i,l;let n,o,a=t.indexOf(":");switch(a>=0?(n=t.substring(0,a),o=t.substring(a+1)):(n=t,o=""),n){case"_sort":Tee(e,r);break;case"_count":e.count=parseInt(r,10);break;case"_offset":e.offset=parseInt(r,10);break;case"_total":e.total=r;break;case"_summary":e.total="accurate",e.count=0;break;case"_include":{let c=jS(r);o==="iterate"&&(c.modifier="iterate"),e.include?e.include.push(c):e.include=[c];break}case"_revinclude":{let c=jS(r);o==="iterate"&&(c.modifier="iterate"),e.revInclude?e.revInclude.push(c):e.revInclude=[c];break}case"_fields":e.fields=r.split(",");break;default:{let c=(l=(i=Pt.types[e.resourceType])==null?void 0:i.searchParams)==null?void 0:l[n];c?Iee(e,c,o,r):Mee(e,n,o,r)}}}function Tee(e,t){for(let r of t.split(",")){let n,o=!1;r.startsWith("-")?(n=r.substring(1),o=!0):n=r,e.sortRules||(e.sortRules=[]),e.sortRules.push({code:n,descending:o})}}function Iee(e,t,r,n){if(r==="missing"){ic(e,{code:t.code,operator:"missing",value:n});return}switch(t.type){case"number":case"date":Dee(e,t,n);break;case"reference":case"string":case"token":case"uri":Nee(e,t,r,n);break;case"quantity":Aee(e,t,n);break}}function Dee(e,t,r){let{operator:n,value:o}=t5(r);ic(e,{code:t.code,operator:n,value:o})}function Nee(e,t,r,n){ic(e,{code:t.code,operator:zee(r),value:n})}function Aee(e,t,r){let[n,o,a]=r.split("|"),{operator:i,value:l}=t5(n);ic(e,{code:t.code,operator:i,value:l,unitSystem:o,unitCode:a})}function Mee(e,t,r,n){var a;let o="eq";if(r)o=r;else if(n.length>=2){let i=n.substring(0,2);i in r0&&(n.length===2||(a=n.at(2))!=null&&a.match(/\d/))&&(o=i,n=n.substring(i.length))}ic(e,{code:t,operator:o,value:n})}function t5(e){let t=e.substring(0,2),r=r0[t];return r?{operator:r,value:e.substring(2)}:{operator:"eq",value:e}}function zee(e){return e5[e]??"eq"}function jS(e){let t=e.split(":");if(t.forEach(r=>{if(r==="*")throw new Tn(Ia("'*' is not supported as a value for search inclusion parameters"))}),t.length===1)throw new Tn(Ia(`Invalid include value '${e}': must be of the form ResourceType:search-parameter`));if(t.length===2)return{resourceType:t[0],searchParam:t[1]};if(t.length===3)return{resourceType:t[0],searchParam:t[1],targetType:t[2]};throw new Tn(Ia(`Invalid include value '${e}'`))}function ic(e,t){e.filters?e.filters.push(t):e.filters=[t]}function Ti(e){let t=[];return e.fields&&t.push("_fields="+e.fields.join(",")),e.filters&&e.filters.forEach(r=>t.push(Lee(r))),e.sortRules&&e.sortRules.length>0&&t.push(Fee(e.sortRules)),e.offset!==void 0&&t.push("_offset="+e.offset),e.count!==void 0&&t.push("_count="+e.count),e.total!==void 0&&t.push("_total="+e.total),e.include&&e.include.forEach(r=>t.push(RS("_include",r))),e.revInclude&&e.revInclude.forEach(r=>t.push(RS("_revinclude",r))),t.length===0?"":(t.sort((r,n)=>r.localeCompare(n)),"?"+t.join("&"))}function Lee(e){let t=e.operator in e5?":"+e.operator:"",r=e.operator!=="eq"&&e.operator in r0?e.operator:"";return`${e.code}${t}=${r}${encodeURIComponent(e.value)}`}function Fee(e){return"_sort="+e.map(t=>t.descending?"-"+t.code:t.code).join(",")}function RS(e,t){return e+"="+t.resourceType+":"+t.searchParam+(t.targetType?":"+t.targetType:"")}var Vee=class{constructor(t,r){this.operator=t,this.child=r}toString(){return`${this.operator}(${this.child.toString()})`}},lc=class{constructor(e,t,r){this.operator=e,this.left=t,this.right=r}toString(){return`${this.left.toString()} ${this.operator} ${this.right.toString()}`}},Bee=class{constructor(){this.prefixParselets={},this.infixParselets={}}registerInfix(e,t){return this.infixParselets[e]=t,this}registerPrefix(e,t){return this.prefixParselets[e]=t,this}prefix(e,t,r){return this.registerPrefix(e,{parse(n,o){let a=n.consumeAndParse(t);return r(o,a)}})}infixLeft(e,t,r){return this.registerInfix(e,{parse(n,o,a){let i=n.consumeAndParse(t);return r(o,a,i)},precedence:t})}construct(e){return new Uee(e,this.prefixParselets,this.infixParselets)}},Uee=class{constructor(e,t,r){this.tokens=e,this.prefixParselets=t,this.infixParselets=r}hasMore(){return this.tokens.length>0}match(e){var t;return((t=this.peek())==null?void 0:t.id)!==e?!1:(this.consume(),!0)}consumeAndParse(e=1/0){let t=this.consume(),r=this.prefixParselets[t.id];if(!r)throw Error(`Parse error at "${t.value}" (line ${t.line}, column ${t.column}). No matching prefix parselet.`);let n=r.parse(this,t);for(;e>this.getPrecedence();){let o=this.consume();n=this.getInfixParselet(o).parse(this,n,o)}return n}getPrecedence(){let e=this.peek();if(!e)return 1/0;let t=this.getInfixParselet(e);return t?t.precedence:1/0}consume(e,t){var r,n;if(!this.tokens.length)throw Error("Cant consume unknown more tokens.");if(e&&((r=this.peek())==null?void 0:r.id)!==e){let o=this.peek();throw Error(`Expected ${e} but got "${o.id}" at line ${o.line} column ${o.column}.`)}if(t&&((n=this.peek())==null?void 0:n.value)!==t){let o=this.peek();throw Error(`Expected "${t}" but got "${o.value}" at line ${o.line} column ${o.column}.`)}return this.tokens.shift()}peek(){return this.tokens.length>0?this.tokens[0]:void 0}removeComments(){this.tokens=this.tokens.filter(e=>e.id!=="Comment")}getInfixParselet(e){return this.infixParselets[e.id==="Symbol"?e.value:e.id]}},Wee=["year","years","month","months","week","weeks","day","days","hour","hours","minute","minutes","second","seconds","millisecond","milliseconds"],Hee=class{constructor(e,t,r,n){this.result=[],this.pos={index:0,line:1,column:0},this.markStack=[],this.str=e,this.keywords=t,this.operators=r,this.dateTimeLiterals=!!(n!=null&&n.dateTimeLiterals),this.symbolRegex=(n==null?void 0:n.symbolRegex)??/[$\w%]/}tokenize(){for(;this.pos.index<this.str.length;){let e=this.consumeToken();e&&this.result.push(e)}return this.result}prevToken(){return this.result.slice(-1)[0]}peekToken(){this.mark();let e=this.consumeToken();return this.reset(),e}consumeToken(){this.consumeWhitespace();let e=this.curr();if(!e)return;this.mark();let t=this.peek();return e==="/"&&t==="*"?this.consumeMultiLineComment():e==="/"&&t==="/"?this.consumeSingleLineComment():e==="'"||e==='"'?this.consumeString(e):e==="`"?this.consumeBacktickSymbol():e==="@"?this.consumeDateTime():/\d/.exec(e)?this.consumeNumber():/\w/.exec(e)?this.consumeSymbol():(e==="$"||e==="%")&&/\w/.exec(t)?this.consumeSymbol():this.consumeOperator()}consumeWhitespace(){this.consumeWhile(()=>/\s/.exec(this.curr()))}consumeMultiLineComment(){let e=this.pos.index;return this.consumeWhile(()=>this.curr()!=="*"||this.peek()!=="/"),this.advance(),this.advance(),this.buildToken("Comment",this.str.substring(e,this.pos.index))}consumeSingleLineComment(){return this.buildToken("Comment",this.consumeWhile(()=>this.curr()!==`
88
- `))}consumeString(e){this.advance();let t=this.buildToken("String",this.consumeWhile(()=>this.prev()==="\\"||this.curr()!==e));return this.advance(),t}consumeBacktickSymbol(){this.advance();let e=this.buildToken("Symbol",this.consumeWhile(()=>this.curr()!=="`"));return this.advance(),e}consumeDateTime(){this.advance();let e=this.pos.index;return this.consumeWhile(()=>/[\d-]/.exec(this.curr())),this.curr()==="T"&&(this.advance(),this.consumeWhile(()=>/[\d:]/.exec(this.curr())),this.curr()==="."&&/\d/.exec(this.peek())&&(this.advance(),this.consumeWhile(()=>/\d/.exec(this.curr()))),this.curr()==="Z"?this.advance():(this.curr()==="+"||this.curr()==="-")&&(this.advance(),this.consumeWhile(()=>/[\d:]/.exec(this.curr())))),this.buildToken("DateTime",this.str.substring(e,this.pos.index))}consumeNumber(){let e=this.pos.index,t="Number";return this.consumeWhile(()=>/\d/.exec(this.curr())),this.curr()==="."&&/\d/.exec(this.peek())&&(this.advance(),this.consumeWhile(()=>/\d/.exec(this.curr()))),this.curr()==="-"&&this.dateTimeLiterals?(this.pos.index=e-1,this.consumeDateTime()):(this.curr()===" "&&qee(this.peekToken())&&(t="Quantity",this.consumeToken()),this.buildToken(t,this.str.substring(e,this.pos.index)))}consumeSymbol(){var t;let e=this.consumeWhile(()=>this.symbolRegex.exec(this.curr()));return((t=this.prevToken())==null?void 0:t.value)!=="."&&this.keywords.includes(e)?this.buildToken(e,e):this.buildToken("Symbol",e)}consumeOperator(){let e=this.curr(),t=this.peek(),r=e+t;return this.operators.includes(r)?(this.advance(),this.advance(),this.buildToken(r,r)):(this.advance(),this.buildToken(e,e))}consumeWhile(e){let t=this.pos.index;for(;this.pos.index<this.str.length&&e();)this.advance();return this.str.substring(t,this.pos.index)}curr(){return this.str[this.pos.index]}prev(){return this.str[this.pos.index-1]??""}peek(){return this.str[this.pos.index+1]??""}mark(){this.markStack.push({...this.pos})}reset(){let e=this.markStack.pop();if(!e)throw new Error("No mark to reset to");this.pos.index=e.index,this.pos.line=e.line,this.pos.column=e.column}advance(){this.pos.index++,this.curr()===`
89
- `?(this.pos.line++,this.pos.column=0):this.pos.column++}buildToken(e,t){let r=this.markStack.pop();if(!r)throw new Error("No mark for token");return{id:e,value:t,...r}}};function qee(e){return!!(e&&(e.id==="String"||e.id==="Symbol"&&Wee.includes(e.value)))}function Nu(e){if(e.startsWith("T"))return e+"T00:00:00.000Z".substring(e.length);if(e.length<=10)return e;try{return new Date(e).toISOString()}catch{return e}}function ve(e){return[{type:"boolean",value:e}]}function Vn(e){return e==null?{type:"undefined",value:void 0}:Number.isSafeInteger(e)?{type:"integer",value:e}:typeof e=="number"?{type:"decimal",value:e}:typeof e=="boolean"?{type:"boolean",value:e}:typeof e=="string"?{type:"string",value:e}:en(e)?{type:"Quantity",value:e}:bo(e)?{type:e.resourceType,value:e}:{type:"BackboneElement",value:e}}function Vo(e){return e.length===0?!1:!!e[0].value}function po(e,t){if(e.length!==0){if(e.length===1&&(!t||e[0].type===t))return e[0];throw new Error(`Expected singleton of type ${t}, but found ${JSON.stringify(e)}`)}}function ao(e,t){if(!e.value)return;let r=e0(e.type,t);return r?Qee(e,t,r):Gee(e,t)}function Qee(e,t,r){var i;let n=r.type;if(!n||n.length===0)return;let o,a="undefined";if(n.length===1)o=e.value[t],a=n[0].code;else for(let l of n){let c=t.replace("[x]","")+xr(l.code);if(c in e.value){o=e.value[c],a=l.code;break}}if(!Ca(o))return(a==="Element"||a==="BackboneElement")&&(a=Va((i=r.path)==null?void 0:i.split("."))),Array.isArray(o)?o.map(l=>TS(l,a)):TS(o,a)}function TS(e,t){return t==="Resource"&&bo(e)&&(t=e.resourceType),{type:t,value:e}}function Gee(e,t){let r=e.value;if(!r||typeof r!="object")return;let n;if(t in r)n=r[t];else for(let o in X){let a=t+xr(o);if(a in r){n=r[a];break}}if(!Ca(n))return Array.isArray(n)?n.map(Vn):Vn(n)}function r5(e){let t=[];for(let r of e){let n=!1;for(let o of t)if(Vo(a5(r,o))){n=!0;break}n||t.push(r)}return t}function n5(e){return ve(!Vo(e))}function o5(e,t){return e.length===0||t.length===0?[]:e.length!==t.length?ve(!1):ve(e.every((r,n)=>Vo(a5(r,t[n]))))}function a5(e,t){let r=e.value,n=t.value;return typeof r=="number"&&typeof n=="number"?ve(Math.abs(r-n)<1e-8):en(r)&&en(n)?ve(s5(r,n)):ve(typeof r=="object"&&typeof n=="object"?n0(e,t):r===n)}function i5(e,t){return e.length===0&&t.length===0?ve(!0):e.length!==t.length?ve(!1):(e.sort(IS),t.sort(IS),ve(e.every((r,n)=>Vo(Kee(r,t[n])))))}function Kee(e,t){let r=e.value,n=t.value;return typeof r=="number"&&typeof n=="number"?ve(Math.abs(r-n)<.01):en(r)&&en(n)?ve(s5(r,n)):ve(typeof r=="object"&&typeof n=="object"?n0(r,n):typeof r=="string"&&typeof n=="string"?r.toLowerCase()===n.toLowerCase():r===n)}function IS(e,t){let r=e.value,n=t.value;return typeof r=="number"&&typeof n=="number"?r-n:typeof r=="string"&&typeof n=="string"?r.localeCompare(n):0}function l5(e,t){let{value:r}=e;if(r==null)return!1;switch(t){case"Boolean":return typeof r=="boolean";case"Decimal":case"Integer":return typeof r=="number";case"Date":return typeof r=="string"&&!!/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r);case"DateTime":return typeof r=="string"&&!!/^\d{4}(-\d{2}(-\d{2})?)?T/.exec(r);case"Time":return typeof r=="string"&&!!/^T\d/.exec(r);case"Period":return Yee(r);case"Quantity":return en(r);default:return typeof r=="object"&&(r==null?void 0:r.resourceType)===t}}function Yee(e){return!!(e&&typeof e=="object"&&"start"in e)}function en(e){return!!(e&&typeof e=="object"&&"value"in e&&typeof e.value=="number")}function s5(e,t){return Math.abs(e.value-t.value)<.01&&(e.unit===t.unit||e.code===t.code||e.unit===t.code||e.code===t.unit)}function n0(e,t){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o of r){let a=e[o],i=t[o];if(DS(a)&&DS(i)){if(!n0(a,i))return!1}else if(a!==i)return!1}return!0}function DS(e){return e!==null&&typeof e=="object"}var zl=()=>[],ur={empty:(e,t)=>ve(t.length===0),exists:(e,t,r)=>ve(r?t.filter(n=>Vo(r.eval(e,[n]))).length>0:t.length>0),all:(e,t,r)=>ve(t.every(n=>Vo(r.eval(e,[n])))),allTrue:(e,t)=>{for(let r of t)if(!r.value)return ve(!1);return ve(!0)},anyTrue:(e,t)=>{for(let r of t)if(r.value)return ve(!0);return ve(!1)},allFalse:(e,t)=>{for(let r of t)if(r.value)return ve(!1);return ve(!0)},anyFalse:(e,t)=>{for(let r of t)if(!r.value)return ve(!0);return ve(!1)},subsetOf:zl,supersetOf:zl,count:(e,t)=>[{type:"integer",value:t.length}],distinct:(e,t)=>{let r=[];for(let n of t)r.some(o=>o.value===n.value)||r.push(n);return r},isDistinct:(e,t)=>ve(t.length===ur.distinct(e,t).length),where:(e,t,r)=>t.filter(n=>Vo(r.eval(e,[n]))),select:(e,t,r)=>t.map(n=>r.eval(e,[n])).flat(),repeat:zl,ofType:(e,t,r)=>t.filter(n=>n.type===r.name),single:(e,t)=>{if(t.length>1)throw new Error("Expected input length one for single()");return t.length===0?[]:t.slice(0,1)},first:(e,t)=>t.length===0?[]:t.slice(0,1),last:(e,t)=>t.length===0?[]:t.slice(t.length-1,t.length),tail:(e,t)=>t.length===0?[]:t.slice(1,t.length),skip:(e,t,r)=>{var o;let n=(o=r.eval(e,t)[0])==null?void 0:o.value;if(typeof n!="number")throw new Error("Expected a number for skip(num)");return n>=t.length?[]:n<=0?t:t.slice(n,t.length)},take:(e,t,r)=>{var o;let n=(o=r.eval(e,t)[0])==null?void 0:o.value;if(typeof n!="number")throw new Error("Expected a number for take(num)");return n>=t.length?t:n<=0?[]:t.slice(0,n)},intersect:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t),o=[];for(let a of t)!o.some(i=>i.value===a.value)&&n.some(i=>i.value===a.value)&&o.push(a);return o},exclude:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t),o=[];for(let a of t)n.some(i=>i.value===a.value)||o.push(a);return o},union:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t);return r5([...t,...n])},combine:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t);return[...t,...n]},htmlChecks:(e,t,r)=>[Vn(!0)],iif:(e,t,r,n,o)=>{let a=r.eval(e,t);if(a.length>1||a.length===1&&typeof a[0].value!="boolean")throw new Error("Expected criterion to evaluate to a Boolean");return Vo(a)?n.eval(e,t):o?o.eval(e,t):[]},toBoolean:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);if(typeof r=="boolean")return[{type:"boolean",value:r}];if(typeof r=="number"&&(r===0||r===1))return ve(!!r);if(typeof r=="string"){let n=r.toLowerCase();if(["true","t","yes","y","1","1.0"].includes(n))return ve(!0);if(["false","f","no","n","0","0.0"].includes(n))return ve(!1)}return[]},convertsToBoolean:(e,t)=>t.length===0?[]:ve(ur.toBoolean(e,t).length===1),toInteger:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);return typeof r=="number"?[{type:"integer",value:r}]:typeof r=="string"&&/^[+-]?\d+$/.exec(r)?[{type:"integer",value:parseInt(r,10)}]:typeof r=="boolean"?[{type:"integer",value:r?1:0}]:[]},convertsToInteger:(e,t)=>t.length===0?[]:ve(ur.toInteger(e,t).length===1),toDate:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);return typeof r=="string"&&/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r)?[{type:"date",value:Nu(r)}]:[]},convertsToDate:(e,t)=>t.length===0?[]:ve(ur.toDate(e,t).length===1),toDateTime:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);return typeof r=="string"&&/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r)?[{type:"dateTime",value:Nu(r)}]:[]},convertsToDateTime:(e,t)=>t.length===0?[]:ve(ur.toDateTime(e,t).length===1),toDecimal:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);return typeof r=="number"?[{type:"decimal",value:r}]:typeof r=="string"&&/^-?\d{1,9}(\.\d{1,9})?$/.exec(r)?[{type:"decimal",value:parseFloat(r)}]:typeof r=="boolean"?[{type:"decimal",value:r?1:0}]:[]},convertsToDecimal:(e,t)=>t.length===0?[]:ve(ur.toDecimal(e,t).length===1),toQuantity:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);return en(r)?[{type:"Quantity",value:r}]:typeof r=="number"?[{type:"Quantity",value:{value:r,unit:"1"}}]:typeof r=="string"&&/^-?\d{1,9}(\.\d{1,9})?/.exec(r)?[{type:"Quantity",value:{value:parseFloat(r),unit:"1"}}]:typeof r=="boolean"?[{type:"Quantity",value:{value:r?1:0,unit:"1"}}]:[]},convertsToQuantity:(e,t)=>t.length===0?[]:ve(ur.toQuantity(e,t).length===1),toString:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);return r==null?[]:en(r)?[{type:"string",value:`${r.value} '${r.unit}'`}]:[{type:"string",value:r.toString()}]},convertsToString:(e,t)=>t.length===0?[]:ve(ur.toString(e,t).length===1),toTime:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Cn(t,1);if(typeof r=="string"){let n=/^T?(\d{2}(:\d{2}(:\d{2})?)?)/.exec(r);if(n)return[{type:"time",value:Nu("T"+n[1])}]}return[]},convertsToTime:(e,t)=>t.length===0?[]:ve(ur.toTime(e,t).length===1),indexOf:(e,t,r)=>Qr((n,o)=>n.indexOf(o),e,t,r),substring:(e,t,r,n)=>Qr((o,a,i)=>{let l=a,c=i?l+i:o.length;return l<0||l>=o.length?void 0:o.substring(l,c)},e,t,r,n),startsWith:(e,t,r)=>Qr((n,o)=>n.startsWith(o),e,t,r),endsWith:(e,t,r)=>Qr((n,o)=>n.endsWith(o),e,t,r),contains:(e,t,r)=>Qr((n,o)=>n.includes(o),e,t,r),upper:(e,t)=>Qr(r=>r.toUpperCase(),e,t),lower:(e,t)=>Qr(r=>r.toLowerCase(),e,t),replace:(e,t,r,n)=>Qr((o,a,i)=>o.replaceAll(a,i),e,t,r,n),matches:(e,t,r)=>Qr((n,o)=>!!n.match(o),e,t,r),replaceMatches:(e,t,r,n)=>Qr((o,a,i)=>o.replaceAll(a,i),e,t,r,n),length:(e,t)=>Qr(r=>r.length,e,t),toChars:(e,t)=>Qr(r=>r?r.split(""):void 0,e,t),abs:(e,t)=>Pn(Math.abs,e,t),ceiling:(e,t)=>Pn(Math.ceil,e,t),exp:(e,t)=>Pn(Math.exp,e,t),floor:(e,t)=>Pn(Math.floor,e,t),ln:(e,t)=>Pn(Math.log,e,t),log:(e,t,r)=>Pn((n,o)=>Math.log(n)/Math.log(o),e,t,r),power:(e,t,r)=>Pn(Math.pow,e,t,r),round:(e,t)=>Pn(Math.round,e,t),sqrt:(e,t)=>Pn(Math.sqrt,e,t),truncate:(e,t)=>Pn(r=>r|0,e,t),children:zl,descendants:zl,trace:(e,t,r)=>(console.log("trace",t,r),t),now:()=>[{type:"dateTime",value:new Date().toISOString()}],timeOfDay:()=>[{type:"time",value:new Date().toISOString().substring(11)}],today:()=>[{type:"date",value:new Date().toISOString().substring(0,10)}],between:(e,t,r,n,o)=>{var u;let a=ur.toDateTime(e,r.eval(e,t));if(a.length===0)throw new Error("Invalid start date");let i=ur.toDateTime(e,n.eval(e,t));if(i.length===0)throw new Error("Invalid end date");let l=(u=o.eval(e,t)[0])==null?void 0:u.value;if(l!=="years"&&l!=="months"&&l!=="days")throw new Error("Invalid units");return[{type:"Quantity",value:{value:KI(a[0].value,i[0].value)[l],unit:l}}]},is:(e,t,r)=>{let n="";return r instanceof o0?n=r.name:r instanceof i0&&(n=r.left.name+"."+r.right.name),n?t.map(o=>({type:"boolean",value:l5(o,n)})):[]},not:(e,t)=>ur.toBoolean(e,t).map(r=>({type:"boolean",value:!r.value})),resolve:(e,t)=>t.map(r=>{let n=r.value,o;if(typeof n=="string")o=n;else if(typeof n=="object"){let a=n;if(a.resource)return Vn(a.resource);a.reference?o=a.reference:a.type&&a.identifier&&(o=`${a.type}?identifier=${a.identifier.system}|${a.identifier.value}`)}if(o!=null&&o.includes("?")){let[a]=o.split("?");return{type:a,value:{resourceType:a}}}if(o!=null&&o.includes("/")){let[a,i]=o.split("/");return{type:a,value:{resourceType:a,id:i}}}return{type:"BackboneElement",value:void 0}}).filter(r=>!!r.value),as:(e,t)=>t,type:(e,t)=>t.map(({value:r})=>typeof r=="boolean"?{type:"BackboneElement",value:{namespace:"System",name:"Boolean"}}:typeof r=="number"?{type:"BackboneElement",value:{namespace:"System",name:"Integer"}}:bo(r)?{type:"BackboneElement",value:{namespace:"FHIR",name:r.resourceType}}:{type:"BackboneElement",value:null}),conformsTo:(e,t,r)=>{let n=r.eval(e,t)[0].value;if(!n.startsWith("http://hl7.org/fhir/StructureDefinition/"))throw new Error("Expected a StructureDefinition URL");let o=n.replace("http://hl7.org/fhir/StructureDefinition/","");return t.map(a=>{var i;return{type:"boolean",value:((i=a.value)==null?void 0:i.resourceType)===o}})}};function Qr(e,t,r,...n){if(r.length===0)return[];let[{value:o}]=Cn(r,1);if(typeof o!="string")throw new Error("String function cannot be called with non-string");let a=e(o,...n.map(i=>{var l;return(l=i==null?void 0:i.eval(t,r)[0])==null?void 0:l.value}));return a===void 0?[]:Array.isArray(a)?a.map(Vn):[Vn(a)]}function Pn(e,t,r,...n){if(r.length===0)return[];let[{value:o}]=Cn(r,1),a=en(o),i=a?o.value:o;if(typeof i!="number")throw new Error("Math function cannot be called with non-number");let l=e(i,...n.map(d=>{var m;return(m=d.eval(t,r)[0])==null?void 0:m.value})),c=a?"Quantity":r[0].type,u=a?{...o,value:l}:l;return[{type:c,value:u}]}function Cn(e,t){if(e.length!==t)throw new Error(`Expected ${t} arguments`);for(let r of e)if(r==null)throw new Error("Expected non-null argument");return e}var Xee=class{constructor(e,t){this.original=e,this.child=t}eval(e,t){try{return t.length>0?t.map(r=>this.child.eval(e,[r])).flat():this.child.eval(e,[])}catch(r){throw new Error(`FhirPathError on "${this.original}": ${r}`)}}toString(){return this.child.toString()}},hi=class{constructor(e){this.value=e}eval(){return[this.value]}toString(){let e=this.value.value;return typeof e=="string"?`'${e}'`:e.toString()}},o0=class{constructor(e){this.name=e}eval(e,t){if(this.name==="$this")return t;if(this.name.startsWith("%")){let r=e.variables[this.name.slice(1)];if(!r)throw new Error(`Undefined variable ${this.name}`);return[r]}return t.flatMap(r=>this.evalValue(r)).filter(r=>(r==null?void 0:r.value)!==void 0)}evalValue(e){let t=e.value;if(!(!t||typeof t!="object"))return bo(t)&&t.resourceType===this.name?e:ao(e,this.name)}toString(){return this.name}},Jee=class{eval(){return[]}toString(){return"{}"}},Zee=class extends Vee{constructor(e,t,r){super(e,t),this.impl=r}eval(e,t){return this.impl(this.child.eval(e,t))}toString(){return this.operator+this.child.toString()}},a0=class extends lc{constructor(e,t){super("as",e,t)}eval(e,t){return ur.ofType(e,this.left.eval(e,t),this.right)}},Sr=class extends lc{},sn=class extends Sr{constructor(e,t,r,n){super(e,t,r),this.impl=n}eval(e,t){let r=this.left.eval(e,t);if(r.length!==1)return[];let n=this.right.eval(e,t);if(n.length!==1)return[];let o=r[0].value,a=n[0].value,i=en(o)?o.value:o,l=en(a)?a.value:a,c=this.impl(i,l);return typeof c=="boolean"?ve(c):en(o)?[{type:"Quantity",value:{...o,value:c}}]:[Vn(c)]}},ete=class extends lc{constructor(t,r){super("&",t,r)}eval(t,r){let n=this.left.eval(t,r),o=this.right.eval(t,r),a=[...n,...o];return a.length>0&&a.every(i=>typeof i.value=="string")?[{type:"string",value:a.map(i=>i.value).join("")}]:a}},tte=class extends Sr{constructor(t,r){super("contains",t,r)}eval(t,r){let n=this.left.eval(t,r),o=this.right.eval(t,r);return ve(n.some(a=>a.value===o[0].value))}},rte=class extends Sr{constructor(e,t){super("in",e,t)}eval(e,t){let r=po(this.left.eval(e,t)),n=this.right.eval(e,t);return r?ve(n.some(o=>o.value===r.value)):[]}},i0=class extends lc{constructor(e,t){super(".",e,t)}eval(e,t){return this.right.eval(e,this.left.eval(e,t))}toString(){return`${this.left.toString()}.${this.right.toString()}`}},c5=class extends lc{constructor(e,t){super("|",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return r5([...r,...n])}},nte=class extends Sr{constructor(e,t){super("=",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return o5(r,n)}},ote=class extends Sr{constructor(e,t){super("!=",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return n5(o5(r,n))}},ate=class extends Sr{constructor(e,t){super("~",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return i5(r,n)}},ite=class extends Sr{constructor(e,t){super("!~",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return n5(i5(r,n))}},l0=class extends Sr{constructor(e,t){super("is",e,t)}eval(e,t){let r=this.left.eval(e,t);if(r.length!==1)return[];let n=this.right.name;return ve(l5(r[0],n))}},lte=class extends Sr{constructor(e,t){super("and",e,t)}eval(e,t){let r=po(this.left.eval(e,t),"boolean"),n=po(this.right.eval(e,t),"boolean");return(r==null?void 0:r.value)===!0&&(n==null?void 0:n.value)===!0?ve(!0):(r==null?void 0:r.value)===!1||(n==null?void 0:n.value)===!1?ve(!1):[]}},ste=class extends Sr{constructor(t,r){super("or",t,r)}eval(t,r){let n=po(this.left.eval(t,r),"boolean"),o=po(this.right.eval(t,r),"boolean");return(n==null?void 0:n.value)===!1&&(o==null?void 0:o.value)===!1?ve(!1):n!=null&&n.value||o!=null&&o.value?ve(!0):[]}},cte=class extends Sr{constructor(e,t){super("xor",e,t)}eval(e,t){let r=po(this.left.eval(e,t),"boolean"),n=po(this.right.eval(e,t),"boolean");return!r||!n?[]:ve(r.value!==n.value)}},ute=class extends Sr{constructor(e,t){super("implies",e,t)}eval(e,t){let r=po(this.left.eval(e,t),"boolean"),n=po(this.right.eval(e,t),"boolean");return(n==null?void 0:n.value)===!0||(r==null?void 0:r.value)===!1?ve(!0):!r||!n?[]:ve(!1)}},s0=class{constructor(e,t){this.name=e,this.args=t}eval(e,t){let r=ur[this.name];if(!r)throw new Error("Unrecognized function: "+this.name);return r(e,t,...this.args)}toString(){return`${this.name}(${this.args.map(e=>e.toString()).join(", ")})`}},c0=class{constructor(e,t){this.left=e,this.expr=t}eval(e,t){let r=this.expr.eval(e,t);if(r.length!==1)return[];let n=r[0].value;if(typeof n!="number")throw new Error("Invalid indexer expression: should return integer}");let o=this.left.eval(e,t);return n in o?[o[n]]:[]}toString(){return`${this.left.toString()}[${this.expr.toString()}]`}},dte=["true","false"],u0=["!=","!~","<=",">=","{}","->"];function fte(e){return new Hee(e,dte,u0).tokenize()}var Ne={FunctionCall:0,Dot:1,Indexer:2,UnaryAdd:3,UnarySubtract:3,Multiply:4,Divide:4,IntegerDivide:4,Modulo:4,Add:5,Subtract:5,Ampersand:5,Is:6,As:6,Union:7,GreaterThan:8,GreaterThanOrEquals:8,LessThan:8,LessThanOrEquals:8,Equals:9,Equivalent:9,NotEquals:9,NotEquivalent:9,In:10,Contains:10,And:11,Xor:12,Or:12,Implies:13,Arrow:100,Semicolon:200},pte={parse(e){var r;let t=e.consumeAndParse();if(!e.match(")"))throw new Error("Parse error: expected `)` got `"+((r=e.peek())==null?void 0:r.value)+"`");return t}},mte={parse(e,t){let r=e.consumeAndParse();if(!e.match("]"))throw new Error("Parse error: expected `]`");return new c0(t,r)},precedence:Ne.Indexer},hte={parse(e,t){if(!(t instanceof o0))throw new Error("Unexpected parentheses");let r=[];for(;!e.match(")");)r.push(e.consumeAndParse()),e.match(",");return new s0(t.name,r)},precedence:Ne.FunctionCall};function gte(e){let t=e.split(" "),r=parseFloat(t[0]),n=t[1];return n!=null&&n.startsWith("'")&&n.endsWith("'")?n=n.substring(1,n.length-1):n="{"+n+"}",{value:r,unit:n}}function d0(){return new Bee().registerPrefix("String",{parse:(e,t)=>new hi({type:"string",value:t.value})}).registerPrefix("DateTime",{parse:(e,t)=>new hi({type:"dateTime",value:Nu(t.value)})}).registerPrefix("Quantity",{parse:(e,t)=>new hi({type:"Quantity",value:gte(t.value)})}).registerPrefix("Number",{parse:(e,t)=>new hi({type:"decimal",value:parseFloat(t.value)})}).registerPrefix("true",{parse:()=>new hi({type:"boolean",value:!0})}).registerPrefix("false",{parse:()=>new hi({type:"boolean",value:!1})}).registerPrefix("Symbol",{parse:(e,t)=>new o0(t.value)}).registerPrefix("{}",{parse:()=>new Jee}).registerPrefix("(",pte).registerInfix("[",mte).registerInfix("(",hte).prefix("+",Ne.UnaryAdd,(e,t)=>new Zee("+",t,r=>r)).prefix("-",Ne.UnarySubtract,(e,t)=>new sn("-",t,t,(r,n)=>-n)).infixLeft(".",Ne.Dot,(e,t,r)=>new i0(e,r)).infixLeft("/",Ne.Divide,(e,t,r)=>new sn("/",e,r,(n,o)=>n/o)).infixLeft("*",Ne.Multiply,(e,t,r)=>new sn("*",e,r,(n,o)=>n*o)).infixLeft("+",Ne.Add,(e,t,r)=>new sn("+",e,r,(n,o)=>n+o)).infixLeft("-",Ne.Subtract,(e,t,r)=>new sn("-",e,r,(n,o)=>n-o)).infixLeft("|",Ne.Union,(e,t,r)=>new c5(e,r)).infixLeft("=",Ne.Equals,(e,t,r)=>new nte(e,r)).infixLeft("!=",Ne.NotEquals,(e,t,r)=>new ote(e,r)).infixLeft("~",Ne.Equivalent,(e,t,r)=>new ate(e,r)).infixLeft("!~",Ne.NotEquivalent,(e,t,r)=>new ite(e,r)).infixLeft("<",Ne.LessThan,(e,t,r)=>new sn("<",e,r,(n,o)=>n<o)).infixLeft("<=",Ne.LessThanOrEquals,(e,t,r)=>new sn("<=",e,r,(n,o)=>n<=o)).infixLeft(">",Ne.GreaterThan,(e,t,r)=>new sn(">",e,r,(n,o)=>n>o)).infixLeft(">=",Ne.GreaterThanOrEquals,(e,t,r)=>new sn(">=",e,r,(n,o)=>n>=o)).infixLeft("&",Ne.Ampersand,(e,t,r)=>new ete(e,r)).infixLeft("and",Ne.And,(e,t,r)=>new lte(e,r)).infixLeft("as",Ne.As,(e,t,r)=>new a0(e,r)).infixLeft("contains",Ne.Contains,(e,t,r)=>new tte(e,r)).infixLeft("div",Ne.Divide,(e,t,r)=>new sn("div",e,r,(n,o)=>n/o|0)).infixLeft("in",Ne.In,(e,t,r)=>new rte(e,r)).infixLeft("is",Ne.Is,(e,t,r)=>new l0(e,r)).infixLeft("mod",Ne.Modulo,(e,t,r)=>new sn("mod",e,r,(n,o)=>n%o)).infixLeft("or",Ne.Or,(e,t,r)=>new ste(e,r)).infixLeft("xor",Ne.Xor,(e,t,r)=>new cte(e,r)).infixLeft("implies",Ne.Implies,(e,t,r)=>new ute(e,r))}var vte=d0();function u5(e){return new Xee(e,vte.construct(fte(e)).consumeAndParse())}function yte(e,t){let r=Array.isArray(t)?t:[t];for(let n=0;n<r.length;n++){let o=r[n];typeof o=="object"&&"type"in o&&"value"in o||(r[n]=Vn(r[n]))}return d5(e,r).map(n=>n.value)}function d5(e,t,r){let n=r||{};return u5(e).eval({variables:n},t)}var Ao=(e=>(e.BOOLEAN="BOOLEAN",e.NUMBER="NUMBER",e.QUANTITY="QUANTITY",e.TEXT="TEXT",e.REFERENCE="REFERENCE",e.CANONICAL="CANONICAL",e.DATE="DATE",e.DATETIME="DATETIME",e.PERIOD="PERIOD",e.UUID="UUID",e))(Ao||{});function f0(e,t){var n;let r=(n=Pt.types[e].searchParamsDetails)==null?void 0:n[t.code];return r||(r=_te(e,t)),r}function wte(e,t,r){let n=Pt.types[e];n.searchParamsDetails||(n.searchParamsDetails={}),n.searchParamsDetails[t]=r}function _te(e,t){let r=t.code,n=Ete(r),o=Pte(e,t.expression),a={elementDefinitions:[],propertyTypes:new Set,array:!1};for(let l of o){let c=us(l);c.length===1&&c[0]instanceof Sr?a.propertyTypes.add("boolean"):f5(a,us(l),e,1)}let i={columnName:n,type:Ste(t,a.propertyTypes),elementDefinitions:a.elementDefinitions,array:a.array};return wte(e,r,i),i}function f5(e,t,r,n){var u;let o=t[n];if(o instanceof a0){e.propertyTypes.add(o.right.toString());return}if(o instanceof s0){bte(e,o);return}let a=o.toString(),i=e0(r,a);if(!i)throw new Error(`Element definition not found for ${r} ${a}`);let l=!1,c=n+1;if(c<t.length&&t[c]instanceof c0&&(l=!0,c++),i.max!=="0"&&i.max!=="1"&&!l&&(e.array=!0),c>=t.length){e.elementDefinitions.push(i);for(let d of i.type)e.propertyTypes.add(d.code);return}for(let d of i.type){let m=d.code;xte(m)&&(m=Va((u=i.path)==null?void 0:u.split("."))),f5(e,t,m,c)}}function bte(e,t){if(t.name==="as"){e.propertyTypes.add(t.args[0].toString());return}if(t.name==="resolve"){e.propertyTypes.add("string");return}if(t.name==="where"&&t.args[0]instanceof l0){e.propertyTypes.add(t.args[0].right.toString());return}throw new Error(`Unhandled FHIRPath function: ${t.name}`)}function xte(e){return e==="Element"||e==="BackboneElement"}function Ete(e){return e.split("-").reduce((t,r,n)=>t+(n?xr(r):r),"")}function Ste(e,t){switch(e.type){case"date":return t.size===1&&t.has("date")?"DATE":"DATETIME";case"number":return"NUMBER";case"quantity":return"QUANTITY";case"reference":return t.has("canonical")?"CANONICAL":"REFERENCE";case"token":return t.size===1&&t.has("boolean")?"BOOLEAN":"TEXT";default:return"TEXT"}}function Pte(e,t){let r=[],n=u5(t);return rv(e,n.child,r),r}function rv(e,t,r){t instanceof c5?(rv(e,t.left,r),rv(e,t.right,r)):t.toString().startsWith(e+".")&&r.push(t)}function us(e){return e instanceof a0||e instanceof c0?[us(e.left),e].flat():e instanceof Sr?[e]:e instanceof i0?[us(e.left),us(e.right)].flat():e instanceof s0&&e.name==="where"&&!(e.args[0]instanceof l0)?[]:[e]}function $te(e){if(typeof window<"u")return window.atob(e);if(typeof Buffer<"u")return Buffer.from(e,"base64").toString("binary");throw new Error("Unable to decode base64")}function Ote(e){if(typeof window<"u")return window.btoa(e);if(typeof Buffer<"u")return Buffer.from(e,"binary").toString("base64");throw new Error("Unable to encode base64")}function Cte(e){var n,o,a;for(let i of e.entry||[])(n=i.resource)==null||delete n.meta,i.fullUrl="urn:uuid:"+((o=i.resource)==null?void 0:o.id),(a=i.resource)==null||delete a.id;let t=e.entry,r=JSON.stringify({resourceType:"Bundle",type:"transaction",entry:t==null?void 0:t.map(i=>({fullUrl:i.fullUrl,request:{method:"POST",url:i.resource.resourceType},resource:i.resource}))},kte,2);return JSON.parse(r)}function kte(e,t){return e==="reference"&&typeof t=="string"&&t.includes("/")?"urn:uuid:"+t.split("/")[1]:t}var jte=class{constructor(e=10){this.max=e,this.cache=new Map}clear(){this.cache.clear()}get(e){let t=this.cache.get(e);return t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size>=this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}delete(e){this.cache.delete(e)}keys(){return this.cache.keys()}first(){return this.cache.keys().next().value}};function NS(){let e=new Uint32Array(28);return crypto.getRandomValues(e),wee(e.buffer)}async function Rte(e){return crypto.subtle.digest("SHA-256",new TextEncoder().encode(e))}function Tte(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=$te(t),n=Array.from(r).reduce((a,i)=>{let l=("00"+i.charCodeAt(0).toString(16)).slice(-2);return`${a}%${l}`},""),o=decodeURIComponent(n);return JSON.parse(o)}function p5(e){let[t,r,n]=e.split(".");return Tte(r)}function Ite(e){try{return typeof p5(e).login_id=="string"}catch{return!1}}var m5,Kn=class{constructor(e){this[m5]="ReadablePromise",this.status="pending",this.suspender=e.then(t=>(this.status="success",this.response=t,t),t=>{throw this.status="error",this.error=t,t})}isPending(){return this.status==="pending"}isOk(){return this.status==="success"}read(){switch(this.status){case"pending":throw this.suspender;case"error":throw this.error;default:return this.response}}then(e,t){return this.suspender.then(e,t)}catch(e){return this.suspender.catch(e)}finally(e){return this.suspender.finally(e)}};m5=Symbol.toStringTag;var Dte=class{constructor(){this.storage=typeof localStorage<"u"?localStorage:new Nte}clear(){this.storage.clear()}getString(t){return this.storage.getItem(t)??void 0}setString(t,r){r?this.storage.setItem(t,r):this.storage.removeItem(t)}getObject(t){let r=this.getString(t);return r?JSON.parse(r):void 0}setObject(t,r){this.setString(t,r?br(r):void 0)}},Nte=class{constructor(){this.data=new Map}get length(){return this.data.size}clear(){this.data.clear()}getItem(t){return this.data.get(t)??null}setItem(t,r){r?this.data.set(t,r):this.data.delete(t)}removeItem(t){this.data.delete(t)}key(t){return Array.from(this.data.keys())[t]}},Ate="2.0.28-c60d344",Mte="https://api.medplum.com/",zte=1e3,Lte=6e4,Fte="application/json",AS="application/fhir+json",Vte="application/json-patch+json",MS={resourceType:"Device",id:"system",deviceName:[{name:"System"}]},Bte=(e=>(e.ClientCredentials="client_credentials",e.AuthorizationCode="authorization_code",e.RefreshToken="refresh_token",e.JwtBearer="urn:ietf:params:oauth:grant-type:jwt-bearer",e.TokenExchange="urn:ietf:params:oauth:grant-type:token-exchange",e))(Bte||{}),Ute=(e=>(e.AccessToken="urn:ietf:params:oauth:token-type:access_token",e.RefreshToken="urn:ietf:params:oauth:token-type:refresh_token",e.IdToken="urn:ietf:params:oauth:token-type:id_token",e.Saml1Token="urn:ietf:params:oauth:token-type:saml1",e.Saml2Token="urn:ietf:params:oauth:token-type:saml2",e))(Ute||{}),Wte=class extends EventTarget{constructor(t){if(super(),t!=null&&t.baseUrl&&!t.baseUrl.startsWith("http"))throw new Error("Base URL must start with http or https");this.fetch=(t==null?void 0:t.fetch)??Hte(),this.storage=(t==null?void 0:t.storage)??new Dte,this.createPdfImpl=t==null?void 0:t.createPdf,this.baseUrl=LS(t==null?void 0:t.baseUrl)??Mte,this.fhirBaseUrl=this.baseUrl+(LS(t==null?void 0:t.fhirUrlPath)??"fhir/R4/"),this.clientId=(t==null?void 0:t.clientId)??"",this.authorizeUrl=(t==null?void 0:t.authorizeUrl)??this.baseUrl+"oauth2/authorize",this.tokenUrl=(t==null?void 0:t.tokenUrl)??this.baseUrl+"oauth2/token",this.logoutUrl=(t==null?void 0:t.logoutUrl)??this.baseUrl+"oauth2/logout",this.onUnauthenticated=t==null?void 0:t.onUnauthenticated,this.cacheTime=(t==null?void 0:t.cacheTime)??Lte,this.cacheTime>0?this.requestCache=new jte((t==null?void 0:t.resourceCacheSize)??zte):this.requestCache=void 0,t!=null&&t.autoBatchTime?(this.autoBatchTime=t.autoBatchTime,this.autoBatchQueue=[]):(this.autoBatchTime=0,this.autoBatchQueue=void 0);let r=this.getActiveLogin();r&&(this.setAccessToken(r.accessToken,r.refreshToken),this.refreshProfile().catch(console.log)),this.setupStorageListener()}getBaseUrl(){return this.baseUrl}getAuthorizeUrl(){return this.authorizeUrl}clear(){this.storage.clear(),this.clearActiveLogin()}clearActiveLogin(){var t;this.storage.setString("activeLogin",void 0),(t=this.requestCache)==null||t.clear(),this.accessToken=void 0,this.refreshToken=void 0,this.sessionDetails=void 0,this.medplumServer=void 0,this.dispatchEvent(new Event("change"))}invalidateUrl(t){var r;t=t.toString(),(r=this.requestCache)==null||r.delete(t)}invalidateAll(){var t;(t=this.requestCache)==null||t.clear()}invalidateSearches(t){let r=this.fhirBaseUrl+t;if(this.requestCache)for(let n of this.requestCache.keys())(n.endsWith(r)||n.includes(r+"?"))&&this.requestCache.delete(n)}get(t,r={}){t=t.toString();let n=this.getCacheEntry(t,r);if(n)return n.value;let o;t.startsWith(this.fhirBaseUrl)&&this.autoBatchQueue?o=new Promise((i,l)=>{this.autoBatchQueue.push({method:"GET",url:t.replace(this.fhirBaseUrl,""),options:r,resolve:i,reject:l}),this.autoBatchTimerId||(this.autoBatchTimerId=setTimeout(()=>this.executeAutoBatch(),this.autoBatchTime))}):o=this.request("GET",t,r);let a=new Kn(o);return this.setCacheEntry(t,a),a}post(t,r,n,o={}){return t=t.toString(),r&&this.setRequestBody(o,r),n&&this.setRequestContentType(o,n),this.invalidateUrl(t),this.request("POST",t,o)}put(t,r,n,o={}){return t=t.toString(),r&&this.setRequestBody(o,r),n&&this.setRequestContentType(o,n),this.invalidateUrl(t),this.request("PUT",t,o)}patch(t,r,n={}){return t=t.toString(),this.setRequestBody(n,r),this.setRequestContentType(n,Vte),this.invalidateUrl(t),this.request("PATCH",t,n)}delete(t,r){return t=t.toString(),this.invalidateUrl(t),this.request("DELETE",t,r)}async startNewUser(t,r){let{codeChallengeMethod:n,codeChallenge:o}=await this.startPkce();return this.post("auth/newuser",{...t,clientId:t.clientId??this.clientId,codeChallengeMethod:n,codeChallenge:o},void 0,r)}async startNewProject(t,r){return this.post("auth/newproject",t,void 0,r)}async startNewPatient(t,r){return this.post("auth/newpatient",t,void 0,r)}async startLogin(t,r){return this.post("auth/login",{...await this.ensureCodeChallenge(t),clientId:t.clientId??this.clientId,scope:t.scope},void 0,r)}async startGoogleLogin(t,r){return this.post("auth/google",{...await this.ensureCodeChallenge(t),clientId:t.clientId??this.clientId,scope:t.scope},void 0,r)}async ensureCodeChallenge(t){return t.codeChallenge?t:{...t,...await this.startPkce()}}async signOut(){await this.post(this.logoutUrl,{}),this.clear()}async signInWithRedirect(t){let r=new URLSearchParams(window.location.search).get("code");if(r)return this.processCode(r);await this.requestAuthorization(t)}signOutWithRedirect(){window.location.assign(this.logoutUrl)}async signInWithExternalAuth(t,r,n,o){let a=await this.ensureCodeChallenge(o);window.location.assign(this.getExternalAuthRedirectUri(t,r,n,a))}async exchangeExternalAccessToken(t,r){if(r=r??this.clientId,!r)throw new Error("MedplumClient is missing clientId");let n=new URLSearchParams;return n.set("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),n.set("subject_token_type","urn:ietf:params:oauth:token-type:access_token"),n.set("client_id",r),n.set("subject_token",t),this.fetchTokens(n)}getExternalAuthRedirectUri(t,r,n,o){let a=new URL(t);return a.searchParams.set("response_type","code"),a.searchParams.set("client_id",r),a.searchParams.set("redirect_uri",n),a.searchParams.set("scope","openid profile email"),a.searchParams.set("state",JSON.stringify(o)),a.toString()}fhirUrl(...t){return new URL(this.fhirBaseUrl+t.join("/"))}fhirSearchUrl(t,r){let n=this.fhirUrl(t);return r&&(n.search=new URLSearchParams(r).toString()),n}search(t,r,n){let o=this.fhirSearchUrl(t,r),a=o.toString()+"-search",i=this.getCacheEntry(a,n);if(i)return i.value;let l=new Kn((async()=>{let c=await this.get(o,n);if(c.entry)for(let u of c.entry)this.cacheResource(u.resource);return c})());return this.setCacheEntry(a,l),l}searchOne(t,r,n){let o=this.fhirSearchUrl(t,r);o.searchParams.set("_count","1"),o.searchParams.sort();let a=o.toString()+"-searchOne",i=this.getCacheEntry(a,n);if(i)return i.value;let l=new Kn(this.search(t,o.searchParams,n).then(c=>{var u,d;return(d=(u=c.entry)==null?void 0:u[0])==null?void 0:d.resource}));return this.setCacheEntry(a,l),l}searchResources(t,r,n){let o=this.fhirSearchUrl(t,r).toString()+"-searchResources",a=this.getCacheEntry(o,n);if(a)return a.value;let i=new Kn(this.search(t,r,n).then(VS));return this.setCacheEntry(o,i),i}async*searchResourcePages(t,r,n){var a,i;let o=this.fhirSearchUrl(t,r);for(;o;){let l=new URL(o).searchParams,c=await this.search(t,l,n),u=(a=c.link)==null?void 0:a.find(d=>d.relation==="next");if(!((i=c.entry)!=null&&i.length)&&!u)break;yield VS(c),o=u!=null&&u.url?new URL(u.url):void 0}}searchValueSet(t,r,n){let o=this.fhirUrl("ValueSet","$expand");return o.searchParams.set("url",t),o.searchParams.set("filter",r),this.get(o.toString(),n)}getCached(t,r){var o,a;let n=(a=(o=this.requestCache)==null?void 0:o.get(this.fhirUrl(t,r).toString()))==null?void 0:a.value;return n!=null&&n.isOk()?n.read():void 0}getCachedReference(t){let r=t.reference;if(!r)return;if(r==="system")return MS;let[n,o]=r.split("/");if(!(!n||!o))return this.getCached(n,o)}readResource(t,r,n){return this.get(this.fhirUrl(t,r),n)}readReference(t,r){let n=t.reference;if(!n)return new Kn(Promise.reject(new Error("Missing reference")));if(n==="system")return new Kn(Promise.resolve(MS));let[o,a]=n.split("/");return!o||!a?new Kn(Promise.reject(new Error("Invalid reference"))):this.readResource(o,a,r)}getSchema(){return Pt}requestSchema(t){if(t in Pt.types)return Promise.resolve(Pt);let r=t+"-requestSchema",n=this.getCacheEntry(r,void 0);if(n)return n.value;let o=new Kn((async()=>{let a=`{
90
- StructureDefinitionList(name: "${t}") {
91
- name,
92
- description,
93
- snapshot {
94
- element {
95
- id,
96
- path,
97
- min,
98
- max,
99
- type {
100
- code,
101
- targetProfile
102
- },
103
- binding {
104
- valueSet
105
- },
106
- definition
107
- }
108
- }
109
- }
110
- SearchParameterList(base: "${t}", _count: 100) {
111
- base,
112
- code,
113
- type,
114
- expression,
115
- target
116
- }
117
- }`.replace(/\s+/g," "),i=await this.graphql(a);for(let l of i.data.StructureDefinitionList)xee(l);for(let l of i.data.SearchParameterList)Pee(l);return Pt})());return this.setCacheEntry(r,o),o}readHistory(t,r,n){return this.get(this.fhirUrl(t,r,"_history"),n)}readVersion(t,r,n,o){return this.get(this.fhirUrl(t,r,"_history",n),o)}readPatientEverything(t,r){return this.get(this.fhirUrl("Patient",t,"$everything"),r)}createResource(t,r){if(!t.resourceType)throw new Error("Missing resourceType");return this.invalidateSearches(t.resourceType),this.post(this.fhirUrl(t.resourceType),t,void 0,r)}async createResourceIfNoneExist(t,r,n){return await this.searchOne(t.resourceType,r,n)??this.createResource(t,n)}async createAttachment(t,r,n,o){let a=await this.createBinary(t,r,n,o);return{contentType:n,url:a.url,title:r}}createBinary(t,r,n,o){let a=this.fhirUrl("Binary");return r&&a.searchParams.set("_filename",r),o?this.uploadwithProgress(a,t,n,o):this.post(a,t,n)}uploadwithProgress(t,r,n,o){return new Promise((a,i)=>{let l=new XMLHttpRequest;l.responseType="json",l.onabort=()=>i(new Error("Request aborted")),l.onerror=()=>i(new Error("Request error")),o&&(l.upload.onprogress=c=>o(c),l.upload.onload=c=>o(c)),l.onload=()=>{l.status>=200&&l.status<300?a(l.response):i(new Error(l.statusText))},l.open("POST",t),l.withCredentials=!0,l.setRequestHeader("Authorization","Bearer "+this.accessToken),l.setRequestHeader("Cache-Control","no-cache, no-store, max-age=0"),l.setRequestHeader("Content-Type",n),l.setRequestHeader("X-Medplum","extended"),l.send(r)})}async createPdf(t,r,n,o){if(!this.createPdfImpl)throw new Error("PDF creation not enabled");let a=await this.createPdfImpl(t,n,o);return this.createBinary(a,r,"application/pdf")}createComment(t,r,n){let o=this.getProfile(),a,i;return t.resourceType==="Encounter"&&(a=at(t),i=t.subject),t.resourceType==="ServiceRequest"&&(a=t.encounter,i=t.subject),t.resourceType==="Patient"&&(i=at(t)),this.createResource({resourceType:"Communication",basedOn:[at(t)],encounter:a,subject:i,sender:o?at(o):void 0,sent:new Date().toISOString(),payload:[{contentString:r}]},n)}async updateResource(t,r){if(!t.resourceType)throw new Error("Missing resourceType");if(!t.id)throw new Error("Missing id");this.invalidateSearches(t.resourceType);let n=await this.put(this.fhirUrl(t.resourceType,t.id),t,void 0,r);return n||(n=t),this.cacheResource(n),n}patchResource(t,r,n,o){return this.invalidateSearches(t),this.patch(this.fhirUrl(t,r),n,o)}deleteResource(t,r,n){return this.deleteCacheEntry(this.fhirUrl(t,r).toString()),this.invalidateSearches(t),this.delete(this.fhirUrl(t,r),n)}validateResource(t,r){return this.post(this.fhirUrl(t.resourceType,"$validate"),t,void 0,r)}executeBot(t,r,n,o){let a;if(typeof t=="string"){let i=t;a=this.fhirUrl("Bot",i,"$execute")}else{let i=t;a=this.fhirUrl("Bot","$execute")+`?identifier=${i.system}|${i.value}`}return this.post(a,r,n,o)}executeBatch(t,r){return this.post(this.fhirBaseUrl.slice(0,-1),t,void 0,r)}sendEmail(t,r){return this.post("email/v1/send",t,"application/json",r)}graphql(t,r,n,o){return this.post(this.fhirUrl("$graphql"),{query:t,operationName:r,variables:n},Fte,o)}readResourceGraph(t,r,n,o){return this.get(`${this.fhirUrl(t,r)}/$graph?graph=${n}`,o)}getActiveLogin(){return this.storage.getObject("activeLogin")}async setActiveLogin(t){this.clearActiveLogin(),this.setAccessToken(t.accessToken,t.refreshToken),this.storage.setObject("activeLogin",t),this.addLogin(t),this.refreshPromise=void 0,await this.refreshProfile()}getAccessToken(){return this.accessToken}setAccessToken(t,r){this.accessToken=t,this.refreshToken=r,this.sessionDetails=void 0,this.medplumServer=Ite(t)}getLogins(){return this.storage.getObject("logins")??[]}addLogin(t){let r=this.getLogins().filter(n=>{var o,a;return((o=n.profile)==null?void 0:o.reference)!==((a=t.profile)==null?void 0:a.reference)});r.push(t),this.storage.setObject("logins",r)}async refreshProfile(){return this.medplumServer?(this.profilePromise=new Promise((t,r)=>{this.get("auth/me").then(n=>{this.profilePromise=void 0,this.sessionDetails=n,this.dispatchEvent(new Event("change")),t(n.profile)}).catch(r)}),this.profilePromise):Promise.resolve(void 0)}isLoading(){return!!this.profilePromise}isSuperAdmin(){var t;return!!((t=this.sessionDetails)!=null&&t.project.superAdmin)}isProjectAdmin(){var t;return!!((t=this.sessionDetails)!=null&&t.membership.admin)}getProject(){var t;return(t=this.sessionDetails)==null?void 0:t.project}getProjectMembership(){var t;return(t=this.sessionDetails)==null?void 0:t.membership}getProfile(){var t;return(t=this.sessionDetails)==null?void 0:t.profile}async getProfileAsync(){return this.profilePromise&&await this.profilePromise,this.getProfile()}getUserConfiguration(){var t;return(t=this.sessionDetails)==null?void 0:t.config}getAccessPolicy(){var t;return(t=this.sessionDetails)==null?void 0:t.accessPolicy}async download(t,r={}){return this.refreshPromise&&await this.refreshPromise,this.addFetchOptionsDefaults(r),(await this.fetch(t.toString(),r)).blob()}async uploadMedia(t,r,n,o,a){let i=await this.createBinary(t,n,r);return this.createResource({...o,resourceType:"Media",content:{contentType:r,url:"Binary/"+i.id,title:n}},a)}async bulkExport(t="",r,n,o){let a=t&&`${t}/`,i=this.fhirUrl(`${a}$export`);return r&&i.searchParams.set("_type",r),n&&i.searchParams.set("_since",n),this.startAsyncRequest(i.toString(),o)}async startAsyncRequest(t,r={}){this.addFetchOptionsDefaults(r);let n=r.headers;n.Prefer="respond-async";let o=await this.fetchWithRetry(t,r);if(o.status===202){let a=await FS(o);if(a)return this.pollStatus(a)}return this.parseResponse(o,"POST",t)}getCacheEntry(t,r){if(!this.requestCache||(r==null?void 0:r.cache)==="no-cache"||(r==null?void 0:r.cache)==="reload")return;let n=this.requestCache.get(t);if(!(!n||n.requestTime+this.cacheTime<Date.now()))return n}setCacheEntry(t,r){this.requestCache&&this.requestCache.set(t,{requestTime:Date.now(),value:r})}cacheResource(t){t!=null&&t.id&&this.setCacheEntry(this.fhirUrl(t.resourceType,t.id).toString(),new Kn(Promise.resolve(t)))}deleteCacheEntry(t){this.requestCache&&this.requestCache.delete(t)}async request(t,r,n={}){this.refreshPromise&&await this.refreshPromise,n.method=t,this.addFetchOptionsDefaults(n);let o=await this.fetchWithRetry(r,n);return this.parseResponse(o,t,r,n)}async parseResponse(t,r,n,o={}){var l;if(t.status===401)return this.handleUnauthenticated(r,n,o);if(t.status===204||t.status===304)return;let a=(l=t.headers.get("content-type"))==null?void 0:l.includes("json");if(t.status===404&&!a)throw new Tn(KZ);let i;if(a)try{i=await t.json()}catch(c){throw console.error("Error parsing response",t.status,c),c}if(t.status>=400)throw new Tn(yt(i));return i}async fetchWithRetry(t,r){t.startsWith("http")||(t=new URL(t,this.baseUrl).href);let n=3,o=200,a;for(let i=0;i<n;i++){try{if(a=await this.fetch(t,r),a.status<500)return a}catch(l){this.retryCatch(i,n,l)}await kS(o)}return a}async pollStatus(t){let r=!0,n,o=2e3;for(;r;){let a={};this.addFetchOptionsDefaults(a);let i=await this.fetchWithRetry(t,a);if(i.status!==202&&(r=!1,n=i,i.status===201)){let l=await FS(i);l&&(n=await this.fetchWithRetry(l,a))}await kS(o)}return this.parseResponse(n,"POST",t)}async executeAutoBatch(){var o,a;let t=[...this.autoBatchQueue];if(this.autoBatchQueue.length=0,this.autoBatchTimerId=void 0,t.length===1){let i=t[0];try{i.resolve(await this.request(i.method,this.fhirBaseUrl+i.url,i.options))}catch(l){i.reject(new Tn(yt(l)))}return}let r={resourceType:"Bundle",type:"batch",entry:t.map(i=>({request:{method:i.method,url:i.url},resource:i.options.body?JSON.parse(i.options.body):void 0}))},n=await this.post(this.fhirBaseUrl.slice(0,-1),r);for(let i=0;i<t.length;i++){let l=t[i],c=(o=n.entry)==null?void 0:o[i];(a=c==null?void 0:c.response)!=null&&a.outcome&&!VI(c.response.outcome)?l.reject(new Tn(c.response.outcome)):l.resolve(c==null?void 0:c.resource)}}addFetchOptionsDefaults(t){let r=t.headers;r||(r={},t.headers=r),r.Accept=AS,r["X-Medplum"]="extended",t.body&&!r["Content-Type"]&&(r["Content-Type"]=AS),this.accessToken?r.Authorization="Bearer "+this.accessToken:this.basicAuth&&(r.Authorization="Basic "+this.basicAuth),t.cache||(t.cache="no-cache"),t.credentials||(t.credentials="include")}setRequestContentType(t,r){t.headers||(t.headers={});let n=t.headers;n["Content-Type"]=r}setRequestBody(t,r){typeof r=="string"||typeof Blob<"u"&&r instanceof Blob||typeof File<"u"&&r instanceof File||typeof Uint8Array<"u"&&r instanceof Uint8Array?t.body=r:r&&(t.body=JSON.stringify(r))}handleUnauthenticated(t,r,n){return this.refresh()?this.request(t,r,n):(this.clearActiveLogin(),this.onUnauthenticated&&this.onUnauthenticated(),Promise.reject(new Error("Unauthenticated")))}async startPkce(){let t=NS();sessionStorage.setItem("pkceState",t);let r=NS();sessionStorage.setItem("codeVerifier",r);let n=await Rte(r),o=_ee(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","");return sessionStorage.setItem("codeChallenge",o),{codeChallengeMethod:"S256",codeChallenge:o}}async requestAuthorization(t){let r=await this.ensureCodeChallenge(t??{}),n=new URL(this.authorizeUrl);n.searchParams.set("response_type","code"),n.searchParams.set("state",sessionStorage.getItem("pkceState")),n.searchParams.set("client_id",r.clientId??this.clientId),n.searchParams.set("redirect_uri",r.redirectUri??zS()),n.searchParams.set("code_challenge_method",r.codeChallengeMethod),n.searchParams.set("code_challenge",r.codeChallenge),n.searchParams.set("scope",r.scope??"openid profile"),window.location.assign(n.toString())}processCode(t,r){let n=new URLSearchParams;if(n.set("grant_type","authorization_code"),n.set("code",t),n.set("client_id",(r==null?void 0:r.clientId)??this.clientId),n.set("redirect_uri",(r==null?void 0:r.redirectUri)??zS()),typeof sessionStorage<"u"){let o=sessionStorage.getItem("codeVerifier");o&&n.set("code_verifier",o)}return this.fetchTokens(n)}refresh(){if(this.refreshPromise)return this.refreshPromise;if(this.refreshToken){let t=new URLSearchParams;return t.set("grant_type","refresh_token"),t.set("client_id",this.clientId),t.set("refresh_token",this.refreshToken),this.refreshPromise=this.fetchTokens(t),this.refreshPromise}if(this.clientId&&this.clientSecret)return this.refreshPromise=this.startClientLogin(this.clientId,this.clientSecret),this.refreshPromise}async startClientLogin(t,r){this.clientId=t,this.clientSecret=r;let n=new URLSearchParams;return n.set("grant_type","client_credentials"),n.set("client_id",t),n.set("client_secret",r),this.fetchTokens(n)}async startJwtBearerLogin(t,r,n){this.clientId=t;let o=new URLSearchParams;return o.set("grant_type","urn:ietf:params:oauth:grant-type:jwt-bearer"),o.set("client_id",t),o.set("assertion",r),o.set("scope",n),this.fetchTokens(o)}setBasicAuth(t,r){this.clientId=t,this.clientSecret=r,this.basicAuth=Ote(t+":"+r)}async invite(t,r){return this.post("admin/projects/"+t+"/invite",r)}async fetchTokens(t){let r={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t,credentials:"include"},n=r.headers;this.basicAuth&&(n.Authorization=`Basic ${this.basicAuth}`);let o=await this.fetch(this.tokenUrl,r);if(!o.ok){this.clearActiveLogin();try{let i=await o.json();throw new Tn(Ia(i.error_description))}catch(i){throw new Tn(Ia("Failed to fetch tokens"),i)}}let a=await o.json();return await this.verifyTokens(a),this.getProfile()}async verifyTokens(t){let r=t.access_token,n=p5(r);if(Date.now()>=n.exp*1e3)throw this.clearActiveLogin(),new Error("Token expired");if(n.cid){if(n.cid!==this.clientId)throw this.clearActiveLogin(),new Error("Token was not issued for this audience")}else if(this.clientId&&n.client_id!==this.clientId)throw this.clearActiveLogin(),new Error("Token was not issued for this audience");return this.setActiveLogin({accessToken:r,refreshToken:t.refresh_token,project:t.project,profile:t.profile})}setupStorageListener(){try{window.addEventListener("storage",t=>{(t.key===null||t.key==="activeLogin")&&window.location.reload()})}catch{}}retryCatch(t,r,n){if(n.message==="Failed to fetch"&&t===1&&this.dispatchEvent(new Event("offline")),t>=r-1)throw n}};function Hte(){if(!globalThis.fetch)throw new Error("Fetch not available in this environment");return globalThis.fetch.bind(globalThis)}function zS(){return typeof window>"u"?"":window.location.protocol+"//"+window.location.host+"/"}function LS(e){return e&&(e.endsWith("/")?e:e+"/")}async function FS(e){var o,a;let t=e.headers.get("content-location");if(t)return t;let r=e.headers.get("location");if(r)return r;let n=await e.json();if(xm(n)&&((a=(o=n.issue)==null?void 0:o[0])!=null&&a.diagnostics))return n.issue[0].diagnostics}function VS(e){var r;let t=((r=e.entry)==null?void 0:r.map(n=>n.resource))??[];return Object.assign(t,{bundle:e})}[...u0];d0().registerInfix("->",{precedence:Ne.Arrow}).registerInfix(";",{precedence:Ne.Semicolon});[...u0];d0();function qte(e){let t=e.value;return t?s.createElement(s.Fragment,null,eee(t)):null}function BS(e,t){return e.line&&e.line.length>t?e.line[t]:""}function US(e,t,r){let n=e.line||[];for(;n.length<=t;)n.push("");return n[t]=r,{...e,line:n}}function Qte(e){let[t,r]=f.useState(e.defaultValue||{}),n=f.useRef();n.current=t;function o(h){r(h),e.onChange&&e.onChange(h)}function a(h){o({...n.current,use:h})}function i(h){o({...n.current,type:h})}function l(h){o(US(n.current||{},0,h))}function c(h){o(US(n.current||{},1,h))}function u(h){o({...n.current,city:h})}function d(h){o({...n.current,state:h})}function m(h){o({...n.current,postalCode:h})}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(vt,{"data-testid":"address-use",defaultValue:t.use,onChange:h=>a(h.currentTarget.value),data:["","home","work","temp","old","billing"]}),s.createElement(vt,{"data-testid":"address-type",defaultValue:t.type,onChange:h=>i(h.currentTarget.value),data:["","postal","physical","both"]}),s.createElement(ne,{placeholder:"Line 1",defaultValue:BS(t,0),onChange:h=>l(h.currentTarget.value)}),s.createElement(ne,{placeholder:"Line 2",defaultValue:BS(t,1),onChange:h=>c(h.currentTarget.value)}),s.createElement(ne,{placeholder:"City",defaultValue:t.city,onChange:h=>u(h.currentTarget.value)}),s.createElement(ne,{placeholder:"State",defaultValue:t.state,onChange:h=>d(h.currentTarget.value)}),s.createElement(ne,{placeholder:"Postal Code",defaultValue:t.postalCode,onChange:h=>m(h.currentTarget.value)}))}var h5=f.createContext(void 0);function Gte(e){let t=e.medplum,r=e.navigate??Kte,[n,o]=f.useState({profile:t.getProfile(),loading:!1});f.useEffect(()=>{function i(){o({...n,profile:t.getProfile()})}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t,n]),f.useEffect(()=>{function i(){ie({color:"red",message:"No connection to server",autoClose:!1})}return t.addEventListener("offline",i),()=>t.removeEventListener("offline",i)},[t]);let a=f.useMemo(()=>({...n,medplum:t,navigate:r}),[n,t,r]);return s.createElement(h5.Provider,{value:a},e.children)}function Pm(){return f.useContext(h5)}function te(){return Pm().medplum}function $m(){return Pm().navigate}function g5(){return Pm().profile}function Kte(e){window.location.assign(e)}function Yte(e){let t=g5(),[r,n]=f.useState(e.defaultValue||{}),o=f.useRef();o.current=r;function a(i){let l=i?{text:i,authorReference:t&&at(t),time:new Date().toISOString()}:{};n(l),e.onChange&&e.onChange(l)}return s.createElement(ne,{name:e.name,placeholder:"Annotation text",defaultValue:r.text,onChange:i=>a(i.currentTarget.value)})}var Xte={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Jte=Object.defineProperty,Zte=Object.defineProperties,ere=Object.getOwnPropertyDescriptors,vp=Object.getOwnPropertySymbols,v5=Object.prototype.hasOwnProperty,y5=Object.prototype.propertyIsEnumerable,WS=(e,t,r)=>t in e?Jte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HS=(e,t)=>{for(var r in t||(t={}))v5.call(t,r)&&WS(e,r,t[r]);if(vp)for(var r of vp(t))y5.call(t,r)&&WS(e,r,t[r]);return e},tre=(e,t)=>Zte(e,ere(t)),rre=(e,t)=>{var r={};for(var n in e)v5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vp)for(var n of vp(e))t.indexOf(n)<0&&y5.call(e,n)&&(r[n]=e[n]);return r},Ee=(e,t,r)=>{let n=f.forwardRef((o,a)=>{var i=o,{color:l="currentColor",size:c=24,stroke:u=2,children:d}=i,m=rre(i,["color","size","stroke","children"]);return f.createElement("svg",HS(tre(HS({ref:a},Xte),{width:c,height:c,stroke:l,strokeWidth:u,className:`tabler-icon tabler-icon-${e}`}),m),[...r.map(([h,g])=>f.createElement(h,g)),...d||[]])});return n.propTypes={color:xe.string,size:xe.oneOfType([xe.string,xe.number]),stroke:xe.oneOfType([xe.string,xe.number])},n.displayName=`${t}`,n},nre=Ee("adjustments-horizontal","IconAdjustmentsHorizontal",[["path",{d:"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M4 6l8 0",key:"svg-1"}],["path",{d:"M16 6l4 0",key:"svg-2"}],["path",{d:"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M4 12l2 0",key:"svg-4"}],["path",{d:"M10 12l10 0",key:"svg-5"}],["path",{d:"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-6"}],["path",{d:"M4 18l11 0",key:"svg-7"}],["path",{d:"M19 18l1 0",key:"svg-8"}]]),p0=Ee("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),ore=Ee("bleach-off","IconBleachOff",[["path",{d:"M5 19h14m1.986 -1.977a2 2 0 0 0 -.146 -.773l-7.1 -12.25a2 2 0 0 0 -3.5 0l-.815 1.405m-1.488 2.568l-4.797 8.277a2 2 0 0 0 1.75 2.75",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),are=Ee("bleach","IconBleach",[["path",{d:"M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75",key:"svg-0"}]]),ire=Ee("box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]),lre=Ee("brackets-contain","IconBracketsContain",[["path",{d:"M7 4h-4v16h4",key:"svg-0"}],["path",{d:"M17 4h4v16h-4",key:"svg-1"}],["path",{d:"M8 16h.01",key:"svg-2"}],["path",{d:"M12 16h.01",key:"svg-3"}],["path",{d:"M16 16h.01",key:"svg-4"}]]),sre=Ee("bucket-off","IconBucketOff",[["path",{d:"M5.029 5.036c-.655 .58 -1.029 1.25 -1.029 1.964c0 2.033 3.033 3.712 6.96 3.967m3.788 -.21c3.064 -.559 5.252 -2.029 5.252 -3.757c0 -2.21 -3.582 -4 -8 -4c-1.605 0 -3.1 .236 -4.352 .643",key:"svg-0"}],["path",{d:"M4 7c0 .664 .088 1.324 .263 1.965l2.737 10.035c.5 1.5 2.239 2 5 2s4.5 -.5 5 -2c.1 -.3 .252 -.812 .457 -1.535m.862 -3.146c.262 -.975 .735 -2.76 1.418 -5.354a7.45 7.45 0 0 0 .263 -1.965",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),cre=Ee("bucket","IconBucket",[["path",{d:"M12 7m-8 0a8 4 0 1 0 16 0a8 4 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 7c0 .664 .088 1.324 .263 1.965l2.737 10.035c.5 1.5 2.239 2 5 2s4.5 -.5 5 -2c.333 -1 1.246 -4.345 2.737 -10.035a7.45 7.45 0 0 0 .263 -1.965",key:"svg-1"}]]),va=Ee("calendar","IconCalendar",[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]]),ure=Ee("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),dre=Ee("checkbox","IconCheckbox",[["path",{d:"M9 11l3 3l8 -8",key:"svg-0"}],["path",{d:"M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9",key:"svg-1"}]]),fre=Ee("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),yp=Ee("circle-minus","IconCircleMinus",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]]),m0=Ee("circle-plus","IconCirclePlus",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}],["path",{d:"M12 9l0 6",key:"svg-2"}]]),w5=Ee("cloud-upload","IconCloudUpload",[["path",{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1",key:"svg-0"}],["path",{d:"M9 15l3 -3l3 3",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}]]),pre=Ee("columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]),mre=Ee("currency-dollar","IconCurrencyDollar",[["path",{d:"M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2",key:"svg-0"}],["path",{d:"M12 3v3m0 12v3",key:"svg-1"}]]),hre=Ee("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),gre=Ee("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),Om=Ee("equal-not","IconEqualNot",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}],["path",{d:"M5 19l14 -14",key:"svg-2"}]]),Cm=Ee("equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]),vre=Ee("file-alert","IconFileAlert",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 17l.01 0",key:"svg-2"}],["path",{d:"M12 11l0 3",key:"svg-3"}]]),yre=Ee("file-plus","IconFilePlus",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M12 11l0 6",key:"svg-2"}],["path",{d:"M9 14l6 0",key:"svg-3"}]]),wre=Ee("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]),_re=Ee("list-details","IconListDetails",[["path",{d:"M13 5h8",key:"svg-0"}],["path",{d:"M13 9h5",key:"svg-1"}],["path",{d:"M13 15h8",key:"svg-2"}],["path",{d:"M13 19h5",key:"svg-3"}],["path",{d:"M3 4m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M3 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z",key:"svg-5"}]]),bre=Ee("logout","IconLogout",[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]]),_5=Ee("math-greater","IconMathGreater",[["path",{d:"M5 18l14 -6l-14 -6",key:"svg-0"}]]),b5=Ee("math-lower","IconMathLower",[["path",{d:"M19 18l-14 -6l14 -6",key:"svg-0"}]]),xre=Ee("message","IconMessage",[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z",key:"svg-2"}]]),Ere=Ee("pin","IconPin",[["path",{d:"M15 4.5l-4 4l-4 1.5l-1.5 1.5l7 7l1.5 -1.5l1.5 -4l4 -4",key:"svg-0"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-1"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-2"}]]),Sre=Ee("pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]),Pre=Ee("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),$re=Ee("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),nv=Ee("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),h0=Ee("sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),g0=Ee("sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),Ore=Ee("square","IconSquare",[["path",{d:"M3 3m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}]]),Cre=Ee("switch-horizontal","IconSwitchHorizontal",[["path",{d:"M16 3l4 4l-4 4",key:"svg-0"}],["path",{d:"M10 7l10 0",key:"svg-1"}],["path",{d:"M8 13l-4 4l4 4",key:"svg-2"}],["path",{d:"M4 17l9 0",key:"svg-3"}]]),kre=Ee("table-export","IconTableExport",[["path",{d:"M12.5 21h-7.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v7.5",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}],["path",{d:"M16 19h6",key:"svg-3"}],["path",{d:"M19 16l3 3l-3 3",key:"svg-4"}]]),x5=Ee("trash","IconTrash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]]),jre=Ee("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),E5=class extends s.Component{constructor(e){super(e),this.state={}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.error?s.createElement(Gs,{icon:s.createElement(p0,{size:16}),title:"Something went wrong",color:"red"},$e(this.state.error)):this.props.children}};function oa(){return s.createElement(tr,{style:{width:"100%",height:"100vh"}},s.createElement(Un,null))}function v0(e){let t=e.value;return t?s.createElement(s.Fragment,null,nc(t,e.options)):null}function gt(e){e.preventDefault(),e.stopPropagation()}function S5(e){if(qS(e))return!0;if(e instanceof HTMLTableCellElement){let t=e.children;if(t.length===1&&qS(t[0]))return!0}return!1}function qS(e){return e instanceof HTMLInputElement&&e.type==="checkbox"}function Ce(e){let t=$m(),{to:r,suffix:n,label:o,onClick:a,children:i,...l}=e,c=Rre(r);return n&&(c+="/"+n),s.createElement(dt,{href:c,"aria-label":o,onClick:u=>{gt(u),a?a(u):r&&t(c)},...l},i)}function Rre(e){if(e){if(typeof e=="string")return Tre(e);if(bo(e))return Ire(e);if(t0(e))return Dre(e)}return"#"}function Tre(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:"/"+e}function Ire(e){return`/${e.resourceType}/${e.id}`}function Dre(e){return`/${e.reference}`}function Xe(e,t){let r=te(),[n,o]=f.useState(QS(r,e)),a=f.useCallback(i=>{Sm(i,n)||o(i)},[n,o]);return f.useEffect(()=>{a(QS(r,e))},[r,e,a]),f.useEffect(()=>{let i=!0;return t0(e)&&r.readReference(e).then(l=>{i&&a(l)}).catch(l=>{i&&(a(void 0),t&&t(yt(l)))}),()=>i=!1},[r,n,e,a,t]),n}function QS(e,t){if(t){if(bo(t))return t;if(t0(t))return e.getCachedReference(t)}}function aa(e){let t=Xe(e.value),r=t?fo(t):e.alt??"",n=(t&&fee(t))??e.src,o=e.radius??"xl",a={...e};return delete a.value,delete a.link,e.link?s.createElement(Ce,{to:t},s.createElement(Jd,{src:n,alt:r,radius:o,...a})):s.createElement(Jd,{src:n,alt:r,radius:o,...a})}function y0(e){let{defaultValue:t,toKey:r,toOption:n,loadOptions:o,onChange:a,onCreate:i,creatable:l,...c}=e,u=Nre(t),d=f.useRef(null),[m,h]=f.useState(void 0),[g,y]=f.useState(),[_,E]=f.useState(),[w,v]=f.useState(),[b,x]=f.useState(u.map(n)),[P,O]=f.useState([]),$=f.useRef();$.current=m;let C=f.useRef();C.current=g;let R=f.useRef();R.current=_;let j=f.useRef();j.current=w;let k=f.useRef();k.current=P;let T=f.useCallback(()=>{var q;y(void 0);let A=((q=d.current)==null?void 0:q.value.trim())||"";if(A===$.current)return;h(A);let z=new AbortController;E(z),o(A,z.signal).then(le=>{z.signal.aborted||(O(le.map(n)),E(void 0),j.current&&(le.length>0&&a(le.slice(0,1)),v(!1)))}).catch(le=>{z.signal.aborted||le.message.includes("aborted")||ie({color:"red",message:$e(le)})})},[o,a,n]),L=f.useCallback(()=>{R.current&&(R.current.abort(),E(void 0)),C.current!==void 0&&window.clearTimeout(C.current);let A=window.setTimeout(()=>T(),100);y(A)},[T]),U=f.useCallback(A=>{var le;let z=[],q=[];for(let ye of A){let Re=(le=k.current)==null?void 0:le.find(qe=>qe.value===ye),me=Re==null?void 0:Re.resource;!me&&l!==!1&&i&&(me=i(ye),Re=n(me)),me&&z.push(me),Re&&q.push(Re)}a(z),x(q)},[l,a,i,n]),V=f.useCallback(A=>{A.key==="Enter"&&(!C.current&&!R.current?(gt(A),k.current&&k.current.length>0&&(O(k.current.slice(0,1)),U([k.current[0].value]))):v(!0))},[U]),M=f.useCallback(A=>{let z=n(i(A));return O([...k.current,z]),z},[i,O,n]),Q=f.useCallback((A,z)=>!z,[]);return f.useEffect(()=>()=>{R.current&&R.current.abort()},[]),s.createElement($T,{...c,ref:d,defaultValue:u.map(r),searchable:!0,onKeyDown:V,onSearchChange:L,data:[...b,...P],onFocus:T,onChange:U,onCreate:M,rightSectionWidth:40,rightSection:_?s.createElement(Un,{size:16}):null,filter:Q,creatable:!0})}function Nre(e){return e?Array.isArray(e)?e:[e]:[]}var Are=W(()=>({searchInput:{input:{width:220,transition:"width 0.2s"},"input:focus":{width:400},"@media (max-width: 800px)":{input:{width:150},"input:focus":{width:150}}}}));function Mre(e){return e.id}function zre(e){return{value:e.id,label:fo(e),resource:e}}function Lre(e){let{classes:t}=Are(),r=$m(),n=te(),o=f.useCallback(async(i,l)=>{let c=Vre(i),u={signal:l},d=await n.graphql(c,void 0,void 0,u);return Bre(d,i)},[n]),a=f.useCallback(i=>{i.length>0&&r(`/${ot(i[0])}`)},[r]);return s.createElement(y0,{key:`${e.pathname}?${e.searchParams}`,size:"sm",radius:"md",className:t.searchInput,icon:s.createElement($re,{size:16}),placeholder:"Search",itemComponent:Fre,toKey:Mre,toOption:zre,onChange:a,loadOptions:o,maxSelectedValues:0,clearSearchOnChange:!0,clearable:!1})}var Fre=f.forwardRef(({resource:e,...t},r)=>{var o;let n;return e.resourceType==="Patient"?n=e.birthDate:e.resourceType==="ServiceRequest"&&(n=(o=e.subject)==null?void 0:o.display),s.createElement("div",{ref:r,...t},s.createElement(J,{noWrap:!0},s.createElement(aa,{value:e}),s.createElement("div",null,s.createElement(ae,null,fo(e)),s.createElement(ae,{size:"xs",color:"dimmed"},n))))});function Vre(e){let t=JSON.stringify(e);return XI(e)?`{
118
- Patients1: PatientList(_id: ${t}, _count: 1) {
119
- resourceType
120
- id
121
- identifier {
122
- system
123
- value
124
- }
125
- name {
126
- given
127
- family
128
- }
129
- birthDate
130
- }
131
- ServiceRequestList(_id: ${t}, _count: 1) {
132
- resourceType
133
- id
134
- identifier {
135
- system
136
- value
137
- }
138
- subject {
139
- display
140
- }
141
- }
142
- }`.replace(/\s+/g," "):`{
143
- Patients1: PatientList(name: ${t}, _count: 5) {
144
- resourceType
145
- id
146
- identifier {
147
- system
148
- value
149
- }
150
- name {
151
- given
152
- family
153
- }
154
- birthDate
155
- }
156
- Patients2: PatientList(identifier: ${t}, _count: 5) {
157
- resourceType
158
- id
159
- identifier {
160
- system
161
- value
162
- }
163
- name {
164
- given
165
- family
166
- }
167
- birthDate
168
- }
169
- ServiceRequestList(identifier: ${t}, _count: 5) {
170
- resourceType
171
- id
172
- identifier {
173
- system
174
- value
175
- }
176
- subject {
177
- display
178
- }
179
- }
180
- }`.replace(/\s+/g," ")}function Bre(e,t){let r=[];return e.data.Patients1&&r.push(...e.data.Patients1),e.data.Patients2&&r.push(...e.data.Patients2),e.data.ServiceRequestList&&r.push(...e.data.ServiceRequestList),Wre(Ure(r),t).slice(0,5)}function Ure(e){let t=new Set,r=[];for(let n of e)t.has(n.id)||(t.add(n.id),r.push(n));return r}function Wre(e,t){return e.sort((r,n)=>GS(n,t)-GS(r,t))}function GS(e,t){let r=0;if(e.identifier)for(let n of e.identifier)r=Math.max(r,KS(n.value,t));if(e.resourceType==="Patient"&&e.name)for(let n of e.name)r=Math.max(r,KS(nc(n),t));return r}function KS(e,t){if(!e)return 0;let r=e.toLowerCase().indexOf(t.toLowerCase());return r<0?0:100-r}var Hre=W(e=>({logoButton:{padding:`${e.spacing.xs} ${e.spacing.sm}`,borderRadius:e.radius.sm,transition:"background-color 100ms ease","&:hover":{backgroundColor:e.fn.lighten(e.fn.variant({variant:"filled",color:e.primaryColor}).background,.8)}},user:{padding:`${e.spacing.xs} ${e.spacing.sm}`,borderRadius:e.radius.sm,transition:"background-color 100ms ease","&:hover":{backgroundColor:e.fn.lighten(e.fn.variant({variant:"filled",color:e.primaryColor}).background,.8)}},userName:{fontWeight:500,lineHeight:1,marginRight:3,[e.fn.smallerThan("xs")]:{display:"none"}},userActive:{backgroundColor:e.fn.lighten(e.fn.variant({variant:"filled",color:e.primaryColor}).background,.8)}}));function qre(e){var d,m,h,g;let t=Pm(),{medplum:r,profile:n,navigate:o}=t,a=r.getLogins(),{classes:i,cx:l}=Hre(),[c,u]=f.useState(!1);return s.createElement(Q2,{height:60,p:8,style:{zIndex:101}},s.createElement(J,{position:"apart"},s.createElement(J,{spacing:"xs"},s.createElement(Jo,{className:i.logoButton,onClick:e.navbarToggle},e.logo),s.createElement(Lre,{pathname:e.pathname,searchParams:e.searchParams})),s.createElement(G,{width:260,shadow:"xl",position:"bottom-end",transitionProps:{transition:"pop-top-right"},opened:c,onClose:()=>u(!1)},s.createElement(G.Target,null,s.createElement(Jo,{className:l(i.user,{[i.userActive]:c}),onClick:()=>u(y=>!y)},s.createElement(J,{spacing:7},s.createElement(aa,{value:n,radius:"xl",size:24}),s.createElement(ae,{size:"sm",className:i.userName},nc((d=n==null?void 0:n.name)==null?void 0:d[0])),s.createElement(fre,{size:12,stroke:1.5})))),s.createElement(G.Dropdown,null,s.createElement(Oe,{align:"center",p:"xl"},s.createElement(aa,{size:"xl",radius:100,value:t.profile}),s.createElement(v0,{value:(h=(m=t.profile)==null?void 0:m.name)==null?void 0:h[0]}),s.createElement(ae,{color:"dimmed",size:"xs"},(g=r.getActiveLogin())==null?void 0:g.project.display)),a.length>1&&s.createElement(G.Divider,null),a.map(y=>y.profile.reference!==ot(t.profile)&&s.createElement(G.Item,{key:y.profile.reference,onClick:()=>{r.setActiveLogin(y).then(()=>window.location.reload()).catch(console.log)}},s.createElement(J,null,s.createElement(Jd,{radius:"xl"}),s.createElement("div",{style:{flex:1}},s.createElement(ae,{size:"sm",weight:500},y.profile.display),s.createElement(ae,{color:"dimmed",size:"xs"},y.project.display))))),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Cre,{size:14,stroke:1.5}),onClick:()=>o("/signin")},"Add another account"),s.createElement(G.Item,{icon:s.createElement(nv,{size:14,stroke:1.5}),onClick:()=>o(`/${ot(n)}`)},"Account settings"),s.createElement(G.Item,{icon:s.createElement(bre,{size:14,stroke:1.5}),onClick:async()=>{await r.signOut(),o("/signin")}},"Sign out"),s.createElement(ae,{size:"xs",color:"dimmed",align:"center"},e.version)))))}function Qre(e){let t={};for(let r of Array.from(e.elements))r instanceof HTMLInputElement?Gre(t,r):r instanceof HTMLTextAreaElement?t[r.name]=r.value:r instanceof HTMLSelectElement&&Kre(t,r);return t}function Gre(e,t){t.disabled||(t.type==="checkbox"||t.type==="radio")&&!t.checked||(e[t.name]=t.value)}function Kre(e,t){e[t.name]=t.value}function Ie(e){return s.createElement("form",{style:e.style,"data-testid":e.testid,onSubmit:t=>{t.preventDefault();let r=Qre(t.target);e.onSubmit&&e.onSubmit(r)}},e.children)}function Yre(e){let t=te(),r=t.getUserConfiguration();function n(o){var u,d,m;let{menuname:a,bookmarkname:i}=o,l=`${e.pathname}?${e.searchParams.toString()}`,c=oc(r);(m=(d=(u=c.menu)==null?void 0:u.find(({title:h})=>h===a))==null?void 0:d.link)==null||m.push({name:i,target:l}),t.updateResource(c).then(h=>{r.menu=h.menu,t.dispatchEvent(new Event("change")),ie({color:"green",message:"Success"}),e.onOk()}).catch(h=>{ie({color:"red",message:$e(h)})})}return s.createElement(Er,{title:"Add Bookmark",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:e.onCancel},s.createElement(Ie,{onSubmit:n},s.createElement(Oe,null,s.createElement(Xre,{config:r}),s.createElement(ne,{label:"Bookmark Name",type:"text",name:"bookmarkname",placeholder:"bookmark name",withAsterisk:!0}),s.createElement(J,{position:"right"},s.createElement(Z,{mt:"sm",type:"submit"},"OK")))))}function Xre(e){function t(n){var o;return(o=n==null?void 0:n.menu)==null?void 0:o.map(a=>a.title)}let r=t(e.config);return s.createElement(vt,{name:"menuname",defaultValue:r[0],label:"Select Menu Option",placeholder:"Menu",data:r,withAsterisk:!0})}function w0(e){return typeof e.code=="string"?e.code:JSON.stringify(e)}function Jre(e){return typeof e.display=="string"?e.display:w0(e)}function Zre(e){return{value:w0(e),label:Jre(e),resource:e}}function ene(e){return{code:e,display:e}}function _0(e){let t=te(),{elementDefinition:r,creatable:n,clearable:o,...a}=e,i=f.useCallback(async(l,c)=>{var h;if(!r.binding)return[];let u=r.binding.valueSet,d=(h=(await t.searchValueSet(u,l,{signal:c})).expansion)==null?void 0:h.contains,m=[];for(let g of d)g.code&&!m.some(y=>y.code===g.code)&&m.push(g);return m},[t,r]);return s.createElement(y0,{...a,creatable:n??!0,clearable:o??!0,toKey:w0,toOption:Zre,loadOptions:i,onCreate:ene,getCreateLabel:n===!1?void 0:l=>`+ Create ${l}`})}function P5(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=o[0],i=rne(a);r(i),e.onChange&&e.onChange(i)}return s.createElement(_0,{elementDefinition:e.property,name:e.name,placeholder:e.placeholder,defaultValue:tne(t),onChange:n,creatable:e.creatable,maxSelectedValues:e.maxSelectedValues??1,clearSearchOnChange:e.clearSearchOnChange,clearable:e.clearable})}function tne(e){return e?{code:e}:void 0}function rne(e){return e==null?void 0:e.code}var $5=W(e=>({menuTitle:{margin:"20px 0 4px 6px",fontSize:"9px",fontWeight:"normal",textTransform:"uppercase",letterSpacing:"2px"},link:{...e.fn.focusStyles(),display:"flex",alignItems:"center",textDecoration:"none",fontSize:e.fontSizes.sm,color:e.colorScheme==="dark"?e.colors.dark[1]:e.colors.gray[7],padding:"8px 12px",borderRadius:e.radius.sm,fontWeight:500,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0],color:e.colorScheme==="dark"?e.white:e.black,textDecoration:"none","& svg":{color:e.colorScheme==="dark"?e.white:e.black}},"& svg":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6],marginRight:e.spacing.sm,strokeWidth:1.5,width:18,height:18}},linkActive:{"&, &:hover":{backgroundColor:e.fn.variant({variant:"light",color:e.primaryColor}).background,color:e.fn.variant({variant:"light",color:e.primaryColor}).color,"& svg":{color:e.fn.variant({variant:"light",color:e.primaryColor}).color}}}}));function nne(e){var c;let{classes:t}=$5(),r=$m(),n=ine(e.pathname,e.searchParams,e.menus),[o,a]=f.useState(!1);function i(u,d){u.stopPropagation(),u.preventDefault(),r(d),window.innerWidth<768&&e.closeNavbar()}function l(u){u&&r(`/${u}`)}return s.createElement(s.Fragment,null,s.createElement(ss,{width:{sm:250},p:"xs"},s.createElement(pl,null,s.createElement(ss.Section,{mb:"sm"},s.createElement(P5,{key:window.location.pathname,name:"resourceType",placeholder:"Resource Type",property:{binding:{valueSet:"http://hl7.org/fhir/ValueSet/resource-types"}},onChange:u=>l(u),creatable:!1,maxSelectedValues:0,clearSearchOnChange:!0,clearable:!1})),s.createElement(ss.Section,{grow:!0},(c=e.menus)==null?void 0:c.map(u=>{var d;return s.createElement(s.Fragment,{key:`menu-${u.title}`},s.createElement(ae,{className:t.menuTitle},u.title),(d=u.links)==null?void 0:d.map(m=>s.createElement(one,{key:m.href,to:m.href,active:m.href===(n==null?void 0:n.href),onClick:h=>i(h,m.href)},s.createElement(ane,{to:m.href,icon:m.icon}),s.createElement("span",null,m.label))))}),e.displayAddBookmark&&s.createElement(Z,{variant:"subtle",size:"xs",mt:"xl",leftIcon:s.createElement(Pre,{size:"0.75rem"}),onClick:()=>a(!0)},"Add Bookmark")))),e.pathname&&e.searchParams&&s.createElement(Yre,{pathname:e.pathname,searchParams:e.searchParams,visible:o,onOk:()=>a(!1),onCancel:()=>a(!1)}))}function one(e){let{classes:t,cx:r}=$5();return s.createElement(Ce,{onClick:e.onClick,to:e.to,className:r(t.link,{[t.linkActive]:e.active})},e.children)}function ane(e){return e.icon?e.icon:s.createElement(Ky,{w:30})}function ine(e,t,r){if(!e||!t||!r)return;let n,o=0;for(let a of r)if(a.links)for(let i of a.links){let l=lne(e,t,i.href);l>o&&(o=l,n=i)}return n}function lne(e,t,r){let n=new URL(r,"https://example.com");if(e!==n.pathname)return 0;let o=["_count","_offset"];for(let[i,l]of n.searchParams.entries())if(!o.includes(i)&&t.get(i)!==l)return 0;let a=1;for(let[i,l]of t.entries())o.includes(i)||n.searchParams.get(i)===l&&a++;return a}function sne(e){var u;let t=nr(),[r,n]=f.useState(localStorage.navbarOpen==="true"),o=te(),a=g5();function i(d){localStorage.navbarOpen=d.toString(),n(d)}function l(){i(!1)}function c(){i(!r)}return o.isLoading()?s.createElement(oa,null):s.createElement(X2,{styles:{main:{background:t.colorScheme==="dark"?t.colors.dark[8]:t.colors.gray[0]}},padding:0,fixed:!0,header:a&&s.createElement(qre,{pathname:e.pathname,searchParams:e.searchParams,logo:e.logo,version:e.version,navbarToggle:c}),navbar:a&&r?s.createElement(nne,{pathname:e.pathname,searchParams:e.searchParams,menus:e.menus,closeNavbar:l,displayAddBookmark:e.displayAddBookmark}):void 0},s.createElement(E5,{key:`${e.pathname}?${(u=e.searchParams)==null?void 0:u.toString()}`},s.createElement(f.Suspense,{fallback:s.createElement(oa,null)},e.children)))}function sc(e){let t=e.value,{contentType:r,url:n,title:o}=t??{};return n?s.createElement("div",{"data-testid":"attachment-display"},(r==null?void 0:r.startsWith("image/"))&&s.createElement("img",{"data-testid":"attachment-image",style:{maxWidth:e.maxWidth},src:n,alt:t==null?void 0:t.title}),(r==null?void 0:r.startsWith("video/"))&&s.createElement("video",{"data-testid":"attachment-video",style:{maxWidth:e.maxWidth},controls:!0},s.createElement("source",{type:r,src:n})),r==="application/pdf"&&!(o!=null&&o.endsWith(".pdf"))&&s.createElement("div",{"data-testid":"attachment-pdf",style:{maxWidth:e.maxWidth,minHeight:400}},s.createElement("iframe",{width:"100%",height:"400",src:n+"#navpanes=0",allowFullScreen:!0,frameBorder:0,seamless:!0})),s.createElement("div",{"data-testid":"download-link",style:{padding:"2px 16px 16px 16px"}},s.createElement(dt,{href:t==null?void 0:t.url,"data-testid":"attachment-details",target:"_blank",rel:"noopener noreferrer"},(t==null?void 0:t.title)||"Download"))):null}function cne(e){var t;return s.createElement("div",null,(t=e.values)==null?void 0:t.map((r,n)=>s.createElement("div",{key:"attatchment-"+n},s.createElement(sc,{value:r,maxWidth:e.maxWidth}))))}function b0(e){let t=te(),r=f.useRef(null);function n(i){var l;gt(i),(l=r.current)==null||l.click()}function o(i){gt(i);let l=i.target.files;l&&Array.from(l).forEach(a)}function a(i){if(!i||!i.name)return;e.onUploadStart&&e.onUploadStart();let l=i.name,c=i.type||"application/octet-stream";t.createBinary(i,l,c,e.onUploadProgress).then(u=>{e.onUpload({contentType:u.contentType,url:u.url,title:l})}).catch(u=>{var d,m,h;alert((h=(m=(d=u.issue)==null?void 0:d[0])==null?void 0:m.details)==null?void 0:h.text)})}return s.createElement(s.Fragment,null,s.createElement("input",{type:"file","data-testid":"upload-file-input",style:{display:"none"},ref:r,onChange:i=>o(i)}),e.children({onClick:n}))}function une(e){let[t,r]=f.useState(e.defaultValue??[]),n=f.useRef();n.current=t;function o(a){r(a),e.onChange&&e.onChange(a)}return s.createElement("table",{style:{width:"100%"}},s.createElement("colgroup",null,s.createElement("col",{width:"97%"}),s.createElement("col",{width:"3%"})),s.createElement("tbody",null,t.map((a,i)=>s.createElement("tr",{key:`${i}-${t.length}`},s.createElement("td",null,s.createElement(sc,{value:a,maxWidth:200})),s.createElement("td",null,s.createElement(Mr,{title:"Remove",size:"sm",onClick:l=>{gt(l);let c=t.slice();c.splice(i,1),o(c)}},s.createElement(yp,null))))),s.createElement("tr",null,s.createElement("td",null),s.createElement("td",null,s.createElement(b0,{onUpload:a=>{o([...n.current,a])}},a=>s.createElement(Mr,{...a,title:"Add",size:"sm",color:"green"},s.createElement(w5,{size:16})))))))}function O5(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return t?s.createElement(s.Fragment,null,s.createElement(sc,{value:t,maxWidth:200}),s.createElement(Z,{onClick:o=>{gt(o),n(void 0)}},"Remove")):s.createElement(b0,{onUpload:n},o=>s.createElement(Z,{...o},"Upload..."))}var C5=["meta","implicitRules","language","text","contained","extension","modifierExtension"],dne=W(e=>({root:{display:"grid",gridTemplateColumns:"30% 70%",margin:0,"& > dt, & > dd":{padding:`${e.spacing.sm} ${e.spacing.sm}`,borderTop:`0.1px solid ${e.colors.gray[3]}`,margin:0}},compact:{gridTemplateColumns:"20% 80%","& > dt, & > dd":{padding:`0 ${e.spacing.xs} ${e.spacing.xs} 0`,border:0}}}));function x0(e){let{children:t,compact:r}=e,{classes:n,cx:o}=dne();return s.createElement("dl",{className:o(n.root,{[n.compact]:r})},t)}function Wi(e){return s.createElement(s.Fragment,null,s.createElement("dt",null,e.term),s.createElement("dd",null,e.children))}function zn(e){return s.createElement(s.Fragment,null,WI(e.value))}function fne(e){return s.createElement(s.Fragment,null,HI(e.value))}function k5(e){let t=e.value;if(!t)return null;let r=[];return t.value&&r.push(t.value),(t.use||t.system)&&(r.push(" ["),t.use&&r.push(t.use),t.use&&t.system&&r.push(" "),t.system&&r.push(t.system),r.push("]")),s.createElement(s.Fragment,null,r.join("").trim())}function pne(e){var r;let t=e.value;return t?s.createElement(s.Fragment,null,t.name,t.name&&": ",(r=t.telecom)==null?void 0:r.map((n,o)=>s.createElement(k5,{key:"telecom-"+o,value:n}))):null}function mne(e){var t,r;return s.createElement("div",null,(t=e.value)==null?void 0:t.system,": ",(r=e.value)==null?void 0:r.value)}function hne(e){return s.createElement(s.Fragment,null,iee(e.value))}function ov(e){return s.createElement(s.Fragment,null,No(e.value))}function E0(e){return s.createElement(s.Fragment,null,Ds(e.value))}function gne(e){let t=e.value;return t?s.createElement(s.Fragment,null,s.createElement(ov,{value:t.numerator})," / ",s.createElement(ov,{value:t.denominator})):null}function wp(e){if(!e.value)return null;let t=e.value.display||e.value.reference||br(e.value);return e.link!==!1&&e.value.reference?s.createElement(Ce,{to:e.value},t):s.createElement(s.Fragment,null,t)}function vne(e){var o,a;let t=e.property,r=e.values??[],n=(a=(o=t.type)==null?void 0:o[0])==null?void 0:a.code;return s.createElement(s.Fragment,null,r.map((i,l)=>s.createElement("div",{key:`${l}-${r.length}`},s.createElement(mo,{arrayElement:!0,property:t,propertyType:n,value:i,ignoreMissingValues:e.ignoreMissingValues,link:e.link}))))}function mo(e){let{property:t,propertyType:r,value:n}=e;if((t==null?void 0:t.max)==="*"&&!e.arrayElement)return r===X.Attachment?s.createElement(cne,{values:n,maxWidth:e.maxWidth}):s.createElement(vne,{property:t,values:n,ignoreMissingValues:e.ignoreMissingValues,link:e.link});switch(r){case X.boolean:return s.createElement(s.Fragment,null,n===void 0?"":(!!n).toString());case X.SystemString:case X.string:return s.createElement("div",{style:{whiteSpace:"pre-wrap"}},n);case X.code:case X.date:case X.integer:case X.positiveInt:case X.unsignedInt:case X.uri:case X.url:return s.createElement(s.Fragment,null,n);case X.canonical:return s.createElement(wp,{value:{reference:n},link:e.link});case X.dateTime:case X.instant:return s.createElement(s.Fragment,null,_r(n));case X.markdown:return s.createElement("pre",null,n);case X.Address:return s.createElement(qte,{value:n});case X.Annotation:return s.createElement(s.Fragment,null,n==null?void 0:n.text);case X.Attachment:return s.createElement(sc,{value:n,maxWidth:e.maxWidth});case X.CodeableConcept:return s.createElement(zn,{value:n});case X.Coding:return s.createElement(fne,{value:n});case X.ContactDetail:return s.createElement(pne,{value:n});case X.ContactPoint:return s.createElement(k5,{value:n});case X.HumanName:return s.createElement(v0,{value:n});case X.Identifier:return s.createElement(mne,{value:n});case X.Money:return s.createElement(hne,{value:n});case X.Period:return s.createElement(s.Fragment,null,ree(n));case X.Quantity:case X.Duration:return s.createElement(ov,{value:n});case X.Range:return s.createElement(E0,{value:n});case X.Ratio:return s.createElement(gne,{value:n});case X.Reference:return s.createElement(wp,{value:n,link:e.link});case X.Timing:return s.createElement(s.Fragment,null,UI(n));case X.Dosage:case X.UsageContext:return s.createElement(av,{value:{type:r,value:n},compact:!0,ignoreMissingValues:e.ignoreMissingValues});default:if(!(t!=null&&t.path))throw Error(`Displaying property of type ${e.propertyType} requires element definition path`);return s.createElement(av,{value:{type:ZI(t),value:n},compact:!0,ignoreMissingValues:e.ignoreMissingValues})}}function Ba(e,t){let r=ao(e,t);return r?Array.isArray(r)?[r.map(n=>n.value),r[0].type]:[r.value,r.type]:[void 0,"undefined"]}function av(e){let t=e.value,r=t.value;if(!r)return null;let n=t.type,o=Pt.types[n];return o?typeof r=="object"&&"name"in r&&Object.keys(r).length===1&&typeof r.name=="string"?s.createElement("div",null,r.name):s.createElement(x0,{compact:e.compact},Object.entries(o.properties).map(a=>{let i=a[0];if(C5.includes(i))return null;let l=a[1];l.path||(l.path=n+"."+i);let[c,u]=Ba(t,i);return e.ignoreMissingValues&&(!c||Array.isArray(c)&&c.length===0)?null:s.createElement(Wi,{key:i,term:gp(i)},s.createElement(mo,{property:l,propertyType:u,value:c,ignoreMissingValues:e.ignoreMissingValues,link:e.link}))})):s.createElement("div",null,n," not implemented")}function j5(e){return s.createElement(J,{noWrap:!0},s.createElement("div",null,e.children),s.createElement("div",null,s.createElement(Lt.Wrapper,{id:e.htmlFor,label:e.title,description:e.description,withAsterisk:e.withAsterisk},(()=>null)())))}function tt(e,t){var r,n,o;return(o=(n=(r=e==null?void 0:e.issue)==null?void 0:r.filter(a=>{var i;return R5((i=a.expression)==null?void 0:i[0],t)}))==null?void 0:n.map(a=>{var i;return(i=a.details)==null?void 0:i.text}))==null?void 0:o.join(`
181
- `)}function S0(e,t){var r;return(r=e==null?void 0:e.issue)==null?void 0:r.filter(n=>{var o;return R5((o=n.expression)==null?void 0:o[0],t)})}function R5(e,t){if(e===t)return!0;if(!e||!t)return!1;let r=e.indexOf(".");if(r>=0&&e.substring(r+1)===t)return!0;let n=t.indexOf(".");return n>=0&&t.substring(n+1)===e}function Ke(e){return s.createElement(Lt.Wrapper,{id:e.htmlFor,label:e.title,description:e.description,withAsterisk:e.withAsterisk,error:tt(e.outcome,e.htmlFor)},e.children)}function T5(e){let t=te(),r=Xe(e.defaultValue),[n,o]=f.useState(),[a,i]=f.useState();return f.useEffect(()=>{r&&(i(oc(r)),t.requestSchema(r.resourceType).then(o).catch(console.log))},[t,r]),!n||!a?s.createElement("div",null,"Loading..."):s.createElement("form",{noValidate:!0,autoComplete:"off",onSubmit:l=>{l.preventDefault(),e.onSubmit&&e.onSubmit(a)}},s.createElement(Oe,{mb:"xl"},s.createElement(Ke,{title:"Resource Type",htmlFor:"resourceType",outcome:e.outcome},s.createElement(ne,{name:"resourceType",defaultValue:a.resourceType,disabled:!0})),s.createElement(Ke,{title:"ID",htmlFor:"id",outcome:e.outcome},s.createElement(ne,{name:"id",defaultValue:a.id,disabled:!0}))),s.createElement(lv,{typeName:a.resourceType,defaultValue:a,outcome:e.outcome,onChange:i}),s.createElement(J,{position:"right",mt:"xl"},s.createElement(Z,{type:"submit"},"OK"),e.onDelete&&s.createElement(Z,{variant:"outline",color:"red",type:"button",onClick:()=>{e.onDelete(a)}},"Delete")))}function iv(e,t,r,n,o){let a=n.type;if(a.length>1)for(let i of a){let l=t.replace("[x]",xr(i.code));l in e&&delete e[l]}return e[r]=o,e}function yne(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=_ne(o);r(a),e.onChange&&e.onChange(a)}return s.createElement(_0,{elementDefinition:e.property,name:e.name,placeholder:e.placeholder,defaultValue:t&&wne(t),maxSelectedValues:1,onChange:n})}function wne(e){var t;return(t=e.coding)==null?void 0:t.map(r=>({system:r.system,code:r.code,display:r.display}))}function _ne(e){if(e.length!==0)return{coding:e.map(t=>({system:t.system,code:t.code,display:t.display}))}}function bne(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=o[0],i=a&&Ene(a);r(i),e.onChange&&e.onChange(i)}return s.createElement(_0,{elementDefinition:e.property,name:e.name,placeholder:e.placeholder,defaultValue:t&&xne(t),maxSelectedValues:1,onChange:n})}function xne(e){return{system:e.system,code:e.code,display:e.display}}function Ene(e){return{system:e.system,code:e.code,display:e.display}}function I5(e){let[t,r]=f.useState(e.defaultValue),n=f.useRef();n.current=t;function o(c){c&&Object.keys(c).length===0&&(c=void 0),r(c),e.onChange&&e.onChange(c)}function a(c){let u={...n.current,system:c};c||delete u.system,o(u)}function i(c){let u={...n.current,use:c};c||delete u.use,o(u)}function l(c){let u={...n.current,value:c};c||delete u.value,o(u)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(vt,{"data-testid":"system",defaultValue:t==null?void 0:t.system,onChange:c=>a(c.currentTarget.value),data:["","email","phone","fax","pager","sms","other"]}),s.createElement(vt,{"data-testid":"use",defaultValue:t==null?void 0:t.use,onChange:c=>i(c.currentTarget.value),data:["","home","work","temp","old","mobile"]}),s.createElement(ne,{placeholder:"Value",defaultValue:t==null?void 0:t.value,onChange:c=>l(c.currentTarget.value)}))}function Sne(e){var l;let[t,r]=f.useState(e.defaultValue),n=f.useRef();n.current=t;function o(c){r(c),e.onChange&&e.onChange(c)}function a(c){let u={...n.current,name:c};c||delete u.name,o(u)}function i(c){let u={...n.current,telecom:c&&[c]};c||delete u.telecom,o(u)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(ne,{"data-testid":e.name+"-name",name:e.name+"-name",placeholder:"Name",style:{width:180},defaultValue:t==null?void 0:t.name,onChange:c=>a(c.currentTarget.value)}),s.createElement(I5,{name:e.name+"-telecom",defaultValue:(l=t==null?void 0:t.telecom)==null?void 0:l[0],onChange:i}))}function Ua(e){return s.createElement(ne,{id:e.name,name:e.name,"data-autofocus":e.autoFocus,"data-testid":e.name,placeholder:e.placeholder,required:e.required,type:$ne(),defaultValue:Pne(e.defaultValue),autoFocus:e.autoFocus,error:tt(e.outcome,e.name),onChange:t=>{if(e.onChange){let r=t.currentTarget.value;e.onChange(D5(r))}}})}function Pne(e){if(!e)return"";let t=new Date(e);return Em(t)?t.toLocaleDateString("sv")+"T"+t.toLocaleTimeString("sv"):""}function D5(e){if(!e)return"";let t=new Date(e);return Em(t)?t.toISOString():""}function $ne(){return"datetime-local"}function One(e){return s.createElement(ym,{id:e.name,name:e.name,"data-testid":"extension-input",defaultValue:br(e.defaultValue),deserialize:JSON.parse,onChange:t=>{e.onChange&&e.onChange(JSON.parse(t))}})}function Cne(e){var d,m,h;let[t,r]=f.useState(e.defaultValue),n=f.useRef();n.current=t;function o(g){r(g),e.onChange&&e.onChange(g)}function a(g){o({...n.current,use:g||void 0})}function i(g){o({...n.current,prefix:g?g.split(" "):void 0})}function l(g){o({...n.current,given:g?g.split(" "):void 0})}function c(g){o({...n.current,family:g||void 0})}function u(g){o({...n.current,suffix:g?g.split(" "):void 0})}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(vt,{defaultValue:t==null?void 0:t.use,name:e.name+"-use","data-testid":"use",onChange:g=>a(g.currentTarget.value),data:["","temp","old","usual","official","nickname","anonymous","maiden"]}),s.createElement(ne,{placeholder:"Prefix",name:e.name+"-prefix",defaultValue:(d=t==null?void 0:t.prefix)==null?void 0:d.join(" "),onChange:g=>i(g.currentTarget.value)}),s.createElement(ne,{placeholder:"Given",name:e.name+"-given",defaultValue:(m=t==null?void 0:t.given)==null?void 0:m.join(" "),onChange:g=>l(g.currentTarget.value)}),s.createElement(ne,{name:e.name+"-family",placeholder:"Family",defaultValue:t==null?void 0:t.family,onChange:g=>c(g.currentTarget.value)}),s.createElement(ne,{placeholder:"Suffix",name:e.name+"-suffix",defaultValue:(h=t==null?void 0:t.suffix)==null?void 0:h.join(" "),onChange:g=>u(g.currentTarget.value)}))}function kne(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(ne,{placeholder:"System",defaultValue:t==null?void 0:t.system,onChange:o=>n({...t,system:o.currentTarget.value})}),s.createElement(ne,{placeholder:"Value",defaultValue:t==null?void 0:t.value,onChange:o=>n({...t,value:o.currentTarget.value})}))}var jne=["USD","EUR","CAD","GBP","AUD"];function Rne(e){var c;let{onChange:t}=e,[r,n]=f.useState(e.defaultValue),o=f.useCallback(u=>{n(u),t&&t(u)},[t]),a=f.useCallback(u=>{o({...r,currency:u.currentTarget.value})},[r,o]),i=f.useCallback(u=>{o({...r,value:u.currentTarget.valueAsNumber})},[r,o]),l=s.createElement(vt,{defaultValue:r==null?void 0:r.currency,data:jne,styles:{input:{fontWeight:500,borderTopLeftRadius:0,borderBottomLeftRadius:0,width:92}},onChange:a});return s.createElement(ne,{type:"number",label:e.label,placeholder:e.placeholder??"Value",defaultValue:((c=r==null?void 0:r.value)==null?void 0:c.toString())??"USD",icon:s.createElement(mre,{size:14}),rightSection:l,rightSectionWidth:92,onChange:i})}function Tne(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(Ua,{name:e.name+".start",placeholder:"Start",defaultValue:t==null?void 0:t.start,onChange:o=>n({...t,start:o})}),s.createElement(Ua,{name:e.name+".end",placeholder:"End",defaultValue:t==null?void 0:t.end,onChange:o=>n({...t,end:o})}))}function Wa(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(vt,{style:{width:80},"data-testid":e.name+"-comparator",defaultValue:t==null?void 0:t.comparator,data:["","<","<=",">=",">"],onChange:o=>n({...t,comparator:o.currentTarget.value})}),s.createElement(ne,{id:e.name,name:e.name,"data-autofocus":e.autoFocus,"data-testid":e.name+"-value",type:"number",placeholder:"Value",defaultValue:t==null?void 0:t.value,autoFocus:e.autoFocus,step:"any",onWheel:o=>{e.disableWheel&&o.currentTarget.blur()},onChange:o=>{n({...t,value:Ine(o.currentTarget.value)})}}),s.createElement(ne,{placeholder:"Unit","data-testid":e.name+"-unit",defaultValue:t==null?void 0:t.unit,onChange:o=>n({...t,unit:o.currentTarget.value})}))}function Ine(e){if(e)return parseFloat(e)}function P0(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(Wa,{name:e.name+"-low",defaultValue:t==null?void 0:t.low,onChange:o=>n({...t,low:o})}),s.createElement(Wa,{name:e.name+"-high",defaultValue:t==null?void 0:t.high,onChange:o=>n({...t,high:o})}))}function Dne(e){let[t,r]=f.useState(e.defaultValue);function n(o){r(o),e.onChange&&e.onChange(o)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(Wa,{name:e.name+"-numerator",defaultValue:t==null?void 0:t.numerator,onChange:o=>n({...t,numerator:o})}),s.createElement(Wa,{name:e.name+"-denominator",defaultValue:t==null?void 0:t.denominator,onChange:o=>n({...t,denominator:o})}))}var Nne={Observation:"code",User:"email:contains"},Ane=["AccessPolicy","Account","ActivityDefinition","Bot","CapabilityStatement","ClientApplication","CodeSystem","CompartmentDefinition","ConceptMap","EffectEvidenceSynthesis","Endpoint","EventDefinition","Evidence","EvidenceVariable","ExampleScenario","GraphDefinition","HealthcareService","ImplementationGuide","InsurancePlan","Library","Location","Measure","MedicinalProduct","MessageDefinition","NamingSystem","OperationDefinition","Organization","Patient","Person","PlanDefinition","Practitioner","Project","Questionnaire","RelatedPerson","ResearchDefinition","ResearchElementDefinition","RiskEvidenceSynthesis","SearchParameter","StructureDefinition","StructureMap","TerminologyCapabilities","TestScript","UserConfiguration","ValueSet"];function Mne(e){return{value:ot(e),label:fo(e),resource:e}}function gl(e){let t=te(),r=e.resourceType,n=Xe(e.defaultValue),o=e.onChange,a=f.useCallback(async(l,c)=>{let u=Lne(r),d=new URLSearchParams({[u]:l,_count:"10"});return await t.searchResources(r,d,{signal:c})},[t,r]),i=f.useCallback(l=>{o&&o(l[0])},[o]);return e.defaultValue&&!n?null:s.createElement(y0,{name:e.name,itemComponent:zne,defaultValue:n,placeholder:e.placeholder,maxSelectedValues:1,toKey:ot,toOption:Mne,loadOptions:a,onChange:i,clearable:!0})}var zne=f.forwardRef(({label:e,resource:t,...r},n)=>s.createElement("div",{ref:n,...r},s.createElement(J,{noWrap:!0},s.createElement(aa,{value:t}),s.createElement("div",null,s.createElement(ae,null,e),s.createElement(ae,{size:"xs",color:"dimmed"},t.birthDate)))));function Lne(e){return Nne[e]??(Ane.includes(e)?"name":"_id")}function km(e){let t=Fne(e.targetTypes),r=Vne(e.defaultValue,t),[n,o]=f.useState(e.defaultValue),[a,i]=f.useState(r),l=f.useRef();l.current=n;let c=f.useRef();c.current=a;function u(d){o(d),e.onChange&&e.onChange(d)}return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},t?s.createElement(vt,{"data-autofocus":e.autoFocus,"data-testid":"reference-input-resource-type-select",defaultValue:a,autoFocus:e.autoFocus,onChange:d=>i(d.currentTarget.value),data:t}):s.createElement(ne,{"data-autofocus":e.autoFocus,"data-testid":"reference-input-resource-type-input",defaultValue:a,autoFocus:e.autoFocus,onChange:d=>i(d.currentTarget.value)}),s.createElement(gl,{resourceType:a,name:e.name+"-id",placeholder:e.placeholder,defaultValue:n,onChange:d=>{u(d?at(d):void 0)}}))}function Fne(e){if(!(!e||e.length===0||e.length===1&&e[0]==="Resource"))return e}function Vne(e,t){var n;let r=(n=e==null?void 0:e.reference)==null?void 0:n.split("/")[0];if(r)return r;if(t&&t.length>0)return t[0]}function Bne(e){let[t,r]=f.useState(e.defaultValue&&Array.isArray(e.defaultValue)?e.defaultValue:[]),n=f.useRef();n.current=t;function o(a){r(a),e.onChange&&e.onChange(a)}return s.createElement("table",{style:{width:"100%",borderCollapse:"collapse"}},s.createElement("colgroup",null,s.createElement("col",{width:"97%"}),s.createElement("col",{width:"3%"})),s.createElement("tbody",null,t.map((a,i)=>s.createElement("tr",{key:`${i}-${t.length}`},s.createElement("td",null,s.createElement(Ha,{arrayElement:!0,property:e.property,name:e.name+"."+i,defaultValue:a,onChange:l=>{let c=[...n.current];c[i]=l,o(c)}})),s.createElement("td",{style:{textAlign:"right"}},s.createElement(Mr,{title:"Remove",size:"sm",onClick:l=>{gt(l);let c=[...n.current];c.splice(i,1),o(c)}},s.createElement(yp,null))))),s.createElement("tr",null,s.createElement("td",null),s.createElement("td",{style:{textAlign:"right"}},s.createElement(Mr,{title:"Add",size:"sm",color:"green",onClick:a=>{gt(a);let i=[...n.current];i.push(void 0),o(i)}},s.createElement(m0,null))))))}var Une=["sun","mon","tue","wed","thu","fri","sat"];function Wne(e){let[t,r]=f.useState(e.defaultValue),[n,o]=f.useState(!1),a=f.useRef();return a.current=t,s.createElement(s.Fragment,null,s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement("span",null,UI(a.current)||"No repeat"),s.createElement(Z,{onClick:()=>o(!0)},"Edit")),s.createElement(Hne,{visible:n,defaultValue:a.current,onOk:i=>{e.onChange&&e.onChange(i),r(i),o(!1)},onCancel:()=>o(!1)}))}var YS={repeat:{period:1,periodUnit:"d"}};function Hne(e){let[t,r]=f.useState(e.defaultValue||YS),n=f.useRef();n.current=t;function o(u){r({...n.current,event:[u]})}function a(u){r({...n.current,repeat:u})}function i(u){var d;a({...(d=n.current)==null?void 0:d.repeat,period:u})}function l(u){var d;a({...(d=n.current)==null?void 0:d.repeat,periodUnit:u})}function c(u){var d;a({...(d=n.current)==null?void 0:d.repeat,dayOfWeek:u})}return s.createElement(Er,{title:"Timing",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:()=>e.onCancel()},s.createElement(Oe,null,s.createElement(Ke,{title:"Starts on",htmlFor:"timing-dialog-start"},s.createElement(Ua,{name:"timing-dialog-start",onChange:u=>o(u)})),s.createElement(Yy,{label:"Repeat",checked:!!t.repeat,onChange:u=>a(u.currentTarget.checked?YS.repeat:void 0)}),t.repeat&&s.createElement(s.Fragment,null,s.createElement(Ke,{title:"Repeat every",htmlFor:"timing-dialog-period"},s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(ne,{type:"number",step:1,id:"timing-dialog-period",name:"timing-dialog-period",defaultValue:t.repeat.period||1,onChange:u=>i(parseInt(u.currentTarget.value,10)||1)}),s.createElement(vt,{id:"timing-dialog-periodUnit",name:"timing-dialog-periodUnit",defaultValue:t.repeat.periodUnit,onChange:u=>l(u.currentTarget.value),data:[{label:"second",value:"s"},{label:"minute",value:"min"},{label:"hour",value:"h"},{label:"day",value:"d"},{label:"week",value:"wk"},{label:"month",value:"mo"},{label:"year",value:"a"}]}))),t.repeat.periodUnit==="wk"&&s.createElement(Ke,{title:"Repeat on"},s.createElement(pf.Group,{multiple:!0,onChange:c},s.createElement(J,{position:"apart",mt:"md",spacing:"xs"},Une.map(u=>s.createElement(pf,{key:u,value:u,size:"xs",radius:"xl"},u.charAt(0).toUpperCase())))))),s.createElement(J,{position:"right"},s.createElement(Z,{onClick:()=>e.onOk(t)},"OK"))))}function Ha(e){var i,l;let t=e.property,r=e.defaultPropertyType??((l=(i=t.type)==null?void 0:i[0])==null?void 0:l.code),n=e.name,o=e.defaultValue;if(t.max==="*"&&!e.arrayElement)return r===X.Attachment?s.createElement(une,{name:n,defaultValue:o,onChange:e.onChange}):s.createElement(Bne,{property:t,name:n,defaultValue:o,onChange:e.onChange});let a=t.type;return a.length>1?s.createElement(qne,{elementDefinitionTypes:a,...e}):s.createElement(N5,{elementDefinitionType:a[0],...e})}function qne(e){let t=e.elementDefinitionTypes,r;e.defaultPropertyType&&(r=t.find(a=>a.code===e.defaultPropertyType)),r||(r=t[0]);let[n,o]=f.useState(r);return s.createElement(J,{spacing:"xs",grow:!0,noWrap:!0},s.createElement(vt,{style:{width:"200px"},defaultValue:n.code,onChange:a=>{o(t.find(i=>i.code===a.currentTarget.value))},data:t.map(a=>({value:a.code,label:a.code}))}),s.createElement(N5,{...e,elementDefinitionType:n,onChange:a=>{e.onChange&&e.onChange(a,e.name.replace("[x]",xr(n.code)))}}))}function N5(e){let t=e.property,r=e.elementDefinitionType.code,n=e.name,o=e.defaultValue,a=t.min!==void 0&&t.min>0;switch(r){case X.SystemString:case X.canonical:case X.string:case X.time:case X.uri:case X.url:return s.createElement(ne,{id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:i=>{e.onChange&&e.onChange(i.currentTarget.value)},error:tt(e.outcome,n)});case X.date:return s.createElement(ne,{type:"date",id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:i=>{e.onChange&&e.onChange(i.currentTarget.value)},error:tt(e.outcome,n)});case X.dateTime:case X.instant:return s.createElement(Ua,{name:n,defaultValue:o,onChange:e.onChange,outcome:e.outcome});case X.decimal:case X.integer:case X.positiveInt:case X.unsignedInt:return s.createElement(ne,{type:"number",step:r===X.decimal?"any":"1",id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:i=>{e.onChange&&e.onChange(i.currentTarget.valueAsNumber)}});case X.code:return s.createElement(P5,{property:t,name:n,defaultValue:o,onChange:e.onChange});case X.boolean:return s.createElement(nn,{id:n,name:n,"data-testid":n,defaultChecked:!!o,onChange:i=>{e.onChange&&e.onChange(i.currentTarget.checked)}});case X.markdown:return s.createElement(Js,{id:n,name:n,"data-testid":n,defaultValue:o,required:a,onChange:i=>{e.onChange&&e.onChange(i.currentTarget.value)}});case X.Address:return s.createElement(Qte,{name:n,defaultValue:o,onChange:e.onChange});case X.Annotation:return s.createElement(Yte,{name:n,defaultValue:o,onChange:e.onChange});case X.Attachment:return s.createElement(O5,{name:n,defaultValue:o,onChange:e.onChange});case X.CodeableConcept:return s.createElement(yne,{property:t,name:n,defaultValue:o,onChange:e.onChange});case X.Coding:return s.createElement(bne,{property:t,name:n,defaultValue:o,onChange:e.onChange});case X.ContactDetail:return s.createElement(Sne,{name:n,defaultValue:o,onChange:e.onChange});case X.ContactPoint:return s.createElement(I5,{name:n,defaultValue:o,onChange:e.onChange});case X.Extension:return s.createElement(One,{name:n,defaultValue:o,onChange:e.onChange});case X.HumanName:return s.createElement(Cne,{name:n,defaultValue:o,onChange:e.onChange});case X.Identifier:return s.createElement(kne,{name:n,defaultValue:o,onChange:e.onChange});case X.Money:return s.createElement(Rne,{name:n,defaultValue:o,onChange:e.onChange});case X.Period:return s.createElement(Tne,{name:n,defaultValue:o,onChange:e.onChange});case X.Duration:case X.Quantity:return s.createElement(Wa,{name:n,defaultValue:o,onChange:e.onChange});case X.Range:return s.createElement(P0,{name:n,defaultValue:o,onChange:e.onChange});case X.Ratio:return s.createElement(Dne,{name:n,defaultValue:o,onChange:e.onChange});case X.Reference:return s.createElement(km,{name:n,defaultValue:o,targetTypes:Qne(t),onChange:e.onChange});case X.Timing:return s.createElement(Wne,{name:n,defaultValue:o,onChange:e.onChange});case X.Dosage:case X.UsageContext:return s.createElement(lv,{typeName:r,defaultValue:o,onChange:e.onChange,outcome:e.outcome});default:return s.createElement(lv,{typeName:ZI(t),defaultValue:o,onChange:e.onChange,outcome:e.outcome})}}function Qne(e){var t,r,n;return(n=(r=(t=e==null?void 0:e.type)==null?void 0:t[0])==null?void 0:r.targetProfile)==null?void 0:n.map(o=>o.split("/").pop())}function lv(e){let[t,r]=f.useState(e.defaultValue??{});function n(l){r(l),e.onChange&&e.onChange(l)}let o=e.typeName,a=Pt.types[o];if(!a)return s.createElement("div",null,o," not implemented");let i={type:o,value:t};return s.createElement(Oe,null,Object.entries(a.properties).map(l=>{let c=l[0];if(c==="id"||C5.includes(c))return null;let u=l[1];if(!u.type)return null;let[d,m]=Ba(i,c),h=u.min!==void 0&&u.min>0;return u.type.length===1&&u.type[0].code==="boolean"?s.createElement(j5,{key:c,title:gp(c),description:u.definition,htmlFor:c},s.createElement(Ha,{property:u,name:c,defaultValue:d,defaultPropertyType:m,outcome:e.outcome,onChange:(g,y)=>{n(iv(t,c,y??c,l[1],g))}})):s.createElement(Ke,{key:c,title:gp(c),description:u.definition,withAsterisk:h,htmlFor:c,outcome:e.outcome},s.createElement(Ha,{property:u,name:c,defaultValue:d,defaultPropertyType:m,onChange:(g,y)=>{n(iv(t,c,y??c,l[1],g))}}))}))}var Gne=W(()=>({root:{"@media (max-width: 800px)":{paddingLeft:4,paddingRight:4}}}));function cc(e){let{children:t,...r}=e,{classes:n}=Gne();return s.createElement(Jj,{className:n.root,...r},t)}var Kne=W(e=>({noteBody:{fontSize:e.fontSizes.sm},noteCite:{fontSize:e.fontSizes.xs,marginBlockStart:3},noteRoot:{padding:5}}));function A5({value:e}){let{classes:t}=Kne();return e?s.createElement(Oe,{justify:"flex-start",spacing:"xs"},e.map((r,n)=>{var o;return r.text&&s.createElement(xj,{key:`note-${n}`,classNames:{cite:t.noteCite,body:t.noteBody,root:t.noteRoot},cite:((o=r.authorReference)==null?void 0:o.display)||r.authorString,icon:null},r.text)})):null}function uc(e){let{value:t,link:r,...n}=e,[o,a]=f.useState(),i=Xe(t,a),l;if(o&&!VI(o))l=`[${$e(o)}]`;else if(i)l=fo(i);else return null;return r?s.createElement(Ce,{to:t,...n},l):s.createElement(ae,{component:"span",...n},l)}function Hi(e){return s.createElement(J,{spacing:"xs"},s.createElement(aa,{size:24,radius:12,value:e.value,link:e.link}),s.createElement(uc,{value:e.value,link:e.link}))}var Yne={draft:"blue",active:"blue","on-hold":"yellow",revoked:"red",completed:"green","entered-in-error":"red",unknown:"gray",retired:"gray",registered:"blue",preliminary:"blue",final:"green",amended:"yellow",corrected:"yellow",cancelled:"red",requested:"blue",received:"blue",accepted:"blue",rejected:"red",ready:"blue","in-progress":"blue",failed:"red",proposed:"blue",pending:"blue",booked:"blue",arrived:"blue",fulfilled:"green",noshow:"red","checked-in":"blue",waitlist:"gray",routine:"gray",urgent:"red",asap:"red",stat:"red"};function M5(e){return s.createElement(SB,{color:Yne[e.status]},e.status)}var z5=W(e=>({table:{border:`0.1px solid ${e.colors.gray[5]}`,borderCollapse:"collapse","& td, & th":{border:`0.1px solid ${e.colors.gray[5]}`,padding:4}},criticalRow:{background:e.colorScheme==="dark"?e.colors.red[7]:e.colors.red[1],border:`0.1px solid ${e.colors.red[5]}`,color:e.colors.red[5],fontWeight:500,"& td":{border:`0.1px solid ${e.colors.red[5]}`}},noteBody:{fontSize:e.fontSizes.sm},noteCite:{fontSize:e.fontSizes.xs,marginBlockStart:3},noteRoot:{padding:5}}));$0.defaultProps={hideObservationNotes:!1,hideSpecimenInfo:!1};function $0(e){var i;let t=te(),r=Xe(e.value),[n,o]=f.useState();if(f.useEffect(()=>{r!=null&&r.specimen&&Promise.allSettled(r.specimen.map(l=>t.readReference(l))).then(l=>l.filter(c=>c.status==="fulfilled").map(c=>c.value)).then(o).catch(console.error)},[t,r]),!r)return null;let a=(n==null?void 0:n.flatMap(l=>l.note||[]))||[];if(r.presentedForm&&r.presentedForm.length>0){let l=r.presentedForm[0];(i=l.contentType)!=null&&i.startsWith("text/plain")&&l.data&&a.push({text:window.atob(l.data)})}return s.createElement(Oe,null,s.createElement(ce,null,"Diagnostic Report"),s.createElement(Xne,{value:r}),!e.hideSpecimenInfo&&Jne(n),r.result&&s.createElement(Zne,{hideObservationNotes:e.hideObservationNotes,value:r.result}),a.length>0&&s.createElement(A5,{value:a}))}function Xne({value:e}){var t,r;return s.createElement(J,{mt:"md",spacing:30},e.subject&&s.createElement("div",null,s.createElement(ae,{size:"xs",transform:"uppercase",color:"dimmed"},"Subject"),s.createElement(ae,null,s.createElement(Hi,{value:e.subject,link:!0}))),(t=e.resultsInterpreter)==null?void 0:t.map(n=>s.createElement("div",{key:n.reference},s.createElement(ae,{size:"xs",transform:"uppercase",color:"dimmed"},"Interpreter"),s.createElement(ae,null,s.createElement(Hi,{value:n,link:!0})))),(r=e.performer)==null?void 0:r.map(n=>s.createElement("div",{key:n.reference},s.createElement(ae,{size:"xs",transform:"uppercase",color:"dimmed"},"Performer"),s.createElement(ae,null,s.createElement(Hi,{value:n,link:!0})))),e.issued&&s.createElement("div",null,s.createElement(ae,{size:"xs",transform:"uppercase",color:"dimmed"},"Issued"),s.createElement(ae,null,_r(e.issued))),e.status&&s.createElement("div",null,s.createElement(ae,{size:"xs",transform:"uppercase",color:"dimmed"},"Status"),s.createElement(ae,null,xr(e.status))))}function Jne(e){return s.createElement(Oe,{spacing:"xs"},s.createElement(ce,{order:2,size:"h6"},"Specimens"),s.createElement(mr,{type:"ordered"},e==null?void 0:e.map((t,r)=>{var n;return s.createElement(mr.Item,{ml:"sm",key:`specimen-${t.id}-${r}`},s.createElement(J,{spacing:20},s.createElement(J,{spacing:5},s.createElement(ae,{fw:500},"Collected:")," ",_r((n=t.collection)==null?void 0:n.collectedDateTime)),s.createElement(J,{spacing:5},s.createElement(ae,{fw:500},"Received:")," ",_r(t.receivedTime))))})))}function Zne(e){var r;let{classes:t}=z5();return s.createElement("table",{className:t.table},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Test"),s.createElement("th",null,"Value"),s.createElement("th",null,"Reference Range"),s.createElement("th",null,"Interpretation"),s.createElement("th",null,"Category"),s.createElement("th",null,"Performer"),s.createElement("th",null,"Status"))),s.createElement("tbody",null,(r=e.value)==null?void 0:r.map((n,o)=>s.createElement(eoe,{key:`obs-${n.id}-${o}`,hideObservationNotes:e.hideObservationNotes,value:n}))))}function eoe(e){var i;let{classes:t,cx:r}=z5(),n=Xe(e.value);if(!n)return null;let o=!e.hideObservationNotes&&n.note,a=noe(n);return s.createElement(s.Fragment,null,s.createElement("tr",{className:r({[t.criticalRow]:a})},s.createElement("td",{rowSpan:o?2:1},s.createElement(Ce,{to:n},s.createElement(zn,{value:n.code}))),s.createElement("td",null,s.createElement(toe,{value:n})),s.createElement("td",null,s.createElement(roe,{value:n.referenceRange})),s.createElement("td",null,n.interpretation&&n.interpretation.length>0&&s.createElement(zn,{value:n.interpretation[0]})),s.createElement("td",null,n.category&&n.category.length>0&&s.createElement("ul",null,n.category.map((l,c)=>s.createElement("li",{key:`category-${c}`},s.createElement(zn,{value:l}))))),s.createElement("td",null,(i=n.performer)==null?void 0:i.map(l=>s.createElement(wp,{key:l.reference,value:l}))),s.createElement("td",null,n.status&&s.createElement(M5,{status:n.status}))),o&&s.createElement("tr",null,s.createElement("td",{colSpan:6},s.createElement(A5,{value:n.note}))))}function toe(e){let t=e.value;return s.createElement(s.Fragment,null,qI(t))}function roe(e){let t=e.value&&e.value.length>0&&e.value[0];return t?t.text?s.createElement(s.Fragment,null,t.text):s.createElement(E0,{value:t}):null}function noe(e){var r,n,o,a;let t=(a=(o=(n=(r=e.interpretation)==null?void 0:r[0])==null?void 0:n.coding)==null?void 0:o[0])==null?void 0:a.code;return t==="AA"||t==="LL"||t==="HH"||t==="A"}var ooe=W((e,{width:t,fill:r})=>({paper:{maxWidth:t,margin:`${e.spacing.xl} auto`,padding:r?0:e.spacing.md,"@media (max-width: 800px)":{padding:r?0:8},"& img":{width:"100%",maxWidth:"100%"},"& video":{width:"100%",maxWidth:"100%"}}})),aoe={shadow:"xs",radius:"md",withBorder:!0};function O0(e){let{className:t,children:r,width:n,fill:o,unstyled:a,...i}=H("Panel",aoe,e),{classes:l,cx:c}=ooe({width:n,fill:o},{name:"Panel",unstyled:a});return s.createElement(yn,{className:c(l.paper,t),...i},r)}var ioe=W(e=>({root:{borderCollapse:"collapse",width:"100%","& tr":{borderTop:`0.1px solid ${e.colors.gray[3]}`},"& th, & td":{padding:`${e.spacing.sm} ${e.spacing.sm}`,verticalAlign:"top"}},removed:{color:e.colors.red[7],textDecoration:"line-through"},added:{color:e.colors.green[7]}}));function loe(e){let{classes:t}=ioe(),r=te(),[n,o]=f.useState();if(f.useEffect(()=>{r.requestSchema(e.original.resourceType).then(o).catch(console.log)},[r,e.original.resourceType]),!n)return null;let a=n.types[e.original.resourceType];return a?s.createElement("table",{className:t.root},s.createElement("colgroup",null,s.createElement("col",{style:{width:"30%"}}),s.createElement("col",{style:{width:"35%"}}),s.createElement("col",{style:{width:"35%"}})),s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Property"),s.createElement("th",null,"Before"),s.createElement("th",null,"After"))),s.createElement("tbody",null,Object.entries(a.properties).map(i=>{let l=i[0];if(l==="id"||l==="meta")return null;let c=i[1],[u,d]=Ba(Vn(e.original),l),[m,h]=Ba(Vn(e.revised),l);return XS(u)&&XS(m)||br(u)===br(m)?null:s.createElement("tr",{key:l},s.createElement("td",null,gp(l)),s.createElement("td",{className:t.removed},s.createElement(mo,{property:c,propertyType:d,value:u,ignoreMissingValues:!0})),s.createElement("td",{className:t.added},s.createElement(mo,{property:c,propertyType:h,value:m,ignoreMissingValues:!0})))}))):null}function XS(e){return!e||Array.isArray(e)&&e.length===0||typeof e=="object"&&Object.keys(e).length===0}function C0(e){let t=te(),r=Xe(e.value),[n,o]=f.useState();return f.useEffect(()=>{r&&t.requestSchema(r.resourceType).then(o).catch(console.log)},[t,r]),!n||!r?null:s.createElement(av,{value:{type:r.resourceType,value:e.forceUseInput?e.value:r},ignoreMissingValues:e.ignoreMissingValues})}function soe(e){return s.createElement(cc,null,e.children)}function qa(e){var c,u;let{resource:t,profile:r,padding:n,popupMenuItems:o,...a}=e,i=r??((c=t.meta)==null?void 0:c.author),l=e.dateTime??((u=t.meta)==null?void 0:u.lastUpdated);return s.createElement(O0,{"data-testid":"timeline-item",fill:!0,...a},s.createElement(J,{position:"apart",spacing:8,mx:"xs",my:"sm"},s.createElement(aa,{value:i,link:!0,size:"md"}),s.createElement("div",{style:{flex:1}},s.createElement(ae,{size:"sm"},s.createElement(uc,{color:"dark",weight:500,value:i,link:!0})),s.createElement(ae,{size:"xs"},s.createElement(Ce,{color:"dimmed",to:e.resource},_r(l)),s.createElement(ae,{component:"span",color:"dimmed",mx:8},"·"),s.createElement(Ce,{color:"dimmed",to:e.resource},e.resource.resourceType))),o&&s.createElement(G,{position:"bottom-end",shadow:"md",width:200},s.createElement(G.Target,null,s.createElement(Mr,{radius:"xl","aria-label":`Actions for ${ot(e.resource)}`},s.createElement(hre,null))),o)),s.createElement(E5,null,n&&s.createElement("div",{style:{padding:"0 16px 16px 16px"}},e.children),!n&&s.createElement(s.Fragment,null,e.children)))}function L5(e,t){e.sort((r,n)=>{let o=JS(r,t),a=JS(n,t);return o>a?1:o<a?-1:ZS(r,t)-ZS(n,t)})}function JS(e,t){if(!F5(e,t)){let r=e.priority;if(typeof r=="string")return{stat:4,asap:3,urgent:2}[r]??0}return 0}function ZS(e,t){var n;if(!F5(e,t)){if(e.resourceType==="Communication"&&e.sent)return new Date(e.sent).getTime();if((e.resourceType==="DiagnosticReport"||e.resourceType==="Media"||e.resourceType==="Observation")&&e.issued)return new Date(e.issued).getTime();if(e.resourceType==="DocumentReference"&&e.date)return new Date(e.date).getTime()}let r=(n=e.meta)==null?void 0:n.lastUpdated;return r?new Date(r).getTime():0}function F5(e,t){return!!t&&e.resourceType===t.resourceType&&e.id===t.id}var coe=W(e=>({pinnedComment:{backgroundColor:e.colors.blue[0]}}));function jm(e){let t=te(),r=$m(),n=t.getProfile(),o=f.useRef(null),a=Xe(e.value),[i,l]=f.useState(),[c,u]=f.useState([]),d=e.loadTimelineResources,m=f.useRef(c);m.current=c;let h=f.useCallback(k=>{L5(k,a),k.reverse(),u(k)},[a]),g=f.useCallback(k=>{let T=[];for(let L of k){if(L.status!=="fulfilled")continue;let U=L.value;if(U.type==="history"&&l(U),U.entry)for(let V of U.entry)T.push(V.resource)}h(T)},[h]),y=f.useCallback(k=>h([...m.current,k]),[h]),_=f.useCallback(()=>{var L;let k,T;"resourceType"in e.value?(k=e.value.resourceType,T=e.value.id):[k,T]=(L=e.value.reference)==null?void 0:L.split("/"),d(t,k,T).then(g).catch(console.log)},[t,e.value,d,g]);f.useEffect(()=>_(),[_]);function E(k){!a||!e.createCommunication||t.createResource(e.createCommunication(a,n,k)).then(T=>y(T)).catch(console.log)}function w(k){!a||!e.createMedia||t.createResource(e.createMedia(a,n,k)).then(T=>y(T)).then(()=>Du({id:"upload-notification",color:"teal",title:"Upload complete",message:"",icon:s.createElement(ure,{size:16}),autoClose:2e3})).catch(T=>Du({id:"upload-notification",color:"red",title:"Upload error",message:$e(T),icon:s.createElement(vre,{size:16}),autoClose:2e3}))}function v(k,T){return t.updateResource({...k,priority:T})}function b(k){v(k,"stat").then(_).catch(console.log)}function x(k){v(k,"routine").then(_).catch(console.log)}function P(k){r(`/${k.resourceType}/${k.id}`)}function O(k){r(`/${k.resourceType}/${k.id}/edit`)}function $(k){r(`/${k.resourceType}/${k.id}/delete`)}function C(k){var T;r(`/${k.resourceType}/${k.id}/_history/${(T=k.meta)==null?void 0:T.versionId}`)}function R(){ie({id:"upload-notification",loading:!0,title:"Initializing upload...",message:"Please wait...",autoClose:!1,withCloseButton:!1})}function j(k){Du({id:"upload-notification",loading:!0,title:"Uploading...",message:goe(k),autoClose:!1,withCloseButton:!1})}return a?s.createElement(soe,null,e.createCommunication&&s.createElement(O0,null,s.createElement(Ie,{testid:"timeline-form",onSubmit:k=>{E(k.text);let T=o.current;T&&(T.value="",T.focus())}},s.createElement(J,{spacing:"xs",noWrap:!0,style:{width:"100%"}},s.createElement(aa,{value:n}),s.createElement(ne,{name:"text",ref:o,placeholder:"Add comment",style:{width:"100%",maxWidth:300}}),s.createElement(Mr,{type:"submit",radius:"xl",color:"blue",variant:"filled"},s.createElement(xre,{size:16})),s.createElement(b0,{onUpload:w,onUploadStart:R,onUploadProgress:j},k=>s.createElement(Mr,{...k,radius:"xl",color:"blue",variant:"filled"},s.createElement(w5,{size:16})))))),c.map(k=>{var L;if(!k)return null;let T=`${k.resourceType}/${k.id}/${(L=k.meta)==null?void 0:L.versionId}`;if(k.resourceType===a.resourceType&&k.id===a.id)return s.createElement(uoe,{key:T,history:i,resource:k,onDetails:C});switch(k.resourceType){case"AuditEvent":return s.createElement(moe,{key:T,resource:k,onDetails:P});case"Communication":return s.createElement(foe,{key:T,resource:k,onPin:k.priority!=="stat"?b:void 0,onUnpin:k.priority==="stat"?x:void 0,onDetails:P,onEdit:O,onDelete:$});case"DiagnosticReport":return s.createElement(hoe,{key:T,resource:k,onDetails:P,onEdit:O,onDelete:$});case"Media":return s.createElement(poe,{key:T,resource:k,onDetails:P,onEdit:O,onDelete:$});default:return s.createElement(qa,{key:T,resource:k,padding:!0},s.createElement(C0,{value:k,ignoreMissingValues:!0}))}})):s.createElement(tr,{style:{width:"100%",height:"100%"}},s.createElement(Un,null))}function ol(e){return s.createElement(G.Dropdown,null,s.createElement(G.Label,null,"Resource"),e.onPin&&s.createElement(G.Item,{icon:s.createElement(Ere,{size:14}),onClick:()=>e.onPin(e.resource),"aria-label":`Pin ${ot(e.resource)}`},"Pin"),e.onUnpin&&s.createElement(G.Item,{icon:s.createElement(Sre,{size:14}),onClick:()=>e.onUnpin(e.resource),"aria-label":`Unpin ${ot(e.resource)}`},"Unpin"),e.onDetails&&s.createElement(G.Item,{icon:s.createElement(_re,{size:14}),onClick:()=>e.onDetails(e.resource),"aria-label":`Details ${ot(e.resource)}`},"Details"),e.onEdit&&s.createElement(G.Item,{icon:s.createElement(gre,{size:14}),onClick:()=>e.onEdit(e.resource),"aria-label":`Edit ${ot(e.resource)}`},"Edit"),e.onDelete&&s.createElement(s.Fragment,null,s.createElement(G.Divider,null),s.createElement(G.Label,null,"Danger zone"),s.createElement(G.Item,{color:"red",icon:s.createElement(x5,{size:14}),onClick:()=>e.onDelete(e.resource),"aria-label":`Delete ${ot(e.resource)}`},"Delete")))}function uoe(e){let t=doe(e.history,e.resource);return t?s.createElement(qa,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(ol,{...e})},s.createElement(loe,{original:t,revised:e.resource})):s.createElement(qa,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(ol,{...e})},s.createElement("h3",null,"Created"),s.createElement(C0,{value:e.resource,ignoreMissingValues:!0,forceUseInput:!0}))}function doe(e,t){let r=e.entry,n=r.findIndex(o=>{var a,i,l;return((i=(a=o.resource)==null?void 0:a.meta)==null?void 0:i.versionId)===((l=t.meta)==null?void 0:l.versionId)});if(!(n>=r.length-1))return r[n+1].resource}function foe(e){var n,o;let{classes:t}=coe(),r=!e.resource.priority||e.resource.priority==="routine"?void 0:t.pinnedComment;return s.createElement(qa,{resource:e.resource,profile:e.resource.sender,dateTime:e.resource.sent,padding:!0,className:r,popupMenuItems:s.createElement(ol,{...e})},s.createElement("p",null,(o=(n=e.resource.payload)==null?void 0:n[0])==null?void 0:o.contentString))}function poe(e){var n;let t=(n=e.resource.content)==null?void 0:n.contentType,r=t&&!t.startsWith("image/")&&!t.startsWith("video/")&&t!=="application/pdf";return s.createElement(qa,{resource:e.resource,padding:!!r,popupMenuItems:s.createElement(ol,{...e})},s.createElement(sc,{value:e.resource.content}))}function moe(e){return s.createElement(qa,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(ol,{...e})},s.createElement(pl,null,s.createElement("pre",null,e.resource.outcomeDesc)))}function hoe(e){return s.createElement(qa,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(ol,{...e})},s.createElement($0,{value:e.resource}))}function goe(e){if(e.lengthComputable){let t=100*e.loaded/e.total;return`Uploaded: ${Nh(e.loaded)} / ${Nh(e.total)} ${t.toFixed(2)}%`}return`Uploaded: ${Nh(e.loaded)}`}function Nh(e){if(e===0)return"0.00 B";let t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP".charAt(t)+"B"}function voe(e){return s.createElement(jm,{value:e.resource,loadTimelineResources:async(t,r,n)=>{let o=`${r}/${n}`,a=100;return Promise.allSettled([t.readHistory(r,n),t.search("Task",{_filter:`based-on eq ${o} or focus eq ${o} or subject eq ${o}`,_count:a})])}})}function _e(e){let{children:t,...r}=e;return s.createElement(cc,null,s.createElement(O0,{...r},t))}function yoe(e){return s.createElement(jm,{value:e.encounter,loadTimelineResources:async(t,r,n)=>Promise.allSettled([t.readHistory("Encounter",n),t.search("Communication","encounter=Encounter/"+n),t.search("Media","encounter=Encounter/"+n)]),createCommunication:(t,r,n)=>({resourceType:"Communication",status:"completed",encounter:at(t),subject:t.subject,sender:at(r),sent:new Date().toISOString(),payload:[{contentString:n}]}),createMedia:(t,r,n)=>({resourceType:"Media",status:"completed",encounter:at(t),subject:t.subject,operator:at(r),issued:new Date().toISOString(),content:n})})}function woe(e){let t;try{t=yte(e.path,e.resource)}catch(r){return console.warn("FhirPathDisplay:",r),null}if(t.length>1)throw new Error(`Component "path" for "FhirPathDisplay" must resolve to a single element. Received ${t.length} elements [${JSON.stringify(t,null,2)}]`);return s.createElement(mo,{value:t[0]||"",propertyType:e.propertyType})}function _oe(e){return s.createElement(Er,{title:"Export",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:e.onCancel},s.createElement(ue,{display:"flex",sx:{justifyContent:"space-between"}},e.exportCsv&&s.createElement(eP,{text:"CSV",exportLogic:e.exportCsv,onCancel:e.onCancel}),e.exportTransactionBundle&&s.createElement(eP,{text:"Transaction Bundle",exportLogic:e.exportTransactionBundle,onCancel:e.onCancel})),s.createElement(ae,{sx:{marginTop:"10px",marginLeft:"2px"}},"Limited to 1000 records"))}function eP(e){return s.createElement(Z,{onClick:()=>{e.exportLogic(),e.onCancel()}},`Export as ${e.text}`)}var boe={string:[ee.EQUALS,ee.NOT,ee.CONTAINS,ee.EXACT],fulltext:[ee.EQUALS,ee.NOT,ee.CONTAINS,ee.EXACT],token:[ee.EQUALS,ee.NOT],reference:[ee.EQUALS,ee.NOT],numeric:[ee.EQUALS,ee.NOT_EQUALS,ee.GREATER_THAN,ee.LESS_THAN,ee.GREATER_THAN_OR_EQUALS,ee.LESS_THAN_OR_EQUALS],quantity:[ee.EQUALS,ee.NOT_EQUALS,ee.GREATER_THAN,ee.LESS_THAN,ee.GREATER_THAN_OR_EQUALS,ee.LESS_THAN_OR_EQUALS],date:[ee.EQUALS,ee.NOT_EQUALS,ee.GREATER_THAN,ee.LESS_THAN,ee.GREATER_THAN_OR_EQUALS,ee.LESS_THAN_OR_EQUALS,ee.STARTS_AFTER,ee.ENDS_BEFORE,ee.APPROXIMATELY],datetime:[ee.EQUALS,ee.NOT_EQUALS,ee.GREATER_THAN,ee.LESS_THAN,ee.GREATER_THAN_OR_EQUALS,ee.LESS_THAN_OR_EQUALS,ee.STARTS_AFTER,ee.ENDS_BEFORE,ee.APPROXIMATELY]},xoe={eq:"equals",ne:"not equals",gt:"greater than",lt:"less than",ge:"greater than or equals",le:"less than or equals",sa:"starts after",eb:"ends before",ap:"approximately",contains:"contains",exact:"exact",text:"text",not:"not",above:"above",below:"below",in:"in","not-in":"not in","of-type":"of type",missing:"missing",identifier:"identifier",iterate:"iterate"};function k0(e,t){return{...e,filters:t,offset:0,name:void 0}}function j0(e,t){return k0(e,(e.filters??[]).filter(r=>r.code!==t))}function Rm(e,t,r,n,o){o&&(e=j0(e,t));let a=[];return e.filters&&a.push(...e.filters),a.push({code:t,operator:r,value:n??""}),k0(e,a)}function Eoe(e,t){if(!e.filters)return e;let r=[...e.filters];return r.splice(t,1),{...e,filters:r,name:void 0}}function Soe(e,t){return R0(e,t,-1)}function Poe(e,t){return R0(e,t,0)}function $oe(e,t){return R0(e,t,1)}function R0(e,t,r){let n=new Date;n.setDate(n.getDate()+r),n.setHours(0,0,0,0);let o=new Date(n.getTime());return o.setDate(o.getDate()+1),o.setTime(o.getTime()-1),I0(e,t,n,o)}function Ooe(e,t){return T0(e,t,-1)}function Coe(e,t){return T0(e,t,0)}function koe(e,t){return T0(e,t,1)}function T0(e,t,r){let n=new Date;n.setMonth(n.getMonth()+r),n.setDate(1),n.setHours(0,0,0,0);let o=new Date(n.getTime());return o.setMonth(o.getMonth()+1),o.setDate(1),o.setHours(0,0,0,0),o.setTime(o.getTime()-1),I0(e,t,n,o)}function joe(e,t){let r=new Date;return r.setMonth(0),r.setDate(1),r.setHours(0,0,0,0),I0(e,t,r,new Date)}function I0(e,t,r,n){return e=j0(e,t),e=tP(e,t,ee.GREATER_THAN_OR_EQUALS,r),e=tP(e,t,ee.LESS_THAN_OR_EQUALS,n),e}function tP(e,t,r,n){return Rm(e,t,r,n.toISOString())}function rP(e,t,r=!0){return Rm(e,t,ee.MISSING,r.toString())}function Roe(e,t){return e.offset===t?e:{...e,offset:t,name:void 0}}function Toe(e,t){let r=e.count??ac,n=(t-1)*r;return Roe(e,n)}function Ioe(e,t,r){return t===Doe(e)&&r!==void 0&&r===Noe(e)?e:{...e,sortRules:[{code:t,descending:!!r}],name:void 0}}function Doe(e){let t=e.sortRules;if(!t||t.length===0)return;let r=t[0].code;return r.startsWith("-")?r.substr(1):r}function Noe(e){let t=e.sortRules;return!t||t.length===0?!1:!!t[0].descending}function Aoe(e){return boe[e.type]}function D0(e){return xoe[e]??""}function Ln(e){let t=e;return t.includes(".")&&(t=t.split(".").pop()),t==="id"?"ID":t==="versionId"?"Version ID":(t=t.replace("[x]",""),t=t.replace(/([A-Z])/g," $1"),t=t.replace(/[-_]/g," "),t=t.replace(/\s+/g," "),t=t.trim(),t.split(/\s/).map(xr).join(" "))}function Moe(e,t){var n,o;let r=t.name;return r==="id"?e.id:r==="meta.versionId"?(n=e.meta)==null?void 0:n.versionId:r==="_lastUpdated"?_r((o=e.meta)==null?void 0:o.lastUpdated):t.elementDefinition&&`${e.resourceType}.${t.name}`===t.elementDefinition.path?zoe(e,t.elementDefinition):t.searchParams&&t.searchParams.length===1&&t.name===t.searchParams[0].code?Loe(e,t.searchParams[0]):null}function zoe(e,t){var a,i,l;let r=((l=(i=(a=t.path)==null?void 0:a.split("."))==null?void 0:i.pop())==null?void 0:l.replaceAll("[x]",""))??"",[n,o]=Ba({type:e.resourceType,value:e},r);return n?s.createElement(mo,{property:t,propertyType:o,value:n,maxWidth:200,ignoreMissingValues:!0,link:!1}):null}function Loe(e,t){let r=d5(t.expression,[{type:e.resourceType,value:e}]);return!r||r.length===0?null:s.createElement(s.Fragment,null,r.map((n,o)=>s.createElement(mo,{key:`${o}-${r.length}`,propertyType:n.type,value:n.value,maxWidth:200,ignoreMissingValues:!0,link:!1})))}function Foe(e){let[t,r]=f.useState({search:JSON.parse(br(e.search))}),n=f.useRef(null),o=f.useRef(null);f.useEffect(()=>{r({search:e.search})},[e.search]);function a(v){v.key==="Enter"&&u()}function i(){u()}function l(v){v.key==="Enter"&&d()}function c(){d()}function u(){var x;let v=t.search.fields??[],b=(x=n.current)==null?void 0:x.value;if(b){let P=[...v,b];r({search:{...t.search,fields:P}})}}function d(){var x;let v=t.search.fields??[],b=(x=o.current)==null?void 0:x.value;if(b){let P=[...v];P.splice(P.indexOf(b),1),r({search:{...t.search,fields:P}})}}function m(){var O;let v=t.search.fields??[],b=(O=o.current)==null?void 0:O.value;if(!b)return;let x=[...v],P=x.indexOf(b);P<=0||(g(x,P,P-1),r({search:{...t.search,fields:x}}))}function h(){var O;let v=t.search.fields??[],b=(O=o.current)==null?void 0:O.value;if(!b)return;let x=[...v],P=x.indexOf(b);P>=x.length-1||(g(x,P,P+1),r({search:{...t.search,fields:x}}))}function g(v,b,x){let P=v[b];v[b]=v[x],v[x]=P}if(!e.visible)return null;let y=e.search.resourceType,_=Pt.types[y],E=t.search.fields??[],w=Voe(_).filter(v=>!E.includes(v)).sort((v,b)=>v.localeCompare(b));return s.createElement(Er,{title:"Fields",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:e.onCancel},s.createElement("div",null,s.createElement("table",{style:{margin:"auto"}},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",{colSpan:2,align:"center"},"Available"),s.createElement("th",{colSpan:2,align:"center"},"Selected"))),s.createElement("tbody",null,s.createElement("tr",null,s.createElement("td",{colSpan:2,align:"center"},s.createElement("select",{ref:n,size:15,tabIndex:1,style:{width:"200px"},onKeyDown:v=>a(v),onDoubleClick:()=>i(),"data-testid":"available"},w.map(v=>s.createElement("option",{key:v,value:v},Ln(v))))),s.createElement("td",{colSpan:2,align:"center"},s.createElement("select",{ref:o,size:15,tabIndex:4,style:{width:"200px"},onKeyDown:v=>l(v),onDoubleClick:()=>c(),"data-testid":"selected"},E.map(v=>s.createElement("option",{key:v,value:v},Ln(v))))))),s.createElement("tfoot",null,s.createElement("tr",null,s.createElement("td",{align:"center"},s.createElement(Z,{compact:!0,variant:"outline",onClick:u},"Add")),s.createElement("td",{align:"center"},s.createElement(Z,{compact:!0,variant:"outline",onClick:d},"Remove")),s.createElement("td",{align:"center"},s.createElement(Z,{compact:!0,variant:"outline",onClick:m},"Up")),s.createElement("td",{align:"center"},s.createElement(Z,{compact:!0,variant:"outline",onClick:h},"Down")))))),s.createElement(Z,{onClick:()=>e.onOk(t.search)},"OK"))}function Voe(e){let t=[],r=new Set,n=new Set;for(let o of Object.keys(e.properties))t.push(o),r.add(o.toLowerCase()),n.add(Ln(o));if(e.searchParams)for(let o of Object.keys(e.searchParams)){let a=Ln(o);!r.has(o)&&!n.has(a)&&(t.push(o),r.add(o),n.add(Ln(o)))}return t}function V5(e){var o;let{resourceType:t,filter:r}=e,n=(o=Pt.types[t].searchParams)==null?void 0:o[r.code];if(n){if(n.type==="reference"&&(r.operator===ee.EQUALS||r.operator===ee.NOT_EQUALS))return s.createElement(uc,{value:{reference:r.value}});let a=f0(t,n);if(r.code==="_lastUpdated"||a.type===Ao.DATETIME)return s.createElement(s.Fragment,null,_r(r.value))}return s.createElement(s.Fragment,null,r.value)}function B5(e){let t=f0(e.resourceType,e.searchParam),r="filter-value";switch(t.type){case Ao.REFERENCE:return s.createElement(km,{name:r,defaultValue:{reference:e.defaultValue},targetTypes:e.searchParam.target,autoFocus:e.autoFocus,onChange:n=>{n?e.onChange(n.reference):e.onChange("")}});case Ao.BOOLEAN:return s.createElement(nn,{name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultChecked:e.defaultValue==="true",autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.checked.toString())});case Ao.DATE:return s.createElement(ne,{type:"date",name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.value)});case Ao.DATETIME:return s.createElement(Ua,{name:r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:e.onChange});case Ao.NUMBER:return s.createElement(ne,{type:"number",name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.value)});case Ao.QUANTITY:return s.createElement(Wa,{name:r,defaultValue:Boe(e.defaultValue),autoFocus:e.autoFocus,onChange:n=>{n?e.onChange(`${n.value}`):e.onChange("")}});default:return s.createElement(ne,{name:r,"data-autofocus":e.autoFocus,"data-testid":r,defaultValue:e.defaultValue,autoFocus:e.autoFocus,onChange:n=>e.onChange(n.currentTarget.value),placeholder:"Search value"})}}function Boe(e){if(e){let[t,r,n]=e.split("|");if(t)return{value:parseFloat(t),system:r,unit:n}}}function Uoe(e){let[t,r]=f.useState(JSON.parse(br(e.search))),[n,o]=f.useState(-1),a=f.useRef(t);a.current=t,f.useEffect(()=>{r(JSON.parse(br(e.search)))},[e.search]);function i(d){r(Rm(a.current,d.code,d.operator,d.value))}if(!e.visible)return null;let l=e.search.resourceType,c=Pt.types[l].searchParams??{},u=t.filters||[];return s.createElement(Er,{title:"Filters",closeButtonProps:{"aria-label":"Close"},size:900,opened:e.visible,onClose:e.onCancel},s.createElement("div",null,s.createElement("table",null,s.createElement("colgroup",null,s.createElement("col",{style:{width:200}}),s.createElement("col",{style:{width:200}}),s.createElement("col",{style:{width:380}}),s.createElement("col",{style:{width:120}})),s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Field"),s.createElement("th",null,"Operation"),s.createElement("th",null,"Value"),s.createElement("th",null,"Actions"))),s.createElement("tbody",null,u.map((d,m)=>m===n?s.createElement(nP,{key:`filter-${m}-${u.length}-input`,resourceType:l,searchParams:c,defaultValue:d,okText:"Save",onOk:h=>{let g=[...u];g[m]=h,r(k0(a.current,g)),o(-1)},onCancel:()=>o(-1)}):s.createElement(Woe,{key:`filter-${m}-${u.length}-display`,resourceType:l,searchParams:c,filter:d,onEdit:()=>o(m),onDelete:()=>r(Eoe(a.current,m))})),s.createElement(nP,{resourceType:l,searchParams:c,okText:"Add",onOk:i})))),s.createElement(J,{position:"right",mt:"xl"},s.createElement(Z,{onClick:()=>e.onOk(a.current)},"OK")))}function Woe(e){let{filter:t}=e;return s.createElement("tr",null,s.createElement("td",null,Ln(t.code)),s.createElement("td",null,D0(t.operator)),s.createElement("td",null,s.createElement(V5,{resourceType:e.resourceType,filter:t})),s.createElement("td",null,s.createElement(Z,{compact:!0,variant:"outline",onClick:e.onEdit},"Edit"),s.createElement(Z,{compact:!0,variant:"outline",onClick:e.onDelete},"Delete")))}function nP(e){let[t,r]=f.useState(e.defaultValue??{}),n=f.useRef(t);n.current=t;function o(u){r({...n.current,code:u})}function a(u){r({...n.current,operator:u})}function i(u){r({...n.current,value:u})}let l=e.searchParams[t.code],c=l&&Aoe(l);return s.createElement("tr",null,s.createElement("td",null,s.createElement(vt,{"data-testid":"filter-field",defaultValue:n.current.code,onChange:u=>o(u.currentTarget.value),data:Object.keys(e.searchParams).map(u=>({value:u,label:Ln(u)}))})),s.createElement("td",null,c&&s.createElement(vt,{"data-testid":"filter-operation",defaultValue:t.operator,onChange:u=>a(u.currentTarget.value),data:["",...c.map(u=>({value:u,label:D0(u)}))]})),s.createElement("td",null,l&&t.operator&&s.createElement(B5,{resourceType:e.resourceType,searchParam:l,defaultValue:t.value,onChange:i})),s.createElement("td",null,t.code&&t.operator&&t.value&&s.createElement(Z,{compact:!0,variant:"outline",onClick:()=>{e.onOk(n.current),r({})}},e.okText),e.onCancel&&s.createElement(Z,{compact:!0,variant:"outline",onClick:e.onCancel},"Cancel")))}function Hoe(e){let[t,r]=f.useState(e.defaultValue??"");if(!e.visible||!e.searchParam||!e.filter)return null;function n(){e.onOk({...e.filter,value:t})}return s.createElement(Er,{title:e.title,size:"xl",opened:e.visible,onClose:e.onCancel},s.createElement(Ie,{onSubmit:n},s.createElement(Jr,null,s.createElement(Jr.Col,{span:10},s.createElement(B5,{resourceType:e.resourceType,searchParam:e.searchParam,defaultValue:t,autoFocus:!0,onChange:r})),s.createElement(Jr.Col,{span:2},s.createElement(Z,{onClick:n,fullWidth:!0},"OK")))))}function qoe(e){if(!e.searchParams)return null;function t(a,i){o(Ioe(e.search,a.code,i))}function r(a){o(j0(e.search,a.code))}function n(a,i){e.onPrompt(a,{code:a.code,operator:i,value:""})}function o(a){e.onChange(a)}return e.searchParams.length===1?s.createElement(Qoe,{search:e.search,searchParam:e.searchParams[0],onSort:t,onPrompt:n,onChange:o,onClear:r}):s.createElement(G.Dropdown,null,e.searchParams.map(a=>s.createElement(G.Item,{key:a.code},Ln(a.code))))}function Qoe(e){switch(e.searchParam.type){case"date":return s.createElement(Goe,{...e});case"number":case"quantity":return s.createElement(Koe,{...e});case"reference":return s.createElement(Yoe,{...e});case"string":case"token":case"uri":return s.createElement(Xoe,{...e});default:return s.createElement(s.Fragment,null,"Unknown search param type: ",e.searchParam.type)}}function Goe(e){let{searchParam:t}=e,r=t.code;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(h0,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort Oldest to Newest"),s.createElement(G.Item,{icon:s.createElement(g0,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Newest to Oldest"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Cm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(Om,{size:14}),onClick:()=>e.onPrompt(t,ee.NOT_EQUALS)},"Does not equal..."),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(b5,{size:14}),onClick:()=>e.onPrompt(t,ee.ENDS_BEFORE)},"Before..."),s.createElement(G.Item,{icon:s.createElement(_5,{size:14}),onClick:()=>e.onPrompt(t,ee.STARTS_AFTER)},"After..."),s.createElement(G.Item,{icon:s.createElement(lre,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Between..."),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(va,{size:14}),onClick:()=>e.onChange($oe(e.search,r))},"Tomorrow"),s.createElement(G.Item,{icon:s.createElement(va,{size:14}),onClick:()=>e.onChange(Poe(e.search,r))},"Today"),s.createElement(G.Item,{icon:s.createElement(va,{size:14}),onClick:()=>e.onChange(Soe(e.search,r))},"Yesterday"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(va,{size:14}),onClick:()=>e.onChange(koe(e.search,r))},"Next Month"),s.createElement(G.Item,{icon:s.createElement(va,{size:14}),onClick:()=>e.onChange(Coe(e.search,r))},"This Month"),s.createElement(G.Item,{icon:s.createElement(va,{size:14}),onClick:()=>e.onChange(Ooe(e.search,r))},"Last Month"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(va,{size:14}),onClick:()=>e.onChange(joe(e.search,r))},"Year to date"),s.createElement(Tm,{...e}))}function Koe(e){let{searchParam:t}=e;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(h0,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort Smallest to Largest"),s.createElement(G.Item,{icon:s.createElement(g0,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Largest to Smallest"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Cm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(Om,{size:14}),onClick:()=>e.onPrompt(t,ee.NOT_EQUALS)},"Does not equal..."),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(_5,{size:14}),onClick:()=>e.onPrompt(t,ee.GREATER_THAN)},"Greater than..."),s.createElement(G.Item,{icon:s.createElement(nv,{size:14}),onClick:()=>e.onPrompt(t,ee.GREATER_THAN_OR_EQUALS)},"Greater than or equal to..."),s.createElement(G.Item,{icon:s.createElement(b5,{size:14}),onClick:()=>e.onPrompt(t,ee.LESS_THAN)},"Less than..."),s.createElement(G.Item,{icon:s.createElement(nv,{size:14}),onClick:()=>e.onPrompt(t,ee.LESS_THAN_OR_EQUALS)},"Less than or equal to..."),s.createElement(Tm,{...e}))}function Yoe(e){let{searchParam:t}=e;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(Cm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(Om,{size:14}),onClick:()=>e.onPrompt(t,ee.NOT)},"Does not equal..."),s.createElement(Tm,{...e}))}function Xoe(e){let{searchParam:t}=e;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(h0,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort A to Z"),s.createElement(G.Item,{icon:s.createElement(g0,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Z to A"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Cm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(Om,{size:14}),onClick:()=>e.onPrompt(t,ee.NOT)},"Does not equal..."),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(cre,{size:14}),onClick:()=>e.onPrompt(t,ee.CONTAINS)},"Contains..."),s.createElement(G.Item,{icon:s.createElement(sre,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Does not contain..."),s.createElement(Tm,{...e}))}function Tm(e){let{searchParam:t}=e,r=t.code;return s.createElement(s.Fragment,null,s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(are,{size:14}),onClick:()=>e.onChange(rP(e.search,r))},"Missing"),s.createElement(G.Item,{icon:s.createElement(ore,{size:14}),onClick:()=>e.onChange(rP(e.search,r,!1))},"Not missing"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(jre,{size:14}),onClick:()=>e.onClear(t)},"Clear filters"))}function Joe(e){let t=e.resourceType,r=[];for(let n of e.fields||["id","_lastUpdated"])r.push(Zoe(t,n));return r}function Zoe(e,t){var a,i;if(t==="_lastUpdated")return{name:"_lastUpdated",searchParams:[{resourceType:"SearchParameter",base:["Resource"],code:"_lastUpdated",name:"_lastUpdated",type:"date",expression:"Resource.meta.lastUpdated"}]};if(t==="meta.versionId")return{name:"meta.versionId",searchParams:[{resourceType:"SearchParameter",base:["Resource"],code:"_versionId",name:"_versionId",type:"token",expression:"Resource.meta.versionId"}]};let r=Pt.types[e],n=r.properties[t],o=(a=r.searchParams)==null?void 0:a[t.toLowerCase()];if(n&&o)return{name:t,elementDefinition:n,searchParams:[o]};if(n){let l;if(r.searchParams){let c=`${e}.${t.replaceAll("[x]","")}`;l=Object.values(r.searchParams).filter(u=>{var d;return(d=u.expression)==null?void 0:d.includes(c)}),l.length===0&&(l=void 0)}return{name:t,elementDefinition:n,searchParams:l}}if(o){let l=f0(e,o);return{name:t,elementDefinition:(i=l.elementDefinitions)==null?void 0:i[0],searchParams:[o]}}return{name:t}}var eae=class extends Event{constructor(e){super("change"),this.definition=e}},tae=class extends Event{constructor(e){super("load"),this.response=e}},_p=class extends Event{constructor(e,t){super("click"),this.resource=e,this.browserEvent=t}},rae=W(e=>({root:{maxWidth:"100%",overflow:"auto",textAlign:"left",marginBottom:"20px"},table:{cursor:"pointer"},tr:{"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.colors.gray[0]}},th:{padding:"0 !important"},control:{width:"100%",padding:`${e.spacing.xs} ${e.spacing.md}`,"&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},icon:{width:21,height:21,borderRadius:21}}));function nae(e){var T,L,U,V;let{classes:t}=rae(),r=te(),[n,o]=f.useState(!1),[a,i]=f.useState(),{search:l,onLoad:c}=e,[u,d]=f.useState({selected:{},fieldEditorVisible:!1,filterEditorVisible:!1,exportDialogVisible:!1,filterDialogVisible:!1}),m=f.useRef(u);m.current=u;let h=l.total??"accurate";f.useEffect(()=>{i(void 0),r.search(l.resourceType,Ti({...l,total:h,fields:void 0})).then(M=>{d({...m.current,searchResponse:M}),c&&c(new tae(M))}).catch(M=>{d({...m.current,searchResponse:void 0}),i(M)})},[r,l,h,c]);function g(M,Q){M.stopPropagation();let A=M.target.checked,z={...m.current.selected};A?z[Q]=!0:delete z[Q],d({...m.current,selected:z})}function y(M){M.stopPropagation();let Q=M.target.checked,A={},z=m.current.searchResponse;Q&&(z!=null&&z.entry)&&z.entry.forEach(q=>{var le;(le=q.resource)!=null&&le.id&&(A[q.resource.id]=!0)}),d({...m.current,selected:A})}function _(){var Q,A;let M=m.current;if(!((Q=M.searchResponse)!=null&&Q.entry)||M.searchResponse.entry.length===0)return!1;for(let z of M.searchResponse.entry)if((A=z.resource)!=null&&A.id&&!M.selected[z.resource.id])return!1;return!0}function E(M){e.onChange&&e.onChange(new eae(M))}function w(M,Q){S5(M.target)||M.button!==2&&(gt(M),M.button!==1&&e.onClick&&e.onClick(new _p(Q,M)),M.button===1&&e.onAuxClick&&e.onAuxClick(new _p(Q,M)))}function v(){return!!(e.onExport??e.onExportCsv??e.onExportTransactionBundle)}if(f.useEffect(()=>{o(!1),r.requestSchema(e.search.resourceType).then(()=>o(!0)).catch(console.log)},[r,e.search.resourceType]),!(n&&Pt.types[e.search.resourceType]))return s.createElement(tr,{style:{width:"100%",height:"100%"}},s.createElement(Un,null));let b=e.checkboxesEnabled,x=Joe(l),P=l.resourceType,O=u.searchResponse,$=(T=O==null?void 0:O.entry)==null?void 0:T.map(M=>M.resource),C="subtle",R="gray",j=16,k=window.innerWidth<768;return s.createElement("div",{className:t.root,"data-testid":"search-control"},!e.hideToolbar&&s.createElement(J,{position:"apart",mb:"xl"},s.createElement(J,{spacing:2},s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(pre,{size:j}),onClick:()=>d({...m.current,fieldEditorVisible:!0})},"Fields"),s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(wre,{size:j}),onClick:()=>d({...m.current,filterEditorVisible:!0})},"Filters"),e.onNew&&s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(yre,{size:j}),onClick:e.onNew},"New..."),!k&&v()&&s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(kre,{size:j}),onClick:e.onExport?e.onExport:()=>d({...m.current,exportDialogVisible:!0})},"Export..."),!k&&e.onDelete&&s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(x5,{size:j}),onClick:()=>e.onDelete(Object.keys(u.selected))},"Delete..."),!k&&e.onBulk&&s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(ire,{size:j}),onClick:()=>e.onBulk(Object.keys(u.selected))},"Bulk...")),O&&s.createElement(ae,{size:"xs",color:"dimmed"},lae(l,O.total),"-",sae(l,O.total)," of"," ",`${h==="estimate"?"~":""}${(L=O.total)==null?void 0:L.toLocaleString()}`)),s.createElement(Xa,{className:t.table},s.createElement("thead",null,s.createElement("tr",null,b&&s.createElement("th",null,s.createElement("input",{type:"checkbox",value:"checked","aria-label":"all-checkbox","data-testid":"all-checkbox",checked:_(),onChange:M=>y(M)})),x.map(M=>s.createElement("th",{key:M.name},s.createElement(G,{shadow:"md",width:240,position:"bottom-end"},s.createElement(G.Target,null,s.createElement(Jo,{className:t.control},s.createElement(J,{position:"apart",noWrap:!0},s.createElement(ae,{weight:500,size:"sm"},Ln(M.name)),s.createElement(tr,{className:t.icon},s.createElement(nre,{size:14,stroke:1.5}))))),s.createElement(qoe,{search:e.search,searchParams:M.searchParams,onPrompt:(Q,A)=>{d({...m.current,filterDialogVisible:!0,filterDialogSearchParam:Q,filterDialogFilter:A})},onChange:Q=>{E(Q)}}))))),!e.hideFilters&&s.createElement("tr",null,b&&s.createElement("th",null),x.map(M=>s.createElement("th",{key:M.name},M.searchParams&&s.createElement(oae,{resourceType:P,searchParams:M.searchParams,filters:e.search.filters}))))),s.createElement("tbody",null,$==null?void 0:$.map(M=>M&&s.createElement("tr",{key:M.id,className:t.tr,"data-testid":"search-control-row",onClick:Q=>w(Q,M),onAuxClick:Q=>w(Q,M)},b&&s.createElement("td",null,s.createElement("input",{type:"checkbox",value:"checked","data-testid":"row-checkbox","aria-label":`Checkbox for ${M.id}`,checked:!!u.selected[M.id],onChange:Q=>g(Q,M.id)})),x.map(Q=>s.createElement("td",{key:Q.name},Moe(M,Q))))))),($==null?void 0:$.length)===0&&s.createElement(cc,null,s.createElement(tr,{style:{height:150}},s.createElement(ae,{size:"xl",color:"dimmed"},"No results"))),(O==null?void 0:O.total)!==void 0&&O.total>0&&s.createElement(tr,{m:"md",p:"md"},s.createElement(Wn,{value:aae(l),total:iae(l,O.total),onChange:M=>E(Toe(l,M)),getControlProps:M=>{switch(M){case"previous":return{"aria-label":"Previous page"};case"next":return{"aria-label":"Next page"};default:return{}}}})),a&&s.createElement("div",{"data-testid":"search-error"},s.createElement("pre",{style:{textAlign:"left"}},JSON.stringify(a,void 0,2))),s.createElement(Foe,{search:e.search,visible:m.current.fieldEditorVisible,onOk:M=>{E(M),d({...m.current,fieldEditorVisible:!1})},onCancel:()=>{d({...m.current,fieldEditorVisible:!1})}}),s.createElement(Uoe,{search:e.search,visible:m.current.filterEditorVisible,onOk:M=>{E(M),d({...m.current,filterEditorVisible:!1})},onCancel:()=>{d({...m.current,filterEditorVisible:!1})}}),s.createElement(_oe,{visible:m.current.exportDialogVisible,exportCsv:e.onExportCsv,exportTransactionBundle:e.onExportTransactionBundle,onCancel:()=>{d({...m.current,exportDialogVisible:!1})}}),s.createElement(Hoe,{key:(U=u.filterDialogSearchParam)==null?void 0:U.code,visible:m.current.filterDialogVisible,title:(V=u.filterDialogSearchParam)!=null&&V.code?Ln(u.filterDialogSearchParam.code):"",resourceType:P,searchParam:u.filterDialogSearchParam,filter:u.filterDialogFilter,defaultValue:"",onOk:M=>{E(Rm(e.search,M.code,M.operator,M.value)),d({...m.current,filterDialogVisible:!1})},onCancel:()=>{d({...m.current,filterDialogVisible:!1})}}))}var dc=s.memo(nae);function oae(e){let t=(e.filters??[]).filter(r=>e.searchParams.find(n=>n.code===r.code));return t.length===0?s.createElement("span",null,"no filters"):s.createElement(s.Fragment,null,t.map((r,n)=>s.createElement("div",{key:`filter-${n}-${t.length}`},D0(r.operator)," ",s.createElement(V5,{resourceType:e.resourceType,filter:r}))))}function aae(e){return Math.floor((e.offset??0)/(e.count??ac))+1}function iae(e,t){let r=e.count??ac;return Math.ceil(t/r)}function lae(e,t){return Math.min(t,(e.offset??0)+1)}function sae(e,t){return Math.min(t,((e.offset??0)+1)*(e.count??ac))}function cae(e){let t=te(),[r,n]=f.useState(),[o,a]=f.useState(),{query:i,fields:l}=e,[c,u]=f.useState(),[d,m]=f.useState({}),h=f.useRef();h.current=c;let g=f.useRef({});g.current=d,f.useEffect(()=>{a(void 0),t.graphql(i).then(u).catch(b=>a(yt(b)))},[t,i]);function y(b,x){b.stopPropagation();let P=b.target.checked,O={...g.current};P?O[x]=!0:delete O[x],m(O)}function _(b){var $;b.stopPropagation();let x=b.target.checked,P={},O=($=h.current)==null?void 0:$.data.ResourceList;x&&O&&O.forEach(C=>{C.id&&(P[C.id]=!0)}),m(P)}function E(){var x;let b=(x=h.current)==null?void 0:x.data.ResourceList;if(!b||b.length===0)return!1;for(let P of b)if(P.id&&!g.current[P.id])return!1;return!0}function w(b,x){S5(b.target)||(gt(b),b.button!==1&&e.onClick&&e.onClick(new _p(x,b)),b.button===1&&e.onAuxClick&&e.onAuxClick(new _p(x,b)))}if(f.useEffect(()=>{t.requestSchema(e.resourceType).then(b=>{n({...b})}).catch(console.log)},[t,e.resourceType]),!(r!=null&&r.types[e.resourceType]))return s.createElement(Un,null);let v=e.checkboxesEnabled;return s.createElement("div",{onContextMenu:b=>gt(b),"data-testid":"search-control"},s.createElement(Xa,null,s.createElement("thead",null,s.createElement("tr",null,v&&s.createElement("th",null,s.createElement("input",{type:"checkbox",value:"checked","aria-label":"all-checkbox","data-testid":"all-checkbox",checked:E(),onChange:b=>_(b)})),l.map(b=>s.createElement("th",{key:b.name},b.name)))),s.createElement("tbody",null,c==null?void 0:c.data.ResourceList.map(b=>b&&s.createElement("tr",{key:b.id,"data-testid":"search-control-row",onClick:x=>w(x,b),onAuxClick:x=>w(x,b)},v&&s.createElement("td",null,s.createElement("input",{type:"checkbox",value:"checked","data-testid":"row-checkbox","aria-label":`Checkbox for ${b.id}`,checked:!!d[b.id],onChange:x=>y(x,b.id)})),l.map(x=>s.createElement("td",{key:x.name},s.createElement(woe,{propertyType:x.propertyType,path:x.fhirPath,resource:b}))))))),(c==null?void 0:c.data.ResourceList.length)===0&&s.createElement("div",{"data-testid":"empty-search"},"No results"),o&&s.createElement("div",{"data-testid":"search-error"},s.createElement("pre",{style:{textAlign:"left"}},JSON.stringify(o,void 0,2))),e.onBulk&&s.createElement(Z,{onClick:()=>e.onBulk(Object.keys(g.current))},"Bulk..."))}var uae=s.memo(cae);function xn(e){return s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 491 491",style:{width:e.size,height:e.size}},s.createElement("title",null,"Medplum Logo"),s.createElement("path",{fill:e.fill??"#ad7136",d:"M282 67c6-16 16-29 29-40L289 0c-22 17-37 41-43 68l17 23 19-24z"}),s.createElement("path",{fill:e.fill??"#946af9",d:"M311 63c-17 0-33 4-48 11-16-7-32-11-49-11-87 0-158 96-158 214s71 214 158 214c17 0 33-4 49-11 15 7 31 11 48 11 87 0 158-96 158-214S398 63 311 63z"}),s.createElement("path",{fill:e.fill??"#7857c5",d:"M231 489l-17 2c-87 0-158-96-158-214S127 63 214 63l17 1c-39 12-70 102-70 213s31 201 70 212z"}),s.createElement("path",{fill:e.fill??"#40bc26",d:"M207 220a176 176 0 01-177 43A176 176 0 01251 43l1 5c17 59 2 125-45 172z"}),s.createElement("path",{fill:e.fill??"#33961e",d:"M252 48A421 421 0 0057 270l-27-7A176 176 0 01251 43l1 5z"}))}function Za(e){var r;let t=((r=e.outcome)==null?void 0:r.issue)||e.issues;return!t||t.length===0?null:s.createElement(Gs,{icon:s.createElement(p0,{size:16}),color:"red"},t.map(n=>{var o,a;return s.createElement("div",{"data-testid":"text-field-error",key:(o=n.details)==null?void 0:o.text},(a=n.details)==null?void 0:a.text)}))}function dae(e){let t=f.useCallback((r,n,o)=>{let a=`${n}/${o}`,i=100;return Promise.allSettled([r.readHistory("Patient",o),r.search("Communication",{subject:a,_count:i}),r.search("Device",{patient:a,_count:i}),r.search("DeviceRequest",{patient:a,_count:i}),r.search("DiagnosticReport",{subject:a,_count:i}),r.search("Media",{subject:a,_count:i}),r.search("ServiceRequest",{subject:a,_count:i}),r.search("Task",{subject:a,_count:i})])},[]);return s.createElement(jm,{value:e.patient,loadTimelineResources:t,createCommunication:(r,n,o)=>({resourceType:"Communication",status:"completed",subject:at(r),sender:at(n),sent:new Date().toISOString(),payload:[{contentString:o}]}),createMedia:(r,n,o)=>({resourceType:"Media",status:"completed",subject:at(r),operator:at(n),issued:new Date().toISOString(),content:o})})}var U5=W(e=>({section:{position:"relative",margin:"4px 4px 8px 0",padding:"6px 12px 16px 6px",border:`1.5px solid ${e.colors.gray[1]}`,borderRadius:e.radius.sm,transition:"all 0.1s"},hovering:{border:`1.5px solid ${e.colors.blue[5]}`},editing:{border:`1.5px solid ${e.colors.gray[1]}`,borderLeft:`4px solid ${e.colors.blue[5]}`},bottomActions:{position:"absolute",right:4,bottom:0,fontSize:e.fontSizes.xs,"& a":{marginLeft:8}}}));function fae(e){let t=te(),r=Xe(e.value),[n,o]=f.useState(void 0),[a,i]=f.useState(),[l,c]=f.useState(),[u,d]=f.useState();function m(){c(void 0)}function h(){i(void 0)}let g=f.useRef();if(g.current=u,f.useEffect(()=>{t.requestSchema("PlanDefinition").then(o).catch(console.log)},[t]),f.useEffect(()=>(d(yae(r??{resourceType:"PlanDefinition"})),document.addEventListener("mouseover",m),document.addEventListener("click",h),()=>{document.removeEventListener("mouseover",m),document.removeEventListener("click",h)}),[r]),!n||!u)return null;function y(_,E){d({...g.current,[_]:E})}return s.createElement("div",null,s.createElement(Ie,{testid:"questionnaire-form",onSubmit:()=>e.onSubmit(u)},s.createElement(ne,{label:"Plan Title",defaultValue:u.title,onChange:_=>y("title",_.currentTarget.value)}),s.createElement(W5,{actions:u.action||[],selectedKey:a,setSelectedKey:i,hoverKey:l,setHoverKey:c,onChange:_=>y("action",_)}),s.createElement(Z,{type:"submit"},"Save")))}function W5(e){let{classes:t}=U5(),r=f.useRef();r.current=e.actions;function n(i){e.onChange(r.current.map(l=>l.id===i.id?i:l))}function o(i){e.onChange([...r.current,i]),e.setSelectedKey(i.id)}function a(i){e.onChange(r.current.filter(l=>l!==i))}return s.createElement("div",{className:t.section},e.actions.map(i=>s.createElement("div",{key:i.id},s.createElement(pae,{action:i,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onChange:n,onRemove:()=>a(i)}))),s.createElement("div",{className:t.bottomActions},s.createElement(dt,{href:"#",onClick:i=>{gt(i),o({id:q5()})}},"Add action")))}function pae(e){let{classes:t,cx:r}=U5(),{action:n}=e,o=vae(n),a=e.selectedKey===e.action.id,i=e.hoverKey===e.action.id;function l(d){d.stopPropagation(),e.setSelectedKey(e.action.id)}function c(d){gt(d),e.setHoverKey(e.action.id)}let u=r(t.section,{[t.editing]:a,[t.hovering]:i&&!a});return s.createElement("div",{"data-testid":n.id,className:u,onClick:l,onMouseOver:c},a?s.createElement(hae,{action:n,actionType:o,onChange:e.onChange,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onRemove:e.onRemove}):s.createElement(mae,{action:n,actionType:o}),s.createElement("div",{className:t.bottomActions},s.createElement(dt,{href:"#",onClick:d=>{d.preventDefault(),e.onRemove()}},"Remove")))}var sv={path:"PlanDefinition.action.timing[x]",min:0,max:"1",type:[{code:"dateTime"},{code:"Period"},{code:"Range"},{code:"Timing"}]};function mae(e){let{action:t,actionType:r}=e,[n,o]=H5(t);return s.createElement("div",null,s.createElement("div",null,t.title||"Untitled"," ",r&&`(${r})`),t.definitionCanonical&&s.createElement("div",null,s.createElement(wp,{value:{reference:t.definitionCanonical}})),n&&s.createElement("div",null,s.createElement(mo,{property:sv,propertyType:o,value:n})))}function hae(e){let{action:t}=e,[r,n]=f.useState(e.actionType);function o(a,i){e.onChange({...t,[a]:i})}return s.createElement(Oe,{spacing:"xl"},s.createElement(ne,{name:`actionTitle-${t.id}`,label:"Title",defaultValue:t.title,onChange:a=>o("title",a.currentTarget.value)}),s.createElement(ne,{name:`actionDescription-${t.id}`,label:"Description",defaultValue:t.description,onChange:a=>o("description",a.currentTarget.value)}),s.createElement(vt,{label:"Type of Action",description:"The type of the action to be performed.",name:`actionType-${t.id}`,defaultValue:r,onChange:a=>n(a.currentTarget.value),data:["","appointment","lab","questionnaire","task"]}),t.action&&t.action.length>0&&s.createElement(W5,{actions:t.action,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onChange:a=>o("action",a)}),(()=>{switch(r){case"appointment":return s.createElement(uu,{title:"Appointment",description:"The subject must schedule an appointment from the schedule.",resourceType:"Schedule",action:t,onChange:e.onChange});case"lab":return s.createElement(uu,{title:"Lab",description:"The subject must complete the following lab panel.",resourceType:"ActivityDefinition",action:t,onChange:e.onChange});case"questionnaire":return s.createElement(uu,{title:"Questionnaire",description:"The subject must complete the selected questionnaire.",resourceType:"Questionnaire",action:t,onChange:e.onChange});case"task":return s.createElement(uu,{title:"Task",description:"The subject must complete the following task.",resourceType:"ActivityDefinition",action:t,onChange:e.onChange});default:return null}})(),s.createElement(Ke,{title:"Timing",description:"When the action should take place."},s.createElement(gae,{name:"timing-"+t.id,action:t,onChange:e.onChange})))}function uu(e){let{id:t,definitionCanonical:r}=e.action,n=r!=null&&r.startsWith(e.resourceType+"/")?{reference:r}:void 0;return s.createElement(gl,{name:t,resourceType:e.resourceType,defaultValue:n,loadOnFocus:!0,onChange:o=>{o?e.onChange({...e.action,definitionCanonical:ot(o)}):e.onChange({...e.action,definitionCanonical:void 0})}})}function gae(e){let t=e.action,r="timing",[n,o]=H5(t);return s.createElement(Ha,{property:sv,name:"timing[x]",defaultValue:n,defaultPropertyType:o,onChange:(a,i)=>{e.onChange(iv(t,r,i??r,sv,a))}})}function vae(e){var t,r,n;if((t=e.definitionCanonical)!=null&&t.startsWith("Schedule"))return"appointment";if((r=e.definitionCanonical)!=null&&r.startsWith("Questionnaire/"))return"questionnaire";if((n=e.definitionCanonical)!=null&&n.startsWith("ActivityDefinition/"))return"task"}function H5(e){return Ba({type:"PlanDefinitionAction",value:e},"timing")}var Ah=1;function q5(e){if(e){if(e.startsWith("id-")){let t=parseInt(e.substring(3),10);isNaN(t)||(Ah=Math.max(Ah,t+1))}return e}return"id-"+Ah++}function yae(e){return{...e,action:Q5(e.action)}}function Q5(e){if(e)return e.map(t=>({...t,id:q5(t.id),action:Q5(t.action)}))}var wae=(e=>(e.group="group",e.display="display",e.question="question",e.boolean="boolean",e.decimal="decimal",e.integer="integer",e.date="date",e.dateTime="dateTime",e.time="time",e.string="string",e.text="text",e.url="url",e.choice="choice",e.openChoice="open-choice",e.attachment="attachment",e.reference="reference",e.quantity="quantity",e))(wae||{});function _ae(e){return e.type==="choice"||e.type==="open-choice"}function G5(e){let t=te(),r=t.getProfile(),[n,o]=f.useState(),a=Xe(e.questionnaire),[i,l]=f.useState(),[c,u]=f.useState({});f.useEffect(()=>{t.requestSchema("Questionnaire").then(()=>t.requestSchema("QuestionnaireResponse")).then(o).catch(console.log)},[t]),f.useEffect(()=>{l(a?Eae(a):void 0)},[a]);function d(m){let h={resourceType:"QuestionnaireResponse",item:m};l(h),u(mee(h))}return!n||!a?null:s.createElement(Ie,{testid:"questionnaire-form",onSubmit:()=>{e.onSubmit&&i&&e.onSubmit({...i,questionnaire:ot(a),subject:e.subject,source:at(r),authored:new Date().toISOString(),status:"completed"})}},a.title&&s.createElement(ce,null,a.title),a.item&&s.createElement(K5,{items:a.item,answers:c,onChange:d}),s.createElement(J,{position:"right",mt:"xl"},s.createElement(Z,{type:"submit"},e.submitButtonText??"OK")))}function K5(e){let[t,r]=f.useState(N0(e.items));function n(o,a){let i=t.slice();i[o]=a,r(i),e.onChange(i)}return s.createElement(Oe,null,e.items.map((o,a)=>{if(!Oae(o,e.answers))return null;if(o.type==="display")return s.createElement("p",{key:o.linkId},o.text);if(o.type==="group")return s.createElement(cv,{key:o.linkId,item:o,answers:e.answers,onChange:i=>n(a,i)});if(o.type==="boolean"){let i=o.initial&&o.initial.length>0?o.initial[0]:void 0;return s.createElement(j5,{key:o.linkId,title:o.text,htmlFor:o.linkId},s.createElement(nn,{id:o.linkId,name:o.linkId,defaultChecked:i==null?void 0:i.valueBoolean,onChange:l=>n(a,{linkId:o.linkId,text:o.text,answer:[{valueBoolean:l.currentTarget.checked}]})}))}return s.createElement(Ke,{key:o.linkId,htmlFor:o.linkId,title:o.text??""},s.createElement(cv,{item:o,answers:e.answers,onChange:i=>n(a,i)}))}))}function cv(e){let t=e.item,r=t.type;if(!r)return null;let n=t.linkId;if(!n)return null;let o=t.initial&&t.initial.length>0?t.initial[0]:void 0;function a(l){e.onChange({linkId:t.linkId,text:t.text,item:l})}function i(l){e.onChange({linkId:t.linkId,text:t.text,answer:[l]})}switch(r){case"group":return s.createElement("div",null,s.createElement("h3",null,t.text),t.item&&s.createElement(K5,{items:t.item,answers:e.answers,onChange:a}));case"boolean":return s.createElement(nn,{id:n,name:n,defaultChecked:o==null?void 0:o.valueBoolean,onChange:l=>i({valueBoolean:l.currentTarget.checked})});case"decimal":return s.createElement(ne,{type:"number",step:"any",id:n,name:n,defaultValue:o==null?void 0:o.valueDecimal,onChange:l=>i({valueDecimal:l.currentTarget.valueAsNumber})});case"integer":return s.createElement(ne,{type:"number",step:1,id:n,name:n,defaultValue:o==null?void 0:o.valueInteger,onChange:l=>i({valueInteger:l.currentTarget.valueAsNumber})});case"date":return s.createElement(ne,{type:"date",id:n,name:n,defaultValue:o==null?void 0:o.valueDate,onChange:l=>i({valueDate:l.currentTarget.value})});case"dateTime":return s.createElement(Ua,{name:n,defaultValue:o==null?void 0:o.valueDateTime,onChange:l=>i({valueDateTime:l})});case"time":return s.createElement(ne,{type:"time",id:n,name:n,defaultValue:o==null?void 0:o.valueTime,onChange:l=>i({valueTime:l.currentTarget.value})});case"string":case"url":return s.createElement(ne,{id:n,name:n,defaultValue:o==null?void 0:o.valueString,onChange:l=>i({valueString:l.currentTarget.value})});case"text":return s.createElement(Js,{id:n,name:n,defaultValue:o==null?void 0:o.valueString,onChange:l=>i({valueString:l.currentTarget.value})});case"attachment":return s.createElement(O5,{name:n,defaultValue:o==null?void 0:o.valueAttachment,onChange:l=>i({valueAttachment:l})});case"reference":return s.createElement(km,{name:n,defaultValue:o==null?void 0:o.valueReference,onChange:l=>i({valueReference:l})});case"quantity":return s.createElement(Wa,{name:n,defaultValue:o==null?void 0:o.valueQuantity,onChange:l=>i({valueQuantity:l}),disableWheel:!0});case"choice":case"open-choice":return $ae(t)?s.createElement(bae,{name:n,item:t,initial:o,onChangeAnswer:i}):s.createElement(xae,{name:n,item:t,initial:o,onChangeAnswer:i});default:return null}}function bae(e){let{name:t,item:r,initial:n}=e,o=ao({type:"QuestionnaireItemInitial",value:n},"value"),a=[""];if(r.answerOption)for(let i of r.answerOption){let l=ao({type:"QuestionnaireItemAnswerOption",value:i},"value");a.push(oP(l))}return s.createElement(vt,{id:t,name:t,onChange:i=>{let l=i.currentTarget.selectedIndex;if(l===0){e.onChangeAnswer({});return}let c=r.answerOption[l-1],u=ao({type:"QuestionnaireItemAnswerOption",value:c},"value"),d="value"+xr(u.type);e.onChangeAnswer({[d]:u.value})},defaultValue:oP(o),data:a})}function oP(e){if(e)return e.type==="CodeableConcept"?e.value.coding[0].display:e.type==="Coding"?e.value.display:e.value.toString()}function xae(e){let{name:t,item:r,initial:n,onChangeAnswer:o}=e,a=Pt.types.QuestionnaireItemAnswerOption.properties["value[x]"],i=ao({type:"QuestionnaireItemInitial",value:n},"value"),l=[],c;if(r.answerOption)for(let u=0;u<r.answerOption.length;u++){let d=r.answerOption[u],m=`${t}-option-${u}`,h=ao({type:"QuestionnaireItemAnswerOption",value:d},"value");i&&br(h)===br(i)&&(c=m),l.push([m,h])}return s.createElement(rp.Group,{name:t,defaultValue:c,onChange:u=>{let d=l.find(m=>m[0]===u);if(d){let m=d[1],h="value"+xr(m.type);o({[h]:m.value})}}},l.map(([u,d])=>s.createElement(rp,{key:u,id:u,value:u,label:s.createElement(mo,{property:a,propertyType:d.type,value:d.value})})))}function Eae(e){return{resourceType:"QuestionnaireResponse",questionnaire:ot(e),item:N0(e.item)}}function N0(e){return(e==null?void 0:e.map(Sae))??[]}function Sae(e){var t;return{linkId:e.linkId,text:e.text,item:N0(e.item),answer:((t=e.initial)==null?void 0:t.map(Pae))??[]}}function Pae(e){return{...e}}function $ae(e){var t;return!!((t=e.extension)!=null&&t.some(r=>{var n,o,a;return r.url==="http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl"&&((a=(o=(n=r.valueCodeableConcept)==null?void 0:n.coding)==null?void 0:o[0])==null?void 0:a.code)==="drop-down"}))}function Oae(e,t){if(!e.enableWhen)return!0;let r=e.enableBehavior??"any";for(let n of e.enableWhen){let o=ao({type:"QuestionnaireItemEnableWhen",value:n},"answer[x]"),a=ao({type:"QuestionnaireResponseItemAnswer",value:t[n.question]},"value[x]"),i=Sm(o,a);if(r==="any"&&i)return!0;if(r==="all"&&!i)return!1}return r!=="any"}var Cae=W(e=>({section:{position:"relative",margin:"4px 4px 8px 0",padding:"6px 12px 16px 6px",border:`1.5px solid ${e.colors.gray[1]}`,borderRadius:e.radius.sm,transition:"all 0.1s"},hovering:{border:`1.5px solid ${e.colors.blue[5]}`},editing:{border:`1.5px solid ${e.colors.gray[1]}`,borderLeft:`4px solid ${e.colors.blue[5]}`},questionBody:{maxWidth:600},topActions:{position:"absolute",right:4,top:1,padding:4,color:e.colors.gray[5],fontSize:e.fontSizes.xs},bottomActions:{position:"absolute",right:4,bottom:0,fontSize:e.fontSizes.xs,"& a":{marginLeft:8}},linkIdInput:{width:100,marginBottom:4},typeSelect:{width:100}}));function kae(e){let t=te(),r=Xe(e.questionnaire),[n,o]=f.useState(),[a,i]=f.useState(),[l,c]=f.useState(),[u,d]=f.useState();function m(){d(void 0)}function h(){c(void 0)}return f.useEffect(()=>{t.requestSchema("Questionnaire").then(o).catch(console.log)},[t]),f.useEffect(()=>(i(Rae(r??{resourceType:"Questionnaire"})),document.addEventListener("mouseover",m),document.addEventListener("click",h),()=>{document.removeEventListener("mouseover",m),document.removeEventListener("click",h)}),[r]),!n||!a?null:s.createElement("div",null,s.createElement(Ie,{testid:"questionnaire-form",onSubmit:()=>e.onSubmit(a)},s.createElement(Y5,{item:a,selectedKey:l,setSelectedKey:c,hoverKey:u,setHoverKey:d,onChange:i}),s.createElement(Z,{type:"submit"},"Save")))}function Y5(e){var v;let{classes:t,cx:r}=Cae(),n=e.item,o=e.item,a=bo(e.item),i=a||o.type==="group",l=o.linkId??"[untitled]",c=e.selectedKey===e.item.id,u=e.hoverKey===e.item.id,d=f.useRef();d.current=e.item;function m(b){gt(b),e.setSelectedKey(e.item.id)}function h(b){gt(b),e.setHoverKey(e.item.id)}function g(b){var P;let x=d.current;e.onChange({...x,item:(P=x.item)==null?void 0:P.map(O=>O.id===b.id?b:O)})}function y(b){e.onChange({...e.item,item:[...e.item.item??[],b]})}function _(b){var x;e.onChange({...e.item,item:(x=e.item.item)==null?void 0:x.filter(P=>P!==b)})}function E(b,x){e.onChange({...d.current,[b]:x})}let w=r(t.section,{[t.editing]:c,[t.hovering]:u&&!c});return s.createElement("div",{"data-testid":o.linkId,className:w,onClick:m,onMouseOver:h},s.createElement("div",{className:t.questionBody},c?s.createElement(s.Fragment,null,a&&s.createElement(ne,{size:"xl",defaultValue:n.title,onChange:b=>E("title",b.currentTarget.value)}),!a&&s.createElement(Js,{autosize:!0,minRows:2,defaultValue:o.text,onChange:b=>E("text",b.currentTarget.value)}),_ae(o)&&s.createElement(jae,{options:o.answerOption,onChange:b=>E("answerOption",b)})):s.createElement(s.Fragment,null,n.title&&s.createElement(ce,null,n.title),o.text&&s.createElement("div",null,o.text),!i&&s.createElement(cv,{item:o,answers:{},onChange:()=>{}}))),(v=o.item)==null?void 0:v.map(b=>s.createElement("div",{key:b.id},s.createElement(Y5,{item:b,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onChange:g,onRemove:()=>_(b)}))),!i&&s.createElement("div",{className:t.topActions},c?s.createElement(s.Fragment,null,s.createElement(ne,{size:"xs",className:t.linkIdInput,defaultValue:o.linkId,onChange:b=>E("linkId",b.currentTarget.value)}),!i&&s.createElement(vt,{size:"xs",className:t.typeSelect,defaultValue:o.type,onChange:b=>E("type",b.currentTarget.value),data:[{value:"display",label:"Display"},{value:"boolean",label:"Boolean"},{value:"decimal",label:"Decimal"},{value:"integer",label:"Integer"},{value:"date",label:"Date"},{value:"dateTime",label:"Date/Time"},{value:"time",label:"Time"},{value:"string",label:"String"},{value:"text",label:"Text"},{value:"url",label:"URL"},{value:"choice",label:"Choice"},{value:"open-choice",label:"Open Choice"},{value:"attachment",label:"Attachment"},{value:"reference",label:"Reference"},{value:"quantity",label:"Quantity"}]})):s.createElement("div",null,l)),s.createElement("div",{className:t.bottomActions},i&&s.createElement(s.Fragment,null,s.createElement(dt,{href:"#",onClick:b=>{b.preventDefault(),y({id:al(),linkId:aP("q"),type:"string",text:"Question"})}},"Add item"),s.createElement(dt,{href:"#",onClick:b=>{b.preventDefault(),y({id:al(),linkId:aP("g"),type:"group",text:"Group"})}},"Add group")),c&&!a&&s.createElement(dt,{href:"#",onClick:b=>{b.preventDefault(),e.onRemove&&e.onRemove()}},"Remove")))}function jae(e){let t=Pt.types.QuestionnaireItemAnswerOption.properties["value[x]"],r=e.options??[];return s.createElement("div",null,r.map(n=>{let[o,a]=Ba({type:"QuestionnaireItemAnswerOption",value:n},"value");return s.createElement("div",{key:n.id,style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"80%"}},s.createElement("div",null,s.createElement(Ha,{key:n.id,name:"value[x]",property:t,defaultPropertyType:a,defaultValue:o,onChange:(i,l)=>{let c=[...r],u=c.findIndex(d=>d.id===n.id);c[u]={id:n.id,[l]:i},e.onChange(c)}})),s.createElement("div",null,s.createElement(dt,{href:"#",onClick:i=>{gt(i),e.onChange(r.filter(l=>l.id!==n.id))}},"Remove")))}),s.createElement(dt,{href:"#",onClick:n=>{gt(n),e.onChange([...r,{id:al()}])}},"Add choice"))}var uv=1,dv=1;function aP(e){return e+uv++}function al(){return"id-"+dv++}function Rae(e){return{...e,id:e.id||al(),item:X5(e.item)}}function X5(e){if(e)return e.forEach(t=>{var r,n;(r=t.id)!=null&&r.match(/^id-\d+$/)&&(dv=Math.max(dv,parseInt(t.id.substring(3),10)+1)),(n=t.linkId)!=null&&n.match(/^q\d+$/)&&(uv=Math.max(uv,parseInt(t.linkId.substring(1),10)+1))}),e.map(t=>({...t,id:t.id||al(),item:X5(t.item),answerOption:Tae(t.answerOption)}))}function Tae(e){if(e)return e.map(t=>({...t,id:t.id||al()}))}var Iae=W(e=>({section:{position:"relative",margin:"4px 4px 8px 0",padding:"6px 12px 16px 6px",border:`1.5px solid ${e.colors.gray[3]}`,borderRadius:e.radius.sm,transition:"all 0.1s"}})),Dae=["gender","age","gestationalAge","context","appliesTo"],Nae={definition:{resourceType:"ObservationDefinition"},onSubmit:()=>{}};function Aae(e){e=Object.assign(Nae,e);let t=e.definition,[r,n]=f.useState([]),[o,a]=f.useState(1),[i,l]=f.useState(1);return f.useEffect(()=>{let y=Lae(t,l);n(Fae(y.qualifiedInterval||[],a))},[t]),s.createElement(Ie,{testid:"reference-range-editor",onSubmit:c},s.createElement(Oe,null,r.map(y=>{var _;return s.createElement(Mae,{unit:Bae((_=t.quantitativeDetails)==null?void 0:_.unit),onChange:m,onAdd:h,onRemove:g,onRemoveGroup:d,key:`group-${y.id}`,intervalGroup:y})})),s.createElement(Mr,{title:"Add Group",size:"sm",onClick:y=>{gt(y),u({id:`group-id-${o}`,filters:{},intervals:[]}),a(_=>_+1)}},s.createElement(m0,null)),s.createElement(J,{position:"right"},s.createElement(Z,{type:"submit"},"Save")));function c(){let y=r.flatMap(_=>_.intervals).filter(_=>!Uae(_));e.onSubmit({...t,qualifiedInterval:y})}function u(y){n(_=>[..._,y])}function d(y){n(_=>_.filter(E=>E.id!==y.id))}function m(y,_){n(E=>{E=[...E];let w=E.find(b=>b.id===y),v=w==null?void 0:w.intervals.findIndex(b=>b.id===_.id);return v!==void 0&&(w!=null&&w.intervals[v])&&(w.intervals[v]=_),E})}function h(y,_){_.id===void 0&&(_.id=`id-${i}`,l(E=>E+1)),n(E=>{E=[...E];let w=E.findIndex(v=>v.id===y);if(w!==-1){let v={...E[w]};_={..._,...v.filters},v.intervals=[...v.intervals,_],E[w]=v}return E})}function g(y,_){n(E=>{E=[...E];let w=E.find(v=>v.id===y);return w&&(w.intervals=w.intervals.filter(v=>v.id!==_.id)),E})}}function Mae(e){let{intervalGroup:t,unit:r}=e,{classes:n}=Iae();return s.createElement(cc,{"data-testid":t.id,className:n.section},s.createElement(Oe,{spacing:"lg"},s.createElement(J,{position:"right"},s.createElement(Mr,{title:"Remove Group","data-testid":`remove-group-button-${t.id}`,key:`remove-group-button-${t.id}`,size:"sm",onClick:o=>{gt(o),e.onRemoveGroup(t)}},s.createElement(yp,null))),s.createElement(zae,{intervalGroup:t,onChange:e.onChange}),s.createElement(dr,null),t.intervals.map(o=>s.createElement(Oe,{key:`interval-${o.id}`,spacing:"xs"},s.createElement(J,null,s.createElement(ne,{key:`condition-${o.id}`,"data-testid":`condition-${o.id}`,defaultValue:o.condition,label:"Condition: ",size:"sm",onChange:a=>{gt(a),e.onChange(t.id,{...o,condition:a.currentTarget.value.trim()})}}),s.createElement(Mr,{title:"Remove Interval",size:"sm",key:`remove-interval-${o.id}`,"data-testid":`remove-interval-${o.id}`,onClick:a=>{gt(a),e.onRemove(t.id,o)}},s.createElement(yp,null))),s.createElement(P0,{onChange:a=>{e.onChange(t.id,{...o,range:a})},key:`range-${o.id}`,name:`range-${o.id}`,defaultValue:o.range}))),s.createElement(Mr,{title:"Add Interval",size:"sm",onClick:o=>{gt(o),e.onAdd(t.id,{range:{low:{unit:r},high:{unit:r}}})}},s.createElement(m0,null))))}function zae(e){var n,o;let{intervalGroup:t,onChange:r}=e;t.filters.age||(t.filters.age={});for(let a of["low","high"])(n=t.filters.age[a])!=null&&n.unit||(t.filters.age[a]={...t.filters.age[a],unit:"years",system:"http://unitsofmeasure.org"});return s.createElement(Oe,{style:{maxWidth:"50%"}},s.createElement(J,null,s.createElement(vt,{data:["","male","female"],label:"Gender:",defaultValue:t.filters.gender||"",onChange:a=>{for(let i of t.intervals){let l=a.currentTarget.value;l===""&&(l=void 0),r(t.id,{...i,gender:l})}}})),s.createElement(J,{spacing:"xs"},s.createElement(ae,{component:"label",htmlFor:`div-age-${t.id}`},"Age:"),s.createElement("div",{id:`div-age-${t.id}`},s.createElement(P0,{key:`age-${t.id}`,name:`age-${t.id}`,defaultValue:t.filters.age,onChange:a=>{for(let i of t.intervals)r(t.id,{...i,age:a})}}))),s.createElement(vt,{data:["","pre-puberty","follicular","midcycle","luteal","postmenopausal"],label:"Endocrine:",defaultValue:((o=t.filters.context)==null?void 0:o.text)||"",onChange:a=>{for(let i of t.intervals){let l=a.currentTarget.value;l===""?(l=void 0,r(t.id,{...i,context:void 0})):r(t.id,{...i,context:{text:l,coding:[{code:l,system:"http://terminology.hl7.org/CodeSystem/referencerange-meaning"}]}})}}}))}function Lae(e,t){let r=e.qualifiedInterval||[],n=Math.max(...r.map(o=>{var i;let a=parseInt(((i=o.id)==null?void 0:i.substring(3))||"",10);return isNaN(a)?Number.NEGATIVE_INFINITY:a}))+1;return Number.isFinite(n)||(n=1),e={...e,qualifiedInterval:r.map(o=>({...o,id:o.id||`id-${n++}`}))},t(n),e}function Fae(e,t){let r=1,n={};for(let o of e){let a=Vae(o);a in n||(n[a]={id:`group-id-${r++}`,filters:Object.fromEntries(Dae.map(i=>[i,o[i]])),intervals:[]}),n[a].intervals.push(o)}return t(r),Object.values(n)}function Vae(e){var t,r;return[`gender=${e.gender}`,`age=${Ds(e.age)}`,`gestationalAge=${Ds(e.gestationalAge)}`,`context=${(t=e.context)==null?void 0:t.text}`,`appliesTo=${(r=e.appliesTo)==null?void 0:r.map(n=>n.text).join("+")}`].join(":")}function Bae(e){return e&&(bee(e,"http://unitsofmeasure.org")||e.text)}function Uae(e){var t,r,n,o;return((r=(t=e.range)==null?void 0:t.low)==null?void 0:r.value)===void 0&&((o=(n=e.range)==null?void 0:n.high)==null?void 0:o.value)===void 0}function Wae(e){var u;let t=te(),r=Xe(e.value),[n,o]=f.useState(!1),[a,i]=f.useState();if(f.useEffect(()=>{r&&!n&&(t.executeBatch(l(r)).then(i).catch(console.log),o(!0))},[t,r,n]),!r||!a)return null;return s.createElement(Jr,null,(u=r.action)==null?void 0:u.map((d,m)=>{var _,E,w,v,b,x;let h=d.resource&&c(d.resource),g=(E=(_=h==null?void 0:h.input)==null?void 0:_[0])==null?void 0:E.valueReference,y=(v=(w=h==null?void 0:h.output)==null?void 0:w[0])==null?void 0:v.valueReference;return s.createElement(s.Fragment,{key:`action-${m}`},s.createElement(Jr.Col,{span:1,p:"md"},(h==null?void 0:h.status)==="completed"?s.createElement(dre,null):s.createElement(Ore,{color:"gray"})),s.createElement(Jr.Col,{span:9,p:"xs"},s.createElement(ae,{weight:500},d.title),d.description&&s.createElement("div",null,d.description),s.createElement("div",null,"Last edited by ",s.createElement(uc,{value:(b=h==null?void 0:h.meta)==null?void 0:b.author})," on ",_r((x=h==null?void 0:h.meta)==null?void 0:x.lastUpdated)),s.createElement("div",null,"Status: ",s.createElement(M5,{status:(h==null?void 0:h.status)||"unknown"}))),s.createElement(Jr.Col,{span:2,p:"md"},g&&!y&&s.createElement(Z,{onClick:()=>e.onStart(h,g)},"Start"),g&&y&&s.createElement(Z,{onClick:()=>e.onEdit(h,g,y)},"Edit")))}));function l(d){var h;let m=[];if(d.action)for(let g of d.action)(h=g.resource)!=null&&h.reference&&m.push({request:{method:"GET",url:g.resource.reference}});return{resourceType:"Bundle",type:"batch",entry:m}}function c(d){for(let m of a==null?void 0:a.entry)if(m.resource&&d.reference===ot(m.resource))return m.resource}}function J5(e,t){let r=Hae(e,t);return qae(r,e,t)}function Hae(e,t){let r=e.length,n=t.length,o=r+n+1,a=1+2*o,i=a/2|0,l=new Array(a);l[i+1]={i:0,j:-1,prev:void 0,snake:!0};for(let c=0;c<o;c++){for(let u=-c;u<=c;u+=2){let d=i+u,m=d+1,h=d-1,g=l[m],y=l[h],_,E=0;u===-c||u!==c&&y.i<g.i?(E=g.i,_=g):(E=y.i+1,_=y),l[h]=void 0;let w=E-u,v={i:E,j:w,prev:Qae(_),snake:!1};for(;E<r&&w<n&&e[E]===t[w];)E++,w++;if(E>v.i&&(v={i:E,j:w,prev:v,snake:!0}),l[d]=v,E>=r&&w>=n)return l[d]}l[i+c-1]=void 0}}function qae(e,t,r){let n=[],o=e;for(o.snake&&(o=o.prev);o!=null&&o.prev&&o.prev.j>=0;){let a=o.i,i=o.j;o=o.prev;let l=o.i,c=o.j,u={position:l,lines:t.slice(l,a)},d={position:c,lines:r.slice(c,i)},m;u.lines.length===0&&d.lines.length>0?m="insert":u.lines.length>0&&d.lines.length===0?m="delete":m="change",n.push({original:u,revised:d,type:m}),o.snake&&(o=o.prev)}return n}function Qae(e){return e&&!e.snake&&e.prev?e.prev:e}function Gae(e){let t=e.entry.filter(n=>!!n.resource).map(n=>{var o;return{meta:(o=n.resource)==null?void 0:o.meta,lines:br(n.resource,!0).match(/[^\r\n]+/g)}}).sort((n,o)=>n.meta.lastUpdated.localeCompare(o.meta.lastUpdated)),r=t[0].lines.map(n=>({id:t[0].meta.versionId,meta:t[0].meta,value:n,span:1}));return Kae(r,t),Yae(r),r}function Kae(e,t){for(let r=1;r<t.length;r++){let n=J5(t[r-1].lines,t[r].lines);for(let o of n){let a=o.original.position,i=o.original.lines,l=o.revised.lines;if((o.type==="delete"||o.type==="change")&&e.splice(a,i.length),o.type==="insert"||o.type==="change")for(let c=0;c<o.revised.lines.length;c++)e.splice(a+c,0,{id:t[r].meta.versionId,meta:t[r].meta,value:l[c],span:1})}}}function Yae(e){let t=0;for(;t<e.length;){let r=t;for(;r<e.length&&e[r].id===e[t].id;)e[r].span=-1,r++;e[t].span=r-t,t=r}}var Xae=W(e=>({container:{overflowX:"auto"},root:{border:`0.1px solid ${e.colors.gray[3]}`,borderCollapse:"collapse",borderRadius:e.radius.sm,borderSpacing:0,fontSize:e.fontSizes.xs,width:"100%","& td":{padding:"2px 4px 0 4px",verticalAlign:"top",whiteSpace:"nowrap"}},startRow:{borderTop:`0.1px solid ${e.colors.gray[3]}`},normalRow:{borderTop:0},author:{lineHeight:"10px"},dateTime:{borderRight:`0.1px solid ${e.colors.gray[3]}`,lineHeight:"20px"},lineNumber:{backgroundColor:e.colors.gray[1],border:0,color:e.colors.gray[5],fontFamily:e.fontFamilyMonospace,padding:`${e.spacing.xs} ${e.spacing.sm}`,textAlign:"right"},line:{fontFamily:e.fontFamilyMonospace,fontSize:e.fontSizes.sm,padding:`${e.spacing.xs} ${e.spacing.sm}`},pre:{margin:0}}));function Jae(e){var l,c;let{classes:t}=Xae(),r=te(),[n,o]=f.useState(e.history);if(f.useEffect(()=>{!e.history&&e.resourceType&&e.id&&r.readHistory(e.resourceType,e.id).then(o).catch(console.log)},[r,e.history,e.resourceType,e.id]),!n)return s.createElement("div",null,"Loading...");let a=(c=(l=n.entry)==null?void 0:l[0])==null?void 0:c.resource,i=Gae(n);return s.createElement("div",{className:t.container},s.createElement("table",{className:t.root},s.createElement("tbody",null,i.map((u,d)=>s.createElement("tr",{key:"row-"+d,className:u.span>0?t.startRow:t.normalRow},u.span>0&&s.createElement(s.Fragment,null,s.createElement("td",{className:t.author,rowSpan:u.span},s.createElement(Hi,{value:u.meta.author,link:!0})),s.createElement("td",{className:t.dateTime,rowSpan:u.span},s.createElement(Ce,{to:Zae(a,u.meta.versionId)},eie(u.meta.lastUpdated)))),s.createElement("td",{className:t.lineNumber},d+1),s.createElement("td",{className:t.line},s.createElement("pre",{className:t.pre},u.value)))))))}function Zae(e,t){return`/${e.resourceType}/${e.id}/_history/${t}`}function eie(e){let t=Math.floor((Date.now()-Date.parse(e))/1e3),r=Math.floor(t/31536e3);if(r>0)return gi(r,"year");let n=Math.floor(t/2592e3);if(n>0)return gi(n,"month");let o=Math.floor(t/86400);if(o>0)return gi(o,"day");let a=Math.floor(t/3600);if(a>0)return gi(a,"hour");let i=Math.floor(t/60);return i>0?gi(i,"minute"):gi(t,"second")}function gi(e,t){return`${e} ${e===1?t:t+"s"} ago`}var tie=W(e=>({removed:{color:e.colors.red[7],textDecoration:"line-through"},added:{color:e.colors.green[7]}}));function rie(e){let t=e.original,r=e.revised;e.ignoreMeta&&(t={...t,meta:void 0},r={...r,meta:void 0});let n=br(t,!0).match(/[^\r\n]+/g),o=br(r,!0).match(/[^\r\n]+/g),a=J5(n,o);return s.createElement("pre",{style:{color:"gray"}},a.map((i,l)=>s.createElement(nie,{key:"delta"+l,delta:i})))}function nie(e){let{classes:t}=tie();return s.createElement(s.Fragment,null,"...",s.createElement("br",null),e.delta.original.lines.length>0&&s.createElement("div",{className:t.removed},e.delta.original.lines.join(`
182
- `)),e.delta.revised.lines.length>0&&s.createElement("div",{className:t.added},e.delta.revised.lines.join(`
183
- `)),"...",s.createElement("br",null))}function oie(e){var o;let t=te(),[r,n]=f.useState(e.history);return f.useEffect(()=>{!e.history&&e.resourceType&&e.id&&t.readHistory(e.resourceType,e.id).then(n).catch(console.log)},[t,e.history,e.resourceType,e.id]),r?s.createElement(Xa,{withBorder:!0,withColumnBorders:!0},s.createElement("thead",null,s.createElement("tr",null,s.createElement("th",null,"Author"),s.createElement("th",null,"Date"),s.createElement("th",null,"Version"))),s.createElement("tbody",null,(o=r.entry)==null?void 0:o.map((a,i)=>s.createElement(aie,{key:"entry-"+i,entry:a})))):s.createElement("div",null,"Loading...")}function aie(e){var n,o,a;let{response:t,resource:r}=e.entry;return r?s.createElement("tr",null,s.createElement("td",null,s.createElement(Hi,{value:(n=r.meta)==null?void 0:n.author,link:!0})),s.createElement("td",null,_r((o=r.meta)==null?void 0:o.lastUpdated)),s.createElement("td",null,s.createElement(Ce,{to:iie(r)},(a=r.meta)==null?void 0:a.versionId))):s.createElement("tr",null,s.createElement("td",{colSpan:3},$e(t==null?void 0:t.outcome)))}function iie(e){var t;return`/${e.resourceType}/${e.id}/_history/${(t=e.meta)==null?void 0:t.versionId}`}function lie(e){return s.createElement(jm,{value:e.serviceRequest,loadTimelineResources:async(t,r,n)=>{let o=`${r}/${n}`,a=100;return Promise.allSettled([t.readHistory("ServiceRequest",n),t.search("Communication",{"based-on":o,_count:a}),t.search("DiagnosticReport",{"based-on":o,_count:a}),t.search("Media",{"based-on":o,_count:a}),t.search("DocumentReference",{related:o,_count:a}),t.search("Task",{_filter:`based-on eq ${o} or focus eq ${o} or subject eq ${o}`,_count:a})])},createCommunication:(t,r,n)=>({resourceType:"Communication",status:"completed",basedOn:[at(t)],subject:t.subject,sender:at(r),sent:new Date().toISOString(),payload:[{contentString:n}]}),createMedia:(t,r,n)=>({resourceType:"Media",status:"completed",basedOn:[at(t)],subject:t.subject,operator:at(r),issued:new Date().toISOString(),content:n})})}function Z5(e){let t=te(),[r,n]=f.useState();return s.createElement(Ie,{style:{maxWidth:400},onSubmit:async o=>{try{e.handleAuthResponse(await t.startNewProject({login:e.login,projectName:o.projectName}))}catch(a){n(yt(a))}}},s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(xn,{size:32}),s.createElement(ce,null,"Create project")),s.createElement(Oe,{spacing:"xl"},s.createElement(ne,{name:"projectName",label:"Project Name",placeholder:"My Project",required:!0,autoFocus:!0,error:tt(r,"firstName")}),s.createElement(ae,{color:"dimmed",size:"xs"},"By clicking submit you agree to the Medplum"," ",s.createElement(dt,{href:"https://www.medplum.com/privacy"},"Privacy Policy")," and ",s.createElement(dt,{href:"https://www.medplum.com/terms"},"Terms of Service"),".")),s.createElement(J,{position:"right",mt:"xl",noWrap:!0},s.createElement(Z,{type:"submit"},"Create project")))}function eD(e,t){let r=document.getElementsByTagName("head")[0],n=document.createElement("script");n.async=!0,n.src=e,n.onload=t??null,r.appendChild(n)}function tD(e){let t=te(),{googleClientId:r,handleGoogleCredential:n}=e,o=f.useRef(null),[a,i]=f.useState(typeof google<"u"),[l,c]=f.useState(!1),[u,d]=f.useState(!1);return f.useEffect(()=>{if(typeof google>"u"){eD("https://accounts.google.com/gsi/client",()=>i(!0));return}l||(google.accounts.id.initialize({client_id:r,callback:n}),c(!0)),o.current&&!u&&(google.accounts.id.renderButton(o.current,{}),d(!0))},[t,r,l,a,o,u,n]),r?s.createElement("div",{ref:o}):null}function rD(e){if(e)return e;if(typeof window<"u"){let t=window.location.protocol+"//"+window.location.host;if(("undefined".split(",")??[]).includes(t))return"__GOOGLE_CLIENT_ID__"}}function nD(e){typeof grecaptcha>"u"&&eD("https://www.google.com/recaptcha/api.js?render="+e)}function oD(e){return new Promise((t,r)=>{grecaptcha.ready(async()=>{try{t(await grecaptcha.execute(e,{action:"submit"}))}catch(n){r(n)}})})}function sie(e){let t=rD(e.googleClientId),r=e.recaptchaSiteKey,n=te(),[o,a]=f.useState(),i=S0(o,void 0);return f.useEffect(()=>{r&&nD(r)},[r]),s.createElement(Ie,{style:{maxWidth:400},onSubmit:async l=>{try{let c="";r&&(c=await oD(r)),e.handleAuthResponse(await n.startNewUser({projectId:e.projectId,clientId:e.clientId,firstName:l.firstName,lastName:l.lastName,email:l.email,password:l.password,remember:l.remember==="true",recaptchaSiteKey:r,recaptchaToken:c}))}catch(c){a(yt(c))}}},s.createElement(tr,{sx:{flexDirection:"column"}},e.children),s.createElement(Za,{issues:i}),t&&s.createElement(s.Fragment,null,s.createElement(J,{position:"center",p:"xl",style:{height:70}},s.createElement(tD,{googleClientId:t,handleGoogleCredential:async l=>{try{e.handleAuthResponse(await n.startGoogleLogin({googleClientId:l.clientId,googleCredential:l.credential,createUser:!0}))}catch(c){a(yt(c))}}})),s.createElement(dr,{label:"or",labelPosition:"center",my:"lg"})),s.createElement(Oe,{spacing:"xl"},s.createElement(ne,{name:"firstName",type:"text",label:"First name",placeholder:"First name",required:!0,autoFocus:!0,error:tt(o,"firstName")}),s.createElement(ne,{name:"lastName",type:"text",label:"Last name",placeholder:"Last name",required:!0,error:tt(o,"lastName")}),s.createElement(ne,{name:"email",type:"email",label:"Email",placeholder:"name@domain.com",required:!0,error:tt(o,"email")}),s.createElement(oo,{name:"password",label:"Password",autoComplete:"off",required:!0,error:tt(o,"password")}),s.createElement(ae,{color:"dimmed",size:"xs"},"By clicking submit you agree to the Medplum"," ",s.createElement(dt,{href:"https://www.medplum.com/privacy"},"Privacy Policy")," and ",s.createElement(dt,{href:"https://www.medplum.com/terms"},"Terms of Service"),"."),s.createElement(ae,{color:"dimmed",size:"xs"},"This site is protected by reCAPTCHA and the Google"," ",s.createElement(dt,{href:"https://policies.google.com/privacy"},"Privacy Policy")," and ",s.createElement(dt,{href:"https://policies.google.com/terms"},"Terms of Service")," apply.")),s.createElement(J,{position:"apart",mt:"xl",noWrap:!0},s.createElement(nn,{name:"remember",label:"Remember me",size:"xs"}),s.createElement(Z,{type:"submit"},"Create account")))}function cie(e){let{type:t,projectId:r,clientId:n,googleClientId:o,recaptchaSiteKey:a,onSuccess:i}=e,l=te(),[c,u]=f.useState(void 0),[d,m]=f.useState();f.useEffect(()=>{t==="patient"&&c&&l.startNewPatient({login:c,projectId:r}).then(g=>l.processCode(g.code)).then(()=>i()).catch(g=>m(yt(g)))},[l,t,r,c,i]);function h(g){g.code?l.processCode(g.code).then(()=>i()).catch(console.log):g.login&&u(g.login)}return s.createElement(_e,{width:450},d&&s.createElement("pre",null,JSON.stringify(d,null,2)),!c&&s.createElement(sie,{projectId:r,clientId:n,googleClientId:o,recaptchaSiteKey:a,handleAuthResponse:h},e.children),c&&t==="project"&&s.createElement(Z5,{login:c,handleAuthResponse:h}))}function uie(e){let[t,r]=f.useState();return t?s.createElement(fie,{email:t,...e}):s.createElement(die,{setEmail:r,...e})}function die(e){let{setEmail:t,onRegister:r,handleAuthResponse:n,children:o,...a}=e,i=te(),l=!e.disableGoogleAuth&&rD(e.googleClientId),c=f.useCallback(async m=>{if(!m.authorizeUrl)return!1;let h=JSON.stringify({...await i.ensureCodeChallenge(a),domain:m.domain}),g=new URL(m.authorizeUrl);return g.searchParams.set("state",h),window.location.assign(g.toString()),!0},[i,a]),u=f.useCallback(async m=>{let h=await i.post("auth/method",{email:m.email});await c(h)||t(m.email)},[i,c,t]),d=f.useCallback(async m=>{let h=await i.startGoogleLogin({...a,googleCredential:m.credential});await c(h)||n(h)},[i,a,c,n]);return s.createElement(Ie,{style:{maxWidth:400},onSubmit:u},s.createElement(tr,{sx:{flexDirection:"column"}},o),l&&s.createElement(s.Fragment,null,s.createElement(J,{position:"center",p:"xl",style:{height:70}},s.createElement(tD,{googleClientId:l,handleGoogleCredential:d})),s.createElement(dr,{label:"or",labelPosition:"center",my:"lg"})),s.createElement(ne,{name:"email",type:"email",label:"Email",placeholder:"name@domain.com",required:!0,autoFocus:!0}),s.createElement(J,{position:"apart",mt:"xl",spacing:0,noWrap:!0},s.createElement("div",null,r&&s.createElement(dt,{component:"button",type:"button",color:"dimmed",onClick:r,size:"xs"},"Register")),s.createElement(Z,{type:"submit"},"Next")))}function fie(e){let{onForgotPassword:t,handleAuthResponse:r,children:n,...o}=e,a=te(),[i,l]=f.useState(),c=S0(i,void 0),u=f.useCallback(d=>{a.startLogin({...o,password:d.password,remember:d.remember==="on"}).then(r).catch(m=>l(yt(m)))},[a,o,r]);return s.createElement(Ie,{style:{maxWidth:400},onSubmit:u},s.createElement(tr,{sx:{flexDirection:"column"}},n),s.createElement(Za,{issues:c}),s.createElement(Oe,{spacing:"xl"},s.createElement(oo,{name:"password",label:"Password",autoComplete:"off",required:!0,autoFocus:!0,error:tt(i,"password")})),s.createElement(J,{position:"apart",mt:"xl",spacing:0,noWrap:!0},t&&s.createElement(dt,{component:"button",type:"button",color:"dimmed",onClick:t,size:"xs"},"Forgot password"),s.createElement(nn,{id:"remember",name:"remember",label:"Remember me",size:"xs",sx:{lineHeight:1}}),s.createElement(Z,{type:"submit"},"Sign in")))}function pie(e){let t=te(),[r,n]=f.useState();return s.createElement(Oe,null,s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(xn,{size:32}),s.createElement(ce,{order:3},"Choose profile")),s.createElement(Za,{outcome:r}),e.memberships.map(o=>{var a,i;return s.createElement(Jo,{key:o.id,onClick:()=>{t.post("auth/profile",{login:e.login,profile:o.id}).then(e.handleAuthResponse).catch(l=>n(yt(l)))}},s.createElement(J,null,s.createElement(Jd,{radius:"xl"}),s.createElement("div",{style:{flex:1}},s.createElement(ae,{size:"sm",weight:500},(a=o.profile)==null?void 0:a.display),s.createElement(ae,{color:"dimmed",size:"xs"},(i=o.project)==null?void 0:i.display))))}))}function mie(e){let t=te();return s.createElement(Ie,{style:{maxWidth:400},onSubmit:r=>{t.post("auth/scope",{login:e.login,scope:Object.keys(r).join(" ")}).then(e.handleAuthResponse).catch(console.log)}},s.createElement(Oe,null,s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(xn,{size:32}),s.createElement(ce,null,"Choose scope")),s.createElement(Oe,null,(e.scope??"openid").split(" ").map(r=>s.createElement(nn,{key:r,id:r,name:r,label:r,defaultChecked:!0}))),s.createElement(J,{position:"right",mt:"xl"},s.createElement(Z,{type:"submit"},"Set scope"))))}function hie(e){let t=te(),[r,n]=f.useState(void 0);return s.createElement(Ie,{style:{maxWidth:400},onSubmit:o=>{n(void 0),t.post("auth/mfa/verify",{login:e.login,token:o.token}).then(e.handleAuthResponse).catch(a=>n($e(a)))}},s.createElement(Oe,null,s.createElement(tr,{sx:{flexDirection:"column"}},s.createElement(xn,{size:32}),s.createElement(ce,null,"Enter MFA code")),r&&s.createElement(Gs,{icon:s.createElement(p0,{size:16}),title:"Error",color:"red"},r),s.createElement(Oe,null,s.createElement(ne,{name:"token",label:"MFA code",required:!0})),s.createElement(J,{position:"right",mt:"xl"},s.createElement(Z,{type:"submit"},"Submit code"))))}function aD(e){let{login:t,chooseScopes:r,onSuccess:n,onForgotPassword:o,onRegister:a,onCode:i,...l}=e,c=te(),[u,d]=f.useState(void 0),[m,h]=f.useState(!1),[g,y]=f.useState(void 0),_=f.useCallback(v=>{i?i(v):c.processCode(v).then(()=>{n&&n()}).catch(b=>ie({color:"red",message:$e(b)}))},[c,i,n]),E=f.useCallback(v=>{h(!!v.mfaRequired),v.login&&d(v.login),v.memberships&&y(v.memberships),v.code&&(r?y(void 0):_(v.code))},[r,_]),w=f.useCallback(v=>{_(v.code)},[_]);return f.useEffect(()=>{t&&!u&&c.get("auth/login/"+t).then(E).catch(v=>ie({color:"red",message:$e(v)}))},[c,t,u,E]),s.createElement(_e,{width:450},(()=>u?m?s.createElement(hie,{login:u,handleAuthResponse:E}):g?s.createElement(pie,{login:u,memberships:g,handleAuthResponse:E}):e.projectId==="new"?s.createElement(Z5,{login:u,handleAuthResponse:E}):e.chooseScopes?s.createElement(mie,{login:u,scope:e.scope,handleAuthResponse:w}):s.createElement("div",null,"Success"):s.createElement(uie,{onForgotPassword:o,onRegister:a,handleAuthResponse:E,disableGoogleAuth:e.disableGoogleAuth,...l},e.children))())}var iD,iP=qs;iD=iP.createRoot,iP.hydrateRoot;/**
184
- * @remix-run/router v1.7.1
185
- *
186
- * Copyright (c) Remix Software Inc.
187
- *
188
- * This source code is licensed under the MIT license found in the
189
- * LICENSE.md file in the root directory of this source tree.
190
- *
191
- * @license MIT
192
- */function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rt.apply(this,arguments)}var Ot;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ot||(Ot={}));const lP="popstate";function gie(e){e===void 0&&(e={});function t(n,o){let{pathname:a,search:i,hash:l}=n.location;return Ns("",{pathname:a,search:i,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:fc(o)}return yie(t,r,null,e)}function Pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function il(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function vie(){return Math.random().toString(36).substr(2,8)}function sP(e,t){return{usr:e.state,key:e.key,idx:t}}function Ns(e,t,r,n){return r===void 0&&(r=null),rt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?xo(t):t,{state:r,key:t&&t.key||n||vie()})}function fc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function xo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function yie(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,l=Ot.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(rt({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function m(){l=Ot.Pop;let E=d(),w=E==null?null:E-u;u=E,c&&c({action:l,location:_.location,delta:w})}function h(E,w){l=Ot.Push;let v=Ns(_.location,E,w);r&&r(v,E),u=d()+1;let b=sP(v,u),x=_.createHref(v);try{i.pushState(b,"",x)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(x)}a&&c&&c({action:l,location:_.location,delta:1})}function g(E,w){l=Ot.Replace;let v=Ns(_.location,E,w);r&&r(v,E),u=d();let b=sP(v,u),x=_.createHref(v);i.replaceState(b,"",x),a&&c&&c({action:l,location:_.location,delta:0})}function y(E){let w=o.location.origin!=="null"?o.location.origin:o.location.href,v=typeof E=="string"?E:fc(E);return Pe(w,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,w)}let _={get action(){return l},get location(){return e(o,i)},listen(E){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(lP,m),c=E,()=>{o.removeEventListener(lP,m),c=null}},createHref(E){return t(o,E)},createURL:y,encodeLocation(E){let w=y(E);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:g,go(E){return i.go(E)}};return _}var It;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(It||(It={}));const wie=new Set(["lazy","caseSensitive","path","id","index","children"]);function _ie(e){return e.index===!0}function fv(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((o,a)=>{let i=[...r,a],l=typeof o.id=="string"?o.id:i.join("-");if(Pe(o.index!==!0||!o.children,"Cannot specify children on an index route"),Pe(!n[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),_ie(o)){let c=rt({},o,t(o),{id:l});return n[l]=c,c}else{let c=rt({},o,t(o),{id:l,children:void 0});return n[l]=c,o.children&&(c.children=fv(o.children,t,i,n)),c}})}function Ii(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?xo(t):t,o=pc(n.pathname||"/",r);if(o==null)return null;let a=lD(e);bie(a);let i=null;for(let l=0;i==null&&l<a.length;++l)i=jie(a[l],Iie(o));return i}function lD(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let o=(a,i,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};c.relativePath.startsWith("/")&&(Pe(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=Xo([n,c.relativePath]),d=r.concat(c);a.children&&a.children.length>0&&(Pe(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),lD(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Cie(u,a.index),routesMeta:d})};return e.forEach((a,i)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))o(a,i);else for(let c of sD(a.path))o(a,i,c)}),t}function sD(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=sD(n.join("/")),l=[];return l.push(...i.map(c=>c===""?a:[a,c].join("/"))),o&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function bie(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:kie(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const xie=/^:\w+$/,Eie=3,Sie=2,Pie=1,$ie=10,Oie=-2,cP=e=>e==="*";function Cie(e,t){let r=e.split("/"),n=r.length;return r.some(cP)&&(n+=Oie),t&&(n+=Sie),r.filter(o=>!cP(o)).reduce((o,a)=>o+(xie.test(a)?Eie:a===""?Pie:$ie),n)}function kie(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function jie(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i<r.length;++i){let l=r[i],c=i===r.length-1,u=o==="/"?t:t.slice(o.length)||"/",d=Rie({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u);if(!d)return null;Object.assign(n,d.params);let m=l.route;a.push({params:n,pathname:Xo([o,d.pathname]),pathnameBase:Mie(Xo([o,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(o=Xo([o,d.pathnameBase]))}return a}function Rie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Tie(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce((u,d,m)=>{if(d==="*"){let h=l[m]||"";i=a.slice(0,a.length-h.length).replace(/(.)\/+$/,"$1")}return u[d]=Die(l[m]||"",d),u},{}),pathname:a,pathnameBase:i,pattern:e}}function Tie(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),il(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 n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,l)=>(n.push(l),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Iie(e){try{return decodeURI(e)}catch(t){return il(!1,'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+").")),e}}function Die(e,t){try{return decodeURIComponent(e)}catch(r){return il(!1,'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 ("+r+").")),e}}function pc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Nie(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?xo(e):e;return{pathname:r?r.startsWith("/")?r:Aie(r,t):t,search:zie(n),hash:Lie(o)}}function Aie(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Mh(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function A0(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function cD(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=xo(e):(o=rt({},e),Pe(!o.pathname||!o.pathname.includes("?"),Mh("?","pathname","search",o)),Pe(!o.pathname||!o.pathname.includes("#"),Mh("#","pathname","hash",o)),Pe(!o.search||!o.search.includes("#"),Mh("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,l;if(n||i==null)l=r;else{let m=t.length-1;if(i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),m-=1;o.pathname=h.join("/")}l=m>=0?t[m]:"/"}let c=Nie(o,l),u=i&&i!=="/"&&i.endsWith("/"),d=(a||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Xo=e=>e.join("/").replace(/\/\/+/g,"/"),Mie=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),zie=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Lie=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class M0{constructor(t,r,n,o){o===void 0&&(o=!1),this.status=t,this.statusText=r||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function uD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dD=["post","put","patch","delete"],Fie=new Set(dD),Vie=["get",...dD],Bie=new Set(Vie),Uie=new Set([301,302,303,307,308]),Wie=new Set([307,308]),zh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hie={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ll={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},fD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qie=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Qie(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Pe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let I=e.detectErrorBoundary;o=D=>({hasErrorBoundary:I(D)})}else o=qie;let a={},i=fv(e.routes,o,void 0,a),l,c=e.basename||"/",u=rt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),d=null,m=new Set,h=null,g=null,y=null,_=e.hydrationData!=null,E=Ii(i,e.history.location,c),w=null;if(E==null){let I=Gr(404,{pathname:e.history.location.pathname}),{matches:D,route:F}=vP(i);E=D,w={[F.id]:I}}let v=!E.some(I=>I.route.lazy)&&(!E.some(I=>I.route.loader)||e.hydrationData!=null),b,x={historyAction:e.history.action,location:e.history.location,matches:E,initialized:v,navigation:zh,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},P=Ot.Pop,O=!1,$,C=!1,R=!1,j=[],k=[],T=new Map,L=0,U=-1,V=new Map,M=new Set,Q=new Map,A=new Map,z=new Map,q=!1;function le(){return d=e.history.listen(I=>{let{action:D,location:F,delta:K}=I;if(q){q=!1;return}il(z.size===0||K!=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 he=lt({currentLocation:x.location,nextLocation:F,historyAction:D});if(he&&K!=null){q=!0,e.history.go(K*-1),We(he,{state:"blocked",location:F,proceed(){We(he,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),e.history.go(K)},reset(){let ge=new Map(x.blockers);ge.set(he,Ll),me({blockers:ge})}});return}return wt(D,F)}),x.initialized||wt(Ot.Pop,x.location),b}function ye(){d&&d(),m.clear(),$&&$.abort(),x.fetchers.forEach((I,D)=>Hr(D)),x.blockers.forEach((I,D)=>de(D))}function Re(I){return m.add(I),()=>m.delete(I)}function me(I){x=rt({},x,I),m.forEach(D=>D(x))}function qe(I,D){var F,K;let he=x.actionData!=null&&x.navigation.formMethod!=null&&dn(x.navigation.formMethod)&&x.navigation.state==="loading"&&((F=I.state)==null?void 0:F._isRedirect)!==!0,ge;D.actionData?Object.keys(D.actionData).length>0?ge=D.actionData:ge=null:he?ge=x.actionData:ge=null;let we=D.loaderData?gP(x.loaderData,D.loaderData,D.matches||[],D.errors):x.loaderData,fe=x.blockers;fe.size>0&&(fe=new Map(fe),fe.forEach((Me,Se)=>fe.set(Se,Ll)));let oe=O===!0||x.navigation.formMethod!=null&&dn(x.navigation.formMethod)&&((K=I.state)==null?void 0:K._isRedirect)!==!0;l&&(i=l,l=void 0),C||P===Ot.Pop||(P===Ot.Push?e.history.push(I,I.state):P===Ot.Replace&&e.history.replace(I,I.state)),me(rt({},D,{actionData:ge,loaderData:we,historyAction:P,location:I,initialized:!0,navigation:zh,revalidation:"idle",restoreScrollPosition:So(I,D.matches||x.matches),preventScrollReset:oe,blockers:fe})),P=Ot.Pop,O=!1,C=!1,R=!1,j=[],k=[]}async function ze(I,D){if(typeof I=="number"){e.history.go(I);return}let F=pv(x.location,x.matches,c,u.v7_prependBasename,I,D==null?void 0:D.fromRouteId,D==null?void 0:D.relative),{path:K,submission:he,error:ge}=uP(u.v7_normalizeFormMethod,!1,F,D),we=x.location,fe=Ns(x.location,K,D&&D.state);fe=rt({},fe,e.history.encodeLocation(fe));let oe=D&&D.replace!=null?D.replace:void 0,Me=Ot.Push;oe===!0?Me=Ot.Replace:oe===!1||he!=null&&dn(he.formMethod)&&he.formAction===x.location.pathname+x.location.search&&(Me=Ot.Replace);let Se=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,Be=lt({currentLocation:we,nextLocation:fe,historyAction:Me});if(Be){We(Be,{state:"blocked",location:fe,proceed(){We(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),ze(I,D)},reset(){let je=new Map(x.blockers);je.set(Be,Ll),me({blockers:je})}});return}return await wt(Me,fe,{submission:he,pendingError:ge,preventScrollReset:Se,replace:D&&D.replace})}function it(){if(Ve(),me({revalidation:"loading"}),x.navigation.state!=="submitting"){if(x.navigation.state==="idle"){wt(x.historyAction,x.location,{startUninterruptedRevalidation:!0});return}wt(P||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation})}}async function wt(I,D,F){$&&$.abort(),$=null,P=I,C=(F&&F.startUninterruptedRevalidation)===!0,Or(x.location,x.matches),O=(F&&F.preventScrollReset)===!0;let K=l||i,he=F&&F.overrideNavigation,ge=Ii(K,D,c);if(!ge){let je=Gr(404,{pathname:D.pathname}),{matches:Gt,route:Rt}=vP(K);st(),qe(D,{matches:Gt,loaderData:{},errors:{[Rt.id]:je}});return}if(x.initialized&&!R&&Jie(x.location,D)&&!(F&&F.submission&&dn(F.submission.formMethod))){qe(D,{matches:ge});return}$=new AbortController;let we=Vl(e.history,D,$.signal,F&&F.submission),fe,oe;if(F&&F.pendingError)oe={[Di(ge).route.id]:F.pendingError};else if(F&&F.submission&&dn(F.submission.formMethod)){let je=await qt(we,D,F.submission,ge,{replace:F.replace});if(je.shortCircuited)return;fe=je.pendingActionData,oe=je.pendingActionError,he=du(D,F.submission),we=new Request(we.url,{signal:we.signal})}let{shortCircuited:Me,loaderData:Se,errors:Be}=await Pr(we,D,ge,he,F&&F.submission,F&&F.fetcherSubmission,F&&F.replace,fe,oe);Me||($=null,qe(D,rt({matches:ge},fe?{actionData:fe}:{},{loaderData:Se,errors:Be})))}async function qt(I,D,F,K,he){he===void 0&&(he={}),Ve();let ge=nle(D,F);me({navigation:ge});let we,fe=hv(K,D);if(!fe.route.action&&!fe.route.lazy)we={type:It.error,error:Gr(405,{method:I.method,pathname:D.pathname,routeId:fe.route.id})};else if(we=await Fl("action",I,fe,K,a,o,c),I.signal.aborted)return{shortCircuited:!0};if(qi(we)){let oe;return he&&he.replace!=null?oe=he.replace:oe=we.location===x.location.pathname+x.location.search,await $r(x,we,{submission:F,replace:oe}),{shortCircuited:!0}}if(ds(we)){let oe=Di(K,fe.route.id);return(he&&he.replace)!==!0&&(P=Ot.Push),{pendingActionData:{},pendingActionError:{[oe.route.id]:we.error}}}if(ka(we))throw Gr(400,{type:"defer-action"});return{pendingActionData:{[fe.route.id]:we.data}}}async function Pr(I,D,F,K,he,ge,we,fe,oe){let Me=K||du(D,he),Se=he||ge||_P(Me),Be=l||i,[je,Gt]=dP(e.history,x,F,Se,D,R,j,k,Q,M,Be,c,fe,oe);if(st(He=>!(F&&F.some(Kt=>Kt.route.id===He))||je&&je.some(Kt=>Kt.route.id===He)),je.length===0&&Gt.length===0){let He=ti();return qe(D,rt({matches:F,loaderData:{},errors:oe||null},fe?{actionData:fe}:{},He?{fetchers:new Map(x.fetchers)}:{})),{shortCircuited:!0}}if(!C){Gt.forEach(Kt=>{let Oo=x.fetchers.get(Kt.key),bt=Bl(void 0,Oo?Oo.data:void 0);x.fetchers.set(Kt.key,bt)});let He=fe||x.actionData;me(rt({navigation:Me},He?Object.keys(He).length===0?{actionData:null}:{actionData:He}:{},Gt.length>0?{fetchers:new Map(x.fetchers)}:{}))}U=++L,Gt.forEach(He=>{T.has(He.key)&&_t(He.key),He.controller&&T.set(He.key,He.controller)});let Rt=()=>Gt.forEach(He=>_t(He.key));$&&$.signal.addEventListener("abort",Rt);let{results:Po,loaderResults:yl,fetcherResults:or}=await Hn(x.matches,F,je,Gt,I);if(I.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",Rt),Gt.forEach(He=>T.delete(He.key));let cr=yP(Po);if(cr)return await $r(x,cr,{replace:we}),{shortCircuited:!0};let{loaderData:ni,errors:oi}=hP(x,F,je,yl,oe,Gt,or,A);A.forEach((He,Kt)=>{He.subscribe(Oo=>{(Oo||He.done)&&A.delete(Kt)})});let $o=ti(),ai=ri(U),ii=$o||ai||Gt.length>0;return rt({loaderData:ni,errors:oi},ii?{fetchers:new Map(x.fetchers)}:{})}function Qt(I){return x.fetchers.get(I)||Hie}function Ur(I,D,F,K){if(n)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.");T.has(I)&&_t(I);let he=l||i,ge=pv(x.location,x.matches,c,u.v7_prependBasename,F,D,K==null?void 0:K.relative),we=Ii(he,ge,c);if(!we){Wr(I,D,Gr(404,{pathname:ge}));return}let{path:fe,submission:oe,error:Me}=uP(u.v7_normalizeFormMethod,!0,ge,K);if(Me){Wr(I,D,Me);return}let Se=hv(we,fe);if(O=(K&&K.preventScrollReset)===!0,oe&&dn(oe.formMethod)){Eo(I,D,fe,Se,we,oe);return}Q.set(I,{routeId:D,path:fe}),jt(I,D,fe,Se,we,oe)}async function Eo(I,D,F,K,he,ge){if(Ve(),Q.delete(I),!K.route.action&&!K.route.lazy){let bt=Gr(405,{method:ge.formMethod,pathname:F,routeId:D});Wr(I,D,bt);return}let we=x.fetchers.get(I),fe=ole(ge,we);x.fetchers.set(I,fe),me({fetchers:new Map(x.fetchers)});let oe=new AbortController,Me=Vl(e.history,F,oe.signal,ge);T.set(I,oe);let Se=await Fl("action",Me,K,he,a,o,c);if(Me.signal.aborted){T.get(I)===oe&&T.delete(I);return}if(qi(Se)){T.delete(I),M.add(I);let bt=Bl(ge);return x.fetchers.set(I,bt),me({fetchers:new Map(x.fetchers)}),$r(x,Se,{submission:ge,isFetchActionRedirect:!0})}if(ds(Se)){Wr(I,D,Se.error);return}if(ka(Se))throw Gr(400,{type:"defer-action"});let Be=x.navigation.location||x.location,je=Vl(e.history,Be,oe.signal),Gt=l||i,Rt=x.navigation.state!=="idle"?Ii(Gt,x.navigation.location,c):x.matches;Pe(Rt,"Didn't find any matches after fetcher action");let Po=++L;V.set(I,Po);let yl=Bl(ge,Se.data);x.fetchers.set(I,yl);let[or,cr]=dP(e.history,x,Rt,ge,Be,R,j,k,Q,M,Gt,c,{[K.route.id]:Se.data},void 0);cr.filter(bt=>bt.key!==I).forEach(bt=>{let Ue=bt.key,Qn=x.fetchers.get(Ue),Cr=Bl(void 0,Qn?Qn.data:void 0);x.fetchers.set(Ue,Cr),T.has(Ue)&&_t(Ue),bt.controller&&T.set(Ue,bt.controller)}),me({fetchers:new Map(x.fetchers)});let ni=()=>cr.forEach(bt=>_t(bt.key));oe.signal.addEventListener("abort",ni);let{results:oi,loaderResults:$o,fetcherResults:ai}=await Hn(x.matches,Rt,or,cr,je);if(oe.signal.aborted)return;oe.signal.removeEventListener("abort",ni),V.delete(I),T.delete(I),cr.forEach(bt=>T.delete(bt.key));let ii=yP(oi);if(ii)return $r(x,ii);let{loaderData:He,errors:Kt}=hP(x,x.matches,or,$o,void 0,cr,ai,A);if(x.fetchers.has(I)){let bt=Au(Se.data);x.fetchers.set(I,bt)}let Oo=ri(Po);x.navigation.state==="loading"&&Po>U?(Pe(P,"Expected pending action"),$&&$.abort(),qe(x.navigation.location,{matches:Rt,loaderData:He,errors:Kt,fetchers:new Map(x.fetchers)})):(me(rt({errors:Kt,loaderData:gP(x.loaderData,He,Rt,Kt)},Oo||cr.length>0?{fetchers:new Map(x.fetchers)}:{})),R=!1)}async function jt(I,D,F,K,he,ge){let we=x.fetchers.get(I),fe=Bl(ge,we?we.data:void 0);x.fetchers.set(I,fe),me({fetchers:new Map(x.fetchers)});let oe=new AbortController,Me=Vl(e.history,F,oe.signal);T.set(I,oe);let Se=await Fl("loader",Me,K,he,a,o,c);if(ka(Se)&&(Se=await hD(Se,Me.signal,!0)||Se),T.get(I)===oe&&T.delete(I),Me.signal.aborted)return;if(qi(Se)){M.add(I),await $r(x,Se);return}if(ds(Se)){let je=Di(x.matches,D);x.fetchers.delete(I),me({fetchers:new Map(x.fetchers),errors:{[je.route.id]:Se.error}});return}Pe(!ka(Se),"Unhandled fetcher deferred data");let Be=Au(Se.data);x.fetchers.set(I,Be),me({fetchers:new Map(x.fetchers)})}async function $r(I,D,F){let{submission:K,replace:he,isFetchActionRedirect:ge}=F===void 0?{}:F;D.revalidate&&(R=!0);let we=Ns(I.location,D.location,rt({_isRedirect:!0},ge?{_isFetchActionRedirect:!0}:{}));if(Pe(we,"Expected a location on the redirect navigation"),fD.test(D.location)&&r){let Me=e.history.createURL(D.location),Se=pc(Me.pathname,c)==null;if(t.location.origin!==Me.origin||Se){he?t.location.replace(D.location):t.location.assign(D.location);return}}$=null;let fe=he===!0?Ot.Replace:Ot.Push,oe=K||_P(I.navigation);if(Wie.has(D.status)&&oe&&dn(oe.formMethod))await wt(fe,we,{submission:rt({},oe,{formAction:D.location}),preventScrollReset:O});else if(ge)await wt(fe,we,{overrideNavigation:du(we),fetcherSubmission:oe,preventScrollReset:O});else{let Me=du(we,oe);await wt(fe,we,{overrideNavigation:Me,preventScrollReset:O})}}async function Hn(I,D,F,K,he){let ge=await Promise.all([...F.map(oe=>Fl("loader",he,oe,D,a,o,c)),...K.map(oe=>oe.matches&&oe.match&&oe.controller?Fl("loader",Vl(e.history,oe.path,oe.controller.signal),oe.match,oe.matches,a,o,c):{type:It.error,error:Gr(404,{pathname:oe.path})})]),we=ge.slice(0,F.length),fe=ge.slice(F.length);return await Promise.all([wP(I,F,we,we.map(()=>he.signal),!1,x.loaderData),wP(I,K.map(oe=>oe.match),fe,K.map(oe=>oe.controller?oe.controller.signal:null),!0)]),{results:ge,loaderResults:we,fetcherResults:fe}}function Ve(){R=!0,j.push(...st()),Q.forEach((I,D)=>{T.has(D)&&(k.push(D),_t(D))})}function Wr(I,D,F){let K=Di(x.matches,D);Hr(I),me({errors:{[K.route.id]:F},fetchers:new Map(x.fetchers)})}function Hr(I){let D=x.fetchers.get(I);T.has(I)&&!(D&&D.state==="loading"&&V.has(I))&&_t(I),Q.delete(I),V.delete(I),M.delete(I),x.fetchers.delete(I)}function _t(I){let D=T.get(I);Pe(D,"Expected fetch controller: "+I),D.abort(),T.delete(I)}function ei(I){for(let D of I){let F=Qt(D),K=Au(F.data);x.fetchers.set(D,K)}}function ti(){let I=[],D=!1;for(let F of M){let K=x.fetchers.get(F);Pe(K,"Expected fetcher: "+F),K.state==="loading"&&(M.delete(F),I.push(F),D=!0)}return ei(I),D}function ri(I){let D=[];for(let[F,K]of V)if(K<I){let he=x.fetchers.get(F);Pe(he,"Expected fetcher: "+F),he.state==="loading"&&(_t(F),V.delete(F),D.push(F))}return ei(D),D.length>0}function Y(I,D){let F=x.blockers.get(I)||Ll;return z.get(I)!==D&&z.set(I,D),F}function de(I){x.blockers.delete(I),z.delete(I)}function We(I,D){let F=x.blockers.get(I)||Ll;Pe(F.state==="unblocked"&&D.state==="blocked"||F.state==="blocked"&&D.state==="blocked"||F.state==="blocked"&&D.state==="proceeding"||F.state==="blocked"&&D.state==="unblocked"||F.state==="proceeding"&&D.state==="unblocked","Invalid blocker state transition: "+F.state+" -> "+D.state);let K=new Map(x.blockers);K.set(I,D),me({blockers:K})}function lt(I){let{currentLocation:D,nextLocation:F,historyAction:K}=I;if(z.size===0)return;z.size>1&&il(!1,"A router only supports one blocker at a time");let he=Array.from(z.entries()),[ge,we]=he[he.length-1],fe=x.blockers.get(ge);if(!(fe&&fe.state==="proceeding")&&we({currentLocation:D,nextLocation:F,historyAction:K}))return ge}function st(I){let D=[];return A.forEach((F,K)=>{(!I||I(K))&&(F.cancel(),D.push(K),A.delete(K))}),D}function qn(I,D,F){if(h=I,y=D,g=F||null,!_&&x.navigation===zh){_=!0;let K=So(x.location,x.matches);K!=null&&me({restoreScrollPosition:K})}return()=>{h=null,y=null,g=null}}function an(I,D){return g&&g(I,D.map(K=>rle(K,x.loaderData)))||I.key}function Or(I,D){if(h&&y){let F=an(I,D);h[F]=y()}}function So(I,D){if(h){let F=an(I,D),K=h[F];if(typeof K=="number")return K}return null}function pa(I){a={},l=fv(I,o,void 0,a)}return b={get basename(){return c},get state(){return x},get routes(){return i},initialize:le,subscribe:Re,enableScrollRestoration:qn,navigate:ze,fetch:Ur,revalidate:it,createHref:I=>e.history.createHref(I),encodeLocation:I=>e.history.encodeLocation(I),getFetcher:Qt,deleteFetcher:Hr,dispose:ye,getBlocker:Y,deleteBlocker:de,_internalFetchControllers:T,_internalActiveDeferreds:A,_internalSetRoutes:pa},b}function Gie(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function pv(e,t,r,n,o,a,i){let l,c;if(a!=null&&i!=="path"){l=[];for(let d of t)if(l.push(d),d.route.id===a){c=d;break}}else l=t,c=t[t.length-1];let u=cD(o||".",A0(l).map(d=>d.pathnameBase),pc(e.pathname,r)||e.pathname,i==="path");return o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&c&&c.route.index&&!z0(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Xo([r,u.pathname])),fc(u)}function uP(e,t,r,n){if(!n||!Gie(n))return{path:r};if(n.formMethod&&!tle(n.formMethod))return{path:r,error:Gr(405,{method:n.formMethod})};let o=()=>({path:r,error:Gr(400,{type:"invalid-body"})}),a=n.formMethod||"get",i=e?a.toUpperCase():a.toLowerCase(),l=mD(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!dn(i))return o();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((g,y)=>{let[_,E]=y;return""+g+_+"="+E+`
193
- `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!dn(i))return o();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}Pe(typeof FormData=="function","FormData is not available in this environment");let c,u;if(n.formData)c=mv(n.formData),u=n.formData;else if(n.body instanceof FormData)c=mv(n.body),u=n.body;else if(n.body instanceof URLSearchParams)c=n.body,u=mP(c);else if(n.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(n.body),u=mP(c)}catch{return o()}let d={formMethod:i,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(dn(d.formMethod))return{path:r,submission:d};let m=xo(r);return t&&m.search&&z0(m.search)&&c.append("index",""),m.search="?"+c,{path:fc(m),submission:d}}function Kie(e,t){let r=e;if(t){let n=e.findIndex(o=>o.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function dP(e,t,r,n,o,a,i,l,c,u,d,m,h,g){let y=g?Object.values(g)[0]:h?Object.values(h)[0]:void 0,_=e.createURL(t.location),E=e.createURL(o),w=g?Object.keys(g)[0]:void 0,b=Kie(r,w).filter((P,O)=>{if(P.route.lazy)return!0;if(P.route.loader==null)return!1;if(Yie(t.loaderData,t.matches[O],P)||i.some(R=>R===P.route.id))return!0;let $=t.matches[O],C=P;return fP(P,rt({currentUrl:_,currentParams:$.params,nextUrl:E,nextParams:C.params},n,{actionResult:y,defaultShouldRevalidate:a||_.pathname+_.search===E.pathname+E.search||_.search!==E.search||pD($,C)}))}),x=[];return c.forEach((P,O)=>{if(!r.some(T=>T.route.id===P.routeId))return;let $=Ii(d,P.path,m);if(!$){x.push({key:O,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let C=t.fetchers.get(O),R=C&&C.state!=="idle"&&C.data===void 0&&!u.has(O),j=hv($,P.path);(l.includes(O)||R||fP(j,rt({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:E,nextParams:r[r.length-1].params},n,{actionResult:y,defaultShouldRevalidate:a})))&&x.push({key:O,routeId:P.routeId,path:P.path,matches:$,match:j,controller:new AbortController})}),[b,x]}function Yie(e,t,r){let n=!t||r.route.id!==t.route.id,o=e[r.route.id]===void 0;return n||o}function pD(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function fP(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function pP(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let o=r[e.id];Pe(o,"No route found in manifest");let a={};for(let i in n){let c=o[i]!==void 0&&i!=="hasErrorBoundary";il(!c,'Route "'+o.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!wie.has(i)&&(a[i]=n[i])}Object.assign(o,a),Object.assign(o,rt({},t(o),{lazy:void 0}))}async function Fl(e,t,r,n,o,a,i,l){l===void 0&&(l={});let c,u,d,m=y=>{let _,E=new Promise((w,v)=>_=v);return d=()=>_(),t.signal.addEventListener("abort",d),Promise.race([y({request:t,params:r.params,context:l.requestContext}),E])};try{let y=r.route[e];if(r.route.lazy)if(y)u=(await Promise.all([m(y),pP(r.route,a,o)]))[0];else if(await pP(r.route,a,o),y=r.route[e],y)u=await m(y);else if(e==="action"){let _=new URL(t.url),E=_.pathname+_.search;throw Gr(405,{method:t.method,pathname:E,routeId:r.route.id})}else return{type:It.data,data:void 0};else if(y)u=await m(y);else{let _=new URL(t.url),E=_.pathname+_.search;throw Gr(404,{pathname:E})}Pe(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(y){c=It.error,u=y}finally{d&&t.signal.removeEventListener("abort",d)}if(ele(u)){let y=u.status;if(Uie.has(y)){let w=u.headers.get("Location");if(Pe(w,"Redirects returned/thrown from loaders/actions must have a Location header"),!fD.test(w))w=pv(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,w);else if(!l.isStaticRequest){let v=new URL(t.url),b=w.startsWith("//")?new URL(v.protocol+w):new URL(w),x=pc(b.pathname,i)!=null;b.origin===v.origin&&x&&(w=b.pathname+b.search+b.hash)}if(l.isStaticRequest)throw u.headers.set("Location",w),u;return{type:It.redirect,status:y,location:w,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l.isRouteRequest)throw{type:c||It.data,response:u};let _,E=u.headers.get("Content-Type");return E&&/\bapplication\/json\b/.test(E)?_=await u.json():_=await u.text(),c===It.error?{type:c,error:new M0(y,u.statusText,_),headers:u.headers}:{type:It.data,data:_,statusCode:u.status,headers:u.headers}}if(c===It.error)return{type:c,error:u};if(Zie(u)){var h,g;return{type:It.deferred,deferredData:u,statusCode:(h=u.init)==null?void 0:h.status,headers:((g=u.init)==null?void 0:g.headers)&&new Headers(u.init.headers)}}return{type:It.data,data:u}}function Vl(e,t,r,n){let o=e.createURL(mD(t)).toString(),a={signal:r};if(n&&dn(n.formMethod)){let{formMethod:i,formEncType:l}=n;a.method=i.toUpperCase(),l==="application/json"?(a.headers=new Headers({"Content-Type":l}),a.body=JSON.stringify(n.json)):l==="text/plain"?a.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?a.body=mv(n.formData):a.body=n.formData}return new Request(o,a)}function mv(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function mP(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Xie(e,t,r,n,o){let a={},i=null,l,c=!1,u={};return r.forEach((d,m)=>{let h=t[m].route.id;if(Pe(!qi(d),"Cannot handle redirect results in processLoaderData"),ds(d)){let g=Di(e,h),y=d.error;n&&(y=Object.values(n)[0],n=void 0),i=i||{},i[g.route.id]==null&&(i[g.route.id]=y),a[h]=void 0,c||(c=!0,l=uD(d.error)?d.error.status:500),d.headers&&(u[h]=d.headers)}else ka(d)?(o.set(h,d.deferredData),a[h]=d.deferredData.data):a[h]=d.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(l=d.statusCode),d.headers&&(u[h]=d.headers)}),n&&(i=n,a[Object.keys(n)[0]]=void 0),{loaderData:a,errors:i,statusCode:l||200,loaderHeaders:u}}function hP(e,t,r,n,o,a,i,l){let{loaderData:c,errors:u}=Xie(t,r,n,o,l);for(let d=0;d<a.length;d++){let{key:m,match:h,controller:g}=a[d];Pe(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let y=i[d];if(!(g&&g.signal.aborted))if(ds(y)){let _=Di(e.matches,h==null?void 0:h.route.id);u&&u[_.route.id]||(u=rt({},u,{[_.route.id]:y.error})),e.fetchers.delete(m)}else if(qi(y))Pe(!1,"Unhandled fetcher revalidation redirect");else if(ka(y))Pe(!1,"Unhandled fetcher deferred data");else{let _=Au(y.data);e.fetchers.set(m,_)}}return{loaderData:c,errors:u}}function gP(e,t,r,n){let o=rt({},t);for(let a of r){let i=a.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(o[i]=t[i]):e[i]!==void 0&&a.route.loader&&(o[i]=e[i]),n&&n.hasOwnProperty(i))break}return o}function Di(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function vP(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Gr(e,t){let{pathname:r,routeId:n,method:o,type:a}=t===void 0?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",o&&r&&n?l="You made a "+o+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":a==="defer-action"?l="defer() is not supported in actions":a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",l='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",o&&r&&n?l="You made a "+o.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new M0(e||500,i,new Error(l),!0)}function yP(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(qi(r))return r}}function mD(e){let t=typeof e=="string"?xo(e):e;return fc(rt({},t,{hash:""}))}function Jie(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ka(e){return e.type===It.deferred}function ds(e){return e.type===It.error}function qi(e){return(e&&e.type)===It.redirect}function Zie(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 ele(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function tle(e){return Bie.has(e.toLowerCase())}function dn(e){return Fie.has(e.toLowerCase())}async function wP(e,t,r,n,o,a){for(let i=0;i<r.length;i++){let l=r[i],c=t[i];if(!c)continue;let u=e.find(m=>m.route.id===c.route.id),d=u!=null&&!pD(u,c)&&(a&&a[c.route.id])!==void 0;if(ka(l)&&(o||d)){let m=n[i];Pe(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await hD(l,m,o).then(h=>{h&&(r[i]=h||r[i])})}}}async function hD(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:It.data,data:e.deferredData.unwrappedData}}catch(o){return{type:It.error,error:o}}return{type:It.data,data:e.deferredData.data}}}function z0(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function rle(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function hv(e,t){let r=typeof t=="string"?xo(t).search:t.search;if(e[e.length-1].route.index&&z0(r||""))return e[e.length-1];let n=A0(e);return n[n.length-1]}function _P(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:i}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function du(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nle(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Bl(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function ole(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}function Au(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}/**
194
- * React Router v6.14.1
195
- *
196
- * Copyright (c) Remix Software Inc.
197
- *
198
- * This source code is licensed under the MIT license found in the
199
- * LICENSE.md file in the root directory of this source tree.
200
- *
201
- * @license MIT
202
- */function bp(){return bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bp.apply(this,arguments)}const Im=f.createContext(null),gD=f.createContext(null),Dm=f.createContext(null),Nm=f.createContext(null),ua=f.createContext({outlet:null,matches:[],isDataRoute:!1}),vD=f.createContext(null);function Am(){return f.useContext(Nm)!=null}function da(){return Am()||Pe(!1),f.useContext(Nm).location}function yD(e){f.useContext(Dm).static||f.useLayoutEffect(e)}function $t(){let{isDataRoute:e}=f.useContext(ua);return e?yle():ale()}function ale(){Am()||Pe(!1);let e=f.useContext(Im),{basename:t,navigator:r}=f.useContext(Dm),{matches:n}=f.useContext(ua),{pathname:o}=da(),a=JSON.stringify(A0(n).map(c=>c.pathnameBase)),i=f.useRef(!1);return yD(()=>{i.current=!0}),f.useCallback(function(c,u){if(u===void 0&&(u={}),!i.current)return;if(typeof c=="number"){r.go(c);return}let d=cD(c,JSON.parse(a),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Xo([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,o,e])}const ile=f.createContext(null);function lle(e){let t=f.useContext(ua).outlet;return t&&f.createElement(ile.Provider,{value:e},t)}function Je(){let{matches:e}=f.useContext(ua),t=e[e.length-1];return t?t.params:{}}function sle(e,t){return wD(e,t)}function wD(e,t,r){Am()||Pe(!1);let{navigator:n}=f.useContext(Dm),{matches:o}=f.useContext(ua),a=o[o.length-1],i=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=da(),u;if(t){var d;let _=typeof t=="string"?xo(t):t;l==="/"||(d=_.pathname)!=null&&d.startsWith(l)||Pe(!1),u=_}else u=c;let m=u.pathname||"/",h=l==="/"?m:m.slice(l.length)||"/",g=Ii(e,{pathname:h}),y=ple(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},i,_.params),pathname:Xo([l,n.encodeLocation?n.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:Xo([l,n.encodeLocation?n.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,r);return t&&y?f.createElement(Nm.Provider,{value:{location:bp({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ot.Pop}},y):y}function cle(){let e=vle(),t=uD(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:o},r):null,a)}const ule=f.createElement(cle,null);class dle extends f.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?f.createElement(ua.Provider,{value:this.props.routeContext},f.createElement(vD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fle(e){let{routeContext:t,match:r,children:n}=e,o=f.useContext(Im);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),f.createElement(ua.Provider,{value:t},n)}function ple(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let l=a.findIndex(c=>c.route.id&&(i==null?void 0:i[c.route.id]));l>=0||Pe(!1),a=a.slice(0,Math.min(a.length,l+1))}return a.reduceRight((l,c,u)=>{let d=c.route.id?i==null?void 0:i[c.route.id]:null,m=null;r&&(m=c.route.errorElement||ule);let h=t.concat(a.slice(0,u+1)),g=()=>{let y;return d?y=m:c.route.Component?y=f.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=l,f.createElement(fle,{match:c,routeContext:{outlet:l,matches:h,isDataRoute:r!=null},children:y})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?f.createElement(dle,{location:r.location,revalidation:r.revalidation,component:m,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):g()},null)}var gv;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(gv||(gv={}));var As;(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"})(As||(As={}));function mle(e){let t=f.useContext(Im);return t||Pe(!1),t}function hle(e){let t=f.useContext(gD);return t||Pe(!1),t}function gle(e){let t=f.useContext(ua);return t||Pe(!1),t}function _D(e){let t=gle(),r=t.matches[t.matches.length-1];return r.route.id||Pe(!1),r.route.id}function vle(){var e;let t=f.useContext(vD),r=hle(As.UseRouteError),n=_D(As.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function yle(){let{router:e}=mle(gv.UseNavigateStable),t=_D(As.UseNavigateStable),r=f.useRef(!1);return yD(()=>{r.current=!0}),f.useCallback(function(o,a){a===void 0&&(a={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,bp({fromRouteId:t},a)))},[e,t])}const wle="startTransition",bP=Mu[wle];function _le(e){let{fallbackElement:t,router:r,future:n}=e,[o,a]=f.useState(r.state),{v7_startTransition:i}=n||{},l=f.useCallback(m=>{i&&bP?bP(()=>a(m)):a(m)},[a,i]);f.useLayoutEffect(()=>r.subscribe(l),[r,l]);let c=f.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:m=>r.navigate(m),push:(m,h,g)=>r.navigate(m,{state:h,preventScrollReset:g==null?void 0:g.preventScrollReset}),replace:(m,h,g)=>r.navigate(m,{replace:!0,state:h,preventScrollReset:g==null?void 0:g.preventScrollReset})}),[r]),u=r.basename||"/",d=f.useMemo(()=>({router:r,navigator:c,static:!1,basename:u}),[r,c,u]);return f.createElement(f.Fragment,null,f.createElement(Im.Provider,{value:d},f.createElement(gD.Provider,{value:o},f.createElement(xle,{basename:u,location:o.location,navigationType:o.historyAction,navigator:c},o.initialized?f.createElement(ble,{routes:r.routes,state:o}):t))),null)}function ble(e){let{routes:t,state:r}=e;return wD(t,void 0,r)}function bD(e){return lle(e.context)}function se(e){Pe(!1)}function xle(e){let{basename:t="/",children:r=null,location:n,navigationType:o=Ot.Pop,navigator:a,static:i=!1}=e;Am()&&Pe(!1);let l=t.replace(/^\/*/,"/"),c=f.useMemo(()=>({basename:l,navigator:a,static:i}),[l,a,i]);typeof n=="string"&&(n=xo(n));let{pathname:u="/",search:d="",hash:m="",state:h=null,key:g="default"}=n,y=f.useMemo(()=>{let _=pc(u,l);return _==null?null:{location:{pathname:_,search:d,hash:m,state:h,key:g},navigationType:o}},[l,u,d,m,h,g,o]);return y==null?null:f.createElement(Dm.Provider,{value:c},f.createElement(Nm.Provider,{children:r,value:y}))}function Ele(e){let{children:t,location:r}=e;return sle(vv(t),r)}var xP;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(xP||(xP={}));new Promise(()=>{});function vv(e,t){t===void 0&&(t=[]);let r=[];return f.Children.forEach(e,(n,o)=>{if(!f.isValidElement(n))return;let a=[...t,o];if(n.type===f.Fragment){r.push.apply(r,vv(n.props.children,a));return}n.type!==se&&Pe(!1),!n.props.index||!n.props.children||Pe(!1);let i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=vv(n.props.children,a)),r.push(i)}),r}function Sle(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:f.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
203
- * React Router DOM v6.14.1
204
- *
205
- * Copyright (c) Remix Software Inc.
206
- *
207
- * This source code is licensed under the MIT license found in the
208
- * LICENSE.md file in the root directory of this source tree.
209
- *
210
- * @license MIT
211
- */function xp(){return xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xp.apply(this,arguments)}function yv(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(o=>[r,o]):[[r,n]])},[]))}function Ple(e,t){let r=yv(e);if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)});return r}function $le(e,t){return Qie({basename:t==null?void 0:t.basename,future:xp({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:gie({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Ole(),routes:e,mapRouteProperties:Sle}).initialize()}function Ole(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=xp({},t,{errors:Cle(t.errors)})),t}function Cle(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new M0(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){let a=new Error(o.message);a.stack="",r[n]=a}else r[n]=o;return r}var EP;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(EP||(EP={}));var SP;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(SP||(SP={}));function L0(e){let t=f.useRef(yv(e)),r=f.useRef(!1),n=da(),o=f.useMemo(()=>Ple(n.search,r.current?null:t.current),[n.search]),a=$t(),i=f.useCallback((l,c)=>{const u=yv(typeof l=="function"?l(o):l);r.current=!0,a("?"+u,c)},[a,o]);return[o,i]}var kle={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},jle=Object.defineProperty,Rle=Object.defineProperties,Tle=Object.getOwnPropertyDescriptors,Ep=Object.getOwnPropertySymbols,xD=Object.prototype.hasOwnProperty,ED=Object.prototype.propertyIsEnumerable,PP=(e,t,r)=>t in e?jle(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$P=(e,t)=>{for(var r in t||(t={}))xD.call(t,r)&&PP(e,r,t[r]);if(Ep)for(var r of Ep(t))ED.call(t,r)&&PP(e,r,t[r]);return e},Ile=(e,t)=>Rle(e,Tle(t)),Dle=(e,t)=>{var r={};for(var n in e)xD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ep)for(var n of Ep(e))t.indexOf(n)<0&&ED.call(e,n)&&(r[n]=e[n]);return r},At=(e,t,r)=>{const n=f.forwardRef((o,a)=>{var i=o,{color:l="currentColor",size:c=24,stroke:u=2,children:d}=i,m=Dle(i,["color","size","stroke","children"]);return f.createElement("svg",$P(Ile($P({ref:a},kle),{width:c,height:c,stroke:l,strokeWidth:u,className:`tabler-icon tabler-icon-${e}`}),m),[...r.map(([h,g])=>f.createElement(h,g)),...d||[]])});return n.propTypes={color:xe.string,size:xe.oneOfType([xe.string,xe.number]),stroke:xe.oneOfType([xe.string,xe.number])},n.displayName=`${t}`,n},Nle=At("alert-circle","IconAlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]),Ale=At("brand-asana","IconBrandAsana",[["path",{d:"M12 7m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M17 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M7 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-2"}]]),Mle=At("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),zle=At("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),Lle=At("cloud-upload","IconCloudUpload",[["path",{d:"M7 18a4.6 4.4 0 0 1 0 -9a5 4.5 0 0 1 11 2h1a3.5 3.5 0 0 1 0 7h-1",key:"svg-0"}],["path",{d:"M9 15l3 -3l3 3",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}]]),Fle=At("device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]),Vle=At("forms","IconForms",[["path",{d:"M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3",key:"svg-0"}],["path",{d:"M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3",key:"svg-1"}],["path",{d:"M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7",key:"svg-2"}],["path",{d:"M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1",key:"svg-3"}],["path",{d:"M17 12h.01",key:"svg-4"}],["path",{d:"M13 12h.01",key:"svg-5"}]]),Ble=At("id","IconId",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M9 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M15 8l2 0",key:"svg-2"}],["path",{d:"M15 12l2 0",key:"svg-3"}],["path",{d:"M7 16l10 0",key:"svg-4"}]]),Ule=At("lock-access","IconLockAccess",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}],["path",{d:"M8 11m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v3a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z",key:"svg-4"}],["path",{d:"M10 11v-2a2 2 0 1 1 4 0v2",key:"svg-5"}]]),Wle=At("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),Hle=At("microscope","IconMicroscope",[["path",{d:"M5 21h14",key:"svg-0"}],["path",{d:"M6 18h2",key:"svg-1"}],["path",{d:"M7 18v3",key:"svg-2"}],["path",{d:"M9 11l3 3l6 -6l-3 -3z",key:"svg-3"}],["path",{d:"M10.5 12.5l-1.5 1.5",key:"svg-4"}],["path",{d:"M17 3l3 3",key:"svg-5"}],["path",{d:"M12 21a6 6 0 0 0 3.715 -10.712",key:"svg-6"}]]),qle=At("packages","IconPackages",[["path",{d:"M7 16.5l-5 -3l5 -3l5 3v5.5l-5 3z",key:"svg-0"}],["path",{d:"M2 13.5v5.5l5 3",key:"svg-1"}],["path",{d:"M7 16.545l5 -3.03",key:"svg-2"}],["path",{d:"M17 16.5l-5 -3l5 -3l5 3v5.5l-5 3z",key:"svg-3"}],["path",{d:"M12 19l5 3",key:"svg-4"}],["path",{d:"M17 16.5l5 -3",key:"svg-5"}],["path",{d:"M12 13.5v-5.5l-5 -3l5 -3l5 3v5.5",key:"svg-6"}],["path",{d:"M7 5.03v5.455",key:"svg-7"}],["path",{d:"M12 8l5 -3",key:"svg-8"}]]),Qle=At("player-play","IconPlayerPlay",[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]]),Gle=At("receipt","IconReceipt",[["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16l-3 -2l-2 2l-2 -2l-2 2l-2 -2l-3 2m4 -14h6m-6 4h6m-2 4h2",key:"svg-0"}]]),Kle=At("report-medical","IconReportMedical",[["path",{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2",key:"svg-0"}],["path",{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M10 14l4 0",key:"svg-2"}],["path",{d:"M12 12l0 4",key:"svg-3"}]]),Yle=At("star","IconStar",[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z",key:"svg-0"}]]),OP=At("upload","IconUpload",[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]]),Xle=At("webhook","IconWebhook",[["path",{d:"M4.876 13.61a4 4 0 1 0 6.124 3.39h6",key:"svg-0"}],["path",{d:"M15.066 20.502a4 4 0 1 0 1.934 -7.502c-.706 0 -1.424 .179 -2 .5l-3 -5.5",key:"svg-1"}],["path",{d:"M16 8a4 4 0 1 0 -8 0c0 1.506 .77 2.818 2 3.5l-3 5.5",key:"svg-2"}]]),SD=At("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),Jle=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function mc(e,t){var r=Zle(e);if(typeof r.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:typeof t=="string"?t:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function Zle(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),o=Jle.get(n);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var ese=[".DS_Store","Thumbs.db"];function tse(e){return sl(this,void 0,void 0,function(){return cl(this,function(t){return Sp(e)&&rse(e.dataTransfer)?[2,ise(e.dataTransfer,e.type)]:nse(e)?[2,ose(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,ase(e)]:[2,[]]})})}function rse(e){return Sp(e)}function nse(e){return Sp(e)&&Sp(e.target)}function Sp(e){return typeof e=="object"&&e!==null}function ose(e){return wv(e.target.files).map(function(t){return mc(t)})}function ase(e){return sl(this,void 0,void 0,function(){var t;return cl(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return mc(n)})]}})})}function ise(e,t){return sl(this,void 0,void 0,function(){var r,n;return cl(this,function(o){switch(o.label){case 0:return e.items?(r=wv(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(lse))]):[3,2];case 1:return n=o.sent(),[2,CP(PD(n))];case 2:return[2,CP(wv(e.files).map(function(a){return mc(a)}))]}})})}function CP(e){return e.filter(function(t){return ese.indexOf(t.name)===-1})}function wv(e){if(e===null)return[];for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function lse(e){if(typeof e.webkitGetAsEntry!="function")return kP(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?$D(t):kP(e)}function PD(e){return e.reduce(function(t,r){return Uh(Uh([],K0(t),!1),K0(Array.isArray(r)?PD(r):[r]),!1)},[])}function kP(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=mc(t);return Promise.resolve(r)}function sse(e){return sl(this,void 0,void 0,function(){return cl(this,function(t){return[2,e.isDirectory?$D(e):cse(e)]})})}function $D(e){var t=e.createReader();return new Promise(function(r,n){var o=[];function a(){var i=this;t.readEntries(function(l){return sl(i,void 0,void 0,function(){var c,u,d;return cl(this,function(m){switch(m.label){case 0:if(l.length)return[3,5];m.label=1;case 1:return m.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return c=m.sent(),r(c),[3,4];case 3:return u=m.sent(),n(u),[3,4];case 4:return[3,6];case 5:d=Promise.all(l.map(sse)),o.push(d),a(),m.label=6;case 6:return[2]}})})},function(l){n(l)})}a()})}function cse(e){return sl(this,void 0,void 0,function(){return cl(this,function(t){return[2,new Promise(function(r,n){e.file(function(o){var a=mc(o,e.fullPath);r(a)},function(o){n(o)})})]})})}var use=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return r.some(function(i){var l=i.trim().toLowerCase();return l.charAt(0)==="."?n.toLowerCase().endsWith(l):l.endsWith("/*")?a===l.replace(/\/.*$/,""):o===l})}return!0};function jP(e){return pse(e)||fse(e)||CD(e)||dse()}function dse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
212
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pse(e){if(Array.isArray(e))return _v(e)}function RP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function TP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(r),!0).forEach(function(n){OD(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OD(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ms(e,t){return gse(e)||hse(e,t)||CD(e,t)||mse()}function mse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
213
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CD(e,t){if(e){if(typeof e=="string")return _v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _v(e,t)}}function _v(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,l;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(c){a=!0,l=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw l}}return n}}function gse(e){if(Array.isArray(e))return e}var vse="file-invalid-type",yse="file-too-large",wse="file-too-small",_se="too-many-files",bse=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var r=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:vse,message:"File type must be ".concat(r)}},IP=function(t){return{code:yse,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},DP=function(t){return{code:wse,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},xse={code:_se,message:"Too many files"};function kD(e,t){var r=e.type==="application/x-moz-file"||use(e,t);return[r,r?null:bse(t)]}function jD(e,t,r){if(Ea(e.size))if(Ea(t)&&Ea(r)){if(e.size>r)return[!1,IP(r)];if(e.size<t)return[!1,DP(t)]}else{if(Ea(t)&&e.size<t)return[!1,DP(t)];if(Ea(r)&&e.size>r)return[!1,IP(r)]}return[!0,null]}function Ea(e){return e!=null}function Ese(e){var t=e.files,r=e.accept,n=e.minSize,o=e.maxSize,a=e.multiple,i=e.maxFiles,l=e.validator;return!a&&t.length>1||a&&i>=1&&t.length>i?!1:t.every(function(c){var u=kD(c,r),d=Ms(u,1),m=d[0],h=jD(c,n,o),g=Ms(h,1),y=g[0],_=l?l(c):null;return m&&y&&!_})}function Pp(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function fu(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function NP(e){e.preventDefault()}function Sse(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Pse(e){return e.indexOf("Edge/")!==-1}function $se(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Sse(e)||Pse(e)}function $n(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return t.some(function(l){return!Pp(n)&&l&&l.apply(void 0,[n].concat(a)),Pp(n)})}}function Ose(){return"showOpenFilePicker"in window}function Cse(e){if(Ea(e)){var t=Object.entries(e).filter(function(r){var n=Ms(r,2),o=n[0],a=n[1],i=!0;return RD(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(a)||!a.every(TD))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(r,n){var o=Ms(n,2),a=o[0],i=o[1];return TP(TP({},r),{},OD({},a,i))},{});return[{description:"Files",accept:t}]}return e}function kse(e){if(Ea(e))return Object.entries(e).reduce(function(t,r){var n=Ms(r,2),o=n[0],a=n[1];return[].concat(jP(t),[o],jP(a))},[]).filter(function(t){return RD(t)||TD(t)}).join(",")}function jse(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Rse(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function RD(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function TD(e){return/^.*\.[\w]+$/.test(e)}var Tse=["children"],Ise=["open"],Dse=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Nse=["refKey","onChange","onClick"];function Ase(e){return Lse(e)||zse(e)||ID(e)||Mse()}function Mse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
214
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lse(e){if(Array.isArray(e))return bv(e)}function Lh(e,t){return Bse(e)||Vse(e,t)||ID(e,t)||Fse()}function Fse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
215
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ID(e,t){if(e){if(typeof e=="string")return bv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bv(e,t)}}function bv(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vse(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,l;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(c){a=!0,l=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw l}}return n}}function Bse(e){if(Array.isArray(e))return e}function AP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ct(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(r),!0).forEach(function(n){xv(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $p(e,t){if(e==null)return{};var r=Use(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Use(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var F0=f.forwardRef(function(e,t){var r=e.children,n=$p(e,Tse),o=ND(n),a=o.open,i=$p(o,Ise);return f.useImperativeHandle(t,function(){return{open:a}},[a]),s.createElement(f.Fragment,null,r(ct(ct({},i),{},{open:a})))});F0.displayName="Dropzone";var DD={disabled:!1,getFilesFromEvent:tse,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};F0.defaultProps=DD;F0.propTypes={children:xe.func,accept:xe.objectOf(xe.arrayOf(xe.string)),multiple:xe.bool,preventDropOnDocument:xe.bool,noClick:xe.bool,noKeyboard:xe.bool,noDrag:xe.bool,noDragEventsBubbling:xe.bool,minSize:xe.number,maxSize:xe.number,maxFiles:xe.number,disabled:xe.bool,getFilesFromEvent:xe.func,onFileDialogCancel:xe.func,onFileDialogOpen:xe.func,useFsAccessApi:xe.bool,autoFocus:xe.bool,onDragEnter:xe.func,onDragLeave:xe.func,onDragOver:xe.func,onDrop:xe.func,onDropAccepted:xe.func,onDropRejected:xe.func,onError:xe.func,validator:xe.func};var Ev={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function ND(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ct(ct({},DD),e),r=t.accept,n=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,i=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,m=t.onDragOver,h=t.onDrop,g=t.onDropAccepted,y=t.onDropRejected,_=t.onFileDialogCancel,E=t.onFileDialogOpen,w=t.useFsAccessApi,v=t.autoFocus,b=t.preventDropOnDocument,x=t.noClick,P=t.noKeyboard,O=t.noDrag,$=t.noDragEventsBubbling,C=t.onError,R=t.validator,j=f.useMemo(function(){return kse(r)},[r]),k=f.useMemo(function(){return Cse(r)},[r]),T=f.useMemo(function(){return typeof E=="function"?E:MP},[E]),L=f.useMemo(function(){return typeof _=="function"?_:MP},[_]),U=f.useRef(null),V=f.useRef(null),M=f.useReducer(Wse,Ev),Q=Lh(M,2),A=Q[0],z=Q[1],q=A.isFocused,le=A.isFileDialogActive,ye=f.useRef(typeof window<"u"&&window.isSecureContext&&w&&Ose()),Re=function(){!ye.current&&le&&setTimeout(function(){if(V.current){var de=V.current.files;de.length||(z({type:"closeDialog"}),L())}},300)};f.useEffect(function(){return window.addEventListener("focus",Re,!1),function(){window.removeEventListener("focus",Re,!1)}},[V,le,L,ye]);var me=f.useRef([]),qe=function(de){U.current&&U.current.contains(de.target)||(de.preventDefault(),me.current=[])};f.useEffect(function(){return b&&(document.addEventListener("dragover",NP,!1),document.addEventListener("drop",qe,!1)),function(){b&&(document.removeEventListener("dragover",NP),document.removeEventListener("drop",qe))}},[U,b]),f.useEffect(function(){return!n&&v&&U.current&&U.current.focus(),function(){}},[U,v,n]);var ze=f.useCallback(function(Y){C?C(Y):console.error(Y)},[C]),it=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y),me.current=[].concat(Ase(me.current),[Y.target]),fu(Y)&&Promise.resolve(o(Y)).then(function(de){if(!(Pp(Y)&&!$)){var We=de.length,lt=We>0&&Ese({files:de,accept:j,minSize:i,maxSize:a,multiple:l,maxFiles:c,validator:R}),st=We>0&&!lt;z({isDragAccept:lt,isDragReject:st,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Y)}}).catch(function(de){return ze(de)})},[o,u,ze,$,j,i,a,l,c,R]),wt=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y);var de=fu(Y);if(de&&Y.dataTransfer)try{Y.dataTransfer.dropEffect="copy"}catch{}return de&&m&&m(Y),!1},[m,$]),qt=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y);var de=me.current.filter(function(lt){return U.current&&U.current.contains(lt)}),We=de.indexOf(Y.target);We!==-1&&de.splice(We,1),me.current=de,!(de.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fu(Y)&&d&&d(Y))},[U,d,$]),Pr=f.useCallback(function(Y,de){var We=[],lt=[];Y.forEach(function(st){var qn=kD(st,j),an=Lh(qn,2),Or=an[0],So=an[1],pa=jD(st,i,a),I=Lh(pa,2),D=I[0],F=I[1],K=R?R(st):null;if(Or&&D&&!K)We.push(st);else{var he=[So,F];K&&(he=he.concat(K)),lt.push({file:st,errors:he.filter(function(ge){return ge})})}}),(!l&&We.length>1||l&&c>=1&&We.length>c)&&(We.forEach(function(st){lt.push({file:st,errors:[xse]})}),We.splice(0)),z({acceptedFiles:We,fileRejections:lt,type:"setFiles"}),h&&h(We,lt,de),lt.length>0&&y&&y(lt,de),We.length>0&&g&&g(We,de)},[z,l,j,i,a,c,h,g,y,R]),Qt=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y),me.current=[],fu(Y)&&Promise.resolve(o(Y)).then(function(de){Pp(Y)&&!$||Pr(de,Y)}).catch(function(de){return ze(de)}),z({type:"reset"})},[o,Pr,ze,$]),Ur=f.useCallback(function(){if(ye.current){z({type:"openDialog"}),T();var Y={multiple:l,types:k};window.showOpenFilePicker(Y).then(function(de){return o(de)}).then(function(de){Pr(de,null),z({type:"closeDialog"})}).catch(function(de){jse(de)?(L(de),z({type:"closeDialog"})):Rse(de)?(ye.current=!1,V.current?(V.current.value=null,V.current.click()):ze(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ze(de)});return}V.current&&(z({type:"openDialog"}),T(),V.current.value=null,V.current.click())},[z,T,L,w,Pr,ze,k,l]),Eo=f.useCallback(function(Y){!U.current||!U.current.isEqualNode(Y.target)||(Y.key===" "||Y.key==="Enter"||Y.keyCode===32||Y.keyCode===13)&&(Y.preventDefault(),Ur())},[U,Ur]),jt=f.useCallback(function(){z({type:"focus"})},[]),$r=f.useCallback(function(){z({type:"blur"})},[]),Hn=f.useCallback(function(){x||($se()?setTimeout(Ur,0):Ur())},[x,Ur]),Ve=function(de){return n?null:de},Wr=function(de){return P?null:Ve(de)},Hr=function(de){return O?null:Ve(de)},_t=function(de){$&&de.stopPropagation()},ei=f.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=Y.refKey,We=de===void 0?"ref":de,lt=Y.role,st=Y.onKeyDown,qn=Y.onFocus,an=Y.onBlur,Or=Y.onClick,So=Y.onDragEnter,pa=Y.onDragOver,I=Y.onDragLeave,D=Y.onDrop,F=$p(Y,Dse);return ct(ct(xv({onKeyDown:Wr($n(st,Eo)),onFocus:Wr($n(qn,jt)),onBlur:Wr($n(an,$r)),onClick:Ve($n(Or,Hn)),onDragEnter:Hr($n(So,it)),onDragOver:Hr($n(pa,wt)),onDragLeave:Hr($n(I,qt)),onDrop:Hr($n(D,Qt)),role:typeof lt=="string"&&lt!==""?lt:"presentation"},We,U),!n&&!P?{tabIndex:0}:{}),F)}},[U,Eo,jt,$r,Hn,it,wt,qt,Qt,P,O,n]),ti=f.useCallback(function(Y){Y.stopPropagation()},[]),ri=f.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},de=Y.refKey,We=de===void 0?"ref":de,lt=Y.onChange,st=Y.onClick,qn=$p(Y,Nse),an=xv({accept:j,multiple:l,type:"file",style:{display:"none"},onChange:Ve($n(lt,Qt)),onClick:Ve($n(st,ti)),tabIndex:-1},We,V);return ct(ct({},an),qn)}},[V,r,l,Qt,n]);return ct(ct({},A),{},{isFocused:q&&!n,getRootProps:ei,getInputProps:ri,rootRef:U,inputRef:V,open:Ve(Ur)})}function Wse(e,t){switch(t.type){case"focus":return ct(ct({},e),{},{isFocused:!0});case"blur":return ct(ct({},e),{},{isFocused:!1});case"openDialog":return ct(ct({},Ev),{},{isFileDialogActive:!0});case"closeDialog":return ct(ct({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return ct(ct({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return ct(ct({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ct({},Ev);default:return e}}function MP(){}const[Hse,qse]=ho("Dropzone component was not found in tree");var zP=Object.getOwnPropertySymbols,Qse=Object.prototype.hasOwnProperty,Gse=Object.prototype.propertyIsEnumerable,Kse=(e,t)=>{var r={};for(var n in e)Qse.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&zP)for(var n of zP(e))t.indexOf(n)<0&&Gse.call(e,n)&&(r[n]=e[n]);return r};function V0(e){const t=r=>{const n=H(`Dropzone${C1(e)}`,{},r),{children:o}=n,a=Kse(n,["children"]),i=qse(),l=Tp(o)?o:s.createElement("span",null,o);return i[e]?f.cloneElement(l,a):null};return t.displayName=`@mantine/dropzone/${C1(e)}`,t}const Yse=V0("accept"),Xse=V0("reject"),Jse=V0("idle");var Zse=Object.defineProperty,ece=Object.defineProperties,tce=Object.getOwnPropertyDescriptors,LP=Object.getOwnPropertySymbols,rce=Object.prototype.hasOwnProperty,nce=Object.prototype.propertyIsEnumerable,FP=(e,t,r)=>t in e?Zse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VP=(e,t)=>{for(var r in t||(t={}))rce.call(t,r)&&FP(e,r,t[r]);if(LP)for(var r of LP(t))nce.call(t,r)&&FP(e,r,t[r]);return e},oce=(e,t)=>ece(e,tce(t)),ace=W((e,{padding:t,radius:r})=>{const n=e.fn.variant({color:"red",variant:"light"}),o=e.fn.variant({color:e.primaryColor,variant:"light"});return{root:oce(VP(VP({},e.fn.fontStyles()),e.fn.focusStyles()),{boxSizing:"border-box",backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white,border:`${S(2)} dashed ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4]}`,padding:N({size:t,sizes:e.spacing}),borderRadius:e.fn.radius(r),cursor:"pointer",userSelect:"none",transition:"background-color 150ms ease",position:"relative","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]},"&[data-loading]":{cursor:"default","&:hover":{backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.white}},"&[data-accept]":{backgroundColor:e.colorScheme==="dark"?o.background:e.colors[e.primaryColor][0],borderColor:e.colorScheme==="dark"?o.border:e.colors[e.primaryColor][4],"&:hover":{backgroundColor:e.colorScheme==="dark"?o.background:e.colors[e.primaryColor][0]}},"&[data-reject]":{backgroundColor:e.colorScheme==="dark"?n.background:e.colors.red[0],borderColor:e.colorScheme==="dark"?n.border:e.colors.red[4],"&:hover":{backgroundColor:e.colorScheme==="dark"?n.background:e.colors.red[0]}}}),inner:{pointerEvents:"none",userSelect:"none"}}});const ice=ace;var lce=Object.defineProperty,sce=Object.defineProperties,cce=Object.getOwnPropertyDescriptors,Op=Object.getOwnPropertySymbols,AD=Object.prototype.hasOwnProperty,MD=Object.prototype.propertyIsEnumerable,BP=(e,t,r)=>t in e?lce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ul=(e,t)=>{for(var r in t||(t={}))AD.call(t,r)&&BP(e,r,t[r]);if(Op)for(var r of Op(t))MD.call(t,r)&&BP(e,r,t[r]);return e},Fh=(e,t)=>sce(e,cce(t)),uce=(e,t)=>{var r={};for(var n in e)AD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Op)for(var n of Op(e))t.indexOf(n)<0&&MD.call(e,n)&&(r[n]=e[n]);return r};const dce={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0};function vl(e){const t=H("Dropzone",dce,e),{className:r,padding:n,radius:o,disabled:a,classNames:i,styles:l,loading:c,multiple:u,maxSize:d,accept:m,children:h,onDropAny:g,onDrop:y,onReject:_,openRef:E,name:w,unstyled:v,maxFiles:b,autoFocus:x,activateOnClick:P,activateOnDrag:O,dragEventsBubbling:$,activateOnKeyboard:C,onDragEnter:R,onDragLeave:j,onDragOver:k,onFileDialogCancel:T,onFileDialogOpen:L,preventDropOnDocument:U,useFsAccessApi:V,getFilesFromEvent:M,validator:Q,variant:A}=t,z=uce(t,["className","padding","radius","disabled","classNames","styles","loading","multiple","maxSize","accept","children","onDropAny","onDrop","onReject","openRef","name","unstyled","maxFiles","autoFocus","activateOnClick","activateOnDrag","dragEventsBubbling","activateOnKeyboard","onDragEnter","onDragLeave","onDragOver","onFileDialogCancel","onFileDialogOpen","preventDropOnDocument","useFsAccessApi","getFilesFromEvent","validator","variant"]),{classes:q,cx:le}=ice({radius:o,padding:n},{name:"Dropzone",classNames:i,styles:l,unstyled:v,variant:A}),{getRootProps:ye,getInputProps:Re,isDragAccept:me,isDragReject:qe,open:ze}=ND(Ul({onDrop:g,onDropAccepted:y,onDropRejected:_,disabled:a||c,accept:Array.isArray(m)?m.reduce((wt,qt)=>Fh(Ul({},wt),{[qt]:[]}),{}):m,multiple:u,maxSize:d,maxFiles:b,autoFocus:x,noClick:!P,noDrag:!O,noDragEventsBubbling:!$,noKeyboard:!C,onDragEnter:R,onDragLeave:j,onDragOver:k,onFileDialogCancel:T,onFileDialogOpen:L,preventDropOnDocument:U,useFsAccessApi:V,validator:Q},M?{getFilesFromEvent:M}:null));X$(E,ze);const it=!me&&!qe;return s.createElement(Hse,{value:{accept:me,reject:qe,idle:it}},s.createElement(ue,Fh(Ul(Ul({},z),ye()),{"data-accept":me||void 0,"data-reject":qe||void 0,"data-idle":it||void 0,"data-loading":c||void 0,className:le(q.root,r)}),s.createElement(FR,{visible:c,radius:o,unstyled:v}),s.createElement("input",Fh(Ul({},Re()),{name:w})),s.createElement("div",{className:q.inner},h)))}vl.displayName="@mantine/dropzone/Dropzone";vl.Accept=Yse;vl.Reject=Xse;vl.Idle=Jse;const zD=vl;var fce=Object.defineProperty,pce=Object.defineProperties,mce=Object.getOwnPropertyDescriptors,UP=Object.getOwnPropertySymbols,hce=Object.prototype.hasOwnProperty,gce=Object.prototype.propertyIsEnumerable,WP=(e,t,r)=>t in e?fce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vce=(e,t)=>{for(var r in t||(t={}))hce.call(t,r)&&WP(e,r,t[r]);if(UP)for(var r of UP(t))gce.call(t,r)&&WP(e,r,t[r]);return e},yce=(e,t)=>pce(e,mce(t)),wce=W(e=>({wrapper:yce(vce({},e.fn.cover(0)),{position:"fixed",backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,display:"flex",padding:e.spacing.xs,transition:"opacity 100ms ease"}),dropzone:{flex:1}}));const _ce=wce;var bce=Object.defineProperty,xce=Object.defineProperties,Ece=Object.getOwnPropertyDescriptors,Cp=Object.getOwnPropertySymbols,LD=Object.prototype.hasOwnProperty,FD=Object.prototype.propertyIsEnumerable,HP=(e,t,r)=>t in e?bce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Vh=(e,t)=>{for(var r in t||(t={}))LD.call(t,r)&&HP(e,r,t[r]);if(Cp)for(var r of Cp(t))FD.call(t,r)&&HP(e,r,t[r]);return e},Bh=(e,t)=>xce(e,Ece(t)),Sce=(e,t)=>{var r={};for(var n in e)LD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Cp)for(var n of Cp(e))t.indexOf(n)<0&&FD.call(e,n)&&(r[n]=e[n]);return r};const Pce={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:go("max"),withinPortal:!0};function VD(e){const t=H("DropzoneFullScreen",Pce,e),{classNames:r,styles:n,sx:o,className:a,style:i,unstyled:l,active:c,onDrop:u,onReject:d,zIndex:m,withinPortal:h,portalProps:g}=t,y=Sce(t,["classNames","styles","sx","className","style","unstyled","active","onDrop","onReject","zIndex","withinPortal","portalProps"]),[_,E]=s.useState(0),[w,{open:v,close:b}]=JA(!1),{classes:x,cx:P}=_ce(null,{name:"DropzoneFullScreen",classNames:r,styles:n,unstyled:l}),O=C=>{C.dataTransfer.types.includes("Files")&&(E(R=>R+1),v())},$=()=>{E(C=>C-1)};return f.useEffect(()=>{_===0&&b()},[_]),f.useEffect(()=>{if(c)return document.addEventListener("dragenter",O,!1),document.addEventListener("dragleave",$,!1),()=>{document.removeEventListener("dragenter",O,!1),document.removeEventListener("dragleave",$,!1)}},[c]),s.createElement(um,Bh(Vh({},g),{withinPortal:h}),s.createElement(ue,{className:P(x.wrapper,a),sx:o,style:Bh(Vh({},i),{opacity:w?1:0,pointerEvents:w?"all":"none",zIndex:m})},s.createElement(vl,Bh(Vh({},y),{classNames:r,styles:n,unstyled:l,className:x.dropzone,onDrop:C=>{u==null||u(C),b()},onReject:C=>{d==null||d(C),b()}}))))}VD.displayName="@mantine/dropzone/DropzoneFullScreen";zD.FullScreen=VD;const pu=zD,$ce=`{
216
- "resourceType": "Bundle",
217
- "type": "transaction",
218
- "entry": [
219
- {
220
- "resource": {
221
- "resourceType": "Patient",
222
- "name": [{
223
- "given": ["Alice"],
224
- "family": "Smith"
225
- }]
226
- },
227
- "request": {
228
- "method": "POST",
229
- "url": "Patient"
230
- }
231
- }
232
- ]
233
- }`;function Oce(){const e=nr(),t=te(),[r,n]=f.useState(),o=f.useCallback(async l=>{try{n(void 0),n(await t.executeBatch(JSON.parse(l))),ie({color:"green",message:"Success"})}catch(c){ie({color:"red",message:$e(c)})}},[t]),a=f.useCallback(async l=>{const c=new FileReader;c.onload=u=>{var d;return o((d=u.target)==null?void 0:d.result)},c.readAsText(l[0])},[o]),i=f.useCallback(async l=>{await o(l.input)},[o]);return p.jsxs(_e,{children:[p.jsx(ce,{children:"Batch Create"}),p.jsxs("p",{children:["Use this page to create, read, or update multiple resources. For more details, see ",p.jsx("a",{href:"https://www.hl7.org/fhir/http.html#transaction",children:"FHIR Batch and Transaction"}),"."]}),!r&&p.jsxs(p.Fragment,{children:[p.jsx("h3",{children:"Input"}),p.jsxs(ht,{defaultValue:"upload",children:[p.jsxs(ht.List,{children:[p.jsx(ht.Tab,{value:"upload",children:"File Upload"}),p.jsx(ht.Tab,{value:"json",children:"JSON"})]}),p.jsx(ht.Panel,{value:"upload",pt:"xs",children:p.jsx(pu,{onDrop:a,accept:["application/json"],children:p.jsxs(J,{position:"center",spacing:"xl",style:{minHeight:220,pointerEvents:"none"},children:[p.jsx(pu.Accept,{children:p.jsx(OP,{size:50,stroke:1.5,color:e.colors[e.primaryColor][5]})}),p.jsx(pu.Reject,{children:p.jsx(SD,{size:50,stroke:1.5,color:e.colors.red[5]})}),p.jsx(pu.Idle,{children:p.jsx(OP,{size:50,stroke:1.5})}),p.jsxs("div",{children:[p.jsx(ae,{size:"xl",inline:!0,children:"Drag files here or click to select files"}),p.jsx(ae,{size:"sm",color:"dimmed",inline:!0,mt:7,children:"Attach as many files as you like"})]})]})})}),p.jsx(ht.Panel,{value:"json",pt:"xs",children:p.jsxs(Ie,{onSubmit:i,children:[p.jsx(ym,{"data-testid":"batch-input",name:"input",minRows:20,defaultValue:$ce,deserialize:JSON.parse}),p.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:p.jsx(Z,{type:"submit",children:"Submit"})})]})})]})]}),r&&p.jsxs(p.Fragment,{children:[p.jsx("h3",{children:"Output"}),p.jsx("pre",{style:{border:"1px solid #888"},children:JSON.stringify(r,void 0,2)}),p.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:p.jsx(Z,{onClick:()=>n(void 0),children:"Start over"})})]})]})}function Cce(){const{resourceType:e}=Je(),r=(Object.fromEntries(new URLSearchParams(location.search).entries()).ids||"").split(",").filter(i=>!!i),n=te(),[o,a]=f.useState();return f.useEffect(()=>{n.searchResources("Questionnaire",`subject-type=${e}`).then(a).catch(console.log)},[n,e]),o?o.length===0?p.jsxs(_e,{children:[p.jsxs(ce,{children:["No apps for ",e]}),p.jsx(Ce,{to:`/${e}`,children:"Return to search page"})]}):p.jsx(_e,{children:p.jsx("div",{children:o.map(i=>p.jsxs("div",{children:[p.jsx("h3",{children:p.jsx(Ce,{to:`/forms/${i.id}?subject=`+r.map(l=>`${e}/${l}`).join(","),children:i.name})}),p.jsx("p",{children:i.description})]},i.id))})}):p.jsx(oa,{})}function kce(){const e=te(),[t,r]=f.useState(),[n,o]=f.useState(!1);return p.jsx(_e,{width:450,children:p.jsxs(Ie,{style:{maxWidth:400},onSubmit:a=>{r(void 0),e.post("auth/changepassword",a).then(()=>o(!0)).catch(i=>r(yt(i)))},children:[p.jsxs(tr,{sx:{flexDirection:"column"},children:[p.jsx(xn,{size:32}),p.jsx(ce,{children:"Change password"})]}),!n&&p.jsxs(Oe,{spacing:"xl",mt:"xl",children:[p.jsx(oo,{name:"oldPassword",label:"Old password",required:!0,autoFocus:!0,error:tt(t,"oldPassword")}),p.jsx(oo,{name:"newPassword",label:"New password",required:!0,error:tt(t,"newPassword")}),p.jsx(oo,{name:"confirmPassword",label:"Confirm new password",required:!0,error:tt(t,"confirmPassword")}),p.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:p.jsx(Z,{type:"submit",children:"Change password"})})]}),n&&p.jsx("div",{"data-testid":"success",children:"Password changed successfully"})]})})}function jce(){const e=$t(),{resourceType:t}=Je(),r=te(),[n,o]=f.useState();return p.jsxs(p.Fragment,{children:[p.jsx(yn,{p:"xl",shadow:"xs",radius:0,children:p.jsxs(ae,{weight:500,children:["New ",t]})}),p.jsx(_e,{children:p.jsx(T5,{defaultValue:{resourceType:t},onSubmit:a=>{o(void 0),r.createResource(a).then(i=>e("/"+i.resourceType+"/"+i.id)).catch(i=>o(yt(i)))},outcome:n})})]})}function Rce(){return p.jsx(_e,{children:p.jsxs(Oe,{children:[p.jsx(ce,{order:1,children:"Unexpected Error"}),p.jsx(ae,{children:"We're sorry, something went wrong."}),p.jsxs(ae,{children:["Please contact ",p.jsx(dt,{href:"mailto:support@medplum.com",children:"support"})," for assistance."]})]})})}const Mm=W(e=>({root:{display:"flex",flexDirection:"row",alignItems:"center",padding:"8px 10px"},entry:{display:"inline-block",margin:"5px 20px 5px 5px"},key:{color:e.colors.gray[6],textTransform:"uppercase",fontSize:e.fontSizes.xs,whiteSpace:"nowrap"},value:{fontSize:e.fontSizes.md,fontWeight:600,marginLeft:0,whiteSpace:"nowrap"}}));function be(e){const{classes:t}=Mm();return p.jsx(pl,{children:p.jsx("div",{className:t.root,children:e.children})})}be.Entry=function(t){const{classes:r}=Mm();return p.jsx("div",{className:r.entry,children:t.children})};be.Key=function(t){const{classes:r}=Mm();return p.jsx("div",{className:r.key,children:t.children})};be.Value=function(t){const{classes:r}=Mm();return p.jsx("div",{className:r.value,children:t.children})};function BD(e){var r,n;const t=Xe(e.patient);return t?p.jsxs(be,{children:[p.jsx(aa,{value:t,size:"lg",color:Tce(t)}),p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Name"}),p.jsx(be.Value,{children:p.jsx(Ce,{to:t,children:t.name?p.jsx(v0,{value:t.name[0],options:{use:!1}}):"[blank]"})})]}),t.birthDate&&p.jsxs(p.Fragment,{children:[p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"DoB"}),p.jsx(be.Value,{children:t.birthDate})]}),p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Age"}),p.jsx(be.Value,{children:pee(t.birthDate)})]})]}),t.gender&&p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Gender"}),p.jsx(be.Value,{children:t.gender})]}),t.address&&p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"State"}),p.jsx(be.Value,{children:(r=t.address[0])==null?void 0:r.state})]}),(n=t.identifier)==null?void 0:n.map((o,a)=>{var i;return p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:o==null?void 0:o.system}),p.jsx(be.Value,{children:o==null?void 0:o.value})]},`${a}-${(i=t.identifier)==null?void 0:i.length}`)})]}):null}function Tce(e){if(e.gender==="male")return"blue";if(e.gender==="female")return"pink"}function UD(e){const t=Xe(e.resource);if(!t)return null;const r=[{key:"Type",value:p.jsx(Ce,{to:`/${t.resourceType}`,children:t.resourceType})}];function n(l,c){l&&c&&r.push({key:l,value:c})}function o(l){l&&n(l.system,l.value)}function a(l,c){Array.isArray(c)?c.forEach(u=>a(l,u)):typeof c=="string"?n(l,c):c&&(Array.isArray(c.coding)?n(l,c.coding.map(u=>u.display||u.code).join(", ")):n(l,c.text))}const i=fo(t);return i!==ot(t)&&n("Name",i),"category"in t&&a("Category",t.category),t.resourceType!=="Bot"&&"code"in t&&a("Code",t.code),"identifier"in t&&(Array.isArray(t.identifier)?t.identifier.forEach(o):o(t.identifier)),r.length===1&&r.push({key:"ID",value:t.id}),p.jsx(be,{children:r.map(l=>p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:l.key}),p.jsx(be.Value,{children:l.value})]},`${l.key}-${l.value}`))})}function B0(e){if(e.resourceType==="Patient")return e;if(e.resourceType==="DiagnosticReport"||e.resourceType==="Encounter"||e.resourceType==="Observation"||e.resourceType==="ServiceRequest")return e.subject}function Ice(e){var t;if(e.resourceType==="Specimen")return e;if(e.resourceType==="Observation")return e.specimen;if(e.resourceType==="DiagnosticReport"||e.resourceType==="ServiceRequest")return(t=e.specimen)==null?void 0:t[0]}function Xl(e,t){return new Promise((r,n)=>{var a;const o=new MessageChannel;o.port1.onmessage=({data:i})=>{o.port1.close(),i.error?n(i.error):r(i.result)},(a=e.contentWindow)==null||a.postMessage(t,"https://codeeditor.medplum.com",[o.port2])})}function fa(e){var t;return GI((t=e.getActiveLogin())==null?void 0:t.project)}function Dce(e,t){const r=new Blob([e],{type:"application/json"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n;const a=t||new Date().toISOString().replace(/\D/g,"");o.download=`${a}.json`,document.body.appendChild(o),o.click(),URL.revokeObjectURL(n)}function Nce(){const{id:e}=Je(),t=da(),n=Object.fromEntries(new URLSearchParams(t.search).entries()).subject,o=te(),[a,i]=f.useState(!0),[l,c]=f.useState(),[u,d]=f.useState(),[m,h]=f.useState(),[g,y]=f.useState(),[_,E]=f.useState();if(f.useEffect(()=>{const b={resourceType:"Bundle",type:"batch",entry:[{request:{method:"GET",url:`Questionnaire/${e}`}}]};if(n){const x=n.split(",").filter(P=>!!P);x.length===1&&b.entry.push({request:{method:"GET",url:x[0]}}),d(x)}o.executeBatch(b).then(x=>{var P,O,$,C,R,j,k;(($=(O=(P=x.entry)==null?void 0:P[0])==null?void 0:O.response)==null?void 0:$.status)!=="200"?y((R=(C=x.entry)==null?void 0:C[0])==null?void 0:R.response):(c((j=x.entry[0])==null?void 0:j.resource),h((k=x.entry[1])==null?void 0:k.resource)),i(!1)}).catch(x=>{y(x),i(!1)})},[o,e,n]),g)return p.jsx(_e,{children:p.jsx("pre",{"data-testid":"error",children:JSON.stringify(g,void 0,2)})});if(_)return p.jsxs(_e,{children:[p.jsx(ce,{children:l==null?void 0:l.title}),p.jsx("p",{children:"Your response has been recorded."}),p.jsxs("ul",{children:[_.length===1&&p.jsx("li",{children:p.jsx(Ce,{to:_[0],children:"Review your answers"})}),_.length>1&&p.jsxs("li",{children:["Review your answers:",p.jsx("ul",{children:_.map(b=>p.jsx("li",{children:p.jsx(Ce,{to:b,children:ot(b)})},b.id))})]}),m&&p.jsx("li",{children:p.jsxs(Ce,{to:m,children:["Back to ",fo(m)]})}),p.jsx("li",{children:p.jsx(Ce,{to:"/",children:"Go back home"})})]})]});if(a||!l)return p.jsx(oa,{});const w=m&&B0(m);return p.jsxs(p.Fragment,{children:[w&&p.jsx(BD,{patient:w}),m&&m.resourceType!=="Patient"&&p.jsx(UD,{resource:m}),p.jsx(yn,{p:"xl",shadow:"xs",radius:0,children:p.jsxs(ae,{children:[fo(l),u&&u.length>1&&p.jsxs(p.Fragment,{children:[" (for ",u.length," resources)"]})]})}),p.jsx(_e,{children:p.jsx(G5,{questionnaire:l,subject:m&&at(m),onSubmit:v})})]});async function v(b){const x=[];if(!u||u.length===0)x.push(await o.createResource(b));else for(const P of u)x.push(await o.createResource({...b,subject:{reference:P}}));E(x)}}const Ace=W(e=>({paper:{[`@media (max-width: ${e.breakpoints.sm})`]:{margin:2,padding:4}}}));function qP(){const{classes:e}=Ace(),t=te(),r=$t(),n=da(),[o,a]=f.useState();return f.useEffect(()=>{const i=kee(n.pathname+n.search),l=WD(i,t.getUserConfiguration());n.pathname===`/${l.resourceType}`&&n.search===Ti(l)?(Vce(l),a(l)):r(`/${l.resourceType}${Ti(l)}`)},[t,r,n]),!(o!=null&&o.resourceType)||!o.fields||o.fields.length===0?p.jsx(oa,{}):p.jsx(yn,{shadow:"xs",m:"md",p:"xs",className:e.paper,children:p.jsx(dc,{checkboxesEnabled:!0,search:o,userConfig:t.getUserConfiguration(),onClick:i=>r(`/${i.resource.resourceType}/${i.resource.id}`),onAuxClick:i=>window.open(`/${i.resource.resourceType}/${i.resource.id}`,"_blank"),onChange:i=>{r(`/${o.resourceType}${Ti(i.definition)}`)},onNew:Bce(o.resourceType)?()=>{r(`/${o.resourceType}/new`)}:void 0,onExportCsv:()=>{const i=t.fhirUrl(o.resourceType,"$csv")+Ti(o);t.download(i).then(l=>{window.open(window.URL.createObjectURL(l),"_blank")}).catch(l=>ie({color:"red",message:$e(l)}))},onExportTransactionBundle:async()=>{Uce(o,t).then(i=>Dce(JSON.stringify(i,void 0,2))).catch(i=>ie({color:"red",message:$e(i)}))},onDelete:i=>{window.confirm("Are you sure you want to delete these resources?")&&(t.invalidateSearches(o.resourceType),t.executeBatch({resourceType:"Bundle",type:"batch",entry:i.map(l=>({request:{method:"DELETE",url:`${o.resourceType}/${l}`}}))}).then(()=>a({...o})).catch(l=>ie({color:"red",message:$e(l)})))},onBulk:i=>{r(`/bulk/${o.resourceType}?ids=${i.join(",")}`)}})})}function WD(e,t){const r=e.resourceType||Mce(t),n=e.fields??zce(r),o=e.filters??(e.resourceType?void 0:Lce(r)),a=e.sortRules??Fce(r),i=e.offset??0,l=e.count??ac;return{...e,resourceType:r,fields:n,filters:o,sortRules:a,offset:i,count:l}}function Mce(e){var t,r;return localStorage.getItem("defaultResourceType")??((r=(t=e==null?void 0:e.option)==null?void 0:t.find(n=>n.id==="defaultResourceType"))==null?void 0:r.valueString)??"Patient"}function zce(e){const t=U0(e);if(t!=null&&t.fields)return t.fields;const r=["id","_lastUpdated"];switch(e){case"Patient":r.push("name","birthDate","gender");break;case"AccessPolicy":case"Bot":case"ClientApplication":case"Practitioner":case"Project":case"Organization":case"Questionnaire":case"UserConfiguration":r.push("name");break;case"CodeSystem":case"ValueSet":r.push("name","title","status");break;case"Condition":r.push("subject","code","clinicalStatus");break;case"Device":r.push("manufacturer","deviceName","patient");break;case"DeviceDefinition":r.push("manufacturer[x]","deviceName");break;case"DeviceRequest":r.push("code[x]","subject");break;case"DiagnosticReport":case"Observation":r.push("subject","code","status");break;case"Encounter":r.push("subject");break;case"ServiceRequest":r.push("subject","code","status","orderDetail");break;case"Subscription":r.push("criteria");break;case"User":r.push("email");break}return r}function Lce(e){var t;return(t=U0(e))==null?void 0:t.filters}function Fce(e){const t=U0(e);return t!=null&&t.sortRules?t.sortRules:[{code:"_lastUpdated",descending:!0}]}function U0(e){const t=localStorage.getItem(e+"-defaultSearch");return t?JSON.parse(t):void 0}function Vce(e){localStorage.setItem("defaultResourceType",e.resourceType),localStorage.setItem(e.resourceType+"-defaultSearch",JSON.stringify(e))}function Bce(e){return e!=="Bot"&&e!=="ClientApplication"}async function Uce(e,t){const r={resourceType:e.resourceType,count:1e3,offset:0,filters:e.filters},n=WD(r,t.getUserConfiguration()),o=await t.search(n.resourceType,Ti({...n,total:"accurate",fields:void 0}));return Cte(o)}function Wce(){const e=te(),[t,r]=f.useState(void 0),[n,o]=f.useState(void 0);f.useEffect(()=>{e.get("auth/mfa/status").then(l=>{const c=new URL("https://chart.googleapis.com/chart");c.searchParams.set("chs","300x300"),c.searchParams.set("cht","qr"),c.searchParams.set("chl",l.enrollUri),c.searchParams.set("choe","UTF-8"),r(c.toString()),o(l.enrolled)}).catch(l=>ie({color:"red",message:$e(l)}))},[e]);const a=f.useCallback(l=>{e.post("auth/mfa/enroll",l).then(()=>{o(!0),ie({color:"green",message:"Success"})}).catch(c=>ie({color:"red",message:$e(c)}))},[e]),i=f.useCallback(()=>{e.post("auth/mfa/disable",{}).catch(console.log)},[e]);return n===void 0?null:n?p.jsx(_e,{children:p.jsxs(J,{children:[p.jsx(ce,{children:"MFA is enabled"}),p.jsx(Z,{onClick:i,children:"Disable MFA"})]})}):p.jsx(_e,{width:400,children:p.jsxs(Ie,{onSubmit:a,children:[p.jsx(ce,{children:"Multi Factor Auth Setup"}),p.jsx(tr,{children:p.jsx("img",{src:t})}),p.jsx(ne,{name:"token",label:"Code"}),p.jsx(J,{position:"right",mt:"xl",children:p.jsx(Z,{type:"submit",children:"Enroll"})})]})})}const Hce={baseUrl:"__MEDPLUM_BASE_URL__",clientId:"__MEDPLUM_CLIENT_ID__",googleClientId:"__GOOGLE_CLIENT_ID__",recaptchaSiteKey:"__RECAPTCHA_SITE_KEY__",registerEnabled:"__MEDPLUM_REGISTER_ENABLED__"};function hc(){return Hce}function qce(){const e=$t(),[t]=L0(),r=t.get("client_id");if(!r)return null;const n=t.get("scope")||"openid";function o(a){const i=new URL(t.get("redirect_uri"));for(const l of["scope","state","nonce"])t.has(l)&&i.searchParams.set(l,t.get(l));i.searchParams.set("code",a),window.location.assign(i.toString())}return p.jsxs(aD,{onCode:o,onForgotPassword:()=>e("/resetpassword"),onRegister:()=>e("/register"),googleClientId:hc().googleClientId,clientId:r||void 0,scope:n,nonce:t.get("nonce")||void 0,launch:t.get("launch")||void 0,codeChallenge:t.get("code_challenge")||void 0,codeChallengeMethod:t.get("code_challenge_method")||void 0,chooseScopes:n!=="openid",children:[p.jsx(xn,{size:32}),p.jsx(ce,{children:"Sign in to Medplum"})]})}function Qce(){const e=te(),t=$t(),r=hc();return f.useEffect(()=>{e.getProfile()&&t("/signin?project=new")},[e,t]),p.jsxs(cie,{type:"project",onSuccess:()=>t("/"),googleClientId:r.googleClientId,recaptchaSiteKey:r.recaptchaSiteKey,children:[p.jsx(xn,{size:32}),p.jsx(ce,{children:"Create a new account"})]})}function Gce(){const e=$t(),t=te(),[r,n]=f.useState(),[o,a]=f.useState(!1),i=hc().recaptchaSiteKey;return f.useEffect(()=>{nD(i)},[i]),p.jsx(_e,{width:450,children:p.jsxs(Ie,{style:{maxWidth:400},onSubmit:async l=>{let c="";c=await oD(i),t.post("auth/resetpassword",{...l,recaptchaToken:c}).then(()=>a(!0)).catch(u=>n(yt(u)))},children:[p.jsxs(Oe,{spacing:"lg",mb:"xl",align:"center",children:[p.jsx(xn,{size:32}),p.jsx(ce,{children:"Medplum Password Reset"})]}),p.jsxs(Oe,{spacing:"xl",children:[p.jsx(Za,{issues:S0(r,void 0)}),!o&&p.jsxs(p.Fragment,{children:[p.jsx(ne,{name:"email",type:"email",label:"Email",required:!0,autoFocus:!0,error:tt(r,"email")}),p.jsxs(J,{position:"apart",mt:"xl",noWrap:!0,children:[p.jsx(dt,{component:"button",type:"button",color:"dimmed",onClick:()=>e("/register"),size:"xs",children:"Register"}),p.jsx(Z,{type:"submit",children:"Reset password"})]})]}),o&&p.jsx("div",{children:"If the account exists on our system, a password reset email will be sent."})]})]})})}function Kce(){var a;const e=$t(),t=te(),[r,n]=f.useState();f.useEffect(()=>{t.get("auth/me").then(n).catch(i=>ie({color:"red",message:$e(i)}))},[t]);function o(i){t.post("auth/revoke",{loginId:i}).then(()=>t.get("auth/me",{cache:"no-cache"})).then(n).then(()=>ie({color:"green",message:"Login revoked"})).catch(l=>ie({color:"red",message:$e(l)}))}return r?p.jsxs(p.Fragment,{children:[p.jsxs(_e,{children:[p.jsx(ce,{children:"Security"}),p.jsxs(x0,{children:[p.jsx(Wi,{term:"ID",children:p.jsx(dt,{href:`/${ot(r.profile)}`,children:r.profile.id})}),p.jsx(Wi,{term:"Resource Type",children:r.profile.resourceType}),p.jsx(Wi,{term:"Name",children:nc((a=r.profile.name)==null?void 0:a[0])})]})]}),p.jsxs(_e,{children:[p.jsx(ce,{children:"Sessions"}),p.jsxs(Xa,{children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"OS"}),p.jsx("th",{children:"Browser"}),p.jsx("th",{children:"IP Address"}),p.jsx("th",{children:"Auth Method"}),p.jsx("th",{children:"Last Updated"}),p.jsx("th",{})]})}),p.jsx("tbody",{children:r.security.sessions.map(i=>p.jsxs("tr",{children:[p.jsx("td",{children:i.os}),p.jsx("td",{children:i.browser}),p.jsx("td",{children:i.remoteAddress}),p.jsx("td",{children:i.authMethod}),p.jsx("td",{children:_r(i.lastUpdated)}),p.jsx("td",{children:p.jsx(dt,{href:"#",onClick:()=>o(i.id),children:"Revoke"})})]},i.id))})]})]}),p.jsxs(_e,{children:[p.jsx(ce,{children:"Password"}),p.jsx(Z,{onClick:()=>e("/changepassword"),children:"Change password"})]}),p.jsxs(_e,{children:[p.jsx(ce,{children:"Multi Factor Auth"}),p.jsxs("p",{children:["Enrolled: ",r.security.mfaEnrolled.toString()]}),!r.security.mfaEnrolled&&p.jsx(Z,{onClick:()=>e("/mfa"),children:"Enroll"})]})]}):null}function Yce(){const{id:e,secret:t}=Je(),r=te(),[n,o]=f.useState(),[a,i]=f.useState(!1);return p.jsx(_e,{width:450,children:p.jsxs(Ie,{style:{maxWidth:400},onSubmit:l=>{if(l.password!==l.confirmPassword){o(Ia("Passwords do not match","confirmPassword"));return}o(void 0);const c={id:e,secret:t,password:l.password};r.post("auth/setpassword",c).then(()=>i(!0)).catch(u=>o(yt(u)))},children:[p.jsxs(tr,{sx:{flexDirection:"column"},children:[p.jsx(xn,{size:32}),p.jsx(ce,{children:"Set password"})]}),!a&&p.jsxs(Oe,{children:[p.jsx(oo,{name:"password",label:"New password",required:!0,error:tt(n,"password")}),p.jsx(oo,{name:"confirmPassword",label:"Confirm new password",required:!0,error:tt(n,"confirmPassword")}),p.jsx(J,{position:"right",mt:"xl",children:p.jsx(Z,{type:"submit",children:"Set password"})})]}),a&&p.jsxs("div",{"data-testid":"success",children:["Password set. You can now ",p.jsx(Ce,{to:"/signin",children:"sign in"}),"."]})]})})}function Xce(){const e=$t(),[t]=L0(),r=hc();return p.jsxs(aD,{onSuccess:()=>e(t.get("next")||"/"),onForgotPassword:()=>e("/resetpassword"),onRegister:()=>e("/register"),googleClientId:r.googleClientId,login:t.get("login")||void 0,projectId:t.get("project")||void 0,children:[p.jsx(xn,{size:32}),p.jsx(ce,{children:"Sign in to Medplum"}),t.get("project")==="new"&&p.jsx("div",{children:"Sign in again to create a new project"})]})}function Jce(){const e=$t(),t=da(),[r,n]=f.useState(),[o,a]=f.useState(),[i,l]=f.useState();return f.useEffect(()=>{const c=Object.fromEntries(new URLSearchParams(t.search).entries());n(c.resourceType),a(c.query),l(JSON.parse(c.fields))},[t]),!r||!o||!i?null:p.jsx(uae,{resourceType:r,checkboxesEnabled:!0,query:o,fields:i,onClick:c=>e(`/${r}/${c.resource.id}`),onAuxClick:c=>window.open(`/${r}/${c.resource.id}`,"_blank"),onBulk:c=>{e(`/bulk/${r}?ids=${c.join(",")}`)}})}function zm(e){const t=te(),r=fa(t),n=$t(),[o,a]=f.useState({resourceType:"ProjectMembership",filters:[{code:"project",operator:ee.EQUALS,value:"Project/"+r},{code:"profile-type",operator:ee.EQUALS,value:e.resourceType}],fields:e.fields,count:100});return p.jsx(dc,{search:o,onClick:i=>n(`/admin/members/${i.resource.id}`),onChange:i=>a(i.definition),hideFilters:!0,hideToolbar:!0})}function Zce(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Bots"}),p.jsx(zm,{resourceType:"Bot",fields:["user","profile","admin","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(Ce,{to:"/admin/bots/new",children:"Create new bot"})})]})}function eue(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Clients"}),p.jsx(zm,{resourceType:"ClientApplication",fields:["user","profile","admin","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(Ce,{to:"/admin/clients/new",children:"Create new client"})})]})}function Lm(e){return p.jsx(gl,{resourceType:"AccessPolicy",name:"accessPolicy",defaultValue:e.defaultValue,placeholder:"Access Policy",onChange:t=>{bo(t)?e.onChange(at(t)):e.onChange(void 0)}})}function tue(){const e=te(),t=fa(e),[r,n]=f.useState(""),[o,a]=f.useState(""),[i,l]=f.useState(),[c,u]=f.useState(),[d,m]=f.useState(void 0);return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Create new Bot"}),p.jsxs(Ie,{onSubmit:()=>{const h={name:r,description:o,accessPolicy:i};e.post("admin/projects/"+t+"/bot",h).then(g=>{e.invalidateSearches("Bot"),e.invalidateSearches("ProjectMembership"),m(g),ie({color:"green",message:"Bot created"})}).catch(g=>{ie({color:"red",message:$e(g)}),u(yt(g))})},children:[!d&&p.jsxs(Oe,{children:[p.jsx(Ke,{title:"Name",htmlFor:"name",outcome:c,children:p.jsx(ne,{id:"name",name:"name",required:!0,autoFocus:!0,onChange:h=>n(h.currentTarget.value),error:tt(c,"name")})}),p.jsx(Ke,{title:"Description",htmlFor:"description",outcome:c,children:p.jsx(ne,{id:"description",name:"description",onChange:h=>a(h.currentTarget.value),error:tt(c,"description")})}),p.jsx(Ke,{title:"Access Policy",htmlFor:"accessPolicy",outcome:c,children:p.jsx(Lm,{name:"accessPolicy",onChange:l})}),p.jsx(J,{position:"right",children:p.jsx(Z,{type:"submit",children:"Create Bot"})})]}),d&&p.jsxs("div",{"data-testid":"success",children:[p.jsx(ae,{children:"Bot created"}),p.jsxs(mr,{children:[p.jsx(mr.Item,{children:p.jsx(Ce,{to:d,children:"Go to new bot"})}),p.jsx(mr.Item,{children:p.jsx(Ce,{to:"/admin/bots",children:"Back to bots list"})})]})]})]})]})}function rue(){const e=te(),t=fa(e),[r,n]=f.useState(""),[o,a]=f.useState(""),[i,l]=f.useState(""),[c,u]=f.useState(),[d,m]=f.useState(),[h,g]=f.useState(void 0);return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Create new Client"}),p.jsxs(Ie,{onSubmit:()=>{const y={name:r,description:o,redirectUri:i,accessPolicy:c};e.post("admin/projects/"+t+"/client",y).then(_=>{e.invalidateSearches("ClientApplication"),e.invalidateSearches("ProjectMembership"),g(_),ie({color:"green",message:"Client created"})}).catch(_=>{ie({color:"red",message:$e(_)}),m(yt(_))})},children:[!h&&p.jsxs(Oe,{children:[p.jsx(Ke,{title:"Name",htmlFor:"name",outcome:d,children:p.jsx(ne,{id:"name",name:"name",required:!0,autoFocus:!0,onChange:y=>n(y.currentTarget.value),error:tt(d,"name")})}),p.jsx(Ke,{title:"Description",htmlFor:"description",outcome:d,children:p.jsx(ne,{id:"description",name:"description",onChange:y=>a(y.currentTarget.value),error:tt(d,"description")})}),p.jsx(Ke,{title:"Redirect URI",htmlFor:"redirectUri",outcome:d,children:p.jsx(ne,{id:"redirectUri",name:"redirectUri",onChange:y=>l(y.currentTarget.value),error:tt(d,"redirectUri")})}),p.jsx(Ke,{title:"Access Policy",htmlFor:"accessPolicy",outcome:d,children:p.jsx(Lm,{name:"accessPolicy",onChange:u})}),p.jsx(J,{position:"right",children:p.jsx(Z,{type:"submit",children:"Create Client"})})]}),h&&p.jsxs("div",{"data-testid":"success",children:[p.jsx(ae,{children:"Client created"}),p.jsxs(mr,{children:[p.jsx(mr.Item,{children:p.jsx(Ce,{to:h,children:"Go to new client"})}),p.jsx(mr.Item,{children:p.jsx(Ce,{to:"/admin/clients",children:"Back to clients list"})})]})]})]})]})}function nue(e){return p.jsx(gl,{resourceType:"UserConfiguration",name:"userConfiguration",defaultValue:e.defaultValue,placeholder:"User Configuration",onChange:t=>{bo(t)?e.onChange(at(t)):e.onChange(void 0)}})}function oue(){const{membershipId:e}=Je(),t=te(),r=fa(t),n=$t(),o=t.get(`admin/projects/${r}/members/${e}`).read(),[a,i]=f.useState(o.accessPolicy),[l,c]=f.useState(o.userConfiguration),[u,d]=f.useState(o.admin),[m,h]=f.useState(),[g,y]=f.useState(!1);function _(){window.confirm("Are you sure?")&&t.delete(`admin/projects/${r}/members/${e}`).then(()=>t.get(`admin/projects/${r}`,{cache:"no-cache"})).then(()=>n("/admin/project")).catch(E=>h(yt(E)))}return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Edit membership"}),p.jsx("h3",{children:p.jsx(Hi,{value:o.profile,link:!0})}),p.jsxs(Ie,{onSubmit:()=>{const E={...o,accessPolicy:a,userConfiguration:l,admin:u};t.post(`admin/projects/${r}/members/${e}`,E).then(()=>y(!0)).catch(w=>h(yt(w)))},children:[!g&&p.jsxs(Oe,{children:[p.jsx(Ke,{title:"Access Policy",htmlFor:"accessPolicy",outcome:m,children:p.jsx(Lm,{name:"accessPolicy",defaultValue:a,onChange:i})}),p.jsx(Ke,{title:"User Configuration",htmlFor:"userConfiguration",outcome:m,children:p.jsx(nue,{name:"userConfiguration",defaultValue:l,onChange:c})}),p.jsx(Ke,{title:"Admin",htmlFor:"admin",outcome:m,children:p.jsx(nn,{id:"admin",name:"admin",defaultChecked:u,onChange:E=>d(E.currentTarget.checked)})}),p.jsxs(J,{position:"right",mt:"xl",children:[p.jsx(Z,{type:"submit",children:"Save"}),p.jsx(Z,{type:"button",color:"red",variant:"outline",onClick:_,children:"Remove user"})]})]}),g&&p.jsxs("div",{"data-testid":"success",children:[p.jsx("p",{children:"User updated"}),p.jsx("pre",{children:JSON.stringify(m,void 0,2)}),p.jsxs("p",{children:["Click ",p.jsx(Ce,{to:"/admin/project",children:"here"})," to return to the project admin page."]})]})]})]})}function aue(){const e=te(),[t,r]=f.useState(e.getProject()),[n,o]=f.useState(),[a,i]=f.useState(),[l,c]=f.useState(!1),[u,d]=f.useState(void 0),m=f.useCallback(h=>{const g={resourceType:h.resourceType,firstName:h.firstName,lastName:h.lastName,email:h.email,sendEmail:h.sendEmail==="on",accessPolicy:n,admin:h.isAdmin==="on"};e.invite(t==null?void 0:t.id,g).then(y=>{e.invalidateSearches("Patient"),e.invalidateSearches("Practitioner"),e.invalidateSearches("ProjectMembership"),xm(y)?i(y):d(y),c(g.sendEmail??!1),ie({color:"green",message:"Invite success"})}).catch(y=>{ie({color:"red",message:$e(y)}),i(yt(y))})},[e,t,n]);return p.jsxs(Ie,{onSubmit:m,children:[!u&&!a&&p.jsxs(Oe,{children:[p.jsx(ce,{children:"Invite new member"}),e.isSuperAdmin()&&p.jsx(Ke,{title:"Project",htmlFor:"project",outcome:a,children:p.jsx(gl,{resourceType:"Project",name:"project",defaultValue:t,onChange:r})}),p.jsx(vt,{name:"resourceType",label:"Role",defaultValue:"Practitioner",data:["Practitioner","Patient","RelatedPerson"],error:tt(a,"resourceType")}),p.jsx(ne,{name:"firstName",label:"First Name",required:!0,autoFocus:!0,error:tt(a,"firstName")}),p.jsx(ne,{name:"lastName",label:"Last Name",required:!0,error:tt(a,"lastName")}),p.jsx(ne,{name:"email",type:"email",label:"Email",required:!0,error:tt(a,"email")}),p.jsx(Ke,{title:"Access Policy",htmlFor:"accessPolicy",outcome:a,children:p.jsx(Lm,{name:"accessPolicy",onChange:o})}),p.jsx(nn,{name:"sendEmail",label:"Send email",defaultChecked:!0}),p.jsx(nn,{name:"isAdmin",label:"Admin"}),p.jsx(J,{position:"right",children:p.jsx(Z,{type:"submit",children:"Invite"})})]}),a&&p.jsxs("div",{"data-testid":"success",children:[p.jsx("p",{children:"User created, email couldn't be sent"}),p.jsx("p",{children:"Could not send email. Make sure you have AWS SES set up."}),p.jsxs("p",{children:["Click ",p.jsx(Ce,{to:"/admin/project",children:"here"})," to return to the project admin page."]})]}),u&&p.jsxs("div",{"data-testid":"success",children:[p.jsx(ae,{children:"User created"}),l&&p.jsx(ae,{children:"Email sent"}),p.jsxs(mr,{children:[p.jsx(mr.Item,{children:p.jsx(Ce,{to:u,children:"Go to new membership"})}),p.jsx(mr.Item,{children:p.jsx(Ce,{to:u.profile,children:"Go to new profile"})}),p.jsx(mr.Item,{children:p.jsx(Ce,{to:"/admin/users",children:"Back to users list"})})]})]})]})}function iue(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Patients"}),p.jsx(zm,{resourceType:"Patient",fields:["user","profile","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(Ce,{to:"/admin/invite",children:"Invite new patient"})})]})}function QP(){const e=te(),t=fa(e),r=e.get(`admin/projects/${t}`).read();return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Details"}),p.jsxs(x0,{children:[p.jsx(Wi,{term:"ID",children:r.project.id}),p.jsx(Wi,{term:"Name",children:r.project.name})]})]})}const GP=["Details","Users","Patients","Clients","Bots","Secrets","Sites"];function lue(){const e=$t(),r=da().pathname.replace("/admin/","")||GP[0],n=te(),o=fa(n),a=f.useMemo(()=>n.get("admin/projects/"+o).read(),[n,o]);function i(l){e(`/admin/${l}`)}return p.jsxs(p.Fragment,{children:[p.jsxs(yn,{children:[p.jsx(be,{children:p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Project"}),p.jsx(be.Value,{children:a.project.name})]})}),p.jsx(pl,{children:p.jsx(ht,{value:r.toLowerCase(),onTabChange:i,children:p.jsx(ht.List,{style:{whiteSpace:"nowrap",flexWrap:"nowrap"},children:GP.map(l=>p.jsx(ht.Tab,{value:l.toLowerCase(),children:l},l))})})})]}),p.jsx(_e,{children:p.jsx(bD,{})})]})}function sue(){const e=te(),t=fa(e),r=e.get(`admin/projects/${t}`).read(),[n,o]=f.useState(),[a,i]=f.useState();return f.useEffect(()=>{e.requestSchema("Project").then(o).catch(console.log)},[e]),f.useEffect(()=>{r&&i(oc(r.project.secret||[]))},[e,r]),!n||!a?p.jsx("div",{children:"Loading..."}):p.jsxs("form",{noValidate:!0,autoComplete:"off",onSubmit:l=>{l.preventDefault(),e.post(`admin/projects/${t}/secrets`,a).then(()=>e.get(`admin/projects/${t}`,{cache:"reload"})).then(()=>ie({color:"green",message:"Saved"})).catch(console.log)},children:[p.jsx(ce,{children:"Project Secrets"}),p.jsx("p",{children:"Use project secrets to store sensitive information such as API keys or other access credentials."}),p.jsx(Ha,{property:n.types.Project.properties.secret,name:"secret",defaultValue:a,onChange:i}),p.jsx(Z,{type:"submit",children:"Save"})]})}function cue(){const e=te(),t=fa(e),r=e.get(`admin/projects/${t}`).read(),[n,o]=f.useState(),[a,i]=f.useState();return f.useEffect(()=>{e.requestSchema("Project").then(o).catch(console.log)},[e]),f.useEffect(()=>{r&&i(oc(r.project.site||[]))},[e,r]),!n||!a?p.jsx("div",{children:"Loading..."}):p.jsxs("form",{noValidate:!0,autoComplete:"off",onSubmit:l=>{l.preventDefault(),e.post(`admin/projects/${t}/sites`,a).then(()=>e.get(`admin/projects/${t}`,{cache:"reload"})).then(()=>ie({color:"green",message:"Saved"})).catch(c=>{var d,m,h,g;const u=yt(c);ie({color:"red",message:`Error ${(m=(d=u.issue)==null?void 0:d[0].details)==null?void 0:m.text} ${(g=(h=u.issue)==null?void 0:h[0].expression)==null?void 0:g[0]}`})})},children:[p.jsx(ce,{children:"Project Sites"}),p.jsx("p",{children:"Use project sites configure your project on a separate domain."}),p.jsx(Ha,{property:n.types.Project.properties.site,name:"site",defaultValue:a,onChange:i}),p.jsx(Z,{type:"submit",children:"Save"})]})}function uue(){const e=te();if(!e.isLoading()&&!e.isSuperAdmin())return p.jsx(Za,{outcome:YZ});function t(){Wl(e,"Rebuilding Structure Definitions","admin/super/structuredefinitions")}function r(){Wl(e,"Rebuilding Search Parameters","admin/super/searchparameters")}function n(){Wl(e,"Rebuilding Value Sets","admin/super/valuesets")}function o(u){Wl(e,"Reindexing Resources","admin/super/valuesets",u)}function a(u){Wl(e,"Rebuilding Compartments","admin/super/valuesets",u)}function i(u){e.post("admin/super/removebotidjobsfromqueue",u).then(()=>ie({color:"green",message:"Done"})).catch(d=>ie({color:"red",message:$e(d)}))}function l(u){e.post("admin/super/purge",{...u,before:D5(u.before)}).then(()=>ie({color:"green",message:"Done"})).catch(d=>ie({color:"red",message:$e(d)}))}function c(u){e.post("admin/super/setpassword",u).then(()=>ie({color:"green",message:"Done"})).catch(d=>ie({color:"red",message:$e(d)}))}return p.jsxs(_e,{width:600,children:[p.jsx(ce,{order:1,children:"Super Admin"}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Structure Definitions"}),p.jsx("p",{children:"StructureDefinition resources contain the metadata about resource types. They are provided with the FHIR specification. Medplum also includes some custom StructureDefinition resources for internal data types. Press this button to update the database StructureDefinitions from the FHIR specification."}),p.jsx(Ie,{children:p.jsx(Z,{onClick:t,children:"Rebuild StructureDefinitions"})}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Search Parameters"}),p.jsx("p",{children:"SearchParameter resources contain the metadata about filters and sorting. They are provided with the FHIR specification. Medplum also includes some custom SearchParameter resources for internal data types. Press this button to update the database SearchParameters from the FHIR specification."}),p.jsx(Ie,{children:p.jsx(Z,{onClick:r,children:"Rebuild SearchParameters"})}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Value Sets"}),p.jsx("p",{children:"ValueSet resources enum values for a wide variety of use cases. Press this button to update the database ValueSets from the FHIR specification."}),p.jsx(Ie,{children:p.jsx(Z,{onClick:n,children:"Rebuild ValueSets"})}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Reindex Resources"}),p.jsx("p",{children:"When Medplum changes how resources are indexed, the system may require a reindex for old resources to be indexed properly."}),p.jsx(Ie,{onSubmit:o,children:p.jsxs(Oe,{children:[p.jsx(Ke,{title:"Resource Type",children:p.jsx(ne,{name:"resourceType",placeholder:"Reindex Resource Type"})}),p.jsx(Z,{type:"submit",children:"Reindex"})]})}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Rebuild Compartments"}),p.jsx("p",{children:"When Medplum changes how resource compartments are derived, the system may require a rebuild for old resources to take effect."}),p.jsx(Ie,{onSubmit:a,children:p.jsxs(Oe,{children:[p.jsx(Ke,{title:"Resource Type",children:p.jsx(ne,{name:"resourceType",placeholder:"Compartments Resource Type"})}),p.jsx(Z,{type:"submit",children:"Rebuild Compartments"})]})}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Purge Resources"}),p.jsx("p",{children:"As system generated resources accumulate, the system may require a purge to remove old resources."}),p.jsx(Ie,{onSubmit:l,children:p.jsxs(Oe,{children:[p.jsx(Ke,{title:"Purge Resource Type",htmlFor:"purgeResourceType",children:p.jsx(vt,{id:"purgeResourceType",name:"resourceType",data:["","AuditEvent","Login"]})}),p.jsx(Ke,{title:"Purge Before",htmlFor:"before",children:p.jsx(Ua,{name:"before",placeholder:"Before Date"})}),p.jsx(Z,{type:"submit",children:"Purge"})]})}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Remove Bot ID Jobs from Queue"}),p.jsx("p",{children:"Remove all queued jobs for a Bot ID"}),p.jsx(Ie,{onSubmit:i,children:p.jsxs(Oe,{children:[p.jsx(Ke,{title:"Bot ID",children:p.jsx(ne,{name:"botId",placeholder:"Bot Id"})}),p.jsx(Z,{type:"submit",children:"Remove Jobs by Bot ID"})]})}),p.jsx(dr,{my:"lg"}),p.jsx(ce,{order:2,children:"Force Set Password"}),p.jsx("p",{children:'Note that this applies to all projects for the user. Therefore, this should only be used in extreme circumstances. Always prefer to use the "Forgot Password" flow first.'}),p.jsx(Ie,{onSubmit:c,children:p.jsxs(Oe,{children:[p.jsx(ne,{name:"email",label:"Email",required:!0}),p.jsx(oo,{name:"password",label:"Password",required:!0}),p.jsx(ne,{name:"projectId",label:"Project ID"}),p.jsx(Z,{type:"submit",children:"Force Set Password"})]})})]})}function Wl(e,t,r,n){Yo.show({id:r,loading:!0,title:t,message:"Running...",autoClose:!1,withCloseButton:!1});const o={method:"POST"};n&&(o.body=JSON.stringify(n)),e.startAsyncRequest(r,o).then(()=>{Yo.update({id:r,color:"green",title:t,message:"Done",icon:p.jsx(zle,{size:"1rem"}),autoClose:2e3})}).catch(a=>{Yo.update({id:r,color:"red",title:t,message:$e(a),icon:p.jsx(SD,{size:"1rem"}),autoClose:2e3})})}function due(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Users"}),p.jsx(zm,{resourceType:"Practitioner",fields:["user","profile","admin","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(Ce,{to:"/admin/invite",children:"Invite new user"})})]})}function fue(){const t=te().searchResources("ObservationDefinition","_count=100").read();return p.jsxs(Xa,{withBorder:!0,withColumnBorders:!0,children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Category"}),p.jsx("th",{children:"Code"}),p.jsx("th",{children:"Method"}),p.jsx("th",{children:"Unit"}),p.jsx("th",{children:"Precision"}),p.jsx("th",{children:"Ranges"})]})}),p.jsx("tbody",{children:t.map(r=>{var n,o,a,i;return p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx(zn,{value:(n=r.category)==null?void 0:n[0]})}),p.jsx("td",{children:p.jsx(zn,{value:r.code})}),p.jsx("td",{children:p.jsx(zn,{value:r.method})}),p.jsx("td",{children:(a=(o=r.quantitativeDetails)==null?void 0:o.unit)==null?void 0:a.text}),p.jsx("td",{children:(i=r.quantitativeDetails)==null?void 0:i.decimalPrecision}),p.jsx("td",{children:p.jsx(Sv,{ranges:r.qualifiedInterval})})]},r.id)})})]})}function Sv(e){const{ranges:t}=e;if(!t)return null;const r=KP(t.map(o=>o.gender));if(r.length>1)return r.sort((o,a)=>o.localeCompare(a)),p.jsx(p.Fragment,{children:r.map(o=>{var a;return p.jsxs(f.Fragment,{children:[p.jsx("div",{children:p.jsx("strong",{children:xr(o)})}),p.jsx(Sv,{ranges:(a=e.ranges)==null?void 0:a.filter(i=>i.gender===o)})]},o)})});const n=KP(t.map(o=>o.age&&Ds(o.age)));return n.length>1?(n.sort((o,a)=>o.localeCompare(a)),p.jsx(p.Fragment,{children:n.map(o=>{var a;return p.jsxs(f.Fragment,{children:[p.jsx("div",{children:p.jsx("strong",{children:xr(o)})}),p.jsx(Sv,{ranges:(a=e.ranges)==null?void 0:a.filter(i=>Ds(i.age)===o)})]},o)})})):p.jsx(p.Fragment,{children:t.map((o,a)=>p.jsx("table",{children:p.jsx("tbody",{children:p.jsxs("tr",{children:[p.jsx("td",{children:o.condition}),p.jsx("td",{children:p.jsx(E0,{value:o.range})})]})})},`range-${a}`))})}function KP(e){return[...new Set(e.filter(t=>!!t))]}function pue(){const e=te(),t=e.searchResources("ActivityDefinition","_count=100").read(),r=e.searchResources("ObservationDefinition","_count=100").read();return p.jsxs(Xa,{withBorder:!0,withColumnBorders:!0,children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Category"}),p.jsx("th",{children:"Assay"}),t.map(n=>p.jsx("th",{children:n.name},n.id))]})}),p.jsx("tbody",{children:r.map(n=>{var o;return p.jsxs("tr",{children:[p.jsx("td",{children:p.jsx(zn,{value:(o=n.category)==null?void 0:o[0]})}),p.jsx("td",{children:p.jsx(zn,{value:n.code})}),t.map(a=>{var i;return p.jsx("td",{children:(i=a.observationResultRequirement)!=null&&i.find(l=>{var c;return(c=l.reference)==null?void 0:c.includes(n.id)})?"✅":""},a.id)})]},n.id)})})]})}function mue(e){var i;const t=te(),[r,n]=f.useState(),[o,a]=f.useState();return o?p.jsxs(p.Fragment,{children:[p.jsx("p",{children:"Request group created successfully."}),p.jsxs("ul",{children:[p.jsxs("li",{children:["Go to the"," ",p.jsx(Ce,{to:o,suffix:"checklist",children:"Request Group"})]}),p.jsxs("li",{children:["Back to the ",p.jsx(Ce,{to:e.planDefinition,children:"Plan Definition"})]})]})]}):p.jsx(Ie,{onSubmit:()=>{t.post(t.fhirUrl("PlanDefinition",e.planDefinition.id,"$apply"),{resourceType:"Parameters",parameter:[{name:"subject",valueReference:r}]}).then(a).catch(console.log)},children:p.jsxs(Oe,{children:[p.jsxs(ce,{children:['Start "',e.planDefinition.title,'"']}),p.jsxs(ae,{children:["Use the ",p.jsx("strong",{children:"Apply"})," operation to create a group of tasks for a workflow."]}),p.jsx(ae,{children:"The following tasks will be created:"}),p.jsx("ul",{children:(i=e.planDefinition.action)==null?void 0:i.map((l,c)=>{var u;return p.jsxs("li",{children:[((u=l.definitionCanonical)==null?void 0:u.startsWith("Questionnaire/"))&&"Questionnaire request: ",l.title&&p.jsx(p.Fragment,{children:l.title}),l.code&&p.jsx(zn,{value:l.code[0]})]},`action-${c}`)})}),p.jsx(Ke,{title:"Subject",children:p.jsx(km,{name:"subject",targetTypes:["Patient","Practitioner"],defaultValue:r,onChange:n})}),p.jsx(J,{position:"right",mt:"xl",children:p.jsx(Z,{type:"submit",children:"Go"})})]})})}function hue(){const{resourceType:e,id:t}=Je(),r=Xe({reference:e+"/"+t});return r?p.jsx(_e,{children:p.jsx(mue,{planDefinition:r})}):null}function gue(){const e=te(),{resourceType:t,id:r}=Je(),n=Xe({reference:t+"/"+r}),[o,a]=f.useState(),[i,l]=f.useState();if(f.useEffect(()=>{e.searchResources("Questionnaire","subject-type="+t).then(a).catch(console.error),vue(t)&&e.searchResources("ClientApplication").then(l).catch(console.error)},[e,t]),!n||!o)return null;if(o.length===0&&(!i||i.length===0))return p.jsxs(_e,{children:[p.jsx(ce,{children:"Apps"}),p.jsxs("p",{children:["No apps found. Contact your administrator or ",p.jsx("a",{href:"mailto:support@medplum.com",children:"Medplum Support"})," to add automation here."]})]});function c(u){if(!n)return;const d={resourceType:"SmartAppLaunch"};switch(n.resourceType){case"Patient":d.patient=at(n);break;case"Encounter":d.patient=n.subject,d.encounter=at(n);break}e.createResource(d).then(m=>{const h=new URL(u.launchUri);h.searchParams.set("iss",e.getBaseUrl()+"fhir/R4"),h.searchParams.set("launch",m.id),window.location.assign(h.toString())}).catch(m=>ie({color:"red",message:$e(m)}))}return p.jsxs(_e,{children:[o.map(u=>p.jsxs("div",{children:[p.jsx(ce,{order:3,children:p.jsx(Ce,{to:`/forms/${u.id}?subject=${ot(n)}`,children:u.title||u.name})}),p.jsx(ae,{children:u.description})]},u.id)),i==null?void 0:i.map(u=>p.jsxs("div",{children:[p.jsx(ce,{order:3,children:p.jsx(dt,{onClick:()=>c(u),children:u.name})}),p.jsx(ae,{children:u.description})]},u.id))]})}function vue(e){return e==="Patient"||e==="Encounter"}function yue(){const{resourceType:e,id:t}=Je(),r=$t(),[n,o]=f.useState({resourceType:"AuditEvent",filters:[{code:"entity",operator:ee.EQUALS,value:`${e}/${t}`}],fields:["id","outcome","outcomeDesc","_lastUpdated"],sortRules:[{code:"-_lastUpdated"}],count:20});return p.jsx(_e,{children:p.jsx(dc,{search:n,onClick:a=>r(`/${a.resource.resourceType}/${a.resource.id}`),onChange:a=>o(a.definition),hideFilters:!0})})}function wue(){const e=te(),{resourceType:t,id:r}=Je(),n=e.readHistory(t,r).read();return p.jsx(_e,{children:p.jsx(Jae,{history:n})})}function _ue(e){const t="https://codeeditor.medplum.com/bot-runner.html";return p.jsx("iframe",{frameBorder:"0",src:t,className:e.className,ref:e.iframeRef,"data-testid":e.testId,style:{width:"100%",height:"100%",minHeight:e.minHeight}})}function YP(e){const t=e.defaultValue,r=new URL(`https://codeeditor.medplum.com/${e.language}-editor.html`);return e.module&&r.searchParams.set("module",e.module),p.jsx("iframe",{frameBorder:"0",src:r.toString(),style:{width:"100%",height:"100%",minHeight:e.minHeight},ref:e.iframeRef,"data-testid":e.testId,onLoad:n=>{Xl(n.currentTarget,{command:"setValue",value:t}).catch(console.error)}})}function bue(){const e=te(),{id:t}=Je(),[r,n]=f.useState(),[o,a]=f.useState(void 0),i=f.useRef(null),l=f.useRef(null),c=f.useRef(null),[u,d]=f.useState(!1);f.useEffect(()=>{e.readResource("Bot",t).then(async w=>{n(w),a(await xue(e,w))}).catch(w=>ie({color:"red",message:$e(w)}))},[e,t]);const m=f.useCallback(()=>Xl(i.current,{command:"getValue"}),[i]),h=f.useCallback(()=>Xl(i.current,{command:"getOutput"}),[i]),g=f.useCallback(async()=>{const w=await Xl(l.current,{command:"getValue"});return JSON.parse(w)},[l]),y=f.useCallback(async w=>{w.preventDefault(),w.stopPropagation(),d(!0);try{const v=await m(),b=await e.createAttachment(v,"index.ts","text/typescript"),x=[];r!=null&&r.sourceCode?x.push({op:"replace",path:"/sourceCode",value:b}):x.push({op:"add",path:"/sourceCode",value:b}),await e.patchResource("Bot",t,x),ie({color:"green",message:"Saved"})}catch(v){ie({color:"red",message:$e(v)})}finally{d(!1)}},[e,t,r,m]),_=f.useCallback(async w=>{w.preventDefault(),w.stopPropagation(),d(!0);try{const v=await h();await e.post(e.fhirUrl("Bot",t,"$deploy"),{code:v}),ie({color:"green",message:"Deployed"})}catch(v){ie({color:"red",message:$e(v)})}finally{d(!1)}},[e,t,h]),E=f.useCallback(async w=>{w.preventDefault(),w.stopPropagation(),d(!0);try{const v=await g(),b=await e.post(e.fhirUrl("Bot",t,"$execute"),v);await Xl(c.current,{command:"setValue",value:b}),ie({color:"green",message:"Success"})}catch(v){ie({color:"red",message:$e(v)})}finally{d(!1)}},[e,t,g]);return!r||o===void 0?null:p.jsxs(Jr,{m:0,gutter:0,style:{overflow:"hidden"},children:[p.jsx(Jr.Col,{span:8,children:p.jsxs(yn,{m:2,pb:"xs",pr:"xs",pt:"xs",shadow:"md",mih:400,children:[p.jsx(YP,{iframeRef:i,language:"typescript",module:"commonjs",testId:"code-frame",defaultValue:o,minHeight:"528px"}),p.jsxs(J,{position:"right",spacing:"xs",children:[p.jsx(Z,{type:"button",onClick:y,loading:u,leftIcon:p.jsx(Fle,{size:"1rem"}),children:"Save"}),p.jsx(Z,{type:"button",onClick:_,loading:u,leftIcon:p.jsx(Lle,{size:"1rem"}),children:"Deploy"}),p.jsx(Z,{type:"button",onClick:E,loading:u,leftIcon:p.jsx(Qle,{size:"1rem"}),children:"Execute"})]})]})}),p.jsxs(Jr.Col,{span:4,children:[p.jsx(yn,{m:2,pb:"xs",pr:"xs",pt:"xs",shadow:"md",children:p.jsx(YP,{iframeRef:l,language:"json",testId:"input-frame",minHeight:"300px",defaultValue:JSON.stringify({resourceType:"Patient",name:[{given:["Alice"],family:"Smith"}]},null,2)})}),p.jsx(yn,{m:2,p:"xs",shadow:"md",children:p.jsx(_ue,{iframeRef:c,className:"medplum-bot-output-frame",testId:"output-frame",minHeight:"200px"})})]})]})}async function xue(e,t){var r,n,o;if((r=t.sourceCode)!=null&&r.url){const a=(o=(n=t.sourceCode.url)==null?void 0:n.split("/"))==null?void 0:o.find(XI);return(await e.download(e.fhirUrl("Binary",a))).text()}return t.code??""}function gc(e){let t=e.meta;return t&&(t={...t,lastUpdated:void 0,versionId:void 0,author:void 0}),{...e,meta:t}}function Eue(){const e=te(),{resourceType:t,id:r}=Je(),n={reference:t+"/"+r},o=f.useCallback(a=>{e.updateResource(gc(a)).then(()=>{ie({color:"green",message:"Success"})}).catch(i=>{ie({color:"red",message:$e(i)})})},[e]);switch(t){case"PlanDefinition":return p.jsx(_e,{children:p.jsx(fae,{value:n,onSubmit:o})});case"Questionnaire":return p.jsx(_e,{children:p.jsx(kae,{questionnaire:n,onSubmit:o})});default:return null}}function Sue(){const{resourceType:e,id:t}=Je(),r=Xe({reference:e+"/"+t}),n=$t();return r?p.jsx(_e,{children:p.jsx(Wae,{value:r,onStart:(o,a)=>n(`/forms/${GI(a)}`),onEdit:(o,a,i)=>n(`/${i.reference}}`)})}):null}function Pue(){const e=te(),{resourceType:t,id:r}=Je(),n=$t();return p.jsxs(_e,{children:[p.jsxs("p",{children:["Are you sure you want to delete this ",t,"?"]}),p.jsx(Z,{color:"red",onClick:()=>{e.deleteResource(t,r).then(()=>n(`/${t}`)).catch(o=>ie({color:"red",message:$e(o)}))},children:"Delete"})]})}function $ue(){const{resourceType:e,id:t}=Je(),r=Xe({reference:e+"/"+t});return r?p.jsx(_e,{children:p.jsx(C0,{value:r})}):null}function Oue(){const e=te(),{resourceType:t,id:r}=Je(),[n,o]=f.useState(),a=$t(),[i,l]=f.useState();f.useEffect(()=>{e.readResource(t,r).then(d=>o(oc(d))).catch(d=>{l(yt(d)),ie({color:"red",message:$e(d)})})},[e,t,r]);const c=f.useCallback(d=>{l(void 0),e.updateResource(gc(d)).then(()=>{a(`/${t}/${r}/details`),ie({color:"green",message:"Success"})}).catch(m=>{l(yt(m)),ie({color:"red",message:$e(m)})})},[e,t,r,a]),u=f.useCallback(()=>a(`/${t}/${r}/delete`),[a,t,r]);return n?p.jsx(_e,{children:p.jsx(T5,{defaultValue:n,onSubmit:c,onDelete:u,outcome:i})}):null}function Cue(){const e=te(),{resourceType:t,id:r}=Je(),n=e.readHistory(t,r).read();return p.jsx(_e,{children:p.jsx(oie,{history:n})})}function kue(){const e=te(),{resourceType:t,id:r}=Je(),n=Xe({reference:t+"/"+r}),o=$t(),[a,i]=f.useState(),l=f.useCallback(c=>{e.updateResource(gc(JSON.parse(c.resource))).then(()=>{i(void 0),o(`/${t}/${r}/details`),ie({color:"green",message:"Success"})}).catch(u=>{ie({color:"red",message:$e(u)})})},[e,t,r,o]);return n?p.jsxs(_e,{children:[a&&p.jsx(Za,{outcome:a}),p.jsxs(Ie,{onSubmit:l,children:[p.jsx(ym,{name:"resource","data-testid":"resource-json",minRows:24,defaultValue:br(n,!0),formatOnBlur:!0,deserialize:JSON.parse}),p.jsx(J,{position:"right",mt:"xl",noWrap:!0,children:p.jsx(Z,{type:"submit",children:"OK"})})]})]}):null}function jue(){const{resourceType:e,id:t}=Je();return Xe({reference:e+"/"+t})?p.jsxs(_e,{children:[p.jsxs(Gs,{icon:p.jsx(Nle,{size:16}),mb:"xl",children:["This is just a preview! Access your form here:",p.jsx("br",{}),p.jsx(dt,{href:`/forms/${t}`,children:`/forms/${t}`})]}),p.jsx(G5,{questionnaire:{reference:e+"/"+t},onSubmit:()=>alert("You submitted the preview")})]}):null}function Rue(){const e=te(),{id:t}=Je(),[r,n]=f.useState(),[o,a]=f.useState(0),i=e.searchResources("Subscription","status=active&_count=100").read().filter(c=>Tue(c,t));function l(){r&&e.createResource({resourceType:"Subscription",status:"active",reason:r.name,criteria:"QuestionnaireResponse?questionnaire=Questionnaire/"+t,channel:{type:"rest-hook",endpoint:ot(r)}}).then(()=>{n(void 0),a(Date.now()),e.invalidateSearches("Subscription"),ie({color:"green",message:"Success"})}).catch(c=>ie({color:"red",message:$e(c)}))}return p.jsxs(_e,{children:[p.jsx(ce,{children:"Bots"}),i.length===0&&p.jsx("p",{children:"No bots found."}),i.map(c=>{var u;return p.jsxs("div",{children:[p.jsx("h3",{children:p.jsx(uc,{value:{reference:(u=c.channel)==null?void 0:u.endpoint},link:!0})}),p.jsxs("p",{children:["Criteria: ",c.criteria]})]},c.id)}),p.jsx("hr",{}),p.jsx(ce,{children:"Connect to bot"}),p.jsxs(J,{children:[p.jsx(gl,{name:"bot",resourceType:"Bot",onChange:n}),p.jsx(Z,{onClick:l,children:"Connect"})]}),p.jsx("div",{style:{display:"none"},children:o})]})}function Tue(e,t){var o;const r=e.criteria||"",n=((o=e.channel)==null?void 0:o.endpoint)||"";return r.startsWith("QuestionnaireResponse?")&&r.includes(t)&&n.startsWith("Bot/")}function Iue(){const{id:e}=Je(),t=$t(),[r,n]=f.useState({resourceType:"QuestionnaireResponse",filters:[{code:"questionnaire",operator:ee.EQUALS,value:"Questionnaire/"+e}],fields:["id","_lastUpdated"]});return p.jsx(_e,{children:p.jsx(dc,{search:r,onClick:o=>t(`/${o.resource.resourceType}/${o.resource.id}`),onChange:o=>n(o.definition),hideFilters:!0,hideToolbar:!0})})}function Due(){const e=te(),{resourceType:t,id:r}=Je(),n=Xe({reference:t+"/"+r}),o=f.useCallback(a=>{e.updateResource(gc(a)).then(()=>{ie({color:"green",message:"Success"})}).catch(i=>{ie({color:"red",message:$e(i)})})},[e]);return n?p.jsx(_e,{children:p.jsx(Aae,{onSubmit:o,definition:n})}):null}function Nue(){const{resourceType:e,id:t}=Je(),r=Xe({reference:e+"/"+t});return r?p.jsx(_e,{children:p.jsx($0,{value:r})}):null}const Aue=W(e=>({container:{position:"fixed",top:300,left:0,width:160,zIndex:5,fontSize:e.fontSizes.xs,"@media (max-width: 700px)":{display:"none"}},entry:{textAlign:"center",width:150,backgroundColor:e.colors.gray[0],border:`1px solid ${e.colors.gray[3]}`},active:{width:160,backgroundColor:e.colors.yellow[0],border:`1px solid ${e.colors.yellow[5]}`}}));function Mue(e){const{classes:t,cx:r}=Aue(),n=te(),o=Xe(e.value),[a,i]=f.useState();return f.useEffect(()=>{if(!o)return;const l=B0(o);if(!l)return;const c="reference"in l?l.reference:ot(l);n.search("ServiceRequest","subject="+c).then(u=>{const m=u.entry.map(h=>h.resource);L5(m),m.reverse(),i(m)}).catch(u=>ie({color:"red",message:$e(u)}))},[n,o]),a?p.jsx("div",{"data-testid":"quick-service-requests",className:t.container,children:a.map(l=>{var c,u,d,m,h,g,y;return p.jsxs("div",{className:r(t.entry,{[t.active]:l.id===(o==null?void 0:o.id)}),children:[p.jsx("p",{children:p.jsx(Ce,{to:l,children:zue(l)})}),((u=(c=l.category)==null?void 0:c[0])==null?void 0:u.text)&&p.jsx("p",{children:(d=l.category[0])==null?void 0:d.text}),((g=(h=(m=l.code)==null?void 0:m.coding)==null?void 0:h[0])==null?void 0:g.code)&&p.jsx("p",{children:(y=l.code.coding[0])==null?void 0:y.code}),p.jsx("p",{children:Lue(l)})]},l.id)})}):null}function zue(e){if(e.identifier){for(const t of e.identifier)if(t.value)return t.value}return e.id||""}function Lue(e){var t;return e.authoredOn?e.authoredOn.substring(0,10):(t=e.meta)!=null&&t.lastUpdated?e.meta.lastUpdated.substring(0,10):""}const Fue=W(()=>({container:{position:"absolute",top:65,right:5,width:200,height:50,zIndex:15}}));function Vue(e){var a,i,l,c;const{classes:t}=Fue(),r=Xe(e.valueSet);if(!r)return null;const n=[""],o=(c=(l=(i=(a=r.compose)==null?void 0:a.include)==null?void 0:i[0])==null?void 0:l.concept)==null?void 0:c.map(u=>u.code);return o&&n.push(...o),e.defaultValue&&!n.includes(e.defaultValue)&&n.push(e.defaultValue),p.jsx("div",{className:t.container,children:p.jsx(vt,{defaultValue:e.defaultValue,onChange:u=>e.onChange(u.currentTarget.value),data:n})})}function Bue(e){var r,n;const t=Xe(e.specimen);return t?p.jsxs(be,{children:[p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Type"}),p.jsx(be.Value,{children:"Specimen"})]}),p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Collected"}),p.jsx(be.Value,{children:_r((r=t.collection)==null?void 0:r.collectedDateTime)})]}),p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Specimen Age"}),p.jsx(be.Value,{children:Uue(t)})]}),(n=t.collection)!=null&&n.collectedDateTime&&t.receivedTime?p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Specimen Stability"}),p.jsx(be.Value,{children:Wue(t)})]}):p.jsx(p.Fragment,{})]}):null}function Uue(e){var o;const t=(o=e.collection)==null?void 0:o.collectedDateTime;if(!t)return;const r=new Date(t);return HD(qD(r,new Date))}function Wue(e){var n;if(!((n=e.collection)!=null&&n.collectedDateTime)||!e.receivedTime)return;const t=new Date(e.collection.collectedDateTime),r=new Date(e.receivedTime);return HD(qD(t,r))}function HD(e){return e.toString().padStart(3,"0")+"D"}function qD(e,t){const r=t.getTime()-e.getTime();return Math.floor(r/(1e3*3600*24))}function Hue(e){const t=["Timeline"];return e==="Bot"&&t.push("Editor","Subscriptions"),e==="PlanDefinition"&&t.push("Apply","Builder"),e==="Questionnaire"&&t.push("Preview","Builder","Bots","Responses"),e==="DiagnosticReport"&&t.push("Report"),e==="RequestGroup"&&t.push("Checklist"),e==="ObservationDefinition"&&t.push("Ranges"),t.push("Details","Edit","Event","History","Blame","JSON","Apps"),t}function que(){var x,P,O,$,C,R,j;const e=te(),{resourceType:t,id:r}=Je(),n={reference:t+"/"+r},o=$t(),[a,i]=f.useState(),l=Xe(n,i),c=Hue(t),u=c[0].toLowerCase(),d=window.location.pathname.split("/").pop(),[m,h]=f.useState(d??u);async function g(){var L,U;const T=(U=(L=(await e.readHistory(t,r)).entry)==null?void 0:L.find(V=>!!V.resource))==null?void 0:U.resource;T?y(T):ie({color:"red",message:"No history to restore"})}function y(k){e.updateResource(gc(k)).then(()=>{i(void 0),ie({color:"green",message:"Success"})}).catch(T=>{ie({color:"red",message:$e(T)})})}if(a)return XZ(a)?p.jsxs(_e,{children:[p.jsx(ce,{children:"Deleted"}),p.jsx("p",{children:"The resource was deleted."}),p.jsx(Z,{color:"red",onClick:g,children:"Restore"})]}):p.jsx(Za,{outcome:a});function _(k){h(k),o(`/${t}/${r}/${k}`)}function E(k){const T=l,L=T.orderDetail||[];L.length===0&&L.push({}),L[0].text!==k&&(L[0].text=k,y({...T,orderDetail:L}))}const w=l&&B0(l),v=l&&Ice(l),b=(O=(P=(x=e.getUserConfiguration())==null?void 0:x.option)==null?void 0:P.find(k=>k.id==="statusValueSet"))==null?void 0:O.valueString;return p.jsxs(p.Fragment,{children:[(l==null?void 0:l.resourceType)==="ServiceRequest"&&b&&p.jsx(Vue,{valueSet:{reference:b},defaultValue:(C=($=l.orderDetail)==null?void 0:$[0])==null?void 0:C.text,onChange:E},ot(l)+"-"+((j=(R=l.orderDetail)==null?void 0:R[0])==null?void 0:j.text)),l&&p.jsx(Mue,{value:l}),l&&p.jsxs(yn,{children:[w&&p.jsx(BD,{patient:w}),v&&p.jsx(Bue,{specimen:v}),t!=="Patient"&&p.jsx(UD,{resource:n}),p.jsx(pl,{children:p.jsx(ht,{value:m.toLowerCase(),onTabChange:_,children:p.jsx(ht.List,{style:{whiteSpace:"nowrap",flexWrap:"nowrap"},children:c.map(k=>p.jsx(ht.Tab,{value:k.toLowerCase(),children:k},k))})})})]}),p.jsx(bD,{})]})}function XP(){var w,v,b,x;const e=$t(),{resourceType:t,id:r,versionId:n,tab:o}=Je(),a=te(),[i,l]=f.useState(!0),[c,u]=f.useState(),[d,m]=f.useState();if(f.useEffect(()=>{m(void 0),l(!0),a.readHistory(t,r).then(P=>u(P)).then(()=>l(!1)).catch(P=>{m(P),l(!1)})},[a,t,r]),i)return p.jsx(oa,{});if(!c)return p.jsxs(_e,{children:[p.jsx(ce,{children:"Resource not found"}),p.jsx(Ce,{to:`/${t}`,children:"Return to search page"})]});const h=c.entry,g=h.findIndex(P=>{var O,$;return(($=(O=P.resource)==null?void 0:O.meta)==null?void 0:$.versionId)===n});if(g===-1)return p.jsxs(_e,{children:[p.jsx(ce,{children:"Version not found"}),p.jsx(Ce,{to:`/${t}/${r}`,children:"Return to resource"})]});const y=h[g].resource,_=g<h.length-1?h[g+1].resource:void 0,E="diff";return p.jsx(p.Fragment,{children:p.jsxs(ht,{value:o||E,onTabChange:P=>e(`/${t}/${r}/_history/${n}/${P}`),children:[p.jsxs(yn,{children:[p.jsx(cc,{fluid:!0,p:"md",children:p.jsx(ae,{children:`${t} ${r}`})}),p.jsxs(ht.List,{children:[p.jsx(ht.Tab,{value:"diff",children:"Diff"}),p.jsx(ht.Tab,{value:"raw",children:"Raw"})]})]}),p.jsxs(_e,{children:[d&&p.jsx("pre",{"data-testid":"error",children:JSON.stringify(d,void 0,2)}),p.jsx(ht.Panel,{value:"diff",children:_?p.jsxs(p.Fragment,{children:[p.jsxs("ul",{children:[p.jsxs("li",{children:["Current: ",(w=y.meta)==null?void 0:w.versionId]}),p.jsxs("li",{children:["Previous:"," ",p.jsx(Ce,{to:`/${t}/${r}/_history/${(v=_.meta)==null?void 0:v.versionId}`,children:(b=_.meta)==null?void 0:b.versionId})]})]}),p.jsx(rie,{original:_,revised:y})]}):p.jsxs(p.Fragment,{children:[p.jsxs("ul",{children:[p.jsxs("li",{children:["Current: ",(x=y.meta)==null?void 0:x.versionId]}),p.jsx("li",{children:"Previous: (none)"})]}),p.jsx("pre",{children:JSON.stringify(y,void 0,2)})]})}),p.jsx(ht.Panel,{value:"raw",children:p.jsx("pre",{children:JSON.stringify(y,void 0,2)})})]})]})})}function Que(){const{resourceType:e,id:t}=Je(),r=$t(),[n,o]=f.useState({resourceType:"Subscription",filters:[{code:"url",operator:ee.EQUALS,value:`${e}/${t}`}],fields:["id","criteria","status","_lastUpdated"]});return p.jsx(_e,{children:p.jsx(dc,{search:n,onClick:a=>r(`/${a.resource.resourceType}/${a.resource.id}`),onChange:a=>o(a.definition),hideFilters:!0})})}function JP(){const{resourceType:e,id:t}=Je(),r={reference:e+"/"+t};switch(e){case"Encounter":return p.jsx(yoe,{encounter:r});case"Patient":return p.jsx(dae,{patient:r});case"ServiceRequest":return p.jsx(lie,{serviceRequest:r});default:return p.jsx(voe,{resource:r})}}function Gue(){return p.jsx(Ele,{children:p.jsxs(se,{errorElement:p.jsx(Rce,{}),children:[p.jsx(se,{path:"/signin",element:p.jsx(Xce,{})}),p.jsx(se,{path:"/oauth",element:p.jsx(qce,{})}),p.jsx(se,{path:"/resetpassword",element:p.jsx(Gce,{})}),p.jsx(se,{path:"/setpassword/:id/:secret",element:p.jsx(Yce,{})}),p.jsx(se,{path:"/register",element:p.jsx(Qce,{})}),p.jsx(se,{path:"/changepassword",element:p.jsx(kce,{})}),p.jsx(se,{path:"/security",element:p.jsx(Kce,{})}),p.jsx(se,{path:"/mfa",element:p.jsx(Wce,{})}),p.jsx(se,{path:"/batch",element:p.jsx(Oce,{})}),p.jsx(se,{path:"/bulk/:resourceType",element:p.jsx(Cce,{})}),p.jsx(se,{path:"/smart",element:p.jsx(Jce,{})}),p.jsx(se,{path:"/forms/:id",element:p.jsx(Nce,{})}),p.jsx(se,{path:"/admin/super",element:p.jsx(uue,{})}),p.jsxs(se,{path:"/admin",element:p.jsx(lue,{}),children:[p.jsx(se,{path:"patients",element:p.jsx(iue,{})}),p.jsx(se,{path:"bots/new",element:p.jsx(tue,{})}),p.jsx(se,{path:"bots",element:p.jsx(Zce,{})}),p.jsx(se,{path:"clients/new",element:p.jsx(rue,{})}),p.jsx(se,{path:"clients",element:p.jsx(eue,{})}),p.jsx(se,{path:"details",element:p.jsx(QP,{})}),p.jsx(se,{path:"invite",element:p.jsx(aue,{})}),p.jsx(se,{path:"users",element:p.jsx(due,{})}),p.jsx(se,{path:"project",element:p.jsx(QP,{})}),p.jsx(se,{path:"secrets",element:p.jsx(sue,{})}),p.jsx(se,{path:"sites",element:p.jsx(cue,{})}),p.jsx(se,{path:"members/:membershipId",element:p.jsx(oue,{})})]}),p.jsx(se,{path:"/lab/assays",element:p.jsx(fue,{})}),p.jsx(se,{path:"/lab/panels",element:p.jsx(pue,{})}),p.jsx(se,{path:"/:resourceType/:id/_history/:versionId/:tab",element:p.jsx(XP,{})}),p.jsx(se,{path:"/:resourceType/:id/_history/:versionId",element:p.jsx(XP,{})}),p.jsx(se,{path:"/:resourceType/new",element:p.jsx(jce,{})}),p.jsxs(se,{path:"/:resourceType/:id",element:p.jsx(que,{}),children:[p.jsx(se,{index:!0,element:p.jsx(JP,{})}),p.jsx(se,{path:"apply",element:p.jsx(hue,{})}),p.jsx(se,{path:"apps",element:p.jsx(gue,{})}),p.jsx(se,{path:"event",element:p.jsx(yue,{})}),p.jsx(se,{path:"blame",element:p.jsx(wue,{})}),p.jsx(se,{path:"bots",element:p.jsx(Rue,{})}),p.jsx(se,{path:"builder",element:p.jsx(Eue,{})}),p.jsx(se,{path:"checklist",element:p.jsx(Sue,{})}),p.jsx(se,{path:"delete",element:p.jsx(Pue,{})}),p.jsx(se,{path:"details",element:p.jsx($ue,{})}),p.jsx(se,{path:"edit",element:p.jsx(Oue,{})}),p.jsx(se,{path:"editor",element:p.jsx(bue,{})}),p.jsx(se,{path:"history",element:p.jsx(Cue,{})}),p.jsx(se,{path:"json",element:p.jsx(kue,{})}),p.jsx(se,{path:"preview",element:p.jsx(jue,{})}),p.jsx(se,{path:"responses",element:p.jsx(Iue,{})}),p.jsx(se,{path:"report",element:p.jsx(Nue,{})}),p.jsx(se,{path:"ranges",element:p.jsx(Due,{})}),p.jsx(se,{path:"subscriptions",element:p.jsx(Que,{})}),p.jsx(se,{path:"timeline",element:p.jsx(JP,{})})]}),p.jsx(se,{path:"/:resourceType",element:p.jsx(qP,{})}),p.jsx(se,{path:"/",element:p.jsx(qP,{})})]})})}function Kue(){const e=te(),t=e.getUserConfiguration(),r=da(),[n]=L0();return e.isLoading()?p.jsx(oa,{}):p.jsx(sne,{logo:p.jsx(xn,{size:24}),pathname:r.pathname,searchParams:n,version:Ate,menus:Yue(t),displayAddBookmark:!!(t!=null&&t.id),children:p.jsx(f.Suspense,{fallback:p.jsx(oa,{}),children:p.jsx(Gue,{})})})}function Yue(e){var r;const t=((r=e==null?void 0:e.menu)==null?void 0:r.map(n=>{var o;return{title:n.title,links:((o=n.link)==null?void 0:o.map(a=>({label:a.name,href:a.target,icon:Xue(a.target)})))||[]}}))||[];return t.push({title:"Settings",links:[{label:"Security",href:"/security",icon:p.jsx(Wle,{})}]}),t}const ZP={Patient:Yle,Practitioner:Ble,Organization:Mle,ServiceRequest:Gle,DiagnosticReport:Kle,Questionnaire:Vle,admin:Ale,AccessPolicy:Ule,Subscription:Xle,batch:qle,Observation:Hle};function Xue(e){try{const t=new URL(e,"https://app.medplum.com").pathname.split("/")[1];if(t in ZP){const r=ZP[t];return p.jsx(r,{})}}catch{}return p.jsx(Ky,{w:30})}"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.getRegistrations().then(e=>Promise.all(e.map(t=>t.unregister()))).catch(e=>console.error("SW registration failed: ",e))});async function Jue(){const e=hc(),t=new Wte({baseUrl:e.baseUrl,clientId:e.clientId,cacheTime:6e4,autoBatchTime:100,onUnauthenticated:()=>{window.location.pathname!=="/signin"&&window.location.pathname!=="/oauth"&&(window.location.href="/signin?next="+encodeURIComponent(window.location.pathname+window.location.search))}}),r={headings:{sizes:{h1:{fontSize:"1.125rem",fontWeight:500,lineHeight:2}}},fontSizes:{xs:"0.6875rem",sm:"0.875rem",md:"0.875rem",lg:"1.0rem",xl:"1.125rem"}},n=$le([{path:"*",element:p.jsx(Kue,{})}]),o=i=>n.navigate(i);iD(document.getElementById("root")).render(p.jsx(s.StrictMode,{children:p.jsx(Gte,{medplum:t,navigate:o,children:p.jsxs(U$,{theme:r,withGlobalStyles:!0,withNormalizeCSS:!0,children:[p.jsx(Ja,{position:"bottom-right"}),p.jsx(_le,{router:n})]})})}))}Jue().catch(console.error);
234
- //# sourceMappingURL=index-f0d12c84.js.map