efficient-shell 10.24.0 → 11.2.0
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/README.md +18 -2
- package/dist/Browser-2JOFXNUA.js +44 -0
- package/dist/Calculator-V3BHUF4G.js +29 -0
- package/dist/{CurrencyConverter-7UMHQS2V.js → CurrencyConverter-6WJWHZUQ.js} +5 -5
- package/dist/{Documents-ODZ4AAOY.js → Documents-DY2OBQNR.js} +25 -25
- package/dist/{Files-BRGTTI2J.js → Files-ADJB2IFU.js} +43 -43
- package/dist/{Notepad-RMRDEGGU.js → Notepad-HOJSMCCF.js} +9 -9
- package/dist/{PomodoroTimer-4566W4F7.js → PomodoroTimer-5GWSBJW5.js} +5 -5
- package/dist/{Preview-7POJP7PB.js → Preview-JZBO2SP5.js} +13 -13
- package/dist/Sidebar-GQX7UM3M.js +44 -0
- package/dist/{Spreadsheet-7T4VT5IO.js → Spreadsheet-SS5Y3DV2.js} +13 -13
- package/dist/{Stock-H73C4R3N.js → Stock-3LSKLYGI.js} +3 -3
- package/dist/{Weather-WF56QCBI.js → Weather-26PCYFUR.js} +18 -18
- package/dist/{WorldClock-5QJNZYYS.js → WorldClock-KRL72Y53.js} +6 -6
- package/dist/ai/index.js +78 -78
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-23G63EZ4.js +29 -0
- package/dist/{chunk-XXL5RLNM.js → chunk-34H3CK7R.js} +9 -9
- package/dist/{chunk-HNVSVTNC.js → chunk-355CRSFS.js} +11 -11
- package/dist/{chunk-DZOJQURG.js → chunk-3NRQNKVP.js} +3 -3
- package/dist/{chunk-BUO7XCYR.js → chunk-3TXSYEQM.js} +13 -13
- package/dist/{chunk-NRALUW6P.js → chunk-3XTSXZAC.js} +7 -7
- package/dist/{chunk-WDQEUNGE.js → chunk-47DO42IW.js} +1 -1
- package/dist/{chunk-FUDUQ44A.js → chunk-4LQDORA6.js} +1 -1
- package/dist/{chunk-QWCEKHAP.js → chunk-4MBYFQOI.js} +4 -4
- package/dist/{chunk-U44DVPGB.js → chunk-4QK4WNPB.js} +1 -1
- package/dist/{chunk-COF33H6J.js → chunk-4TGZODSH.js} +5 -5
- package/dist/{chunk-LCSMBVMU.js → chunk-4XNVIKZZ.js} +3 -3
- package/dist/chunk-56KADF2B.js +11 -0
- package/dist/{chunk-GC3DA6D6.js → chunk-5CXFABVD.js} +1 -1
- package/dist/{chunk-E3EJWNNK.js → chunk-5F2AIDPY.js} +9 -9
- package/dist/{chunk-G66SG6JN.js → chunk-6EIZOX6W.js} +9 -9
- package/dist/{chunk-Z3SLQKE6.js → chunk-6TJCIS5E.js} +1 -1
- package/dist/chunk-6UBOLLBC.js +31 -0
- package/dist/chunk-7DI3VQCF.js +2 -0
- package/dist/{chunk-DOF56HTO.js → chunk-A3Q7X35W.js} +6 -6
- package/dist/chunk-AIJ3G6BD.js +1 -0
- package/dist/{chunk-V2J2AHDW.js → chunk-ALE56KOA.js} +4 -4
- package/dist/{chunk-CQEVJG43.js → chunk-BQPMZXNB.js} +1 -1
- package/dist/{chunk-BBXFIBXB.js → chunk-BTRV3SMB.js} +1 -1
- package/dist/{chunk-OKHKY3ZZ.js → chunk-BW47XJLH.js} +1 -1
- package/dist/{chunk-RZQGPWSN.js → chunk-CD7UWMPX.js} +1 -1
- package/dist/{chunk-WGLHB6WE.js → chunk-CJH2BGXY.js} +1 -1
- package/dist/{chunk-7FW2BQTV.js → chunk-COGSXN4D.js} +2 -2
- package/dist/{chunk-ZRLWE3JM.js → chunk-DANLBFBD.js} +1 -1
- package/dist/{chunk-TFSLPAGB.js → chunk-DGNAUGZ3.js} +4 -4
- package/dist/{chunk-ALTBTO3Z.js → chunk-DLWKDAYX.js} +2 -2
- package/dist/{chunk-MCAPJSB6.js → chunk-DU4WEVNS.js} +1 -1
- package/dist/{chunk-NZ7BFYCM.js → chunk-EB2IQNM5.js} +1 -1
- package/dist/{chunk-Z44JWU75.js → chunk-EKCQ7XBZ.js} +2 -2
- package/dist/{chunk-DIEH76MB.js → chunk-ESZHN7PV.js} +1 -1
- package/dist/chunk-EUAC2T5D.js +2 -0
- package/dist/{chunk-5PP435FL.js → chunk-EYPKBJYG.js} +1 -1
- package/dist/chunk-EZYRHBOP.js +13 -0
- package/dist/{chunk-7JVGF555.js → chunk-FA5FBNWF.js} +1 -1
- package/dist/chunk-FO6UPEZH.js +7 -0
- package/dist/{chunk-UNQ54QOF.js → chunk-FXOYA2VJ.js} +1 -1
- package/dist/{chunk-OTITQ3IH.js → chunk-G3KXB7SP.js} +8 -8
- package/dist/{chunk-3FBDLIQW.js → chunk-GAIB5FEE.js} +70 -70
- package/dist/{chunk-YQOVUH5W.js → chunk-GELPD7EY.js} +8 -8
- package/dist/chunk-GOZO6LU2.js +8 -0
- package/dist/{chunk-CX4XR4HO.js → chunk-GSF2UZTX.js} +1 -1
- package/dist/chunk-HCXIXV4E.js +8 -0
- package/dist/chunk-HEGSRTXG.js +5 -0
- package/dist/{chunk-DGWS4GTI.js → chunk-IGLPL2QU.js} +1 -1
- package/dist/chunk-IYXNRNAF.js +8 -0
- package/dist/{chunk-FZM3ZPW3.js → chunk-JPNAEN53.js} +1 -1
- package/dist/{chunk-S4FPYCUU.js → chunk-JQBVSPF5.js} +3 -3
- package/dist/{chunk-O7RR2ZZ2.js → chunk-KBV2UOTG.js} +6 -6
- package/dist/chunk-L7XIGRIT.js +6 -0
- package/dist/chunk-LCMXVMF4.js +14 -0
- package/dist/{chunk-PSR6SXCC.js → chunk-LGDMGDSV.js} +11 -11
- package/dist/chunk-LH7IKIGE.js +1 -0
- package/dist/{chunk-3BFZVVAT.js → chunk-LJAYUDN2.js} +1 -1
- package/dist/{chunk-Z6GQFTLJ.js → chunk-LK5A2SGA.js} +1 -1
- package/dist/{chunk-XFH64VIG.js → chunk-M3JNILT2.js} +3 -3
- package/dist/{chunk-VX6TKEEK.js → chunk-M4BPHBKI.js} +1 -1
- package/dist/{chunk-6M5O2P64.js → chunk-MDV7UQJD.js} +9 -9
- package/dist/{chunk-USVL5SLG.js → chunk-MIC2F3W3.js} +1 -1
- package/dist/chunk-MNMOBH2O.js +1 -0
- package/dist/{chunk-DWAA4YZV.js → chunk-MTIP5DH2.js} +3 -3
- package/dist/{chunk-XCAUDTCC.js → chunk-MXGDFO6A.js} +5 -5
- package/dist/{chunk-6IOFNPR6.js → chunk-NEZA7V6H.js} +4 -4
- package/dist/{chunk-IHNOWRTP.js → chunk-OEQ52KWJ.js} +2 -2
- package/dist/{chunk-WLYYC3AP.js → chunk-OFG3JZZE.js} +1 -1
- package/dist/{chunk-QGWKM7C3.js → chunk-OONJ43CQ.js} +5 -5
- package/dist/{chunk-CIHR5ZKF.js → chunk-OTVK7DJM.js} +1 -1
- package/dist/{chunk-HUA3TGMM.js → chunk-P2C33RHT.js} +1 -1
- package/dist/{chunk-55AEZX6K.js → chunk-P4VKU3SL.js} +1 -1
- package/dist/{chunk-A6FR2D46.js → chunk-PFKXPSOM.js} +5 -5
- package/dist/{chunk-TDAI4J27.js → chunk-PVPMJ5G2.js} +1 -1
- package/dist/chunk-Q5Z3KHT2.js +1 -0
- package/dist/{chunk-RSOBUPLK.js → chunk-QMUIXKBQ.js} +1 -1
- package/dist/{chunk-NJN5IKWO.js → chunk-QQ2LDC6C.js} +1 -1
- package/dist/{chunk-QO5E33DH.js → chunk-RABYGQQU.js} +2 -2
- package/dist/chunk-RK7MN5L5.js +3 -0
- package/dist/chunk-RPL4H6LE.js +9 -0
- package/dist/{chunk-N5KO2IHG.js → chunk-RQDVAUXD.js} +4 -4
- package/dist/{chunk-IPO4LHSB.js → chunk-RRE2NNFS.js} +6 -6
- package/dist/{chunk-WL4U4MTQ.js → chunk-RWPMLUFO.js} +3 -3
- package/dist/{chunk-36PJGT4W.js → chunk-SHO35OPO.js} +3 -3
- package/dist/{chunk-DRUQH4ZE.js → chunk-SS5SQMIB.js} +2 -2
- package/dist/{chunk-BMXTPJ7T.js → chunk-SX5BSWTN.js} +5 -5
- package/dist/{chunk-AFG34RBV.js → chunk-SXQZ5GTA.js} +6 -6
- package/dist/{chunk-RDKIYORS.js → chunk-SYZLS2JA.js} +1 -1
- package/dist/{chunk-4P3324KU.js → chunk-T7PVHIXI.js} +1 -1
- package/dist/{chunk-DVYIBJ3S.js → chunk-TQE6O2JA.js} +3 -3
- package/dist/{chunk-P7H2DXJB.js → chunk-UGGHQYDN.js} +10 -10
- package/dist/{chunk-EH2BNSG3.js → chunk-VAPSWR5Q.js} +9 -9
- package/dist/{chunk-LE5LWALR.js → chunk-VCMHBUKI.js} +1 -1
- package/dist/{chunk-NZ34BQKH.js → chunk-VQBEZNHC.js} +1 -1
- package/dist/chunk-VUIGU2LQ.js +23 -0
- package/dist/chunk-WBJ6KNUF.js +1 -0
- package/dist/{chunk-36VIGB6J.js → chunk-WDQI3FV6.js} +6 -6
- package/dist/{chunk-VX4COEWP.js → chunk-WMHZA4EO.js} +3 -3
- package/dist/chunk-WUAKIM2B.js +7 -0
- package/dist/{chunk-TE6R53YD.js → chunk-XWFLIGDQ.js} +1 -1
- package/dist/{chunk-XBHXGBJR.js → chunk-YCWALB3A.js} +1 -1
- package/dist/{chunk-4EBJO7ER.js → chunk-YDMXW2Q4.js} +11 -11
- package/dist/{chunk-H5NIW2KS.js → chunk-ZD36QKQS.js} +1 -1
- package/dist/{chunk-QRU55BUS.js → chunk-ZD56IH5K.js} +2 -2
- package/dist/{chunk-WOAMPTZI.js → chunk-ZS3TIQQ4.js} +14 -14
- package/dist/{chunk-4RGMRXYH.js → chunk-ZXVJL7MS.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.d.ts +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.d.ts +50 -2
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/linkHref.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -2
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +666 -667
- package/dist/map/index.js +3 -3
- package/dist/markup/index.d.ts +55 -11
- package/dist/markup/index.js +1 -1
- package/dist/motion/values.d.ts +75 -0
- package/dist/motion/values.js +1 -0
- package/dist/motion.css +26 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.d.ts +11 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/tokens/type.d.ts +3 -31
- package/dist/tokens/type.js +1 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/dist/Browser-KUFFOGYK.js +0 -43
- package/dist/Calculator-LENRW34X.js +0 -29
- package/dist/Sidebar-TU4QCKYJ.js +0 -44
- package/dist/chunk-3C5NKOVF.js +0 -1
- package/dist/chunk-4BCFBF3C.js +0 -9
- package/dist/chunk-4P57TIFK.js +0 -2
- package/dist/chunk-5DIGYJHD.js +0 -1
- package/dist/chunk-7LU3H72S.js +0 -7
- package/dist/chunk-7RP7QTRF.js +0 -12
- package/dist/chunk-CH3JQUDW.js +0 -8
- package/dist/chunk-DHKRXHJN.js +0 -1
- package/dist/chunk-EOVXFXVV.js +0 -2
- package/dist/chunk-EXLHFM3V.js +0 -6
- package/dist/chunk-GOXQJCXG.js +0 -28
- package/dist/chunk-H475WZPF.js +0 -23
- package/dist/chunk-JPOYR5AO.js +0 -7
- package/dist/chunk-MAMWQCJ6.js +0 -2
- package/dist/chunk-MHPFBVDD.js +0 -8
- package/dist/chunk-NWC6YCIJ.js +0 -11
- package/dist/chunk-PJPK2ADX.js +0 -1
- package/dist/chunk-PVDZG2U2.js +0 -14
- package/dist/chunk-S5DYR75A.js +0 -29
- package/dist/chunk-TNJ2VCH4.js +0 -8
- package/dist/chunk-USWA6YNZ.js +0 -3
- /package/dist/{chunk-RKLZDVAO.js → chunk-2F5SLLBJ.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-
|
|
1
|
+
import{Tooltip as e}from"./chunk-QQ2LDC6C.js";import{jsx as a,jsxs as l}from"react/jsx-runtime";function r({options:r,value:i,onChange:o,onClear:s,columns:n,captions:t=!1,label:c,className:d="","aria-labelledby":u}){/* @__PURE__ */
|
|
2
2
|
return a("div",{role:"group","aria-label":u?void 0:c,"aria-labelledby":u,style:n?{gridTemplateColumns:`repeat(${n}, minmax(0, 1fr))`}:void 0,className:`grid gap-(--space-8) ${n?"":"grid-cols-[repeat(auto-fill,minmax(58px,1fr))]"} ${d}`.replace(/\s+/g," ").trim(),children:r.map(r=>{const n=r.value===i,c=/* @__PURE__ */l("button",{type:"button","aria-pressed":n,"aria-label":t?void 0:r.label,disabled:r.disabled||void 0,onClick:()=>{n?s?.():o(r.value)},className:`flex w-full min-w-0 flex-col items-center justify-center gap-(--space-4) rounded-(--radius-control) border transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)] disabled:cursor-not-allowed disabled:opacity-50 ${t?"px-(--space-4) py-(--space-8)":"p-(--space-4)"} ${n?"border-blue-600 bg-surface text-blue-600 ring-2 ring-blue-400/40":"border-line bg-surface text-ink-faint hover:bg-row-hover hover:text-ink"}`,children:[r.picture,t&&/* @__PURE__ */a("span",{className:"max-w-full truncate text-2xs leading-4",children:r.label})]});return t?/* @__PURE__ */a("div",{className:"flex min-w-0",children:c},r.value):/* @__PURE__ */a(e,{content:r.label,describe:!1,className:"relative flex min-w-0",children:c},r.value)})})}export{r as PictureTiles};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-2UO47XB4.js";import{Tooltip as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-2UO47XB4.js";import{Tooltip as t}from"./chunk-QQ2LDC6C.js";import{useShellStrings as n}from"./chunk-GDQJBQ5B.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const x="desktop"===u,g=p??(x?j.resetName(o):j.inheritName(o)),C=b?j.backTo(b):x?j.backToDefault:j.backToAuto,Q=m??(b?j.tip(g,C):g);
|
|
2
2
|
/* @__PURE__ */
|
|
3
|
-
return r(t,{content:
|
|
4
|
-
/* @__PURE__ */a("button",{type:"button",className:
|
|
5
|
-
/* @__PURE__ */a("span",{id:
|
|
3
|
+
return r(t,{content:Q,describe:!1,children:[
|
|
4
|
+
/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":g,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
|
|
5
|
+
/* @__PURE__ */a("span",{id:y,hidden:!0,children:C})]})}export{o as SettingReset};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Segmented as e}from"./chunk-
|
|
2
|
-
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,
|
|
1
|
+
import{Segmented as e}from"./chunk-JQBVSPF5.js";import{ColorPicker as t}from"./chunk-3TXSYEQM.js";import{InputNumber_default as l}from"./chunk-ZD56IH5K.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const S=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===S(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,t,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(l,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),C=n.map(S),O="number"==typeof d.width?d.width:C.every(e=>null!==e&&e===C[0])?C[0]:null,z=null===O&&C.some(e=>null!==e),B=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",E=e=>S(e)??("number"==typeof d.width?d.width:null),H=d.style??u.style;/* @__PURE__ */
|
|
2
|
+
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,E("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,E("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,E("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,E("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,O,z?"–":B,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(e,{block:!0,size:"sm",label:b.style,value:H,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
|
|
3
3
|
/* @__PURE__ */i("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
|
|
4
4
|
/* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(t,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"md",disabled:x})})]})}export{s as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-34H3CK7R.js";import{ChartFrame as a}from"./chunk-VAK5FQXH.js";import{ColumnChart as l}from"./chunk-SX5BSWTN.js";import{TH_ONE_LINE as s}from"./chunk-CJH2BGXY.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-5DIGYJHD.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,D=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,K=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,W=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Y=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function X(e,t,n){const i=e.replace(Y,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&X(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Y,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(D,"[redacted]").replace(K,"[url]").replace(V,"[id]").replace(W,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-MNMOBH2O.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,M=0,z=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),M=Math.max(M,t.interactionId),k=M?(M-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],z,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},J=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,K=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(J,"[redacted]").replace(K,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-
|
|
2
|
-
return s(e,{content:z??
|
|
1
|
+
import{Tooltip as e}from"./chunk-QQ2LDC6C.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,D=o(null),N=o({onResize:d,min:f,max:p,side:m});N.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const C=i(()=>{D.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>C,[C]);const M=e=>{D.current&&(e.currentTarget.hasPointerCapture?.(D.current.pointer)&&e.currentTarget.releasePointerCapture(D.current.pointer),C())},I="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${I} z-10 flex h-2`:`absolute inset-y-0 ${I} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:z??k.hint,side:T,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),D.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=D.current;if(!r)return;if(0===e.buttons)return void C();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=N.current;o(l(r.width,t,s,n,i))},onPointerUp:M,onPointerCancel:M,onLostPointerCapture:()=>{D.current&&C()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${I} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${I} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-ZGOHRLXG.js";import{Button_default as t}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-ZGOHRLXG.js";import{Button_default as t}from"./chunk-7DI3VQCF.js";import{useShellStrings as n}from"./chunk-GDQJBQ5B.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
|
|
2
2
|
return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
|
|
4
4
|
/* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CartesianPlot as t}from"./chunk-RABYGQQU.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const A=e().charts,Q=i(),v=d??(t=>Number.isInteger(t)?m(t,Q):n(t,1,Q)),w=x??(t=>m(t,Q)),L=g??A.countAxis,B=k??A.distribution,M=h??o(c??[],s),N=a(0,b,f),R=M.map(t=>v(t.from)),C=M.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(t,{labels:R,values:C,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:w,yAxisLabel:L,className:y,emptyLabel:j,ariaLabel:A.histogram(B,M.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${v(M[t].from)} – ${v(M[t].to)}`,rows:[{key:"count",label:A.observations,color:N,value:w(M[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:M.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:N,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TH_ONE_LINE as r}from"./chunk-
|
|
1
|
+
import{TH_ONE_LINE as r}from"./chunk-CJH2BGXY.js";import{jsxs as e,jsx as c}from"react/jsx-runtime";function n({caption:n,head:t,rows:i}){/* @__PURE__ */
|
|
2
2
|
return e("table",{className:"sr-only",children:[
|
|
3
3
|
/* @__PURE__ */c("caption",{children:n}),
|
|
4
4
|
/* @__PURE__ */c("thead",{children:/* @__PURE__ */c("tr",{children:t.map(e=>/* @__PURE__ */c("th",{className:r,scope:"col",children:e},e))})}),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-LJN77RG6.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-HEGSRTXG.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-7DI3VQCF.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-QQ2LDC6C.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{useShellStrings as k}from"./chunk-GDQJBQ5B.js";import{GLASS_DIVIDER as j,glassStyle as $}from"./chunk-5FYDNH4Y.js";import{useState as D,useId as N,useRef as C,useMemo as S,useEffect as R}from"react";import{createPortal as W}from"react-dom";import{jsxs as E,jsx as F}from"react/jsx-runtime";function L(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var M=["right-2","right-8","right-16"],T=[8,32,64];function z(z){const{options:A,placeholder:B,emptyOptionLabel:O,className:G="",disabled:H,id:Q,filter:U=!1,allowFreeText:I=!1,freeTextOption:J,onSearchChange:Y,loading:V=!1,error:X,onRetry:K,rightAdornment:Z,endAction:P,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=U&&ae&&!H,ce=re||U,ue=null!=J,de=I||ue,[he,pe]=D(!1),[me,fe]=D(-1),be=N(),ge=Q??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=D(""),ke=k(),je=O??ke.select.none,$e=e=>{xe(e),fe(-1),Y?.(e)},De=C(null),Ne=C(null),Ce=C(null),Se=C(null),Re=C(he);Re.current=he;const We=C(!1),Ee=e=>{Re.current&&(Re.current=!1,e&&I&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Fe=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),Ee(!1)}},[Le,Me]=D(null);y(()=>{if(!Z||he)return void Me(null);const e=Se.current?.offsetWidth??0;Me(e?e+T[He]+6:null)});const Te=v(Ne,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(A),[A]),Ae=le.join("\0"),Be=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Ae,de]),Oe=Be.join(", "),Ge=_&&ae&&!H,He=(Ge?1:0)+(P?1:0),[Qe,Ue]=D(null),Ie=C(null),Je=C(""),Ye=C(()=>{});Ye.current=()=>{const e=Ne.current,t=Ie.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Be.join("\0")}`;if(o===Je.current)return;Je.current=o;let i=null;r>0&&Be.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=L(Be,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ue(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ye.current()}),R(()=>{const e=Ne.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ye.current());return t.observe(e),()=>t.disconnect()},[re]);const Ve=Be.length,Xe=!re||!Qe||Qe.shown>=Ve?Oe:0===Qe.shown?ke.select.selectedCount(Ve):`${Be.slice(0,Qe.shown).join(", ")} +${Ve-Qe.shown}`,Ke=re&&null!==Qe&&(Qe.shown<Ve||Qe.cut),Ze=he&&ae&&ce;R(()=>{if(!he)return;const e=e=>{const t=e.target;De.current?.contains(t)||Ce.current?.contains(t)||Ee(!0)};document.addEventListener("mousedown",e);const t=b(()=>Ee(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,I,ye,Ae,z.onChange]),R(()=>{if(he)return x(e=>!("Escape"!==e.key||!Re.current)&&(Ee(!1),Ne.current?.blur(),!0),()=>Ce.current)},[he]);const Pe=S(()=>{const e=/* @__PURE__ */new Set;return n(A,t=>!e.has(t.value)&&(e.add(t.value),!0))},[A]),qe=S(()=>{if(Y)return Pe;const e=ye.trim().toLowerCase();return e?n(Pe,t=>r(t,e)):Pe},[Pe,ye,Y]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Ae]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
+
return E("div",{ref:De,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(De.current?.contains(t)||Ce.current?.contains(t))||We.current||document.activeElement!==Ne.current&&Ee(!0)},children:[(rt=/* @__PURE__ */F("input",{id:ge,ref:Ne,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Xe,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{H||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(H)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Fe(nt[me],me):1!==_e.length||_e[0].disabled?I&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),Ee(!1),Ne.current?.blur())):Fe(_e[0],0)):"Escape"===t.key?(Ee(!1),Ne.current?.blur()):"Tab"===t.key&&Ee(!0)},placeholder:Ze?Xe:B||je,className:`${se?u:d} ${G} ${a[He]}${H?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ze?" rosh-field-shows-choice":""}`,style:Le?{paddingRight:Le}:void 0,disabled:H}),re?/* @__PURE__ */F(f,{content:!he&&Ke?Oe:null,className:"block",children:rt}):rt),re&&
|
|
3
|
+
/* @__PURE__ */F("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */F("span",{ref:Ie,className:"whitespace-pre"})}),He>0&&
|
|
4
|
+
/* @__PURE__ */E(s,{children:[Ge&&
|
|
5
|
+
/* @__PURE__ */F("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */F(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */F(p,{name:"close"}),onClick:()=>{ie([]),Ee(!1)}}})}),P&&/* @__PURE__ */F("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */F(c,{action:P})})]}),Z&&!he&&/* @__PURE__ */F("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${M[He]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Z}),he&&W(
|
|
6
|
+
/* @__PURE__ */E("div",{ref:Ce,onMouseDownCapture:()=>{We.current=!0,setTimeout(()=>{We.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Te?.left,right:Te?.right,top:Te?.top,bottom:Te?.bottom,minWidth:Te?.minWidth,width:Te?.width,...ce&&{maxWidth:Te?.maxWidth},visibility:Te?void 0:"hidden",...$()},children:[re&&ae&&_&&!H&&
|
|
7
|
+
/* @__PURE__ */F("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${j}`,children:ke.select.clearAll}),V?
|
|
8
|
+
/* @__PURE__ */F(m,{size:"sm",padding:"py-2",label:ke.search.searching}):X?/* @__PURE__ */E("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
+
/* @__PURE__ */F("span",{className:"min-w-0 flex-1",children:X}),K&&/* @__PURE__ */F(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:K,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
+
/* @__PURE__ */E("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Te?.maxHeight??w},children:[0===nt.length?V||X?null:/* @__PURE__ */F("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
+
return E("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Fe(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */F(o,{selected:n}),
|
|
12
|
+
/* @__PURE__ */F("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */F(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&J&&
|
|
13
|
+
/* @__PURE__ */F("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Fe(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${j}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */F("span",{className:"min-w-0 flex-1 truncate",children:J(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,L as fitChoice};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as r}from"./chunk-
|
|
1
|
+
import{Tooltip as r}from"./chunk-QQ2LDC6C.js";import{useShellStrings as e}from"./chunk-GDQJBQ5B.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
|
|
2
2
|
/* @__PURE__ */t("circle",{cx:"2",cy:"3",r:"1.1"}),
|
|
3
3
|
/* @__PURE__ */t("circle",{cx:"2",cy:"7",r:"1.1"}),
|
|
4
4
|
/* @__PURE__ */t("circle",{cx:"2",cy:"11",r:"1.1"})]});function l({hint:n,dragging:i,revealClassName:c,marker:l}){const o=e().tree;/* @__PURE__ */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-EYPKBJYG.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-GDQJBQ5B.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const w=n().charts,M=m(),N=y??(e=>h(e,M)),B=j??w.nothingToBreakDown,$=c(null),Y=a($),C=v??Y,[D,F]=u(null),{highlighted:G}=l(),Q=e(p,C,d);if(0===Q.length)/* @__PURE__ */
|
|
2
|
+
return s("div",{className:b,ref:$,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:B})});const z=k??i(0),A=Math.max(...Q.map(e=>e.value),1),E=e=>34+e/A*62,P=e=>`color-mix(in oklab, ${z} ${E(e).toFixed(0)}%, ${o.surface})`,V=e=>E(e)>=55?o.surface:o.label,H=D??G,I=D?Q.find(e=>e.key===D):void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${b??""}`,ref:$,children:[
|
|
4
|
+
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${C} ${d}`,role:"img","aria-label":w.treemap(p.length),onMouseLeave:()=>F(null),children:Q.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
|
|
5
|
+
return f("g",{opacity:H&&H!==e.key?.55:1,onMouseEnter:()=>F(e.key),children:[
|
|
6
|
+
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:P(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:V(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:V(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),I&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(r,{title:I.label,rows:[{key:"value",label:w.value,color:P(I.value),value:N(I.value)}]})}),
|
|
7
|
+
/* @__PURE__ */s(t,{caption:w.treemap(p.length),head:[w.tableItem,w.value],rows:Q.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-7DI3VQCF.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&D}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&D})}var P=u(function({onClick:
|
|
3
|
-
return x("button",{ref:f,id:u,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{
|
|
1
|
+
import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{keepsNativeMenu as t}from"./chunk-5QFPTDQF.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{glassStyle as c,GLASS_DIVIDER as s}from"./chunk-5FYDNH4Y.js";import{createContext as d,forwardRef as u,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function E(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function T(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function M(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var $=d(null),B=d(!1);function L({children:e,style:n,className:a="",onClose:s,minWidth:d=180,portal:u=!1}){const p=h(null),b=m(),[x,v]=f([]),E=h();g(()=>()=>clearTimeout(E.current),[]);const T=i(),M=y(()=>{const e=()=>clearTimeout(E.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),E.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),s?.()},root:p}},[b,x,s]);g(()=>{if(!s)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&s()},t=e=>{"Escape"===e.key&&s()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(s),o=l(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[s,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const B=W(),L=/(^|[\s:])!?z-/.test(a),j=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===B?"py-1":"large"===B?"py-2":"py-1"} ${a}`,onContextMenu:e=>{t(e.target)||e.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:d,animation:"popup-in 0.12s ease-out",...c(),...n},children:/* @__PURE__ */k($.Provider,{value:M,children:e})});return u?T?w(j,document.body):null:j}function j(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-accent-tint text-blue-700":"text-ink not-disabled:not-aria-disabled:hover:bg-accent-tint not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var D=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function H({kind:e,checked:t}){/* @__PURE__ */
|
|
2
|
+
return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&D}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&D})}var P=u(function({onClick:t,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:d,id:u,onMouseEnter:h},f){const g=p($),y=m(),b=null!=s&&!1!==s,w=`${u??y}-label`,N=`${u??y}-note`,C=p(B),E=j(o,i,r),T=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
|
|
3
|
+
return x("button",{ref:f,id:u,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{t?.(),g&&g.depth>0&&"checkbox"!==T&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:E.className,style:E.style,children:[T&&/* @__PURE__ */k(H,{kind:T,checked:!!l}),b?
|
|
4
4
|
/* @__PURE__ */x("span",{className:"block min-w-0 flex-1 py-2",children:[
|
|
5
5
|
/* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(R,{children:c}),
|
|
6
6
|
/* @__PURE__ */k("span",{id:w,className:"min-w-0",children:n})]}),
|
|
7
|
-
/* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:
|
|
8
|
-
return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var A=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function F(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function z(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function I({label:
|
|
7
|
+
/* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:e(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(R,{children:c}),n]})]})});function R({children:e}){/* @__PURE__ */
|
|
8
|
+
return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var A=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function F(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function z(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function I({label:e,icon:n,children:r,disabled:o,className:i="",minWidth:s=180,maxHeight:d,rowProps:u}){const f=p($),N=m(),C=h(null),E=h(null),B=h(),L=h(!1),D=`${N}-menu`;g(()=>()=>clearTimeout(B.current),[]);const H=f?.depth??0,P=f?.path[H],R=!!P&&P.key===N&&!o,I=b(e=>{if(!f||o||!C.current)return;clearTimeout(B.current),L.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=H>0&&(f.path[H-1]?.flipped??!1),a=M(r.left,r.right,s,window.innerWidth,4,i);f.open(H,{key:N,y:t.top,...a})},[f,o,H,N,s]),S=e=>{f?.closeBelow(H),C.current?.focus()};g(()=>{if(R)return l(e=>"Escape"===e.key&&(!(f&&f.path.length>H+1)&&(S(),!0)),()=>E.current)}),a(()=>{if(!R||!P)return;const e=()=>{const e=E.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=H>0&&(f?.path[H-1]?.flipped??!1),o=e.offsetWidth||s,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=T(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{R&&L.current&&(L.current=!1,z(E.current)[0]?.focus())},[R]);const U=y(()=>f&&{...f,depth:H+1},[f,H]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const q=j(!1,o,i,R),Q=W();/* @__PURE__ */
|
|
9
9
|
return x(v,{children:[
|
|
10
10
|
/* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":R,"aria-controls":R?D:void 0,disabled:o,"data-popup-submenu-row":!0,className:q.className,style:q.style,onClick:e=>{const t=0===e.detail;R?t&&z(E.current)[0]?.focus():I(t)},...u,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),I(!0))},onMouseEnter:()=>{u?.onMouseEnter?.(),o||(f.cancelClose(),R?f.closeBelow(H+1):(clearTimeout(B.current),B.current=setTimeout(()=>I(!1),120)))},onMouseLeave:()=>{clearTimeout(B.current),f.scheduleClose(H)},children:[n,
|
|
11
|
-
/* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:
|
|
12
|
-
/* @__PURE__ */k("div",{ref:E,id:D,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===Q?"py-1":"large"===Q?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:
|
|
13
|
-
return k("div",{className:`border-t ${
|
|
11
|
+
/* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:e}),A]}),R&&w(
|
|
12
|
+
/* @__PURE__ */k("div",{ref:E,id:D,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===Q?"py-1":"large"===Q?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:s,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:F(f.root.current)+H+1,animation:(P.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...c()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=z(E.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),S())},onMouseEnter:()=>{f.cancelClose(),clearTimeout(B.current)},onMouseLeave:()=>f.scheduleClose(H+1),onContextMenu:e=>{t(e.target)||e.preventDefault()},children:/* @__PURE__ */k($.Provider,{value:U,children:r})}),document.body)]})}function S(){const e=W();/* @__PURE__ */
|
|
13
|
+
return k("div",{className:`border-t ${s} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function U(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function q({children:e}){/* @__PURE__ */
|
|
14
14
|
return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:U(),children:e})}function Q({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
|
|
15
15
|
return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{H as MenuCheckMark,Q as MenuIcon,B as MenuSemanticsContext,L as PopupMenu,S as PopupMenuDivider,P as PopupMenuItem,q as PopupMenuLabel,I as PopupSubmenu,T as clampMenuTop,C as closeMenuBelow,j as itemLook,M as menuPanelLeft,U as menuTextRowStyle,N as openMenuLevel,E as resolveMenuLevels};
|