@medplum/app 2.0.28 → 2.0.29
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.
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
function t3(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 Cv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ZP={exports:{}},Tp={},e$={exports:{}},Re={};/**
|
|
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 Fs=Symbol.for("react.element"),r3=Symbol.for("react.portal"),n3=Symbol.for("react.fragment"),o3=Symbol.for("react.strict_mode"),a3=Symbol.for("react.profiler"),i3=Symbol.for("react.provider"),l3=Symbol.for("react.context"),s3=Symbol.for("react.forward_ref"),c3=Symbol.for("react.suspense"),u3=Symbol.for("react.memo"),d3=Symbol.for("react.lazy"),Q0=Symbol.iterator;function f3(e){return e===null||typeof e!="object"?null:(e=Q0&&e[Q0]||e["@@iterator"],typeof e=="function"?e:null)}var t$={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},r$=Object.assign,n$={};function cl(e,t,r){this.props=e,this.context=t,this.refs=n$,this.updater=r||t$}cl.prototype.isReactComponent={};cl.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")};cl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function o$(){}o$.prototype=cl.prototype;function kv(e,t,r){this.props=e,this.context=t,this.refs=n$,this.updater=r||t$}var jv=kv.prototype=new o$;jv.constructor=kv;r$(jv,cl.prototype);jv.isPureReactComponent=!0;var G0=Array.isArray,a$=Object.prototype.hasOwnProperty,Rv={current:null},i$={key:!0,ref:!0,__self:!0,__source:!0};function l$(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)a$.call(t,n)&&!i$.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:Fs,type:e,key:a,ref:i,props:o,_owner:Rv.current}}function p3(e,t){return{$$typeof:Fs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Tv(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fs}function m3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var K0=/\/+/g;function Um(e,t){return typeof e=="object"&&e!==null&&e.key!=null?m3(""+e.key):t.toString(36)}function vu(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 Fs:case r3:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Um(i,0):n,G0(o)?(r="",e!=null&&(r=e.replace(K0,"$&/")+"/"),vu(o,t,r,"",function(u){return u})):o!=null&&(Tv(o)&&(o=p3(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(K0,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",G0(e))for(var l=0;l<e.length;l++){a=e[l];var c=n+Um(a,l);i+=vu(a,t,r,c,o)}else if(c=f3(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=n+Um(a,l++),i+=vu(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 bc(e,t,r){if(e==null)return e;var n=[],o=0;return vu(e,n,"","",function(a){return t.call(r,a,o++)}),n}function h3(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 nr={current:null},yu={transition:null},g3={ReactCurrentDispatcher:nr,ReactCurrentBatchConfig:yu,ReactCurrentOwner:Rv};Re.Children={map:bc,forEach:function(e,t,r){bc(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return bc(e,function(){t++}),t},toArray:function(e){return bc(e,function(t){return t})||[]},only:function(e){if(!Tv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Re.Component=cl;Re.Fragment=n3;Re.Profiler=a3;Re.PureComponent=kv;Re.StrictMode=o3;Re.Suspense=c3;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g3;Re.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=r$({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Rv.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)a$.call(t,c)&&!i$.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:Fs,type:e.type,key:o,ref:a,props:n,_owner:i}};Re.createContext=function(e){return e={$$typeof:l3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:i3,_context:e},e.Consumer=e};Re.createElement=l$;Re.createFactory=function(e){var t=l$.bind(null,e);return t.type=e,t};Re.createRef=function(){return{current:null}};Re.forwardRef=function(e){return{$$typeof:s3,render:e}};Re.isValidElement=Tv;Re.lazy=function(e){return{$$typeof:d3,_payload:{_status:-1,_result:e},_init:h3}};Re.memo=function(e,t){return{$$typeof:u3,type:e,compare:t===void 0?null:t}};Re.startTransition=function(e){var t=yu.transition;yu.transition={};try{e()}finally{yu.transition=t}};Re.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Re.useCallback=function(e,t){return nr.current.useCallback(e,t)};Re.useContext=function(e){return nr.current.useContext(e)};Re.useDebugValue=function(){};Re.useDeferredValue=function(e){return nr.current.useDeferredValue(e)};Re.useEffect=function(e,t){return nr.current.useEffect(e,t)};Re.useId=function(){return nr.current.useId()};Re.useImperativeHandle=function(e,t,r){return nr.current.useImperativeHandle(e,t,r)};Re.useInsertionEffect=function(e,t){return nr.current.useInsertionEffect(e,t)};Re.useLayoutEffect=function(e,t){return nr.current.useLayoutEffect(e,t)};Re.useMemo=function(e,t){return nr.current.useMemo(e,t)};Re.useReducer=function(e,t,r){return nr.current.useReducer(e,t,r)};Re.useRef=function(e){return nr.current.useRef(e)};Re.useState=function(e){return nr.current.useState(e)};Re.useSyncExternalStore=function(e,t,r){return nr.current.useSyncExternalStore(e,t,r)};Re.useTransition=function(){return nr.current.useTransition()};Re.version="18.2.0";e$.exports=Re;var f=e$.exports;const s=Cv(f),Fu=t3({__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 v3=f,y3=Symbol.for("react.element"),w3=Symbol.for("react.fragment"),_3=Object.prototype.hasOwnProperty,x3=v3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,b3={key:!0,ref:!0,__self:!0,__source:!0};function s$(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)_3.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:y3,type:e,key:a,ref:i,props:o,_owner:x3.current}}Tp.Fragment=w3;Tp.jsx=s$;Tp.jsxs=s$;ZP.exports=Tp;var p=ZP.exports,An=function(){return An=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},An.apply(this,arguments)};function c$(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 ul(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 dl(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 Y0(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 qh(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 wu="right-scroll-bar-position",_u="width-before-scroll-bar",E3="with-scroll-bars-hidden",S3="--removed-body-scroll-bar-size";function P3(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $3(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 O3(e,t){return $3(t||null,function(r){return e.forEach(function(n){return P3(n,r)})})}function C3(e){return e}function k3(e,t){t===void 0&&(t=C3);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 j3(e){e===void 0&&(e={});var t=k3(null);return t.options=An({async:!0,ssr:!1},e),t}var u$=function(e){var t=e.sideCar,r=c$(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,An({},r))};u$.isSideCarExport=!0;function R3(e,t){return e.useMedium(t),u$}var d$=j3(),Wm=function(){},Ip=f.forwardRef(function(e,t){var r=f.useRef(null),n=f.useState({onScrollCapture:Wm,onWheelCapture:Wm,onTouchMoveCapture:Wm}),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,w=e.allowPinchZoom,E=e.as,_=E===void 0?"div":E,v=e.gapMode,x=c$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=h,P=O3([r,t]),O=An(An({},x),o);return f.createElement(f.Fragment,null,d&&f.createElement(b,{sideCar:d$,removeScrollBar:u,shards:m,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!w,lockRef:r,gapMode:v}),i?f.cloneElement(f.Children.only(l),An(An({},O),{ref:P})):f.createElement(_,An({},O,{className:c,ref:P}),l))});Ip.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ip.classNames={fullWidth:_u,zeroRight:wu};var X0,T3=function(){if(X0)return X0;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function I3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=T3();return t&&e.setAttribute("nonce",t),e}function D3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function N3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var A3=function(){var e=0,t=null;return{add:function(r){e==0&&(t=I3())&&(D3(t,r),N3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},M3=function(){var e=A3();return function(t,r){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},f$=function(){var e=M3(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},z3={left:0,top:0,right:0,gap:0},Hm=function(e){return parseInt(e||"",10)||0},L3=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[Hm(r),Hm(n),Hm(o)]},F3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return z3;var t=L3(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])}},V3=f$(),B3=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(E3,` {
|
|
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(wu,` {
|
|
36
|
+
right: `).concat(l,"px ").concat(n,`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.`).concat(_u,` {
|
|
40
|
+
margin-right: `).concat(l,"px ").concat(n,`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.`).concat(wu," .").concat(wu,` {
|
|
44
|
+
right: 0 `).concat(n,`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.`).concat(_u," .").concat(_u,` {
|
|
48
|
+
margin-right: 0 `).concat(n,`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
body {
|
|
52
|
+
`).concat(S3,": ").concat(l,`px;
|
|
53
|
+
}
|
|
54
|
+
`)},U3=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,a=f.useMemo(function(){return F3(o)},[o]);return f.createElement(V3,{styles:B3(a,!t,o,r?"":"!important")})},Qh=!1;if(typeof window<"u")try{var Ec=Object.defineProperty({},"passive",{get:function(){return Qh=!0,!0}});window.addEventListener("test",Ec,Ec),window.removeEventListener("test",Ec,Ec)}catch{Qh=!1}var si=Qh?{passive:!1}:!1,W3=function(e){return e.tagName==="TEXTAREA"},p$=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!W3(e)&&r[t]==="visible")},H3=function(e){return p$(e,"overflowY")},q3=function(e){return p$(e,"overflowX")},J0=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=m$(e,n);if(o){var a=h$(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]},G3=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},m$=function(e,t){return e==="v"?H3(t):q3(t)},h$=function(e,t){return e==="v"?Q3(t):G3(t)},K3=function(e,t){return e==="h"&&t==="rtl"?-1:1},Y3=function(e,t,r,n,o){var a=K3(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=h$(e,l),y=g[0],w=g[1],E=g[2],_=w-E-a*y;(y||_)&&m$(e,l)&&(m+=_,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},Sc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Z0=function(e){return[e.deltaX,e.deltaY]},e1=function(e){return e&&"current"in e?e.current:e},X3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},J3=function(e){return`
|
|
55
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
56
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
57
|
+
`)},Z3=0,ci=[];function eN(e){var t=f.useRef([]),r=f.useRef([0,0]),n=f.useRef(),o=f.useState(Z3++)[0],a=f.useState(f$)[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 w=qh([e.lockRef.current],(e.shards||[]).map(e1),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!i.current.allowPinchZoom;var _=Sc(w),v=r.current,x="deltaX"in w?w.deltaX:v[0]-_[0],b="deltaY"in w?w.deltaY:v[1]-_[1],P,O=w.target,$=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in w&&$==="h"&&O.type==="range")return!1;var C=J0($,O);if(!C)return!0;if(C?P=$:(P=$==="v"?"h":"v",C=J0($,O)),!C)return!1;if(!n.current&&"changedTouches"in w&&(x||b)&&(n.current=P),!P)return!0;var R=n.current||P;return Y3(R,E,w,R==="h"?x:b,!0)},[]),c=f.useCallback(function(w){var E=w;if(!(!ci.length||ci[ci.length-1]!==a)){var _="deltaY"in E?Z0(E):Sc(E),v=t.current.filter(function(P){return P.name===E.type&&P.target===E.target&&X3(P.delta,_)})[0];if(v&&v.should){E.cancelable&&E.preventDefault();return}if(!v){var x=(i.current.shards||[]).map(e1).filter(Boolean).filter(function(P){return P.contains(E.target)}),b=x.length>0?l(E,x[0]):!i.current.noIsolation;b&&E.cancelable&&E.preventDefault()}}},[]),u=f.useCallback(function(w,E,_,v){var x={name:w,delta:E,target:_,should:v};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(b){return b!==x})},1)},[]),d=f.useCallback(function(w){r.current=Sc(w),n.current=void 0},[]),m=f.useCallback(function(w){u(w.type,Z0(w),w.target,l(w,e.lockRef.current))},[]),h=f.useCallback(function(w){u(w.type,Sc(w),w.target,l(w,e.lockRef.current))},[]);f.useEffect(function(){return ci.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",c,si),document.addEventListener("touchmove",c,si),document.addEventListener("touchstart",d,si),function(){ci=ci.filter(function(w){return w!==a}),document.removeEventListener("wheel",c,si),document.removeEventListener("touchmove",c,si),document.removeEventListener("touchstart",d,si)}},[]);var g=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:J3(o)}):null,g?f.createElement(U3,{gapMode:e.gapMode}):null)}const tN=R3(d$,eN);var g$=f.forwardRef(function(e,t){return f.createElement(Ip,An({},e,{ref:t,sideCar:tN}))});g$.classNames=Ip.classNames;const rN=g$;function Vu(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function nN(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 oN(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 aN(e,t,r){return Vu(e,r)===Vu(t,r)}function v$({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=Vu(l.currentTarget,e))==null?void 0:c.querySelectorAll(t))||[]).filter(w=>aN(l.currentTarget,w,e)),d=u.findIndex(w=>l.currentTarget===w),m=oN(d,u,n),h=nN(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 w=u.length-1;!u[w].disabled&&u[w].focus();break}}}}function iN(e,t,r){var n;return r?Array.from(((n=Vu(r,t))==null?void 0:n.querySelectorAll(e))||[]).findIndex(o=>o===r):null}function vo(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 Dp(e){return Array.isArray(e)?e:[e]}function t1(e,t){return r=>{if(typeof r!="string"||r.trim().length===0)throw new Error(t);return`${e}-${r}`}}const lN=()=>{};function sN(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||lN:r=>{var n;r.key==="Escape"&&(e(r),(n=t.onTrigger)==null||n.call(t))}}function Cr(e,t){return r=>{e==null||e(r),t==null||t(r)}}function cN(){const[e,t]=f.useState(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function uN({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 dN(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}const fN=typeof window<"u"?f.useLayoutEffect:f.useEffect;function pN(e){function t(n){const o=Object.keys(n).reduce((a,i)=>(a[`${e}:${i}`]=l=>n[i](l.detail),a),{});fN(()=>(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)=>dN(`${e}:${String(n)}`,o[0])}return[t,r]}function Np(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==s.Fragment:!1}function y$(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=y$(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function w$(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=y$(t))&&(n&&(n+=" "),n+=r);return n}const mN={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 hN(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var gN=Object.defineProperty,r1=Object.getOwnPropertySymbols,vN=Object.prototype.hasOwnProperty,yN=Object.prototype.propertyIsEnumerable,n1=(e,t,r)=>t in e?gN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,o1=(e,t)=>{for(var r in t||(t={}))vN.call(t,r)&&n1(e,r,t[r]);if(r1)for(var r of r1(t))yN.call(t,r)&&n1(e,r,t[r]);return e};function wN(e){return t=>({WebkitTapHighlightColor:"transparent",[t||"&:focus"]:o1({},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)"]:o1({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function Vs(e){return t=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[t||e.colorScheme]}function Iv(e){const t=Vs(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 _$(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 _N(e,...t){return`linear-gradient(${e}deg, ${_$(t)})`}function xN(...e){return`radial-gradient(circle, ${_$(e)})`}function x$(e){const t=Iv(e),r=Vs(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 b$(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=b$("rem"),Rr=b$("em");function N({size:e,sizes:t,units:r}){return e in t?t[e]:typeof e=="number"?r==="em"?Rr(e):S(e):e||t.md}function _n(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: ${Rr(_n(N({size:t,sizes:e.breakpoints})))})`}function EN(e){return t=>`@media (max-width: ${Rr(_n(N({size:t,sizes:e.breakpoints}))-1)})`}function SN(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function PN(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 $N(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 Dv(e){return SN(e)?PN(e):e.startsWith("rgb")?$N(e):{r:0,g:0,b:0,a:1}}function yi(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}=Dv(e);return`rgba(${r}, ${n}, ${o}, ${t})`}function ON(e=0){return{position:"absolute",top:S(e),right:S(e),left:S(e),bottom:S(e)}}function CN(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a}=Dv(e),i=1-t,l=c=>Math.round(c*i);return`rgba(${l(r)}, ${l(n)}, ${l(o)}, ${a})`}function kN(e,t){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r,g:n,b:o,a}=Dv(e),i=l=>Math.round(l+(255-l)*t);return`rgba(${i(r)}, ${i(n)}, ${i(o)}, ${a})`}function jN(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 RN(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 TN(e){const t=Iv(e),r=Vs(e),n=x$(e);return({variant:o,color:a,gradient:i,primaryFallback:l})=>{const c=RN(a,e);switch(o){case"light":return{border:"transparent",background:yi(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:yi(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:yi(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"?yi(t(a,5,l,!1),.05):yi(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 IN(e){return t=>{const r=Vs(e)(t);return e.colors[e.primaryColor][r]}}function DN(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function NN(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function AN(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const Rt={fontStyles:hN,themeColor:Iv,focusStyles:wN,linearGradient:_N,radialGradient:xN,smallerThan:EN,largerThan:bN,rgba:yi,cover:ON,darken:CN,lighten:kN,radius:jN,variant:TN,primaryShade:Vs,hover:DN,gradient:x$,primaryColor:IN,placeholderStyles:NN,dimmed:AN};var MN=Object.defineProperty,zN=Object.defineProperties,LN=Object.getOwnPropertyDescriptors,a1=Object.getOwnPropertySymbols,FN=Object.prototype.hasOwnProperty,VN=Object.prototype.propertyIsEnumerable,i1=(e,t,r)=>t in e?MN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BN=(e,t)=>{for(var r in t||(t={}))FN.call(t,r)&&i1(e,r,t[r]);if(a1)for(var r of a1(t))VN.call(t,r)&&i1(e,r,t[r]);return e},UN=(e,t)=>zN(e,LN(t));function E$(e){return UN(BN({},e),{fn:{fontStyles:Rt.fontStyles(e),themeColor:Rt.themeColor(e),focusStyles:Rt.focusStyles(e),largerThan:Rt.largerThan(e),smallerThan:Rt.smallerThan(e),radialGradient:Rt.radialGradient,linearGradient:Rt.linearGradient,gradient:Rt.gradient(e),rgba:Rt.rgba,cover:Rt.cover,lighten:Rt.lighten,darken:Rt.darken,primaryShade:Rt.primaryShade(e),radius:Rt.radius(e),variant:Rt.variant(e),hover:Rt.hover,primaryColor:Rt.primaryColor(e),placeholderStyles:Rt.placeholderStyles(e),dimmed:Rt.dimmed(e)}})}const S$=["xs","sm","md","lg","xl"],WN={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:mN,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]})}},Nv=E$(WN);function HN(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 qN(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(qN(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var a=HN(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}(),Gt="-ms-",Bu="-moz-",Ae="-webkit-",P$="comm",Av="rule",Mv="decl",GN="@import",$$="@keyframes",KN="@layer",YN=Math.abs,Ap=String.fromCharCode,XN=Object.assign;function JN(e,t){return Bt(e,0)^45?(((t<<2^Bt(e,0))<<2^Bt(e,1))<<2^Bt(e,2))<<2^Bt(e,3):0}function O$(e){return e.trim()}function ZN(e,t){return(e=t.exec(e))?e[0]:e}function ze(e,t,r){return e.replace(t,r)}function Gh(e,t){return e.indexOf(t)}function Bt(e,t){return e.charCodeAt(t)|0}function ms(e,t,r){return e.slice(t,r)}function Tn(e){return e.length}function zv(e){return e.length}function Pc(e,t){return t.push(e),e}function e4(e,t){return e.map(t).join("")}var Mp=1,Ki=1,C$=0,gr=0,Ct=0,fl="";function zp(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Mp,column:Ki,length:i,return:""}}function El(e,t){return XN(zp("",null,null,"",null,null,0),e,{length:-e.length},t)}function t4(){return Ct}function r4(){return Ct=gr>0?Bt(fl,--gr):0,Ki--,Ct===10&&(Ki=1,Mp--),Ct}function Tr(){return Ct=gr<C$?Bt(fl,gr++):0,Ki++,Ct===10&&(Ki=1,Mp++),Ct}function zn(){return Bt(fl,gr)}function xu(){return gr}function Bs(e,t){return ms(fl,e,t)}function hs(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 k$(e){return Mp=Ki=1,C$=Tn(fl=e),gr=0,[]}function j$(e){return fl="",e}function bu(e){return O$(Bs(gr-1,Kh(e===91?e+2:e===40?e+1:e)))}function n4(e){for(;(Ct=zn())&&Ct<33;)Tr();return hs(e)>2||hs(Ct)>3?"":" "}function o4(e,t){for(;--t&&Tr()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return Bs(e,xu()+(t<6&&zn()==32&&Tr()==32))}function Kh(e){for(;Tr();)switch(Ct){case e:return gr;case 34:case 39:e!==34&&e!==39&&Kh(Ct);break;case 40:e===41&&Kh(e);break;case 92:Tr();break}return gr}function a4(e,t){for(;Tr()&&e+Ct!==47+10;)if(e+Ct===42+42&&zn()===47)break;return"/*"+Bs(t,gr-1)+"*"+Ap(e===47?e:Tr())}function i4(e){for(;!hs(zn());)Tr();return Bs(e,gr)}function l4(e){return j$(Eu("",null,null,null,[""],e=k$(e),0,[0],e))}function Eu(e,t,r,n,o,a,i,l,c){for(var u=0,d=0,m=i,h=0,g=0,y=0,w=1,E=1,_=1,v=0,x="",b=o,P=a,O=n,$=x;E;)switch(y=v,v=Tr()){case 40:if(y!=108&&Bt($,m-1)==58){Gh($+=ze(bu(v),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:$+=bu(v);break;case 9:case 10:case 13:case 32:$+=n4(y);break;case 92:$+=o4(xu()-1,7);continue;case 47:switch(zn()){case 42:case 47:Pc(s4(a4(Tr(),xu()),t,r),c);break;default:$+="/"}break;case 123*w:l[u++]=Tn($)*_;case 125*w:case 59:case 0:switch(v){case 0:case 125:E=0;case 59+d:_==-1&&($=ze($,/\f/g,"")),g>0&&Tn($)-m&&Pc(g>32?s1($+";",n,r,m-1):s1(ze($," ","")+";",n,r,m-2),c);break;case 59:$+=";";default:if(Pc(O=l1($,t,r,u,d,o,l,x,b=[],P=[],m),a),v===123)if(d===0)Eu($,t,O,O,b,a,m,l,P);else switch(h===99&&Bt($,3)===110?100:h){case 100:case 108:case 109:case 115:Eu(e,O,O,n&&Pc(l1(e,O,O,0,0,o,l,x,o,b=[],m),P),o,P,m,l,n?b:P);break;default:Eu($,O,O,O,[""],P,0,l,P)}}u=d=g=0,w=_=1,x=$="",m=i;break;case 58:m=1+Tn($),g=y;default:if(w<1){if(v==123)--w;else if(v==125&&w++==0&&r4()==125)continue}switch($+=Ap(v),v*w){case 38:_=d>0?1:($+="\f",-1);break;case 44:l[u++]=(Tn($)-1)*_,_=1;break;case 64:zn()===45&&($+=bu(Tr())),h=zn(),d=m=Tn(x=$+=i4(xu())),v++;break;case 45:y===45&&Tn($)==2&&(w=0)}}return a}function l1(e,t,r,n,o,a,i,l,c,u,d){for(var m=o-1,h=o===0?a:[""],g=zv(h),y=0,w=0,E=0;y<n;++y)for(var _=0,v=ms(e,m+1,m=YN(w=i[y])),x=e;_<g;++_)(x=O$(w>0?h[_]+" "+v:ze(v,/&\f/g,h[_])))&&(c[E++]=x);return zp(e,t,r,o===0?Av:l,c,u,d)}function s4(e,t,r){return zp(e,t,r,P$,Ap(t4()),ms(e,2,-2),0)}function s1(e,t,r,n){return zp(e,t,r,Mv,ms(e,0,n),ms(e,n+1,-1),n)}function Mi(e,t){for(var r="",n=zv(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function c4(e,t,r,n){switch(e.type){case KN:if(e.children.length)break;case GN:case Mv:return e.return=e.return||e.value;case P$:return"";case $$:return e.return=e.value+"{"+Mi(e.children,n)+"}";case Av:e.value=e.props.join(",")}return Tn(r=Mi(e.children,n))?e.return=e.value+"{"+r+"}":""}function u4(e){var t=zv(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 d4(e){return function(t){t.root||(t=t.return)&&e(t)}}var c1=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 f4(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var p4=function(t,r,n){for(var o=0,a=0;o=a,a=zn(),o===38&&a===12&&(r[n]=1),!hs(a);)Tr();return Bs(t,gr)},m4=function(t,r){var n=-1,o=44;do switch(hs(o)){case 0:o===38&&zn()===12&&(r[n]=1),t[n]+=p4(gr-1,r,n);break;case 2:t[n]+=bu(o);break;case 4:if(o===44){t[++n]=zn()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Ap(o)}while(o=Tr());return t},h4=function(t,r){return j$(m4(k$(t),r))},u1=new WeakMap,g4=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&&!u1.get(n))&&!o){u1.set(t,!0);for(var a=[],i=h4(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]}}},v4=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function R$(e,t){switch(JN(e,t)){case 5103:return Ae+"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 Ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ae+e+Bu+e+Gt+e+e;case 6828:case 4268:return Ae+e+Gt+e+e;case 6165:return Ae+e+Gt+"flex-"+e+e;case 5187:return Ae+e+ze(e,/(\w+).+(:[^]+)/,Ae+"box-$1$2"+Gt+"flex-$1$2")+e;case 5443:return Ae+e+Gt+"flex-item-"+ze(e,/flex-|-self/,"")+e;case 4675:return Ae+e+Gt+"flex-line-pack"+ze(e,/align-content|flex-|-self/,"")+e;case 5548:return Ae+e+Gt+ze(e,"shrink","negative")+e;case 5292:return Ae+e+Gt+ze(e,"basis","preferred-size")+e;case 6060:return Ae+"box-"+ze(e,"-grow","")+Ae+e+Gt+ze(e,"grow","positive")+e;case 4554:return Ae+ze(e,/([^-])(transform)/g,"$1"+Ae+"$2")+e;case 6187:return ze(ze(ze(e,/(zoom-|grab)/,Ae+"$1"),/(image-set)/,Ae+"$1"),e,"")+e;case 5495:case 3959:return ze(e,/(image-set\([^]*)/,Ae+"$1$`$1");case 4968:return ze(ze(e,/(.+:)(flex-)?(.*)/,Ae+"box-pack:$3"+Gt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ae+e+e;case 4095:case 3583:case 4068:case 2532:return ze(e,/(.+)-inline(.+)/,Ae+"$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(Tn(e)-1-t>6)switch(Bt(e,t+1)){case 109:if(Bt(e,t+4)!==45)break;case 102:return ze(e,/(.+:)(.+)-([^]+)/,"$1"+Ae+"$2-$3$1"+Bu+(Bt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gh(e,"stretch")?R$(ze(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Bt(e,t+1)!==115)break;case 6444:switch(Bt(e,Tn(e)-3-(~Gh(e,"!important")&&10))){case 107:return ze(e,":",":"+Ae)+e;case 101:return ze(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ae+(Bt(e,14)===45?"inline-":"")+"box$3$1"+Ae+"$2$3$1"+Gt+"$2box$3")+e}break;case 5936:switch(Bt(e,t+11)){case 114:return Ae+e+Gt+ze(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ae+e+Gt+ze(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ae+e+Gt+ze(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ae+e+Gt+e+e}return e}var y4=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case Mv:t.return=R$(t.value,t.length);break;case $$:return Mi([El(t,{value:ze(t.value,"@","@"+Ae)})],o);case Av:if(t.length)return e4(t.props,function(a){switch(ZN(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mi([El(t,{props:[ze(a,/:(read-\w+)/,":"+Bu+"$1")]})],o);case"::placeholder":return Mi([El(t,{props:[ze(a,/:(plac\w+)/,":"+Ae+"input-$1")]}),El(t,{props:[ze(a,/:(plac\w+)/,":"+Bu+"$1")]}),El(t,{props:[ze(a,/:(plac\w+)/,Gt+"input-$1")]})],o)}return""})}},w4=[y4],T$=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(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var o=t.stylisPlugins||w4,a={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),_=1;_<E.length;_++)a[E[_]]=!0;l.push(w)});var c,u=[g4,v4];{var d,m=[c4,d4(function(w){d.insert(w)})],h=u4(u.concat(o,m)),g=function(E){return Mi(l4(E),h)};c=function(E,_,v,x){d=v,g(E?E+"{"+_.styles+"}":_.styles),x&&(y.inserted[_.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 Ke(){return Ke=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},Ke.apply(this,arguments)}var I$={exports:{}},Be={};/** @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 Lt=typeof Symbol=="function"&&Symbol.for,Lv=Lt?Symbol.for("react.element"):60103,Fv=Lt?Symbol.for("react.portal"):60106,Lp=Lt?Symbol.for("react.fragment"):60107,Fp=Lt?Symbol.for("react.strict_mode"):60108,Vp=Lt?Symbol.for("react.profiler"):60114,Bp=Lt?Symbol.for("react.provider"):60109,Up=Lt?Symbol.for("react.context"):60110,Vv=Lt?Symbol.for("react.async_mode"):60111,Wp=Lt?Symbol.for("react.concurrent_mode"):60111,Hp=Lt?Symbol.for("react.forward_ref"):60112,qp=Lt?Symbol.for("react.suspense"):60113,_4=Lt?Symbol.for("react.suspense_list"):60120,Qp=Lt?Symbol.for("react.memo"):60115,Gp=Lt?Symbol.for("react.lazy"):60116,x4=Lt?Symbol.for("react.block"):60121,b4=Lt?Symbol.for("react.fundamental"):60117,E4=Lt?Symbol.for("react.responder"):60118,S4=Lt?Symbol.for("react.scope"):60119;function Ar(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lv:switch(e=e.type,e){case Vv:case Wp:case Lp:case Vp:case Fp:case qp:return e;default:switch(e=e&&e.$$typeof,e){case Up:case Hp:case Gp:case Qp:case Bp:return e;default:return t}}case Fv:return t}}}function D$(e){return Ar(e)===Wp}Be.AsyncMode=Vv;Be.ConcurrentMode=Wp;Be.ContextConsumer=Up;Be.ContextProvider=Bp;Be.Element=Lv;Be.ForwardRef=Hp;Be.Fragment=Lp;Be.Lazy=Gp;Be.Memo=Qp;Be.Portal=Fv;Be.Profiler=Vp;Be.StrictMode=Fp;Be.Suspense=qp;Be.isAsyncMode=function(e){return D$(e)||Ar(e)===Vv};Be.isConcurrentMode=D$;Be.isContextConsumer=function(e){return Ar(e)===Up};Be.isContextProvider=function(e){return Ar(e)===Bp};Be.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lv};Be.isForwardRef=function(e){return Ar(e)===Hp};Be.isFragment=function(e){return Ar(e)===Lp};Be.isLazy=function(e){return Ar(e)===Gp};Be.isMemo=function(e){return Ar(e)===Qp};Be.isPortal=function(e){return Ar(e)===Fv};Be.isProfiler=function(e){return Ar(e)===Vp};Be.isStrictMode=function(e){return Ar(e)===Fp};Be.isSuspense=function(e){return Ar(e)===qp};Be.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Lp||e===Wp||e===Vp||e===Fp||e===qp||e===_4||typeof e=="object"&&e!==null&&(e.$$typeof===Gp||e.$$typeof===Qp||e.$$typeof===Bp||e.$$typeof===Up||e.$$typeof===Hp||e.$$typeof===b4||e.$$typeof===E4||e.$$typeof===S4||e.$$typeof===x4)};Be.typeOf=Ar;I$.exports=Be;var P4=I$.exports,N$=P4,$4={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},O4={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},A$={};A$[N$.ForwardRef]=$4;A$[N$.Memo]=O4;var C4=!0;function k4(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var j4=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||C4===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},M$=function(t,r,n){j4(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 R4(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 T4={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},I4=/[A-Z]|^ms/g,D4=/_EMO_([^_]+?)_([^]*?)_EMO_/g,z$=function(t){return t.charCodeAt(1)===45},d1=function(t){return t!=null&&typeof t!="boolean"},qm=f4(function(e){return z$(e)?e:e.replace(I4,"-$&").toLowerCase()}),f1=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(D4,function(n,o,a){return In={name:o,styles:a,next:In},o})}return T4[t]!==1&&!z$(t)&&typeof r=="number"&&r!==0?r+"px":r};function gs(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 In={name:r.name,styles:r.styles,next:In},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)In={name:n.name,styles:n.styles,next:In},n=n.next;var o=r.styles+";";return o}return N4(e,t,r)}case"function":{if(e!==void 0){var a=In,i=r(e);return In=a,gs(e,t,i)}break}}if(t==null)return r;var l=t[r];return l!==void 0?l:r}function N4(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=gs(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]+"}":d1(i)&&(n+=qm(a)+":"+f1(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++)d1(i[l])&&(n+=qm(a)+":"+f1(a,i[l])+";");else{var c=gs(e,t,i);switch(a){case"animation":case"animationName":{n+=qm(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var p1=/label:\s*([^\s;\n{]+)\s*(;|$)/g,In,Bv=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="";In=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,a+=gs(n,r,i)):a+=i[0];for(var l=1;l<t.length;l++)a+=gs(n,r,t[l]),o&&(a+=i[l]);p1.lastIndex=0;for(var c="",u;(u=p1.exec(a))!==null;)c+="-"+u[1];var d=R4(a)+c;return{name:d,styles:a,next:In}},A4=Fu["useInsertionEffect"]?Fu["useInsertionEffect"]:!1,m1=A4||f.useLayoutEffect,L$=f.createContext(typeof HTMLElement<"u"?T$({key:"css"}):null);L$.Provider;var M4=function(t){return f.forwardRef(function(r,n){var o=f.useContext(L$);return t(r,o,n)})},Yh=f.createContext({}),z4=function(t,r){if(typeof r=="function"){var n=r(t);return n}return Ke({},t,r)},L4=c1(function(e){return c1(function(t){return z4(e,t)})}),F4=function(t){var r=f.useContext(Yh);return t.theme!==r&&(r=L4(r)(t.theme)),f.createElement(Yh.Provider,{value:r},t.children)},Us=M4(function(e,t){var r=e.styles,n=Bv([r],void 0,f.useContext(Yh)),o=f.useRef();return m1(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]),m1(function(){var a=o.current,i=a[0],l=a[1];if(l){a[1]=!1;return}if(n.next!==void 0&&M$(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 V4(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Bv(t)}var B4=Object.defineProperty,U4=Object.defineProperties,W4=Object.getOwnPropertyDescriptors,h1=Object.getOwnPropertySymbols,H4=Object.prototype.hasOwnProperty,q4=Object.prototype.propertyIsEnumerable,g1=(e,t,r)=>t in e?B4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q4=(e,t)=>{for(var r in t||(t={}))H4.call(t,r)&&g1(e,r,t[r]);if(h1)for(var r of h1(t))q4.call(t,r)&&g1(e,r,t[r]);return e},G4=(e,t)=>U4(e,W4(t));function K4({theme:e}){return s.createElement(Us,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:G4(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 Sl(e,t,r,n=S){Object.keys(t).forEach(o=>{e[`--mantine-${r}-${o}`]=n(t[o])})}function Y4({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}`};Sl(t,e.shadows,"shadow"),Sl(t,e.fontSizes,"font-size"),Sl(t,e.radius,"radius"),Sl(t,e.spacing,"spacing"),Sl(t,e.breakpoints,"breakpoints",Rr),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(Us,{styles:{":root":t}})}var X4=Object.defineProperty,J4=Object.defineProperties,Z4=Object.getOwnPropertyDescriptors,v1=Object.getOwnPropertySymbols,eA=Object.prototype.hasOwnProperty,tA=Object.prototype.propertyIsEnumerable,y1=(e,t,r)=>t in e?X4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$n=(e,t)=>{for(var r in t||(t={}))eA.call(t,r)&&y1(e,r,t[r]);if(v1)for(var r of v1(t))tA.call(t,r)&&y1(e,r,t[r]);return e},Qm=(e,t)=>J4(e,Z4(t));function rA(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]=$n($n({},e.headings.sizes[c]),t.headings.sizes[c]),l),{}):e.headings.sizes;return Qm($n({},o),{headings:Qm($n($n({},e.headings),t.headings),{sizes:i})})}if(a==="breakpoints"&&t.breakpoints){const i=$n($n({},e.breakpoints),t.breakpoints);return Qm($n({},o),{breakpoints:Object.fromEntries(Object.entries(i).sort((l,c)=>_n(l[1])-_n(c[1])))})}return o[a]=typeof t[a]=="object"?$n($n({},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 nA(e,t){return E$(rA(e,t))}function F$(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}const oA={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 aA(){return s.createElement(Us,{styles:oA})}var iA=Object.defineProperty,w1=Object.getOwnPropertySymbols,lA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,_1=(e,t,r)=>t in e?iA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,es=(e,t)=>{for(var r in t||(t={}))lA.call(t,r)&&_1(e,r,t[r]);if(w1)for(var r of w1(t))sA.call(t,r)&&_1(e,r,t[r]);return e};const Uu=f.createContext({theme:Nv});function Zt(){var e;return((e=f.useContext(Uu))==null?void 0:e.theme)||Nv}function cA(e){const t=Zt(),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 V$(){var e;return(e=f.useContext(Uu))==null?void 0:e.emotionCache}function q(e,t,r){var n;const o=Zt(),a=(n=o.components[e])==null?void 0:n.defaultProps,i=typeof a=="function"?a(o):a;return es(es(es({},t),i),F$(r))}function B$({theme:e,emotionCache:t,withNormalizeCSS:r=!1,withGlobalStyles:n=!1,withCSSVariables:o=!1,inherit:a=!1,children:i}){const l=f.useContext(Uu),c=nA(Nv,a?es(es({},l.theme),e):e);return s.createElement(F4,{theme:c},s.createElement(Uu.Provider,{value:{theme:c,emotionCache:t}},r&&s.createElement(aA,null),n&&s.createElement(K4,{theme:c}),o&&s.createElement(Y4,{theme:c}),typeof c.globalStyles=="function"&&s.createElement(Us,{styles:c.globalStyles(c)}),i))}B$.displayName="@mantine/core/MantineProvider";const uA={app:100,modal:200,popover:300,overlay:400,max:9999};function yo(e){return uA[e]}function dA(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 fA=T$({key:"mantine",prepend:!0});function pA(){return V$()||fA}var mA=Object.defineProperty,x1=Object.getOwnPropertySymbols,hA=Object.prototype.hasOwnProperty,gA=Object.prototype.propertyIsEnumerable,b1=(e,t,r)=>t in e?mA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vA=(e,t)=>{for(var r in t||(t={}))hA.call(t,r)&&b1(e,r,t[r]);if(x1)for(var r of x1(t))gA.call(t,r)&&b1(e,r,t[r]);return e};const Gm="ref";function yA(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(!(Gm in r))return{args:e,ref:t};t=r[Gm];const n=vA({},r);return delete n[Gm],{args:[n],ref:t}}const{cssFactory:wA}=(()=>{function e(r,n,o){const a=[],i=k4(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}=yA(i),u=Bv(c,n.registered);return M$(n,u,!1),`${n.key}-${u.name}${l===void 0?"":` ${l}`}`};return{css:o,cx:(...i)=>e(n.registered,o,w$(i))}}return{cssFactory:t}})();function U$(){const e=pA();return dA(()=>wA({cache:e}),[e])}function _A({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 xA=Object.defineProperty,E1=Object.getOwnPropertySymbols,bA=Object.prototype.hasOwnProperty,EA=Object.prototype.propertyIsEnumerable,S1=(e,t,r)=>t in e?xA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Km=(e,t)=>{for(var r in t||(t={}))bA.call(t,r)&&S1(e,r,t[r]);if(E1)for(var r of E1(t))EA.call(t,r)&&S1(e,r,t[r]);return e};function Xh(e,t){return t&&Object.keys(t).forEach(r=>{e[r]?e[r]=Km(Km({},e[r]),t[r]):e[r]=Km({},t[r])}),e}function P1(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)=>Xh(a,i),{}):o(e)}function SA({ctx:e,theme:t,params:r,variant:n,size:o}){return e.reduce((a,i)=>(i.variants&&n in i.variants&&Xh(a,i.variants[n](t,r,{variant:n,size:o})),i.sizes&&o in i.sizes&&Xh(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=Zt(),i=cA(o==null?void 0:o.name),l=V$(),c={variant:o==null?void 0:o.variant,size:o==null?void 0:o.size},{css:u,cx:d}=U$(),m=t(a,n,c),h=P1(o==null?void 0:o.styles,a,n,c),g=P1(i,a,n,c),y=SA({ctx:i,theme:a,params:n,variant:o==null?void 0:o.variant,size:o==null?void 0:o.size}),w=Object.fromEntries(Object.keys(m).map(E=>{const _=d({[u(m[E])]:!(o!=null&&o.unstyled)},u(y[E]),u(g[E]),u(h[E]));return[E,_]}));return{classes:_A({cx:d,classes:w,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 Kt(e){return`___ref-${e||""}`}function W$({styles:e}){const t=Zt();return s.createElement(Us,{styles:V4(typeof e=="function"?e(t):e)})}var PA=Object.defineProperty,$A=Object.defineProperties,OA=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertySymbols,CA=Object.prototype.hasOwnProperty,kA=Object.prototype.propertyIsEnumerable,O1=(e,t,r)=>t in e?PA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pl=(e,t)=>{for(var r in t||(t={}))CA.call(t,r)&&O1(e,r,t[r]);if($1)for(var r of $1(t))kA.call(t,r)&&O1(e,r,t[r]);return e},$l=(e,t)=>$A(e,OA(t));const Ol={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${S(10)})`},transitionProperty:"transform, opacity"},$c={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:$l(Pl({},Ol),{common:{transformOrigin:"center center"}}),"pop-bottom-left":$l(Pl({},Ol),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":$l(Pl({},Ol),{common:{transformOrigin:"bottom right"}}),"pop-top-left":$l(Pl({},Ol),{common:{transformOrigin:"top left"}}),"pop-top-right":$l(Pl({},Ol),{common:{transformOrigin:"top right"}})},C1=["mousedown","touchstart"];function jA(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||C1).forEach(a=>document.addEventListener(a,o)),()=>{(t||C1).forEach(a=>document.removeEventListener(a,o))}},[n,e,r]),n}function RA(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function TA(e,t){return typeof t=="boolean"?t:typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function IA(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){const[n,o]=f.useState(r?t:TA(e,t)),a=f.useRef();return f.useEffect(()=>{if("matchMedia"in window)return a.current=window.matchMedia(e),o(a.current.matches),RA(a.current,i=>o(i.matches))},[e]),n}const H$=typeof document<"u"?f.useLayoutEffect:f.useEffect;function hn(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 hn(()=>{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 DA=/input|select|textarea|button|object/,Q$="a, input, select, textarea, button, object, [tabindex]";function NA(e){return e.style.display==="none"}function AA(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(NA(r))return!1;r=r.parentNode}return!0}function G$(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Jh(e){const t=e.nodeName.toLowerCase(),r=!Number.isNaN(G$(e));return(DA.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&AA(e)}function K$(e){const t=G$(e);return(Number.isNaN(t)||t>=0)&&Jh(e)}function MA(e){return Array.from(e.querySelectorAll(Q$)).filter(K$)}function zA(e,t){const r=MA(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 Kp(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function LA(e,t="body > :not(script)"){const r=Kp(),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 FA(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(Q$));i=l.find(K$)||l.find(Jh)||null,!i&&Jh(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=LA(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&&zA(t.current,i)};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a),r.current&&r.current()}},[e]),o}const VA=e=>(e+1)%1e6;function BA(){const[,e]=f.useReducer(VA,0);return e}const UA=s["useId".toString()]||(()=>{});function WA(){const e=UA();return e?`mantine-${e.replace(/:/g,"")}`:""}function Mr(e){const t=WA(),[r,n]=f.useState(t);return H$(()=>{n(Kp())},[]),typeof e=="string"?e:typeof window>"u"?t:r}function Zh(e,t,r){f.useEffect(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function Y$(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function HA(...e){return t=>{e.forEach(r=>Y$(r,t))}}function Yp(...e){return f.useCallback(HA(...e),e)}function vr({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 Oc="dots";function qA({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]=vr({value:n,onChange:a,defaultValue:o,finalValue:o}),u=w=>{w<=0?c(1):w>i?c(i):c(w)},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),_=Math.min(l+t,i-r),v=E>r+2,x=_<i-(r+1);if(!v&&x){const b=t*2+r+2;return[...ko(1,b),Oc,...ko(i-(r-1),i)]}if(v&&!x){const b=r+1+2*t;return[...ko(1,r),Oc,...ko(i-b,i)]}return[...ko(1,r),Oc,...ko(E,_),Oc,...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 Xp(e,t){return IA("(prefers-reduced-motion: reduce)",e,t)}const GA=e=>e<.5?2*e*e:-1+(4-2*e)*e,KA=({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},YA=({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]},XA=({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 JA({duration:e=1250,axis:t="y",onScrollFinish:r,easing:n=GA,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=Xp(),g=()=>{l.current&&cancelAnimationFrame(l.current)},y=f.useCallback(({alignment:E="start"}={})=>{var _;u.current=!1,l.current&&g();const v=(_=YA({parent:d.current,axis:t}))!=null?_:0,x=KA({parent:d.current,target:m.current,axis:t,alignment:E,offset:o,isList:i})-(d.current?0:v);function b(){c.current===0&&(c.current=performance.now());const O=performance.now()-c.current,$=h||e===0?1:O/e,C=v+x*n($);XA({parent:d.current,axis:t,distance:C}),!u.current&&$<1?l.current=requestAnimationFrame(b):(typeof r=="function"&&r(),c.current=0,l.current=0,g())}b()},[t,e,n,i,o,r,h]),w=()=>{a&&(u.current=!0)};return Zh("wheel",w,{passive:!0}),Zh("touchmove",w,{passive:!0}),f.useEffect(()=>g,[]),{scrollableRef:d,targetRef:m,scrollIntoView:y,cancel:g}}function ZA(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 k1(e){return typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1)}var j1=Object.getOwnPropertySymbols,e6=Object.prototype.hasOwnProperty,t6=Object.prototype.propertyIsEnumerable,r6=(e,t)=>{var r={};for(var n in e)e6.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&j1)for(var n of j1(e))t.indexOf(n)<0&&t6.call(e,n)&&(r[n]=e[n]);return r};function Hn(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:w,bg:E,c:_,opacity:v,ff:x,fz:b,fw:P,lts:O,ta:$,lh:C,fs:R,tt:j,td:k,w:T,miw:L,maw:B,h:V,mih:M,mah:Q,bgsz:A,bgp:z,bgr:H,bga:ie,pos:we,top:Ie,left:de,bottom:He,right:Le,inset:wt,display:tt}=t,Er=r6(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:F$({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:w,bg:E,c:_,opacity:v,ff:x,fz:b,fw:P,lts:O,ta:$,lh:C,fs:R,tt:j,td:k,w:T,miw:L,maw:B,h:V,mih:M,mah:Q,bgsz:A,bgp:z,bgr:H,bga:ie,pos:we,top:Ie,left:de,bottom:He,right:Le,inset:wt,display:tt}),rest:Er}}function n6(e,t){const r=Object.keys(e).filter(n=>n!=="base").sort((n,o)=>_n(N({size:n,sizes:t.breakpoints}))-_n(N({size:o,sizes:t.breakpoints})));return"base"in e?["base",...r]:r}function o6({value:e,theme:t,getValue:r,property:n}){if(e==null)return;if(typeof e=="object")return n6(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 a6(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 i6(e){return S(e)}function l6(e){return e}function s6(e,t){return N({size:e,sizes:t.fontSizes})}const c6=["-xs","-sm","-md","-lg","-xl"];function u6(e,t){return c6.includes(e)?`calc(${N({size:e.replace("-",""),sizes:t.spacing})} * -1)`:N({size:e,sizes:t.spacing})}const d6={identity:l6,color:a6,size:i6,fontSize:s6,spacing:u6},f6={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 p6=Object.defineProperty,R1=Object.getOwnPropertySymbols,m6=Object.prototype.hasOwnProperty,h6=Object.prototype.propertyIsEnumerable,T1=(e,t,r)=>t in e?p6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I1=(e,t)=>{for(var r in t||(t={}))m6.call(t,r)&&T1(e,r,t[r]);if(R1)for(var r of R1(t))h6.call(t,r)&&T1(e,r,t[r]);return e};function D1(e,t,r=f6){return Object.keys(r).reduce((o,a)=>(a in e&&e[a]!==void 0&&o.push(o6({value:e[a],getValue:d6[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]=I1(I1({},o[i]),a[i]):o[i]=a[i]}),o),{})}function N1(e,t){return typeof e=="function"?e(t):e}function g6(e,t,r){const n=Zt(),{css:o,cx:a}=U$();return Array.isArray(e)?a(r,o(D1(t,n)),e.map(i=>o(N1(i,n)))):a(r,o(N1(e,n)),o(D1(t,n)))}var v6=Object.defineProperty,Wu=Object.getOwnPropertySymbols,X$=Object.prototype.hasOwnProperty,J$=Object.prototype.propertyIsEnumerable,A1=(e,t,r)=>t in e?v6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y6=(e,t)=>{for(var r in t||(t={}))X$.call(t,r)&&A1(e,r,t[r]);if(Wu)for(var r of Wu(t))J$.call(t,r)&&A1(e,r,t[r]);return e},w6=(e,t)=>{var r={};for(var n in e)X$.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wu)for(var n of Wu(e))t.indexOf(n)<0&&J$.call(e,n)&&(r[n]=e[n]);return r};const Z$=f.forwardRef((e,t)=>{var r=e,{className:n,component:o,style:a,sx:i}=r,l=w6(r,["className","component","style","sx"]);const{systemStyles:c,rest:u}=Hn(l),d=o||"div";return s.createElement(d,y6({ref:t,className:g6(i,c,n),style:a},u))});Z$.displayName="@mantine/core/Box";const ue=Z$;var _6=Object.defineProperty,x6=Object.defineProperties,b6=Object.getOwnPropertyDescriptors,M1=Object.getOwnPropertySymbols,E6=Object.prototype.hasOwnProperty,S6=Object.prototype.propertyIsEnumerable,z1=(e,t,r)=>t in e?_6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L1=(e,t)=>{for(var r in t||(t={}))E6.call(t,r)&&z1(e,r,t[r]);if(M1)for(var r of M1(t))S6.call(t,r)&&z1(e,r,t[r]);return e},P6=(e,t)=>x6(e,b6(t)),$6=W(e=>({root:P6(L1(L1({},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 O6=$6;var C6=Object.defineProperty,Hu=Object.getOwnPropertySymbols,eO=Object.prototype.hasOwnProperty,tO=Object.prototype.propertyIsEnumerable,F1=(e,t,r)=>t in e?C6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k6=(e,t)=>{for(var r in t||(t={}))eO.call(t,r)&&F1(e,r,t[r]);if(Hu)for(var r of Hu(t))tO.call(t,r)&&F1(e,r,t[r]);return e},j6=(e,t)=>{var r={};for(var n in e)eO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Hu)for(var n of Hu(e))t.indexOf(n)<0&&tO.call(e,n)&&(r[n]=e[n]);return r};const rO=f.forwardRef((e,t)=>{const r=q("UnstyledButton",{},e),{className:n,component:o="button",unstyled:a,variant:i}=r,l=j6(r,["className","component","unstyled","variant"]),{classes:c,cx:u}=O6(null,{name:"UnstyledButton",unstyled:a,variant:i});return s.createElement(ue,k6({component:o,ref:t,className:u(c.root,n),type:o==="button"?"button":void 0},l))});rO.displayName="@mantine/core/UnstyledButton";const Jo=rO;var nO={exports:{}},zr={},oO={exports:{}},aO={};/**
|
|
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 H=A.length;A.push(z);e:for(;0<H;){var ie=H-1>>>1,we=A[ie];if(0<o(we,z))A[ie]=z,A[H]=we,H=ie;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],H=A.pop();if(H!==z){A[0]=H;e:for(var ie=0,we=A.length,Ie=we>>>1;ie<Ie;){var de=2*(ie+1)-1,He=A[de],Le=de+1,wt=A[Le];if(0>o(He,H))Le<we&&0>o(wt,He)?(A[ie]=wt,A[Le]=H,ie=Le):(A[ie]=He,A[de]=H,ie=de);else if(Le<we&&0>o(wt,H))A[ie]=wt,A[Le]=H,ie=Le;else break e}}return z}function o(A,z){var H=A.sortIndex-z.sortIndex;return H!==0?H: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,w=!1,E=typeof setTimeout=="function"?setTimeout:null,_=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 x(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 b(A){if(w=!1,x(A),!y)if(r(c)!==null)y=!0,M(P);else{var z=r(u);z!==null&&Q(b,z.startTime-A)}}function P(A,z){y=!1,w&&(w=!1,_(C),C=-1),g=!0;var H=h;try{for(x(z),m=r(c);m!==null&&(!(m.expirationTime>z)||A&&!k());){var ie=m.callback;if(typeof ie=="function"){m.callback=null,h=m.priorityLevel;var we=ie(m.expirationTime<=z);z=e.unstable_now(),typeof we=="function"?m.callback=we:m===r(c)&&n(c),x(z)}else n(c);m=r(c)}if(m!==null)var Ie=!0;else{var de=r(u);de!==null&&Q(b,de.startTime-z),Ie=!1}return Ie}finally{m=null,h=H,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 B=new MessageChannel,V=B.port2;B.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 H=h;h=z;try{return A()}finally{h=H}},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 H=h;h=A;try{return z()}finally{h=H}},e.unstable_scheduleCallback=function(A,z,H){var ie=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?ie+H:ie):H=ie,A){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=H+we,A={id:d++,callback:z,priorityLevel:A,startTime:H,expirationTime:we,sortIndex:-1},H>ie?(A.sortIndex=H,t(u,A),r(c)===null&&A===r(u)&&(w?(_(C),C=-1):w=!0,Q(b,H-ie))):(A.sortIndex=we,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 H=h;h=z;try{return A.apply(this,arguments)}finally{h=H}}}})(aO);oO.exports=aO;var R6=oO.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 iO=f,Nr=R6;function U(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 lO=new Set,vs={};function Xa(e,t){Yi(e,t),Yi(e+"Capture",t)}function Yi(e,t){for(vs[e]=t,e=0;e<t.length;e++)lO.add(t[e])}var so=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eg=Object.prototype.hasOwnProperty,T6=/^[: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]*$/,V1={},B1={};function I6(e){return eg.call(B1,e)?!0:eg.call(V1,e)?!1:T6.test(e)?B1[e]=!0:(V1[e]=!0,!1)}function D6(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 N6(e,t,r,n){if(t===null||typeof t>"u"||D6(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 or(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 Wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wt[e]=new or(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wt[t]=new or(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wt[e]=new or(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Wt[e]=new or(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){Wt[e]=new or(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Wt[e]=new or(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Wt[e]=new or(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Wt[e]=new or(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Wt[e]=new or(e,5,!1,e.toLowerCase(),null,!1,!1)});var Uv=/[\-:]([a-z])/g;function Wv(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(Uv,Wv);Wt[t]=new or(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(Uv,Wv);Wt[t]=new or(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(Uv,Wv);Wt[t]=new or(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Wt[e]=new or(e,1,!1,e.toLowerCase(),null,!1,!1)});Wt.xlinkHref=new or("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Wt[e]=new or(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hv(e,t,r,n){var o=Wt.hasOwnProperty(t)?Wt[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(N6(t,r,o,n)&&(r=null),n||o===null?I6(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 wo=iO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Cc=Symbol.for("react.element"),xi=Symbol.for("react.portal"),bi=Symbol.for("react.fragment"),qv=Symbol.for("react.strict_mode"),tg=Symbol.for("react.profiler"),sO=Symbol.for("react.provider"),cO=Symbol.for("react.context"),Qv=Symbol.for("react.forward_ref"),rg=Symbol.for("react.suspense"),ng=Symbol.for("react.suspense_list"),Gv=Symbol.for("react.memo"),Io=Symbol.for("react.lazy"),uO=Symbol.for("react.offscreen"),U1=Symbol.iterator;function Cl(e){return e===null||typeof e!="object"?null:(e=U1&&e[U1]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,Ym;function Gl(e){if(Ym===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Ym=t&&t[1]||""}return`
|
|
81
|
+
`+Ym+e}var Xm=!1;function Jm(e,t){if(!e||Xm)return"";Xm=!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{Xm=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Gl(e):""}function A6(e){switch(e.tag){case 5:return Gl(e.type);case 16:return Gl("Lazy");case 13:return Gl("Suspense");case 19:return Gl("SuspenseList");case 0:case 2:case 15:return e=Jm(e.type,!1),e;case 11:return e=Jm(e.type.render,!1),e;case 1:return e=Jm(e.type,!0),e;default:return""}}function og(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 bi:return"Fragment";case xi:return"Portal";case tg:return"Profiler";case qv:return"StrictMode";case rg:return"Suspense";case ng:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cO:return(e.displayName||"Context")+".Consumer";case sO:return(e._context.displayName||"Context")+".Provider";case Qv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gv:return t=e.displayName||null,t!==null?t:og(e.type)||"Memo";case Io:t=e._payload,e=e._init;try{return og(e(t))}catch{}}return null}function M6(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 og(t);case 8:return t===qv?"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 dO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function z6(e){var t=dO(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 kc(e){e._valueTracker||(e._valueTracker=z6(e))}function fO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=dO(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function qu(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 ag(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function W1(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 pO(e,t){t=t.checked,t!=null&&Hv(e,"checked",t,!1)}function ig(e,t){pO(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")?lg(e,t.type,r):t.hasOwnProperty("defaultValue")&&lg(e,t.type,Zo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function H1(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 lg(e,t,r){(t!=="number"||qu(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Kl=Array.isArray;function zi(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 sg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function q1(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(U(92));if(Kl(r)){if(1<r.length)throw Error(U(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Zo(r)}}function mO(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 hO(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 cg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hO(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var jc,gO=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(jc=jc||document.createElement("div"),jc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=jc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ys(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ts={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},L6=["Webkit","ms","Moz","O"];Object.keys(ts).forEach(function(e){L6.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ts[t]=ts[e]})});function vO(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ts.hasOwnProperty(e)&&ts[e]?(""+t).trim():t+"px"}function yO(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=vO(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var F6=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 ug(e,t){if(t){if(F6[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function dg(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 fg=null;function Kv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pg=null,Li=null,Fi=null;function G1(e){if(e=qs(e)){if(typeof pg!="function")throw Error(U(280));var t=e.stateNode;t&&(t=rm(t),pg(e.stateNode,e.type,t))}}function wO(e){Li?Fi?Fi.push(e):Fi=[e]:Li=e}function _O(){if(Li){var e=Li,t=Fi;if(Fi=Li=null,G1(e),t)for(e=0;e<t.length;e++)G1(t[e])}}function xO(e,t){return e(t)}function bO(){}var Zm=!1;function EO(e,t,r){if(Zm)return e(t,r);Zm=!0;try{return xO(e,t,r)}finally{Zm=!1,(Li!==null||Fi!==null)&&(bO(),_O())}}function ws(e,t){var r=e.stateNode;if(r===null)return null;var n=rm(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(U(231,t,typeof r));return r}var mg=!1;if(so)try{var kl={};Object.defineProperty(kl,"passive",{get:function(){mg=!0}}),window.addEventListener("test",kl,kl),window.removeEventListener("test",kl,kl)}catch{mg=!1}function V6(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 rs=!1,Qu=null,Gu=!1,hg=null,B6={onError:function(e){rs=!0,Qu=e}};function U6(e,t,r,n,o,a,i,l,c){rs=!1,Qu=null,V6.apply(B6,arguments)}function W6(e,t,r,n,o,a,i,l,c){if(U6.apply(this,arguments),rs){if(rs){var u=Qu;rs=!1,Qu=null}else throw Error(U(198));Gu||(Gu=!0,hg=u)}}function Ja(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 SO(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 K1(e){if(Ja(e)!==e)throw Error(U(188))}function H6(e){var t=e.alternate;if(!t){if(t=Ja(e),t===null)throw Error(U(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 K1(o),e;if(a===n)return K1(o),t;a=a.sibling}throw Error(U(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(U(189))}}if(r.alternate!==n)throw Error(U(190))}if(r.tag!==3)throw Error(U(188));return r.stateNode.current===r?e:t}function PO(e){return e=H6(e),e!==null?$O(e):null}function $O(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=$O(e);if(t!==null)return t;e=e.sibling}return null}var OO=Nr.unstable_scheduleCallback,Y1=Nr.unstable_cancelCallback,q6=Nr.unstable_shouldYield,Q6=Nr.unstable_requestPaint,bt=Nr.unstable_now,G6=Nr.unstable_getCurrentPriorityLevel,Yv=Nr.unstable_ImmediatePriority,CO=Nr.unstable_UserBlockingPriority,Ku=Nr.unstable_NormalPriority,K6=Nr.unstable_LowPriority,kO=Nr.unstable_IdlePriority,Jp=null,Ln=null;function Y6(e){if(Ln&&typeof Ln.onCommitFiberRoot=="function")try{Ln.onCommitFiberRoot(Jp,e,void 0,(e.current.flags&128)===128)}catch{}}var gn=Math.clz32?Math.clz32:Z6,X6=Math.log,J6=Math.LN2;function Z6(e){return e>>>=0,e===0?32:31-(X6(e)/J6|0)|0}var Rc=64,Tc=4194304;function Yl(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 Yu(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=Yl(l):(a&=i,a!==0&&(n=Yl(a)))}else i=r&~o,i!==0?n=Yl(i):a!==0&&(n=Yl(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-gn(t),o=1<<r,n|=e[r],t&=~o;return n}function eM(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 tM(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-gn(a),l=1<<i,c=o[i];c===-1?(!(l&r)||l&n)&&(o[i]=eM(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function gg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jO(){var e=Rc;return Rc<<=1,!(Rc&4194240)&&(Rc=64),e}function eh(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ws(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gn(t),e[t]=r}function rM(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-gn(r),a=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~a}}function Xv(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-gn(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Ve=0;function RO(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var TO,Jv,IO,DO,NO,vg=!1,Ic=[],Bo=null,Uo=null,Wo=null,_s=new Map,xs=new Map,Mo=[],nM="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 X1(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":_s.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xs.delete(t.pointerId)}}function jl(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=qs(t),t!==null&&Jv(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function oM(e,t,r,n,o){switch(t){case"focusin":return Bo=jl(Bo,e,t,r,n,o),!0;case"dragenter":return Uo=jl(Uo,e,t,r,n,o),!0;case"mouseover":return Wo=jl(Wo,e,t,r,n,o),!0;case"pointerover":var a=o.pointerId;return _s.set(a,jl(_s.get(a)||null,e,t,r,n,o)),!0;case"gotpointercapture":return a=o.pointerId,xs.set(a,jl(xs.get(a)||null,e,t,r,n,o)),!0}return!1}function AO(e){var t=Ca(e.target);if(t!==null){var r=Ja(t);if(r!==null){if(t=r.tag,t===13){if(t=SO(r),t!==null){e.blockedOn=t,NO(e.priority,function(){IO(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 Su(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=yg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);fg=n,r.target.dispatchEvent(n),fg=null}else return t=qs(r),t!==null&&Jv(t),e.blockedOn=r,!1;t.shift()}return!0}function J1(e,t,r){Su(e)&&r.delete(t)}function aM(){vg=!1,Bo!==null&&Su(Bo)&&(Bo=null),Uo!==null&&Su(Uo)&&(Uo=null),Wo!==null&&Su(Wo)&&(Wo=null),_s.forEach(J1),xs.forEach(J1)}function Rl(e,t){e.blockedOn===t&&(e.blockedOn=null,vg||(vg=!0,Nr.unstable_scheduleCallback(Nr.unstable_NormalPriority,aM)))}function bs(e){function t(o){return Rl(o,e)}if(0<Ic.length){Rl(Ic[0],e);for(var r=1;r<Ic.length;r++){var n=Ic[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Bo!==null&&Rl(Bo,e),Uo!==null&&Rl(Uo,e),Wo!==null&&Rl(Wo,e),_s.forEach(t),xs.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);)AO(r),r.blockedOn===null&&Mo.shift()}var Vi=wo.ReactCurrentBatchConfig,Xu=!0;function iM(e,t,r,n){var o=Ve,a=Vi.transition;Vi.transition=null;try{Ve=1,Zv(e,t,r,n)}finally{Ve=o,Vi.transition=a}}function lM(e,t,r,n){var o=Ve,a=Vi.transition;Vi.transition=null;try{Ve=4,Zv(e,t,r,n)}finally{Ve=o,Vi.transition=a}}function Zv(e,t,r,n){if(Xu){var o=yg(e,t,r,n);if(o===null)uh(e,t,n,Ju,r),X1(e,n);else if(oM(o,e,t,r,n))n.stopPropagation();else if(X1(e,n),t&4&&-1<nM.indexOf(e)){for(;o!==null;){var a=qs(o);if(a!==null&&TO(a),a=yg(e,t,r,n),a===null&&uh(e,t,n,Ju,r),a===o)break;o=a}o!==null&&n.stopPropagation()}else uh(e,t,n,null,r)}}var Ju=null;function yg(e,t,r,n){if(Ju=null,e=Kv(n),e=Ca(e),e!==null)if(t=Ja(e),t===null)e=null;else if(r=t.tag,r===13){if(e=SO(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 Ju=e,null}function MO(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(G6()){case Yv:return 1;case CO:return 4;case Ku:case K6:return 16;case kO:return 536870912;default:return 16}default:return 16}}var Lo=null,ey=null,Pu=null;function zO(){if(Pu)return Pu;var e,t=ey,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 Pu=o.slice(e,1<n?1-n:void 0)}function $u(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 Dc(){return!0}function Z1(){return!1}function Lr(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)?Dc:Z1,this.isPropagationStopped=Z1,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=Dc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Dc)},persist:function(){},isPersistent:Dc}),t}var pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ty=Lr(pl),Hs=pt({},pl,{view:0,detail:0}),sM=Lr(Hs),th,rh,Tl,Zp=pt({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ry,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!==Tl&&(Tl&&e.type==="mousemove"?(th=e.screenX-Tl.screenX,rh=e.screenY-Tl.screenY):rh=th=0,Tl=e),th)},movementY:function(e){return"movementY"in e?e.movementY:rh}}),ew=Lr(Zp),cM=pt({},Zp,{dataTransfer:0}),uM=Lr(cM),dM=pt({},Hs,{relatedTarget:0}),nh=Lr(dM),fM=pt({},pl,{animationName:0,elapsedTime:0,pseudoElement:0}),pM=Lr(fM),mM=pt({},pl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hM=Lr(mM),gM=pt({},pl,{data:0}),tw=Lr(gM),vM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yM={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"},wM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _M(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wM[e])?!!t[e]:!1}function ry(){return _M}var xM=pt({},Hs,{key:function(e){if(e.key){var t=vM[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$u(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yM[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ry,charCode:function(e){return e.type==="keypress"?$u(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$u(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bM=Lr(xM),EM=pt({},Zp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rw=Lr(EM),SM=pt({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ry}),PM=Lr(SM),$M=pt({},pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),OM=Lr($M),CM=pt({},Zp,{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}),kM=Lr(CM),jM=[9,13,27,32],ny=so&&"CompositionEvent"in window,ns=null;so&&"documentMode"in document&&(ns=document.documentMode);var RM=so&&"TextEvent"in window&&!ns,LO=so&&(!ny||ns&&8<ns&&11>=ns),nw=String.fromCharCode(32),ow=!1;function FO(e,t){switch(e){case"keyup":return jM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ei=!1;function TM(e,t){switch(e){case"compositionend":return VO(t);case"keypress":return t.which!==32?null:(ow=!0,nw);case"textInput":return e=t.data,e===nw&&ow?null:e;default:return null}}function IM(e,t){if(Ei)return e==="compositionend"||!ny&&FO(e,t)?(e=zO(),Pu=ey=Lo=null,Ei=!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 LO&&t.locale!=="ko"?null:t.data;default:return null}}var DM={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 aw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!DM[e.type]:t==="textarea"}function BO(e,t,r,n){wO(n),t=Zu(t,"onChange"),0<t.length&&(r=new ty("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var os=null,Es=null;function NM(e){ZO(e,0)}function em(e){var t=$i(e);if(fO(t))return e}function AM(e,t){if(e==="change")return t}var UO=!1;if(so){var oh;if(so){var ah="oninput"in document;if(!ah){var iw=document.createElement("div");iw.setAttribute("oninput","return;"),ah=typeof iw.oninput=="function"}oh=ah}else oh=!1;UO=oh&&(!document.documentMode||9<document.documentMode)}function lw(){os&&(os.detachEvent("onpropertychange",WO),Es=os=null)}function WO(e){if(e.propertyName==="value"&&em(Es)){var t=[];BO(t,Es,e,Kv(e)),EO(NM,t)}}function MM(e,t,r){e==="focusin"?(lw(),os=t,Es=r,os.attachEvent("onpropertychange",WO)):e==="focusout"&&lw()}function zM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return em(Es)}function LM(e,t){if(e==="click")return em(t)}function FM(e,t){if(e==="input"||e==="change")return em(t)}function VM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:VM;function Ss(e,t){if(xn(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(!eg.call(t,o)||!xn(e[o],t[o]))return!1}return!0}function sw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cw(e,t){var r=sw(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=sw(r)}}function HO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?HO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qO(){for(var e=window,t=qu();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=qu(e.document)}return t}function oy(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 BM(e){var t=qO(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&HO(r.ownerDocument.documentElement,r)){if(n!==null&&oy(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=cw(r,a);var i=cw(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 UM=so&&"documentMode"in document&&11>=document.documentMode,Si=null,wg=null,as=null,_g=!1;function uw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;_g||Si==null||Si!==qu(n)||(n=Si,"selectionStart"in n&&oy(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}),as&&Ss(as,n)||(as=n,n=Zu(wg,"onSelect"),0<n.length&&(t=new ty("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Si)))}function Nc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Pi={animationend:Nc("Animation","AnimationEnd"),animationiteration:Nc("Animation","AnimationIteration"),animationstart:Nc("Animation","AnimationStart"),transitionend:Nc("Transition","TransitionEnd")},ih={},QO={};so&&(QO=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function tm(e){if(ih[e])return ih[e];if(!Pi[e])return e;var t=Pi[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in QO)return ih[e]=t[r];return e}var GO=tm("animationend"),KO=tm("animationiteration"),YO=tm("animationstart"),XO=tm("transitionend"),JO=new Map,dw="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){JO.set(e,t),Xa(t,[e])}for(var lh=0;lh<dw.length;lh++){var sh=dw[lh],WM=sh.toLowerCase(),HM=sh[0].toUpperCase()+sh.slice(1);ia(WM,"on"+HM)}ia(GO,"onAnimationEnd");ia(KO,"onAnimationIteration");ia(YO,"onAnimationStart");ia("dblclick","onDoubleClick");ia("focusin","onFocus");ia("focusout","onBlur");ia(XO,"onTransitionEnd");Yi("onMouseEnter",["mouseout","mouseover"]);Yi("onMouseLeave",["mouseout","mouseover"]);Yi("onPointerEnter",["pointerout","pointerover"]);Yi("onPointerLeave",["pointerout","pointerover"]);Xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Xa("onBeforeInput",["compositionend","keypress","textInput","paste"]);Xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xl="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(" "),qM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xl));function fw(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,W6(n,t,void 0,e),e.currentTarget=null}function ZO(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;fw(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;fw(o,l,u),a=c}}}if(Gu)throw e=hg,Gu=!1,hg=null,e}function Je(e,t){var r=t[Pg];r===void 0&&(r=t[Pg]=new Set);var n=e+"__bubble";r.has(n)||(eC(t,e,2,!1),r.add(n))}function ch(e,t,r){var n=0;t&&(n|=4),eC(r,e,n,t)}var Ac="_reactListening"+Math.random().toString(36).slice(2);function Ps(e){if(!e[Ac]){e[Ac]=!0,lO.forEach(function(r){r!=="selectionchange"&&(qM.has(r)||ch(r,!1,e),ch(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ac]||(t[Ac]=!0,ch("selectionchange",!1,t))}}function eC(e,t,r,n){switch(MO(t)){case 1:var o=iM;break;case 4:o=lM;break;default:o=Zv}r=o.bind(null,t,r,e),o=void 0,!mg||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 uh(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=Ca(l),i===null)return;if(c=i.tag,c===5||c===6){n=a=i;continue e}l=l.parentNode}}n=n.return}EO(function(){var u=a,d=Kv(r),m=[];e:{var h=JO.get(e);if(h!==void 0){var g=ty,y=e;switch(e){case"keypress":if($u(r)===0)break e;case"keydown":case"keyup":g=bM;break;case"focusin":y="focus",g=nh;break;case"focusout":y="blur",g=nh;break;case"beforeblur":case"afterblur":g=nh;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=ew;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=uM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=PM;break;case GO:case KO:case YO:g=pM;break;case XO:g=OM;break;case"scroll":g=sM;break;case"wheel":g=kM;break;case"copy":case"cut":case"paste":g=hM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=rw}var w=(t&4)!==0,E=!w&&e==="scroll",_=w?h!==null?h+"Capture":null:h;w=[];for(var v=u,x;v!==null;){x=v;var b=x.stateNode;if(x.tag===5&&b!==null&&(x=b,_!==null&&(b=ws(v,_),b!=null&&w.push($s(v,b,x)))),E)break;v=v.return}0<w.length&&(h=new g(h,y,null,r,d),m.push({event:h,listeners:w}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&r!==fg&&(y=r.relatedTarget||r.fromElement)&&(Ca(y)||y[co]))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?Ca(y):null,y!==null&&(E=Ja(y),y!==E||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=u),g!==y)){if(w=ew,b="onMouseLeave",_="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(w=rw,b="onPointerLeave",_="onPointerEnter",v="pointer"),E=g==null?h:$i(g),x=y==null?h:$i(y),h=new w(b,v+"leave",g,r,d),h.target=E,h.relatedTarget=x,b=null,Ca(d)===u&&(w=new w(_,v+"enter",y,r,d),w.target=x,w.relatedTarget=E,b=w),E=b,g&&y)t:{for(w=g,_=y,v=0,x=w;x;x=ui(x))v++;for(x=0,b=_;b;b=ui(b))x++;for(;0<v-x;)w=ui(w),v--;for(;0<x-v;)_=ui(_),x--;for(;v--;){if(w===_||_!==null&&w===_.alternate)break t;w=ui(w),_=ui(_)}w=null}else w=null;g!==null&&pw(m,h,g,w,!1),y!==null&&E!==null&&pw(m,E,y,w,!0)}}e:{if(h=u?$i(u):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var P=AM;else if(aw(h))if(UO)P=FM;else{P=zM;var O=MM}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(P=LM);if(P&&(P=P(e,u))){BO(m,P,r,d);break e}O&&O(e,h,u),e==="focusout"&&(O=h._wrapperState)&&O.controlled&&h.type==="number"&&lg(h,"number",h.value)}switch(O=u?$i(u):window,e){case"focusin":(aw(O)||O.contentEditable==="true")&&(Si=O,wg=u,as=null);break;case"focusout":as=wg=Si=null;break;case"mousedown":_g=!0;break;case"contextmenu":case"mouseup":case"dragend":_g=!1,uw(m,r,d);break;case"selectionchange":if(UM)break;case"keydown":case"keyup":uw(m,r,d)}var $;if(ny)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 Ei?FO(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(LO&&r.locale!=="ko"&&(Ei||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ei&&($=zO()):(Lo=d,ey="value"in Lo?Lo.value:Lo.textContent,Ei=!0)),O=Zu(u,C),0<O.length&&(C=new tw(C,e,null,r,d),m.push({event:C,listeners:O}),$?C.data=$:($=VO(r),$!==null&&(C.data=$)))),($=RM?TM(e,r):IM(e,r))&&(u=Zu(u,"onBeforeInput"),0<u.length&&(d=new tw("onBeforeInput","beforeinput",null,r,d),m.push({event:d,listeners:u}),d.data=$))}ZO(m,t)})}function $s(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Zu(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,a=o.stateNode;o.tag===5&&a!==null&&(o=a,a=ws(e,r),a!=null&&n.unshift($s(e,a,o)),a=ws(e,t),a!=null&&n.push($s(e,a,o))),e=e.return}return n}function ui(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pw(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=ws(r,a),c!=null&&i.unshift($s(r,c,l))):o||(c=ws(r,a),c!=null&&i.push($s(r,c,l)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var QM=/\r\n?/g,GM=/\u0000|\uFFFD/g;function mw(e){return(typeof e=="string"?e:""+e).replace(QM,`
|
|
85
|
+
`).replace(GM,"")}function Mc(e,t,r){if(t=mw(t),mw(e)!==t&&r)throw Error(U(425))}function ed(){}var xg=null,bg=null;function Eg(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 Sg=typeof setTimeout=="function"?setTimeout:void 0,KM=typeof clearTimeout=="function"?clearTimeout:void 0,hw=typeof Promise=="function"?Promise:void 0,YM=typeof queueMicrotask=="function"?queueMicrotask:typeof hw<"u"?function(e){return hw.resolve(null).then(e).catch(XM)}:Sg;function XM(e){setTimeout(function(){throw e})}function dh(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),bs(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);bs(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 gw(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 ml=Math.random().toString(36).slice(2),Mn="__reactFiber$"+ml,Os="__reactProps$"+ml,co="__reactContainer$"+ml,Pg="__reactEvents$"+ml,JM="__reactListeners$"+ml,ZM="__reactHandles$"+ml;function Ca(e){var t=e[Mn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[co]||r[Mn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=gw(e);e!==null;){if(r=e[Mn])return r;e=gw(e)}return t}e=r,r=e.parentNode}return null}function qs(e){return e=e[Mn]||e[co],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $i(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function rm(e){return e[Os]||null}var $g=[],Oi=-1;function la(e){return{current:e}}function Ze(e){0>Oi||(e.current=$g[Oi],$g[Oi]=null,Oi--)}function Qe(e,t){Oi++,$g[Oi]=e.current,e.current=t}var ea={},Jt=la(ea),pr=la(!1),za=ea;function Xi(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 mr(e){return e=e.childContextTypes,e!=null}function td(){Ze(pr),Ze(Jt)}function vw(e,t,r){if(Jt.current!==ea)throw Error(U(168));Qe(Jt,t),Qe(pr,r)}function tC(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(U(108,M6(e)||"Unknown",o));return pt({},r,n)}function rd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ea,za=Jt.current,Qe(Jt,e),Qe(pr,pr.current),!0}function yw(e,t,r){var n=e.stateNode;if(!n)throw Error(U(169));r?(e=tC(e,t,za),n.__reactInternalMemoizedMergedChildContext=e,Ze(pr),Ze(Jt),Qe(Jt,e)):Ze(pr),Qe(pr,r)}var Zn=null,nm=!1,fh=!1;function rC(e){Zn===null?Zn=[e]:Zn.push(e)}function ez(e){nm=!0,rC(e)}function sa(){if(!fh&&Zn!==null){fh=!0;var e=0,t=Ve;try{var r=Zn;for(Ve=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Zn=null,nm=!1}catch(o){throw Zn!==null&&(Zn=Zn.slice(e+1)),OO(Yv,sa),o}finally{Ve=t,fh=!1}}return null}var Ci=[],ki=0,nd=null,od=0,Qr=[],Gr=0,La=null,to=1,ro="";function xa(e,t){Ci[ki++]=od,Ci[ki++]=nd,nd=e,od=t}function nC(e,t,r){Qr[Gr++]=to,Qr[Gr++]=ro,Qr[Gr++]=La,La=e;var n=to;e=ro;var o=32-gn(n)-1;n&=~(1<<o),r+=1;var a=32-gn(t)+o;if(30<a){var i=o-o%5;a=(n&(1<<i)-1).toString(32),n>>=i,o-=i,to=1<<32-gn(t)+o|r<<o|n,ro=a+e}else to=1<<a|r<<o|n,ro=e}function ay(e){e.return!==null&&(xa(e,1),nC(e,1,0))}function iy(e){for(;e===nd;)nd=Ci[--ki],Ci[ki]=null,od=Ci[--ki],Ci[ki]=null;for(;e===La;)La=Qr[--Gr],Qr[Gr]=null,ro=Qr[--Gr],Qr[Gr]=null,to=Qr[--Gr],Qr[Gr]=null}var Ir=null,kr=null,nt=!1,pn=null;function oC(e,t){var r=Kr(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 ww(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,Ir=e,kr=Ho(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ir=e,kr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=La!==null?{id:to,overflow:ro}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Kr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ir=e,kr=null,!0):!1;default:return!1}}function Og(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cg(e){if(nt){var t=kr;if(t){var r=t;if(!ww(e,t)){if(Og(e))throw Error(U(418));t=Ho(r.nextSibling);var n=Ir;t&&ww(e,t)?oC(n,r):(e.flags=e.flags&-4097|2,nt=!1,Ir=e)}}else{if(Og(e))throw Error(U(418));e.flags=e.flags&-4097|2,nt=!1,Ir=e}}}function _w(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ir=e}function zc(e){if(e!==Ir)return!1;if(!nt)return _w(e),nt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Eg(e.type,e.memoizedProps)),t&&(t=kr)){if(Og(e))throw aC(),Error(U(418));for(;t;)oC(e,t),t=Ho(t.nextSibling)}if(_w(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){kr=Ho(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}kr=null}}else kr=Ir?Ho(e.stateNode.nextSibling):null;return!0}function aC(){for(var e=kr;e;)e=Ho(e.nextSibling)}function Ji(){kr=Ir=null,nt=!1}function ly(e){pn===null?pn=[e]:pn.push(e)}var tz=wo.ReactCurrentBatchConfig;function un(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 ad=la(null),id=null,ji=null,sy=null;function cy(){sy=ji=id=null}function uy(e){var t=ad.current;Ze(ad),e._currentValue=t}function kg(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 Bi(e,t){id=e,sy=ji=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dr=!0),e.firstContext=null)}function Zr(e){var t=e._currentValue;if(sy!==e)if(e={context:e,memoizedValue:t,next:null},ji===null){if(id===null)throw Error(U(308));ji=e,id.dependencies={lanes:0,firstContext:e}}else ji=ji.next=e;return t}var ka=null;function dy(e){ka===null?ka=[e]:ka.push(e)}function iC(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,dy(t)):(r.next=o.next,o.next=r),t.interleaved=r,uo(e,n)}function uo(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 fy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lC(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 no(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,uo(e,r)}return o=n.interleaved,o===null?(t.next=t,dy(n)):(t.next=o.next,o.next=t),n.interleaved=t,uo(e,r)}function Ou(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,Xv(e,r)}}function xw(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 ld(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,w=l;switch(h=t,g=r,w.tag){case 1:if(y=w.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=w.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);Va|=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(U(191,o));o.call(n)}}}var sC=new iO.Component().refs;function jg(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 om={isMounted:function(e){return(e=e._reactInternals)?Ja(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=rr(),o=Go(e),a=no(n,o);a.payload=t,r!=null&&(a.callback=r),t=qo(e,a,o),t!==null&&(vn(t,e,o,n),Ou(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=rr(),o=Go(e),a=no(n,o);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=qo(e,a,o),t!==null&&(vn(t,e,o,n),Ou(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=rr(),n=Go(e),o=no(r,n);o.tag=2,t!=null&&(o.callback=t),t=qo(e,o,n),t!==null&&(vn(t,e,n,r),Ou(t,e,n))}};function Ew(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?!Ss(r,n)||!Ss(o,a):!0}function cC(e,t,r){var n=!1,o=ea,a=t.contextType;return typeof a=="object"&&a!==null?a=Zr(a):(o=mr(t)?za:Jt.current,n=t.contextTypes,a=(n=n!=null)?Xi(e,o):ea),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=om,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function Sw(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&&om.enqueueReplaceState(t,t.state,null)}function Rg(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs=sC,fy(e);var a=t.contextType;typeof a=="object"&&a!==null?o.context=Zr(a):(a=mr(t)?za:Jt.current,o.context=Xi(e,a)),o.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(jg(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&&om.enqueueReplaceState(o,o.state,null),ld(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Il(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(U(309));var n=r.stateNode}if(!n)throw Error(U(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===sC&&(l=o.refs={}),i===null?delete l[a]:l[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(U(284));if(!r._owner)throw Error(U(290,e))}return e}function Lc(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Pw(e){var t=e._init;return t(e._payload)}function uC(e){function t(_,v){if(e){var x=_.deletions;x===null?(_.deletions=[v],_.flags|=16):x.push(v)}}function r(_,v){if(!e)return null;for(;v!==null;)t(_,v),v=v.sibling;return null}function n(_,v){for(_=new Map;v!==null;)v.key!==null?_.set(v.key,v):_.set(v.index,v),v=v.sibling;return _}function o(_,v){return _=Ko(_,v),_.index=0,_.sibling=null,_}function a(_,v,x){return _.index=x,e?(x=_.alternate,x!==null?(x=x.index,x<v?(_.flags|=2,v):x):(_.flags|=2,v)):(_.flags|=1048576,v)}function i(_){return e&&_.alternate===null&&(_.flags|=2),_}function l(_,v,x,b){return v===null||v.tag!==6?(v=wh(x,_.mode,b),v.return=_,v):(v=o(v,x),v.return=_,v)}function c(_,v,x,b){var P=x.type;return P===bi?d(_,v,x.props.children,b,x.key):v!==null&&(v.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Io&&Pw(P)===v.type)?(b=o(v,x.props),b.ref=Il(_,v,x),b.return=_,b):(b=Iu(x.type,x.key,x.props,null,_.mode,b),b.ref=Il(_,v,x),b.return=_,b)}function u(_,v,x,b){return v===null||v.tag!==4||v.stateNode.containerInfo!==x.containerInfo||v.stateNode.implementation!==x.implementation?(v=_h(x,_.mode,b),v.return=_,v):(v=o(v,x.children||[]),v.return=_,v)}function d(_,v,x,b,P){return v===null||v.tag!==7?(v=Na(x,_.mode,b,P),v.return=_,v):(v=o(v,x),v.return=_,v)}function m(_,v,x){if(typeof v=="string"&&v!==""||typeof v=="number")return v=wh(""+v,_.mode,x),v.return=_,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Cc:return x=Iu(v.type,v.key,v.props,null,_.mode,x),x.ref=Il(_,null,v),x.return=_,x;case xi:return v=_h(v,_.mode,x),v.return=_,v;case Io:var b=v._init;return m(_,b(v._payload),x)}if(Kl(v)||Cl(v))return v=Na(v,_.mode,x,null),v.return=_,v;Lc(_,v)}return null}function h(_,v,x,b){var P=v!==null?v.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return P!==null?null:l(_,v,""+x,b);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Cc:return x.key===P?c(_,v,x,b):null;case xi:return x.key===P?u(_,v,x,b):null;case Io:return P=x._init,h(_,v,P(x._payload),b)}if(Kl(x)||Cl(x))return P!==null?null:d(_,v,x,b,null);Lc(_,x)}return null}function g(_,v,x,b,P){if(typeof b=="string"&&b!==""||typeof b=="number")return _=_.get(x)||null,l(v,_,""+b,P);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Cc:return _=_.get(b.key===null?x:b.key)||null,c(v,_,b,P);case xi:return _=_.get(b.key===null?x:b.key)||null,u(v,_,b,P);case Io:var O=b._init;return g(_,v,x,O(b._payload),P)}if(Kl(b)||Cl(b))return _=_.get(x)||null,d(v,_,b,P,null);Lc(v,b)}return null}function y(_,v,x,b){for(var P=null,O=null,$=v,C=v=0,R=null;$!==null&&C<x.length;C++){$.index>C?(R=$,$=null):R=$.sibling;var j=h(_,$,x[C],b);if(j===null){$===null&&($=R);break}e&&$&&j.alternate===null&&t(_,$),v=a(j,v,C),O===null?P=j:O.sibling=j,O=j,$=R}if(C===x.length)return r(_,$),nt&&xa(_,C),P;if($===null){for(;C<x.length;C++)$=m(_,x[C],b),$!==null&&(v=a($,v,C),O===null?P=$:O.sibling=$,O=$);return nt&&xa(_,C),P}for($=n(_,$);C<x.length;C++)R=g($,_,C,x[C],b),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(_,k)}),nt&&xa(_,C),P}function w(_,v,x,b){var P=Cl(x);if(typeof P!="function")throw Error(U(150));if(x=P.call(x),x==null)throw Error(U(151));for(var O=P=null,$=v,C=v=0,R=null,j=x.next();$!==null&&!j.done;C++,j=x.next()){$.index>C?(R=$,$=null):R=$.sibling;var k=h(_,$,j.value,b);if(k===null){$===null&&($=R);break}e&&$&&k.alternate===null&&t(_,$),v=a(k,v,C),O===null?P=k:O.sibling=k,O=k,$=R}if(j.done)return r(_,$),nt&&xa(_,C),P;if($===null){for(;!j.done;C++,j=x.next())j=m(_,j.value,b),j!==null&&(v=a(j,v,C),O===null?P=j:O.sibling=j,O=j);return nt&&xa(_,C),P}for($=n(_,$);!j.done;C++,j=x.next())j=g($,_,C,j.value,b),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(_,T)}),nt&&xa(_,C),P}function E(_,v,x,b){if(typeof x=="object"&&x!==null&&x.type===bi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Cc:e:{for(var P=x.key,O=v;O!==null;){if(O.key===P){if(P=x.type,P===bi){if(O.tag===7){r(_,O.sibling),v=o(O,x.props.children),v.return=_,_=v;break e}}else if(O.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Io&&Pw(P)===O.type){r(_,O.sibling),v=o(O,x.props),v.ref=Il(_,O,x),v.return=_,_=v;break e}r(_,O);break}else t(_,O);O=O.sibling}x.type===bi?(v=Na(x.props.children,_.mode,b,x.key),v.return=_,_=v):(b=Iu(x.type,x.key,x.props,null,_.mode,b),b.ref=Il(_,v,x),b.return=_,_=b)}return i(_);case xi:e:{for(O=x.key;v!==null;){if(v.key===O)if(v.tag===4&&v.stateNode.containerInfo===x.containerInfo&&v.stateNode.implementation===x.implementation){r(_,v.sibling),v=o(v,x.children||[]),v.return=_,_=v;break e}else{r(_,v);break}else t(_,v);v=v.sibling}v=_h(x,_.mode,b),v.return=_,_=v}return i(_);case Io:return O=x._init,E(_,v,O(x._payload),b)}if(Kl(x))return y(_,v,x,b);if(Cl(x))return w(_,v,x,b);Lc(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,v!==null&&v.tag===6?(r(_,v.sibling),v=o(v,x),v.return=_,_=v):(r(_,v),v=wh(x,_.mode,b),v.return=_,_=v),i(_)):r(_,v)}return E}var Zi=uC(!0),dC=uC(!1),Qs={},Fn=la(Qs),Cs=la(Qs),ks=la(Qs);function ja(e){if(e===Qs)throw Error(U(174));return e}function py(e,t){switch(Qe(ks,t),Qe(Cs,e),Qe(Fn,Qs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=cg(t,e)}Ze(Fn),Qe(Fn,t)}function el(){Ze(Fn),Ze(Cs),Ze(ks)}function fC(e){ja(ks.current);var t=ja(Fn.current),r=cg(t,e.type);t!==r&&(Qe(Cs,e),Qe(Fn,r))}function my(e){Cs.current===e&&(Ze(Fn),Ze(Cs))}var ut=la(0);function sd(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 ph=[];function hy(){for(var e=0;e<ph.length;e++)ph[e]._workInProgressVersionPrimary=null;ph.length=0}var Cu=wo.ReactCurrentDispatcher,mh=wo.ReactCurrentBatchConfig,Fa=0,ft=null,It=null,At=null,cd=!1,is=!1,js=0,rz=0;function qt(){throw Error(U(321))}function gy(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!xn(e[r],t[r]))return!1;return!0}function vy(e,t,r,n,o,a){if(Fa=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cu.current=e===null||e.memoizedState===null?iz:lz,e=r(n,o),is){a=0;do{if(is=!1,js=0,25<=a)throw Error(U(301));a+=1,At=It=null,t.updateQueue=null,Cu.current=sz,e=r(n,o)}while(is)}if(Cu.current=ud,t=It!==null&&It.next!==null,Fa=0,At=It=ft=null,cd=!1,t)throw Error(U(300));return e}function yy(){var e=js!==0;return js=0,e}function jn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?ft.memoizedState=At=e:At=At.next=e,At}function en(){if(It===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=It.next;var t=At===null?ft.memoizedState:At.next;if(t!==null)At=t,It=e;else{if(e===null)throw Error(U(310));It=e,e={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},At===null?ft.memoizedState=At=e:At=At.next=e}return At}function Rs(e,t){return typeof t=="function"?t(e):t}function hh(e){var t=en(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var n=It,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((Fa&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,Va|=d}u=u.next}while(u!==null&&u!==a);c===null?i=n:c.next=l,xn(n,t.memoizedState)||(dr=!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,Va|=a,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function gh(e){var t=en(),r=t.queue;if(r===null)throw Error(U(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);xn(a,t.memoizedState)||(dr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function pC(){}function mC(e,t){var r=ft,n=en(),o=t(),a=!xn(n.memoizedState,o);if(a&&(n.memoizedState=o,dr=!0),n=n.queue,wy(vC.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||At!==null&&At.memoizedState.tag&1){if(r.flags|=2048,Ts(9,gC.bind(null,r,n,o,t),void 0,null),Mt===null)throw Error(U(349));Fa&30||hC(r,t,o)}return o}function hC(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 gC(e,t,r,n){t.value=r,t.getSnapshot=n,yC(t)&&wC(e)}function vC(e,t,r){return r(function(){yC(t)&&wC(e)})}function yC(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!xn(e,r)}catch{return!0}}function wC(e){var t=uo(e,1);t!==null&&vn(t,e,1,-1)}function $w(e){var t=jn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Rs,lastRenderedState:e},t.queue=e,e=e.dispatch=az.bind(null,ft,e),[t.memoizedState,e]}function Ts(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 _C(){return en().memoizedState}function ku(e,t,r,n){var o=jn();ft.flags|=e,o.memoizedState=Ts(1|t,r,void 0,n===void 0?null:n)}function am(e,t,r,n){var o=en();n=n===void 0?null:n;var a=void 0;if(It!==null){var i=It.memoizedState;if(a=i.destroy,n!==null&&gy(n,i.deps)){o.memoizedState=Ts(t,r,a,n);return}}ft.flags|=e,o.memoizedState=Ts(1|t,r,a,n)}function Ow(e,t){return ku(8390656,8,e,t)}function wy(e,t){return am(2048,8,e,t)}function xC(e,t){return am(4,2,e,t)}function bC(e,t){return am(4,4,e,t)}function EC(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 SC(e,t,r){return r=r!=null?r.concat([e]):null,am(4,4,EC.bind(null,t,e),r)}function _y(){}function PC(e,t){var r=en();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gy(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function $C(e,t){var r=en();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&gy(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function OC(e,t,r){return Fa&21?(xn(r,t)||(r=jO(),ft.lanes|=r,Va|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dr=!0),e.memoizedState=r)}function nz(e,t){var r=Ve;Ve=r!==0&&4>r?r:4,e(!0);var n=mh.transition;mh.transition={};try{e(!1),t()}finally{Ve=r,mh.transition=n}}function CC(){return en().memoizedState}function oz(e,t,r){var n=Go(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},kC(e))jC(t,r);else if(r=iC(e,t,r,n),r!==null){var o=rr();vn(r,e,n,o),RC(r,t,n)}}function az(e,t,r){var n=Go(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(kC(e))jC(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,xn(l,i)){var c=t.interleaved;c===null?(o.next=o,dy(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}r=iC(e,t,o,n),r!==null&&(o=rr(),vn(r,e,n,o),RC(r,t,n))}}function kC(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function jC(e,t){is=cd=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function RC(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xv(e,r)}}var ud={readContext:Zr,useCallback:qt,useContext:qt,useEffect:qt,useImperativeHandle:qt,useInsertionEffect:qt,useLayoutEffect:qt,useMemo:qt,useReducer:qt,useRef:qt,useState:qt,useDebugValue:qt,useDeferredValue:qt,useTransition:qt,useMutableSource:qt,useSyncExternalStore:qt,useId:qt,unstable_isNewReconciler:!1},iz={readContext:Zr,useCallback:function(e,t){return jn().memoizedState=[e,t===void 0?null:t],e},useContext:Zr,useEffect:Ow,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ku(4194308,4,EC.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ku(4194308,4,e,t)},useInsertionEffect:function(e,t){return ku(4,2,e,t)},useMemo:function(e,t){var r=jn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=jn();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=oz.bind(null,ft,e),[n.memoizedState,e]},useRef:function(e){var t=jn();return e={current:e},t.memoizedState=e},useState:$w,useDebugValue:_y,useDeferredValue:function(e){return jn().memoizedState=e},useTransition:function(){var e=$w(!1),t=e[0];return e=nz.bind(null,e[1]),jn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ft,o=jn();if(nt){if(r===void 0)throw Error(U(407));r=r()}else{if(r=t(),Mt===null)throw Error(U(349));Fa&30||hC(n,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Ow(vC.bind(null,n,a,e),[e]),n.flags|=2048,Ts(9,gC.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=jn(),t=Mt.identifierPrefix;if(nt){var r=ro,n=to;r=(n&~(1<<32-gn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=js++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=rz++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lz={readContext:Zr,useCallback:PC,useContext:Zr,useEffect:wy,useImperativeHandle:SC,useInsertionEffect:xC,useLayoutEffect:bC,useMemo:$C,useReducer:hh,useRef:_C,useState:function(){return hh(Rs)},useDebugValue:_y,useDeferredValue:function(e){var t=en();return OC(t,It.memoizedState,e)},useTransition:function(){var e=hh(Rs)[0],t=en().memoizedState;return[e,t]},useMutableSource:pC,useSyncExternalStore:mC,useId:CC,unstable_isNewReconciler:!1},sz={readContext:Zr,useCallback:PC,useContext:Zr,useEffect:wy,useImperativeHandle:SC,useInsertionEffect:xC,useLayoutEffect:bC,useMemo:$C,useReducer:gh,useRef:_C,useState:function(){return gh(Rs)},useDebugValue:_y,useDeferredValue:function(e){var t=en();return It===null?t.memoizedState=e:OC(t,It.memoizedState,e)},useTransition:function(){var e=gh(Rs)[0],t=en().memoizedState;return[e,t]},useMutableSource:pC,useSyncExternalStore:mC,useId:CC,unstable_isNewReconciler:!1};function tl(e,t){try{var r="",n=t;do r+=A6(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 vh(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Tg(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var cz=typeof WeakMap=="function"?WeakMap:Map;function TC(e,t,r){r=no(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){fd||(fd=!0,Bg=n),Tg(e,t)},r}function IC(e,t,r){r=no(-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(){Tg(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Tg(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 Cw(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new cz;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=Ez.bind(null,e,t,r),t.then(e,e))}function kw(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 jw(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=no(-1,1),t.tag=2,qo(r,t,1))),r.lanes|=1),e)}var uz=wo.ReactCurrentOwner,dr=!1;function tr(e,t,r,n){t.child=e===null?dC(t,null,r,n):Zi(t,e.child,r,n)}function Rw(e,t,r,n,o){r=r.render;var a=t.ref;return Bi(t,o),n=vy(e,t,r,n,a,o),r=yy(),e!==null&&!dr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,fo(e,t,o)):(nt&&r&&ay(t),t.flags|=1,tr(e,t,n,o),t.child)}function Tw(e,t,r,n,o){if(e===null){var a=r.type;return typeof a=="function"&&!Cy(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,DC(e,t,a,n,o)):(e=Iu(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:Ss,r(i,n)&&e.ref===t.ref)return fo(e,t,o)}return t.flags|=1,e=Ko(a,n),e.ref=t.ref,e.return=t,t.child=e}function DC(e,t,r,n,o){if(e!==null){var a=e.memoizedProps;if(Ss(a,n)&&e.ref===t.ref)if(dr=!1,t.pendingProps=n=a,(e.lanes&o)!==0)e.flags&131072&&(dr=!0);else return t.lanes=e.lanes,fo(e,t,o)}return Ig(e,t,r,n,o)}function NC(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},Qe(Ti,Or),Or|=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,Qe(Ti,Or),Or|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Qe(Ti,Or),Or|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Qe(Ti,Or),Or|=n;return tr(e,t,o,r),t.child}function AC(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ig(e,t,r,n,o){var a=mr(r)?za:Jt.current;return a=Xi(t,a),Bi(t,o),r=vy(e,t,r,n,a,o),n=yy(),e!==null&&!dr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,fo(e,t,o)):(nt&&n&&ay(t),t.flags|=1,tr(e,t,r,o),t.child)}function Iw(e,t,r,n,o){if(mr(r)){var a=!0;rd(t)}else a=!1;if(Bi(t,o),t.stateNode===null)ju(e,t),cC(t,r,n),Rg(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=Zr(u):(u=mr(r)?za:Jt.current,u=Xi(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)&&Sw(t,i,n,u),Do=!1;var h=t.memoizedState;i.state=h,ld(t,n,i,o),c=t.memoizedState,l!==n||h!==c||pr.current||Do?(typeof d=="function"&&(jg(t,r,d,n),c=t.memoizedState),(l=Do||Ew(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,lC(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:un(t.type,l),i.props=u,m=t.pendingProps,h=i.context,c=r.contextType,typeof c=="object"&&c!==null?c=Zr(c):(c=mr(r)?za:Jt.current,c=Xi(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)&&Sw(t,i,n,c),Do=!1,h=t.memoizedState,i.state=h,ld(t,n,i,o);var y=t.memoizedState;l!==m||h!==y||pr.current||Do?(typeof g=="function"&&(jg(t,r,g,n),y=t.memoizedState),(u=Do||Ew(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 Dg(e,t,r,n,a,o)}function Dg(e,t,r,n,o,a){AC(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return o&&yw(t,r,!1),fo(e,t,a);n=t.stateNode,uz.current=t;var l=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Zi(t,e.child,null,a),t.child=Zi(t,null,l,a)):tr(e,t,l,a),t.memoizedState=n.state,o&&yw(t,r,!0),t.child}function MC(e){var t=e.stateNode;t.pendingContext?vw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vw(e,t.context,!1),py(e,t.containerInfo)}function Dw(e,t,r,n,o){return Ji(),ly(o),t.flags|=256,tr(e,t,r,n),t.child}var Ng={dehydrated:null,treeContext:null,retryLane:0};function Ag(e){return{baseLanes:e,cachePool:null,transitions:null}}function zC(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),Qe(ut,o&1),e===null)return Cg(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=sm(i,n,0,null),e=Na(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ag(r),t.memoizedState=Ng,e):xy(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return dz(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=Na(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?Ag(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=Ng,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 xy(e,t){return t=sm({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fc(e,t,r,n){return n!==null&&ly(n),Zi(t,e.child,null,r),e=xy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dz(e,t,r,n,o,a,i){if(r)return t.flags&256?(t.flags&=-257,n=vh(Error(U(422))),Fc(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,o=t.mode,n=sm({mode:"visible",children:n.children},o,0,null),a=Na(a,o,i,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Zi(t,e.child,null,i),t.child.memoizedState=Ag(i),t.memoizedState=Ng,a);if(!(t.mode&1))return Fc(e,t,i,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(U(419)),n=vh(a,n,void 0),Fc(e,t,i,n)}if(l=(i&e.childLanes)!==0,dr||l){if(n=Mt,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,uo(e,o),vn(n,e,o,-1))}return Oy(),n=vh(Error(U(421))),Fc(e,t,i,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Sz.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,kr=Ho(o.nextSibling),Ir=t,nt=!0,pn=null,e!==null&&(Qr[Gr++]=to,Qr[Gr++]=ro,Qr[Gr++]=La,to=e.id,ro=e.overflow,La=t),t=xy(t,n.children),t.flags|=4096,t)}function Nw(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),kg(e.return,t,r)}function yh(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 LC(e,t,r){var n=t.pendingProps,o=n.revealOrder,a=n.tail;if(tr(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&&Nw(e,r,t);else if(e.tag===19)Nw(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(Qe(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&&sd(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),yh(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&&sd(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}yh(t,!0,r,null,a);break;case"together":yh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ju(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fo(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Va|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(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 fz(e,t,r){switch(t.tag){case 3:MC(t),Ji();break;case 5:fC(t);break;case 1:mr(t.type)&&rd(t);break;case 4:py(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Qe(ad,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Qe(ut,ut.current&1),t.flags|=128,null):r&t.child.childLanes?zC(e,t,r):(Qe(ut,ut.current&1),e=fo(e,t,r),e!==null?e.sibling:null);Qe(ut,ut.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return LC(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Qe(ut,ut.current),n)break;return null;case 22:case 23:return t.lanes=0,NC(e,t,r)}return fo(e,t,r)}var FC,Mg,VC,BC;FC=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}};Mg=function(){};VC=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,ja(Fn.current);var a=null;switch(r){case"input":o=ag(e,o),n=ag(e,n),a=[];break;case"select":o=pt({},o,{value:void 0}),n=pt({},n,{value:void 0}),a=[];break;case"textarea":o=sg(e,o),n=sg(e,n),a=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=ed)}ug(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"&&(vs.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"&&(vs.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Je("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)}};BC=function(e,t,r,n){r!==n&&(t.flags|=4)};function Dl(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 Qt(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 pz(e,t,r){var n=t.pendingProps;switch(iy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(t),null;case 1:return mr(t.type)&&td(),Qt(t),null;case 3:return n=t.stateNode,el(),Ze(pr),Ze(Jt),hy(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(zc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pn!==null&&(Hg(pn),pn=null))),Mg(e,t),Qt(t),null;case 5:my(t);var o=ja(ks.current);if(r=t.type,e!==null&&t.stateNode!=null)VC(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(U(166));return Qt(t),null}if(e=ja(Fn.current),zc(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[Mn]=t,n[Os]=a,e=(t.mode&1)!==0,r){case"dialog":Je("cancel",n),Je("close",n);break;case"iframe":case"object":case"embed":Je("load",n);break;case"video":case"audio":for(o=0;o<Xl.length;o++)Je(Xl[o],n);break;case"source":Je("error",n);break;case"img":case"image":case"link":Je("error",n),Je("load",n);break;case"details":Je("toggle",n);break;case"input":W1(n,a),Je("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},Je("invalid",n);break;case"textarea":q1(n,a),Je("invalid",n)}ug(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&&Mc(n.textContent,l,e),o=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Mc(n.textContent,l,e),o=["children",""+l]):vs.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&Je("scroll",n)}switch(r){case"input":kc(n),H1(n,a,!0);break;case"textarea":kc(n),Q1(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=ed)}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=hO(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[Mn]=t,e[Os]=n,FC(e,t,!1,!1),t.stateNode=e;e:{switch(i=dg(r,n),r){case"dialog":Je("cancel",e),Je("close",e),o=n;break;case"iframe":case"object":case"embed":Je("load",e),o=n;break;case"video":case"audio":for(o=0;o<Xl.length;o++)Je(Xl[o],e);o=n;break;case"source":Je("error",e),o=n;break;case"img":case"image":case"link":Je("error",e),Je("load",e),o=n;break;case"details":Je("toggle",e),o=n;break;case"input":W1(e,n),o=ag(e,n),Je("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=pt({},n,{value:void 0}),Je("invalid",e);break;case"textarea":q1(e,n),o=sg(e,n),Je("invalid",e);break;default:o=n}ug(r,o),l=o;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?yO(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&gO(e,c)):a==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&ys(e,c):typeof c=="number"&&ys(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(vs.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Je("scroll",e):c!=null&&Hv(e,a,c,i))}switch(r){case"input":kc(e),H1(e,n,!1);break;case"textarea":kc(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?zi(e,!!n.multiple,a,!1):n.defaultValue!=null&&zi(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ed)}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 Qt(t),null;case 6:if(e&&t.stateNode!=null)BC(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(U(166));if(r=ja(ks.current),ja(Fn.current),zc(t)){if(n=t.stateNode,r=t.memoizedProps,n[Mn]=t,(a=n.nodeValue!==r)&&(e=Ir,e!==null))switch(e.tag){case 3:Mc(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mc(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Mn]=t,t.stateNode=n}return Qt(t),null;case 13:if(Ze(ut),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(nt&&kr!==null&&t.mode&1&&!(t.flags&128))aC(),Ji(),t.flags|=98560,a=!1;else if(a=zc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(U(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(U(317));a[Mn]=t}else Ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qt(t),a=!1}else pn!==null&&(Hg(pn),pn=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?Dt===0&&(Dt=3):Oy())),t.updateQueue!==null&&(t.flags|=4),Qt(t),null);case 4:return el(),Mg(e,t),e===null&&Ps(t.stateNode.containerInfo),Qt(t),null;case 10:return uy(t.type._context),Qt(t),null;case 17:return mr(t.type)&&td(),Qt(t),null;case 19:if(Ze(ut),a=t.memoizedState,a===null)return Qt(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Dl(a,!1);else{if(Dt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=sd(e),i!==null){for(t.flags|=128,Dl(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 Qe(ut,ut.current&1|2),t.child}e=e.sibling}a.tail!==null&&bt()>rl&&(t.flags|=128,n=!0,Dl(a,!1),t.lanes=4194304)}else{if(!n)if(e=sd(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Dl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!nt)return Qt(t),null}else 2*bt()-a.renderingStartTime>rl&&r!==1073741824&&(t.flags|=128,n=!0,Dl(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=bt(),t.sibling=null,r=ut.current,Qe(ut,n?r&1|2:r&1),t):(Qt(t),null);case 22:case 23:return $y(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Or&1073741824&&(Qt(t),t.subtreeFlags&6&&(t.flags|=8192)):Qt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function mz(e,t){switch(iy(t),t.tag){case 1:return mr(t.type)&&td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return el(),Ze(pr),Ze(Jt),hy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return my(t),null;case 13:if(Ze(ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ze(ut),null;case 4:return el(),null;case 10:return uy(t.type._context),null;case 22:case 23:return $y(),null;case 24:return null;default:return null}}var Vc=!1,Yt=!1,hz=typeof WeakSet=="function"?WeakSet:Set,re=null;function Ri(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ht(e,t,n)}else r.current=null}function zg(e,t,r){try{r()}catch(n){ht(e,t,n)}}var Aw=!1;function gz(e,t){if(xg=Xu,e=qO(),oy(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(bg={focusedElem:e,selectionRange:r},Xu=!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 w=y.memoizedProps,E=y.memoizedState,_=t.stateNode,v=_.getSnapshotBeforeUpdate(t.elementType===t.type?w:un(t.type,w),E);_.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(b){ht(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return y=Aw,Aw=!1,y}function ls(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&&zg(t,r,a)}o=o.next}while(o!==n)}}function im(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 Lg(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 UC(e){var t=e.alternate;t!==null&&(e.alternate=null,UC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mn],delete t[Os],delete t[Pg],delete t[JM],delete t[ZM])),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 WC(e){return e.tag===5||e.tag===3||e.tag===4}function Mw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||WC(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 Fg(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=ed));else if(n!==4&&(e=e.child,e!==null))for(Fg(e,t,r),e=e.sibling;e!==null;)Fg(e,t,r),e=e.sibling}function Vg(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(Vg(e,t,r),e=e.sibling;e!==null;)Vg(e,t,r),e=e.sibling}var Vt=null,dn=!1;function jo(e,t,r){for(r=r.child;r!==null;)HC(e,t,r),r=r.sibling}function HC(e,t,r){if(Ln&&typeof Ln.onCommitFiberUnmount=="function")try{Ln.onCommitFiberUnmount(Jp,r)}catch{}switch(r.tag){case 5:Yt||Ri(r,t);case 6:var n=Vt,o=dn;Vt=null,jo(e,t,r),Vt=n,dn=o,Vt!==null&&(dn?(e=Vt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Vt.removeChild(r.stateNode));break;case 18:Vt!==null&&(dn?(e=Vt,r=r.stateNode,e.nodeType===8?dh(e.parentNode,r):e.nodeType===1&&dh(e,r),bs(e)):dh(Vt,r.stateNode));break;case 4:n=Vt,o=dn,Vt=r.stateNode.containerInfo,dn=!0,jo(e,t,r),Vt=n,dn=o;break;case 0:case 11:case 14:case 15:if(!Yt&&(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)&&zg(r,t,i),o=o.next}while(o!==n)}jo(e,t,r);break;case 1:if(!Yt&&(Ri(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){ht(r,t,l)}jo(e,t,r);break;case 21:jo(e,t,r);break;case 22:r.mode&1?(Yt=(n=Yt)||r.memoizedState!==null,jo(e,t,r),Yt=n):jo(e,t,r);break;default:jo(e,t,r)}}function zw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new hz),t.forEach(function(n){var o=Pz.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function sn(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:Vt=l.stateNode,dn=!1;break e;case 3:Vt=l.stateNode.containerInfo,dn=!0;break e;case 4:Vt=l.stateNode.containerInfo,dn=!0;break e}l=l.return}if(Vt===null)throw Error(U(160));HC(a,i,o),Vt=null,dn=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){ht(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(sn(t,e),On(e),n&4){try{ls(3,e,e.return),im(3,e)}catch(w){ht(e,e.return,w)}try{ls(5,e,e.return)}catch(w){ht(e,e.return,w)}}break;case 1:sn(t,e),On(e),n&512&&r!==null&&Ri(r,r.return);break;case 5:if(sn(t,e),On(e),n&512&&r!==null&&Ri(r,r.return),e.flags&32){var o=e.stateNode;try{ys(o,"")}catch(w){ht(e,e.return,w)}}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&&pO(o,a),dg(l,i);var u=dg(l,a);for(i=0;i<c.length;i+=2){var d=c[i],m=c[i+1];d==="style"?yO(o,m):d==="dangerouslySetInnerHTML"?gO(o,m):d==="children"?ys(o,m):Hv(o,d,m,u)}switch(l){case"input":ig(o,a);break;case"textarea":mO(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var g=a.value;g!=null?zi(o,!!a.multiple,g,!1):h!==!!a.multiple&&(a.defaultValue!=null?zi(o,!!a.multiple,a.defaultValue,!0):zi(o,!!a.multiple,a.multiple?[]:"",!1))}o[Os]=a}catch(w){ht(e,e.return,w)}}break;case 6:if(sn(t,e),On(e),n&4){if(e.stateNode===null)throw Error(U(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(w){ht(e,e.return,w)}}break;case 3:if(sn(t,e),On(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{bs(t.containerInfo)}catch(w){ht(e,e.return,w)}break;case 4:sn(t,e),On(e);break;case 13:sn(t,e),On(e),o=e.child,o.flags&8192&&(a=o.memoizedState!==null,o.stateNode.isHidden=a,!a||o.alternate!==null&&o.alternate.memoizedState!==null||(Sy=bt())),n&4&&zw(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Yt=(u=Yt)||d,sn(t,e),Yt=u):sn(t,e),On(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:ls(4,h,h.return);break;case 1:Ri(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(w){ht(n,r,w)}}break;case 5:Ri(h,h.return);break;case 22:if(h.memoizedState!==null){Fw(m);continue}}g!==null?(g.return=h,re=g):Fw(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=vO("display",i))}catch(w){ht(e,e.return,w)}}}else if(m.tag===6){if(d===null)try{m.stateNode.nodeValue=u?"":m.memoizedProps}catch(w){ht(e,e.return,w)}}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:sn(t,e),On(e),n&4&&zw(e);break;case 21:break;default:sn(t,e),On(e)}}function On(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(WC(r)){var n=r;break e}r=r.return}throw Error(U(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(ys(o,""),n.flags&=-33);var a=Mw(e);Vg(e,a,o);break;case 3:case 4:var i=n.stateNode.containerInfo,l=Mw(e);Fg(e,l,i);break;default:throw Error(U(161))}}catch(c){ht(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vz(e,t,r){re=e,QC(e)}function QC(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||Vc;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Yt;l=Vc;var u=Yt;if(Vc=i,(Yt=c)&&!u)for(re=o;re!==null;)i=re,c=i.child,i.tag===22&&i.memoizedState!==null?Vw(o):c!==null?(c.return=i,re=c):Vw(o);for(;a!==null;)re=a,QC(a),a=a.sibling;re=o,Vc=l,Yt=u}Lw(e)}else o.subtreeFlags&8772&&a!==null?(a.return=o,re=a):Lw(e)}}function Lw(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:Yt||im(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Yt)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:un(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&&bs(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}Yt||t.flags&512&&Lg(t)}catch(h){ht(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 Fw(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 Vw(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{im(4,t)}catch(c){ht(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(c){ht(t,o,c)}}var a=t.return;try{Lg(t)}catch(c){ht(t,a,c)}break;case 5:var i=t.return;try{Lg(t)}catch(c){ht(t,i,c)}}}catch(c){ht(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 yz=Math.ceil,dd=wo.ReactCurrentDispatcher,by=wo.ReactCurrentOwner,Xr=wo.ReactCurrentBatchConfig,Te=0,Mt=null,kt=null,Ut=0,Or=0,Ti=la(0),Dt=0,Is=null,Va=0,lm=0,Ey=0,ss=null,ur=null,Sy=0,rl=1/0,Jn=null,fd=!1,Bg=null,Qo=null,Bc=!1,Fo=null,pd=0,cs=0,Ug=null,Ru=-1,Tu=0;function rr(){return Te&6?bt():Ru!==-1?Ru:Ru=bt()}function Go(e){return e.mode&1?Te&2&&Ut!==0?Ut&-Ut:tz.transition!==null?(Tu===0&&(Tu=jO()),Tu):(e=Ve,e!==0||(e=window.event,e=e===void 0?16:MO(e.type)),e):1}function vn(e,t,r,n){if(50<cs)throw cs=0,Ug=null,Error(U(185));Ws(e,r,n),(!(Te&2)||e!==Mt)&&(e===Mt&&(!(Te&2)&&(lm|=r),Dt===4&&zo(e,Ut)),hr(e,n),r===1&&Te===0&&!(t.mode&1)&&(rl=bt()+500,nm&&sa()))}function hr(e,t){var r=e.callbackNode;tM(e,t);var n=Yu(e,e===Mt?Ut:0);if(n===0)r!==null&&Y1(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Y1(r),t===1)e.tag===0?ez(Bw.bind(null,e)):rC(Bw.bind(null,e)),YM(function(){!(Te&6)&&sa()}),r=null;else{switch(RO(n)){case 1:r=Yv;break;case 4:r=CO;break;case 16:r=Ku;break;case 536870912:r=kO;break;default:r=Ku}r=t2(r,GC.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function GC(e,t){if(Ru=-1,Tu=0,Te&6)throw Error(U(327));var r=e.callbackNode;if(Ui()&&e.callbackNode!==r)return null;var n=Yu(e,e===Mt?Ut:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=md(e,n);else{t=n;var o=Te;Te|=2;var a=YC();(Mt!==e||Ut!==t)&&(Jn=null,rl=bt()+500,Da(e,t));do try{xz();break}catch(l){KC(e,l)}while(1);cy(),dd.current=a,Te=o,kt!==null?t=0:(Mt=null,Ut=0,t=Dt)}if(t!==0){if(t===2&&(o=gg(e),o!==0&&(n=o,t=Wg(e,o))),t===1)throw r=Is,Da(e,0),zo(e,n),hr(e,bt()),r;if(t===6)zo(e,n);else{if(o=e.current.alternate,!(n&30)&&!wz(o)&&(t=md(e,n),t===2&&(a=gg(e),a!==0&&(n=a,t=Wg(e,a))),t===1))throw r=Is,Da(e,0),zo(e,n),hr(e,bt()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(U(345));case 2:ba(e,ur,Jn);break;case 3:if(zo(e,n),(n&130023424)===n&&(t=Sy+500-bt(),10<t)){if(Yu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){rr(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Sg(ba.bind(null,e,ur,Jn),t);break}ba(e,ur,Jn);break;case 4:if(zo(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var i=31-gn(n);a=1<<i,i=t[i],i>o&&(o=i),n&=~a}if(n=o,n=bt()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*yz(n/1960))-n,10<n){e.timeoutHandle=Sg(ba.bind(null,e,ur,Jn),n);break}ba(e,ur,Jn);break;case 5:ba(e,ur,Jn);break;default:throw Error(U(329))}}}return hr(e,bt()),e.callbackNode===r?GC.bind(null,e):null}function Wg(e,t){var r=ss;return e.current.memoizedState.isDehydrated&&(Da(e,t).flags|=256),e=md(e,t),e!==2&&(t=ur,ur=r,t!==null&&Hg(t)),e}function Hg(e){ur===null?ur=e:ur.push.apply(ur,e)}function wz(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(!xn(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&=~Ey,t&=~lm,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-gn(t),n=1<<r;e[r]=-1,t&=~n}}function Bw(e){if(Te&6)throw Error(U(327));Ui();var t=Yu(e,0);if(!(t&1))return hr(e,bt()),null;var r=md(e,t);if(e.tag!==0&&r===2){var n=gg(e);n!==0&&(t=n,r=Wg(e,n))}if(r===1)throw r=Is,Da(e,0),zo(e,t),hr(e,bt()),r;if(r===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ba(e,ur,Jn),hr(e,bt()),null}function Py(e,t){var r=Te;Te|=1;try{return e(t)}finally{Te=r,Te===0&&(rl=bt()+500,nm&&sa())}}function Ba(e){Fo!==null&&Fo.tag===0&&!(Te&6)&&Ui();var t=Te;Te|=1;var r=Xr.transition,n=Ve;try{if(Xr.transition=null,Ve=1,e)return e()}finally{Ve=n,Xr.transition=r,Te=t,!(Te&6)&&sa()}}function $y(){Or=Ti.current,Ze(Ti)}function Da(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,KM(r)),kt!==null)for(r=kt.return;r!==null;){var n=r;switch(iy(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&td();break;case 3:el(),Ze(pr),Ze(Jt),hy();break;case 5:my(n);break;case 4:el();break;case 13:Ze(ut);break;case 19:Ze(ut);break;case 10:uy(n.type._context);break;case 22:case 23:$y()}r=r.return}if(Mt=e,kt=e=Ko(e.current,null),Ut=Or=t,Dt=0,Is=null,Ey=lm=Va=0,ur=ss=null,ka!==null){for(t=0;t<ka.length;t++)if(r=ka[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}ka=null}return e}function KC(e,t){do{var r=kt;try{if(cy(),Cu.current=ud,cd){for(var n=ft.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}cd=!1}if(Fa=0,At=It=ft=null,is=!1,js=0,by.current=null,r===null||r.return===null){Dt=1,Is=t,kt=null;break}e:{var a=e,i=r.return,l=r,c=t;if(t=Ut,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=kw(i);if(g!==null){g.flags&=-257,jw(g,i,l,a,t),g.mode&1&&Cw(a,u,t),t=g,c=u;var y=t.updateQueue;if(y===null){var w=new Set;w.add(c),t.updateQueue=w}else y.add(c);break e}else{if(!(t&1)){Cw(a,u,t),Oy();break e}c=Error(U(426))}}else if(nt&&l.mode&1){var E=kw(i);if(E!==null){!(E.flags&65536)&&(E.flags|=256),jw(E,i,l,a,t),ly(tl(c,l));break e}}a=c=tl(c,l),Dt!==4&&(Dt=2),ss===null?ss=[a]:ss.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var _=TC(a,c,t);xw(a,_);break e;case 1:l=c;var v=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Qo===null||!Qo.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var b=IC(a,l,t);xw(a,b);break e}}a=a.return}while(a!==null)}JC(r)}catch(P){t=P,kt===r&&r!==null&&(kt=r=r.return);continue}break}while(1)}function YC(){var e=dd.current;return dd.current=ud,e===null?ud:e}function Oy(){(Dt===0||Dt===3||Dt===2)&&(Dt=4),Mt===null||!(Va&268435455)&&!(lm&268435455)||zo(Mt,Ut)}function md(e,t){var r=Te;Te|=2;var n=YC();(Mt!==e||Ut!==t)&&(Jn=null,Da(e,t));do try{_z();break}catch(o){KC(e,o)}while(1);if(cy(),Te=r,dd.current=n,kt!==null)throw Error(U(261));return Mt=null,Ut=0,Dt}function _z(){for(;kt!==null;)XC(kt)}function xz(){for(;kt!==null&&!q6();)XC(kt)}function XC(e){var t=e2(e.alternate,e,Or);e.memoizedProps=e.pendingProps,t===null?JC(e):kt=t,by.current=null}function JC(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=mz(r,t),r!==null){r.flags&=32767,kt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Dt=6,kt=null;return}}else if(r=pz(r,t,Or),r!==null){kt=r;return}if(t=t.sibling,t!==null){kt=t;return}kt=t=e}while(t!==null);Dt===0&&(Dt=5)}function ba(e,t,r){var n=Ve,o=Xr.transition;try{Xr.transition=null,Ve=1,bz(e,t,r,n)}finally{Xr.transition=o,Ve=n}return null}function bz(e,t,r,n){do Ui();while(Fo!==null);if(Te&6)throw Error(U(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(U(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(rM(e,a),e===Mt&&(kt=Mt=null,Ut=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Bc||(Bc=!0,t2(Ku,function(){return Ui(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Xr.transition,Xr.transition=null;var i=Ve;Ve=1;var l=Te;Te|=4,by.current=null,gz(e,r),qC(r,e),BM(bg),Xu=!!xg,bg=xg=null,e.current=r,vz(r),Q6(),Te=l,Ve=i,Xr.transition=a}else e.current=r;if(Bc&&(Bc=!1,Fo=e,pd=o),a=e.pendingLanes,a===0&&(Qo=null),Y6(r.stateNode),hr(e,bt()),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(fd)throw fd=!1,e=Bg,Bg=null,e;return pd&1&&e.tag!==0&&Ui(),a=e.pendingLanes,a&1?e===Ug?cs++:(cs=0,Ug=e):cs=0,sa(),null}function Ui(){if(Fo!==null){var e=RO(pd),t=Xr.transition,r=Ve;try{if(Xr.transition=null,Ve=16>e?16:e,Fo===null)var n=!1;else{if(e=Fo,Fo=null,pd=0,Te&6)throw Error(U(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:ls(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(UC(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 w=y.child;if(w!==null){y.child=null;do{var E=w.sibling;w.sibling=null,w=E}while(w!==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:ls(9,a,a.return)}var _=a.sibling;if(_!==null){_.return=a.return,re=_;break e}re=a.return}}var v=e.current;for(re=v;re!==null;){i=re;var x=i.child;if(i.subtreeFlags&2064&&x!==null)x.return=i,re=x;else e:for(i=v;re!==null;){if(l=re,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:im(9,l)}}catch(P){ht(l,l.return,P)}if(l===i){re=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,re=b;break e}re=l.return}}if(Te=o,sa(),Ln&&typeof Ln.onPostCommitFiberRoot=="function")try{Ln.onPostCommitFiberRoot(Jp,e)}catch{}n=!0}return n}finally{Ve=r,Xr.transition=t}}return!1}function Uw(e,t,r){t=tl(r,t),t=TC(e,t,1),e=qo(e,t,1),t=rr(),e!==null&&(Ws(e,1,t),hr(e,t))}function ht(e,t,r){if(e.tag===3)Uw(e,e,r);else for(;t!==null;){if(t.tag===3){Uw(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=tl(r,e),e=IC(t,e,1),t=qo(t,e,1),e=rr(),t!==null&&(Ws(t,1,e),hr(t,e));break}}t=t.return}}function Ez(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=rr(),e.pingedLanes|=e.suspendedLanes&r,Mt===e&&(Ut&r)===r&&(Dt===4||Dt===3&&(Ut&130023424)===Ut&&500>bt()-Sy?Da(e,0):Ey|=r),hr(e,t)}function ZC(e,t){t===0&&(e.mode&1?(t=Tc,Tc<<=1,!(Tc&130023424)&&(Tc=4194304)):t=1);var r=rr();e=uo(e,t),e!==null&&(Ws(e,t,r),hr(e,r))}function Sz(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),ZC(e,r)}function Pz(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(U(314))}n!==null&&n.delete(t),ZC(e,r)}var e2;e2=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||pr.current)dr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return dr=!1,fz(e,t,r);dr=!!(e.flags&131072)}else dr=!1,nt&&t.flags&1048576&&nC(t,od,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ju(e,t),e=t.pendingProps;var o=Xi(t,Jt.current);Bi(t,r),o=vy(null,t,n,e,o,r);var a=yy();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,mr(n)?(a=!0,rd(t)):a=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,fy(t),o.updater=om,t.stateNode=o,o._reactInternals=t,Rg(t,n,e,r),t=Dg(null,t,n,!0,a,r)):(t.tag=0,nt&&a&&ay(t),tr(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ju(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=Oz(n),e=un(n,e),o){case 0:t=Ig(null,t,n,e,r);break e;case 1:t=Iw(null,t,n,e,r);break e;case 11:t=Rw(null,t,n,e,r);break e;case 14:t=Tw(null,t,n,un(n.type,e),r);break e}throw Error(U(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:un(n,o),Ig(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:un(n,o),Iw(e,t,n,o,r);case 3:e:{if(MC(t),e===null)throw Error(U(387));n=t.pendingProps,a=t.memoizedState,o=a.element,lC(e,t),ld(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=tl(Error(U(423)),t),t=Dw(e,t,n,r,o);break e}else if(n!==o){o=tl(Error(U(424)),t),t=Dw(e,t,n,r,o);break e}else for(kr=Ho(t.stateNode.containerInfo.firstChild),Ir=t,nt=!0,pn=null,r=dC(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ji(),n===o){t=fo(e,t,r);break e}tr(e,t,n,r)}t=t.child}return t;case 5:return fC(t),e===null&&Cg(t),n=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,i=o.children,Eg(n,o)?i=null:a!==null&&Eg(n,a)&&(t.flags|=32),AC(e,t),tr(e,t,i,r),t.child;case 6:return e===null&&Cg(t),null;case 13:return zC(e,t,r);case 4:return py(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Zi(t,null,n,r):tr(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:un(n,o),Rw(e,t,n,o,r);case 7:return tr(e,t,t.pendingProps,r),t.child;case 8:return tr(e,t,t.pendingProps.children,r),t.child;case 12:return tr(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,Qe(ad,n._currentValue),n._currentValue=i,a!==null)if(xn(a.value,i)){if(a.children===o.children&&!pr.current){t=fo(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=no(-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),kg(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(U(341));i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),kg(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}tr(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Bi(t,r),o=Zr(o),n=n(o),t.flags|=1,tr(e,t,n,r),t.child;case 14:return n=t.type,o=un(n,t.pendingProps),o=un(n.type,o),Tw(e,t,n,o,r);case 15:return DC(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:un(n,o),ju(e,t),t.tag=1,mr(n)?(e=!0,rd(t)):e=!1,Bi(t,r),cC(t,n,o),Rg(t,n,o,r),Dg(null,t,n,!0,e,r);case 19:return LC(e,t,r);case 22:return NC(e,t,r)}throw Error(U(156,t.tag))};function t2(e,t){return OO(e,t)}function $z(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 Kr(e,t,r,n){return new $z(e,t,r,n)}function Cy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oz(e){if(typeof e=="function")return Cy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qv)return 11;if(e===Gv)return 14}return 2}function Ko(e,t){var r=e.alternate;return r===null?(r=Kr(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 Iu(e,t,r,n,o,a){var i=2;if(n=e,typeof e=="function")Cy(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case bi:return Na(r.children,o,a,t);case qv:i=8,o|=8;break;case tg:return e=Kr(12,r,t,o|2),e.elementType=tg,e.lanes=a,e;case rg:return e=Kr(13,r,t,o),e.elementType=rg,e.lanes=a,e;case ng:return e=Kr(19,r,t,o),e.elementType=ng,e.lanes=a,e;case uO:return sm(r,o,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case sO:i=10;break e;case cO:i=9;break e;case Qv:i=11;break e;case Gv:i=14;break e;case Io:i=16,n=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=Kr(i,r,t,o),t.elementType=e,t.type=n,t.lanes=a,t}function Na(e,t,r,n){return e=Kr(7,e,n,t),e.lanes=r,e}function sm(e,t,r,n){return e=Kr(22,e,n,t),e.elementType=uO,e.lanes=r,e.stateNode={isHidden:!1},e}function wh(e,t,r){return e=Kr(6,e,null,t),e.lanes=r,e}function _h(e,t,r){return t=Kr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Cz(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=eh(0),this.expirationTimes=eh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eh(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ky(e,t,r,n,o,a,i,l,c){return e=new Cz(e,t,r,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Kr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},fy(a),e}function kz(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:xi,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function r2(e){if(!e)return ea;e=e._reactInternals;e:{if(Ja(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(mr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var r=e.type;if(mr(r))return tC(e,r,t)}return t}function n2(e,t,r,n,o,a,i,l,c){return e=ky(r,n,!0,e,o,a,i,l,c),e.context=r2(null),r=e.current,n=rr(),o=Go(r),a=no(n,o),a.callback=t??null,qo(r,a,o),e.current.lanes=o,Ws(e,o,n),hr(e,n),e}function cm(e,t,r,n){var o=t.current,a=rr(),i=Go(o);return r=r2(r),t.context===null?t.context=r:t.pendingContext=r,t=no(a,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=qo(o,t,i),e!==null&&(vn(e,o,i,a),Ou(e,o,i)),i}function hd(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 Ww(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function jy(e,t){Ww(e,t),(e=e.alternate)&&Ww(e,t)}function jz(){return null}var o2=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ry(e){this._internalRoot=e}um.prototype.render=Ry.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));cm(e,t,null,null)};um.prototype.unmount=Ry.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ba(function(){cm(null,e,null,null)}),t[co]=null}};function um(e){this._internalRoot=e}um.prototype.unstable_scheduleHydration=function(e){if(e){var t=DO();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&&AO(e)}};function Ty(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function dm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Hw(){}function Rz(e,t,r,n,o){if(o){if(typeof n=="function"){var a=n;n=function(){var u=hd(i);a.call(u)}}var i=n2(t,n,e,0,null,!1,!1,"",Hw);return e._reactRootContainer=i,e[co]=i.current,Ps(e.nodeType===8?e.parentNode:e),Ba(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var l=n;n=function(){var u=hd(c);l.call(u)}}var c=ky(e,0,!1,null,null,!1,!1,"",Hw);return e._reactRootContainer=c,e[co]=c.current,Ps(e.nodeType===8?e.parentNode:e),Ba(function(){cm(t,c,r,n)}),c}function fm(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=hd(i);l.call(c)}}cm(t,i,e,o)}else i=Rz(r,t,e,o,n);return hd(i)}TO=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Yl(t.pendingLanes);r!==0&&(Xv(t,r|1),hr(t,bt()),!(Te&6)&&(rl=bt()+500,sa()))}break;case 13:Ba(function(){var n=uo(e,1);if(n!==null){var o=rr();vn(n,e,1,o)}}),jy(e,1)}};Jv=function(e){if(e.tag===13){var t=uo(e,134217728);if(t!==null){var r=rr();vn(t,e,134217728,r)}jy(e,134217728)}};IO=function(e){if(e.tag===13){var t=Go(e),r=uo(e,t);if(r!==null){var n=rr();vn(r,e,t,n)}jy(e,t)}};DO=function(){return Ve};NO=function(e,t){var r=Ve;try{return Ve=e,t()}finally{Ve=r}};pg=function(e,t,r){switch(t){case"input":if(ig(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=rm(n);if(!o)throw Error(U(90));fO(n),ig(n,o)}}}break;case"textarea":mO(e,r);break;case"select":t=r.value,t!=null&&zi(e,!!r.multiple,t,!1)}};xO=Py;bO=Ba;var Tz={usingClientEntryPoint:!1,Events:[qs,$i,rm,wO,_O,Py]},Nl={findFiberByHostInstance:Ca,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Iz={bundleType:Nl.bundleType,version:Nl.version,rendererPackageName:Nl.rendererPackageName,rendererConfig:Nl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wo.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=PO(e),e===null?null:e.stateNode},findFiberByHostInstance:Nl.findFiberByHostInstance||jz,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 Uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uc.isDisabled&&Uc.supportsFiber)try{Jp=Uc.inject(Iz),Ln=Uc}catch{}}zr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Tz;zr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ty(t))throw Error(U(200));return kz(e,t,null,r)};zr.createRoot=function(e,t){if(!Ty(e))throw Error(U(299));var r=!1,n="",o=o2;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ky(e,1,!1,null,null,r,!1,n,o),e[co]=t.current,Ps(e.nodeType===8?e.parentNode:e),new Ry(t)};zr.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(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=PO(t),e=e===null?null:e.stateNode,e};zr.flushSync=function(e){return Ba(e)};zr.hydrate=function(e,t,r){if(!dm(t))throw Error(U(200));return fm(null,e,t,!0,r)};zr.hydrateRoot=function(e,t,r){if(!Ty(e))throw Error(U(405));var n=r!=null&&r.hydratedSources||null,o=!1,a="",i=o2;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=n2(t,null,e,1,r??null,o,!1,a,i),e[co]=t.current,Ps(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 um(t)};zr.render=function(e,t,r){if(!dm(t))throw Error(U(200));return fm(null,e,t,!1,r)};zr.unmountComponentAtNode=function(e){if(!dm(e))throw Error(U(40));return e._reactRootContainer?(Ba(function(){fm(null,null,e,!1,function(){e._reactRootContainer=null,e[co]=null})}),!0):!1};zr.unstable_batchedUpdates=Py;zr.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!dm(r))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return fm(e,t,r,!1,n)};zr.version="18.2.0-next-9e3b772b8-20220608";function a2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a2)}catch(e){console.error(e)}}a2(),nO.exports=zr;var Gs=nO.exports;const xh=Cv(Gs);var Dz=Object.defineProperty,Nz=Object.defineProperties,Az=Object.getOwnPropertyDescriptors,qw=Object.getOwnPropertySymbols,Mz=Object.prototype.hasOwnProperty,zz=Object.prototype.propertyIsEnumerable,Qw=(e,t,r)=>t in e?Dz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qg=(e,t)=>{for(var r in t||(t={}))Mz.call(t,r)&&Qw(e,r,t[r]);if(qw)for(var r of qw(t))zz.call(t,r)&&Qw(e,r,t[r]);return e},Gw=(e,t)=>Nz(e,Az(t));const Lz=["subtle","filled","outline","light","default","transparent","gradient"],Wc={xs:S(18),sm:S(22),md:S(28),lg:S(34),xl:S(44)};function Fz({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%"})}:Lz.includes(e)?qg({border:`${S(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover})):null}var Vz=W((e,{radius:t,color:r,gradient:n},{variant:o,size:a})=>({root:Gw(qg({position:"relative",borderRadius:e.fn.radius(t),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:N({size:a,sizes:Wc}),minHeight:N({size:a,sizes:Wc}),width:N({size:a,sizes:Wc}),minWidth:N({size:a,sizes:Wc})},Fz({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":Gw(qg({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 Bz=Vz;var Uz=Object.defineProperty,gd=Object.getOwnPropertySymbols,i2=Object.prototype.hasOwnProperty,l2=Object.prototype.propertyIsEnumerable,Kw=(e,t,r)=>t in e?Uz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yw=(e,t)=>{for(var r in t||(t={}))i2.call(t,r)&&Kw(e,r,t[r]);if(gd)for(var r of gd(t))l2.call(t,r)&&Kw(e,r,t[r]);return e},Xw=(e,t)=>{var r={};for(var n in e)i2.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&&l2.call(e,n)&&(r[n]=e[n]);return r};function Wz(e){var t=e,{size:r,color:n}=t,o=Xw(t,["size","color"]);const a=o,{style:i}=a,l=Xw(a,["style"]);return s.createElement("svg",Yw({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:n,style:Yw({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 Hz=Object.defineProperty,vd=Object.getOwnPropertySymbols,s2=Object.prototype.hasOwnProperty,c2=Object.prototype.propertyIsEnumerable,Jw=(e,t,r)=>t in e?Hz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Zw=(e,t)=>{for(var r in t||(t={}))s2.call(t,r)&&Jw(e,r,t[r]);if(vd)for(var r of vd(t))c2.call(t,r)&&Jw(e,r,t[r]);return e},e_=(e,t)=>{var r={};for(var n in e)s2.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&&c2.call(e,n)&&(r[n]=e[n]);return r};function qz(e){var t=e,{size:r,color:n}=t,o=e_(t,["size","color"]);const a=o,{style:i}=a,l=e_(a,["style"]);return s.createElement("svg",Zw({viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:n,style:Zw({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,yd=Object.getOwnPropertySymbols,u2=Object.prototype.hasOwnProperty,d2=Object.prototype.propertyIsEnumerable,t_=(e,t,r)=>t in e?Qz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,r_=(e,t)=>{for(var r in t||(t={}))u2.call(t,r)&&t_(e,r,t[r]);if(yd)for(var r of yd(t))d2.call(t,r)&&t_(e,r,t[r]);return e},n_=(e,t)=>{var r={};for(var n in e)u2.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&&d2.call(e,n)&&(r[n]=e[n]);return r};function Gz(e){var t=e,{size:r,color:n}=t,o=n_(t,["size","color"]);const a=o,{style:i}=a,l=n_(a,["style"]);return s.createElement("svg",r_({viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:n,style:r_({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 Kz=Object.defineProperty,wd=Object.getOwnPropertySymbols,f2=Object.prototype.hasOwnProperty,p2=Object.prototype.propertyIsEnumerable,o_=(e,t,r)=>t in e?Kz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yz=(e,t)=>{for(var r in t||(t={}))f2.call(t,r)&&o_(e,r,t[r]);if(wd)for(var r of wd(t))p2.call(t,r)&&o_(e,r,t[r]);return e},Xz=(e,t)=>{var r={};for(var n in e)f2.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&&p2.call(e,n)&&(r[n]=e[n]);return r};const bh={bars:Wz,oval:qz,dots:Gz},Jz={xs:S(18),sm:S(22),md:S(36),lg:S(44),xl:S(58)},Zz={size:"md"};function qn(e){const t=q("Loader",Zz,e),{size:r,color:n,variant:o}=t,a=Xz(t,["size","color","variant"]),i=Zt(),l=o in bh?o:i.loader;return s.createElement(ue,Yz({role:"presentation",component:bh[l]||bh.bars,size:N({size:r,sizes:Jz}),color:i.fn.variant({variant:"filled",primaryFallback:!1,color:n||i.primaryColor}).background},a))}qn.displayName="@mantine/core/Loader";var eL=Object.defineProperty,_d=Object.getOwnPropertySymbols,m2=Object.prototype.hasOwnProperty,h2=Object.prototype.propertyIsEnumerable,a_=(e,t,r)=>t in e?eL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,i_=(e,t)=>{for(var r in t||(t={}))m2.call(t,r)&&a_(e,r,t[r]);if(_d)for(var r of _d(t))h2.call(t,r)&&a_(e,r,t[r]);return e},tL=(e,t)=>{var r={};for(var n in e)m2.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&&h2.call(e,n)&&(r[n]=e[n]);return r};const rL={color:"gray",size:"md",variant:"subtle"},g2=f.forwardRef((e,t)=>{const r=q("ActionIcon",rL,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,w=tL(r,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:E,cx:_,theme:v}=Bz({radius:i,color:o,gradient:u},{name:["ActionIcon",y],unstyled:g,size:l,variant:c}),x=s.createElement(qn,i_({color:v.fn.variant({color:o,variant:c}).color,size:"100%","data-action-icon-loader":!0},m));return s.createElement(Jo,i_({className:_(E.root,n),ref:t,disabled:d,"data-disabled":d||void 0,"data-loading":h||void 0,unstyled:g},w),h?x:a)});g2.displayName="@mantine/core/ActionIcon";const Dr=g2;var nL=Object.defineProperty,oL=Object.defineProperties,aL=Object.getOwnPropertyDescriptors,xd=Object.getOwnPropertySymbols,v2=Object.prototype.hasOwnProperty,y2=Object.prototype.propertyIsEnumerable,l_=(e,t,r)=>t in e?nL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,iL=(e,t)=>{for(var r in t||(t={}))v2.call(t,r)&&l_(e,r,t[r]);if(xd)for(var r of xd(t))y2.call(t,r)&&l_(e,r,t[r]);return e},lL=(e,t)=>oL(e,aL(t)),sL=(e,t)=>{var r={};for(var n in e)v2.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&&y2.call(e,n)&&(r[n]=e[n]);return r};function Iy(e){const t=q("Portal",{},e),{children:r,target:n,className:o,innerRef:a}=t,i=sL(t,["children","target","className","innerRef"]),l=Zt(),[c,u]=f.useState(!1),d=f.useRef();return H$(()=>(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?Gs.createPortal(s.createElement("div",lL(iL({className:o,dir:l.dir},i),{ref:a}),r),d.current):null}Iy.displayName="@mantine/core/Portal";var cL=Object.defineProperty,bd=Object.getOwnPropertySymbols,w2=Object.prototype.hasOwnProperty,_2=Object.prototype.propertyIsEnumerable,s_=(e,t,r)=>t in e?cL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uL=(e,t)=>{for(var r in t||(t={}))w2.call(t,r)&&s_(e,r,t[r]);if(bd)for(var r of bd(t))_2.call(t,r)&&s_(e,r,t[r]);return e},dL=(e,t)=>{var r={};for(var n in e)w2.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};function pm(e){var t=e,{withinPortal:r=!0,children:n}=t,o=dL(t,["withinPortal","children"]);return r?s.createElement(Iy,uL({},o),n):s.createElement(s.Fragment,null,n)}pm.displayName="@mantine/core/OptionalPortal";var fL=Object.defineProperty,pL=Object.defineProperties,mL=Object.getOwnPropertyDescriptors,c_=Object.getOwnPropertySymbols,hL=Object.prototype.hasOwnProperty,gL=Object.prototype.propertyIsEnumerable,u_=(e,t,r)=>t in e?fL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Eh=(e,t)=>{for(var r in t||(t={}))hL.call(t,r)&&u_(e,r,t[r]);if(c_)for(var r of c_(t))gL.call(t,r)&&u_(e,r,t[r]);return e},d_=(e,t)=>pL(e,mL(t));function vL({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 yL=W((e,{radius:t,color:r},{variant:n})=>({root:Eh(d_(Eh({},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`}),vL({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:d_(Eh({},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 wL=yL;var _L=Object.defineProperty,Ed=Object.getOwnPropertySymbols,x2=Object.prototype.hasOwnProperty,b2=Object.prototype.propertyIsEnumerable,f_=(e,t,r)=>t in e?_L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p_=(e,t)=>{for(var r in t||(t={}))x2.call(t,r)&&f_(e,r,t[r]);if(Ed)for(var r of Ed(t))b2.call(t,r)&&f_(e,r,t[r]);return e},xL=(e,t)=>{var r={};for(var n in e)x2.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&&b2.call(e,n)&&(r[n]=e[n]);return r};function E2(e){const t=e,{width:r,height:n,style:o}=t,a=xL(t,["width","height","style"]);return s.createElement("svg",p_({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:p_({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"}))}E2.displayName="@mantine/core/CloseIcon";var bL=Object.defineProperty,Sd=Object.getOwnPropertySymbols,S2=Object.prototype.hasOwnProperty,P2=Object.prototype.propertyIsEnumerable,m_=(e,t,r)=>t in e?bL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,EL=(e,t)=>{for(var r in t||(t={}))S2.call(t,r)&&m_(e,r,t[r]);if(Sd)for(var r of Sd(t))P2.call(t,r)&&m_(e,r,t[r]);return e},SL=(e,t)=>{var r={};for(var n in e)S2.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&&P2.call(e,n)&&(r[n]=e[n]);return r};const PL={xs:S(12),sm:S(16),md:S(20),lg:S(28),xl:S(34)},$L={size:"sm"},$2=f.forwardRef((e,t)=>{const r=q("CloseButton",$L,e),{iconSize:n,size:o,children:a}=r,i=SL(r,["iconSize","size","children"]),l=S(n||PL[o]);return s.createElement(Dr,EL({ref:t,__staticSelector:"CloseButton",size:o},i),a||s.createElement(E2,{width:l,height:l}))});$2.displayName="@mantine/core/CloseButton";const Ks=$2;var OL=Object.defineProperty,Pd=Object.getOwnPropertySymbols,O2=Object.prototype.hasOwnProperty,C2=Object.prototype.propertyIsEnumerable,h_=(e,t,r)=>t in e?OL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CL=(e,t)=>{for(var r in t||(t={}))O2.call(t,r)&&h_(e,r,t[r]);if(Pd)for(var r of Pd(t))C2.call(t,r)&&h_(e,r,t[r]);return e},kL=(e,t)=>{var r={};for(var n in e)O2.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&&C2.call(e,n)&&(r[n]=e[n]);return r};const jL={variant:"light"},Ys=f.forwardRef((e,t)=>{const r=q("Alert",jL,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:w,unstyled:E}=r,_=kL(r,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:v,cx:x}=wL({color:c,radius:g},{classNames:u,styles:m,unstyled:E,variant:i,name:"Alert"}),b=Mr(n),P=a&&`${b}-title`,O=`${b}-body`;return s.createElement(ue,CL({id:b,role:"alert","aria-labelledby":P,"aria-describedby":O,className:x(v.root,v[i],o),ref:t},_),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(Ks,{className:v.closeButton,onClick:h,variant:"transparent",size:16,iconSize:16,"aria-label":w})))});Ys.displayName="@mantine/core/Alert";var RL=Object.defineProperty,TL=Object.defineProperties,IL=Object.getOwnPropertyDescriptors,g_=Object.getOwnPropertySymbols,DL=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,v_=(e,t,r)=>t in e?RL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Hc=(e,t)=>{for(var r in t||(t={}))DL.call(t,r)&&v_(e,r,t[r]);if(g_)for(var r of g_(t))NL.call(t,r)&&v_(e,r,t[r]);return e},AL=(e,t)=>TL(e,IL(t));function ML({underline:e,strikethrough:t}){const r=[];return e&&r.push("underline"),t&&r.push("line-through"),r.length>0?r.join(" "):"none"}function zL({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 LL(e){return typeof e=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical"}:null}function FL({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 VL=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:AL(Hc(Hc(Hc(Hc({},e.fn.fontStyles()),e.fn.focusStyles()),LL(r)),FL({theme:e,truncate:n})),{color:zL({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:ML({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 BL=VL;var UL=Object.defineProperty,$d=Object.getOwnPropertySymbols,k2=Object.prototype.hasOwnProperty,j2=Object.prototype.propertyIsEnumerable,y_=(e,t,r)=>t in e?UL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WL=(e,t)=>{for(var r in t||(t={}))k2.call(t,r)&&y_(e,r,t[r]);if($d)for(var r of $d(t))j2.call(t,r)&&y_(e,r,t[r]);return e},HL=(e,t)=>{var r={};for(var n in e)k2.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&&j2.call(e,n)&&(r[n]=e[n]);return r};const qL={variant:"text"},R2=f.forwardRef((e,t)=>{const r=q("Text",qL,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:w,strikethrough:E,italic:_,classNames:v,styles:x,unstyled:b,span:P,__staticSelector:O}=r,$=HL(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}=BL({color:l,lineClamp:d,truncate:m,inline:g,inherit:y,underline:w,strikethrough:E,italic:_,weight:a,transform:i,align:c,gradient:h},{unstyled:b,name:O||"Text",variant:u,size:o});return s.createElement(ue,WL({ref:t,className:R(C.root,{[C.gradient]:u==="gradient"},n),component:P?"span":"div"},$))});R2.displayName="@mantine/core/Text";const ae=R2;var QL=Object.defineProperty,w_=Object.getOwnPropertySymbols,GL=Object.prototype.hasOwnProperty,KL=Object.prototype.propertyIsEnumerable,__=(e,t,r)=>t in e?QL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YL=(e,t)=>{for(var r in t||(t={}))GL.call(t,r)&&__(e,r,t[r]);if(w_)for(var r of w_(t))KL.call(t,r)&&__(e,r,t[r]);return e};function XL({theme:e,color:t}){return t==="dimmed"?e.fn.dimmed():e.fn.themeColor(t||e.primaryColor,e.colorScheme==="dark"?4:7,!1,!0)}var JL=W((e,{color:t,underline:r})=>({root:YL({backgroundColor:"transparent",cursor:"pointer",padding:0,border:0,color:XL({theme:e,color:t})},e.fn.hover({textDecoration:r?"underline":"none"}))}));const ZL=JL;var e8=Object.defineProperty,Od=Object.getOwnPropertySymbols,T2=Object.prototype.hasOwnProperty,I2=Object.prototype.propertyIsEnumerable,x_=(e,t,r)=>t in e?e8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b_=(e,t)=>{for(var r in t||(t={}))T2.call(t,r)&&x_(e,r,t[r]);if(Od)for(var r of Od(t))I2.call(t,r)&&x_(e,r,t[r]);return e},t8=(e,t)=>{var r={};for(var n in e)T2.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&&I2.call(e,n)&&(r[n]=e[n]);return r};const r8={underline:!0},D2=f.forwardRef((e,t)=>{const r=q("Anchor",r8,e),{component:n,className:o,unstyled:a,variant:i,size:l,color:c,underline:u}=r,d=t8(r,["component","className","unstyled","variant","size","color","underline"]),{classes:m,cx:h}=ZL({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))});D2.displayName="@mantine/core/Anchor";const dt=D2,N2=f.createContext({zIndex:1e3,fixed:!1,layout:"default"}),n8=N2.Provider;function A2(){return f.useContext(N2)}function mm(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)=>_n(n[0])-_n(o[0])),r}var o8=Object.defineProperty,a8=Object.defineProperties,i8=Object.getOwnPropertyDescriptors,E_=Object.getOwnPropertySymbols,l8=Object.prototype.hasOwnProperty,s8=Object.prototype.propertyIsEnumerable,S_=(e,t,r)=>t in e?o8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qc=(e,t)=>{for(var r in t||(t={}))l8.call(t,r)&&S_(e,r,t[r]);if(E_)for(var r of E_(t))s8.call(t,r)&&S_(e,r,t[r]);return e},P_=(e,t)=>a8(e,i8(t)),c8=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?mm(r,e).reduce((h,[g,y])=>(h[`@media (min-width: ${Rr(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:P_(qc(qc(P_(qc(qc({},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: ${Rr(_n(N({size:a,sizes:e.breakpoints}))-1)})`]:{display:"none"}}})}});const u8=c8;var d8=Object.defineProperty,Cd=Object.getOwnPropertySymbols,M2=Object.prototype.hasOwnProperty,z2=Object.prototype.propertyIsEnumerable,$_=(e,t,r)=>t in e?d8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O_=(e,t)=>{for(var r in t||(t={}))M2.call(t,r)&&$_(e,r,t[r]);if(Cd)for(var r of Cd(t))z2.call(t,r)&&$_(e,r,t[r]);return e},f8=(e,t)=>{var r={};for(var n in e)M2.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&&z2.call(e,n)&&(r[n]=e[n]);return r};const L2=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:w,__staticSelector:E,unstyled:_,variant:v}=r,x=f8(r,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const b=A2(),{classes:P,cx:O,theme:$}=u8({width:n,height:o,fixed:b.fixed||a,position:i,hiddenBreakpoint:c,zIndex:l||b.zIndex||yo("app"),section:w,withBorder:d,layout:b.layout},{classNames:h,styles:g,name:E,unstyled:_,variant:v}),C=mm(n,$).reduce((R,[j,k])=>(R[`@media (min-width: ${Rr(j)})`]={[`--mantine-${w}-width`]:S(k)},R),{});return s.createElement(ue,O_({component:w==="navbar"?"nav":"aside",ref:t,"data-hidden":u||void 0,className:O(P.root,m)},x),y,s.createElement(W$,{styles:()=>({":root":O_({[`--mantine-${w}-width`]:n!=null&&n.base?S(n.base):"0rem"},C)})}))});L2.displayName="@mantine/core/HorizontalSection";var p8=Object.defineProperty,kd=Object.getOwnPropertySymbols,F2=Object.prototype.hasOwnProperty,V2=Object.prototype.propertyIsEnumerable,C_=(e,t,r)=>t in e?p8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m8=(e,t)=>{for(var r in t||(t={}))F2.call(t,r)&&C_(e,r,t[r]);if(kd)for(var r of kd(t))V2.call(t,r)&&C_(e,r,t[r]);return e},h8=(e,t)=>{var r={};for(var n in e)F2.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&&V2.call(e,n)&&(r[n]=e[n]);return r};const B2=f.forwardRef((e,t)=>{var r=e,{children:n,grow:o=!1,sx:a}=r,i=h8(r,["children","grow","sx"]);return s.createElement(ue,m8({ref:t,sx:[{flex:o?1:0,boxSizing:"border-box"},...Dp(a)]},i),n)});B2.displayName="@mantine/core/Section";const g8=B2;var v8=Object.defineProperty,k_=Object.getOwnPropertySymbols,y8=Object.prototype.hasOwnProperty,w8=Object.prototype.propertyIsEnumerable,j_=(e,t,r)=>t in e?v8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_8=(e,t)=>{for(var r in t||(t={}))y8.call(t,r)&&j_(e,r,t[r]);if(k_)for(var r of k_(t))w8.call(t,r)&&j_(e,r,t[r]);return e};const x8={fixed:!1,position:{top:0,left:0},hiddenBreakpoint:"md",hidden:!1},us=f.forwardRef((e,t)=>{const r=q("Navbar",x8,e);return s.createElement(L2,_8({section:"navbar",__staticSelector:"Navbar",ref:t},r))});us.Section=g8;us.displayName="@mantine/core/Navbar";var b8=Object.defineProperty,E8=Object.defineProperties,S8=Object.getOwnPropertyDescriptors,R_=Object.getOwnPropertySymbols,P8=Object.prototype.hasOwnProperty,$8=Object.prototype.propertyIsEnumerable,T_=(e,t,r)=>t in e?b8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sh=(e,t)=>{for(var r in t||(t={}))P8.call(t,r)&&T_(e,r,t[r]);if(R_)for(var r of R_(t))$8.call(t,r)&&T_(e,r,t[r]);return e},I_=(e,t)=>E8(e,S8(t)),O8=W((e,{height:t,fixed:r,position:n,zIndex:o,borderPosition:a,layout:i})=>{const l=typeof t=="object"&&t!==null?mm(t,e).reduce((c,[u,d])=>(c[`@media (min-width: ${Rr(u)})`]={height:S(d),minHeight:S(d)},c),{}):null;return{root:I_(Sh(I_(Sh(Sh({},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 C8=O8;var k8=Object.defineProperty,jd=Object.getOwnPropertySymbols,U2=Object.prototype.hasOwnProperty,W2=Object.prototype.propertyIsEnumerable,D_=(e,t,r)=>t in e?k8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N_=(e,t)=>{for(var r in t||(t={}))U2.call(t,r)&&D_(e,r,t[r]);if(jd)for(var r of jd(t))W2.call(t,r)&&D_(e,r,t[r]);return e},j8=(e,t)=>{var r={};for(var n in e)U2.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&&W2.call(e,n)&&(r[n]=e[n]);return r};const H2=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:w}=r,E=j8(r,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const _=A2(),v=m||_.zIndex||yo("app"),{classes:x,cx:b,theme:P}=C8({height:l,fixed:_.fixed||c,position:d,zIndex:typeof v=="number"&&_.layout==="default"?v+1:v,layout:_.layout,borderPosition:u?h==="header"?"bottom":"top":"none"},{name:y,classNames:a,styles:i,unstyled:g,variant:w}),O=typeof l=="object"&&l!==null?mm(l,P).reduce(($,[C,R])=>($[`@media (min-width: ${Rr(C)})`]={[`--mantine-${h}-height`]:S(R)},$),{}):null;return s.createElement(ue,N_({component:h==="header"?"header":"footer",className:b(x.root,o),ref:t},E),n,s.createElement(W$,{styles:()=>({":root":N_({[`--mantine-${h}-height`]:typeof l=="object"?S(l==null?void 0:l.base)||"100%":S(l)},O)})}))});H2.displayName="@mantine/core/VerticalSection";var R8=Object.defineProperty,T8=Object.defineProperties,I8=Object.getOwnPropertyDescriptors,A_=Object.getOwnPropertySymbols,D8=Object.prototype.hasOwnProperty,N8=Object.prototype.propertyIsEnumerable,M_=(e,t,r)=>t in e?R8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A8=(e,t)=>{for(var r in t||(t={}))D8.call(t,r)&&M_(e,r,t[r]);if(A_)for(var r of A_(t))N8.call(t,r)&&M_(e,r,t[r]);return e},M8=(e,t)=>T8(e,I8(t));const z8={fixed:!1,position:{top:0,left:0,right:0}},q2=f.forwardRef((e,t)=>{const r=q("Header",z8,e);return s.createElement(H2,M8(A8({section:"header",__staticSelector:"Header"},r),{ref:t}))});q2.displayName="@mantine/core/Header";var L8=Object.defineProperty,z_=Object.getOwnPropertySymbols,F8=Object.prototype.hasOwnProperty,V8=Object.prototype.propertyIsEnumerable,L_=(e,t,r)=>t in e?L8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q2=(e,t)=>{for(var r in t||(t={}))F8.call(t,r)&&L_(e,r,t[r]);if(z_)for(var r of z_(t))V8.call(t,r)&&L_(e,r,t[r]);return e};function B8(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=_n(n),i=_n(o);return Q2({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: ${Rr(a-1)})`]:{paddingLeft:r,paddingRight:r}}:{[`@media (max-width: ${Rr(a-1)})`]:{paddingLeft:r},[`@media (max-width: ${Rr(i-1)})`]:{paddingRight:r}})}var U8=W((e,t)=>({root:{boxSizing:"border-box"},body:{display:"flex",boxSizing:"border-box"},main:Q2({flex:1,width:"100vw",boxSizing:"border-box"},B8(t,e))}));const W8=U8;var H8=Object.defineProperty,Rd=Object.getOwnPropertySymbols,G2=Object.prototype.hasOwnProperty,K2=Object.prototype.propertyIsEnumerable,F_=(e,t,r)=>t in e?H8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,q8=(e,t)=>{for(var r in t||(t={}))G2.call(t,r)&&F_(e,r,t[r]);if(Rd)for(var r of Rd(t))K2.call(t,r)&&F_(e,r,t[r]);return e},Q8=(e,t)=>{var r={};for(var n in e)G2.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rd)for(var n of Rd(e))t.indexOf(n)<0&&K2.call(e,n)&&(r[n]=e[n]);return r};const G8={fixed:!0,padding:"md"},Y2=f.forwardRef((e,t)=>{const r=q("AppShell",G8,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:w,unstyled:E,hidden:_,layout:v,variant:x}=r,b=Q8(r,["children","navbar","header","footer","aside","fixed","zIndex","padding","navbarOffsetBreakpoint","asideOffsetBreakpoint","className","styles","classNames","unstyled","hidden","layout","variant"]),{classes:P,cx:O}=W8({padding:d,fixed:c,navbarOffsetBreakpoint:m,asideOffsetBreakpoint:h},{styles:y,classNames:w,unstyled:E,name:"AppShell",variant:x});return _?s.createElement(s.Fragment,null,n):s.createElement(n8,{value:{fixed:c,zIndex:u,layout:v}},s.createElement(ue,q8({className:O(P.root,g),ref:t},b),a,s.createElement("div",{className:P.body},o,s.createElement("main",{className:P.main},n),l),i))});Y2.displayName="@mantine/core/AppShell";const Qc={xs:S(1),sm:S(2),md:S(3),lg:S(4),xl:S(5)};function Gc(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 K8=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:Qc})} ${n} ${Gc(e,t)}`,marginRight:e.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${N({size:r,sizes:Qc})} ${n} ${Gc(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:Qc})),borderTopColor:Gc(e,t),borderTopStyle:n,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:S(N({size:r,sizes:Qc})),borderLeftColor:Gc(e,t),borderLeftStyle:n}}));const Y8=K8;var X8=Object.defineProperty,J8=Object.defineProperties,Z8=Object.getOwnPropertyDescriptors,Td=Object.getOwnPropertySymbols,X2=Object.prototype.hasOwnProperty,J2=Object.prototype.propertyIsEnumerable,V_=(e,t,r)=>t in e?X8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B_=(e,t)=>{for(var r in t||(t={}))X2.call(t,r)&&V_(e,r,t[r]);if(Td)for(var r of Td(t))J2.call(t,r)&&V_(e,r,t[r]);return e},e7=(e,t)=>J8(e,Z8(t)),t7=(e,t)=>{var r={};for(var n in e)X2.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&&J2.call(e,n)&&(r[n]=e[n]);return r};const r7={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},cr=f.forwardRef((e,t)=>{const r=q("Divider",r7,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=t7(r,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:w,cx:E}=Y8({color:o},{classNames:h,styles:m,unstyled:g,name:"Divider",variant:d,size:i}),_=a==="vertical",v=a==="horizontal",x=!!l&&v,b=!(u!=null&&u.color);return s.createElement(ue,B_({ref:t,className:E(w.root,{[w.vertical]:_,[w.horizontal]:v,[w.withLabel]:x},n),role:"separator"},y),x&&s.createElement(ae,e7(B_({},u),{size:(u==null?void 0:u.size)||"xs",mt:S(2),className:E(w.label,w[c],{[w.labelDefaultStyles]:b})}),l))});cr.displayName="@mantine/core/Divider";var n7=Object.defineProperty,o7=Object.defineProperties,a7=Object.getOwnPropertyDescriptors,U_=Object.getOwnPropertySymbols,i7=Object.prototype.hasOwnProperty,l7=Object.prototype.propertyIsEnumerable,W_=(e,t,r)=>t in e?n7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H_=(e,t)=>{for(var r in t||(t={}))i7.call(t,r)&&W_(e,r,t[r]);if(U_)for(var r of U_(t))l7.call(t,r)&&W_(e,r,t[r]);return e},s7=(e,t)=>o7(e,a7(t)),c7=W((e,t,{size:r})=>({item:s7(H_({},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]":H_({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 u7=c7;var d7=Object.defineProperty,q_=Object.getOwnPropertySymbols,f7=Object.prototype.hasOwnProperty,p7=Object.prototype.propertyIsEnumerable,Q_=(e,t,r)=>t in e?d7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m7=(e,t)=>{for(var r in t||(t={}))f7.call(t,r)&&Q_(e,r,t[r]);if(q_)for(var r of q_(t))p7.call(t,r)&&Q_(e,r,t[r]);return e};function Z2({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:w,variant:E}){const{classes:_}=u7(null,{classNames:r,styles:n,unstyled:w,name:i,variant:E,size:m}),v=[],x=[];let b=null;const P=($,C)=>{const R=typeof o=="function"?o($.value):!1;return s.createElement(d,m7({key:$.value,className:_.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?b=C:$.group?(O!==$.group&&(O=$.group,x.push(s.createElement("div",{className:_.separator,key:`__mantine-divider-${C}`},s.createElement(cr,{classNames:{label:_.separatorLabel},label:$.group})))),x.push(P($,C))):v.push(P($,C))}),g){const $=e[b];v.push(s.createElement("div",{key:Kp(),className:_.item,"data-hovered":t===b||void 0,onMouseEnter:()=>l(b),onMouseDown:C=>{C.preventDefault(),c($)},tabIndex:-1,ref:C=>{u&&u.current&&(u.current[$.value]=C)}},y))}return x.length>0&&v.length>0&&v.unshift(s.createElement("div",{className:_.separator,key:"empty-group-separator"},s.createElement(cr,null))),x.length>0||v.length>0?s.createElement(s.Fragment,null,x,v):s.createElement(ae,{size:m,unstyled:w,className:_.nothingFound},h)}Z2.displayName="@mantine/core/SelectItems";var h7=Object.defineProperty,Id=Object.getOwnPropertySymbols,ek=Object.prototype.hasOwnProperty,tk=Object.prototype.propertyIsEnumerable,G_=(e,t,r)=>t in e?h7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g7=(e,t)=>{for(var r in t||(t={}))ek.call(t,r)&&G_(e,r,t[r]);if(Id)for(var r of Id(t))tk.call(t,r)&&G_(e,r,t[r]);return e},v7=(e,t)=>{var r={};for(var n in e)ek.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&&tk.call(e,n)&&(r[n]=e[n]);return r};const rk=f.forwardRef((e,t)=>{var r=e,{label:n,value:o}=r,a=v7(r,["label","value"]);return s.createElement("div",g7({ref:t},a),n||o)});rk.displayName="@mantine/core/DefaultItem";function y7(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function nk(...e){return t=>e.forEach(r=>y7(r,t))}function Za(...e){return f.useCallback(nk(...e),e)}const ok=f.forwardRef((e,t)=>{const{children:r,...n}=e,o=f.Children.toArray(r),a=o.find(_7);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(Qg,Ke({},n,{ref:t}),f.isValidElement(i)?f.cloneElement(i,void 0,l):null)}return f.createElement(Qg,Ke({},n,{ref:t}),r)});ok.displayName="Slot";const Qg=f.forwardRef((e,t)=>{const{children:r,...n}=e;return f.isValidElement(r)?f.cloneElement(r,{...x7(n,r.props),ref:nk(t,r.ref)}):f.Children.count(r)>1?f.Children.only(null):null});Qg.displayName="SlotClone";const w7=({children:e})=>f.createElement(f.Fragment,null,e);function _7(e){return f.isValidElement(e)&&e.type===w7}function x7(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"],Xs=b7.reduce((e,t)=>{const r=f.forwardRef((n,o)=>{const{asChild:a,...i}=n,l=a?ok:t;return f.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),f.createElement(l,Ke({},i,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Gg=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function E7(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Js=e=>{const{present:t,children:r}=e,n=S7(t),o=typeof r=="function"?r({present:n.isPresent}):f.Children.only(r),a=Za(n.ref,o.ref);return typeof r=="function"||n.isPresent?f.cloneElement(o,{ref:a}):null};Js.displayName="Presence";function S7(e){const[t,r]=f.useState(),n=f.useRef({}),o=f.useRef(e),a=f.useRef("none"),i=e?"mounted":"unmounted",[l,c]=E7(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Kc(n.current);a.current=l==="mounted"?u:"none"},[l]),Gg(()=>{const u=n.current,d=o.current;if(d!==e){const h=a.current,g=Kc(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]),Gg(()=>{if(t){const u=m=>{const g=Kc(n.current).includes(m.animationName);m.target===t&&g&&Gs.flushSync(()=>c("ANIMATION_END"))},d=m=>{m.target===t&&(a.current=Kc(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 Kc(e){return(e==null?void 0:e.animationName)||"none"}function P7(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,w=(h==null?void 0:h[e][c])||l,E=f.useMemo(()=>y,Object.values(y));return f.createElement(w.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,$7(o,...t)]}function $7(...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 $a(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 O7=f.createContext(void 0);function C7(e){const t=f.useContext(O7);return e||t||"ltr"}function k7(e,[t,r]){return Math.min(r,Math.max(t,e))}function Aa(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 j7(e,t){return f.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const ak="ScrollArea",[ik,ide]=P7(ak),[R7,rn]=ik(ak),T7=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),[w,E]=f.useState(null),[_,v]=f.useState(0),[x,b]=f.useState(0),[P,O]=f.useState(!1),[$,C]=f.useState(!1),R=Za(t,k=>c(k)),j=C7(o);return f.createElement(R7,{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:w,onScrollbarYChange:E,scrollbarYEnabled:$,onScrollbarYEnabledChange:C,onCornerWidthChange:v,onCornerHeightChange:b},f.createElement(Xs.div,Ke({dir:j},i,{ref:R,style:{position:"relative","--radix-scroll-area-corner-width":_+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})))}),I7="ScrollAreaViewport",D7=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,a=rn(I7,r),i=f.useRef(null),l=Za(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(Xs.div,Ke({"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)))}),_o="ScrollAreaScrollbar",N7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rn(_o,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(A7,Ke({},n,{ref:t,forceMount:r})):o.type==="scroll"?f.createElement(M7,Ke({},n,{ref:t,forceMount:r})):o.type==="auto"?f.createElement(lk,Ke({},n,{ref:t,forceMount:r})):o.type==="always"?f.createElement(Dy,Ke({},n,{ref:t})):null}),A7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rn(_o,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(Js,{present:r||a},f.createElement(lk,Ke({"data-state":a?"visible":"hidden"},n,{ref:t})))}),M7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=rn(_o,e.__scopeScrollArea),a=e.orientation==="horizontal",i=gm(()=>c("SCROLL_END"),100),[l,c]=j7("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(Js,{present:r||l!=="hidden"},f.createElement(Dy,Ke({"data-state":l==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:Aa(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Aa(e.onPointerLeave,()=>c("POINTER_LEAVE"))})))}),lk=f.forwardRef((e,t)=>{const r=rn(_o,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=f.useState(!1),l=e.orientation==="horizontal",c=gm(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;i(l?u:d)}},10);return nl(r.viewport,c),nl(r.content,c),f.createElement(Js,{present:n||a},f.createElement(Dy,Ke({"data-state":a?"visible":"hidden"},o,{ref:t})))}),Dy=f.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=rn(_o,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=dk(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 H7(h,i.current,l,g)}return r==="horizontal"?f.createElement(z7,Ke({},d,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollLeft,g=K_(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(L7,Ke({},d,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const h=o.viewport.scrollTop,g=K_(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}),z7=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,a=rn(_o,e.__scopeScrollArea),[i,l]=f.useState(),c=f.useRef(null),u=Za(t,c,a.onScrollbarXChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),f.createElement(ck,Ke({"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":hm(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),pk(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:Dd(i.paddingLeft),paddingEnd:Dd(i.paddingRight)}})}}))}),L7=f.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,a=rn(_o,e.__scopeScrollArea),[i,l]=f.useState(),c=f.useRef(null),u=Za(t,c,a.onScrollbarYChange);return f.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),f.createElement(ck,Ke({"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":hm(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),pk(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:Dd(i.paddingTop),paddingEnd:Dd(i.paddingBottom)}})}}))}),[F7,sk]=ik(_o),ck=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=rn(_o,r),[y,w]=f.useState(null),E=Za(t,R=>w(R)),_=f.useRef(null),v=f.useRef(""),x=g.viewport,b=n.content-n.viewport,P=$a(d),O=$a(c),$=gm(m,10);function C(R){if(_.current){const j=R.clientX-_.current.left,k=R.clientY-_.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,b)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[x,y,b,P]),f.useEffect(O,[n,O]),nl(y,$),nl(g.content,$),f.createElement(F7,{scope:r,scrollbar:y,hasThumb:o,onThumbChange:$a(a),onThumbPointerUp:$a(i),onThumbPositionChange:O,onThumbPointerDown:$a(l)},f.createElement(Xs.div,Ke({},h,{ref:E,style:{position:"absolute",...h.style},onPointerDown:Aa(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),_.current=y.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C(R))}),onPointerMove:Aa(e.onPointerMove,C),onPointerUp:Aa(e.onPointerUp,R=>{const j=R.target;j.hasPointerCapture(R.pointerId)&&j.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=v.current,_.current=null})})))}),Kg="ScrollAreaThumb",V7=f.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=sk(Kg,e.__scopeScrollArea);return f.createElement(Js,{present:r||o.hasThumb},f.createElement(B7,Ke({ref:t},n)))}),B7=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,a=rn(Kg,r),i=sk(Kg,r),{onThumbPositionChange:l}=i,c=Za(t,m=>i.onThumbChange(m)),u=f.useRef(),d=gm(()=>{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=q7(m,l);u.current=g,l()}};return l(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[a.viewport,d,l]),f.createElement(Xs.div,Ke({"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:Aa(e.onPointerDownCapture,m=>{const g=m.target.getBoundingClientRect(),y=m.clientX-g.left,w=m.clientY-g.top;i.onThumbPointerDown({x:y,y:w})}),onPointerUp:Aa(e.onPointerUp,i.onThumbPointerUp)}))}),uk="ScrollAreaCorner",U7=f.forwardRef((e,t)=>{const r=rn(uk,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?f.createElement(W7,Ke({},e,{ref:t})):null}),W7=f.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=rn(uk,r),[a,i]=f.useState(0),[l,c]=f.useState(0),u=!!(a&&l);return nl(o.scrollbarX,()=>{var d;const m=((d=o.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;o.onCornerHeightChange(m),c(m)}),nl(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(Xs.div,Ke({},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 Dd(e){return e?parseInt(e,10):0}function dk(e,t){const r=e/t;return isNaN(r)?0:r}function hm(e){const t=dk(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function H7(e,t,r,n="ltr"){const o=hm(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 fk([c,u],m)(e)}function K_(e,t,r="ltr"){const n=hm(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=k7(e,c);return fk([0,i],[0,l])(u)}function fk(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 pk(e,t){return e>0&&e<t}const q7=(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 gm(e,t){const r=$a(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 nl(e,t){const r=$a(t);Gg(()=>{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=T7,G7=D7,Y_=N7,X_=V7,K7=U7;var Y7=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],[`& .${Kt("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:Kt("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 X7=Y7;var J7=Object.defineProperty,Z7=Object.defineProperties,e9=Object.getOwnPropertyDescriptors,Nd=Object.getOwnPropertySymbols,mk=Object.prototype.hasOwnProperty,hk=Object.prototype.propertyIsEnumerable,J_=(e,t,r)=>t in e?J7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yg=(e,t)=>{for(var r in t||(t={}))mk.call(t,r)&&J_(e,r,t[r]);if(Nd)for(var r of Nd(t))hk.call(t,r)&&J_(e,r,t[r]);return e},gk=(e,t)=>Z7(e,e9(t)),vk=(e,t)=>{var r={};for(var n in e)mk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Nd)for(var n of Nd(e))t.indexOf(n)<0&&hk.call(e,n)&&(r[n]=e[n]);return r};const yk={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},vm=f.forwardRef((e,t)=>{const r=q("ScrollArea",yk,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:w,viewportProps:E}=r,_=vk(r,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[v,x]=f.useState(!1),b=Zt(),{classes:P,cx:O}=X7({scrollbarSize:l,offsetScrollbars:m,scrollbarHovered:v,hidden:u==="never"},{name:"ScrollArea",classNames:a,styles:i,unstyled:y,variant:w});return s.createElement(Q7,{type:u==="never"?"always":u,scrollHideDelay:c,dir:d||b.dir,ref:t,asChild:!0},s.createElement(ue,Yg({className:O(P.root,o)},_),s.createElement(G7,gk(Yg({},E),{className:P.viewport,ref:h,onScroll:typeof g=="function"?({currentTarget:$})=>g({x:$.scrollLeft,y:$.scrollTop}):void 0}),n),s.createElement(Y_,{orientation:"horizontal",className:P.scrollbar,forceMount:!0,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},s.createElement(X_,{className:P.thumb})),s.createElement(Y_,{orientation:"vertical",className:P.scrollbar,forceMount:!0,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},s.createElement(X_,{className:P.thumb})),s.createElement(K7,{className:P.corner})))}),wk=f.forwardRef((e,t)=>{const r=q("ScrollAreaAutosize",yk,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:w,viewportProps:E}=r,_=vk(r,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return s.createElement(ue,gk(Yg({},_),{ref:t,sx:[{display:"flex"},...Dp(y)]}),s.createElement(ue,{sx:{display:"flex",flexDirection:"column",flex:1}},s.createElement(vm,{classNames:o,styles:a,scrollHideDelay:l,scrollbarSize:i,type:c,dir:u,offsetScrollbars:d,viewportRef:m,onScrollPositionChange:h,unstyled:g,variant:w,viewportProps:E},n)))});wk.displayName="@mantine/core/ScrollAreaAutosize";vm.displayName="@mantine/core/ScrollArea";vm.Autosize=wk;const hl=vm;var t9=Object.defineProperty,r9=Object.defineProperties,n9=Object.getOwnPropertyDescriptors,Ad=Object.getOwnPropertySymbols,_k=Object.prototype.hasOwnProperty,xk=Object.prototype.propertyIsEnumerable,Z_=(e,t,r)=>t in e?t9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ex=(e,t)=>{for(var r in t||(t={}))_k.call(t,r)&&Z_(e,r,t[r]);if(Ad)for(var r of Ad(t))xk.call(t,r)&&Z_(e,r,t[r]);return e},o9=(e,t)=>r9(e,n9(t)),a9=(e,t)=>{var r={};for(var n in e)_k.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Ad)for(var n of Ad(e))t.indexOf(n)<0&&xk.call(e,n)&&(r[n]=e[n]);return r};const Ny=f.forwardRef((e,t)=>{var r=e,{style:n}=r,o=a9(r,["style"]);return s.createElement(hl,o9(ex({},o),{style:ex({width:"100%"},n),viewportProps:{tabIndex:-1},viewportRef:t}),o.children)});Ny.displayName="@mantine/core/SelectScrollArea";var i9=W(()=>({dropdown:{},itemsWrapper:{padding:S(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const l9=i9;function gl(e){return e.split("-")[1]}function Ay(e){return e==="y"?"height":"width"}function yn(e){return e.split("-")[0]}function ca(e){return["top","bottom"].includes(yn(e))?"x":"y"}function tx(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=Ay(l),u=n[c]/2-o[c]/2,d=l==="x";let m;switch(yn(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(gl(t)){case"start":m[l]-=u*(r&&d?-1:1);break;case"end":m[l]+=u*(r&&d?-1:1)}return m}const s9=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}=tx(u,n,c),h=n,g={},y=0;for(let w=0;w<l.length;w++){const{name:E,fn:_}=l[w],{x:v,y:x,data:b,reset:P}=await _({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=x??m,g={...g,[E]:{...g[E],...b}},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}=tx(u,h,c)),w=-1)}return{x:d,y:m,placement:h,strategy:o,middlewareData:g}};function po(e,t){return typeof e=="function"?e(t):e}function My(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 ol(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function zy(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}=po(t,e),y=My(g),w=l[h?m==="floating"?"reference":"floating":m],E=ol(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(w)))==null||r?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),_=m==="floating"?{...i.floating,x:n,y:o}:i.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),x=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=ol(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({rect:_,offsetParent:v,strategy:c}):_);return{top:(E.top-b.top+y.top)/x.y,bottom:(b.bottom-E.bottom+y.bottom)/x.y,left:(E.left-b.left+y.left)/x.x,right:(b.right-E.right+y.right)/x.x}}const ta=Math.min,Dn=Math.max;function Xg(e,t,r){return Dn(e,ta(t,r))}const rx=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}=po(e,t)||{};if(c==null)return{};const d=My(u),m={x:r,y:n},h=ca(o),g=Ay(h),y=await i.getDimensions(c),w=h==="y",E=w?"top":"left",_=w?"bottom":"right",v=w?"clientHeight":"clientWidth",x=a.reference[g]+a.reference[h]-m[h]-a.floating[g],b=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 $=x/2-b/2,C=O/2-y[g]/2-1,R=ta(d[E],C),j=ta(d[_],C),k=R,T=O-y[g]-j,L=O/2-y[g]/2+$,B=Xg(k,L,T),V=gl(o)!=null&&L!=B&&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]:B,centerOffset:L-B+V}}}}),c9=["top","right","bottom","left"];c9.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const u9={left:"right",right:"left",bottom:"top",top:"bottom"};function Md(e){return e.replace(/left|right|bottom|top/g,t=>u9[t])}function d9(e,t,r){r===void 0&&(r=!1);const n=gl(e),o=ca(e),a=Ay(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Md(i)),{main:i,cross:Md(i)}}const f9={start:"end",end:"start"};function Ph(e){return e.replace(/start|end/g,t=>f9[t])}const p9=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,...w}=po(e,t),E=yn(n),_=yn(i)===i,v=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=m||(_||!y?[Md(i)]:function(k){const T=Md(k);return[Ph(k),T,Ph(T)]}(i));m||g==="none"||x.push(...function(k,T,L,B){const V=gl(k);let M=function(Q,A,z){const H=["left","right"],ie=["right","left"],we=["top","bottom"],Ie=["bottom","top"];switch(Q){case"top":case"bottom":return z?A?ie:H:A?H:ie;case"left":case"right":return A?we:Ie;default:return[]}}(yn(k),L==="start",B);return V&&(M=M.map(Q=>Q+"-"+V),T&&(M=M.concat(M.map(Ph)))),M}(i,y,g,v));const b=[i,...x],P=await zy(t,w),O=[];let $=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&O.push(P[E]),d){const{main:k,cross:T}=d9(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=b[k];if(T)return{data:{index:k,overflows:$},reset:{placement:T}};let L=(R=$.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:R.placement;if(!L)switch(h){case"bestFit":{var j;const B=(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];B&&(L=B);break}case"initialPlacement":L=i}if(n!==L)return{reset:{placement:L}}}return{}}}};function nx(e){const t=ta(...e.map(n=>n.left)),r=ta(...e.map(n=>n.top));return{x:t,y:r,width:Dn(...e.map(n=>n.right))-t,height:Dn(...e.map(n=>n.bottom))-r}}const m9=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}=po(e,t),d=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(n.reference))||[]),m=function(w){const E=w.slice().sort((x,b)=>x.y-b.y),_=[];let v=null;for(let x=0;x<E.length;x++){const b=E[x];!v||b.y-v.y>v.height/2?_.push([b]):_[_.length-1].push(b),v=b}return _.map(x=>ol(nx(x)))}(d),h=ol(nx(d)),g=My(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(w=>c>w.left-g.left&&c<w.right+g.right&&u>w.top-g.top&&u<w.bottom+g.bottom)||h;if(m.length>=2){if(ca(r)==="x"){const P=m[0],O=m[m.length-1],$=yn(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 w=yn(r)==="left",E=Dn(...m.map(P=>P.right)),_=ta(...m.map(P=>P.left)),v=m.filter(P=>w?P.left===_:P.right===E),x=v[0].top,b=v[v.length-1].bottom;return{top:x,bottom:b,left:_,right:E,width:E-_,height:b-x,x:_,y:x}}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}}:{}}}},h9=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=yn(l),h=gl(l),g=ca(l)==="x",y=["left","top"].includes(m)?-1:1,w=d&&g?-1:1,E=po(i,a);let{mainAxis:_,crossAxis:v,alignmentAxis:x}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...E};return h&&typeof x=="number"&&(v=h==="end"?-1*x:x),g?{x:v*w,y:_*y}:{x:_*y,y:v*w}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function bk(e){return e==="x"?"y":"x"}const g9=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:_,y:v}=E;return{x:_,y:v}}},...c}=po(e,t),u={x:r,y:n},d=await zy(t,c),m=ca(yn(o)),h=bk(m);let g=u[m],y=u[h];if(a){const E=m==="y"?"bottom":"right";g=Xg(g+d[m==="y"?"top":"left"],g,g-d[E])}if(i){const E=h==="y"?"bottom":"right";y=Xg(y+d[h==="y"?"top":"left"],y,y-d[E])}const w=l.fn({...t,[m]:g,[h]:y});return{...w,data:{x:w.x-r,y:w.y-n}}}}},v9=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}=po(e,t),d={x:r,y:n},m=ca(o),h=bk(m);let g=d[m],y=d[h];const w=po(l,t),E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=m==="y"?"height":"width",b=a.reference[m]-a.floating[x]+E.mainAxis,P=a.reference[m]+a.reference[x]-E.mainAxis;g<b?g=b:g>P&&(g=P)}if(u){var _,v;const x=m==="y"?"width":"height",b=["top","left"].includes(yn(o)),P=a.reference[h]-a.floating[x]+(b&&((_=i.offset)==null?void 0:_[h])||0)+(b?0:E.crossAxis),O=a.reference[h]+a.reference[x]+(b?0:((v=i.offset)==null?void 0:v[h])||0)-(b?E.crossAxis:0);y<P?y=P:y>O&&(y=O)}return{[m]:g,[h]:y}}}},y9=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}=po(e,t),c=await zy(t,l),u=yn(r),d=gl(r),m=ca(r)==="x",{width:h,height:g}=n.floating;let y,w;u==="top"||u==="bottom"?(y=u,w=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=u,y=d==="end"?"top":"bottom");const E=g-c[y],_=h-c[w],v=!t.middlewareData.shift;let x=E,b=_;if(m){const O=h-c.left-c.right;b=d||v?ta(_,O):O}else{const O=g-c.top-c.bottom;x=d||v?ta(E,O):O}if(v&&!d){const O=Dn(c.left,0),$=Dn(c.right,0),C=Dn(c.top,0),R=Dn(c.bottom,0);m?b=h-2*(O!==0||$!==0?O+$:Dn(c.left,c.right)):x=g-2*(C!==0||R!==0?C+R:Dn(c.top,c.bottom))}await i({...t,availableWidth:b,availableHeight:x});const P=await o.getDimensions(a.floating);return h!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function jr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Un(e){return jr(e).getComputedStyle(e)}function Ek(e){return e instanceof jr(e).Node}function ra(e){return Ek(e)?(e.nodeName||"").toLowerCase():"#document"}function bn(e){return e instanceof HTMLElement||e instanceof jr(e).HTMLElement}function ox(e){return typeof ShadowRoot<"u"&&(e instanceof jr(e).ShadowRoot||e instanceof ShadowRoot)}function Ds(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Un(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function w9(e){return["table","td","th"].includes(ra(e))}function Jg(e){const t=Ly(),r=Un(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 Ly(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ym(e){return["html","body","#document"].includes(ra(e))}const Zg=Math.min,Wi=Math.max,zd=Math.round,Yc=Math.floor,na=e=>({x:e,y:e});function Sk(e){const t=Un(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=zd(r)!==a||zd(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function oo(e){return e instanceof Element||e instanceof jr(e).Element}function Fy(e){return oo(e)?e:e.contextElement}function Hi(e){const t=Fy(e);if(!bn(t))return na(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Sk(t);let i=(a?zd(r.width):r.width)/n,l=(a?zd(r.height):r.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const _9=na(0);function Pk(e){const t=jr(e);return Ly()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_9}function Ua(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Fy(e);let i=na(1);t&&(n?oo(n)&&(i=Hi(n)):i=Hi(e));const l=function(h,g,y){return g===void 0&&(g=!1),!(!y||g&&y!==jr(h))&&g}(a,r,n)?Pk(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=jr(a),g=n&&oo(n)?jr(n):n;let y=h.frameElement;for(;y&&n&&g!==h;){const w=Hi(y),E=y.getBoundingClientRect(),_=getComputedStyle(y),v=E.left+(y.clientLeft+parseFloat(_.paddingLeft))*w.x,x=E.top+(y.clientTop+parseFloat(_.paddingTop))*w.y;c*=w.x,u*=w.y,d*=w.x,m*=w.y,c+=v,u+=x,y=jr(y).frameElement}}return ol({width:d,height:m,x:c,y:u})}function wm(e){return oo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ao(e){var t;return(t=(Ek(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $k(e){return Ua(ao(e)).left+wm(e).scrollLeft}function al(e){if(ra(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ox(e)&&e.host||ao(e);return ox(t)?t.host:t}function Ok(e){const t=al(e);return ym(t)?e.ownerDocument?e.ownerDocument.body:e.body:bn(t)&&Ds(t)?t:Ok(t)}function Ld(e,t){var r;t===void 0&&(t=[]);const n=Ok(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),a=jr(n);return o?t.concat(a,a.visualViewport||[],Ds(n)?n:[]):t.concat(n,Ld(n))}function ax(e,t,r){let n;if(t==="viewport")n=function(o,a){const i=jr(o),l=ao(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=Ly();(!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=ao(o),i=wm(o),l=o.ownerDocument.body,c=Wi(a.scrollWidth,a.clientWidth,l.scrollWidth,l.clientWidth),u=Wi(a.scrollHeight,a.clientHeight,l.scrollHeight,l.clientHeight);let d=-i.scrollLeft+$k(o);const m=-i.scrollTop;return Un(l).direction==="rtl"&&(d+=Wi(a.clientWidth,l.clientWidth)-c),{width:c,height:u,x:d,y:m}}(ao(e));else if(oo(t))n=function(o,a){const i=Ua(o,!0,a==="fixed"),l=i.top+o.clientTop,c=i.left+o.clientLeft,u=bn(o)?Hi(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=Pk(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ol(n)}function Ck(e,t){const r=al(e);return!(r===t||!oo(r)||ym(r))&&(Un(r).position==="fixed"||Ck(r,t))}function x9(e,t,r){const n=bn(t),o=ao(t),a=r==="fixed",i=Ua(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=na(0);if(n||!n&&!a)if((ra(t)!=="body"||Ds(o))&&(l=wm(t)),bn(t)){const u=Ua(t,!0,a,t);c.x=u.x+t.clientLeft,c.y=u.y+t.clientTop}else o&&(c.x=$k(o));return{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function ix(e,t){return bn(e)&&Un(e).position!=="fixed"?t?t(e):e.offsetParent:null}function lx(e,t){const r=jr(e);if(!bn(e))return r;let n=ix(e,t);for(;n&&w9(n)&&Un(n).position==="static";)n=ix(n,t);return n&&(ra(n)==="html"||ra(n)==="body"&&Un(n).position==="static"&&!Jg(n))?r:n||function(o){let a=al(o);for(;bn(a)&&!ym(a);){if(Jg(a))return a;a=al(a)}return null}(e)||r}const b9={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=bn(r),a=ao(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"||Ds(a))&&(i=wm(r)),bn(r))){const u=Ua(r);l=Hi(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:ao,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=Ld(c).filter(w=>oo(w)&&ra(w)!=="body"),h=null;const g=Un(c).position==="fixed";let y=g?al(c):c;for(;oo(y)&&!ym(y);){const w=Un(y),E=Jg(y);E||w.position!=="fixed"||(h=null),(g?!E&&!h:!E&&w.position==="static"&&h&&["absolute","fixed"].includes(h.position)||Ds(y)&&!E&&Ck(c,y))?m=m.filter(_=>_!==y):h=w,y=al(y)}return u.set(c,m),m}(t,this._c):[].concat(r),n],i=a[0],l=a.reduce((c,u)=>{const d=ax(t,u,o);return c.top=Wi(d.top,c.top),c.right=Zg(d.right,c.right),c.bottom=Zg(d.bottom,c.bottom),c.left=Wi(d.left,c.left),c},ax(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:lx,getElementRects:async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||lx,a=this.getDimensions;return{reference:x9(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 Sk(e)},getScale:Hi,isElement:oo,isRTL:function(e){return getComputedStyle(e).direction==="rtl"}};function E9(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=Fy(e),d=o||a?[...u?Ld(u):[],...Ld(t)]:[];d.forEach(E=>{o&&E.addEventListener("scroll",r,{passive:!0}),a&&E.addEventListener("resize",r)});const m=u&&l?function(E,_){let v,x=null;const b=ao(E);function P(){clearTimeout(v),x&&x.disconnect(),x=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($||_(),!k||!T)return;const L={rootMargin:-Yc(j)+"px "+-Yc(b.clientWidth-(R+k))+"px "+-Yc(b.clientHeight-(j+T))+"px "+-Yc(R)+"px",threshold:Wi(0,Zg(1,C))||1};let B=!0;function V(M){const Q=M[0].intersectionRatio;if(Q!==C){if(!B)return O();Q?O(!1,Q):v=setTimeout(()=>{O(!1,1e-7)},100)}B=!1}try{x=new IntersectionObserver(V,{...L,root:b.ownerDocument})}catch{x=new IntersectionObserver(V,L)}x.observe(E)}(!0),P}(u,r):null;let h,g=-1,y=null;i&&(y=new ResizeObserver(E=>{let[_]=E;_&&_.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{y&&y.observe(t)})),r()}),u&&!c&&y.observe(u),y.observe(t));let w=c?Ua(e):null;return c&&function E(){const _=Ua(e);!w||_.x===w.x&&_.y===w.y&&_.width===w.width&&_.height===w.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 S9=(e,t,r)=>{const n=new Map,o={platform:b9,...r},a={...o.platform,_c:n};return s9(e,t,{...o,platform:a})},P9=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?rx({element:t.current,padding:r}).fn(o):{}:t?rx({element:t,padding:r}).fn(o):{}}}};var Du=typeof document<"u"?f.useLayoutEffect:f.useEffect;function Fd(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(!Fd(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)&&!Fd(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function sx(e){const t=f.useRef(e);return Du(()=>{t.current=e}),t}function $9(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);Fd(u,n)||d(n);const m=f.useRef(null),h=f.useRef(null),g=f.useRef(l),y=sx(a),w=sx(o),[E,_]=f.useState(null),[v,x]=f.useState(null),b=f.useCallback(j=>{m.current!==j&&(m.current=j,_(j))},[]),P=f.useCallback(j=>{h.current!==j&&(h.current=j,x(j))},[]),O=f.useCallback(()=>{if(!m.current||!h.current)return;const j={placement:t,strategy:r,middleware:u};w.current&&(j.platform=w.current),S9(m.current,h.current,j).then(k=>{const T={...k,isPositioned:!0};$.current&&!Fd(g.current,T)&&(g.current=T,Gs.flushSync(()=>{c(T)}))})},[u,t,r,w]);Du(()=>{i===!1&&g.current.isPositioned&&(g.current.isPositioned=!1,c(j=>({...j,isPositioned:!1})))},[i]);const $=f.useRef(!1);Du(()=>($.current=!0,()=>{$.current=!1}),[]),Du(()=>{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:b,setFloating:P}),[b,P]),R=f.useMemo(()=>({reference:E,floating:v}),[E,v]);return f.useMemo(()=>({...l,update:O,refs:C,elements:R,reference:b,floating:P}),[l,O,C,R,b,P])}var O9=typeof document<"u"?f.useLayoutEffect:f.useEffect;function C9(){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 k9=f.createContext(null),j9=()=>f.useContext(k9);function R9(e){return(e==null?void 0:e.ownerDocument)||document}function T9(e){return R9(e).defaultView||window}function Xc(e){return e?e instanceof T9(e).Element:!1}const I9=Fu["useInsertionEffect".toString()],D9=I9||(e=>e());function N9(e){const t=f.useRef(()=>{});return D9(()=>{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 A9(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,o=$9(e),a=j9(),i=f.useRef(null),l=f.useRef({}),c=f.useState(()=>C9())[0],[u,d]=f.useState(null),m=f.useCallback(_=>{const v=Xc(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;o.refs.setReference(v)},[o.refs]),h=f.useCallback(_=>{(Xc(_)||_===null)&&(i.current=_,d(_)),(Xc(o.refs.reference.current)||o.refs.reference.current===null||_!==null&&!Xc(_))&&o.refs.setReference(_)},[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]),w=N9(r),E=f.useMemo(()=>({...o,refs:g,elements:y,dataRef:l,nodeId:n,events:c,open:t,onOpenChange:w}),[o,n,c,t,w,g,y]);return O9(()=>{const _=a==null?void 0:a.nodesRef.current.find(v=>v.id===n);_&&(_.context=E)}),f.useMemo(()=>({...o,context:E,refs:g,reference:h,positionReference:m}),[o,g,E,h,m])}function M9({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 E9(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),hn(()=>{t.update()},n),hn(()=>{a(i=>i+1)},[e])}function z9(e){const t=[h9(e.offset)];return e.middlewares.shift&&t.push(g9({limiter:v9()})),e.middlewares.flip&&t.push(p9()),e.middlewares.inline&&t.push(m9()),t.push(P9({element:e.arrowRef,padding:e.arrowOffset})),t}function L9(e){const[t,r]=vr({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=A9({placement:e.position,middleware:[...z9(e),...e.width==="target"?[y9({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 M9({opened:e.opened,position:e.position,positionDependencies:e.positionDependencies,floating:a}),hn(()=>{var i;(i=e.onPositionChange)==null||i.call(e,a.placement)},[a.placement]),hn(()=>{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 kk={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"},[F9,jk]=vo(kk.context);var V9=Object.defineProperty,B9=Object.defineProperties,U9=Object.getOwnPropertyDescriptors,Vd=Object.getOwnPropertySymbols,Rk=Object.prototype.hasOwnProperty,Tk=Object.prototype.propertyIsEnumerable,cx=(e,t,r)=>t in e?V9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jc=(e,t)=>{for(var r in t||(t={}))Rk.call(t,r)&&cx(e,r,t[r]);if(Vd)for(var r of Vd(t))Tk.call(t,r)&&cx(e,r,t[r]);return e},W9=(e,t)=>B9(e,U9(t)),H9=(e,t)=>{var r={};for(var n in e)Rk.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&&Tk.call(e,n)&&(r[n]=e[n]);return r};const q9={refProp:"ref",popupType:"dialog"},Ik=f.forwardRef((e,t)=>{const r=q("PopoverTarget",q9,e),{children:n,refProp:o,popupType:a}=r,i=H9(r,["children","refProp","popupType"]);if(!Np(n))throw new Error(kk.children);const l=i,c=jk(),u=Yp(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,Jc(W9(Jc(Jc(Jc({},l),d),c.targetProps),{className:w$(c.targetProps.className,l.className,n.props.className),[o]:u}),c.controlled?null:{onClick:c.onToggle}))});Ik.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 G9=Q9;var K9=Object.defineProperty,ux=Object.getOwnPropertySymbols,Y9=Object.prototype.hasOwnProperty,X9=Object.prototype.propertyIsEnumerable,dx=(e,t,r)=>t in e?K9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,di=(e,t)=>{for(var r in t||(t={}))Y9.call(t,r)&&dx(e,r,t[r]);if(ux)for(var r of ux(t))X9.call(t,r)&&dx(e,r,t[r]);return e};const fx={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function J9({transition:e,state:t,duration:r,timingFunction:n}){const o={transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in $c?di(di(di({transitionProperty:$c[e].transitionProperty},o),$c[e].common),$c[e][fx[t]]):null:di(di(di({transitionProperty:e.transitionProperty},o),e.common),e[fx[t]])}function Z9({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:a,onEntered:i,onExited:l}){const c=Zt(),u=Xp(),d=c.respectReducedMotion?u:!1,[m,h]=f.useState(d?0:e),[g,y]=f.useState(n?"entered":"exited"),w=f.useRef(-1),E=_=>{const v=_?o:a,x=_?i:l;y(_?"pre-entering":"pre-exiting"),window.clearTimeout(w.current);const b=d?0:_?e:t;if(h(b),b===0)typeof v=="function"&&v(),typeof x=="function"&&x(),y(_?"entered":"exited");else{const P=window.setTimeout(()=>{typeof v=="function"&&v(),y(_?"entering":"exiting")},10);w.current=window.setTimeout(()=>{window.clearTimeout(P),typeof x=="function"&&x(),y(_?"entered":"exited")},b)}};return hn(()=>{E(n)},[n]),f.useEffect(()=>()=>window.clearTimeout(w.current),[]),{transitionDuration:m,transitionStatus:g,transitionTimingFunction:r||c.transitionTimingFunction}}function Zs({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}=Z9({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(J9({transition:t,duration:m,state:h,timingFunction:g})))}Zs.displayName="@mantine/core/Transition";function Vy({children:e,active:t=!0,refProp:r="ref"}){const n=FA(t),o=Yp(n,e==null?void 0:e.ref);return Np(e)?f.cloneElement(e,{[r]:o}):e}Vy.displayName="@mantine/core/FocusTrap";var eF=Object.defineProperty,tF=Object.defineProperties,rF=Object.getOwnPropertyDescriptors,px=Object.getOwnPropertySymbols,nF=Object.prototype.hasOwnProperty,oF=Object.prototype.propertyIsEnumerable,mx=(e,t,r)=>t in e?eF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ro=(e,t)=>{for(var r in t||(t={}))nF.call(t,r)&&mx(e,r,t[r]);if(px)for(var r of px(t))oF.call(t,r)&&mx(e,r,t[r]);return e},Zc=(e,t)=>tF(e,rF(t));function hx(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function gx(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 aF={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function iF({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",[aF[c]]:S(n)},m=S(-t/2);return c==="left"?Zc(Ro(Ro({},d),hx(u,i,r,o)),{right:m,borderLeftColor:"transparent",borderBottomColor:"transparent"}):c==="right"?Zc(Ro(Ro({},d),hx(u,i,r,o)),{left:m,borderRightColor:"transparent",borderTopColor:"transparent"}):c==="top"?Zc(Ro(Ro({},d),gx(u,a,r,o,l)),{bottom:m,borderTopColor:"transparent",borderLeftColor:"transparent"}):c==="bottom"?Zc(Ro(Ro({},d),gx(u,a,r,o,l)),{top:m,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var lF=Object.defineProperty,sF=Object.defineProperties,cF=Object.getOwnPropertyDescriptors,Bd=Object.getOwnPropertySymbols,Dk=Object.prototype.hasOwnProperty,Nk=Object.prototype.propertyIsEnumerable,vx=(e,t,r)=>t in e?lF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uF=(e,t)=>{for(var r in t||(t={}))Dk.call(t,r)&&vx(e,r,t[r]);if(Bd)for(var r of Bd(t))Nk.call(t,r)&&vx(e,r,t[r]);return e},dF=(e,t)=>sF(e,cF(t)),fF=(e,t)=>{var r={};for(var n in e)Dk.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&&Nk.call(e,n)&&(r[n]=e[n]);return r};const Ak=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=fF(r,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const h=Zt();return c?s.createElement("div",dF(uF({},m),{ref:t,style:iF({position:n,arrowSize:o,arrowOffset:a,arrowRadius:i,arrowPosition:l,dir:h.dir,arrowX:u,arrowY:d})})):null});Ak.displayName="@mantine/core/FloatingArrow";var pF=Object.defineProperty,mF=Object.defineProperties,hF=Object.getOwnPropertyDescriptors,Ud=Object.getOwnPropertySymbols,Mk=Object.prototype.hasOwnProperty,zk=Object.prototype.propertyIsEnumerable,yx=(e,t,r)=>t in e?pF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fi=(e,t)=>{for(var r in t||(t={}))Mk.call(t,r)&&yx(e,r,t[r]);if(Ud)for(var r of Ud(t))zk.call(t,r)&&yx(e,r,t[r]);return e},eu=(e,t)=>mF(e,hF(t)),gF=(e,t)=>{var r={};for(var n in e)Mk.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&&zk.call(e,n)&&(r[n]=e[n]);return r};const vF={};function Lk(e){var t;const r=q("PopoverDropdown",vF,e),{style:n,className:o,children:a,onKeyDownCapture:i}=r,l=gF(r,["style","className","children","onKeyDownCapture"]),c=jk(),{classes:u,cx:d}=G9({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(pm,eu(fi({},c.portalProps),{withinPortal:c.withinPortal}),s.createElement(Zs,eu(fi({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,w;return s.createElement(Vy,{active:c.trapFocus},s.createElement(ue,fi(eu(fi({},h),{tabIndex:-1,ref:c.floating,style:eu(fi(fi({},n),g),{zIndex:c.zIndex,top:(y=c.y)!=null?y:0,left:(w=c.x)!=null?w:0,width:c.width==="target"?void 0:S(c.width)}),className:d(u.dropdown,o),onKeyDownCapture:sN(c.onClose,{active:c.closeOnEscape,onTrigger:m,onKeyDown:i}),"data-position":c.placement}),l),a,s.createElement(Ak,{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})))}))}Lk.displayName="@mantine/core/PopoverDropdown";function yF(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 wx=Object.getOwnPropertySymbols,wF=Object.prototype.hasOwnProperty,_F=Object.prototype.propertyIsEnumerable,xF=(e,t)=>{var r={};for(var n in e)wF.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&wx)for(var n of wx(e))t.indexOf(n)<0&&_F.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:yo("popover"),__staticSelector:"Popover",width:"max-content"};function xo(e){var t,r,n,o,a,i;const l=f.useRef(null),c=q("Popover",bF,e),{children:u,position:d,offset:m,onPositionChange:h,positionDependencies:g,opened:y,transitionProps:w,width:E,middlewares:_,withArrow:v,arrowSize:x,arrowOffset:b,arrowRadius:P,arrowPosition:O,unstyled:$,classNames:C,styles:R,closeOnClickOutside:j,withinPortal:k,portalProps:T,closeOnEscape:L,clickOutsideEvents:B,trapFocus:V,onClose:M,onOpen:Q,onChange:A,zIndex:z,radius:H,shadow:ie,id:we,defaultOpened:Ie,__staticSelector:de,withRoles:He,disabled:Le,returnFocus:wt,variant:tt,keepMounted:Er}=c,nn=xF(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"]),[on,Fr]=f.useState(null),[Po,jt]=f.useState(null),Sr=Mr(we),Gn=Zt(),Ue=L9({middlewares:_,width:E,position:yF(Gn.dir,d),offset:typeof m=="number"?m+(v?x/2:0):m,arrowRef:l,arrowOffset:b,onPositionChange:h,positionDependencies:g,opened:y,defaultOpened:Ie,onChange:A,onOpen:Q,onClose:M});jA(()=>Ue.opened&&j&&Ue.onClose(),B,[on,Po]);const Vr=f.useCallback(_t=>{Fr(_t),Ue.floating.reference(_t)},[Ue.floating.reference]),Br=f.useCallback(_t=>{jt(_t),Ue.floating.floating(_t)},[Ue.floating.floating]);return s.createElement(F9,{value:{returnFocus:wt,disabled:Le,controlled:Ue.controlled,reference:Vr,floating:Br,x:Ue.floating.x,y:Ue.floating.y,arrowX:(n=(r=(t=Ue.floating)==null?void 0:t.middlewareData)==null?void 0:r.arrow)==null?void 0:n.x,arrowY:(i=(a=(o=Ue.floating)==null?void 0:o.middlewareData)==null?void 0:a.arrow)==null?void 0:i.y,opened:Ue.opened,arrowRef:l,transitionProps:w,width:E,withArrow:v,arrowSize:x,arrowOffset:b,arrowRadius:P,arrowPosition:O,placement:Ue.floating.placement,trapFocus:V,withinPortal:k,portalProps:T,zIndex:z,radius:H,shadow:ie,closeOnEscape:L,onClose:Ue.onClose,onToggle:Ue.onToggle,getTargetId:()=>`${Sr}-target`,getDropdownId:()=>`${Sr}-dropdown`,withRoles:He,targetProps:nn,__staticSelector:de,classNames:C,styles:R,unstyled:$,variant:tt,keepMounted:Er}},u)}xo.Target=Ik;xo.Dropdown=Lk;xo.displayName="@mantine/core/Popover";var EF=Object.defineProperty,Wd=Object.getOwnPropertySymbols,Fk=Object.prototype.hasOwnProperty,Vk=Object.prototype.propertyIsEnumerable,_x=(e,t,r)=>t in e?EF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,SF=(e,t)=>{for(var r in t||(t={}))Fk.call(t,r)&&_x(e,r,t[r]);if(Wd)for(var r of Wd(t))Vk.call(t,r)&&_x(e,r,t[r]);return e},PF=(e,t)=>{var r={};for(var n in e)Fk.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&&Vk.call(e,n)&&(r[n]=e[n]);return r};function $F(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=PF(t,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:g}=l9(null,{name:c,styles:u,classNames:d,unstyled:m});return s.createElement(xo.Dropdown,SF({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!==Ny?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:l},s.createElement("div",{className:g.itemsWrapper,style:{flexDirection:a}},r))))}function ds({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:w,variant:E}){return s.createElement(xo,{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:w,onPositionChange:_=>c&&(l==null?void 0:l(_==="top"?"column-reverse":"column")),variant:E},a)}ds.Target=xo.Target;ds.Dropdown=$F;var OF=Object.defineProperty,CF=Object.defineProperties,kF=Object.getOwnPropertyDescriptors,Hd=Object.getOwnPropertySymbols,Bk=Object.prototype.hasOwnProperty,Uk=Object.prototype.propertyIsEnumerable,xx=(e,t,r)=>t in e?OF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tu=(e,t)=>{for(var r in t||(t={}))Bk.call(t,r)&&xx(e,r,t[r]);if(Hd)for(var r of Hd(t))Uk.call(t,r)&&xx(e,r,t[r]);return e},jF=(e,t)=>CF(e,kF(t)),RF=(e,t)=>{var r={};for(var n in e)Bk.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&&Uk.call(e,n)&&(r[n]=e[n]);return r};function Wk(e,t,r){const n=q(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:w,descriptionProps:E,wrapperProps:_,id:v,size:x,style:b,inputContainer:P,inputWrapperOrder:O,withAsterisk:$,variant:C}=n,R=RF(n,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),j=Mr(v),{systemStyles:k,rest:T}=Hn(R),L=tu({label:o,description:a,error:i,required:l,classNames:c,className:d,__staticSelector:h,sx:g,errorProps:y,labelProps:w,descriptionProps:E,unstyled:m,styles:u,id:j,size:x,style:b,inputContainer:P,inputWrapperOrder:O,withAsterisk:$,variant:C},_);return jF(tu({},T),{classNames:c,styles:u,unstyled:m,wrapperProps:tu(tu({},L),k),inputProps:{required:l,classNames:c,styles:u,unstyled:m,id:j,size:x,__staticSelector:h,error:i,variant:C}})}var TF=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 IF=TF;var DF=Object.defineProperty,qd=Object.getOwnPropertySymbols,Hk=Object.prototype.hasOwnProperty,qk=Object.prototype.propertyIsEnumerable,bx=(e,t,r)=>t in e?DF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NF=(e,t)=>{for(var r in t||(t={}))Hk.call(t,r)&&bx(e,r,t[r]);if(qd)for(var r of qd(t))qk.call(t,r)&&bx(e,r,t[r]);return e},AF=(e,t)=>{var r={};for(var n in e)Hk.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&&qk.call(e,n)&&(r[n]=e[n]);return r};const MF={labelElement:"label",size:"sm"},By=f.forwardRef((e,t)=>{const r=q("InputLabel",MF,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,w=AF(r,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:E,cx:_}=IF(null,{name:["InputWrapper",h],classNames:l,styles:c,unstyled:u,variant:g,size:i});return s.createElement(ue,NF({component:n,ref:t,className:_(E.label,d),htmlFor:n==="label"?m:void 0,onMouseDown:v=>{y==null||y(v),!v.defaultPrevented&&v.detail>1&&v.preventDefault()}},w),o,a&&s.createElement("span",{className:E.required,"aria-hidden":!0}," *"))});By.displayName="@mantine/core/InputLabel";var zF=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 LF=zF;var FF=Object.defineProperty,Qd=Object.getOwnPropertySymbols,Qk=Object.prototype.hasOwnProperty,Gk=Object.prototype.propertyIsEnumerable,Ex=(e,t,r)=>t in e?FF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VF=(e,t)=>{for(var r in t||(t={}))Qk.call(t,r)&&Ex(e,r,t[r]);if(Qd)for(var r of Qd(t))Gk.call(t,r)&&Ex(e,r,t[r]);return e},BF=(e,t)=>{var r={};for(var n in e)Qk.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&&Gk.call(e,n)&&(r[n]=e[n]);return r};const UF={size:"sm"},Uy=f.forwardRef((e,t)=>{const r=q("InputError",UF,e),{children:n,className:o,classNames:a,styles:i,unstyled:l,size:c,__staticSelector:u,variant:d}=r,m=BF(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=LF(null,{name:["InputWrapper",u],classNames:a,styles:i,unstyled:l,variant:d,size:c});return s.createElement(ae,VF({className:g(h.error,o),ref:t},m),n)});Uy.displayName="@mantine/core/InputError";var WF=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 HF=WF;var qF=Object.defineProperty,Gd=Object.getOwnPropertySymbols,Kk=Object.prototype.hasOwnProperty,Yk=Object.prototype.propertyIsEnumerable,Sx=(e,t,r)=>t in e?qF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,QF=(e,t)=>{for(var r in t||(t={}))Kk.call(t,r)&&Sx(e,r,t[r]);if(Gd)for(var r of Gd(t))Yk.call(t,r)&&Sx(e,r,t[r]);return e},GF=(e,t)=>{var r={};for(var n in e)Kk.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&&Yk.call(e,n)&&(r[n]=e[n]);return r};const KF={size:"sm"},Wy=f.forwardRef((e,t)=>{const r=q("InputDescription",KF,e),{children:n,className:o,classNames:a,styles:i,unstyled:l,size:c,__staticSelector:u,variant:d}=r,m=GF(r,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:h,cx:g}=HF(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)});Wy.displayName="@mantine/core/InputDescription";const Xk=f.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),YF=Xk.Provider,XF=()=>f.useContext(Xk);function JF(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 ZF=Object.defineProperty,eV=Object.defineProperties,tV=Object.getOwnPropertyDescriptors,Px=Object.getOwnPropertySymbols,rV=Object.prototype.hasOwnProperty,nV=Object.prototype.propertyIsEnumerable,$x=(e,t,r)=>t in e?ZF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oV=(e,t)=>{for(var r in t||(t={}))rV.call(t,r)&&$x(e,r,t[r]);if(Px)for(var r of Px(t))nV.call(t,r)&&$x(e,r,t[r]);return e},aV=(e,t)=>eV(e,tV(t)),iV=W(e=>({root:aV(oV({},e.fn.fontStyles()),{lineHeight:e.lineHeight})}));const lV=iV;var sV=Object.defineProperty,cV=Object.defineProperties,uV=Object.getOwnPropertyDescriptors,Kd=Object.getOwnPropertySymbols,Jk=Object.prototype.hasOwnProperty,Zk=Object.prototype.propertyIsEnumerable,Ox=(e,t,r)=>t in e?sV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,To=(e,t)=>{for(var r in t||(t={}))Jk.call(t,r)&&Ox(e,r,t[r]);if(Kd)for(var r of Kd(t))Zk.call(t,r)&&Ox(e,r,t[r]);return e},Cx=(e,t)=>cV(e,uV(t)),dV=(e,t)=>{var r={};for(var n in e)Jk.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&&Zk.call(e,n)&&(r[n]=e[n]);return r};const fV={labelElement:"label",size:"sm",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},ej=f.forwardRef((e,t)=>{const r=q("InputWrapper",fV,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:w,size:E,inputContainer:_,__staticSelector:v,unstyled:x,inputWrapperOrder:b,withAsterisk:P,variant:O}=r,$=dV(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}=lV(null,{classNames:y,styles:w,name:["InputWrapper",v],unstyled:x,variant:O,size:E}),j={classNames:y,styles:w,unstyled:x,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(By,To(To({key:"label",labelElement:d,id:l?`${l}-label`:void 0,htmlFor:l,required:k},j),m),o),A=u&&s.createElement(Wy,Cx(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"},_(a)),H=typeof c!="boolean"&&c&&s.createElement(Uy,Cx(To(To({},g),j),{size:(g==null?void 0:g.size)||j.size,key:"error",id:(g==null?void 0:g.id)||T}),c),ie=b.map(we=>{switch(we){case"label":return Q;case"input":return z;case"description":return A;case"error":return H;default:return null}});return s.createElement(YF,{value:To({describedBy:M},JF(b,{hasDescription:!!A,hasError:!!H}))},s.createElement(ue,To({className:R(C.root,n),ref:t},$),ie))});ej.displayName="@mantine/core/InputWrapper";var pV=Object.defineProperty,Yd=Object.getOwnPropertySymbols,tj=Object.prototype.hasOwnProperty,rj=Object.prototype.propertyIsEnumerable,kx=(e,t,r)=>t in e?pV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mV=(e,t)=>{for(var r in t||(t={}))tj.call(t,r)&&kx(e,r,t[r]);if(Yd)for(var r of Yd(t))rj.call(t,r)&&kx(e,r,t[r]);return e},hV=(e,t)=>{var r={};for(var n in e)tj.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&&rj.call(e,n)&&(r[n]=e[n]);return r};const gV={},nj=f.forwardRef((e,t)=>{const r=q("InputPlaceholder",gV,e),{sx:n}=r,o=hV(r,["sx"]);return s.createElement(ue,mV({component:"span",sx:[a=>a.fn.placeholderStyles(),...Dp(n)],ref:t},o))});nj.displayName="@mantine/core/InputPlaceholder";var vV=Object.defineProperty,yV=Object.defineProperties,wV=Object.getOwnPropertyDescriptors,jx=Object.getOwnPropertySymbols,_V=Object.prototype.hasOwnProperty,xV=Object.prototype.propertyIsEnumerable,Rx=(e,t,r)=>t in e?vV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ru=(e,t)=>{for(var r in t||(t={}))_V.call(t,r)&&Rx(e,r,t[r]);if(jx)for(var r of jx(t))xV.call(t,r)&&Rx(e,r,t[r]);return e},$h=(e,t)=>yV(e,wV(t));const xt={xs:S(30),sm:S(36),md:S(42),lg:S(50),xl:S(60)},bV=["default","filled","unstyled"];function EV({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 SV=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:$h(ru(ru($h(ru({},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}),EV({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":$h(ru({},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})}}}),PV=Object.defineProperty,$V=Object.defineProperties,OV=Object.getOwnPropertyDescriptors,Xd=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,aj=Object.prototype.propertyIsEnumerable,Tx=(e,t,r)=>t in e?PV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nu=(e,t)=>{for(var r in t||(t={}))oj.call(t,r)&&Tx(e,r,t[r]);if(Xd)for(var r of Xd(t))aj.call(t,r)&&Tx(e,r,t[r]);return e},Ix=(e,t)=>$V(e,OV(t)),CV=(e,t)=>{var r={};for(var n in e)oj.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&&aj.call(e,n)&&(r[n]=e[n]);return r};const kV={size:"sm",variant:"default"},ei=f.forwardRef((e,t)=>{const r=q("Input",kV,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:w,wrapperProps:E,classNames:_,styles:v,__staticSelector:x,multiline:b,sx:P,unstyled:O,pointer:$}=r,C=CV(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}=XF(),{classes:T,cx:L}=SV({radius:y,multiline:b,invalid:!!o,rightSectionWidth:d?S(d):void 0,iconWidth:m,withRightSection:!!h,offsetBottom:R,offsetTop:j,pointer:$},{classNames:_,styles:v,name:["Input",x],unstyled:O,variant:l,size:w}),{systemStyles:B,rest:V}=Hn(C);return s.createElement(ue,nu(nu({className:L(T.wrapper,n),sx:P,style:u},B),E),c&&s.createElement("div",{className:T.icon},c),s.createElement(ue,Ix(nu({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",Ix(nu({},g),{className:T.rightSection}),h))});ei.displayName="@mantine/core/Input";ei.Wrapper=ej;ei.Label=By;ei.Description=Wy;ei.Error=Uy;ei.Placeholder=nj;const zt=ei;var jV=Object.defineProperty,Jd=Object.getOwnPropertySymbols,ij=Object.prototype.hasOwnProperty,lj=Object.prototype.propertyIsEnumerable,Dx=(e,t,r)=>t in e?jV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nx=(e,t)=>{for(var r in t||(t={}))ij.call(t,r)&&Dx(e,r,t[r]);if(Jd)for(var r of Jd(t))lj.call(t,r)&&Dx(e,r,t[r]);return e},RV=(e,t)=>{var r={};for(var n in e)ij.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&&lj.call(e,n)&&(r[n]=e[n]);return r};function TV(e){const t=e,{style:r}=t,n=RV(t,["style"]);return s.createElement("svg",Nx({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Nx({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 IV=Object.defineProperty,DV=Object.defineProperties,NV=Object.getOwnPropertyDescriptors,Ax=Object.getOwnPropertySymbols,AV=Object.prototype.hasOwnProperty,MV=Object.prototype.propertyIsEnumerable,Mx=(e,t,r)=>t in e?IV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zV=(e,t)=>{for(var r in t||(t={}))AV.call(t,r)&&Mx(e,r,t[r]);if(Ax)for(var r of Ax(t))MV.call(t,r)&&Mx(e,r,t[r]);return e},LV=(e,t)=>DV(e,NV(t));const sj=f.createContext(null);function FV({spacing:e,children:t}){return s.createElement(sj.Provider,{value:{spacing:e}},t)}function VV(){const e=f.useContext(sj);return e?LV(zV({},e),{withinGroup:!0}):{spacing:null,withinGroup:!1}}var BV=W((e,{spacing:t})=>({root:{display:"flex",paddingLeft:N({size:t,sizes:e.spacing})}}));const UV=BV;var WV=Object.defineProperty,Zd=Object.getOwnPropertySymbols,cj=Object.prototype.hasOwnProperty,uj=Object.prototype.propertyIsEnumerable,zx=(e,t,r)=>t in e?WV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HV=(e,t)=>{for(var r in t||(t={}))cj.call(t,r)&&zx(e,r,t[r]);if(Zd)for(var r of Zd(t))uj.call(t,r)&&zx(e,r,t[r]);return e},qV=(e,t)=>{var r={};for(var n in e)cj.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&&uj.call(e,n)&&(r[n]=e[n]);return r};const QV={},dj=f.forwardRef((e,t)=>{const r=q("AvatarGroup",QV,e),{children:n,spacing:o="sm",unstyled:a,className:i,variant:l}=r,c=qV(r,["children","spacing","unstyled","className","variant"]),{classes:u,cx:d}=UV({spacing:o},{name:"AvatarGroup",unstyled:a,variant:l});return s.createElement(FV,{spacing:o},s.createElement(ue,HV({ref:t,className:d(u.root,i)},c),n))});dj.displayName="@mantine/core/AvatarGroup";var GV=Object.defineProperty,KV=Object.defineProperties,YV=Object.getOwnPropertyDescriptors,Lx=Object.getOwnPropertySymbols,XV=Object.prototype.hasOwnProperty,JV=Object.prototype.propertyIsEnumerable,Fx=(e,t,r)=>t in e?GV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Al=(e,t)=>{for(var r in t||(t={}))XV.call(t,r)&&Fx(e,r,t[r]);if(Lx)for(var r of Lx(t))JV.call(t,r)&&Fx(e,r,t[r]);return e},Vx=(e,t)=>KV(e,YV(t));const ZV=["filled","light","gradient","outline"],ou={xs:S(16),sm:S(26),md:S(38),lg:S(56),xl:S(84)};function eB({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 tB({theme:e,variant:t,color:r,gradient:n}){const o=e.fn.variant({variant:t,color:r,gradient:n});return ZV.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 rB=W((e,{radius:t,withinGroup:r,spacing:n,color:o,gradient:a},{variant:i,size:l})=>{const c=tB({theme:e,color:o,gradient:a,variant:i});return{root:Al(Vx(Al({},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:ou}),minWidth:N({size:l,sizes:ou}),height:N({size:l,sizes:ou})}),eB({withinGroup:r,spacing:n,theme:e})),image:{objectFit:"cover",width:"100%",height:"100%",display:"block"},placeholder:Al(Vx(Al({},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:ou})} / 2.5)`}),c.placeholder),placeholderIcon:Al({width:"70%",height:"70%"},c.placeholderIcon)}});const nB=rB;var oB=Object.defineProperty,aB=Object.defineProperties,iB=Object.getOwnPropertyDescriptors,ef=Object.getOwnPropertySymbols,fj=Object.prototype.hasOwnProperty,pj=Object.prototype.propertyIsEnumerable,Bx=(e,t,r)=>t in e?oB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ux=(e,t)=>{for(var r in t||(t={}))fj.call(t,r)&&Bx(e,r,t[r]);if(ef)for(var r of ef(t))pj.call(t,r)&&Bx(e,r,t[r]);return e},lB=(e,t)=>aB(e,iB(t)),sB=(e,t)=>{var r={};for(var n in e)fj.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&&pj.call(e,n)&&(r[n]=e[n]);return r};const cB={size:"md",color:"gray",variant:"light"},Hy=f.forwardRef((e,t)=>{const r=q("Avatar",cB,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:w}=r,E=sB(r,["className","size","src","alt","radius","children","color","variant","gradient","classNames","styles","imageProps","unstyled"]),_=VV(),[v,x]=f.useState(!a),{classes:b,cx:P}=nB({color:u,radius:l,withinGroup:_.withinGroup,spacing:_.spacing,gradient:m},{classNames:h,styles:g,unstyled:w,name:"Avatar",variant:d,size:o});return f.useEffect(()=>{x(!a)},[a]),s.createElement(ue,Ux({component:"div",className:P(b.root,n),ref:t},E),v?s.createElement("div",{className:b.placeholder,title:i},c||s.createElement(TV,{className:b.placeholderIcon})):s.createElement("img",lB(Ux({},y),{className:b.image,src:a,alt:i,onError:()=>x(!0)})))});Hy.displayName="@mantine/core/Avatar";Hy.Group=dj;const tf=Hy;var uB=Object.defineProperty,dB=Object.defineProperties,fB=Object.getOwnPropertyDescriptors,Wx=Object.getOwnPropertySymbols,pB=Object.prototype.hasOwnProperty,mB=Object.prototype.propertyIsEnumerable,Hx=(e,t,r)=>t in e?uB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Oh=(e,t)=>{for(var r in t||(t={}))pB.call(t,r)&&Hx(e,r,t[r]);if(Wx)for(var r of Wx(t))mB.call(t,r)&&Hx(e,r,t[r]);return e},hB=(e,t)=>dB(e,fB(t));const gB=["light","filled","outline","dot","gradient"],Ch={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)}},vB={xs:S(4),sm:S(4),md:S(6),lg:S(8),xl:S(10)};function yB({theme:e,variant:t,color:r,size:n,gradient:o}){if(!gB.includes(t))return null;if(t==="dot"){const i=N({size:n,sizes:vB});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 wB=W((e,{color:t,radius:r,gradient:n,fullWidth:o},{variant:a,size:i})=>{const{fontSize:l,height:c}=i in Ch?Ch[i]:Ch.md;return{leftSection:{marginRight:`calc(${e.spacing.xs} / 2)`},rightSection:{marginLeft:`calc(${e.spacing.xs} / 2)`},inner:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},root:Oh(hB(Oh(Oh({},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"}),yB({theme:e,variant:a,color:t,size:i,gradient:n}))}});const _B=wB;var xB=Object.defineProperty,rf=Object.getOwnPropertySymbols,mj=Object.prototype.hasOwnProperty,hj=Object.prototype.propertyIsEnumerable,qx=(e,t,r)=>t in e?xB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bB=(e,t)=>{for(var r in t||(t={}))mj.call(t,r)&&qx(e,r,t[r]);if(rf)for(var r of rf(t))hj.call(t,r)&&qx(e,r,t[r]);return e},EB=(e,t)=>{var r={};for(var n in e)mj.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&&hj.call(e,n)&&(r[n]=e[n]);return r};const SB={variant:"light",size:"md",radius:"xl"},gj=f.forwardRef((e,t)=>{const r=q("Badge",SB,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:w}=r,E=EB(r,["className","color","variant","fullWidth","children","size","leftSection","rightSection","radius","gradient","classNames","styles","unstyled"]),{classes:_,cx:v}=_B({fullWidth:i,color:o,radius:m,gradient:h},{classNames:g,styles:y,name:"Badge",unstyled:w,variant:a,size:c});return s.createElement(ue,bB({className:v(_.root,n),ref:t},E),u&&s.createElement("span",{className:_.leftSection},u),s.createElement("span",{className:_.inner},l),d&&s.createElement("span",{className:_.rightSection},d))});gj.displayName="@mantine/core/Badge";const PB=gj;var $B=Object.defineProperty,nf=Object.getOwnPropertySymbols,vj=Object.prototype.hasOwnProperty,yj=Object.prototype.propertyIsEnumerable,Qx=(e,t,r)=>t in e?$B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gx=(e,t)=>{for(var r in t||(t={}))vj.call(t,r)&&Qx(e,r,t[r]);if(nf)for(var r of nf(t))yj.call(t,r)&&Qx(e,r,t[r]);return e},OB=(e,t)=>{var r={};for(var n in e)vj.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&&yj.call(e,n)&&(r[n]=e[n]);return r};function CB(e){const t=e,{style:r}=t,n=OB(t,["style"]);return s.createElement("svg",Gx({viewBox:"0 0 409.294 409.294",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",style:Gx({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 kB=Object.defineProperty,jB=Object.defineProperties,RB=Object.getOwnPropertyDescriptors,Kx=Object.getOwnPropertySymbols,TB=Object.prototype.hasOwnProperty,IB=Object.prototype.propertyIsEnumerable,Yx=(e,t,r)=>t in e?kB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,DB=(e,t)=>{for(var r in t||(t={}))TB.call(t,r)&&Yx(e,r,t[r]);if(Kx)for(var r of Kx(t))IB.call(t,r)&&Yx(e,r,t[r]);return e},NB=(e,t)=>jB(e,RB(t)),AB=W((e,{color:t})=>({root:NB(DB({},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 MB=AB;var zB=Object.defineProperty,of=Object.getOwnPropertySymbols,wj=Object.prototype.hasOwnProperty,_j=Object.prototype.propertyIsEnumerable,Xx=(e,t,r)=>t in e?zB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,LB=(e,t)=>{for(var r in t||(t={}))wj.call(t,r)&&Xx(e,r,t[r]);if(of)for(var r of of(t))_j.call(t,r)&&Xx(e,r,t[r]);return e},FB=(e,t)=>{var r={};for(var n in e)wj.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&&_j.call(e,n)&&(r[n]=e[n]);return r};const VB={color:"gray",icon:s.createElement(CB,null)},xj=f.forwardRef((e,t)=>{const r=q("Blockquote",VB,e),{className:n,color:o,icon:a,cite:i,children:l,classNames:c,styles:u,unstyled:d,variant:m}=r,h=FB(r,["className","color","icon","cite","children","classNames","styles","unstyled","variant"]),{classes:g,cx:y}=MB({color:o},{classNames:c,styles:u,unstyled:d,name:"Blockquote",variant:m});return s.createElement(ue,LB({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 BB=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 UB=BB;var WB=Object.defineProperty,af=Object.getOwnPropertySymbols,bj=Object.prototype.hasOwnProperty,Ej=Object.prototype.propertyIsEnumerable,Jx=(e,t,r)=>t in e?WB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HB=(e,t)=>{for(var r in t||(t={}))bj.call(t,r)&&Jx(e,r,t[r]);if(af)for(var r of af(t))Ej.call(t,r)&&Jx(e,r,t[r]);return e},qB=(e,t)=>{var r={};for(var n in e)bj.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&&Ej.call(e,n)&&(r[n]=e[n]);return r};const QB={orientation:"horizontal",buttonBorderWidth:1},Sj=f.forwardRef((e,t)=>{const r=q("ButtonGroup",QB,e),{className:n,orientation:o,buttonBorderWidth:a,unstyled:i}=r,l=qB(r,["className","orientation","buttonBorderWidth","unstyled"]),{classes:c,cx:u}=UB({orientation:o,buttonBorderWidth:a},{name:"ButtonGroup",unstyled:i});return s.createElement(ue,HB({className:u(c.root,n),ref:t},l))});Sj.displayName="@mantine/core/ButtonGroup";var GB=Object.defineProperty,KB=Object.defineProperties,YB=Object.getOwnPropertyDescriptors,Zx=Object.getOwnPropertySymbols,XB=Object.prototype.hasOwnProperty,JB=Object.prototype.propertyIsEnumerable,eb=(e,t,r)=>t in e?GB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eo=(e,t)=>{for(var r in t||(t={}))XB.call(t,r)&&eb(e,r,t[r]);if(Zx)for(var r of Zx(t))JB.call(t,r)&&eb(e,r,t[r]);return e},Nu=(e,t)=>KB(e,YB(t));const ZB=["filled","outline","light","white","default","subtle","gradient"],ev={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 eU({compact:e,size:t,withLeftIcon:r,withRightIcon:n}){if(e)return ev[`compact-${t}`];const o=ev[t];return o?Nu(eo({},o),{paddingLeft:r?`calc(${o.paddingLeft} / 1.5)`:o.paddingLeft,paddingRight:n?`calc(${o.paddingRight} / 1.5)`:o.paddingRight}):{}}const tU=e=>({display:e?"block":"inline-block",width:e?"100%":"auto"});function rU({variant:e,theme:t,color:r,gradient:n}){if(!ZB.includes(e))return null;const o=t.fn.variant({color:r,variant:e,gradient:n});return e==="gradient"?eo({border:0,backgroundImage:o.background,color:o.color},t.fn.hover({backgroundSize:"200%"})):eo({border:`${S(1)} solid ${o.border}`,backgroundColor:o.background,color:o.color},t.fn.hover({backgroundColor:o.hover}))}var nU=W((e,{radius:t,fullWidth:r,compact:n,withLeftIcon:o,withRightIcon:a,color:i,gradient:l},{variant:c,size:u})=>({root:Nu(eo(Nu(eo(eo(eo(eo({},eU({compact:n,size:u,withLeftIcon:o,withRightIcon:a})),e.fn.fontStyles()),e.fn.focusStyles()),tU(r)),{borderRadius:e.fn.radius(t),fontWeight:600,position:"relative",lineHeight:1,fontSize:N({size:u,sizes:e.fontSizes}),userSelect:"none",cursor:"pointer"}),rU({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":Nu(eo({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 oU=nU;var aU=Object.defineProperty,lf=Object.getOwnPropertySymbols,Pj=Object.prototype.hasOwnProperty,$j=Object.prototype.propertyIsEnumerable,tb=(e,t,r)=>t in e?aU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rb=(e,t)=>{for(var r in t||(t={}))Pj.call(t,r)&&tb(e,r,t[r]);if(lf)for(var r of lf(t))$j.call(t,r)&&tb(e,r,t[r]);return e},iU=(e,t)=>{var r={};for(var n in e)Pj.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&&$j.call(e,n)&&(r[n]=e[n]);return r};const lU={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},qy=f.forwardRef((e,t)=>{const r=q("Button",lU,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:w,loading:E,loaderPosition:_,loaderProps:v,gradient:x,classNames:b,styles:P,unstyled:O}=r,$=iU(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}=oU({radius:g,color:a,fullWidth:m,compact:w,gradient:x,withLeftIcon:!!u,withRightIcon:!!d},{name:"Button",unstyled:O,classNames:b,styles:P,variant:h,size:o}),k=j.fn.variant({color:a,variant:h}),T=s.createElement(qn,rb({color:k.color,size:`calc(${N({size:o,sizes:ev}).height} / 2)`},v));return s.createElement(Jo,rb({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&&_==="left")&&s.createElement("span",{className:R(C.icon,C.leftIcon)},E&&_==="left"?T:u),E&&_==="center"&&s.createElement("span",{className:C.centerLoader},T),s.createElement("span",{className:C.label,style:{textTransform:y?"uppercase":void 0}},c),(d||E&&_==="right")&&s.createElement("span",{className:R(C.icon,C.rightIcon)},E&&_==="right"?T:d)))});qy.displayName="@mantine/core/Button";qy.Group=Sj;const Z=qy;var sU=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 cU=sU;var uU=Object.defineProperty,sf=Object.getOwnPropertySymbols,Oj=Object.prototype.hasOwnProperty,Cj=Object.prototype.propertyIsEnumerable,nb=(e,t,r)=>t in e?uU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dU=(e,t)=>{for(var r in t||(t={}))Oj.call(t,r)&&nb(e,r,t[r]);if(sf)for(var r of sf(t))Cj.call(t,r)&&nb(e,r,t[r]);return e},fU=(e,t)=>{var r={};for(var n in e)Oj.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&&Cj.call(e,n)&&(r[n]=e[n]);return r};const pU={},kj=f.forwardRef((e,t)=>{const r=q("Paper",pU,e),{className:n,children:o,radius:a,withBorder:i,shadow:l,unstyled:c,variant:u}=r,d=fU(r,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:m,cx:h}=cU({radius:a,shadow:l},{name:"Paper",unstyled:c,variant:u});return s.createElement(ue,dU({className:h(m.root,n),"data-with-border":i||void 0,ref:t},d),o)});kj.displayName="@mantine/core/Paper";const wn=kj;var mU=W((e,{inline:t})=>({root:{display:t?"inline-flex":"flex",alignItems:"center",justifyContent:"center"}}));const hU=mU;var gU=Object.defineProperty,cf=Object.getOwnPropertySymbols,jj=Object.prototype.hasOwnProperty,Rj=Object.prototype.propertyIsEnumerable,ob=(e,t,r)=>t in e?gU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vU=(e,t)=>{for(var r in t||(t={}))jj.call(t,r)&&ob(e,r,t[r]);if(cf)for(var r of cf(t))Rj.call(t,r)&&ob(e,r,t[r]);return e},yU=(e,t)=>{var r={};for(var n in e)jj.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&&Rj.call(e,n)&&(r[n]=e[n]);return r};const Tj=f.forwardRef((e,t)=>{const r=q("Center",{},e),{inline:n,className:o,unstyled:a,variant:i}=r,l=yU(r,["inline","className","unstyled","variant"]),{classes:c,cx:u}=hU({inline:n},{name:"Center",unstyled:a,variant:i});return s.createElement(ue,vU({ref:t,className:u(c.root,o)},l))});Tj.displayName="@mantine/core/Center";const Xt=Tj,Ij=f.createContext(null),wU=Ij.Provider,_U=()=>f.useContext(Ij);var xU=Object.defineProperty,uf=Object.getOwnPropertySymbols,Dj=Object.prototype.hasOwnProperty,Nj=Object.prototype.propertyIsEnumerable,ab=(e,t,r)=>t in e?xU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ib=(e,t)=>{for(var r in t||(t={}))Dj.call(t,r)&&ab(e,r,t[r]);if(uf)for(var r of uf(t))Nj.call(t,r)&&ab(e,r,t[r]);return e},bU=(e,t)=>{var r={};for(var n in e)Dj.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&&Nj.call(e,n)&&(r[n]=e[n]);return r};const EU={size:"sm"},Aj=f.forwardRef((e,t)=>{const r=q("CheckboxGroup",EU,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]=vr({value:o,defaultValue:a,finalValue:[],onChange:i}),h=g=>{const y=g.currentTarget.value;m(d.includes(y)?d.filter(w=>w!==y):[...d,y])};return s.createElement(wU,{value:{value:d,onChange:h,size:l}},s.createElement(zt.Wrapper,ib(ib({labelElement:"div",size:l,__staticSelector:"CheckboxGroup",ref:t},c),u),n))});Aj.displayName="@mantine/core/CheckboxGroup";var SU=Object.defineProperty,df=Object.getOwnPropertySymbols,Mj=Object.prototype.hasOwnProperty,zj=Object.prototype.propertyIsEnumerable,lb=(e,t,r)=>t in e?SU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ff=(e,t)=>{for(var r in t||(t={}))Mj.call(t,r)&&lb(e,r,t[r]);if(df)for(var r of df(t))zj.call(t,r)&&lb(e,r,t[r]);return e},Lj=(e,t)=>{var r={};for(var n in e)Mj.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&&zj.call(e,n)&&(r[n]=e[n]);return r};function Fj(e){const t=e,{width:r,height:n,style:o}=t,a=Lj(t,["width","height","style"]);return s.createElement("svg",ff({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:ff({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 PU(e){var t=e,{indeterminate:r}=t,n=Lj(t,["indeterminate"]);return r?s.createElement("svg",ff({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(Fj,ff({},n))}var $U=Object.defineProperty,OU=Object.defineProperties,CU=Object.getOwnPropertyDescriptors,sb=Object.getOwnPropertySymbols,kU=Object.prototype.hasOwnProperty,jU=Object.prototype.propertyIsEnumerable,cb=(e,t,r)=>t in e?$U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ub=(e,t)=>{for(var r in t||(t={}))kU.call(t,r)&&cb(e,r,t[r]);if(sb)for(var r of sb(t))jU.call(t,r)&&cb(e,r,t[r]);return e},db=(e,t)=>OU(e,CU(t));const RU={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)};var TU=W((e,{radius:t,color:r,transitionDuration:n,labelPosition:o,error:a,indeterminate:i},{size:l})=>{const c=N({size:l,sizes:RU}),u=e.fn.variant({variant:"filled",color:r});return{icon:db(ub({},e.fn.cover()),{ref:Kt("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:db(ub({},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,[`& + .${Kt("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",[`& + .${Kt("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[5]}}})}});const IU=TU;var DU=Object.defineProperty,NU=Object.defineProperties,AU=Object.getOwnPropertyDescriptors,fb=Object.getOwnPropertySymbols,MU=Object.prototype.hasOwnProperty,zU=Object.prototype.propertyIsEnumerable,pb=(e,t,r)=>t in e?DU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,LU=(e,t)=>{for(var r in t||(t={}))MU.call(t,r)&&pb(e,r,t[r]);if(fb)for(var r of fb(t))zU.call(t,r)&&pb(e,r,t[r]);return e},FU=(e,t)=>NU(e,AU(t));const kh={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)};var VU=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:FU(LU({},e.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:r in kh?N({size:r,sizes:e.fontSizes}):void 0,lineHeight:r in kh?N({size:r,sizes:kh}):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 BU=VU;var UU=Object.defineProperty,pf=Object.getOwnPropertySymbols,Vj=Object.prototype.hasOwnProperty,Bj=Object.prototype.propertyIsEnumerable,mb=(e,t,r)=>t in e?UU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,WU=(e,t)=>{for(var r in t||(t={}))Vj.call(t,r)&&mb(e,r,t[r]);if(pf)for(var r of pf(t))Bj.call(t,r)&&mb(e,r,t[r]);return e},HU=(e,t)=>{var r={};for(var n in e)Vj.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&&Bj.call(e,n)&&(r[n]=e[n]);return r};const _m=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:w,variant:E}=r,_=HU(r,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:v,cx:x}=BU({labelPosition:w},{name:n,styles:i,classNames:a,unstyled:l,variant:E,size:y});return s.createElement(ue,WU({className:x(v.root,o),ref:t},_),s.createElement("div",{className:x(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(zt.Description,{className:v.description},d),g&&g!=="boolean"&&s.createElement(zt.Error,{className:v.error},g))))});_m.displayName="@mantine/core/InlineInput";var qU=Object.defineProperty,mf=Object.getOwnPropertySymbols,Uj=Object.prototype.hasOwnProperty,Wj=Object.prototype.propertyIsEnumerable,hb=(e,t,r)=>t in e?qU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,au=(e,t)=>{for(var r in t||(t={}))Uj.call(t,r)&&hb(e,r,t[r]);if(mf)for(var r of mf(t))Wj.call(t,r)&&hb(e,r,t[r]);return e},QU=(e,t)=>{var r={};for(var n in e)Uj.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&&Wj.call(e,n)&&(r[n]=e[n]);return r};const GU={size:"sm",transitionDuration:100,icon:PU,labelPosition:"right"},tn=f.forwardRef((e,t)=>{const r=q("Checkbox",GU,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:w,classNames:E,styles:_,transitionDuration:v,icon:x,unstyled:b,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=_U(),k=Mr(m),{systemStyles:T,rest:L}=Hn(R),{classes:B}=IU({radius:g,color:c,transitionDuration:v,labelPosition:P,error:!!$,indeterminate:d},{name:"Checkbox",classNames:E,styles:_,unstyled:b,variant:C,size:(j==null?void 0:j.size)||h}),V=j?{checked:j.value.includes(L.value),onChange:j.onChange}:{};return s.createElement(_m,au(au({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:_,unstyled:b,"data-checked":V.checked||void 0,variant:C},T),y),s.createElement("div",{className:B.inner},s.createElement("input",au(au({id:k,ref:t,type:"checkbox",className:B.input,checked:i,disabled:l},L),V)),s.createElement(x,{indeterminate:d,className:B.icon})))});tn.displayName="@mantine/core/Checkbox";tn.Group=Aj;const Hj=f.createContext(null),KU=Hj.Provider,YU=()=>f.useContext(Hj),XU={};function qj(e){const{value:t,defaultValue:r,onChange:n,multiple:o,children:a}=q("ChipGroup",XU,e),[i,l]=vr({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(KU,{value:{isChipSelected:c,onChange:u,multiple:o}},a)}qj.displayName="@mantine/core/ChipGroup";var JU=Object.defineProperty,ZU=Object.defineProperties,eW=Object.getOwnPropertyDescriptors,gb=Object.getOwnPropertySymbols,tW=Object.prototype.hasOwnProperty,rW=Object.prototype.propertyIsEnumerable,vb=(e,t,r)=>t in e?JU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mn=(e,t)=>{for(var r in t||(t={}))tW.call(t,r)&&vb(e,r,t[r]);if(gb)for(var r of gb(t))rW.call(t,r)&&vb(e,r,t[r]);return e},Jl=(e,t)=>ZU(e,eW(t));const yb={xs:S(24),sm:S(28),md:S(32),lg:S(36),xl:S(40)},Ml={xs:S(10),sm:S(12),md:S(14),lg:S(16),xl:S(18)},wb={xs:S(16),sm:S(20),md:S(24),lg:S(28),xl:S(32)},iu={xs:S(7.5),sm:S(10),md:S(11.5),lg:S(13),xl:S(15)};function nW(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:mn({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:Jl(mn({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:mn({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:mn({color:n.color,backgroundColor:n.background},e.fn.hover({backgroundColor:n.hover}))}:r==="outline"?{label:mn({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 oW=W((e,{radius:t,color:r},{size:n,variant:o})=>{const a=nW(e,{color:r},o);return{root:{},label:Jl(mn(Jl(mn({ref:Kt("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:yb}),fontSize:N({size:n,sizes:e.fontSizes}),lineHeight:`calc(${N({size:n,sizes:yb})} - ${S(2)})`,paddingLeft:N({size:n,sizes:wb}),paddingRight:N({size:n,sizes:wb}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),a.label),{"&[data-disabled]":Jl(mn({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]})),{[`& .${Kt("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]}}),"&[data-checked]":{paddingLeft:N({size:n,sizes:iu}),paddingRight:N({size:n,sizes:iu}),"&:not([data-disabled])":a.checked}}),iconWrapper:{ref:Kt("iconWrapper"),color:o==="filled"?e.white:e.fn.variant({variant:"filled",color:r}).background,width:`calc(${N({size:n,sizes:Ml})} + (${N({size:n,sizes:e.spacing})} / 1.5))`,maxWidth:`calc(${N({size:n,sizes:Ml})} + (${N({size:n,sizes:e.spacing})} / 1.5))`,height:N({size:n,sizes:Ml}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:N({size:n,sizes:Ml}),height:`calc(${N({size:n,sizes:Ml})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":Jl(mn({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]})),{[`& .${Kt("iconWrapper")}`]:{color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&[data-checked]":{paddingLeft:N({size:n,sizes:iu}),paddingRight:N({size:n,sizes:iu}),"&: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",[`& + .${Kt("label")}`]:mn({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),"&:focus:not(:focus-visible)":{[`& + .${Kt("label")}`]:mn({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)}}}}});const aW=oW;var iW=Object.defineProperty,hf=Object.getOwnPropertySymbols,Qj=Object.prototype.hasOwnProperty,Gj=Object.prototype.propertyIsEnumerable,_b=(e,t,r)=>t in e?iW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lu=(e,t)=>{for(var r in t||(t={}))Qj.call(t,r)&&_b(e,r,t[r]);if(hf)for(var r of hf(t))Gj.call(t,r)&&_b(e,r,t[r]);return e},lW=(e,t)=>{var r={};for(var n in e)Qj.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&&Gj.call(e,n)&&(r[n]=e[n]);return r};const sW={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},gf=f.forwardRef((e,t)=>{const r=q("Chip",sW,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:w,defaultChecked:E,onChange:_,sx:v,wrapperProps:x,value:b,unstyled:P}=r,O=lW(r,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),$=YU(),C=Mr(c),{systemStyles:R,rest:j}=Hn(O),{classes:k,cx:T}=aW({radius:n,color:u},{classNames:h,styles:y,unstyled:P,name:"Chip",variant:i,size:a}),[L,B]=vr({value:w,defaultValue:E,finalValue:!1,onChange:_}),V=$?{checked:$.isChipSelected(b),onChange:$.onChange,type:$.multiple?"checkbox":"radio"}:{},M=V.checked||L;return s.createElement(ue,lu(lu({className:T(k.root,m),style:g,sx:v},R),x),s.createElement("input",lu(lu({type:o,className:k.input,checked:M,onChange:Q=>B(Q.currentTarget.checked),id:C,disabled:l,ref:t,value:b},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(Fj,{className:k.checkIcon})),d))});gf.displayName="@mantine/core/Chip";gf.Group=qj;var cW=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 uW=cW;var dW=Object.defineProperty,vf=Object.getOwnPropertySymbols,Kj=Object.prototype.hasOwnProperty,Yj=Object.prototype.propertyIsEnumerable,xb=(e,t,r)=>t in e?dW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fW=(e,t)=>{for(var r in t||(t={}))Kj.call(t,r)&&xb(e,r,t[r]);if(vf)for(var r of vf(t))Yj.call(t,r)&&xb(e,r,t[r]);return e},pW=(e,t)=>{var r={};for(var n in e)Kj.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&&Yj.call(e,n)&&(r[n]=e[n]);return r};const mW={sizes:{xs:S(540),sm:S(720),md:S(960),lg:S(1140),xl:S(1320)}},Xj=f.forwardRef((e,t)=>{const r=q("Container",mW,e),{className:n,fluid:o,size:a,unstyled:i,sizes:l,variant:c}=r,u=pW(r,["className","fluid","size","unstyled","sizes","variant"]),{classes:d,cx:m}=uW({fluid:o,sizes:l},{unstyled:i,name:"Container",variant:c,size:a});return s.createElement(ue,fW({className:m(d.root,n),ref:t},u))});Xj.displayName="@mantine/core/Container";const[hW,vl]=vo("ModalBase component was not found in tree");var gW=W(()=>({close:{marginLeft:"auto",marginRight:0}}));const vW=gW;var yW=Object.defineProperty,yf=Object.getOwnPropertySymbols,Jj=Object.prototype.hasOwnProperty,Zj=Object.prototype.propertyIsEnumerable,bb=(e,t,r)=>t in e?yW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wW=(e,t)=>{for(var r in t||(t={}))Jj.call(t,r)&&bb(e,r,t[r]);if(yf)for(var r of yf(t))Zj.call(t,r)&&bb(e,r,t[r]);return e},_W=(e,t)=>{var r={};for(var n in e)Jj.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&&Zj.call(e,n)&&(r[n]=e[n]);return r};const xW={size:"sm"},bW=f.forwardRef((e,t)=>{const r=vl(),n=q(`${r.__staticSelector}CloseButton`,xW,e),{className:o}=n,a=_W(n,["className"]),{classes:i,cx:l}=vW(null,r.stylesApi);return s.createElement(Ks,wW({className:l(i.close,o),ref:t,onClick:r.onClose},a))});var EW=W(()=>({overlay:{}}));const SW=EW;var PW=Object.defineProperty,$W=Object.defineProperties,OW=Object.getOwnPropertyDescriptors,Eb=Object.getOwnPropertySymbols,CW=Object.prototype.hasOwnProperty,kW=Object.prototype.propertyIsEnumerable,Sb=(e,t,r)=>t in e?PW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jW=(e,t)=>{for(var r in t||(t={}))CW.call(t,r)&&Sb(e,r,t[r]);if(Eb)for(var r of Eb(t))kW.call(t,r)&&Sb(e,r,t[r]);return e},RW=(e,t)=>$W(e,OW(t)),TW=W((e,{color:t,opacity:r,blur:n,radius:o,gradient:a,fixed:i,zIndex:l})=>({root:RW(jW({},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 IW=TW;var DW=Object.defineProperty,wf=Object.getOwnPropertySymbols,eR=Object.prototype.hasOwnProperty,tR=Object.prototype.propertyIsEnumerable,Pb=(e,t,r)=>t in e?DW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NW=(e,t)=>{for(var r in t||(t={}))eR.call(t,r)&&Pb(e,r,t[r]);if(wf)for(var r of wf(t))tR.call(t,r)&&Pb(e,r,t[r]);return e},AW=(e,t)=>{var r={};for(var n in e)eR.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&&tR.call(e,n)&&(r[n]=e[n]);return r};const MW={opacity:.6,color:"#000",zIndex:yo("modal"),radius:0},rR=f.forwardRef((e,t)=>{const r=q("Overlay",MW,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:w,fixed:E}=r,_=AW(r,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:v,cx:x}=IW({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,NW({ref:t,className:x(v.root,m),"data-center":w||void 0},_),d)});rR.displayName="@mantine/core/Overlay";const nR=rR;var zW=Object.defineProperty,LW=Object.defineProperties,FW=Object.getOwnPropertyDescriptors,_f=Object.getOwnPropertySymbols,oR=Object.prototype.hasOwnProperty,aR=Object.prototype.propertyIsEnumerable,$b=(e,t,r)=>t in e?zW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zl=(e,t)=>{for(var r in t||(t={}))oR.call(t,r)&&$b(e,r,t[r]);if(_f)for(var r of _f(t))aR.call(t,r)&&$b(e,r,t[r]);return e},VW=(e,t)=>LW(e,FW(t)),BW=(e,t)=>{var r={};for(var n in e)oR.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&&aR.call(e,n)&&(r[n]=e[n]);return r};const UW={},WW=f.forwardRef((e,t)=>{const r=vl(),n=q(`${r.__staticSelector}Overlay`,UW,e),{onClick:o,transitionProps:a,style:i,className:l}=n,c=BW(n,["onClick","transitionProps","style","className"]),{classes:u,cx:d}=SW(null,r.stylesApi),m=h=>{o==null||o(h),r.closeOnClickOutside&&r.onClose()};return s.createElement(Zs,VW(zl(zl({mounted:r.opened},r.transitionProps),a),{transition:"fade"}),h=>s.createElement(nR,zl({ref:t,onClick:m,fixed:!0,style:zl(zl({},i),h),className:d(u.overlay,l),zIndex:r.zIndex},c)))});var HW=W((e,{zIndex:t})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:t,pointerEvents:"none"},content:{pointerEvents:"all"}}));const qW=HW;var QW=Object.defineProperty,xf=Object.getOwnPropertySymbols,iR=Object.prototype.hasOwnProperty,lR=Object.prototype.propertyIsEnumerable,Ob=(e,t,r)=>t in e?QW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ll=(e,t)=>{for(var r in t||(t={}))iR.call(t,r)&&Ob(e,r,t[r]);if(xf)for(var r of xf(t))lR.call(t,r)&&Ob(e,r,t[r]);return e},GW=(e,t)=>{var r={};for(var n in e)iR.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&&lR.call(e,n)&&(r[n]=e[n]);return r};const KW={},YW=f.forwardRef((e,t)=>{const r=vl(),n=q(`${r.__staticSelector}Content`,KW,e),{className:o,transitionProps:a,style:i,onKeyDown:l}=n,c=GW(n,["className","transitionProps","style","onKeyDown"]),{classes:u,cx:d}=qW({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(Zs,Ll(Ll({mounted:r.opened,transition:"pop"},r.transitionProps),a),h=>s.createElement("div",{className:d(u.inner)},s.createElement(Vy,{active:r.opened&&r.trapFocus},s.createElement(wn,Ll({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:Ll(Ll({},i),h),shadow:r.shadow},c),c.children))))});var XW=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 JW=XW;var ZW=Object.defineProperty,bf=Object.getOwnPropertySymbols,sR=Object.prototype.hasOwnProperty,cR=Object.prototype.propertyIsEnumerable,Cb=(e,t,r)=>t in e?ZW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,eH=(e,t)=>{for(var r in t||(t={}))sR.call(t,r)&&Cb(e,r,t[r]);if(bf)for(var r of bf(t))cR.call(t,r)&&Cb(e,r,t[r]);return e},tH=(e,t)=>{var r={};for(var n in e)sR.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&&cR.call(e,n)&&(r[n]=e[n]);return r};const rH={},nH=f.forwardRef((e,t)=>{const r=vl(),n=q(`${r.__staticSelector}Header`,rH,e),{className:o}=n,a=tH(n,["className"]),{classes:i,cx:l}=JW({padding:r.padding},r.stylesApi);return s.createElement(ue,eH({ref:t,className:l(i.header,o)},a))});var oH=W(e=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:e.fontSizes.md}}));const aH=oH;var iH=Object.defineProperty,Ef=Object.getOwnPropertySymbols,uR=Object.prototype.hasOwnProperty,dR=Object.prototype.propertyIsEnumerable,kb=(e,t,r)=>t in e?iH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lH=(e,t)=>{for(var r in t||(t={}))uR.call(t,r)&&kb(e,r,t[r]);if(Ef)for(var r of Ef(t))dR.call(t,r)&&kb(e,r,t[r]);return e},sH=(e,t)=>{var r={};for(var n in e)uR.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&&dR.call(e,n)&&(r[n]=e[n]);return r};const cH={},uH=f.forwardRef((e,t)=>{const r=vl(),n=q(`${r.__staticSelector}Title`,cH,e),{className:o}=n,a=sH(n,["className"]),{classes:i,cx:l}=aH(null,r.stylesApi);return f.useEffect(()=>(r.setTitleMounted(!0),()=>r.setTitleMounted(!1)),[]),s.createElement(ue,lH({component:"h2",id:r.getTitleId(),className:l(i.title,o),ref:t},a))});var dH=W((e,{padding:t})=>({body:{padding:N({size:t,sizes:e.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const fH=dH;var pH=Object.defineProperty,Sf=Object.getOwnPropertySymbols,fR=Object.prototype.hasOwnProperty,pR=Object.prototype.propertyIsEnumerable,jb=(e,t,r)=>t in e?pH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mH=(e,t)=>{for(var r in t||(t={}))fR.call(t,r)&&jb(e,r,t[r]);if(Sf)for(var r of Sf(t))pR.call(t,r)&&jb(e,r,t[r]);return e},hH=(e,t)=>{var r={};for(var n in e)fR.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 gH={},vH=f.forwardRef((e,t)=>{const r=vl(),n=q(`${r.__staticSelector}Body`,gH,e),{className:o}=n,a=hH(n,["className"]),{classes:i,cx:l}=fH({padding:r.padding},r.stylesApi);return f.useEffect(()=>(r.setBodyMounted(!0),()=>r.setBodyMounted(!1)),[]),s.createElement(ue,mH({id:r.getBodyId(),className:l(i.body,o),ref:t},a))});function yH({children:e}){return s.createElement(s.Fragment,null,e)}function wH({opened:e,transitionDuration:t}){const[r,n]=f.useState(e),o=f.useRef(),i=Xp()?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 _H=W(()=>({root:{}}));const xH=_H;var bH=Object.defineProperty,EH=Object.defineProperties,SH=Object.getOwnPropertyDescriptors,Pf=Object.getOwnPropertySymbols,mR=Object.prototype.hasOwnProperty,hR=Object.prototype.propertyIsEnumerable,Rb=(e,t,r)=>t in e?bH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,jh=(e,t)=>{for(var r in t||(t={}))mR.call(t,r)&&Rb(e,r,t[r]);if(Pf)for(var r of Pf(t))hR.call(t,r)&&Rb(e,r,t[r]);return e},Tb=(e,t)=>EH(e,SH(t)),PH=(e,t)=>{var r={};for(var n in e)mR.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&&hR.call(e,n)&&(r[n]=e[n]);return r};const Qy={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:yo("modal"),padding:"md",size:"md",shadow:"xl"};function Et(e){const t=q("ModalBase",Qy,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:w,returnFocus:E,padding:_,shadow:v,id:x,size:b,variant:P,classNames:O,unstyled:$,styles:C,className:R}=t,j=PH(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}=xH(null,{name:i,classNames:O,styles:C,unstyled:$,variant:P,size:b}),L=Mr(x),[B,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=wH({opened:r,transitionDuration:A});return Zh("keydown",H=>{!y&&H.key==="Escape"&&w&&n()}),q$({opened:r,shouldReturnFocus:y&&E}),s.createElement(pm,Tb(jh({},u),{withinPortal:c,target:m}),s.createElement(hW,{value:{__staticSelector:i,opened:r,onClose:n,closeOnClickOutside:a,transitionProps:Tb(jh({},l),{duration:A,keepMounted:d}),zIndex:h,padding:_,id:L,getTitleId:()=>`${L}-title`,getBodyId:()=>`${L}-body`,titleMounted:B,bodyMounted:M,setTitleMounted:V,setBodyMounted:Q,trapFocus:y,closeOnEscape:w,shadow:v,stylesApi:{name:i,size:b,variant:P,classNames:O,styles:C,unstyled:$}}},s.createElement(rN,{enabled:z&&g},s.createElement(ue,jh({className:T(k.root,R)},j),o))))}Et.CloseButton=bW;Et.Overlay=WW;Et.Content=YW;Et.Header=nH;Et.Title=uH;Et.Body=vH;Et.NativeScrollArea=yH;const[$H,OH]=vo("Grid component was not found in tree");var CH=Object.defineProperty,Ib=Object.getOwnPropertySymbols,kH=Object.prototype.hasOwnProperty,jH=Object.prototype.propertyIsEnumerable,Db=(e,t,r)=>t in e?CH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RH=(e,t)=>{for(var r in t||(t={}))kH.call(t,r)&&Db(e,r,t[r]);if(Ib)for(var r of Ib(t))jH.call(t,r)&&Db(e,r,t[r]);return e};const Gy=(e,t)=>e==="content"?"auto":e==="auto"?"0rem":e?`${100/(t/e)}%`:void 0,gR=(e,t,r)=>r||e==="auto"||e==="content"?"unset":Gy(e,t),vR=(e,t)=>{if(e)return e==="auto"||t?1:0},yR=(e,t)=>e===0?0:e?`${100/(t/e)}%`:void 0,wR=(e,t)=>typeof e<"u"?`calc(${N({size:e,sizes:t.spacing})} / 2)`:void 0;function TH({sizes:e,offsets:t,orders:r,theme:n,columns:o,gutters:a,grow:i}){return S$.reduce((l,c)=>(l[`@media (min-width: ${Rr(n.breakpoints[c])})`]={order:r[c],flexBasis:Gy(e[c],o),padding:wR(a[c],n),flexShrink:0,width:e[c]==="content"?"auto":void 0,maxWidth:gR(e[c],o,i),marginLeft:yR(t[c],o),flexGrow:vR(e[c],i)},l),{})}var IH=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:w,xs:E,sm:_,md:v,lg:x,xl:b,order:P,orderXs:O,orderSm:$,orderMd:C,orderLg:R,orderXl:j})=>({col:RH({boxSizing:"border-box",flexGrow:vR(w,l),order:P,padding:wR(t,e),marginLeft:yR(c,y),flexBasis:Gy(w,y),flexShrink:0,width:w==="content"?"auto":void 0,maxWidth:gR(w,y,l)},TH({sizes:{xs:E,sm:_,md:v,lg:x,xl:b},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 DH=IH;var NH=Object.defineProperty,$f=Object.getOwnPropertySymbols,_R=Object.prototype.hasOwnProperty,xR=Object.prototype.propertyIsEnumerable,Nb=(e,t,r)=>t in e?NH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AH=(e,t)=>{for(var r in t||(t={}))_R.call(t,r)&&Nb(e,r,t[r]);if($f)for(var r of $f(t))xR.call(t,r)&&Nb(e,r,t[r]);return e},MH=(e,t)=>{var r={};for(var n in e)_R.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&&xR.call(e,n)&&(r[n]=e[n]);return r};const zH={};function LH(e){return e==="auto"||e==="content"?!0:typeof e=="number"&&e>0&&e%1===0}const bR=f.forwardRef((e,t)=>{const r=q("GridCol",zH,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:w,order:E,orderXs:_,orderSm:v,orderMd:x,orderLg:b,orderXl:P,className:O,id:$,unstyled:C,variant:R}=r,j=MH(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=OH(),T=o||k.columns,{classes:L,cx:B}=DH({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:w,order:E,orderXs:_,orderSm:v,orderMd:x,orderLg:b,orderXl:P,grow:k.grow,columns:k.columns,span:T},{unstyled:C,name:"Grid",variant:R});return!LH(T)||T>k.columns?null:s.createElement(ue,AH({className:B(L.col,O),ref:t},j),n)});bR.displayName="@mantine/core/Col";var FH=Object.defineProperty,Ab=Object.getOwnPropertySymbols,VH=Object.prototype.hasOwnProperty,BH=Object.prototype.propertyIsEnumerable,Mb=(e,t,r)=>t in e?FH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UH=(e,t)=>{for(var r in t||(t={}))VH.call(t,r)&&Mb(e,r,t[r]);if(Ab)for(var r of Ab(t))BH.call(t,r)&&Mb(e,r,t[r]);return e};function WH(e,t){return S$.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 HH=W((e,{justify:t,align:r,gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c})=>({root:UH({margin:`calc(-${N({size:n,sizes:e.spacing})} / 2)`,display:"flex",flexWrap:"wrap",justifyContent:t,alignItems:r},WH({xs:o,sm:a,md:i,lg:l,xl:c},e))}));const qH=HH;var QH=Object.defineProperty,Of=Object.getOwnPropertySymbols,ER=Object.prototype.hasOwnProperty,SR=Object.prototype.propertyIsEnumerable,zb=(e,t,r)=>t in e?QH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,GH=(e,t)=>{for(var r in t||(t={}))ER.call(t,r)&&zb(e,r,t[r]);if(Of)for(var r of Of(t))SR.call(t,r)&&zb(e,r,t[r]);return e},KH=(e,t)=>{var r={};for(var n in e)ER.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&&SR.call(e,n)&&(r[n]=e[n]);return r};const YH={gutter:"md",justify:"flex-start",align:"stretch",columns:12},Yr=f.forwardRef((e,t)=>{const r=q("Grid",YH,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:w,unstyled:E,variant:_}=r,v=KH(r,["gutter","gutterXs","gutterSm","gutterMd","gutterLg","gutterXl","children","grow","justify","align","columns","className","id","unstyled","variant"]),{classes:x,cx:b}=qH({gutter:n,justify:m,align:h,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c},{unstyled:E,name:"Grid",variant:_});return s.createElement($H,{value:{gutter:n,gutterXs:o,gutterSm:a,gutterMd:i,gutterLg:l,gutterXl:c,grow:d,columns:g}},s.createElement(ue,GH({className:b(x.root,y),ref:t},v),u))});Yr.Col=bR;Yr.displayName="@mantine/core/Grid";function XH(e){return f.Children.toArray(e).filter(Boolean)}const PR={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var JH=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:PR[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 ZH=JH;var eq=Object.defineProperty,Cf=Object.getOwnPropertySymbols,$R=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,Lb=(e,t,r)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tq=(e,t)=>{for(var r in t||(t={}))$R.call(t,r)&&Lb(e,r,t[r]);if(Cf)for(var r of Cf(t))OR.call(t,r)&&Lb(e,r,t[r]);return e},rq=(e,t)=>{var r={};for(var n in e)$R.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&&OR.call(e,n)&&(r[n]=e[n]);return r};const nq={position:"left",spacing:"md"},J=f.forwardRef((e,t)=>{const r=q("Group",nq,e),{className:n,position:o,align:a,children:i,noWrap:l,grow:c,spacing:u,unstyled:d,variant:m}=r,h=rq(r,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),g=XH(i),{classes:y,cx:w}=ZH({align:a,grow:c,noWrap:l,spacing:u,position:o,count:g.length},{unstyled:d,name:"Group",variant:m});return s.createElement(ue,tq({className:w(y.root,n),ref:t},h),g)});J.displayName="@mantine/core/Group";function oq({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 Fb(e,t){if(typeof e=="string"&&e.trim().length===0)return!0;try{return t(e),!0}catch{return!1}}var aq=W((e,t,{size:r})=>({input:{fontFamily:e.fontFamilyMonospace,fontSize:`calc(${N({size:r,sizes:e.fontSizes})} - ${S(2)})`}}));const iq=aq;function Ky(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 lq=f.useLayoutEffect,sq=function(t){var r=f.useRef(t);return lq(function(){r.current=t}),r},Vb=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},cq=function(t,r){var n=f.useRef();return f.useCallback(function(o){t.current=o,n.current&&Vb(n.current,null),n.current=r,r&&Vb(r,o)},[r])},Bb={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ub=function(t){Object.keys(Bb).forEach(function(r){t.style.setProperty(r,Bb[r],"important")})},$r=null,uq=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function dq(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),$r||($r=document.createElement("textarea"),$r.setAttribute("tabindex","-1"),$r.setAttribute("aria-hidden","true"),Ub($r)),$r.parentNode===null&&document.body.appendChild($r);var o=e.paddingSize,a=e.borderSize,i=e.sizingStyle,l=i.boxSizing;Object.keys(i).forEach(function(h){var g=h;$r.style[g]=i[g]}),Ub($r),$r.value=t;var c=uq($r,e);$r.value="x";var u=$r.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 Wb=function(){},fq=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},pq=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],mq=!!document.documentElement.currentStyle,hq=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=fq(pq,r),o=n.boxSizing;if(o==="")return null;mq&&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}},gq=function(t){var r=sq(t);f.useLayoutEffect(function(){var n=function(a){r.current(a)};return window.addEventListener("resize",n),function(){window.removeEventListener("resize",n)}},[])},vq=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,a=t.minRows,i=t.onChange,l=i===void 0?Wb:i,c=t.onHeightChange,u=c===void 0?Wb:c,d=Ky(t,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]),m=d.value!==void 0,h=f.useRef(null),g=cq(h,r),y=f.useRef(0),w=f.useRef(),E=function(){var x=h.current,b=n&&w.current?w.current:hq(x);if(b){w.current=b;var P=dq(b,x.value||x.placeholder||"x",a,o),O=P[0],$=P[1];y.current!==O&&(y.current=O,x.style.setProperty("height",O+"px","important"),u(O,{rowHeight:$}))}},_=function(x){m||E(),l(x)};return f.useLayoutEffect(E),gq(E),f.createElement("textarea",Ke({},d,{onChange:_,ref:g}))},yq=f.forwardRef(vq);const wq=yq;var _q=W(e=>({input:{paddingTop:e.spacing.xs,paddingBottom:e.spacing.xs}}));const xq=_q;var bq=Object.defineProperty,Eq=Object.defineProperties,Sq=Object.getOwnPropertyDescriptors,kf=Object.getOwnPropertySymbols,CR=Object.prototype.hasOwnProperty,kR=Object.prototype.propertyIsEnumerable,Hb=(e,t,r)=>t in e?bq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pi=(e,t)=>{for(var r in t||(t={}))CR.call(t,r)&&Hb(e,r,t[r]);if(kf)for(var r of kf(t))kR.call(t,r)&&Hb(e,r,t[r]);return e},Rh=(e,t)=>Eq(e,Sq(t)),Pq=(e,t)=>{var r={};for(var n in e)CR.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&&kR.call(e,n)&&(r[n]=e[n]);return r};const $q={autosize:!1,size:"sm",__staticSelector:"Textarea"},ec=f.forwardRef((e,t)=>{const r=q("Textarea",$q,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:w,size:E,__staticSelector:_,sx:v,errorProps:x,descriptionProps:b,labelProps:P,inputWrapperOrder:O,inputContainer:$,unstyled:C,withAsterisk:R,variant:j}=r,k=Pq(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=Mr(u),{classes:L,cx:B}=xq(),{systemStyles:V,rest:M}=Hn(k),Q=pi({required:m,ref:t,error:l,id:T,classNames:Rh(pi({},y),{input:B(L.input,y==null?void 0:y.input)}),styles:w,__staticSelector:_,size:E,multiline:!0,unstyled:C,variant:j},M);return s.createElement(zt.Wrapper,pi(pi({label:i,error:l,id:T,description:c,required:m,style:h,className:d,classNames:y,styles:w,size:E,__staticSelector:_,sx:v,errorProps:x,labelProps:P,descriptionProps:b,inputContainer:$,inputWrapperOrder:O,unstyled:C,withAsterisk:R,variant:j},V),g),n?s.createElement(zt,Rh(pi({},Q),{component:wq,maxRows:o,minRows:a})):s.createElement(zt,Rh(pi({},Q),{component:"textarea",rows:a})))});ec.displayName="@mantine/core/Textarea";var Oq=Object.defineProperty,Cq=Object.defineProperties,kq=Object.getOwnPropertyDescriptors,jf=Object.getOwnPropertySymbols,jR=Object.prototype.hasOwnProperty,RR=Object.prototype.propertyIsEnumerable,qb=(e,t,r)=>t in e?Oq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Qb=(e,t)=>{for(var r in t||(t={}))jR.call(t,r)&&qb(e,r,t[r]);if(jf)for(var r of jf(t))RR.call(t,r)&&qb(e,r,t[r]);return e},jq=(e,t)=>Cq(e,kq(t)),Rq=(e,t)=>{var r={};for(var n in e)jR.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&&RR.call(e,n)&&(r[n]=e[n]);return r};const Tq={formatOnBlur:!1,size:"sm",serialize:JSON.stringify,deserialize:JSON.parse},tc=f.forwardRef((e,t)=>{const r=q("JsonInput",Tq,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:w,serialize:E,deserialize:_}=r,v=Rq(r,["value","defaultValue","onChange","onFocus","onBlur","error","formatOnBlur","size","validationError","classNames","unstyled","readOnly","variant","serialize","deserialize"]),{classes:x,cx:b}=iq(null,{name:"JsonInput",unstyled:g,size:d,variant:w}),[P,O]=vr({value:n,defaultValue:o,finalValue:"",onChange:a}),[$,C]=f.useState(Fb(P,_)),R=k=>{typeof i=="function"&&i(k),C(!0)},j=k=>{typeof l=="function"&&l(k);const T=Fb(k.currentTarget.value,_);u&&!y&&T&&k.currentTarget.value.trim()!==""&&O(E(_(k.currentTarget.value),null,2)),C(T)};return s.createElement(ec,Qb({value:P,onChange:k=>O(k.currentTarget.value),onFocus:R,onBlur:j,error:$?c:m||!0,__staticSelector:"JsonInput",classNames:jq(Qb({},h),{input:b(x.input,h==null?void 0:h.input)}),autoComplete:"off",ref:t,unstyled:g,readOnly:y,size:d,variant:w},v))});tc.displayName="@mantine/core/JsonInput";const[Iq,Dq]=vo("List component was not found in tree");var Nq=W((e,{spacing:t,center:r})=>({itemWrapper:{ref:Kt("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",[`& .${Kt("itemWrapper")}`]:{display:"inline-flex",alignItems:r?"center":"flex-start",flexDirection:"row"}}},itemIcon:{display:"inline-block",verticalAlign:"middle",marginRight:e.spacing.sm}}));const Aq=Nq;var Mq=Object.defineProperty,Rf=Object.getOwnPropertySymbols,TR=Object.prototype.hasOwnProperty,IR=Object.prototype.propertyIsEnumerable,Gb=(e,t,r)=>t in e?Mq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zq=(e,t)=>{for(var r in t||(t={}))TR.call(t,r)&&Gb(e,r,t[r]);if(Rf)for(var r of Rf(t))IR.call(t,r)&&Gb(e,r,t[r]);return e},Lq=(e,t)=>{var r={};for(var n in e)TR.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&&IR.call(e,n)&&(r[n]=e[n]);return r};const Fq={},DR=f.forwardRef((e,t)=>{const r=q("ListItem",Fq,e),{className:n,children:o,icon:a}=r,i=Lq(r,["className","children","icon"]),{icon:l,spacing:c,center:u,listStyleType:d,size:m,withPadding:h,classNames:g,styles:y,unstyled:w,variant:E}=Dq(),_=a||l,{classes:v,cx:x}=Aq({withPadding:h,listStyleType:d,center:u,spacing:c},{classNames:g,styles:y,unstyled:w,name:"List",variant:E,size:m});return s.createElement(ue,zq({component:"li",className:x(v.item,n),"data-with-icon":!!_||void 0,ref:t},i),s.createElement("div",{className:v.itemWrapper},_&&s.createElement("span",{className:v.itemIcon},_),s.createElement("span",null,o)))});DR.displayName="@mantine/core/ListItem";var Vq=Object.defineProperty,Bq=Object.defineProperties,Uq=Object.getOwnPropertyDescriptors,Kb=Object.getOwnPropertySymbols,Wq=Object.prototype.hasOwnProperty,Hq=Object.prototype.propertyIsEnumerable,Yb=(e,t,r)=>t in e?Vq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qq=(e,t)=>{for(var r in t||(t={}))Wq.call(t,r)&&Yb(e,r,t[r]);if(Kb)for(var r of Kb(t))Hq.call(t,r)&&Yb(e,r,t[r]);return e},Qq=(e,t)=>Bq(e,Uq(t)),Gq=W((e,{withPadding:t,listStyleType:r},{size:n})=>({root:Qq(qq({},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 Kq=Gq;var Yq=Object.defineProperty,Tf=Object.getOwnPropertySymbols,NR=Object.prototype.hasOwnProperty,AR=Object.prototype.propertyIsEnumerable,Xb=(e,t,r)=>t in e?Yq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xq=(e,t)=>{for(var r in t||(t={}))NR.call(t,r)&&Xb(e,r,t[r]);if(Tf)for(var r of Tf(t))AR.call(t,r)&&Xb(e,r,t[r]);return e},Jq=(e,t)=>{var r={};for(var n in e)NR.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&&AR.call(e,n)&&(r[n]=e[n]);return r};const Zq={type:"unordered",size:"md",spacing:0},fr=f.forwardRef((e,t)=>{const r=q("List",Zq,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:w}=r,E=Jq(r,["children","type","size","listStyleType","withPadding","center","spacing","icon","className","styles","classNames","unstyled","variant"]),{classes:_,cx:v}=Kq({withPadding:l,listStyleType:i,center:c,spacing:u},{classNames:g,styles:h,name:"List",unstyled:y,size:a,variant:w});return s.createElement(Iq,{value:{spacing:u,center:c,icon:d,listStyleType:i,size:a,withPadding:l,classNames:g,styles:h,unstyled:y,variant:w}},s.createElement(ue,Xq({component:o==="unordered"?"ul":"ol",className:v(_.root,m),ref:t},E),n))});fr.Item=DR;fr.displayName="@mantine/core/List";var eQ=Object.defineProperty,tQ=Object.defineProperties,rQ=Object.getOwnPropertyDescriptors,Jb=Object.getOwnPropertySymbols,nQ=Object.prototype.hasOwnProperty,oQ=Object.prototype.propertyIsEnumerable,Zb=(e,t,r)=>t in e?eQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,aQ=(e,t)=>{for(var r in t||(t={}))nQ.call(t,r)&&Zb(e,r,t[r]);if(Jb)for(var r of Jb(t))oQ.call(t,r)&&Zb(e,r,t[r]);return e},iQ=(e,t)=>tQ(e,rQ(t)),lQ=W(e=>({root:iQ(aQ({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"})}));const sQ=lQ;var cQ=Object.defineProperty,uQ=Object.defineProperties,dQ=Object.getOwnPropertyDescriptors,If=Object.getOwnPropertySymbols,MR=Object.prototype.hasOwnProperty,zR=Object.prototype.propertyIsEnumerable,eE=(e,t,r)=>t in e?cQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,su=(e,t)=>{for(var r in t||(t={}))MR.call(t,r)&&eE(e,r,t[r]);if(If)for(var r of If(t))zR.call(t,r)&&eE(e,r,t[r]);return e},fQ=(e,t)=>uQ(e,dQ(t)),pQ=(e,t)=>{var r={};for(var n in e)MR.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&&zR.call(e,n)&&(r[n]=e[n]);return r};const mQ={overlayOpacity:.75,transitionDuration:0,radius:0,zIndex:yo("overlay")},LR=f.forwardRef((e,t)=>{const r=q("LoadingOverlay",mQ,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:w,variant:E,keepMounted:_}=r,v=pQ(r,["className","visible","loaderProps","overlayOpacity","overlayColor","transitionDuration","exitTransitionDuration","zIndex","style","loader","radius","overlayBlur","unstyled","variant","keepMounted"]),{classes:x,cx:b,theme:P}=sQ(null,{name:"LoadingOverlay",unstyled:w,variant:E}),O=`calc(${d} + 1)`;return s.createElement(Zs,{keepMounted:_,duration:c,exitDuration:u,mounted:o,transition:"fade"},$=>s.createElement(ue,su({className:b(x.root,n),style:fQ(su(su({},$),m),{zIndex:d}),ref:t},v),h?s.createElement("div",{style:{zIndex:O}},h):s.createElement(qn,su({style:{zIndex:O}},a)),s.createElement(nR,{opacity:i,zIndex:d,radius:g,blur:y,unstyled:w,color:l||(P.colorScheme==="dark"?P.colors.dark[5]:P.white)})))});LR.displayName="@mantine/core/LoadingOverlay";const FR={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"},[hQ,rc]=vo(FR.context);var gQ=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 vQ=gQ;var yQ=Object.defineProperty,Df=Object.getOwnPropertySymbols,VR=Object.prototype.hasOwnProperty,BR=Object.prototype.propertyIsEnumerable,tE=(e,t,r)=>t in e?yQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wQ=(e,t)=>{for(var r in t||(t={}))VR.call(t,r)&&tE(e,r,t[r]);if(Df)for(var r of Df(t))BR.call(t,r)&&tE(e,r,t[r]);return e},_Q=(e,t)=>{var r={};for(var n in e)VR.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&&BR.call(e,n)&&(r[n]=e[n]);return r};const xQ={},UR=f.forwardRef((e,t)=>{const r=q("MenuDivider",xQ,e),{children:n,className:o}=r,a=_Q(r,["children","className"]),{classNames:i,styles:l,unstyled:c,variant:u}=rc(),{classes:d,cx:m}=vQ(null,{name:"Menu",classNames:i,styles:l,unstyled:c,variant:u});return s.createElement(ue,wQ({className:m(d.divider,o),ref:t},a))});UR.displayName="@mantine/core/MenuDivider";var bQ=Object.defineProperty,Nf=Object.getOwnPropertySymbols,WR=Object.prototype.hasOwnProperty,HR=Object.prototype.propertyIsEnumerable,rE=(e,t,r)=>t in e?bQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,EQ=(e,t)=>{for(var r in t||(t={}))WR.call(t,r)&&rE(e,r,t[r]);if(Nf)for(var r of Nf(t))HR.call(t,r)&&rE(e,r,t[r]);return e},SQ=(e,t)=>{var r={};for(var n in e)WR.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&&HR.call(e,n)&&(r[n]=e[n]);return r};const PQ={};function qR(e){const t=q("MenuDropdown",PQ,e),{children:r,onMouseEnter:n,onMouseLeave:o}=t,a=SQ(t,["children","onMouseEnter","onMouseLeave"]),i=f.useRef(),l=rc(),c=m=>{var h;(m.key==="ArrowUp"||m.key==="ArrowDown")&&(m.preventDefault(),(h=i.current.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||h.focus())},u=Cr(n,()=>l.trigger==="hover"&&l.openDropdown()),d=Cr(o,()=>l.trigger==="hover"&&l.closeDropdown());return s.createElement(xo.Dropdown,EQ({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 $Q=Object.defineProperty,OQ=Object.defineProperties,CQ=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertySymbols,kQ=Object.prototype.hasOwnProperty,jQ=Object.prototype.propertyIsEnumerable,oE=(e,t,r)=>t in e?$Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RQ=(e,t)=>{for(var r in t||(t={}))kQ.call(t,r)&&oE(e,r,t[r]);if(nE)for(var r of nE(t))jQ.call(t,r)&&oE(e,r,t[r]);return e},TQ=(e,t)=>OQ(e,CQ(t)),IQ=W((e,{color:t,radius:r})=>({item:TQ(RQ({},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 DQ=IQ;var NQ=Object.defineProperty,AQ=Object.defineProperties,MQ=Object.getOwnPropertyDescriptors,Af=Object.getOwnPropertySymbols,QR=Object.prototype.hasOwnProperty,GR=Object.prototype.propertyIsEnumerable,aE=(e,t,r)=>t in e?NQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zQ=(e,t)=>{for(var r in t||(t={}))QR.call(t,r)&&aE(e,r,t[r]);if(Af)for(var r of Af(t))GR.call(t,r)&&aE(e,r,t[r]);return e},LQ=(e,t)=>AQ(e,MQ(t)),FQ=(e,t)=>{var r={};for(var n in e)QR.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&&GR.call(e,n)&&(r[n]=e[n]);return r};const VQ={},KR=f.forwardRef((e,t)=>{const r=q("MenuItem",VQ,e),{children:n,className:o,color:a,closeMenuOnClick:i,icon:l,rightSection:c}=r,u=FQ(r,["children","className","color","closeMenuOnClick","icon","rightSection"]),d=rc(),{classes:m,cx:h,theme:g}=DQ({radius:d.radius,color:a},{name:"Menu",classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),y=f.useRef(),w=d.getItemIndex(y.current),E=u,_=Cr(E.onMouseLeave,()=>d.setHovered(-1)),v=Cr(E.onMouseEnter,()=>d.setHovered(d.getItemIndex(y.current))),x=Cr(E.onClick,()=>{typeof i=="boolean"?i&&d.closeDropdownImmediately():d.closeOnItemClick&&d.closeDropdownImmediately()}),b=Cr(E.onFocus,()=>d.setHovered(d.getItemIndex(y.current)));return s.createElement(ue,LQ(zQ({component:"button",type:"button"},u),{tabIndex:-1,onFocus:b,className:h(m.item,o),ref:Yp(y,t),role:"menuitem","data-menu-item":!0,"data-hovered":d.hovered===w?!0:void 0,onMouseEnter:v,onMouseLeave:_,onClick:x,onKeyDown:v$({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))});KR.displayName="@mantine/core/MenuItem";const BQ=KR;var UQ=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 WQ=UQ;var HQ=Object.defineProperty,Mf=Object.getOwnPropertySymbols,YR=Object.prototype.hasOwnProperty,XR=Object.prototype.propertyIsEnumerable,iE=(e,t,r)=>t in e?HQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qQ=(e,t)=>{for(var r in t||(t={}))YR.call(t,r)&&iE(e,r,t[r]);if(Mf)for(var r of Mf(t))XR.call(t,r)&&iE(e,r,t[r]);return e},QQ=(e,t)=>{var r={};for(var n in e)YR.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&&XR.call(e,n)&&(r[n]=e[n]);return r};const GQ={},JR=f.forwardRef((e,t)=>{const r=q("MenuLabel",GQ,e),{children:n,className:o}=r,a=QQ(r,["children","className"]),{classNames:i,styles:l,unstyled:c,variant:u}=rc(),{classes:d,cx:m}=WQ(null,{name:"Menu",classNames:i,styles:l,unstyled:c,variant:u});return s.createElement(ae,qQ({className:m(d.label,o),ref:t},a),n)});JR.displayName="@mantine/core/MenuLabel";var KQ=Object.defineProperty,zf=Object.getOwnPropertySymbols,ZR=Object.prototype.hasOwnProperty,eT=Object.prototype.propertyIsEnumerable,lE=(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={}))ZR.call(t,r)&&lE(e,r,t[r]);if(zf)for(var r of zf(t))eT.call(t,r)&&lE(e,r,t[r]);return e},XQ=(e,t)=>{var r={};for(var n in e)ZR.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&&eT.call(e,n)&&(r[n]=e[n]);return r};const JQ={refProp:"ref"},tT=f.forwardRef((e,t)=>{const r=q("MenuTarget",JQ,e),{children:n,refProp:o}=r,a=XQ(r,["children","refProp"]);if(!Np(n))throw new Error(FR.children);const i=rc(),l=Cr(n.props.onClick,()=>i.trigger==="click"&&i.toggleDropdown()),c=Cr(n.props.onMouseEnter,()=>i.trigger==="hover"&&i.openDropdown()),u=Cr(n.props.onMouseLeave,()=>i.trigger==="hover"&&i.closeDropdown());return s.createElement(xo.Target,YQ({refProp:o,popupType:"menu",ref:t},a),f.cloneElement(n,{onClick:l,onMouseEnter:c,onMouseLeave:u,"data-expanded":i.opened?!0:void 0}))});tT.displayName="@mantine/core/MenuTarget";var ZQ=W({dropdown:{padding:S(4)}});const eG=ZQ;var tG=Object.defineProperty,rG=Object.defineProperties,nG=Object.getOwnPropertyDescriptors,Lf=Object.getOwnPropertySymbols,rT=Object.prototype.hasOwnProperty,nT=Object.prototype.propertyIsEnumerable,sE=(e,t,r)=>t in e?tG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cE=(e,t)=>{for(var r in t||(t={}))rT.call(t,r)&&sE(e,r,t[r]);if(Lf)for(var r of Lf(t))nT.call(t,r)&&sE(e,r,t[r]);return e},uE=(e,t)=>rG(e,nG(t)),oG=(e,t)=>{var r={};for(var n in e)rT.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&&nT.call(e,n)&&(r[n]=e[n]);return r};const aG={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function G(e){const t=q("Menu",aG,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:w,unstyled:E,radius:_,variant:v}=t,x=oG(t,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:b,cx:P}=eG(),[O,{setHovered:$,resetHovered:C}]=cN(),[R,j]=vr({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:B,closeDropdown:V}=oq({open:T,close:k,closeDelay:g,openDelay:h}),M=Q=>iN("[data-menu-item]","[data-menu-dropdown]",Q);return hn(()=>{C()},[R]),s.createElement(hQ,{value:{opened:R,toggleDropdown:L,getItemIndex:M,hovered:O,setHovered:$,closeOnItemClick:c,closeDropdown:m==="click"?k:V,openDropdown:m==="click"?T:B,closeDropdownImmediately:k,loop:u,trigger:m,radius:_,classNames:y,styles:w,unstyled:E,variant:v}},s.createElement(xo,uE(cE({},x),{radius:_,opened:R,onChange:L,defaultOpened:i,trapFocus:m==="click",closeOnEscape:d&&m==="click",__staticSelector:"Menu",classNames:uE(cE({},y),{dropdown:P(b.dropdown,y==null?void 0:y.dropdown)}),styles:w,unstyled:E,variant:v}),r))}G.displayName="@mantine/core/Menu";G.Item=BQ;G.Label=JR;G.Dropdown=qR;G.Target=tT;G.Divider=UR;const[iG,lG]=vo("Modal component was not found in tree"),sG={xs:S(320),sm:S(380),md:S(440),lg:S(620),xl:S(780)};var cG=W((e,{yOffset:t,xOffset:r,centered:n,fullScreen:o},{size:a})=>({content:{flex:o?"0 0 100%":`0 0 ${N({size:a,sizes:sG})}`,maxWidth:"100%",maxHeight:o?void 0:`calc(100dvh - (${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 uG=cG;var dG=Object.defineProperty,fG=Object.defineProperties,pG=Object.getOwnPropertyDescriptors,Ff=Object.getOwnPropertySymbols,oT=Object.prototype.hasOwnProperty,aT=Object.prototype.propertyIsEnumerable,dE=(e,t,r)=>t in e?dG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tv=(e,t)=>{for(var r in t||(t={}))oT.call(t,r)&&dE(e,r,t[r]);if(Ff)for(var r of Ff(t))aT.call(t,r)&&dE(e,r,t[r]);return e},iT=(e,t)=>fG(e,pG(t)),mG=(e,t)=>{var r={};for(var n in e)oT.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&&aT.call(e,n)&&(r[n]=e[n]);return r};const hG=iT(tv({},Qy),{yOffset:"5dvh",xOffset:"5vw"});function lT(e){const t=q("ModalRoot",hG,e),{classNames:r,variant:n,size:o,yOffset:a,xOffset:i,scrollAreaComponent:l,radius:c,centered:u,fullScreen:d}=t,m=mG(t,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:h,cx:g}=uG({yOffset:a,xOffset:i,centered:u,fullScreen:d},{name:"Modal",variant:n,size:o});return s.createElement(iG,{value:{yOffset:a,scrollAreaComponent:l,radius:c}},s.createElement(Et,tv({__staticSelector:"Modal",size:o,variant:n,classNames:iT(tv({},r),{content:g(h.content,r==null?void 0:r.content),inner:g(h.inner,r==null?void 0:r.inner)})},m)))}var gG=Object.defineProperty,Vf=Object.getOwnPropertySymbols,sT=Object.prototype.hasOwnProperty,cT=Object.prototype.propertyIsEnumerable,fE=(e,t,r)=>t in e?gG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vG=(e,t)=>{for(var r in t||(t={}))sT.call(t,r)&&fE(e,r,t[r]);if(Vf)for(var r of Vf(t))cT.call(t,r)&&fE(e,r,t[r]);return e},yG=(e,t)=>{var r={};for(var n in e)sT.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&&cT.call(e,n)&&(r[n]=e[n]);return r};const wG={shadow:"xl"},uT=f.forwardRef((e,t)=>{const r=q("ModalContent",wG,e),{children:n,scrollAreaComponent:o}=r,a=yG(r,["children","scrollAreaComponent"]),i=lG(),l=o||i.scrollAreaComponent||Et.NativeScrollArea;return s.createElement(Et.Content,vG({ref:t,radius:i.radius},a),s.createElement(l,{style:{maxHeight:`calc(100dvh - (${S(i.yOffset)} * 2))`}},n))});var _G=Object.defineProperty,xG=Object.defineProperties,bG=Object.getOwnPropertyDescriptors,Bf=Object.getOwnPropertySymbols,dT=Object.prototype.hasOwnProperty,fT=Object.prototype.propertyIsEnumerable,pE=(e,t,r)=>t in e?_G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Au=(e,t)=>{for(var r in t||(t={}))dT.call(t,r)&&pE(e,r,t[r]);if(Bf)for(var r of Bf(t))fT.call(t,r)&&pE(e,r,t[r]);return e},EG=(e,t)=>xG(e,bG(t)),SG=(e,t)=>{var r={};for(var n in e)dT.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&&fT.call(e,n)&&(r[n]=e[n]);return r};const PG=EG(Au({},Qy),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function xr(e){const t=q("Modal",PG,e),{title:r,withOverlay:n,overlayProps:o,withCloseButton:a,closeButtonProps:i,children:l}=t,c=SG(t,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),u=!!r||a;return s.createElement(lT,Au({},c),n&&s.createElement(Et.Overlay,Au({},o)),s.createElement(uT,null,u&&s.createElement(Et.Header,null,r&&s.createElement(Et.Title,null,r),a&&s.createElement(Et.CloseButton,Au({},i))),s.createElement(Et.Body,null,l)))}xr.Root=lT;xr.CloseButton=Et.CloseButton;xr.Overlay=Et.Overlay;xr.Content=uT;xr.Header=Et.Header;xr.Title=Et.Title;xr.Body=Et.Body;xr.NativeScrollArea=Et.NativeScrollArea;const pT={xs:S(16),sm:S(22),md:S(26),lg:S(30),xl:S(36)},$G={xs:S(10),sm:S(12),md:S(14),lg:S(16),xl:S(18)};var OG=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:pT}),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:$G}),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"}})),CG=Object.defineProperty,Uf=Object.getOwnPropertySymbols,mT=Object.prototype.hasOwnProperty,hT=Object.prototype.propertyIsEnumerable,mE=(e,t,r)=>t in e?CG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kG=(e,t)=>{for(var r in t||(t={}))mT.call(t,r)&&mE(e,r,t[r]);if(Uf)for(var r of Uf(t))hT.call(t,r)&&mE(e,r,t[r]);return e},jG=(e,t)=>{var r={};for(var n in e)mT.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&&hT.call(e,n)&&(r[n]=e[n]);return r};const RG={xs:16,sm:22,md:24,lg:26,xl:30};function gT(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=jG(t,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:y,cx:w}=OG({disabled:l,readOnly:c,radius:d},{name:"MultiSelect",classNames:n,styles:o,unstyled:h,size:u,variant:m});return s.createElement("div",kG({className:w(y.defaultValue,a)},g),s.createElement("span",{className:y.defaultValueLabel},r),!l&&!c&&s.createElement(Ks,{"aria-hidden":!0,onMouseDown:i,size:RG[u],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:y.defaultValueRemove,tabIndex:-1,unstyled:h}))}gT.displayName="@mantine/core/MultiSelect/DefaultValue";function TG({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 IG=Object.defineProperty,Wf=Object.getOwnPropertySymbols,vT=Object.prototype.hasOwnProperty,yT=Object.prototype.propertyIsEnumerable,hE=(e,t,r)=>t in e?IG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gE=(e,t)=>{for(var r in t||(t={}))vT.call(t,r)&&hE(e,r,t[r]);if(Wf)for(var r of Wf(t))yT.call(t,r)&&hE(e,r,t[r]);return e},DG=(e,t)=>{var r={};for(var n in e)vT.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&&yT.call(e,n)&&(r[n]=e[n]);return r};const NG={xs:S(14),sm:S(18),md:S(20),lg:S(24),xl:S(28)};function AG(e){var t=e,{size:r,error:n,style:o}=t,a=DG(t,["size","error","style"]);const i=Zt(),l=N({size:r,sizes:NG});return s.createElement("svg",gE({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:gE({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 MG=Object.defineProperty,zG=Object.defineProperties,LG=Object.getOwnPropertyDescriptors,vE=Object.getOwnPropertySymbols,FG=Object.prototype.hasOwnProperty,VG=Object.prototype.propertyIsEnumerable,yE=(e,t,r)=>t in e?MG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BG=(e,t)=>{for(var r in t||(t={}))FG.call(t,r)&&yE(e,r,t[r]);if(vE)for(var r of vE(t))VG.call(t,r)&&yE(e,r,t[r]);return e},UG=(e,t)=>zG(e,LG(t));function wT({shouldClear:e,clearButtonProps:t,onClear:r,size:n,error:o}){return e?s.createElement(Ks,UG(BG({},t),{variant:"transparent",onClick:r,size:n,onMouseDown:a=>a.preventDefault()})):s.createElement(AG,{error:o,size:n})}wT.displayName="@mantine/core/SelectRightSection";var WG=Object.defineProperty,HG=Object.defineProperties,qG=Object.getOwnPropertyDescriptors,Hf=Object.getOwnPropertySymbols,_T=Object.prototype.hasOwnProperty,xT=Object.prototype.propertyIsEnumerable,wE=(e,t,r)=>t in e?WG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Th=(e,t)=>{for(var r in t||(t={}))_T.call(t,r)&&wE(e,r,t[r]);if(Hf)for(var r of Hf(t))xT.call(t,r)&&wE(e,r,t[r]);return e},_E=(e,t)=>HG(e,qG(t)),QG=(e,t)=>{var r={};for(var n in e)_T.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&&xT.call(e,n)&&(r[n]=e[n]);return r};function bT(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(wT,Th({},i)),styles:_E(Th({},l),{rightSection:_E(Th({},l==null?void 0:l.rightSection),{pointerEvents:i.shouldClear?void 0:"none"})})}}var GG=Object.defineProperty,KG=Object.defineProperties,YG=Object.getOwnPropertyDescriptors,xE=Object.getOwnPropertySymbols,XG=Object.prototype.hasOwnProperty,JG=Object.prototype.propertyIsEnumerable,bE=(e,t,r)=>t in e?GG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ZG=(e,t)=>{for(var r in t||(t={}))XG.call(t,r)&&bE(e,r,t[r]);if(xE)for(var r of xE(t))JG.call(t,r)&&bE(e,r,t[r]);return e},eK=(e,t)=>KG(e,YG(t)),tK=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:eK(ZG({},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:pT}),"&::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 rK=tK;var nK=Object.defineProperty,oK=Object.defineProperties,aK=Object.getOwnPropertyDescriptors,qf=Object.getOwnPropertySymbols,ET=Object.prototype.hasOwnProperty,ST=Object.prototype.propertyIsEnumerable,EE=(e,t,r)=>t in e?nK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mi=(e,t)=>{for(var r in t||(t={}))ET.call(t,r)&&EE(e,r,t[r]);if(qf)for(var r of qf(t))ST.call(t,r)&&EE(e,r,t[r]);return e},SE=(e,t)=>oK(e,aK(t)),iK=(e,t)=>{var r={};for(var n in e)ET.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&&ST.call(e,n)&&(r[n]=e[n]);return r};function lK(e,t,r){return t?!1:r.label.toLowerCase().trim().includes(e.toLowerCase().trim())}function sK(e,t){return!!e&&!t.some(r=>r.value.toLowerCase()===e.toLowerCase())}function PE(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 cK={size:"sm",valueComponent:gT,itemComponent:rk,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:lK,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:sK,switchDirectionOnFlip:!1,zIndex:yo("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},PT=f.forwardRef((e,t)=>{const r=q("MultiSelect",cK,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:w,onChange:E,valueComponent:_,itemComponent:v,id:x,transitionProps:b,maxDropdownHeight:P,shadow:O,nothingFound:$,onFocus:C,onBlur:R,searchable:j,placeholder:k,filter:T,limit:L,clearSearchOnChange:B,clearable:V,clearSearchOnBlur:M,variant:Q,onSearchChange:A,searchValue:z,disabled:H,initiallyOpened:ie,radius:we,icon:Ie,rightSection:de,rightSectionWidth:He,creatable:Le,getCreateLabel:wt,shouldCreate:tt,onCreate:Er,sx:nn,dropdownComponent:on,onDropdownClose:Fr,onDropdownOpen:Po,maxSelectedValues:jt,withinPortal:Sr,portalProps:Gn,switchDirectionOnFlip:Ue,zIndex:Vr,selectOnBlur:Br,name:_t,dropdownPosition:oi,errorProps:ai,labelProps:ii,descriptionProps:Y,form:fe,positionDependencies:We,onKeyDown:it,unstyled:lt,inputContainer:Kn,inputWrapperOrder:an,readOnly:Pr,withAsterisk:$o,clearButtonProps:pa,hoverOnSearchChange:I,disableSelectedItemFiltering:D}=r,F=iK(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}=rK({invalid:!!u},{name:"MultiSelect",classNames:d,styles:m,unstyled:lt,size:c,variant:Q}),{systemStyles:ye,rest:pe}=Hn(F),oe=f.useRef(),Fe=f.useRef({}),st=Mr(x),[xe,Ce]=f.useState(ie),[$t,Ht]=f.useState(-1),[Sn,ma]=f.useState("column"),[ar,ir]=vr({value:z,defaultValue:"",finalValue:void 0,onChange:A}),[ln,ha]=f.useState(!1),{scrollIntoView:Oo,targetRef:li,scrollableRef:xl}=JA({duration:0,offset:5,cancelable:!1,isList:!0}),Ne=Le&&typeof wt=="function";let er=null;const Pn=w.map(me=>typeof me=="string"?{label:me,value:me}:me),ga=uN({data:Pn}),[Ee,Ur]=vr({value:PE(g,w),defaultValue:PE(y,w),finalValue:[],onChange:E}),lr=f.useRef(!!jt&&jt<Ee.length),wc=me=>{if(!Pr){const qe=Ee.filter(Wr=>Wr!==me);Ur(qe),jt&&qe.length<jt&&(lr.current=!1)}},GD=me=>{ir(me.currentTarget.value),!H&&!lr.current&&j&&Ce(!0)},KD=me=>{typeof C=="function"&&C(me),!H&&!lr.current&&j&&Ce(!0)},Ft=TG({data:ga,searchable:j,searchValue:ar,limit:L,filter:T,value:Ee,disableSelectedItemFiltering:D});Ne&&tt(ar,ga)&&(er=wt(ar),Ft.push({label:ar,value:ar,creatable:!0}));const va=Math.min($t,Ft.length-1),q0=(me,qe,Wr)=>{let Co=me;for(;Wr(Co);)if(Co=qe(Co),!Ft[Co].disabled)return Co;return me};hn(()=>{Ht(I&&ar?0:-1)},[ar,I]),hn(()=>{!H&&Ee.length>w.length&&Ce(!1),jt&&Ee.length<jt&&(lr.current=!1),jt&&Ee.length>=jt&&(lr.current=!0,Ce(!1))},[Ee]);const _c=me=>{if(!Pr)if(B&&ir(""),Ee.includes(me.value))wc(me.value);else{if(me.creatable&&typeof Er=="function"){const qe=Er(me.value);typeof qe<"u"&&qe!==null&&Ur(typeof qe=="string"?[...Ee,qe]:[...Ee,qe.value])}else Ur([...Ee,me.value]);Ee.length===jt-1&&(lr.current=!0,Ce(!1)),Ft.length===1&&Ce(!1)}},YD=me=>{typeof R=="function"&&R(me),Br&&Ft[va]&&xe&&_c(Ft[va]),M&&ir(""),Ce(!1)},XD=me=>{if(ln||(it==null||it(me),Pr)||me.key!=="Backspace"&&jt&&lr.current)return;const qe=Sn==="column",Wr=()=>{Ht(ya=>{var Yn;const bl=q0(ya,wa=>wa+1,wa=>wa<Ft.length-1);return xe&&(li.current=Fe.current[(Yn=Ft[bl])==null?void 0:Yn.value],Oo({alignment:qe?"end":"start"})),bl})},Co=()=>{Ht(ya=>{var Yn;const bl=q0(ya,wa=>wa-1,wa=>wa>0);return xe&&(li.current=Fe.current[(Yn=Ft[bl])==null?void 0:Yn.value],Oo({alignment:qe?"start":"end"})),bl})};switch(me.key){case"ArrowUp":{me.preventDefault(),Ce(!0),qe?Co():Wr();break}case"ArrowDown":{me.preventDefault(),Ce(!0),qe?Wr():Co();break}case"Enter":{me.preventDefault(),Ft[va]&&xe?_c(Ft[va]):Ce(!0);break}case" ":{j||(me.preventDefault(),Ft[va]&&xe?_c(Ft[va]):Ce(!0));break}case"Backspace":{Ee.length>0&&ar.length===0&&(Ur(Ee.slice(0,-1)),Ce(!0),jt&&(lr.current=!1));break}case"Home":{if(!j){me.preventDefault(),xe||Ce(!0);const ya=Ft.findIndex(Yn=>!Yn.disabled);Ht(ya),Oo({alignment:qe?"end":"start"})}break}case"End":{if(!j){me.preventDefault(),xe||Ce(!0);const ya=Ft.map(Yn=>!!Yn.disabled).lastIndexOf(!1);Ht(ya),Oo({alignment:qe?"end":"start"})}break}case"Escape":Ce(!1)}},JD=Ee.map(me=>{let qe=ga.find(Wr=>Wr.value===me&&!Wr.disabled);return!qe&&Ne&&(qe={value:me,label:me}),qe}).filter(me=>!!me).map((me,qe)=>s.createElement(_,SE(mi({},me),{variant:Q,disabled:H,className:K.value,readOnly:Pr,onRemove:Wr=>{Wr.preventDefault(),Wr.stopPropagation(),wc(me.value)},key:me.value,size:c,styles:m,classNames:d,radius:we,index:qe}))),ZD=me=>Ee.includes(me),e3=()=>{var me;ir(""),Ur([]),(me=oe.current)==null||me.focus(),jt&&(lr.current=!1)},xc=!Pr&&(Ft.length>0?xe:xe&&!!$);return hn(()=>{const me=xc?Po:Fr;typeof me=="function"&&me()},[xc]),s.createElement(zt.Wrapper,mi(mi({required:a,id:st,label:i,error:u,description:l,size:c,className:n,style:o,classNames:d,styles:m,__staticSelector:"MultiSelect",sx:nn,errorProps:ai,descriptionProps:Y,labelProps:ii,inputContainer:Kn,inputWrapperOrder:an,unstyled:lt,withAsterisk:$o,variant:Q},ye),h),s.createElement(ds,{opened:xc,transitionProps:b,shadow:"sm",withinPortal:Sr,portalProps:Gn,__staticSelector:"MultiSelect",onDirectionChange:ma,switchDirectionOnFlip:Ue,zIndex:Vr,dropdownPosition:oi,positionDependencies:[...We,ar],classNames:d,styles:m,unstyled:lt,variant:Q},s.createElement(ds.Target,null,s.createElement("div",{className:K.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":xe&&xc?`${st}-items`:null,"aria-controls":st,"aria-expanded":xe,onMouseLeave:()=>Ht(-1),tabIndex:-1},s.createElement("input",{type:"hidden",name:_t,value:Ee.join(","),form:fe,disabled:H}),s.createElement(zt,mi({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:c,variant:Q,disabled:H,error:u,required:a,radius:we,icon:Ie,unstyled:lt,onMouseDown:me=>{var qe;me.preventDefault(),!H&&!lr.current&&Ce(!xe),(qe=oe.current)==null||qe.focus()},classNames:SE(mi({},d),{input:he({[K.input]:!j},d==null?void 0:d.input)})},bT({theme:ge,rightSection:de,rightSectionWidth:He,styles:m,size:c,shouldClear:V&&Ee.length>0,onClear:e3,error:u,disabled:H,clearButtonProps:pa,readOnly:Pr})),s.createElement("div",{className:K.values,"data-clearable":V||void 0},JD,s.createElement("input",mi({ref:Yp(t,oe),type:"search",id:st,className:he(K.searchInput,{[K.searchInputPointer]:!j,[K.searchInputInputHidden]:!xe&&Ee.length>0||!j&&Ee.length>0,[K.searchInputEmpty]:Ee.length===0}),onKeyDown:XD,value:ar,onChange:GD,onFocus:KD,onBlur:YD,readOnly:!j||lr.current||Pr,placeholder:Ee.length===0?k:void 0,disabled:H,"data-mantine-stop-propagation":xe,autoComplete:"off",onCompositionStart:()=>ha(!0),onCompositionEnd:()=>ha(!1)},pe)))))),s.createElement(ds.Dropdown,{component:on||Ny,maxHeight:P,direction:Sn,id:st,innerRef:xl,__staticSelector:"MultiSelect",classNames:d,styles:m},s.createElement(Z2,{data:Ft,hovered:va,classNames:d,styles:m,uuid:st,__staticSelector:"MultiSelect",onItemHover:Ht,onItemSelect:_c,itemsRefs:Fe,itemComponent:v,size:c,nothingFound:$,isItemSelected:ZD,creatable:Le&&!!er,createLabel:er,unstyled:lt,variant:Q}))))});PT.displayName="@mantine/core/MultiSelect";var uK=Object.defineProperty,dK=Object.defineProperties,fK=Object.getOwnPropertyDescriptors,Qf=Object.getOwnPropertySymbols,$T=Object.prototype.hasOwnProperty,OT=Object.prototype.propertyIsEnumerable,$E=(e,t,r)=>t in e?uK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cu=(e,t)=>{for(var r in t||(t={}))$T.call(t,r)&&$E(e,r,t[r]);if(Qf)for(var r of Qf(t))OT.call(t,r)&&$E(e,r,t[r]);return e},OE=(e,t)=>dK(e,fK(t)),pK=(e,t)=>{var r={};for(var n in e)$T.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&&OT.call(e,n)&&(r[n]=e[n]);return r};const mK={size:"sm"},mt=f.forwardRef((e,t)=>{const r=Wk("NativeSelect",mK,e),{inputProps:n,wrapperProps:o,data:a,onChange:i,value:l,classNames:c,styles:u,rightSection:d,rightSectionWidth:m}=r,h=pK(r,["inputProps","wrapperProps","data","onChange","value","classNames","styles","rightSection","rightSectionWidth"]),g=Zt(),w=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(zt.Wrapper,OE(cu({},o),{__staticSelector:"NativeSelect"}),s.createElement(zt,cu(OE(cu(cu({},n),h),{onChange:i,component:"select",ref:t,value:l===null?"":l,__staticSelector:"NativeSelect",pointer:g.cursorType==="pointer"}),bT({theme:g,rightSection:d,rightSectionWidth:m,styles:u,shouldClear:!1,size:n.size,error:o.error,readOnly:!1})),w))});mt.displayName="@mantine/core/NativeSelect";var hK=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 gK=hK;var vK=Object.defineProperty,yK=Object.defineProperties,wK=Object.getOwnPropertyDescriptors,Gf=Object.getOwnPropertySymbols,CT=Object.prototype.hasOwnProperty,kT=Object.prototype.propertyIsEnumerable,CE=(e,t,r)=>t in e?vK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,kE=(e,t)=>{for(var r in t||(t={}))CT.call(t,r)&&CE(e,r,t[r]);if(Gf)for(var r of Gf(t))kT.call(t,r)&&CE(e,r,t[r]);return e},_K=(e,t)=>yK(e,wK(t)),xK=(e,t)=>{var r={};for(var n in e)CT.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&&kT.call(e,n)&&(r[n]=e[n]);return r};const bK={withCloseButton:!0},jT=f.forwardRef((e,t)=>{const r=q("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:w,unstyled:E,variant:_}=r,v=xK(r,["className","color","radius","loading","withCloseButton","withBorder","title","icon","children","onClose","closeButtonProps","classNames","styles","unstyled","variant"]),{classes:x,cx:b}=gK({color:o,radius:a,withTitle:!!u},{name:"Notification",classNames:y,styles:w,unstyled:E,variant:_});return s.createElement(ue,kE({className:b(x.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:x.icon},d),i&&s.createElement(qn,{size:28,color:o,className:x.loader}),s.createElement("div",{className:x.body},u&&s.createElement(ae,{className:x.title,size:"sm",weight:500},u),s.createElement(ae,{color:"dimmed",className:x.description,size:"sm"},m)),l&&s.createElement(Ks,_K(kE({iconSize:16,color:"gray"},g),{onClick:h,className:x.closeButton})))});jT.displayName="@mantine/core/Notification";var EK=Object.defineProperty,SK=Object.defineProperties,PK=Object.getOwnPropertyDescriptors,Kf=Object.getOwnPropertySymbols,RT=Object.prototype.hasOwnProperty,TT=Object.prototype.propertyIsEnumerable,jE=(e,t,r)=>t in e?EK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ih=(e,t)=>{for(var r in t||(t={}))RT.call(t,r)&&jE(e,r,t[r]);if(Kf)for(var r of Kf(t))TT.call(t,r)&&jE(e,r,t[r]);return e},$K=(e,t)=>SK(e,PK(t)),OK=(e,t)=>{var r={};for(var n in e)RT.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&&TT.call(e,n)&&(r[n]=e[n]);return r};const CK={type:"text",size:"sm",__staticSelector:"TextInput"},ne=f.forwardRef((e,t)=>{const r=Wk("TextInput",CK,e),{inputProps:n,wrapperProps:o}=r,a=OK(r,["inputProps","wrapperProps"]);return s.createElement(zt.Wrapper,Ih({},o),s.createElement(zt,$K(Ih(Ih({},n),a),{ref:t})))});ne.displayName="@mantine/core/TextInput";const[kK,xm]=vo("Pagination.Root component was not found in tree"),jK={siblings:1,boundaries:1};function IT(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:w,classNames:E,styles:_,unstyled:v,variant:x,size:b}=q("PaginationRoot",jK,e),{range:P,setPage:O,next:$,previous:C,active:R,first:j,last:k}=qA({page:r,initialPage:n,onChange:o,total:t,siblings:l,boundaries:c}),T=Cr(m,$),L=Cr(h,C),B=Cr(g,j),V=Cr(y,k);return s.createElement(kK,{value:{total:t,range:P,active:R,disabled:a,color:u,radius:d,getItemProps:w,onChange:O,onNext:T,onPrevious:L,onFirst:B,onLast:V,stylesApi:{name:"Pagination",classNames:E,styles:_,unstyled:v,variant:x,size:b}}},i)}const Ns={xs:S(22),sm:S(26),md:S(32),lg:S(38),xl:S(44)};var RK=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:Ns}),minWidth:N({size:o,sizes:Ns}),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 TK=RK;var IK=Object.defineProperty,DK=Object.defineProperties,NK=Object.getOwnPropertyDescriptors,Yf=Object.getOwnPropertySymbols,DT=Object.prototype.hasOwnProperty,NT=Object.prototype.propertyIsEnumerable,RE=(e,t,r)=>t in e?IK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AK=(e,t)=>{for(var r in t||(t={}))DT.call(t,r)&&RE(e,r,t[r]);if(Yf)for(var r of Yf(t))NT.call(t,r)&&RE(e,r,t[r]);return e},MK=(e,t)=>DK(e,NK(t)),zK=(e,t)=>{var r={};for(var n in e)DT.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&&NT.call(e,n)&&(r[n]=e[n]);return r};const LK={withPadding:!0},bm=f.forwardRef((e,t)=>{const r=q("PaginationControl",LK,e),{active:n,className:o,disabled:a,withPadding:i}=r,l=zK(r,["active","className","disabled","withPadding"]),c=xm(),{classes:u,cx:d}=TK({color:c.color,radius:c.radius,withPadding:i},c.stylesApi);return s.createElement(Jo,MK(AK({},l),{disabled:a,"data-active":n||void 0,"data-disabled":a||void 0,ref:t,className:d(u.control,o)}))});bm.displayName="@mantine/core/PaginationControl";var FK=Object.defineProperty,VK=Object.defineProperties,BK=Object.getOwnPropertyDescriptors,Xf=Object.getOwnPropertySymbols,AT=Object.prototype.hasOwnProperty,MT=Object.prototype.propertyIsEnumerable,TE=(e,t,r)=>t in e?FK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wa=(e,t)=>{for(var r in t||(t={}))AT.call(t,r)&&TE(e,r,t[r]);if(Xf)for(var r of Xf(t))MT.call(t,r)&&TE(e,r,t[r]);return e},nc=(e,t)=>VK(e,BK(t)),UK=(e,t)=>{var r={};for(var n in e)AT.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&&MT.call(e,n)&&(r[n]=e[n]);return r};function zT(e){return`calc(${N({size:e,sizes:Ns})} / 2)`}function oc(e){var t=e,{size:r,style:n,children:o,path:a}=t,i=UK(t,["size","style","children","path"]);return s.createElement("svg",Wa({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:Wa({width:r,height:r},n)},i),s.createElement("path",{d:a,fill:"currentColor"}))}const WK=e=>s.createElement(oc,nc(Wa({},e),{path:"M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z"})),HK=e=>s.createElement(oc,nc(Wa({},e),{path:"M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z"})),qK=e=>s.createElement(oc,nc(Wa({},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(oc,nc(Wa({},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"})),GK=e=>s.createElement(oc,nc(Wa({},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 KK=W((e,t,{size:r})=>({dots:{height:N({size:r,sizes:Ns}),minWidth:N({size:r,sizes:Ns}),display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}}));const YK=KK;var XK=Object.defineProperty,Jf=Object.getOwnPropertySymbols,LT=Object.prototype.hasOwnProperty,FT=Object.prototype.propertyIsEnumerable,IE=(e,t,r)=>t in e?XK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,JK=(e,t)=>{for(var r in t||(t={}))LT.call(t,r)&&IE(e,r,t[r]);if(Jf)for(var r of Jf(t))FT.call(t,r)&&IE(e,r,t[r]);return e},ZK=(e,t)=>{var r={};for(var n in e)LT.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&&FT.call(e,n)&&(r[n]=e[n]);return r};const eY={icon:GK},Yy=f.forwardRef((e,t)=>{const r=q("PaginationDots",eY,e),{className:n,icon:o}=r,a=ZK(r,["className","icon"]),i=xm(),{classes:l,cx:c}=YK(null,i.stylesApi);return s.createElement(ue,JK({ref:t,className:c(l.dots,n)},a),s.createElement(o,{size:zT(i.stylesApi.size)}))});Yy.displayName="@mantine/core/PaginationDots";var tY=Object.defineProperty,DE=Object.getOwnPropertySymbols,rY=Object.prototype.hasOwnProperty,nY=Object.prototype.propertyIsEnumerable,NE=(e,t,r)=>t in e?tY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oY=(e,t)=>{for(var r in t||(t={}))rY.call(t,r)&&NE(e,r,t[r]);if(DE)for(var r of DE(t))nY.call(t,r)&&NE(e,r,t[r]);return e};function Xy({dotsIcon:e}){const t=xm(),r=t.range.map((n,o)=>{var a;return n==="dots"?s.createElement(Yy,{icon:e,key:o}):s.createElement(bm,oY({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)}Xy.displayName="@mantine/core/PaginationItems";var aY=W(e=>({icon:{transform:e.dir==="rtl"?"rotate(180deg)":"unset"}}));const iY=aY;var lY=Object.defineProperty,Zf=Object.getOwnPropertySymbols,VT=Object.prototype.hasOwnProperty,BT=Object.prototype.propertyIsEnumerable,AE=(e,t,r)=>t in e?lY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sY=(e,t)=>{for(var r in t||(t={}))VT.call(t,r)&&AE(e,r,t[r]);if(Zf)for(var r of Zf(t))BT.call(t,r)&&AE(e,r,t[r]);return e},cY=(e,t)=>{var r={};for(var n in e)VT.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&&BT.call(e,n)&&(r[n]=e[n]);return r};function Em({icon:e,name:t,action:r,type:n}){const o={icon:e},a=f.forwardRef((i,l)=>{const c=q(t,o,i),{icon:u}=c,d=cY(c,["icon"]),{classes:m}=iY(),h=xm(),g=n==="next"?h.active===h.total:h.active===1;return s.createElement(bm,sY({disabled:h.disabled||g,ref:l,onClick:h[r],withPadding:!1},d),s.createElement(u,{className:m.icon,size:zT(h.stylesApi.size)}))});return a.displayName=`@mantine/core/${t}`,a}const UT=Em({icon:WK,name:"PaginationNext",action:"onNext",type:"next"}),WT=Em({icon:HK,name:"PaginationPrevious",action:"onPrevious",type:"previous"}),HT=Em({icon:qK,name:"PaginationFirst",action:"onFirst",type:"previous"}),qT=Em({icon:QK,name:"PaginationLast",action:"onLast",type:"next"});var uY=Object.defineProperty,ep=Object.getOwnPropertySymbols,QT=Object.prototype.hasOwnProperty,GT=Object.prototype.propertyIsEnumerable,ME=(e,t,r)=>t in e?uY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fl=(e,t)=>{for(var r in t||(t={}))QT.call(t,r)&&ME(e,r,t[r]);if(ep)for(var r of ep(t))GT.call(t,r)&&ME(e,r,t[r]);return e},dY=(e,t)=>{var r={};for(var n in e)QT.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&>.call(e,n)&&(r[n]=e[n]);return r};const fY={withControls:!0,siblings:1,boundaries:1};function Qn(e){const t=q("Pagination",fY,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:w,color:E,radius:_,onNextPage:v,onPreviousPage:x,onFirstPage:b,onLastPage:P,getItemProps:O,getControlProps:$,spacing:C,nextIcon:R,previousIcon:j,lastIcon:k,firstIcon:T,dotsIcon:L}=t,B=dY(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=Zt();return u<=0?null:s.createElement(IT,{classNames:o,styles:a,unstyled:i,variant:l,size:c,total:u,value:d,defaultValue:m,onChange:h,disabled:g,siblings:y,boundaries:w,color:E,radius:_,onNextPage:v,onPreviousPage:x,onFirstPage:b,onLastPage:P,getItemProps:O},s.createElement(J,Fl({spacing:C??`calc(${N({size:c,sizes:V.spacing})} / 2)`},B),r&&s.createElement(HT,Fl({icon:T},$==null?void 0:$("first"))),n&&s.createElement(WT,Fl({icon:j},$==null?void 0:$("previous"))),s.createElement(Xy,{dotsIcon:L}),n&&s.createElement(UT,Fl({icon:R},$==null?void 0:$("next"))),r&&s.createElement(qT,Fl({icon:k},$==null?void 0:$("last")))))}Qn.displayName="@mantine/core/Pagination";Qn.Root=IT;Qn.Items=Xy;Qn.Control=bm;Qn.Dots=Yy;Qn.Next=UT;Qn.Previous=WT;Qn.Last=qT;Qn.First=HT;const pY=({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 mY=Object.defineProperty,hY=Object.defineProperties,gY=Object.getOwnPropertyDescriptors,zE=Object.getOwnPropertySymbols,vY=Object.prototype.hasOwnProperty,yY=Object.prototype.propertyIsEnumerable,LE=(e,t,r)=>t in e?mY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dh=(e,t)=>{for(var r in t||(t={}))vY.call(t,r)&&LE(e,r,t[r]);if(zE)for(var r of zE(t))yY.call(t,r)&&LE(e,r,t[r]);return e},FE=(e,t)=>hY(e,gY(t)),wY=W((e,{rightSectionWidth:t},{size:r})=>({visibilityToggle:{},input:{position:"relative",overflow:"hidden"},innerInput:FE(Dh(Dh({},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":FE(Dh({},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 _Y=wY;var xY=Object.defineProperty,bY=Object.defineProperties,EY=Object.getOwnPropertyDescriptors,tp=Object.getOwnPropertySymbols,KT=Object.prototype.hasOwnProperty,YT=Object.prototype.propertyIsEnumerable,VE=(e,t,r)=>t in e?xY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uu=(e,t)=>{for(var r in t||(t={}))KT.call(t,r)&&VE(e,r,t[r]);if(tp)for(var r of tp(t))YT.call(t,r)&&VE(e,r,t[r]);return e},SY=(e,t)=>bY(e,EY(t)),PY=(e,t)=>{var r={};for(var n in e)KT.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&&YT.call(e,n)&&(r[n]=e[n]);return r};const $Y={xs:S(22),sm:S(26),md:S(28),lg:S(32),xl:S(40)},OY={xs:S(12),sm:S(15),md:S(17),lg:S(19),xl:S(21)},CY={xs:S(28),sm:S(32),md:S(34),lg:S(44),xl:S(54)},kY={size:"sm",toggleTabIndex:-1,visibilityToggleIcon:pY,__staticSelector:"PasswordInput"},io=f.forwardRef((e,t)=>{const r=q("PasswordInput",kY,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:w,classNames:E,styles:_,variant:v,visibilityToggleIcon:x,__staticSelector:b,sx:P,labelProps:O,descriptionProps:$,errorProps:C,unstyled:R,visibilityToggleLabel:j,withAsterisk:k,inputContainer:T,iconWidth:L,inputWrapperOrder:B,visible:V,defaultVisible:M,onVisibilityChange:Q}=r,A=PY(r,["radius","disabled","size","toggleTabIndex","className","id","label","error","required","style","icon","description","wrapperProps","classNames","styles","variant","visibilityToggleIcon","__staticSelector","sx","labelProps","descriptionProps","errorProps","unstyled","visibilityToggleLabel","withAsterisk","inputContainer","iconWidth","inputWrapperOrder","visible","defaultVisible","onVisibilityChange"]),z=N({size:a,sizes:CY}),{classes:H}=_Y({rightSectionWidth:z},{name:"PasswordInput",classNames:E,styles:_,unstyled:R,size:a,variant:v}),ie=Mr(c),{systemStyles:we,rest:Ie}=Hn(A),[de,He]=vr({value:V,defaultValue:M,finalValue:!1,onChange:Q}),Le=()=>He(!de),wt=s.createElement(Dr,{className:H.visibilityToggle,tabIndex:i,radius:n,size:N({size:a,sizes:$Y}),"aria-hidden":!j,"aria-label":j,unstyled:R,onMouseDown:tt=>{tt.preventDefault(),Le()},onKeyDown:tt=>{tt.key===" "&&(tt.preventDefault(),Le())}},s.createElement(x,{reveal:de,size:N({size:a,sizes:OY})}));return s.createElement(zt.Wrapper,uu(uu({required:m,id:ie,label:u,error:d,description:y,size:a,className:l,style:h,classNames:E,styles:_,__staticSelector:b,sx:P,errorProps:C,descriptionProps:$,labelProps:O,unstyled:R,withAsterisk:k,inputWrapperOrder:B,inputContainer:T,variant:v},we),w),s.createElement(zt,{component:"div",error:d,icon:g,size:a,classNames:SY(uu({},E),{input:H.input}),styles:_,radius:n,disabled:o,__staticSelector:b,rightSectionWidth:z,rightSection:!o&&wt,variant:v,unstyled:R,iconWidth:L},s.createElement("input",uu({type:de?"text":"password",required:m,"data-invalid":!!d||void 0,"data-with-icon":!!g||void 0,className:H.innerInput,disabled:o,id:ie,ref:t},Ie))))});io.displayName="@mantine/core/PasswordInput";var jY=Object.defineProperty,rp=Object.getOwnPropertySymbols,XT=Object.prototype.hasOwnProperty,JT=Object.prototype.propertyIsEnumerable,BE=(e,t,r)=>t in e?jY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UE=(e,t)=>{for(var r in t||(t={}))XT.call(t,r)&&BE(e,r,t[r]);if(rp)for(var r of rp(t))JT.call(t,r)&&BE(e,r,t[r]);return e},RY=(e,t)=>{var r={};for(var n in e)XT.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&rp)for(var n of rp(e))t.indexOf(n)<0&&JT.call(e,n)&&(r[n]=e[n]);return r};function TY(e){const t=e,{width:r,height:n,style:o}=t,a=RY(t,["width","height","style"]);return s.createElement("svg",UE({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:UE({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 ZT=f.createContext(null),IY=ZT.Provider,DY=()=>f.useContext(ZT);var NY=Object.defineProperty,np=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,WE=(e,t,r)=>t in e?NY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HE=(e,t)=>{for(var r in t||(t={}))eI.call(t,r)&&WE(e,r,t[r]);if(np)for(var r of np(t))tI.call(t,r)&&WE(e,r,t[r]);return e},AY=(e,t)=>{var r={};for(var n in e)eI.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&&tI.call(e,n)&&(r[n]=e[n]);return r};const MY={size:"sm"},rI=f.forwardRef((e,t)=>{const r=q("RadioGroup",MY,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c,unstyled:u,name:d}=r,m=AY(r,["children","value","defaultValue","onChange","size","wrapperProps","unstyled","name"]),h=Mr(d),[g,y]=vr({value:o,defaultValue:a,finalValue:"",onChange:i}),w=E=>y(E.currentTarget.value);return s.createElement(IY,{value:{value:g,onChange:w,size:l,name:h}},s.createElement(zt.Wrapper,HE(HE({labelElement:"div",size:l,__staticSelector:"RadioGroup",ref:t,unstyled:u},c),m),n))});rI.displayName="@mantine/core/RadioGroup";var zY=Object.defineProperty,LY=Object.defineProperties,FY=Object.getOwnPropertyDescriptors,qE=Object.getOwnPropertySymbols,VY=Object.prototype.hasOwnProperty,BY=Object.prototype.propertyIsEnumerable,QE=(e,t,r)=>t in e?zY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UY=(e,t)=>{for(var r in t||(t={}))VY.call(t,r)&&QE(e,r,t[r]);if(qE)for(var r of qE(t))BY.call(t,r)&&QE(e,r,t[r]);return e},WY=(e,t)=>LY(e,FY(t));const Nh={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)},du={xs:S(6),sm:S(8),md:S(10),lg:S(14),xl:S(16)};var HY=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:Kt("icon"),color:e.white,opacity:0,transform:`scale(0.75) translateY(${S(2)})`,transition:`opacity ${r}ms ${e.transitionTimingFunction}`,pointerEvents:"none",width:N({sizes:du,size:a}),height:N({sizes:du,size:a}),position:"absolute",top:`calc(50% - ${N({sizes:du,size:a})} / 2)`,left:`calc(50% - ${N({sizes:du,size:a})} / 2)`},radio:WY(UY({},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:Nh,size:a}),height:N({sizes:Nh,size:a}),borderRadius:N({sizes:Nh,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,[`& + .${Kt("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],[`& + .${Kt("icon")}`]:{color:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[4]}}})}});const qY=HY;var QY=Object.defineProperty,op=Object.getOwnPropertySymbols,nI=Object.prototype.hasOwnProperty,oI=Object.prototype.propertyIsEnumerable,GE=(e,t,r)=>t in e?QY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fu=(e,t)=>{for(var r in t||(t={}))nI.call(t,r)&&GE(e,r,t[r]);if(op)for(var r of op(t))oI.call(t,r)&&GE(e,r,t[r]);return e},GY=(e,t)=>{var r={};for(var n in e)nI.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&&oI.call(e,n)&&(r[n]=e[n]);return r};const KY={icon:TY,transitionDuration:100,size:"sm",labelPosition:"right"},ap=f.forwardRef((e,t)=>{var r,n;const o=q("Radio",KY,e),{className:a,style:i,id:l,label:c,size:u,title:d,disabled:m,color:h,classNames:g,styles:y,sx:w,icon:E,transitionDuration:_,wrapperProps:v,unstyled:x,labelPosition:b,description:P,error:O,variant:$}=o,C=GY(o,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error","variant"]),R=DY(),j=(r=R==null?void 0:R.size)!=null?r:u,k=e.size?u:j,{classes:T}=qY({color:h,transitionDuration:_,labelPosition:b,error:!!O},{name:"Radio",classNames:g,styles:y,unstyled:x,variant:$,size:k}),{systemStyles:L,rest:B}=Hn(C),V=Mr(l),M=R?{checked:R.value===B.value,name:(n=B.name)!=null?n:R.name,onChange:R.onChange}:{};return s.createElement(_m,fu(fu({className:a,sx:w,style:i,id:V,size:k,labelPosition:b,label:c,description:P,error:O,disabled:m,__staticSelector:"Radio",classNames:g,styles:y,unstyled:x,"data-checked":M.checked||void 0,variant:$},L),v),s.createElement("div",{className:T.inner},s.createElement("input",fu(fu({ref:t,className:T.radio,type:"radio",id:V,disabled:m},B),M)),s.createElement(E,{className:T.icon,"aria-hidden":!0})))});ap.displayName="@mantine/core/Radio";ap.Group=rI;var YY=Object.defineProperty,ip=Object.getOwnPropertySymbols,aI=Object.prototype.hasOwnProperty,iI=Object.prototype.propertyIsEnumerable,KE=(e,t,r)=>t in e?YY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XY=(e,t)=>{for(var r in t||(t={}))aI.call(t,r)&&KE(e,r,t[r]);if(ip)for(var r of ip(t))iI.call(t,r)&&KE(e,r,t[r]);return e},JY=(e,t)=>{var r={};for(var n in e)aI.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&&iI.call(e,n)&&(r[n]=e[n]);return r};const ZY={w:0,h:0},Jy=f.forwardRef((e,t)=>{const r=q("Space",ZY,e),{w:n,h:o}=r,a=JY(r,["w","h"]);return s.createElement(ue,XY({ref:t,w:n,miw:n,h:o,mih:o},a))});Jy.displayName="@mantine/core/Space";var eX=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 tX=eX;var rX=Object.defineProperty,lp=Object.getOwnPropertySymbols,lI=Object.prototype.hasOwnProperty,sI=Object.prototype.propertyIsEnumerable,YE=(e,t,r)=>t in e?rX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nX=(e,t)=>{for(var r in t||(t={}))lI.call(t,r)&&YE(e,r,t[r]);if(lp)for(var r of lp(t))sI.call(t,r)&&YE(e,r,t[r]);return e},oX=(e,t)=>{var r={};for(var n in e)lI.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&&sI.call(e,n)&&(r[n]=e[n]);return r};const aX={spacing:"md",align:"stretch",justify:"flex-start"},ke=f.forwardRef((e,t)=>{const r=q("Stack",aX,e),{spacing:n,className:o,align:a,justify:i,unstyled:l,variant:c}=r,u=oX(r,["spacing","className","align","justify","unstyled","variant"]),{classes:d,cx:m}=tX({spacing:n,align:a,justify:i},{name:"Stack",unstyled:l,variant:c});return s.createElement(ue,nX({className:m(d.root,o),ref:t},u))});ke.displayName="@mantine/core/Stack";const cI=f.createContext(null),iX=cI.Provider,lX=()=>f.useContext(cI);var sX=Object.defineProperty,sp=Object.getOwnPropertySymbols,uI=Object.prototype.hasOwnProperty,dI=Object.prototype.propertyIsEnumerable,XE=(e,t,r)=>t in e?sX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,JE=(e,t)=>{for(var r in t||(t={}))uI.call(t,r)&&XE(e,r,t[r]);if(sp)for(var r of sp(t))dI.call(t,r)&&XE(e,r,t[r]);return e},cX=(e,t)=>{var r={};for(var n in e)uI.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&&dI.call(e,n)&&(r[n]=e[n]);return r};const uX={size:"sm"},fI=f.forwardRef((e,t)=>{const r=q("SwitchGroup",uX,e),{children:n,value:o,defaultValue:a,onChange:i,size:l,wrapperProps:c}=r,u=cX(r,["children","value","defaultValue","onChange","size","wrapperProps"]),[d,m]=vr({value:o,defaultValue:a,finalValue:[],onChange:i}),h=g=>{const y=g.currentTarget.value;m(d.includes(y)?d.filter(w=>w!==y):[...d,y])};return s.createElement(iX,{value:{value:d,onChange:h,size:l}},s.createElement(zt.Wrapper,JE(JE({labelElement:"div",size:l,__staticSelector:"SwitchGroup",ref:t},c),u),n))});fI.displayName="@mantine/core/SwitchGroup";var dX=Object.defineProperty,fX=Object.defineProperties,pX=Object.getOwnPropertyDescriptors,ZE=Object.getOwnPropertySymbols,mX=Object.prototype.hasOwnProperty,hX=Object.prototype.propertyIsEnumerable,eS=(e,t,r)=>t in e?dX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gX=(e,t)=>{for(var r in t||(t={}))mX.call(t,r)&&eS(e,r,t[r]);if(ZE)for(var r of ZE(t))hX.call(t,r)&&eS(e,r,t[r]);return e},vX=(e,t)=>fX(e,pX(t));const yX={xs:S(16),sm:S(20),md:S(24),lg:S(30),xl:S(36)},wX={xs:S(32),sm:S(38),md:S(46),lg:S(56),xl:S(72)},_X={xs:S(12),sm:S(14),md:S(18),lg:S(22),xl:S(28)},xX={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 EX=W((e,{radius:t,color:r,labelPosition:n,error:o},{size:a})=>{const i=N({size:a,sizes:_X}),l=N({size:t,sizes:e.radius}),c=e.fn.variant({variant:"filled",color:r}),u=N({size:a,sizes:wX}),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:vX(gX({},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:yX}),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:xX}),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}),marginLeft:`calc(${i} + ${d})`,transition:`margin 150ms ${e.transitionTimingFunction}`,"input:checked + * > &":{marginLeft:0,marginRight:`calc(${i} + ${d})`}}}});const SX=EX;var PX=Object.defineProperty,$X=Object.defineProperties,OX=Object.getOwnPropertyDescriptors,cp=Object.getOwnPropertySymbols,pI=Object.prototype.hasOwnProperty,mI=Object.prototype.propertyIsEnumerable,tS=(e,t,r)=>t in e?PX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ah=(e,t)=>{for(var r in t||(t={}))pI.call(t,r)&&tS(e,r,t[r]);if(cp)for(var r of cp(t))mI.call(t,r)&&tS(e,r,t[r]);return e},CX=(e,t)=>$X(e,OX(t)),kX=(e,t)=>{var r={};for(var n in e)pI.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&&mI.call(e,n)&&(r[n]=e[n]);return r};const jX={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},Zy=f.forwardRef((e,t)=>{var r;const n=q("Switch",jX,e),{className:o,color:a,label:i,offLabel:l,onLabel:c,id:u,style:d,size:m,radius:h,wrapperProps:g,children:y,unstyled:w,styles:E,classNames:_,thumbIcon:v,sx:x,checked:b,defaultChecked:P,onChange:O,labelPosition:$,description:C,error:R,disabled:j,variant:k}=n,T=kX(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=lX(),B=(L==null?void 0:L.size)||m,{classes:V,cx:M}=SX({color:a,radius:h,labelPosition:$,error:!!R},{name:"Switch",classNames:_,styles:E,unstyled:w,size:B,variant:k}),{systemStyles:Q,rest:A}=Hn(T),z=Mr(u),H=L?{checked:L.value.includes(A.value),onChange:L.onChange}:{},[ie,we]=vr({value:(r=H.checked)!=null?r:b,defaultValue:P,finalValue:!1});return s.createElement(_m,Ah(Ah({className:M(o,V.root),sx:x,style:d,id:z,size:(L==null?void 0:L.size)||m,labelPosition:$,label:i,description:C,error:R,disabled:j,__staticSelector:"Switch",classNames:_,styles:E,unstyled:w,"data-checked":H.checked||void 0,variant:k},Q),g),s.createElement("input",CX(Ah({},A),{disabled:j,checked:ie,onChange:Ie=>{L?H.onChange(Ie):O==null||O(Ie),we(Ie.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},ie?c:l)))});Zy.displayName="@mantine/core/Switch";Zy.Group=fI;var RX=Object.defineProperty,TX=Object.defineProperties,IX=Object.getOwnPropertyDescriptors,rS=Object.getOwnPropertySymbols,DX=Object.prototype.hasOwnProperty,NX=Object.prototype.propertyIsEnumerable,nS=(e,t,r)=>t in e?RX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,AX=(e,t)=>{for(var r in t||(t={}))DX.call(t,r)&&nS(e,r,t[r]);if(rS)for(var r of rS(t))NX.call(t,r)&&nS(e,r,t[r]);return e},MX=(e,t)=>TX(e,IX(t)),zX=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:MX(AX({},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 LX=zX;var FX=Object.defineProperty,VX=Object.defineProperties,BX=Object.getOwnPropertyDescriptors,up=Object.getOwnPropertySymbols,hI=Object.prototype.hasOwnProperty,gI=Object.prototype.propertyIsEnumerable,oS=(e,t,r)=>t in e?FX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UX=(e,t)=>{for(var r in t||(t={}))hI.call(t,r)&&oS(e,r,t[r]);if(up)for(var r of up(t))gI.call(t,r)&&oS(e,r,t[r]);return e},WX=(e,t)=>VX(e,BX(t)),HX=(e,t)=>{var r={};for(var n in e)hI.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&&gI.call(e,n)&&(r[n]=e[n]);return r};const qX={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},ti=f.forwardRef((e,t)=>{const r=q("Table",qX,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,w=HX(r,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:E,cx:_}=LX({captionSide:l,verticalSpacing:u,horizontalSpacing:c,fontSize:d,withBorder:h,withColumnBorders:g},{unstyled:m,name:"Table",variant:y});return s.createElement(ue,WX(UX({},w),{component:"table",ref:t,className:_(E.root,n),"data-striped":a||void 0,"data-hover":i||void 0}),o)});ti.displayName="@mantine/core/Table";const rv={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,e0]=vo(rv.context);var GX=Object.defineProperty,aS=Object.getOwnPropertySymbols,KX=Object.prototype.hasOwnProperty,YX=Object.prototype.propertyIsEnumerable,iS=(e,t,r)=>t in e?GX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XX=(e,t)=>{for(var r in t||(t={}))KX.call(t,r)&&iS(e,r,t[r]);if(aS)for(var r of aS(t))YX.call(t,r)&&iS(e,r,t[r]);return e};function JX({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 ZX=W((e,t,{variant:r})=>{const n=t.orientation==="vertical";return{tabsList:XX({display:"flex",flexWrap:"wrap",flexDirection:n?"column":"row",justifyContent:PR[t.position],'& [role="tab"]':{flex:t.grow?1:void 0}},JX(t,e,r))}});const eJ=ZX;var tJ=Object.defineProperty,rJ=Object.defineProperties,nJ=Object.getOwnPropertyDescriptors,dp=Object.getOwnPropertySymbols,vI=Object.prototype.hasOwnProperty,yI=Object.prototype.propertyIsEnumerable,lS=(e,t,r)=>t in e?tJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oJ=(e,t)=>{for(var r in t||(t={}))vI.call(t,r)&&lS(e,r,t[r]);if(dp)for(var r of dp(t))yI.call(t,r)&&lS(e,r,t[r]);return e},aJ=(e,t)=>rJ(e,nJ(t)),iJ=(e,t)=>{var r={};for(var n in e)vI.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&&yI.call(e,n)&&(r[n]=e[n]);return r};const lJ={grow:!1,position:"left"},wI=f.forwardRef((e,t)=>{const r=q("TabsList",lJ,e),{children:n,className:o,grow:a,position:i}=r,l=iJ(r,["children","className","grow","position"]),{orientation:c,variant:u,color:d,radius:m,inverted:h,placement:g,classNames:y,styles:w,unstyled:E}=e0(),{classes:_,cx:v}=eJ({orientation:c,grow:a,color:d,position:i,radius:m,inverted:h,placement:g},{name:"Tabs",unstyled:E,classNames:y,styles:w,variant:u});return s.createElement(ue,aJ(oJ({},l),{className:v(_.tabsList,o),ref:t,role:"tablist","aria-orientation":c}),n)});wI.displayName="@mantine/core/TabsList";var sJ=W((e,{orientation:t})=>({panel:{flex:t==="vertical"?1:void 0}}));const cJ=sJ;var uJ=Object.defineProperty,dJ=Object.defineProperties,fJ=Object.getOwnPropertyDescriptors,fp=Object.getOwnPropertySymbols,_I=Object.prototype.hasOwnProperty,xI=Object.prototype.propertyIsEnumerable,sS=(e,t,r)=>t in e?uJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pJ=(e,t)=>{for(var r in t||(t={}))_I.call(t,r)&&sS(e,r,t[r]);if(fp)for(var r of fp(t))xI.call(t,r)&&sS(e,r,t[r]);return e},mJ=(e,t)=>dJ(e,fJ(t)),hJ=(e,t)=>{var r={};for(var n in e)_I.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&&xI.call(e,n)&&(r[n]=e[n]);return r};const gJ={},bI=f.forwardRef((e,t)=>{const r=q("TabsPanel",gJ,e),{value:n,children:o,sx:a,className:i}=r,l=hJ(r,["value","children","sx","className"]),c=e0(),{classes:u,cx:d}=cJ({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(w=>w!==m))),[m]),s.createElement(ue,mJ(pJ({},l),{ref:t,sx:[{display:h?void 0:"none"},...Dp(a)],className:d(u.panel,i),role:"tabpanel",id:m,"aria-labelledby":c.getTabId(n)}),g)});bI.displayName="@mantine/core/TabsPanel";var vJ=Object.defineProperty,yJ=Object.defineProperties,wJ=Object.getOwnPropertyDescriptors,cS=Object.getOwnPropertySymbols,_J=Object.prototype.hasOwnProperty,xJ=Object.prototype.propertyIsEnumerable,uS=(e,t,r)=>t in e?vJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ii=(e,t)=>{for(var r in t||(t={}))_J.call(t,r)&&uS(e,r,t[r]);if(cS)for(var r of cS(t))xJ.call(t,r)&&uS(e,r,t[r]);return e},dS=(e,t)=>yJ(e,wJ(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"?dS(Ii({[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]":Ii({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"?dS(Ii({borderRadius:e.fn.radius(n)},e.fn.hover({backgroundColor:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]})),{"&[data-active]":Ii({backgroundColor:c.background,color:e.white},e.fn.hover({backgroundColor:c.background}))}):{}}var EJ=W((e,t,{variant:r})=>({tabLabel:{},tab:Ii({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":Ii({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 SJ=EJ;var PJ=Object.defineProperty,$J=Object.defineProperties,OJ=Object.getOwnPropertyDescriptors,pp=Object.getOwnPropertySymbols,EI=Object.prototype.hasOwnProperty,SI=Object.prototype.propertyIsEnumerable,fS=(e,t,r)=>t in e?PJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,CJ=(e,t)=>{for(var r in t||(t={}))EI.call(t,r)&&fS(e,r,t[r]);if(pp)for(var r of pp(t))SI.call(t,r)&&fS(e,r,t[r]);return e},kJ=(e,t)=>$J(e,OJ(t)),jJ=(e,t)=>{var r={};for(var n in e)EI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pp)for(var n of pp(e))t.indexOf(n)<0&&SI.call(e,n)&&(r[n]=e[n]);return r};const RJ={},PI=f.forwardRef((e,t)=>{const r=q("TabsTab",RJ,e),{value:n,children:o,onKeyDown:a,onClick:i,className:l,icon:c,rightSection:u,color:d}=r,m=jJ(r,["value","children","onKeyDown","onClick","className","icon","rightSection","color"]),h=e0(),g=!!c,y=!!u,{theme:w,classes:E,cx:_}=SJ({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,x=h.getPanelId(n),b=h.mountedPanelIds.includes(n)?x:void 0,P=O=>{h.onTabChange(h.allowTabDeactivation&&n===h.value?null:n),i==null||i(O)};return s.createElement(Jo,kJ(CJ({},m),{unstyled:h.unstyled,className:_(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":b,onClick:P,onKeyDown:v$({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:h.activateTabWithKeyboard,loop:h.loop,dir:w.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))});PI.displayName="@mantine/core/Tab";function $I({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:w,styles:E,unstyled:_}){const v=Mr(i),[x,b]=f.useState([]),[P,O]=vr({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:t1(`${v}-tab`,rv.value),getPanelId:t1(`${v}-panel`,rv.value),onTabChange:O,setMountedPanelIds:b,mountedPanelIds:x,allowTabDeactivation:c,variant:u,color:d,radius:m,inverted:h,keepMounted:y,classNames:w,styles:E,unstyled:_}},o)}$I.displayName="@mantine/core/TabsProvider";var TJ=W((e,{orientation:t,placement:r})=>({root:{display:t==="vertical"?"flex":void 0,flexDirection:r==="right"?"row-reverse":"row"}}));const IJ=TJ;var DJ=Object.defineProperty,NJ=Object.defineProperties,AJ=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertySymbols,OI=Object.prototype.hasOwnProperty,CI=Object.prototype.propertyIsEnumerable,pS=(e,t,r)=>t in e?DJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,MJ=(e,t)=>{for(var r in t||(t={}))OI.call(t,r)&&pS(e,r,t[r]);if(mp)for(var r of mp(t))CI.call(t,r)&&pS(e,r,t[r]);return e},zJ=(e,t)=>NJ(e,AJ(t)),LJ=(e,t)=>{var r={};for(var n in e)OI.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&&CI.call(e,n)&&(r[n]=e[n]);return r};const FJ={orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},gt=f.forwardRef((e,t)=>{const r=q("Tabs",FJ,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:w,classNames:E,styles:_,radius:v,inverted:x,keepMounted:b,placement:P}=r,O=LJ(r,["defaultValue","value","orientation","loop","activateTabWithKeyboard","allowTabDeactivation","children","id","onTabChange","variant","color","className","unstyled","classNames","styles","radius","inverted","keepMounted","placement"]),{classes:$,cx:C}=IJ({orientation:a,color:g,radius:v,inverted:x,placement:P},{unstyled:w,name:"Tabs",classNames:E,styles:_,variant:h});return s.createElement($I,{activateTabWithKeyboard:l,defaultValue:n,orientation:a,onTabChange:m,value:o,id:d,loop:i,allowTabDeactivation:c,color:g,variant:h,radius:v,inverted:x,keepMounted:b,placement:P,classNames:E,styles:_,unstyled:w},s.createElement(ue,zJ(MJ({},O),{className:C($.root,y),id:d,ref:t}),u))});gt.List=wI;gt.Tab=PI;gt.Panel=bI;gt.displayName="@mantine/core/Tabs";var VJ=Object.defineProperty,BJ=Object.defineProperties,UJ=Object.getOwnPropertyDescriptors,mS=Object.getOwnPropertySymbols,WJ=Object.prototype.hasOwnProperty,HJ=Object.prototype.propertyIsEnumerable,hS=(e,t,r)=>t in e?VJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,qJ=(e,t)=>{for(var r in t||(t={}))WJ.call(t,r)&&hS(e,r,t[r]);if(mS)for(var r of mS(t))HJ.call(t,r)&&hS(e,r,t[r]);return e},QJ=(e,t)=>BJ(e,UJ(t));function GJ(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 KJ(e,t,r){return typeof e<"u"&&e in r.headings.sizes?r.headings.sizes[e].lineHeight:r.headings.sizes[t].lineHeight}var YJ=W((e,{element:t,weight:r,inline:n},{size:o})=>({root:QJ(qJ({},e.fn.fontStyles()),{fontFamily:e.headings.fontFamily,fontWeight:r||e.headings.sizes[t].fontWeight||e.headings.fontWeight,fontSize:GJ(o,t,e),lineHeight:n?1:KJ(o,t,e),margin:0})}));const XJ=YJ;var JJ=Object.defineProperty,hp=Object.getOwnPropertySymbols,kI=Object.prototype.hasOwnProperty,jI=Object.prototype.propertyIsEnumerable,gS=(e,t,r)=>t in e?JJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ZJ=(e,t)=>{for(var r in t||(t={}))kI.call(t,r)&&gS(e,r,t[r]);if(hp)for(var r of hp(t))jI.call(t,r)&&gS(e,r,t[r]);return e},eZ=(e,t)=>{var r={};for(var n in e)kI.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&&jI.call(e,n)&&(r[n]=e[n]);return r};const tZ={order:1},ce=f.forwardRef((e,t)=>{const r=q("Title",tZ,e),{className:n,order:o,children:a,unstyled:i,size:l,weight:c,inline:u,variant:d}=r,m=eZ(r,["className","order","children","unstyled","size","weight","inline","variant"]),{classes:h,cx:g}=XJ({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,ZJ({variant:d,component:`h${o}`,ref:t,className:g(h.root,n)},m),a):null});ce.displayName="@mantine/core/Title";function nv(e,t){return nv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},nv(e,t)}function RI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nv(e,t)}var TI={exports:{}},rZ="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nZ=rZ,oZ=nZ;function II(){}function DI(){}DI.resetWarningCache=II;var aZ=function(){function e(n,o,a,i,l,c){if(c!==oZ){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:DI,resetWarningCache:II};return r.PropTypes=r,r};TI.exports=aZ();var iZ=TI.exports;const Se=Cv(iZ),vS={disabled:!1},gp=s.createContext(null);var Zl="unmounted",Ea="exited",Sa="entering",wi="entered",ov="exiting",bo=function(e){RI(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=Ea,a.appearStatus=Sa):c=wi:n.unmountOnExit||n.mountOnEnter?c=Zl:c=Ea,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(o,a){var i=o.in;return i&&a.status===Zl?{status:Ea}: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!==Sa&&i!==wi&&(a=Sa):(i===Sa||i===wi)&&(a=ov)}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===Sa?this.performEnter(o):this.performExit()):this.props.unmountOnExit&&this.state.status===Ea&&this.setState({status:Zl})},r.performEnter=function(o){var a=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[xh.findDOMNode(this),l],u=c[0],d=c[1],m=this.getTimeouts(),h=l?m.appear:m.enter;if(!o&&!i||vS.disabled){this.safeSetState({status:wi},function(){a.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Sa},function(){a.props.onEntering(u,d),a.onTransitionEnd(h,function(){a.safeSetState({status:wi},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:xh.findDOMNode(this);if(!a||vS.disabled){this.safeSetState({status:Ea},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:ov},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Ea},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:xh.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===Zl)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=Ky(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return s.createElement(gp.Provider,{value:null},typeof i=="function"?i(o,l):s.cloneElement(s.Children.only(i),l))},t}(s.Component);bo.contextType=gp;bo.propTypes={};function hi(){}bo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:hi,onEntering:hi,onEntered:hi,onExit:hi,onExiting:hi,onExited:hi};bo.UNMOUNTED=Zl;bo.EXITED=Ea;bo.ENTERING=Sa;bo.ENTERED=wi;bo.EXITING=ov;const lZ=bo;function sZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t0(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 cZ(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 Ra(e,t,r){return r[t]!=null?r[t]:e.props[t]}function uZ(e,t){return t0(e.children,function(r){return f.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Ra(r,"appear",e),enter:Ra(r,"enter",e),exit:Ra(r,"exit",e)})})}function dZ(e,t,r){var n=t0(e.children),o=cZ(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:Ra(i,"exit",e),enter:Ra(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:Ra(i,"exit",e),enter:Ra(i,"enter",e)}))}}),o}var fZ=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},pZ={component:"div",childFactory:function(t){return t}},r0=function(e){RI(t,e);function t(n,o){var a;a=e.call(this,n,o)||this;var i=a.handleExited.bind(sZ(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?uZ(o,l):dZ(o,i,l),firstRender:!1}},r.handleExited=function(o,a){var i=t0(this.props.children);o.key in i||(o.props.onExited&&o.props.onExited(a),this.mounted&&this.setState(function(l){var c=Ke({},l.children);return delete c[o.key],{children:c}}))},r.render=function(){var o=this.props,a=o.component,i=o.childFactory,l=Ky(o,["component","childFactory"]),c=this.state.contextValue,u=fZ(this.state.children).map(i);return delete l.appear,delete l.enter,delete l.exit,a===null?s.createElement(gp.Provider,{value:c},u):s.createElement(gp.Provider,{value:c},s.createElement(a,l,u))},t}(s.Component);r0.propTypes={};r0.defaultProps=pZ;const mZ=r0,[hZ,ac]=pN("mantine-notifications"),le=ac("show"),gZ=ac("hide"),vZ=ac("clean"),yZ=ac("cleanQueue"),Mu=ac("update"),Yo={show:le,hide:gZ,clean:vZ,cleanQueue:yZ,update:Mu};function wZ([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 _Z=Object.defineProperty,yS=Object.getOwnPropertySymbols,xZ=Object.prototype.hasOwnProperty,bZ=Object.prototype.propertyIsEnumerable,wS=(e,t,r)=>t in e?_Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_S=(e,t)=>{for(var r in t||(t={}))xZ.call(t,r)&&wS(e,r,t[r]);if(yS)for(var r of yS(t))bZ.call(t,r)&&wS(e,r,t[r]);return e};const xS={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},EZ={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function SZ({state:e,maxHeight:t,positioning:r,transitionDuration:n}){const[o,a]=r,i=a==="center"?`${o}-center`:a,l={opacity:0,maxHeight:t,transform:xS[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:EZ[i]},u={opacity:0,maxHeight:0,transform:xS[i]},d={entering:c,entered:c,exiting:u,exited:u};return _S(_S({},l),d[e])}function PZ(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var $Z=Object.defineProperty,OZ=Object.defineProperties,CZ=Object.getOwnPropertyDescriptors,vp=Object.getOwnPropertySymbols,NI=Object.prototype.hasOwnProperty,AI=Object.prototype.propertyIsEnumerable,bS=(e,t,r)=>t in e?$Z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ES=(e,t)=>{for(var r in t||(t={}))NI.call(t,r)&&bS(e,r,t[r]);if(vp)for(var r of vp(t))AI.call(t,r)&&bS(e,r,t[r]);return e},kZ=(e,t)=>OZ(e,CZ(t)),SS=(e,t)=>{var r={};for(var n in e)NI.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&&AI.call(e,n)&&(r[n]=e[n]);return r};function MI(e){var t=e,{notification:r,autoClose:n,onHide:o,innerRef:a}=t,i=SS(t,["notification","autoClose","onHide","innerRef"]);const l=r,{autoClose:c,message:u}=l,d=SS(l,["autoClose","message"]),m=PZ(n,c),h=f.useRef(),g=()=>{o(r.id),window.clearTimeout(h.current)},y=()=>{clearTimeout(h.current)},w=()=>{typeof m=="number"&&(h.current=window.setTimeout(g,m))};return f.useEffect(()=>{typeof r.onOpen=="function"&&r.onOpen(r)},[]),f.useEffect(()=>(w(),y),[n,r.autoClose]),s.createElement(jT,kZ(ES(ES({},d),i),{onClose:g,onMouseEnter:y,onMouseLeave:w,ref:a}),u)}MI.displayName="@mantine/notifications/NotificationContainer";var jZ=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 RZ=jZ;var TZ=Object.defineProperty,IZ=Object.defineProperties,DZ=Object.getOwnPropertyDescriptors,PS=Object.getOwnPropertySymbols,NZ=Object.prototype.hasOwnProperty,AZ=Object.prototype.propertyIsEnumerable,$S=(e,t,r)=>t in e?TZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,MZ=(e,t)=>{for(var r in t||(t={}))NZ.call(t,r)&&$S(e,r,t[r]);if(PS)for(var r of PS(t))AZ.call(t,r)&&$S(e,r,t[r]);return e},zZ=(e,t)=>IZ(e,DZ(t));function LZ({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||Kp();return n(m=>u.id&&m.some(h=>h.id===u.id)?m:[...m,zZ(MZ({},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 FZ=Object.defineProperty,yp=Object.getOwnPropertySymbols,zI=Object.prototype.hasOwnProperty,LI=Object.prototype.propertyIsEnumerable,OS=(e,t,r)=>t in e?FZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mh=(e,t)=>{for(var r in t||(t={}))zI.call(t,r)&&OS(e,r,t[r]);if(yp)for(var r of yp(t))LI.call(t,r)&&OS(e,r,t[r]);return e},VZ=(e,t)=>{var r={};for(var n in e)zI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yp)for(var n of yp(e))t.indexOf(n)<0&&LI.call(e,n)&&(r[n]=e[n]);return r};const BZ=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"],ri=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=yo("overlay"),style:d,children:m,target:h}=t,g=VZ(t,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children","target"]);const y=BA(),w=f.useRef({}),E=f.useRef(0),{notifications:_,showNotification:v,updateNotification:x,hideNotification:b,clean:P,cleanQueue:O}=LZ({limit:c}),{classes:$,cx:C,theme:R}=RZ({zIndex:u}),j=Xp(),T=(R.respectReducedMotion?j:!1)?1:a,L=(BZ.includes(n)?n:"bottom-right").split("-");hn(()=>{_.length>E.current&&setTimeout(()=>y(),0),E.current=_.length},[_]),hZ({show:v,hide:b,update:x,clean:P,cleanQueue:O});const B=_.map(V=>s.createElement(lZ,{key:V.id,timeout:T,onEnter:()=>w.current[V.id].offsetHeight,nodeRef:{current:w.current[V.id]}},M=>s.createElement(MI,{innerRef:Q=>{w.current[V.id]=Q},notification:V,onHide:b,className:$.notification,autoClose:o,sx:[Mh({},SZ({state:M,positioning:L,transitionDuration:T,maxHeight:l})),...Array.isArray(V.sx)?V.sx:[V.sx]]})));return s.createElement(Iy,{target:h},s.createElement(ue,Mh({className:C($.notifications,r),style:d,sx:Mh({maxWidth:i},wZ(L,R.spacing.md))},g),s.createElement(mZ,null,B)))};ri.displayName="@mantine/notifications/Notifications";ri.show=Yo.show;ri.hide=Yo.hide;ri.update=Yo.update;ri.clean=Yo.clean;ri.cleanQueue=Yo.cleanQueue;var UZ="ok",WZ="created",HZ="gone",qZ="not-modified",QZ="not-found",GZ="forbidden",KZ="accepted",YZ={resourceType:"OperationOutcome",id:QZ,issue:[{severity:"error",code:"not-found",details:{text:"Not found"}}]},XZ={resourceType:"OperationOutcome",id:GZ,issue:[{severity:"error",code:"forbidden",details:{text:"Forbidden"}}]};function Ma(e,t){return{resourceType:"OperationOutcome",issue:[{severity:"error",code:"invalid",details:{text:e},expression:t?[t]:void 0}]}}function Sm(e){return typeof e=="object"&&e!==null&&e.resourceType==="OperationOutcome"}function FI(e){return e.id===UZ||e.id===WZ||e.id===qZ||e.id===KZ}function JZ(e){return e.id===HZ}var Nn=class extends Error{constructor(t,r){super(VI(t)),this.outcome=t,this.cause=r}};function yt(e){return e instanceof Nn?e.outcome:Sm(e)?e:Ma(Oe(e))}function Oe(e){return e?typeof e=="string"?e:e instanceof Error?e.message:Sm(e)?VI(e):typeof e=="object"&&"code"in e&&typeof e.code=="string"?e.code:JSON.stringify(e):"Unknown error"}function VI(e){var r;let t=((r=e.issue)==null?void 0:r.map(ZZ))??[];return t.length>0?t.join("; "):"Unknown error"}function ZZ(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 eee={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 tee(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 ic(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 Pm(e){return e instanceof Date&&!isNaN(e.getTime())}function ree(e,t,r){if(!e)return"";let n=new Date("2000-01-01T"+e+"Z");return Pm(n)?n.toLocaleTimeString(t,r):""}function yr(e,t,r){if(!e)return"";let n=new Date(e);return Pm(n)?n.toLocaleString(t,r):""}function nee(e,t,r){return!e||!e.start&&!e.end?"":yr(e.start,t,r)+" - "+yr(e.end,t,r)}var oee={s:"every second",min:"every minute",h:"hourly",d:"daily",wk:"weekly",mo:"monthly",a:"annually"},aee={s:"second",min:"minute",h:"hour",d:"day",wk:"week",mo:"month",a:"year"},iee={s:"seconds",min:"minutes",h:"hours",d:"days",wk:"weeks",mo:"months",a:"years"};function BI(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(oee[a]):(n===1?t.push("once"):t.push(n+" times"),o===1?t.push("per "+aee[a]):t.push("per "+o+" "+iee[a])),e.repeat.dayOfWeek&&t.push("on "+e.repeat.dayOfWeek.map(_r).join(", ")),e.repeat.timeOfDay&&t.push("at "+e.repeat.timeOfDay.map(i=>ree(i)).join(", "))}return e.event&&t.push(e.event.map(n=>yr(n)).join(", ")),_r(t.join(" ").trim())}function As(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=cee(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=see(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 lee(e){return(e==null?void 0:e.value)===void 0?"":e.value.toLocaleString(void 0,{style:"currency",currency:e.currency??"USD",currencyDisplay:"narrowSymbol"})}function UI(e){return e?e.text?e.text:e.coding?e.coding.map(t=>WI(t)).join(", "):"":""}function WI(e){return(e==null?void 0:e.display)??(e==null?void 0:e.code)??""}function HI(e){return e?"component"in e?e.component.map(t=>HI(t)).join(" / "):e.valueQuantity?No(e.valueQuantity):e.valueCodeableConcept?UI(e.valueCodeableConcept):e.valueString?e.valueString:"":""}function see(e,t,r=1){return(qI(e,t)+r)*Math.pow(10,-t)}function cee(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=mo(e);return r===t?{reference:t}:{reference:t,display:r}}function ot(e){return e.resourceType+"/"+e.id}function QI(e){var t;return(t=e==null?void 0:e.reference)==null?void 0:t.split("/")[1]}function uee(e){return e.resourceType==="Patient"||e.resourceType==="Practitioner"||e.resourceType==="RelatedPerson"}function mo(e){var t;if(uee(e)){let r=dee(e);if(r)return r}if(e.resourceType==="Device"){let r=fee(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 dee(e){let t=e.name;if(t&&t.length>0)return ic(t[0])}function fee(e){let t=e.deviceName;if(t&&t.length>0)return t[0].name}function pee(e){if(!("photo"in e))return;let t=e.photo;if(t)if(Array.isArray(t))for(let r of t){let n=CS(r);if(n)return n}else return CS(t)}function CS(e){if(e.url&&e.contentType&&e.contentType.startsWith("image/"))return e.url}function GI(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 mee(e,t){let{years:r,months:n,days:o}=GI(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 hee(e){let t={};return KI(e.item,t),t}function KI(e,t){if(e)for(let r of e)r.linkId&&r.answer&&r.answer.length>0&&(t[r.linkId]=r.answer[0]),KI(r.item,t)}function wr(e,t){return JSON.stringify(e,gee,t?2:void 0)}function gee(e,t){return!vee(e)&&Ta(t)?void 0:t}function vee(e){return!!/\d+$/.exec(e)}function Ta(e){if(e==null)return!0;let t=typeof e;return t==="string"&&e===""||t==="object"&&Object.keys(e).length===0}function $m(e,t,r){return e===t||Ta(e)&&Ta(t)?!0:Ta(e)||Ta(t)?!1:Array.isArray(e)&&Array.isArray(t)?yee(e,t):Array.isArray(e)||Array.isArray(t)?!1:kS(e)&&kS(t)?wee(e,t,r):!1}function yee(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!$m(e[r],t[r]))return!1;return!0}function wee(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(!$m(a,i,o))return!1}return!0}function yl(e){return JSON.parse(JSON.stringify(e))}function YI(e){return!!/^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/i.exec(e)}function kS(e){return e!==null&&typeof e=="object"}var XI=[];for(let e=0;e<256;e++)XI.push(e.toString(16).padStart(2,"0"));function _ee(e){let t=new Uint8Array(e),r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=XI[t[n]];return r.join("")}function xee(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 _r(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 jS=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 Eee(e){var r;if(!e.name)return;let t=(r=e.snapshot)==null?void 0:r.element;t&&(t.forEach(n=>See(e,n)),t.forEach(n=>Pee(e,n)))}function See(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=Ha(o),i=St.types[a];i||(St.types[a]=i={}),i.parentType=i.parentType??Ha(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 Pee(e,t){let r=t.path.split(".");if(r.length===1)return;r[0]=e.name;let n=Ha(r.slice(0,r.length-1)),o=St.types[n];if(!o)return;let a=r[r.length-1];o.properties[a]=t}function $ee(e){for(let t of e.base??[]){let r=St.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 JI(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"?Ha((o=e.path)==null?void 0:o.split(".")):t}function Ha(e){return e.length===1?e[0]:e.map(_r).join("")}function wp(e){return e.replaceAll("[x]","").split(".").pop().split(/(?=[A-Z])/).map(Cee).join(" ").replace("_"," ").replace(/\s+/g," ")}var Oee=new Set(["ID","IP","PKCE","JWKS","URI","URL"]);function Cee(e){let t=e.toUpperCase();return Oee.has(t)?t:t.charAt(0)+e.slice(1)}function n0(e,t){let r=St.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=Ha(o);return n0(i,a)}return n}}function Eo(e){return!!(e&&typeof e=="object"&&"resourceType"in e)}function Om(e){return!!(e&&typeof e=="object"&&"reference"in e)}var St=eee,lc=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||{}),ZI={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"},o0={eq:"eq",ne:"ne",lt:"lt",le:"le",gt:"gt",ge:"ge",sa:"sa",eb:"eb",ap:"ap"};function kee(e){let t=e.pathname.split("/").filter(Boolean).pop();return Ree(t,e.searchParams.entries())}function jee(e){return kee(new URL(e,"https://example.com/"))}function Ree(e,t){let r={resourceType:e};for(let[n,o]of t)Tee(r,n,o);return r}function Tee(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":Iee(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=RS(r);o==="iterate"&&(c.modifier="iterate"),e.include?e.include.push(c):e.include=[c];break}case"_revinclude":{let c=RS(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=St.types[e.resourceType])==null?void 0:i.searchParams)==null?void 0:l[n];c?Dee(e,c,o,r):zee(e,n,o,r)}}}function Iee(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 Dee(e,t,r,n){if(r==="missing"){sc(e,{code:t.code,operator:"missing",value:n});return}switch(t.type){case"number":case"date":Nee(e,t,n);break;case"reference":case"string":case"token":case"uri":Aee(e,t,r,n);break;case"quantity":Mee(e,t,n);break}}function Nee(e,t,r){let{operator:n,value:o}=e5(r);sc(e,{code:t.code,operator:n,value:o})}function Aee(e,t,r,n){sc(e,{code:t.code,operator:Lee(r),value:n})}function Mee(e,t,r){let[n,o,a]=r.split("|"),{operator:i,value:l}=e5(n);sc(e,{code:t.code,operator:i,value:l,unitSystem:o,unitCode:a})}function zee(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 o0&&(n.length===2||(a=n.at(2))!=null&&a.match(/\d/))&&(o=i,n=n.substring(i.length))}sc(e,{code:t,operator:o,value:n})}function e5(e){let t=e.substring(0,2),r=o0[t];return r?{operator:r,value:e.substring(2)}:{operator:"eq",value:e}}function Lee(e){return ZI[e]??"eq"}function RS(e){let t=e.split(":");if(t.forEach(r=>{if(r==="*")throw new Nn(Ma("'*' is not supported as a value for search inclusion parameters"))}),t.length===1)throw new Nn(Ma(`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 Nn(Ma(`Invalid include value '${e}'`))}function sc(e,t){e.filters?e.filters.push(t):e.filters=[t]}function Di(e){let t=[];return e.fields&&t.push("_fields="+e.fields.join(",")),e.filters&&e.filters.forEach(r=>t.push(Fee(r))),e.sortRules&&e.sortRules.length>0&&t.push(Vee(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(TS("_include",r))),e.revInclude&&e.revInclude.forEach(r=>t.push(TS("_revinclude",r))),t.length===0?"":(t.sort((r,n)=>r.localeCompare(n)),"?"+t.join("&"))}function Fee(e){let t=e.operator in ZI?":"+e.operator:"",r=e.operator!=="eq"&&e.operator in o0?e.operator:"";return`${e.code}${t}=${r}${encodeURIComponent(e.value)}`}function Vee(e){return"_sort="+e.map(t=>t.descending?"-"+t.code:t.code).join(",")}function TS(e,t){return e+"="+t.resourceType+":"+t.searchParam+(t.targetType?":"+t.targetType:"")}var Bee=class{constructor(e,t){this.operator=e,this.child=t}toString(){return`${this.operator}(${this.child.toString()})`}},cc=class{constructor(e,t,r){this.operator=e,this.left=t,this.right=r}toString(){return`${this.left.toString()} ${this.operator} ${this.right.toString()}`}},Uee=class{constructor(){this.prefixParselets={},this.infixParselets={}}registerInfix(t,r){return this.infixParselets[t]=r,this}registerPrefix(t,r){return this.prefixParselets[t]=r,this}prefix(t,r,n){return this.registerPrefix(t,{parse(o,a){let i=o.consumeAndParse(r);return n(a,i)}})}infixLeft(t,r,n){return this.registerInfix(t,{parse(o,a,i){let l=o.consumeAndParse(r);return n(a,i,l)},precedence:r})}construct(t){return new Wee(t,this.prefixParselets,this.infixParselets)}},Wee=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]}},Hee=["year","years","month","months","week","weeks","day","days","hour","hours","minute","minutes","second","seconds","millisecond","milliseconds"],qee=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"&&Hee.includes(e.value)))}function zu(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 Wn(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}:Jr(e)?{type:"Quantity",value:e}:Eo(e)?{type:e.resourceType,value:e}:{type:"BackboneElement",value:e}}function Vo(e){return e.length===0?!1:!!e[0].value}function ho(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 lo(e,t){if(!e.value)return;let r=n0(e.type,t);return r?Gee(e,t,r):Kee(e,t)}function Gee(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]","")+_r(l.code);if(c in e.value){o=e.value[c],a=l.code;break}}if(!Ta(o))return(a==="Element"||a==="BackboneElement")&&(a=Ha((i=r.path)==null?void 0:i.split("."))),Array.isArray(o)?o.map(l=>IS(l,a)):IS(o,a)}function IS(e,t){return t==="Resource"&&Eo(e)&&(t=e.resourceType),{type:t,value:e}}function Kee(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+_r(o);if(a in r){n=r[a];break}}if(!Ta(n))return Array.isArray(n)?n.map(Wn):Wn(n)}function t5(e){let t=[];for(let r of e){let n=!1;for(let o of t)if(Vo(o5(r,o))){n=!0;break}n||t.push(r)}return t}function r5(e){return ve(!Vo(e))}function n5(e,t){return e.length===0||t.length===0?[]:e.length!==t.length?ve(!1):ve(e.every((r,n)=>Vo(o5(r,t[n]))))}function o5(e,t){let r=e.value,n=t.value;return typeof r=="number"&&typeof n=="number"?ve(Math.abs(r-n)<1e-8):Jr(r)&&Jr(n)?ve(l5(r,n)):ve(typeof r=="object"&&typeof n=="object"?a0(e,t):r===n)}function a5(e,t){return e.length===0&&t.length===0?ve(!0):e.length!==t.length?ve(!1):(e.sort(DS),t.sort(DS),ve(e.every((r,n)=>Vo(Yee(r,t[n])))))}function Yee(e,t){let r=e.value,n=t.value;return typeof r=="number"&&typeof n=="number"?ve(Math.abs(r-n)<.01):Jr(r)&&Jr(n)?ve(l5(r,n)):ve(typeof r=="object"&&typeof n=="object"?a0(r,n):typeof r=="string"&&typeof n=="string"?r.toLowerCase()===n.toLowerCase():r===n)}function DS(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 i5(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 Xee(r);case"Quantity":return Jr(r);default:return typeof r=="object"&&(r==null?void 0:r.resourceType)===t}}function Xee(e){return!!(e&&typeof e=="object"&&"start"in e)}function Jr(e){return!!(e&&typeof e=="object"&&"value"in e&&typeof e.value=="number")}function l5(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 a0(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(NS(a)&&NS(i)){if(!a0(a,i))return!1}else if(a!==i)return!1}return!0}function NS(e){return e!==null&&typeof e=="object"}var Vl=()=>[],sr={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:Vl,supersetOf:Vl,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===sr.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:Vl,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 t5([...t,...n])},combine:(e,t,r)=>{if(!r)return t;let n=r.eval(e,t);return[...t,...n]},htmlChecks:(e,t,r)=>[Wn(!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}]=Rn(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(sr.toBoolean(e,t).length===1),toInteger:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Rn(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(sr.toInteger(e,t).length===1),toDate:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Rn(t,1);return typeof r=="string"&&/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r)?[{type:"date",value:zu(r)}]:[]},convertsToDate:(e,t)=>t.length===0?[]:ve(sr.toDate(e,t).length===1),toDateTime:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Rn(t,1);return typeof r=="string"&&/^\d{4}(-\d{2}(-\d{2})?)?/.exec(r)?[{type:"dateTime",value:zu(r)}]:[]},convertsToDateTime:(e,t)=>t.length===0?[]:ve(sr.toDateTime(e,t).length===1),toDecimal:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Rn(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(sr.toDecimal(e,t).length===1),toQuantity:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Rn(t,1);return Jr(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(sr.toQuantity(e,t).length===1),toString:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Rn(t,1);return r==null?[]:Jr(r)?[{type:"string",value:`${r.value} '${r.unit}'`}]:[{type:"string",value:r.toString()}]},convertsToString:(e,t)=>t.length===0?[]:ve(sr.toString(e,t).length===1),toTime:(e,t)=>{if(t.length===0)return[];let[{value:r}]=Rn(t,1);if(typeof r=="string"){let n=/^T?(\d{2}(:\d{2}(:\d{2})?)?)/.exec(r);if(n)return[{type:"time",value:zu("T"+n[1])}]}return[]},convertsToTime:(e,t)=>t.length===0?[]:ve(sr.toTime(e,t).length===1),indexOf:(e,t,r)=>Hr((n,o)=>n.indexOf(o),e,t,r),substring:(e,t,r,n)=>Hr((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)=>Hr((n,o)=>n.startsWith(o),e,t,r),endsWith:(e,t,r)=>Hr((n,o)=>n.endsWith(o),e,t,r),contains:(e,t,r)=>Hr((n,o)=>n.includes(o),e,t,r),upper:(e,t)=>Hr(r=>r.toUpperCase(),e,t),lower:(e,t)=>Hr(r=>r.toLowerCase(),e,t),replace:(e,t,r,n)=>Hr((o,a,i)=>o.replaceAll(a,i),e,t,r,n),matches:(e,t,r)=>Hr((n,o)=>!!n.match(o),e,t,r),replaceMatches:(e,t,r,n)=>Hr((o,a,i)=>o.replaceAll(a,i),e,t,r,n),length:(e,t)=>Hr(r=>r.length,e,t),toChars:(e,t)=>Hr(r=>r?r.split(""):void 0,e,t),abs:(e,t)=>Cn(Math.abs,e,t),ceiling:(e,t)=>Cn(Math.ceil,e,t),exp:(e,t)=>Cn(Math.exp,e,t),floor:(e,t)=>Cn(Math.floor,e,t),ln:(e,t)=>Cn(Math.log,e,t),log:(e,t,r)=>Cn((n,o)=>Math.log(n)/Math.log(o),e,t,r),power:(e,t,r)=>Cn(Math.pow,e,t,r),round:(e,t)=>Cn(Math.round,e,t),sqrt:(e,t)=>Cn(Math.sqrt,e,t),truncate:(e,t)=>Cn(r=>r|0,e,t),children:Vl,descendants:Vl,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=sr.toDateTime(e,r.eval(e,t));if(a.length===0)throw new Error("Invalid start date");let i=sr.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:GI(a[0].value,i[0].value)[l],unit:l}}]},is:(e,t,r)=>{let n="";return r instanceof i0?n=r.name:r instanceof s0&&(n=r.left.name+"."+r.right.name),n?t.map(o=>({type:"boolean",value:i5(o,n)})):[]},not:(e,t)=>sr.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 Wn(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"}}:Eo(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 Hr(e,t,r,...n){if(r.length===0)return[];let[{value:o}]=Rn(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(Wn):[Wn(a)]}function Cn(e,t,r,...n){if(r.length===0)return[];let[{value:o}]=Rn(r,1),a=Jr(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 Rn(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 Jee=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()}},gi=class{constructor(e){this.value=e}eval(){return[this.value]}toString(){let e=this.value.value;return typeof e=="string"?`'${e}'`:e.toString()}},i0=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 Eo(t)&&t.resourceType===this.name?e:lo(e,this.name)}toString(){return this.name}},Zee=class{eval(){return[]}toString(){return"{}"}},ete=class extends Bee{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()}},l0=class extends cc{constructor(e,t){super("as",e,t)}eval(e,t){return sr.ofType(e,this.left.eval(e,t),this.right)}},br=class extends cc{},cn=class extends br{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=Jr(o)?o.value:o,l=Jr(a)?a.value:a,c=this.impl(i,l);return typeof c=="boolean"?ve(c):Jr(o)?[{type:"Quantity",value:{...o,value:c}}]:[Wn(c)]}},tte=class extends cc{constructor(e,t){super("&",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t),o=[...r,...n];return o.length>0&&o.every(a=>typeof a.value=="string")?[{type:"string",value:o.map(a=>a.value).join("")}]:o}},rte=class extends br{constructor(e,t){super("contains",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return ve(r.some(o=>o.value===n[0].value))}},nte=class extends br{constructor(e,t){super("in",e,t)}eval(e,t){let r=ho(this.left.eval(e,t)),n=this.right.eval(e,t);return r?ve(n.some(o=>o.value===r.value)):[]}},s0=class extends cc{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()}`}},s5=class extends cc{constructor(e,t){super("|",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return t5([...r,...n])}},ote=class extends br{constructor(e,t){super("=",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return n5(r,n)}},ate=class extends br{constructor(t,r){super("!=",t,r)}eval(t,r){let n=this.left.eval(t,r),o=this.right.eval(t,r);return r5(n5(n,o))}},ite=class extends br{constructor(e,t){super("~",e,t)}eval(e,t){let r=this.left.eval(e,t),n=this.right.eval(e,t);return a5(r,n)}},lte=class extends br{constructor(t,r){super("!~",t,r)}eval(t,r){let n=this.left.eval(t,r),o=this.right.eval(t,r);return r5(a5(n,o))}},c0=class extends br{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(i5(r[0],n))}},ste=class extends br{constructor(t,r){super("and",t,r)}eval(t,r){let n=ho(this.left.eval(t,r),"boolean"),o=ho(this.right.eval(t,r),"boolean");return(n==null?void 0:n.value)===!0&&(o==null?void 0:o.value)===!0?ve(!0):(n==null?void 0:n.value)===!1||(o==null?void 0:o.value)===!1?ve(!1):[]}},cte=class extends br{constructor(e,t){super("or",e,t)}eval(e,t){let r=ho(this.left.eval(e,t),"boolean"),n=ho(this.right.eval(e,t),"boolean");return(r==null?void 0:r.value)===!1&&(n==null?void 0:n.value)===!1?ve(!1):r!=null&&r.value||n!=null&&n.value?ve(!0):[]}},ute=class extends br{constructor(t,r){super("xor",t,r)}eval(t,r){let n=ho(this.left.eval(t,r),"boolean"),o=ho(this.right.eval(t,r),"boolean");return!n||!o?[]:ve(n.value!==o.value)}},dte=class extends br{constructor(e,t){super("implies",e,t)}eval(e,t){let r=ho(this.left.eval(e,t),"boolean"),n=ho(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)}},u0=class{constructor(e,t){this.name=e,this.args=t}eval(e,t){let r=sr[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(", ")})`}},d0=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()}]`}},fte=["true","false"],f0=["!=","!~","<=",">=","{}","->"];function pte(e){return new qee(e,fte,f0).tokenize()}var Me={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},mte={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}},hte={parse(e,t){let r=e.consumeAndParse();if(!e.match("]"))throw new Error("Parse error: expected `]`");return new d0(t,r)},precedence:Me.Indexer},gte={parse(e,t){if(!(t instanceof i0))throw new Error("Unexpected parentheses");let r=[];for(;!e.match(")");)r.push(e.consumeAndParse()),e.match(",");return new u0(t.name,r)},precedence:Me.FunctionCall};function vte(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 p0(){return new Uee().registerPrefix("String",{parse:(e,t)=>new gi({type:"string",value:t.value})}).registerPrefix("DateTime",{parse:(e,t)=>new gi({type:"dateTime",value:zu(t.value)})}).registerPrefix("Quantity",{parse:(e,t)=>new gi({type:"Quantity",value:vte(t.value)})}).registerPrefix("Number",{parse:(e,t)=>new gi({type:"decimal",value:parseFloat(t.value)})}).registerPrefix("true",{parse:()=>new gi({type:"boolean",value:!0})}).registerPrefix("false",{parse:()=>new gi({type:"boolean",value:!1})}).registerPrefix("Symbol",{parse:(e,t)=>new i0(t.value)}).registerPrefix("{}",{parse:()=>new Zee}).registerPrefix("(",mte).registerInfix("[",hte).registerInfix("(",gte).prefix("+",Me.UnaryAdd,(e,t)=>new ete("+",t,r=>r)).prefix("-",Me.UnarySubtract,(e,t)=>new cn("-",t,t,(r,n)=>-n)).infixLeft(".",Me.Dot,(e,t,r)=>new s0(e,r)).infixLeft("/",Me.Divide,(e,t,r)=>new cn("/",e,r,(n,o)=>n/o)).infixLeft("*",Me.Multiply,(e,t,r)=>new cn("*",e,r,(n,o)=>n*o)).infixLeft("+",Me.Add,(e,t,r)=>new cn("+",e,r,(n,o)=>n+o)).infixLeft("-",Me.Subtract,(e,t,r)=>new cn("-",e,r,(n,o)=>n-o)).infixLeft("|",Me.Union,(e,t,r)=>new s5(e,r)).infixLeft("=",Me.Equals,(e,t,r)=>new ote(e,r)).infixLeft("!=",Me.NotEquals,(e,t,r)=>new ate(e,r)).infixLeft("~",Me.Equivalent,(e,t,r)=>new ite(e,r)).infixLeft("!~",Me.NotEquivalent,(e,t,r)=>new lte(e,r)).infixLeft("<",Me.LessThan,(e,t,r)=>new cn("<",e,r,(n,o)=>n<o)).infixLeft("<=",Me.LessThanOrEquals,(e,t,r)=>new cn("<=",e,r,(n,o)=>n<=o)).infixLeft(">",Me.GreaterThan,(e,t,r)=>new cn(">",e,r,(n,o)=>n>o)).infixLeft(">=",Me.GreaterThanOrEquals,(e,t,r)=>new cn(">=",e,r,(n,o)=>n>=o)).infixLeft("&",Me.Ampersand,(e,t,r)=>new tte(e,r)).infixLeft("and",Me.And,(e,t,r)=>new ste(e,r)).infixLeft("as",Me.As,(e,t,r)=>new l0(e,r)).infixLeft("contains",Me.Contains,(e,t,r)=>new rte(e,r)).infixLeft("div",Me.Divide,(e,t,r)=>new cn("div",e,r,(n,o)=>n/o|0)).infixLeft("in",Me.In,(e,t,r)=>new nte(e,r)).infixLeft("is",Me.Is,(e,t,r)=>new c0(e,r)).infixLeft("mod",Me.Modulo,(e,t,r)=>new cn("mod",e,r,(n,o)=>n%o)).infixLeft("or",Me.Or,(e,t,r)=>new cte(e,r)).infixLeft("xor",Me.Xor,(e,t,r)=>new ute(e,r)).infixLeft("implies",Me.Implies,(e,t,r)=>new dte(e,r))}var yte=p0();function c5(e){return new Jee(e,yte.construct(pte(e)).consumeAndParse())}function wte(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]=Wn(r[n]))}return u5(e,r).map(n=>n.value)}function u5(e,t,r){let n=r||{};return c5(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 m0(e,t){var n;let r=(n=St.types[e].searchParamsDetails)==null?void 0:n[t.code];return r||(r=xte(e,t)),r}function _te(e,t,r){let n=St.types[e];n.searchParamsDetails||(n.searchParamsDetails={}),n.searchParamsDetails[t]=r}function xte(e,t){let r=t.code,n=Ste(r),o=$te(e,t.expression),a={elementDefinitions:[],propertyTypes:new Set,array:!1};for(let l of o){let c=fs(l);c.length===1&&c[0]instanceof br?a.propertyTypes.add("boolean"):d5(a,fs(l),e,1)}let i={columnName:n,type:Pte(t,a.propertyTypes),elementDefinitions:a.elementDefinitions,array:a.array};return _te(e,r,i),i}function d5(e,t,r,n){var u;let o=t[n];if(o instanceof l0){e.propertyTypes.add(o.right.toString());return}if(o instanceof u0){bte(e,o);return}let a=o.toString(),i=n0(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 d0&&(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;Ete(m)&&(m=Ha((u=i.path)==null?void 0:u.split("."))),d5(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 c0){e.propertyTypes.add(t.args[0].right.toString());return}throw new Error(`Unhandled FHIRPath function: ${t.name}`)}function Ete(e){return e==="Element"||e==="BackboneElement"}function Ste(e){return e.split("-").reduce((t,r,n)=>t+(n?_r(r):r),"")}function Pte(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 $te(e,t){let r=[],n=c5(t);return av(e,n.child,r),r}function av(e,t,r){t instanceof s5?(av(e,t.left,r),av(e,t.right,r)):t.toString().startsWith(e+".")&&r.push(t)}function fs(e){return e instanceof l0||e instanceof d0?[fs(e.left),e].flat():e instanceof br?[e]:e instanceof s0?[fs(e.left),fs(e.right)].flat():e instanceof u0&&e.name==="where"&&!(e.args[0]instanceof c0)?[]:[e]}function Ote(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 Cte(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 AS(){let e=new Uint32Array(28);return crypto.getRandomValues(e),_ee(e.buffer)}async function kte(e){return crypto.subtle.digest("SHA-256",new TextEncoder().encode(e))}function jte(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function f5(e){var o,a,i;let t={};e=yl(e);for(let l of e.entry||[]){(o=l.resource)==null||delete o.meta;let c=(a=l.resource)==null?void 0:a.id;c&&(t[c]=jte(),l.fullUrl="urn:uuid:"+t[c],(i=l.resource)==null||delete i.id)}let r=e.entry,n=JSON.stringify({resourceType:"Bundle",type:"transaction",entry:r==null?void 0:r.map(l=>({fullUrl:l.fullUrl,request:{method:"POST",url:l.resource.resourceType},resource:l.resource}))},(l,c)=>Rte(l,c,t),2);return Tte(JSON.parse(n))}function Rte(e,t,r){if(e==="reference"&&typeof t=="string"){let n;if(t.includes("/")?n=t.split("/")[1]:t.startsWith("urn:uuid:")&&(n=t.slice(9)),n)return"urn:uuid:"+r[n]}return t}function Tte(e){let t=Dte(e),{sorted:r,cycles:n}=Ite(t),o={};for(let i of e.entry||[])i.fullUrl&&(o[i.fullUrl]=i);let a=r.map(i=>o[i]);for(let i of n)for(let l of i){let c=o[l],u={...c,request:{...c.request,method:"PUT"}};a.push(u)}return{...e,entry:a}}function Ite(e){let t=[],r={},n=[];for(let a of Object.keys(e))r[a]=0;function o(a,i){if(r[a]===2)return!0;if(r[a]===1){let c=i.lastIndexOf(a);return c!==-1&&n.push(i.slice(c)),!0}r[a]=1,i.push(a);let l=!1;for(let c of e[a])o(c,i)||(l=!0);return r[a]=2,i.pop(),t.unshift(a),!l}for(let a in e)r[a]===0&&o(a,[]);return{sorted:t,cycles:n}}function p5(e,t){for(let r in e)if(e[r]&&typeof e[r]=="object"){let n=e[r];if(Om(n)){let o=n.reference;o.startsWith("urn:uuid:")&&t(o)}else p5(n,t)}}function Dte(e){let t={};for(let r of e.entry||[])r.fullUrl&&(t[r.fullUrl]=[]);for(let r of e.entry||[]){let n=r.fullUrl;r.resource&&p5(r.resource,o=>{t[o]&&t[o].push(n)})}return t}var Nte=class{constructor(t=10){this.max=t,this.cache=new Map}clear(){this.cache.clear()}get(t){let r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){this.cache.has(t)?this.cache.delete(t):this.cache.size>=this.max&&this.cache.delete(this.first()),this.cache.set(t,r)}delete(t){this.cache.delete(t)}keys(){return this.cache.keys()}first(){return this.cache.keys().next().value}},Pa={CSS:"text/css",FAVICON:"image/vnd.microsoft.icon",FHIR_JSON:"application/fhir+json",FORM_URL_ENCODED:"application/x-www-form-urlencoded",HL7_V2:"x-application/hl7-v2+er7",HTML:"text/html",JAVASCRIPT:"text/javascript",JSON:"application/json",JSON_PATCH:"application/json-patch+json",PNG:"image/png",SVG:"image/svg+xml",TEXT:"text/plain",TYPESCRIPT:"text/typescript"},Ate=class{constructor(){this.listeners={}}addEventListener(t,r){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(r)}removeEventListener(t,r){let n=this.listeners[t];if(n){for(let o=0;o<n.length;o++)if(n[o]===r){n.splice(o,1);return}}}dispatchEvent(t){let r=this.listeners[t.type];return r&&r.forEach(n=>n.call(this,t)),!t.defaultPrevented}};function Mte(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=Ote(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 m5(e){let[t,r,n]=e.split(".");return Mte(r)}function zte(e){try{return typeof m5(e).login_id=="string"}catch{return!1}}var h5,Xn=class{constructor(e){this[h5]="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)}};h5=Symbol.toStringTag;var Lte=class{constructor(){this.storage=typeof localStorage<"u"?localStorage:new Fte}clear(){this.storage.clear()}getString(e){return this.storage.getItem(e)??void 0}setString(e,t){t?this.storage.setItem(e,t):this.storage.removeItem(e)}getObject(e){let t=this.getString(e);return t?JSON.parse(t):void 0}setObject(e,t){this.setString(e,t?wr(t):void 0)}},Fte=class{constructor(){this.data=new Map}get length(){return this.data.size}clear(){this.data.clear()}getItem(e){return this.data.get(e)??null}setItem(e,t){t?this.data.set(e,t):this.data.delete(e)}removeItem(e){this.data.delete(e)}key(e){return Array.from(this.data.keys())[e]}},Vte="2.0.29-dd02a16",Bte="https://api.medplum.com/",Ute=1e3,Wte=6e4,MS={resourceType:"Device",id:"system",deviceName:[{name:"System"}]},Hte=(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))(Hte||{}),qte=(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))(qte||{}),Qte=class extends Ate{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)??Gte(),this.storage=(t==null?void 0:t.storage)??new Lte,this.createPdfImpl=t==null?void 0:t.createPdf,this.baseUrl=LS(t==null?void 0:t.baseUrl)??Bte,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)??Wte,this.cacheTime>0?this.requestCache=new Nte((t==null?void 0:t.resourceCacheSize)??Ute):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({type:"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 Xn(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,Pa.JSON_PATCH),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 Xn((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 Xn(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 Xn(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 Xn(Promise.reject(new Error("Missing reference")));if(n==="system")return new Xn(Promise.resolve(MS));let[o,a]=n.split("/");return!o||!a?new Xn(Promise.reject(new Error("Invalid reference"))):this.readResource(o,a,r)}getSchema(){return St}requestSchema(t){if(t in St.types)return Promise.resolve(St);let r=t+"-requestSchema",n=this.getCacheEntry(r,void 0);if(n)return n.value;let o=new Xn((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)Eee(l);for(let l of i.data.SearchParameterList)$ee(l);return St})());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,Pa.JSON,r)}graphql(t,r,n,o){return this.post(this.fhirUrl("$graphql"),{query:t,operationName:r,variables:n},Pa.JSON,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=zte(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({type:"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 Xn(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 Nn(YZ);let i;if(a)try{i=await t.json()}catch(c){throw console.error("Error parsing response",t.status,c),c}else i=await t.text();if(t.status>=400)throw new Nn(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 jS(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 jS(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 Nn(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&&!FI(c.response.outcome)?l.reject(new Nn(c.response.outcome)):l.resolve(c==null?void 0:c.resource)}}addFetchOptionsDefaults(t){let r=t.headers;r||(r={},t.headers=r),r.Accept=Pa.FHIR_JSON,r["X-Medplum"]="extended",t.body&&!r["Content-Type"]&&(r["Content-Type"]=Pa.FHIR_JSON),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=AS();sessionStorage.setItem("pkceState",t);let r=AS();sessionStorage.setItem("codeVerifier",r);let n=await kte(r),o=xee(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=Cte(t+":"+r)}async invite(t,r){return this.post("admin/projects/"+t+"/invite",r)}async fetchTokens(t){let r={method:"POST",headers:{"Content-Type":Pa.FORM_URL_ENCODED},body:t.toString(),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 Nn(Ma(i.error_description))}catch(i){throw new Nn(Ma("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=m5(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({type:"offline"}),t>=r-1)throw n}};function Gte(){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(Sm(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})}[...f0];p0().registerInfix("->",{precedence:Me.Arrow}).registerInfix(";",{precedence:Me.Semicolon});[...f0];p0();function Kte(e){let t=e.value;return t?s.createElement(s.Fragment,null,tee(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 Yte(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(mt,{"data-testid":"address-use",defaultValue:t.use,onChange:h=>a(h.currentTarget.value),data:["","home","work","temp","old","billing"]}),s.createElement(mt,{"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 g5=f.createContext(void 0);function Xte(e){let t=e.medplum,r=e.navigate??Jte,[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(){le({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(g5.Provider,{value:a},e.children)}function Cm(){return f.useContext(g5)}function te(){return Cm().medplum}function km(){return Cm().navigate}function v5(){return Cm().profile}function Jte(e){window.location.assign(e)}function Zte(e){let t=v5(),[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 ere={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"},tre=Object.defineProperty,rre=Object.defineProperties,nre=Object.getOwnPropertyDescriptors,_p=Object.getOwnPropertySymbols,y5=Object.prototype.hasOwnProperty,w5=Object.prototype.propertyIsEnumerable,WS=(e,t,r)=>t in e?tre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HS=(e,t)=>{for(var r in t||(t={}))y5.call(t,r)&&WS(e,r,t[r]);if(_p)for(var r of _p(t))w5.call(t,r)&&WS(e,r,t[r]);return e},ore=(e,t)=>rre(e,nre(t)),are=(e,t)=>{var r={};for(var n in e)y5.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_p)for(var n of _p(e))t.indexOf(n)<0&&w5.call(e,n)&&(r[n]=e[n]);return r},Pe=(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=are(i,["color","size","stroke","children"]);return f.createElement("svg",HS(ore(HS({ref:a},ere),{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:Se.string,size:Se.oneOfType([Se.string,Se.number]),stroke:Se.oneOfType([Se.string,Se.number])},n.displayName=`${t}`,n},ire=Pe("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"}]]),h0=Pe("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"}]]),lre=Pe("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"}]]),sre=Pe("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"}]]),cre=Pe("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"}]]),ure=Pe("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"}]]),dre=Pe("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"}]]),fre=Pe("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"}]]),_a=Pe("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"}]]),pre=Pe("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),mre=Pe("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"}]]),hre=Pe("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),xp=Pe("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"}]]),g0=Pe("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"}]]),_5=Pe("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"}]]),gre=Pe("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"}]]),vre=Pe("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"}]]),yre=Pe("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"}]]),wre=Pe("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"}]]),jm=Pe("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"}]]),Rm=Pe("equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]),_re=Pe("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"}]]),xre=Pe("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"}]]),bre=Pe("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"}]]),Ere=Pe("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"}]]),Sre=Pe("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"}]]),x5=Pe("math-greater","IconMathGreater",[["path",{d:"M5 18l14 -6l-14 -6",key:"svg-0"}]]),b5=Pe("math-lower","IconMathLower",[["path",{d:"M19 18l-14 -6l14 -6",key:"svg-0"}]]),Pre=Pe("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"}]]),$re=Pe("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"}]]),Ore=Pe("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"}]]),Cre=Pe("plus","IconPlus",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]]),kre=Pe("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"}]]),iv=Pe("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"}]]),v0=Pe("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"}]]),y0=Pe("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"}]]),jre=Pe("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"}]]),Rre=Pe("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"}]]),Tre=Pe("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"}]]),E5=Pe("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"}]]),Ire=Pe("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),S5=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(Ys,{icon:s.createElement(h0,{size:16}),title:"Something went wrong",color:"red"},Oe(this.state.error)):this.props.children}};function oa(){return s.createElement(Xt,{style:{width:"100%",height:"100vh"}},s.createElement(qn,null))}function w0(e){let t=e.value;return t?s.createElement(s.Fragment,null,ic(t,e.options)):null}function vt(e){e.preventDefault(),e.stopPropagation()}function P5(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 je(e){let t=km(),{to:r,suffix:n,label:o,onClick:a,children:i,...l}=e,c=Dre(r);return n&&(c+="/"+n),s.createElement(dt,{href:c,"aria-label":o,onClick:u=>{vt(u),a?a(u):r&&t(c)},...l},i)}function Dre(e){if(e){if(typeof e=="string")return Nre(e);if(Eo(e))return Are(e);if(Om(e))return Mre(e)}return"#"}function Nre(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:"/"+e}function Are(e){return`/${e.resourceType}/${e.id}`}function Mre(e){return`/${e.reference}`}function Ye(e,t){let r=te(),[n,o]=f.useState(QS(r,e)),a=f.useCallback(i=>{$m(i,n)||o(i)},[n,o]);return f.useEffect(()=>{a(QS(r,e))},[r,e,a]),f.useEffect(()=>{let i=!0;return Om(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(Eo(t))return t;if(Om(t))return e.getCachedReference(t)}}function aa(e){let t=Ye(e.value),r=t?mo(t):e.alt??"",n=(t&&pee(t))??e.src,o=e.radius??"xl",a={...e};return delete a.value,delete a.link,e.link?s.createElement(je,{to:t},s.createElement(tf,{src:n,alt:r,radius:o,...a})):s.createElement(tf,{src:n,alt:r,radius:o,...a})}function _0(e){let{defaultValue:t,toKey:r,toOption:n,loadOptions:o,onChange:a,onCreate:i,creatable:l,...c}=e,u=zre(t),d=f.useRef(null),[m,h]=f.useState(void 0),[g,y]=f.useState(),[w,E]=f.useState(),[_,v]=f.useState(),[x,b]=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=w;let j=f.useRef();j.current=_;let k=f.useRef();k.current=P;let T=f.useCallback(()=>{var H;y(void 0);let A=((H=d.current)==null?void 0:H.value.trim())||"";if(A===$.current)return;h(A);let z=new AbortController;E(z),o(A,z.signal).then(ie=>{z.signal.aborted||(O(ie.map(n)),E(void 0),j.current&&(ie.length>0&&a(ie.slice(0,1)),v(!1)))}).catch(ie=>{z.signal.aborted||ie.message.includes("aborted")||le({color:"red",message:Oe(ie)})})},[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]),B=f.useCallback(A=>{var ie;let z=[],H=[];for(let we of A){let Ie=(ie=k.current)==null?void 0:ie.find(He=>He.value===we),de=Ie==null?void 0:Ie.resource;!de&&l!==!1&&i&&(de=i(we),Ie=n(de)),de&&z.push(de),Ie&&H.push(Ie)}a(z),b(H)},[l,a,i,n]),V=f.useCallback(A=>{A.key==="Enter"&&(!C.current&&!R.current?(vt(A),k.current&&k.current.length>0&&(O(k.current.slice(0,1)),B([k.current[0].value]))):v(!0))},[B]),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(PT,{...c,ref:d,defaultValue:u.map(r),searchable:!0,onKeyDown:V,onSearchChange:L,data:[...x,...P],onFocus:T,onChange:B,onCreate:M,rightSectionWidth:40,rightSection:w?s.createElement(qn,{size:16}):null,filter:Q,creatable:!0})}function zre(e){return e?Array.isArray(e)?e:[e]:[]}var Lre=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 Fre(e){return e.id}function Vre(e){return{value:e.id,label:mo(e),resource:e}}function Bre(e){let{classes:t}=Lre(),r=km(),n=te(),o=f.useCallback(async(i,l)=>{let c=Wre(i),u={signal:l},d=await n.graphql(c,void 0,void 0,u);return Hre(d,i)},[n]),a=f.useCallback(i=>{i.length>0&&r(`/${ot(i[0])}`)},[r]);return s.createElement(_0,{key:`${e.pathname}?${e.searchParams}`,size:"sm",radius:"md",className:t.searchInput,icon:s.createElement(kre,{size:16}),placeholder:"Search",itemComponent:Ure,toKey:Fre,toOption:Vre,onChange:a,loadOptions:o,maxSelectedValues:0,clearSearchOnChange:!0,clearable:!1})}var Ure=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,mo(e)),s.createElement(ae,{size:"xs",color:"dimmed"},n))))});function Wre(e){let t=JSON.stringify(e);return YI(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 Hre(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),Qre(qre(r),t).slice(0,5)}function qre(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 Qre(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(ic(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 Gre=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 Kre(e){var d,m,h,g;let t=Cm(),{medplum:r,profile:n,navigate:o}=t,a=r.getLogins(),{classes:i,cx:l}=Gre(),[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(Bre,{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},ic((d=n==null?void 0:n.name)==null?void 0:d[0])),s.createElement(hre,{size:12,stroke:1.5})))),s.createElement(G.Dropdown,null,s.createElement(ke,{align:"center",p:"xl"},s.createElement(aa,{size:"xl",radius:100,value:t.profile}),s.createElement(w0,{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(tf,{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(Rre,{size:14,stroke:1.5}),onClick:()=>o("/signin")},"Add another account"),s.createElement(G.Item,{icon:s.createElement(iv,{size:14,stroke:1.5}),onClick:()=>o(`/${ot(n)}`)},"Account settings"),s.createElement(G.Item,{icon:s.createElement(Sre,{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 Yre(e){let t={};for(let r of Array.from(e.elements))r instanceof HTMLInputElement?Xre(t,r):r instanceof HTMLTextAreaElement?t[r.name]=r.value:r instanceof HTMLSelectElement&&Jre(t,r);return t}function Xre(e,t){t.disabled||(t.type==="checkbox"||t.type==="radio")&&!t.checked||(e[t.name]=t.value)}function Jre(e,t){e[t.name]=t.value}function De(e){return s.createElement("form",{style:e.style,"data-testid":e.testid,onSubmit:t=>{t.preventDefault();let r=Yre(t.target);e.onSubmit&&e.onSubmit(r)}},e.children)}function Zre(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=yl(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({type:"change"}),le({color:"green",message:"Success"}),e.onOk()}).catch(h=>{le({color:"red",message:Oe(h)})})}return s.createElement(xr,{title:"Add Bookmark",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:e.onCancel},s.createElement(De,{onSubmit:n},s.createElement(ke,null,s.createElement(ene,{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 ene(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(mt,{name:"menuname",defaultValue:r[0],label:"Select Menu Option",placeholder:"Menu",data:r,withAsterisk:!0})}function x0(e){return typeof e.code=="string"?e.code:JSON.stringify(e)}function tne(e){return typeof e.display=="string"?e.display:x0(e)}function rne(e){return{value:x0(e),label:tne(e),resource:e}}function nne(e){return{code:e,display:e}}function b0(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(_0,{...a,creatable:n??!0,clearable:o??!0,toKey:x0,toOption:rne,loadOptions:i,onCreate:nne,getCreateLabel:n===!1?void 0:l=>`+ Create ${l}`})}function $5(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=o[0],i=ane(a);r(i),e.onChange&&e.onChange(i)}return s.createElement(b0,{elementDefinition:e.property,name:e.name,placeholder:e.placeholder,defaultValue:one(t),onChange:n,creatable:e.creatable,maxSelectedValues:e.maxSelectedValues??1,clearSearchOnChange:e.clearSearchOnChange,clearable:e.clearable})}function one(e){return e?{code:e}:void 0}function ane(e){return e==null?void 0:e.code}var O5=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 ine(e){var c;let{classes:t}=O5(),r=km(),n=cne(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(us,{width:{sm:250},p:"xs"},s.createElement(hl,null,s.createElement(us.Section,{mb:"sm"},s.createElement($5,{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(us.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(lne,{key:m.href,to:m.href,active:m.href===(n==null?void 0:n.href),onClick:h=>i(h,m.href)},s.createElement(sne,{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(Cre,{size:"0.75rem"}),onClick:()=>a(!0)},"Add Bookmark")))),e.pathname&&e.searchParams&&s.createElement(Zre,{pathname:e.pathname,searchParams:e.searchParams,visible:o,onOk:()=>a(!1),onCancel:()=>a(!1)}))}function lne(e){let{classes:t,cx:r}=O5();return s.createElement(je,{onClick:e.onClick,to:e.to,className:r(t.link,{[t.linkActive]:e.active})},e.children)}function sne(e){return e.icon?e.icon:s.createElement(Jy,{w:30})}function cne(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=une(e,t,i.href);l>o&&(o=l,n=i)}return n}function une(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 dne(e){var u;let t=Zt(),[r,n]=f.useState(localStorage.navbarOpen==="true"),o=te(),a=v5();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(Y2,{styles:{main:{background:t.colorScheme==="dark"?t.colors.dark[8]:t.colors.gray[0]}},padding:0,fixed:!0,header:a&&s.createElement(Kre,{pathname:e.pathname,searchParams:e.searchParams,logo:e.logo,version:e.version,navbarToggle:c}),navbar:a&&r?s.createElement(ine,{pathname:e.pathname,searchParams:e.searchParams,menus:e.menus,closeNavbar:l,displayAddBookmark:e.displayAddBookmark}):void 0},s.createElement(S5,{key:`${e.pathname}?${(u=e.searchParams)==null?void 0:u.toString()}`},s.createElement(f.Suspense,{fallback:s.createElement(oa,null)},e.children)))}function uc(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 fne(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(uc,{value:r,maxWidth:e.maxWidth}))))}function E0(e){let t=te(),r=f.useRef(null);function n(i){var l;vt(i),(l=r.current)==null||l.click()}function o(i){vt(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 pne(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(uc,{value:a,maxWidth:200})),s.createElement("td",null,s.createElement(Dr,{title:"Remove",size:"sm",onClick:l=>{vt(l);let c=t.slice();c.splice(i,1),o(c)}},s.createElement(xp,null))))),s.createElement("tr",null,s.createElement("td",null),s.createElement("td",null,s.createElement(E0,{onUpload:a=>{o([...n.current,a])}},a=>s.createElement(Dr,{...a,title:"Add",size:"sm",color:"green"},s.createElement(_5,{size:16})))))))}function C5(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(uc,{value:t,maxWidth:200}),s.createElement(Z,{onClick:o=>{vt(o),n(void 0)}},"Remove")):s.createElement(E0,{onUpload:n},o=>s.createElement(Z,{...o},"Upload..."))}var k5=["meta","implicitRules","language","text","contained","extension","modifierExtension"],mne=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 S0(e){let{children:t,compact:r}=e,{classes:n,cx:o}=mne();return s.createElement("dl",{className:o(n.root,{[n.compact]:r})},t)}function qi(e){return s.createElement(s.Fragment,null,s.createElement("dt",null,e.term),s.createElement("dd",null,e.children))}function Vn(e){return s.createElement(s.Fragment,null,UI(e.value))}function hne(e){return s.createElement(s.Fragment,null,WI(e.value))}function j5(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 gne(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(j5,{key:"telecom-"+o,value:n}))):null}function vne(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 yne(e){return s.createElement(s.Fragment,null,lee(e.value))}function lv(e){return s.createElement(s.Fragment,null,No(e.value))}function P0(e){return s.createElement(s.Fragment,null,As(e.value))}function wne(e){let t=e.value;return t?s.createElement(s.Fragment,null,s.createElement(lv,{value:t.numerator})," / ",s.createElement(lv,{value:t.denominator})):null}function bp(e){if(!e.value)return null;let t=e.value.display||e.value.reference||wr(e.value);return e.link!==!1&&e.value.reference?s.createElement(je,{to:e.value},t):s.createElement(s.Fragment,null,t)}function _ne(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(go,{arrayElement:!0,property:t,propertyType:n,value:i,ignoreMissingValues:e.ignoreMissingValues,link:e.link}))))}function go(e){let{property:t,propertyType:r,value:n}=e;if((t==null?void 0:t.max)==="*"&&!e.arrayElement)return r===X.Attachment?s.createElement(fne,{values:n,maxWidth:e.maxWidth}):s.createElement(_ne,{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(bp,{value:{reference:n},link:e.link});case X.dateTime:case X.instant:return s.createElement(s.Fragment,null,yr(n));case X.markdown:return s.createElement("pre",null,n);case X.Address:return s.createElement(Kte,{value:n});case X.Annotation:return s.createElement(s.Fragment,null,n==null?void 0:n.text);case X.Attachment:return s.createElement(uc,{value:n,maxWidth:e.maxWidth});case X.CodeableConcept:return s.createElement(Vn,{value:n});case X.Coding:return s.createElement(hne,{value:n});case X.ContactDetail:return s.createElement(gne,{value:n});case X.ContactPoint:return s.createElement(j5,{value:n});case X.HumanName:return s.createElement(w0,{value:n});case X.Identifier:return s.createElement(vne,{value:n});case X.Money:return s.createElement(yne,{value:n});case X.Period:return s.createElement(s.Fragment,null,nee(n));case X.Quantity:case X.Duration:return s.createElement(lv,{value:n});case X.Range:return s.createElement(P0,{value:n});case X.Ratio:return s.createElement(wne,{value:n});case X.Reference:return s.createElement(bp,{value:n,link:e.link});case X.Timing:return s.createElement(s.Fragment,null,BI(n));case X.Dosage:case X.UsageContext:return s.createElement(sv,{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(sv,{value:{type:JI(t),value:n},compact:!0,ignoreMissingValues:e.ignoreMissingValues})}}function qa(e,t){let r=lo(e,t);return r?Array.isArray(r)?[r.map(n=>n.value),r[0].type]:[r.value,r.type]:[void 0,"undefined"]}function sv(e){let t=e.value,r=t.value;if(!r)return null;let n=t.type,o=St.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(S0,{compact:e.compact},Object.entries(o.properties).map(a=>{let i=a[0];if(k5.includes(i))return null;let l=a[1];l.path||(l.path=n+"."+i);let[c,u]=qa(t,i);return e.ignoreMissingValues&&(!c||Array.isArray(c)&&c.length===0)?null:s.createElement(qi,{key:i,term:wp(i)},s.createElement(go,{property:l,propertyType:u,value:c,ignoreMissingValues:e.ignoreMissingValues,link:e.link}))})):s.createElement("div",null,n," not implemented")}function R5(e){return s.createElement(J,{noWrap:!0},s.createElement("div",null,e.children),s.createElement("div",null,s.createElement(zt.Wrapper,{id:e.htmlFor,label:e.title,description:e.description,withAsterisk:e.withAsterisk},(()=>null)())))}function et(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 T5((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 $0(e,t){var r;return(r=e==null?void 0:e.issue)==null?void 0:r.filter(n=>{var o;return T5((o=n.expression)==null?void 0:o[0],t)})}function T5(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 Ge(e){return s.createElement(zt.Wrapper,{id:e.htmlFor,label:e.title,description:e.description,withAsterisk:e.withAsterisk,error:et(e.outcome,e.htmlFor)},e.children)}function I5(e){let t=te(),r=Ye(e.defaultValue),[n,o]=f.useState(),[a,i]=f.useState();return f.useEffect(()=>{r&&(i(yl(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(ke,{mb:"xl"},s.createElement(Ge,{title:"Resource Type",htmlFor:"resourceType",outcome:e.outcome},s.createElement(ne,{name:"resourceType",defaultValue:a.resourceType,disabled:!0})),s.createElement(Ge,{title:"ID",htmlFor:"id",outcome:e.outcome},s.createElement(ne,{name:"id",defaultValue:a.id,disabled:!0}))),s.createElement(uv,{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 cv(e,t,r,n,o){let a=n.type;if(a.length>1)for(let i of a){let l=t.replace("[x]",_r(i.code));l in e&&delete e[l]}return e[r]=o,e}function xne(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=Ene(o);r(a),e.onChange&&e.onChange(a)}return s.createElement(b0,{elementDefinition:e.property,name:e.name,placeholder:e.placeholder,defaultValue:t&&bne(t),maxSelectedValues:1,onChange:n})}function bne(e){var t;return(t=e.coding)==null?void 0:t.map(r=>({system:r.system,code:r.code,display:r.display}))}function Ene(e){if(e.length!==0)return{coding:e.map(t=>({system:t.system,code:t.code,display:t.display}))}}function Sne(e){let[t,r]=f.useState(e.defaultValue);function n(o){let a=o[0],i=a&&$ne(a);r(i),e.onChange&&e.onChange(i)}return s.createElement(b0,{elementDefinition:e.property,name:e.name,placeholder:e.placeholder,defaultValue:t&&Pne(t),maxSelectedValues:1,onChange:n})}function Pne(e){return{system:e.system,code:e.code,display:e.display}}function $ne(e){return{system:e.system,code:e.code,display:e.display}}function D5(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(mt,{"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(mt,{"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 One(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(D5,{name:e.name+"-telecom",defaultValue:(l=t==null?void 0:t.telecom)==null?void 0:l[0],onChange:i}))}function Qa(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:kne(),defaultValue:Cne(e.defaultValue),autoFocus:e.autoFocus,error:et(e.outcome,e.name),onChange:t=>{if(e.onChange){let r=t.currentTarget.value;e.onChange(N5(r))}}})}function Cne(e){if(!e)return"";let t=new Date(e);return Pm(t)?t.toLocaleDateString("sv")+"T"+t.toLocaleTimeString("sv"):""}function N5(e){if(!e)return"";let t=new Date(e);return Pm(t)?t.toISOString():""}function kne(){return"datetime-local"}function jne(e){return s.createElement(tc,{id:e.name,name:e.name,"data-testid":"extension-input",defaultValue:wr(e.defaultValue),deserialize:JSON.parse,onChange:t=>{e.onChange&&e.onChange(JSON.parse(t))}})}function Rne(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(mt,{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 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(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 Ine=["USD","EUR","CAD","GBP","AUD"];function Dne(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(mt,{defaultValue:r==null?void 0:r.currency,data:Ine,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(vre,{size:14}),rightSection:l,rightSectionWidth:92,onChange:i})}function Nne(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(Qa,{name:e.name+".start",placeholder:"Start",defaultValue:t==null?void 0:t.start,onChange:o=>n({...t,start:o})}),s.createElement(Qa,{name:e.name+".end",placeholder:"End",defaultValue:t==null?void 0:t.end,onChange:o=>n({...t,end:o})}))}function Ga(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(mt,{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:Ane(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 Ane(e){if(e)return parseFloat(e)}function O0(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(Ga,{name:e.name+"-low",defaultValue:t==null?void 0:t.low,onChange:o=>n({...t,low:o})}),s.createElement(Ga,{name:e.name+"-high",defaultValue:t==null?void 0:t.high,onChange:o=>n({...t,high:o})}))}function Mne(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(Ga,{name:e.name+"-numerator",defaultValue:t==null?void 0:t.numerator,onChange:o=>n({...t,numerator:o})}),s.createElement(Ga,{name:e.name+"-denominator",defaultValue:t==null?void 0:t.denominator,onChange:o=>n({...t,denominator:o})}))}var zne={Observation:"code",User:"email:contains"},Lne=["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 Fne(e){return{value:ot(e),label:mo(e),resource:e}}function wl(e){let t=te(),r=e.resourceType,n=Ye(e.defaultValue),o=e.onChange,a=f.useCallback(async(l,c)=>{let u=Bne(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(_0,{name:e.name,itemComponent:Vne,defaultValue:n,placeholder:e.placeholder,maxSelectedValues:1,toKey:ot,toOption:Fne,loadOptions:a,onChange:i,clearable:!0})}var Vne=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 Bne(e){return zne[e]??(Lne.includes(e)?"name":"_id")}function Tm(e){let t=Une(e.targetTypes),r=Wne(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(mt,{"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(wl,{resourceType:a,name:e.name+"-id",placeholder:e.placeholder,defaultValue:n,onChange:d=>{u(d?at(d):void 0)}}))}function Une(e){if(!(!e||e.length===0||e.length===1&&e[0]==="Resource"))return e}function Wne(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 Hne(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(Ka,{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(Dr,{title:"Remove",size:"sm",onClick:l=>{vt(l);let c=[...n.current];c.splice(i,1),o(c)}},s.createElement(xp,null))))),s.createElement("tr",null,s.createElement("td",null),s.createElement("td",{style:{textAlign:"right"}},s.createElement(Dr,{title:"Add",size:"sm",color:"green",onClick:a=>{vt(a);let i=[...n.current];i.push(void 0),o(i)}},s.createElement(g0,null))))))}var qne=["sun","mon","tue","wed","thu","fri","sat"];function Qne(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,BI(a.current)||"No repeat"),s.createElement(Z,{onClick:()=>o(!0)},"Edit")),s.createElement(Gne,{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 Gne(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(xr,{title:"Timing",closeButtonProps:{"aria-label":"Close"},opened:e.visible,onClose:()=>e.onCancel()},s.createElement(ke,null,s.createElement(Ge,{title:"Starts on",htmlFor:"timing-dialog-start"},s.createElement(Qa,{name:"timing-dialog-start",onChange:u=>o(u)})),s.createElement(Zy,{label:"Repeat",checked:!!t.repeat,onChange:u=>a(u.currentTarget.checked?YS.repeat:void 0)}),t.repeat&&s.createElement(s.Fragment,null,s.createElement(Ge,{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(mt,{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(Ge,{title:"Repeat on"},s.createElement(gf.Group,{multiple:!0,onChange:c},s.createElement(J,{position:"apart",mt:"md",spacing:"xs"},qne.map(u=>s.createElement(gf,{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 Ka(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(pne,{name:n,defaultValue:o,onChange:e.onChange}):s.createElement(Hne,{property:t,name:n,defaultValue:o,onChange:e.onChange});let a=t.type;return a.length>1?s.createElement(Kne,{elementDefinitionTypes:a,...e}):s.createElement(A5,{elementDefinitionType:a[0],...e})}function Kne(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(mt,{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(A5,{...e,elementDefinitionType:n,onChange:a=>{e.onChange&&e.onChange(a,e.name.replace("[x]",_r(n.code)))}}))}function A5(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:et(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:et(e.outcome,n)});case X.dateTime:case X.instant:return s.createElement(Qa,{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($5,{property:t,name:n,defaultValue:o,onChange:e.onChange});case X.boolean:return s.createElement(tn,{id:n,name:n,"data-testid":n,defaultChecked:!!o,onChange:i=>{e.onChange&&e.onChange(i.currentTarget.checked)}});case X.markdown:return s.createElement(ec,{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(Yte,{name:n,defaultValue:o,onChange:e.onChange});case X.Annotation:return s.createElement(Zte,{name:n,defaultValue:o,onChange:e.onChange});case X.Attachment:return s.createElement(C5,{name:n,defaultValue:o,onChange:e.onChange});case X.CodeableConcept:return s.createElement(xne,{property:t,name:n,defaultValue:o,onChange:e.onChange});case X.Coding:return s.createElement(Sne,{property:t,name:n,defaultValue:o,onChange:e.onChange});case X.ContactDetail:return s.createElement(One,{name:n,defaultValue:o,onChange:e.onChange});case X.ContactPoint:return s.createElement(D5,{name:n,defaultValue:o,onChange:e.onChange});case X.Extension:return s.createElement(jne,{name:n,defaultValue:o,onChange:e.onChange});case X.HumanName:return s.createElement(Rne,{name:n,defaultValue:o,onChange:e.onChange});case X.Identifier:return s.createElement(Tne,{name:n,defaultValue:o,onChange:e.onChange});case X.Money:return s.createElement(Dne,{name:n,defaultValue:o,onChange:e.onChange});case X.Period:return s.createElement(Nne,{name:n,defaultValue:o,onChange:e.onChange});case X.Duration:case X.Quantity:return s.createElement(Ga,{name:n,defaultValue:o,onChange:e.onChange});case X.Range:return s.createElement(O0,{name:n,defaultValue:o,onChange:e.onChange});case X.Ratio:return s.createElement(Mne,{name:n,defaultValue:o,onChange:e.onChange});case X.Reference:return s.createElement(Tm,{name:n,defaultValue:o,targetTypes:Yne(t),onChange:e.onChange});case X.Timing:return s.createElement(Qne,{name:n,defaultValue:o,onChange:e.onChange});case X.Dosage:case X.UsageContext:return s.createElement(uv,{typeName:r,defaultValue:o,onChange:e.onChange,outcome:e.outcome});default:return s.createElement(uv,{typeName:JI(t),defaultValue:o,onChange:e.onChange,outcome:e.outcome})}}function Yne(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 uv(e){let[t,r]=f.useState(e.defaultValue??{});function n(l){r(l),e.onChange&&e.onChange(l)}let o=e.typeName,a=St.types[o];if(!a)return s.createElement("div",null,o," not implemented");let i={type:o,value:t};return s.createElement(ke,null,Object.entries(a.properties).map(l=>{let c=l[0];if(c==="id"||k5.includes(c))return null;let u=l[1];if(!u.type)return null;let[d,m]=qa(i,c),h=u.min!==void 0&&u.min>0;return u.type.length===1&&u.type[0].code==="boolean"?s.createElement(R5,{key:c,title:wp(c),description:u.definition,htmlFor:c},s.createElement(Ka,{property:u,name:c,defaultValue:d,defaultPropertyType:m,outcome:e.outcome,onChange:(g,y)=>{n(cv(t,c,y??c,l[1],g))}})):s.createElement(Ge,{key:c,title:wp(c),description:u.definition,withAsterisk:h,htmlFor:c,outcome:e.outcome},s.createElement(Ka,{property:u,name:c,defaultValue:d,defaultPropertyType:m,onChange:(g,y)=>{n(cv(t,c,y??c,l[1],g))}}))}))}var Xne=W(()=>({root:{"@media (max-width: 800px)":{paddingLeft:4,paddingRight:4}}}));function dc(e){let{children:t,...r}=e,{classes:n}=Xne();return s.createElement(Xj,{className:n.root,...r},t)}var Jne=W(e=>({noteBody:{fontSize:e.fontSizes.sm},noteCite:{fontSize:e.fontSizes.xs,marginBlockStart:3},noteRoot:{padding:5}}));function M5({value:e}){let{classes:t}=Jne();return e?s.createElement(ke,{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 fc(e){let{value:t,link:r,...n}=e,[o,a]=f.useState(),i=Ye(t,a),l;if(o&&!FI(o))l=`[${Oe(o)}]`;else if(i)l=mo(i);else return null;return r?s.createElement(je,{to:t,...n},l):s.createElement(ae,{component:"span",...n},l)}function Qi(e){return s.createElement(J,{spacing:"xs"},s.createElement(aa,{size:24,radius:12,value:e.value,link:e.link}),s.createElement(fc,{value:e.value,link:e.link}))}var Zne={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 z5(e){return s.createElement(PB,{color:Zne[e.status]},e.status)}var L5=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}}));C0.defaultProps={hideObservationNotes:!1,hideSpecimenInfo:!1};function C0(e){var i;let t=te(),r=Ye(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(ke,null,s.createElement(ce,null,"Diagnostic Report"),s.createElement(eoe,{value:r}),!e.hideSpecimenInfo&&toe(n),r.result&&s.createElement(roe,{hideObservationNotes:e.hideObservationNotes,value:r.result}),a.length>0&&s.createElement(M5,{value:a}))}function eoe({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(Qi,{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(Qi,{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(Qi,{value:n,link:!0})))),e.issued&&s.createElement("div",null,s.createElement(ae,{size:"xs",transform:"uppercase",color:"dimmed"},"Issued"),s.createElement(ae,null,yr(e.issued))),e.status&&s.createElement("div",null,s.createElement(ae,{size:"xs",transform:"uppercase",color:"dimmed"},"Status"),s.createElement(ae,null,_r(e.status))))}function toe(e){return s.createElement(ke,{spacing:"xs"},s.createElement(ce,{order:2,size:"h6"},"Specimens"),s.createElement(fr,{type:"ordered"},e==null?void 0:e.map((t,r)=>{var n;return s.createElement(fr.Item,{ml:"sm",key:`specimen-${t.id}-${r}`},s.createElement(J,{spacing:20},s.createElement(J,{spacing:5},s.createElement(ae,{fw:500},"Collected:")," ",yr((n=t.collection)==null?void 0:n.collectedDateTime)),s.createElement(J,{spacing:5},s.createElement(ae,{fw:500},"Received:")," ",yr(t.receivedTime))))})))}function roe(e){var r;let{classes:t}=L5();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(noe,{key:`obs-${n.id}-${o}`,hideObservationNotes:e.hideObservationNotes,value:n}))))}function noe(e){var i;let{classes:t,cx:r}=L5(),n=Ye(e.value);if(!n)return null;let o=!e.hideObservationNotes&&n.note,a=ioe(n);return s.createElement(s.Fragment,null,s.createElement("tr",{className:r({[t.criticalRow]:a})},s.createElement("td",{rowSpan:o?2:1},s.createElement(je,{to:n},s.createElement(Vn,{value:n.code}))),s.createElement("td",null,s.createElement(ooe,{value:n})),s.createElement("td",null,s.createElement(aoe,{value:n.referenceRange})),s.createElement("td",null,n.interpretation&&n.interpretation.length>0&&s.createElement(Vn,{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(Vn,{value:l}))))),s.createElement("td",null,(i=n.performer)==null?void 0:i.map(l=>s.createElement(bp,{key:l.reference,value:l}))),s.createElement("td",null,n.status&&s.createElement(z5,{status:n.status}))),o&&s.createElement("tr",null,s.createElement("td",{colSpan:6},s.createElement(M5,{value:n.note}))))}function ooe(e){let t=e.value;return s.createElement(s.Fragment,null,HI(t))}function aoe(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(P0,{value:t}):null}function ioe(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 loe=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%"}}})),soe={shadow:"xs",radius:"md",withBorder:!0};function k0(e){let{className:t,children:r,width:n,fill:o,unstyled:a,...i}=q("Panel",soe,e),{classes:l,cx:c}=loe({width:n,fill:o},{name:"Panel",unstyled:a});return s.createElement(wn,{className:c(l.paper,t),...i},r)}var coe=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 uoe(e){let{classes:t}=coe(),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]=qa(Wn(e.original),l),[m,h]=qa(Wn(e.revised),l);return XS(u)&&XS(m)||wr(u)===wr(m)?null:s.createElement("tr",{key:l},s.createElement("td",null,wp(l)),s.createElement("td",{className:t.removed},s.createElement(go,{property:c,propertyType:d,value:u,ignoreMissingValues:!0})),s.createElement("td",{className:t.added},s.createElement(go,{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 j0(e){let t=te(),r=Ye(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(sv,{value:{type:r.resourceType,value:e.forceUseInput?e.value:r},ignoreMissingValues:e.ignoreMissingValues})}function doe(e){return s.createElement(dc,null,e.children)}function Ya(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(k0,{"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(fc,{color:"dark",weight:500,value:i,link:!0})),s.createElement(ae,{size:"xs"},s.createElement(je,{color:"dimmed",to:e.resource},yr(l)),s.createElement(ae,{component:"span",color:"dimmed",mx:8},"·"),s.createElement(je,{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(Dr,{radius:"xl","aria-label":`Actions for ${ot(e.resource)}`},s.createElement(yre,null))),o)),s.createElement(S5,null,n&&s.createElement("div",{style:{padding:"0 16px 16px 16px"}},e.children),!n&&s.createElement(s.Fragment,null,e.children)))}function F5(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(!V5(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(!V5(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 V5(e,t){return!!t&&e.resourceType===t.resourceType&&e.id===t.id}var foe=W(e=>({pinnedComment:{backgroundColor:e.colors.blue[0]}}));function Im(e){let t=te(),r=km(),n=t.getProfile(),o=f.useRef(null),a=Ye(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=>{F5(k,a),k.reverse(),u(k)},[a]),g=f.useCallback(k=>{let T=[];for(let L of k){if(L.status!=="fulfilled")continue;let B=L.value;if(B.type==="history"&&l(B),B.entry)for(let V of B.entry)T.push(V.resource)}h(T)},[h]),y=f.useCallback(k=>h([...m.current,k]),[h]),w=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(()=>w(),[w]);function E(k){!a||!e.createCommunication||t.createResource(e.createCommunication(a,n,k)).then(T=>y(T)).catch(console.log)}function _(k){!a||!e.createMedia||t.createResource(e.createMedia(a,n,k)).then(T=>y(T)).then(()=>Mu({id:"upload-notification",color:"teal",title:"Upload complete",message:"",icon:s.createElement(pre,{size:16}),autoClose:2e3})).catch(T=>Mu({id:"upload-notification",color:"red",title:"Upload error",message:Oe(T),icon:s.createElement(_re,{size:16}),autoClose:2e3}))}function v(k,T){return t.updateResource({...k,priority:T})}function x(k){v(k,"stat").then(w).catch(console.log)}function b(k){v(k,"routine").then(w).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(){le({id:"upload-notification",loading:!0,title:"Initializing upload...",message:"Please wait...",autoClose:!1,withCloseButton:!1})}function j(k){Mu({id:"upload-notification",loading:!0,title:"Uploading...",message:woe(k),autoClose:!1,withCloseButton:!1})}return a?s.createElement(doe,null,e.createCommunication&&s.createElement(k0,null,s.createElement(De,{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(Dr,{type:"submit",radius:"xl",color:"blue",variant:"filled"},s.createElement(Pre,{size:16})),s.createElement(E0,{onUpload:_,onUploadStart:R,onUploadProgress:j},k=>s.createElement(Dr,{...k,radius:"xl",color:"blue",variant:"filled"},s.createElement(_5,{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(poe,{key:T,history:i,resource:k,onDetails:C});switch(k.resourceType){case"AuditEvent":return s.createElement(voe,{key:T,resource:k,onDetails:P});case"Communication":return s.createElement(hoe,{key:T,resource:k,onPin:k.priority!=="stat"?x:void 0,onUnpin:k.priority==="stat"?b:void 0,onDetails:P,onEdit:O,onDelete:$});case"DiagnosticReport":return s.createElement(yoe,{key:T,resource:k,onDetails:P,onEdit:O,onDelete:$});case"Media":return s.createElement(goe,{key:T,resource:k,onDetails:P,onEdit:O,onDelete:$});default:return s.createElement(Ya,{key:T,resource:k,padding:!0},s.createElement(j0,{value:k,ignoreMissingValues:!0}))}})):s.createElement(Xt,{style:{width:"100%",height:"100%"}},s.createElement(qn,null))}function il(e){return s.createElement(G.Dropdown,null,s.createElement(G.Label,null,"Resource"),e.onPin&&s.createElement(G.Item,{icon:s.createElement($re,{size:14}),onClick:()=>e.onPin(e.resource),"aria-label":`Pin ${ot(e.resource)}`},"Pin"),e.onUnpin&&s.createElement(G.Item,{icon:s.createElement(Ore,{size:14}),onClick:()=>e.onUnpin(e.resource),"aria-label":`Unpin ${ot(e.resource)}`},"Unpin"),e.onDetails&&s.createElement(G.Item,{icon:s.createElement(Ere,{size:14}),onClick:()=>e.onDetails(e.resource),"aria-label":`Details ${ot(e.resource)}`},"Details"),e.onEdit&&s.createElement(G.Item,{icon:s.createElement(wre,{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(E5,{size:14}),onClick:()=>e.onDelete(e.resource),"aria-label":`Delete ${ot(e.resource)}`},"Delete")))}function poe(e){let t=moe(e.history,e.resource);return t?s.createElement(Ya,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(il,{...e})},s.createElement(uoe,{original:t,revised:e.resource})):s.createElement(Ya,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(il,{...e})},s.createElement("h3",null,"Created"),s.createElement(j0,{value:e.resource,ignoreMissingValues:!0,forceUseInput:!0}))}function moe(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 hoe(e){var n,o;let{classes:t}=foe(),r=!e.resource.priority||e.resource.priority==="routine"?void 0:t.pinnedComment;return s.createElement(Ya,{resource:e.resource,profile:e.resource.sender,dateTime:e.resource.sent,padding:!0,className:r,popupMenuItems:s.createElement(il,{...e})},s.createElement("p",null,(o=(n=e.resource.payload)==null?void 0:n[0])==null?void 0:o.contentString))}function goe(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(Ya,{resource:e.resource,padding:!!r,popupMenuItems:s.createElement(il,{...e})},s.createElement(uc,{value:e.resource.content}))}function voe(e){return s.createElement(Ya,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(il,{...e})},s.createElement(hl,null,s.createElement("pre",null,e.resource.outcomeDesc)))}function yoe(e){return s.createElement(Ya,{resource:e.resource,padding:!0,popupMenuItems:s.createElement(il,{...e})},s.createElement(C0,{value:e.resource}))}function woe(e){if(e.lengthComputable){let t=100*e.loaded/e.total;return`Uploaded: ${zh(e.loaded)} / ${zh(e.total)} ${t.toFixed(2)}%`}return`Uploaded: ${zh(e.loaded)}`}function zh(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 _oe(e){return s.createElement(Im,{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(dc,null,s.createElement(k0,{...r},t))}function xoe(e){return s.createElement(Im,{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 boe(e){let t;try{t=wte(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(go,{value:t[0]||"",propertyType:e.propertyType})}function Eoe(e){return s.createElement(xr,{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 Soe={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]},Poe={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 R0(e,t){return{...e,filters:t,offset:0,name:void 0}}function T0(e,t){return R0(e,(e.filters??[]).filter(r=>r.code!==t))}function Dm(e,t,r,n,o){o&&(e=T0(e,t));let a=[];return e.filters&&a.push(...e.filters),a.push({code:t,operator:r,value:n??""}),R0(e,a)}function $oe(e,t){if(!e.filters)return e;let r=[...e.filters];return r.splice(t,1),{...e,filters:r,name:void 0}}function Ooe(e,t){return I0(e,t,-1)}function Coe(e,t){return I0(e,t,0)}function koe(e,t){return I0(e,t,1)}function I0(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),N0(e,t,n,o)}function joe(e,t){return D0(e,t,-1)}function Roe(e,t){return D0(e,t,0)}function Toe(e,t){return D0(e,t,1)}function D0(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),N0(e,t,n,o)}function Ioe(e,t){let r=new Date;return r.setMonth(0),r.setDate(1),r.setHours(0,0,0,0),N0(e,t,r,new Date)}function N0(e,t,r,n){return e=T0(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 Dm(e,t,r,n.toISOString())}function rP(e,t,r=!0){return Dm(e,t,ee.MISSING,r.toString())}function Doe(e,t){return e.offset===t?e:{...e,offset:t,name:void 0}}function Noe(e,t){let r=e.count??lc,n=(t-1)*r;return Doe(e,n)}function Aoe(e,t,r){return t===Moe(e)&&r!==void 0&&r===zoe(e)?e:{...e,sortRules:[{code:t,descending:!!r}],name:void 0}}function Moe(e){let t=e.sortRules;if(!t||t.length===0)return;let r=t[0].code;return r.startsWith("-")?r.substr(1):r}function zoe(e){let t=e.sortRules;return!t||t.length===0?!1:!!t[0].descending}function Loe(e){return Soe[e.type]}function A0(e){return Poe[e]??""}function Bn(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(_r).join(" "))}function Foe(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"?yr((o=e.meta)==null?void 0:o.lastUpdated):t.elementDefinition&&`${e.resourceType}.${t.name}`===t.elementDefinition.path?Voe(e,t.elementDefinition):t.searchParams&&t.searchParams.length===1&&t.name===t.searchParams[0].code?Boe(e,t.searchParams[0]):null}function Voe(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]=qa({type:e.resourceType,value:e},r);return n?s.createElement(go,{property:t,propertyType:o,value:n,maxWidth:200,ignoreMissingValues:!0,link:!1}):null}function Boe(e,t){let r=u5(t.expression,[{type:e.resourceType,value:e}]);return!r||r.length===0?null:s.createElement(s.Fragment,null,r.map((n,o)=>s.createElement(go,{key:`${o}-${r.length}`,propertyType:n.type,value:n.value,maxWidth:200,ignoreMissingValues:!0,link:!1})))}function Uoe(e){let[t,r]=f.useState({search:JSON.parse(wr(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 b;let v=t.search.fields??[],x=(b=n.current)==null?void 0:b.value;if(x){let P=[...v,x];r({search:{...t.search,fields:P}})}}function d(){var b;let v=t.search.fields??[],x=(b=o.current)==null?void 0:b.value;if(x){let P=[...v];P.splice(P.indexOf(x),1),r({search:{...t.search,fields:P}})}}function m(){var O;let v=t.search.fields??[],x=(O=o.current)==null?void 0:O.value;if(!x)return;let b=[...v],P=b.indexOf(x);P<=0||(g(b,P,P-1),r({search:{...t.search,fields:b}}))}function h(){var O;let v=t.search.fields??[],x=(O=o.current)==null?void 0:O.value;if(!x)return;let b=[...v],P=b.indexOf(x);P>=b.length-1||(g(b,P,P+1),r({search:{...t.search,fields:b}}))}function g(v,x,b){let P=v[x];v[x]=v[b],v[b]=P}if(!e.visible)return null;let y=e.search.resourceType,w=St.types[y],E=t.search.fields??[],_=Woe(w).filter(v=>!E.includes(v)).sort((v,x)=>v.localeCompare(x));return s.createElement(xr,{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"},_.map(v=>s.createElement("option",{key:v,value:v},Bn(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},Bn(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 Woe(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(Bn(o));if(e.searchParams)for(let o of Object.keys(e.searchParams)){let a=Bn(o);!r.has(o)&&!n.has(a)&&(t.push(o),r.add(o),n.add(Bn(o)))}return t}function B5(e){var o;let{resourceType:t,filter:r}=e,n=(o=St.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(fc,{value:{reference:r.value}});let a=m0(t,n);if(r.code==="_lastUpdated"||a.type===Ao.DATETIME)return s.createElement(s.Fragment,null,yr(r.value))}return s.createElement(s.Fragment,null,r.value)}function U5(e){let t=m0(e.resourceType,e.searchParam),r="filter-value";switch(t.type){case Ao.REFERENCE:return s.createElement(Tm,{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(tn,{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(Qa,{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(Ga,{name:r,defaultValue:Hoe(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 Hoe(e){if(e){let[t,r,n]=e.split("|");if(t)return{value:parseFloat(t),system:r,unit:n}}}function qoe(e){let[t,r]=f.useState(JSON.parse(wr(e.search))),[n,o]=f.useState(-1),a=f.useRef(t);a.current=t,f.useEffect(()=>{r(JSON.parse(wr(e.search)))},[e.search]);function i(d){r(Dm(a.current,d.code,d.operator,d.value))}if(!e.visible)return null;let l=e.search.resourceType,c=St.types[l].searchParams??{},u=t.filters||[];return s.createElement(xr,{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(R0(a.current,g)),o(-1)},onCancel:()=>o(-1)}):s.createElement(Qoe,{key:`filter-${m}-${u.length}-display`,resourceType:l,searchParams:c,filter:d,onEdit:()=>o(m),onDelete:()=>r($oe(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 Qoe(e){let{filter:t}=e;return s.createElement("tr",null,s.createElement("td",null,Bn(t.code)),s.createElement("td",null,A0(t.operator)),s.createElement("td",null,s.createElement(B5,{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&&Loe(l);return s.createElement("tr",null,s.createElement("td",null,s.createElement(mt,{"data-testid":"filter-field",defaultValue:n.current.code,onChange:u=>o(u.currentTarget.value),data:Object.keys(e.searchParams).map(u=>({value:u,label:Bn(u)}))})),s.createElement("td",null,c&&s.createElement(mt,{"data-testid":"filter-operation",defaultValue:t.operator,onChange:u=>a(u.currentTarget.value),data:["",...c.map(u=>({value:u,label:A0(u)}))]})),s.createElement("td",null,l&&t.operator&&s.createElement(U5,{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 Goe(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(xr,{title:e.title,size:"xl",opened:e.visible,onClose:e.onCancel},s.createElement(De,{onSubmit:n},s.createElement(Yr,null,s.createElement(Yr.Col,{span:10},s.createElement(U5,{resourceType:e.resourceType,searchParam:e.searchParam,defaultValue:t,autoFocus:!0,onChange:r})),s.createElement(Yr.Col,{span:2},s.createElement(Z,{onClick:n,fullWidth:!0},"OK")))))}function Koe(e){if(!e.searchParams)return null;function t(a,i){o(Aoe(e.search,a.code,i))}function r(a){o(T0(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(Yoe,{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},Bn(a.code))))}function Yoe(e){switch(e.searchParam.type){case"date":return s.createElement(Xoe,{...e});case"number":case"quantity":return s.createElement(Joe,{...e});case"reference":return s.createElement(Zoe,{...e});case"string":case"token":case"uri":return s.createElement(eae,{...e});default:return s.createElement(s.Fragment,null,"Unknown search param type: ",e.searchParam.type)}}function Xoe(e){let{searchParam:t}=e,r=t.code;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(v0,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort Oldest to Newest"),s.createElement(G.Item,{icon:s.createElement(y0,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Newest to Oldest"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Rm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(jm,{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(x5,{size:14}),onClick:()=>e.onPrompt(t,ee.STARTS_AFTER)},"After..."),s.createElement(G.Item,{icon:s.createElement(ure,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Between..."),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(_a,{size:14}),onClick:()=>e.onChange(koe(e.search,r))},"Tomorrow"),s.createElement(G.Item,{icon:s.createElement(_a,{size:14}),onClick:()=>e.onChange(Coe(e.search,r))},"Today"),s.createElement(G.Item,{icon:s.createElement(_a,{size:14}),onClick:()=>e.onChange(Ooe(e.search,r))},"Yesterday"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(_a,{size:14}),onClick:()=>e.onChange(Toe(e.search,r))},"Next Month"),s.createElement(G.Item,{icon:s.createElement(_a,{size:14}),onClick:()=>e.onChange(Roe(e.search,r))},"This Month"),s.createElement(G.Item,{icon:s.createElement(_a,{size:14}),onClick:()=>e.onChange(joe(e.search,r))},"Last Month"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(_a,{size:14}),onClick:()=>e.onChange(Ioe(e.search,r))},"Year to date"),s.createElement(Nm,{...e}))}function Joe(e){let{searchParam:t}=e;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(v0,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort Smallest to Largest"),s.createElement(G.Item,{icon:s.createElement(y0,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Largest to Smallest"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Rm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(jm,{size:14}),onClick:()=>e.onPrompt(t,ee.NOT_EQUALS)},"Does not equal..."),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(x5,{size:14}),onClick:()=>e.onPrompt(t,ee.GREATER_THAN)},"Greater than..."),s.createElement(G.Item,{icon:s.createElement(iv,{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(iv,{size:14}),onClick:()=>e.onPrompt(t,ee.LESS_THAN_OR_EQUALS)},"Less than or equal to..."),s.createElement(Nm,{...e}))}function Zoe(e){let{searchParam:t}=e;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(Rm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(jm,{size:14}),onClick:()=>e.onPrompt(t,ee.NOT)},"Does not equal..."),s.createElement(Nm,{...e}))}function eae(e){let{searchParam:t}=e;return s.createElement(G.Dropdown,null,s.createElement(G.Item,{icon:s.createElement(v0,{size:14}),onClick:()=>e.onSort(t,!1)},"Sort A to Z"),s.createElement(G.Item,{icon:s.createElement(y0,{size:14}),onClick:()=>e.onSort(t,!0)},"Sort Z to A"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Rm,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Equals..."),s.createElement(G.Item,{icon:s.createElement(jm,{size:14}),onClick:()=>e.onPrompt(t,ee.NOT)},"Does not equal..."),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(fre,{size:14}),onClick:()=>e.onPrompt(t,ee.CONTAINS)},"Contains..."),s.createElement(G.Item,{icon:s.createElement(dre,{size:14}),onClick:()=>e.onPrompt(t,ee.EQUALS)},"Does not contain..."),s.createElement(Nm,{...e}))}function Nm(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(sre,{size:14}),onClick:()=>e.onChange(rP(e.search,r))},"Missing"),s.createElement(G.Item,{icon:s.createElement(lre,{size:14}),onClick:()=>e.onChange(rP(e.search,r,!1))},"Not missing"),s.createElement(G.Divider,null),s.createElement(G.Item,{icon:s.createElement(Ire,{size:14}),onClick:()=>e.onClear(t)},"Clear filters"))}function tae(e){let t=e.resourceType,r=[];for(let n of e.fields||["id","_lastUpdated"])r.push(rae(t,n));return r}function rae(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=St.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=m0(e,o);return{name:t,elementDefinition:(i=l.elementDefinitions)==null?void 0:i[0],searchParams:[o]}}return{name:t}}var nae=class extends Event{constructor(e){super("change"),this.definition=e}},oae=class extends Event{constructor(e){super("load"),this.response=e}},Ep=class extends Event{constructor(e,t){super("click"),this.resource=e,this.browserEvent=t}},aae=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 iae(e){var T,L,B,V;let{classes:t}=aae(),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,Di({...l,total:h,fields:void 0})).then(M=>{d({...m.current,searchResponse:M}),c&&c(new oae(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(H=>{var ie;(ie=H.resource)!=null&&ie.id&&(A[H.resource.id]=!0)}),d({...m.current,selected:A})}function w(){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 nae(M))}function _(M,Q){P5(M.target)||M.button!==2&&(vt(M),M.button!==1&&e.onClick&&e.onClick(new Ep(Q,M)),M.button===1&&e.onAuxClick&&e.onAuxClick(new Ep(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&&St.types[e.search.resourceType]))return s.createElement(Xt,{style:{width:"100%",height:"100%"}},s.createElement(qn,null));let x=e.checkboxesEnabled,b=tae(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(gre,{size:j}),onClick:()=>d({...m.current,fieldEditorVisible:!0})},"Fields"),s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(bre,{size:j}),onClick:()=>d({...m.current,filterEditorVisible:!0})},"Filters"),e.onNew&&s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(xre,{size:j}),onClick:e.onNew},"New..."),!k&&v()&&s.createElement(Z,{compact:!0,variant:C,color:R,leftIcon:s.createElement(Tre,{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(E5,{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(cre,{size:j}),onClick:()=>e.onBulk(Object.keys(u.selected))},"Bulk...")),O&&s.createElement(ae,{size:"xs",color:"dimmed"},uae(l,O.total),"-",dae(l,O.total)," of"," ",`${h==="estimate"?"~":""}${(L=O.total)==null?void 0:L.toLocaleString()}`)),s.createElement(ti,{className:t.table},s.createElement("thead",null,s.createElement("tr",null,x&&s.createElement("th",null,s.createElement("input",{type:"checkbox",value:"checked","aria-label":"all-checkbox","data-testid":"all-checkbox",checked:w(),onChange:M=>y(M)})),b.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"},Bn(M.name)),s.createElement(Xt,{className:t.icon},s.createElement(ire,{size:14,stroke:1.5}))))),s.createElement(Koe,{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,x&&s.createElement("th",null),b.map(M=>s.createElement("th",{key:M.name},M.searchParams&&s.createElement(lae,{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=>_(Q,M),onAuxClick:Q=>_(Q,M)},x&&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)})),b.map(Q=>s.createElement("td",{key:Q.name},Foe(M,Q))))))),($==null?void 0:$.length)===0&&s.createElement(dc,null,s.createElement(Xt,{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(Xt,{m:"md",p:"md"},s.createElement(Qn,{value:sae(l),total:cae(l,O.total),onChange:M=>E(Noe(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(Uoe,{search:e.search,visible:m.current.fieldEditorVisible,onOk:M=>{E(M),d({...m.current,fieldEditorVisible:!1})},onCancel:()=>{d({...m.current,fieldEditorVisible:!1})}}),s.createElement(qoe,{search:e.search,visible:m.current.filterEditorVisible,onOk:M=>{E(M),d({...m.current,filterEditorVisible:!1})},onCancel:()=>{d({...m.current,filterEditorVisible:!1})}}),s.createElement(Eoe,{visible:m.current.exportDialogVisible,exportCsv:e.onExportCsv,exportTransactionBundle:e.onExportTransactionBundle,onCancel:()=>{d({...m.current,exportDialogVisible:!1})}}),s.createElement(Goe,{key:(B=u.filterDialogSearchParam)==null?void 0:B.code,visible:m.current.filterDialogVisible,title:(V=u.filterDialogSearchParam)!=null&&V.code?Bn(u.filterDialogSearchParam.code):"",resourceType:P,searchParam:u.filterDialogSearchParam,filter:u.filterDialogFilter,defaultValue:"",onOk:M=>{E(Dm(e.search,M.code,M.operator,M.value)),d({...m.current,filterDialogVisible:!1})},onCancel:()=>{d({...m.current,filterDialogVisible:!1})}}))}var pc=s.memo(iae);function lae(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}`},A0(r.operator)," ",s.createElement(B5,{resourceType:e.resourceType,filter:r}))))}function sae(e){return Math.floor((e.offset??0)/(e.count??lc))+1}function cae(e,t){let r=e.count??lc;return Math.ceil(t/r)}function uae(e,t){return Math.min(t,(e.offset??0)+1)}function dae(e,t){return Math.min(t,((e.offset??0)+1)*(e.count??lc))}function fae(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(x=>a(yt(x)))},[t,i]);function y(x,b){x.stopPropagation();let P=x.target.checked,O={...g.current};P?O[b]=!0:delete O[b],m(O)}function w(x){var $;x.stopPropagation();let b=x.target.checked,P={},O=($=h.current)==null?void 0:$.data.ResourceList;b&&O&&O.forEach(C=>{C.id&&(P[C.id]=!0)}),m(P)}function E(){var b;let x=(b=h.current)==null?void 0:b.data.ResourceList;if(!x||x.length===0)return!1;for(let P of x)if(P.id&&!g.current[P.id])return!1;return!0}function _(x,b){P5(x.target)||(vt(x),x.button!==1&&e.onClick&&e.onClick(new Ep(b,x)),x.button===1&&e.onAuxClick&&e.onAuxClick(new Ep(b,x)))}if(f.useEffect(()=>{t.requestSchema(e.resourceType).then(x=>{n({...x})}).catch(console.log)},[t,e.resourceType]),!(r!=null&&r.types[e.resourceType]))return s.createElement(qn,null);let v=e.checkboxesEnabled;return s.createElement("div",{onContextMenu:x=>vt(x),"data-testid":"search-control"},s.createElement(ti,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:x=>w(x)})),l.map(x=>s.createElement("th",{key:x.name},x.name)))),s.createElement("tbody",null,c==null?void 0:c.data.ResourceList.map(x=>x&&s.createElement("tr",{key:x.id,"data-testid":"search-control-row",onClick:b=>_(b,x),onAuxClick:b=>_(b,x)},v&&s.createElement("td",null,s.createElement("input",{type:"checkbox",value:"checked","data-testid":"row-checkbox","aria-label":`Checkbox for ${x.id}`,checked:!!d[x.id],onChange:b=>y(b,x.id)})),l.map(b=>s.createElement("td",{key:b.name},s.createElement(boe,{propertyType:b.propertyType,path:b.fhirPath,resource:x}))))))),(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 pae=s.memo(fae);function En(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 ni(e){var r;let t=((r=e.outcome)==null?void 0:r.issue)||e.issues;return!t||t.length===0?null:s.createElement(Ys,{icon:s.createElement(h0,{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 mae(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(Im,{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 W5=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 hae(e){let t=te(),r=Ye(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(xae(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(w,E){d({...g.current,[w]:E})}return s.createElement("div",null,s.createElement(De,{testid:"questionnaire-form",onSubmit:()=>e.onSubmit(u)},s.createElement(ne,{label:"Plan Title",defaultValue:u.title,onChange:w=>y("title",w.currentTarget.value)}),s.createElement(H5,{actions:u.action||[],selectedKey:a,setSelectedKey:i,hoverKey:l,setHoverKey:c,onChange:w=>y("action",w)}),s.createElement(Z,{type:"submit"},"Save")))}function H5(e){let{classes:t}=W5(),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(gae,{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=>{vt(i),o({id:Q5()})}},"Add action")))}function gae(e){let{classes:t,cx:r}=W5(),{action:n}=e,o=_ae(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){vt(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(yae,{action:n,actionType:o,onChange:e.onChange,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onRemove:e.onRemove}):s.createElement(vae,{action:n,actionType:o}),s.createElement("div",{className:t.bottomActions},s.createElement(dt,{href:"#",onClick:d=>{d.preventDefault(),e.onRemove()}},"Remove")))}var dv={path:"PlanDefinition.action.timing[x]",min:0,max:"1",type:[{code:"dateTime"},{code:"Period"},{code:"Range"},{code:"Timing"}]};function vae(e){let{action:t,actionType:r}=e,[n,o]=q5(t);return s.createElement("div",null,s.createElement("div",null,t.title||"Untitled"," ",r&&`(${r})`),t.definitionCanonical&&s.createElement("div",null,s.createElement(bp,{value:{reference:t.definitionCanonical}})),n&&s.createElement("div",null,s.createElement(go,{property:dv,propertyType:o,value:n})))}function yae(e){let{action:t}=e,[r,n]=f.useState(e.actionType);function o(a,i){e.onChange({...t,[a]:i})}return s.createElement(ke,{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(mt,{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(H5,{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(pu,{title:"Appointment",description:"The subject must schedule an appointment from the schedule.",resourceType:"Schedule",action:t,onChange:e.onChange});case"lab":return s.createElement(pu,{title:"Lab",description:"The subject must complete the following lab panel.",resourceType:"ActivityDefinition",action:t,onChange:e.onChange});case"questionnaire":return s.createElement(pu,{title:"Questionnaire",description:"The subject must complete the selected questionnaire.",resourceType:"Questionnaire",action:t,onChange:e.onChange});case"task":return s.createElement(pu,{title:"Task",description:"The subject must complete the following task.",resourceType:"ActivityDefinition",action:t,onChange:e.onChange});default:return null}})(),s.createElement(Ge,{title:"Timing",description:"When the action should take place."},s.createElement(wae,{name:"timing-"+t.id,action:t,onChange:e.onChange})))}function pu(e){let{id:t,definitionCanonical:r}=e.action,n=r!=null&&r.startsWith(e.resourceType+"/")?{reference:r}:void 0;return s.createElement(wl,{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 wae(e){let t=e.action,r="timing",[n,o]=q5(t);return s.createElement(Ka,{property:dv,name:"timing[x]",defaultValue:n,defaultPropertyType:o,onChange:(a,i)=>{e.onChange(cv(t,r,i??r,dv,a))}})}function _ae(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 q5(e){return qa({type:"PlanDefinitionAction",value:e},"timing")}var Lh=1;function Q5(e){if(e){if(e.startsWith("id-")){let t=parseInt(e.substring(3),10);isNaN(t)||(Lh=Math.max(Lh,t+1))}return e}return"id-"+Lh++}function xae(e){return{...e,action:G5(e.action)}}function G5(e){if(e)return e.map(t=>({...t,id:Q5(t.id),action:G5(t.action)}))}var bae=(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))(bae||{});function Eae(e){return e.type==="choice"||e.type==="open-choice"}function K5(e){let t=te(),r=t.getProfile(),[n,o]=f.useState(),a=Ye(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?$ae(a):void 0)},[a]);function d(m){let h={resourceType:"QuestionnaireResponse",item:m};l(h),u(hee(h))}return!n||!a?null:s.createElement(De,{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(Y5,{items:a.item,answers:c,onChange:d}),s.createElement(J,{position:"right",mt:"xl"},s.createElement(Z,{type:"submit"},e.submitButtonText??"OK")))}function Y5(e){let[t,r]=f.useState(M0(e.items));function n(o,a){let i=t.slice();i[o]=a,r(i),e.onChange(i)}return s.createElement(ke,null,e.items.map((o,a)=>{if(!jae(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(fv,{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(R5,{key:o.linkId,title:o.text,htmlFor:o.linkId},s.createElement(tn,{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(Ge,{key:o.linkId,htmlFor:o.linkId,title:o.text??""},s.createElement(fv,{item:o,answers:e.answers,onChange:i=>n(a,i)}))}))}function fv(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(Y5,{items:t.item,answers:e.answers,onChange:a}));case"boolean":return s.createElement(tn,{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(Qa,{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(ec,{id:n,name:n,defaultValue:o==null?void 0:o.valueString,onChange:l=>i({valueString:l.currentTarget.value})});case"attachment":return s.createElement(C5,{name:n,defaultValue:o==null?void 0:o.valueAttachment,onChange:l=>i({valueAttachment:l})});case"reference":return s.createElement(Tm,{name:n,defaultValue:o==null?void 0:o.valueReference,onChange:l=>i({valueReference:l})});case"quantity":return s.createElement(Ga,{name:n,defaultValue:o==null?void 0:o.valueQuantity,onChange:l=>i({valueQuantity:l}),disableWheel:!0});case"choice":case"open-choice":return kae(t)?s.createElement(Sae,{name:n,item:t,initial:o,onChangeAnswer:i}):s.createElement(Pae,{name:n,item:t,initial:o,onChangeAnswer:i});default:return null}}function Sae(e){let{name:t,item:r,initial:n}=e,o=lo({type:"QuestionnaireItemInitial",value:n},"value"),a=[""];if(r.answerOption)for(let i of r.answerOption){let l=lo({type:"QuestionnaireItemAnswerOption",value:i},"value");a.push(oP(l))}return s.createElement(mt,{id:t,name:t,onChange:i=>{let l=i.currentTarget.selectedIndex;if(l===0){e.onChangeAnswer({});return}let c=r.answerOption[l-1],u=lo({type:"QuestionnaireItemAnswerOption",value:c},"value"),d="value"+_r(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 Pae(e){let{name:t,item:r,initial:n,onChangeAnswer:o}=e,a=St.types.QuestionnaireItemAnswerOption.properties["value[x]"],i=lo({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=lo({type:"QuestionnaireItemAnswerOption",value:d},"value");i&&wr(h)===wr(i)&&(c=m),l.push([m,h])}return s.createElement(ap.Group,{name:t,defaultValue:c,onChange:u=>{let d=l.find(m=>m[0]===u);if(d){let m=d[1],h="value"+_r(m.type);o({[h]:m.value})}}},l.map(([u,d])=>s.createElement(ap,{key:u,id:u,value:u,label:s.createElement(go,{property:a,propertyType:d.type,value:d.value})})))}function $ae(e){return{resourceType:"QuestionnaireResponse",questionnaire:ot(e),item:M0(e.item)}}function M0(e){return(e==null?void 0:e.map(Oae))??[]}function Oae(e){var t;return{linkId:e.linkId,text:e.text,item:M0(e.item),answer:((t=e.initial)==null?void 0:t.map(Cae))??[]}}function Cae(e){return{...e}}function kae(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 jae(e,t){if(!e.enableWhen)return!0;let r=e.enableBehavior??"any";for(let n of e.enableWhen){let o=lo({type:"QuestionnaireItemEnableWhen",value:n},"answer[x]"),a=lo({type:"QuestionnaireResponseItemAnswer",value:t[n.question]},"value[x]"),i=$m(o,a);if(r==="any"&&i)return!0;if(r==="all"&&!i)return!1}return r!=="any"}var Rae=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 Tae(e){let t=te(),r=Ye(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(Dae(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(De,{testid:"questionnaire-form",onSubmit:()=>e.onSubmit(a)},s.createElement(X5,{item:a,selectedKey:l,setSelectedKey:c,hoverKey:u,setHoverKey:d,onChange:i}),s.createElement(Z,{type:"submit"},"Save")))}function X5(e){var v;let{classes:t,cx:r}=Rae(),n=e.item,o=e.item,a=Eo(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(x){vt(x),e.setSelectedKey(e.item.id)}function h(x){vt(x),e.setHoverKey(e.item.id)}function g(x){var P;let b=d.current;e.onChange({...b,item:(P=b.item)==null?void 0:P.map(O=>O.id===x.id?x:O)})}function y(x){e.onChange({...e.item,item:[...e.item.item??[],x]})}function w(x){var b;e.onChange({...e.item,item:(b=e.item.item)==null?void 0:b.filter(P=>P!==x)})}function E(x,b){e.onChange({...d.current,[x]:b})}let _=r(t.section,{[t.editing]:c,[t.hovering]:u&&!c});return s.createElement("div",{"data-testid":o.linkId,className:_,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:x=>E("title",x.currentTarget.value)}),!a&&s.createElement(ec,{autosize:!0,minRows:2,defaultValue:o.text,onChange:x=>E("text",x.currentTarget.value)}),Eae(o)&&s.createElement(Iae,{options:o.answerOption,onChange:x=>E("answerOption",x)})):s.createElement(s.Fragment,null,n.title&&s.createElement(ce,null,n.title),o.text&&s.createElement("div",null,o.text),!i&&s.createElement(fv,{item:o,answers:{},onChange:()=>{}}))),(v=o.item)==null?void 0:v.map(x=>s.createElement("div",{key:x.id},s.createElement(X5,{item:x,selectedKey:e.selectedKey,setSelectedKey:e.setSelectedKey,hoverKey:e.hoverKey,setHoverKey:e.setHoverKey,onChange:g,onRemove:()=>w(x)}))),!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:x=>E("linkId",x.currentTarget.value)}),!i&&s.createElement(mt,{size:"xs",className:t.typeSelect,defaultValue:o.type,onChange:x=>E("type",x.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:x=>{x.preventDefault(),y({id:ll(),linkId:aP("q"),type:"string",text:"Question"})}},"Add item"),s.createElement(dt,{href:"#",onClick:x=>{x.preventDefault(),y({id:ll(),linkId:aP("g"),type:"group",text:"Group"})}},"Add group")),c&&!a&&s.createElement(dt,{href:"#",onClick:x=>{x.preventDefault(),e.onRemove&&e.onRemove()}},"Remove")))}function Iae(e){let t=St.types.QuestionnaireItemAnswerOption.properties["value[x]"],r=e.options??[];return s.createElement("div",null,r.map(n=>{let[o,a]=qa({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(Ka,{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=>{vt(i),e.onChange(r.filter(l=>l.id!==n.id))}},"Remove")))}),s.createElement(dt,{href:"#",onClick:n=>{vt(n),e.onChange([...r,{id:ll()}])}},"Add choice"))}var pv=1,mv=1;function aP(e){return e+pv++}function ll(){return"id-"+mv++}function Dae(e){return{...e,id:e.id||ll(),item:J5(e.item)}}function J5(e){if(e)return e.forEach(t=>{var r,n;(r=t.id)!=null&&r.match(/^id-\d+$/)&&(mv=Math.max(mv,parseInt(t.id.substring(3),10)+1)),(n=t.linkId)!=null&&n.match(/^q\d+$/)&&(pv=Math.max(pv,parseInt(t.linkId.substring(1),10)+1))}),e.map(t=>({...t,id:t.id||ll(),item:J5(t.item),answerOption:Nae(t.answerOption)}))}function Nae(e){if(e)return e.map(t=>({...t,id:t.id||ll()}))}var Aae=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"}})),Mae=["gender","age","gestationalAge","context","appliesTo"],zae={definition:{resourceType:"ObservationDefinition"},onSubmit:()=>{}};function Lae(e){e=Object.assign(zae,e);let t=e.definition,[r,n]=f.useState([]),[o,a]=f.useState(1),[i,l]=f.useState(1);return f.useEffect(()=>{let y=Bae(t,l);n(Uae(y.qualifiedInterval||[],a))},[t]),s.createElement(De,{testid:"reference-range-editor",onSubmit:c},s.createElement(ke,null,r.map(y=>{var w;return s.createElement(Fae,{unit:Hae((w=t.quantitativeDetails)==null?void 0:w.unit),onChange:m,onAdd:h,onRemove:g,onRemoveGroup:d,key:`group-${y.id}`,intervalGroup:y})})),s.createElement(Dr,{title:"Add Group",size:"sm",onClick:y=>{vt(y),u({id:`group-id-${o}`,filters:{},intervals:[]}),a(w=>w+1)}},s.createElement(g0,null)),s.createElement(J,{position:"right"},s.createElement(Z,{type:"submit"},"Save")));function c(){let y=r.flatMap(w=>w.intervals).filter(w=>!qae(w));e.onSubmit({...t,qualifiedInterval:y})}function u(y){n(w=>[...w,y])}function d(y){n(w=>w.filter(E=>E.id!==y.id))}function m(y,w){n(E=>{E=[...E];let _=E.find(x=>x.id===y),v=_==null?void 0:_.intervals.findIndex(x=>x.id===w.id);return v!==void 0&&(_!=null&&_.intervals[v])&&(_.intervals[v]=w),E})}function h(y,w){w.id===void 0&&(w.id=`id-${i}`,l(E=>E+1)),n(E=>{E=[...E];let _=E.findIndex(v=>v.id===y);if(_!==-1){let v={...E[_]};w={...w,...v.filters},v.intervals=[...v.intervals,w],E[_]=v}return E})}function g(y,w){n(E=>{E=[...E];let _=E.find(v=>v.id===y);return _&&(_.intervals=_.intervals.filter(v=>v.id!==w.id)),E})}}function Fae(e){let{intervalGroup:t,unit:r}=e,{classes:n}=Aae();return s.createElement(dc,{"data-testid":t.id,className:n.section},s.createElement(ke,{spacing:"lg"},s.createElement(J,{position:"right"},s.createElement(Dr,{title:"Remove Group","data-testid":`remove-group-button-${t.id}`,key:`remove-group-button-${t.id}`,size:"sm",onClick:o=>{vt(o),e.onRemoveGroup(t)}},s.createElement(xp,null))),s.createElement(Vae,{intervalGroup:t,onChange:e.onChange}),s.createElement(cr,null),t.intervals.map(o=>s.createElement(ke,{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=>{vt(a),e.onChange(t.id,{...o,condition:a.currentTarget.value.trim()})}}),s.createElement(Dr,{title:"Remove Interval",size:"sm",key:`remove-interval-${o.id}`,"data-testid":`remove-interval-${o.id}`,onClick:a=>{vt(a),e.onRemove(t.id,o)}},s.createElement(xp,null))),s.createElement(O0,{onChange:a=>{e.onChange(t.id,{...o,range:a})},key:`range-${o.id}`,name:`range-${o.id}`,defaultValue:o.range}))),s.createElement(Dr,{title:"Add Interval",size:"sm",onClick:o=>{vt(o),e.onAdd(t.id,{range:{low:{unit:r},high:{unit:r}}})}},s.createElement(g0,null))))}function Vae(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(ke,{style:{maxWidth:"50%"}},s.createElement(J,null,s.createElement(mt,{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(O0,{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(mt,{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 Bae(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 Uae(e,t){let r=1,n={};for(let o of e){let a=Wae(o);a in n||(n[a]={id:`group-id-${r++}`,filters:Object.fromEntries(Mae.map(i=>[i,o[i]])),intervals:[]}),n[a].intervals.push(o)}return t(r),Object.values(n)}function Wae(e){var t,r;return[`gender=${e.gender}`,`age=${As(e.age)}`,`gestationalAge=${As(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 Hae(e){return e&&(bee(e,"http://unitsofmeasure.org")||e.text)}function qae(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 Qae(e){var u;let t=te(),r=Ye(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(Yr,null,(u=r.action)==null?void 0:u.map((d,m)=>{var w,E,_,v,x,b;let h=d.resource&&c(d.resource),g=(E=(w=h==null?void 0:h.input)==null?void 0:w[0])==null?void 0:E.valueReference,y=(v=(_=h==null?void 0:h.output)==null?void 0:_[0])==null?void 0:v.valueReference;return s.createElement(s.Fragment,{key:`action-${m}`},s.createElement(Yr.Col,{span:1,p:"md"},(h==null?void 0:h.status)==="completed"?s.createElement(mre,null):s.createElement(jre,{color:"gray"})),s.createElement(Yr.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(fc,{value:(x=h==null?void 0:h.meta)==null?void 0:x.author})," on ",yr((b=h==null?void 0:h.meta)==null?void 0:b.lastUpdated)),s.createElement("div",null,"Status: ",s.createElement(z5,{status:(h==null?void 0:h.status)||"unknown"}))),s.createElement(Yr.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 Z5(e,t){let r=Gae(e,t);return Kae(r,e,t)}function Gae(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],w,E=0;u===-c||u!==c&&y.i<g.i?(E=g.i,w=g):(E=y.i+1,w=y),l[h]=void 0;let _=E-u,v={i:E,j:_,prev:Yae(w),snake:!1};for(;E<r&&_<n&&e[E]===t[_];)E++,_++;if(E>v.i&&(v={i:E,j:_,prev:v,snake:!0}),l[d]=v,E>=r&&_>=n)return l[d]}l[i+c-1]=void 0}}function Kae(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 Yae(e){return e&&!e.snake&&e.prev?e.prev:e}function Xae(e){let t=e.entry.filter(n=>!!n.resource).map(n=>{var o;return{meta:(o=n.resource)==null?void 0:o.meta,lines:wr(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 Jae(r,t),Zae(r),r}function Jae(e,t){for(let r=1;r<t.length;r++){let n=Z5(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 Zae(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 eie=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 tie(e){var l,c;let{classes:t}=eie(),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=Xae(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(Qi,{value:u.meta.author,link:!0})),s.createElement("td",{className:t.dateTime,rowSpan:u.span},s.createElement(je,{to:rie(a,u.meta.versionId)},nie(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 rie(e,t){return`/${e.resourceType}/${e.id}/_history/${t}`}function nie(e){let t=Math.floor((Date.now()-Date.parse(e))/1e3),r=Math.floor(t/31536e3);if(r>0)return vi(r,"year");let n=Math.floor(t/2592e3);if(n>0)return vi(n,"month");let o=Math.floor(t/86400);if(o>0)return vi(o,"day");let a=Math.floor(t/3600);if(a>0)return vi(a,"hour");let i=Math.floor(t/60);return i>0?vi(i,"minute"):vi(t,"second")}function vi(e,t){return`${e} ${e===1?t:t+"s"} ago`}var oie=W(e=>({removed:{color:e.colors.red[7],textDecoration:"line-through"},added:{color:e.colors.green[7]}}));function aie(e){let t=e.original,r=e.revised;e.ignoreMeta&&(t={...t,meta:void 0},r={...r,meta:void 0});let n=wr(t,!0).match(/[^\r\n]+/g),o=wr(r,!0).match(/[^\r\n]+/g),a=Z5(n,o);return s.createElement("pre",{style:{color:"gray"}},a.map((i,l)=>s.createElement(iie,{key:"delta"+l,delta:i})))}function iie(e){let{classes:t}=oie();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 lie(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(ti,{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(sie,{key:"entry-"+i,entry:a})))):s.createElement("div",null,"Loading...")}function sie(e){var n,o,a;let{response:t,resource:r}=e.entry;return r?s.createElement("tr",null,s.createElement("td",null,s.createElement(Qi,{value:(n=r.meta)==null?void 0:n.author,link:!0})),s.createElement("td",null,yr((o=r.meta)==null?void 0:o.lastUpdated)),s.createElement("td",null,s.createElement(je,{to:cie(r)},(a=r.meta)==null?void 0:a.versionId))):s.createElement("tr",null,s.createElement("td",{colSpan:3},Oe(t==null?void 0:t.outcome)))}function cie(e){var t;return`/${e.resourceType}/${e.id}/_history/${(t=e.meta)==null?void 0:t.versionId}`}function uie(e){return s.createElement(Im,{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 eD(e){let t=te(),[r,n]=f.useState();return s.createElement(De,{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(Xt,{sx:{flexDirection:"column"}},s.createElement(En,{size:32}),s.createElement(ce,null,"Create project")),s.createElement(ke,{spacing:"xl"},s.createElement(ne,{name:"projectName",label:"Project Name",placeholder:"My Project",required:!0,autoFocus:!0,error:et(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 tD(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 rD(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"){tD("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 nD(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 oD(e){typeof grecaptcha>"u"&&tD("https://www.google.com/recaptcha/api.js?render="+e)}function aD(e){return new Promise((t,r)=>{grecaptcha.ready(async()=>{try{t(await grecaptcha.execute(e,{action:"submit"}))}catch(n){r(n)}})})}function die(e){let t=nD(e.googleClientId),r=e.recaptchaSiteKey,n=te(),[o,a]=f.useState(),i=$0(o,void 0);return f.useEffect(()=>{r&&oD(r)},[r]),s.createElement(De,{style:{maxWidth:400},onSubmit:async l=>{try{let c="";r&&(c=await aD(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(Xt,{sx:{flexDirection:"column"}},e.children),s.createElement(ni,{issues:i}),t&&s.createElement(s.Fragment,null,s.createElement(J,{position:"center",p:"xl",style:{height:70}},s.createElement(rD,{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(cr,{label:"or",labelPosition:"center",my:"lg"})),s.createElement(ke,{spacing:"xl"},s.createElement(ne,{name:"firstName",type:"text",label:"First name",placeholder:"First name",required:!0,autoFocus:!0,error:et(o,"firstName")}),s.createElement(ne,{name:"lastName",type:"text",label:"Last name",placeholder:"Last name",required:!0,error:et(o,"lastName")}),s.createElement(ne,{name:"email",type:"email",label:"Email",placeholder:"name@domain.com",required:!0,error:et(o,"email")}),s.createElement(io,{name:"password",label:"Password",autoComplete:"off",required:!0,error:et(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(tn,{name:"remember",label:"Remember me",size:"xs"}),s.createElement(Z,{type:"submit"},"Create account")))}function fie(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(die,{projectId:r,clientId:n,googleClientId:o,recaptchaSiteKey:a,handleAuthResponse:h},e.children),c&&t==="project"&&s.createElement(eD,{login:c,handleAuthResponse:h}))}function pie(e){let[t,r]=f.useState();return t?s.createElement(hie,{email:t,...e}):s.createElement(mie,{setEmail:r,...e})}function mie(e){let{setEmail:t,onRegister:r,handleAuthResponse:n,children:o,...a}=e,i=te(),l=!e.disableGoogleAuth&&nD(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(De,{style:{maxWidth:400},onSubmit:u},s.createElement(Xt,{sx:{flexDirection:"column"}},o),l&&s.createElement(s.Fragment,null,s.createElement(J,{position:"center",p:"xl",style:{height:70}},s.createElement(rD,{googleClientId:l,handleGoogleCredential:d})),s.createElement(cr,{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 hie(e){let{onForgotPassword:t,handleAuthResponse:r,children:n,...o}=e,a=te(),[i,l]=f.useState(),c=$0(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(De,{style:{maxWidth:400},onSubmit:u},s.createElement(Xt,{sx:{flexDirection:"column"}},n),s.createElement(ni,{issues:c}),s.createElement(ke,{spacing:"xl"},s.createElement(io,{name:"password",label:"Password",autoComplete:"off",required:!0,autoFocus:!0,error:et(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(tn,{id:"remember",name:"remember",label:"Remember me",size:"xs",sx:{lineHeight:1}}),s.createElement(Z,{type:"submit"},"Sign in")))}function gie(e){let t=te(),[r,n]=f.useState();return s.createElement(ke,null,s.createElement(Xt,{sx:{flexDirection:"column"}},s.createElement(En,{size:32}),s.createElement(ce,{order:3},"Choose profile")),s.createElement(ni,{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(tf,{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 vie(e){let t=te();return s.createElement(De,{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(ke,null,s.createElement(Xt,{sx:{flexDirection:"column"}},s.createElement(En,{size:32}),s.createElement(ce,null,"Choose scope")),s.createElement(ke,null,(e.scope??"openid").split(" ").map(r=>s.createElement(tn,{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 yie(e){let t=te(),[r,n]=f.useState(void 0);return s.createElement(De,{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(Oe(a)))}},s.createElement(ke,null,s.createElement(Xt,{sx:{flexDirection:"column"}},s.createElement(En,{size:32}),s.createElement(ce,null,"Enter MFA code")),r&&s.createElement(Ys,{icon:s.createElement(h0,{size:16}),title:"Error",color:"red"},r),s.createElement(ke,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 iD(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),w=f.useCallback(v=>{i?i(v):c.processCode(v).then(()=>{n&&n()}).catch(x=>le({color:"red",message:Oe(x)}))},[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):w(v.code))},[r,w]),_=f.useCallback(v=>{w(v.code)},[w]);return f.useEffect(()=>{t&&!u&&c.get("auth/login/"+t).then(E).catch(v=>le({color:"red",message:Oe(v)}))},[c,t,u,E]),s.createElement(_e,{width:450},(()=>u?m?s.createElement(yie,{login:u,handleAuthResponse:E}):g?s.createElement(gie,{login:u,memberships:g,handleAuthResponse:E}):e.projectId==="new"?s.createElement(eD,{login:u,handleAuthResponse:E}):e.chooseScopes?s.createElement(vie,{login:u,scope:e.scope,handleAuthResponse:_}):s.createElement("div",null,"Success"):s.createElement(pie,{onForgotPassword:o,onRegister:a,handleAuthResponse:E,disableGoogleAuth:e.disableGoogleAuth,...l},e.children))())}var lD,iP=Gs;lD=iP.createRoot,iP.hydrateRoot;/**
|
|
184
|
+
* @remix-run/router v1.7.2
|
|
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 wie(e){e===void 0&&(e={});function t(n,o){let{pathname:a,search:i,hash:l}=n.location;return Ms("",{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:mc(o)}return xie(t,r,null,e)}function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function sl(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _ie(){return Math.random().toString(36).substr(2,8)}function sP(e,t){return{usr:e.state,key:e.key,idx:t}}function Ms(e,t,r,n){return r===void 0&&(r=null),rt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?So(t):t,{state:r,key:t&&t.key||n||_ie()})}function mc(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 So(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 xie(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(),_=E==null?null:E-u;u=E,c&&c({action:l,location:w.location,delta:_})}function h(E,_){l=Ot.Push;let v=Ms(w.location,E,_);r&&r(v,E),u=d()+1;let x=sP(v,u),b=w.createHref(v);try{i.pushState(x,"",b)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(b)}a&&c&&c({action:l,location:w.location,delta:1})}function g(E,_){l=Ot.Replace;let v=Ms(w.location,E,_);r&&r(v,E),u=d();let x=sP(v,u),b=w.createHref(v);i.replaceState(x,"",b),a&&c&&c({action:l,location:w.location,delta:0})}function y(E){let _=o.location.origin!=="null"?o.location.origin:o.location.href,v=typeof E=="string"?E:mc(E);return $e(_,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,_)}let w={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 _=y(E);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:h,replace:g,go(E){return i.go(E)}};return w}var Tt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Tt||(Tt={}));const bie=new Set(["lazy","caseSensitive","path","id","index","children"]);function Eie(e){return e.index===!0}function hv(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($e(o.index!==!0||!o.children,"Cannot specify children on an index route"),$e(!n[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),Eie(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=hv(o.children,t,i,n)),c}})}function Ni(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?So(t):t,o=hc(n.pathname||"/",r);if(o==null)return null;let a=sD(e);Sie(a);let i=null;for(let l=0;i==null&&l<a.length;++l)i=Iie(a[l],Aie(o));return i}function sD(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("/")&&($e(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&&($e(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),sD(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:Rie(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 cD(a.path))o(a,i,c)}),t}function cD(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=cD(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 Sie(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Tie(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Pie=/^:\w+$/,$ie=3,Oie=2,Cie=1,kie=10,jie=-2,cP=e=>e==="*";function Rie(e,t){let r=e.split("/"),n=r.length;return r.some(cP)&&(n+=jie),t&&(n+=Oie),r.filter(o=>!cP(o)).reduce((o,a)=>o+(Pie.test(a)?$ie:a===""?Cie:kie),n)}function Tie(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 Iie(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=Die({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:Fie(Xo([o,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(o=Xo([o,d.pathnameBase]))}return a}function Die(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Nie(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]=Mie(l[m]||"",d),u},{}),pathname:a,pathnameBase:i,pattern:e}}function Nie(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),sl(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 Aie(e){try{return decodeURI(e)}catch(t){return sl(!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 Mie(e,t){try{return decodeURIComponent(e)}catch(r){return sl(!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 hc(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 zie(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?So(e):e;return{pathname:r?r.startsWith("/")?r:Lie(r,t):t,search:Vie(n),hash:Bie(o)}}function Lie(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 Fh(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 z0(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function uD(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=So(e):(o=rt({},e),$e(!o.pathname||!o.pathname.includes("?"),Fh("?","pathname","search",o)),$e(!o.pathname||!o.pathname.includes("#"),Fh("#","pathname","hash",o)),$e(!o.search||!o.search.includes("#"),Fh("#","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=zie(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,"/"),Fie=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vie=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Bie=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class L0{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 dD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fD=["post","put","patch","delete"],Uie=new Set(fD),Wie=["get",...fD],Hie=new Set(Wie),qie=new Set([301,302,303,307,308]),Qie=new Set([307,308]),Vh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gie={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Kie=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Yie(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;$e(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=Kie;let a={},i=hv(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,w=e.hydrationData!=null,E=Ni(i,e.history.location,c),_=null;if(E==null){let I=qr(404,{pathname:e.history.location.pathname}),{matches:D,route:F}=vP(i);E=D,_={[F.id]:I}}let v=!E.some(I=>I.route.lazy)&&(!E.some(I=>I.route.loader)||e.hydrationData!=null),x,b={historyAction:e.history.action,location:e.history.location,matches:E,initialized:v,navigation:Vh,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||_,fetchers:new Map,blockers:new Map},P=Ot.Pop,O=!1,$,C=!1,R=!1,j=[],k=[],T=new Map,L=0,B=-1,V=new Map,M=new Set,Q=new Map,A=new Map,z=new Map,H=!1;function ie(){return d=e.history.listen(I=>{let{action:D,location:F,delta:K}=I;if(H){H=!1;return}sl(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=it({currentLocation:b.location,nextLocation:F,historyAction:D});if(he&&K!=null){H=!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(b.blockers);ge.set(he,Bl),de({blockers:ge})}});return}return tt(D,F)}),b.initialized||tt(Ot.Pop,b.location),x}function we(){d&&d(),m.clear(),$&&$.abort(),b.fetchers.forEach((I,D)=>Br(D)),b.blockers.forEach((I,D)=>fe(D))}function Ie(I){return m.add(I),()=>m.delete(I)}function de(I){b=rt({},b,I),m.forEach(D=>D(b))}function He(I,D){var F,K;let he=b.actionData!=null&&b.navigation.formMethod!=null&&fn(b.navigation.formMethod)&&b.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=b.actionData:ge=null;let ye=D.loaderData?gP(b.loaderData,D.loaderData,D.matches||[],D.errors):b.loaderData,pe=b.blockers;pe.size>0&&(pe=new Map(pe),pe.forEach((Fe,st)=>pe.set(st,Bl)));let oe=O===!0||b.navigation.formMethod!=null&&fn(b.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)),de(rt({},D,{actionData:ge,loaderData:ye,historyAction:P,location:I,initialized:!0,navigation:Vh,revalidation:"idle",restoreScrollPosition:$o(I,D.matches||b.matches),preventScrollReset:oe,blockers:pe})),P=Ot.Pop,O=!1,C=!1,R=!1,j=[],k=[]}async function Le(I,D){if(typeof I=="number"){e.history.go(I);return}let F=gv(b.location,b.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),ye=b.location,pe=Ms(b.location,K,D&&D.state);pe=rt({},pe,e.history.encodeLocation(pe));let oe=D&&D.replace!=null?D.replace:void 0,Fe=Ot.Push;oe===!0?Fe=Ot.Replace:oe===!1||he!=null&&fn(he.formMethod)&&he.formAction===b.location.pathname+b.location.search&&(Fe=Ot.Replace);let st=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,xe=it({currentLocation:ye,nextLocation:pe,historyAction:Fe});if(xe){We(xe,{state:"blocked",location:pe,proceed(){We(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:pe}),Le(I,D)},reset(){let Ce=new Map(b.blockers);Ce.set(xe,Bl),de({blockers:Ce})}});return}return await tt(Fe,pe,{submission:he,pendingError:ge,preventScrollReset:st,replace:D&&D.replace})}function wt(){if(Ue(),de({revalidation:"loading"}),b.navigation.state!=="submitting"){if(b.navigation.state==="idle"){tt(b.historyAction,b.location,{startUninterruptedRevalidation:!0});return}tt(P||b.historyAction,b.navigation.location,{overrideNavigation:b.navigation})}}async function tt(I,D,F){$&&$.abort(),$=null,P=I,C=(F&&F.startUninterruptedRevalidation)===!0,Pr(b.location,b.matches),O=(F&&F.preventScrollReset)===!0;let K=l||i,he=F&&F.overrideNavigation,ge=Ni(K,D,c);if(!ge){let Ce=qr(404,{pathname:D.pathname}),{matches:$t,route:Ht}=vP(K);lt(),He(D,{matches:$t,loaderData:{},errors:{[Ht.id]:Ce}});return}if(b.initialized&&!R&&tle(b.location,D)&&!(F&&F.submission&&fn(F.submission.formMethod))){He(D,{matches:ge});return}$=new AbortController;let ye=Wl(e.history,D,$.signal,F&&F.submission),pe,oe;if(F&&F.pendingError)oe={[Ai(ge).route.id]:F.pendingError};else if(F&&F.submission&&fn(F.submission.formMethod)){let Ce=await Er(ye,D,F.submission,ge,{replace:F.replace});if(Ce.shortCircuited)return;pe=Ce.pendingActionData,oe=Ce.pendingActionError,he=mu(D,F.submission),ye=new Request(ye.url,{signal:ye.signal})}let{shortCircuited:Fe,loaderData:st,errors:xe}=await nn(ye,D,ge,he,F&&F.submission,F&&F.fetcherSubmission,F&&F.replace,pe,oe);Fe||($=null,He(D,rt({matches:ge},pe?{actionData:pe}:{},{loaderData:st,errors:xe})))}async function Er(I,D,F,K,he){he===void 0&&(he={}),Ue();let ge=ile(D,F);de({navigation:ge});let ye,pe=yv(K,D);if(!pe.route.action&&!pe.route.lazy)ye={type:Tt.error,error:qr(405,{method:I.method,pathname:D.pathname,routeId:pe.route.id})};else if(ye=await Ul("action",I,pe,K,a,o,c),I.signal.aborted)return{shortCircuited:!0};if(Gi(ye)){let oe;return he&&he.replace!=null?oe=he.replace:oe=ye.location===b.location.pathname+b.location.search,await Sr(b,ye,{submission:F,replace:oe}),{shortCircuited:!0}}if(ps(ye)){let oe=Ai(K,pe.route.id);return(he&&he.replace)!==!0&&(P=Ot.Push),{pendingActionData:{},pendingActionError:{[oe.route.id]:ye.error}}}if(Ia(ye))throw qr(400,{type:"defer-action"});return{pendingActionData:{[pe.route.id]:ye.data}}}async function nn(I,D,F,K,he,ge,ye,pe,oe){let Fe=K||mu(D,he),st=he||ge||_P(Fe),xe=l||i,[Ce,$t]=dP(e.history,b,F,st,D,R,j,k,Q,M,xe,c,pe,oe);if(lt(Ne=>!(F&&F.some(er=>er.route.id===Ne))||Ce&&Ce.some(er=>er.route.id===Ne)),B=++L,Ce.length===0&&$t.length===0){let Ne=ai();return He(D,rt({matches:F,loaderData:{},errors:oe||null},pe?{actionData:pe}:{},Ne?{fetchers:new Map(b.fetchers)}:{})),{shortCircuited:!0}}if(!C){$t.forEach(er=>{let Pn=b.fetchers.get(er.key),ga=Hl(void 0,Pn?Pn.data:void 0);b.fetchers.set(er.key,ga)});let Ne=pe||b.actionData;de(rt({navigation:Fe},Ne?Object.keys(Ne).length===0?{actionData:null}:{actionData:Ne}:{},$t.length>0?{fetchers:new Map(b.fetchers)}:{}))}$t.forEach(Ne=>{T.has(Ne.key)&&_t(Ne.key),Ne.controller&&T.set(Ne.key,Ne.controller)});let Ht=()=>$t.forEach(Ne=>_t(Ne.key));$&&$.signal.addEventListener("abort",Ht);let{results:Sn,loaderResults:ma,fetcherResults:ar}=await Gn(b.matches,F,Ce,$t,I);if(I.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",Ht),$t.forEach(Ne=>T.delete(Ne.key));let ir=yP(Sn);if(ir){if(ir.idx>=Ce.length){let Ne=$t[ir.idx-Ce.length].key;M.add(Ne)}return await Sr(b,ir.result,{replace:ye}),{shortCircuited:!0}}let{loaderData:ln,errors:ha}=hP(b,F,Ce,ma,oe,$t,ar,A);A.forEach((Ne,er)=>{Ne.subscribe(Pn=>{(Pn||Ne.done)&&A.delete(er)})});let Oo=ai(),li=ii(B),xl=Oo||li||$t.length>0;return rt({loaderData:ln,errors:ha},xl?{fetchers:new Map(b.fetchers)}:{})}function on(I){return b.fetchers.get(I)||Gie}function Fr(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=gv(b.location,b.matches,c,u.v7_prependBasename,F,D,K==null?void 0:K.relative),ye=Ni(he,ge,c);if(!ye){Vr(I,D,qr(404,{pathname:ge}));return}let{path:pe,submission:oe,error:Fe}=uP(u.v7_normalizeFormMethod,!0,ge,K);if(Fe){Vr(I,D,Fe);return}let st=yv(ye,pe);if(O=(K&&K.preventScrollReset)===!0,oe&&fn(oe.formMethod)){Po(I,D,pe,st,ye,oe);return}Q.set(I,{routeId:D,path:pe}),jt(I,D,pe,st,ye,oe)}async function Po(I,D,F,K,he,ge){if(Ue(),Q.delete(I),!K.route.action&&!K.route.lazy){let Ee=qr(405,{method:ge.formMethod,pathname:F,routeId:D});Vr(I,D,Ee);return}let ye=b.fetchers.get(I),pe=lle(ge,ye);b.fetchers.set(I,pe),de({fetchers:new Map(b.fetchers)});let oe=new AbortController,Fe=Wl(e.history,F,oe.signal,ge);T.set(I,oe);let st=L,xe=await Ul("action",Fe,K,he,a,o,c);if(Fe.signal.aborted){T.get(I)===oe&&T.delete(I);return}if(Gi(xe))if(T.delete(I),B>st){let Ee=_i(void 0);b.fetchers.set(I,Ee),de({fetchers:new Map(b.fetchers)});return}else{M.add(I);let Ee=Hl(ge);return b.fetchers.set(I,Ee),de({fetchers:new Map(b.fetchers)}),Sr(b,xe,{submission:ge,isFetchActionRedirect:!0})}if(ps(xe)){Vr(I,D,xe.error);return}if(Ia(xe))throw qr(400,{type:"defer-action"});let Ce=b.navigation.location||b.location,$t=Wl(e.history,Ce,oe.signal),Ht=l||i,Sn=b.navigation.state!=="idle"?Ni(Ht,b.navigation.location,c):b.matches;$e(Sn,"Didn't find any matches after fetcher action");let ma=++L;V.set(I,ma);let ar=Hl(ge,xe.data);b.fetchers.set(I,ar);let[ir,ln]=dP(e.history,b,Sn,ge,Ce,R,j,k,Q,M,Ht,c,{[K.route.id]:xe.data},void 0);ln.filter(Ee=>Ee.key!==I).forEach(Ee=>{let Ur=Ee.key,lr=b.fetchers.get(Ur),wc=Hl(void 0,lr?lr.data:void 0);b.fetchers.set(Ur,wc),T.has(Ur)&&_t(Ur),Ee.controller&&T.set(Ur,Ee.controller)}),de({fetchers:new Map(b.fetchers)});let ha=()=>ln.forEach(Ee=>_t(Ee.key));oe.signal.addEventListener("abort",ha);let{results:Oo,loaderResults:li,fetcherResults:xl}=await Gn(b.matches,Sn,ir,ln,$t);if(oe.signal.aborted)return;oe.signal.removeEventListener("abort",ha),V.delete(I),T.delete(I),ln.forEach(Ee=>T.delete(Ee.key));let Ne=yP(Oo);if(Ne){if(Ne.idx>=ir.length){let Ee=ln[Ne.idx-ir.length].key;M.add(Ee)}return Sr(b,Ne.result)}let{loaderData:er,errors:Pn}=hP(b,b.matches,ir,li,void 0,ln,xl,A);if(b.fetchers.has(I)){let Ee=_i(xe.data);b.fetchers.set(I,Ee)}let ga=ii(ma);b.navigation.state==="loading"&&ma>B?($e(P,"Expected pending action"),$&&$.abort(),He(b.navigation.location,{matches:Sn,loaderData:er,errors:Pn,fetchers:new Map(b.fetchers)})):(de(rt({errors:Pn,loaderData:gP(b.loaderData,er,Sn,Pn)},ga||ln.length>0?{fetchers:new Map(b.fetchers)}:{})),R=!1)}async function jt(I,D,F,K,he,ge){let ye=b.fetchers.get(I),pe=Hl(ge,ye?ye.data:void 0);b.fetchers.set(I,pe),de({fetchers:new Map(b.fetchers)});let oe=new AbortController,Fe=Wl(e.history,F,oe.signal);T.set(I,oe);let st=L,xe=await Ul("loader",Fe,K,he,a,o,c);if(Ia(xe)&&(xe=await gD(xe,Fe.signal,!0)||xe),T.get(I)===oe&&T.delete(I),Fe.signal.aborted)return;if(Gi(xe))if(B>st){let $t=_i(void 0);b.fetchers.set(I,$t),de({fetchers:new Map(b.fetchers)});return}else{M.add(I),await Sr(b,xe);return}if(ps(xe)){let $t=Ai(b.matches,D);b.fetchers.delete(I),de({fetchers:new Map(b.fetchers),errors:{[$t.route.id]:xe.error}});return}$e(!Ia(xe),"Unhandled fetcher deferred data");let Ce=_i(xe.data);b.fetchers.set(I,Ce),de({fetchers:new Map(b.fetchers)})}async function Sr(I,D,F){let{submission:K,replace:he,isFetchActionRedirect:ge}=F===void 0?{}:F;D.revalidate&&(R=!0);let ye=Ms(I.location,D.location,rt({_isRedirect:!0},ge?{_isFetchActionRedirect:!0}:{}));if($e(ye,"Expected a location on the redirect navigation"),pD.test(D.location)&&r){let Fe=e.history.createURL(D.location),st=hc(Fe.pathname,c)==null;if(t.location.origin!==Fe.origin||st){he?t.location.replace(D.location):t.location.assign(D.location);return}}$=null;let pe=he===!0?Ot.Replace:Ot.Push,oe=K||_P(I.navigation);if(Qie.has(D.status)&&oe&&fn(oe.formMethod))await tt(pe,ye,{submission:rt({},oe,{formAction:D.location}),preventScrollReset:O});else if(ge)await tt(pe,ye,{overrideNavigation:mu(ye),fetcherSubmission:oe,preventScrollReset:O});else{let Fe=mu(ye,oe);await tt(pe,ye,{overrideNavigation:Fe,preventScrollReset:O})}}async function Gn(I,D,F,K,he){let ge=await Promise.all([...F.map(oe=>Ul("loader",he,oe,D,a,o,c)),...K.map(oe=>oe.matches&&oe.match&&oe.controller?Ul("loader",Wl(e.history,oe.path,oe.controller.signal),oe.match,oe.matches,a,o,c):{type:Tt.error,error:qr(404,{pathname:oe.path})})]),ye=ge.slice(0,F.length),pe=ge.slice(F.length);return await Promise.all([wP(I,F,ye,ye.map(()=>he.signal),!1,b.loaderData),wP(I,K.map(oe=>oe.match),pe,K.map(oe=>oe.controller?oe.controller.signal:null),!0)]),{results:ge,loaderResults:ye,fetcherResults:pe}}function Ue(){R=!0,j.push(...lt()),Q.forEach((I,D)=>{T.has(D)&&(k.push(D),_t(D))})}function Vr(I,D,F){let K=Ai(b.matches,D);Br(I),de({errors:{[K.route.id]:F},fetchers:new Map(b.fetchers)})}function Br(I){let D=b.fetchers.get(I);T.has(I)&&!(D&&D.state==="loading"&&V.has(I))&&_t(I),Q.delete(I),V.delete(I),M.delete(I),b.fetchers.delete(I)}function _t(I){let D=T.get(I);$e(D,"Expected fetch controller: "+I),D.abort(),T.delete(I)}function oi(I){for(let D of I){let F=on(D),K=_i(F.data);b.fetchers.set(D,K)}}function ai(){let I=[],D=!1;for(let F of M){let K=b.fetchers.get(F);$e(K,"Expected fetcher: "+F),K.state==="loading"&&(M.delete(F),I.push(F),D=!0)}return oi(I),D}function ii(I){let D=[];for(let[F,K]of V)if(K<I){let he=b.fetchers.get(F);$e(he,"Expected fetcher: "+F),he.state==="loading"&&(_t(F),V.delete(F),D.push(F))}return oi(D),D.length>0}function Y(I,D){let F=b.blockers.get(I)||Bl;return z.get(I)!==D&&z.set(I,D),F}function fe(I){b.blockers.delete(I),z.delete(I)}function We(I,D){let F=b.blockers.get(I)||Bl;$e(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(b.blockers);K.set(I,D),de({blockers:K})}function it(I){let{currentLocation:D,nextLocation:F,historyAction:K}=I;if(z.size===0)return;z.size>1&&sl(!1,"A router only supports one blocker at a time");let he=Array.from(z.entries()),[ge,ye]=he[he.length-1],pe=b.blockers.get(ge);if(!(pe&&pe.state==="proceeding")&&ye({currentLocation:D,nextLocation:F,historyAction:K}))return ge}function lt(I){let D=[];return A.forEach((F,K)=>{(!I||I(K))&&(F.cancel(),D.push(K),A.delete(K))}),D}function Kn(I,D,F){if(h=I,y=D,g=F||null,!w&&b.navigation===Vh){w=!0;let K=$o(b.location,b.matches);K!=null&&de({restoreScrollPosition:K})}return()=>{h=null,y=null,g=null}}function an(I,D){return g&&g(I,D.map(K=>ale(K,b.loaderData)))||I.key}function Pr(I,D){if(h&&y){let F=an(I,D);h[F]=y()}}function $o(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=hv(I,o,void 0,a)}return x={get basename(){return c},get state(){return b},get routes(){return i},initialize:ie,subscribe:Ie,enableScrollRestoration:Kn,navigate:Le,fetch:Fr,revalidate:wt,createHref:I=>e.history.createHref(I),encodeLocation:I=>e.history.encodeLocation(I),getFetcher:on,deleteFetcher:Br,dispose:we,getBlocker:Y,deleteBlocker:fe,_internalFetchControllers:T,_internalActiveDeferreds:A,_internalSetRoutes:pa},x}function Xie(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function gv(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=uD(o||".",z0(l).map(d=>d.pathnameBase),hc(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&&!F0(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Xo([r,u.pathname])),mc(u)}function uP(e,t,r,n){if(!n||!Xie(n))return{path:r};if(n.formMethod&&!ole(n.formMethod))return{path:r,error:qr(405,{method:n.formMethod})};let o=()=>({path:r,error:qr(400,{type:"invalid-body"})}),a=n.formMethod||"get",i=e?a.toUpperCase():a.toLowerCase(),l=hD(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!fn(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[w,E]=y;return""+g+w+"="+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(!fn(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()}}}$e(typeof FormData=="function","FormData is not available in this environment");let c,u;if(n.formData)c=vv(n.formData),u=n.formData;else if(n.body instanceof FormData)c=vv(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(fn(d.formMethod))return{path:r,submission:d};let m=So(r);return t&&m.search&&F0(m.search)&&c.append("index",""),m.search="?"+c,{path:mc(m),submission:d}}function Jie(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,w=e.createURL(t.location),E=e.createURL(o),_=g?Object.keys(g)[0]:void 0,x=Jie(r,_).filter((P,O)=>{if(P.route.lazy)return!0;if(P.route.loader==null)return!1;if(Zie(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:w,currentParams:$.params,nextUrl:E,nextParams:C.params},n,{actionResult:y,defaultShouldRevalidate:a||w.pathname+w.search===E.pathname+E.search||w.search!==E.search||mD($,C)}))}),b=[];return c.forEach((P,O)=>{if(!r.some(k=>k.route.id===P.routeId))return;let $=Ni(d,P.path,m);if(!$){b.push({key:O,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let C=t.fetchers.get(O),R=yv($,P.path),j=!1;u.has(O)?j=!1:l.includes(O)?j=!0:C&&C.state!=="idle"&&C.data===void 0?j=a:j=fP(R,rt({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:E,nextParams:r[r.length-1].params},n,{actionResult:y,defaultShouldRevalidate:a})),j&&b.push({key:O,routeId:P.routeId,path:P.path,matches:$,match:R,controller:new AbortController})}),[x,b]}function Zie(e,t,r){let n=!t||r.route.id!==t.route.id,o=e[r.route.id]===void 0;return n||o}function mD(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];$e(o,"No route found in manifest");let a={};for(let i in n){let c=o[i]!==void 0&&i!=="hasErrorBoundary";sl(!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&&!bie.has(i)&&(a[i]=n[i])}Object.assign(o,a),Object.assign(o,rt({},t(o),{lazy:void 0}))}async function Ul(e,t,r,n,o,a,i,l){l===void 0&&(l={});let c,u,d,m=y=>{let w,E=new Promise((_,v)=>w=v);return d=()=>w(),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 w=new URL(t.url),E=w.pathname+w.search;throw qr(405,{method:t.method,pathname:E,routeId:r.route.id})}else return{type:Tt.data,data:void 0};else if(y)u=await m(y);else{let w=new URL(t.url),E=w.pathname+w.search;throw qr(404,{pathname:E})}$e(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=Tt.error,u=y}finally{d&&t.signal.removeEventListener("abort",d)}if(nle(u)){let y=u.status;if(qie.has(y)){let _=u.headers.get("Location");if($e(_,"Redirects returned/thrown from loaders/actions must have a Location header"),!pD.test(_))_=gv(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,_);else if(!l.isStaticRequest){let v=new URL(t.url),x=_.startsWith("//")?new URL(v.protocol+_):new URL(_),b=hc(x.pathname,i)!=null;x.origin===v.origin&&b&&(_=x.pathname+x.search+x.hash)}if(l.isStaticRequest)throw u.headers.set("Location",_),u;return{type:Tt.redirect,status:y,location:_,revalidate:u.headers.get("X-Remix-Revalidate")!==null}}if(l.isRouteRequest)throw{type:c||Tt.data,response:u};let w,E=u.headers.get("Content-Type");return E&&/\bapplication\/json\b/.test(E)?w=await u.json():w=await u.text(),c===Tt.error?{type:c,error:new L0(y,u.statusText,w),headers:u.headers}:{type:Tt.data,data:w,statusCode:u.status,headers:u.headers}}if(c===Tt.error)return{type:c,error:u};if(rle(u)){var h,g;return{type:Tt.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:Tt.data,data:u}}function Wl(e,t,r,n){let o=e.createURL(hD(t)).toString(),a={signal:r};if(n&&fn(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=vv(n.formData):a.body=n.formData}return new Request(o,a)}function vv(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 ele(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($e(!Gi(d),"Cannot handle redirect results in processLoaderData"),ps(d)){let g=Ai(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=dD(d.error)?d.error.status:500),d.headers&&(u[h]=d.headers)}else Ia(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}=ele(t,r,n,o,l);for(let d=0;d<a.length;d++){let{key:m,match:h,controller:g}=a[d];$e(i!==void 0&&i[d]!==void 0,"Did not find corresponding fetcher result");let y=i[d];if(!(g&&g.signal.aborted))if(ps(y)){let w=Ai(e.matches,h==null?void 0:h.route.id);u&&u[w.route.id]||(u=rt({},u,{[w.route.id]:y.error})),e.fetchers.delete(m)}else if(Gi(y))$e(!1,"Unhandled fetcher revalidation redirect");else if(Ia(y))$e(!1,"Unhandled fetcher deferred data");else{let w=_i(y.data);e.fetchers.set(m,w)}}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 Ai(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 qr(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 L0(e||500,i,new Error(l),!0)}function yP(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Gi(r))return{result:r,idx:t}}}function hD(e){let t=typeof e=="string"?So(e):e;return mc(rt({},t,{hash:""}))}function tle(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ia(e){return e.type===Tt.deferred}function ps(e){return e.type===Tt.error}function Gi(e){return(e&&e.type)===Tt.redirect}function rle(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 nle(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ole(e){return Hie.has(e.toLowerCase())}function fn(e){return Uie.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&&!mD(u,c)&&(a&&a[c.route.id])!==void 0;if(Ia(l)&&(o||d)){let m=n[i];$e(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await gD(l,m,o).then(h=>{h&&(r[i]=h||r[i])})}}}async function gD(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Tt.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Tt.error,error:o}}return{type:Tt.data,data:e.deferredData.data}}}function F0(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ale(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 yv(e,t){let r=typeof t=="string"?So(t).search:t.search;if(e[e.length-1].route.index&&F0(r||""))return e[e.length-1];let n=z0(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 mu(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 ile(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 Hl(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 lle(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 _i(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.2
|
|
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 Sp(){return Sp=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},Sp.apply(this,arguments)}const Am=f.createContext(null),vD=f.createContext(null),Mm=f.createContext(null),zm=f.createContext(null),ua=f.createContext({outlet:null,matches:[],isDataRoute:!1}),yD=f.createContext(null);function Lm(){return f.useContext(zm)!=null}function da(){return Lm()||$e(!1),f.useContext(zm).location}function wD(e){f.useContext(Mm).static||f.useLayoutEffect(e)}function Pt(){let{isDataRoute:e}=f.useContext(ua);return e?xle():sle()}function sle(){Lm()||$e(!1);let e=f.useContext(Am),{basename:t,navigator:r}=f.useContext(Mm),{matches:n}=f.useContext(ua),{pathname:o}=da(),a=JSON.stringify(z0(n).map(c=>c.pathnameBase)),i=f.useRef(!1);return wD(()=>{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=uD(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 cle=f.createContext(null);function ule(e){let t=f.useContext(ua).outlet;return t&&f.createElement(cle.Provider,{value:e},t)}function Xe(){let{matches:e}=f.useContext(ua),t=e[e.length-1];return t?t.params:{}}function dle(e,t){return _D(e,t)}function _D(e,t,r){Lm()||$e(!1);let{navigator:n}=f.useContext(Mm),{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 w=typeof t=="string"?So(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||$e(!1),u=w}else u=c;let m=u.pathname||"/",h=l==="/"?m:m.slice(l.length)||"/",g=Ni(e,{pathname:h}),y=gle(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:Xo([l,n.encodeLocation?n.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Xo([l,n.encodeLocation?n.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r);return t&&y?f.createElement(zm.Provider,{value:{location:Sp({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ot.Pop}},y):y}function fle(){let e=_le(),t=dD(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 ple=f.createElement(fle,null);class mle 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(yD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hle(e){let{routeContext:t,match:r,children:n}=e,o=f.useContext(Am);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 gle(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||$e(!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||ple);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(hle,{match:c,routeContext:{outlet:l,matches:h,isDataRoute:r!=null},children:y})};return r&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?f.createElement(mle,{location:r.location,revalidation:r.revalidation,component:m,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):g()},null)}var wv;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(wv||(wv={}));var zs;(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"})(zs||(zs={}));function vle(e){let t=f.useContext(Am);return t||$e(!1),t}function yle(e){let t=f.useContext(vD);return t||$e(!1),t}function wle(e){let t=f.useContext(ua);return t||$e(!1),t}function xD(e){let t=wle(),r=t.matches[t.matches.length-1];return r.route.id||$e(!1),r.route.id}function _le(){var e;let t=f.useContext(yD),r=yle(zs.UseRouteError),n=xD(zs.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function xle(){let{router:e}=vle(wv.UseNavigateStable),t=xD(zs.UseNavigateStable),r=f.useRef(!1);return wD(()=>{r.current=!0}),f.useCallback(function(o,a){a===void 0&&(a={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Sp({fromRouteId:t},a)))},[e,t])}const ble="startTransition",xP=Fu[ble];function Ele(e){let{fallbackElement:t,router:r,future:n}=e,[o,a]=f.useState(r.state),{v7_startTransition:i}=n||{},l=f.useCallback(m=>{i&&xP?xP(()=>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(Am.Provider,{value:d},f.createElement(vD.Provider,{value:o},f.createElement(Ple,{basename:u,location:o.location,navigationType:o.historyAction,navigator:c},o.initialized?f.createElement(Sle,{routes:r.routes,state:o}):t))),null)}function Sle(e){let{routes:t,state:r}=e;return _D(t,void 0,r)}function bD(e){return ule(e.context)}function se(e){$e(!1)}function Ple(e){let{basename:t="/",children:r=null,location:n,navigationType:o=Ot.Pop,navigator:a,static:i=!1}=e;Lm()&&$e(!1);let l=t.replace(/^\/*/,"/"),c=f.useMemo(()=>({basename:l,navigator:a,static:i}),[l,a,i]);typeof n=="string"&&(n=So(n));let{pathname:u="/",search:d="",hash:m="",state:h=null,key:g="default"}=n,y=f.useMemo(()=>{let w=hc(u,l);return w==null?null:{location:{pathname:w,search:d,hash:m,state:h,key:g},navigationType:o}},[l,u,d,m,h,g,o]);return y==null?null:f.createElement(Mm.Provider,{value:c},f.createElement(zm.Provider,{children:r,value:y}))}function $le(e){let{children:t,location:r}=e;return dle(_v(t),r)}var bP;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(bP||(bP={}));new Promise(()=>{});function _v(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,_v(n.props.children,a));return}n.type!==se&&$e(!1),!n.props.index||!n.props.children||$e(!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=_v(n.props.children,a)),r.push(i)}),r}function Ole(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.2
|
|
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 Pp(){return Pp=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},Pp.apply(this,arguments)}function xv(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 Cle(e,t){let r=xv(e);if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)});return r}function kle(e,t){return Yie({basename:t==null?void 0:t.basename,future:Pp({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:wie({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||jle(),routes:e,mapRouteProperties:Ole}).initialize()}function jle(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Pp({},t,{errors:Rle(t.errors)})),t}function Rle(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 L0(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let a=window[o.__subType];if(typeof a=="function")try{let i=new a(o.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){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 V0(e){let t=f.useRef(xv(e)),r=f.useRef(!1),n=da(),o=f.useMemo(()=>Cle(n.search,r.current?null:t.current),[n.search]),a=Pt(),i=f.useCallback((l,c)=>{const u=xv(typeof l=="function"?l(o):l);r.current=!0,a("?"+u,c)},[a,o]);return[o,i]}var Tle={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"},Ile=Object.defineProperty,Dle=Object.defineProperties,Nle=Object.getOwnPropertyDescriptors,$p=Object.getOwnPropertySymbols,ED=Object.prototype.hasOwnProperty,SD=Object.prototype.propertyIsEnumerable,PP=(e,t,r)=>t in e?Ile(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$P=(e,t)=>{for(var r in t||(t={}))ED.call(t,r)&&PP(e,r,t[r]);if($p)for(var r of $p(t))SD.call(t,r)&&PP(e,r,t[r]);return e},Ale=(e,t)=>Dle(e,Nle(t)),Mle=(e,t)=>{var r={};for(var n in e)ED.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$p)for(var n of $p(e))t.indexOf(n)<0&&SD.call(e,n)&&(r[n]=e[n]);return r},Nt=(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=Mle(i,["color","size","stroke","children"]);return f.createElement("svg",$P(Ale($P({ref:a},Tle),{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:Se.string,size:Se.oneOfType([Se.string,Se.number]),stroke:Se.oneOfType([Se.string,Se.number])},n.displayName=`${t}`,n},zle=Nt("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"}]]),Lle=Nt("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"}]]),Fle=Nt("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"}]]),Vle=Nt("check","IconCheck",[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]]),Ble=Nt("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"}]]),Ule=Nt("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"}]]),Wle=Nt("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"}]]),Hle=Nt("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"}]]),qle=Nt("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"}]]),Qle=Nt("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"}]]),Gle=Nt("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"}]]),Kle=Nt("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"}]]),Yle=Nt("player-play","IconPlayerPlay",[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]]),Xle=Nt("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"}]]),Jle=Nt("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"}]]),Zle=Nt("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=Nt("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"}]]),ese=Nt("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"}]]),PD=Nt("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]),tse=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 gc(e,t){var r=rse(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 rse(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),o=tse.get(n);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var nse=[".DS_Store","Thumbs.db"];function ose(e){return ul(this,void 0,void 0,function(){return dl(this,function(t){return Op(e)&&ase(e.dataTransfer)?[2,cse(e.dataTransfer,e.type)]:ise(e)?[2,lse(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,sse(e)]:[2,[]]})})}function ase(e){return Op(e)}function ise(e){return Op(e)&&Op(e.target)}function Op(e){return typeof e=="object"&&e!==null}function lse(e){return bv(e.target.files).map(function(t){return gc(t)})}function sse(e){return ul(this,void 0,void 0,function(){var t;return dl(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 gc(n)})]}})})}function cse(e,t){return ul(this,void 0,void 0,function(){var r,n;return dl(this,function(o){switch(o.label){case 0:return e.items?(r=bv(e.items).filter(function(a){return a.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(use))]):[3,2];case 1:return n=o.sent(),[2,CP($D(n))];case 2:return[2,CP(bv(e.files).map(function(a){return gc(a)}))]}})})}function CP(e){return e.filter(function(t){return nse.indexOf(t.name)===-1})}function bv(e){if(e===null)return[];for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function use(e){if(typeof e.webkitGetAsEntry!="function")return kP(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?OD(t):kP(e)}function $D(e){return e.reduce(function(t,r){return qh(qh([],Y0(t),!1),Y0(Array.isArray(r)?$D(r):[r]),!1)},[])}function kP(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=gc(t);return Promise.resolve(r)}function dse(e){return ul(this,void 0,void 0,function(){return dl(this,function(t){return[2,e.isDirectory?OD(e):fse(e)]})})}function OD(e){var t=e.createReader();return new Promise(function(r,n){var o=[];function a(){var i=this;t.readEntries(function(l){return ul(i,void 0,void 0,function(){var c,u,d;return dl(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(dse)),o.push(d),a(),m.label=6;case 6:return[2]}})})},function(l){n(l)})}a()})}function fse(e){return ul(this,void 0,void 0,function(){return dl(this,function(t){return[2,new Promise(function(r,n){e.file(function(o){var a=gc(o,e.fullPath);r(a)},function(o){n(o)})})]})})}var pse=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 gse(e)||hse(e)||kD(e)||mse()}function mse(){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 hse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gse(e){if(Array.isArray(e))return Ev(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){CD(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 CD(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ls(e,t){return wse(e)||yse(e,t)||kD(e,t)||vse()}function vse(){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 kD(e,t){if(e){if(typeof e=="string")return Ev(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 Ev(e,t)}}function Ev(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 yse(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 wse(e){if(Array.isArray(e))return e}var _se="file-invalid-type",xse="file-too-large",bse="file-too-small",Ese="too-many-files",Sse=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:_se,message:"File type must be ".concat(r)}},IP=function(t){return{code:xse,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},DP=function(t){return{code:bse,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Pse={code:Ese,message:"Too many files"};function jD(e,t){var r=e.type==="application/x-moz-file"||pse(e,t);return[r,r?null:Sse(t)]}function RD(e,t,r){if(Oa(e.size))if(Oa(t)&&Oa(r)){if(e.size>r)return[!1,IP(r)];if(e.size<t)return[!1,DP(t)]}else{if(Oa(t)&&e.size<t)return[!1,DP(t)];if(Oa(r)&&e.size>r)return[!1,IP(r)]}return[!0,null]}function Oa(e){return e!=null}function $se(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=jD(c,r),d=Ls(u,1),m=d[0],h=RD(c,n,o),g=Ls(h,1),y=g[0],w=l?l(c):null;return m&&y&&!w})}function Cp(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function hu(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 Ose(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Cse(e){return e.indexOf("Edge/")!==-1}function kse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Ose(e)||Cse(e)}function kn(){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!Cp(n)&&l&&l.apply(void 0,[n].concat(a)),Cp(n)})}}function jse(){return"showOpenFilePicker"in window}function Rse(e){if(Oa(e)){var t=Object.entries(e).filter(function(r){var n=Ls(r,2),o=n[0],a=n[1],i=!0;return TD(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(ID))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(r,n){var o=Ls(n,2),a=o[0],i=o[1];return TP(TP({},r),{},CD({},a,i))},{});return[{description:"Files",accept:t}]}return e}function Tse(e){if(Oa(e))return Object.entries(e).reduce(function(t,r){var n=Ls(r,2),o=n[0],a=n[1];return[].concat(jP(t),[o],jP(a))},[]).filter(function(t){return TD(t)||ID(t)}).join(",")}function Ise(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Dse(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function TD(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function ID(e){return/^.*\.[\w]+$/.test(e)}var Nse=["children"],Ase=["open"],Mse=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],zse=["refKey","onChange","onClick"];function Lse(e){return Bse(e)||Vse(e)||DD(e)||Fse()}function Fse(){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 Vse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bse(e){if(Array.isArray(e))return Sv(e)}function Bh(e,t){return Hse(e)||Wse(e,t)||DD(e,t)||Use()}function Use(){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 DD(e,t){if(e){if(typeof e=="string")return Sv(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 Sv(e,t)}}function Sv(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 Wse(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 Hse(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){Pv(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 Pv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kp(e,t){if(e==null)return{};var r=qse(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 qse(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 B0=f.forwardRef(function(e,t){var r=e.children,n=kp(e,Nse),o=AD(n),a=o.open,i=kp(o,Ase);return f.useImperativeHandle(t,function(){return{open:a}},[a]),s.createElement(f.Fragment,null,r(ct(ct({},i),{},{open:a})))});B0.displayName="Dropzone";var ND={disabled:!1,getFilesFromEvent:ose,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};B0.defaultProps=ND;B0.propTypes={children:Se.func,accept:Se.objectOf(Se.arrayOf(Se.string)),multiple:Se.bool,preventDropOnDocument:Se.bool,noClick:Se.bool,noKeyboard:Se.bool,noDrag:Se.bool,noDragEventsBubbling:Se.bool,minSize:Se.number,maxSize:Se.number,maxFiles:Se.number,disabled:Se.bool,getFilesFromEvent:Se.func,onFileDialogCancel:Se.func,onFileDialogOpen:Se.func,useFsAccessApi:Se.bool,autoFocus:Se.bool,onDragEnter:Se.func,onDragLeave:Se.func,onDragOver:Se.func,onDrop:Se.func,onDropAccepted:Se.func,onDropRejected:Se.func,onError:Se.func,validator:Se.func};var $v={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function AD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=ct(ct({},ND),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,w=t.onFileDialogCancel,E=t.onFileDialogOpen,_=t.useFsAccessApi,v=t.autoFocus,x=t.preventDropOnDocument,b=t.noClick,P=t.noKeyboard,O=t.noDrag,$=t.noDragEventsBubbling,C=t.onError,R=t.validator,j=f.useMemo(function(){return Tse(r)},[r]),k=f.useMemo(function(){return Rse(r)},[r]),T=f.useMemo(function(){return typeof E=="function"?E:MP},[E]),L=f.useMemo(function(){return typeof w=="function"?w:MP},[w]),B=f.useRef(null),V=f.useRef(null),M=f.useReducer(Qse,$v),Q=Bh(M,2),A=Q[0],z=Q[1],H=A.isFocused,ie=A.isFileDialogActive,we=f.useRef(typeof window<"u"&&window.isSecureContext&&_&&jse()),Ie=function(){!we.current&&ie&&setTimeout(function(){if(V.current){var fe=V.current.files;fe.length||(z({type:"closeDialog"}),L())}},300)};f.useEffect(function(){return window.addEventListener("focus",Ie,!1),function(){window.removeEventListener("focus",Ie,!1)}},[V,ie,L,we]);var de=f.useRef([]),He=function(fe){B.current&&B.current.contains(fe.target)||(fe.preventDefault(),de.current=[])};f.useEffect(function(){return x&&(document.addEventListener("dragover",NP,!1),document.addEventListener("drop",He,!1)),function(){x&&(document.removeEventListener("dragover",NP),document.removeEventListener("drop",He))}},[B,x]),f.useEffect(function(){return!n&&v&&B.current&&B.current.focus(),function(){}},[B,v,n]);var Le=f.useCallback(function(Y){C?C(Y):console.error(Y)},[C]),wt=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y),de.current=[].concat(Lse(de.current),[Y.target]),hu(Y)&&Promise.resolve(o(Y)).then(function(fe){if(!(Cp(Y)&&!$)){var We=fe.length,it=We>0&&$se({files:fe,accept:j,minSize:i,maxSize:a,multiple:l,maxFiles:c,validator:R}),lt=We>0&&!it;z({isDragAccept:it,isDragReject:lt,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Y)}}).catch(function(fe){return Le(fe)})},[o,u,Le,$,j,i,a,l,c,R]),tt=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y);var fe=hu(Y);if(fe&&Y.dataTransfer)try{Y.dataTransfer.dropEffect="copy"}catch{}return fe&&m&&m(Y),!1},[m,$]),Er=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y);var fe=de.current.filter(function(it){return B.current&&B.current.contains(it)}),We=fe.indexOf(Y.target);We!==-1&&fe.splice(We,1),de.current=fe,!(fe.length>0)&&(z({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),hu(Y)&&d&&d(Y))},[B,d,$]),nn=f.useCallback(function(Y,fe){var We=[],it=[];Y.forEach(function(lt){var Kn=jD(lt,j),an=Bh(Kn,2),Pr=an[0],$o=an[1],pa=RD(lt,i,a),I=Bh(pa,2),D=I[0],F=I[1],K=R?R(lt):null;if(Pr&&D&&!K)We.push(lt);else{var he=[$o,F];K&&(he=he.concat(K)),it.push({file:lt,errors:he.filter(function(ge){return ge})})}}),(!l&&We.length>1||l&&c>=1&&We.length>c)&&(We.forEach(function(lt){it.push({file:lt,errors:[Pse]})}),We.splice(0)),z({acceptedFiles:We,fileRejections:it,type:"setFiles"}),h&&h(We,it,fe),it.length>0&&y&&y(it,fe),We.length>0&&g&&g(We,fe)},[z,l,j,i,a,c,h,g,y,R]),on=f.useCallback(function(Y){Y.preventDefault(),Y.persist(),_t(Y),de.current=[],hu(Y)&&Promise.resolve(o(Y)).then(function(fe){Cp(Y)&&!$||nn(fe,Y)}).catch(function(fe){return Le(fe)}),z({type:"reset"})},[o,nn,Le,$]),Fr=f.useCallback(function(){if(we.current){z({type:"openDialog"}),T();var Y={multiple:l,types:k};window.showOpenFilePicker(Y).then(function(fe){return o(fe)}).then(function(fe){nn(fe,null),z({type:"closeDialog"})}).catch(function(fe){Ise(fe)?(L(fe),z({type:"closeDialog"})):Dse(fe)?(we.current=!1,V.current?(V.current.value=null,V.current.click()):Le(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."))):Le(fe)});return}V.current&&(z({type:"openDialog"}),T(),V.current.value=null,V.current.click())},[z,T,L,_,nn,Le,k,l]),Po=f.useCallback(function(Y){!B.current||!B.current.isEqualNode(Y.target)||(Y.key===" "||Y.key==="Enter"||Y.keyCode===32||Y.keyCode===13)&&(Y.preventDefault(),Fr())},[B,Fr]),jt=f.useCallback(function(){z({type:"focus"})},[]),Sr=f.useCallback(function(){z({type:"blur"})},[]),Gn=f.useCallback(function(){b||(kse()?setTimeout(Fr,0):Fr())},[b,Fr]),Ue=function(fe){return n?null:fe},Vr=function(fe){return P?null:Ue(fe)},Br=function(fe){return O?null:Ue(fe)},_t=function(fe){$&&fe.stopPropagation()},oi=f.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=Y.refKey,We=fe===void 0?"ref":fe,it=Y.role,lt=Y.onKeyDown,Kn=Y.onFocus,an=Y.onBlur,Pr=Y.onClick,$o=Y.onDragEnter,pa=Y.onDragOver,I=Y.onDragLeave,D=Y.onDrop,F=kp(Y,Mse);return ct(ct(Pv({onKeyDown:Vr(kn(lt,Po)),onFocus:Vr(kn(Kn,jt)),onBlur:Vr(kn(an,Sr)),onClick:Ue(kn(Pr,Gn)),onDragEnter:Br(kn($o,wt)),onDragOver:Br(kn(pa,tt)),onDragLeave:Br(kn(I,Er)),onDrop:Br(kn(D,on)),role:typeof it=="string"&&it!==""?it:"presentation"},We,B),!n&&!P?{tabIndex:0}:{}),F)}},[B,Po,jt,Sr,Gn,wt,tt,Er,on,P,O,n]),ai=f.useCallback(function(Y){Y.stopPropagation()},[]),ii=f.useMemo(function(){return function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=Y.refKey,We=fe===void 0?"ref":fe,it=Y.onChange,lt=Y.onClick,Kn=kp(Y,zse),an=Pv({accept:j,multiple:l,type:"file",style:{display:"none"},onChange:Ue(kn(it,on)),onClick:Ue(kn(lt,ai)),tabIndex:-1},We,V);return ct(ct({},an),Kn)}},[V,r,l,on,n]);return ct(ct({},A),{},{isFocused:H&&!n,getRootProps:oi,getInputProps:ii,rootRef:B,inputRef:V,open:Ue(Fr)})}function Qse(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({},$v),{},{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({},$v);default:return e}}function MP(){}const[Gse,Kse]=vo("Dropzone component was not found in tree");var zP=Object.getOwnPropertySymbols,Yse=Object.prototype.hasOwnProperty,Xse=Object.prototype.propertyIsEnumerable,Jse=(e,t)=>{var r={};for(var n in e)Yse.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&&Xse.call(e,n)&&(r[n]=e[n]);return r};function U0(e){const t=r=>{const n=q(`Dropzone${k1(e)}`,{},r),{children:o}=n,a=Jse(n,["children"]),i=Kse(),l=Np(o)?o:s.createElement("span",null,o);return i[e]?f.cloneElement(l,a):null};return t.displayName=`@mantine/dropzone/${k1(e)}`,t}const Zse=U0("accept"),ece=U0("reject"),tce=U0("idle");var rce=Object.defineProperty,nce=Object.defineProperties,oce=Object.getOwnPropertyDescriptors,LP=Object.getOwnPropertySymbols,ace=Object.prototype.hasOwnProperty,ice=Object.prototype.propertyIsEnumerable,FP=(e,t,r)=>t in e?rce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,VP=(e,t)=>{for(var r in t||(t={}))ace.call(t,r)&&FP(e,r,t[r]);if(LP)for(var r of LP(t))ice.call(t,r)&&FP(e,r,t[r]);return e},lce=(e,t)=>nce(e,oce(t)),sce=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:lce(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 cce=sce;var uce=Object.defineProperty,dce=Object.defineProperties,fce=Object.getOwnPropertyDescriptors,jp=Object.getOwnPropertySymbols,MD=Object.prototype.hasOwnProperty,zD=Object.prototype.propertyIsEnumerable,BP=(e,t,r)=>t in e?uce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ql=(e,t)=>{for(var r in t||(t={}))MD.call(t,r)&&BP(e,r,t[r]);if(jp)for(var r of jp(t))zD.call(t,r)&&BP(e,r,t[r]);return e},Uh=(e,t)=>dce(e,fce(t)),pce=(e,t)=>{var r={};for(var n in e)MD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&jp)for(var n of jp(e))t.indexOf(n)<0&&zD.call(e,n)&&(r[n]=e[n]);return r};const mce={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0};function _l(e){const t=q("Dropzone",mce,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:w,openRef:E,name:_,unstyled:v,maxFiles:x,autoFocus:b,activateOnClick:P,activateOnDrag:O,dragEventsBubbling:$,activateOnKeyboard:C,onDragEnter:R,onDragLeave:j,onDragOver:k,onFileDialogCancel:T,onFileDialogOpen:L,preventDropOnDocument:B,useFsAccessApi:V,getFilesFromEvent:M,validator:Q,variant:A}=t,z=pce(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:H,cx:ie}=cce({radius:o,padding:n},{name:"Dropzone",classNames:i,styles:l,unstyled:v,variant:A}),{getRootProps:we,getInputProps:Ie,isDragAccept:de,isDragReject:He,open:Le}=AD(ql({onDrop:g,onDropAccepted:y,onDropRejected:w,disabled:a||c,accept:Array.isArray(m)?m.reduce((tt,Er)=>Uh(ql({},tt),{[Er]:[]}),{}):m,multiple:u,maxSize:d,maxFiles:x,autoFocus:b,noClick:!P,noDrag:!O,noDragEventsBubbling:!$,noKeyboard:!C,onDragEnter:R,onDragLeave:j,onDragOver:k,onFileDialogCancel:T,onFileDialogOpen:L,preventDropOnDocument:B,useFsAccessApi:V,validator:Q},M?{getFilesFromEvent:M}:null));Y$(E,Le);const wt=!de&&!He;return s.createElement(Gse,{value:{accept:de,reject:He,idle:wt}},s.createElement(ue,Uh(ql(ql({},z),we()),{"data-accept":de||void 0,"data-reject":He||void 0,"data-idle":wt||void 0,"data-loading":c||void 0,className:ie(H.root,r)}),s.createElement(LR,{visible:c,radius:o,unstyled:v}),s.createElement("input",Uh(ql({},Ie()),{name:_})),s.createElement("div",{className:H.inner},h)))}_l.displayName="@mantine/dropzone/Dropzone";_l.Accept=Zse;_l.Reject=ece;_l.Idle=tce;const LD=_l;var hce=Object.defineProperty,gce=Object.defineProperties,vce=Object.getOwnPropertyDescriptors,UP=Object.getOwnPropertySymbols,yce=Object.prototype.hasOwnProperty,wce=Object.prototype.propertyIsEnumerable,WP=(e,t,r)=>t in e?hce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_ce=(e,t)=>{for(var r in t||(t={}))yce.call(t,r)&&WP(e,r,t[r]);if(UP)for(var r of UP(t))wce.call(t,r)&&WP(e,r,t[r]);return e},xce=(e,t)=>gce(e,vce(t)),bce=W(e=>({wrapper:xce(_ce({},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 Ece=bce;var Sce=Object.defineProperty,Pce=Object.defineProperties,$ce=Object.getOwnPropertyDescriptors,Rp=Object.getOwnPropertySymbols,FD=Object.prototype.hasOwnProperty,VD=Object.prototype.propertyIsEnumerable,HP=(e,t,r)=>t in e?Sce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wh=(e,t)=>{for(var r in t||(t={}))FD.call(t,r)&&HP(e,r,t[r]);if(Rp)for(var r of Rp(t))VD.call(t,r)&&HP(e,r,t[r]);return e},Hh=(e,t)=>Pce(e,$ce(t)),Oce=(e,t)=>{var r={};for(var n in e)FD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Rp)for(var n of Rp(e))t.indexOf(n)<0&&VD.call(e,n)&&(r[n]=e[n]);return r};const Cce={padding:"md",loading:!1,multiple:!0,maxSize:1/0,autoFocus:!1,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:yo("max"),withinPortal:!0};function BD(e){const t=q("DropzoneFullScreen",Cce,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=Oce(t,["classNames","styles","sx","className","style","unstyled","active","onDrop","onReject","zIndex","withinPortal","portalProps"]),[w,E]=s.useState(0),[_,{open:v,close:x}]=ZA(!1),{classes:b,cx:P}=Ece(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(()=>{w===0&&x()},[w]),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(pm,Hh(Wh({},g),{withinPortal:h}),s.createElement(ue,{className:P(b.wrapper,a),sx:o,style:Hh(Wh({},i),{opacity:_?1:0,pointerEvents:_?"all":"none",zIndex:m})},s.createElement(_l,Hh(Wh({},y),{classNames:r,styles:n,unstyled:l,className:b.dropzone,onDrop:C=>{u==null||u(C),x()},onReject:C=>{d==null||d(C),x()}}))))}BD.displayName="@mantine/dropzone/DropzoneFullScreen";LD.FullScreen=BD;const gu=LD,kce=`{
|
|
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 jce(){const e=Zt(),t=te(),[r,n]=f.useState(),o=f.useCallback(async l=>{try{n(void 0);let c=JSON.parse(l);c.type!=="batch"&&c.type!=="transaction"&&(c=f5(c)),n(await t.executeBatch(c)),le({color:"green",message:"Success"})}catch(c){le({color:"red",message:Oe(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(gt,{defaultValue:"upload",children:[p.jsxs(gt.List,{children:[p.jsx(gt.Tab,{value:"upload",children:"File Upload"}),p.jsx(gt.Tab,{value:"json",children:"JSON"})]}),p.jsx(gt.Panel,{value:"upload",pt:"xs",children:p.jsx(gu,{onDrop:a,accept:["application/json"],children:p.jsxs(J,{position:"center",spacing:"xl",style:{minHeight:220,pointerEvents:"none"},children:[p.jsx(gu.Accept,{children:p.jsx(OP,{size:50,stroke:1.5,color:e.colors[e.primaryColor][5]})}),p.jsx(gu.Reject,{children:p.jsx(PD,{size:50,stroke:1.5,color:e.colors.red[5]})}),p.jsx(gu.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(gt.Panel,{value:"json",pt:"xs",children:p.jsxs(De,{onSubmit:i,children:[p.jsx(tc,{"data-testid":"batch-input",name:"input",minRows:20,defaultValue:kce,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 Rce(){const{resourceType:e}=Xe(),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(je,{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(je,{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 Tce(){const e=te(),[t,r]=f.useState(),[n,o]=f.useState(!1);return p.jsx(_e,{width:450,children:p.jsxs(De,{style:{maxWidth:400},onSubmit:a=>{r(void 0),e.post("auth/changepassword",a).then(()=>o(!0)).catch(i=>r(yt(i)))},children:[p.jsxs(Xt,{sx:{flexDirection:"column"},children:[p.jsx(En,{size:32}),p.jsx(ce,{children:"Change password"})]}),!n&&p.jsxs(ke,{spacing:"xl",mt:"xl",children:[p.jsx(io,{name:"oldPassword",label:"Old password",required:!0,autoFocus:!0,error:et(t,"oldPassword")}),p.jsx(io,{name:"newPassword",label:"New password",required:!0,error:et(t,"newPassword")}),p.jsx(io,{name:"confirmPassword",label:"Confirm new password",required:!0,error:et(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 Ice(){const e=Pt(),{resourceType:t}=Xe(),r=te(),[n,o]=f.useState();return p.jsxs(p.Fragment,{children:[p.jsx(wn,{p:"xl",shadow:"xs",radius:0,children:p.jsxs(ae,{weight:500,children:["New ",t]})}),p.jsx(_e,{children:p.jsx(I5,{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 Dce(){return p.jsx(_e,{children:p.jsxs(ke,{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 Fm=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}=Fm();return p.jsx(hl,{children:p.jsx("div",{className:t.root,children:e.children})})}be.Entry=function(t){const{classes:r}=Fm();return p.jsx("div",{className:r.entry,children:t.children})};be.Key=function(t){const{classes:r}=Fm();return p.jsx("div",{className:r.key,children:t.children})};be.Value=function(t){const{classes:r}=Fm();return p.jsx("div",{className:r.value,children:t.children})};function UD(e){var r,n;const t=Ye(e.patient);return t?p.jsxs(be,{children:[p.jsx(aa,{value:t,size:"lg",color:Nce(t)}),p.jsxs(be.Entry,{children:[p.jsx(be.Key,{children:"Name"}),p.jsx(be.Value,{children:p.jsx(je,{to:t,children:t.name?p.jsx(w0,{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:mee(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 Nce(e){if(e.gender==="male")return"blue";if(e.gender==="female")return"pink"}function WD(e){const t=Ye(e.resource);if(!t)return null;const r=[{key:"Type",value:p.jsx(je,{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=mo(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 W0(e){if(e.resourceType==="Patient")return e;if(e.resourceType==="DiagnosticReport"||e.resourceType==="Encounter"||e.resourceType==="Observation"||e.resourceType==="ServiceRequest")return e.subject}function Ace(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 Lu(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 QI((t=e.getActiveLogin())==null?void 0:t.project)}function Mce(e,t){const r=new Blob([e],{type:Pa.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 zce(){const{id:e}=Xe(),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(),[w,E]=f.useState();if(f.useEffect(()=>{const x={resourceType:"Bundle",type:"batch",entry:[{request:{method:"GET",url:`Questionnaire/${e}`}}]};if(n){const b=n.split(",").filter(P=>!!P);b.length===1&&x.entry.push({request:{method:"GET",url:b[0]}}),d(b)}o.executeBatch(x).then(b=>{var P,O,$,C,R,j,k;(($=(O=(P=b.entry)==null?void 0:P[0])==null?void 0:O.response)==null?void 0:$.status)!=="200"?y((R=(C=b.entry)==null?void 0:C[0])==null?void 0:R.response):(c((j=b.entry[0])==null?void 0:j.resource),h((k=b.entry[1])==null?void 0:k.resource)),i(!1)}).catch(b=>{y(b),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(w)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:[w.length===1&&p.jsx("li",{children:p.jsx(je,{to:w[0],children:"Review your answers"})}),w.length>1&&p.jsxs("li",{children:["Review your answers:",p.jsx("ul",{children:w.map(x=>p.jsx("li",{children:p.jsx(je,{to:x,children:ot(x)})},x.id))})]}),m&&p.jsx("li",{children:p.jsxs(je,{to:m,children:["Back to ",mo(m)]})}),p.jsx("li",{children:p.jsx(je,{to:"/",children:"Go back home"})})]})]});if(a||!l)return p.jsx(oa,{});const _=m&&W0(m);return p.jsxs(p.Fragment,{children:[_&&p.jsx(UD,{patient:_}),m&&m.resourceType!=="Patient"&&p.jsx(WD,{resource:m}),p.jsx(wn,{p:"xl",shadow:"xs",radius:0,children:p.jsxs(ae,{children:[mo(l),u&&u.length>1&&p.jsxs(p.Fragment,{children:[" (for ",u.length," resources)"]})]})}),p.jsx(_e,{children:p.jsx(K5,{questionnaire:l,subject:m&&at(m),onSubmit:v})})]});async function v(x){const b=[];if(!u||u.length===0)b.push(await o.createResource(x));else for(const P of u)b.push(await o.createResource({...x,subject:{reference:P}}));E(b)}}const Lce=W(e=>({paper:{[`@media (max-width: ${e.breakpoints.sm})`]:{margin:2,padding:4}}}));function qP(){const{classes:e}=Lce(),t=te(),r=Pt(),n=da(),[o,a]=f.useState();return f.useEffect(()=>{const i=jee(n.pathname+n.search),l=HD(i,t.getUserConfiguration());n.pathname===`/${l.resourceType}`&&n.search===Di(l)?(Wce(l),a(l)):r(`/${l.resourceType}${Di(l)}`)},[t,r,n]),!(o!=null&&o.resourceType)||!o.fields||o.fields.length===0?p.jsx(oa,{}):p.jsx(wn,{shadow:"xs",m:"md",p:"xs",className:e.paper,children:p.jsx(pc,{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}${Di(i.definition)}`)},onNew:Hce(o.resourceType)?()=>{r(`/${o.resourceType}/new`)}:void 0,onExportCsv:()=>{const i=t.fhirUrl(o.resourceType,"$csv")+Di(o);t.download(i).then(l=>{window.open(window.URL.createObjectURL(l),"_blank")}).catch(l=>le({color:"red",message:Oe(l)}))},onExportTransactionBundle:async()=>{qce(o,t).then(i=>Mce(JSON.stringify(i,void 0,2))).catch(i=>le({color:"red",message:Oe(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=>le({color:"red",message:Oe(l)})))},onBulk:i=>{r(`/bulk/${o.resourceType}?ids=${i.join(",")}`)}})})}function HD(e,t){const r=e.resourceType||Fce(t),n=e.fields??Vce(r),o=e.filters??(e.resourceType?void 0:Bce(r)),a=e.sortRules??Uce(r),i=e.offset??0,l=e.count??lc;return{...e,resourceType:r,fields:n,filters:o,sortRules:a,offset:i,count:l}}function Fce(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 Vce(e){const t=H0(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 Bce(e){var t;return(t=H0(e))==null?void 0:t.filters}function Uce(e){const t=H0(e);return t!=null&&t.sortRules?t.sortRules:[{code:"_lastUpdated",descending:!0}]}function H0(e){const t=localStorage.getItem(e+"-defaultSearch");return t?JSON.parse(t):void 0}function Wce(e){localStorage.setItem("defaultResourceType",e.resourceType),localStorage.setItem(e.resourceType+"-defaultSearch",JSON.stringify(e))}function Hce(e){return e!=="Bot"&&e!=="ClientApplication"}async function qce(e,t){const r={resourceType:e.resourceType,count:1e3,offset:0,filters:e.filters},n=HD(r,t.getUserConfiguration()),o=await t.search(n.resourceType,Di({...n,total:"accurate",fields:void 0}));return f5(o)}function Qce(){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=>le({color:"red",message:Oe(l)}))},[e]);const a=f.useCallback(l=>{e.post("auth/mfa/enroll",l).then(()=>{o(!0),le({color:"green",message:"Success"})}).catch(c=>le({color:"red",message:Oe(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(De,{onSubmit:a,children:[p.jsx(ce,{children:"Multi Factor Auth Setup"}),p.jsx(Xt,{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 Gce={baseUrl:"__MEDPLUM_BASE_URL__",clientId:"__MEDPLUM_CLIENT_ID__",googleClientId:"__GOOGLE_CLIENT_ID__",recaptchaSiteKey:"__RECAPTCHA_SITE_KEY__",registerEnabled:"__MEDPLUM_REGISTER_ENABLED__"};function vc(){return Gce}function Kce(){const e=Pt(),[t]=V0(),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(iD,{onCode:o,onForgotPassword:()=>e("/resetpassword"),onRegister:()=>e("/register"),googleClientId:vc().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(En,{size:32}),p.jsx(ce,{children:"Sign in to Medplum"})]})}function Yce(){const e=te(),t=Pt(),r=vc();return f.useEffect(()=>{e.getProfile()&&t("/signin?project=new")},[e,t]),p.jsxs(fie,{type:"project",onSuccess:()=>t("/"),googleClientId:r.googleClientId,recaptchaSiteKey:r.recaptchaSiteKey,children:[p.jsx(En,{size:32}),p.jsx(ce,{children:"Create a new account"})]})}function Xce(){const e=Pt(),t=te(),[r,n]=f.useState(),[o,a]=f.useState(!1),i=vc().recaptchaSiteKey;return f.useEffect(()=>{oD(i)},[i]),p.jsx(_e,{width:450,children:p.jsxs(De,{style:{maxWidth:400},onSubmit:async l=>{let c="";c=await aD(i),t.post("auth/resetpassword",{...l,recaptchaToken:c}).then(()=>a(!0)).catch(u=>n(yt(u)))},children:[p.jsxs(ke,{spacing:"lg",mb:"xl",align:"center",children:[p.jsx(En,{size:32}),p.jsx(ce,{children:"Medplum Password Reset"})]}),p.jsxs(ke,{spacing:"xl",children:[p.jsx(ni,{issues:$0(r,void 0)}),!o&&p.jsxs(p.Fragment,{children:[p.jsx(ne,{name:"email",type:"email",label:"Email",required:!0,autoFocus:!0,error:et(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 Jce(){var a;const e=Pt(),t=te(),[r,n]=f.useState();f.useEffect(()=>{t.get("auth/me").then(n).catch(i=>le({color:"red",message:Oe(i)}))},[t]);function o(i){t.post("auth/revoke",{loginId:i}).then(()=>t.get("auth/me",{cache:"no-cache"})).then(n).then(()=>le({color:"green",message:"Login revoked"})).catch(l=>le({color:"red",message:Oe(l)}))}return r?p.jsxs(p.Fragment,{children:[p.jsxs(_e,{children:[p.jsx(ce,{children:"Security"}),p.jsxs(S0,{children:[p.jsx(qi,{term:"ID",children:p.jsx(dt,{href:`/${ot(r.profile)}`,children:r.profile.id})}),p.jsx(qi,{term:"Resource Type",children:r.profile.resourceType}),p.jsx(qi,{term:"Name",children:ic((a=r.profile.name)==null?void 0:a[0])})]})]}),p.jsxs(_e,{children:[p.jsx(ce,{children:"Sessions"}),p.jsxs(ti,{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:yr(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 Zce(){const{id:e,secret:t}=Xe(),r=te(),[n,o]=f.useState(),[a,i]=f.useState(!1);return p.jsx(_e,{width:450,children:p.jsxs(De,{style:{maxWidth:400},onSubmit:l=>{if(l.password!==l.confirmPassword){o(Ma("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(Xt,{sx:{flexDirection:"column"},children:[p.jsx(En,{size:32}),p.jsx(ce,{children:"Set password"})]}),!a&&p.jsxs(ke,{children:[p.jsx(io,{name:"password",label:"New password",required:!0,error:et(n,"password")}),p.jsx(io,{name:"confirmPassword",label:"Confirm new password",required:!0,error:et(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(je,{to:"/signin",children:"sign in"}),"."]})]})})}function eue(){const e=Pt(),[t]=V0(),r=vc();return p.jsxs(iD,{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(En,{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 tue(){const e=Pt(),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(pae,{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 Vm(e){const t=te(),r=fa(t),n=Pt(),[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(pc,{search:o,onClick:i=>n(`/admin/members/${i.resource.id}`),onChange:i=>a(i.definition),hideFilters:!0,hideToolbar:!0})}function rue(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Bots"}),p.jsx(Vm,{resourceType:"Bot",fields:["user","profile","admin","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(je,{to:"/admin/bots/new",children:"Create new bot"})})]})}function nue(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Clients"}),p.jsx(Vm,{resourceType:"ClientApplication",fields:["user","profile","admin","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(je,{to:"/admin/clients/new",children:"Create new client"})})]})}function Bm(e){return p.jsx(wl,{resourceType:"AccessPolicy",name:"accessPolicy",defaultValue:e.defaultValue,placeholder:"Access Policy",onChange:t=>{Eo(t)?e.onChange(at(t)):e.onChange(void 0)}})}function oue(){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(De,{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),le({color:"green",message:"Bot created"})}).catch(g=>{le({color:"red",message:Oe(g)}),u(yt(g))})},children:[!d&&p.jsxs(ke,{children:[p.jsx(Ge,{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:et(c,"name")})}),p.jsx(Ge,{title:"Description",htmlFor:"description",outcome:c,children:p.jsx(ne,{id:"description",name:"description",onChange:h=>a(h.currentTarget.value),error:et(c,"description")})}),p.jsx(Ge,{title:"Access Policy",htmlFor:"accessPolicy",outcome:c,children:p.jsx(Bm,{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(fr,{children:[p.jsx(fr.Item,{children:p.jsx(je,{to:d,children:"Go to new bot"})}),p.jsx(fr.Item,{children:p.jsx(je,{to:"/admin/bots",children:"Back to bots list"})})]})]})]})]})}function aue(){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(De,{onSubmit:()=>{const y={name:r,description:o,redirectUri:i,accessPolicy:c};e.post("admin/projects/"+t+"/client",y).then(w=>{e.invalidateSearches("ClientApplication"),e.invalidateSearches("ProjectMembership"),g(w),le({color:"green",message:"Client created"})}).catch(w=>{le({color:"red",message:Oe(w)}),m(yt(w))})},children:[!h&&p.jsxs(ke,{children:[p.jsx(Ge,{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:et(d,"name")})}),p.jsx(Ge,{title:"Description",htmlFor:"description",outcome:d,children:p.jsx(ne,{id:"description",name:"description",onChange:y=>a(y.currentTarget.value),error:et(d,"description")})}),p.jsx(Ge,{title:"Redirect URI",htmlFor:"redirectUri",outcome:d,children:p.jsx(ne,{id:"redirectUri",name:"redirectUri",onChange:y=>l(y.currentTarget.value),error:et(d,"redirectUri")})}),p.jsx(Ge,{title:"Access Policy",htmlFor:"accessPolicy",outcome:d,children:p.jsx(Bm,{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(fr,{children:[p.jsx(fr.Item,{children:p.jsx(je,{to:h,children:"Go to new client"})}),p.jsx(fr.Item,{children:p.jsx(je,{to:"/admin/clients",children:"Back to clients list"})})]})]})]})]})}function iue(e){return p.jsx(wl,{resourceType:"UserConfiguration",name:"userConfiguration",defaultValue:e.defaultValue,placeholder:"User Configuration",onChange:t=>{Eo(t)?e.onChange(at(t)):e.onChange(void 0)}})}function lue(){const{membershipId:e}=Xe(),t=te(),r=fa(t),n=Pt(),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 w(){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(Qi,{value:o.profile,link:!0})}),p.jsxs(De,{onSubmit:()=>{const E={...o,accessPolicy:a,userConfiguration:l,admin:u};t.post(`admin/projects/${r}/members/${e}`,E).then(()=>y(!0)).catch(_=>h(yt(_)))},children:[!g&&p.jsxs(ke,{children:[p.jsx(Ge,{title:"Access Policy",htmlFor:"accessPolicy",outcome:m,children:p.jsx(Bm,{name:"accessPolicy",defaultValue:a,onChange:i})}),p.jsx(Ge,{title:"User Configuration",htmlFor:"userConfiguration",outcome:m,children:p.jsx(iue,{name:"userConfiguration",defaultValue:l,onChange:c})}),p.jsx(Ge,{title:"Admin",htmlFor:"admin",outcome:m,children:p.jsx(tn,{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:w,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(je,{to:"/admin/project",children:"here"})," to return to the project admin page."]})]})]})]})}function sue(){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"),Sm(y)?i(y):d(y),c(g.sendEmail??!1),le({color:"green",message:"Invite success"})}).catch(y=>{le({color:"red",message:Oe(y)}),i(yt(y))})},[e,t,n]);return p.jsxs(De,{onSubmit:m,children:[!u&&!a&&p.jsxs(ke,{children:[p.jsx(ce,{children:"Invite new member"}),e.isSuperAdmin()&&p.jsx(Ge,{title:"Project",htmlFor:"project",outcome:a,children:p.jsx(wl,{resourceType:"Project",name:"project",defaultValue:t,onChange:r})}),p.jsx(mt,{name:"resourceType",label:"Role",defaultValue:"Practitioner",data:["Practitioner","Patient","RelatedPerson"],error:et(a,"resourceType")}),p.jsx(ne,{name:"firstName",label:"First Name",required:!0,autoFocus:!0,error:et(a,"firstName")}),p.jsx(ne,{name:"lastName",label:"Last Name",required:!0,error:et(a,"lastName")}),p.jsx(ne,{name:"email",type:"email",label:"Email",required:!0,error:et(a,"email")}),p.jsx(Ge,{title:"Access Policy",htmlFor:"accessPolicy",outcome:a,children:p.jsx(Bm,{name:"accessPolicy",onChange:o})}),p.jsx(tn,{name:"sendEmail",label:"Send email",defaultChecked:!0}),p.jsx(tn,{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(je,{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(fr,{children:[p.jsx(fr.Item,{children:p.jsx(je,{to:u,children:"Go to new membership"})}),p.jsx(fr.Item,{children:p.jsx(je,{to:u.profile,children:"Go to new profile"})}),p.jsx(fr.Item,{children:p.jsx(je,{to:"/admin/users",children:"Back to users list"})})]})]})]})}function cue(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Patients"}),p.jsx(Vm,{resourceType:"Patient",fields:["user","profile","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(je,{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(S0,{children:[p.jsx(qi,{term:"ID",children:r.project.id}),p.jsx(qi,{term:"Name",children:r.project.name})]})]})}const GP=["Details","Users","Patients","Clients","Bots","Secrets","Sites"];function uue(){const e=Pt(),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(wn,{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(hl,{children:p.jsx(gt,{value:r.toLowerCase(),onTabChange:i,children:p.jsx(gt.List,{style:{whiteSpace:"nowrap",flexWrap:"nowrap"},children:GP.map(l=>p.jsx(gt.Tab,{value:l.toLowerCase(),children:l},l))})})})]}),p.jsx(_e,{children:p.jsx(bD,{})})]})}function due(){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(yl(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(()=>le({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(Ka,{property:n.types.Project.properties.secret,name:"secret",defaultValue:a,onChange:i}),p.jsx(Z,{type:"submit",children:"Save"})]})}function fue(){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(yl(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(()=>le({color:"green",message:"Saved"})).catch(c=>{var d,m,h,g;const u=yt(c);le({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(Ka,{property:n.types.Project.properties.site,name:"site",defaultValue:a,onChange:i}),p.jsx(Z,{type:"submit",children:"Save"})]})}function pue(){const e=te();if(!e.isLoading()&&!e.isSuperAdmin())return p.jsx(ni,{outcome:XZ});function t(){Ql(e,"Rebuilding Structure Definitions","admin/super/structuredefinitions")}function r(){Ql(e,"Rebuilding Search Parameters","admin/super/searchparameters")}function n(){Ql(e,"Rebuilding Value Sets","admin/super/valuesets")}function o(u){Ql(e,"Reindexing Resources","admin/super/valuesets",u)}function a(u){Ql(e,"Rebuilding Compartments","admin/super/valuesets",u)}function i(u){e.post("admin/super/removebotidjobsfromqueue",u).then(()=>le({color:"green",message:"Done"})).catch(d=>le({color:"red",message:Oe(d)}))}function l(u){e.post("admin/super/purge",{...u,before:N5(u.before)}).then(()=>le({color:"green",message:"Done"})).catch(d=>le({color:"red",message:Oe(d)}))}function c(u){e.post("admin/super/setpassword",u).then(()=>le({color:"green",message:"Done"})).catch(d=>le({color:"red",message:Oe(d)}))}return p.jsxs(_e,{width:600,children:[p.jsx(ce,{order:1,children:"Super Admin"}),p.jsx(cr,{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(De,{children:p.jsx(Z,{onClick:t,children:"Rebuild StructureDefinitions"})}),p.jsx(cr,{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(De,{children:p.jsx(Z,{onClick:r,children:"Rebuild SearchParameters"})}),p.jsx(cr,{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(De,{children:p.jsx(Z,{onClick:n,children:"Rebuild ValueSets"})}),p.jsx(cr,{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(De,{onSubmit:o,children:p.jsxs(ke,{children:[p.jsx(Ge,{title:"Resource Type",children:p.jsx(ne,{name:"resourceType",placeholder:"Reindex Resource Type"})}),p.jsx(Z,{type:"submit",children:"Reindex"})]})}),p.jsx(cr,{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(De,{onSubmit:a,children:p.jsxs(ke,{children:[p.jsx(Ge,{title:"Resource Type",children:p.jsx(ne,{name:"resourceType",placeholder:"Compartments Resource Type"})}),p.jsx(Z,{type:"submit",children:"Rebuild Compartments"})]})}),p.jsx(cr,{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(De,{onSubmit:l,children:p.jsxs(ke,{children:[p.jsx(Ge,{title:"Purge Resource Type",htmlFor:"purgeResourceType",children:p.jsx(mt,{id:"purgeResourceType",name:"resourceType",data:["","AuditEvent","Login"]})}),p.jsx(Ge,{title:"Purge Before",htmlFor:"before",children:p.jsx(Qa,{name:"before",placeholder:"Before Date"})}),p.jsx(Z,{type:"submit",children:"Purge"})]})}),p.jsx(cr,{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(De,{onSubmit:i,children:p.jsxs(ke,{children:[p.jsx(Ge,{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(cr,{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(De,{onSubmit:c,children:p.jsxs(ke,{children:[p.jsx(ne,{name:"email",label:"Email",required:!0}),p.jsx(io,{name:"password",label:"Password",required:!0}),p.jsx(ne,{name:"projectId",label:"Project ID"}),p.jsx(Z,{type:"submit",children:"Force Set Password"})]})})]})}function Ql(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(Vle,{size:"1rem"}),autoClose:2e3})}).catch(a=>{Yo.update({id:r,color:"red",title:t,message:Oe(a),icon:p.jsx(PD,{size:"1rem"}),autoClose:2e3})})}function mue(){return p.jsxs(p.Fragment,{children:[p.jsx(ce,{children:"Users"}),p.jsx(Vm,{resourceType:"Practitioner",fields:["user","profile","admin","_lastUpdated"]}),p.jsx(J,{position:"right",children:p.jsx(je,{to:"/admin/invite",children:"Invite new user"})})]})}function hue(){const t=te().searchResources("ObservationDefinition","_count=100").read();return p.jsxs(ti,{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(Vn,{value:(n=r.category)==null?void 0:n[0]})}),p.jsx("td",{children:p.jsx(Vn,{value:r.code})}),p.jsx("td",{children:p.jsx(Vn,{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(Ov,{ranges:r.qualifiedInterval})})]},r.id)})})]})}function Ov(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:_r(o)})}),p.jsx(Ov,{ranges:(a=e.ranges)==null?void 0:a.filter(i=>i.gender===o)})]},o)})});const n=KP(t.map(o=>o.age&&As(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:_r(o)})}),p.jsx(Ov,{ranges:(a=e.ranges)==null?void 0:a.filter(i=>As(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(P0,{value:o.range})})]})})},`range-${a}`))})}function KP(e){return[...new Set(e.filter(t=>!!t))]}function gue(){const e=te(),t=e.searchResources("ActivityDefinition","_count=100").read(),r=e.searchResources("ObservationDefinition","_count=100").read();return p.jsxs(ti,{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(Vn,{value:(o=n.category)==null?void 0:o[0]})}),p.jsx("td",{children:p.jsx(Vn,{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 vue(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(je,{to:o,suffix:"checklist",children:"Request Group"})]}),p.jsxs("li",{children:["Back to the ",p.jsx(je,{to:e.planDefinition,children:"Plan Definition"})]})]})]}):p.jsx(De,{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(ke,{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(Vn,{value:l.code[0]})]},`action-${c}`)})}),p.jsx(Ge,{title:"Subject",children:p.jsx(Tm,{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 yue(){const{resourceType:e,id:t}=Xe(),r=Ye({reference:e+"/"+t});return r?p.jsx(_e,{children:p.jsx(vue,{planDefinition:r})}):null}function wue(){const e=te(),{resourceType:t,id:r}=Xe(),n=Ye({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),_ue(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=>le({color:"red",message:Oe(m)}))}return p.jsxs(_e,{children:[o.map(u=>p.jsxs("div",{children:[p.jsx(ce,{order:3,children:p.jsx(je,{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 _ue(e){return e==="Patient"||e==="Encounter"}function xue(){const{resourceType:e,id:t}=Xe(),r=Pt(),[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(pc,{search:n,onClick:a=>r(`/${a.resource.resourceType}/${a.resource.id}`),onChange:a=>o(a.definition),hideFilters:!0})})}function bue(){const e=te(),{resourceType:t,id:r}=Xe(),n=e.readHistory(t,r).read();return p.jsx(_e,{children:p.jsx(tie,{history:n})})}function Eue(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 Sue(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=>{Lu(n.currentTarget,{command:"setValue",value:t}).catch(console.error)}})}const Pue=`{
|
|
234
|
+
"resourceType": "Patient",
|
|
235
|
+
"name": [
|
|
236
|
+
{
|
|
237
|
+
"given": [
|
|
238
|
+
"Alice"
|
|
239
|
+
],
|
|
240
|
+
"family": "Smith"
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
}`,$ue="MSH|^~\\&|ADT1|MCM|LABADT|MCM|198808181126|SECURITY|ADT|MSG00001|P|2.1\rPID|||PATID1234^5^M11||JONES^WILLIAM^A^III||19610615|M-||C|1200 N ELM STREET^^GREENSBORO^NC^27401-1020|GL|(919)379-1212|(919)271-3434||S||PATID12345001^2^M10|123456789|987654^NC\rNK1|1|JONES^BARBARA^K|SPO|||||20011105\rPV1|1|I|2000^2012^01||||004777^LEBAUER^SIDNEY^J.|||SUR||-||1|A0-",Oue=W(()=>({hl7Input:{fontFamily:"monospace",fontSize:"12px",lineHeight:1.55,padding:"10px 12px",whiteSpace:"nowrap",width:"100%"}}));function Cue(){const e=te(),{id:t}=Xe(),[r,n]=f.useState(),[o,a]=f.useState(void 0),[i,l]=f.useState(Pue),[c,u]=f.useState($ue),[d,m]=f.useState("application/fhir+json"),{classes:h}=Oue(),g=f.useRef(null),y=f.useRef(null),[w,E]=f.useState(!1);f.useEffect(()=>{e.readResource("Bot",t).then(async $=>{n($),a(await kue(e,$))}).catch($=>le({color:"red",message:Oe($)}))},[e,t]);const _=f.useCallback(()=>Lu(g.current,{command:"getValue"}),[g]),v=f.useCallback(()=>Lu(g.current,{command:"getOutput"}),[g]),x=f.useCallback(async()=>d==="application/fhir+json"?JSON.parse(i):c,[d,i,c]),b=f.useCallback(async $=>{$.preventDefault(),$.stopPropagation(),E(!0);try{const C=await _(),R=await e.createAttachment(C,"index.ts","text/typescript"),j=[];r!=null&&r.sourceCode?j.push({op:"replace",path:"/sourceCode",value:R}):j.push({op:"add",path:"/sourceCode",value:R}),await e.patchResource("Bot",t,j),le({color:"green",message:"Saved"})}catch(C){le({color:"red",message:Oe(C)})}finally{E(!1)}},[e,t,r,_]),P=f.useCallback(async $=>{$.preventDefault(),$.stopPropagation(),E(!0);try{const C=await v();await e.post(e.fhirUrl("Bot",t,"$deploy"),{code:C}),le({color:"green",message:"Deployed"})}catch(C){le({color:"red",message:Oe(C)})}finally{E(!1)}},[e,t,v]),O=f.useCallback(async $=>{$.preventDefault(),$.stopPropagation(),E(!0);try{const C=await x(),R=await e.post(e.fhirUrl("Bot",t,"$execute"),C,d);await Lu(y.current,{command:"setValue",value:R}),le({color:"green",message:"Success"})}catch(C){le({color:"red",message:Oe(C)})}finally{E(!1)}},[e,t,x,d]);return!r||o===void 0?null:p.jsxs(Yr,{m:0,gutter:0,style:{overflow:"hidden"},children:[p.jsx(Yr.Col,{span:8,children:p.jsxs(wn,{m:2,pb:"xs",pr:"xs",pt:"xs",shadow:"md",mih:400,children:[p.jsx(Sue,{iframeRef:g,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:b,loading:w,leftIcon:p.jsx(Ule,{size:"1rem"}),children:"Save"}),p.jsx(Z,{type:"button",onClick:P,loading:w,leftIcon:p.jsx(Ble,{size:"1rem"}),children:"Deploy"}),p.jsx(Z,{type:"button",onClick:O,loading:w,leftIcon:p.jsx(Yle,{size:"1rem"}),children:"Execute"})]})]})}),p.jsxs(Yr.Col,{span:4,children:[p.jsxs(wn,{m:2,pb:"xs",pr:"xs",pt:"xs",shadow:"md",children:[p.jsx(mt,{data:[{label:"FHIR",value:"application/fhir+json"},{label:"HL7",value:"x-application/hl7-v2+er7"}],onChange:$=>m($.currentTarget.value)}),d==="application/fhir+json"?p.jsx(tc,{value:i,onChange:$=>l($),minRows:15}):p.jsx("textarea",{className:h.hl7Input,value:c,onChange:$=>u($.currentTarget.value),rows:15})]}),p.jsx(wn,{m:2,p:"xs",shadow:"md",children:p.jsx(Eue,{iframeRef:y,className:"medplum-bot-output-frame",testId:"output-frame",minHeight:"200px"})})]})]})}async function kue(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(YI);return(await e.download(e.fhirUrl("Binary",a))).text()}return t.code??""}function yc(e){let t=e.meta;return t&&(t={...t,lastUpdated:void 0,versionId:void 0,author:void 0}),{...e,meta:t}}function jue(){const e=te(),{resourceType:t,id:r}=Xe(),n={reference:t+"/"+r},o=f.useCallback(a=>{e.updateResource(yc(a)).then(()=>{le({color:"green",message:"Success"})}).catch(i=>{le({color:"red",message:Oe(i)})})},[e]);switch(t){case"PlanDefinition":return p.jsx(_e,{children:p.jsx(hae,{value:n,onSubmit:o})});case"Questionnaire":return p.jsx(_e,{children:p.jsx(Tae,{questionnaire:n,onSubmit:o})});default:return null}}function Rue(){const{resourceType:e,id:t}=Xe(),r=Ye({reference:e+"/"+t}),n=Pt();return r?p.jsx(_e,{children:p.jsx(Qae,{value:r,onStart:(o,a)=>n(`/forms/${QI(a)}`),onEdit:(o,a,i)=>n(`/${i.reference}}`)})}):null}function Tue(){const e=te(),{resourceType:t,id:r}=Xe(),n=Pt();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=>le({color:"red",message:Oe(o)}))},children:"Delete"})]})}function Iue(){const{resourceType:e,id:t}=Xe(),r=Ye({reference:e+"/"+t});return r?p.jsx(_e,{children:p.jsx(j0,{value:r})}):null}function Due(){const e=te(),{resourceType:t,id:r}=Xe(),[n,o]=f.useState(),a=Pt(),[i,l]=f.useState();f.useEffect(()=>{e.readResource(t,r).then(d=>o(yl(d))).catch(d=>{l(yt(d)),le({color:"red",message:Oe(d)})})},[e,t,r]);const c=f.useCallback(d=>{l(void 0),e.updateResource(yc(d)).then(()=>{a(`/${t}/${r}/details`),le({color:"green",message:"Success"})}).catch(m=>{l(yt(m)),le({color:"red",message:Oe(m)})})},[e,t,r,a]),u=f.useCallback(()=>a(`/${t}/${r}/delete`),[a,t,r]);return n?p.jsx(_e,{children:p.jsx(I5,{defaultValue:n,onSubmit:c,onDelete:u,outcome:i})}):null}function Nue(){const e=te(),{resourceType:t,id:r}=Xe(),n=e.readHistory(t,r).read();return p.jsx(_e,{children:p.jsx(lie,{history:n})})}function Aue(){const e=te(),{resourceType:t,id:r}=Xe(),n=Ye({reference:t+"/"+r}),o=Pt(),[a,i]=f.useState(),l=f.useCallback(c=>{e.updateResource(yc(JSON.parse(c.resource))).then(()=>{i(void 0),o(`/${t}/${r}/details`),le({color:"green",message:"Success"})}).catch(u=>{le({color:"red",message:Oe(u)})})},[e,t,r,o]);return n?p.jsxs(_e,{children:[a&&p.jsx(ni,{outcome:a}),p.jsxs(De,{onSubmit:l,children:[p.jsx(tc,{name:"resource","data-testid":"resource-json",minRows:24,defaultValue:wr(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 Mue(){const{resourceType:e,id:t}=Xe();return Ye({reference:e+"/"+t})?p.jsxs(_e,{children:[p.jsxs(Ys,{icon:p.jsx(zle,{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(K5,{questionnaire:{reference:e+"/"+t},onSubmit:()=>alert("You submitted the preview")})]}):null}function zue(){const e=te(),{id:t}=Xe(),[r,n]=f.useState(),[o,a]=f.useState(0),i=e.searchResources("Subscription","status=active&_count=100").read().filter(c=>Lue(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"),le({color:"green",message:"Success"})}).catch(c=>le({color:"red",message:Oe(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(fc,{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(wl,{name:"bot",resourceType:"Bot",onChange:n}),p.jsx(Z,{onClick:l,children:"Connect"})]}),p.jsx("div",{style:{display:"none"},children:o})]})}function Lue(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 Fue(){const{id:e}=Xe(),t=Pt(),[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(pc,{search:r,onClick:o=>t(`/${o.resource.resourceType}/${o.resource.id}`),onChange:o=>n(o.definition),hideFilters:!0,hideToolbar:!0})})}function Vue(){const e=te(),{resourceType:t,id:r}=Xe(),n=Ye({reference:t+"/"+r}),o=f.useCallback(a=>{e.updateResource(yc(a)).then(()=>{le({color:"green",message:"Success"})}).catch(i=>{le({color:"red",message:Oe(i)})})},[e]);return n?p.jsx(_e,{children:p.jsx(Lae,{onSubmit:o,definition:n})}):null}function Bue(){const{resourceType:e,id:t}=Xe(),r=Ye({reference:e+"/"+t});return r?p.jsx(_e,{children:p.jsx(C0,{value:r})}):null}const Uue=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 Wue(e){const{classes:t,cx:r}=Uue(),n=te(),o=Ye(e.value),[a,i]=f.useState();return f.useEffect(()=>{if(!o)return;const l=W0(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);F5(m),m.reverse(),i(m)}).catch(u=>le({color:"red",message:Oe(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(je,{to:l,children:Hue(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:que(l)})]},l.id)})}):null}function Hue(e){if(e.identifier){for(const t of e.identifier)if(t.value)return t.value}return e.id||""}function que(e){var t;return e.authoredOn?e.authoredOn.substring(0,10):(t=e.meta)!=null&&t.lastUpdated?e.meta.lastUpdated.substring(0,10):""}const Que=W(()=>({container:{position:"absolute",top:65,right:5,width:200,height:50,zIndex:15}}));function Gue(e){var a,i,l,c;const{classes:t}=Que(),r=Ye(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(mt,{defaultValue:e.defaultValue,onChange:u=>e.onChange(u.currentTarget.value),data:n})})}function Kue(e){var r,n;const t=Ye(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:yr((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:Yue(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:Xue(t)})]}):p.jsx(p.Fragment,{})]}):null}function Yue(e){var o;const t=(o=e.collection)==null?void 0:o.collectedDateTime;if(!t)return;const r=new Date(t);return qD(QD(r,new Date))}function Xue(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 qD(QD(t,r))}function qD(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 Jue(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 Zue(){var b,P,O,$,C,R,j;const e=te(),{resourceType:t,id:r}=Xe(),n={reference:t+"/"+r},o=Pt(),[a,i]=f.useState(),l=Ye(n,i),c=Jue(t),u=c[0].toLowerCase(),d=window.location.pathname.split("/").pop(),[m,h]=f.useState(d??u);async function g(){var L,B;const T=(B=(L=(await e.readHistory(t,r)).entry)==null?void 0:L.find(V=>!!V.resource))==null?void 0:B.resource;T?y(T):le({color:"red",message:"No history to restore"})}function y(k){e.updateResource(yc(k)).then(()=>{i(void 0),le({color:"green",message:"Success"})}).catch(T=>{le({color:"red",message:Oe(T)})})}if(a)return JZ(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(ni,{outcome:a});function w(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 _=l&&W0(l),v=l&&Ace(l),x=(O=(P=(b=e.getUserConfiguration())==null?void 0:b.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"&&x&&p.jsx(Gue,{valueSet:{reference:x},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(Wue,{value:l}),l&&p.jsxs(wn,{children:[_&&p.jsx(UD,{patient:_}),v&&p.jsx(Kue,{specimen:v}),t!=="Patient"&&p.jsx(WD,{resource:n}),p.jsx(hl,{children:p.jsx(gt,{value:m.toLowerCase(),onTabChange:w,children:p.jsx(gt.List,{style:{whiteSpace:"nowrap",flexWrap:"nowrap"},children:c.map(k=>p.jsx(gt.Tab,{value:k.toLowerCase(),children:k},k))})})})]}),p.jsx(bD,{})]})}function YP(){var _,v,x,b;const e=Pt(),{resourceType:t,id:r,versionId:n,tab:o}=Xe(),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(je,{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(je,{to:`/${t}/${r}`,children:"Return to resource"})]});const y=h[g].resource,w=g<h.length-1?h[g+1].resource:void 0,E="diff";return p.jsx(p.Fragment,{children:p.jsxs(gt,{value:o||E,onTabChange:P=>e(`/${t}/${r}/_history/${n}/${P}`),children:[p.jsxs(wn,{children:[p.jsx(dc,{fluid:!0,p:"md",children:p.jsx(ae,{children:`${t} ${r}`})}),p.jsxs(gt.List,{children:[p.jsx(gt.Tab,{value:"diff",children:"Diff"}),p.jsx(gt.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(gt.Panel,{value:"diff",children:w?p.jsxs(p.Fragment,{children:[p.jsxs("ul",{children:[p.jsxs("li",{children:["Current: ",(_=y.meta)==null?void 0:_.versionId]}),p.jsxs("li",{children:["Previous:"," ",p.jsx(je,{to:`/${t}/${r}/_history/${(v=w.meta)==null?void 0:v.versionId}`,children:(x=w.meta)==null?void 0:x.versionId})]})]}),p.jsx(aie,{original:w,revised:y})]}):p.jsxs(p.Fragment,{children:[p.jsxs("ul",{children:[p.jsxs("li",{children:["Current: ",(b=y.meta)==null?void 0:b.versionId]}),p.jsx("li",{children:"Previous: (none)"})]}),p.jsx("pre",{children:JSON.stringify(y,void 0,2)})]})}),p.jsx(gt.Panel,{value:"raw",children:p.jsx("pre",{children:JSON.stringify(y,void 0,2)})})]})]})})}function ede(){const{resourceType:e,id:t}=Xe(),r=Pt(),[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(pc,{search:n,onClick:a=>r(`/${a.resource.resourceType}/${a.resource.id}`),onChange:a=>o(a.definition),hideFilters:!0})})}function XP(){const{resourceType:e,id:t}=Xe(),r={reference:e+"/"+t};switch(e){case"Encounter":return p.jsx(xoe,{encounter:r});case"Patient":return p.jsx(mae,{patient:r});case"ServiceRequest":return p.jsx(uie,{serviceRequest:r});default:return p.jsx(_oe,{resource:r})}}function tde(){return p.jsx($le,{children:p.jsxs(se,{errorElement:p.jsx(Dce,{}),children:[p.jsx(se,{path:"/signin",element:p.jsx(eue,{})}),p.jsx(se,{path:"/oauth",element:p.jsx(Kce,{})}),p.jsx(se,{path:"/resetpassword",element:p.jsx(Xce,{})}),p.jsx(se,{path:"/setpassword/:id/:secret",element:p.jsx(Zce,{})}),p.jsx(se,{path:"/register",element:p.jsx(Yce,{})}),p.jsx(se,{path:"/changepassword",element:p.jsx(Tce,{})}),p.jsx(se,{path:"/security",element:p.jsx(Jce,{})}),p.jsx(se,{path:"/mfa",element:p.jsx(Qce,{})}),p.jsx(se,{path:"/batch",element:p.jsx(jce,{})}),p.jsx(se,{path:"/bulk/:resourceType",element:p.jsx(Rce,{})}),p.jsx(se,{path:"/smart",element:p.jsx(tue,{})}),p.jsx(se,{path:"/forms/:id",element:p.jsx(zce,{})}),p.jsx(se,{path:"/admin/super",element:p.jsx(pue,{})}),p.jsxs(se,{path:"/admin",element:p.jsx(uue,{}),children:[p.jsx(se,{path:"patients",element:p.jsx(cue,{})}),p.jsx(se,{path:"bots/new",element:p.jsx(oue,{})}),p.jsx(se,{path:"bots",element:p.jsx(rue,{})}),p.jsx(se,{path:"clients/new",element:p.jsx(aue,{})}),p.jsx(se,{path:"clients",element:p.jsx(nue,{})}),p.jsx(se,{path:"details",element:p.jsx(QP,{})}),p.jsx(se,{path:"invite",element:p.jsx(sue,{})}),p.jsx(se,{path:"users",element:p.jsx(mue,{})}),p.jsx(se,{path:"project",element:p.jsx(QP,{})}),p.jsx(se,{path:"secrets",element:p.jsx(due,{})}),p.jsx(se,{path:"sites",element:p.jsx(fue,{})}),p.jsx(se,{path:"members/:membershipId",element:p.jsx(lue,{})})]}),p.jsx(se,{path:"/lab/assays",element:p.jsx(hue,{})}),p.jsx(se,{path:"/lab/panels",element:p.jsx(gue,{})}),p.jsx(se,{path:"/:resourceType/:id/_history/:versionId/:tab",element:p.jsx(YP,{})}),p.jsx(se,{path:"/:resourceType/:id/_history/:versionId",element:p.jsx(YP,{})}),p.jsx(se,{path:"/:resourceType/new",element:p.jsx(Ice,{})}),p.jsxs(se,{path:"/:resourceType/:id",element:p.jsx(Zue,{}),children:[p.jsx(se,{index:!0,element:p.jsx(XP,{})}),p.jsx(se,{path:"apply",element:p.jsx(yue,{})}),p.jsx(se,{path:"apps",element:p.jsx(wue,{})}),p.jsx(se,{path:"event",element:p.jsx(xue,{})}),p.jsx(se,{path:"blame",element:p.jsx(bue,{})}),p.jsx(se,{path:"bots",element:p.jsx(zue,{})}),p.jsx(se,{path:"builder",element:p.jsx(jue,{})}),p.jsx(se,{path:"checklist",element:p.jsx(Rue,{})}),p.jsx(se,{path:"delete",element:p.jsx(Tue,{})}),p.jsx(se,{path:"details",element:p.jsx(Iue,{})}),p.jsx(se,{path:"edit",element:p.jsx(Due,{})}),p.jsx(se,{path:"editor",element:p.jsx(Cue,{})}),p.jsx(se,{path:"history",element:p.jsx(Nue,{})}),p.jsx(se,{path:"json",element:p.jsx(Aue,{})}),p.jsx(se,{path:"preview",element:p.jsx(Mue,{})}),p.jsx(se,{path:"responses",element:p.jsx(Fue,{})}),p.jsx(se,{path:"report",element:p.jsx(Bue,{})}),p.jsx(se,{path:"ranges",element:p.jsx(Vue,{})}),p.jsx(se,{path:"subscriptions",element:p.jsx(ede,{})}),p.jsx(se,{path:"timeline",element:p.jsx(XP,{})})]}),p.jsx(se,{path:"/:resourceType",element:p.jsx(qP,{})}),p.jsx(se,{path:"/",element:p.jsx(qP,{})})]})})}function rde(){const e=te(),t=e.getUserConfiguration(),r=da(),[n]=V0();return e.isLoading()?p.jsx(oa,{}):p.jsx(dne,{logo:p.jsx(En,{size:24}),pathname:r.pathname,searchParams:n,version:Vte,menus:nde(t),displayAddBookmark:!!(t!=null&&t.id),children:p.jsx(f.Suspense,{fallback:p.jsx(oa,{}),children:p.jsx(tde,{})})})}function nde(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:ode(a.target)})))||[]}}))||[];return t.push({title:"Settings",links:[{label:"Security",href:"/security",icon:p.jsx(Qle,{})}]}),t}const JP={Patient:Zle,Practitioner:Hle,Organization:Fle,ServiceRequest:Xle,DiagnosticReport:Jle,Questionnaire:Wle,admin:Lle,AccessPolicy:qle,Subscription:ese,batch:Kle,Observation:Gle};function ode(e){try{const t=new URL(e,"https://app.medplum.com").pathname.split("/")[1];if(t in JP){const r=JP[t];return p.jsx(r,{})}}catch{}return p.jsx(Jy,{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 ade(){const e=vc(),t=new Qte({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=kle([{path:"*",element:p.jsx(rde,{})}]),o=i=>n.navigate(i);lD(document.getElementById("root")).render(p.jsx(s.StrictMode,{children:p.jsx(Xte,{medplum:t,navigate:o,children:p.jsxs(B$,{theme:r,withGlobalStyles:!0,withNormalizeCSS:!0,children:[p.jsx(ri,{position:"bottom-right"}),p.jsx(Ele,{router:n})]})})}))}ade().catch(console.error);
|
|
244
|
+
//# sourceMappingURL=index-27ab8e9d.js.map
|