@cloudhal/cli 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/starters/blog/package.json +4 -4
- package/dist/assets/starters/blog/src/pages/[...path]/llms.txt.ts +2 -1
- package/dist/assets/starters/blog/src/pages/[...path]/rss.xml.ts +2 -1
- package/dist/assets/starters/blog/src/pages/[...path].astro +8 -1
- package/dist/assets/starters/blog/src/pages/llms.txt.ts +2 -1
- package/dist/assets/starters/blog/src/pages/rss.xml.ts +2 -1
- package/dist/assets/starters/blog/src/pages/sitemap.xml.ts +2 -1
- package/dist/assets/studio/assets/{AccountPage-Dgdy4H1z.js → AccountPage-ggS9UUIE.js} +2 -2
- package/dist/assets/studio/assets/{ActivityPage-Bu56R6E7.js → ActivityPage-CBHgQ-yG.js} +2 -2
- package/dist/assets/studio/assets/{AgentModes-D695kSbw.js → AgentModes-D6DVJBf9.js} +2 -2
- package/dist/assets/studio/assets/{AgentsPage-BWlLRFPH.js → AgentsPage-JU7ZRoat.js} +2 -2
- package/dist/assets/studio/assets/{AnalyticsPage-C0RPBuUR.js → AnalyticsPage-CGGGe6_b.js} +2 -2
- package/dist/assets/studio/assets/{ApprovalsPage-B1398iby.js → ApprovalsPage-DWFNM6Ze.js} +3 -3
- package/dist/assets/studio/assets/{ArticleEditorPage-jOUCZ_79.js → ArticleEditorPage-BelTx0Yd.js} +3 -3
- package/dist/assets/studio/assets/{ArticlesPage-CbpeF5qT.js → ArticlesPage-DVi_sUdb.js} +3 -3
- package/dist/assets/studio/assets/{AssetPage-DZr_G7__.js → AssetPage-yXEtQVZx.js} +2 -2
- package/dist/assets/studio/assets/{Audit-DrQvb5mu.js → Audit-Bj4hKGvX.js} +2 -2
- package/dist/assets/studio/assets/{AuditBadges-BVr05Xyt.js → AuditBadges-DsQypHU0.js} +2 -2
- package/dist/assets/studio/assets/{AutomationsPage-CfS05QHu.js → AutomationsPage-CSGJPSLD.js} +2 -2
- package/dist/assets/studio/assets/{BlockSection-Cy4Qt5cS.js → BlockSection-Di7jTvtZ.js} +2 -2
- package/dist/assets/studio/assets/{BodyChanges-Kz6YliT_.js → BodyChanges-C1-Xwvek.js} +2 -2
- package/dist/assets/studio/assets/{BodyEditor-Dk-GQfp9.js → BodyEditor-BVAGHfXr.js} +3 -3
- package/dist/assets/studio/assets/{BuildPage-ohS6E6nm.js → BuildPage-DcLLN1ma.js} +2 -2
- package/dist/assets/studio/assets/{CodeHighlighted-uUDbvdKY.js → CodeHighlighted-DOw6b1bt.js} +2 -2
- package/dist/assets/studio/assets/{CollectionSettingsPage-3e_npZNv.js → CollectionSettingsPage-BFeuG6sT.js} +3 -3
- package/dist/assets/studio/assets/{CollectionsPage-DqM5_dJR.js → CollectionsPage-phBheohi.js} +2 -2
- package/dist/assets/studio/assets/{CommandMenu-Cedh4xtl.js → CommandMenu-DS8HM4lA.js} +2 -2
- package/dist/assets/studio/assets/{CommentThreadControls-CmD52U5z.js → CommentThreadControls-DHa1bT8S.js} +2 -2
- package/dist/assets/studio/assets/{CommentThreadPage-CX87ADPi.js → CommentThreadPage-FzYqOoP3.js} +2 -2
- package/dist/assets/studio/assets/{CommenterPage-C-Vv0BQK.js → CommenterPage-Bl1qV3R2.js} +2 -2
- package/dist/assets/studio/assets/{Comments-4cWUXtON.js → Comments-BIVjghhz.js} +2 -2
- package/dist/assets/studio/assets/{CommentsPage-Bc2nVm6x.js → CommentsPage-DWSZXdHw.js} +2 -2
- package/dist/assets/studio/assets/{ConfirmDialog-DH2jGk29.js → ConfirmDialog-Bf659Mn7.js} +2 -2
- package/dist/assets/studio/assets/{ContentListQuery-BuxxdIsz.js → ContentListQuery-CIViU6IK.js} +2 -2
- package/dist/assets/studio/assets/{Crumbs-Bg-oOv-g.js → Crumbs-5tQR5Osw.js} +2 -2
- package/dist/assets/studio/assets/{DateTimeField-DlaSbbAW.js → DateTimeField-D1NFyyzi.js} +2 -2
- package/dist/assets/studio/assets/{EditorLayout-Dp_3DB2G.js → EditorLayout-DxQ1u__q.js} +2 -2
- package/dist/assets/studio/assets/{EditorPreview-CLPIy9Da.js → EditorPreview-CeTh-BQN.js} +2 -2
- package/dist/assets/studio/assets/{Elevation-CpzbzjZ1.js → Elevation-DVz-VGqG.js} +2 -2
- package/dist/assets/studio/assets/{ElevationRequest-DGZR_Qu7.js → ElevationRequest-DxXqYdb2.js} +2 -2
- package/dist/assets/studio/assets/{EndedBadge-CuESOF9v.js → EndedBadge-CK-X3wqB.js} +2 -2
- package/dist/assets/studio/assets/{EntryFieldsCard-DpfwTRoT.js → EntryFieldsCard-hMhYYmmw.js} +2 -2
- package/dist/assets/studio/assets/{EntryPath-DBK2nqWS.js → EntryPath-C7FxCw7K.js} +2 -2
- package/dist/assets/studio/assets/FieldsSection-Bvgduen-.js +2 -0
- package/dist/assets/studio/assets/{ForgotPasswordPage-4T_xsZc7.js → ForgotPasswordPage-CFRffUGl.js} +2 -2
- package/dist/assets/studio/assets/{Gating-BKw9x3OA.js → Gating-BkQJUYlE.js} +2 -2
- package/dist/assets/studio/assets/{GovernanceDialog-WI6muWSG.js → GovernanceDialog-jTEWGW2z.js} +2 -2
- package/dist/assets/studio/assets/{InvitePage-BWcoBszO.js → InvitePage-D15Yv4v5.js} +2 -2
- package/dist/assets/studio/assets/{ListFieldColumns-DLqDR_nL.js → ListFieldColumns-CR_tsgd3.js} +2 -2
- package/dist/assets/studio/assets/{ListToolbar-_lpYaeal.js → ListToolbar-CQucqlsm.js} +2 -2
- package/dist/assets/studio/assets/{ListingSections-lyTz_PaH.js → ListingSections-6bDGWjVe.js} +2 -2
- package/dist/assets/studio/assets/LoginPage-BefSOX9E.js +2 -0
- package/dist/assets/studio/assets/{MediaPage-DaCldFys.js → MediaPage-CtlG6jQp.js} +2 -2
- package/dist/assets/studio/assets/{MediaPicker-DYJj3Gtp.js → MediaPicker-DUPqmqrb.js} +2 -2
- package/dist/assets/studio/assets/{MediaUpload-DuQnkN1u.js → MediaUpload-CYAkvtRE.js} +2 -2
- package/dist/assets/studio/assets/{MembersPage-fMlwYa1x.js → MembersPage-CIf5O-RB.js} +2 -2
- package/dist/assets/studio/assets/{Menus-Dym_0ijH.js → Menus-CmH6vunK.js} +2 -2
- package/dist/assets/studio/assets/{NavigationPage-CTQt0njO.js → NavigationPage-qKIv_U8O.js} +2 -2
- package/dist/assets/studio/assets/{NewSiteDialog-DVWeKGsw.js → NewSiteDialog-CpO2fd2Q.js} +2 -2
- package/dist/assets/studio/assets/{NotificationItems--5FaR3tN.js → NotificationItems-HcSZxZEQ.js} +2 -2
- package/dist/assets/studio/assets/{PageEditorPage-BlG2sPAB.js → PageEditorPage-Bh5m9ie9.js} +3 -3
- package/dist/assets/studio/assets/{PagesPage-BXU3jxTQ.js → PagesPage-D0kir6Qa.js} +2 -2
- package/dist/assets/studio/assets/{PasswordField-1kzPgqLo.js → PasswordField-BwLcXkWe.js} +2 -2
- package/dist/assets/studio/assets/{PreviewPanel-3eVWgDDN.js → PreviewPanel-BGpAUen8.js} +2 -2
- package/dist/assets/studio/assets/{ProjectPage-CdYFYMv3.js → ProjectPage-BMQemtWA.js} +2 -2
- package/dist/assets/studio/assets/{Readers-BwBWWzB-.js → Readers-BgU1fsew.js} +3 -3
- package/dist/assets/studio/assets/{RedirectDialog-BqlclE-n.js → RedirectDialog-bPr8OErT.js} +2 -2
- package/dist/assets/studio/assets/{RedirectsPage-Bpnn14p_.js → RedirectsPage-DpGCP2H9.js} +2 -2
- package/dist/assets/studio/assets/{RelativeTime-B3WDq_Ti.js → RelativeTime-BoL63n83.js} +2 -2
- package/dist/assets/studio/assets/{ReleaseApproval-CEM7iJKI.js → ReleaseApproval-CiowWHD6.js} +2 -2
- package/dist/assets/studio/assets/{ReleasePage-B9db-dEu.js → ReleasePage-Cmn4XIN9.js} +2 -2
- package/dist/assets/studio/assets/{ReleaseParts-CI9sIfLw.js → ReleaseParts-BtPkXJe8.js} +2 -2
- package/dist/assets/studio/assets/{ResetPasswordPage-C24Mv9le.js → ResetPasswordPage-CU03agQd.js} +2 -2
- package/dist/assets/studio/assets/{RowMenu-CvvLvp2V.js → RowMenu-BpCKOA6h.js} +2 -2
- package/dist/assets/studio/assets/{ScheduleCard-CTZ7DyA9.js → ScheduleCard-OsQEonW7.js} +2 -2
- package/dist/assets/studio/assets/{ScheduleDialog-TQgKxIsr.js → ScheduleDialog-CkD7o8BA.js} +2 -2
- package/dist/assets/studio/assets/{ScheduleHistoryPage-9lUX1OC9.js → ScheduleHistoryPage-Dyx8zWBn.js} +2 -2
- package/dist/assets/studio/assets/{ScheduleStatusBadge-CLqNp1Rc.js → ScheduleStatusBadge-BD-R8Xhm.js} +2 -2
- package/dist/assets/studio/assets/{SchedulerStalled-mEbvw7Q_.js → SchedulerStalled-D-r-bG15.js} +2 -2
- package/dist/assets/studio/assets/{Schedules-7od0mh_y.js → Schedules-WRBznpP3.js} +2 -2
- package/dist/assets/studio/assets/{SchedulesPage-Cj-QwGdy.js → SchedulesPage-CeVUW7M1.js} +2 -2
- package/dist/assets/studio/assets/{ScopeBadge-J87LKFHA.js → ScopeBadge-DhZzXufT.js} +2 -2
- package/dist/assets/studio/assets/{Seo-YV7wVEPY.js → Seo-D0glat-v.js} +2 -2
- package/dist/assets/studio/assets/{SeoPreview-CAaNUyjg.js → SeoPreview-8x-utwvr.js} +2 -2
- package/dist/assets/studio/assets/{Settings-DX31HFBM.js → Settings-vhQ4tSVQ.js} +2 -2
- package/dist/assets/studio/assets/{SiteAccessField-DQaQg5ez.js → SiteAccessField-B6QH60a2.js} +2 -2
- package/dist/assets/studio/assets/{SiteOverviewPage-lk4wap0q.js → SiteOverviewPage-Cs2Ofrps.js} +3 -3
- package/dist/assets/studio/assets/{SiteSettingsPage-mCQPDJzA.js → SiteSettingsPage-Dp6lKKC8.js} +2 -2
- package/dist/assets/studio/assets/{SitesPage-gxcSR0ad.js → SitesPage-C0cnFUkv.js} +2 -2
- package/dist/assets/studio/assets/{SkillsPage-_ZUdPF2E.js → SkillsPage-CikouwvX.js} +2 -2
- package/dist/assets/studio/assets/{SnapshotsPage-DLUbZ563.js → SnapshotsPage-Bmf7BZj6.js} +2 -2
- package/dist/assets/studio/assets/{StatTile-KhE3fINB.js → StatTile-Dgy33jEu.js} +2 -2
- package/dist/assets/studio/assets/{Status-W9nLsw86.js → Status-WIcIPfpv.js} +2 -2
- package/dist/assets/studio/assets/{StatusActions-CqCXSQ46.js → StatusActions-CMVNwBJb.js} +3 -3
- package/dist/assets/studio/assets/{TableSkeleton-SmOOTzX3.js → TableSkeleton-kZirmJfM.js} +2 -2
- package/dist/assets/studio/assets/{TagsMigration-rd5JiDwq.js → TagsMigration-cyJ961N5.js} +2 -2
- package/dist/assets/studio/assets/{Taxonomy-CZjclj3o.js → Taxonomy-Ds_0dNU6.js} +2 -2
- package/dist/assets/studio/assets/{TaxonomyPage-DqlGIFcb.js → TaxonomyPage-DA-_Tzim.js} +2 -2
- package/dist/assets/studio/assets/{TaxonomySettingsDialog-Bn2QdsNY.js → TaxonomySettingsDialog-CwBMKZZ1.js} +2 -2
- package/dist/assets/studio/assets/{TermEditorPage-BoW7eXoX.js → TermEditorPage-CrKYv25t.js} +2 -2
- package/dist/assets/studio/assets/{TermPickers-BMXiPCa0.js → TermPickers-eqJn6_fi.js} +2 -2
- package/dist/assets/studio/assets/{TranslationList-7PC6LAd9.js → TranslationList-Yj7mW5L-.js} +2 -2
- package/dist/assets/studio/assets/{TranslationsPage--a62-gT6.js → TranslationsPage-DVHq8tG8.js} +2 -2
- package/dist/assets/studio/assets/{api-errors-tZYwLeo6.js → api-errors-CrlMh7Uh.js} +2 -2
- package/dist/assets/studio/assets/{ar-BUKtNVP6.js → ar-kwcrV10j.js} +2 -2
- package/dist/assets/studio/assets/auth-BzR8abXz.js +4 -0
- package/dist/assets/studio/assets/body-blocks-CZh36LZ-.js +6 -0
- package/dist/assets/studio/assets/{charts-DS4cDmaj.js → charts-DWHcHyjN.js} +2 -2
- package/dist/assets/studio/assets/{collapsible-l8g94on4w7qfosmn-ClVVSlmf.js → collapsible-l8g94on4w7qfosmn-D_uRnC33.js} +2 -2
- package/dist/assets/studio/assets/{collection-icons-D-IZFMkB.js → collection-icons-Bv8JHANh.js} +2 -2
- package/dist/assets/studio/assets/{combobox-hdxtsm2gqcxxgfju-DhX6ZIcI.js → combobox-hdxtsm2gqcxxgfju-aGVFBrpM.js} +2 -2
- package/dist/assets/studio/assets/{de-DWHO_HkU.js → de-C-Bbcibt.js} +2 -2
- package/dist/assets/studio/assets/{deleteLabels-DH7Oba8-.js → deleteLabels-CehHXeUA.js} +2 -2
- package/dist/assets/studio/assets/{editor-BrVbznPe.js → editor-BtMefDTK.js} +75 -69
- package/dist/assets/studio/assets/{es-C07OD_XS.js → es-DRXEyf0l.js} +2 -2
- package/dist/assets/studio/assets/{fa-Cgls-bgZ.js → fa-C1MtIlym.js} +2 -2
- package/dist/assets/studio/assets/{fields-BnrW0cTr.js → fields-DLi4pT7p.js} +2 -2
- package/dist/assets/studio/assets/{fields-3PygkO_o.js → fields-Hz5JsMmY.js} +2 -2
- package/dist/assets/studio/assets/{fr-QRT6iq33.js → fr-B396areL.js} +2 -2
- package/dist/assets/studio/assets/{he-CBKpkqQI.js → he-CZwil4jG.js} +2 -2
- package/dist/assets/studio/assets/{hi-eQ3OUtm4.js → hi-Crgk0N23.js} +2 -2
- package/dist/assets/studio/assets/{i18n-BsaF_Usk.js → i18n-Dab0ajqW.js} +3 -3
- package/dist/assets/studio/assets/{id-C93G1k_A.js → id-Z3wSQ21N.js} +2 -2
- package/dist/assets/studio/assets/{index-CRaauoqY.js → index-B2hMMgOI.js} +3 -3
- package/dist/assets/studio/assets/{it-DYqXpRiP.js → it-D_e5w1W5.js} +2 -2
- package/dist/assets/studio/assets/{ja-D9n_rxyV.js → ja-XexIMFCE.js} +2 -2
- package/dist/assets/studio/assets/{ko-hS1dOTFu.js → ko-BphIzzGa.js} +2 -2
- package/dist/assets/studio/assets/{layer-dialog-j5ywmzs46ccg6oqy-a5UYrx-X.js → layer-dialog-j5ywmzs46ccg6oqy-C3eIOyE1.js} +2 -2
- package/dist/assets/studio/assets/{listings-BBpJYnXK.js → listings-laPwX-2R.js} +2 -2
- package/dist/assets/studio/assets/media-B_VCak1g.js +21 -0
- package/dist/assets/studio/assets/names-CEhVexDU.js +2 -0
- package/dist/assets/studio/assets/{nl-Dh6z5Vys.js → nl-D2pGOej6.js} +2 -2
- package/dist/assets/studio/assets/{pl-ClD48bGQ.js → pl-BdQ-KeLm.js} +2 -2
- package/dist/assets/studio/assets/{pt-BR-B1t2IuB6.js → pt-BR-lI2va4Ax.js} +2 -2
- package/dist/assets/studio/assets/{ru-1Ypf-SpC.js → ru-BuBa5alG.js} +2 -2
- package/dist/assets/studio/assets/{tag-input-ohfybx5dbxy3houy-Bfh3Yb-x.js → tag-input-ohfybx5dbxy3houy-2CqNGu-I.js} +2 -2
- package/dist/assets/studio/assets/{taxonomy-S-y5xbUa.js → taxonomy--7w0Tr-W.js} +2 -2
- package/dist/assets/studio/assets/{tr-CYoHJpqA.js → tr-2tUDztjs.js} +2 -2
- package/dist/assets/studio/assets/{uk-UznF4_3D.js → uk-D-x13N_h.js} +2 -2
- package/dist/assets/studio/assets/{useAnalyticsCard-DkpiYb5T.js → useAnalyticsCard-3ehEghuO.js} +2 -2
- package/dist/assets/studio/assets/{useCollectionView-Cj_hlmHt.js → useCollectionView-BjScbQsQ.js} +3 -3
- package/dist/assets/studio/assets/{useLiveSite-BCjxnCp4.js → useLiveSite-BXT7Tep7.js} +2 -2
- package/dist/assets/studio/assets/{useMe-CxI04z9a.js → useMe-BQDOgqHt.js} +2 -2
- package/dist/assets/studio/assets/{usePaging-4q9qSaT2.js → usePaging-Mr18xaY2.js} +2 -2
- package/dist/assets/studio/assets/workflow-C0gUEP9L.js +2 -0
- package/dist/assets/studio/assets/{zh-Hans-3w2oZuI1.js → zh-Hans-hT5IaMLb.js} +2 -2
- package/dist/assets/studio/index.html +7 -7
- package/dist/src/cli/commands-local.js +4 -0
- package/dist/src/cli/help.d.ts +1 -2
- package/dist/src/cli/help.js +40 -13
- package/dist/src/commands/init.d.ts +12 -0
- package/dist/src/commands/init.js +28 -9
- package/dist/src/commands/studio-auth.d.ts +52 -0
- package/dist/src/commands/studio-auth.js +130 -0
- package/dist/src/commands/studio-options.d.ts +22 -6
- package/dist/src/commands/studio-options.js +79 -17
- package/dist/src/commands/studio.d.ts +17 -6
- package/dist/src/commands/studio.js +68 -22
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +2 -1
- package/package.json +13 -13
- package/dist/assets/studio/assets/FieldsSection-B-_c-cLU.js +0 -2
- package/dist/assets/studio/assets/LoginPage-blPVGXvN.js +0 -2
- package/dist/assets/studio/assets/auth-BsoY4NJQ.js +0 -4
- package/dist/assets/studio/assets/body-blocks-DCP3w1pD.js +0 -6
- package/dist/assets/studio/assets/media-f6By4NWo.js +0 -21
- package/dist/assets/studio/assets/names-R-Dypr9Y.js +0 -2
- package/dist/assets/studio/assets/workflow-D1TOv5ea.js +0 -2
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t}from"./react-iRJfyluG.js";var n=`1.7.17`;function r(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var i=r({FAILED_TO_CREATE_USER:`Failed to create user`,USER_ALREADY_EXISTS:`User already exists.`,USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:`User already exists. Use another email.`,YOU_CANNOT_BAN_YOURSELF:`You cannot ban yourself`,YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:`You are not allowed to change users role`,YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:`You are not allowed to create users`,YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:`You are not allowed to list users`,YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:`You are not allowed to list users sessions`,YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:`You are not allowed to ban users`,YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:`You are not allowed to impersonate users`,YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:`You are not allowed to revoke users sessions`,YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:`You are not allowed to delete users`,YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:`You are not allowed to set users password`,BANNED_USER:`You have been banned from this application`,YOU_ARE_NOT_ALLOWED_TO_GET_USER:`You are not allowed to get user`,NO_DATA_TO_UPDATE:`No data to update`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS:`You are not allowed to update users`,YOU_CANNOT_REMOVE_YOURSELF:`You cannot remove yourself`,YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:`You are not allowed to set a non-existent role value`,YOU_CANNOT_IMPERSONATE_ADMINS:`You cannot impersonate admins`,INVALID_ROLE_TYPE:`Invalid role type`,YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL:`You are not allowed to update users email`,YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PHONE_NUMBER:`You are not allowed to update users phone number`,PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER:`Password cannot be updated through update-user. Use the set-user-password endpoint instead`,USER_ID_CANNOT_BE_UPDATED:`User id cannot be updated`});function a(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function o(e){let t=e.split(`
|
|
2
|
+
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
3
|
+
at `))}function s(e,t){class n extends e{#e;constructor(...e){if(a()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=o(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var c={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};s(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:c[e]){if(super(t?.message,t&&`cause`in t?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,t&&`cause`in t){let{cause:e,...n}=t;this.body=Object.defineProperty(n,"cause",{value:e,writable:!0,configurable:!0})}else this.body=t}},Error);var l=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function u(e){return{success:!1,error:`You are not allowed to access resource: ${e}`}}function d(e){return{success:!1,error:`unauthorized to access resource "${e}"`}}function f(e){return e===`OR`?`OR`:`AND`}function p(e){return Array.isArray(e)}function m(e){if(p(e))return{actions:e,connector:`AND`};if(!e||typeof e!=`object`)throw new l(`Invalid access control request`);let{actions:t,connector:n}=e;return p(t)?{actions:t,connector:f(n)}:{actions:[],connector:f(n)}}function h(e,t){return typeof t==`string`&&e.includes(t)}function g(e,{actions:t,connector:n}){return t.length===0?!1:n===`OR`?t.some(t=>h(e,t)):t.every(t=>h(e,t))}function _(e){return{authorize(t,n=`AND`){let r=!1;for(let[i,a]of Object.entries(t)){let t=e[i];if(!t){if(n===`AND`)return u(i);continue}let o=g(t,m(a));if(o&&(r=!0),o&&n===`OR`)return{success:!0};if(!o&&n===`AND`)return d(i)}return r?{success:!0}:{success:!1,error:`Not authorized`}},statements:e}}function v(e){return{newRole(e){return _(e)},statements:e}}var y=v({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`impersonate-admins`,`delete`,`set-password`,`set-email`,`set-phone`,`get`,`update`],session:[`list`,`revoke`,`delete`]}),b=y.newRole({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`delete`,`set-password`,`set-email`,`set-phone`,`get`,`update`],session:[`list`,`revoke`,`delete`]}),x=y.newRole({user:[],session:[]}),S={admin:b,user:x},ee=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions)return!1;let t=(e.role||e.options?.defaultRole||`user`).split(`,`),n=e.options?.roles||S;for(let r of t)if(n[r]?.authorize(e.permissions)?.success)return!0;return!1},C=e=>{let t={admin:b,user:x,...e?.roles};return{id:`admin-client`,version:n,$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>ee({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions})}}),pathMethods:{"/admin/list-users":`GET`,"/admin/impersonate-user":`POST`,"/admin/stop-impersonating":`POST`},atomListeners:[{matcher:e=>e===`/admin/impersonate-user`||e===`/admin/stop-impersonating`,signal:`$sessionSignal`}],$ERROR_CODES:i}},w=Object.create(null),T=e=>({}),E=new Proxy(w,{get(e,t){return T()[t]??w[t]},has(e,t){return t in T()||t in w},set(e,t,n){let r=T(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=T(!0);return delete n[t],!0},ownKeys(){let e=T(!0);return Object.keys(e)}});E.NODE_ENV;function D(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return D(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return D(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return D(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return D(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return D(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return D(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return D(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var te=47;function ne(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===te;)t--;return t===e.length?e:e.slice(0,t)}function re(e){try{return(ne(new URL(e).pathname)||`/`)!==`/`}catch{throw new l(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function ie(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new l(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof l?t:new l(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function O(e,t=`/api/auth`){if(ie(e),re(e))return e;let n=ne(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function ae(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function oe(e,t,n,r,i){if(e)return O(e,t);if(r!==!1){let e=E.BETTER_AUTH_URL||E.NEXT_PUBLIC_BETTER_AUTH_URL||E.PUBLIC_BETTER_AUTH_URL||E.NUXT_PUBLIC_BETTER_AUTH_URL||E.NUXT_PUBLIC_AUTH_URL||(E.BASE_URL===`/`?void 0:E.BASE_URL);if(e)return O(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&ae(o,`proto`)&&ae(a,`host`))try{return O(`${o}://${a}`,t)}catch{}if(n){let e=se(n.url);if(!e)throw new l(`Could not get origin from request. Please provide a valid base URL.`);return O(e,t)}if(typeof window<`u`&&window.location)return O(window.location.origin,t)}function se(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var ce=[`javascript:`,`data:`,`vbscript:`];function le(e){let t;try{t=new URL(e)}catch{return!0}return!ce.includes(t.protocol)}var ue=r({YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:`You are not allowed to create a new organization`,YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:`You have reached the maximum number of organizations`,ORGANIZATION_ALREADY_EXISTS:`Organization already exists`,ORGANIZATION_SLUG_ALREADY_TAKEN:`Organization slug already taken`,ORGANIZATION_NOT_FOUND:`Organization not found`,USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:`User is not a member of the organization`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:`You are not allowed to update this organization`,YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:`You are not allowed to delete this organization`,NO_ACTIVE_ORGANIZATION:`No active organization`,USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:`User is already a member of this organization`,MEMBER_NOT_FOUND:`Member not found`,ROLE_NOT_FOUND:`Role not found`,YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:`You are not allowed to create a new team`,TEAM_ALREADY_EXISTS:`Team already exists`,TEAM_NOT_FOUND:`Team not found`,YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:`You cannot leave the organization as the only owner`,YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER:`You cannot leave the organization without an owner`,YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:`You are not allowed to delete this member`,YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:`You are not allowed to invite users to this organization`,USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:`User is already invited to this organization`,INVITATION_NOT_FOUND:`Invitation not found`,YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:`You are not the recipient of the invitation`,EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION:`Email verification required before accepting or rejecting invitation`,EMAIL_VERIFICATION_REQUIRED_FOR_INVITATION:`Email verification required to view or list invitations for the session email`,YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:`You are not allowed to cancel this invitation`,YOU_ARE_NOT_ALLOWED_TO_LIST_INVITATIONS:`You are not allowed to list invitations for this organization`,INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:`Inviter is no longer a member of the organization`,YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:`You are not allowed to invite a user with this role`,FAILED_TO_RETRIEVE_INVITATION:`Failed to retrieve invitation`,YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:`You have reached the maximum number of teams`,UNABLE_TO_REMOVE_LAST_TEAM:`Unable to remove last team`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:`You are not allowed to update this member`,ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:`Organization membership limit reached`,YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:`You are not allowed to create teams in this organization`,YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:`You are not allowed to delete teams in this organization`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:`You are not allowed to update this team`,YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:`You are not allowed to delete this team`,INVITATION_LIMIT_REACHED:`Invitation limit reached`,TEAM_MEMBER_LIMIT_REACHED:`Team member limit reached`,USER_IS_NOT_A_MEMBER_OF_THE_TEAM:`User is not a member of the team`,YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM:`You are not allowed to list the members of this team`,YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM:`You do not have an active team`,YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER:`You are not allowed to create a new member`,YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER:`You are not allowed to remove a team member`,YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION:`You are not allowed to access this organization as an owner`,YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION:`You are not a member of this organization`,MISSING_AC_INSTANCE:`Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information`,YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE:`You must be in an organization to create a role`,YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE:`You are not allowed to create a role`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE:`You are not allowed to update a role`,YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE:`You are not allowed to delete a role`,YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE:`You are not allowed to read a role`,YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE:`You are not allowed to list a role`,YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE:`You are not allowed to get a role`,TOO_MANY_ROLES:`This organization has too many roles`,INVALID_RESOURCE:`The provided permission includes an invalid resource`,ROLE_NAME_IS_ALREADY_TAKEN:`That role name is already taken`,CANNOT_DELETE_A_PRE_DEFINED_ROLE:`Cannot delete a pre-defined role`,ROLE_IS_ASSIGNED_TO_MEMBERS:`Cannot delete a role that is assigned to members. Please reassign the members to a different role first`,INVALID_TEAM_ID:`Team id contains a reserved character`}),k=[],A=0,de=null,j=4,fe=globalThis.nanostoresGlobal||={epoch:0},pe=()=>{let e,t;for(;A<k.length;){t=A,A+=j;let n=de?.get(k[t]);if(n){if(!n.has(k[t+1]))continue;n.clear()}try{k[t](k[t+1].value,k[t+2],k[t+3])}catch(t){e=t}}if(k.length=A=0,e)throw e},M=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{de?.get(e)?.delete(n);for(let t=A;t<k.length;)k[t]===e&&k[t+1]===n?k.splice(t,j):t+=j;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){fe.epoch++;let i=!k.length&&!0;for(let i of t)k.push(i,n,e,r);i&&pe()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},me=2,he=5,N=6,P=10,ge=(e,t,n,r)=>(e.events=e.events||{},e.events[n+P]||(e.events[n+P]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);~i&&(r.splice(i,1),r.length||(e.events[n+P](),delete e.events[n+P]))}),_e=(e,t)=>ge(e,t,me,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),ve=1e3,F=(e,t)=>ge(e,n=>{let r=t(n);r&&e.events[N].push(r)},he,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[N]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[N])t();e.events[N]=[]}},ve)},()=>{e.listen=n,e.off=r}});function ye(e,t){let n=xe(t),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}var be=/(.*)\[(\d+)\]/;function xe(e){return e.split(`.`).flatMap(e=>Se(e))}function Se(e){if(be.test(e)){let[,t,n]=e.match(be);return[...Se(t),n]}return[e]}function Ce(e,t,n){let r=new Set(t);return e.listen((i,a,o)=>{let s=e=>!Object.is(ye(i,e),ye(a,e));(o===void 0?t.some(t=>a===void 0||(e.eqKey?!e.eqKey(a[t],i[t],t):s(t))):r.has(o)||typeof o==`string`&&(r.has(o.split(/\.|\[/)[0])||!e.eqKey&&a!==void 0&&t.some(s)))&&n(i,a,o)})}function we(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function I(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!I(e[n],t[n]))return!1;return!0}if(we(e)&&we(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!I(e[r],t[r]))return!1;return!0}return!1}function Te(e,t){return _e(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var L=Symbol.for(`better-auth:auth-query`);function Ee(e){return L in e&&e[L]===!0}function De(e){let t=M(e);return Object.defineProperty(t,L,{value:!0}),t}var Oe=()=>typeof window>`u`;function ke(e,t){return I(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}var R=(e,t,n,r)=>{let i=De({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>o(e)});F(i,()=>Te(i,ke));let a=0,o=async e=>{let o=++a;return new Promise(s=>{let c=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...c,query:{...c?.query,...e?.query},async onSuccess(e){if(o===a){let t=i.get(),n=t.data!=null&&e.data!=null&&I(t.data,e.data)?t.data:e.data;i.set({data:n,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}await c?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(!(n&&r<n)){if(o===a){let t=e.error.status===401;i.set({error:e.error,data:t?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}await c?.onError?.(e)}},async onRequest(e){if(o===a){let e=i.get();i.set({isPending:e.data===null,data:e.data,error:null,isRefetching:!0,refetch:i.value.refetch})}await c?.onRequest?.(e)}}).catch(e=>{o===a&&i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{s(void 0)})})};e=Array.isArray(e)?e:[e];let s=!1,c=!1,l=!1,u=()=>{s?l=!0:(s=!0,o().finally(()=>{s=!1;let e=l&&c;l=!1,e&&u()}))};return F(i,()=>{if(Oe())return;c=!0;let t=!1,n,r=e.map(e=>e.listen(()=>{t?o():(t=!0,clearTimeout(n),u())}));return n=setTimeout(()=>{t=!0,u()},0),()=>{c=!1;for(let e of r)e();clearTimeout(n)}}),i},Ae=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,je={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},Me=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function Ne(e){return e instanceof Date&&!isNaN(e.getTime())}function Pe(e){let t=Me.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return Ne(f)?f:null}function Fe(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in je)return je[s];if(!Ae.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){if(n)throw Error(`[better-json] Potential prototype pollution attempt detected`);r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`)}else{if(a&&typeof t==`string`){let e=Pe(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function Ie(e,t={strict:!0}){return Fe(e,t)}var Le={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&le(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},z=Symbol.for(`better-auth:broadcast-channel`),Re=()=>Math.floor(Date.now()/1e3),ze=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(typeof window<`u`)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Re()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event===`session`&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function B(e=`better-auth.message`){return globalThis[z]||(globalThis[z]=new ze(e)),globalThis[z]}var V=Symbol.for(`better-auth:focus-manager`),Be=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function Ve(){return globalThis[V]||(globalThis[V]=new Be),globalThis[V]}var H=Symbol.for(`better-auth:online-manager`),He=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function U(){return globalThis[H]||(globalThis[H]=new He),globalThis[H]}var W=()=>Math.floor(Date.now()/1e3),Ue=5;function We(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||U().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=W(),t();else if(e?.event===`visibilitychange`){if(W()-c.lastSessionRequest<Ue)return;c.lastSessionRequest=W(),t()}else t()}},d=e=>{B().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=B().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=Ve().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=U().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=B().setup(),c.cleanupFocusSetup=Ve().setup(),c.cleanupOnlineSetup=U().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var Ge=()=>typeof window>`u`,Ke=ve;function qe(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function Je(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function Ye(e){return!e||e.session===null&&e.user===null?null:e}function Xe(e,t){return I(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Ze(e,t){let n=M(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=De({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});Te(s,Xe);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=Je(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=Je(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=Ye(i),u=s.value,d=u.data!=null&&l!=null&&I(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+Ke,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return F(s,()=>{let e;Ge()||(e=setTimeout(()=>{d()},0));let r=We({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}function G(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function K(e,t,n=`.`,r){if(!G(t))return K(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:G(a)&&G(i[t])?K(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function Qe(e){return(...t)=>t.reduce((t,n)=>K(t,n,``,e),{})}var $e=Qe(),et=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},tt=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let t=await i.init?.call(i,e.toString(),n);n=t.options||n,e=t.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},nt=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},rt=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function it(e){if(typeof e==`number`)return new nt({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new nt(e);case`exponential`:return new rt(e);default:throw Error(`Invalid retry strategy`)}}var at=[`get`,`post`,`put`,`patch`,`delete`];function q(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return at.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var ot=/^[a-z][a-z\d+.-]*:\/\/[^/?#]+/i,st=/^\/+/;function ct(e){let t=e.length;for(;t>0&&e[t-1]===`/`;)t--;return e.slice(0,t)}function J(e,t){let n=e.indexOf(t);return n===-1?[e,void 0]:[e.slice(0,n),e.slice(n+1)]}var lt=e=>e===`.`||e===`..`,ut=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function dt(e,t){let n=t.get(e);if(n===void 0)return ut(e);if(lt(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function ft(e,t){let n=new Map;if(t){if(Array.isArray(t)){let r=e.split(`/`).filter(e=>e.startsWith(`:`));for(let[e,i]of r.entries()){let r=t[e];n.set(i,String(r))}}else for(let[e,r]of Object.entries(t))n.set(`:${e}`,String(r))}return n}function pt(e,t){let n=ft(e,t);return e.split(`/`).map(e=>dt(e,n)).join(`/`)}function mt(e,t){let n=new URLSearchParams(e);for(let[e,r]of Object.entries(t||{})){if(r==null)continue;let t;if(typeof r==`string`)t=r;else if(Array.isArray(r)){for(let t of r)n.append(e,t);continue}else t=JSON.stringify(r);n.set(e,t)}let r=n.toString();return r.length>0?`?${r}`.replace(/\+/g,`%20`):``}function ht(e,t){if(!t)return e;let n=`${ct(t)}/`;return e.startsWith(n)?e.slice(n.length):e}function gt(e,t,n,r){let[i]=J(e,`#`),[a,o=``]=J(i,`?`),s=t.replace(st,``),c=mt(`${o}&${n??``}`,r),l=`${ct(a)}/${s}${c}`;return ot.test(l)?new URL(l):l}function _t(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},{path:a}=q(e),o=a===e?e:`/${a}`,s=o.match(ot)?.[0],[c,l]=J(s?o.slice(s.length):ht(o,n),`?`),u=pt(c,r);return gt(s??n??``,u,l,i)}var vt=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},yt=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function bt(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return yt.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function xt(e){try{return JSON.parse(e),!0}catch{return!1}}function St(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Ct(e){try{return JSON.parse(e)}catch{return e}}function wt(e){return typeof e==`function`}function Tt(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&wt(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&wt(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function Et(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function Dt(e){let t=new Headers(Et(e?.headers,await vt(e)));if(!t.has(`content-type`)){let n=Ot(e?.body);n&&t.set(`content-type`,n)}return t}function Ot(e){return St(e)?`application/json`:null}function kt(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function At(e,t){let{body:n}=e;return n?!St(n)||typeof n==`string`?n:kt(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function jt(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=q(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function Mt(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var Nt=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function Y(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new Nt(n.issues);return n.value}function X(e){"@babel/helpers - typeof";return X=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},X(e)}function Pt(e,t){if(X(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(X(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Ft(e){var t=Pt(e,`string`);return X(t)==`symbol`?t:t+``}function It(e,t,n){return(t=Ft(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lt(Object(n),!0).forEach(function(t){It(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Q=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await tt(e,t),o=Tt(a),s=new AbortController,c=a.signal??s.signal,l=_t(i,a),u=await Dt(a),d=At(a,u),f=jt(i,a),p=Z(Z({},a),{},{url:l,headers:u,body:d,method:f,signal:c});for(let e of r.onRequest)if(e){let t=await e(p);typeof t==`object`&&t&&Object.assign(p,t)}(`pipeTo`in p&&typeof p.pipeTo==`function`||typeof(t==null||(n=t.body)==null?void 0:n.pipe)==`function`)&&(`duplex`in p||(p.duplex=`half`));let{clearTimeout:m}=Mt(a,s),h=await o(p.url,p);m();let g={response:h,request:p};for(let e of r.onResponse)if(e){var _;let n=await e(Z(Z({},g),{},{response:t!=null&&(_=t.hookOptions)!=null&&_.cloneResponse?h.clone():h}));n instanceof Response?h=n:typeof n==`object`&&n&&(h=n.response)}if(h.ok){if(p.method===`HEAD`)return{data:``,error:null};let e=bt(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??Ct)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await Y(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e(Z(Z({},n),{},{response:t!=null&&(v=t.hookOptions)!=null&&v.cloneResponse?h.clone():h}))}return t?.throw?n.data:{data:n.data,error:null}}let y=t?.jsonParser??Ct,b=await h.text(),x=xt(b),S=x?await y(b):null,ee={response:h,responseText:b,request:p,error:Z(Z({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var C;await e(Z(Z({},ee),{},{response:t!=null&&(C=t.hookOptions)!=null&&C.cloneResponse?h.clone():h}))}if(t?.retry){let n=it(t.retry),i=t.retryAttempt??0;if(await n.shouldAttemptRetry(i,h)){for(let e of r.onRetry)e&&await e(g);let a=n.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await Q(e,Z(Z({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new et(h.status,h.statusText,x?S:b);return{data:null,error:Z(Z({},S),{},{status:h.status,statusText:h.statusText})}},Rt=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=Z(Z({},n),e.query!==void 0&&{query:Z(Z({},e.query),n?.query)}),a=((r=e.plugins)==null||(r=r.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1))==null?void 0:r.schema)||e.schema;if(a){let r=t;a.config?.prefix&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,``),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),a.config?.baseURL&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,``)),r.startsWith(`/`)&&r.charAt(1)===`@`&&(r=r.substring(1));let o=a.schema[r];if(o){let{method:a,path:s}=q(r);a&&(t=t.slice(0,t.length-r.length)+s);let c=n?.headers;if(o.headers&&!n?.disableValidation){let e={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((t,n)=>{e[n.toLowerCase()]=t});else if(typeof n.headers==`object`)for(let[t,r]of Object.entries(n.headers))r!=null&&(e[t.toLowerCase()]=r)}let t=await Y(o.headers,e),r={};for(let[e,n]of Object.entries(t))r[e.toLowerCase()]=n;c=r}let l=o.method??a;if(i=Z(Z(Z(Z({},i),l!==void 0&&{method:l}),o.output!==void 0&&{output:o.output}),c!==void 0&&{headers:c}),!n?.disableValidation){if(o.query&&(i.query=await Y(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=Z({},e.query);for(let e of Object.keys(t))n?.query&&Object.prototype.hasOwnProperty.call(n.query,e)&&(t[e]=n.query[e]);i.query=Z(Z({},t),i.query)}i=Z(Z({},i),{},{body:o.input?await Y(o.input,n?.body):n?.body,params:o.params?await Y(o.params,n?.params):n?.params})}return{url:t,options:i}}}return Z({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),zt=e=>{async function t(t,n){let r=Z(Z(Z({},e),n),{},{headers:Et(e?.headers,n?.headers),plugins:[...e?.plugins||[],Rt(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await Q(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await Q(t,r)}return t},Bt=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},Vt=e=>e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`,Ht=(e,t)=>{let n=`credentials`in Request.prototype,r=oe(e?.baseURL,e?.basePath,void 0,t)??Bt(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=zt({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?Ie(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Le],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=Ze(d,e),h=!1,g=e=>{h||e===null||(h=!0,qe(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher:Vt,callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let S={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=$e(t.getActions?.(d,S,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$sessionSignal:f,$fetch:d,$store:S}},$=v({organization:[`update`,`delete`],member:[`create`,`update`,`delete`],invitation:[`create`,`cancel`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),Ut=$.newRole({organization:[`update`],invitation:[`create`,`cancel`],member:[`create`,`update`,`delete`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),Wt=$.newRole({organization:[`update`,`delete`],member:[`create`,`update`,`delete`],invitation:[`create`,`cancel`],team:[`create`,`update`,`delete`],ac:[`create`,`read`,`update`,`delete`]}),Gt=$.newRole({organization:[],member:[],invitation:[],team:[],ac:[`read`]}),Kt={admin:Ut,owner:Wt,member:Gt};function qt(e){return(Array.isArray(e)?e:[e]).flatMap(e=>e.split(`,`)).map(e=>e.trim()).filter(Boolean)}var Jt=(e,t)=>{if(!e.permissions)return!1;let n=qt(e.role),r=e.options.creatorRole||`owner`,i=n.includes(r),a=e.allowCreatorAllPermissions||!1;if(i&&a)return!0;for(let r of n)if(t[r]?.authorize(e.permissions)?.success)return!0;return!1},Yt=e=>Jt(e,e.options.roles||Kt),Xt=e=>{let t=M(!1),r=M(!1),i=M(!1),a=M(!1),o={admin:Ut,member:Gt,owner:Wt,...e?.roles};return{id:`organization`,version:n,$InferServerPlugin:{},getActions:(t,n,r)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:t=>Yt({role:t.role,options:{ac:e?.ac,roles:o},permissions:t.permissions})}}),getAtoms:e=>{let n=R(t,`/organization/list`,e,{method:`GET`}),o=R([r],`/organization/get-full-organization`,e,()=>({method:`GET`})),s=R([r,i],`/organization/get-active-member`,e,{method:`GET`}),c=R([r,a],`/organization/get-active-member-role`,e,{method:`GET`});return{$listOrg:t,$activeOrgSignal:r,$activeMemberSignal:i,$activeMemberRoleSignal:a,activeOrganization:o,listOrganizations:n,activeMember:s,activeMemberRole:c}},pathMethods:{"/organization/get-full-organization":`GET`,"/organization/list-user-teams":`GET`},atomListeners:[{matcher(e){return e===`/organization/create`||e===`/organization/delete`||e===`/organization/update`},signal:`$listOrg`},{matcher(e){return Vt(e)||e.startsWith(`/organization`)},signal:`$activeOrgSignal`},{matcher(e){return e.startsWith(`/organization/set-active`)||e===`/organization/create`||e===`/organization/delete`||e===`/organization/remove-member`||e===`/organization/leave`||e===`/organization/accept-invitation`},signal:`$sessionSignal`},{matcher(e){return e.includes(`/organization/update-member-role`)||e.startsWith(`/organization/set-active`)},signal:`$activeMemberSignal`},{matcher(e){return e.includes(`/organization/update-member-role`)||e.startsWith(`/organization/set-active`)},signal:`$activeMemberRoleSignal`}],$ERROR_CODES:ue}};function Zt(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function Qt(e){return e.charAt(0).toUpperCase()+e.slice(1)}var $t=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,en=/['\u2019]/g;function tn(e){return e.replace(en,``).match($t)??[]}function nn(e){return tn(e).map(e=>e.toLowerCase()).join(`-`)}function rn(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function an(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||Zt(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(nn).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=rn(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}var on=e(t(),1);function sn(e,t={}){let n=(0,on.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,on.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?Ce(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,on.useSyncExternalStore)(a,o,Ee(e)?()=>e.init:o)}function cn(e){return`use${Qt(e)}`}function ln(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,$store:o,atomListeners:s}=Ht(e),c={};for(let[e,t]of Object.entries(r))c[cn(e)]=()=>sn(t);return an({...n,...c,hydrateSession:i,$fetch:a,$store:o},a,t,r,s)}export{Xt as n,C as r,ln as t};
|
|
4
|
+
//# sourceMappingURL=auth-BzR8abXz.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{s as e,t}from"./blocks-CGhmSv2M.js";import{t as n}from"./marked.esm-CO-4B_gx.js";var r=`[a-z][a-z0-9-]{1,40}`,i=/^[A-Za-z][A-Za-z0-9_-]{0,63}$/,a=RegExp(`^(:{2,})(${r})(?=[{\\s]|$)`);function o(e){let t={},n=1,r=()=>{for(;e[n]===` `||e[n]===` `;)n++};for(;;){if(r(),e[n]===`}`)return{attrs:t,end:n+1};let a=n;for(;n<e.length&&/[A-Za-z0-9_-]/.test(e[n]);)n++;let o=e.slice(a,n);if(!i.test(o)||Object.hasOwn(t,o))return;if(e[n]!==`=`){if(e[n]!==` `&&e[n]!==` `&&e[n]!==`}`)return;t[o]=!0;continue}if(n++,e[n]!==`"`)return;n++;let s=``;for(;;){let t=e[n];if(t===void 0)return;if(t===`\\`){let t=e[n+1];if(t!==`"`&&t!==`\\`)return;s+=t,n+=2}else{if(t===`"`){n++;break}s+=t,n++}}t[o]=s;let c=e[n];if(c!==` `&&c!==` `&&c!==`}`)return}}function s(e){let t=a.exec(e);if(!t)return;let n=t[1].length,r=t[2],i=e.slice(t[0].length),s={};if(i.startsWith(`{`)){let e=o(i);if(!e)return;s=e.attrs,i=i.slice(e.end)}if(i.trim()===``)return{fence:n,name:r,attrs:s}}var c=/^ {0,3}(`{3,}|~{3,})/;function l(e){if(!e.startsWith(`::`))return;let t=e.indexOf(`
|
|
2
|
+
`),n=t===-1?e:e.slice(0,t),r=s(n);if(!r)return;if(r.fence===2)return{directive:{name:r.name,attrs:r.attrs,fence:2},raw:n};if(t===-1)return;let i=RegExp(`^:{${r.fence}}[ \\t]*$`),a=t+1,o;for(;a<=e.length;){let n=e.indexOf(`
|
|
3
|
+
`,a),s=n===-1?e.slice(a):e.slice(a,n),l=c.exec(s)?.[1];if(o)l&&l[0]===o[0]&&l.length>=o.length&&s.trim()===l&&(o=void 0);else if(l)o=l;else if(i.test(s)){let n=e.slice(t+1,a).replace(/\n$/,``);return{directive:{name:r.name,attrs:r.attrs,content:n,fence:r.fence},raw:e.slice(0,a+s.length)}}if(n===-1)break;a=n+1}}function u(e){let t=e.trimEnd(),n=l(t);return n&&n.raw===t?n.directive:void 0}function d(e){for(let t=e.indexOf(`
|
|
4
|
+
::`);t!==-1;t=e.indexOf(`
|
|
5
|
+
::`,t+1))if(l(e.slice(t+1)))return t+1}var f=e=>`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`;function p(e){let t=[];for(let[n,r]of Object.entries(e))r!=null&&(r===!0?t.push(n):typeof r==`string`?t.push(`${n}=${f(r)}`):(typeof r==`number`||typeof r==`boolean`)&&t.push(`${n}=${f(String(r))}`));return t.length?`{${t.join(` `)}}`:``}function m(e,t,n){let r=p(t);if(n===void 0)return`::${e}${r}`;let i=n.trimEnd(),a=2;for(let e of i.matchAll(/^(:{3,})/gm))a=Math.max(a,e[1].length);let o=`:`.repeat(a+1);return i?`${o}${e}${r}\n${i}\n${o}`:`${o}${e}${r}\n${o}`}var h=/^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/;function g(e,t){let n={};for(let[r,i]of Object.entries(t)){let t=e?.props.properties[r];n[r]=t?.type===`boolean`?i===`true`||i!==`false`&&i:(t?.type===`number`||t?.type===`integer`)&&typeof i==`string`&&h.test(i.trim())?Number(i):i}return n}function _(n,r){let i=n.get(r.name);if(!i)return;if(!i.where.includes(`body`))return[{path:``,message:`${r.name} is a section block, not a body block`}];let a=i.content===`markdown`;if(a&&r.content===void 0)return[{path:``,message:`${r.name} wraps text: write it as :::${r.name} … :::`}];if(!a&&r.content!==void 0)return[{path:``,message:`${r.name} wraps no text: write it as ::${r.name}{…}`}];if(r.content!==void 0&&r.content.length>t.content)return[{path:``,message:`at most ${t.content} characters inside`}];let o=g(i,r.attrs),s=e(i.props,o);for(let[e,t]of Object.entries(o))typeof t==`string`&&/[\r\n]/.test(t)&&s.push({path:e,message:`one line`});return s}var v={name:`directive`,level:`block`,start:e=>d(e),tokenizer(e){let t=l(e);if(t)return{type:`directive`,raw:t.raw,directive:t.directive,tokens:t.directive.content?this.lexer.blockTokens(t.directive.content,[]):[]}},childTokens:[`tokens`]},y=new n({gfm:!0,async:!1});y.use({extensions:[v]});function b(e){let t=``,n=[];for(let r of y.lexer(e)){let e=n.at(-1);if(r.type===`space`){e?e.text+=r.raw:t+=r.raw;continue}let i=r.type===`directive`?`directive:${r.directive.name}`:r.type;n.push({type:i,raw:r.raw,text:r.raw})}return{prefix:t,units:n}}function x(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>new Uint32Array(r+1));for(let a=n-1;a>=0;a--){let n=i[a],o=i[a+1];for(let i=r-1;i>=0;i--)n[i]=e[a]===t[i]?o[i+1]+1:Math.max(o[i],n[i+1])}let a=[],o=0,s=0;for(;o<n&&s<r;)e[o]===t[s]?(a.push([o,s]),o++,s++):i[o+1][s]>=i[o][s+1]?o++:s++;return a}function S(e){return e.match(/\S+\s*|\s+/g)??[]}var C=e=>e.split(/\s+/).filter(Boolean).length,w=3e3;function T(e,t){let n=S(e),r=S(t);if(n.length>w||r.length>w)return[...e?[{kind:`removed`,text:e}]:[],...t?[{kind:`added`,text:t}]:[]];let i=e=>e.trimEnd(),a=x(n.map(i),r.map(i)),o=[],s=(e,t)=>{if(!t)return;let n=o.at(-1);n?.kind===e?n.text+=t:o.push({kind:e,text:t})},c=0,l=0;for(let[e,t]of[...a,[n.length,r.length]])s(`removed`,n.slice(c,e).join(``)),s(`added`,r.slice(l,t).join(``)),e<n.length&&s(`same`,r[t]),c=e+1,l=t+1;return o}function E(e,t){let n=e.toLowerCase().split(/\s+/).filter(Boolean),r=t.toLowerCase().split(/\s+/).filter(Boolean);if(!n.length||!r.length)return 0;let i=new Map;for(let e of n)i.set(e,(i.get(e)??0)+1);let a=0;for(let e of r){let t=i.get(e)??0;t>0&&(a++,i.set(e,t-1))}return 2*a/(n.length+r.length)}function D(e,t){let n=b(e).units.map(e=>e.raw.trimEnd()),r=b(t).units.map(e=>e.raw.trimEnd()),i=[],a={added:0,removed:0,changed:0},o={added:0,removed:0},s=(e,t)=>{let n=0,r=0;for(;n<e.length||r<t.length;){let s=e[n],c=t[r];if(s!==void 0&&c!==void 0&&E(s,c)>=.35){let e=T(s,c);i.push({kind:`changed`,before:s,after:c,words:e}),a.changed++;for(let t of e)t.kind===`added`?o.added+=C(t.text):t.kind===`removed`&&(o.removed+=C(t.text));n++,r++}else s!==void 0&&(c===void 0||e.length-n>=t.length-r)?(i.push({kind:`removed`,markdown:s}),a.removed++,o.removed+=C(s),n++):c!==void 0&&(i.push({kind:`added`,markdown:c}),a.added++,o.added+=C(c),r++)}},c=0,l=0;for(let[e,t]of x(n,r))s(n.slice(c,e),r.slice(l,t)),i.push({kind:`same`,markdown:r[t]}),c=e+1,l=t+1;return s(n.slice(c),r.slice(l)),{blocks:i,counts:a,words:o}}function O(e){let t=[];return y.walkTokens(y.lexer(e),e=>{e.type===`directive`&&t.push(e.directive)}),t}export{_ as a,u as c,b as i,m as l,O as n,p as o,x as r,g as s,D as t};
|
|
6
|
+
//# sourceMappingURL=body-blocks-CZh36LZ-.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{t as n}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{i as r,r as i}from"./react-iRJfyluG.js";import{n as a,t as o}from"./button-pa1bq9b85hawg41a-CTLAwRb5.js";import{t as s}from"./DirectionalIcon-BitUORGN.js";import{n as c}from"./skeleton-line-m9dyh126t9k07jvg-C0LAvXNf.js";import{t as l}from"./Table.es-CPWQPhl7.js";import{a as u,n as d,r as f,t as p}from"./StatTile-KhE3fINB.js";import{t as m}from"./IconBase.es-BXBadb8L.js";import{a as h,n as g,r as _,t as v}from"./useChartPalette-DS7_qG1C.js";import{r as y}from"./analytics-range-BqKm9TTo.js";import{Lt as b,ct as x}from"./index-CRaauoqY.js";var S=t(r(),1),C=new Map([[`bold`,S.createElement(S.Fragment,null,S.createElement(`path`,{d:`M232.49,160.49l-48,48a12,12,0,0,1-17-17L195,164H128A108.12,108.12,0,0,1,20,56a12,12,0,0,1,24,0,84.09,84.09,0,0,0,84,84h67l-27.52-27.51a12,12,0,0,1,17-17l48,48A12,12,0,0,1,232.49,160.49Z`}))],[`fill`,S.createElement(S.Fragment,null,S.createElement(`path`,{d:`M229.66,157.66l-48,48A8,8,0,0,1,168,200V160H128A104.11,104.11,0,0,1,24,56a8,8,0,0,1,16,0,88.1,88.1,0,0,0,88,88h40V104a8,8,0,0,1,13.66-5.66l48,48A8,8,0,0,1,229.66,157.66Z`}))],[`regular`,S.createElement(S.Fragment,null,S.createElement(`path`,{d:`M229.66,157.66l-48,48a8,8,0,0,1-11.32-11.32L204.69,160H128A104.11,104.11,0,0,1,24,56a8,8,0,0,1,16,0,88.1,88.1,0,0,0,88,88h76.69l-34.35-34.34a8,8,0,0,1,11.32-11.32l48,48A8,8,0,0,1,229.66,157.66Z`}))]]),w=S.forwardRef((e,t)=>S.createElement(m,{ref:t,...e,weights:C}));w.displayName=`ArrowBendDownRightIcon`;var T=w,E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function D(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);E(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var O=`12px sans-serif`,k=20,A=100,j=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ee(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-k)/A}return t}var te=ee(j),M={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=M.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=te[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}};function ne(e){for(var t in M)M.hasOwnProperty(t)&&e[t]&&(M[t]=e[t])}var re=e({EPSILON:()=>rt,HashMap:()=>Xe,RADIAN_TO_DEGREE:()=>nt,assert:()=>He,assignProps:()=>ye,bind:()=>H,clone:()=>P,concatArray:()=>Ze,createCanvas:()=>be,createHashMap:()=>J,createObject:()=>Qe,curry:()=>Oe,defaults:()=>L,disableUserSelect:()=>$e,each:()=>z,eqNaN:()=>Le,extend:()=>I,filter:()=>Te,find:()=>Ee,guid:()=>ge,hasOwn:()=>et,indexOf:()=>R,inherits:()=>xe,isArray:()=>U,isArrayLike:()=>Ce,isBuiltInObject:()=>je,isDom:()=>Ne,isFunction:()=>W,isGradientObject:()=>Pe,isImagePatternObject:()=>Fe,isNumber:()=>Ae,isObject:()=>K,isPrimitive:()=>Ke,isRegExp:()=>Ie,isString:()=>G,isStringSafe:()=>ke,isTypedArray:()=>Me,keys:()=>V,logError:()=>_e,map:()=>B,merge:()=>F,mergeAll:()=>ve,mixin:()=>Se,noop:()=>tt,normalizeCssArray:()=>Ve,reduce:()=>we,retrieve:()=>Re,retrieve2:()=>q,retrieve3:()=>ze,setAsPrimitive:()=>Ge,slice:()=>Be,trim:()=>Ue}),ie=we([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),ae=we([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),oe=Object.prototype.toString,se=Array.prototype,ce=se.forEach,le=se.filter,ue=se.slice,de=se.map,fe=function(){}.constructor,N=fe?fe.prototype:null,pe=`__proto__`,me=2311,he=2**53-1;function ge(){return me>=he&&(me=0),me++}function _e(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=oe.call(e);if(n===`[object Array]`){if(!Ke(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(ae[n]){if(!Ke(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!ie[n]&&!Ke(e)&&!Ne(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==pe&&(t[o]=P(e[o]));return t}function F(e,t,n){if(!K(t)||!K(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==pe){var i=e[r],a=t[r];K(a)&&K(i)&&!U(a)&&!U(i)&&!Ne(a)&&!Ne(i)&&!je(a)&&!je(i)&&!Ke(a)&&!Ke(i)?F(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function ve(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=F(n,e[r],t);return n}function I(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==pe&&(e[n]=t[n]);return e}function ye(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function L(e,t,n){for(var r=V(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}var be=M.createCanvas;function R(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function xe(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Se(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else L(e,t,n)}function Ce(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function z(e,t,n){if(e&&t){if(e.forEach&&e.forEach===ce)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function B(e,t,n){if(!e)return[];if(!t)return Be(e);if(e.map&&e.map===de)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function we(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function Te(e,t,n){if(!e)return[];if(!t)return Be(e);if(e.filter&&e.filter===le)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Ee(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function V(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function De(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(ue.call(arguments)))}}var H=N&&W(N.bind)?N.call.bind(N.bind):De;function Oe(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(ue.call(arguments)))}}function U(e){return Array.isArray?Array.isArray(e):oe.call(e)===`[object Array]`}function W(e){return typeof e==`function`}function G(e){return typeof e==`string`}function ke(e){return oe.call(e)===`[object String]`}function Ae(e){return typeof e==`number`}function K(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function je(e){return!!ie[oe.call(e)]}function Me(e){return!!ae[oe.call(e)]}function Ne(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Pe(e){return e.colorStops!=null}function Fe(e){return e.image!=null}function Ie(e){return oe.call(e)===`[object RegExp]`}function Le(e){return e!==e}function Re(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function q(e,t){return e??t}function ze(e,t,n){return e??t??n}function Be(e){var t=[...arguments].slice(1);return ue.apply(e,t)}function Ve(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function He(e,t){if(!e)throw Error(t)}function Ue(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var We=`__ec_primitive__`;function Ge(e){e[We]=!0}function Ke(e){return e[We]}var qe=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return V(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Je=typeof Map==`function`;function Ye(){return Je?new Map:new qe}var Xe=function(){function e(t){var n=U(t);this.data=Ye();var r=this;t instanceof e?t.each(i):t&&z(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Je?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function J(e){return new Xe(e)}function Ze(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Qe(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&I(n,t),n}function $e(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function et(e,t){return e.hasOwnProperty(t)}function tt(){}var nt=180/Math.PI,rt=2**-52||2**-52,it=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Y=new(function(){function e(){this.browser=new it,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Y.wxa=!0,Y.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Y.worker=!0:!Y.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Y.node=!0,Y.svgSupported=!0):at(navigator.userAgent,Y);function at(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var ot=`.`,st=`___EC__COMPONENT__CONTAINER___`,ct=`___EC__EXTENDED_CLASS___`;function lt(e){var t={main:``,sub:``};if(e){var n=e.split(ot);t.main=n[0]||``,t.sub=n[1]||``}return t}function ut(e){He(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function dt(e){return!!(e&&e[ct])}function ft(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return pt(t)?n=function(e){D(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},xe(n,this)),I(n.prototype,e),n[ct]=!0,n.extend=this.extend,n.superCall=_t,n.superApply=vt,n.superClass=t,n}}function pt(e){return W(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function mt(e,t){e.extend=t.extend}var ht=Math.round(Math.random()*10);function gt(e){var t=[`__\0is_clz`,ht++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function _t(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function vt(e,t,n){return this.superClass.prototype[t].apply(e,n)}function yt(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){ut(r),e.prototype.type=r;var i=lt(r);if(!i.sub)t[i.main]=e;else if(i.sub!==st){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[st]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=lt(e),r=[],i=t[n.main];return i&&i[st]?z(i,function(e,t){t!==st&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[lt(e).main]},e.getAllClassMainTypes=function(){var e=[];return z(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[lt(e).main];return n&&n[st]};function n(e){var n=t[e.main];return n&&n[st]||(n=t[e.main]={},n[st]=!0),n}}function bt(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&R(r,s)>=0||i&&R(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var xt=bt([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),St=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return xt(this,e,t)},e}(),Ct=function(){function e(e){this.value=e}return e}(),wt=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Ct(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Tt=function(){function e(e){this._list=new wt,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Ct(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Et=new Tt(50);function Dt(e){if(typeof e==`string`){var t=Et.get(e);return t&&t.image}return e}function Ot(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Et.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!At(t)&&a.pending.push(o)):(t=M.loadImage(e,kt,kt),t.__zrImageSrc=e,Et.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function kt(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function At(e){return e&&e.width&&e.height}var jt=e({clone:()=>Bt,copy:()=>Pt,create:()=>Mt,identity:()=>Nt,invert:()=>zt,mul:()=>Ft,rotate:()=>Lt,scale:()=>Rt,translate:()=>It});function Mt(){return[1,0,0,1,0,0]}function Nt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Pt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Ft(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function It(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Lt(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Rt(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function zt(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Bt(e){var t=Mt();return Pt(t,e),t}var Vt=e({add:()=>Kt,applyTransform:()=>dn,clone:()=>Wt,copy:()=>Ut,create:()=>Ht,dist:()=>on,distSquare:()=>cn,distance:()=>an,distanceSquare:()=>sn,div:()=>en,dot:()=>tn,len:()=>Yt,lenSquare:()=>Zt,length:()=>Xt,lengthSquare:()=>Qt,lerp:()=>un,max:()=>pn,min:()=>fn,mul:()=>$t,negate:()=>ln,normalize:()=>rn,scale:()=>nn,scaleAndAdd:()=>qt,set:()=>Gt,sub:()=>Jt});function Ht(e,t){return e??=0,t??=0,[e,t]}function Ut(e,t){return e[0]=t[0],e[1]=t[1],e}function Wt(e){return[e[0],e[1]]}function Gt(e,t,n){return e[0]=t,e[1]=n,e}function Kt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function qt(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function Jt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Yt(e){return Math.sqrt(Zt(e))}var Xt=Yt;function Zt(e){return e[0]*e[0]+e[1]*e[1]}var Qt=Zt;function $t(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function en(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function tn(e,t){return e[0]*t[0]+e[1]*t[1]}function nn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function rn(e,t){var n=Yt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function an(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var on=an;function sn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var cn=sn;function ln(e,t){return e[0]=-t[0],e[1]=-t[1],e}function un(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function dn(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function fn(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function pn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var mn=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),hn=Math.min,gn=Math.max,_n=Math.abs,vn=[`x`,`y`],yn=[`width`,`height`],bn=new mn,xn=new mn,Sn=new mn,Cn=new mn,wn=Rn(),Tn=wn.minTv,En=wn.maxTv,Dn=[0,0],X=function(){function e(e,t,n,r){kn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=hn(e.x,this.x),n=hn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?gn(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?gn(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return jn(Mt(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&mn.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=kn(Pn,t.x,t.y,t.width,t.height)),n instanceof e||(n=kn(Fn,n.x,n.y,n.width,n.height));var s=!!r;wn.reset(i,s);var c=wn.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(Dn[0]=1/0,Dn[1]=0,Ln(l,u,p,m,0,s,a,o),Ln(d,f,h,g,1,s,a,o),s&&mn.copy(r,_?wn.useDir?wn.dirMinTv:Tn:En)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){An(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n)e!==t&&An(e,t);else if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)}else{bn.x=Sn.x=t.x,bn.y=Cn.y=t.y,xn.x=Cn.x=t.x+t.width,xn.y=Sn.y=t.y+t.height,bn.transform(n),Cn.transform(n),xn.transform(n),Sn.transform(n),e.x=hn(bn.x,xn.x,Sn.x,Cn.x),e.y=hn(bn.y,xn.y,Sn.y,Cn.y);var s=gn(bn.x,xn.x,Sn.x,Cn.x),c=gn(bn.y,xn.y,Sn.y,Cn.y);e.width=s-e.x,e.height=c-e.y}},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=Nt(e||[]),It(e,e,Gt(In,-t.x,-t.y)),Rt(e,e,Gt(In,r,i)),It(e,e,Gt(In,n.x,n.y)),e},e}(),On=X.create,kn=X.set,An=X.copy,jn=X.calculateTransform,Mn=X.applyTransform,Nn=X.contain,Pn=new X(0,0,0,0),Fn=new X(0,0,0,0),In=[];function Ln(e,t,n,r,i,a,o,s){var c=_n(t-n),l=_n(r-e),u=hn(c,l),d=vn[i],f=vn[1-i],p=yn[i];t<n||r<e?c<l?(a&&(En[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(En[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=gn(e,n),o[p]=hn(t,r)-o[d]),a&&(u<Dn[0]||wn.useDir)&&(Dn[0]=hn(u,Dn[0]),(c<l||!wn.bidirectional)&&(Tn[d]=c,Tn[f]=0,wn.useDir&&wn.calcDirMTV()),(c>=l||!wn.bidirectional)&&(Tn[d]=-l,Tn[f]=0,wn.useDir&&wn.calcDirMTV())))}function Rn(){var e=0,t=new mn,n=new mn,r={minTv:new mn,maxTv:new mn,useDir:!1,dirMinTv:new mn,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=gn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return _n(e)<1e-10}return r}function zn(e){Bn||=new Tt(100),e||=`12px sans-serif`;var t=Bn.get(e);return t||(t={font:e,strWidthCache:new Tt(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:M.measureText(`国`,e).width,asciiCharWidth:M.measureText(`a`,e).width},Bn.put(e,t)),t}var Bn;function Vn(e){if(!(Hn>=Un)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=M.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Hn=Un:i>2&&Hn++,t}}var Hn=0,Un=5;function Wn(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Vn(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Gn(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=M.measureText(t,e.font).width,n.put(t,r)),r}function Kn(e,t,n,r){var i=Gn(zn(t),e),a=Xn(t);return new X(Jn(0,i,n),Yn(0,a,r),i,a)}function qn(e,t,n,r){var i=((e||``)+``).split(`
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{t as n}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{i as r,r as i}from"./react-iRJfyluG.js";import{n as a,t as o}from"./button-pa1bq9b85hawg41a-CTLAwRb5.js";import{t as s}from"./DirectionalIcon-BitUORGN.js";import{n as c}from"./skeleton-line-m9dyh126t9k07jvg-C0LAvXNf.js";import{t as l}from"./Table.es-CPWQPhl7.js";import{a as u,n as d,r as f,t as p}from"./StatTile-Dgy33jEu.js";import{t as m}from"./IconBase.es-BXBadb8L.js";import{a as h,n as g,r as _,t as v}from"./useChartPalette-DS7_qG1C.js";import{r as y}from"./analytics-range-BqKm9TTo.js";import{Lt as b,ct as x}from"./index-B2hMMgOI.js";var S=t(r(),1),C=new Map([[`bold`,S.createElement(S.Fragment,null,S.createElement(`path`,{d:`M232.49,160.49l-48,48a12,12,0,0,1-17-17L195,164H128A108.12,108.12,0,0,1,20,56a12,12,0,0,1,24,0,84.09,84.09,0,0,0,84,84h67l-27.52-27.51a12,12,0,0,1,17-17l48,48A12,12,0,0,1,232.49,160.49Z`}))],[`fill`,S.createElement(S.Fragment,null,S.createElement(`path`,{d:`M229.66,157.66l-48,48A8,8,0,0,1,168,200V160H128A104.11,104.11,0,0,1,24,56a8,8,0,0,1,16,0,88.1,88.1,0,0,0,88,88h40V104a8,8,0,0,1,13.66-5.66l48,48A8,8,0,0,1,229.66,157.66Z`}))],[`regular`,S.createElement(S.Fragment,null,S.createElement(`path`,{d:`M229.66,157.66l-48,48a8,8,0,0,1-11.32-11.32L204.69,160H128A104.11,104.11,0,0,1,24,56a8,8,0,0,1,16,0,88.1,88.1,0,0,0,88,88h76.69l-34.35-34.34a8,8,0,0,1,11.32-11.32l48,48A8,8,0,0,1,229.66,157.66Z`}))]]),w=S.forwardRef((e,t)=>S.createElement(m,{ref:t,...e,weights:C}));w.displayName=`ArrowBendDownRightIcon`;var T=w,E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function D(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);E(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var O=`12px sans-serif`,k=20,A=100,j=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ee(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-k)/A}return t}var te=ee(j),M={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=M.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=te[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}};function ne(e){for(var t in M)M.hasOwnProperty(t)&&e[t]&&(M[t]=e[t])}var re=e({EPSILON:()=>rt,HashMap:()=>Xe,RADIAN_TO_DEGREE:()=>nt,assert:()=>He,assignProps:()=>ye,bind:()=>H,clone:()=>P,concatArray:()=>Ze,createCanvas:()=>be,createHashMap:()=>J,createObject:()=>Qe,curry:()=>Oe,defaults:()=>L,disableUserSelect:()=>$e,each:()=>z,eqNaN:()=>Le,extend:()=>I,filter:()=>Te,find:()=>Ee,guid:()=>ge,hasOwn:()=>et,indexOf:()=>R,inherits:()=>xe,isArray:()=>U,isArrayLike:()=>Ce,isBuiltInObject:()=>je,isDom:()=>Ne,isFunction:()=>W,isGradientObject:()=>Pe,isImagePatternObject:()=>Fe,isNumber:()=>Ae,isObject:()=>K,isPrimitive:()=>Ke,isRegExp:()=>Ie,isString:()=>G,isStringSafe:()=>ke,isTypedArray:()=>Me,keys:()=>V,logError:()=>_e,map:()=>B,merge:()=>F,mergeAll:()=>ve,mixin:()=>Se,noop:()=>tt,normalizeCssArray:()=>Ve,reduce:()=>we,retrieve:()=>Re,retrieve2:()=>q,retrieve3:()=>ze,setAsPrimitive:()=>Ge,slice:()=>Be,trim:()=>Ue}),ie=we([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),ae=we([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),oe=Object.prototype.toString,se=Array.prototype,ce=se.forEach,le=se.filter,ue=se.slice,de=se.map,fe=function(){}.constructor,N=fe?fe.prototype:null,pe=`__proto__`,me=2311,he=2**53-1;function ge(){return me>=he&&(me=0),me++}function _e(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function P(e){if(typeof e!=`object`||!e)return e;var t=e,n=oe.call(e);if(n===`[object Array]`){if(!Ke(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=P(e[r])}}else if(ae[n]){if(!Ke(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!ie[n]&&!Ke(e)&&!Ne(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==pe&&(t[o]=P(e[o]));return t}function F(e,t,n){if(!K(t)||!K(e))return n?P(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==pe){var i=e[r],a=t[r];K(a)&&K(i)&&!U(a)&&!U(i)&&!Ne(a)&&!Ne(i)&&!je(a)&&!je(i)&&!Ke(a)&&!Ke(i)?F(i,a,n):(n||!(r in e))&&(e[r]=P(t[r]))}return e}function ve(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=F(n,e[r],t);return n}function I(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==pe&&(e[n]=t[n]);return e}function ye(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function L(e,t,n){for(var r=V(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}var be=M.createCanvas;function R(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function xe(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function Se(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else L(e,t,n)}function Ce(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function z(e,t,n){if(e&&t){if(e.forEach&&e.forEach===ce)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}}function B(e,t,n){if(!e)return[];if(!t)return Be(e);if(e.map&&e.map===de)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function we(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function Te(e,t,n){if(!e)return[];if(!t)return Be(e);if(e.filter&&e.filter===le)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function Ee(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function V(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function De(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(ue.call(arguments)))}}var H=N&&W(N.bind)?N.call.bind(N.bind):De;function Oe(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(ue.call(arguments)))}}function U(e){return Array.isArray?Array.isArray(e):oe.call(e)===`[object Array]`}function W(e){return typeof e==`function`}function G(e){return typeof e==`string`}function ke(e){return oe.call(e)===`[object String]`}function Ae(e){return typeof e==`number`}function K(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function je(e){return!!ie[oe.call(e)]}function Me(e){return!!ae[oe.call(e)]}function Ne(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Pe(e){return e.colorStops!=null}function Fe(e){return e.image!=null}function Ie(e){return oe.call(e)===`[object RegExp]`}function Le(e){return e!==e}function Re(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function q(e,t){return e??t}function ze(e,t,n){return e??t??n}function Be(e){var t=[...arguments].slice(1);return ue.apply(e,t)}function Ve(e){if(typeof e==`number`)return[e,e,e,e];var t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function He(e,t){if(!e)throw Error(t)}function Ue(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var We=`__ec_primitive__`;function Ge(e){e[We]=!0}function Ke(e){return e[We]}var qe=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return V(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),Je=typeof Map==`function`;function Ye(){return Je?new Map:new qe}var Xe=function(){function e(t){var n=U(t);this.data=Ye();var r=this;t instanceof e?t.each(i):t&&z(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return Je?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function J(e){return new Xe(e)}function Ze(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Qe(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&I(n,t),n}function $e(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function et(e,t){return e.hasOwnProperty(t)}function tt(){}var nt=180/Math.PI,rt=2**-52||2**-52,it=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Y=new(function(){function e(){this.browser=new it,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(Y.wxa=!0,Y.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?Y.worker=!0:!Y.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Y.node=!0,Y.svgSupported=!0):at(navigator.userAgent,Y);function at(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var ot=`.`,st=`___EC__COMPONENT__CONTAINER___`,ct=`___EC__EXTENDED_CLASS___`;function lt(e){var t={main:``,sub:``};if(e){var n=e.split(ot);t.main=n[0]||``,t.sub=n[1]||``}return t}function ut(e){He(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function dt(e){return!!(e&&e[ct])}function ft(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return pt(t)?n=function(e){D(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},xe(n,this)),I(n.prototype,e),n[ct]=!0,n.extend=this.extend,n.superCall=_t,n.superApply=vt,n.superClass=t,n}}function pt(e){return W(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function mt(e,t){e.extend=t.extend}var ht=Math.round(Math.random()*10);function gt(e){var t=[`__\0is_clz`,ht++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function _t(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function vt(e,t,n){return this.superClass.prototype[t].apply(e,n)}function yt(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){ut(r),e.prototype.type=r;var i=lt(r);if(!i.sub)t[i.main]=e;else if(i.sub!==st){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[st]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=lt(e),r=[],i=t[n.main];return i&&i[st]?z(i,function(e,t){t!==st&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[lt(e).main]},e.getAllClassMainTypes=function(){var e=[];return z(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[lt(e).main];return n&&n[st]};function n(e){var n=t[e.main];return n&&n[st]||(n=t[e.main]={},n[st]=!0),n}}function bt(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&R(r,s)>=0||i&&R(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var xt=bt([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),St=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return xt(this,e,t)},e}(),Ct=function(){function e(e){this.value=e}return e}(),wt=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Ct(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Tt=function(){function e(e){this._list=new wt,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Ct(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Et=new Tt(50);function Dt(e){if(typeof e==`string`){var t=Et.get(e);return t&&t.image}return e}function Ot(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Et.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!At(t)&&a.pending.push(o)):(t=M.loadImage(e,kt,kt),t.__zrImageSrc=e,Et.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function kt(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function At(e){return e&&e.width&&e.height}var jt=e({clone:()=>Bt,copy:()=>Pt,create:()=>Mt,identity:()=>Nt,invert:()=>zt,mul:()=>Ft,rotate:()=>Lt,scale:()=>Rt,translate:()=>It});function Mt(){return[1,0,0,1,0,0]}function Nt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Pt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Ft(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function It(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Lt(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Rt(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function zt(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Bt(e){var t=Mt();return Pt(t,e),t}var Vt=e({add:()=>Kt,applyTransform:()=>dn,clone:()=>Wt,copy:()=>Ut,create:()=>Ht,dist:()=>on,distSquare:()=>cn,distance:()=>an,distanceSquare:()=>sn,div:()=>en,dot:()=>tn,len:()=>Yt,lenSquare:()=>Zt,length:()=>Xt,lengthSquare:()=>Qt,lerp:()=>un,max:()=>pn,min:()=>fn,mul:()=>$t,negate:()=>ln,normalize:()=>rn,scale:()=>nn,scaleAndAdd:()=>qt,set:()=>Gt,sub:()=>Jt});function Ht(e,t){return e??=0,t??=0,[e,t]}function Ut(e,t){return e[0]=t[0],e[1]=t[1],e}function Wt(e){return[e[0],e[1]]}function Gt(e,t,n){return e[0]=t,e[1]=n,e}function Kt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function qt(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function Jt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Yt(e){return Math.sqrt(Zt(e))}var Xt=Yt;function Zt(e){return e[0]*e[0]+e[1]*e[1]}var Qt=Zt;function $t(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function en(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function tn(e,t){return e[0]*t[0]+e[1]*t[1]}function nn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function rn(e,t){var n=Yt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function an(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var on=an;function sn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var cn=sn;function ln(e,t){return e[0]=-t[0],e[1]=-t[1],e}function un(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function dn(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function fn(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function pn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var mn=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),hn=Math.min,gn=Math.max,_n=Math.abs,vn=[`x`,`y`],yn=[`width`,`height`],bn=new mn,xn=new mn,Sn=new mn,Cn=new mn,wn=Rn(),Tn=wn.minTv,En=wn.maxTv,Dn=[0,0],X=function(){function e(e,t,n,r){kn(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=hn(e.x,this.x),n=hn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?gn(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?gn(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return jn(Mt(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&mn.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=kn(Pn,t.x,t.y,t.width,t.height)),n instanceof e||(n=kn(Fn,n.x,n.y,n.width,n.height));var s=!!r;wn.reset(i,s);var c=wn.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(Dn[0]=1/0,Dn[1]=0,Ln(l,u,p,m,0,s,a,o),Ln(d,f,h,g,1,s,a,o),s&&mn.copy(r,_?wn.useDir?wn.dirMinTv:Tn:En)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){An(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n)e!==t&&An(e,t);else if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)}else{bn.x=Sn.x=t.x,bn.y=Cn.y=t.y,xn.x=Cn.x=t.x+t.width,xn.y=Sn.y=t.y+t.height,bn.transform(n),Cn.transform(n),xn.transform(n),Sn.transform(n),e.x=hn(bn.x,xn.x,Sn.x,Cn.x),e.y=hn(bn.y,xn.y,Sn.y,Cn.y);var s=gn(bn.x,xn.x,Sn.x,Cn.x),c=gn(bn.y,xn.y,Sn.y,Cn.y);e.width=s-e.x,e.height=c-e.y}},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=Nt(e||[]),It(e,e,Gt(In,-t.x,-t.y)),Rt(e,e,Gt(In,r,i)),It(e,e,Gt(In,n.x,n.y)),e},e}(),On=X.create,kn=X.set,An=X.copy,jn=X.calculateTransform,Mn=X.applyTransform,Nn=X.contain,Pn=new X(0,0,0,0),Fn=new X(0,0,0,0),In=[];function Ln(e,t,n,r,i,a,o,s){var c=_n(t-n),l=_n(r-e),u=hn(c,l),d=vn[i],f=vn[1-i],p=yn[i];t<n||r<e?c<l?(a&&(En[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(En[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=gn(e,n),o[p]=hn(t,r)-o[d]),a&&(u<Dn[0]||wn.useDir)&&(Dn[0]=hn(u,Dn[0]),(c<l||!wn.bidirectional)&&(Tn[d]=c,Tn[f]=0,wn.useDir&&wn.calcDirMTV()),(c>=l||!wn.bidirectional)&&(Tn[d]=-l,Tn[f]=0,wn.useDir&&wn.calcDirMTV())))}function Rn(){var e=0,t=new mn,n=new mn,r={minTv:new mn,maxTv:new mn,useDir:!1,dirMinTv:new mn,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=gn(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return _n(e)<1e-10}return r}function zn(e){Bn||=new Tt(100),e||=`12px sans-serif`;var t=Bn.get(e);return t||(t={font:e,strWidthCache:new Tt(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:M.measureText(`国`,e).width,asciiCharWidth:M.measureText(`a`,e).width},Bn.put(e,t)),t}var Bn;function Vn(e){if(!(Hn>=Un)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=M.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Hn=Un:i>2&&Hn++,t}}var Hn=0,Un=5;function Wn(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Vn(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Gn(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=M.measureText(t,e.font).width,n.put(t,r)),r}function Kn(e,t,n,r){var i=Gn(zn(t),e),a=Xn(t);return new X(Jn(0,i,n),Yn(0,a,r),i,a)}function qn(e,t,n,r){var i=((e||``)+``).split(`
|
|
2
2
|
`);if(i.length===1)return Kn(i[0],t,n,r);for(var a=new X(0,0,0,0),o=0;o<i.length;o++){var s=Kn(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Jn(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Yn(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Xn(e){return zn(e).stWideCharWidth}function Zn(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Qn(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Zn(r[0],n.width),l+=Zn(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var $n=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function er(e,t,n,r,i){var a={};return tr(a,e,t,n,r,i),a.text}function tr(e,t,n,r,i,a){if(!n)e.text=``,e.isTruncated=!1;else{var o=(t+``).split(`
|
|
3
3
|
`);a=nr(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)rr(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
4
4
|
`),e.isTruncated=s}}function nr(e,t,n,r){r||={};var i=I({},r);n=q(n,`...`),i.maxIterations=q(r.maxIterations,2);var a=i.minChar=q(r.minChar,0),o=i.fontMeasureInfo=zn(t),s=o.asciiCharWidth;i.placeholder=q(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=Gn(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function rr(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)e.textLine=``,e.isTruncated=!1;else{var o=Gn(a,t);if(o<=r)e.textLine=t,e.isTruncated=!1;else{for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?ir(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=Gn(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}}function ir(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Wn(n,e.charCodeAt(i));return i}function ar(e,t,n,r){var i=vr(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=Xn(l),f=q(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?mr(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
@@ -36,4 +36,4 @@ yyyy`);var r=Tc(t),i=n?`getUTC`:`get`,a=r[i+`FullYear`](),o=r[i+`Month`]()+1,s=r
|
|
|
36
36
|
`:`<br/>`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Wl(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=CB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new oy;h.marker=g.makeTooltipMarker(`item`,G_(h.color),d);var _=yv(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Zv(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Wl(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(G(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=Pg(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=CB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new oy;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(G(u)){var p=e.ecModel.get(`useUTC`),m=U(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=g_(m.axisValue,d,p)),d=V_(d,n,!0)}else if(W(u)){var g=H(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||U(t))return{color:r||i};if(!U(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),W(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),U(t))n=oc(t[0],s),r=oc(t[1],c);else if(K(t)){var p=t;p.width=l[0],p.height=l[1];var m=Q_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(G(t)&&o){var h=DB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=TB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=OB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=OB(d)?l[1]/2:d===`bottom`?l[1]:0),eB(e)){var h=EB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&z(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&z(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&z(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&z(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Y.node&&t.getDom()&&($w(this,`_updatePosition`),this._tooltipContent.dispose(),dR(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(sO);function CB(e,t,n){var r=t.ecModel,i;n?(i=new pm(n,r,r),i=new pm(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof pm&&(o=o.get(`tooltip`,!0)),G(o)&&(o={formatter:o}),o&&(i=new pm(o,i,r)))}return i}function wB(e,t){return e.dispatchAction||H(t.dispatchAction,t)}function TB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function EB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function DB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function OB(e){return e===`center`||e===`middle`}function kB(e,t,n){var r=_l(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=bl(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Wl(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function AB(e){Vj(ER),e.registerComponentModel($z),e.registerComponentView(SB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},tt),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},tt)}var jB=[`rect`,`polygon`,`keep`,`clear`];function MB(e,t){var n=Kc(e?e.brush:[]);if(n.length){var r=[];z(n,function(e){var t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;U(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||={},s=o.type||=[];s.push.apply(s,r),Ll(s,function(e){return e+``},null),t&&!s.length&&s.push.apply(s,jB)}}var NB=z;function PB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function FB(e,t,n){var r={};return NB(t,function(t){var a=r[t]=i();NB(e[t],function(e,r){if(eI.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new eI(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new eI(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function IB(e,t,n){var r;z(n,function(e){t.hasOwnProperty(e)&&PB(t[e])&&(r=!0)}),r&&z(n,function(n){t.hasOwnProperty(n)&&PB(t[n])?e[n]=P(t[n]):delete e[n]})}function LB(e,t,n,r,i,a){var o={};z(e,function(e){o[e]=eI.prepareVisualTypes(t[e])});var s;function c(e){return UO(n,s,e)}function l(e,t){GO(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;var d=n.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var f=r.call(i,e),p=t[f],m=o[f],h=0,g=m.length;h<g;h++){var _=m[h];p[_]&&p[_].applyVisual(e,c,l)}}}function RB(e,t,n,r){var i={};return z(e,function(e){i[e]=eI.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return UO(a,l,e)}function c(e,t){GO(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}function zB(e){var t=e.brushType,n={point:function(r){return BB[t].point(r,n,e)},rect:function(r){return BB[t].rect(r,n,e)}};return n}var BB={lineX:VB(0),lineY:VB(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&zN(n.range,e[0],e[1])},rect:function(e,t,n){var r=n.range;if(!e||r.length<=1)return!1;var i=e.x,a=e.y,o=e.width,s=e.height,c=r[0];if(zN(r,i,a)||zN(r,i+o,a)||zN(r,i,a+s)||zN(r,i+o,a+s)||X.create(e).contain(c[0],c[1])||vp(i,a,i+o,a,r)||vp(i,a,i,a+s,r)||vp(i+o,a,i+o,a+s,r)||vp(i,a+s,i+o,a+s,r))return!0}}};function VB(e){var t=[`x`,`y`],n=[`width`,`height`];return{point:function(t,n,r){if(t){var i=r.range,a=t[e];return HB(a,i)}},rect:function(r,i,a){if(r){var o=a.range,s=[r[t[e]],r[t[e]]+r[n[e]]];return s[1]<s[0]&&s.reverse(),HB(s[0],o)||HB(s[1],o)||HB(o[0],s)||HB(o[1],s)}}}}function HB(e,t){return t[0]<=e&&e<=t[1]}var UB=[`inBrush`,`outOfBrush`],WB=`__ecBrushSelect`,GB=`__ecInBrushSelectEvent`;function KB(e){e.eachComponent({mainType:`brush`},function(t){(t.brushTargetManager=new Mz(t.option,e)).setInputRanges(t.areas,e)})}var qB=Ul(JB);function JB(e,t,n){var r=[],i,a;e.eachComponent({mainType:`brush`},function(e){n&&n.type===`takeGlobalCursor`&&e.setBrushOption(n.key===`brush`?n.brushOption:{brushType:!1})}),KB(e),e.eachComponent({mainType:`brush`},function(t,n){var o={brushId:t.id,brushIndex:n,brushName:t.name,areas:P(t.areas),selected:[]};r.push(o);var s=t.option,c=s.brushLink,l=[],u=[],d=[],f=!1;n||(i=s.throttleType,a=s.throttleDelay);var p=B(t.areas,function(e){var t=$B[e.brushType],n=L({boundingRect:t?t(e):void 0},e);return n.selectors=zB(n),n}),m=FB(t.option,UB,function(e){e.mappingMethod=`fixed`});U(c)&&z(c,function(e){l[e]=1});function h(e){return c===`all`||!!l[e]}function g(e){return!!e.length}e.eachSeries(function(e,t){var n=d[t]=[];e.subType===`parallel`?_(e,t):v(e,t,n)});function _(e,t){var n=e.coordinateSystem;f||=n.hasAxisBrushed(),h(t)&&n.eachActiveState(e.getData(),function(e,t){e===`active`&&(u[t]=1)})}function v(n,r,i){if(n.brushSelector&&!QB(t,r)&&(z(p,function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),f||=g(i)}),h(r)&&g(i))){var a=n.getData();a.each(function(e){ZB(n,i,a,e)&&(u[e]=1)})}}e.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);var r=d[t],i=e.getData(),a=h(t)?function(e){return u[e]?(n.dataIndex.push(i.getRawIndex(e)),`inBrush`):`outOfBrush`}:function(t){return ZB(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),`inBrush`):`outOfBrush`};(h(t)?f:g(r))&&LB(UB,m,i,a)})}),YB(t,i,a,r,n)}function YB(e,t,n,r,i){if(i){var a=e.getZr();a[GB]||(a[WB]||(a[WB]=XB),Qw(a,WB,n,t)(e,r))}}function XB(e,t){if(!e.isDisposed()){var n=e.getZr();n[GB]=!0,e.dispatchAction({type:`brushSelect`,batch:t}),n[GB]=!1}}function ZB(e,t,n,r){for(var i=0,a=t.length;i<a;i++){var o=t[i];if(e.brushSelector(r,n,o.selectors,o))return!0}}function QB(e,t){var n=e.option.seriesIndex;return n!=null&&n!==`all`&&(U(n)?R(n,t)<0:t!==n)}var $B={rect:function(e){return eV(e.range)},polygon:function(e){for(var t,n=e.range,r=0,i=n.length;r<i;r++){t||=[El(),El()];var a=n[r];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&eV(t)}};function eV(e){return new X(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var tV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new KI(t.getZr())).on(`brush`,H(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){KB(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){r&&r.$from===e.id||this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:P(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:P(n),$from:t})},t.type=`brush`,t}(sO),nV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&IB(n,e,[`inBrush`,`outOfBrush`]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=B(e,function(e){return rV(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=rV(this.option,e),this.brushType=this.brushOption.brushType},t.type=`brush`,t.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],t.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Z.color.backgroundTint,borderColor:Z.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Z.color.disabled},t}(cv);function rV(e,t){return F({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new pm(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var iV=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`],aV=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n){var r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a||=!!e.areas.length}),this._brushType=r,this._brushMode=i,z(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`,!0),n={};return z(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r!==n&&n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})},t.getDefaultOption=function(e){return{show:!0,type:iV.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}},t}(YR);function oV(e){e.registerComponentView(tV),e.registerComponentModel(nV),e.registerPreprocessor(MB),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,qB),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},tt),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},tt),ZR(`brush`,aV)}function sV(e,t){if(!e)return!1;for(var n=U(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function cV(e){qc(e,`label`,[`show`])}var lV=ml(),uV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(Y.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=lV(e)[i];!n||!n.data?lV(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&cV(n),z(n.data,function(e){e instanceof Array?(cV(e[0]),cV(e[1])):cV(e)}),a=this.createMarkerModelFromSeries(n,this,t),I(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),lV(e)[i]=a)},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return Gv(`section`,{header:this.name,blocks:[Gv(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=vv.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return lV(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(cv);Se(uV,vv.prototype);function dV(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function fV(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function pV(e,t,n,r,i,a,o){var s=[],c=lg(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=bV(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=mc(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var mV={min:Oe(pV,`min`),max:Oe(pV,`max`),average:Oe(pV,`average`),median:Oe(pV,`median`)};function hV(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!fV(t)&&!U(t.coord)&&U(i)){var a=gV(t,n,r,e);if(t=P(t),t.type&&mV[t.type]&&a.baseAxis&&a.valueAxis){var o=R(i,a.baseAxis.dim),s=R(i,a.valueAxis.dim),c=mV[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!U(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&mV[t.type]){var u=r.getOtherAxis(l);u&&(t.value=bV(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)mV[d[f]]&&(d[f]=bV(n,n.mapDimension(i[f]),d[f]));return t}}function gV(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(_V(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function _V(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function vV(e,t){return e&&e.containData&&t.coord&&!dV(t)?e.containData(t.coord):!0}function yV(e,t){return e?function(e,n,r,i){return ch(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return ch(e.value,t[i])}}function bV(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}var xV=ml(),SV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=J()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){xV(e).keep=!1}),t.eachSeries(function(e){var i=uV.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!xV(e).keep&&r.group.remove(e.group)}),CV(t,i,this.type)},t.prototype.markKeep=function(e){xV(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;z(e,function(e){var r=uV.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Ru(e):zu(e))})})},t.type=`marker`,t}(sO);function CV(e,t,n){e.eachSeries(function(e){var r=uV.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Mp(r),o=a.z,s=a.zlevel;Pp(i.group,o,s)}})}var wV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(uV),TV=ml(),EV=function(e,t,n,r){var i=e.getData(),a;if(U(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Re(r.yAxis,r.xAxis);else{var l=gV(r,i,t,e);s=l.valueAxis,c=bV(i,ug(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=P(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&Ae(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[hV(e,a[0]),hV(e,a[1]),I({},a[2])];return h[2].type=h[2].type||null,F(h[2],h[0]),F(h[2],h[1]),h};function DV(e){return!isNaN(e)&&!isFinite(e)}function OV(e,t,n,r){var i=1-e,a=r.dimensions[e];return DV(t[i])&&DV(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function kV(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(OV(1,n,r,e)||OV(0,n,r,e)))return!0}return vV(e,t[0])&&vV(e,t[1])}function AV(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=oc(o.get(`x`),i.getWidth()),l=oc(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(mb(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;DV(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):DV(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var jV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=uV.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=TV(t).from,a=TV(t).to;i.each(function(t){AV(i,t,!0,e,n),AV(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new EI);this.group.add(c.group);var l=MV(i,e,t),u=l.from,d=l.to,f=l.line;TV(t).from=u,TV(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);U(p)||(p=[p,p]),U(m)||(m=[m,m]),U(h)||(h=[h,h]),U(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:q(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){Wl(e).dataModel=t,e.traverse(function(e){Wl(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);AV(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=WO(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:q(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:q(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:q(a.get(`symbolSize`),m[+!i]),symbol:q(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(SV);function MV(e,t,n){var r=e?B(e&&e.dimensions,function(e){var n=t.getData();return I(I({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new Wh(r,n),a=new Wh(r,n),o=new Wh([],n),s=B(n.get(`data`),Oe(EV,t,e,n));e&&(s=Te(s,Oe(kV,e)));var c=yV(!!e,r);return i.initData(B(s,function(e){return e[0]}),null,c),a.initData(B(s,function(e){return e[1]}),null,c),o.initData(B(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function NV(e){e.registerComponentModel(wV),e.registerComponentView(jV),e.registerPreprocessor(function(e){sV(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var PV={get:function(e,t,n){var r=P((FV[e]||{})[t]);return n&&U(r)?r[r.length-1]:r}},FV={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},IV=eI.mapVisual,LV=eI.eachVisual,RV=U,zV=z,BV=pc,VV=ac,HV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&IB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=H(e,this),this.controllerVisuals=FB(this.option.controller,t,e),this.targetVisuals=FB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return zV(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=bl(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return B(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){z(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],U(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return G(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):W(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=BV([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=Ee(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){RV(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},zV(r,function(e,t){if(eI.isValidType(t)){var n=PV.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;zV(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=IV(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;LV(l,function(e){e>u&&(u=e)}),c.symbolSize=IV(l,function(e){return VV(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(cv),UV=[20,140],WV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=UV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=UV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):U(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=pc((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=q(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=GV(this,`outOfRange`,this.getExtent()),n=GV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(var l=1;a<s;a++,l=0)l&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(var l=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(l&&=(r.length&&i(r[r.length-1].value,`outOfRange`),0),i(t[o],`outOfRange`));var u=r.length;return{stops:r,outerColors:[u?r[0].color:`transparent`,u?r[u-1].color:`transparent`]}},t.type=`visualMap.continuous`,t.defaultOption=bg(HV.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Z.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Z.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Z.color.shadow}}),t}(HV);function GV(e,t,n){if(n[0]===n[1])return n.slice();for(var r=200,i=(n[1]-n[0])/r,a=n[0],o=[],s=0;s<=r&&a<n[1];s++)o.push(a),a+=i;return o.push(n[1]),o}var KV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,e.get(`show`)===!1?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=L_(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Es({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return z(eI.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),eI.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=tv(t,n).refContainer;nv(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(sO),qV=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function JV(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=qV[o],c=[0,null,10],l={},u=0;u<3;u++)l[qV[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=Q_(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function YV(e,t){return z(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}var XV=ac,ZV=z,QV=Math.min,$V=Math.max,eH=12,tH=6,nH=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=H(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=H(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&r.type===`selectDataRange`&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);var n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=r==null?``:r+``;var i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new js({style:Gp(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=JV(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new Fd;s.add(c),c.add(n.outOfRange=rH()),c.add(n.inRange=rH(null,a?oH(this._orient):null,H(this._dragHandle,this,`all`,!1),H(this._dragHandle,this,`all`,!0))),c.setClipPath(new Es({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var l=t.textStyleModel.getTextRect(`国`),u=$V(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)},t.prototype._createHandle=function(e,t,n,r,i,a){var o=H(this._dragHandle,this,n,!1),s=H(this._dragHandle,this,n,!0),c=Zn(e.get(`handleSize`),r[0]),l=Ey(e.get(`handleIcon`),-c/2,-c/2,c,c,null,!0),u=oH(this._orient);l.attr({cursor:u,draggable:!0,drift:o,ondragend:s,onmousemove:function(e){YT(e.event)}}),l.x=r[0]/2,l.useStyle(e.getModel(`handleStyle`).getItemStyle()),l.setStyle({strokeNoScale:!0,strokeFirst:!0}),l.style.lineWidth*=2,l.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),od(l,!0),t.add(l);var d=this.visualMapModel.textStyleModel,f=new js({cursor:u,draggable:!0,drift:o,onmousemove:function(e){YT(e.event)},ondragend:s,style:Gp(d,{x:0,y:0,text:``})});f.ensureState(`blur`).style={opacity:.1},f.stateTransition={duration:200},this.group.add(f);var p=[c,0],m=this._shapes;m.handleThumbs[n]=l,m.handleLabelPoints[n]=p,m.handleLabels[n]=f},t.prototype._createIndicator=function(e,t,n,r,i){var a=Zn(e.get(`indicatorSize`),n[0]),o=Ey(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});var s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof vs){var c=o.style;o.useStyle(I({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},s))}else o.useStyle(s);t.add(o);var l=this.visualMapModel.textStyleModel,u=new js({silent:!0,invisible:!0,style:Gp(l,{x:0,y:0,text:``})});this.group.add(u);var d=[(i===`horizontal`?r/2:tH)+n[0]/2,0],f=this._shapes;f.indicator=o,f.indicatorLabel=u,f.indicatorLabelPoint=d,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():aH(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[XV(t[0],n,r,!0),XV(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t||=0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];jI(t,r,i,e,0);var a=n.getExtent();this._dataInterval=[XV(r[0],i,a,!0),XV(r[1],i,a,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new Cf(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=100,r=[],i=(e[1]-e[0])/n;r.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(var a=1;a<n;a++){var o=e[0]+i*a;if(o>e[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Fd(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);ZV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=XV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=up(n.handleLabelPoints[l],lp(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=XV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=up(c.indicatorLabelPoint,lp(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;C<S.length;C++)this.api.enterBlur(S[C])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=QV($V(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i=[0,r[1]],a=n.getExtent();e=QV($V(i[0],e),i[1]);var o=iH(n,a,i),s=[e-o,e+o],c=XV(e,i,a,!0),l=[XV(s[0],i,a,!0),XV(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||aH(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=fl(u,d);this._dispatchHighDown(`downplay`,YV(f[0],n)),this._dispatchHighDown(`highlight`,YV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(KO(e.target,function(e){var n=Wl(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,YV(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=lp(t,r?null:this.group);return U(e)?up(e,i,n):dp(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type=`visualMap.continuous`,t}(KV);function rH(e,t,n,r){return new lf({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){YT(e.event)},ondragend:r})}function iH(e,t,n){var r=eH/2,i=e.get(`hoverLinkDataSize`);return i&&(r=XV(i,t,n,!0)/2),r}function aH(e){return!!(e.get(`hoverLinkOnHandle`)??e.get(`realtime`))}function oH(e){return e===`vertical`?`ns-resize`:`ew-resize`}var sH={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},cH=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},lH=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(RB(t.stateList,t.targetVisuals,H(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(H(uH,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function uH(e,t,n,r){for(var i=t.targetVisuals[r],a=eI.prepareVisualTypes(i),o={color:WO(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}var dH=z;function fH(e){var t=e&&e.visualMap;U(t)||(t=t?[t]:[]),dH(t,function(e){if(e){pH(e,`splitList`)&&!pH(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&U(t)&&dH(t,function(e){K(e)&&(pH(e,`start`)&&!pH(e,`min`)&&(e.min=e.start),pH(e,`end`)&&!pH(e,`max`)&&(e.max=e.end))})}})}function pH(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var mH=!1;function hH(e){mH||(mH=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(sH,cH),z(lH,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(fH))}function gH(e){e.registerComponentModel(WV),e.registerComponentView(nH),hH(e)}var _H=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],vH[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=B(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=eI.listVisualTypes(),i=this.isCategory();z(t.pieces,function(e){z(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),z(n,function(e,n){var r=!1;z(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&z(this.stateList,function(e){(t[e]||(t[e]={}))[n]=PV.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,z(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;z(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=eI.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){eI.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return z(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=bg(HV.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(HV),vH={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Ac(e),z(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;z(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),yH(t,e)},pieces:function(e){var t=this.option;z(t.pieces,function(t,n){K(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=eI.retrieveVisuals(t),e.push(r)},this),yH(t,e),Ac(e),z(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function yH(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var bH=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Re(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),z(o.viewPieceList,function(o){var s=o.piece,u=new Fd;u.onclick=H(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new js({style:Gp(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:q(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),X_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:YV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return JV(e,this.api,e.itemSize);var n=t.align;return n&&n!==`auto`||(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Fd,o=this.visualMapModel.textStyleModel;a.add(new js({style:Gp(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=B(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Ey(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,z(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(KV);function xH(e){e.registerComponentModel(_H),e.registerComponentView(bH),hH(e)}function SH(e){Vj(gH),Vj(xH)}var CH={label:{enabled:!0},decal:{show:!1}},wH=ml(),TH=ml(),EH=Ul(DH);function DH(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=TH(e).scope||(TH(e).scope={}),i=P(CH);F(i.label,e.getLocaleModel().get(`aria`),!1),F(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=J();e.eachSeries(function(e){e.isColorBySeries()||(wH(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(W(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=pv(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=wH(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=pv(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?I(I({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=L(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`))r.setAttribute(`aria-label`,a.get(`description`));else{var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=o>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_<i.count();_++)if(_<u){var v=i.getName(_),y=m?Te(i.getValues(_),function(e,t){return R(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(s(b,{name:v,value:y.join(d)}))}n+=g.join(d)+p,h.push(n)}});var _=a.getModel([`series`,`multiple`,`separator`]),v=_.get(`middle`),y=_.get(`end`);p+=h.join(v)+y,r.setAttribute(`aria-label`,p)}}}}}function s(e,t){if(!G(e))return e;var n=e;return z(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function c(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function l(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function OH(e){if(e&&e.aria){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},z([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function kH(e){e.registerPreprocessor(OH),e.registerVisual(e.PRIORITY.VISUAL.ARIA,EH)}var AH=e({createDimensions:()=>Gh,createList:()=>jH,createScale:()=>NH,createSymbol:()=>Ey,createTextStyle:()=>FH,dataStack:()=>MH,enableHoverEmphasis:()=>$u,getECData:()=>Wl,getLayoutRect:()=>Q_,mixinAxisModelCommonMethods:()=>PH});function jH(e){return pg(null,e)}var MH={isDimensionStacked:lg,enableDataStack:sg,getStackedDimension:ug};function NH(e,t){var n=t;t instanceof pm||(n=new pm(t));var r=mx(n),i=hx(n,r,!1);return e[1]<e[0]&&(e=e.slice().reverse()),aM(i,n,null,null,e),i}function PH(e){Se(e,Hj)}function FH(e,t){return t||={},Gp(e,null,null,t.state!==`normal`)}var IH=e({MAX_SAFE_INTEGER:()=>xc,asc:()=>pc,getPercentWithPrecision:()=>vc,getPixelPrecision:()=>gc,getPrecision:()=>mc,getPrecisionSafe:()=>hc,isNumeric:()=>Mc,isRadianAroundZero:()=>Cc,linearMap:()=>ac,nice:()=>Oc,numericToNumber:()=>jc,parseDate:()=>Tc,parsePercent:()=>oc,quantile:()=>kc,quantity:()=>Ec,quantityExponent:()=>Dc,reformIntervals:()=>Ac,remRadian:()=>Sc,round:()=>fc}),LH=e({format:()=>g_,parse:()=>Tc,roundTime:()=>y_}),RH=e({Arc:()=>bf,BezierCurve:()=>vf,BoundingRect:()=>X,Circle:()=>Ld,CompoundPath:()=>xf,Ellipse:()=>zd,Group:()=>Fd,Image:()=>vs,IncrementalDisplayable:()=>Ff,Line:()=>mf,LinearGradient:()=>Cf,Polygon:()=>lf,Polyline:()=>df,RadialGradient:()=>wf,Rect:()=>Es,Ring:()=>af,Sector:()=>nf,Text:()=>js,clipPointsByRect:()=>hp,clipRectByRect:()=>gp,createIcon:()=>_p,extendPath:()=>Qf,extendShape:()=>Xf,getShapeClass:()=>ep,getTransform:()=>lp,initProps:()=>Bf,makeImage:()=>np,makePath:()=>tp,mergePath:()=>ip,registerShape:()=>$f,resizePath:()=>ap,updateProps:()=>zf}),zH=e({addCommas:()=>F_,capitalFirst:()=>W_,encodeHTML:()=>Pg,formatTime:()=>U_,formatTpl:()=>V_,getTextRect:()=>P_,getTooltipMarker:()=>H_,normalizeCssArray:()=>L_,toCamelCase:()=>I_,truncateText:()=>er}),BH=e({bind:()=>H,clone:()=>P,curry:()=>Oe,defaults:()=>L,each:()=>z,extend:()=>I,filter:()=>Te,indexOf:()=>R,inherits:()=>xe,isArray:()=>U,isFunction:()=>W,isObject:()=>K,isString:()=>G,map:()=>B,merge:()=>F,reduce:()=>we});function VH(e){var t=cv.extend(e);return cv.registerClass(t),t}function HH(e){var t=sO.extend(e);return sO.registerClass(t),t}function UH(e){var t=dy.extend(e);return dy.registerClass(t),t}function WH(e){var t=ab.extend(e);return ab.registerClass(t),t}var GH=e({Axis:()=>QS,ChartView:()=>ab,ComponentModel:()=>cv,ComponentView:()=>sO,List:()=>Wh,Model:()=>pm,PRIORITY:()=>hA,SeriesModel:()=>dy,color:()=>li,connect:()=>fj,dataTool:()=>Rj,dependencies:()=>Zk,disConnect:()=>mj,disconnect:()=>pj,dispose:()=>hj,env:()=>Y,extendChartView:()=>WH,extendComponentModel:()=>VH,extendComponentView:()=>HH,extendSeriesModel:()=>UH,format:()=>zH,getCoordinateSystemDimensions:()=>Ej,getInstanceByDom:()=>gj,getInstanceById:()=>_j,getMap:()=>Fj,graphic:()=>RH,helper:()=>AH,init:()=>dj,innerDrawElementOnCanvas:()=>Fk,matrix:()=>jt,number:()=>IH,parseGeoJSON:()=>nP,parseGeoJson:()=>nP,registerAction:()=>wj,registerCoordinateSystem:()=>Tj,registerCustomSeries:()=>Dj,registerLayout:()=>Oj,registerLoading:()=>Mj,registerLocale:()=>Ug,registerMap:()=>Pj,registerPostInit:()=>xj,registerPostUpdate:()=>Sj,registerPreprocessor:()=>yj,registerProcessor:()=>bj,registerTheme:()=>vj,registerTransform:()=>Ij,registerUpdateLifecycle:()=>Cj,registerVisual:()=>kj,setCanvasCreator:()=>Nj,setPlatformAPI:()=>ne,throttle:()=>Zw,time:()=>LH,use:()=>Vj,util:()=>BH,vector:()=>Vt,version:()=>Xk,zrUtil:()=>re,zrender:()=>JE}),KH=Math.sin,qH=Math.cos,JH=Math.PI,YH=Math.PI*2,XH=180/JH,ZH=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=Hi(u-YH)||(l?c>=YH:-c>=YH),f=c>0?c%YH:c%YH+YH,p=!1;p=d?!0:!Hi(u)&&f>=JH==!!l;var m=e+n*qH(a),h=t+r*KH(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*XH);if(d){var _=1/this._p,v=(l?1:-1)*(YH-_);this._add(`A`,n,r,g,1,+l,e+n*qH(a+v),t+r*KH(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*qH(o),b=t+r*KH(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),QH=`none`,$H=Math.round;function eU(e){var t=e.fill;return t!=null&&t!==QH}function tU(e){var t=e.stroke;return t!=null&&t!==QH}var nU=[`lineCap`,`miterLimit`,`lineJoin`],rU=B(nU,function(e){return`stroke-`+e.toLowerCase()});function iU(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof vs)e(`opacity`,i);else{if(eU(t)){var a=Bi(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,QH);if(tU(t)){var s=Bi(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=uk(n),p=f[0],m=f[1];p&&(m=$H(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,QH);for(var h=0;h<nU.length;h++){var g=nU[h];if(r||t[g]!==ls[g]){var _=t[g]||ls[g];_&&e(rU[h],_)}}}else r&&e(`stroke`,QH)}}var aU=`http://www.w3.org/2000/svg`,oU=`http://www.w3.org/1999/xlink`,sU=`http://www.w3.org/2000/xmlns/`,cU=`http://www.w3.org/XML/1998/namespace`,lU=`ecmeta_`;function uU(e){return document.createElementNS(aU,e)}function dU(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function fU(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function pU(e){return`</`+e+`>`}function mU(e,t){t||={};var n=t.newline?`
|
|
37
37
|
`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return fU(i,a)+(i===`style`?o||``:Pg(o))+(t?``+n+B(t,function(e){return r(e)}).join(n)+n:``)+pU(i)}return r(e)}function hU(e,t,n){n||={};var r=n.newline?`
|
|
38
38
|
`:``,i=` {`+r,a=r+`}`,o=B(V(e),function(t){return t+i+B(V(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=B(V(t),function(e){return`@keyframes `+e+i+B(V(t[e]),function(n){return n+i+B(V(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function gU(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function _U(e,t,n,r){return dU(`svg`,`root`,{width:e,height:t,xmlns:aU,"xmlns:xlink":oU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var vU=0;function yU(){return vU++}var bU={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},xU=`transform-origin`;function SU(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new ZH;return i.reset(ra(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function CU(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[xU]=n+`px `+r+`px`)}var wU={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function TU(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function EU(e,t,n){var r=e.shape.paths,i={},a,o;if(z(r,function(e){var t=gU(n.zrId);t.animation=!0,OU(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=V(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=TU(i,n);return a.replace(o,s)}}function DU(e){return G(e)?bU[e]?`cubic-bezier(`+bU[e]+`)`:si(e)?e:``:``}function OU(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof xf){var s=EU(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=DU(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=DU(d.easing),m=d.rawValue;(G(m)||Ae(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};Nr(g,e),I(g,s[h]);var _=ia(g),v=s[h][u];l[h]=_?{transform:_}:{},CU(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new Vo);var S=y.len();y.reset(),l[h].d=SU(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return wU[e]})}for(var w=V(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][xU]!==l[O][xU]){T=!1;break}E=l[D][xU]}if(T&&E){for(var h in l)l[h][xU]&&delete l[h][xU];t[xU]=E}if(Te(w,function(e){return V(l[e]).length>0}).length)return TU(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+yU();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function kU(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};AU(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Ri(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),AU(r,t,n,!0)}}}function AU(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+yU(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var jU=Math.round;function MU(e){return e&&G(e.src)}function NU(e){return e&&W(e.toDataURL)}function PU(e,t,n,r){iU(function(i,a){var o=i===`fill`||i===`stroke`;o&&ta(a)?YU(t,e,i,r):o&&Qi(a)?XU(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),JU(n,e,r)}function FU(e,t){var n=oD(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[lU+`silent`]=`true`))}function IU(e){return Hi(e[0]-1)&&Hi(e[1])&&Hi(e[2])&&Hi(e[3]-1)}function LU(e){return Hi(e[4])&&Hi(e[5])}function RU(e,t,n){if(t&&!(LU(t)&&IU(t))){var r=n?10:1e4;e.transform=IU(t)?`translate(`+jU(t[4]*r)/r+` `+jU(t[5]*r)/r+`)`:Gi(t)}}function zU(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(jU(r[a][0]*n)/n),i.push(jU(r[a][1]*n)/n);t.points=i.join(` `)}function BU(e){return!e.smooth}function VU(e){var t=B(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=jU(o*r)/r)}}}var HU={circle:[VU([`cx`,`cy`,`r`])],polyline:[zU,BU],polygon:[zU,BU]};function UU(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function WU(e,t){var n=e.style,r=e.shape,i=HU[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&ra(e)||4;if(i&&!t.willUpdate&&(!i[1]||i[1](r))&&!(o&&UU(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;m.__svgPathVersion===p&&h&&c===m.__svgPathStrokePercent||(h||=m.__svgPathBuilder=new ZH,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return RU(a,e.transform),PU(a,n,e,t),FU(a,e),t.animation&&OU(e,a,t),t.emphasis&&kU(e,a,t),dU(s,e.id+``,a)}function GU(e,t){var n=e.style,r=n.image;if(r&&!G(r)&&(MU(r)?r=r.src:NU(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),RU(c,e.transform),PU(c,n,e,t),FU(c,e),t.animation&&OU(e,c,t),dU(`image`,e.id+``,c)}}function KU(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=qi(n.y||0,Xn(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":Ki[n.textAlign]||n.textAlign};if(Ls(n)){var c=``,l=n.fontStyle,u=Fs(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),RU(s,e.transform),PU(s,n,e,t),FU(s,e),t.animation&&OU(e,s,t),dU(`text`,e.id+``,s,void 0,r)}}function qU(e,t){if(e instanceof fs)return WU(e,t);if(e instanceof vs)return GU(e,t);if(e instanceof ms)return KU(e,t)}function JU(e,t,n){var r=e.style;if(Ji(r)){var i=Yi(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=Bi(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=dU(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[dU(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=na(o)}}function YU(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if($i(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(ea(i))a=`radialGradient`,o.cx=q(i.x,.5),o.cy=q(i.y,.5),o.r=q(i.r,.5);else return;for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=Wi(s[l].offset)*100+`%`,f=s[l].color,p=Bi(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(dU(`stop`,l+``,g))}var _=mU(dU(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=dU(a,y,o,c)),t[n]=na(y)}function XU(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(Xi(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(G(h)?m=h:MU(h)?m=h.src:NU(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;He(f,g),He(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=Ot(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=dU(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=ia(i);x&&(o.patternTransform=x);var S=dU(`pattern`,``,o,[d]),C=mU(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=dU(`pattern`,T,o,[d])),t[n]=na(T)}}function ZU(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=dU(`clipPath`,a,o,[WU(e,n)])}t[`clip-path`]=na(a)}function QU(e){return document.createTextNode(e)}function $U(e,t,n){e.insertBefore(t,n)}function eW(e,t){e.removeChild(t)}function tW(e,t){e.appendChild(t)}function nW(e){return e.parentNode}function rW(e){return e.nextSibling}function iW(e,t){e.textContent=t}var aW=58,oW=120,sW=dU(``,``);function cW(e){return e===void 0}function lW(e){return e!==void 0}function uW(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function dW(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function fW(e){var t,n=e.children,r=e.tag;if(lW(r)){var i=e.elm=uU(r);if(hW(sW,e),U(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&tW(i,fW(a))}else lW(e.text)&&!K(e.text)&&tW(i,QU(e.text))}else e.elm=QU(e.text);return e.elm}function pW(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&$U(e,fW(a),t)}}function mW(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(lW(i.tag)?eW(nW(i.elm),i.elm):eW(e,i.elm))}}function hW(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===oW?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(sU,n,o):n.charCodeAt(3)===aW?r.setAttributeNS(cU,n,o):n.charCodeAt(5)===aW?r.setAttributeNS(oU,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function gW(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:dW(o,l)?(_W(o,l),o=t[++r],l=n[++i]):dW(s,u)?(_W(s,u),s=t[--a],u=n[--c]):dW(o,u)?(_W(o,u),$U(e,o.elm,rW(s.elm)),o=t[++r],u=n[--c]):dW(s,l)?(_W(s,l),$U(e,s.elm,o.elm),s=t[--a],l=n[++i]):(cW(d)&&(d=uW(t,r,a)),f=d[l.key],cW(f)?$U(e,fW(l),o.elm):(p=t[f],p.tag===l.tag?(_W(p,l),t[f]=void 0,$U(e,p.elm,o.elm)):$U(e,fW(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,pW(e,m,n,i,c)):mW(e,t,r,a))}function _W(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(hW(e,t),cW(t.text)?lW(r)&&lW(i)?r!==i&&gW(n,r,i):lW(i)?(lW(e.text)&&iW(n,``),pW(n,null,i,0,i.length-1)):lW(r)?mW(n,r,0,r.length-1):lW(e.text)&&iW(n,``):e.text!==t.text&&(lW(r)&&mW(n,r,0,r.length-1),iW(n,t.text)))}function vW(e,t){if(dW(e,t))_W(e,t);else{var n=e.elm,r=nW(n);fW(t),r!==null&&($U(r,t.elm,rW(n)),mW(r,[e],0,0))}return t}var yW=0,bW=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=xW(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+yW++,this._oldVNode=_U(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=uU(`svg`);hW(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,vW(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return qU(e,gU(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=gU(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=SW(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=dU(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=B(V(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(dU(`defs`,`defs`,{},c)),e.animation){var l=hU(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=dU(`style`,`stl`,{},[],l);a.push(u)}}return _U(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},mU(this.renderToVNode({animation:q(e.cssAnimation,!0),emphasis:q(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:q(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};ZU(d[g],_,t);var v=dU(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=qU(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=ck(r,0,n),t=ck(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(Qi(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=aa(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}();function xW(e){return function(){}}function SW(e,t,n,r){var i;if(n&&n!==`none`){if(i=dU(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),ta(n))YU({fill:n},i.attrs,`fill`,r);else if(Qi(n))XU({style:{fill:n},dirty:tt,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=Bi(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function CW(e){e.registerPainter(`svg`,bW)}Vj([$x,MT,XF,DR,AB,SH,kH,NV,oV,Qz,CW]);function wW(e){return e?[...e.querySelectorAll(`[_echarts_instance_]`)].map(e=>gj(e)).filter(e=>e!==void 0&&!e.isDisposed()):[]}function TW(e){let t=(0,S.useRef)(null),n=g();return(0,S.useEffect)(()=>{let e=t.current;if(!e||typeof ResizeObserver>`u`)return;let n,r=-1,i=new ResizeObserver(t=>{let i=t[0]?.contentRect.width??0;i!==r&&(r=i,clearTimeout(n),n=setTimeout(()=>{for(let t of wW(e))t.resize()},50))});return i.observe(e),()=>{clearTimeout(n),i.disconnect()}},[]),(0,S.useEffect)(()=>{for(let r of wW(t.current))e&&r.setOption(e,{lazyUpdate:!0}),n&&r.setOption({animation:!1})}),t}var $=i(),EW=e=>e+new Date(e).getTimezoneOffset()*6e4,DW=e=>e-new Date(e).getTimezoneOffset()*6e4,OW={xAxis:{axisLabel:{hideOverlap:!0}}};function kW({series:e,granularity:t,locale:r,labels:i,type:a=`line`,height:s=280,incompleteAfter:d,compact:f=!1,loading:p=!1,now:m,className:g}){let C=(0,S.useMemo)(()=>u(r),[r]),w=v(),[T,E]=(0,S.useState)(`chart`),D=TW(OW),O=(0,S.useId)(),k=(0,S.useMemo)(()=>e.map((e,t)=>({name:e.name,color:w.series[t%w.series.length],data:e.points.map(([e,t])=>[EW(e),t])})),[e,w]),A=d===null?void 0:d??y(t,m),j=(0,S.useMemo)(()=>{let t=new Set;for(let n of e)for(let[e]of n.points)t.add(e);return[...t].sort((e,t)=>e-t)},[e]);return(0,$.jsxs)(`div`,{ref:D,className:n(`grid min-w-0 grid-cols-1 gap-3`,g),"data-testid":`analytics-timeseries`,children:[(0,$.jsxs)(`div`,{className:n(`flex min-w-0 flex-wrap items-center gap-x-4 gap-y-2`,f?`justify-end`:`justify-between`),children:[f?null:(0,$.jsx)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1`,children:p?e.map(e=>(0,$.jsx)(_.SmallItem,{loading:!0},e.id)):e.map((e,t)=>(0,$.jsx)(_.SmallItem,{name:e.name,color:w.series[t%w.series.length],value:C.number(e.total??e.points.reduce((e,[,t])=>e+t,0))},e.id))}),(0,$.jsx)(o,{variant:`ghost`,size:`xs`,icon:T===`chart`?(0,$.jsx)(l,{size:14}):(0,$.jsx)(b,{size:14}),"aria-expanded":T===`table`,"aria-controls":O,disabled:p,onClick:()=>E(e=>e===`chart`?`table`:`chart`),children:T===`chart`?i.showTable:i.showChart})]}),T===`chart`&&p?(0,$.jsx)(`span`,{role:`status`,className:`sr-only`,children:i.loading}):null,T===`chart`?(0,$.jsx)(`div`,{"aria-hidden":p||void 0,className:`min-w-0`,children:(0,$.jsx)(h,{echarts:GH,type:a,data:k,gradient:a===`line`,height:s,isDarkMode:w.isDarkMode,loading:p,yAxisMinInterval:1,...f?{yAxisTickCount:2,xAxisTickCount:3}:{},xAxisTickFormat:e=>C.tick(DW(e),t),yAxisTickFormat:e=>C.compact(e),tooltipValueFormat:e=>C.number(e),tooltipTimestampFormat:e=>C.bucket(DW(e),t),tooltipFooter:i.timezone,tooltipFollowCursor:`x`,...A===void 0?{}:{incomplete:{after:EW(A)}},ariaDescription:i.description})}):null,(0,$.jsx)(`section`,{id:O,hidden:T!==`table`,"aria-label":i.description,tabIndex:T===`table`?0:-1,className:`max-h-80 min-w-0 overflow-auto rounded-lg ring ring-kumo-hairline`,children:T===`table`&&(0,$.jsxs)(x,{children:[(0,$.jsx)(`caption`,{className:`sr-only`,children:i.description}),(0,$.jsx)(x.Header,{children:(0,$.jsxs)(x.Row,{children:[(0,$.jsx)(x.Head,{children:i.time}),e.map(e=>(0,$.jsx)(x.Head,{className:`text-end whitespace-nowrap`,children:e.name},e.id))]})}),(0,$.jsx)(x.Body,{children:j.map(n=>(0,$.jsxs)(x.Row,{children:[(0,$.jsx)(x.Cell,{className:`whitespace-nowrap`,children:(0,$.jsx)(c,{as:`span`,children:C.bucket(n,t)})}),e.map(e=>{let t=e.points.find(([e])=>e===n)?.[1];return(0,$.jsx)(x.Cell,{className:`text-end whitespace-nowrap tabular-nums`,children:t===void 0?`—`:C.number(t)},e.id)})]},n))})]})}),T===`table`&&(0,$.jsx)(c,{variant:`secondary`,size:`xs`,children:i.timezone})]})}function AW({locale:e,labels:t,pageviews:n,visits:r,series:i,channels:o,redirects:l,href:u,loading:m=!1,empty:h}){if(h!=null&&h!==!1)return(0,$.jsx)($.Fragment,{children:h});let g=o.reduce((e,t)=>e+t.value,0);return(0,$.jsxs)(`div`,{className:`grid min-w-0 gap-5`,"data-testid":`readers-summary`,children:[(0,$.jsxs)(d,{label:t.figures,density:`compact`,children:[(0,$.jsx)(p,{label:t.pageviews,value:n.value,previous:n.previous??null,locale:e,loading:m,...t.describeDelta?{describeDelta:t.describeDelta}:{}}),(0,$.jsx)(p,{label:t.visits,value:r.value,previous:r.previous??null,locale:e,loading:m,...t.describeDelta?{describeDelta:t.describeDelta}:{}})]}),(0,$.jsx)(kW,{series:[{id:`pageviews`,name:t.pageviews,points:i}],granularity:`day`,type:`bar`,height:120,compact:!0,locale:e,labels:t.chart,loading:m}),(0,$.jsx)(f,{rows:o,locale:e,limit:3,total:g,showOther:!1,otherLabel:t.other,label:t.channels,loading:m}),l&&!m&&(0,$.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2`,children:[(0,$.jsx)(`span`,{className:`flex h-lh shrink-0 items-center text-kumo-subtle`,"aria-hidden":!0,children:(0,$.jsx)(s,{icon:T,size:16})}),(0,$.jsx)(c,{variant:`secondary`,size:`sm`,children:l})]}),(0,$.jsx)(`div`,{className:`flex justify-start`,children:(0,$.jsx)(a,{variant:`ghost`,size:`sm`,href:u,icon:(0,$.jsx)(b,{size:16}),children:t.open})})]})}var jW=e({AnalyticsTimeseries:()=>kW,ReadersSummary:()=>AW});export{GH as i,kW as n,TW as r,jW as t};
|
|
39
|
-
//# sourceMappingURL=charts-
|
|
39
|
+
//# sourceMappingURL=charts-DWHcHyjN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{C as n,Dt as r,Hn as i,Nt as a,S as o,Sn as s,Tn as c,at as l,b as u,ct as d,fr as f,gr as p,hr as m,k as h,pr as g,rr as _,st as v,t as y,w as b}from"./useBaseUiId-lg1teubxudgin0w2-DE9psqVX.js";import{i as x,r as S}from"./react-iRJfyluG.js";import{c as C,n as w}from"./useButton-h7s9aq1sfw6arawe-CDg3MSn7.js";import{Rt as T}from"./index-
|
|
2
|
-
//# sourceMappingURL=collapsible-l8g94on4w7qfosmn-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./vendor-styling-da1xibnxfkjmtglr-f72JA6U4.js";import{C as n,Dt as r,Hn as i,Nt as a,S as o,Sn as s,Tn as c,at as l,b as u,ct as d,fr as f,gr as p,hr as m,k as h,pr as g,rr as _,st as v,t as y,w as b}from"./useBaseUiId-lg1teubxudgin0w2-DE9psqVX.js";import{i as x,r as S}from"./react-iRJfyluG.js";import{c as C,n as w}from"./useButton-h7s9aq1sfw6arawe-CDg3MSn7.js";import{Rt as T}from"./index-B2hMMgOI.js";var E=e(x(),1);function D(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[o,s]=C({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:f,transitionStatus:p}=u(o,!0,!0),m=y(),[h,g]=E.useState(),_=h===null?void 0:h??m,v=l(e=>{let t=!o,n=d(a,e.nativeEvent);r(t,n),!n.isCanceled&&s(t)});return E.useMemo(()=>({defaultPanelId:m,disabled:i,handleTrigger:v,mounted:c,open:o,panelId:_,setMounted:f,setOpen:s,setPanelIdState:g,transitionStatus:p}),[m,i,v,c,o,_,f,s,g,p])}var O=E.createContext(void 0);O.displayName=`CollapsibleRootContext`;function k(){let e=E.useContext(O);if(e===void 0)throw Error(`Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.`);return e}var A=`data-open`,j=`data-closed`,M=s,N=`data-panel-open`,P={[A]:``},F={[j]:``},I={open(e){return e?{[N]:``}:null}},L={open(e){return e?P:F}},R={height:void 0,width:void 0};function z(e){let{externalRef:t,hiddenUntilFound:i,id:a,keepMounted:s,mounted:c,onOpenChange:u,open:f,setMounted:p,setOpen:m,transitionStatus:y}=e,x=E.useRef(null),S=E.useRef(null),[C,w]=E.useState(R),T=E.useRef(R),D=E.useRef(!1),O=E.useRef(f),k=E.useRef(!1),[A,j]=E.useState(!1),N=E.useRef(null),P=g(t,x),F=h(f),I=o(x),L=!f&&!c,z=A?`idle`:y,V=f&&(O.current||k.current),U=!f&&c&&S.current===`css-animation`&&C.height===void 0&&C.width===void 0?T.current:C,W=i&&L&&S.current!==`css-animation`,G=l((e,t=!0)=>{t&&(T.current=e),w(e)}),K=l(()=>{N.current?.(),N.current=null}),q=l(e=>{K(),N.current=()=>{N.current=null,e()}}),J=l(()=>{f&&c&&S.current===`css-animation`&&(k.current=!0)});_(()=>{A&&y!==`starting`&&j(!1)},[A,y]),E.useEffect(()=>()=>{J(),K()},[J,K]),_(()=>{let e=x.current;if(!e)return;!f&&N.current&&K();let t=ee(e,V);if(S.current=t,f&&y===`idle`&&O.current&&t===`css-animation`){T.current=B(e);return}if(f&&y===`starting`){let n=D.current;if(D.current=!1,t===`none`){G(B(e)),j(!0);return}if(t===`css-transition`){let t=te(e);if(G(B(e)),!n)return t;let r=H(e,`transition-duration`,`0s`);return q(r),j(!0),t}G(B(e));let r=H(e,`animation-name`,`none`);if(!n){r();return}let i=H(e,`animation-duration`,`0s`);r(),q(i),j(!0);return}if(!f&&c&&(y===`idle`||y===`starting`)){if(O.current=!1,k.current=!1,t===`none`){G(R,!1),p(!1);return}G(B(e));return}if(y!==`ending`)return;if(t===`none`){p(!1);return}let n=B(e);n.height>0||n.width>0?(G(n),t===`css-animation`&&H(e,`animation-name`,`none`)()):p(!1)},[c,f,K,G,p,q,V,y]),n({enabled:f&&c&&z===`idle`,open:!0,ref:x,onComplete(){f&&G(R,!1)}}),E.useEffect(()=>{if(f||!c||z!==`ending`||!x.current)return;let e=new AbortController,t=-1;function n(){F.current||(p(!1),G(R,!1))}return t=b.request(()=>{I(n,e.signal)}),()=>{b.cancel(t),e.abort()}},[F,c,f,z,I,G,p]),_(()=>{let e=x.current;e&&i&&L&&e.setAttribute(`hidden`,`until-found`)},[L,i]),E.useEffect(function(){let e=x.current;if(!e)return;function t(e){let t=d(r,e);u(!0,t),!t.isCanceled&&(D.current=!0,m(!0))}return v(e,`beforematch`,t)},[u,m]);let Y=s||i||c||f;return{height:U.height,props:{...W?{[M]:``}:void 0,hidden:L,id:a},ref:P,shouldPreventOpenAnimation:V,shouldRender:Y,transitionStatus:z,width:U.width}}function B(e){return{height:e.scrollHeight,width:e.scrollWidth}}function ee(e,t){let n=i(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&V(n.animationDuration),a=V(n.transitionDuration);return r&&a?(p(`CSS transitions and CSS animations both detected on Collapsible or Accordion panel.`,`Only one of either animation type should be used.`),`css-transition`):a?`css-transition`:r?`css-animation`:`none`}function V(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function H(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function te(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=b.request(n);return()=>{b.cancel(r),n()}}var U=S(),W={...L,...c},G=E.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...u}=e,d=l(o),f=D({open:s,defaultOpen:i,onOpenChange:d,disabled:a}),p=E.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),h=E.useMemo(()=>({...f,onOpenChange:d,state:p}),[f,d,p]),g=m(`div`,e,{state:p,ref:t,props:u,stateAttributesMapping:W});return(0,U.jsx)(O.Provider,{value:h,children:g})});G.displayName=`CollapsibleRoot`;var K={...I,...c},q=E.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=k(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:h}=w({disabled:c,focusableWhenDisabled:!0,native:u});return m(`button`,e,{state:a,ref:[t,h],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:K})});q.displayName=`CollapsibleTrigger`;var J=`--collapsible-panel-height`,Y=`--collapsible-panel-width`,X=E.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e;E.useEffect(()=>{r&&i===!1&&p("The `keepMounted={false}` prop on `Collapsible.Panel` is ignored when `hiddenUntilFound` is enabled, since the panel must remain mounted while closed.")},[r,i]);let{defaultPanelId:l,mounted:u,onOpenChange:d,open:h,setMounted:g,setPanelIdState:v,setOpen:y,state:b,transitionStatus:x}=k(),S=r??!1,C=i??!1,w=o||void 0,T=w??l;_(()=>(v(e=>w??(e===null?void 0:e)),()=>{v(e=>e===w?null:e)}),[w,v]);let{height:D,props:O,ref:A,shouldPreventOpenAnimation:j,shouldRender:M,transitionStatus:N,width:P}=z({externalRef:t,hiddenUntilFound:S,id:T,keepMounted:C,mounted:u,onOpenChange:d,open:h,setMounted:g,setOpen:y,transitionStatus:x}),F={...b,transitionStatus:N},I=f(s,F),L=m(`div`,{...e,style:void 0},{state:F,ref:A,props:[O,{style:{[J]:D===void 0?`auto`:`${D}px`,[Y]:P===void 0?`auto`:`${P}px`}},c,I?{style:I}:void 0,j?{style:{animationName:`none`}}:void 0],stateAttributesMapping:W});return M?L:null});X.displayName=`CollapsiblePanel`;function Z({className:e,...t}){return(0,U.jsx)(G,{className:e,...t})}Z.displayName=`Collapsible.Root`;var Q=(0,E.forwardRef)(({className:e,...n},r)=>(0,U.jsx)(q,{ref:r,"data-kumo-component":`Collapsible`,"data-kumo-part":`trigger`,className:t(`cursor-pointer`,e),...n}));Q.displayName=`Collapsible.Trigger`;var $=(0,E.forwardRef)(({className:e,...t},n)=>(0,U.jsx)(X,{ref:n,className:e,...t}));$.displayName=`Collapsible.Panel`;var ne=(0,E.forwardRef)(({children:e,className:n},r)=>(0,U.jsxs)(q,{ref:r,"data-kumo-component":`Collapsible`,"data-kumo-part":`default-trigger`,className:t(`m-0 border-none bg-transparent p-0 shadow-none`,`flex cursor-pointer items-center gap-1 text-base font-medium text-kumo-default select-none`,n),children:[(0,U.jsx)(`span`,{children:e}),(0,U.jsx)(`span`,{className:`inline-grid w-4 shrink-0 place-items-center`,children:(0,U.jsx)(T,{"aria-hidden":!0,size:12,weight:`bold`,className:`block size-3 origin-center transition-transform duration-100 ease-out [[data-panel-open]_&]:rotate-180`})})]}));ne.displayName=`Collapsible.DefaultTrigger`;var re=(0,E.forwardRef)(({children:e,className:n,...r},i)=>(0,U.jsx)(X,{ref:i,className:t(`h-[var(--collapsible-panel-height)] overflow-hidden transition-[height,opacity] duration-100 ease-out data-ending-style:h-0 data-ending-style:opacity-0 data-starting-style:h-0 data-starting-style:opacity-0 [&[hidden]:not([hidden='until-found'])]:hidden`,n),...r,children:(0,U.jsx)(`div`,{className:`my-2 space-y-4 border-s-2 border-kumo-fill py-1 pe-1 ps-4`,children:e})}));re.displayName=`Collapsible.DefaultPanel`;var ie=Object.assign(Z,{Root:Z,Trigger:Q,Panel:$,DefaultTrigger:ne,DefaultPanel:re});export{ie as t};
|
|
2
|
+
//# sourceMappingURL=collapsible-l8g94on4w7qfosmn-D_uRnC33.js.map
|
package/dist/assets/studio/assets/{collection-icons-D-IZFMkB.js → collection-icons-Bv8JHANh.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{i as n}from"./react-iRJfyluG.js";import{t as r}from"./Article.es-B1mhw0Yg.js";import{t as i}from"./CalendarBlank.es-VpMruUO0.js";import{t as a}from"./Files.es-BwAHmY88.js";import{t as o}from"./MapPin.es-CtoNnkl7.js";import{t as s}from"./Package.es--NqoouWd.js";import{t as c}from"./Question.es-trc8MUtE.js";import{t as l}from"./Quotes.es-DyaHmUO_.js";import{t as u}from"./IconBase.es-BXBadb8L.js";import{Et as d}from"./index-
|
|
2
|
-
//# sourceMappingURL=collection-icons-
|
|
1
|
+
import{n as e,r as t}from"./rolldown-runtime-XKyaHtl9.js";import{i as n}from"./react-iRJfyluG.js";import{t as r}from"./Article.es-B1mhw0Yg.js";import{t as i}from"./CalendarBlank.es-VpMruUO0.js";import{t as a}from"./Files.es-BwAHmY88.js";import{t as o}from"./MapPin.es-CtoNnkl7.js";import{t as s}from"./Package.es--NqoouWd.js";import{t as c}from"./Question.es-trc8MUtE.js";import{t as l}from"./Quotes.es-DyaHmUO_.js";import{t as u}from"./IconBase.es-BXBadb8L.js";import{Et as d}from"./index-B2hMMgOI.js";var f=t(n(),1),p=new Map([[`bold`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z`}))],[`fill`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z`}))],[`regular`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))]]),m=new Map([[`bold`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M100,100a12,12,0,0,1,12-12h32a12,12,0,0,1,0,24H112A12,12,0,0,1,100,100ZM236,68V196a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V68A20,20,0,0,1,40,48H76V40a28,28,0,0,1,28-28h48a28,28,0,0,1,28,28v8h36A20,20,0,0,1,236,68ZM100,48h56V40a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4ZM44,72v35.23A180.06,180.06,0,0,0,128,128a180,180,0,0,0,84-20.78V72ZM212,192V133.94A204.27,204.27,0,0,1,128,152a204.21,204.21,0,0,1-84-18.06V192Z`}))],[`fill`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M152,112a8,8,0,0,1-8,8H112a8,8,0,0,1,0-16h32A8,8,0,0,1,152,112Zm80-40V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V72A16,16,0,0,1,40,56H80V48a24,24,0,0,1,24-24h48a24,24,0,0,1,24,24v8h40A16,16,0,0,1,232,72ZM96,56h64V48a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8Zm120,57.61V72H40v41.61A184,184,0,0,0,128,136,184,184,0,0,0,216,113.61Z`}))],[`regular`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M216,56H176V48a24,24,0,0,0-24-24H104A24,24,0,0,0,80,48v8H40A16,16,0,0,0,24,72V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V72A16,16,0,0,0,216,56ZM96,48a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96ZM216,72v41.61A184,184,0,0,1,128,136a184.07,184.07,0,0,1-88-22.38V72Zm0,128H40V131.64A200.19,200.19,0,0,0,128,152a200.25,200.25,0,0,0,88-20.37V200ZM104,112a8,8,0,0,1,8-8h32a8,8,0,0,1,0,16H112A8,8,0,0,1,104,112Z`}))]]),h=new Map([[`bold`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M252,120a52.06,52.06,0,0,0-52-52H160.32c-3.44-.21-52.6-4-99.46-43.3A20,20,0,0,0,28,40V200a19.8,19.8,0,0,0,11.54,18.12,19.86,19.86,0,0,0,21.32-2.81A192.92,192.92,0,0,1,144,174.47v26.2a20,20,0,0,0,8.9,16.64,11.35,11.35,0,0,0,1.39.8l14.44,7.06A20,20,0,0,0,198.37,213l11.09-41.82A52.07,52.07,0,0,0,252,120ZM52,191.63V48.4c36.17,28.07,72.17,38.1,92,41.66V150C124.17,153.52,88.17,163.55,52,191.63ZM176.39,202.2,168,198.1V172h16.4ZM200,148H168V92h32a28,28,0,1,1,0,56Z`}))],[`fill`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M200,72H160.2c-2.91-.17-53.62-3.74-101.91-44.24A16,16,0,0,0,32,40V200a16,16,0,0,0,26.29,12.25c37.77-31.68,77-40.76,93.71-43.3v31.72A16,16,0,0,0,159.12,214l11,7.33A16,16,0,0,0,194.5,212l11.77-44.36A48,48,0,0,0,200,72ZM179,207.89l0,.11-11-7.33V168h21.6ZM200,152H168V88h32a32,32,0,1,1,0,64Z`}))],[`regular`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M248,120a48.05,48.05,0,0,0-48-48H160.2c-2.91-.17-53.62-3.74-101.91-44.24A16,16,0,0,0,32,40V200a16,16,0,0,0,26.29,12.25c37.77-31.68,77-40.76,93.71-43.3v31.72A16,16,0,0,0,159.12,214l11,7.33A16,16,0,0,0,194.5,212l11.77-44.36A48.07,48.07,0,0,0,248,120ZM48,199.93V40h0c42.81,35.91,86.63,45,104,47.24v65.48C134.65,155,90.84,164.07,48,199.93Zm131,8,0,.11-11-7.33V168h21.6ZM200,152H168V88h32a32,32,0,1,1,0,64Z`}))]]),g=new Map([[`bold`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z`}))],[`fill`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z`}))],[`regular`,f.createElement(f.Fragment,null,f.createElement(`path`,{d:`M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z`}))]]),_=f.forwardRef((e,t)=>f.createElement(u,{ref:t,...e,weights:p}));_.displayName=`BookOpenIcon`;var v=_,y=f.forwardRef((e,t)=>f.createElement(u,{ref:t,...e,weights:m}));y.displayName=`BriefcaseIcon`;var b=y,x=f.forwardRef((e,t)=>f.createElement(u,{ref:t,...e,weights:h}));x.displayName=`MegaphoneIcon`;var S=x,C=f.forwardRef((e,t)=>f.createElement(u,{ref:t,...e,weights:g}));C.displayName=`UsersIcon`;var w=C,T=e({COLLECTION_ICONS:()=>E}),E={article:r,calendar:i,briefcase:b,users:w,images:d,package:s,"book-open":v,megaphone:S,quotes:l,question:c,"map-pin":o,files:a};export{T as n,S as r,E as t};
|
|
2
|
+
//# sourceMappingURL=collection-icons-Bv8JHANh.js.map
|