@nocobase/portal-template-default 1.0.16 → 1.0.18

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.
Files changed (153) hide show
  1. package/.env.example +0 -4
  2. package/AGENTS.md +10 -0
  3. package/README.MD +4 -0
  4. package/dist/assets/{LineDraw-vPRTWiQ5.js → LineDraw-B3HsIvjF.js} +1 -1
  5. package/dist/assets/{SymbolDraw-DOl_Tss3.js → SymbolDraw-C5oA6gYo.js} +1 -1
  6. package/dist/assets/{VisualMapping-j08W3KBm.js → VisualMapping-CjyVXYl-.js} +1 -1
  7. package/dist/assets/auth-method-demo-B4sxmO2B.js +1 -0
  8. package/dist/assets/auto-login-provider-DPtJmWC-.js +1 -0
  9. package/dist/assets/{auto-login-provider-Bukw7zEe.js → auto-login-provider-pxf3kSYY.js} +2 -2
  10. package/dist/assets/auto-redirect-provider-B51i6R_U.js +1 -0
  11. package/dist/assets/auto-redirect-provider-CDA_97es.js +1 -0
  12. package/dist/assets/auto-redirect-provider-CeJOAYfx.js +1 -0
  13. package/dist/assets/calendar-B41MfAkB.js +1 -0
  14. package/dist/assets/{cas-sign-in-button-BQn3Mttx.js → cas-sign-in-button-DmkMYnGb.js} +1 -1
  15. package/dist/assets/{components-BT5mL9gW.js → components-DLLYm5Qd.js} +3 -3
  16. package/dist/assets/{configuration-gate-BJoadoA6.js → configuration-gate-CdktspSj.js} +1 -1
  17. package/dist/assets/{createClipPathFromCoordSys-m8IbnJ1z.js → createClipPathFromCoordSys-BKzf1iWj.js} +1 -1
  18. package/dist/assets/createSeriesDataSimply-Dcpkokbc.js +1 -0
  19. package/dist/assets/{customGraphicKeyframeAnimation-CYLPurwK.js → customGraphicKeyframeAnimation-BYcy-PGj.js} +1 -1
  20. package/dist/assets/demo-BpC2e3zt.js +1 -0
  21. package/dist/assets/demo-CEA7jJM2.js +1 -0
  22. package/dist/assets/demo-CX_Zf30k.js +1 -0
  23. package/dist/assets/demo-CyvGiwq2.js +1 -0
  24. package/dist/assets/demo-DJgGXOii.js +1 -0
  25. package/dist/assets/demo-GTMcYVzl.js +1 -0
  26. package/dist/assets/demo-O2QwJ70o.js +1 -0
  27. package/dist/assets/{dingtalk-sign-in-button-DSluFaP9.js → dingtalk-sign-in-button-K_2ZYQNC.js} +1 -1
  28. package/dist/assets/{echarts-preview-mRXoEciY.js → echarts-preview-CTj0x24f.js} +1 -1
  29. package/dist/assets/{echarts-runtime-CvLr4Slh.js → echarts-runtime-BTfAtt-4.js} +3 -3
  30. package/dist/assets/{echarts-runtime-advanced-BC1tvfQ0.js → echarts-runtime-advanced-Xg4WXsLl.js} +1 -1
  31. package/dist/assets/{echarts-runtime-common-DhNaV5B8.js → echarts-runtime-common-Dfe5ONoi.js} +1 -1
  32. package/dist/assets/{echarts-runtime-components-BiioS8t1.js → echarts-runtime-components-BNoMvPY0.js} +1 -1
  33. package/dist/assets/{echarts-runtime-hierarchy-CAWqYvFh.js → echarts-runtime-hierarchy-bEvX8V8l.js} +1 -1
  34. package/dist/assets/{floating-RVbHvIiD.js → floating-CVEm6jgD.js} +2 -2
  35. package/dist/assets/index-0O4dSmNz.js +59 -0
  36. package/dist/assets/index-BBKV6O5d.css +1 -0
  37. package/dist/assets/{index-BysibBZu.js → index-Bliz6Sy2.js} +2 -2
  38. package/dist/assets/index-CMoFG_fD.js +1064 -0
  39. package/dist/assets/{index-Dw20Lzpp.js → index-N5q0Lo-n.js} +3 -3
  40. package/dist/assets/{index-C-tdHirk.js → index-dDkRfkPI.js} +1 -1
  41. package/dist/assets/index-s-Gc7krA.js +38 -0
  42. package/dist/assets/{labelHelper-DbITmOUW.js → labelHelper-CSRwI3Ku.js} +1 -1
  43. package/dist/assets/ldap-sign-in-form-BoVMVmwm.js +1 -0
  44. package/dist/assets/{oidc-sign-in-button-Cgpa8Qzj.js → oidc-sign-in-button-5pd4bZSW.js} +1 -1
  45. package/dist/assets/{page-context-AU6RU0Qi.js → page-context-o6ISleo3.js} +4 -4
  46. package/dist/assets/prompt-card-xoH-b2hL.js +1 -0
  47. package/dist/assets/prompt-output-7ZS2-d1_.js +1 -0
  48. package/dist/assets/saml-sign-in-button-CN2l8pSN.js +1 -0
  49. package/dist/assets/{sectorHelper-C6L782Ue.js → sectorHelper-D1jHcZDN.js} +1 -1
  50. package/dist/assets/shortcut-DUGrhOUX.js +47 -0
  51. package/dist/assets/{sms-sign-in-form-Bo2WLZuP.js → sms-sign-in-form-ajsTToFF.js} +1 -1
  52. package/dist/assets/{static.browser-CoPxsICt.js → static.browser-exfE5oYi.js} +1 -1
  53. package/dist/assets/switch-BVTKHDeA.js +1 -0
  54. package/dist/assets/{tool-cards-ipgJ_3Ec.js → tool-cards-CQklNnUU.js} +3 -3
  55. package/dist/assets/{use-authenticator-sign-in-BzFeh7qe.js → use-authenticator-sign-in-B8OPLh-w.js} +1 -1
  56. package/dist/assets/use-dingtalk-sign-in-DsX00uPU.js +1 -0
  57. package/dist/assets/{use-wecom-sign-in-PPIMLvGa.js → use-wecom-sign-in-Di3WFrU1.js} +1 -1
  58. package/dist/assets/{wecom-sign-in-button-rUq9RW8R.js → wecom-sign-in-button-BO8h0tS8.js} +1 -1
  59. package/dist/index.html +2 -2
  60. package/dist/index.raw.html +2 -2
  61. package/package.json +9 -1
  62. package/src/App.tsx +5 -2
  63. package/src/app/extension.ts +2 -0
  64. package/src/app/extensions.tsx +18 -6
  65. package/src/app/route-access-guard.tsx +22 -0
  66. package/src/app/route-runtime.ts +200 -0
  67. package/src/app/routes.tsx +2 -2
  68. package/src/components/app-shell/header.tsx +56 -1
  69. package/src/components/app-shell/sidebar.tsx +14 -2
  70. package/src/components/data-table/data-table-filter.tsx +7 -4
  71. package/src/extensions/nocobase-acl/README.md +28 -14
  72. package/src/extensions/nocobase-acl/demo/index.tsx +87 -15
  73. package/src/extensions/nocobase-acl/demo/prompt-generator.tsx +1 -0
  74. package/src/extensions/nocobase-mail/README.md +74 -0
  75. package/src/extensions/nocobase-mail/components/index.ts +79 -0
  76. package/src/extensions/nocobase-mail/components/mail-api.ts +423 -0
  77. package/src/extensions/nocobase-mail/components/mail-attachment-list.tsx +67 -0
  78. package/src/extensions/nocobase-mail/components/mail-compose-attachments.tsx +166 -0
  79. package/src/extensions/nocobase-mail/components/mail-compose.tsx +1071 -0
  80. package/src/extensions/nocobase-mail/components/mail-detail.tsx +653 -0
  81. package/src/extensions/nocobase-mail/components/mail-draft-autosave.ts +26 -0
  82. package/src/extensions/nocobase-mail/components/mail-empty.tsx +48 -0
  83. package/src/extensions/nocobase-mail/components/mail-filters.tsx +277 -0
  84. package/src/extensions/nocobase-mail/components/mail-inbox.tsx +544 -0
  85. package/src/extensions/nocobase-mail/components/mail-inline-images.ts +69 -0
  86. package/src/extensions/nocobase-mail/components/mail-label-badge.tsx +25 -0
  87. package/src/extensions/nocobase-mail/components/mail-label-manager.tsx +271 -0
  88. package/src/extensions/nocobase-mail/components/mail-labels-editor.tsx +267 -0
  89. package/src/extensions/nocobase-mail/components/mail-mass-tracking.tsx +271 -0
  90. package/src/extensions/nocobase-mail/components/mail-note-editor.tsx +99 -0
  91. package/src/extensions/nocobase-mail/components/mail-recipient-input.tsx +260 -0
  92. package/src/extensions/nocobase-mail/components/mail-reply-quote.ts +28 -0
  93. package/src/extensions/nocobase-mail/components/mail-rich-editor.tsx +287 -0
  94. package/src/extensions/nocobase-mail/components/mail-send-actions.tsx +238 -0
  95. package/src/extensions/nocobase-mail/components/mail-senders.ts +61 -0
  96. package/src/extensions/nocobase-mail/components/mail-settings-drawer.tsx +708 -0
  97. package/src/extensions/nocobase-mail/components/mail-showcase-layout.tsx +64 -0
  98. package/src/extensions/nocobase-mail/components/mail-signature-manager.tsx +258 -0
  99. package/src/extensions/nocobase-mail/components/mail-signatures.ts +25 -0
  100. package/src/extensions/nocobase-mail/components/mail-table.tsx +476 -0
  101. package/src/extensions/nocobase-mail/components/mail-template-manager.tsx +204 -0
  102. package/src/extensions/nocobase-mail/components/mail-toolbar.tsx +155 -0
  103. package/src/extensions/nocobase-mail/components/mail-unread.tsx +111 -0
  104. package/src/extensions/nocobase-mail/components/types.ts +297 -0
  105. package/src/extensions/nocobase-mail/components/use-mail-compose.tsx +262 -0
  106. package/src/extensions/nocobase-mail/components/use-mail-mass-messages.ts +54 -0
  107. package/src/extensions/nocobase-mail/components/use-mail-messages.ts +113 -0
  108. package/src/extensions/nocobase-mail/components/use-mail-signatures.ts +122 -0
  109. package/src/extensions/nocobase-mail/components/use-mail-templates.ts +54 -0
  110. package/src/extensions/nocobase-mail/extension.tsx +105 -0
  111. package/src/extensions/nocobase-mail/index.ts +1 -0
  112. package/src/extensions/nocobase-mail/mail-demo-pages.tsx +503 -0
  113. package/src/extensions/nocobase-mail/mail-pages.tsx +201 -0
  114. package/src/extensions/nocobase-mail/tests/mail-quote-html-regression.mjs +51 -0
  115. package/src/extensions/nocobase-mail/tests/mail-regression.mjs +649 -0
  116. package/src/extensions/nocobase-users-example/app-routes.tsx +125 -0
  117. package/src/extensions/nocobase-users-example/extension.tsx +2 -100
  118. package/src/extensions/nocobase-users-example/index.ts +1 -1
  119. package/src/lib/nocobase/acl/menu.ts +17 -3
  120. package/src/lib/nocobase/acl/types.ts +4 -0
  121. package/src/locales/en-US.ts +2 -1
  122. package/src/locales/zh-CN.ts +2 -1
  123. package/src/providers/runtime-config.ts +18 -0
  124. package/src/routes.tsx +10 -0
  125. package/src/vite-env.d.ts +3 -0
  126. package/vite.config.ts +8 -0
  127. package/dist/assets/auth-method-demo-B2qcpY8z.js +0 -1
  128. package/dist/assets/auto-login-provider-BMtzvdxG.js +0 -1
  129. package/dist/assets/auto-redirect-provider-C6GNPg5r.js +0 -1
  130. package/dist/assets/auto-redirect-provider-D5c6kN2R.js +0 -1
  131. package/dist/assets/auto-redirect-provider-iTzGEDpU.js +0 -1
  132. package/dist/assets/calendar-Dv2RNnsr.js +0 -1
  133. package/dist/assets/card-C9Hpeq1c.js +0 -1
  134. package/dist/assets/createSeriesDataSimply-DKUV5b5e.js +0 -1
  135. package/dist/assets/demo-BWGOwqtJ.js +0 -1
  136. package/dist/assets/demo-BWbcvkya.js +0 -1
  137. package/dist/assets/demo-DIASSPgn.js +0 -1
  138. package/dist/assets/demo-DuZ6asUU.js +0 -1
  139. package/dist/assets/demo-Dxcy4bDE.js +0 -1
  140. package/dist/assets/demo-YpEC76uw.js +0 -1
  141. package/dist/assets/demo-wzkoR8T2.js +0 -1
  142. package/dist/assets/index-CBZbj45X.js +0 -58
  143. package/dist/assets/index-CgkdZ6Oc.js +0 -686
  144. package/dist/assets/index-NH3aqqQz.css +0 -1
  145. package/dist/assets/index-hSBzW-VA.js +0 -43
  146. package/dist/assets/ldap-sign-in-form-BOMNDTkK.js +0 -1
  147. package/dist/assets/prompt-card-FWugRgi-.js +0 -1
  148. package/dist/assets/prompt-output-DMTuTNab.js +0 -1
  149. package/dist/assets/saml-sign-in-button-qt8bMeoQ.js +0 -1
  150. package/dist/assets/shortcut-Bu7jT_-w.js +0 -47
  151. package/dist/assets/switch-DQkkIE7G.js +0 -1
  152. package/dist/assets/use-dingtalk-sign-in-mrq6K5Yx.js +0 -1
  153. package/src/extensions/nocobase-users-example/layout.tsx +0 -16
package/.env.example CHANGED
@@ -1,6 +1,5 @@
1
1
  # NocoBase REST API root (the /api suffix is required)
2
2
  NOCOBASE_API_URL=/api
3
- NOCOBASE_AUTHENTICATOR=basic
4
3
 
5
4
  # Public base path for Vite assets and React Router when deployed under NocoBase.
6
5
  # Use / for root-local development, or /x/admin/ when building for storage/dist-client/x/admin.
@@ -10,6 +9,3 @@ NOCOBASE_PORTAL_BASE=/x/admin/
10
9
  # API_CLIENT_STORAGE_PREFIX=NOCOBASE_
11
10
  # API_CLIENT_STORAGE_TYPE=localStorage
12
11
  # API_CLIENT_SHARE_TOKEN=false
13
-
14
- # Optional for local development. Do not commit real access tokens.
15
- # NOCOBASE_API_TOKEN=
package/AGENTS.md CHANGED
@@ -12,6 +12,16 @@ Treat `src/components/ui` as the project's shadcn/ui foundation. When applicatio
12
12
 
13
13
  Components copied from shadcn/ui are owned and maintained by this project; upstream changes are not applied automatically. If a base component must be changed or updated, compare it with the upstream version first, then selectively merge bug fixes and improvements while preserving intentional local behavior. Do not blindly overwrite customized components.
14
14
 
15
+ ## Define application routes once
16
+
17
+ Put application-owned business routes in `src/routes.tsx` with `defineAppRoutes`. A route with a `resource` entry contributes its Refine resource and navigation item, while the same definition generates its React Router route. Mark create, edit, and show children with `resourceAction` so their paths populate the same Refine resource instead of being repeated. Use `access.roles` for route-level role constraints; nested routes inherit parent constraints, and the runtime applies the complete chain to both menu visibility and direct URL access. Do not repeat those roles in `resource.meta.acl` or a manually written route guard.
18
+
19
+ Resource action children are rendered automatically through the resource route's outlet. Keep list pages focused on list content; do not add a wrapper solely to render `<Outlet />`, and do not replace the shared Create, Edit, or Show buttons with hard-coded `navigate()` calls. Set `outlet: "manual"` when a specialized layout renders `<Outlet />` or consumes `useOutlet()` itself, when a child should replace the list instead of overlaying it, or when the child must stay inside a parent provider or boundary. If an action button has no target, fix the route definition by ensuring the resource route name matches the API resource and the corresponding child declares `resourceAction`.
20
+
21
+ The bundled Registry routes are examples, not application structure. When beginning the real application, set `registryRoutesEnabled` to `false` in `src/routes.tsx` and define the application's own routes there. This removes Registry-contributed main routes, resources, and navigation without modifying installed extension source; extension providers, authentication adapters, and `/dev` showcases remain available.
22
+
23
+ Route access currently centralizes role constraints only. Keep NocoBase resource/action, region, field, and record checks in the existing `CanAccess` and ACL boundaries close to the protected query or UI. Server ACL remains authoritative.
24
+
15
25
  ## Develop Portal Registry items
16
26
 
17
27
  Canonical NocoBase Registry source lives under `registry/`. In this source repository, normal development and builds load it directly; do not copy it into `src/extensions` for preview. Imports from a Registry item to the host application must use the `@/` alias. Relative imports must stay within that Registry item's own root so the item remains portable after installation. Registry items target this Portal Template's React, shadcn Base UI, and pnpm toolchain. They must never import Ant Design or NocoBase's Ant Design-based client components.
package/README.MD CHANGED
@@ -64,6 +64,10 @@ Installed extensions live in `src/extensions` and are ordinary
64
64
  application-owned source files. Their providers, resources, routes, login
65
65
  adapters, and user-menu items are discovered automatically.
66
66
 
67
+ Set `registryRoutesEnabled` to `false` in `src/routes.tsx` when replacing the
68
+ bundled example navigation with application-owned routes. Installed extension
69
+ providers, login adapters, and the `/dev` component showcases remain available.
70
+
67
71
  Optional NocoBase integrations, including authentication methods and i18n, can
68
72
  be installed from the `@nocobase` Registry configured in `components.json`.
69
73
  After installation, the generated source can be customized and committed with
@@ -1 +1 @@
1
- import{_ as R,bF as k,W as N,a4 as G,bG as H,bH as fe,be as he,bI as me,bq as pe,f as C,k as ce,aL as ve,bJ as W,bK as F,bL as re,bM as de,D as ye,bx as ge,aS as _e,bk as oe,P as be,j as Te,y as Y,x as Se,u as ae,z as K,r as Le,ap as Me,H as Pe,t as we,ac as Ce,ad as Ae,bn as Ie,G as ie,ae as ne,af as se,a as Oe,I as Re}from"./echarts-runtime-CvLr4Slh.js";var j=H,Be=(function(a){R(r,a);function r(e){var t=a.call(this)||this;return t.type="view",t.dimensions=["x","y"],t._roamTransformable=new k,t._rawTransformable=new k,t.name=e,t}return r.prototype.setBoundingRect=function(e,t,o,i){return this._rect=new N(e,t,o,i),this._rect},r.prototype.getBoundingRect=function(){return this._rect},r.prototype.setViewRect=function(e,t,o,i){this._transformTo(e,t,o,i),this._viewRect=new N(e,t,o,i)},r.prototype._transformTo=function(e,t,o,i){var n=this.getBoundingRect(),s=this._rawTransformable;s.transform=n.calculateTransform(new N(e,t,o,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},r.prototype.setCenter=function(e,t){e&&(this._center=[G(e[0],t.getWidth()),G(e[1],t.getHeight())],this._updateCenterAndZoom())},r.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(t.max!=null&&(e=Math.min(t.max,e)),t.min!=null&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},r.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),t=e.x+e.width/2,o=e.y+e.height/2;return[t,o]},r.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},r.prototype.getZoom=function(){return this._zoom||1},r.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},r.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,o=this.getDefaultCenter(),i=this.getCenter(),n=this.getZoom();i=H([],i,e),o=H([],o,e),t.originX=i[0],t.originY=i[1],t.x=o[0]-i[0],t.y=o[1]-i[1],t.scaleX=t.scaleY=n,this._updateTransform()},r.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),fe(this.transform||(this.transform=[]),t.transform||he()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],me(this.invTransform,this.transform),this.decomposeTransform()},r.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,o=new k;return o.transform=t.transform,o.decomposeTransform(),{roam:{x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},r.prototype.getViewRect=function(){return this._viewRect},r.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},r.prototype.dataToPoint=function(e,t,o){var i=t?this._rawTransform:this.transform;return o=o||[],i?j(o,e,i):pe(o,e)},r.prototype.pointToData=function(e){var t=this.invTransform;return t?j([],e,t):[e[0],e[1]]},r.prototype.convertToPixel=function(e,t,o){var i=U(t);return i===this?i.dataToPoint(o):null},r.prototype.convertFromPixel=function(e,t,o){var i=U(t);return i===this?i.pointToData(o):null},r.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},r.dimensions=["x","y"],r})(k);function U(a){var r=a.seriesModel;return r?r.coordinateSystem:null}function D(a,r){return a.pointToProjected?a.pointToProjected(r):a.pointToData(r)}function ze(a,r,e,t){var o=a.getZoom(),i=a.getCenter(),n=r.zoom,s=a.projectedToPoint?a.projectedToPoint(i):a.dataToPoint(i);if(r.dx!=null&&r.dy!=null&&(s[0]-=r.dx,s[1]-=r.dy,a.setCenter(D(a,s),t)),n!=null){if(e){var l=e.min||0,u=e.max||1/0;n=Math.max(Math.min(o*n,u),l)/o}a.scaleX*=n,a.scaleY*=n;var f=(r.originX-a.x)*(n-1),m=(r.originY-a.y)*(n-1);a.x-=f,a.y-=m,a.updateTransform(),a.setCenter(D(a,s),t),a.setZoom(n*o)}return{center:a.getCenter(),zoom:a.getZoom()}}var xe=(function(a){R(r,a);function r(e){var t=a.call(this)||this;t._zr=e;var o=C(t._mousedownHandler,t),i=C(t._mousemoveHandler,t),n=C(t._mouseupHandler,t),s=C(t._mousewheelHandler,t),l=C(t._pinchHandler,t);return t.enable=function(u,f){this.disable(),this._opt=ce(ve(f)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",o),e.on("mousemove",i),e.on("mouseup",n)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},t.disable=function(){e.off("mousedown",o),e.off("mousemove",i),e.off("mouseup",n),e.off("mousewheel",s),e.off("pinch",l)},t}return r.prototype.isDragging=function(){return this._dragging},r.prototype.isPinching=function(){return this._pinching},r.prototype.setPointerChecker=function(e){this.pointerChecker=e},r.prototype.dispose=function(){this.disable()},r.prototype._mousedownHandler=function(e){if(!W(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var o=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,o,i)&&(this._x=o,this._y=i,this._dragging=!0)}},r.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!E("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||F(this._zr,"globalPan"))){var t=e.offsetX,o=e.offsetY,i=this._x,n=this._y,s=t-i,l=o-n;this._x=t,this._y=o,this._opt.preventDefaultMouseMove&&re(e.event),le(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:i,oldY:n,newX:t,newY:o,isAvailableBehavior:null})}},r.prototype._mouseupHandler=function(e){W(e)||(this._dragging=!1)},r.prototype._mousewheelHandler=function(e){var t=E("zoomOnMouseWheel",e,this._opt),o=E("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,n=Math.abs(i),s=e.offsetX,l=e.offsetY;if(!(i===0||!t&&!o)){if(t){var u=n>3?1.4:n>1?1.2:1.1,f=i>0?u:1/u;X(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(o){var m=Math.abs(i),h=(i>0?1:-1)*(m>3?.4:m>1?.15:.05);X(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},r.prototype._pinchHandler=function(e){if(!F(this._zr,"globalPan")){var t=e.pinchScale>1?1.1:1/1.1;X(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},r})(de);function X(a,r,e,t,o){a.pointerChecker&&a.pointerChecker(t,o.originX,o.originY)&&(re(t.event),le(a,r,e,t,o))}function le(a,r,e,t,o){o.isAvailableBehavior=C(E,null,e,t),a.trigger(r,o)}function E(a,r,e){var t=e[a];return!a||t&&(!ye(t)||r.event[t+"Key"])}function Ve(a,r,e){var t=a.target;t.x+=r,t.y+=e,t.dirty()}function He(a,r,e,t){var o=a.target,i=a.zoomLimit,n=a.zoom=a.zoom||1;if(n*=r,i){var s=i.min||0,l=i.max||1/0;n=Math.max(Math.min(l,n),s)}var u=n/a.zoom;a.zoom=n,o.x-=(e-o.x)*(u-1),o.y-=(t-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var $=ge.prototype,B=_e.prototype,ue=(function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a})();(function(a){R(r,a);function r(){return a!==null&&a.apply(this,arguments)||this}return r})(ue);function z(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var ke=(function(a){R(r,a);function r(e){var t=a.call(this,e)||this;return t.type="ec-line",t}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new ue},r.prototype.buildPath=function(e,t){z(t)?$.buildPath.call(this,e,t):B.buildPath.call(this,e,t)},r.prototype.pointAt=function(e){return z(this.shape)?$.pointAt.call(this,e):B.pointAt.call(this,e)},r.prototype.tangentAt=function(e){var t=this.shape,o=z(t)?[t.x2-t.x1,t.y2-t.y1]:B.tangentAt.call(this,e);return oe(o,o)},r})(be),x=["fromSymbol","toSymbol"];function q(a){return"_"+a+"Type"}function J(a,r,e){var t=r.getItemVisual(e,a);if(!t||t==="none")return t;var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l);return t+l+u+(i||"")+(s||"")}function Q(a,r,e){var t=r.getItemVisual(e,a);if(!(!t||t==="none")){var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l),f=Oe(t,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,f.name=a,f}}function Ee(a){var r=new ke({name:"line",subPixelOptimize:!0});return Z(r.shape,a),r}function Z(a,r){a.x1=r[0][0],a.y1=r[0][1],a.x2=r[1][0],a.y2=r[1][1],a.percent=1;var e=r[2];e?(a.cpx1=e[0],a.cpy1=e[1]):(a.cpx1=NaN,a.cpy1=NaN)}var Ne=(function(a){R(r,a);function r(e,t,o){var i=a.call(this)||this;return i._createLine(e,t,o),i}return r.prototype._createLine=function(e,t,o){var i=e.hostModel,n=e.getItemLayout(t),s=Ee(n);s.shape.percent=0,Te(s,{shape:{percent:1}},i,t),this.add(s),Y(x,function(l){var u=Q(l,e,t);this.add(u),this[q(l)]=J(l,e,t)},this),this._updateCommonStl(e,t,o)},r.prototype.updateData=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=e.getItemLayout(t),l={shape:{}};Z(l.shape,s),Se(n,l,i,t),Y(x,function(u){var f=J(u,e,t),m=q(u);if(this[m]!==f){this.remove(this.childOfName(u));var h=Q(u,e,t);this.add(h)}this[m]=f},this),this._updateCommonStl(e,t,o)},r.prototype.getLinePath=function(){return this.childAt(0)},r.prototype._updateCommonStl=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=o&&o.emphasisLineStyle,l=o&&o.blurLineStyle,u=o&&o.selectLineStyle,f=o&&o.labelStatesModels,m=o&&o.emphasisDisabled,h=o&&o.focus,A=o&&o.blurScope;if(!o||e.hasItemOption){var v=e.getItemModel(t),d=v.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),m=d.get("disabled"),h=d.get("focus"),A=d.get("blurScope"),f=ae(v)}var S=e.getItemVisual(t,"style"),b=S.stroke;n.useStyle(S),n.style.fill=null,n.style.strokeNoScale=!0,n.ensureState("emphasis").style=s,n.ensureState("blur").style=l,n.ensureState("select").style=u,Y(x,function(P){var p=this.childOfName(P);if(p){p.setColor(b),p.style.opacity=S.opacity;for(var L=0;L<K.length;L++){var c=K[L],w=n.getState(c);if(w){var M=w.style||{},I=p.ensureState(c),O=I.style||(I.style={});M.stroke!=null&&(O[p.__isEmptyBrush?"stroke":"fill"]=M.stroke),M.opacity!=null&&(O.opacity=M.opacity)}}p.markRedraw()}},this);var T=i.getRawValue(t);Le(this,f,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(P,p){return i.getFormattedLabel(P,p,e.dataType)}},inheritColor:b||"#000",defaultOpacity:S.opacity,defaultText:(T==null?e.getName(t):isFinite(T)?Me(T):T)+""});var g=this.getTextContent();if(g){var _=f.normal;g.__align=g.style.align,g.__verticalAlign=g.style.verticalAlign,g.__position=_.get("position")||"middle";var y=_.get("distance");Pe(y)||(y=[y,y]),g.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),we(this,h,A,m)},r.prototype.highlight=function(){Ce(this)},r.prototype.downplay=function(){Ae(this)},r.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},r.prototype.setLinePoints=function(e){var t=this.childOfName("line");Z(t.shape,e),t.dirty()},r.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),o=e.childOfName("toSymbol"),i=e.getTextContent();if(!t&&!o&&(!i||i.ignore))return;for(var n=1,s=this.parent;s;)s.scaleX&&(n/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),m=l.pointAt(u),h=Ie([],m,f);oe(h,h);function A(w,M){var I=w.__specifiedRotation;if(I==null){var O=l.tangentAt(M);w.attr("rotation",(M===1?-1:1)*Math.PI/2-Math.atan2(O[1],O[0]))}else w.attr("rotation",I)}if(t&&(t.setPosition(f),A(t,0),t.scaleX=t.scaleY=n*u,t.markRedraw()),o&&(o.setPosition(m),A(o,1),o.scaleX=o.scaleY=n*u,o.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var v=void 0,d=void 0,S=i.__labelDistance,b=S[0]*n,T=S[1]*n,g=u/2,_=l.tangentAt(g),y=[_[1],-_[0]],P=l.pointAt(g);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var p=_[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var L=-Math.atan2(_[1],_[0]);m[0]<f[0]&&(L=Math.PI+L),i.rotation=L}var c=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":c=-T,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":c=T,d="top";break;default:c=0,d="middle"}switch(i.__position){case"end":i.x=h[0]*b+m[0],i.y=h[1]*T+m[1],v=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*b+f[0],i.y=-h[1]*T+f[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=b*p+f[0],i.y=f[1]+c,v=_[0]<0?"right":"left",i.originX=-b*p,i.originY=-c;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=P[0],i.y=P[1]+c,v="center",i.originY=-c;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-b*p+m[0],i.y=m[1]+c,v=_[0]>=0?"right":"left",i.originX=b*p,i.originY=-c;break}i.scaleX=i.scaleY=n,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||v})}},r})(ie),Ze=(function(){function a(r){this.group=new ie,this._LineCtor=r||Ne}return a.prototype.updateData=function(r){var e=this;this._progressiveEls=null;var t=this,o=t.group,i=t._lineData;t._lineData=r,i||o.removeAll();var n=ee(r);r.diff(i).add(function(s){e._doAdd(r,s,n)}).update(function(s,l){e._doUpdate(i,r,l,s,n)}).remove(function(s){o.remove(i.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var r=this._lineData;r&&r.eachItemGraphicEl(function(e,t){e.updateLayout(r,t)},this)},a.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=ee(r),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(r,e){this._progressiveEls=[];function t(s){!s.isGroup&&!Ye(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var o=r.start;o<r.end;o++){var i=e.getItemLayout(o);if(V(i)){var n=new this._LineCtor(e,o,this._seriesScope);n.traverse(t),this.group.add(n),e.setItemGraphicEl(o,n),this._progressiveEls.push(n)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(r){Re(this._progressiveEls||this.group,r)},a.prototype._doAdd=function(r,e,t){var o=r.getItemLayout(e);if(V(o)){var i=new this._LineCtor(r,e,t);r.setItemGraphicEl(e,i),this.group.add(i)}},a.prototype._doUpdate=function(r,e,t,o,i){var n=r.getItemGraphicEl(t);if(!V(e.getItemLayout(o))){this.group.remove(n);return}n?n.updateData(e,o,i):n=new this._LineCtor(e,o,i),e.setItemGraphicEl(o,n),this.group.add(n)},a})();function Ye(a){return a.animators&&a.animators.length>0}function ee(a){var r=a.hostModel,e=r.getModel("emphasis");return{lineStyle:r.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:r.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:r.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:ae(r)}}function te(a){return isNaN(a[0])||isNaN(a[1])}function V(a){return a&&!te(a[0])&&!te(a[1])}export{Ze as L,xe as R,Be as V,He as a,ze as b,Ne as c,Ve as u};
1
+ import{_ as R,bF as k,W as N,a4 as G,bG as H,bH as fe,be as he,bI as me,bq as pe,f as C,k as ce,aL as ve,bJ as W,bK as F,bL as re,bM as de,D as ye,bx as ge,aS as _e,bk as oe,P as be,j as Te,y as Y,x as Se,u as ae,z as K,r as Le,ap as Me,H as Pe,t as we,ac as Ce,ad as Ae,bn as Ie,G as ie,ae as ne,af as se,a as Oe,I as Re}from"./echarts-runtime-BTfAtt-4.js";var j=H,Be=(function(a){R(r,a);function r(e){var t=a.call(this)||this;return t.type="view",t.dimensions=["x","y"],t._roamTransformable=new k,t._rawTransformable=new k,t.name=e,t}return r.prototype.setBoundingRect=function(e,t,o,i){return this._rect=new N(e,t,o,i),this._rect},r.prototype.getBoundingRect=function(){return this._rect},r.prototype.setViewRect=function(e,t,o,i){this._transformTo(e,t,o,i),this._viewRect=new N(e,t,o,i)},r.prototype._transformTo=function(e,t,o,i){var n=this.getBoundingRect(),s=this._rawTransformable;s.transform=n.calculateTransform(new N(e,t,o,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},r.prototype.setCenter=function(e,t){e&&(this._center=[G(e[0],t.getWidth()),G(e[1],t.getHeight())],this._updateCenterAndZoom())},r.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(t.max!=null&&(e=Math.min(t.max,e)),t.min!=null&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},r.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),t=e.x+e.width/2,o=e.y+e.height/2;return[t,o]},r.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},r.prototype.getZoom=function(){return this._zoom||1},r.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},r.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,o=this.getDefaultCenter(),i=this.getCenter(),n=this.getZoom();i=H([],i,e),o=H([],o,e),t.originX=i[0],t.originY=i[1],t.x=o[0]-i[0],t.y=o[1]-i[1],t.scaleX=t.scaleY=n,this._updateTransform()},r.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),fe(this.transform||(this.transform=[]),t.transform||he()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],me(this.invTransform,this.transform),this.decomposeTransform()},r.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,o=new k;return o.transform=t.transform,o.decomposeTransform(),{roam:{x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},r.prototype.getViewRect=function(){return this._viewRect},r.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},r.prototype.dataToPoint=function(e,t,o){var i=t?this._rawTransform:this.transform;return o=o||[],i?j(o,e,i):pe(o,e)},r.prototype.pointToData=function(e){var t=this.invTransform;return t?j([],e,t):[e[0],e[1]]},r.prototype.convertToPixel=function(e,t,o){var i=U(t);return i===this?i.dataToPoint(o):null},r.prototype.convertFromPixel=function(e,t,o){var i=U(t);return i===this?i.pointToData(o):null},r.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},r.dimensions=["x","y"],r})(k);function U(a){var r=a.seriesModel;return r?r.coordinateSystem:null}function D(a,r){return a.pointToProjected?a.pointToProjected(r):a.pointToData(r)}function ze(a,r,e,t){var o=a.getZoom(),i=a.getCenter(),n=r.zoom,s=a.projectedToPoint?a.projectedToPoint(i):a.dataToPoint(i);if(r.dx!=null&&r.dy!=null&&(s[0]-=r.dx,s[1]-=r.dy,a.setCenter(D(a,s),t)),n!=null){if(e){var l=e.min||0,u=e.max||1/0;n=Math.max(Math.min(o*n,u),l)/o}a.scaleX*=n,a.scaleY*=n;var f=(r.originX-a.x)*(n-1),m=(r.originY-a.y)*(n-1);a.x-=f,a.y-=m,a.updateTransform(),a.setCenter(D(a,s),t),a.setZoom(n*o)}return{center:a.getCenter(),zoom:a.getZoom()}}var xe=(function(a){R(r,a);function r(e){var t=a.call(this)||this;t._zr=e;var o=C(t._mousedownHandler,t),i=C(t._mousemoveHandler,t),n=C(t._mouseupHandler,t),s=C(t._mousewheelHandler,t),l=C(t._pinchHandler,t);return t.enable=function(u,f){this.disable(),this._opt=ce(ve(f)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",o),e.on("mousemove",i),e.on("mouseup",n)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},t.disable=function(){e.off("mousedown",o),e.off("mousemove",i),e.off("mouseup",n),e.off("mousewheel",s),e.off("pinch",l)},t}return r.prototype.isDragging=function(){return this._dragging},r.prototype.isPinching=function(){return this._pinching},r.prototype.setPointerChecker=function(e){this.pointerChecker=e},r.prototype.dispose=function(){this.disable()},r.prototype._mousedownHandler=function(e){if(!W(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var o=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,o,i)&&(this._x=o,this._y=i,this._dragging=!0)}},r.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!E("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||F(this._zr,"globalPan"))){var t=e.offsetX,o=e.offsetY,i=this._x,n=this._y,s=t-i,l=o-n;this._x=t,this._y=o,this._opt.preventDefaultMouseMove&&re(e.event),le(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:i,oldY:n,newX:t,newY:o,isAvailableBehavior:null})}},r.prototype._mouseupHandler=function(e){W(e)||(this._dragging=!1)},r.prototype._mousewheelHandler=function(e){var t=E("zoomOnMouseWheel",e,this._opt),o=E("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,n=Math.abs(i),s=e.offsetX,l=e.offsetY;if(!(i===0||!t&&!o)){if(t){var u=n>3?1.4:n>1?1.2:1.1,f=i>0?u:1/u;X(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(o){var m=Math.abs(i),h=(i>0?1:-1)*(m>3?.4:m>1?.15:.05);X(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},r.prototype._pinchHandler=function(e){if(!F(this._zr,"globalPan")){var t=e.pinchScale>1?1.1:1/1.1;X(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},r})(de);function X(a,r,e,t,o){a.pointerChecker&&a.pointerChecker(t,o.originX,o.originY)&&(re(t.event),le(a,r,e,t,o))}function le(a,r,e,t,o){o.isAvailableBehavior=C(E,null,e,t),a.trigger(r,o)}function E(a,r,e){var t=e[a];return!a||t&&(!ye(t)||r.event[t+"Key"])}function Ve(a,r,e){var t=a.target;t.x+=r,t.y+=e,t.dirty()}function He(a,r,e,t){var o=a.target,i=a.zoomLimit,n=a.zoom=a.zoom||1;if(n*=r,i){var s=i.min||0,l=i.max||1/0;n=Math.max(Math.min(l,n),s)}var u=n/a.zoom;a.zoom=n,o.x-=(e-o.x)*(u-1),o.y-=(t-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var $=ge.prototype,B=_e.prototype,ue=(function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a})();(function(a){R(r,a);function r(){return a!==null&&a.apply(this,arguments)||this}return r})(ue);function z(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var ke=(function(a){R(r,a);function r(e){var t=a.call(this,e)||this;return t.type="ec-line",t}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new ue},r.prototype.buildPath=function(e,t){z(t)?$.buildPath.call(this,e,t):B.buildPath.call(this,e,t)},r.prototype.pointAt=function(e){return z(this.shape)?$.pointAt.call(this,e):B.pointAt.call(this,e)},r.prototype.tangentAt=function(e){var t=this.shape,o=z(t)?[t.x2-t.x1,t.y2-t.y1]:B.tangentAt.call(this,e);return oe(o,o)},r})(be),x=["fromSymbol","toSymbol"];function q(a){return"_"+a+"Type"}function J(a,r,e){var t=r.getItemVisual(e,a);if(!t||t==="none")return t;var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l);return t+l+u+(i||"")+(s||"")}function Q(a,r,e){var t=r.getItemVisual(e,a);if(!(!t||t==="none")){var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l),f=Oe(t,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,f.name=a,f}}function Ee(a){var r=new ke({name:"line",subPixelOptimize:!0});return Z(r.shape,a),r}function Z(a,r){a.x1=r[0][0],a.y1=r[0][1],a.x2=r[1][0],a.y2=r[1][1],a.percent=1;var e=r[2];e?(a.cpx1=e[0],a.cpy1=e[1]):(a.cpx1=NaN,a.cpy1=NaN)}var Ne=(function(a){R(r,a);function r(e,t,o){var i=a.call(this)||this;return i._createLine(e,t,o),i}return r.prototype._createLine=function(e,t,o){var i=e.hostModel,n=e.getItemLayout(t),s=Ee(n);s.shape.percent=0,Te(s,{shape:{percent:1}},i,t),this.add(s),Y(x,function(l){var u=Q(l,e,t);this.add(u),this[q(l)]=J(l,e,t)},this),this._updateCommonStl(e,t,o)},r.prototype.updateData=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=e.getItemLayout(t),l={shape:{}};Z(l.shape,s),Se(n,l,i,t),Y(x,function(u){var f=J(u,e,t),m=q(u);if(this[m]!==f){this.remove(this.childOfName(u));var h=Q(u,e,t);this.add(h)}this[m]=f},this),this._updateCommonStl(e,t,o)},r.prototype.getLinePath=function(){return this.childAt(0)},r.prototype._updateCommonStl=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=o&&o.emphasisLineStyle,l=o&&o.blurLineStyle,u=o&&o.selectLineStyle,f=o&&o.labelStatesModels,m=o&&o.emphasisDisabled,h=o&&o.focus,A=o&&o.blurScope;if(!o||e.hasItemOption){var v=e.getItemModel(t),d=v.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),m=d.get("disabled"),h=d.get("focus"),A=d.get("blurScope"),f=ae(v)}var S=e.getItemVisual(t,"style"),b=S.stroke;n.useStyle(S),n.style.fill=null,n.style.strokeNoScale=!0,n.ensureState("emphasis").style=s,n.ensureState("blur").style=l,n.ensureState("select").style=u,Y(x,function(P){var p=this.childOfName(P);if(p){p.setColor(b),p.style.opacity=S.opacity;for(var L=0;L<K.length;L++){var c=K[L],w=n.getState(c);if(w){var M=w.style||{},I=p.ensureState(c),O=I.style||(I.style={});M.stroke!=null&&(O[p.__isEmptyBrush?"stroke":"fill"]=M.stroke),M.opacity!=null&&(O.opacity=M.opacity)}}p.markRedraw()}},this);var T=i.getRawValue(t);Le(this,f,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(P,p){return i.getFormattedLabel(P,p,e.dataType)}},inheritColor:b||"#000",defaultOpacity:S.opacity,defaultText:(T==null?e.getName(t):isFinite(T)?Me(T):T)+""});var g=this.getTextContent();if(g){var _=f.normal;g.__align=g.style.align,g.__verticalAlign=g.style.verticalAlign,g.__position=_.get("position")||"middle";var y=_.get("distance");Pe(y)||(y=[y,y]),g.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),we(this,h,A,m)},r.prototype.highlight=function(){Ce(this)},r.prototype.downplay=function(){Ae(this)},r.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},r.prototype.setLinePoints=function(e){var t=this.childOfName("line");Z(t.shape,e),t.dirty()},r.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),o=e.childOfName("toSymbol"),i=e.getTextContent();if(!t&&!o&&(!i||i.ignore))return;for(var n=1,s=this.parent;s;)s.scaleX&&(n/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),m=l.pointAt(u),h=Ie([],m,f);oe(h,h);function A(w,M){var I=w.__specifiedRotation;if(I==null){var O=l.tangentAt(M);w.attr("rotation",(M===1?-1:1)*Math.PI/2-Math.atan2(O[1],O[0]))}else w.attr("rotation",I)}if(t&&(t.setPosition(f),A(t,0),t.scaleX=t.scaleY=n*u,t.markRedraw()),o&&(o.setPosition(m),A(o,1),o.scaleX=o.scaleY=n*u,o.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var v=void 0,d=void 0,S=i.__labelDistance,b=S[0]*n,T=S[1]*n,g=u/2,_=l.tangentAt(g),y=[_[1],-_[0]],P=l.pointAt(g);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var p=_[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var L=-Math.atan2(_[1],_[0]);m[0]<f[0]&&(L=Math.PI+L),i.rotation=L}var c=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":c=-T,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":c=T,d="top";break;default:c=0,d="middle"}switch(i.__position){case"end":i.x=h[0]*b+m[0],i.y=h[1]*T+m[1],v=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*b+f[0],i.y=-h[1]*T+f[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=b*p+f[0],i.y=f[1]+c,v=_[0]<0?"right":"left",i.originX=-b*p,i.originY=-c;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=P[0],i.y=P[1]+c,v="center",i.originY=-c;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-b*p+m[0],i.y=m[1]+c,v=_[0]>=0?"right":"left",i.originX=b*p,i.originY=-c;break}i.scaleX=i.scaleY=n,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||v})}},r})(ie),Ze=(function(){function a(r){this.group=new ie,this._LineCtor=r||Ne}return a.prototype.updateData=function(r){var e=this;this._progressiveEls=null;var t=this,o=t.group,i=t._lineData;t._lineData=r,i||o.removeAll();var n=ee(r);r.diff(i).add(function(s){e._doAdd(r,s,n)}).update(function(s,l){e._doUpdate(i,r,l,s,n)}).remove(function(s){o.remove(i.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var r=this._lineData;r&&r.eachItemGraphicEl(function(e,t){e.updateLayout(r,t)},this)},a.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=ee(r),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(r,e){this._progressiveEls=[];function t(s){!s.isGroup&&!Ye(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var o=r.start;o<r.end;o++){var i=e.getItemLayout(o);if(V(i)){var n=new this._LineCtor(e,o,this._seriesScope);n.traverse(t),this.group.add(n),e.setItemGraphicEl(o,n),this._progressiveEls.push(n)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(r){Re(this._progressiveEls||this.group,r)},a.prototype._doAdd=function(r,e,t){var o=r.getItemLayout(e);if(V(o)){var i=new this._LineCtor(r,e,t);r.setItemGraphicEl(e,i),this.group.add(i)}},a.prototype._doUpdate=function(r,e,t,o,i){var n=r.getItemGraphicEl(t);if(!V(e.getItemLayout(o))){this.group.remove(n);return}n?n.updateData(e,o,i):n=new this._LineCtor(e,o,i),e.setItemGraphicEl(o,n),this.group.add(n)},a})();function Ye(a){return a.animators&&a.animators.length>0}function ee(a){var r=a.hostModel,e=r.getModel("emphasis");return{lineStyle:r.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:r.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:r.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:ae(r)}}function te(a){return isNaN(a[0])||isNaN(a[1])}function V(a){return a&&!te(a[0])&&!te(a[1])}export{Ze as L,xe as R,Be as V,He as a,ze as b,Ne as c,Ve as u};
@@ -1 +1 @@
1
- import{_ as U,a as Z,ac as j,ad as k,x as G,J as F,j as H,u as N,af as B,al as J,N as C,r as K,t as $,l as q,ah as T,ae as Q,G as X,I as W,a9 as x}from"./echarts-runtime-CvLr4Slh.js";import{a as ee}from"./labelHelper-DbITmOUW.js";var te=(function(n){U(t,n);function t(e,l,i,a){var m=n.call(this)||this;return m.updateData(e,l,i,a),m}return t.prototype._createSymbol=function(e,l,i,a,m){this.removeAll();var s=Z(e,-1,-1,2,2,null,m);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=le,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){j(this.childAt(0))},t.prototype.downplay=function(){k(this.childAt(0))},t.prototype.setZ=function(e,l){var i=this.childAt(0);i.zlevel=e,i.z=l},t.prototype.setDraggable=function(e,l){var i=this.childAt(0);i.draggable=e,i.cursor=!l&&e?"move":i.cursor},t.prototype.updateData=function(e,l,i,a){this.silent=!1;var m=e.getItemVisual(l,"symbol")||"circle",s=e.hostModel,c=t.getSymbolSize(e,l),h=m!==this._symbolType,y=a&&a.disableAnimation;if(h){var u=e.getItemVisual(l,"symbolKeepAspect");this._createSymbol(m,e,l,c,u)}else{var o=this.childAt(0);o.silent=!1;var r={scaleX:c[0]/2,scaleY:c[1]/2};y?o.attr(r):G(o,r,s,l),F(o)}if(this._updateCommon(e,l,c,i,a),h){var o=this.childAt(0);if(!y){var r={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:o.style.opacity}};o.scaleX=o.scaleY=0,o.style.opacity=0,H(o,r,s,l)}}y&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,l,i,a,m){var s=this.childAt(0),c=e.hostModel,h,y,u,o,r,f,b,v,p;if(a&&(h=a.emphasisItemStyle,y=a.blurItemStyle,u=a.selectItemStyle,o=a.focus,r=a.blurScope,b=a.labelStatesModels,v=a.hoverScale,p=a.cursorStyle,f=a.emphasisDisabled),!a||e.hasItemOption){var g=a&&a.itemModel?a.itemModel:e.getItemModel(l),S=g.getModel("emphasis");h=S.getModel("itemStyle").getItemStyle(),u=g.getModel(["select","itemStyle"]).getItemStyle(),y=g.getModel(["blur","itemStyle"]).getItemStyle(),o=S.get("focus"),r=S.get("blurScope"),f=S.get("disabled"),b=N(g),v=S.getShallow("scale"),p=g.getShallow("cursor")}var V=e.getItemVisual(l,"symbolRotate");s.attr("rotation",(V||0)*Math.PI/180||0);var _=B(e.getItemVisual(l,"symbolOffset"),i);_&&(s.x=_[0],s.y=_[1]),p&&s.attr("cursor",p);var d=e.getItemVisual(l,"style"),E=d.fill;if(s instanceof J){var I=s.style;s.useStyle(C({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},d))}else s.__isEmptyBrush?s.useStyle(C({},d)):s.useStyle(d),s.style.decal=null,s.setColor(E,m&&m.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(l,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var w=m&&m.useNameLabel;K(s,b,{labelFetcher:c,labelDataIndex:l,defaultText:R,inheritColor:E,defaultOpacity:d.opacity});function R(P){return w?e.getName(P):ee(e,P)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var z=s.ensureState("emphasis");z.style=h,s.ensureState("select").style=u,s.ensureState("blur").style=y;var O=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;z.scaleX=this._sizeX*O,z.scaleY=this._sizeY*O,this.setSymbolScale(1),$(this,o,r,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,l,i){var a=this.childAt(0),m=q(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var c=a.getTextContent();c&&T(c,{style:{opacity:0}},l,{dataIndex:m,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();T(a,{style:{opacity:0},scaleX:0,scaleY:0},l,{dataIndex:m,cb:e,removeOpt:s})},t.getSymbolSize=function(e,l){return Q(e.getItemVisual(l,"symbolSize"))},t})(X);function le(n,t){this.parent.drift(n,t)}function M(n,t,e,l){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(l.isIgnore&&l.isIgnore(e))&&!(l.clipShape&&!l.clipShape.contain(t[0],t[1]))&&n.getItemVisual(e,"symbol")!=="none"}function L(n){return n!=null&&!x(n)&&(n={isIgnore:n}),n||{}}function Y(n){var t=n.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:N(t),cursorStyle:t.get("cursor")}}var ie=(function(){function n(t){this.group=new X,this._SymbolCtor=t||te}return n.prototype.updateData=function(t,e){this._progressiveEls=null,e=L(e);var l=this.group,i=t.hostModel,a=this._data,m=this._SymbolCtor,s=e.disableAnimation,c=Y(t),h={disableAnimation:s},y=e.getSymbolPoint||function(u){return t.getItemLayout(u)};a||l.removeAll(),t.diff(a).add(function(u){var o=y(u);if(M(t,o,u,e)){var r=new m(t,u,c,h);r.setPosition(o),t.setItemGraphicEl(u,r),l.add(r)}}).update(function(u,o){var r=a.getItemGraphicEl(o),f=y(u);if(!M(t,f,u,e)){l.remove(r);return}var b=t.getItemVisual(u,"symbol")||"circle",v=r&&r.getSymbolType&&r.getSymbolType();if(!r||v&&v!==b)l.remove(r),r=new m(t,u,c,h),r.setPosition(f);else{r.updateData(t,u,c,h);var p={x:f[0],y:f[1]};s?r.attr(p):G(r,p,i)}l.add(r),t.setItemGraphicEl(u,r)}).remove(function(u){var o=a.getItemGraphicEl(u);o&&o.fadeOut(function(){l.remove(o)},i)}).execute(),this._getSymbolPoint=y,this._data=t},n.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(l,i){var a=t._getSymbolPoint(i);l.setPosition(a),l.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Y(t),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e,l){this._progressiveEls=[],l=L(l);function i(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var m=e.getItemLayout(a);if(M(e,m,a,l)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(m),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},n.prototype.eachRendered=function(t){W(this._progressiveEls||this.group,t)},n.prototype.remove=function(t){var e=this.group,l=this._data;l&&t?l.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},l.hostModel)}):e.removeAll()},n})();export{ie as S,te as a};
1
+ import{_ as U,a as Z,ac as j,ad as k,x as G,J as F,j as H,u as N,af as B,al as J,N as C,r as K,t as $,l as q,ah as T,ae as Q,G as X,I as W,a9 as x}from"./echarts-runtime-BTfAtt-4.js";import{a as ee}from"./labelHelper-CSRwI3Ku.js";var te=(function(n){U(t,n);function t(e,l,i,a){var m=n.call(this)||this;return m.updateData(e,l,i,a),m}return t.prototype._createSymbol=function(e,l,i,a,m){this.removeAll();var s=Z(e,-1,-1,2,2,null,m);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=le,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){j(this.childAt(0))},t.prototype.downplay=function(){k(this.childAt(0))},t.prototype.setZ=function(e,l){var i=this.childAt(0);i.zlevel=e,i.z=l},t.prototype.setDraggable=function(e,l){var i=this.childAt(0);i.draggable=e,i.cursor=!l&&e?"move":i.cursor},t.prototype.updateData=function(e,l,i,a){this.silent=!1;var m=e.getItemVisual(l,"symbol")||"circle",s=e.hostModel,c=t.getSymbolSize(e,l),h=m!==this._symbolType,y=a&&a.disableAnimation;if(h){var u=e.getItemVisual(l,"symbolKeepAspect");this._createSymbol(m,e,l,c,u)}else{var o=this.childAt(0);o.silent=!1;var r={scaleX:c[0]/2,scaleY:c[1]/2};y?o.attr(r):G(o,r,s,l),F(o)}if(this._updateCommon(e,l,c,i,a),h){var o=this.childAt(0);if(!y){var r={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:o.style.opacity}};o.scaleX=o.scaleY=0,o.style.opacity=0,H(o,r,s,l)}}y&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,l,i,a,m){var s=this.childAt(0),c=e.hostModel,h,y,u,o,r,f,b,v,p;if(a&&(h=a.emphasisItemStyle,y=a.blurItemStyle,u=a.selectItemStyle,o=a.focus,r=a.blurScope,b=a.labelStatesModels,v=a.hoverScale,p=a.cursorStyle,f=a.emphasisDisabled),!a||e.hasItemOption){var g=a&&a.itemModel?a.itemModel:e.getItemModel(l),S=g.getModel("emphasis");h=S.getModel("itemStyle").getItemStyle(),u=g.getModel(["select","itemStyle"]).getItemStyle(),y=g.getModel(["blur","itemStyle"]).getItemStyle(),o=S.get("focus"),r=S.get("blurScope"),f=S.get("disabled"),b=N(g),v=S.getShallow("scale"),p=g.getShallow("cursor")}var V=e.getItemVisual(l,"symbolRotate");s.attr("rotation",(V||0)*Math.PI/180||0);var _=B(e.getItemVisual(l,"symbolOffset"),i);_&&(s.x=_[0],s.y=_[1]),p&&s.attr("cursor",p);var d=e.getItemVisual(l,"style"),E=d.fill;if(s instanceof J){var I=s.style;s.useStyle(C({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},d))}else s.__isEmptyBrush?s.useStyle(C({},d)):s.useStyle(d),s.style.decal=null,s.setColor(E,m&&m.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(l,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var w=m&&m.useNameLabel;K(s,b,{labelFetcher:c,labelDataIndex:l,defaultText:R,inheritColor:E,defaultOpacity:d.opacity});function R(P){return w?e.getName(P):ee(e,P)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var z=s.ensureState("emphasis");z.style=h,s.ensureState("select").style=u,s.ensureState("blur").style=y;var O=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;z.scaleX=this._sizeX*O,z.scaleY=this._sizeY*O,this.setSymbolScale(1),$(this,o,r,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,l,i){var a=this.childAt(0),m=q(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var c=a.getTextContent();c&&T(c,{style:{opacity:0}},l,{dataIndex:m,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();T(a,{style:{opacity:0},scaleX:0,scaleY:0},l,{dataIndex:m,cb:e,removeOpt:s})},t.getSymbolSize=function(e,l){return Q(e.getItemVisual(l,"symbolSize"))},t})(X);function le(n,t){this.parent.drift(n,t)}function M(n,t,e,l){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(l.isIgnore&&l.isIgnore(e))&&!(l.clipShape&&!l.clipShape.contain(t[0],t[1]))&&n.getItemVisual(e,"symbol")!=="none"}function L(n){return n!=null&&!x(n)&&(n={isIgnore:n}),n||{}}function Y(n){var t=n.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:N(t),cursorStyle:t.get("cursor")}}var ie=(function(){function n(t){this.group=new X,this._SymbolCtor=t||te}return n.prototype.updateData=function(t,e){this._progressiveEls=null,e=L(e);var l=this.group,i=t.hostModel,a=this._data,m=this._SymbolCtor,s=e.disableAnimation,c=Y(t),h={disableAnimation:s},y=e.getSymbolPoint||function(u){return t.getItemLayout(u)};a||l.removeAll(),t.diff(a).add(function(u){var o=y(u);if(M(t,o,u,e)){var r=new m(t,u,c,h);r.setPosition(o),t.setItemGraphicEl(u,r),l.add(r)}}).update(function(u,o){var r=a.getItemGraphicEl(o),f=y(u);if(!M(t,f,u,e)){l.remove(r);return}var b=t.getItemVisual(u,"symbol")||"circle",v=r&&r.getSymbolType&&r.getSymbolType();if(!r||v&&v!==b)l.remove(r),r=new m(t,u,c,h),r.setPosition(f);else{r.updateData(t,u,c,h);var p={x:f[0],y:f[1]};s?r.attr(p):G(r,p,i)}l.add(r),t.setItemGraphicEl(u,r)}).remove(function(u){var o=a.getItemGraphicEl(u);o&&o.fadeOut(function(){l.remove(o)},i)}).execute(),this._getSymbolPoint=y,this._data=t},n.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(l,i){var a=t._getSymbolPoint(i);l.setPosition(a),l.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Y(t),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e,l){this._progressiveEls=[],l=L(l);function i(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var m=e.getItemLayout(a);if(M(e,m,a,l)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(m),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},n.prototype.eachRendered=function(t){W(this._progressiveEls||this.group,t)},n.prototype.remove=function(t){var e=this.group,l=this._data;l&&t?l.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},l.hostModel)}):e.removeAll()},n})();export{ie as S,te as a};
@@ -1 +1 @@
1
- import{_ as j,m as T,k as U,bN as ae,aL as se,D as O,o as he,aX as de,a1 as ve,bO as ge,bP as me,bQ as ye,bR as xe,y as v,H as P,ai as Ve,bS as be,aw as Ae,aK as we,bT as re,bU as Me,bV as Ie,a4 as G,bW as ie,bX as Te,b as Se,aY as Le,aU as _e,aA as D,a9 as H,bY as Ne,f as ne,aV as ze,bZ as $,b_ as q,bg as Ce,bf as K}from"./echarts-runtime-CvLr4Slh.js";var N=me.value;function R(r,e){return U({show:e},r)}var Pe=(function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),a=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),u=this.get("axisName"),f=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),m=this.get("triggerEvent"),b=T(this.get("indicator")||[],function(c){c.max!=null&&c.max>0&&!c.min?c.min=0:c.min!=null&&c.min<0&&!c.max&&(c.max=0);var g=u;c.color!=null&&(g=U({color:c.color},u));var d=ae(se(c),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:c.text,showName:f,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:m},!1);if(O(l)){var x=d.name;d.name=l.replace("{value}",x??"")}else he(l)&&(d.name=l(d.name,d));var y=new de(d,null,this.ecModel);return ve(y,ge.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=b},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ae({lineStyle:{color:"#bbb"}},N.axisLine),axisLabel:R(N.axisLabel,!1),axisTick:R(N.axisTick,!1),splitLine:R(N.splitLine,!0),splitArea:R(N.splitArea,!0),indicator:[]},e})(ye),De=["axisLine","axisTickLabel","axisName"],He=(function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes(),n=T(i,function(o){var s=o.model.get("showName")?o.name:"",u=new xe(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});v(n,function(o){v(De,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),u=o.getModel("lineStyle"),f=s.getModel("areaStyle"),l=o.get("show"),h=s.get("show"),m=u.get("color"),b=f.get("color"),c=P(m)?m:[m],g=P(b)?b:[b],d=[],x=[];function y(V,M,L){var _=L%M.length;return V[_]=V[_]||[],_}if(n==="circle")for(var S=i[0].getTicksCoords(),ee=a.cx,te=a.cy,p=0;p<S.length;p++){if(l){var A=y(d,c,p);d[A].push(new Ve({shape:{cx:ee,cy:te,r:S[p].coord}}))}if(h&&p<S.length-1){var A=y(x,g,p);x[A].push(new be({shape:{cx:ee,cy:te,r0:S[p].coord,r:S[p+1].coord}}))}}else for(var E,ce=T(i,function(V,M){var L=V.getTicksCoords();return E=E==null?L.length-1:Math.min(L.length-1,E),T(L,function(_){return a.coordToPoint(_.coord,M)})}),Y=[],p=0;p<=E;p++){for(var w=[],Z=0;Z<i.length;Z++)w.push(ce[Z][p]);if(w[0]&&w.push(w[0].slice()),l){var A=y(d,c,p);d[A].push(new Ae({shape:{points:w}}))}if(h&&Y){var A=y(x,g,p-1);x[A].push(new we({shape:{points:w.concat(Y)}}))}Y=w.slice().reverse()}var fe=u.getLineStyle(),pe=f.getAreaStyle();v(x,function(V,M){this.group.add(re(V,{style:U({stroke:"none",fill:g[M%g.length]},pe),silent:!0}))},this),v(d,function(V,M){this.group.add(re(V,{style:U({fill:"none",stroke:c[M%c.length]},fe),silent:!0}))},this)},e.type="radar",e})(Me),ke=(function(r){j(e,r);function e(t,a,i){var n=r.call(this,t,a,i)||this;return n.type="value",n.angle=0,n.name="",n}return e})(Ie),Ee=(function(){function r(e,t,a){this.dimensions=[],this._model=e,this._indicatorAxes=T(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new ke(o,new ie);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,a)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var a=this._indicatorAxes[t];return this.coordToPoint(a.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var a=this._indicatorAxes[t],i=a.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=Math.sqrt(t*t+a*a);t/=i,a/=i;for(var n=Math.atan2(-a,t),o=1/0,s,u=-1,f=0;f<this._indicatorAxes.length;f++){var l=this._indicatorAxes[f],h=Math.abs(n-l.angle);h<o&&(s=l,u=f,o=h)}return[u,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,t){var a=e.get("center"),i=t.getWidth(),n=t.getHeight(),o=Math.min(i,n)/2;this.cx=G(a[0],i),this.cy=G(a[1],n),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(O(s)||Se(s))&&(s=[0,s]),this.r0=G(s[0],o),this.r=G(s[1],o),v(this._indicatorAxes,function(u,f){u.setExtent(this.r0,this.r);var l=this.startAngle+f*Math.PI*2/this._indicatorAxes.length;l=Math.atan2(Math.sin(l),Math.cos(l)),u.angle=l},this)},r.prototype.update=function(e,t){var a=this._indicatorAxes,i=this._model;v(a,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,u){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var f=s.getData();v(a,function(l){l.scale.unionExtentFromData(f,f.mapDimension(l.dim))})}},this);var n=i.get("splitNumber"),o=new ie;o.setExtent(0,n),o.setInterval(1),v(a,function(s,u){Te(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var a=[];return e.eachComponent("radar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=a[i.get("radarIndex")||0])}),a},r.dimensions=[],r})();function Xe(r){r.registerCoordinateSystem("radar",Ee),r.registerComponentModel(Pe),r.registerComponentView(He),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(a){t.setItemVisual(a,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}var k=v,Ge=H,X=-1,le=(function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=se(e);this.type=a,this.mappingMethod=t,this._normalizeData=Be[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(Q(i),Re(i)):t==="category"?i.categories?Fe(i):Q(i,!0):(_e(t!=="linear"||i.dataExtent),Q(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ne(this._normalizeData,this)},r.listVisualTypes=function(){return ze(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){H(e)?v(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=P(e)?[]:H(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var u=t.call(a,o,s);i?n=u:n[s]=u}),n},r.retrieveVisuals=function(e){var t={},a;return e&&k(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(P(e))e=e.slice();else if(Ge(e)){var t=[];k(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var i,n=1/0,o=0,s=t.length;o<s;o++){var u=t[o].value;if(u!=null){if(u===e||O(u)&&u===e+"")return o;a&&m(u,o)}}for(var o=0,s=t.length;o<s;o++){var f=t[o],l=f.interval,h=f.close;if(l){if(l[0]===-1/0){if(B(h[1],e,l[1]))return o}else if(l[1]===1/0){if(B(h[0],l[0],e))return o}else if(B(h[0],l[0],e)&&B(h[1],e,l[1]))return o;a&&m(l[0],o),a&&m(l[1],o)}}if(a)return e===1/0?t.length-1:e===-1/0?0:i;function m(b,c){var g=Math.abs(b-e);g<n&&(n=g,i=c)}},r.visualHandlers={color:{applyVisual:z("color"),getColorMapper:function(){var e=this.option;return ne(e.mappingMethod==="category"?function(t,a){return!a&&(t=this._normalizeData(t)),C.call(this,t)}:function(t,a,i){var n=!!i;return!a&&(t=this._normalizeData(t)),i=q(t,e.parsedVisual,i),n?i:$(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return $(q(e,this.option.parsedVisual),"rgba")},category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=$(q(e,this.option.parsedVisual),"rgba")),a},fixed:I}},colorHue:F(function(e,t){return K(e,t)}),colorSaturation:F(function(e,t){return K(e,null,t)}),colorLightness:F(function(e,t){return K(e,null,null,t)}),colorAlpha:F(function(e,t){return Ce(e,t)}),decal:{applyVisual:z("decal"),_normalizedToVisual:{linear:null,category:C,piecewise:null,fixed:null}},opacity:{applyVisual:z("opacity"),_normalizedToVisual:J([0,1])},liftZ:{applyVisual:z("liftZ"),_normalizedToVisual:{linear:I,category:I,piecewise:I,fixed:I}},symbol:{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("symbol",i)},_normalizedToVisual:{linear:oe,category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=oe.call(this,e)),a},fixed:I}},symbolSize:{applyVisual:z("symbolSize"),_normalizedToVisual:J([0,1])}},r})();function Re(r){var e=r.pieceList;r.hasSpecialVisual=!1,v(e,function(t,a){t.originIndex=a,t.visual!=null&&(r.hasSpecialVisual=!0)})}function Fe(r){var e=r.categories,t=r.categoryMap={},a=r.visual;if(k(e,function(o,s){t[o]=s}),!P(a)){var i=[];H(a)?k(a,function(o,s){var u=t[s];i[u??X]=o}):i[X]=a,a=ue(r,i)}for(var n=e.length-1;n>=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function Q(r,e){var t=r.visual,a=[];H(t)?k(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),ue(r,a)}function F(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:J([0,1])}}function oe(r){var e=this.option.visual;return e[Math.round(D(r,[0,1],[0,e.length-1],!0))]||{}}function z(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function C(r){var e=this.option.visual;return e[this.option.loop&&r!==X?r%e.length:r]}function I(){return this.option.visual[0]}function J(r){return{linear:function(e){return D(e,r,this.option.visual,!0)},category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=D(e,r,this.option.visual,!0)),a},fixed:I}}function W(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=le.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function ue(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=T(e,function(t){var a=Ne(t);return a||[0,0,0,1]})),e}var Be={linear:function(r){return D(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=le.findPieceIndex(r,e,!0);if(t!=null)return D(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??X},fixed:Le};function B(r,e,t){return r?e<=t:e<t}export{le as V,Xe as i};
1
+ import{_ as j,m as T,k as U,bN as ae,aL as se,D as O,o as he,aX as de,a1 as ve,bO as ge,bP as me,bQ as ye,bR as xe,y as v,H as P,ai as Ve,bS as be,aw as Ae,aK as we,bT as re,bU as Me,bV as Ie,a4 as G,bW as ie,bX as Te,b as Se,aY as Le,aU as _e,aA as D,a9 as H,bY as Ne,f as ne,aV as ze,bZ as $,b_ as q,bg as Ce,bf as K}from"./echarts-runtime-BTfAtt-4.js";var N=me.value;function R(r,e){return U({show:e},r)}var Pe=(function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),a=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),u=this.get("axisName"),f=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),m=this.get("triggerEvent"),b=T(this.get("indicator")||[],function(c){c.max!=null&&c.max>0&&!c.min?c.min=0:c.min!=null&&c.min<0&&!c.max&&(c.max=0);var g=u;c.color!=null&&(g=U({color:c.color},u));var d=ae(se(c),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:c.text,showName:f,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:m},!1);if(O(l)){var x=d.name;d.name=l.replace("{value}",x??"")}else he(l)&&(d.name=l(d.name,d));var y=new de(d,null,this.ecModel);return ve(y,ge.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=b},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ae({lineStyle:{color:"#bbb"}},N.axisLine),axisLabel:R(N.axisLabel,!1),axisTick:R(N.axisTick,!1),splitLine:R(N.splitLine,!0),splitArea:R(N.splitArea,!0),indicator:[]},e})(ye),De=["axisLine","axisTickLabel","axisName"],He=(function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes(),n=T(i,function(o){var s=o.model.get("showName")?o.name:"",u=new xe(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});v(n,function(o){v(De,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),u=o.getModel("lineStyle"),f=s.getModel("areaStyle"),l=o.get("show"),h=s.get("show"),m=u.get("color"),b=f.get("color"),c=P(m)?m:[m],g=P(b)?b:[b],d=[],x=[];function y(V,M,L){var _=L%M.length;return V[_]=V[_]||[],_}if(n==="circle")for(var S=i[0].getTicksCoords(),ee=a.cx,te=a.cy,p=0;p<S.length;p++){if(l){var A=y(d,c,p);d[A].push(new Ve({shape:{cx:ee,cy:te,r:S[p].coord}}))}if(h&&p<S.length-1){var A=y(x,g,p);x[A].push(new be({shape:{cx:ee,cy:te,r0:S[p].coord,r:S[p+1].coord}}))}}else for(var E,ce=T(i,function(V,M){var L=V.getTicksCoords();return E=E==null?L.length-1:Math.min(L.length-1,E),T(L,function(_){return a.coordToPoint(_.coord,M)})}),Y=[],p=0;p<=E;p++){for(var w=[],Z=0;Z<i.length;Z++)w.push(ce[Z][p]);if(w[0]&&w.push(w[0].slice()),l){var A=y(d,c,p);d[A].push(new Ae({shape:{points:w}}))}if(h&&Y){var A=y(x,g,p-1);x[A].push(new we({shape:{points:w.concat(Y)}}))}Y=w.slice().reverse()}var fe=u.getLineStyle(),pe=f.getAreaStyle();v(x,function(V,M){this.group.add(re(V,{style:U({stroke:"none",fill:g[M%g.length]},pe),silent:!0}))},this),v(d,function(V,M){this.group.add(re(V,{style:U({fill:"none",stroke:c[M%c.length]},fe),silent:!0}))},this)},e.type="radar",e})(Me),ke=(function(r){j(e,r);function e(t,a,i){var n=r.call(this,t,a,i)||this;return n.type="value",n.angle=0,n.name="",n}return e})(Ie),Ee=(function(){function r(e,t,a){this.dimensions=[],this._model=e,this._indicatorAxes=T(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new ke(o,new ie);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,a)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var a=this._indicatorAxes[t];return this.coordToPoint(a.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var a=this._indicatorAxes[t],i=a.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=Math.sqrt(t*t+a*a);t/=i,a/=i;for(var n=Math.atan2(-a,t),o=1/0,s,u=-1,f=0;f<this._indicatorAxes.length;f++){var l=this._indicatorAxes[f],h=Math.abs(n-l.angle);h<o&&(s=l,u=f,o=h)}return[u,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,t){var a=e.get("center"),i=t.getWidth(),n=t.getHeight(),o=Math.min(i,n)/2;this.cx=G(a[0],i),this.cy=G(a[1],n),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(O(s)||Se(s))&&(s=[0,s]),this.r0=G(s[0],o),this.r=G(s[1],o),v(this._indicatorAxes,function(u,f){u.setExtent(this.r0,this.r);var l=this.startAngle+f*Math.PI*2/this._indicatorAxes.length;l=Math.atan2(Math.sin(l),Math.cos(l)),u.angle=l},this)},r.prototype.update=function(e,t){var a=this._indicatorAxes,i=this._model;v(a,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,u){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var f=s.getData();v(a,function(l){l.scale.unionExtentFromData(f,f.mapDimension(l.dim))})}},this);var n=i.get("splitNumber"),o=new ie;o.setExtent(0,n),o.setInterval(1),v(a,function(s,u){Te(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var a=[];return e.eachComponent("radar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=a[i.get("radarIndex")||0])}),a},r.dimensions=[],r})();function Xe(r){r.registerCoordinateSystem("radar",Ee),r.registerComponentModel(Pe),r.registerComponentView(He),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(a){t.setItemVisual(a,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}var k=v,Ge=H,X=-1,le=(function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=se(e);this.type=a,this.mappingMethod=t,this._normalizeData=Be[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(Q(i),Re(i)):t==="category"?i.categories?Fe(i):Q(i,!0):(_e(t!=="linear"||i.dataExtent),Q(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ne(this._normalizeData,this)},r.listVisualTypes=function(){return ze(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){H(e)?v(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=P(e)?[]:H(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var u=t.call(a,o,s);i?n=u:n[s]=u}),n},r.retrieveVisuals=function(e){var t={},a;return e&&k(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(P(e))e=e.slice();else if(Ge(e)){var t=[];k(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var i,n=1/0,o=0,s=t.length;o<s;o++){var u=t[o].value;if(u!=null){if(u===e||O(u)&&u===e+"")return o;a&&m(u,o)}}for(var o=0,s=t.length;o<s;o++){var f=t[o],l=f.interval,h=f.close;if(l){if(l[0]===-1/0){if(B(h[1],e,l[1]))return o}else if(l[1]===1/0){if(B(h[0],l[0],e))return o}else if(B(h[0],l[0],e)&&B(h[1],e,l[1]))return o;a&&m(l[0],o),a&&m(l[1],o)}}if(a)return e===1/0?t.length-1:e===-1/0?0:i;function m(b,c){var g=Math.abs(b-e);g<n&&(n=g,i=c)}},r.visualHandlers={color:{applyVisual:z("color"),getColorMapper:function(){var e=this.option;return ne(e.mappingMethod==="category"?function(t,a){return!a&&(t=this._normalizeData(t)),C.call(this,t)}:function(t,a,i){var n=!!i;return!a&&(t=this._normalizeData(t)),i=q(t,e.parsedVisual,i),n?i:$(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return $(q(e,this.option.parsedVisual),"rgba")},category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=$(q(e,this.option.parsedVisual),"rgba")),a},fixed:I}},colorHue:F(function(e,t){return K(e,t)}),colorSaturation:F(function(e,t){return K(e,null,t)}),colorLightness:F(function(e,t){return K(e,null,null,t)}),colorAlpha:F(function(e,t){return Ce(e,t)}),decal:{applyVisual:z("decal"),_normalizedToVisual:{linear:null,category:C,piecewise:null,fixed:null}},opacity:{applyVisual:z("opacity"),_normalizedToVisual:J([0,1])},liftZ:{applyVisual:z("liftZ"),_normalizedToVisual:{linear:I,category:I,piecewise:I,fixed:I}},symbol:{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("symbol",i)},_normalizedToVisual:{linear:oe,category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=oe.call(this,e)),a},fixed:I}},symbolSize:{applyVisual:z("symbolSize"),_normalizedToVisual:J([0,1])}},r})();function Re(r){var e=r.pieceList;r.hasSpecialVisual=!1,v(e,function(t,a){t.originIndex=a,t.visual!=null&&(r.hasSpecialVisual=!0)})}function Fe(r){var e=r.categories,t=r.categoryMap={},a=r.visual;if(k(e,function(o,s){t[o]=s}),!P(a)){var i=[];H(a)?k(a,function(o,s){var u=t[s];i[u??X]=o}):i[X]=a,a=ue(r,i)}for(var n=e.length-1;n>=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function Q(r,e){var t=r.visual,a=[];H(t)?k(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),ue(r,a)}function F(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:J([0,1])}}function oe(r){var e=this.option.visual;return e[Math.round(D(r,[0,1],[0,e.length-1],!0))]||{}}function z(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function C(r){var e=this.option.visual;return e[this.option.loop&&r!==X?r%e.length:r]}function I(){return this.option.visual[0]}function J(r){return{linear:function(e){return D(e,r,this.option.visual,!0)},category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=D(e,r,this.option.visual,!0)),a},fixed:I}}function W(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=le.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function ue(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=T(e,function(t){var a=Ne(t);return a||[0,0,0,1]})),e}var Be={linear:function(r){return D(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=le.findPieceIndex(r,e,!0);if(t!=null)return D(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??X},fixed:Le};function B(r,e,t){return r?e<=t:e<t}export{le as V,Xe as i};
@@ -0,0 +1 @@
1
+ import{j as e,B as s,C as r,k as d,l,m as c,n as x}from"./index-CMoFG_fD.js";function o({authType:a,children:t,description:i,methodName:n}){return e.jsxs("div",{className:"space-y-8 pb-12",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(s,{variant:"secondary",children:"Authentication"}),e.jsx(s,{variant:"outline",children:a})]}),e.jsx("h1",{className:"font-heading text-3xl font-semibold tracking-tight",children:n}),e.jsx("p",{className:"max-w-3xl text-muted-foreground",children:i})]}),e.jsxs(r,{className:"max-w-2xl",children:[e.jsxs(d,{children:[e.jsx(l,{children:"Default component"}),e.jsx(c,{children:"Installed Registries add this UI to the dynamic login page automatically."})]}),e.jsx(x,{children:e.jsx("div",{className:"max-w-sm",children:t})})]})]})}export{o as A};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-CMoFG_fD.js";import{A as i}from"./auto-redirect-provider-CeJOAYfx.js";import{i as t}from"./use-wecom-sign-in-Di3WFrU1.js";function n({children:e}){const o=t();return r.jsx(i,{resource:"wecom",action:"checkLogin",enabled:o,query:{isWeComBrowser:o},children:e})}export{n as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C-tdHirk.js","assets/index-CgkdZ6Oc.js","assets/index-NH3aqqQz.css"])))=>i.map(i=>d[i]);
2
- import{a$ as p,b as d,aY as m,aZ as s,b0 as w,j as k,b1 as y,b2 as A}from"./index-CgkdZ6Oc.js";import{i as b}from"./use-dingtalk-sign-in-mrq6K5Yx.js";const T=new Set(["/login","/signin","/register","/forgot-password"]);async function C(l){const u=await A(()=>import("./index-C-tdHirk.js").then(c=>c.i),__vite__mapDeps([0,1,2])),n=u.default??u;return new Promise((c,h)=>{const i=t=>{const a=(t==null?void 0:t.code)??(t==null?void 0:t.authCode);a?c(String(a)):h(new Error("DingTalk did not return an authorization code."))},o=t=>h(new Error((t==null?void 0:t.errorMessage)||(t==null?void 0:t.message)||"Unable to request a DingTalk authorization code.")),f=()=>{var a,e;const t=(e=(a=n==null?void 0:n.runtime)==null?void 0:a.permission)==null?void 0:e.requestAuthCode;if(typeof t=="function"){const r=t({corpId:l,success:i,fail:o});r!=null&&r.then&&r.then(i).catch(o);return}if(typeof(n==null?void 0:n.getAuthCode)=="function"){n.getAuthCode({corpId:l,success:i,fail:o});return}o({message:"DingTalk auth-code API is unavailable."})};try{typeof n.ready=="function"?n.ready(f):f()}catch(t){o(t)}})}function v({children:l}){const{pathname:u,search:n}=p(),c=d.useRef(!1),h=b(),i=m(`${u}${n}`),o=h&&!s.getToken()&&!T.has(u),[f,t]=d.useState(o);return d.useEffect(()=>{if(!o||c.current){t(!1);return}c.current=!0,t(!0);const a=new AbortController;return(async()=>{try{const e=await s.action("dingtalk","checkLogin",{method:"GET",query:{isDingTalkBrowser:!0,redirect:i},signal:a.signal,authenticator:null,includeRole:!1,withAclMeta:!1});if((e==null?void 0:e.success)!==!1)return;if(e.autoLoginType==="oauth"&&e.authUrl){window.location.replace(s.resolveUrl(e.authUrl));return}if(e.autoLoginType!=="internal"||!e.authenticator||!e.corpId)return;const r=await C(e.corpId),g=await s.action("auth","signIn",{method:"POST",authenticator:e.authenticator,body:{authCode:r,loginType:"internal"}});if(!g.token)throw new Error("NocoBase did not return an access token.");s.setAuthenticator(e.authenticator),s.setToken(g.token),s.setRole(null),w(),window.location.replace(i)}catch(e){e instanceof DOMException&&e.name==="AbortError"||console.warn("Unable to complete DingTalk automatic login",e)}finally{t(!1)}})(),()=>a.abort()},[i,o]),f?k.jsx(y,{className:"min-h-svh"}):l}export{v as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-dDkRfkPI.js","assets/index-CMoFG_fD.js","assets/index-BBKV6O5d.css"])))=>i.map(i=>d[i]);
2
+ import{b9 as p,b as d,b6 as m,b7 as s,ba as w,j as k,bb as b,bc as y}from"./index-CMoFG_fD.js";import{i as A}from"./use-dingtalk-sign-in-DsX00uPU.js";const T=new Set(["/login","/signin","/register","/forgot-password"]);async function C(l){const u=await y(()=>import("./index-dDkRfkPI.js").then(c=>c.i),__vite__mapDeps([0,1,2])),n=u.default??u;return new Promise((c,h)=>{const i=t=>{const a=(t==null?void 0:t.code)??(t==null?void 0:t.authCode);a?c(String(a)):h(new Error("DingTalk did not return an authorization code."))},o=t=>h(new Error((t==null?void 0:t.errorMessage)||(t==null?void 0:t.message)||"Unable to request a DingTalk authorization code.")),f=()=>{var a,e;const t=(e=(a=n==null?void 0:n.runtime)==null?void 0:a.permission)==null?void 0:e.requestAuthCode;if(typeof t=="function"){const r=t({corpId:l,success:i,fail:o});r!=null&&r.then&&r.then(i).catch(o);return}if(typeof(n==null?void 0:n.getAuthCode)=="function"){n.getAuthCode({corpId:l,success:i,fail:o});return}o({message:"DingTalk auth-code API is unavailable."})};try{typeof n.ready=="function"?n.ready(f):f()}catch(t){o(t)}})}function v({children:l}){const{pathname:u,search:n}=p(),c=d.useRef(!1),h=A(),i=m(`${u}${n}`),o=h&&!s.getToken()&&!T.has(u),[f,t]=d.useState(o);return d.useEffect(()=>{if(!o||c.current){t(!1);return}c.current=!0,t(!0);const a=new AbortController;return(async()=>{try{const e=await s.action("dingtalk","checkLogin",{method:"GET",query:{isDingTalkBrowser:!0,redirect:i},signal:a.signal,authenticator:null,includeRole:!1,withAclMeta:!1});if((e==null?void 0:e.success)!==!1)return;if(e.autoLoginType==="oauth"&&e.authUrl){window.location.replace(s.resolveUrl(e.authUrl));return}if(e.autoLoginType!=="internal"||!e.authenticator||!e.corpId)return;const r=await C(e.corpId),g=await s.action("auth","signIn",{method:"POST",authenticator:e.authenticator,body:{authCode:r,loginType:"internal"}});if(!g.token)throw new Error("NocoBase did not return an access token.");s.setAuthenticator(e.authenticator),s.setToken(g.token),s.setRole(null),w(),window.location.replace(i)}catch(e){e instanceof DOMException&&e.name==="AbortError"||console.warn("Unable to complete DingTalk automatic login",e)}finally{t(!1)}})(),()=>a.abort()},[i,o]),f?k.jsx(b,{className:"min-h-svh"}):l}export{v as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-CMoFG_fD.js";import{A as t}from"./auto-redirect-provider-CeJOAYfx.js";function c({children:r}){return e.jsx(t,{resource:"oidc",action:"checkRedirect",children:r})}export{c as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-CMoFG_fD.js";import{A as t}from"./auto-redirect-provider-CeJOAYfx.js";function c({children:r}){return e.jsx(t,{resource:"saml",action:"checkRedirect",children:r})}export{c as default};
@@ -0,0 +1 @@
1
+ import{b9 as p,b as s,b6 as A,b7 as o,j as w,bb as x}from"./index-CMoFG_fD.js";const E=new Set(["/login","/signin","/register","/forgot-password"]);function C({resource:r,action:a,enabled:b=!0,query:c,children:d}){const{pathname:i,search:g}=p(),l=s.useRef(!1),u=A(`${i}${g}`),n=b&&!o.getToken()&&!E.has(i),[m,t]=s.useState(n),f=s.useMemo(()=>c,[JSON.stringify(c)]);return s.useEffect(()=>{if(!n||l.current){t(!1);return}l.current=!0,t(!0);const h=new AbortController;return o.action(r,a,{method:"GET",query:{redirect:u,...f},signal:h.signal,authenticator:null,includeRole:!1,withAclMeta:!1}).then(e=>{if((e==null?void 0:e.success)===!1&&e.authUrl){window.location.replace(o.resolveUrl(e.authUrl));return}t(!1)}).catch(e=>{e instanceof DOMException&&e.name==="AbortError"||t(!1)}),()=>h.abort()},[a,u,r,n,f]),m?w.jsx(x,{className:"min-h-svh"}):d}export{C as A};
@@ -0,0 +1 @@
1
+ import{bK as H,bL as Q,bM as nt,bN as be,bO as nn,bP as ce,bQ as he,bR as rt,bS as ot,bT as st,bU as rn,bV as on,bW as sn,bX as an,bY as ln,bZ as fn,b_ as m,b as E,j as re,b$ as dn,c as T,c0 as un,F as cn,c1 as Ke,K as hn}from"./index-CMoFG_fD.js";function at(e,t,r){const n=H(e,r==null?void 0:r.in);if(isNaN(t))return Q(e,NaN);if(!t)return n;const o=n.getDate(),s=Q(e,n.getTime());s.setMonth(n.getMonth()+t+1,0);const a=s.getDate();return o>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),o),n)}function mn(e,t,r){return nt(e,t*7,r)}function yn(e,t,r){return at(e,t*12,r)}function gn(e,t){let r,n=t==null?void 0:t.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=Q.bind(null,o));const s=H(o,n);(!r||r<s||isNaN(+s))&&(r=s)}),Q(n,r||NaN)}function kn(e,t){let r,n=t==null?void 0:t.in;return e.forEach(o=>{!n&&typeof o=="object"&&(n=Q.bind(null,o));const s=H(o,n);(!r||r>s||isNaN(+s))&&(r=s)}),Q(n,r||NaN)}function it(e,t,r){const[n,o]=be(r==null?void 0:r.in,e,t),s=n.getFullYear()-o.getFullYear(),a=n.getMonth()-o.getMonth();return s*12+a}function Dn(e,t){const r=H(e,t==null?void 0:t.in),n=r.getMonth();return r.setFullYear(r.getFullYear(),n+1,0),r.setHours(23,59,59,999),r}function lt(e,t){const[r,n]=be(e,t.start,t.end);return{start:r,end:n}}function Mn(e,t){const{start:r,end:n}=lt(t==null?void 0:t.in,e);let o=+r>+n;const s=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setDate(1);let i=1;const l=[];for(;+a<=s;)l.push(Q(r,a)),a.setMonth(a.getMonth()+i);return o?l.reverse():l}function bn(e,t){const r=H(e,t==null?void 0:t.in);return r.setDate(1),r.setHours(0,0,0,0),r}function vn(e,t){const r=H(e,t==null?void 0:t.in),n=r.getFullYear();return r.setFullYear(n+1,0,0),r.setHours(23,59,59,999),r}function On(e,t){const{start:r,end:n}=lt(t==null?void 0:t.in,e);let o=+r>+n;const s=o?+r:+n,a=o?n:r;a.setHours(0,0,0,0),a.setMonth(0,1);let i=1;const l=[];for(;+a<=s;)l.push(Q(r,a)),a.setFullYear(a.getFullYear()+i);return o?l.reverse():l}function ft(e,t){var i,l,f,d;const r=nn(),n=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(f=r.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,o=H(e,t==null?void 0:t.in),s=o.getDay(),a=(s<n?-7:0)+6-(s-n);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}function wn(e,t){return ft(e,{...t,weekStartsOn:1})}function pn(e,t){const r=H(e,t==null?void 0:t.in),n=r.getFullYear(),o=r.getMonth(),s=Q(r,0);return s.setFullYear(n,o+1,0),s.setHours(0,0,0,0),s.getDate()}function Wn(e,t){return H(e,t==null?void 0:t.in).getMonth()}function Nn(e,t){return H(e,t==null?void 0:t.in).getFullYear()}function Sn(e,t){return+H(e)>+H(t)}function Cn(e,t){return+H(e)<+H(t)}function _n(e,t,r){const[n,o]=be(r==null?void 0:r.in,e,t);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()}function xn(e,t,r){const[n,o]=be(r==null?void 0:r.in,e,t);return n.getFullYear()===o.getFullYear()}function Tn(e,t,r){const n=H(e,r==null?void 0:r.in),o=n.getFullYear(),s=n.getDate(),a=Q(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const i=pn(a);return n.setMonth(t,Math.min(s,i)),n}function Yn(e,t,r){const n=H(e,r==null?void 0:r.in);return isNaN(+n)?Q(e,NaN):(n.setFullYear(t),n)}function En(e,t,r="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:r}).format(t).split(/\s/g).slice(2).join(" ")}const Te={},me={};function oe(e,t){try{const n=(Te[e]||(Te[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in me?me[n]:Ze(n,n.split(":"))}catch{if(e in me)return me[e];const r=e==null?void 0:e.match(Fn);return r?Ze(e,r.slice(1)):NaN}}const Fn=/([+-]\d\d):?(\d\d)?/;function Ze(e,t){const r=+(t[0]||0),n=+(t[1]||0),o=+(t[2]||0)/60;return me[e]=r*60+n>0?r*60+n+o:r*60-n-o}class ee extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(oe(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),dt(this,t)):this.setTime(Date.now())}static tz(t,...r){return r.length?new ee(...r,t):new ee(Date.now(),t)}withTimeZone(t){return new ee(+this,t)}getTimezoneOffset(){const t=-oe(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Me(this),+this}[Symbol.for("constructDateFrom")](t){return new ee(+new Date(t),this.timeZone)}}const Ve=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ve.test(e))return;const t=e.replace(Ve,"$1UTC");ee.prototype[t]&&(e.startsWith("get")?ee.prototype[e]=function(){return this.internal[t]()}:(ee.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),In(this),+this},ee.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Me(this),+this}))});function Me(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-oe(e.timeZone,e)*60))}function In(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),dt(e)}function dt(e,t){const r=Array.isArray(t)?Bn(t):+e.internal,n=oe(e.timeZone,e),o=n>0?Math.floor(n):Math.ceil(n),s=new Date(+e);s.setUTCHours(s.getUTCHours()-1);const a=-new Date(+e).getTimezoneOffset(),i=-new Date(+s).getTimezoneOffset(),l=a-i;let f=a;if(l&&a!==o){const I=Date.prototype.getHours.apply(e),F=Array.isArray(t)?t[3]||0:e.internal.getUTCHours();if(I!==F){const z=new Date(+e),U=a-o;U&&z.setUTCMinutes(z.getUTCMinutes()+U);const j=oe(e.timeZone,z);(j>0?Math.floor(j):Math.ceil(j))===o&&(f=i)}}const d=f-o;d&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const c=new Date(+e);c.setUTCSeconds(0);const y=a>0?c.getSeconds():(c.getSeconds()-60)%60,g=Math.round(-(oe(e.timeZone,e)*60))%60;(g||y)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+g+y);const O=oe(e.timeZone,e),W=O>0?Math.floor(O):Math.ceil(O),C=-new Date(+e).getTimezoneOffset()-W,M=W!==o,k=C-d,S=W-o,D=r-W*60*1e3,u=S>0&&Je(e)-r===S*60*1e3&&Je(e,D)!==r;if(M&&k&&!u){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+k);const I=oe(e.timeZone,e),F=I>0?Math.floor(I):Math.ceil(I),z=W-F;z&&k<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+z)}Me(e);const Y=(t?r:r+g*1e3)-+e.internal;Y&&Math.abs(Y)<1800*1e3&&(Date.prototype.setTime.call(e,+e+Y),Me(e))}function Bn(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function Je(e,t){const r=new Date(t??+e);return r.setUTCSeconds(r.getUTCSeconds()-Math.round(-oe(e.timeZone,r)*60)),+r}class A extends ee{static tz(t,...r){return r.length?new A(...r,t):new A(Date.now(),t)}toISOString(){const[t,r,n]=this.tzComponents(),o=`${t}${r}:${n}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,r,n,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${n} ${r} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[r,n,o]=this.tzComponents();return`${t} GMT${r}${n}${o} (${En(this.timeZone,this)})`}toLocaleString(t,r){return Date.prototype.toLocaleString.call(this,t,{...r,timeZone:(r==null?void 0:r.timeZone)||this.timeZone})}toLocaleDateString(t,r){return Date.prototype.toLocaleDateString.call(this,t,{...r,timeZone:(r==null?void 0:r.timeZone)||this.timeZone})}toLocaleTimeString(t,r){return Date.prototype.toLocaleTimeString.call(this,t,{...r,timeZone:(r==null?void 0:r.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),r=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[r,n,o]}withTimeZone(t){return new A(+this,t)}[Symbol.for("constructDateFrom")](t){return new A(+new Date(t),this.timeZone)}}const Qe=5,Pn=4;function zn(e,t){const r=t.startOfMonth(e),n=r.getDay()>0?r.getDay():7,o=t.addDays(e,-n+1),s=t.addDays(o,Qe*7-1);return t.getMonth(e)===t.getMonth(s)?Qe:Pn}function ut(e,t){const r=t.startOfMonth(e),n=r.getDay();return n===1?r:n===0?t.addDays(r,-6):t.addDays(r,-1*(n-1))}function An(e,t){const r=ut(e,t),n=zn(e,t);return t.addDays(r,n*7-1)}const ct={...ce,labels:{labelDayButton:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,i)=>he(a,i,{locale:ce,...r});let s=o(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>he(o,s,{locale:ce,...t}),n(e,"LLLL yyyy")},labelGridcell:(e,t,r,n)=>{let o;n&&typeof n.format=="function"?o=n.format.bind(n):o=(a,i)=>he(a,i,{locale:ce,...r});let s=o(e,"PPPP");return t!=null&&t.today&&(s=`Today, ${s}`),s},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,r)=>{let n;return r&&typeof r.format=="function"?n=r.format.bind(r):n=(o,s)=>he(o,s,{locale:ce,...t}),n(e,"cccc")}}};class R{constructor(t,r){this.today=()=>{var o;if((o=this.overrides)!=null&&o.today)return this.overrides.today();if(this.options.timeZone)return A.tz(this.options.timeZone);const n=this.options.Date??Date;return new n},this.newDate=(n,o,s)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(n,o,s):this.options.timeZone?new A(n,o,s,this.options.timeZone):new Date(n,o,s)},this.addDays=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,o):nt(n,o)},this.addMonths=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,o):at(n,o)},this.addWeeks=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,o):mn(n,o)},this.addYears=(n,o)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,o):yn(n,o)},this.differenceInCalendarDays=(n,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,o):rt(n,o)},this.differenceInCalendarMonths=(n,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,o):it(n,o)},this.eachMonthOfInterval=n=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):Mn(n)},this.eachYearOfInterval=n=>{var i;const o=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(n):On(n),s=new Set(o.map(l=>this.getYear(l)));if(s.size===o.length)return o;const a=[];return s.forEach(l=>{a.push(new Date(l,0,1))}),a},this.endOfBroadcastWeek=n=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):An(n,this)},this.endOfISOWeek=n=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(n):wn(n)},this.endOfMonth=n=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(n):Dn(n)},this.endOfWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,o):ft(n,this.options)},this.endOfYear=n=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(n):vn(n)},this.format=(n,o,s)=>{var i;const a=(i=this.overrides)!=null&&i.format?this.overrides.format(n,o,this.options):he(n,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=n=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(n):ot(n)},this.getMonth=(n,o)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):Wn(n,this.options)},this.getYear=(n,o)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):Nn(n,this.options)},this.getWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):st(n,this.options)},this.isAfter=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,o):Sn(n,o)},this.isBefore=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,o):Cn(n,o)},this.isDate=n=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(n):rn(n)},this.isSameDay=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,o):on(n,o)},this.isSameMonth=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,o):_n(n,o)},this.isSameYear=(n,o)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,o):xn(n,o)},this.max=n=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(n):gn(n)},this.min=n=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(n):kn(n)},this.setMonth=(n,o)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,o):Tn(n,o)},this.setYear=(n,o)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,o):Yn(n,o)},this.startOfBroadcastWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):ut(n,this)},this.startOfDay=n=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(n):sn(n)},this.startOfISOWeek=n=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(n):an(n)},this.startOfMonth=n=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(n):bn(n)},this.startOfWeek=(n,o)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):ln(n,this.options)},this.startOfYear=n=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(n):fn(n)},this.options={locale:ct,...t},this.overrides=r}getDigitMap(){const{numerals:t="latn"}=this.options,r=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let o=0;o<10;o++)n[o.toString()]=r.format(o);return n}replaceDigits(t){const r=this.getDigitMap();return t.replace(/\d/g,n=>r[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var r;const t=(r=this.options.locale)==null?void 0:r.code;return t&&R.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:r,timeZone:n,numerals:o}=this.options,s=r==null?void 0:r.code;if(s&&R.yearFirstLocales.has(s))try{return new Intl.DateTimeFormat(s,{month:"long",year:"numeric",timeZone:n,numberingSystem:o}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}R.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const te=new R;class ht{constructor(t,r,n=te){this.date=t,this.displayMonth=r,this.outside=!!(r&&!n.isSameMonth(t,r)),this.dateLib=n,this.isoDate=n.format(t,"yyyy-MM-dd"),this.displayMonthId=n.format(r,"yyyy-MM"),this.dateMonthId=n.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Hn{constructor(t,r){this.date=t,this.weeks=r}}class jn{constructor(t,r){this.days=r,this.weekNumber=t}}function $n(e){return m.createElement("span",{...e})}function qn(e){const{size:t=24,orientation:r="left",className:n,style:o}=e;return m.createElement("svg",{className:n,style:o,width:t,height:t,viewBox:"0 0 24 24"},r==="up"&&m.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),r==="down"&&m.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),r==="left"&&m.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),r==="right"&&m.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Rn(e){const{day:t,modifiers:r,...n}=e;return m.createElement("td",{...n})}function Gn(e){const{day:t,modifiers:r,...n}=e,o=m.useRef(null);return m.useEffect(()=>{var s;r.focused&&((s=o.current)==null||s.focus())},[r.focused]),m.createElement("button",{ref:o,...n})}var h;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(h||(h={}));var B;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(B||(B={}));var J;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(J||(J={}));var q;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(q||(q={}));const mt=E.createContext(void 0);function ve(){const e=E.useContext(mt);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Un(e){const{options:t,className:r,...n}=e,{classNames:o,components:s,styles:a}=ve(),i=[o[h.Dropdown],r].join(" "),l=t==null?void 0:t.find(({value:f})=>f===n.value);return m.createElement("span",{"data-disabled":n.disabled,className:o[h.DropdownRoot],style:a==null?void 0:a[h.DropdownRoot]},m.createElement(s.Select,{className:i,...n},t==null?void 0:t.map(({value:f,label:d,disabled:c})=>m.createElement(s.Option,{key:f,value:f,disabled:c},d))),m.createElement("span",{className:o[h.CaptionLabel],style:a==null?void 0:a[h.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,m.createElement(s.Chevron,{orientation:"down",size:18,className:o[h.Chevron],style:a==null?void 0:a[h.Chevron]})))}function Kn(e){return m.createElement("div",{...e})}function Zn(e){return m.createElement("div",{...e})}function Vn(e){const{calendarMonth:t,displayIndex:r,...n}=e;return m.createElement("div",{...n},e.children)}function Jn(e){const{calendarMonth:t,displayIndex:r,...n}=e;return m.createElement("div",{...n})}function Qn(e){return m.createElement("table",{...e})}function Xn(e){return m.createElement("div",{...e})}function Ln(e){const{components:t}=ve();return m.createElement(t.Dropdown,{...e})}function er(e){const{onPreviousClick:t,onNextClick:r,previousMonth:n,nextMonth:o,...s}=e,{components:a,classNames:i,styles:l,labels:{labelPrevious:f,labelNext:d}}=ve(),c=E.useCallback(g=>{o&&(r==null||r(g))},[o,r]),y=E.useCallback(g=>{n&&(t==null||t(g))},[n,t]);return m.createElement("nav",{...s},m.createElement(a.PreviousMonthButton,{type:"button",className:i[h.PreviousMonthButton],style:l==null?void 0:l[h.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":f(n),onClick:y},m.createElement(a.Chevron,{disabled:n?void 0:!0,className:i[h.Chevron],style:l==null?void 0:l[h.Chevron],orientation:"left"})),m.createElement(a.NextMonthButton,{type:"button",className:i[h.NextMonthButton],style:l==null?void 0:l[h.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:c},m.createElement(a.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[h.Chevron],style:l==null?void 0:l[h.Chevron]})))}function tr(e){return m.createElement("button",{...e})}function nr(e){return m.createElement("option",{...e})}function rr(e){return m.createElement("button",{...e})}function or(e){const{rootRef:t,...r}=e;return m.createElement("div",{...r,ref:t})}function sr(e){return m.createElement("select",{...e})}function ar(e){const{week:t,...r}=e;return m.createElement("tr",{...r})}function ir(e){return m.createElement("th",{...e})}function lr(e){return m.createElement("thead",{"aria-hidden":!0},m.createElement("tr",{...e}))}function fr(e){const{week:t,...r}=e;return m.createElement("th",{...r})}function dr(e){return m.createElement("th",{...e})}function ur(e){return m.createElement("tbody",{...e})}function cr(e){const{components:t}=ve();return m.createElement(t.Dropdown,{...e})}const hr=Object.freeze(Object.defineProperty({__proto__:null,CaptionLabel:$n,Chevron:qn,Day:Rn,DayButton:Gn,Dropdown:Un,DropdownNav:Kn,Footer:Zn,Month:Vn,MonthCaption:Jn,MonthGrid:Qn,Months:Xn,MonthsDropdown:Ln,Nav:er,NextMonthButton:tr,Option:nr,PreviousMonthButton:rr,Root:or,Select:sr,Week:ar,WeekNumber:fr,WeekNumberHeader:dr,Weekday:ir,Weekdays:lr,Weeks:ur,YearsDropdown:cr},Symbol.toStringTag,{value:"Module"}));function se(e,t,r=!1,n=te){let{from:o,to:s}=e;const{differenceInCalendarDays:a,isSameDay:i}=n;return o&&s?(a(s,o)<0&&([o,s]=[s,o]),a(t,o)>=(r?1:0)&&a(s,t)>=(r?1:0)):!r&&s?i(s,t):!r&&o?i(o,t):!1}function Be(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Oe(e){return!!(e&&typeof e=="object"&&"from"in e)}function Pe(e){return!!(e&&typeof e=="object"&&"after"in e)}function ze(e){return!!(e&&typeof e=="object"&&"before"in e)}function yt(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function gt(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ae(e,t,r=te){const n=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:a}=r;return n.some(i=>{if(typeof i=="boolean")return i;if(r.isDate(i))return o(e,i);if(gt(i,r))return i.some(l=>o(e,l));if(Oe(i))return se(i,e,!1,r);if(yt(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Be(i)){const l=s(i.before,e),f=s(i.after,e),d=l>0,c=f<0;return a(i.before,i.after)?c&&d:d||c}return Pe(i)?s(e,i.after)>0:ze(i)?s(i.before,e)>0:typeof i=="function"?i(e):!1})}function mr(e,t,r,n,o){const{disabled:s,hidden:a,modifiers:i,showOutsideDays:l,broadcastCalendar:f,today:d=o.today()}=t,{isSameDay:c,isSameMonth:y,startOfMonth:g,isBefore:O,endOfMonth:W,isAfter:w}=o,C=r&&g(r),M=n&&W(n),k={[B.focused]:[],[B.outside]:[],[B.disabled]:[],[B.hidden]:[],[B.today]:[]},S={};for(const D of e){const{date:u,displayMonth:p}=D,Y=!!(p&&!y(u,p)),I=!!(C&&O(u,C)),F=!!(M&&w(u,M)),z=!!(s&&ae(u,s,o)),U=!!(a&&ae(u,a,o))||I||F||!f&&!l&&Y||f&&l===!1&&Y,j=c(u,d);Y&&k.outside.push(D),z&&k.disabled.push(D),U&&k.hidden.push(D),j&&k.today.push(D),i&&Object.keys(i).forEach($=>{const ie=i==null?void 0:i[$];ie&&ae(u,ie,o)&&(S[$]?S[$].push(D):S[$]=[D])})}return D=>{const u={[B.focused]:!1,[B.disabled]:!1,[B.hidden]:!1,[B.outside]:!1,[B.today]:!1},p={};for(const Y in k){const I=k[Y];u[Y]=I.some(F=>F===D)}for(const Y in S)p[Y]=S[Y].some(I=>I===D);return{...u,...p}}}function yr(e,t,r={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(r[s]?o.push(r[s]):t[B[s]]?o.push(t[B[s]]):t[J[s]]&&o.push(t[J[s]]),o),[t[h.Day]])}function gr(e){return{...hr,...e}}function kr(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([r,n])=>{r.startsWith("data-")&&(t[r]=n)}),t}function Ae(){const e={};for(const t in h)e[h[t]]=`rdp-${h[t]}`;for(const t in B)e[B[t]]=`rdp-${B[t]}`;for(const t in J)e[J[t]]=`rdp-${J[t]}`;for(const t in q)e[q[t]]=`rdp-${q[t]}`;return e}function Dr(e,t,r){return(r??new R(t)).formatMonthYear(e)}function Mr(e,t,r){return(r??new R(t)).format(e,"d")}function br(e,t=te){return t.format(e,"LLLL")}function vr(e,t,r){return(r??new R(t)).format(e,"cccccc")}function Or(e,t=te){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function wr(){return""}function pr(e,t=te){return t.format(e,"yyyy")}const Wr=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Dr,formatDay:Mr,formatMonthDropdown:br,formatWeekNumber:Or,formatWeekNumberHeader:wr,formatWeekdayName:vr,formatYearDropdown:pr},Symbol.toStringTag,{value:"Module"}));function Nr(e){return{...Wr,...e}}function kt(e,t,r,n){let o=(n??new R(r)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}function Dt(e,t,r){return(r??new R(t)).formatMonthYear(e)}function Mt(e,t,r,n){let o=(n??new R(r)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function bt(e){return"Choose the Month"}function vt(){return""}const Sr="Go to the Next Month";function Ot(e,t){return Sr}function wt(e){return"Go to the Previous Month"}function pt(e,t,r){return(r??new R(t)).format(e,"cccc")}function Wt(e,t){return`Week ${e}`}function Nt(e){return"Week Number"}function St(e){return"Choose the Year"}const Cr=Object.freeze(Object.defineProperty({__proto__:null,labelDayButton:kt,labelGrid:Dt,labelGridcell:Mt,labelMonthDropdown:bt,labelNav:vt,labelNext:Ot,labelPrevious:wt,labelWeekNumber:Wt,labelWeekNumberHeader:Nt,labelWeekday:pt,labelYearDropdown:St},Symbol.toStringTag,{value:"Module"})),V=(e,t,r)=>t||(r?typeof r=="function"?r:(...n)=>r:e);function _r(e,t){var n;const r=((n=t.locale)==null?void 0:n.labels)??{};return{...Cr,...e??{},labelDayButton:V(kt,e==null?void 0:e.labelDayButton,r.labelDayButton),labelMonthDropdown:V(bt,e==null?void 0:e.labelMonthDropdown,r.labelMonthDropdown),labelNext:V(Ot,e==null?void 0:e.labelNext,r.labelNext),labelPrevious:V(wt,e==null?void 0:e.labelPrevious,r.labelPrevious),labelWeekNumber:V(Wt,e==null?void 0:e.labelWeekNumber,r.labelWeekNumber),labelYearDropdown:V(St,e==null?void 0:e.labelYearDropdown,r.labelYearDropdown),labelGrid:V(Dt,e==null?void 0:e.labelGrid,r.labelGrid),labelGridcell:V(Mt,e==null?void 0:e.labelGridcell,r.labelGridcell),labelNav:V(vt,e==null?void 0:e.labelNav,r.labelNav),labelWeekNumberHeader:V(Nt,e==null?void 0:e.labelWeekNumberHeader,r.labelWeekNumberHeader),labelWeekday:V(pt,e==null?void 0:e.labelWeekday,r.labelWeekday)}}function xr(e,t,r,n,o){const{startOfMonth:s,startOfYear:a,endOfYear:i,eachMonthOfInterval:l,getMonth:f}=o;return l({start:a(e),end:i(e)}).map(y=>{const g=n.formatMonthDropdown(y,o),O=f(y),W=t&&y<s(t)||r&&y>s(r)||!1;return{value:O,label:g,disabled:W}})}function Tr(e,t={},r={}){let n={...t==null?void 0:t[h.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{n={...n,...r==null?void 0:r[o]}}),n}function Yr(e,t,r,n){const o=n??e.today(),s=r?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),a=[];for(let i=0;i<7;i++){const l=e.addDays(s,i);a.push(l)}return a}function Er(e,t,r,n,o=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,eachYearOfInterval:i,getYear:l}=n,f=s(e),d=a(t),c=i({start:f,end:d});return o&&c.reverse(),c.map(y=>{const g=r.formatYearDropdown(y,n);return{value:l(y),label:g,disabled:!1}})}function Fr(e,t={}){var i;const{weekStartsOn:r,locale:n}=t,o=r??((i=n==null?void 0:n.options)==null?void 0:i.weekStartsOn)??0,s=l=>{const f=typeof l=="number"||typeof l=="string"?new Date(l):l;return new A(f.getFullYear(),f.getMonth(),f.getDate(),12,0,0,e)},a=l=>{const f=s(l);return new Date(f.getFullYear(),f.getMonth(),f.getDate(),0,0,0,0)};return{today:()=>s(A.tz(e)),newDate:(l,f,d)=>new A(l,f,d,12,0,0,e),startOfDay:l=>s(l),startOfWeek:(l,f)=>{const d=s(l),c=(f==null?void 0:f.weekStartsOn)??o,y=(d.getDay()-c+7)%7;return d.setDate(d.getDate()-y),d},startOfISOWeek:l=>{const f=s(l),d=(f.getDay()-1+7)%7;return f.setDate(f.getDate()-d),f},startOfMonth:l=>{const f=s(l);return f.setDate(1),f},startOfYear:l=>{const f=s(l);return f.setMonth(0,1),f},endOfWeek:(l,f)=>{const d=s(l),g=((((f==null?void 0:f.weekStartsOn)??o)+6)%7-d.getDay()+7)%7;return d.setDate(d.getDate()+g),d},endOfISOWeek:l=>{const f=s(l),d=(7-f.getDay())%7;return f.setDate(f.getDate()+d),f},endOfMonth:l=>{const f=s(l);return f.setMonth(f.getMonth()+1,0),f},endOfYear:l=>{const f=s(l);return f.setMonth(11,31),f},eachMonthOfInterval:l=>{const f=s(l.start),d=s(l.end),c=[],y=new A(f.getFullYear(),f.getMonth(),1,12,0,0,e),g=d.getFullYear()*12+d.getMonth();for(;y.getFullYear()*12+y.getMonth()<=g;)c.push(new A(y,e)),y.setMonth(y.getMonth()+1,1);return c},addDays:(l,f)=>{const d=s(l);return d.setDate(d.getDate()+f),d},addWeeks:(l,f)=>{const d=s(l);return d.setDate(d.getDate()+f*7),d},addMonths:(l,f)=>{const d=s(l);return d.setMonth(d.getMonth()+f),d},addYears:(l,f)=>{const d=s(l);return d.setFullYear(d.getFullYear()+f),d},eachYearOfInterval:l=>{const f=s(l.start),d=s(l.end),c=[],y=new A(f.getFullYear(),0,1,12,0,0,e);for(;y.getFullYear()<=d.getFullYear();)c.push(new A(y,e)),y.setFullYear(y.getFullYear()+1,0,1);return c},getWeek:(l,f)=>{var c;const d=a(l);return st(d,{weekStartsOn:(f==null?void 0:f.weekStartsOn)??o,firstWeekContainsDate:(f==null?void 0:f.firstWeekContainsDate)??((c=n==null?void 0:n.options)==null?void 0:c.firstWeekContainsDate)??1})},getISOWeek:l=>{const f=a(l);return ot(f)},differenceInCalendarDays:(l,f)=>{const d=a(l),c=a(f);return rt(d,c)},differenceInCalendarMonths:(l,f)=>{const d=a(l),c=a(f);return it(d,c)}}}const ye=e=>e instanceof HTMLElement?e:null,Ye=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Ir=e=>ye(e.querySelector("[data-animated-month]")),Ee=e=>ye(e.querySelector("[data-animated-caption]")),Fe=e=>ye(e.querySelector("[data-animated-weeks]")),Br=e=>ye(e.querySelector("[data-animated-nav]")),Pr=e=>ye(e.querySelector("[data-animated-weekdays]"));function zr(e,t,{classNames:r,months:n,focused:o,dateLib:s}){const a=E.useRef(null),i=E.useRef(n),l=E.useRef(!1);E.useLayoutEffect(()=>{const f=i.current;if(i.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||f.length===0||n.length!==f.length)return;const d=s.isSameMonth(n[0].date,f[0].date),c=s.isAfter(n[0].date,f[0].date),y=c?r[q.caption_after_enter]:r[q.caption_before_enter],g=c?r[q.weeks_after_enter]:r[q.weeks_before_enter],O=a.current,W=e.current.cloneNode(!0);if(W instanceof HTMLElement?(Ye(W).forEach(k=>{if(!(k instanceof HTMLElement))return;const S=Ir(k);S&&k.contains(S)&&k.removeChild(S);const D=Ee(k);D&&D.classList.remove(y);const u=Fe(k);u&&u.classList.remove(g)}),a.current=W):a.current=null,l.current||d||o)return;const w=O instanceof HTMLElement?Ye(O):[],C=Ye(e.current);if(C!=null&&C.every(M=>M instanceof HTMLElement)&&(w!=null&&w.every(M=>M instanceof HTMLElement))){l.current=!0,e.current.style.isolation="isolate";const M=Br(e.current);M&&(M.style.zIndex="1"),C.forEach((k,S)=>{const D=w[S];if(!D)return;k.style.position="relative",k.style.overflow="hidden";const u=Ee(k);u&&u.classList.add(y);const p=Fe(k);p&&p.classList.add(g);const Y=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),M&&(M.style.zIndex=""),u&&u.classList.remove(y),p&&p.classList.remove(g),k.style.position="",k.style.overflow="",k.contains(D)&&k.removeChild(D)};D.style.pointerEvents="none",D.style.position="absolute",D.style.overflow="hidden",D.setAttribute("aria-hidden","true");const I=Pr(D);I&&(I.style.opacity="0");const F=Ee(D);F&&(F.classList.add(c?r[q.caption_before_exit]:r[q.caption_after_exit]),F.addEventListener("animationend",Y));const z=Fe(D);z&&z.classList.add(c?r[q.weeks_before_exit]:r[q.weeks_after_exit]),k.insertBefore(D,k.firstChild)})}})}function Ar(e,t,r,n){const o=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:i,broadcastCalendar:l}=r??{},{addDays:f,differenceInCalendarDays:d,differenceInCalendarMonths:c,endOfBroadcastWeek:y,endOfISOWeek:g,endOfMonth:O,endOfWeek:W,isAfter:w,startOfBroadcastWeek:C,startOfISOWeek:M,startOfWeek:k}=n,S=l?C(o,n):a?M(o):k(o),D=l?y(s):a?g(O(s)):W(O(s)),u=t&&(l?y(t):a?g(t):W(t)),p=u&&w(D,u)?u:D,Y=d(p,S),I=c(s,o)+1,F=[];for(let j=0;j<=Y;j++){const $=f(S,j);F.push($)}const U=(l?35:42)*I;if(i&&F.length<U){const j=U-F.length;for(let $=0;$<j;$++){const ie=f(F[F.length-1],1);F.push(ie)}}return F}function Hr(e){const t=[];return e.reduce((r,n)=>{const o=n.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return r.concat(o.slice())},t.slice())}function jr(e,t,r,n){const{numberOfMonths:o=1}=r,s=[];for(let a=0;a<o;a++){const i=n.addMonths(e,a);if(t&&i>t)break;s.push(i)}return s}function Xe(e,t,r,n){const{month:o,defaultMonth:s,today:a=n.today(),numberOfMonths:i=1}=e;let l=o||s||a;const{differenceInCalendarMonths:f,addMonths:d,startOfMonth:c}=n;if(r&&f(r,l)<i-1){const y=-1*(i-1);l=d(r,y)}return t&&f(l,t)<0&&(l=t),c(l)}function $r(e,t,r,n){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:i,endOfWeek:l,getISOWeek:f,getWeek:d,startOfBroadcastWeek:c,startOfISOWeek:y,startOfWeek:g}=n,O=e.reduce((W,w)=>{const C=r.broadcastCalendar?c(w,n):r.ISOWeek?y(w):g(w),M=r.broadcastCalendar?s(w):r.ISOWeek?a(i(w)):l(i(w)),k=t.filter(p=>p>=C&&p<=M),S=r.broadcastCalendar?35:42;if(r.fixedWeeks&&k.length<S){const p=t.filter(Y=>{const I=S-k.length;return Y>M&&Y<=o(M,I)});k.push(...p)}const D=k.reduce((p,Y)=>{const I=r.ISOWeek?f(Y):d(Y),F=p.find(U=>U.weekNumber===I),z=new ht(Y,w,n);return F?F.days.push(z):p.push(new jn(I,[z])),p},[]),u=new Hn(w,D);return W.push(u),W},[]);return r.reverseMonths?O.reverse():O}function qr(e,t){let{startMonth:r,endMonth:n}=e;const{startOfYear:o,startOfDay:s,startOfMonth:a,endOfMonth:i,addYears:l,endOfYear:f,today:d}=t,c=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return r?r=a(r):!r&&c&&(r=o(l(e.today??d(),-100))),n?n=i(n):!n&&c&&(n=f(e.today??d())),[r&&s(r),n&&s(n)]}function Rr(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=r,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:l}=n,f=o?s:1,d=a(e);if(!t)return i(d,f);if(!(l(t,e)<s))return i(d,f)}function Gr(e,t,r,n){if(r.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=r,{startOfMonth:a,addMonths:i,differenceInCalendarMonths:l}=n,f=o?s??1:1,d=a(e);if(!t)return i(d,-f);if(!(l(d,t)<=0))return i(d,-f)}function Ur(e){const t=[];return e.reduce((r,n)=>r.concat(n.weeks.slice()),t.slice())}function we(e,t){const[r,n]=E.useState(e);return[t===void 0?r:t,n]}function Kr(e,t){var S;const[r,n]=qr(e,t),{startOfMonth:o,endOfMonth:s}=t,a=Xe(e,r,n,t),[i,l]=we(a,e.month?a:void 0);E.useEffect(()=>{const D=Xe(e,r,n,t);l(D)},[e.timeZone]);const{months:f,weeks:d,days:c,previousMonth:y,nextMonth:g}=E.useMemo(()=>{const D=jr(i,n,{numberOfMonths:e.numberOfMonths},t),u=Ar(D,e.endMonth?s(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),p=$r(D,u,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),Y=Ur(p),I=Hr(p),F=Gr(i,r,e,t),z=Rr(i,n,e,t);return{months:p,weeks:Y,days:I,previousMonth:F,nextMonth:z}},[t,i.getTime(),n==null?void 0:n.getTime(),r==null?void 0:r.getTime(),e.disableNavigation,e.broadcastCalendar,(S=e.endMonth)==null?void 0:S.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:O,onMonthChange:W}=e,w=D=>d.some(u=>u.days.some(p=>p.isEqualTo(D))),C=D=>{if(O)return;let u=o(D);r&&u<o(r)&&(u=o(r)),n&&u>o(n)&&(u=o(n)),l(u),W==null||W(u)};return{months:f,weeks:d,days:c,navStart:r,navEnd:n,previousMonth:y,nextMonth:g,goToMonth:C,goToDay:D=>{w(D)||C(D.date)}}}var L;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(L||(L={}));function Le(e){return!e[B.disabled]&&!e[B.hidden]&&!e[B.outside]}function Zr(e,t,r,n){let o,s=-1;for(const a of e){const i=t(a);Le(i)&&(i[B.focused]&&s<L.FocusedModifier?(o=a,s=L.FocusedModifier):n!=null&&n.isEqualTo(a)&&s<L.LastFocused?(o=a,s=L.LastFocused):r(a.date)&&s<L.Selected?(o=a,s=L.Selected):i[B.today]&&s<L.Today&&(o=a,s=L.Today))}return o||(o=e.find(a=>Le(t(a)))),o}function Vr(e,t,r,n,o,s,a){const{ISOWeek:i,broadcastCalendar:l}=s,{addDays:f,addMonths:d,addWeeks:c,addYears:y,endOfBroadcastWeek:g,endOfISOWeek:O,endOfWeek:W,max:w,min:C,startOfBroadcastWeek:M,startOfISOWeek:k,startOfWeek:S}=a;let u={day:f,week:c,month:d,year:y,startOfWeek:p=>l?M(p,a):i?k(p):S(p),endOfWeek:p=>l?g(p):i?O(p):W(p)}[e](r,t==="after"?1:-1);return t==="before"&&n?u=w([n,u]):t==="after"&&o&&(u=C([o,u])),u}function Ct(e,t,r,n,o,s,a,i=0){if(i>365)return;const l=Vr(e,t,r.date,n,o,s,a),f=!!(s.disabled&&ae(l,s.disabled,a)),d=!!(s.hidden&&ae(l,s.hidden,a)),c=l,y=new ht(l,c,a);return!f&&!d?y:Ct(e,t,y,n,o,s,a,i+1)}function Jr(e,t,r,n,o){const{autoFocus:s}=e,[a,i]=E.useState(),l=Zr(t.days,r,n||(()=>!1),a),[f,d]=E.useState(s?l:void 0);return{isFocusTarget:W=>!!(l!=null&&l.isEqualTo(W)),setFocused:d,focused:f,blur:()=>{i(f),d(void 0)},moveFocus:(W,w)=>{if(!f)return;const C=Ct(W,w,f,t.navStart,t.navEnd,e,o);C&&(e.disableNavigation&&!t.days.some(k=>k.isEqualTo(C))||(t.goToDay(C),d(C)))}}}function Qr(e,t){const{selected:r,required:n,onSelect:o}=e,[s,a]=we(r,o?r:void 0),i=o?r:s,{isSameDay:l}=t,f=g=>(i==null?void 0:i.some(O=>l(O,g)))??!1,{min:d,max:c}=e;return{selected:i,select:(g,O,W)=>{let w=[...i??[]];if(f(g)){if((i==null?void 0:i.length)===d||n&&(i==null?void 0:i.length)===1)return;w=i==null?void 0:i.filter(C=>!l(C,g))}else(i==null?void 0:i.length)===c?w=[g]:w=[...w,g];return o||a(w),o==null||o(w,g,O,W),w},isSelected:f}}function Xr(e,t,r=0,n=0,o=!1,s=te){const{from:a,to:i}=t||{},{isSameDay:l,isAfter:f,isBefore:d}=s;let c;if(!a&&!i)c={from:e,to:r>0?void 0:e};else if(a&&!i)l(a,e)?r===0?c={from:a,to:e}:o?c={from:a,to:void 0}:c=void 0:d(e,a)?c={from:e,to:a}:c={from:a,to:e};else if(a&&i)if(l(a,e)&&l(i,e))o?c={from:a,to:i}:c=void 0;else if(l(a,e))c={from:a,to:r>0?void 0:e};else if(l(i,e))c={from:e,to:r>0?void 0:e};else if(d(e,a))c={from:e,to:i};else if(f(e,a))c={from:a,to:e};else if(f(e,i))c={from:a,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const y=s.differenceInCalendarDays(c.to,c.from);n>0&&y>n?c={from:e,to:void 0}:r>1&&y<r&&(c={from:e,to:void 0})}return c}function Lr(e,t,r=te){const n=Array.isArray(t)?t:[t];let o=e.from;const s=r.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let i=0;i<=a;i++){if(n.includes(o.getDay()))return!0;o=r.addDays(o,1)}return!1}function et(e,t,r=te){return se(e,t.from,!1,r)||se(e,t.to,!1,r)||se(t,e.from,!1,r)||se(t,e.to,!1,r)}function eo(e,t,r=te){const n=Array.isArray(t)?t:[t];if(n.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:r.isDate(i)?se(e,i,!1,r):gt(i,r)?i.some(l=>se(e,l,!1,r)):Oe(i)?i.from&&i.to?et(e,{from:i.from,to:i.to},r):!1:yt(i)?Lr(e,i.dayOfWeek,r):Be(i)?r.isAfter(i.before,i.after)?et(e,{from:r.addDays(i.after,1),to:r.addDays(i.before,-1)},r):ae(e.from,i,r)||ae(e.to,i,r):Pe(i)||ze(i)?ae(e.from,i,r)||ae(e.to,i,r):!1))return!0;const a=n.filter(i=>typeof i=="function");if(a.length){let i=e.from;const l=r.differenceInCalendarDays(e.to,e.from);for(let f=0;f<=l;f++){if(a.some(d=>d(i)))return!0;i=r.addDays(i,1)}}return!1}function to(e,t){const{disabled:r,excludeDisabled:n,resetOnSelect:o,selected:s,required:a,onSelect:i}=e,[l,f]=we(s,i?s:void 0),d=i?s:l;return{selected:d,select:(g,O,W)=>{const{min:w,max:C}=e;let M;if(g){const k=d==null?void 0:d.from,S=d==null?void 0:d.to,D=!!k&&!!S,u=!!k&&!!S&&t.isSameDay(k,S)&&t.isSameDay(g,k);o&&(D||!(d!=null&&d.from))?!a&&u?M=void 0:M={from:g,to:void 0}:M=Xr(g,d,w,C,a,t)}return n&&r&&(M!=null&&M.from)&&M.to&&eo({from:M.from,to:M.to},r,t)&&(M.from=g,M.to=void 0),i||f(M),i==null||i(M,g,O,W),M},isSelected:g=>d&&se(d,g,!1,t)}}function no(e,t){const{selected:r,required:n,onSelect:o}=e,[s,a]=we(r,o?r:void 0),i=o?r:s,{isSameDay:l}=t;return{selected:i,select:(c,y,g)=>{let O=c;return!n&&i&&i&&l(c,i)&&(O=void 0),o||a(O),o==null||o(O,c,y,g),O},isSelected:c=>i?l(i,c):!1}}function ro(e,t){const r=no(e,t),n=Qr(e,t),o=to(e,t);switch(e.mode){case"single":return r;case"multiple":return n;case"range":return o;default:return}}function G(e,t){return e instanceof A&&e.timeZone===t?e:new A(e,t)}function le(e,t,r){return G(e,t)}function tt(e,t,r){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?le(e,t):Array.isArray(e)?e.map(n=>n instanceof Date?le(n,t):n):Oe(e)?{...e,from:e.from?G(e.from,t):e.from,to:e.to?G(e.to,t):e.to}:Be(e)?{before:le(e.before,t),after:le(e.after,t)}:Pe(e)?{after:le(e.after,t)}:ze(e)?{before:le(e.before,t)}:e}function Ie(e,t,r){return e&&(Array.isArray(e)?e.map(n=>tt(n,t)):tt(e,t))}function oo(e){var Ue;let t=e;const r=t.timeZone;if(r&&(t={...e,timeZone:r},t.today&&(t.today=G(t.today,r)),t.month&&(t.month=G(t.month,r)),t.defaultMonth&&(t.defaultMonth=G(t.defaultMonth,r)),t.startMonth&&(t.startMonth=G(t.startMonth,r)),t.endMonth&&(t.endMonth=G(t.endMonth,r)),t.mode==="single"&&t.selected?t.selected=G(t.selected,r):t.mode==="multiple"&&t.selected?t.selected=(Ue=t.selected)==null?void 0:Ue.map(b=>G(b,r)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?G(t.selected.from,r):t.selected.from,to:t.selected.to?G(t.selected.to,r):t.selected.to}),t.disabled!==void 0&&(t.disabled=Ie(t.disabled,r)),t.hidden!==void 0&&(t.hidden=Ie(t.hidden,r)),t.modifiers)){const b={};Object.keys(t.modifiers).forEach(N=>{var v;b[N]=Ie((v=t.modifiers)==null?void 0:v[N],r)}),t.modifiers=b}const{components:n,formatters:o,labels:s,dateLib:a,locale:i,classNames:l}=E.useMemo(()=>{const b={...ct,...t.locale},N=t.broadcastCalendar?1:t.weekStartsOn,v=t.noonSafe&&t.timeZone?Fr(t.timeZone,{weekStartsOn:N,locale:b}):void 0,P=t.dateLib&&v?{...v,...t.dateLib}:t.dateLib??v,x=new R({locale:b,weekStartsOn:N,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},P);return{dateLib:x,components:gr(t.components),formatters:Nr(t.formatters),labels:_r(t.labels,x.options),locale:b,classNames:{...Ae(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:f,mode:d,navLayout:c,numberOfMonths:y=1,onDayBlur:g,onDayClick:O,onDayFocus:W,onDayKeyDown:w,onDayMouseEnter:C,onDayMouseLeave:M,onNextClick:k,onPrevClick:S,showWeekNumber:D,styles:u}=t,{formatCaption:p,formatDay:Y,formatMonthDropdown:I,formatWeekNumber:F,formatWeekNumberHeader:z,formatWeekdayName:U,formatYearDropdown:j}=o,$=Kr(t,a),{days:ie,months:fe,navStart:pe,navEnd:We,previousMonth:K,nextMonth:Z,goToMonth:ne}=$,Ne=mr(ie,t,pe,We,a),{isSelected:de,select:ue,selected:ge}=ro(t,a)??{},{blur:He,focused:ke,isFocusTarget:_t,moveFocus:je,setFocused:De}=Jr(t,$,Ne,de??(()=>!1),a),{labelDayButton:xt,labelGridcell:Tt,labelGrid:Yt,labelMonthDropdown:Et,labelNav:$e,labelPrevious:Ft,labelNext:It,labelWeekday:Bt,labelWeekNumber:Pt,labelWeekNumberHeader:zt,labelYearDropdown:At}=s,Ht=E.useMemo(()=>Yr(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),qe=d!==void 0||O!==void 0,Se=E.useCallback(()=>{K&&(ne(K),S==null||S(K))},[K,ne,S]),Ce=E.useCallback(()=>{Z&&(ne(Z),k==null||k(Z))},[ne,Z,k]),jt=E.useCallback((b,N)=>v=>{v.preventDefault(),v.stopPropagation(),De(b),!N.disabled&&(ue==null||ue(b.date,N,v),O==null||O(b.date,N,v))},[ue,O,De]),$t=E.useCallback((b,N)=>v=>{De(b),W==null||W(b.date,N,v)},[W,De]),qt=E.useCallback((b,N)=>v=>{He(),g==null||g(b.date,N,v)},[He,g]),Rt=E.useCallback((b,N)=>v=>{const P={ArrowLeft:[v.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[v.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[v.shiftKey?"year":"week","after"],ArrowUp:[v.shiftKey?"year":"week","before"],PageUp:[v.shiftKey?"year":"month","before"],PageDown:[v.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(P[v.key]){v.preventDefault(),v.stopPropagation();const[x,X]=P[v.key];je(x,X)}w==null||w(b.date,N,v)},[je,w,t.dir]),Gt=E.useCallback((b,N)=>v=>{C==null||C(b.date,N,v)},[C]),Ut=E.useCallback((b,N)=>v=>{M==null||M(b.date,N,v)},[M]),Kt=E.useCallback((b,N)=>v=>{const P=Number(v.target.value),x=a.setMonth(a.startOfMonth(b),P);ne(a.addMonths(x,-N))},[a,ne]),Zt=E.useCallback((b,N)=>v=>{const P=Number(v.target.value),x=a.setYear(a.startOfMonth(b),P);ne(a.addMonths(x,-N))},[a,ne]),{className:Vt,style:Jt}=E.useMemo(()=>({className:[l[h.Root],t.className].filter(Boolean).join(" "),style:{...u==null?void 0:u[h.Root],...t.style}}),[l,t.className,t.style,u]),Qt=kr(t),Re=b=>{const N=u==null?void 0:u[h.Dropdown],v=u==null?void 0:u[b];if(!(!N&&!v))return{...N,...v}},Ge=E.useRef(null);zr(Ge,!!t.animate,{classNames:l,months:fe,focused:ke,dateLib:a});const Xt={dayPickerProps:t,selected:ge,select:ue,isSelected:de,months:fe,nextMonth:Z,previousMonth:K,goToMonth:ne,getModifiers:Ne,components:n,classNames:l,styles:u,labels:s,formatters:o};return m.createElement(mt.Provider,{value:Xt},m.createElement(n.Root,{rootRef:t.animate?Ge:void 0,className:Vt,style:Jt,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Qt},m.createElement(n.Months,{className:l[h.Months],style:u==null?void 0:u[h.Months]},!t.hideNavigation&&!c&&m.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[h.Nav],style:u==null?void 0:u[h.Nav],"aria-label":$e(),onPreviousClick:Se,onNextClick:Ce,previousMonth:K,nextMonth:Z}),fe.map((b,N)=>{const v=t.reverseMonths?fe.length-1-N:N;return m.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[h.Month],style:u==null?void 0:u[h.Month],key:N,displayIndex:N,calendarMonth:b},c==="around"&&!t.hideNavigation&&N===0&&m.createElement(n.PreviousMonthButton,{type:"button",className:l[h.PreviousMonthButton],style:u==null?void 0:u[h.PreviousMonthButton],tabIndex:K?void 0:-1,"aria-disabled":K?void 0:!0,"aria-label":Ft(K),onClick:Se,"data-animated-button":t.animate?"true":void 0},m.createElement(n.Chevron,{disabled:K?void 0:!0,className:l[h.Chevron],style:u==null?void 0:u[h.Chevron],orientation:t.dir==="rtl"?"right":"left"})),m.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[h.MonthCaption],style:u==null?void 0:u[h.MonthCaption],calendarMonth:b,displayIndex:N},f!=null&&f.startsWith("dropdown")?m.createElement(n.DropdownNav,{className:l[h.Dropdowns],style:u==null?void 0:u[h.Dropdowns]},(()=>{const P=f==="dropdown"||f==="dropdown-months"?m.createElement(n.MonthsDropdown,{key:"month",className:l[h.MonthsDropdown],"aria-label":Et(),disabled:!!t.disableNavigation,onChange:Kt(b.date,v),options:xr(b.date,pe,We,o,a),style:Re(h.MonthsDropdown),value:a.getMonth(b.date)}):m.createElement("span",{key:"month"},I(b.date,a)),x=f==="dropdown"||f==="dropdown-years"?m.createElement(n.YearsDropdown,{key:"year",className:l[h.YearsDropdown],"aria-label":At(a.options),disabled:!!t.disableNavigation,onChange:Zt(b.date,v),options:Er(pe,We,o,a,!!t.reverseYears),style:Re(h.YearsDropdown),value:a.getYear(b.date)}):m.createElement("span",{key:"year"},j(b.date,a));return a.getMonthYearOrder()==="year-first"?[x,P]:[P,x]})(),m.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},p(b.date,a.options,a))):m.createElement(n.CaptionLabel,{className:l[h.CaptionLabel],style:u==null?void 0:u[h.CaptionLabel],role:"status","aria-live":"polite"},p(b.date,a.options,a))),c==="around"&&!t.hideNavigation&&N===y-1&&m.createElement(n.NextMonthButton,{type:"button",className:l[h.NextMonthButton],style:u==null?void 0:u[h.NextMonthButton],tabIndex:Z?void 0:-1,"aria-disabled":Z?void 0:!0,"aria-label":It(Z),onClick:Ce,"data-animated-button":t.animate?"true":void 0},m.createElement(n.Chevron,{disabled:Z?void 0:!0,className:l[h.Chevron],style:u==null?void 0:u[h.Chevron],orientation:t.dir==="rtl"?"left":"right"})),N===y-1&&c==="after"&&!t.hideNavigation&&m.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[h.Nav],style:u==null?void 0:u[h.Nav],"aria-label":$e(),onPreviousClick:Se,onNextClick:Ce,previousMonth:K,nextMonth:Z}),m.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":Yt(b.date,a.options,a)||void 0,className:l[h.MonthGrid],style:u==null?void 0:u[h.MonthGrid]},!t.hideWeekdays&&m.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[h.Weekdays],style:u==null?void 0:u[h.Weekdays]},D&&m.createElement(n.WeekNumberHeader,{"aria-label":zt(a.options),className:l[h.WeekNumberHeader],style:u==null?void 0:u[h.WeekNumberHeader],scope:"col"},z()),Ht.map(P=>m.createElement(n.Weekday,{"aria-label":Bt(P,a.options,a),className:l[h.Weekday],key:String(P),style:u==null?void 0:u[h.Weekday],scope:"col"},U(P,a.options,a)))),m.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[h.Weeks],style:u==null?void 0:u[h.Weeks]},b.weeks.map(P=>m.createElement(n.Week,{className:l[h.Week],key:P.weekNumber,style:u==null?void 0:u[h.Week],week:P},D&&m.createElement(n.WeekNumber,{week:P,style:u==null?void 0:u[h.WeekNumber],"aria-label":Pt(P.weekNumber,{locale:i}),className:l[h.WeekNumber],scope:"row",role:"rowheader"},F(P.weekNumber,a)),P.days.map(x=>{const{date:X}=x,_=Ne(x);if(_[B.focused]=!_.hidden&&!!(ke!=null&&ke.isEqualTo(x)),_[J.selected]=(de==null?void 0:de(X))||_.selected,Oe(ge)){const{from:_e,to:xe}=ge;_[J.range_start]=!!(_e&&xe&&a.isSameDay(X,_e)),_[J.range_end]=!!(_e&&xe&&a.isSameDay(X,xe)),_[J.range_middle]=se(ge,X,!0,a)}const Lt=Tr(_,u,t.modifiersStyles),en=yr(_,l,t.modifiersClassNames),tn=!qe&&!_.hidden?Tt(X,_,a.options,a):void 0;return m.createElement(n.Day,{key:`${x.isoDate}_${x.displayMonthId}`,day:x,modifiers:_,className:en.join(" "),style:Lt,role:"gridcell","aria-selected":_.selected||void 0,"aria-label":tn,"data-day":x.isoDate,"data-month":x.outside?x.dateMonthId:void 0,"data-selected":_.selected||void 0,"data-disabled":_.disabled||void 0,"data-hidden":_.hidden||void 0,"data-outside":x.outside||void 0,"data-focused":_.focused||void 0,"data-today":_.today||void 0},!_.hidden&&qe?m.createElement(n.DayButton,{className:l[h.DayButton],style:u==null?void 0:u[h.DayButton],type:"button",day:x,modifiers:_,disabled:!_.focused&&_.disabled||void 0,"aria-disabled":_.focused&&_.disabled||void 0,tabIndex:_t(x)?0:-1,"aria-label":xt(X,_,a.options,a),onClick:jt(x,_),onBlur:qt(x,_),onFocus:$t(x,_),onKeyDown:Rt(x,_),onMouseEnter:Gt(x,_),onMouseLeave:Ut(x,_)},Y(X,a.options,a)):!_.hidden&&Y(x.date,a.options,a))}))))))})),t.footer&&m.createElement(n.Footer,{className:l[h.Footer],style:u==null?void 0:u[h.Footer],role:"status","aria-live":"polite"},t.footer)))}function io({className:e,classNames:t,showOutsideDays:r=!0,captionLayout:n="label",buttonVariant:o="ghost",locale:s,formatters:a,components:i,...l}){const f=Ae();return re.jsx(oo,{showOutsideDays:r,className:T("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:n,locale:s,formatters:{formatMonthDropdown:d=>d.toLocaleString(s==null?void 0:s.code,{month:"short"}),...a},classNames:{root:T("w-fit",f.root),months:T("relative flex flex-col gap-4 md:flex-row",f.months),month:T("flex w-full flex-col gap-4",f.month),nav:T("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",f.nav),button_previous:T(Ke({variant:o}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",f.button_previous),button_next:T(Ke({variant:o}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",f.button_next),month_caption:T("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",f.month_caption),dropdowns:T("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",f.dropdowns),dropdown_root:T("relative rounded-(--cell-radius)",f.dropdown_root),dropdown:T("absolute inset-0 bg-popover opacity-0",f.dropdown),caption_label:T("font-medium select-none",n==="label"?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",f.caption_label),month_grid:T("w-full border-collapse",f.month_grid),weekdays:T("flex",f.weekdays),weekday:T("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",f.weekday),week:T("mt-2 flex w-full",f.week),week_number_header:T("w-(--cell-size) select-none",f.week_number_header),week_number:T("text-[0.8rem] text-muted-foreground select-none",f.week_number),day:T("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",l.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",f.day),range_start:T("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",f.range_start),range_middle:T("rounded-none",f.range_middle),range_end:T("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",f.range_end),today:T("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",f.today),outside:T("text-muted-foreground aria-selected:text-muted-foreground",f.outside),disabled:T("text-muted-foreground opacity-50",f.disabled),hidden:T("invisible",f.hidden),...t},components:{Root:({className:d,rootRef:c,...y})=>re.jsx("div",{"data-slot":"calendar",ref:c,className:T(d),...y}),Chevron:({className:d,orientation:c,...y})=>c==="left"?re.jsx(dn,{className:T("size-4",d),...y}):c==="right"?re.jsx(un,{className:T("size-4",d),...y}):re.jsx(cn,{className:T("size-4",d),...y}),DayButton:({...d})=>re.jsx(so,{locale:s,...d}),WeekNumber:({children:d,...c})=>re.jsx("td",{...c,children:re.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:d})}),...i},...l})}function so({className:e,day:t,modifiers:r,locale:n,...o}){const s=Ae(),a=E.useRef(null);return E.useEffect(()=>{var i;r.focused&&((i=a.current)==null||i.focus())},[r.focused]),re.jsx(hn,{variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(n==null?void 0:n.code),"data-selected-single":r.selected&&!r.range_start&&!r.range_end&&!r.range_middle,"data-range-start":r.range_start,"data-range-end":r.range_end,"data-range-middle":r.range_middle,className:T("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",s.day,e),...o})}export{io as Calendar,so as CalendarDayButton};
@@ -1 +1 @@
1
- import{aX as c,b as o,aY as u,aZ as i,j as r,aD as g,aF as m,aG as d,D as p,a_ as x,r as j}from"./index-CgkdZ6Oc.js";function v(e){const[s]=c(),n=o.useMemo(()=>{if(s.get("authenticator")!==e.name)return;const a=s.get("error");return a?new Error(a):void 0},[e.name,s]);return{signIn:o.useCallback(()=>{const a=u(s.get("to")||s.get("redirect")||"/"),l=i.buildUrl("cas:login",{authenticator:e.name,__appName:i.getAppName(),redirect:a});window.location.replace(l.toString())},[e.name,s]),error:n}}function f({authenticator:e,onSignIn:s}){const{signIn:n,error:t}=v(e);return r.jsxs("div",{className:"space-y-3",children:[t&&r.jsxs(g,{variant:"destructive",children:[r.jsx(m,{children:"CAS sign-in failed"}),r.jsx(d,{children:t.message})]}),r.jsxs(p,{type:"button",variant:"outline",className:"w-full",onClick:s??n,children:[r.jsx(x,{}),j(e.title||e.authTypeTitle||"CAS")]})]})}export{f as default};
1
+ import{b5 as c,b as o,b6 as u,b7 as i,j as r,aN as g,aP as m,aQ as d,K as p,b8 as b,r as x}from"./index-CMoFG_fD.js";function j(e){const[s]=c(),n=o.useMemo(()=>{if(s.get("authenticator")!==e.name)return;const a=s.get("error");return a?new Error(a):void 0},[e.name,s]);return{signIn:o.useCallback(()=>{const a=u(s.get("to")||s.get("redirect")||"/"),l=i.buildUrl("cas:login",{authenticator:e.name,__appName:i.getAppName(),redirect:a});window.location.replace(l.toString())},[e.name,s]),error:n}}function f({authenticator:e,onSignIn:s}){const{signIn:n,error:t}=j(e);return r.jsxs("div",{className:"space-y-3",children:[t&&r.jsxs(g,{variant:"destructive",children:[r.jsx(m,{children:"CAS sign-in failed"}),r.jsx(d,{children:t.message})]}),r.jsxs(p,{type:"button",variant:"outline",className:"w-full",onClick:s??n,children:[r.jsx(b,{}),x(e.title||e.authTypeTitle||"CAS")]})]})}export{f as default};
@@ -1,4 +1,4 @@
1
- import{r as Y,u as J,a as Q,b as c,j as e,L as F,S as R,B as $,c as C,d as A,e as T,f as P,g as U,s as X,h as Z,i as d,k as w,I as ee,T as se,l as V,m as z,n as N,o as m,p as G,q as p}from"./index-CgkdZ6Oc.js";import{C as x,a as L,b as k,c as _,d as B}from"./card-C9Hpeq1c.js";import{P as te}from"./prompt-output-DMTuTNab.js";const y="__union__",M="anonymous";function q(s){return Y((s==null?void 0:s.title)||(s==null?void 0:s.name)||"Role",{ns:"starter"})}function ae({roles:s,roleMode:t,allowAnonymous:r=!1}){if(t==="only-use-union")return[{name:y,title:"Full permissions"}];const o=s.filter(n=>n.name!==y&&n.name!==M);return r&&o.push({name:M,title:"Anonymous"}),t==="allow-use-union"&&o.unshift({name:y,title:"Full permissions"}),o}function ne({className:s,triggerClassName:t,label:r="Switch role",showWhenUnavailable:o=!1}){var D;const{data:n,isLoading:S}=J(),i=Q(),[g,j]=c.useState(!1),[l,I]=c.useState(),a=i.status==="ready"?i.permissions:void 0,h=c.useMemo(()=>ae({roles:(n==null?void 0:n.roles)??[],roleMode:a==null?void 0:a.roleMode,allowAnonymous:a==null?void 0:a.allowAnonymous}),[n==null?void 0:n.roles,a==null?void 0:a.allowAnonymous,a==null?void 0:a.roleMode]),f=(a==null?void 0:a.currentRole)??((D=h[0])==null?void 0:D.name),W=h.length>1&&(a==null?void 0:a.roleMode)!=="only-use-union",K=async u=>{if(!(!u||u===f)){j(!0),I(void 0);try{await X(u),window.location.reload()}catch(b){I(b instanceof Error?b.message:"Unable to switch role"),j(!1)}}};return S||i.status==="idle"||i.status==="loading"?e.jsx(F,{className:"size-4 animate-spin text-muted-foreground"}):!W&&!o?null:W?e.jsxs("div",{className:C("space-y-2",s),children:[r===!1?null:e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:r}),e.jsxs(A,{value:f,disabled:g,onValueChange:K,children:[e.jsxs(T,{className:C("w-full min-w-52",t),"aria-label":"Switch role",children:[g?e.jsx(F,{className:"animate-spin"}):e.jsx(R,{}),e.jsx(P,{children:E(h,f)})]}),e.jsx(U,{children:h.map((u,b)=>{var O;return e.jsx(re,{role:u,showSeparator:b===1&&((O=h[0])==null?void 0:O.name)===y},u.name)})})]}),l?e.jsx("p",{className:"text-xs text-destructive",children:l}):null]}):e.jsxs("div",{className:C("flex items-center gap-2 text-sm",s),children:[e.jsx(R,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx($,{variant:"secondary",children:E(h,f)})]})}function re({role:s,showSeparator:t}){return e.jsxs(e.Fragment,{children:[t?e.jsx(Z,{}):null,e.jsx(d,{value:s.name,children:q(s)})]})}function E(s,t){return q(s.find(r=>r.name===t)??(t?{name:t}:void 0))}const H={header:"Application header","user-menu":"User menu",settings:"Account settings",custom:"Custom surface"},le={"current-role":"Show current role",hide:"Hide component"},oe={header:"Place it in the application header beside the existing account controls. Keep the trigger compact and preserve the responsive user menu.","user-menu":"Place it inside the existing user/account popover as a full-width menu section, separated from profile and sign-out actions.",settings:"Place it in an account settings section with a field label and short explanation of how the active role changes visible data and actions.",custom:"Place it in the application surface described below, matching the surrounding layout and spacing."};function ie(){const[s,t]=c.useState("user-menu"),[r,o]=c.useState("Working as"),[n,S]=c.useState("current-role"),[i,g]=c.useState("Use the Starter's existing account controls and visual language. Do not create a separate demo page."),j=c.useMemo(()=>`Integrate the RoleSwitcher into the existing NocoBase Admin Starter.
1
+ import{r as Y,u as J,a as Q,b as c,j as e,L as F,S as R,B as $,c as C,d as A,e as T,f as P,g as U,s as X,h as Z,i as d,C as x,k as L,l as k,m as _,n as B,o as w,I as ee,T as se,p as V,q as z,t as N,v as m,w as G,x as p}from"./index-CMoFG_fD.js";import{P as te}from"./prompt-output-7ZS2-d1_.js";const y="__union__",M="anonymous";function q(s){return Y((s==null?void 0:s.title)||(s==null?void 0:s.name)||"Role",{ns:"starter"})}function ne({roles:s,roleMode:t,allowAnonymous:r=!1}){if(t==="only-use-union")return[{name:y,title:"Full permissions"}];const o=s.filter(a=>a.name!==y&&a.name!==M);return r&&o.push({name:M,title:"Anonymous"}),t==="allow-use-union"&&o.unshift({name:y,title:"Full permissions"}),o}function ae({className:s,triggerClassName:t,label:r="Switch role",showWhenUnavailable:o=!1}){var D;const{data:a,isLoading:S}=J(),i=Q(),[g,j]=c.useState(!1),[l,I]=c.useState(),n=i.status==="ready"?i.permissions:void 0,h=c.useMemo(()=>ne({roles:(a==null?void 0:a.roles)??[],roleMode:n==null?void 0:n.roleMode,allowAnonymous:n==null?void 0:n.allowAnonymous}),[a==null?void 0:a.roles,n==null?void 0:n.allowAnonymous,n==null?void 0:n.roleMode]),f=(n==null?void 0:n.currentRole)??((D=h[0])==null?void 0:D.name),W=h.length>1&&(n==null?void 0:n.roleMode)!=="only-use-union",K=async u=>{if(!(!u||u===f)){j(!0),I(void 0);try{await X(u),window.location.reload()}catch(b){I(b instanceof Error?b.message:"Unable to switch role"),j(!1)}}};return S||i.status==="idle"||i.status==="loading"?e.jsx(F,{className:"size-4 animate-spin text-muted-foreground"}):!W&&!o?null:W?e.jsxs("div",{className:C("space-y-2",s),children:[r===!1?null:e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:r}),e.jsxs(A,{value:f,disabled:g,onValueChange:K,children:[e.jsxs(T,{className:C("w-full min-w-52",t),"aria-label":"Switch role",children:[g?e.jsx(F,{className:"animate-spin"}):e.jsx(R,{}),e.jsx(P,{children:E(h,f)})]}),e.jsx(U,{children:h.map((u,b)=>{var O;return e.jsx(re,{role:u,showSeparator:b===1&&((O=h[0])==null?void 0:O.name)===y},u.name)})})]}),l?e.jsx("p",{className:"text-xs text-destructive",children:l}):null]}):e.jsxs("div",{className:C("flex items-center gap-2 text-sm",s),children:[e.jsx(R,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx($,{variant:"secondary",children:E(h,f)})]})}function re({role:s,showSeparator:t}){return e.jsxs(e.Fragment,{children:[t?e.jsx(Z,{}):null,e.jsx(d,{value:s.name,children:q(s)})]})}function E(s,t){return q(s.find(r=>r.name===t)??(t?{name:t}:void 0))}const H={header:"Application header","user-menu":"User menu",settings:"Account settings",custom:"Custom surface"},le={"current-role":"Show current role",hide:"Hide component"},oe={header:"Place it in the application header beside the existing account controls. Keep the trigger compact and preserve the responsive user menu.","user-menu":"Place it inside the existing user/account popover as a full-width menu section, separated from profile and sign-out actions.",settings:"Place it in an account settings section with a field label and short explanation of how the active role changes visible data and actions.",custom:"Place it in the application surface described below, matching the surrounding layout and spacing."};function ie(){const[s,t]=c.useState("user-menu"),[r,o]=c.useState("Working as"),[a,S]=c.useState("current-role"),[i,g]=c.useState("Use the Starter's existing account controls and visual language. Do not create a separate demo page."),j=c.useMemo(()=>`Integrate the RoleSwitcher into the existing NocoBase Admin Starter.
2
2
 
3
3
  Target placement
4
4
  - Placement: ${H[s]}
@@ -7,7 +7,7 @@ Target placement
7
7
 
8
8
  Component presentation
9
9
  - Label: ${r.trim()?r:"No label; pass label={false}."}
10
- - When role switching is unavailable: ${n==="current-role"?"Keep the current identity visible by passing showWhenUnavailable.":"Hide the component by keeping showWhenUnavailable false."}
10
+ - When role switching is unavailable: ${a==="current-role"?"Keep the current identity visible by passing showWhenUnavailable.":"Hide the component by keeping showWhenUnavailable false."}
11
11
  - Use className and triggerClassName only to fit the existing surface; do not fork or restyle the internal Select implementation.
12
12
 
13
13
  Integration requirements
@@ -17,4 +17,4 @@ Integration requirements
17
17
  - Do not reimplement Full permissions, Anonymous, or role-mode logic. The component derives these options from the Starter ACL store.
18
18
  - Do not add a separate role-switch mutation. The component already calls users:setDefaultRole and reloads the application after a successful switch.
19
19
  - Preserve existing account, responsive navigation, and sign-out behavior.
20
- - Return the complete updated component for the target surface and mention any imports that were added.`,[r,s,i,n]);return e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[360px_minmax(0,1fr)]",children:[e.jsxs(x,{className:"gap-0 py-0",children:[e.jsxs(L,{className:"border-b py-4",children:[e.jsx(k,{className:"text-base",children:"Placement settings"}),e.jsx(_,{children:"Choose where the shared role switcher belongs and how its compact state should appear."})]}),e.jsxs(B,{className:"space-y-5 py-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"Placement"}),e.jsxs(A,{value:s,onValueChange:l=>l&&t(l),children:[e.jsx(T,{className:"w-full",children:e.jsx(P,{children:H[s]})}),e.jsxs(U,{children:[e.jsx(d,{value:"header",children:"Application header"}),e.jsx(d,{value:"user-menu",children:"User menu"}),e.jsx(d,{value:"settings",children:"Account settings"}),e.jsx(d,{value:"custom",children:"Custom surface"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"role-switcher-label",children:"Label"}),e.jsx(ee,{id:"role-switcher-label",value:r,onChange:l=>o(l.target.value),placeholder:"Leave empty for no label"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"Single-role behavior"}),e.jsxs(A,{value:n,onValueChange:l=>l&&S(l),children:[e.jsx(T,{className:"w-full",children:e.jsx(P,{children:le[n]})}),e.jsxs(U,{children:[e.jsx(d,{value:"current-role",children:"Show current role"}),e.jsx(d,{value:"hide",children:"Hide component"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"role-switcher-surface",children:"Application context"}),e.jsx(se,{id:"role-switcher-surface",value:i,onChange:l=>g(l.target.value),className:"min-h-28"})]})]})]}),e.jsx(te,{title:"Generated integration prompt",description:"Updates as you change placement and presentation settings.",prompt:j})]})}const ce=[["className","string","undefined","Styles the component wrapper so it can fit a toolbar, menu, or settings layout."],["triggerClassName","string","undefined","Styles only the Select trigger without changing the wrapper."],["label","ReactNode | false",'"Switch role"',"Replaces the field label. Pass false for a compact control without a label."],["showWhenUnavailable","boolean","false","Shows the current role as a non-interactive badge when the user cannot switch roles."]],de=[["Multiple assigned roles","Renders a Select using roles from the signed-in identity."],["allow-use-union","Prepends Full permissions using the __union__ role."],["only-use-union","Shows Full permissions as the current non-interactive role."],["allowAnonymous","Appends Anonymous to the available role options."],["One available role","Returns null, or shows the current-role badge when showWhenUnavailable is true."]];function xe(){return e.jsxs("div",{className:"space-y-12 pb-12",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-[-0.025em] sm:text-3xl",children:"Role switcher"}),e.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:"A reusable role selector backed by the Starter's NocoBase ACL store and signed-in identity."})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Role selection",title:"RoleSwitcher",description:"The component resolves the signed-in user's roles and NocoBase role mode automatically. Business pages only decide its placement and presentation."}),e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-2",children:[e.jsxs(x,{children:[e.jsxs(L,{children:[e.jsx(k,{children:"Live component"}),e.jsx(_,{children:"Uses the current identity and active NocoBase ACL response."})]}),e.jsx(B,{children:e.jsx(ne,{showWhenUnavailable:!0,className:"w-full max-w-sm",label:"Working as"})})]}),e.jsxs(x,{children:[e.jsxs(L,{children:[e.jsx(k,{children:"Unavailable state"}),e.jsx(_,{children:"With one usable role, showWhenUnavailable keeps identity visible without presenting a disabled Select."})]}),e.jsx(B,{children:e.jsxs("div",{className:"flex min-h-9 items-center gap-2 text-sm",children:[e.jsx(R,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx($,{variant:"secondary",children:"Member"})]})})]})]})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Prompt generator",title:"Place the role switcher in an existing application surface",description:"Describe the target placement and presentation. The generated prompt integrates the exported component without rebuilding its role-loading or switching behavior."}),e.jsx(ie,{})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Component API",title:"Role switcher props",description:"Role data, union mode, Anonymous, persistence, and reload behavior are built in rather than exposed as duplicated application props."}),e.jsx(he,{rows:ce})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Automatic behavior",title:"Role options follow NocoBase configuration",description:"These states are derived from the identity and roles:check response, so applications do not maintain a second role list."}),e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(V,{children:[e.jsx(z,{children:e.jsxs(N,{children:[e.jsx(m,{children:"Condition"}),e.jsx(m,{children:"Rendered behavior"})]})}),e.jsx(G,{children:de.map(([s,t])=>e.jsxs(N,{children:[e.jsx(p,{className:"font-medium",children:s}),e.jsx(p,{className:"text-muted-foreground",children:t})]},s))})]})})]})]})}function he({rows:s}){return e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(V,{children:[e.jsx(z,{children:e.jsxs(N,{children:[e.jsx(m,{children:"Prop"}),e.jsx(m,{children:"Type"}),e.jsx(m,{children:"Default"}),e.jsx(m,{children:"Description"})]})}),e.jsx(G,{children:s.map(([t,r,o,n])=>e.jsxs(N,{children:[e.jsx(p,{className:"font-mono text-xs font-medium",children:t}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:r}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:o}),e.jsx(p,{className:"min-w-72 whitespace-normal text-muted-foreground",children:n})]},t))})]})})}function v({eyebrow:s,title:t,description:r}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:s}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:t}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:r})]})}export{xe as AclComponentsPage};
20
+ - Return the complete updated component for the target surface and mention any imports that were added.`,[r,s,i,a]);return e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[360px_minmax(0,1fr)]",children:[e.jsxs(x,{className:"gap-0 py-0",children:[e.jsxs(L,{className:"border-b py-4",children:[e.jsx(k,{className:"text-base",children:"Placement settings"}),e.jsx(_,{children:"Choose where the shared role switcher belongs and how its compact state should appear."})]}),e.jsxs(B,{className:"space-y-5 py-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"Placement"}),e.jsxs(A,{value:s,onValueChange:l=>l&&t(l),children:[e.jsx(T,{className:"w-full",children:e.jsx(P,{children:H[s]})}),e.jsxs(U,{children:[e.jsx(d,{value:"header",children:"Application header"}),e.jsx(d,{value:"user-menu",children:"User menu"}),e.jsx(d,{value:"settings",children:"Account settings"}),e.jsx(d,{value:"custom",children:"Custom surface"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"role-switcher-label",children:"Label"}),e.jsx(ee,{id:"role-switcher-label",value:r,onChange:l=>o(l.target.value),placeholder:"Leave empty for no label"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"Single-role behavior"}),e.jsxs(A,{value:a,onValueChange:l=>l&&S(l),children:[e.jsx(T,{className:"w-full",children:e.jsx(P,{children:le[a]})}),e.jsxs(U,{children:[e.jsx(d,{value:"current-role",children:"Show current role"}),e.jsx(d,{value:"hide",children:"Hide component"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"role-switcher-surface",children:"Application context"}),e.jsx(se,{id:"role-switcher-surface",value:i,onChange:l=>g(l.target.value),className:"min-h-28"})]})]})]}),e.jsx(te,{title:"Generated integration prompt",description:"Updates as you change placement and presentation settings.",prompt:j})]})}const ce=[["className","string","undefined","Styles the component wrapper so it can fit a toolbar, menu, or settings layout."],["triggerClassName","string","undefined","Styles only the Select trigger without changing the wrapper."],["label","ReactNode | false",'"Switch role"',"Replaces the field label. Pass false for a compact control without a label."],["showWhenUnavailable","boolean","false","Shows the current role as a non-interactive badge when the user cannot switch roles."]],de=[["Multiple assigned roles","Renders a Select using roles from the signed-in identity."],["allow-use-union","Prepends Full permissions using the __union__ role."],["only-use-union","Shows Full permissions as the current non-interactive role."],["allowAnonymous","Appends Anonymous to the available role options."],["One available role","Returns null, or shows the current-role badge when showWhenUnavailable is true."]];function pe(){return e.jsxs("div",{className:"space-y-12 pb-12",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-[-0.025em] sm:text-3xl",children:"Role switcher"}),e.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:"A reusable role selector backed by the Starter's NocoBase ACL store and signed-in identity."})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Role selection",title:"RoleSwitcher",description:"The component resolves the signed-in user's roles and NocoBase role mode automatically. Business pages only decide its placement and presentation."}),e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-2",children:[e.jsxs(x,{children:[e.jsxs(L,{children:[e.jsx(k,{children:"Live component"}),e.jsx(_,{children:"Uses the current identity and active NocoBase ACL response."})]}),e.jsx(B,{children:e.jsx(ae,{showWhenUnavailable:!0,className:"w-full max-w-sm",label:"Working as"})})]}),e.jsxs(x,{children:[e.jsxs(L,{children:[e.jsx(k,{children:"Unavailable state"}),e.jsx(_,{children:"With one usable role, showWhenUnavailable keeps identity visible without presenting a disabled Select."})]}),e.jsx(B,{children:e.jsxs("div",{className:"flex min-h-9 items-center gap-2 text-sm",children:[e.jsx(R,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx($,{variant:"secondary",children:"Member"})]})})]})]})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Prompt generator",title:"Place the role switcher in an existing application surface",description:"Describe the target placement and presentation. The generated prompt integrates the exported component without rebuilding its role-loading or switching behavior."}),e.jsx(ie,{})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Component API",title:"Role switcher props",description:"Role data, union mode, Anonymous, persistence, and reload behavior are built in rather than exposed as duplicated application props."}),e.jsx(he,{rows:ce})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Automatic behavior",title:"Role options follow NocoBase configuration",description:"These states are derived from the identity and roles:check response, so applications do not maintain a second role list."}),e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(V,{children:[e.jsx(z,{children:e.jsxs(N,{children:[e.jsx(m,{children:"Condition"}),e.jsx(m,{children:"Rendered behavior"})]})}),e.jsx(G,{children:de.map(([s,t])=>e.jsxs(N,{children:[e.jsx(p,{className:"font-medium",children:s}),e.jsx(p,{className:"text-muted-foreground",children:t})]},s))})]})})]})]})}function he({rows:s}){return e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(V,{children:[e.jsx(z,{children:e.jsxs(N,{children:[e.jsx(m,{children:"Prop"}),e.jsx(m,{children:"Type"}),e.jsx(m,{children:"Default"}),e.jsx(m,{children:"Description"})]})}),e.jsx(G,{children:s.map(([t,r,o,a])=>e.jsxs(N,{children:[e.jsx(p,{className:"font-mono text-xs font-medium",children:t}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:r}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:o}),e.jsx(p,{className:"min-w-72 whitespace-normal text-muted-foreground",children:a})]},t))})]})})}function v({eyebrow:s,title:t,description:r}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:s}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:t}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:r})]})}export{pe as AclComponentsPage};
@@ -1 +1 @@
1
- import{ar as c,j as s,aC as d,aD as m,aE as p,aF as y,aG as v}from"./index-CgkdZ6Oc.js";const t=[{username:"atlas",nickname:"Atlas",position:"General assistant",greeting:"How can I help with this page?"},{username:"viz",nickname:"Viz",position:"Insights analyst",greeting:"What would you like to explore?"}],o=[{value:"__preview__",label:"Preview only",configured:!1}],a=()=>new ReadableStream({start(e){e.close()}}),u={listEmployees:async()=>t,listModels:async()=>o,updateEmployeeUserPrompt:async()=>{},listConversations:async()=>[],getConversationMessages:async()=>[],getConversationActiveState:async()=>"idle",updateConversationTitle:async()=>{},destroyConversation:async()=>{},uploadFile:async e=>({id:crypto.randomUUID(),filename:e.name,mimetype:e.type,size:e.size}),createConversation:async()=>`preview-${crypto.randomUUID()}`,sendMessagesStream:async()=>a(),resendMessagesStream:async()=>a(),updateToolCallDecision:async()=>({updated:0,toolCalls:[]}),resumeToolCallStream:async()=>a(),resumeConversationStream:async()=>a()};function h({children:e}){const{configurationStatus:i,hasEnabledModels:r,employees:n}=c();if(i==="ready"&&r&&n.length>0)return e;const l=n.length?e:s.jsx(d,{employees:t,models:o,service:u,children:e});return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(m,{children:[s.jsx(p,{}),s.jsx(y,{children:"Preview mode"}),s.jsx(v,{children:"Component examples remain available. Sending messages requires an enabled AI model in the connected NocoBase application."})]}),l]})}export{h as A};
1
+ import{aB as c,j as s,aM as d,aN as m,aO as p,aP as y,aQ as v}from"./index-CMoFG_fD.js";const t=[{username:"atlas",nickname:"Atlas",position:"General assistant",greeting:"How can I help with this page?"},{username:"viz",nickname:"Viz",position:"Insights analyst",greeting:"What would you like to explore?"}],o=[{value:"__preview__",label:"Preview only",configured:!1}],a=()=>new ReadableStream({start(e){e.close()}}),u={listEmployees:async()=>t,listModels:async()=>o,updateEmployeeUserPrompt:async()=>{},listConversations:async()=>[],getConversationMessages:async()=>[],getConversationActiveState:async()=>"idle",updateConversationTitle:async()=>{},destroyConversation:async()=>{},uploadFile:async e=>({id:crypto.randomUUID(),filename:e.name,mimetype:e.type,size:e.size}),createConversation:async()=>`preview-${crypto.randomUUID()}`,sendMessagesStream:async()=>a(),resendMessagesStream:async()=>a(),updateToolCallDecision:async()=>({updated:0,toolCalls:[]}),resumeToolCallStream:async()=>a(),resumeConversationStream:async()=>a()};function h({children:e}){const{configurationStatus:i,hasEnabledModels:r,employees:n}=c();if(i==="ready"&&r&&n.length>0)return e;const l=n.length?e:s.jsx(d,{employees:t,models:o,service:u,children:e});return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(m,{children:[s.jsx(p,{}),s.jsx(y,{children:"Preview mode"}),s.jsx(v,{children:"Component examples remain available. Sending messages requires an enabled AI model in the connected NocoBase application."})]}),l]})}export{h as A};
@@ -1 +1 @@
1
- import{_ as $,am as I,an as L,P as N,ao as O,ap as H,M as Y,j as X,R as S,o as y}from"./echarts-runtime-CvLr4Slh.js";var R=Math.min,j=Math.max;function F(h,t){return isNaN(h)||isNaN(t)}function Z(h,t,l,r,f,i,a,n,u){for(var s,w,c,q,P,e,b=l,p=0;p<r;p++){var o=t[b*2],v=t[b*2+1];if(b>=f||b<0)break;if(F(o,v)){if(u){b+=i;continue}break}if(b===l)h[i>0?"moveTo":"lineTo"](o,v),c=o,q=v;else{var T=o-s,d=v-w;if(T*T+d*d<.5){b+=i;continue}if(a>0){for(var A=b+i,k=t[A*2],M=t[A*2+1];k===o&&M===v&&p<r;)p++,A+=i,b+=i,k=t[A*2],M=t[A*2+1],o=t[b*2],v=t[b*2+1],T=o-s,d=v-w;var W=p+1;if(u)for(;F(k,M)&&W<r;)W++,A+=i,k=t[A*2],M=t[A*2+1];var G=.5,z=0,B=0,m=void 0,g=void 0;if(W>=r||F(k,M))P=o,e=v;else{z=k-s,B=M-w;var J=o-s,Q=k-o,U=v-w,V=M-v,D=void 0,E=void 0;if(n==="x"){D=Math.abs(J),E=Math.abs(Q);var C=z>0?1:-1;P=o-C*D*a,e=v,m=o+C*E*a,g=v}else if(n==="y"){D=Math.abs(U),E=Math.abs(V);var K=B>0?1:-1;P=o,e=v-K*D*a,m=o,g=v+K*E*a}else D=Math.sqrt(J*J+U*U),E=Math.sqrt(Q*Q+V*V),G=E/(E+D),P=o-z*a*(1-G),e=v-B*a*(1-G),m=o+z*a*G,g=v+B*a*G,m=R(m,j(k,o)),g=R(g,j(M,v)),m=j(m,R(k,o)),g=j(g,R(M,v)),z=m-o,B=g-v,P=o-z*D/E,e=v-B*D/E,P=R(P,j(s,o)),e=R(e,j(w,v)),P=j(P,R(s,o)),e=j(e,R(w,v)),z=o-P,B=v-e,m=o+z*E/D,g=v+B*E/D}h.bezierCurveTo(c,q,P,e,o,v),c=m,q=g}else h.lineTo(o,v)}s=o,w=v,b+=i}return p}var _=(function(){function h(){this.smooth=0,this.smoothConstraint=!0}return h})(),ta=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polyline",r}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _},t.prototype.buildPath=function(l,r){var f=r.points,i=0,a=f.length/2;if(r.connectNulls){for(;a>0&&F(f[a*2-2],f[a*2-1]);a--);for(;i<a&&F(f[i*2],f[i*2+1]);i++);}for(;i<a;)i+=Z(l,f,i,a,a,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},t.prototype.getPointOn=function(l,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var f=this.path,i=f.data,a=I.CMD,n,u,s=r==="x",w=[],c=0;c<i.length;){var q=i[c++],P=void 0,e=void 0,b=void 0,p=void 0,o=void 0,v=void 0,T=void 0;switch(q){case a.M:n=i[c++],u=i[c++];break;case a.L:if(P=i[c++],e=i[c++],T=s?(l-n)/(P-n):(l-u)/(e-u),T<=1&&T>=0){var d=s?(e-u)*T+u:(P-n)*T+n;return s?[l,d]:[d,l]}n=P,u=e;break;case a.C:P=i[c++],e=i[c++],b=i[c++],p=i[c++],o=i[c++],v=i[c++];var A=s?L(n,P,b,o,l,w):L(u,e,p,v,l,w);if(A>0)for(var k=0;k<A;k++){var M=w[k];if(M<=1&&M>=0){var d=s?O(u,e,p,v,M):O(n,P,b,o,M);return s?[l,d]:[d,l]}}n=o,u=v;break}}},t})(N),x=(function(h){$(t,h);function t(){return h!==null&&h.apply(this,arguments)||this}return t})(_),oa=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polygon",r}return t.prototype.getDefaultShape=function(){return new x},t.prototype.buildPath=function(l,r){var f=r.points,i=r.stackedOnPoints,a=0,n=f.length/2,u=r.smoothMonotone;if(r.connectNulls){for(;n>0&&F(f[n*2-2],f[n*2-1]);n--);for(;a<n&&F(f[a*2],f[a*2+1]);a++);}for(;a<n;){var s=Z(l,f,a,n,n,1,r.smooth,u,r.connectNulls);Z(l,i,a+s-1,s,n,-1,r.stackedOnSmooth,u,r.connectNulls),a+=s+1,l.closePath()}},t})(N);function aa(h,t,l,r,f){var i=h.getArea(),a=i.x,n=i.y,u=i.width,s=i.height,w=l.get(["lineStyle","width"])||0;a-=w/2,n-=w/2,u+=w,s+=w,u=Math.ceil(u),a!==Math.floor(a)&&(a=Math.floor(a),u++);var c=new S({shape:{x:a,y:n,width:u,height:s}});if(t){var q=h.getBaseAxis(),P=q.isHorizontal(),e=q.inverse;P?(e&&(c.shape.x+=u),c.shape.width=0):(e||(c.shape.y+=s),c.shape.height=0);var b=y(f)?function(p){f(p,c)}:null;X(c,{shape:{width:u,height:s,x:a,y:n}},l,null,r,b)}return c}function ra(h,t,l){var r=h.getArea(),f=H(r.r0,1),i=H(r.r,1),a=new Y({shape:{cx:H(h.cx,1),cy:H(h.cy,1),r0:f,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(t){var n=h.getBaseAxis().dim==="angle";n?a.shape.endAngle=r.startAngle:a.shape.r=f,X(a,{shape:{endAngle:r.endAngle,r:i}},l)}return a}function va(h,t,l,r,f){if(h){if(h.type==="polar")return ra(h,t,l);if(h.type==="cartesian2d")return aa(h,t,l,r,f)}else return null;return null}export{ta as E,oa as a,ra as b,aa as c,va as d};
1
+ import{_ as $,am as I,an as L,P as N,ao as O,ap as H,M as Y,j as X,R as S,o as y}from"./echarts-runtime-BTfAtt-4.js";var R=Math.min,j=Math.max;function F(h,t){return isNaN(h)||isNaN(t)}function Z(h,t,l,r,f,i,a,n,u){for(var s,w,c,q,P,e,b=l,p=0;p<r;p++){var o=t[b*2],v=t[b*2+1];if(b>=f||b<0)break;if(F(o,v)){if(u){b+=i;continue}break}if(b===l)h[i>0?"moveTo":"lineTo"](o,v),c=o,q=v;else{var T=o-s,d=v-w;if(T*T+d*d<.5){b+=i;continue}if(a>0){for(var A=b+i,k=t[A*2],M=t[A*2+1];k===o&&M===v&&p<r;)p++,A+=i,b+=i,k=t[A*2],M=t[A*2+1],o=t[b*2],v=t[b*2+1],T=o-s,d=v-w;var W=p+1;if(u)for(;F(k,M)&&W<r;)W++,A+=i,k=t[A*2],M=t[A*2+1];var G=.5,z=0,B=0,m=void 0,g=void 0;if(W>=r||F(k,M))P=o,e=v;else{z=k-s,B=M-w;var J=o-s,Q=k-o,U=v-w,V=M-v,D=void 0,E=void 0;if(n==="x"){D=Math.abs(J),E=Math.abs(Q);var C=z>0?1:-1;P=o-C*D*a,e=v,m=o+C*E*a,g=v}else if(n==="y"){D=Math.abs(U),E=Math.abs(V);var K=B>0?1:-1;P=o,e=v-K*D*a,m=o,g=v+K*E*a}else D=Math.sqrt(J*J+U*U),E=Math.sqrt(Q*Q+V*V),G=E/(E+D),P=o-z*a*(1-G),e=v-B*a*(1-G),m=o+z*a*G,g=v+B*a*G,m=R(m,j(k,o)),g=R(g,j(M,v)),m=j(m,R(k,o)),g=j(g,R(M,v)),z=m-o,B=g-v,P=o-z*D/E,e=v-B*D/E,P=R(P,j(s,o)),e=R(e,j(w,v)),P=j(P,R(s,o)),e=j(e,R(w,v)),z=o-P,B=v-e,m=o+z*E/D,g=v+B*E/D}h.bezierCurveTo(c,q,P,e,o,v),c=m,q=g}else h.lineTo(o,v)}s=o,w=v,b+=i}return p}var _=(function(){function h(){this.smooth=0,this.smoothConstraint=!0}return h})(),ta=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polyline",r}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _},t.prototype.buildPath=function(l,r){var f=r.points,i=0,a=f.length/2;if(r.connectNulls){for(;a>0&&F(f[a*2-2],f[a*2-1]);a--);for(;i<a&&F(f[i*2],f[i*2+1]);i++);}for(;i<a;)i+=Z(l,f,i,a,a,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},t.prototype.getPointOn=function(l,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var f=this.path,i=f.data,a=I.CMD,n,u,s=r==="x",w=[],c=0;c<i.length;){var q=i[c++],P=void 0,e=void 0,b=void 0,p=void 0,o=void 0,v=void 0,T=void 0;switch(q){case a.M:n=i[c++],u=i[c++];break;case a.L:if(P=i[c++],e=i[c++],T=s?(l-n)/(P-n):(l-u)/(e-u),T<=1&&T>=0){var d=s?(e-u)*T+u:(P-n)*T+n;return s?[l,d]:[d,l]}n=P,u=e;break;case a.C:P=i[c++],e=i[c++],b=i[c++],p=i[c++],o=i[c++],v=i[c++];var A=s?L(n,P,b,o,l,w):L(u,e,p,v,l,w);if(A>0)for(var k=0;k<A;k++){var M=w[k];if(M<=1&&M>=0){var d=s?O(u,e,p,v,M):O(n,P,b,o,M);return s?[l,d]:[d,l]}}n=o,u=v;break}}},t})(N),x=(function(h){$(t,h);function t(){return h!==null&&h.apply(this,arguments)||this}return t})(_),oa=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polygon",r}return t.prototype.getDefaultShape=function(){return new x},t.prototype.buildPath=function(l,r){var f=r.points,i=r.stackedOnPoints,a=0,n=f.length/2,u=r.smoothMonotone;if(r.connectNulls){for(;n>0&&F(f[n*2-2],f[n*2-1]);n--);for(;a<n&&F(f[a*2],f[a*2+1]);a++);}for(;a<n;){var s=Z(l,f,a,n,n,1,r.smooth,u,r.connectNulls);Z(l,i,a+s-1,s,n,-1,r.stackedOnSmooth,u,r.connectNulls),a+=s+1,l.closePath()}},t})(N);function aa(h,t,l,r,f){var i=h.getArea(),a=i.x,n=i.y,u=i.width,s=i.height,w=l.get(["lineStyle","width"])||0;a-=w/2,n-=w/2,u+=w,s+=w,u=Math.ceil(u),a!==Math.floor(a)&&(a=Math.floor(a),u++);var c=new S({shape:{x:a,y:n,width:u,height:s}});if(t){var q=h.getBaseAxis(),P=q.isHorizontal(),e=q.inverse;P?(e&&(c.shape.x+=u),c.shape.width=0):(e||(c.shape.y+=s),c.shape.height=0);var b=y(f)?function(p){f(p,c)}:null;X(c,{shape:{width:u,height:s,x:a,y:n}},l,null,r,b)}return c}function ra(h,t,l){var r=h.getArea(),f=H(r.r0,1),i=H(r.r,1),a=new Y({shape:{cx:H(h.cx,1),cy:H(h.cy,1),r0:f,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(t){var n=h.getBaseAxis().dim==="angle";n?a.shape.endAngle=r.startAngle:a.shape.r=f,X(a,{shape:{endAngle:r.endAngle,r:i}},l)}return a}function va(h,t,l,r,f){if(h){if(h.type==="polar")return ra(h,t,l);if(h.type==="cartesian2d")return aa(h,t,l,r,f)}else return null;return null}export{ta as E,oa as a,ra as b,aa as c,va as d};
@@ -0,0 +1 @@
1
+ import{H as t,N as c,as as m,at as o}from"./echarts-runtime-BTfAtt-4.js";function S(e,a,n){a=t(a)&&{coordDimensions:a}||c({encodeDefine:e.getEncode()},a);var r=e.getSource(),s=m(r,a).dimensions,i=new o(s,e);return i.initData(r,n),i}export{S as c};