dara-core 1.14.0a1__py3-none-any.whl → 1.14.0a2__py3-none-any.whl

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.
dara/core/auth/base.py CHANGED
@@ -69,14 +69,6 @@ class BaseAuthConfig(BaseModel, abc.ABC):
69
69
  Defines components to use for auth routes
70
70
  """
71
71
 
72
- supports_token_refresh: ClassVar[bool] = False
73
- """
74
- Whether this auth config supports token refresh.
75
-
76
- If an auth config supports token refresh, it should override the refresh_token method
77
- and set this to True.
78
- """
79
-
80
72
  @abc.abstractmethod
81
73
  def get_token(self, body: SessionRequestBody) -> Union[TokenResponse, RedirectResponse]:
82
74
  """
dara/core/auth/routes.py CHANGED
@@ -19,7 +19,15 @@ from inspect import iscoroutinefunction
19
19
  from typing import Union, cast
20
20
 
21
21
  import jwt
22
- from fastapi import APIRouter, Cookie, Depends, HTTPException, Request, Response
22
+ from fastapi import (
23
+ APIRouter,
24
+ BackgroundTasks,
25
+ Cookie,
26
+ Depends,
27
+ HTTPException,
28
+ Request,
29
+ Response,
30
+ )
23
31
  from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
24
32
 
25
33
  from dara.core.auth.base import BaseAuthConfig
@@ -108,6 +116,7 @@ async def _revoke_session(response: Response, credentials: HTTPAuthorizationCred
108
116
  @auth_router.post('/refresh-token')
109
117
  async def handle_refresh_token(
110
118
  response: Response,
119
+ background_tasks: BackgroundTasks,
111
120
  dara_refresh_token: Union[str, None] = Cookie(default=None),
112
121
  credentials: HTTPAuthorizationCredentials = Depends(HTTPBearer()),
113
122
  ):
@@ -130,9 +139,15 @@ async def handle_refresh_token(
130
139
  ),
131
140
  )
132
141
 
133
- from dara.core.internal.registries import auth_registry
142
+ from dara.core.internal.registries import (
143
+ auth_registry,
144
+ utils_registry,
145
+ websocket_registry,
146
+ )
147
+ from dara.core.internal.websocket import WebsocketManager
134
148
 
135
149
  auth_config: BaseAuthConfig = auth_registry.get('auth_config')
150
+ ws_manager: WebsocketManager = utils_registry.get('WebsocketManager')
136
151
 
137
152
  try:
138
153
  # decode the old token ignoring expiry date
@@ -141,6 +156,17 @@ async def handle_refresh_token(
141
156
  # Refresh logic up to implementation - passing in old token data so session_id can be preserved
142
157
  session_token, refresh_token = auth_config.refresh_token(old_token_data, dara_refresh_token)
143
158
 
159
+ # Notify the active websocket handlers (i.e. active connections, per each tab open)
160
+ # so they can update the data in ContextVars
161
+ async def notify_ws_connections():
162
+ session_token_data = decode_token(session_token)
163
+ channels = websocket_registry.get(old_token_data.session_id)
164
+ for channel in channels:
165
+ if handler := ws_manager.handlers.get(channel):
166
+ await handler.update_token(session_token_data)
167
+
168
+ background_tasks.add_task(notify_ws_connections)
169
+
144
170
  # Using 'Strict' as it is only used for the refresh-token endpoint so cross-site requests are not expected
145
171
  response.set_cookie(
146
172
  key='dara_refresh_token', value=refresh_token, secure=True, httponly=True, samesite='strict'
@@ -212,7 +212,6 @@ def create_router(config: Configuration):
212
212
  async def get_auth_config(): # pylint: disable=unused-variable
213
213
  return {
214
214
  'auth_components': config.auth_config.component_config.dict(),
215
- 'supports_token_refresh': config.auth_config.supports_token_refresh,
216
215
  }
217
216
 
218
217
  @core_api_router.get('/components', dependencies=[Depends(verify_session)])
@@ -156,6 +156,16 @@ class WebSocketHandler:
156
156
  Stream containing messages to send to the client.
157
157
  """
158
158
 
159
+ token_send_stream: MemoryObjectSendStream[TokenData]
160
+ """
161
+ Stream for sending token updates to the WS connection.
162
+ """
163
+
164
+ token_receive_stream: MemoryObjectReceiveStream[TokenData]
165
+ """
166
+ Stream for receiving token updates in the WS connection.
167
+ """
168
+
159
169
  pending_responses: Dict[str, Tuple[Event, Optional[Any]]]
160
170
  """
161
171
  A map of pending responses from the client. The key is the message ID and the value is a tuple of the event to
@@ -167,11 +177,38 @@ class WebSocketHandler:
167
177
 
168
178
  def __init__(self, channel_id: str):
169
179
  send_stream, receive_stream = create_memory_object_stream[ServerMessage](math.inf)
170
- self.channel_id = channel_id
171
- self.send_stream = send_stream
172
180
  self.receive_stream = receive_stream
181
+ self.send_stream = send_stream
182
+
183
+ token_send_stream, token_receive_stream = anyio.create_memory_object_stream[TokenData](math.inf)
184
+ self.token_send_stream = token_send_stream
185
+ self.token_receive_stream = token_receive_stream
186
+
187
+ self.channel_id = channel_id
173
188
  self.pending_responses = {}
174
189
 
190
+ async def update_token(self, token_data: TokenData):
191
+ """
192
+ Update the token for the client.
193
+ Should be used if the token is refreshed or changed in some way
194
+ so the live WS connection can update it's ContextVars accordingly
195
+ and they're up to date in custom message handlers.
196
+
197
+ :param token_data: The new token data
198
+ """
199
+ await self.token_send_stream.send(token_data)
200
+
201
+ def get_token_update(self) -> Optional[TokenData]:
202
+ """
203
+ Get the latest token update for the client.
204
+
205
+ :return: The latest token update
206
+ """
207
+ try:
208
+ return self.token_receive_stream.receive_nowait()
209
+ except Exception:
210
+ return None
211
+
175
212
  async def send_message(self, message: ServerMessage):
176
213
  """
177
214
  Send a message to the client.
@@ -446,17 +483,20 @@ async def ws_handler(websocket: WebSocket, token: Optional[str] = Query(default=
446
483
  else:
447
484
  sessions_registry.set(user_identifier, {token_content.session_id})
448
485
 
449
- # Set Auth context vars for the WS connection
450
- USER.set(
451
- UserData(
452
- identity_id=token_content.identity_id,
453
- identity_name=token_content.identity_name,
454
- identity_email=token_content.identity_email,
455
- groups=token_content.groups,
486
+ def update_context(token_data: TokenData):
487
+ USER.set(
488
+ UserData(
489
+ identity_id=token_data.identity_id,
490
+ identity_name=token_data.identity_name,
491
+ identity_email=token_data.identity_email,
492
+ groups=token_data.groups,
493
+ )
456
494
  )
457
- )
458
- SESSION_ID.set(token_content.session_id)
459
- ID_TOKEN.set(token_content.id_token)
495
+ SESSION_ID.set(token_data.session_id)
496
+ ID_TOKEN.set(token_data.id_token)
497
+
498
+ # Set initial Auth context vars for the WS connection
499
+ update_context(token_content)
460
500
 
461
501
  # Change protocol from http to ws - from this point exceptions can't be raised
462
502
  await websocket.accept()
@@ -488,6 +528,10 @@ async def ws_handler(websocket: WebSocket, token: Optional[str] = Query(default=
488
528
  # as the latter does not properly handle disconnections e.g. when relaoading the server
489
529
  data = await websocket.receive_json()
490
530
 
531
+ # update Auth context vars for the WS connection
532
+ while new_token_data := handler.get_token_update():
533
+ update_context(new_token_data)
534
+
491
535
  # Heartbeat to keep connection alive
492
536
  if data['type'] == 'ping':
493
537
  await websocket.send_json({'type': 'pong', 'message': None})
@@ -1200,7 +1200,7 @@ var __privateMethod = (obj, member, method) => {
1200
1200
  * This source code is licensed under the MIT license found in the
1201
1201
  * LICENSE file in the root directory of this source tree.
1202
1202
  */
1203
- var b$1 = "function" === typeof Symbol && Symbol.for, c$1 = b$1 ? Symbol.for("react.element") : 60103, d$2 = b$1 ? Symbol.for("react.portal") : 60106, e$3 = b$1 ? Symbol.for("react.fragment") : 60107, f$2 = b$1 ? Symbol.for("react.strict_mode") : 60108, g$1 = b$1 ? Symbol.for("react.profiler") : 60114, h$1 = b$1 ? Symbol.for("react.provider") : 60109, k$2 = b$1 ? Symbol.for("react.context") : 60110, l$3 = b$1 ? Symbol.for("react.async_mode") : 60111, m$2 = b$1 ? Symbol.for("react.concurrent_mode") : 60111, n$4 = b$1 ? Symbol.for("react.forward_ref") : 60112, p$3 = b$1 ? Symbol.for("react.suspense") : 60113, q$2 = b$1 ? Symbol.for("react.suspense_list") : 60120, r$3 = b$1 ? Symbol.for("react.memo") : 60115, t$2 = b$1 ? Symbol.for("react.lazy") : 60116, v$1 = b$1 ? Symbol.for("react.block") : 60121, w$2 = b$1 ? Symbol.for("react.fundamental") : 60117, x$1 = b$1 ? Symbol.for("react.responder") : 60118, y$1 = b$1 ? Symbol.for("react.scope") : 60119;
1203
+ var b$1 = "function" === typeof Symbol && Symbol.for, c$1 = b$1 ? Symbol.for("react.element") : 60103, d$2 = b$1 ? Symbol.for("react.portal") : 60106, e$2 = b$1 ? Symbol.for("react.fragment") : 60107, f$2 = b$1 ? Symbol.for("react.strict_mode") : 60108, g$1 = b$1 ? Symbol.for("react.profiler") : 60114, h$1 = b$1 ? Symbol.for("react.provider") : 60109, k$2 = b$1 ? Symbol.for("react.context") : 60110, l$3 = b$1 ? Symbol.for("react.async_mode") : 60111, m$2 = b$1 ? Symbol.for("react.concurrent_mode") : 60111, n$3 = b$1 ? Symbol.for("react.forward_ref") : 60112, p$3 = b$1 ? Symbol.for("react.suspense") : 60113, q$2 = b$1 ? Symbol.for("react.suspense_list") : 60120, r$2 = b$1 ? Symbol.for("react.memo") : 60115, t$1 = b$1 ? Symbol.for("react.lazy") : 60116, v$1 = b$1 ? Symbol.for("react.block") : 60121, w$2 = b$1 ? Symbol.for("react.fundamental") : 60117, x$1 = b$1 ? Symbol.for("react.responder") : 60118, y$1 = b$1 ? Symbol.for("react.scope") : 60119;
1204
1204
  function z$1(a2) {
1205
1205
  if ("object" === typeof a2 && null !== a2) {
1206
1206
  var u2 = a2.$$typeof;
@@ -1209,7 +1209,7 @@ var __privateMethod = (obj, member, method) => {
1209
1209
  switch (a2 = a2.type, a2) {
1210
1210
  case l$3:
1211
1211
  case m$2:
1212
- case e$3:
1212
+ case e$2:
1213
1213
  case g$1:
1214
1214
  case f$2:
1215
1215
  case p$3:
@@ -1217,9 +1217,9 @@ var __privateMethod = (obj, member, method) => {
1217
1217
  default:
1218
1218
  switch (a2 = a2 && a2.$$typeof, a2) {
1219
1219
  case k$2:
1220
- case n$4:
1221
- case t$2:
1222
- case r$3:
1220
+ case n$3:
1221
+ case t$1:
1222
+ case r$2:
1223
1223
  case h$1:
1224
1224
  return a2;
1225
1225
  default:
@@ -1239,10 +1239,10 @@ var __privateMethod = (obj, member, method) => {
1239
1239
  reactIs_production_min$1.ContextConsumer = k$2;
1240
1240
  reactIs_production_min$1.ContextProvider = h$1;
1241
1241
  reactIs_production_min$1.Element = c$1;
1242
- reactIs_production_min$1.ForwardRef = n$4;
1243
- reactIs_production_min$1.Fragment = e$3;
1244
- reactIs_production_min$1.Lazy = t$2;
1245
- reactIs_production_min$1.Memo = r$3;
1242
+ reactIs_production_min$1.ForwardRef = n$3;
1243
+ reactIs_production_min$1.Fragment = e$2;
1244
+ reactIs_production_min$1.Lazy = t$1;
1245
+ reactIs_production_min$1.Memo = r$2;
1246
1246
  reactIs_production_min$1.Portal = d$2;
1247
1247
  reactIs_production_min$1.Profiler = g$1;
1248
1248
  reactIs_production_min$1.StrictMode = f$2;
@@ -1261,16 +1261,16 @@ var __privateMethod = (obj, member, method) => {
1261
1261
  return "object" === typeof a2 && null !== a2 && a2.$$typeof === c$1;
1262
1262
  };
1263
1263
  reactIs_production_min$1.isForwardRef = function(a2) {
1264
- return z$1(a2) === n$4;
1264
+ return z$1(a2) === n$3;
1265
1265
  };
1266
1266
  reactIs_production_min$1.isFragment = function(a2) {
1267
- return z$1(a2) === e$3;
1267
+ return z$1(a2) === e$2;
1268
1268
  };
1269
1269
  reactIs_production_min$1.isLazy = function(a2) {
1270
- return z$1(a2) === t$2;
1270
+ return z$1(a2) === t$1;
1271
1271
  };
1272
1272
  reactIs_production_min$1.isMemo = function(a2) {
1273
- return z$1(a2) === r$3;
1273
+ return z$1(a2) === r$2;
1274
1274
  };
1275
1275
  reactIs_production_min$1.isPortal = function(a2) {
1276
1276
  return z$1(a2) === d$2;
@@ -1285,7 +1285,7 @@ var __privateMethod = (obj, member, method) => {
1285
1285
  return z$1(a2) === p$3;
1286
1286
  };
1287
1287
  reactIs_production_min$1.isValidElementType = function(a2) {
1288
- return "string" === typeof a2 || "function" === typeof a2 || a2 === e$3 || a2 === m$2 || a2 === g$1 || a2 === f$2 || a2 === p$3 || a2 === q$2 || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t$2 || a2.$$typeof === r$3 || a2.$$typeof === h$1 || a2.$$typeof === k$2 || a2.$$typeof === n$4 || a2.$$typeof === w$2 || a2.$$typeof === x$1 || a2.$$typeof === y$1 || a2.$$typeof === v$1);
1288
+ return "string" === typeof a2 || "function" === typeof a2 || a2 === e$2 || a2 === m$2 || a2 === g$1 || a2 === f$2 || a2 === p$3 || a2 === q$2 || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t$1 || a2.$$typeof === r$2 || a2.$$typeof === h$1 || a2.$$typeof === k$2 || a2.$$typeof === n$3 || a2.$$typeof === w$2 || a2.$$typeof === x$1 || a2.$$typeof === y$1 || a2.$$typeof === v$1);
1289
1289
  };
1290
1290
  reactIs_production_min$1.typeOf = z$1;
1291
1291
  (function(module2) {
@@ -12153,7 +12153,7 @@ var __privateMethod = (obj, member, method) => {
12153
12153
  * This source code is licensed under the MIT license found in the
12154
12154
  * LICENSE file in the root directory of this source tree.
12155
12155
  */
12156
- var f$1 = React__default.default, k$1 = Symbol.for("react.element"), l$2 = Symbol.for("react.fragment"), m$1 = Object.prototype.hasOwnProperty, n$3 = f$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p$2 = { key: true, ref: true, __self: true, __source: true };
12156
+ var f$1 = React__default.default, k$1 = Symbol.for("react.element"), l$2 = Symbol.for("react.fragment"), m$1 = Object.prototype.hasOwnProperty, n$2 = f$1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p$2 = { key: true, ref: true, __self: true, __source: true };
12157
12157
  function q$1(c2, a2, g2) {
12158
12158
  var b2, d2 = {}, e3 = null, h2 = null;
12159
12159
  void 0 !== g2 && (e3 = "" + g2);
@@ -12164,7 +12164,7 @@ var __privateMethod = (obj, member, method) => {
12164
12164
  if (c2 && c2.defaultProps)
12165
12165
  for (b2 in a2 = c2.defaultProps, a2)
12166
12166
  void 0 === d2[b2] && (d2[b2] = a2[b2]);
12167
- return { $$typeof: k$1, type: c2, key: e3, ref: h2, props: d2, _owner: n$3.current };
12167
+ return { $$typeof: k$1, type: c2, key: e3, ref: h2, props: d2, _owner: n$2.current };
12168
12168
  }
12169
12169
  reactJsxRuntime_production_min.Fragment = l$2;
12170
12170
  reactJsxRuntime_production_min.jsx = q$1;
@@ -34373,23 +34373,23 @@ var __privateMethod = (obj, member, method) => {
34373
34373
  * This source code is licensed under the MIT license found in the
34374
34374
  * LICENSE file in the root directory of this source tree.
34375
34375
  */
34376
- var b = 60103, c = 60106, d = 60107, e$2 = 60108, f = 60114, g = 60109, h = 60110, k = 60112, l$1 = 60113, m = 60120, n$2 = 60115, p = 60116, q = 60121, r$2 = 60122, u = 60117, v = 60129, w = 60131;
34376
+ var b = 60103, c = 60106, d = 60107, e$1 = 60108, f = 60114, g = 60109, h = 60110, k = 60112, l$1 = 60113, m = 60120, n$1 = 60115, p = 60116, q = 60121, r$1 = 60122, u = 60117, v = 60129, w = 60131;
34377
34377
  if ("function" === typeof Symbol && Symbol.for) {
34378
34378
  var x = Symbol.for;
34379
34379
  b = x("react.element");
34380
34380
  c = x("react.portal");
34381
34381
  d = x("react.fragment");
34382
- e$2 = x("react.strict_mode");
34382
+ e$1 = x("react.strict_mode");
34383
34383
  f = x("react.profiler");
34384
34384
  g = x("react.provider");
34385
34385
  h = x("react.context");
34386
34386
  k = x("react.forward_ref");
34387
34387
  l$1 = x("react.suspense");
34388
34388
  m = x("react.suspense_list");
34389
- n$2 = x("react.memo");
34389
+ n$1 = x("react.memo");
34390
34390
  p = x("react.lazy");
34391
34391
  q = x("react.block");
34392
- r$2 = x("react.server.block");
34392
+ r$1 = x("react.server.block");
34393
34393
  u = x("react.fundamental");
34394
34394
  v = x("react.debug_trace_mode");
34395
34395
  w = x("react.legacy_hidden");
@@ -34402,7 +34402,7 @@ var __privateMethod = (obj, member, method) => {
34402
34402
  switch (a2 = a2.type, a2) {
34403
34403
  case d:
34404
34404
  case f:
34405
- case e$2:
34405
+ case e$1:
34406
34406
  case l$1:
34407
34407
  case m:
34408
34408
  return a2;
@@ -34411,7 +34411,7 @@ var __privateMethod = (obj, member, method) => {
34411
34411
  case h:
34412
34412
  case k:
34413
34413
  case p:
34414
- case n$2:
34414
+ case n$1:
34415
34415
  case g:
34416
34416
  return a2;
34417
34417
  default:
@@ -34423,7 +34423,7 @@ var __privateMethod = (obj, member, method) => {
34423
34423
  }
34424
34424
  }
34425
34425
  }
34426
- var z = g, A = b, B = k, C = d, D = p, E = n$2, F = c, G = f, H = e$2, I = l$1;
34426
+ var z = g, A = b, B = k, C = d, D = p, E = n$1, F = c, G = f, H = e$1, I = l$1;
34427
34427
  reactIs_production_min.ContextConsumer = h;
34428
34428
  reactIs_production_min.ContextProvider = z;
34429
34429
  reactIs_production_min.Element = A;
@@ -34460,7 +34460,7 @@ var __privateMethod = (obj, member, method) => {
34460
34460
  return y(a2) === p;
34461
34461
  };
34462
34462
  reactIs_production_min.isMemo = function(a2) {
34463
- return y(a2) === n$2;
34463
+ return y(a2) === n$1;
34464
34464
  };
34465
34465
  reactIs_production_min.isPortal = function(a2) {
34466
34466
  return y(a2) === c;
@@ -34469,13 +34469,13 @@ var __privateMethod = (obj, member, method) => {
34469
34469
  return y(a2) === f;
34470
34470
  };
34471
34471
  reactIs_production_min.isStrictMode = function(a2) {
34472
- return y(a2) === e$2;
34472
+ return y(a2) === e$1;
34473
34473
  };
34474
34474
  reactIs_production_min.isSuspense = function(a2) {
34475
34475
  return y(a2) === l$1;
34476
34476
  };
34477
34477
  reactIs_production_min.isValidElementType = function(a2) {
34478
- return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f || a2 === v || a2 === e$2 || a2 === l$1 || a2 === m || a2 === w || "object" === typeof a2 && null !== a2 && (a2.$$typeof === p || a2.$$typeof === n$2 || a2.$$typeof === g || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === u || a2.$$typeof === q || a2[0] === r$2) ? true : false;
34478
+ return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f || a2 === v || a2 === e$1 || a2 === l$1 || a2 === m || a2 === w || "object" === typeof a2 && null !== a2 && (a2.$$typeof === p || a2.$$typeof === n$1 || a2.$$typeof === g || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === u || a2.$$typeof === q || a2[0] === r$1) ? true : false;
34479
34479
  };
34480
34480
  reactIs_production_min.typeOf = y;
34481
34481
  (function(module2) {
@@ -34483,10 +34483,10 @@ var __privateMethod = (obj, member, method) => {
34483
34483
  module2.exports = reactIs_production_min;
34484
34484
  }
34485
34485
  })(reactIs);
34486
- let e$1 = (e3) => "object" == typeof e3 && null != e3 && 1 === e3.nodeType, t$1 = (e3, t2) => (!t2 || "hidden" !== e3) && ("visible" !== e3 && "clip" !== e3), n$1 = (e3, n2) => {
34486
+ let e = (e3) => "object" == typeof e3 && null != e3 && 1 === e3.nodeType, t = (e3, t2) => (!t2 || "hidden" !== e3) && ("visible" !== e3 && "clip" !== e3), n = (e3, n2) => {
34487
34487
  if (e3.clientHeight < e3.scrollHeight || e3.clientWidth < e3.scrollWidth) {
34488
34488
  let l2 = getComputedStyle(e3, null);
34489
- return t$1(l2.overflowY, n2) || t$1(l2.overflowX, n2) || ((e4) => {
34489
+ return t(l2.overflowY, n2) || t(l2.overflowX, n2) || ((e4) => {
34490
34490
  let t2 = ((e6) => {
34491
34491
  if (!e6.ownerDocument || !e6.ownerDocument.defaultView)
34492
34492
  return null;
@@ -34504,20 +34504,20 @@ var __privateMethod = (obj, member, method) => {
34504
34504
  let t2 = e3.parentElement;
34505
34505
  return null == t2 ? e3.getRootNode().host || null : t2;
34506
34506
  };
34507
- var o$1 = (t2, o2) => {
34507
+ var o = (t2, o2) => {
34508
34508
  var r2, d2, h2, f2, u2, s;
34509
34509
  if ("undefined" == typeof document)
34510
34510
  return [];
34511
34511
  let { scrollMode: a2, block: c2, inline: g2, boundary: m2, skipOverflowHiddenElements: p2 } = o2, w2 = "function" == typeof m2 ? m2 : (e3) => e3 !== m2;
34512
- if (!e$1(t2))
34512
+ if (!e(t2))
34513
34513
  throw new TypeError("Invalid target");
34514
34514
  let W = document.scrollingElement || document.documentElement, H2 = [], b2 = t2;
34515
- for (; e$1(b2) && w2(b2); ) {
34515
+ for (; e(b2) && w2(b2); ) {
34516
34516
  if (b2 = i(b2), b2 === W) {
34517
34517
  H2.push(b2);
34518
34518
  break;
34519
34519
  }
34520
- null != b2 && b2 === document.body && n$1(b2) && !n$1(document.documentElement) || null != b2 && n$1(b2, p2) && H2.push(b2);
34520
+ null != b2 && b2 === document.body && n(b2) && !n(document.documentElement) || null != b2 && n(b2, p2) && H2.push(b2);
34521
34521
  }
34522
34522
  let v2 = null != (d2 = null == (r2 = window.visualViewport) ? void 0 : r2.width) ? d2 : innerWidth, y2 = null != (f2 = null == (h2 = window.visualViewport) ? void 0 : h2.height) ? f2 : innerHeight, E2 = null != (u2 = window.scrollX) ? u2 : pageXOffset, M = null != (s = window.scrollY) ? s : pageYOffset, { height: x2, width: I2, top: C2, right: R, bottom: T, left: V } = t2.getBoundingClientRect(), k2 = "start" === c2 || "nearest" === c2 ? C2 : "end" === c2 ? T : C2 + x2 / 2, B2 = "center" === g2 ? V + I2 / 2 : "end" === g2 ? R : V, D2 = [];
34523
34523
  for (let e3 = 0; e3 < H2.length; e3++) {
@@ -34799,7 +34799,7 @@ var __privateMethod = (obj, member, method) => {
34799
34799
  if (!node) {
34800
34800
  return;
34801
34801
  }
34802
- var actions = o$1(node, {
34802
+ var actions = o(node, {
34803
34803
  boundary: menuNode,
34804
34804
  block: "nearest",
34805
34805
  scrollMode: "if-needed"
@@ -36777,7 +36777,7 @@ var __privateMethod = (obj, member, method) => {
36777
36777
  }
36778
36778
  })();
36779
36779
  })(classnames);
36780
- const r$1 = classnames.exports;
36780
+ const r = classnames.exports;
36781
36781
  function _typeof(o2) {
36782
36782
  "@babel/helpers - typeof";
36783
36783
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o3) {
@@ -42072,7 +42072,7 @@ var __privateMethod = (obj, member, method) => {
42072
42072
  var e3 = this.dropdownRef.current;
42073
42073
  e3 && (e3.scrollTop = e3.scrollHeight / 2 - e3.clientHeight / 2);
42074
42074
  } }, { key: "render", value: function() {
42075
- var t2 = r$1({ "react-datepicker__year-dropdown": true, "react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown });
42075
+ var t2 = r({ "react-datepicker__year-dropdown": true, "react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown });
42076
42076
  return React__default.default.createElement("div", { className: t2, ref: this.dropdownRef }, this.renderOptions());
42077
42077
  } }]), a2;
42078
42078
  }()), gt = function(t2) {
@@ -42215,7 +42215,7 @@ var __privateMethod = (obj, member, method) => {
42215
42215
  }), r2.state = { monthYearsList: Ct(r2.props.minDate, r2.props.maxDate) }, r2;
42216
42216
  }
42217
42217
  return le(o2, [{ key: "render", value: function() {
42218
- var t3 = r$1({ "react-datepicker__month-year-dropdown": true, "react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown });
42218
+ var t3 = r({ "react-datepicker__month-year-dropdown": true, "react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown });
42219
42219
  return React__default.default.createElement("div", { className: t3 }, this.renderOptions());
42220
42220
  } }]), o2;
42221
42221
  }()), _t = function(t2) {
@@ -42330,7 +42330,7 @@ var __privateMethod = (obj, member, method) => {
42330
42330
  return t3.isSameDay(t3.props.selected);
42331
42331
  }), de(ye(t3), "getClassNames", function(e3) {
42332
42332
  var n3 = t3.props.dayClassName ? t3.props.dayClassName(e3) : void 0;
42333
- return r$1("react-datepicker__day", n3, "react-datepicker__day--" + Oe(t3.props.day), { "react-datepicker__day--disabled": t3.isDisabled(), "react-datepicker__day--excluded": t3.isExcluded(), "react-datepicker__day--selected": t3.isSelected(), "react-datepicker__day--keyboard-selected": t3.isKeyboardSelected(), "react-datepicker__day--range-start": t3.isRangeStart(), "react-datepicker__day--range-end": t3.isRangeEnd(), "react-datepicker__day--in-range": t3.isInRange(), "react-datepicker__day--in-selecting-range": t3.isInSelectingRange(), "react-datepicker__day--selecting-range-start": t3.isSelectingRangeStart(), "react-datepicker__day--selecting-range-end": t3.isSelectingRangeEnd(), "react-datepicker__day--today": t3.isCurrentDay(), "react-datepicker__day--weekend": t3.isWeekend(), "react-datepicker__day--outside-month": t3.isAfterMonth() || t3.isBeforeMonth() }, t3.getHighLightedClass("react-datepicker__day--highlighted"));
42333
+ return r("react-datepicker__day", n3, "react-datepicker__day--" + Oe(t3.props.day), { "react-datepicker__day--disabled": t3.isDisabled(), "react-datepicker__day--excluded": t3.isExcluded(), "react-datepicker__day--selected": t3.isSelected(), "react-datepicker__day--keyboard-selected": t3.isKeyboardSelected(), "react-datepicker__day--range-start": t3.isRangeStart(), "react-datepicker__day--range-end": t3.isRangeEnd(), "react-datepicker__day--in-range": t3.isInRange(), "react-datepicker__day--in-selecting-range": t3.isInSelectingRange(), "react-datepicker__day--selecting-range-start": t3.isSelectingRangeStart(), "react-datepicker__day--selecting-range-end": t3.isSelectingRangeEnd(), "react-datepicker__day--today": t3.isCurrentDay(), "react-datepicker__day--weekend": t3.isWeekend(), "react-datepicker__day--outside-month": t3.isAfterMonth() || t3.isBeforeMonth() }, t3.getHighLightedClass("react-datepicker__day--highlighted"));
42334
42334
  }), de(ye(t3), "getAriaLabel", function() {
42335
42335
  var e3 = t3.props, r2 = e3.day, n3 = e3.ariaLabelPrefixWhenEnabled, o3 = void 0 === n3 ? "Choose" : n3, a3 = e3.ariaLabelPrefixWhenDisabled, s2 = void 0 === a3 ? "Not available" : a3, i3 = t3.isDisabled() || t3.isExcluded() ? s2 : o3;
42336
42336
  return "".concat(i3, " ").concat(Ee(r2, "PPPP", t3.props.locale));
@@ -42365,7 +42365,7 @@ var __privateMethod = (obj, member, method) => {
42365
42365
  }
42366
42366
  return le(o2, [{ key: "render", value: function() {
42367
42367
  var t3 = this.props, n3 = t3.weekNumber, o3 = t3.ariaLabelPrefix, a2 = void 0 === o3 ? "week " : o3, s = { "react-datepicker__week-number": true, "react-datepicker__week-number--clickable": !!t3.onClick };
42368
- return React__default.default.createElement("div", { className: r$1(s), "aria-label": "".concat(a2, " ").concat(this.props.weekNumber), onClick: this.handleClick }, n3);
42368
+ return React__default.default.createElement("div", { className: r(s), "aria-label": "".concat(a2, " ").concat(this.props.weekNumber), onClick: this.handleClick }, n3);
42369
42369
  } }]), o2;
42370
42370
  }(), Et = function(t2) {
42371
42371
  he(n2, React__default.default.Component);
@@ -42473,7 +42473,7 @@ var __privateMethod = (obj, member, method) => {
42473
42473
  t3.handleDayClick(Fe(setQuarter(t3.props.day, r2)), e3);
42474
42474
  }), de(ye(t3), "getMonthClassNames", function(e3) {
42475
42475
  var n3 = t3.props, o3 = n3.day, a3 = n3.startDate, s2 = n3.endDate, i3 = n3.selected, p2 = n3.minDate, c2 = n3.maxDate, l2 = n3.preSelection, d2 = n3.monthClassName, u2 = d2 ? d2(o3) : void 0;
42476
- return r$1("react-datepicker__month-text", "react-datepicker__month-".concat(e3), u2, { "react-datepicker__month--disabled": (p2 || c2) && Ze(setMonth(o3, e3), t3.props), "react-datepicker__month--selected": t3.isSelectedMonth(o3, e3, i3), "react-datepicker__month-text--keyboard-selected": getMonth(l2) === e3, "react-datepicker__month--in-range": et(a3, s2, e3, o3), "react-datepicker__month--range-start": t3.isRangeStartMonth(e3), "react-datepicker__month--range-end": t3.isRangeEndMonth(e3), "react-datepicker__month-text--today": t3.isCurrentMonth(o3, e3) });
42476
+ return r("react-datepicker__month-text", "react-datepicker__month-".concat(e3), u2, { "react-datepicker__month--disabled": (p2 || c2) && Ze(setMonth(o3, e3), t3.props), "react-datepicker__month--selected": t3.isSelectedMonth(o3, e3, i3), "react-datepicker__month-text--keyboard-selected": getMonth(l2) === e3, "react-datepicker__month--in-range": et(a3, s2, e3, o3), "react-datepicker__month--range-start": t3.isRangeStartMonth(e3), "react-datepicker__month--range-end": t3.isRangeEndMonth(e3), "react-datepicker__month-text--today": t3.isCurrentMonth(o3, e3) });
42477
42477
  }), de(ye(t3), "getTabIndex", function(e3) {
42478
42478
  var r2 = getMonth(t3.props.preSelection);
42479
42479
  return t3.props.disabledKeyboardNavigation || e3 !== r2 ? "-1" : "0";
@@ -42482,7 +42482,7 @@ var __privateMethod = (obj, member, method) => {
42482
42482
  return "".concat(c2, " ").concat(Ee(p2, "MMMM yyyy"));
42483
42483
  }), de(ye(t3), "getQuarterClassNames", function(e3) {
42484
42484
  var n3 = t3.props, o3 = n3.day, a3 = n3.startDate, s2 = n3.endDate, i3 = n3.selected, p2 = n3.minDate, c2 = n3.maxDate;
42485
- return r$1("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(e3), { "react-datepicker__quarter--disabled": (p2 || c2) && tt(setQuarter(o3, e3), t3.props), "react-datepicker__quarter--selected": t3.isSelectedQuarter(o3, e3, i3), "react-datepicker__quarter--in-range": nt(a3, s2, e3, o3), "react-datepicker__quarter--range-start": t3.isRangeStartQuarter(e3), "react-datepicker__quarter--range-end": t3.isRangeEndQuarter(e3) });
42485
+ return r("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(e3), { "react-datepicker__quarter--disabled": (p2 || c2) && tt(setQuarter(o3, e3), t3.props), "react-datepicker__quarter--selected": t3.isSelectedQuarter(o3, e3, i3), "react-datepicker__quarter--in-range": nt(a3, s2, e3, o3), "react-datepicker__quarter--range-start": t3.isRangeStartQuarter(e3), "react-datepicker__quarter--range-end": t3.isRangeEndQuarter(e3) });
42486
42486
  }), de(ye(t3), "renderMonths", function() {
42487
42487
  var r2 = t3.props, n3 = r2.showFullMonthYearPicker, o3 = r2.showTwoColumnMonthYearPicker, a3 = r2.showFourColumnMonthYearPicker, s2 = r2.locale, i3 = r2.day, p2 = r2.selected;
42488
42488
  return (a3 ? [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]] : o3 ? [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11]] : [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11]]).map(function(r3, o4) {
@@ -42505,7 +42505,7 @@ var __privateMethod = (obj, member, method) => {
42505
42505
  var e3 = t3.props;
42506
42506
  e3.day;
42507
42507
  var n3 = e3.selectingDate, o3 = e3.selectsStart, a3 = e3.selectsEnd, s2 = e3.showMonthYearPicker, i3 = e3.showQuarterYearPicker;
42508
- return r$1("react-datepicker__month", { "react-datepicker__month--selecting-range": n3 && (o3 || a3) }, { "react-datepicker__monthPicker": s2 }, { "react-datepicker__quarterPicker": i3 });
42508
+ return r("react-datepicker__month", { "react-datepicker__month--selecting-range": n3 && (o3 || a3) }, { "react-datepicker__monthPicker": s2 }, { "react-datepicker__quarterPicker": i3 });
42509
42509
  }), t3;
42510
42510
  }
42511
42511
  return le(o2, [{ key: "render", value: function() {
@@ -42611,7 +42611,7 @@ var __privateMethod = (obj, member, method) => {
42611
42611
  }
42612
42612
  }), de(ye(a2), "getYearClassNames", function(e3) {
42613
42613
  var t4 = a2.props, n3 = t4.minDate, o3 = t4.maxDate, s = t4.selected;
42614
- return r$1("react-datepicker__year-text", { "react-datepicker__year-text--selected": e3 === getYear(s), "react-datepicker__year-text--disabled": (n3 || o3) && rt(e3, a2.props), "react-datepicker__year-text--keyboard-selected": a2.isKeyboardSelected(e3), "react-datepicker__year-text--today": a2.isCurrentYear(e3) });
42614
+ return r("react-datepicker__year-text", { "react-datepicker__year-text--selected": e3 === getYear(s), "react-datepicker__year-text--disabled": (n3 || o3) && rt(e3, a2.props), "react-datepicker__year-text--keyboard-selected": a2.isKeyboardSelected(e3), "react-datepicker__year-text--today": a2.isCurrentYear(e3) });
42615
42615
  }), de(ye(a2), "getYearTabIndex", function(e3) {
42616
42616
  return a2.props.disabledKeyboardNavigation ? "-1" : e3 === getYear(a2.props.preSelection) ? "0" : "-1";
42617
42617
  }), a2;
@@ -42723,7 +42723,7 @@ var __privateMethod = (obj, member, method) => {
42723
42723
  var t4 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : a2.state.date, n3 = Te(t4, a2.props.locale, a2.props.calendarStartDay), o3 = [];
42724
42724
  return a2.props.showWeekNumbers && o3.push(React__default.default.createElement("div", { key: "W", className: "react-datepicker__day-name" }, a2.props.weekLabel || "#")), o3.concat([0, 1, 2, 3, 4, 5, 6].map(function(t5) {
42725
42725
  var o4 = addDays(n3, t5), s = a2.formatWeekday(o4, a2.props.locale), i2 = a2.props.weekDayClassName ? a2.props.weekDayClassName(o4) : void 0;
42726
- return React__default.default.createElement("div", { key: t5, className: r$1("react-datepicker__day-name", i2) }, s);
42726
+ return React__default.default.createElement("div", { key: t5, className: r("react-datepicker__day-name", i2) }, s);
42727
42727
  }));
42728
42728
  }), de(ye(a2), "formatWeekday", function(e3, t4) {
42729
42729
  return a2.props.formatWeekDay ? function(e4, t5, r2) {
@@ -42865,7 +42865,7 @@ var __privateMethod = (obj, member, method) => {
42865
42865
  this.props.preSelection && !We(this.props.preSelection, e3.preSelection) ? this.setState({ date: this.props.preSelection }) : this.props.openToDate && !We(this.props.openToDate, e3.openToDate) && this.setState({ date: this.props.openToDate });
42866
42866
  } }, { key: "render", value: function() {
42867
42867
  var t3 = this.props.container || It;
42868
- return React__default.default.createElement("div", { ref: this.containerRef }, React__default.default.createElement(t3, { className: r$1("react-datepicker", this.props.className, { "react-datepicker--time-only": this.props.showTimeSelectOnly }), showPopperArrow: this.props.showPopperArrow, arrowProps: this.props.arrowProps }, this.renderPreviousButton(), this.renderNextButton(), this.renderMonths(), this.renderYears(), this.renderTodayButton(), this.renderTimeSection(), this.renderInputTimeSection(), this.props.children));
42868
+ return React__default.default.createElement("div", { ref: this.containerRef }, React__default.default.createElement(t3, { className: r("react-datepicker", this.props.className, { "react-datepicker--time-only": this.props.showTimeSelectOnly }), showPopperArrow: this.props.showPopperArrow, arrowProps: this.props.arrowProps }, this.renderPreviousButton(), this.renderNextButton(), this.renderMonths(), this.renderYears(), this.renderTodayButton(), this.renderTimeSection(), this.renderInputTimeSection(), this.props.children));
42869
42869
  } }], [{ key: "defaultProps", get: function() {
42870
42870
  return { onDropdownFocus: function() {
42871
42871
  }, monthsShown: 1, monthSelectedIn: 0, forceShowMonthNavigation: false, timeCaption: "Time", previousYearButtonLabel: "Previous Year", nextYearButtonLabel: "Next Year", previousMonthButtonLabel: "Previous Month", nextMonthButtonLabel: "Next Month", customTimeInput: null, yearItemNumber: 12 };
@@ -42915,14 +42915,14 @@ var __privateMethod = (obj, member, method) => {
42915
42915
  return le(o2, [{ key: "render", value: function() {
42916
42916
  var t3, n3 = this.props, o3 = n3.className, a2 = n3.wrapperClassName, s = n3.hidePopper, i2 = n3.popperComponent, p2 = n3.popperModifiers, c2 = n3.popperPlacement, l2 = n3.popperProps, d2 = n3.targetComponent, u2 = n3.enableTabLoop, h2 = n3.popperOnKeyDown, m2 = n3.portalId, f2 = n3.portalHost;
42917
42917
  if (!s) {
42918
- var y2 = r$1("react-datepicker-popper", o3);
42918
+ var y2 = r("react-datepicker-popper", o3);
42919
42919
  t3 = React__default.default.createElement(Popper, ue({ modifiers: p2, placement: c2 }, l2), function(t4) {
42920
42920
  var r2 = t4.ref, n4 = t4.style, o4 = t4.placement, a3 = t4.arrowProps;
42921
42921
  return React__default.default.createElement(At, { enableTabLoop: u2 }, React__default.default.createElement("div", { ref: r2, style: n4, className: y2, "data-placement": o4, onKeyDown: h2 }, React__default.default.cloneElement(i2, { arrowProps: a3 })));
42922
42922
  });
42923
42923
  }
42924
42924
  this.props.popperContainer && (t3 = React__default.default.createElement(this.props.popperContainer, {}, t3)), m2 && !s && (t3 = React__default.default.createElement(Rt, { portalId: m2, portalHost: f2 }, t3));
42925
- var v2 = r$1("react-datepicker-wrapper", a2);
42925
+ var v2 = r("react-datepicker-wrapper", a2);
42926
42926
  return React__default.default.createElement(Manager, { className: "react-datepicker-manager" }, React__default.default.createElement(Reference, null, function(t4) {
42927
42927
  var r2 = t4.ref;
42928
42928
  return React__default.default.createElement("div", { ref: r2, className: v2 }, d2);
@@ -43100,7 +43100,7 @@ var __privateMethod = (obj, member, method) => {
43100
43100
  s.calendar = e3;
43101
43101
  }, locale: s.props.locale, calendarStartDay: s.props.calendarStartDay, chooseDayAriaLabelPrefix: s.props.chooseDayAriaLabelPrefix, disabledDayAriaLabelPrefix: s.props.disabledDayAriaLabelPrefix, weekAriaLabelPrefix: s.props.weekAriaLabelPrefix, monthAriaLabelPrefix: s.props.monthAriaLabelPrefix, adjustDateOnChange: s.props.adjustDateOnChange, setOpen: s.setOpen, shouldCloseOnSelect: s.props.shouldCloseOnSelect, dateFormat: s.props.dateFormatCalendar, useWeekdaysShort: s.props.useWeekdaysShort, formatWeekDay: s.props.formatWeekDay, dropdownMode: s.props.dropdownMode, selected: s.props.selected, preSelection: s.state.preSelection, onSelect: s.handleSelect, onWeekSelect: s.props.onWeekSelect, openToDate: s.props.openToDate, minDate: s.props.minDate, maxDate: s.props.maxDate, selectsStart: s.props.selectsStart, selectsEnd: s.props.selectsEnd, selectsRange: s.props.selectsRange, startDate: s.props.startDate, endDate: s.props.endDate, excludeDates: s.props.excludeDates, excludeDateIntervals: s.props.excludeDateIntervals, filterDate: s.props.filterDate, onClickOutside: s.handleCalendarClickOutside, formatWeekNumber: s.props.formatWeekNumber, highlightDates: s.state.highlightDates, includeDates: s.props.includeDates, includeDateIntervals: s.props.includeDateIntervals, includeTimes: s.props.includeTimes, injectTimes: s.props.injectTimes, inline: s.props.inline, shouldFocusDayInline: s.state.shouldFocusDayInline, peekNextMonth: s.props.peekNextMonth, showMonthDropdown: s.props.showMonthDropdown, showPreviousMonths: s.props.showPreviousMonths, useShortMonthInDropdown: s.props.useShortMonthInDropdown, showMonthYearDropdown: s.props.showMonthYearDropdown, showWeekNumbers: s.props.showWeekNumbers, showYearDropdown: s.props.showYearDropdown, withPortal: s.props.withPortal, forceShowMonthNavigation: s.props.forceShowMonthNavigation, showDisabledMonthNavigation: s.props.showDisabledMonthNavigation, scrollableYearDropdown: s.props.scrollableYearDropdown, scrollableMonthYearDropdown: s.props.scrollableMonthYearDropdown, todayButton: s.props.todayButton, weekLabel: s.props.weekLabel, outsideClickIgnoreClass: "react-datepicker-ignore-onclickoutside", fixedHeight: s.props.fixedHeight, monthsShown: s.props.monthsShown, monthSelectedIn: s.state.monthSelectedIn, onDropdownFocus: s.handleDropdownFocus, onMonthChange: s.props.onMonthChange, onYearChange: s.props.onYearChange, dayClassName: s.props.dayClassName, weekDayClassName: s.props.weekDayClassName, monthClassName: s.props.monthClassName, timeClassName: s.props.timeClassName, showTimeSelect: s.props.showTimeSelect, showTimeSelectOnly: s.props.showTimeSelectOnly, onTimeChange: s.handleTimeChange, timeFormat: s.props.timeFormat, timeIntervals: s.props.timeIntervals, minTime: s.props.minTime, maxTime: s.props.maxTime, excludeTimes: s.props.excludeTimes, filterTime: s.props.filterTime, timeCaption: s.props.timeCaption, className: s.props.calendarClassName, container: s.props.calendarContainer, yearItemNumber: s.props.yearItemNumber, yearDropdownItemNumber: s.props.yearDropdownItemNumber, previousMonthAriaLabel: s.props.previousMonthAriaLabel, previousMonthButtonLabel: s.props.previousMonthButtonLabel, nextMonthAriaLabel: s.props.nextMonthAriaLabel, nextMonthButtonLabel: s.props.nextMonthButtonLabel, previousYearAriaLabel: s.props.previousYearAriaLabel, previousYearButtonLabel: s.props.previousYearButtonLabel, nextYearAriaLabel: s.props.nextYearAriaLabel, nextYearButtonLabel: s.props.nextYearButtonLabel, timeInputLabel: s.props.timeInputLabel, disabledKeyboardNavigation: s.props.disabledKeyboardNavigation, renderCustomHeader: s.props.renderCustomHeader, popperProps: s.props.popperProps, renderDayContents: s.props.renderDayContents, onDayMouseEnter: s.props.onDayMouseEnter, onMonthMouseLeave: s.props.onMonthMouseLeave, selectsDisabledDaysInRange: s.props.selectsDisabledDaysInRange, showTimeInput: s.props.showTimeInput, showMonthYearPicker: s.props.showMonthYearPicker, showFullMonthYearPicker: s.props.showFullMonthYearPicker, showTwoColumnMonthYearPicker: s.props.showTwoColumnMonthYearPicker, showFourColumnMonthYearPicker: s.props.showFourColumnMonthYearPicker, showYearPicker: s.props.showYearPicker, showQuarterYearPicker: s.props.showQuarterYearPicker, showPopperArrow: s.props.showPopperArrow, excludeScrollbar: s.props.excludeScrollbar, handleOnKeyDown: s.props.onKeyDown, handleOnDayKeyDown: s.onDayKeyDown, isInputFocused: s.state.focused, customTimeInput: s.props.customTimeInput, setPreSelection: s.setPreSelection }, s.props.children) : null;
43102
43102
  }), de(ye(s), "renderDateInput", function() {
43103
- var t4, n2 = r$1(s.props.className, de({}, "react-datepicker-ignore-onclickoutside", s.state.open)), o3 = s.props.customInput || React__default.default.createElement("input", { type: "text" }), a3 = s.props.customInputRef || "ref", i2 = "string" == typeof s.props.value ? s.props.value : "string" == typeof s.state.inputValue ? s.state.inputValue : s.props.selectsRange ? function(e3, t5, r2) {
43103
+ var t4, n2 = r(s.props.className, de({}, "react-datepicker-ignore-onclickoutside", s.state.open)), o3 = s.props.customInput || React__default.default.createElement("input", { type: "text" }), a3 = s.props.customInputRef || "ref", i2 = "string" == typeof s.props.value ? s.props.value : "string" == typeof s.state.inputValue ? s.state.inputValue : s.props.selectsRange ? function(e3, t5, r2) {
43104
43104
  if (!e3)
43105
43105
  return "";
43106
43106
  var n3 = Ne(e3, r2), o4 = t5 ? Ne(t5, r2) : "";
@@ -43108,7 +43108,7 @@ var __privateMethod = (obj, member, method) => {
43108
43108
  }(s.props.startDate, s.props.endDate, s.props) : Ne(s.props.selected, s.props);
43109
43109
  return React__default.default.cloneElement(o3, (de(t4 = {}, a3, function(e3) {
43110
43110
  s.input = e3;
43111
- }), de(t4, "value", i2), de(t4, "onBlur", s.handleBlur), de(t4, "onChange", s.handleChange), de(t4, "onClick", s.onInputClick), de(t4, "onFocus", s.handleFocus), de(t4, "onKeyDown", s.onInputKeyDown), de(t4, "id", s.props.id), de(t4, "name", s.props.name), de(t4, "autoFocus", s.props.autoFocus), de(t4, "placeholder", s.props.placeholderText), de(t4, "disabled", s.props.disabled), de(t4, "autoComplete", s.props.autoComplete), de(t4, "className", r$1(o3.props.className, n2)), de(t4, "title", s.props.title), de(t4, "readOnly", s.props.readOnly), de(t4, "required", s.props.required), de(t4, "tabIndex", s.props.tabIndex), de(t4, "aria-describedby", s.props.ariaDescribedBy), de(t4, "aria-invalid", s.props.ariaInvalid), de(t4, "aria-labelledby", s.props.ariaLabelledBy), de(t4, "aria-required", s.props.ariaRequired), t4));
43111
+ }), de(t4, "value", i2), de(t4, "onBlur", s.handleBlur), de(t4, "onChange", s.handleChange), de(t4, "onClick", s.onInputClick), de(t4, "onFocus", s.handleFocus), de(t4, "onKeyDown", s.onInputKeyDown), de(t4, "id", s.props.id), de(t4, "name", s.props.name), de(t4, "autoFocus", s.props.autoFocus), de(t4, "placeholder", s.props.placeholderText), de(t4, "disabled", s.props.disabled), de(t4, "autoComplete", s.props.autoComplete), de(t4, "className", r(o3.props.className, n2)), de(t4, "title", s.props.title), de(t4, "readOnly", s.props.readOnly), de(t4, "required", s.props.required), de(t4, "tabIndex", s.props.tabIndex), de(t4, "aria-describedby", s.props.ariaDescribedBy), de(t4, "aria-invalid", s.props.ariaInvalid), de(t4, "aria-labelledby", s.props.ariaLabelledBy), de(t4, "aria-required", s.props.ariaRequired), t4));
43112
43112
  }), de(ye(s), "renderClearButton", function() {
43113
43113
  var t4 = s.props, r2 = t4.isClearable, n2 = t4.selected, o3 = t4.startDate, a3 = t4.endDate, i2 = t4.clearButtonTitle, p2 = t4.clearButtonClassName, c2 = void 0 === p2 ? "" : p2, l2 = t4.ariaLabelClose, d2 = void 0 === l2 ? "Close" : l2;
43114
43114
  return !r2 || null == n2 && null == o3 && null == a3 ? null : React__default.default.createElement("button", { type: "button", className: "react-datepicker__close-icon ".concat(c2).trim(), "aria-label": d2, onClick: s.onClearClick, title: i2, tabIndex: -1 });
@@ -54981,8 +54981,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
54981
54981
  return __privateGet(this, _state)[key];
54982
54982
  }
54983
54983
  setValue(key, value) {
54984
- __privateMethod(this, _notify, notify_fn).call(this, key, value);
54985
54984
  __privateGet(this, _state)[key] = value;
54985
+ __privateMethod(this, _notify, notify_fn).call(this, key, value);
54986
54986
  }
54987
54987
  async replaceValue(key, fn) {
54988
54988
  if (__privateGet(this, _locks)[key]) {
@@ -54998,10 +54998,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
54998
54998
  let result;
54999
54999
  try {
55000
55000
  result = await fn();
55001
- __privateGet(this, _state)[key] = result;
55002
- __privateMethod(this, _notify, notify_fn).call(this, key, result);
55003
- unlock(result);
55004
55001
  this.setValue(key, result);
55002
+ unlock(result);
55005
55003
  } catch (e3) {
55006
55004
  unlockError(e3);
55007
55005
  } finally {
@@ -58960,57 +58958,6 @@ Inferred class string: "${iconClasses}."`
58960
58958
  }
58961
58959
  return templateCopy;
58962
58960
  }
58963
- function e(e3) {
58964
- this.message = e3;
58965
- }
58966
- e.prototype = new Error(), e.prototype.name = "InvalidCharacterError";
58967
- var r = "undefined" != typeof window && window.atob && window.atob.bind(window) || function(r2) {
58968
- var t2 = String(r2).replace(/=+$/, "");
58969
- if (t2.length % 4 == 1)
58970
- throw new e("'atob' failed: The string to be decoded is not correctly encoded.");
58971
- for (var n2, o2, a2 = 0, i2 = 0, c2 = ""; o2 = t2.charAt(i2++); ~o2 && (n2 = a2 % 4 ? 64 * n2 + o2 : o2, a2++ % 4) ? c2 += String.fromCharCode(255 & n2 >> (-2 * a2 & 6)) : 0)
58972
- o2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o2);
58973
- return c2;
58974
- };
58975
- function t(e3) {
58976
- var t2 = e3.replace(/-/g, "+").replace(/_/g, "/");
58977
- switch (t2.length % 4) {
58978
- case 0:
58979
- break;
58980
- case 2:
58981
- t2 += "==";
58982
- break;
58983
- case 3:
58984
- t2 += "=";
58985
- break;
58986
- default:
58987
- throw "Illegal base64url string!";
58988
- }
58989
- try {
58990
- return function(e4) {
58991
- return decodeURIComponent(r(e4).replace(/(.)/g, function(e6, r2) {
58992
- var t3 = r2.charCodeAt(0).toString(16).toUpperCase();
58993
- return t3.length < 2 && (t3 = "0" + t3), "%" + t3;
58994
- }));
58995
- }(t2);
58996
- } catch (e4) {
58997
- return r(t2);
58998
- }
58999
- }
59000
- function n(e3) {
59001
- this.message = e3;
59002
- }
59003
- function o(e3, r2) {
59004
- if ("string" != typeof e3)
59005
- throw new n("Invalid token specified");
59006
- var o2 = true === (r2 = r2 || {}).header ? 0 : 1;
59007
- try {
59008
- return JSON.parse(t(e3.split(".")[o2]));
59009
- } catch (e4) {
59010
- throw new n("Invalid token specified: " + e4.message);
59011
- }
59012
- }
59013
- n.prototype = new Error(), n.prototype.name = "InvalidTokenError";
59014
58961
  const Wrapper$2 = styled__default.default.div`
59015
58962
  display: flex;
59016
58963
  align-items: center;
@@ -59148,28 +59095,6 @@ Inferred class string: "${iconClasses}."`
59148
59095
  }
59149
59096
  return isLoading ? /* @__PURE__ */ React__default.default.createElement(DefaultFallback, null) : children;
59150
59097
  }
59151
- async function checkTokenExpiry(token) {
59152
- if (token) {
59153
- try {
59154
- const decoded = o(token);
59155
- if (decoded.exp * 1e3 - Date.now() < 5 * 60 * 1e3) {
59156
- const res = await request("/api/auth/refresh-token", {
59157
- headers: {
59158
- Accept: "application/json",
59159
- "Content-Type": "application/json"
59160
- },
59161
- method: "POST"
59162
- });
59163
- if (res.ok) {
59164
- const { token: newToken } = await res.json();
59165
- return newToken;
59166
- }
59167
- }
59168
- } catch (e3) {
59169
- console.warn("Failed to refresh token", e3);
59170
- }
59171
- }
59172
- }
59173
59098
  function DynamicAuthComponent(props) {
59174
59099
  const importers = React.useContext(importersCtx);
59175
59100
  const [component, setComponent] = React.useState(() => /* @__PURE__ */ React__default.default.createElement(DefaultFallback, null));
@@ -59199,19 +59124,6 @@ Inferred class string: "${iconClasses}."`
59199
59124
  isMounted.current = true;
59200
59125
  store.setValue("sessionToken", getToken());
59201
59126
  }
59202
- React.useEffect(() => {
59203
- if (!(authConfig == null ? void 0 : authConfig.supports_token_refresh)) {
59204
- return;
59205
- }
59206
- const interval = setInterval(async () => {
59207
- const token = await store.getValue("sessionToken");
59208
- const newToken = await checkTokenExpiry(token);
59209
- if (newToken) {
59210
- store.setValue("sessionToken", newToken);
59211
- }
59212
- }, 60 * 1e3);
59213
- return () => clearInterval(interval);
59214
- }, [authConfig]);
59215
59127
  React.useEffect(() => {
59216
59128
  return store.subscribe("sessionToken", (newToken) => {
59217
59129
  const key = getTokenKey();
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dara-core
3
- Version: 1.14.0a1
3
+ Version: 1.14.0a2
4
4
  Summary: Dara Framework Core
5
5
  Home-page: https://dara.causalens.com/
6
6
  License: Apache-2.0
@@ -20,10 +20,10 @@ Requires-Dist: async-asgi-testclient (>=1.4.11,<2.0.0)
20
20
  Requires-Dist: certifi (>=2024.7.4)
21
21
  Requires-Dist: click (==8.1.3)
22
22
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
23
- Requires-Dist: create-dara-app (==1.14.0-alpha.1)
23
+ Requires-Dist: create-dara-app (==1.14.0-alpha.2)
24
24
  Requires-Dist: croniter (>=1.0.15,<2.0.0)
25
25
  Requires-Dist: cryptography (>=42.0.4)
26
- Requires-Dist: dara-components (==1.14.0-alpha.1) ; extra == "all"
26
+ Requires-Dist: dara-components (==1.14.0-alpha.2) ; extra == "all"
27
27
  Requires-Dist: exceptiongroup (>=1.1.3,<2.0.0)
28
28
  Requires-Dist: fastapi (==0.109.0)
29
29
  Requires-Dist: fastapi-vite (==0.3.1)
@@ -51,7 +51,7 @@ Description-Content-Type: text/markdown
51
51
 
52
52
  # Dara Application Framework
53
53
 
54
- <img src="https://github.com/causalens/dara/blob/v1.14.0-alpha.1/img/dara_light.svg?raw=true">
54
+ <img src="https://github.com/causalens/dara/blob/v1.14.0-alpha.2/img/dara_light.svg?raw=true">
55
55
 
56
56
  ![Master tests](https://github.com/causalens/dara/actions/workflows/tests.yml/badge.svg?branch=master)
57
57
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -96,7 +96,7 @@ source .venv/bin/activate
96
96
  dara start
97
97
  ```
98
98
 
99
- ![Dara App](https://github.com/causalens/dara/blob/v1.14.0-alpha.1/img/components_gallery.png?raw=true)
99
+ ![Dara App](https://github.com/causalens/dara/blob/v1.14.0-alpha.2/img/components_gallery.png?raw=true)
100
100
 
101
101
  Note: `pip` installation uses [PEP 660](https://peps.python.org/pep-0660/) `pyproject.toml`-based editable installs which require `pip >= 21.3` and `setuptools >= 64.0.0`. You can upgrade both with:
102
102
 
@@ -113,9 +113,9 @@ Explore some of our favorite apps - a great way of getting started and getting t
113
113
 
114
114
  | Dara App | Description |
115
115
  | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
116
- | ![Large Language Model](https://github.com/causalens/dara/blob/v1.14.0-alpha.1/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
117
- | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.14.0-alpha.1/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
118
- | ![Graph Editor](https://github.com/causalens/dara/blob/v1.14.0-alpha.1/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
116
+ | ![Large Language Model](https://github.com/causalens/dara/blob/v1.14.0-alpha.2/img/llm.png?raw=true) | Demonstrates how to use incorporate a LLM chat box into your decision app to understand model insights |
117
+ | ![Plot Interactivity](https://github.com/causalens/dara/blob/v1.14.0-alpha.2/img/plot_interactivity.png?raw=true) | Demonstrates how to enable the user to interact with plots, trigger actions based on clicks, mouse movements and other interactions with `Bokeh` or `Plotly` plots |
118
+ | ![Graph Editor](https://github.com/causalens/dara/blob/v1.14.0-alpha.2/img/graph_viewer.png?raw=true) | Demonstrates how to use the `CausalGraphViewer` component to display your graphs or networks, customising the displayed information through colors and tooltips, and updating the page based on user interaction. |
119
119
 
120
120
  Check out our [App Gallery](https://dara.causalens.com/gallery) for more inspiration!
121
121
 
@@ -142,9 +142,9 @@ And the supporting UI packages and tools.
142
142
  - `ui-utils` - miscellaneous utility functions
143
143
  - `ui-widgets` - widget components
144
144
 
145
- More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.14.0-alpha.1/CONTRIBUTING.md) file.
145
+ More information on the repository structure can be found in the [CONTRIBUTING.md](https://github.com/causalens/dara/blob/v1.14.0-alpha.2/CONTRIBUTING.md) file.
146
146
 
147
147
  ## License
148
148
 
149
- Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.14.0-alpha.1/LICENSE).
149
+ Dara is open-source and licensed under the [Apache 2.0 License](https://github.com/causalens/dara/blob/v1.14.0-alpha.2/LICENSE).
150
150
 
@@ -1,10 +1,10 @@
1
1
  dara/core/__init__.py,sha256=w3OUU03lGXA45_Sf99CsNWL6SZ7tr7y4wRYq6pdGmhM,2186
2
2
  dara/core/actions.py,sha256=gARcrrtzYuBAVJUCtuHwpFc6PPVPb7x3ITIISCLw0GA,965
3
3
  dara/core/auth/__init__.py,sha256=H0bJoXff5wIRZmHvvQ3y9p5SXA9lM8OuLCGceYGqfb0,851
4
- dara/core/auth/base.py,sha256=EX80DszIaAX276bbqTQuynkfCOD7o_xdzFCrqMTy4bw,3439
4
+ dara/core/auth/base.py,sha256=jZNuCMoBHQcxWeLpTUzcxdbkbWUJ42jbtKgnnrwvNVA,3201
5
5
  dara/core/auth/basic.py,sha256=IMkoC1OeeRmnmjIqPHpybs8zSdbLlNKYLRvj08ajirg,4692
6
6
  dara/core/auth/definitions.py,sha256=fx-VCsElP9X97gM0Eql-4lFpLa0UryokmGZhQQat2NU,3511
7
- dara/core/auth/routes.py,sha256=uaytzxMm6aOueRZ2ovQFg9Rx5F4OCu0TtCEI8hEN5h0,7108
7
+ dara/core/auth/routes.py,sha256=x3oFLOkgi7-r0mqFD0GgM3hdS1JkmLHWQ6mNnEKRDDk,7951
8
8
  dara/core/auth/utils.py,sha256=ngOi5j71Xu-G59yWxGoejBEmMnVyGS67aF7czt_0i7A,3062
9
9
  dara/core/base_definitions.py,sha256=r_W_qk6_VvvskbPEPjTF6xUh3o_lkNBWMFhN1Pic8Ks,14868
10
10
  dara/core/cli.py,sha256=ycTB7QHCB-74OnKnjXqkXq-GBqyjBqo7u4v1kTgv2jE,7656
@@ -54,13 +54,13 @@ dara/core/internal/port_utils.py,sha256=AQOUNiFNBYKVUwQ7i9UlY1NQ3sWb5xh5GkO6P1Bm
54
54
  dara/core/internal/registries.py,sha256=9WDczIsNeSmzi6aViIq_b14lmmYGGkdsUGHpv0Sg9zo,3278
55
55
  dara/core/internal/registry.py,sha256=ONCDusqaL0q59Py_r8-fFVN3vbkkDf5TXzNvbB9SrGQ,4305
56
56
  dara/core/internal/registry_lookup.py,sha256=8snHu2wUUsngXjHyHh6eZqL_WwonTTQB6-WBX-R_WZg,2238
57
- dara/core/internal/routing.py,sha256=pMsvv-a-P8bXK7_4oHXFlHFB8PO7yu8C4qeyultsys8,22863
57
+ dara/core/internal/routing.py,sha256=Wdy11iWDeAf2PyHXZv5mPeJ_BEcoR0XftOl3M8vUhJU,22782
58
58
  dara/core/internal/scheduler.py,sha256=z6OYwazBf3GYo8CzMC9IuGC2P96gI7JwxquT8GaoTMk,12944
59
59
  dara/core/internal/settings.py,sha256=wAWxl-HXjq7PW3twe_CrR-UuMRw9VBudC3eRmevZAhM,3869
60
60
  dara/core/internal/store.py,sha256=qVyU7JfC3zE2vYC2mfjmvECWMlFS9b-nMF1k-alg4Y8,7756
61
61
  dara/core/internal/tasks.py,sha256=XK-GTIyge8RBYAfzNs3rmLYVNSKIarCzPdqRSVGg-4M,24728
62
62
  dara/core/internal/utils.py,sha256=b1YYkn8qHl6-GY6cCm2MS1NXRS9j_rElYCKMZOxJgrY,8232
63
- dara/core/internal/websocket.py,sha256=dhvE7KnolBHwPy9E6Ac1tjzOn0fAtdhDdcMUs47WuuQ,20138
63
+ dara/core/internal/websocket.py,sha256=i6QXWHfcWbQDT3dk9F_7yw5CNhkC-lnqMoH7EKHBqC4,21676
64
64
  dara/core/jinja/index.html,sha256=iykqiRh3H_HkcjHJeeSRXRu45nZ2y1sZX5FLdPRhlQY,726
65
65
  dara/core/jinja/index_autojs.html,sha256=MRF5J0vNfzZQm9kPEeLl23sbr08fVSRd_PAUD6Fkc_0,1253
66
66
  dara/core/js_tooling/custom_js_scaffold/index.tsx,sha256=FEzSV5o5Nyzxw6eXvGLi7BkEBkXf3brV34_7ATLnY7o,68
@@ -81,7 +81,7 @@ dara/core/metrics/cache.py,sha256=ybofUhZO0TCHeyhB_AtldWk1QTmTKh7GucTXpOkeTFA,25
81
81
  dara/core/metrics/runtime.py,sha256=YP-6Dz0GeI9_Yr7bUk_-OqShyFySGH_AKpDO126l6es,1833
82
82
  dara/core/metrics/utils.py,sha256=rYlBinxFc7VehFT5cTNXLk8gC74UEj7ZGq6vLgIDpSg,2247
83
83
  dara/core/persistence.py,sha256=TO94rPAN7jxZKVCC5YA4eE7GGDoNlCPe-BkkItV2VUE,10379
84
- dara/core/umd/dara.core.umd.js,sha256=aoI0q4aTvmfTHfpfm7kibJ5smW0g8fw73Yhm413ivqk,4880827
84
+ dara/core/umd/dara.core.umd.js,sha256=yJvT54abv74o8fFuSoeH1NucuJVl90UFfeM3ZsCp3c8,4877860
85
85
  dara/core/umd/style.css,sha256=YQtQ4veiSktnyONl0CU1iU1kKfcQhreH4iASi1MP7Ak,4095007
86
86
  dara/core/visual/__init__.py,sha256=QN0wbG9HPQ_vXh8BO8DnBXeYLIENVTNtRmYzZf1lx7c,577
87
87
  dara/core/visual/components/__init__.py,sha256=O-Em_glGdZNO0LLl2RWmJSrQiXKxliXg_PuhVXGT81I,1811
@@ -105,8 +105,8 @@ dara/core/visual/themes/__init__.py,sha256=aM4mgoIYo2neBSw5FRzswsht7PUKjLthiHLmF
105
105
  dara/core/visual/themes/dark.py,sha256=UQGDooOc8ric73eHs9E0ltYP4UCrwqQ3QxqN_fb4PwY,1942
106
106
  dara/core/visual/themes/definitions.py,sha256=m3oN0txs65MZepqjj7AKMMxybf2aq5fTjcTwJmHqEbk,2744
107
107
  dara/core/visual/themes/light.py,sha256=-Tviq8oEwGbdFULoDOqPuHO0UpAZGsBy8qFi0kAGolQ,1944
108
- dara_core-1.14.0a1.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
- dara_core-1.14.0a1.dist-info/METADATA,sha256=JB08LXBABVJNycKVooSE4d8HBimcoqfn4eRVezp8DK0,7457
110
- dara_core-1.14.0a1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
- dara_core-1.14.0a1.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
- dara_core-1.14.0a1.dist-info/RECORD,,
108
+ dara_core-1.14.0a2.dist-info/LICENSE,sha256=r9u1w2RvpLMV6YjuXHIKXRBKzia3fx_roPwboGcLqCc,10944
109
+ dara_core-1.14.0a2.dist-info/METADATA,sha256=RLDwxR63x52m9wlBKPA8P5Eg8s8bKifiPIybYPcpTT0,7457
110
+ dara_core-1.14.0a2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
111
+ dara_core-1.14.0a2.dist-info/entry_points.txt,sha256=H__D5sNIGuPIhVam0DChNL-To5k8Y7nY7TAFz9Mz6cc,139
112
+ dara_core-1.14.0a2.dist-info/RECORD,,