@hot-updater/console 1.0.0-rc.2 → 1.0.0-rc.21
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/.output/nitro.json +1 -1
- package/.output/public/assets/ConsoleFeatureUnavailable-D0LPL1Gy.js +1 -0
- package/.output/public/assets/HashValueDisplay-BmuB4FW-.js +1 -0
- package/.output/public/assets/InsightsInfo--v4SC07c.js +1 -0
- package/.output/public/assets/InsightsPageHeader-dU83CAQY.js +1 -0
- package/.output/public/assets/NotFoundPage-B5mhGG2a.js +1 -0
- package/.output/public/assets/api-D-vOVlQ4.js +1 -0
- package/.output/public/assets/api-keys-Csh8ARKU.js +1 -0
- package/.output/public/assets/api-keys-OMPUoA_A.js +1 -0
- package/.output/public/assets/arrow-left-Bwq9X1eS.js +1 -0
- package/.output/public/assets/arrow-up-right-BkOVn4if.js +1 -0
- package/.output/public/assets/card-C_7d6O9a.js +1 -0
- package/.output/public/assets/console-features-api-C1jRZTGw.js +1 -0
- package/.output/public/assets/dialog-DE8wFN_P.js +1 -0
- package/.output/public/assets/dist-C7ENGzpS.js +1 -0
- package/.output/public/assets/empty-CVd5NlQD.js +1 -0
- package/.output/public/assets/field-C06q1iC9.js +1 -0
- package/.output/public/assets/index-BeWlQtO6.js +11 -0
- package/.output/public/assets/input-group-Bi61biIA.js +1 -0
- package/.output/public/assets/insights-BjnAtC0f.js +2 -0
- package/.output/public/assets/insights-D86m11yH.js +42 -0
- package/.output/public/assets/insights-DpYstMoY.js +1 -0
- package/.output/public/assets/insights-recovery-rpc-BIm5_ALc.js +1 -0
- package/.output/public/assets/insights-search-KIF7mRtB.js +1 -0
- package/.output/public/assets/insights-usage-rpc-VHj8vyBt.js +1 -0
- package/.output/public/assets/insights_.distribution-ADcrX48c.js +2 -0
- package/.output/public/assets/insights_.distribution-CuuJUN6Y.js +1 -0
- package/.output/public/assets/insights_.distribution-DJRjuXsO.js +1 -0
- package/.output/public/assets/installations-BSBBzqWs.js +2 -0
- package/.output/public/assets/installations-DqIE6WcO.js +1 -0
- package/.output/public/assets/installations-UsELbDvw.js +1 -0
- package/.output/public/assets/loader-circle-CnCBxzHp.js +1 -0
- package/.output/public/assets/mutation-Csp7xUNh.js +1 -0
- package/.output/public/assets/preload-helper-B-cOmpLH.js +1 -0
- package/.output/public/assets/refresh-cw-FF1NtzlQ.js +1 -0
- package/.output/public/assets/routes-CoN9XHP_.js +2 -0
- package/.output/public/assets/routes-DT1jB0Zi.js +1 -0
- package/.output/public/assets/sidebar-D8mJRF15.js +3 -0
- package/.output/public/assets/styles-Bwt7v6U5.css +2 -0
- package/.output/public/assets/table-WBgfvgXg.js +1 -0
- package/.output/public/assets/useCompositeListItem-CloBmDwn.js +1 -0
- package/.output/public/assets/useMutation-DO8cvsTx.js +1 -0
- package/.output/public/assets/useOpenInteractionType-ReGr9GzJ.js +1 -0
- package/.output/public/assets/valueToPercent-BvPAi4bP.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-B7ioJhtE.mjs → __23tanstack-start-server-fn-resolver-DMRD4e4f.mjs} +51 -47
- package/.output/server/_libs/@base-ui/react+[...].mjs +7044 -3622
- package/.output/server/_libs/@reduxjs/toolkit+[...].mjs +1554 -0
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +3803 -4023
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +141 -98
- package/.output/server/_libs/d3-array.mjs +231 -0
- package/.output/server/_libs/d3-color.mjs +330 -0
- package/.output/server/_libs/d3-format.mjs +252 -0
- package/.output/server/_libs/d3-interpolate.mjs +207 -0
- package/.output/server/_libs/d3-path.mjs +77 -0
- package/.output/server/_libs/d3-scale+[...].mjs +1907 -0
- package/.output/server/_libs/d3-shape.mjs +818 -0
- package/.output/server/_libs/decimal.js-light.mjs +884 -0
- package/.output/server/_libs/es-toolkit.mjs +1159 -0
- package/.output/server/_libs/eventemitter3.mjs +236 -0
- package/.output/server/_libs/immer.mjs +532 -0
- package/.output/server/_libs/lucide-react.mjs +46 -32
- package/.output/server/_libs/next-themes.mjs +2 -2
- package/.output/server/_libs/react-redux+[...].mjs +205 -0
- package/.output/server/_libs/recharts+[...].mjs +14350 -0
- package/.output/server/_libs/sonner.mjs +2 -2
- package/.output/server/_libs/tanstack__history.mjs +68 -41
- package/.output/server/_libs/tanstack__query-core.mjs +1618 -309
- package/.output/server/_libs/tanstack__react-query.mjs +262 -22
- package/.output/server/_libs/verkit.mjs +99 -1
- package/.output/server/_runtime.mjs +10 -1
- package/.output/server/_ssr/ConsoleFeatureUnavailable-Du7jNPNS.mjs +58 -0
- package/.output/server/_ssr/{HashValueDisplay-DwpGLfrl.mjs → HashValueDisplay-GQvFkXoi.mjs} +3 -3
- package/.output/server/_ssr/InsightsInfo-Do7QSaFR.mjs +37 -0
- package/.output/server/_ssr/InsightsPageHeader-DSUWUWRc.mjs +154 -0
- package/.output/server/_ssr/NotFoundPage-DsF4Vrhg.mjs +37 -0
- package/.output/server/_ssr/api-BEiVs0H7.mjs +203 -0
- package/.output/server/_ssr/api-keys-BrvBWGRf.mjs +5 -0
- package/.output/server/_ssr/{api-keys-CZeTPQys.mjs → api-keys-K5v32nf7.mjs} +49 -9
- package/.output/server/_ssr/api-keys-rpc-B96bBllm.mjs +52 -0
- package/.output/server/_ssr/api-rpc-DcUe280B.mjs +296 -0
- package/.output/server/_ssr/{auth-rpc-DUaeOWKK.mjs → auth-rpc-C68W56DP.mjs} +6 -6
- package/.output/server/_ssr/auth.server-DM1J6NwR.mjs +5712 -0
- package/.output/server/_ssr/bundleActivity-CpuY9CTP.mjs +19 -0
- package/.output/server/_ssr/card-CPAEKx0w.mjs +49 -0
- package/.output/server/_ssr/config-nsIcsHh8.mjs +15 -0
- package/.output/server/_ssr/config.server-DDCZk3Sq.mjs +36 -0
- package/.output/server/_ssr/console-access-Da-2Qd7q.mjs +17 -0
- package/.output/server/_ssr/console-features-Dzu2iUGD.mjs +55 -0
- package/.output/server/_ssr/console-features-api-xAsSgFa_.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-qARGpB24.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-BdBf_ezN.mjs} +67 -56
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-B_y2lrwA.mjs} +2 -2
- package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Bhxciy7Z.mjs} +28 -5
- package/.output/server/_ssr/databaseRows-DwMAjaF8.mjs +74 -0
- package/.output/server/_ssr/{dialog-DS-nw-pA.mjs → dialog-q__BJ7mQ.mjs} +2 -2
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-Cxo9ghYv.mjs} +140 -6
- package/.output/server/_ssr/{downloadBundle-CNnYxYO2.mjs → downloadBundle-BW9I-pMQ.mjs} +10 -10
- package/.output/server/_ssr/empty-DcBTAooP.mjs +49 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CYdinE-i.mjs} +1 -1
- package/.output/server/_ssr/{table-CnZmon_Z.mjs → field-QCDBVpXA.mjs} +63 -51
- package/.output/server/_ssr/getBundleChildren-DIAGCF4a.mjs +22 -0
- package/.output/server/_ssr/{input-group-BpsnmvZw.mjs → input-group-hCk2nUoU.mjs} +2 -2
- package/.output/server/_ssr/insights-BfBO0RFr.mjs +1238 -0
- package/.output/server/_ssr/insights-DsAU3-TB.mjs +14 -0
- package/.output/server/_ssr/insights-RIfg447W.mjs +5 -0
- package/.output/server/_ssr/insights-api-CDn-QQHU.mjs +105 -0
- package/.output/server/_ssr/insights-failures-BBGMhuUr.mjs +44 -0
- package/.output/server/_ssr/insights-failures-rpc-rA2dctK2.mjs +21 -0
- package/.output/server/_ssr/insights-recovery-Dpk6Mfb9.mjs +28 -0
- package/.output/server/_ssr/insights-recovery-rpc-BCaF-xSd.mjs +46 -0
- package/.output/server/_ssr/insights-recovery-rpc-CcgYyUHk.mjs +20 -0
- package/.output/server/_ssr/{insights-rpc-38DujK0G.mjs → insights-rpc-keycmwzw.mjs} +22 -14
- package/.output/server/_ssr/insights-search-BRg5VsNe.mjs +25 -0
- package/.output/server/_ssr/insights-usage-cbw9n2Fq.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-BKgV1QDf.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-D-JYachy.mjs +41 -0
- package/.output/server/_ssr/insightsRecovery-B7oMc8d8.mjs +45 -0
- package/.output/server/_ssr/insightsUsage-Oa7kk5ek.mjs +56 -0
- package/.output/server/_ssr/insights_.distribution-BIqOqRW0.mjs +335 -0
- package/.output/server/_ssr/insights_.distribution-CuUrDa7P.mjs +5 -0
- package/.output/server/_ssr/insights_.distribution-RT_6x_ud.mjs +14 -0
- package/.output/server/_ssr/{installations-DiVKEF5T.mjs → installations-BO5CjX2z.mjs} +517 -54
- package/.output/server/_ssr/installations-BjaHiIfh.mjs +5 -0
- package/.output/server/_ssr/installations-Dt5luA-N.mjs +69 -0
- package/.output/server/_ssr/listReleases-BitHzOYB.mjs +79 -0
- package/.output/server/_ssr/releaseManagement-B3e7I8J9.mjs +11 -0
- package/.output/server/_ssr/{router-B9wG_9f8.mjs → router-DfVAixxe.mjs} +135 -139
- package/.output/server/_ssr/{routes-D7Yh_jfj.mjs → routes-C6LstNp8.mjs} +176 -455
- package/.output/server/_ssr/routes-Q3Uhmwwz.mjs +292 -0
- package/.output/server/_ssr/runtime.server-fL0o6I2b.mjs +1459 -0
- package/.output/server/_ssr/schema-BKY9SqaY.mjs +25 -0
- package/.output/server/_ssr/select-CUlInmjk.mjs +107 -0
- package/.output/server/_ssr/server-C43wq9ft.mjs +8330 -0
- package/.output/server/_ssr/{createSsrRpc-DjWNJ0uc.mjs → sidebar-DKbx2ach.mjs} +117 -63
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/start-BXUOv_n8.mjs +4 -0
- package/.output/server/_ssr/table-NGWV8B-S.mjs +53 -0
- package/.output/server/_ssr/updateFailures-Jwe2Baab.mjs +24 -0
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C8bwiZr8.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-WQ5qGn8n.mjs +124 -0
- package/.output/server/index.mjs +267 -162
- package/LICENSE +13 -14
- package/README.md +82 -72
- package/lib/index.d.mts +23 -11
- package/lib/vite-internal.mjs +13 -3
- package/lib/vite.d.mts +2 -0
- package/package.json +14 -14
- package/src/components/AppSidebar.tsx +100 -71
- package/src/components/ConsoleAccessPage.tsx +5 -1
- package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/FeatureSlots.tsx +99 -0
- package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
- package/src/components/features/bundles/BundleMetadata.tsx +8 -5
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +2 -5
- package/src/components/features/insights/AppUsage.tsx +370 -0
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventDetails.tsx +117 -37
- package/src/components/features/insights/EventHistoryCard.tsx +112 -26
- package/src/components/features/insights/EventHistoryList.tsx +2 -2
- package/src/components/features/insights/InsightsControls.tsx +265 -102
- package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
- package/src/components/features/insights/InsightsInfo.tsx +48 -0
- package/src/components/features/insights/InsightsOverview.tsx +176 -173
- package/src/components/features/insights/InsightsPageHeader.tsx +35 -20
- package/src/components/features/insights/InsightsPeriodSelector.tsx +89 -0
- package/src/components/features/insights/InstallationHistoryCard.tsx +52 -10
- package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
- package/src/components/features/insights/ReleaseActivity.tsx +188 -0
- package/src/components/features/insights/ReportingDevicesSummary.tsx +65 -0
- package/src/components/features/insights/UpdateFailures.tsx +319 -0
- package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +30 -7
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/empty.tsx +101 -0
- package/src/components/ui/scroll-area.tsx +52 -0
- package/src/components/ui/sidebar.tsx +22 -29
- package/src/components/ui/tabs.tsx +81 -0
- package/src/index.ts +26 -19
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +27 -38
- package/src/lib/api-rpc.ts +189 -266
- package/src/lib/api.ts +19 -102
- package/src/lib/bundle-activity.ts +31 -0
- package/src/lib/console-access.ts +20 -0
- package/src/lib/console-features-api.ts +68 -0
- package/src/lib/console-features-rpc.ts +13 -0
- package/src/lib/console-features.ts +91 -0
- package/src/lib/insights-api.ts +37 -1
- package/src/lib/insights-failures-rpc.ts +21 -0
- package/src/lib/insights-failures.ts +129 -0
- package/src/lib/insights-recovery-rpc.ts +51 -0
- package/src/lib/insights-recovery.ts +68 -0
- package/src/lib/insights-retention.ts +21 -0
- package/src/lib/insights-rpc.ts +30 -12
- package/src/lib/insights-search.ts +58 -0
- package/src/lib/insights-usage-rpc.ts +29 -0
- package/src/lib/insights-usage.ts +74 -0
- package/src/lib/insights-view.ts +38 -2
- package/src/lib/scroll-restoration.ts +21 -0
- package/src/lib/server/adminInsights.ts +124 -0
- package/src/lib/server/auth.server.ts +13 -5
- package/src/lib/server/bundleActivity.ts +37 -0
- package/src/lib/server/config.server.ts +21 -74
- package/src/lib/server/console-feature-apis.ts +59 -0
- package/src/lib/server/console-runtime.server.ts +82 -38
- package/src/lib/server/downloadBundle.ts +16 -15
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsRecovery.ts +55 -0
- package/src/lib/server/insightsUsage.ts +63 -0
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseReachability.ts +8 -7
- package/src/lib/server/runtime.server.ts +120 -31
- package/src/lib/server/updateFailures.ts +31 -0
- package/src/routeTree.gen.ts +44 -44
- package/src/router.tsx +3 -2
- package/src/routes/-installations-search.ts +32 -8
- package/src/routes/-releases-search.ts +76 -29
- package/src/routes/__root.tsx +10 -4
- package/src/routes/api/bundles/$bundleId/download.ts +2 -5
- package/src/routes/api-keys.tsx +5 -2
- package/src/routes/index.tsx +167 -104
- package/src/routes/insights.tsx +100 -59
- package/src/routes/insights_.distribution.tsx +398 -0
- package/src/routes/installations.tsx +98 -41
- package/src/vite-internal.ts +15 -3
- package/src/vite.ts +2 -0
- package/.output/public/assets/HashValueDisplay-CB0Eskit.js +0 -1
- package/.output/public/assets/InsightsPageHeader-Car5LNiZ.js +0 -1
- package/.output/public/assets/api-keys-BzKocqRy.js +0 -1
- package/.output/public/assets/api-keys-api-BHcODB7q.js +0 -1
- package/.output/public/assets/card-Dhr_eFYj.js +0 -1
- package/.output/public/assets/chart-no-axes-combined-Dy4WJv2U.js +0 -1
- package/.output/public/assets/composite-Bp98A0Ld.js +0 -1
- package/.output/public/assets/createServerFn-CA8fs7QD.js +0 -3
- package/.output/public/assets/dialog-CUTrcPlB.js +0 -1
- package/.output/public/assets/dist-C_NydL0e.js +0 -1
- package/.output/public/assets/index-DdAz-CXv.js +0 -10
- package/.output/public/assets/input-group-cSOG4wh_.js +0 -1
- package/.output/public/assets/insights-C0PBSZ-n.js +0 -1
- package/.output/public/assets/installations-CE33wgbY.js +0 -2
- package/.output/public/assets/installations-CStZja8x.js +0 -1
- package/.output/public/assets/lazyRouteComponent-Ccp3bwBY.js +0 -1
- package/.output/public/assets/link-CI8idAUi.js +0 -1
- package/.output/public/assets/loader-circle-BoxLrsOu.js +0 -1
- package/.output/public/assets/preload-helper-CQ36nxok.js +0 -1
- package/.output/public/assets/refresh-cw-Bqc72UZG.js +0 -1
- package/.output/public/assets/routes-DGVXdzpw.js +0 -2
- package/.output/public/assets/routes-DTlwOr8I.js +0 -1
- package/.output/public/assets/shield-check-uK3MHWJZ.js +0 -1
- package/.output/public/assets/signing-CMf4aqDO.js +0 -1
- package/.output/public/assets/styles-BCvbtKsm.css +0 -2
- package/.output/public/assets/table-2vcV89QB.js +0 -1
- package/.output/public/assets/useCompositeListItem-CHLITE_4.js +0 -1
- package/.output/public/assets/x-DCd0j8c6.js +0 -1
- package/.output/server/_ssr/InsightsPageHeader-Df4Brj8u.mjs +0 -484
- package/.output/server/_ssr/api-keys-api-BUPQVSpk.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-Cs7tS5_j.mjs +0 -136
- package/.output/server/_ssr/api-rpc-tAupfGQm.mjs +0 -1399
- package/.output/server/_ssr/auth.server-DW71WzsD.mjs +0 -47
- package/.output/server/_ssr/bundle-signing-rpc-BhnBw0-d.mjs +0 -16
- package/.output/server/_ssr/bundle-signing.server-C4NW5mWx.mjs +0 -12
- package/.output/server/_ssr/card-BRiPmi0C.mjs +0 -108
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
- package/.output/server/_ssr/config.server-afDuAwaG.mjs +0 -368
- package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
- package/.output/server/_ssr/deleteBundle-BTGwBgzx.mjs +0 -66
- package/.output/server/_ssr/getBundleChildren-C0vh4ZvE.mjs +0 -50
- package/.output/server/_ssr/insights-BdS364Xu.mjs +0 -460
- package/.output/server/_ssr/insightsContract-fjJDBeEE.mjs +0 -303
- package/.output/server/_ssr/installations-CtA59MQG.mjs +0 -29
- package/.output/server/_ssr/routes-CKrrS2q2.mjs +0 -37
- package/.output/server/_ssr/runtime.server-DacU1TBV.mjs +0 -438
- package/.output/server/_ssr/server-D_C2rMzf.mjs +0 -7468
- package/.output/server/_ssr/signing-Dz1WkZOf.mjs +0 -133
- package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
- package/.output/server/_tanstack-start-manifest_v-2MjTyxil.mjs +0 -97
- package/src/components/features/insights/InsightsBundleReports.tsx +0 -51
- package/src/components/features/signing/BundleSigningPage.tsx +0 -139
- package/src/lib/bundle-signing-api.ts +0 -14
- package/src/lib/bundle-signing-rpc.ts +0 -16
- package/src/lib/server/bundle-signing.server.ts +0 -23
- package/src/lib/server/deleteBundle.ts +0 -145
- package/src/routes/signing.tsx +0 -37
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js
|
|
2
|
+
function define_default(constructor, factory, prototype) {
|
|
3
|
+
constructor.prototype = factory.prototype = prototype;
|
|
4
|
+
prototype.constructor = constructor;
|
|
5
|
+
}
|
|
6
|
+
function extend(parent, definition) {
|
|
7
|
+
var prototype = Object.create(parent.prototype);
|
|
8
|
+
for (var key in definition) prototype[key] = definition[key];
|
|
9
|
+
return prototype;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js
|
|
13
|
+
function Color() {}
|
|
14
|
+
var darker = .7;
|
|
15
|
+
var brighter = 1 / darker;
|
|
16
|
+
var reI = "\\s*([+-]?\\d+)\\s*", reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", reHex = /^#([0-9a-f]{3,8})$/, reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`), reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`), reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`), reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`), reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`), reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
|
|
17
|
+
var named = {
|
|
18
|
+
aliceblue: 15792383,
|
|
19
|
+
antiquewhite: 16444375,
|
|
20
|
+
aqua: 65535,
|
|
21
|
+
aquamarine: 8388564,
|
|
22
|
+
azure: 15794175,
|
|
23
|
+
beige: 16119260,
|
|
24
|
+
bisque: 16770244,
|
|
25
|
+
black: 0,
|
|
26
|
+
blanchedalmond: 16772045,
|
|
27
|
+
blue: 255,
|
|
28
|
+
blueviolet: 9055202,
|
|
29
|
+
brown: 10824234,
|
|
30
|
+
burlywood: 14596231,
|
|
31
|
+
cadetblue: 6266528,
|
|
32
|
+
chartreuse: 8388352,
|
|
33
|
+
chocolate: 13789470,
|
|
34
|
+
coral: 16744272,
|
|
35
|
+
cornflowerblue: 6591981,
|
|
36
|
+
cornsilk: 16775388,
|
|
37
|
+
crimson: 14423100,
|
|
38
|
+
cyan: 65535,
|
|
39
|
+
darkblue: 139,
|
|
40
|
+
darkcyan: 35723,
|
|
41
|
+
darkgoldenrod: 12092939,
|
|
42
|
+
darkgray: 11119017,
|
|
43
|
+
darkgreen: 25600,
|
|
44
|
+
darkgrey: 11119017,
|
|
45
|
+
darkkhaki: 12433259,
|
|
46
|
+
darkmagenta: 9109643,
|
|
47
|
+
darkolivegreen: 5597999,
|
|
48
|
+
darkorange: 16747520,
|
|
49
|
+
darkorchid: 10040012,
|
|
50
|
+
darkred: 9109504,
|
|
51
|
+
darksalmon: 15308410,
|
|
52
|
+
darkseagreen: 9419919,
|
|
53
|
+
darkslateblue: 4734347,
|
|
54
|
+
darkslategray: 3100495,
|
|
55
|
+
darkslategrey: 3100495,
|
|
56
|
+
darkturquoise: 52945,
|
|
57
|
+
darkviolet: 9699539,
|
|
58
|
+
deeppink: 16716947,
|
|
59
|
+
deepskyblue: 49151,
|
|
60
|
+
dimgray: 6908265,
|
|
61
|
+
dimgrey: 6908265,
|
|
62
|
+
dodgerblue: 2003199,
|
|
63
|
+
firebrick: 11674146,
|
|
64
|
+
floralwhite: 16775920,
|
|
65
|
+
forestgreen: 2263842,
|
|
66
|
+
fuchsia: 16711935,
|
|
67
|
+
gainsboro: 14474460,
|
|
68
|
+
ghostwhite: 16316671,
|
|
69
|
+
gold: 16766720,
|
|
70
|
+
goldenrod: 14329120,
|
|
71
|
+
gray: 8421504,
|
|
72
|
+
green: 32768,
|
|
73
|
+
greenyellow: 11403055,
|
|
74
|
+
grey: 8421504,
|
|
75
|
+
honeydew: 15794160,
|
|
76
|
+
hotpink: 16738740,
|
|
77
|
+
indianred: 13458524,
|
|
78
|
+
indigo: 4915330,
|
|
79
|
+
ivory: 16777200,
|
|
80
|
+
khaki: 15787660,
|
|
81
|
+
lavender: 15132410,
|
|
82
|
+
lavenderblush: 16773365,
|
|
83
|
+
lawngreen: 8190976,
|
|
84
|
+
lemonchiffon: 16775885,
|
|
85
|
+
lightblue: 11393254,
|
|
86
|
+
lightcoral: 15761536,
|
|
87
|
+
lightcyan: 14745599,
|
|
88
|
+
lightgoldenrodyellow: 16448210,
|
|
89
|
+
lightgray: 13882323,
|
|
90
|
+
lightgreen: 9498256,
|
|
91
|
+
lightgrey: 13882323,
|
|
92
|
+
lightpink: 16758465,
|
|
93
|
+
lightsalmon: 16752762,
|
|
94
|
+
lightseagreen: 2142890,
|
|
95
|
+
lightskyblue: 8900346,
|
|
96
|
+
lightslategray: 7833753,
|
|
97
|
+
lightslategrey: 7833753,
|
|
98
|
+
lightsteelblue: 11584734,
|
|
99
|
+
lightyellow: 16777184,
|
|
100
|
+
lime: 65280,
|
|
101
|
+
limegreen: 3329330,
|
|
102
|
+
linen: 16445670,
|
|
103
|
+
magenta: 16711935,
|
|
104
|
+
maroon: 8388608,
|
|
105
|
+
mediumaquamarine: 6737322,
|
|
106
|
+
mediumblue: 205,
|
|
107
|
+
mediumorchid: 12211667,
|
|
108
|
+
mediumpurple: 9662683,
|
|
109
|
+
mediumseagreen: 3978097,
|
|
110
|
+
mediumslateblue: 8087790,
|
|
111
|
+
mediumspringgreen: 64154,
|
|
112
|
+
mediumturquoise: 4772300,
|
|
113
|
+
mediumvioletred: 13047173,
|
|
114
|
+
midnightblue: 1644912,
|
|
115
|
+
mintcream: 16121850,
|
|
116
|
+
mistyrose: 16770273,
|
|
117
|
+
moccasin: 16770229,
|
|
118
|
+
navajowhite: 16768685,
|
|
119
|
+
navy: 128,
|
|
120
|
+
oldlace: 16643558,
|
|
121
|
+
olive: 8421376,
|
|
122
|
+
olivedrab: 7048739,
|
|
123
|
+
orange: 16753920,
|
|
124
|
+
orangered: 16729344,
|
|
125
|
+
orchid: 14315734,
|
|
126
|
+
palegoldenrod: 15657130,
|
|
127
|
+
palegreen: 10025880,
|
|
128
|
+
paleturquoise: 11529966,
|
|
129
|
+
palevioletred: 14381203,
|
|
130
|
+
papayawhip: 16773077,
|
|
131
|
+
peachpuff: 16767673,
|
|
132
|
+
peru: 13468991,
|
|
133
|
+
pink: 16761035,
|
|
134
|
+
plum: 14524637,
|
|
135
|
+
powderblue: 11591910,
|
|
136
|
+
purple: 8388736,
|
|
137
|
+
rebeccapurple: 6697881,
|
|
138
|
+
red: 16711680,
|
|
139
|
+
rosybrown: 12357519,
|
|
140
|
+
royalblue: 4286945,
|
|
141
|
+
saddlebrown: 9127187,
|
|
142
|
+
salmon: 16416882,
|
|
143
|
+
sandybrown: 16032864,
|
|
144
|
+
seagreen: 3050327,
|
|
145
|
+
seashell: 16774638,
|
|
146
|
+
sienna: 10506797,
|
|
147
|
+
silver: 12632256,
|
|
148
|
+
skyblue: 8900331,
|
|
149
|
+
slateblue: 6970061,
|
|
150
|
+
slategray: 7372944,
|
|
151
|
+
slategrey: 7372944,
|
|
152
|
+
snow: 16775930,
|
|
153
|
+
springgreen: 65407,
|
|
154
|
+
steelblue: 4620980,
|
|
155
|
+
tan: 13808780,
|
|
156
|
+
teal: 32896,
|
|
157
|
+
thistle: 14204888,
|
|
158
|
+
tomato: 16737095,
|
|
159
|
+
turquoise: 4251856,
|
|
160
|
+
violet: 15631086,
|
|
161
|
+
wheat: 16113331,
|
|
162
|
+
white: 16777215,
|
|
163
|
+
whitesmoke: 16119285,
|
|
164
|
+
yellow: 16776960,
|
|
165
|
+
yellowgreen: 10145074
|
|
166
|
+
};
|
|
167
|
+
define_default(Color, color, {
|
|
168
|
+
copy(channels) {
|
|
169
|
+
return Object.assign(new this.constructor(), this, channels);
|
|
170
|
+
},
|
|
171
|
+
displayable() {
|
|
172
|
+
return this.rgb().displayable();
|
|
173
|
+
},
|
|
174
|
+
hex: color_formatHex,
|
|
175
|
+
formatHex: color_formatHex,
|
|
176
|
+
formatHex8: color_formatHex8,
|
|
177
|
+
formatHsl: color_formatHsl,
|
|
178
|
+
formatRgb: color_formatRgb,
|
|
179
|
+
toString: color_formatRgb
|
|
180
|
+
});
|
|
181
|
+
function color_formatHex() {
|
|
182
|
+
return this.rgb().formatHex();
|
|
183
|
+
}
|
|
184
|
+
function color_formatHex8() {
|
|
185
|
+
return this.rgb().formatHex8();
|
|
186
|
+
}
|
|
187
|
+
function color_formatHsl() {
|
|
188
|
+
return hslConvert(this).formatHsl();
|
|
189
|
+
}
|
|
190
|
+
function color_formatRgb() {
|
|
191
|
+
return this.rgb().formatRgb();
|
|
192
|
+
}
|
|
193
|
+
function color(format) {
|
|
194
|
+
var m, l;
|
|
195
|
+
format = (format + "").trim().toLowerCase();
|
|
196
|
+
return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) : l === 3 ? new Rgb(m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, (m & 15) << 4 | m & 15, 1) : l === 8 ? rgba(m >> 24 & 255, m >> 16 & 255, m >> 8 & 255, (m & 255) / 255) : l === 4 ? rgba(m >> 12 & 15 | m >> 8 & 240, m >> 8 & 15 | m >> 4 & 240, m >> 4 & 15 | m & 240, ((m & 15) << 4 | m & 15) / 255) : null) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) : named.hasOwnProperty(format) ? rgbn(named[format]) : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
197
|
+
}
|
|
198
|
+
function rgbn(n) {
|
|
199
|
+
return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
|
|
200
|
+
}
|
|
201
|
+
function rgba(r, g, b, a) {
|
|
202
|
+
if (a <= 0) r = g = b = NaN;
|
|
203
|
+
return new Rgb(r, g, b, a);
|
|
204
|
+
}
|
|
205
|
+
function rgbConvert(o) {
|
|
206
|
+
if (!(o instanceof Color)) o = color(o);
|
|
207
|
+
if (!o) return new Rgb();
|
|
208
|
+
o = o.rgb();
|
|
209
|
+
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
210
|
+
}
|
|
211
|
+
function rgb(r, g, b, opacity) {
|
|
212
|
+
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
213
|
+
}
|
|
214
|
+
function Rgb(r, g, b, opacity) {
|
|
215
|
+
this.r = +r;
|
|
216
|
+
this.g = +g;
|
|
217
|
+
this.b = +b;
|
|
218
|
+
this.opacity = +opacity;
|
|
219
|
+
}
|
|
220
|
+
define_default(Rgb, rgb, extend(Color, {
|
|
221
|
+
brighter(k) {
|
|
222
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
223
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
224
|
+
},
|
|
225
|
+
darker(k) {
|
|
226
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
227
|
+
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
228
|
+
},
|
|
229
|
+
rgb() {
|
|
230
|
+
return this;
|
|
231
|
+
},
|
|
232
|
+
clamp() {
|
|
233
|
+
return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
|
|
234
|
+
},
|
|
235
|
+
displayable() {
|
|
236
|
+
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
237
|
+
},
|
|
238
|
+
hex: rgb_formatHex,
|
|
239
|
+
formatHex: rgb_formatHex,
|
|
240
|
+
formatHex8: rgb_formatHex8,
|
|
241
|
+
formatRgb: rgb_formatRgb,
|
|
242
|
+
toString: rgb_formatRgb
|
|
243
|
+
}));
|
|
244
|
+
function rgb_formatHex() {
|
|
245
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
|
|
246
|
+
}
|
|
247
|
+
function rgb_formatHex8() {
|
|
248
|
+
return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
249
|
+
}
|
|
250
|
+
function rgb_formatRgb() {
|
|
251
|
+
const a = clampa(this.opacity);
|
|
252
|
+
return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
|
|
253
|
+
}
|
|
254
|
+
function clampa(opacity) {
|
|
255
|
+
return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
|
|
256
|
+
}
|
|
257
|
+
function clampi(value) {
|
|
258
|
+
return Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
259
|
+
}
|
|
260
|
+
function hex(value) {
|
|
261
|
+
value = clampi(value);
|
|
262
|
+
return (value < 16 ? "0" : "") + value.toString(16);
|
|
263
|
+
}
|
|
264
|
+
function hsla(h, s, l, a) {
|
|
265
|
+
if (a <= 0) h = s = l = NaN;
|
|
266
|
+
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
267
|
+
else if (s <= 0) h = NaN;
|
|
268
|
+
return new Hsl(h, s, l, a);
|
|
269
|
+
}
|
|
270
|
+
function hslConvert(o) {
|
|
271
|
+
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
272
|
+
if (!(o instanceof Color)) o = color(o);
|
|
273
|
+
if (!o) return new Hsl();
|
|
274
|
+
if (o instanceof Hsl) return o;
|
|
275
|
+
o = o.rgb();
|
|
276
|
+
var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h = NaN, s = max - min, l = (max + min) / 2;
|
|
277
|
+
if (s) {
|
|
278
|
+
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
279
|
+
else if (g === max) h = (b - r) / s + 2;
|
|
280
|
+
else h = (r - g) / s + 4;
|
|
281
|
+
s /= l < .5 ? max + min : 2 - max - min;
|
|
282
|
+
h *= 60;
|
|
283
|
+
} else s = l > 0 && l < 1 ? 0 : h;
|
|
284
|
+
return new Hsl(h, s, l, o.opacity);
|
|
285
|
+
}
|
|
286
|
+
function hsl(h, s, l, opacity) {
|
|
287
|
+
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
288
|
+
}
|
|
289
|
+
function Hsl(h, s, l, opacity) {
|
|
290
|
+
this.h = +h;
|
|
291
|
+
this.s = +s;
|
|
292
|
+
this.l = +l;
|
|
293
|
+
this.opacity = +opacity;
|
|
294
|
+
}
|
|
295
|
+
define_default(Hsl, hsl, extend(Color, {
|
|
296
|
+
brighter(k) {
|
|
297
|
+
k = k == null ? brighter : Math.pow(brighter, k);
|
|
298
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
299
|
+
},
|
|
300
|
+
darker(k) {
|
|
301
|
+
k = k == null ? darker : Math.pow(darker, k);
|
|
302
|
+
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
303
|
+
},
|
|
304
|
+
rgb() {
|
|
305
|
+
var h = this.h % 360 + (this.h < 0) * 360, s = isNaN(h) || isNaN(this.s) ? 0 : this.s, l = this.l, m2 = l + (l < .5 ? l : 1 - l) * s, m1 = 2 * l - m2;
|
|
306
|
+
return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
|
|
307
|
+
},
|
|
308
|
+
clamp() {
|
|
309
|
+
return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
|
|
310
|
+
},
|
|
311
|
+
displayable() {
|
|
312
|
+
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
313
|
+
},
|
|
314
|
+
formatHsl() {
|
|
315
|
+
const a = clampa(this.opacity);
|
|
316
|
+
return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
|
|
317
|
+
}
|
|
318
|
+
}));
|
|
319
|
+
function clamph(value) {
|
|
320
|
+
value = (value || 0) % 360;
|
|
321
|
+
return value < 0 ? value + 360 : value;
|
|
322
|
+
}
|
|
323
|
+
function clampt(value) {
|
|
324
|
+
return Math.max(0, Math.min(1, value || 0));
|
|
325
|
+
}
|
|
326
|
+
function hsl2rgb(h, m1, m2) {
|
|
327
|
+
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
328
|
+
}
|
|
329
|
+
//#endregion
|
|
330
|
+
export { rgb as n, color as t };
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatDecimal.js
|
|
2
|
+
function formatDecimal_default(x) {
|
|
3
|
+
return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
|
|
4
|
+
}
|
|
5
|
+
function formatDecimalParts(x, p) {
|
|
6
|
+
if (!isFinite(x) || x === 0) return null;
|
|
7
|
+
var i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e"), coefficient = x.slice(0, i);
|
|
8
|
+
return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/exponent.js
|
|
12
|
+
function exponent_default(x) {
|
|
13
|
+
return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatGroup.js
|
|
17
|
+
function formatGroup_default(grouping, thousands) {
|
|
18
|
+
return function(value, width) {
|
|
19
|
+
var i = value.length, t = [], j = 0, g = grouping[0], length = 0;
|
|
20
|
+
while (i > 0 && g > 0) {
|
|
21
|
+
if (length + g + 1 > width) g = Math.max(1, width - length);
|
|
22
|
+
t.push(value.substring(i -= g, i + g));
|
|
23
|
+
if ((length += g + 1) > width) break;
|
|
24
|
+
g = grouping[j = (j + 1) % grouping.length];
|
|
25
|
+
}
|
|
26
|
+
return t.reverse().join(thousands);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatNumerals.js
|
|
31
|
+
function formatNumerals_default(numerals) {
|
|
32
|
+
return function(value) {
|
|
33
|
+
return value.replace(/[0-9]/g, function(i) {
|
|
34
|
+
return numerals[+i];
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatSpecifier.js
|
|
40
|
+
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
41
|
+
function formatSpecifier(specifier) {
|
|
42
|
+
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
|
|
43
|
+
var match;
|
|
44
|
+
return new FormatSpecifier({
|
|
45
|
+
fill: match[1],
|
|
46
|
+
align: match[2],
|
|
47
|
+
sign: match[3],
|
|
48
|
+
symbol: match[4],
|
|
49
|
+
zero: match[5],
|
|
50
|
+
width: match[6],
|
|
51
|
+
comma: match[7],
|
|
52
|
+
precision: match[8] && match[8].slice(1),
|
|
53
|
+
trim: match[9],
|
|
54
|
+
type: match[10]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
formatSpecifier.prototype = FormatSpecifier.prototype;
|
|
58
|
+
function FormatSpecifier(specifier) {
|
|
59
|
+
this.fill = specifier.fill === void 0 ? " " : specifier.fill + "";
|
|
60
|
+
this.align = specifier.align === void 0 ? ">" : specifier.align + "";
|
|
61
|
+
this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "";
|
|
62
|
+
this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "";
|
|
63
|
+
this.zero = !!specifier.zero;
|
|
64
|
+
this.width = specifier.width === void 0 ? void 0 : +specifier.width;
|
|
65
|
+
this.comma = !!specifier.comma;
|
|
66
|
+
this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision;
|
|
67
|
+
this.trim = !!specifier.trim;
|
|
68
|
+
this.type = specifier.type === void 0 ? "" : specifier.type + "";
|
|
69
|
+
}
|
|
70
|
+
FormatSpecifier.prototype.toString = function() {
|
|
71
|
+
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatTrim.js
|
|
75
|
+
function formatTrim_default(s) {
|
|
76
|
+
out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) switch (s[i]) {
|
|
77
|
+
case ".":
|
|
78
|
+
i0 = i1 = i;
|
|
79
|
+
break;
|
|
80
|
+
case "0":
|
|
81
|
+
if (i0 === 0) i0 = i;
|
|
82
|
+
i1 = i;
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
if (!+s[i]) break out;
|
|
86
|
+
if (i0 > 0) i0 = 0;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatPrefixAuto.js
|
|
93
|
+
var prefixExponent;
|
|
94
|
+
function formatPrefixAuto_default(x, p) {
|
|
95
|
+
var d = formatDecimalParts(x, p);
|
|
96
|
+
if (!d) return prefixExponent = void 0, x.toPrecision(p);
|
|
97
|
+
var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length;
|
|
98
|
+
return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatRounded.js
|
|
102
|
+
function formatRounded_default(x, p) {
|
|
103
|
+
var d = formatDecimalParts(x, p);
|
|
104
|
+
if (!d) return x + "";
|
|
105
|
+
var coefficient = d[0], exponent = d[1];
|
|
106
|
+
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0");
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/formatTypes.js
|
|
110
|
+
var formatTypes_default = {
|
|
111
|
+
"%": (x, p) => (x * 100).toFixed(p),
|
|
112
|
+
"b": (x) => Math.round(x).toString(2),
|
|
113
|
+
"c": (x) => x + "",
|
|
114
|
+
"d": formatDecimal_default,
|
|
115
|
+
"e": (x, p) => x.toExponential(p),
|
|
116
|
+
"f": (x, p) => x.toFixed(p),
|
|
117
|
+
"g": (x, p) => x.toPrecision(p),
|
|
118
|
+
"o": (x) => Math.round(x).toString(8),
|
|
119
|
+
"p": (x, p) => formatRounded_default(x * 100, p),
|
|
120
|
+
"r": formatRounded_default,
|
|
121
|
+
"s": formatPrefixAuto_default,
|
|
122
|
+
"X": (x) => Math.round(x).toString(16).toUpperCase(),
|
|
123
|
+
"x": (x) => Math.round(x).toString(16)
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/identity.js
|
|
127
|
+
function identity_default(x) {
|
|
128
|
+
return x;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/locale.js
|
|
132
|
+
var map = Array.prototype.map, prefixes = [
|
|
133
|
+
"y",
|
|
134
|
+
"z",
|
|
135
|
+
"a",
|
|
136
|
+
"f",
|
|
137
|
+
"p",
|
|
138
|
+
"n",
|
|
139
|
+
"µ",
|
|
140
|
+
"m",
|
|
141
|
+
"",
|
|
142
|
+
"k",
|
|
143
|
+
"M",
|
|
144
|
+
"G",
|
|
145
|
+
"T",
|
|
146
|
+
"P",
|
|
147
|
+
"E",
|
|
148
|
+
"Z",
|
|
149
|
+
"Y"
|
|
150
|
+
];
|
|
151
|
+
function locale_default(locale) {
|
|
152
|
+
var group = locale.grouping === void 0 || locale.thousands === void 0 ? identity_default : formatGroup_default(map.call(locale.grouping, Number), locale.thousands + ""), currencyPrefix = locale.currency === void 0 ? "" : locale.currency[0] + "", currencySuffix = locale.currency === void 0 ? "" : locale.currency[1] + "", decimal = locale.decimal === void 0 ? "." : locale.decimal + "", numerals = locale.numerals === void 0 ? identity_default : formatNumerals_default(map.call(locale.numerals, String)), percent = locale.percent === void 0 ? "%" : locale.percent + "", minus = locale.minus === void 0 ? "−" : locale.minus + "", nan = locale.nan === void 0 ? "NaN" : locale.nan + "";
|
|
153
|
+
function newFormat(specifier, options) {
|
|
154
|
+
specifier = formatSpecifier(specifier);
|
|
155
|
+
var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
|
|
156
|
+
if (type === "n") comma = true, type = "g";
|
|
157
|
+
else if (!formatTypes_default[type]) precision === void 0 && (precision = 12), trim = true, type = "g";
|
|
158
|
+
if (zero || fill === "0" && align === "=") zero = true, fill = "0", align = "=";
|
|
159
|
+
var prefix = (options && options.prefix !== void 0 ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""), suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== void 0 ? options.suffix : "");
|
|
160
|
+
var formatType = formatTypes_default[type], maybeSuffix = /[defgprs%]/.test(type);
|
|
161
|
+
precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
|
|
162
|
+
function format(value) {
|
|
163
|
+
var valuePrefix = prefix, valueSuffix = suffix, i, n, c;
|
|
164
|
+
if (type === "c") {
|
|
165
|
+
valueSuffix = formatType(value) + valueSuffix;
|
|
166
|
+
value = "";
|
|
167
|
+
} else {
|
|
168
|
+
value = +value;
|
|
169
|
+
var valueNegative = value < 0 || 1 / value < 0;
|
|
170
|
+
value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
|
|
171
|
+
if (trim) value = formatTrim_default(value);
|
|
172
|
+
if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
|
|
173
|
+
valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
|
|
174
|
+
valueSuffix = (type === "s" && !isNaN(value) && prefixExponent !== void 0 ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
|
|
175
|
+
if (maybeSuffix) {
|
|
176
|
+
i = -1, n = value.length;
|
|
177
|
+
while (++i < n) if (c = value.charCodeAt(i), 48 > c || c > 57) {
|
|
178
|
+
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
|
|
179
|
+
value = value.slice(0, i);
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (comma && !zero) value = group(value, Infinity);
|
|
185
|
+
var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
|
186
|
+
if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
|
|
187
|
+
switch (align) {
|
|
188
|
+
case "<":
|
|
189
|
+
value = valuePrefix + value + valueSuffix + padding;
|
|
190
|
+
break;
|
|
191
|
+
case "=":
|
|
192
|
+
value = valuePrefix + padding + value + valueSuffix;
|
|
193
|
+
break;
|
|
194
|
+
case "^":
|
|
195
|
+
value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
|
|
196
|
+
break;
|
|
197
|
+
default:
|
|
198
|
+
value = padding + valuePrefix + value + valueSuffix;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
return numerals(value);
|
|
202
|
+
}
|
|
203
|
+
format.toString = function() {
|
|
204
|
+
return specifier + "";
|
|
205
|
+
};
|
|
206
|
+
return format;
|
|
207
|
+
}
|
|
208
|
+
function formatPrefix(specifier, value) {
|
|
209
|
+
var e = Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3, k = Math.pow(10, -e), f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), { suffix: prefixes[8 + e / 3] });
|
|
210
|
+
return function(value) {
|
|
211
|
+
return f(k * value);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
return {
|
|
215
|
+
format: newFormat,
|
|
216
|
+
formatPrefix
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/defaultLocale.js
|
|
221
|
+
var locale;
|
|
222
|
+
var format;
|
|
223
|
+
var formatPrefix;
|
|
224
|
+
defaultLocale({
|
|
225
|
+
thousands: ",",
|
|
226
|
+
grouping: [3],
|
|
227
|
+
currency: ["$", ""]
|
|
228
|
+
});
|
|
229
|
+
function defaultLocale(definition) {
|
|
230
|
+
locale = locale_default(definition);
|
|
231
|
+
format = locale.format;
|
|
232
|
+
formatPrefix = locale.formatPrefix;
|
|
233
|
+
return locale;
|
|
234
|
+
}
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionFixed.js
|
|
237
|
+
function precisionFixed_default(step) {
|
|
238
|
+
return Math.max(0, -exponent_default(Math.abs(step)));
|
|
239
|
+
}
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionPrefix.js
|
|
242
|
+
function precisionPrefix_default(step, value) {
|
|
243
|
+
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent_default(value) / 3))) * 3 - exponent_default(Math.abs(step)));
|
|
244
|
+
}
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region ../../node_modules/.pnpm/d3-format@3.1.2/node_modules/d3-format/src/precisionRound.js
|
|
247
|
+
function precisionRound_default(step, max) {
|
|
248
|
+
step = Math.abs(step), max = Math.abs(max) - step;
|
|
249
|
+
return Math.max(0, exponent_default(max) - exponent_default(step)) + 1;
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
export { formatPrefix as a, format as i, precisionPrefix_default as n, formatSpecifier as o, precisionFixed_default as r, precisionRound_default as t };
|