drizzle-cube 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/ActivityGridChart.config-BpGv0FYq.js +2 -0
- package/dist/adapters/ActivityGridChart.config-DWs9dRl7.cjs +1 -0
- package/dist/adapters/AreaChart.config-Cn8nAQqj.cjs +1 -0
- package/dist/adapters/AreaChart.config-NDMkAi9w.js +2 -0
- package/dist/adapters/BarChart.config-CuGCupRX.cjs +1 -0
- package/dist/adapters/BarChart.config-D4Ct_ZuS.js +2 -0
- package/dist/adapters/BoxPlotChart.config-BEHZDgrz.js +2 -0
- package/dist/adapters/BoxPlotChart.config-DnC3xk7q.cjs +1 -0
- package/dist/adapters/BubbleChart.config-D0ouKOKS.cjs +1 -0
- package/dist/adapters/BubbleChart.config-Du8aEfdQ.js +2 -0
- package/dist/adapters/CandlestickChart.config-B0B6dKYG.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-DBilZaFc.js +2 -0
- package/dist/adapters/DataTable.config-BXalzUPO.cjs +1 -0
- package/dist/adapters/DataTable.config-CF8BzQHu.js +2 -0
- package/dist/adapters/DotStripChart.config-0ggseDij.cjs +1 -0
- package/dist/adapters/DotStripChart.config-CfHh0XSW.js +2 -0
- package/dist/adapters/FunnelChart.config-AcSpen_Q.js +2 -0
- package/dist/adapters/FunnelChart.config-D6k89qDc.cjs +1 -0
- package/dist/adapters/GaugeChart.config-B5BcrEvW.cjs +1 -0
- package/dist/adapters/GaugeChart.config-BChbha74.js +2 -0
- package/dist/adapters/HeatMapChart.config-BgkP8kiW.js +2 -0
- package/dist/adapters/HeatMapChart.config-Crq7vBwj.cjs +1 -0
- package/dist/adapters/KpiDelta.config-Cqu1WOkV.js +2 -0
- package/dist/adapters/KpiDelta.config-edWLG1bM.cjs +1 -0
- package/dist/adapters/KpiNumber.config-BLkE67us.cjs +1 -0
- package/dist/adapters/KpiNumber.config-DNsH72Rs.js +2 -0
- package/dist/adapters/KpiText.config-CAnLZYht.cjs +1 -0
- package/dist/adapters/KpiText.config-CQGd10Hj.js +2 -0
- package/dist/adapters/LineChart.config-C7l_xff-.js +2 -0
- package/dist/adapters/LineChart.config-DOxwtnfG.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-BV5j1oJl.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-CBkJAEpW.js +2 -0
- package/dist/adapters/MeasureProfileChart.config-CyyFz-x_.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-VIvr7lq6.js +2 -0
- package/dist/adapters/PieChart.config-BP8OlSJ4.js +2 -0
- package/dist/adapters/PieChart.config-BaMxIlBa.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-CtZaP8Xn.js +2 -0
- package/dist/adapters/ProportionBarChart.config-DAyEQ8Pn.cjs +1 -0
- package/dist/adapters/RadarChart.config-CG07QZUT.cjs +1 -0
- package/dist/adapters/RadarChart.config-DJJuD-Tb.js +2 -0
- package/dist/adapters/RadialBarChart.config-BNgzWkot.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-DVM_jg9B.js +2 -0
- package/dist/adapters/RecordsTable.config-BEQmKQ-S.cjs +1 -0
- package/dist/adapters/RecordsTable.config-d4s8HV9m.js +2 -0
- package/dist/adapters/RetentionCombinedChart.config-DJ4N-ffd.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-DV1h3rW2.js +2 -0
- package/dist/adapters/RetentionHeatmap.config-CIJDenRg.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-P3VVn3QJ.js +2 -0
- package/dist/adapters/SankeyChart.config-CQ89DYf7.cjs +1 -0
- package/dist/adapters/SankeyChart.config-CfMmdmXJ.js +2 -0
- package/dist/adapters/ScatterChart.config-C4zrFpF-.cjs +1 -0
- package/dist/adapters/ScatterChart.config-DaJ3LVWH.js +2 -0
- package/dist/adapters/SunburstChart.config-1ZRhfGr0.cjs +1 -0
- package/dist/adapters/SunburstChart.config-DHgrSIkQ.js +2 -0
- package/dist/adapters/TreeMapChart.config-Cy3sAsJP.js +2 -0
- package/dist/adapters/TreeMapChart.config-D365WWEK.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-DYEf1vQT.js +2 -0
- package/dist/adapters/WaterfallChart.config-s8pICbm8.cjs +1 -0
- package/dist/adapters/{compiler-BKg3j2mm.js → compiler-C8fOs43d.js} +1116 -1089
- package/dist/adapters/compiler-Dw5tYox7.cjs +166 -0
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-JgUTMhxl.cjs → core-BP6GiYzO.cjs} +1 -1
- package/dist/adapters/{core-Bmb7XMBz.js → core-z6vXJ8nF.js} +2 -2
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +5 -5
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +23 -23
- package/dist/adapters/{handler-CfZt5W8b.cjs → handler-B78akmC_.cjs} +4 -4
- package/dist/adapters/{handler-B1_zd-qo.js → handler-CI3Rt-Zt.js} +33 -32
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html-C1fEW5oE.js +5 -0
- package/dist/adapters/mcp-app-html-CGk4ubE0.cjs +1 -0
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.js +1 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +3 -3
- package/dist/adapters/{mcp-transport-DzxluRyH.cjs → mcp-transport-Bc7-KSG_.cjs} +1 -1
- package/dist/adapters/{mcp-transport-BTmAXLo8.js → mcp-transport-DpS_e0gL.js} +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-Br__Bn2t.cjs → openai-7064EJ1j.cjs} +2 -2
- package/dist/adapters/{openai-C32tey5N.cjs → openai-B0mByiYQ.cjs} +1 -1
- package/dist/adapters/{openai-BpcMIv4e.js → openai-CnUBYFyY.js} +1 -1
- package/dist/adapters/{openai-yfJF-3Rv.js → openai-DpGdZL3m.js} +3 -3
- package/dist/adapters/{utils-i2h5cwI3.js → utils-CN_bxSiq.js} +1064 -936
- package/dist/adapters/utils-CvC1czqb.cjs +141 -0
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/client/components/DashboardFilters/useCompactFilterBar.d.ts +5 -0
- package/dist/cjs/client/components/dashboardPortletCard/PortletCardHeader.d.ts +2 -0
- package/dist/cjs/client/utils/filterUtils.d.ts +30 -0
- package/dist/cjs/client/utils/joinReachability.d.ts +1 -0
- package/dist/cjs/server/ai/query-schema.d.ts +7 -2
- package/dist/cjs/server/builders/date-time-builder.d.ts +1 -1
- package/dist/cjs/server/builders/date-time-helpers.d.ts +2 -0
- package/dist/cjs/server/builders/filter-builder.d.ts +1 -1
- package/dist/cjs/server/builders/in-date-range-validation.d.ts +25 -0
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{DashboardEditModal-P-HUNrcp.js → DashboardEditModal-5ZSP--FQ.js} +1039 -986
- package/dist/client/chunks/DashboardEditModal-5ZSP--FQ.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-in6QHc0b.js → DotStripChart-DTukhwG-.js} +3 -3
- package/dist/client/chunks/{DotStripChart-in6QHc0b.js.map → DotStripChart-DTukhwG-.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-CjuOm7NT.js → ProportionBarChart-CPZ2cHxH.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-CjuOm7NT.js.map → ProportionBarChart-CPZ2cHxH.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-CXXsiaV1.js → RecordsTable-BC5l67Dc.js} +4 -4
- package/dist/client/chunks/{RecordsTable-CXXsiaV1.js.map → RecordsTable-BC5l67Dc.js.map} +1 -1
- package/dist/client/chunks/{RetentionCombinedChart-DFCeEFkx.js → RetentionCombinedChart-aj5xblfu.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-DFCeEFkx.js.map → RetentionCombinedChart-aj5xblfu.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-jpshJ2Af.js → RetentionHeatmap-CKckuEMF.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-jpshJ2Af.js.map → RetentionHeatmap-CKckuEMF.js.map} +1 -1
- package/dist/client/chunks/{af-ZA-C0dGb_53.js → af-ZA-BglLInx4.js} +13 -1
- package/dist/client/chunks/{af-ZA-C0dGb_53.js.map → af-ZA-BglLInx4.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-CRghdHVl.js → analysis-builder-Db4umQtd.js} +9 -9
- package/dist/client/chunks/{analysis-builder-CRghdHVl.js.map → analysis-builder-Db4umQtd.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-DBSxWIj8.js → analysis-builder-shared-BEvvX6ln.js} +9 -9
- package/dist/client/chunks/{analysis-builder-shared-DBSxWIj8.js.map → analysis-builder-shared-BEvvX6ln.js.map} +1 -1
- package/dist/client/chunks/{chart-activity-grid-DGazwi4C.js → chart-activity-grid-Bbc58UJD.js} +17 -4
- package/dist/client/chunks/chart-activity-grid-Bbc58UJD.js.map +1 -0
- package/dist/client/chunks/{chart-area-zyLGD-ym.js → chart-area-9uCXIvMN.js} +2 -2
- package/dist/client/chunks/{chart-area-zyLGD-ym.js.map → chart-area-9uCXIvMN.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-DMCBq8qJ.js → chart-bar-C5a1T9Ce.js} +3 -3
- package/dist/client/chunks/{chart-bar-DMCBq8qJ.js.map → chart-bar-C5a1T9Ce.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-5Z55A-it.js → chart-box-plot-BbBrZsaJ.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-5Z55A-it.js.map → chart-box-plot-BbBrZsaJ.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-YD28dX8w.js → chart-bubble-dt5ESb7m.js} +2 -2
- package/dist/client/chunks/{chart-bubble-YD28dX8w.js.map → chart-bubble-dt5ESb7m.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-BUMpBI08.js → chart-candlestick-2A2J_NsK.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-BUMpBI08.js.map → chart-candlestick-2A2J_NsK.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-BdMo3zVh.js → chart-data-table-zSjYEy0r.js} +2 -2
- package/dist/client/chunks/{chart-data-table-BdMo3zVh.js.map → chart-data-table-zSjYEy0r.js.map} +1 -1
- package/dist/client/chunks/{chart-funnel-BRyZS6ie.js → chart-funnel-CuOSCsbt.js} +2 -2
- package/dist/client/chunks/{chart-funnel-BRyZS6ie.js.map → chart-funnel-CuOSCsbt.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-DxgHlZKp.js → chart-gauge-DxKeqCCD.js} +3 -3
- package/dist/client/chunks/{chart-gauge-DxgHlZKp.js.map → chart-gauge-DxKeqCCD.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-5jHm3f-V.js → chart-heat-map-C1dvW-ov.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-5jHm3f-V.js.map → chart-heat-map-C1dvW-ov.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-C84P-mwu.js → chart-kpi-delta-CgehGc9d.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-C84P-mwu.js.map → chart-kpi-delta-CgehGc9d.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-D9GqtBWw.js → chart-kpi-number-C31-6A6m.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-D9GqtBWw.js.map → chart-kpi-number-C31-6A6m.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-D3HqxXzU.js → chart-kpi-text-D2ydQIEn.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-D3HqxXzU.js.map → chart-kpi-text-D2ydQIEn.js.map} +1 -1
- package/dist/client/chunks/{chart-line-IEgiF8Nv.js → chart-line-CjW9Yo03.js} +3 -3
- package/dist/client/chunks/{chart-line-IEgiF8Nv.js.map → chart-line-CjW9Yo03.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-B_2Ed7FJ.js → chart-markdown-Cgs62had.js} +2 -2
- package/dist/client/chunks/{chart-markdown-B_2Ed7FJ.js.map → chart-markdown-Cgs62had.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-CWsPrQhH.js → chart-measure-profile-Cg39gYjR.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-CWsPrQhH.js.map → chart-measure-profile-Cg39gYjR.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-BEB2sCXF.js → chart-pie-BTb5nKd7.js} +3 -3
- package/dist/client/chunks/{chart-pie-BEB2sCXF.js.map → chart-pie-BTb5nKd7.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-BbSbXKbP.js → chart-radar-8384sPlX.js} +3 -3
- package/dist/client/chunks/{chart-radar-BbSbXKbP.js.map → chart-radar-8384sPlX.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-CNYD7tkM.js → chart-radial-bar-CuBmmOTU.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-CNYD7tkM.js.map → chart-radial-bar-CuBmmOTU.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-DKnTIvSr.js → chart-sankey-CoIuG7Nu.js} +2 -2
- package/dist/client/chunks/{chart-sankey-DKnTIvSr.js.map → chart-sankey-CoIuG7Nu.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-CSWF6-lx.js → chart-scatter-Bdj95OeV.js} +3 -3
- package/dist/client/chunks/{chart-scatter-CSWF6-lx.js.map → chart-scatter-Bdj95OeV.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-CdGzCq7q.js → chart-sunburst-CuG8520_.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-CdGzCq7q.js.map → chart-sunburst-CuG8520_.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-BiXB7EiM.js → chart-tree-map-CtJADX87.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-BiXB7EiM.js.map → chart-tree-map-CtJADX87.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-5rSDeLEZ.js → chart-waterfall-D430fO48.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-5rSDeLEZ.js.map → chart-waterfall-D430fO48.js.map} +1 -1
- package/dist/client/chunks/{charts-core-CKpkoMCa.js → charts-core-BSmlKmf0.js} +2 -2
- package/dist/client/chunks/{charts-core-CKpkoMCa.js.map → charts-core-BSmlKmf0.js.map} +1 -1
- package/dist/client/chunks/charts-loader-Bz9yHkW1.js +87 -0
- package/dist/client/chunks/{charts-loader-BTI0UPK4.js.map → charts-loader-Bz9yHkW1.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-kRjxedTf.js → nl-NL-BrqrWoAj.js} +15 -2
- package/dist/client/chunks/{nl-NL-kRjxedTf.js.map → nl-NL-BrqrWoAj.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-BbvL74Sf.js → schema-visualization-D2NvjQny.js} +3 -3
- package/dist/client/chunks/{schema-visualization-BbvL74Sf.js.map → schema-visualization-D2NvjQny.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-BfG1lX_3.js → useDirtyStateTracking-DL_AnCWZ.js} +4 -4
- package/dist/client/chunks/{useDirtyStateTracking-BfG1lX_3.js.map → useDirtyStateTracking-DL_AnCWZ.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-CDFhgmpE.js → useExplainAI-CdPWtj7E.js} +4 -4
- package/dist/client/chunks/{useExplainAI-CDFhgmpE.js.map → useExplainAI-CdPWtj7E.js.map} +1 -1
- package/dist/client/chunks/{vendor-DeckzF1j.js → vendor-Bpaolt6h.js} +2 -2
- package/dist/client/chunks/{vendor-DeckzF1j.js.map → vendor-Bpaolt6h.js.map} +1 -1
- package/dist/client/components/DashboardFilters/useCompactFilterBar.d.ts +5 -0
- package/dist/client/components/dashboardPortletCard/PortletCardHeader.d.ts +2 -0
- package/dist/client/components.js +1 -1
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +13 -13
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/utils/filterUtils.d.ts +30 -0
- package/dist/client/utils/joinReachability.d.ts +1 -0
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +2 -2
- package/dist/server/ai/query-schema.d.ts +7 -2
- package/dist/server/builders/date-time-builder.d.ts +1 -1
- package/dist/server/builders/date-time-helpers.d.ts +2 -0
- package/dist/server/builders/filter-builder.d.ts +1 -1
- package/dist/server/builders/in-date-range-validation.d.ts +25 -0
- package/dist/server/index.cjs +47 -45
- package/dist/server/index.js +2158 -2018
- package/package.json +2 -1
- package/dist/adapters/ActivityGridChart.config-BW77mjsu.cjs +0 -1
- package/dist/adapters/ActivityGridChart.config-DQRnTU6e.js +0 -2
- package/dist/adapters/AreaChart.config-DbvLVr-Y.cjs +0 -1
- package/dist/adapters/AreaChart.config-JbVNmary.js +0 -2
- package/dist/adapters/BarChart.config-Bkpwgqbk.js +0 -2
- package/dist/adapters/BarChart.config-jgDE3NUv.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-9wKKOZfN.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-Di99sPNJ.js +0 -2
- package/dist/adapters/BubbleChart.config-Cdg9nPFz.js +0 -2
- package/dist/adapters/BubbleChart.config-CwDXzdxC.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-B45GmJYV.js +0 -2
- package/dist/adapters/CandlestickChart.config-C8BXzmbD.cjs +0 -1
- package/dist/adapters/DataTable.config-c-24M_qU.cjs +0 -1
- package/dist/adapters/DataTable.config-fic2OroS.js +0 -2
- package/dist/adapters/DotStripChart.config-BcNT3Les.cjs +0 -1
- package/dist/adapters/DotStripChart.config-Cqmgw5_z.js +0 -2
- package/dist/adapters/FunnelChart.config-D1E5zSay.cjs +0 -1
- package/dist/adapters/FunnelChart.config-DPjSoYex.js +0 -2
- package/dist/adapters/GaugeChart.config-BDcvnYln.js +0 -2
- package/dist/adapters/GaugeChart.config-DQnx37Jf.cjs +0 -1
- package/dist/adapters/HeatMapChart.config-BWd863ik.js +0 -2
- package/dist/adapters/HeatMapChart.config-HEbSm_Zt.cjs +0 -1
- package/dist/adapters/KpiDelta.config-Bj3kfmWv.js +0 -2
- package/dist/adapters/KpiDelta.config-CaLnl2w_.cjs +0 -1
- package/dist/adapters/KpiNumber.config-Da9HxGT8.cjs +0 -1
- package/dist/adapters/KpiNumber.config-n4SwHHlD.js +0 -2
- package/dist/adapters/KpiText.config-8VzcnlPF.cjs +0 -1
- package/dist/adapters/KpiText.config-CItv_gG6.js +0 -2
- package/dist/adapters/LineChart.config-DQ7nHYrr.js +0 -2
- package/dist/adapters/LineChart.config-_98RmRA_.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-BpbqJDoz.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-Dz7KZ621.js +0 -2
- package/dist/adapters/MeasureProfileChart.config-BTCTP7L0.js +0 -2
- package/dist/adapters/MeasureProfileChart.config-DzPxIxB5.cjs +0 -1
- package/dist/adapters/PieChart.config-BhjlnVFv.js +0 -2
- package/dist/adapters/PieChart.config-DJlGNsBY.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-Byp_8diR.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-RyjNhw3T.js +0 -2
- package/dist/adapters/RadarChart.config-BWdv4uyp.js +0 -2
- package/dist/adapters/RadarChart.config-kW4oIVi4.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-CFYPoRQY.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-D2-_-Z64.js +0 -2
- package/dist/adapters/RecordsTable.config-B7KFt3kd.cjs +0 -1
- package/dist/adapters/RecordsTable.config-S_aiXGKe.js +0 -2
- package/dist/adapters/RetentionCombinedChart.config-CVGWozL3.js +0 -2
- package/dist/adapters/RetentionCombinedChart.config-Cd0pTdHY.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-BNqtWFjQ.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-CMi1h_5M.cjs +0 -1
- package/dist/adapters/SankeyChart.config-COIfx3Ua.cjs +0 -1
- package/dist/adapters/SankeyChart.config-DIh4nEk2.js +0 -2
- package/dist/adapters/ScatterChart.config-CrSQhlT4.js +0 -2
- package/dist/adapters/ScatterChart.config-DRgg-HAm.cjs +0 -1
- package/dist/adapters/SunburstChart.config-08-ufQaK.cjs +0 -1
- package/dist/adapters/SunburstChart.config-DmNgAJrO.js +0 -2
- package/dist/adapters/TreeMapChart.config-7k2repRB.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-C3vzB2dD.js +0 -2
- package/dist/adapters/WaterfallChart.config-AV2pHgrb.js +0 -2
- package/dist/adapters/WaterfallChart.config-USpcvapo.cjs +0 -1
- package/dist/adapters/compiler-BX6Ug_Uq.cjs +0 -166
- package/dist/adapters/mcp-app-html-BNg78ecJ.js +0 -5
- package/dist/adapters/mcp-app-html-N18EJEvv.cjs +0 -1
- package/dist/adapters/utils-Du_UZbn5.cjs +0 -139
- package/dist/client/chunks/DashboardEditModal-P-HUNrcp.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-DGazwi4C.js.map +0 -1
- package/dist/client/chunks/charts-loader-BTI0UPK4.js +0 -87
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vendor-DeckzF1j.js","names":["React2","React","React","__commonJSMin","getDefaultState","ensureSuspenseTimers","ensurePreventErrorBoundaryRetry","fetchOptimistic","useIsRestoring","useClearResetErrorBoundary","getHasError","useQueryErrorResetBoundary","replaceEqualDeep","useQueryClient","QueryObserver","noop","Subscribable","shallowEqualObjects","shouldSuspend","hashKey","shouldThrowError","notifyManager","React3","React","observerMap","RootIds","rootId","unsupportedValue","getRootId","root","optionsToId","options","key","createObserver","id","instance","elements","thresholds","observer","inView","entry","threshold","observe","fallbackInView","bounds","element","callback","callbacks","unobserved","useInsertionEffect","useSyncEffect","supportsRefCleanup","version2","canUseRefCleanup","useIntersectionObserverRef","onIntersectionChangeRef","onIntersectionChange","observerStateRef","setRef","observerState","cleanup","skip","destroyObserver","previousInView","stopObserving","triggerOnce","rootMargin","scrollMargin","trackVisibility","delay","useIsomorphicLayoutEffect","useInView","lastInViewRef","initialInView","state","setState","observerRef","onChange","refState","node","result","MutationObserver","#client","client","#updateResult","prevOptions","#currentMutation","#notify","action","#currentResult","#mutateOptions","variables","onMutateResult","context","difference","excludeSet","array2","array1","x","QueriesObserver","#options","#queries","#observers","#result","queries","#onUpdate","queryHashes","query","prevObservers","newObserverMatches","#findMatchingObservers","match","newObservers","newResult","hasLengthChange","hasIndexChange","index","hasStructuralChange","hasResultChange","prev","#observerMatches","matches","#combineResult","r","combine","#trackResult","trackedProps","observerResult","accessedProp","lastHashes","#lastQueryHashes","queryHashesChanged","hash","i","#lastResult","#lastCombine","#combinedResult","input","prevObserversMap","previousObservers","observers","defaultedOptions","shouldSkipCombine","#shouldSkipCombine","previousResult","useQueries","queryClient","isRestoring","errorResetBoundary","subscribed","defaultedQueries","opts","queryOptions","optimisticResult","getCombinedResult","trackResult","shouldSubscribe","onStoreChange","suspensePromises","queryObserver","firstSingleResultWhichShouldThrow","useMutation","mutate","args","createStoreImpl","listeners","nextState","partial","previousState","replace","listener","getState","api","initialState","createState","createStore","identity","arg","useStore","slice","selector","shouldDispatchFromDevtools","trackedConnections","getTrackedConnectionState","name","api2","extractConnectionInformation","store","extensionConnector","existingConnection","newConnection","removeStoreFromTrackedConnections","connectionInfo","v8StackLineRe","geckoStackLineRe","findCallerName","stack","traceLines","apiSetStateLineIndex","traceLine","callerLine","devtools","devtoolsOptions","enabled","fn","set","get","connectionInformation","isRecording","nameOrAction","anonymousActionType","connection","setStateFromDevtools","a","originalIsRecording","store2","originalDispatch","message","parseJsonThen","stateFromDevtools","lastComputedState","nextLiftedState","parsed","stringified","subscribeWithSelector","origSubscribe","optListener","equalityFn","currentSlice","nextSlice","previousSlice","createJSONStorage","storage","getStorage","parse","str2","str","newValue","toThenable","onFulfilled","onRejected","persist","currentState","persistedState","baseOptions","hasHydrated","hydrationVersion","hydrationListeners","finishHydrationListeners","config","setItem","savedSetState","configResult","stateFromStorage","hydrate","currentVersion","cb","postRehydrationCallback","deserializedStorageValue","migration","migrated","migratedState","migrationResult","e","newOptions","isIterable","obj","hasIterableEntries","value","compareEntries","mapA","valueA","mapB","valueB","compareIterables","iteratorA","iteratorB","nextA","nextB","shallow","useShallow","next","require_lz_string","LZString","f","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","res","compressed","uncompressed","buf","TotalLen","current_value","c","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","ii","bitsPerChar","getCharFromInt","dictionary","enlargeIn","dictSize","numBits","w","bits","resb","maxpower","power","data","getNextValue","resetValue","length","module"],"sources":["../../../node_modules/react-intersection-observer/dist/index.mjs","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../node_modules/zustand/esm/vanilla.mjs","../../../node_modules/zustand/esm/react.mjs","../../../node_modules/zustand/esm/middleware.mjs","../../../node_modules/zustand/esm/vanilla/shallow.mjs","../../../node_modules/zustand/esm/react/shallow.mjs","../../../node_modules/lz-string/libs/lz-string.js"],"sourcesContent":["\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root) return \"0\";\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n const id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n [...(_a = elements.get(entry.target)) != null ? _a : []].forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n const callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n let unobserved = false;\n return function unobserve() {\n if (unobserved) return;\n unobserved = true;\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"lastInView\");\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n this.lastInView = this.props.initialInView;\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n const previousInView = this.lastInView;\n this.lastInView = inView;\n if (previousInView === void 0 && !inView) {\n return;\n }\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n this.lastInView = props.initialInView;\n }\n componentDidMount() {\n this.unobserve();\n this.observeNode();\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.scrollMargin !== this.props.scrollMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.triggerOnce !== this.props.triggerOnce || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n }\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n if (this.lastInView === void 0) {\n this.lastInView = this.props.initialInView;\n }\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n scrollMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React3 from \"react\";\n\n// src/useIntersectionObserverRef.ts\nimport * as React2 from \"react\";\nvar useInsertionEffect = Reflect.get(React2, \"useInsertionEffect\");\nvar useSyncEffect = useInsertionEffect != null ? useInsertionEffect : React2.useEffect;\nfunction supportsRefCleanup(version2) {\n return (version2 == null ? void 0 : version2.startsWith(\"19.\")) || false;\n}\nvar canUseRefCleanup = supportsRefCleanup(React2.version);\nfunction useIntersectionObserverRef(onIntersectionChange, {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n}) {\n const onIntersectionChangeRef = React2.useRef(onIntersectionChange);\n const observerStateRef = React2.useRef({\n node: null,\n stop: void 0,\n owner: null\n });\n if (!useInsertionEffect) {\n onIntersectionChangeRef.current = onIntersectionChange;\n }\n useSyncEffect(() => {\n onIntersectionChangeRef.current = onIntersectionChange;\n }, [onIntersectionChange]);\n return React2.useCallback(\n function setRef(element) {\n const observerState = observerStateRef.current;\n if (!element && observerState.owner !== setRef) {\n return;\n }\n if (element === observerState.node) {\n observerState.owner = setRef;\n return canUseRefCleanup ? observerState.stop : void 0;\n }\n const cleanup = observerState.stop;\n observerState.stop = void 0;\n cleanup == null ? void 0 : cleanup();\n if (!element || skip) {\n observerState.node = null;\n observerState.owner = element ? setRef : null;\n return;\n }\n observerState.node = element;\n observerState.owner = setRef;\n let destroyObserver;\n let previousInView;\n function stopObserving() {\n destroyObserver == null ? void 0 : destroyObserver();\n if (observerState.stop === stopObserving) {\n observerState.node = null;\n observerState.stop = void 0;\n }\n }\n observerState.stop = stopObserving;\n destroyObserver = observe(\n element,\n (inView, entry) => {\n onIntersectionChangeRef.current(\n inView,\n entry,\n previousInView\n );\n previousInView = inView;\n if (triggerOnce && inView) stopObserving();\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay\n },\n fallbackInView\n );\n if (observerState.stop !== stopObserving) destroyObserver();\n return canUseRefCleanup ? observerState.stop : void 0;\n },\n [\n Array.isArray(threshold) ? threshold.toString() : threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n ]\n );\n}\n\n// src/useInView.tsx\nvar useIsomorphicLayoutEffect = typeof window === \"undefined\" ? React3.useEffect : React3.useLayoutEffect;\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n scrollMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n const lastInViewRef = React3.useRef(initialInView);\n const [state, setState] = React3.useState({\n inView: !!initialInView,\n entry: void 0\n });\n const observerRef = useIntersectionObserverRef(\n (inView, entry) => {\n const previousInView = lastInViewRef.current;\n lastInViewRef.current = inView;\n if (previousInView === void 0 && !inView) {\n return;\n }\n setState({ inView, entry });\n onChange == null ? void 0 : onChange(inView, entry);\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n }\n );\n const refState = React3.useRef({\n node: null,\n reset: false\n });\n const setRef = React3.useCallback(\n function setRef2(node) {\n if (node) {\n refState.current.node = node;\n refState.current.reset = false;\n } else if (refState.current.node) {\n refState.current.node = null;\n refState.current.reset = true;\n }\n const cleanup = observerRef(node);\n if (!cleanup) return;\n return () => {\n cleanup();\n if (refState.current.node === node) {\n refState.current.node = null;\n refState.current.reset = true;\n }\n };\n },\n [observerRef]\n );\n useIsomorphicLayoutEffect(() => {\n if (!refState.current.reset) return;\n refState.current.reset = false;\n if (triggerOnce || skip) return;\n setState({ inView: !!initialInView, entry: void 0 });\n lastInViewRef.current = initialInView;\n });\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\n// src/useOnInView.tsx\nvar useOnInView = (onIntersectionChange, {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n triggerOnce,\n skip\n} = {}) => {\n return useIntersectionObserverRef(\n (inView, entry, previousInView) => {\n if (previousInView === void 0 && !inView) {\n return;\n }\n onIntersectionChange(inView, entry);\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n triggerOnce,\n skip\n }\n );\n};\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView,\n useOnInView\n};\n//# sourceMappingURL=index.mjs.map","import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\n/**\n* Observes a single mutation and derives a `MutationObserverResult` from it.\n* A framework hook like `useMutation` creates one `MutationObserver` per hook\n* call, keeps it stable across re-renders, calls `setOptions` when the options\n* passed to the hook change, subscribes to it to re-render on updates, and\n* reads `getCurrentResult()` for the value to return. Calling `mutate()`\n* builds a new underlying `Mutation` in the `MutationCache` and executes it.\n*\n* @example\n* ```ts\n* const observer = new MutationObserver(queryClient, {\n* mutationFn: (variables: { title: string }) => addPost(variables),\n* })\n* ```\n*/\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\t/**\n\t* Updates the observer's options.\n\t*\n\t* If the new `mutationKey` differs from the previous one (and both were\n\t* defined), the observer is reset, detaching it from the mutation it was\n\t* observing. Otherwise, if the currently observed mutation is still\n\t* `pending`, its options are updated in place as well.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({\n\t* mutationFn: (variables: { title: string }) => addPost(variables),\n\t* onSuccess: (data) => console.log(data),\n\t* })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\t/** @internal */\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\t/**\n\t* Returns the observer's current result, derived from the observed\n\t* mutation's state (or the default, `idle` state if no mutation has been\n\t* built yet, e.g. before the first `mutate()` call or after `reset()`).\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Detaches the observer from the mutation it is currently observing (if\n\t* any) and resets the observed result back to its default, `idle` state.\n\t*\n\t* This does not cancel an in-flight mutation; the mutation itself keeps\n\t* running to completion and its own callbacks still fire, but this\n\t* observer stops reflecting its state and a subsequent `mutate()` call\n\t* will build a brand new mutation.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.reset()\n\t* ```\n\t*\n\t* @see {@link MutationObserver#mutate}\n\t*/\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\t/**\n\t* Builds a new `Mutation` in the `MutationCache` using the observer's\n\t* current options, detaches this observer from any previously observed\n\t* mutation, attaches it to the new one, and executes it with the given\n\t* variables.\n\t*\n\t* The optional per-call `options` (`onSuccess`/`onError`/`onSettled`) are\n\t* invoked once the mutation settles, in addition to any callbacks defined\n\t* on the observer's own options.\n\t*\n\t* @example\n\t* ```ts\n\t* await observer.mutate(\n\t* { title: 'New post' },\n\t* { onSuccess: (data) => console.log(data) },\n\t* )\n\t* ```\n\t*/\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","import { replaceEqualDeep, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\n//#region src/queriesObserver.ts\nfunction difference(array1, array2) {\n\tconst excludeSet = new Set(array2);\n\treturn array1.filter((x) => !excludeSet.has(x));\n}\n/**\n* A `QueriesObserver` watches an array of queries at once, exposing them as\n* a single array of `QueryObserverResult`s (or, when a `combine` option is\n* given, as a combined value derived from that array). It manages one\n* internal `QueryObserver` per query, and is the primitive that framework\n* adapters (e.g. `useQueries`) build their hooks on top of.\n*\n* @example\n* ```ts\n* const observer = new QueriesObserver(queryClient, [\n* { queryKey: ['post', 1], queryFn: fetchPost },\n* { queryKey: ['post', 2], queryFn: fetchPost },\n* ])\n*\n* const unsubscribe = observer.subscribe((result) => {\n* console.log(result)\n* })\n* ```\n*/\nvar QueriesObserver = class extends Subscribable {\n\t#client;\n\t#result;\n\t#queries;\n\t#options;\n\t#observers;\n\t#combinedResult;\n\t#lastCombine;\n\t#lastResult;\n\t#lastQueryHashes;\n\t#observerMatches = [];\n\tconstructor(client, queries, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.#options = options;\n\t\tthis.#queries = [];\n\t\tthis.#observers = [];\n\t\tthis.#result = [];\n\t\tthis.setQueries(queries);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) this.#observers.forEach((observer) => {\n\t\t\tobserver.subscribe((result) => {\n\t\t\t\tthis.#onUpdate(observer, result);\n\t\t\t});\n\t\t});\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.listeners.size) this.destroy();\n\t}\n\t/**\n\t* Stops observing all queries: clears all listeners and destroys every\n\t* underlying `QueryObserver` this observer manages.\n\t*/\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#observers.forEach((observer) => {\n\t\t\tobserver.destroy();\n\t\t});\n\t}\n\t/**\n\t* Replaces the set of queries being observed. Existing `QueryObserver`s\n\t* are reused for queries that match an already-observed query hash;\n\t* observers for queries that are no longer present are destroyed, and new\n\t* observers are created and subscribed to for newly added queries.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setQueries([\n\t* { queryKey: ['post', 1], queryFn: fetchPost },\n\t* { queryKey: ['post', 3], queryFn: fetchPost },\n\t* ])\n\t* ```\n\t*/\n\tsetQueries(queries, options) {\n\t\tthis.#queries = queries;\n\t\tthis.#options = options;\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tconst queryHashes = queries.map((query) => this.#client.defaultQueryOptions(query).queryHash);\n\t\t\tif (new Set(queryHashes).size !== queryHashes.length) console.warn(\"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.\");\n\t\t}\n\t\tnotifyManager.batch(() => {\n\t\t\tconst prevObservers = this.#observers;\n\t\t\tconst newObserverMatches = this.#findMatchingObservers(this.#queries);\n\t\t\tnewObserverMatches.forEach((match) => match.observer.setOptions(match.defaultedQueryOptions));\n\t\t\tconst newObservers = newObserverMatches.map((match) => match.observer);\n\t\t\tconst newResult = newObservers.map((observer) => observer.getCurrentResult());\n\t\t\tconst hasLengthChange = prevObservers.length !== newObservers.length;\n\t\t\tconst hasIndexChange = newObservers.some((observer, index) => observer !== prevObservers[index]);\n\t\t\tconst hasStructuralChange = hasLengthChange || hasIndexChange;\n\t\t\tconst hasResultChange = hasStructuralChange ? true : newResult.some((result, index) => {\n\t\t\t\tconst prev = this.#result[index];\n\t\t\t\treturn !prev || !shallowEqualObjects(result, prev);\n\t\t\t});\n\t\t\tif (!hasStructuralChange && !hasResultChange) return;\n\t\t\tif (hasStructuralChange) {\n\t\t\t\tthis.#observerMatches = newObserverMatches;\n\t\t\t\tthis.#observers = newObservers;\n\t\t\t}\n\t\t\tthis.#result = newResult;\n\t\t\tif (!this.hasListeners()) return;\n\t\t\tif (hasStructuralChange) {\n\t\t\t\tdifference(prevObservers, newObservers).forEach((observer) => {\n\t\t\t\t\tobserver.destroy();\n\t\t\t\t});\n\t\t\t\tdifference(newObservers, prevObservers).forEach((observer) => {\n\t\t\t\t\tobserver.subscribe((result) => {\n\t\t\t\t\t\tthis.#onUpdate(observer, result);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.#notify();\n\t\t});\n\t}\n\t/**\n\t* Returns the most recently computed array of `QueryObserverResult`s, one\n\t* per observed query, in the same order as the queries passed to the\n\t* constructor or `setQueries`.\n\t*\n\t* @example\n\t* ```ts\n\t* const results = observer.getCurrentResult()\n\t* const data = results.map((result) => result.data)\n\t* ```\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#result;\n\t}\n\t/**\n\t* Returns the underlying `Query` instances currently being observed, in\n\t* the same order as the queries passed to the constructor or `setQueries`.\n\t*/\n\tgetQueries() {\n\t\treturn this.#observers.map((observer) => observer.getCurrentQuery());\n\t}\n\t/**\n\t* Returns the underlying `QueryObserver` instances this observer manages,\n\t* in the same order as the queries passed to the constructor or\n\t* `setQueries`.\n\t*/\n\tgetObservers() {\n\t\treturn this.#observers;\n\t}\n\t/**\n\t* The `QueriesObserver` counterpart of {@link QueryObserver#getOptimisticResult} — computes\n\t* the result for the given (already-defaulted) queries right now, synchronously. Called by\n\t* framework adapters (e.g. `useQueries`) ahead of subscribing, returning a tuple of the raw\n\t* per-query results, a function to compute the combined result from them, and a function to\n\t* wrap the results for property-access tracking.\n\t*/\n\tgetOptimisticResult(queries, combine) {\n\t\tconst matches = this.#findMatchingObservers(queries);\n\t\tconst result = matches.map((match) => match.observer.getOptimisticResult(match.defaultedQueryOptions));\n\t\tconst queryHashes = matches.map((match) => match.defaultedQueryOptions.queryHash);\n\t\treturn [\n\t\t\tresult,\n\t\t\t(r) => {\n\t\t\t\treturn this.#combineResult(r ?? result, combine, queryHashes);\n\t\t\t},\n\t\t\t() => {\n\t\t\t\treturn this.#trackResult(result, matches);\n\t\t\t}\n\t\t];\n\t}\n\t#trackResult(result, matches) {\n\t\tconst trackedProps = /* @__PURE__ */ new Set();\n\t\treturn matches.map((match, index) => {\n\t\t\tconst observerResult = result[index];\n\t\t\treturn !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {\n\t\t\t\tif (!trackedProps.has(accessedProp)) {\n\t\t\t\t\ttrackedProps.add(accessedProp);\n\t\t\t\t\tmatches.forEach((m) => {\n\t\t\t\t\t\tm.observer.trackProp(accessedProp);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}) : observerResult;\n\t\t});\n\t}\n\t#combineResult(input, combine, queryHashes) {\n\t\tif (combine) {\n\t\t\tconst lastHashes = this.#lastQueryHashes;\n\t\t\tconst queryHashesChanged = queryHashes !== void 0 && lastHashes !== void 0 && (lastHashes.length !== queryHashes.length || queryHashes.some((hash, i) => hash !== lastHashes[i]));\n\t\t\tif (this.#result !== this.#lastResult || queryHashesChanged || combine !== this.#lastCombine) {\n\t\t\t\tthis.#lastCombine = combine;\n\t\t\t\tthis.#lastResult = this.#result;\n\t\t\t\tif (queryHashes !== void 0) this.#lastQueryHashes = queryHashes;\n\t\t\t\tthis.#combinedResult = replaceEqualDeep(this.#combinedResult, combine(input));\n\t\t\t}\n\t\t\treturn this.#combinedResult;\n\t\t}\n\t\treturn input;\n\t}\n\t#shouldSkipCombine() {\n\t\treturn !this.#options?.combine || this.#observers.some((observer, index) => {\n\t\t\treturn observer.options.suspense && this.#result[index]?.data === void 0;\n\t\t});\n\t}\n\t#findMatchingObservers(queries) {\n\t\tconst prevObserversMap = /* @__PURE__ */ new Map();\n\t\tthis.#observers.forEach((observer) => {\n\t\t\tconst key = observer.options.queryHash;\n\t\t\tif (!key) return;\n\t\t\tconst previousObservers = prevObserversMap.get(key);\n\t\t\tif (previousObservers) previousObservers.push(observer);\n\t\t\telse prevObserversMap.set(key, [observer]);\n\t\t});\n\t\tconst observers = [];\n\t\tqueries.forEach((options) => {\n\t\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\t\tconst observer = prevObserversMap.get(defaultedOptions.queryHash)?.shift() ?? new QueryObserver(this.#client, defaultedOptions);\n\t\t\tobservers.push({\n\t\t\t\tdefaultedQueryOptions: defaultedOptions,\n\t\t\t\tobserver\n\t\t\t});\n\t\t});\n\t\treturn observers;\n\t}\n\t#onUpdate(observer, result) {\n\t\tconst index = this.#observers.indexOf(observer);\n\t\tif (index !== -1) {\n\t\t\tthis.#result = this.#result.slice();\n\t\t\tthis.#result[index] = result;\n\t\t\tthis.#notify();\n\t\t}\n\t}\n\t#notify() {\n\t\tif (this.hasListeners()) {\n\t\t\tconst shouldSkipCombine = this.#shouldSkipCombine();\n\t\t\tconst previousResult = this.#combinedResult;\n\t\t\tconst newResult = shouldSkipCombine ? previousResult : this.#combineResult(this.#trackResult(this.#result, this.#observerMatches), this.#options?.combine);\n\t\t\tif (shouldSkipCombine || previousResult !== newResult) notifyManager.batch(() => {\n\t\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\t\tlistener(this.#result);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n};\n//#endregion\nexport { QueriesObserver };\n\n//# sourceMappingURL=queriesObserver.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { QueriesObserver, QueryObserver, noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useQueries.ts\n/**\n* The `useQueries` hook can be used to fetch a variable number of queries.\n*\n* The `queries` key accepts an array with query option objects mostly identical to `useQuery` — the top-level\n* `subscribed` option isn't accepted per query (see `placeholderData` below for another difference). A custom\n* `QueryClient` is supplied once, as `useQueries`' own top-level second argument, rather than per query.\n*\n* Having the same query key more than once in the array of query objects may cause some data to be shared\n* between queries. To avoid this, consider de-duplicating the queries and map the results back to the desired\n* structure.\n*\n* The `combine` option can be used to combine the results of the queries into a single value. The result will\n* be structurally shared to be as referentially stable as possible.\n*\n* @remarks The `combine` function only re-runs if it changed referentially, or if any of the query results\n* changed. An inlined `combine` function, as shown in the example below, therefore runs on every render — wrap\n* it in `useCallback`, or extract it to a stable function reference if it doesn't have any dependencies, to\n* avoid that.\n*\n* Unlike `useQuery`, `useQueries` cannot infer the `data` argument of an _inline_ `select` from its sibling\n* `queryFn`. Because `useQueries` infers the type of the whole `queries` array at once, the `select` parameter\n* of a query object written inline cannot be contextually typed from that same object's `queryFn`, so it falls\n* back to `unknown` — a [known TypeScript limitation](https://github.com/TanStack/query/issues/6556). Annotate\n* the `select` parameter explicitly, or define the query with {@link queryOptions}, which resolves its types in\n* a single object _before_ it reaches `useQueries`, to work around this — see the example below. The same\n* limitation applies to {@link useSuspenseQueries}.\n*\n* `placeholderData` is supported here too, but unlike `useQuery`, it doesn't receive information from\n* previously rendered queries, because the number of queries can differ between renders.\n* @param queryClient - Use this to provide a custom `QueryClient`. Otherwise, the one from the nearest context\n* will be used.\n* @returns The combined result. Without `combine`, this is an array with all the query results, in the same\n* order as the input. When `combine` is provided, this is the value returned by `combine` instead.\n*\n* @example\n* ```tsx\n* import { useQueries } from '@tanstack/react-query'\n*\n* function Posts({ ids }: { ids: Array<number> }) {\n* const postQueries = useQueries({\n* queries: ids.map((id) => ({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* staleTime: Infinity,\n* })),\n* })\n*\n* return (\n* <ul>\n* {postQueries.map((query, index) => {\n* if (query.isPending) return <li key={ids[index]}>Loading...</li>\n* if (query.isError) return <li key={ids[index]}>Error: {query.error.message}</li>\n* return <li key={ids[index]}>{query.data.title}</li>\n* })}\n* </ul>\n* )\n* }\n* ```\n*\n* @example\n* Combining results into a single value:\n* ```tsx\n* import { useQueries } from '@tanstack/react-query'\n*\n* function Posts({ ids }: { ids: Array<number> }) {\n* const { data, isPending, isError } = useQueries({\n* queries: ids.map((id) => ({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* })),\n* combine: (postQueries) => {\n* return {\n* data: postQueries.map((query) => query.data),\n* isPending: postQueries.some((query) => query.isPending),\n* isError: postQueries.some((query) => query.isError),\n* }\n* },\n* })\n*\n* if (isPending) return 'Loading...'\n* if (isError) return 'Error loading posts'\n*\n* return (\n* <ul>\n* {data.map((post) => (\n* <li key={post?.id}>{post?.title}</li>\n* ))}\n* </ul>\n* )\n* }\n* ```\n*\n* @example\n* Typing `select` via {@link queryOptions}. Note that spreading a `queryOptions` result and overriding\n* `select` inline still falls back to `unknown` — wrap the spread in `queryOptions` again so the override is\n* resolved before it reaches `useQueries`:\n* ```tsx\n* import { queryOptions, useQueries } from '@tanstack/react-query'\n*\n* const postOptions = (id: number) =>\n* queryOptions({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* })\n*\n* function PostTitle({ id }: { id: number }) {\n* const [{ data: broken }] = useQueries({\n* queries: [\n* {\n* ...postOptions(id),\n* // ❌ `data` is `unknown` here\n* select: (data) => data.title,\n* },\n* ],\n* })\n*\n* const [{ data: fixed }] = useQueries({\n* queries: [\n* queryOptions({\n* ...postOptions(id),\n* // ✅ `data` is `Post`\n* select: (data) => data.title,\n* }),\n* ],\n* })\n*\n* return <h1>{fixed}</h1>\n* }\n* ```\n*/\nfunction useQueries({ queries, ...options }, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst subscribed = options.subscribed !== false;\n\tconst defaultedQueries = React.useMemo(() => queries.map((opts) => {\n\t\tconst defaultedOptions = client.defaultQueryOptions(opts);\n\t\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\t\treturn defaultedOptions;\n\t}), [\n\t\tqueries,\n\t\tclient,\n\t\tisRestoring,\n\t\tsubscribed\n\t]);\n\tdefaultedQueries.forEach((queryOptions) => {\n\t\tensureSuspenseTimers(queryOptions);\n\t\tconst query = client.getQueryCache().get(queryOptions.queryHash);\n\t\tensurePreventErrorBoundaryRetry(queryOptions, errorResetBoundary, query);\n\t});\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new QueriesObserver(client, defaultedQueries, options));\n\tconst [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries, options.combine);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setQueries(defaultedQueries, options);\n\t}, [\n\t\tdefaultedQueries,\n\t\toptions,\n\t\tobserver\n\t]);\n\tconst suspensePromises = optimisticResult.some((result, index) => shouldSuspend(defaultedQueries[index], result)) ? optimisticResult.flatMap((result, index) => {\n\t\tconst opts = defaultedQueries[index];\n\t\tif (opts && shouldSuspend(opts, result)) {\n\t\t\tconst queryObserver = new QueryObserver(client, opts);\n\t\t\treturn fetchOptimistic(opts, queryObserver, errorResetBoundary);\n\t\t}\n\t\treturn [];\n\t}) : [];\n\tif (suspensePromises.length > 0) throw Promise.all(suspensePromises);\n\tconst firstSingleResultWhichShouldThrow = optimisticResult.find((result, index) => {\n\t\tconst query = defaultedQueries[index];\n\t\treturn query && getHasError({\n\t\t\tresult,\n\t\t\terrorResetBoundary,\n\t\t\tthrowOnError: query.throwOnError,\n\t\t\tquery: client.getQueryCache().get(query.queryHash),\n\t\t\tsuspense: query.suspense\n\t\t});\n\t});\n\tif (firstSingleResultWhichShouldThrow) throw firstSingleResultWhichShouldThrow.error;\n\treturn getCombinedResult(trackResult());\n}\n//#endregion\nexport { useQueries };\n\n//# sourceMappingURL=useQueries.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\n/**\n* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.\n* `useMutation` is the hook for that.\n*\n* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look\n* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).\n* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second\n* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared\n* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks\n* fire only for the latest call you've made, and only while the component is still mounted — unmounting before\n* the mutation settles removes the subscription and prevents them from firing.\n*\n* @example\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <button\n* onClick={() =>\n* addMutation.mutate('Item', {\n* onError: (error) => console.error('Failed to add item:', error),\n* })\n* }\n* >\n* Add\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* Rendering the mutation's own state, rather than just firing it off:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <div>\n* {addMutation.isPending ? (\n* 'Adding todo...'\n* ) : (\n* <>\n* {addMutation.isError ? (\n* <div>An error occurred: {addMutation.error.message}</div>\n* ) : null}\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* </>\n* )}\n* </div>\n* )\n* }\n* ```\n*\n* @example\n* Optimistic update via `onMutate`, rolling back on `onError`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onMutate: async (newTodo) => {\n* await queryClient.cancelQueries({ queryKey: ['todos'] })\n* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])\n*\n* queryClient.setQueryData<Array<string>>(['todos'], (old) => [\n* ...(old ?? []),\n* newTodo,\n* ])\n*\n* // Passed to `onError` as `onMutateResult` if the mutation fails.\n* return { previousTodos }\n* },\n* onError: (_err, _newTodo, onMutateResult) => {\n* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)\n* },\n* onSettled: () => {\n* queryClient.invalidateQueries({ queryKey: ['todos'] })\n* },\n* })\n*\n* return (\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* )\n* }\n* ```\n*\n* @example\n* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a\n* promise per call instead, so you can wait for all of them when they succeed:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* try {\n* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))\n* } catch (error) {\n* console.error('Failed to add todos:', error)\n* }\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* If some of the mutations above can fail independently of the others, and you want to know which ones\n* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for\n* `Promise.allSettled`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* const addResults = await Promise.allSettled(\n* todos.map((todo) => addMutation.mutateAsync(todo)),\n* )\n*\n* addResults.forEach((addResult, index) => {\n* if (addResult.status === 'rejected') {\n* console.error(`Failed to add \"${todos[index]}\":`, addResult.reason)\n* }\n* })\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*/\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n","import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n React.useCallback(() => selector(api.getInitialState()), [api, selector])\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n","const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst v8StackLineRe = /^at (?:new |async )?(.+?) \\(/;\nconst geckoStackLineRe = /^([^@]+)@/;\nfunction findCallerName(stack) {\n var _a, _b, _c;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return ((_b = v8StackLineRe.exec(callerLine)) == null ? void 0 : _b[1]) || ((_c = geckoStackLineRe.exec(callerLine)) == null ? void 0 : _c[1]);\n}\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n ++hydrationVersion;\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n","const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.5\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10],"mappings":";;;;;AASA,IAAIwB,oBAA8B,IAAI,IAAI,GACtCC,oBAA0B,IAAI,QAAQ,GACtCC,IAAS,GACTC;AAIJ,SAASC,EAAU,GAAM;CAKvB,OAJKC,IACDJ,EAAQ,IAAII,CAAI,IAAUJ,EAAQ,IAAII,CAAI,KAC9C,KAAU,GACVJ,EAAQ,IAAII,GAAMH,EAAO,SAAS,CAAC,GAC5BD,EAAQ,IAAII,CAAI,KAJL;AAKpB;AACA,SAASC,EAAY,GAAS;CAC5B,OAAO,OAAO,KAAKC,CAAO,CAAC,CAAC,KAAK,CAAC,CAAC,QAChC,MAAQA,EAAQC,OAAS,KAAK,CACjC,CAAC,CAAC,KAAK,MACE,GAAGA,EAAI,GAAGA,MAAQ,SAASJ,EAAUG,EAAQ,IAAI,IAAIA,EAAQC,IACrE,CAAC,CAAC,SAAS;AACd;AACA,SAASC,EAAe,GAAS;CAC/B,IAAMC,IAAKJ,EAAYC,CAAO,GAC1BI,IAAWX,EAAY,IAAIU,CAAE;CACjC,IAAI,CAACC,GAAU;EACb,IAAMC,oBAA2B,IAAI,IAAI,GACrCC,GACEC,IAAW,IAAI,sBAAsB,MAAY;GACrD,EAAQ,SAAS,MAAU;IAEzB,IAAMC,IAASC,EAAM,kBAAkBH,EAAW,MAAM,MAAcG,EAAM,qBAAqBC,CAAS;IAI1G,AAHIV,EAAQ,mBAA0BS,EAAM,cAAc,WACxD,EAAM,YAAYD,IAEpB,CAAC,GAASH,EAAS,IAAII,EAAM,MAAM,KAAkB,CAAC,CAAC,CAAC,CAAC,SAAS,MAAa;KAC7E,EAASD,GAAQC,CAAK;IACxB,CAAC;GACH,CAAC;EACH,GAAGT,CAAO;EAOV,AANA,IAAaO,EAAS,eAAe,MA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AAW,OAAcpC,EAAEiC,CAAI,GAC/B,IAAIH,IAAS,GACb;OACA;MACF,KAAK,GACH,OAAO1O,EAAO,KAAK,EAAE;KACzB;KAOA,IALIyO,KAAa,MACf,IAAqB,KAAGE,GACxB,MAGEH,EAAWf,IACb,IAAQe,EAAWf;UAEnB,IAAIA,MAAMiB,GACR,IAAQE,IAAIA,EAAE,OAAO,CAAC;UAEtB,OAAO;KAWX,AARA5O,EAAO,KAAKxC,CAAK,GAGjB,EAAW,OAAcoR,IAAIpR,EAAM,OAAO,CAAC,GAC3C,KAEA,IAAIA,GAEAiR,KAAa,MACf,IAAqB,KAAGE,GACxB;IAGJ;GACF;EACF;EACE,OAAOhC;CACT,EAAA,CAAG;CAEH,AAAI,OAAO,UAAW,cAAc,OAAO,MACzC,OAAO,WAAY;EAAE,OAAOA;CAAU,CAAC,IACvB0C,MAAW,UAAeA,KAAU,OACpD,EAAO,UAAU1C,IACR,OAAO,UAAY,OAAe,WAAW,QACtD,QAAQ,OAAO,YAAY,CAAC,CAAC,CAAC,CAC7B,QAAQ,YAAY,WAAY;EAC/B,OAAOA;CACT,CAAC"}
|
|
1
|
+
{"version":3,"file":"vendor-Bpaolt6h.js","names":["React2","React","React","__commonJSMin","getDefaultState","ensureSuspenseTimers","ensurePreventErrorBoundaryRetry","fetchOptimistic","useIsRestoring","useClearResetErrorBoundary","getHasError","useQueryErrorResetBoundary","replaceEqualDeep","useQueryClient","QueryObserver","noop","Subscribable","shallowEqualObjects","shouldSuspend","hashKey","shouldThrowError","notifyManager","React3","React","observerMap","RootIds","rootId","unsupportedValue","getRootId","root","optionsToId","options","key","createObserver","id","instance","elements","thresholds","observer","inView","entry","threshold","observe","fallbackInView","bounds","element","callback","callbacks","unobserved","useInsertionEffect","useSyncEffect","supportsRefCleanup","version2","canUseRefCleanup","useIntersectionObserverRef","onIntersectionChangeRef","onIntersectionChange","observerStateRef","setRef","observerState","cleanup","skip","destroyObserver","previousInView","stopObserving","triggerOnce","rootMargin","scrollMargin","trackVisibility","delay","useIsomorphicLayoutEffect","useInView","lastInViewRef","initialInView","state","setState","observerRef","onChange","refState","node","result","MutationObserver","#client","client","#updateResult","prevOptions","#currentMutation","#notify","action","#currentResult","#mutateOptions","variables","onMutateResult","context","difference","excludeSet","array2","array1","x","QueriesObserver","#options","#queries","#observers","#result","queries","#onUpdate","queryHashes","query","prevObservers","newObserverMatches","#findMatchingObservers","match","newObservers","newResult","hasLengthChange","hasIndexChange","index","hasStructuralChange","hasResultChange","prev","#observerMatches","matches","#combineResult","r","combine","#trackResult","trackedProps","observerResult","accessedProp","lastHashes","#lastQueryHashes","queryHashesChanged","hash","i","#lastResult","#lastCombine","#combinedResult","input","prevObserversMap","previousObservers","observers","defaultedOptions","shouldSkipCombine","#shouldSkipCombine","previousResult","useQueries","queryClient","isRestoring","errorResetBoundary","subscribed","defaultedQueries","opts","queryOptions","optimisticResult","getCombinedResult","trackResult","shouldSubscribe","onStoreChange","suspensePromises","queryObserver","firstSingleResultWhichShouldThrow","useMutation","mutate","args","createStoreImpl","listeners","nextState","partial","previousState","replace","listener","getState","api","initialState","createState","createStore","identity","arg","useStore","slice","selector","shouldDispatchFromDevtools","trackedConnections","getTrackedConnectionState","name","api2","extractConnectionInformation","store","extensionConnector","existingConnection","newConnection","removeStoreFromTrackedConnections","connectionInfo","v8StackLineRe","geckoStackLineRe","findCallerName","stack","traceLines","apiSetStateLineIndex","traceLine","callerLine","devtools","devtoolsOptions","enabled","fn","set","get","connectionInformation","isRecording","nameOrAction","anonymousActionType","connection","setStateFromDevtools","a","originalIsRecording","store2","originalDispatch","message","parseJsonThen","stateFromDevtools","lastComputedState","nextLiftedState","parsed","stringified","subscribeWithSelector","origSubscribe","optListener","equalityFn","currentSlice","nextSlice","previousSlice","createJSONStorage","storage","getStorage","parse","str2","str","newValue","toThenable","onFulfilled","onRejected","persist","currentState","persistedState","baseOptions","hasHydrated","hydrationVersion","hydrationListeners","finishHydrationListeners","config","setItem","savedSetState","configResult","stateFromStorage","hydrate","currentVersion","cb","postRehydrationCallback","deserializedStorageValue","migration","migrated","migratedState","migrationResult","e","newOptions","isIterable","obj","hasIterableEntries","value","compareEntries","mapA","valueA","mapB","valueB","compareIterables","iteratorA","iteratorB","nextA","nextB","shallow","useShallow","next","require_lz_string","LZString","f","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","res","compressed","uncompressed","buf","TotalLen","current_value","c","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","ii","bitsPerChar","getCharFromInt","dictionary","enlargeIn","dictSize","numBits","w","bits","resb","maxpower","power","data","getNextValue","resetValue","length","module"],"sources":["../../../node_modules/react-intersection-observer/dist/index.mjs","../../../node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/@tanstack/query-core/build/modern/queriesObserver.js","../../../node_modules/@tanstack/react-query/build/modern/useQueries.js","../../../node_modules/@tanstack/react-query/build/modern/useMutation.js","../../../node_modules/zustand/esm/vanilla.mjs","../../../node_modules/zustand/esm/react.mjs","../../../node_modules/zustand/esm/middleware.mjs","../../../node_modules/zustand/esm/vanilla/shallow.mjs","../../../node_modules/zustand/esm/react/shallow.mjs","../../../node_modules/lz-string/libs/lz-string.js"],"sourcesContent":["\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root) return \"0\";\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n const id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n [...(_a = elements.get(entry.target)) != null ? _a : []].forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n const callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n let unobserved = false;\n return function unobserve() {\n if (unobserved) return;\n unobserved = true;\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"lastInView\");\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n this.lastInView = this.props.initialInView;\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n const previousInView = this.lastInView;\n this.lastInView = inView;\n if (previousInView === void 0 && !inView) {\n return;\n }\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n this.lastInView = props.initialInView;\n }\n componentDidMount() {\n this.unobserve();\n this.observeNode();\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.scrollMargin !== this.props.scrollMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.triggerOnce !== this.props.triggerOnce || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n }\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n if (this.lastInView === void 0) {\n this.lastInView = this.props.initialInView;\n }\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n scrollMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React3 from \"react\";\n\n// src/useIntersectionObserverRef.ts\nimport * as React2 from \"react\";\nvar useInsertionEffect = Reflect.get(React2, \"useInsertionEffect\");\nvar useSyncEffect = useInsertionEffect != null ? useInsertionEffect : React2.useEffect;\nfunction supportsRefCleanup(version2) {\n return (version2 == null ? void 0 : version2.startsWith(\"19.\")) || false;\n}\nvar canUseRefCleanup = supportsRefCleanup(React2.version);\nfunction useIntersectionObserverRef(onIntersectionChange, {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n}) {\n const onIntersectionChangeRef = React2.useRef(onIntersectionChange);\n const observerStateRef = React2.useRef({\n node: null,\n stop: void 0,\n owner: null\n });\n if (!useInsertionEffect) {\n onIntersectionChangeRef.current = onIntersectionChange;\n }\n useSyncEffect(() => {\n onIntersectionChangeRef.current = onIntersectionChange;\n }, [onIntersectionChange]);\n return React2.useCallback(\n function setRef(element) {\n const observerState = observerStateRef.current;\n if (!element && observerState.owner !== setRef) {\n return;\n }\n if (element === observerState.node) {\n observerState.owner = setRef;\n return canUseRefCleanup ? observerState.stop : void 0;\n }\n const cleanup = observerState.stop;\n observerState.stop = void 0;\n cleanup == null ? void 0 : cleanup();\n if (!element || skip) {\n observerState.node = null;\n observerState.owner = element ? setRef : null;\n return;\n }\n observerState.node = element;\n observerState.owner = setRef;\n let destroyObserver;\n let previousInView;\n function stopObserving() {\n destroyObserver == null ? void 0 : destroyObserver();\n if (observerState.stop === stopObserving) {\n observerState.node = null;\n observerState.stop = void 0;\n }\n }\n observerState.stop = stopObserving;\n destroyObserver = observe(\n element,\n (inView, entry) => {\n onIntersectionChangeRef.current(\n inView,\n entry,\n previousInView\n );\n previousInView = inView;\n if (triggerOnce && inView) stopObserving();\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay\n },\n fallbackInView\n );\n if (observerState.stop !== stopObserving) destroyObserver();\n return canUseRefCleanup ? observerState.stop : void 0;\n },\n [\n Array.isArray(threshold) ? threshold.toString() : threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n ]\n );\n}\n\n// src/useInView.tsx\nvar useIsomorphicLayoutEffect = typeof window === \"undefined\" ? React3.useEffect : React3.useLayoutEffect;\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n scrollMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n const lastInViewRef = React3.useRef(initialInView);\n const [state, setState] = React3.useState({\n inView: !!initialInView,\n entry: void 0\n });\n const observerRef = useIntersectionObserverRef(\n (inView, entry) => {\n const previousInView = lastInViewRef.current;\n lastInViewRef.current = inView;\n if (previousInView === void 0 && !inView) {\n return;\n }\n setState({ inView, entry });\n onChange == null ? void 0 : onChange(inView, entry);\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n fallbackInView,\n skip,\n triggerOnce\n }\n );\n const refState = React3.useRef({\n node: null,\n reset: false\n });\n const setRef = React3.useCallback(\n function setRef2(node) {\n if (node) {\n refState.current.node = node;\n refState.current.reset = false;\n } else if (refState.current.node) {\n refState.current.node = null;\n refState.current.reset = true;\n }\n const cleanup = observerRef(node);\n if (!cleanup) return;\n return () => {\n cleanup();\n if (refState.current.node === node) {\n refState.current.node = null;\n refState.current.reset = true;\n }\n };\n },\n [observerRef]\n );\n useIsomorphicLayoutEffect(() => {\n if (!refState.current.reset) return;\n refState.current.reset = false;\n if (triggerOnce || skip) return;\n setState({ inView: !!initialInView, entry: void 0 });\n lastInViewRef.current = initialInView;\n });\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\n// src/useOnInView.tsx\nvar useOnInView = (onIntersectionChange, {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n triggerOnce,\n skip\n} = {}) => {\n return useIntersectionObserverRef(\n (inView, entry, previousInView) => {\n if (previousInView === void 0 && !inView) {\n return;\n }\n onIntersectionChange(inView, entry);\n },\n {\n threshold,\n root,\n rootMargin,\n scrollMargin,\n trackVisibility,\n delay,\n triggerOnce,\n skip\n }\n );\n};\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView,\n useOnInView\n};\n//# sourceMappingURL=index.mjs.map","import { hashKey, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { getDefaultState } from \"./mutation.js\";\n//#region src/mutationObserver.ts\n/**\n* Observes a single mutation and derives a `MutationObserverResult` from it.\n* A framework hook like `useMutation` creates one `MutationObserver` per hook\n* call, keeps it stable across re-renders, calls `setOptions` when the options\n* passed to the hook change, subscribes to it to re-render on updates, and\n* reads `getCurrentResult()` for the value to return. Calling `mutate()`\n* builds a new underlying `Mutation` in the `MutationCache` and executes it.\n*\n* @example\n* ```ts\n* const observer = new MutationObserver(queryClient, {\n* mutationFn: (variables: { title: string }) => addPost(variables),\n* })\n* ```\n*/\nvar MutationObserver = class extends Subscribable {\n\t#client;\n\t#currentResult = void 0;\n\t#currentMutation;\n\t#mutateOptions;\n\tconstructor(client, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.setOptions(options);\n\t\tthis.bindMethods();\n\t\tthis.#updateResult();\n\t}\n\tbindMethods() {\n\t\tthis.mutate = this.mutate.bind(this);\n\t\tthis.reset = this.reset.bind(this);\n\t}\n\t/**\n\t* Updates the observer's options.\n\t*\n\t* If the new `mutationKey` differs from the previous one (and both were\n\t* defined), the observer is reset, detaching it from the mutation it was\n\t* observing. Otherwise, if the currently observed mutation is still\n\t* `pending`, its options are updated in place as well.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setOptions({\n\t* mutationFn: (variables: { title: string }) => addPost(variables),\n\t* onSuccess: (data) => console.log(data),\n\t* })\n\t* ```\n\t*/\n\tsetOptions(options) {\n\t\tconst prevOptions = this.options;\n\t\tthis.options = this.#client.defaultMutationOptions(options);\n\t\tif (!shallowEqualObjects(this.options, prevOptions)) this.#client.getMutationCache().notify({\n\t\t\ttype: \"observerOptionsUpdated\",\n\t\t\tmutation: this.#currentMutation,\n\t\t\tobserver: this\n\t\t});\n\t\tif (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) this.reset();\n\t\telse if (this.#currentMutation?.state.status === \"pending\") this.#currentMutation.setOptions(this.options);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1 && this.#currentMutation) {\n\t\t\tthis.#currentMutation.addObserver(this);\n\t\t\tthis.#updateResult();\n\t\t}\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.hasListeners()) this.#currentMutation?.removeObserver(this);\n\t}\n\t/** @internal */\n\tonMutationUpdate(action) {\n\t\tthis.#updateResult();\n\t\tthis.#notify(action);\n\t}\n\t/**\n\t* Returns the observer's current result, derived from the observed\n\t* mutation's state (or the default, `idle` state if no mutation has been\n\t* built yet, e.g. before the first `mutate()` call or after `reset()`).\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#currentResult;\n\t}\n\t/**\n\t* Detaches the observer from the mutation it is currently observing (if\n\t* any) and resets the observed result back to its default, `idle` state.\n\t*\n\t* This does not cancel an in-flight mutation; the mutation itself keeps\n\t* running to completion and its own callbacks still fire, but this\n\t* observer stops reflecting its state and a subsequent `mutate()` call\n\t* will build a brand new mutation.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.reset()\n\t* ```\n\t*\n\t* @see {@link MutationObserver#mutate}\n\t*/\n\treset() {\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = void 0;\n\t\tthis.#updateResult();\n\t\tthis.#notify();\n\t}\n\t/**\n\t* Builds a new `Mutation` in the `MutationCache` using the observer's\n\t* current options, detaches this observer from any previously observed\n\t* mutation, attaches it to the new one, and executes it with the given\n\t* variables.\n\t*\n\t* The optional per-call `options` (`onSuccess`/`onError`/`onSettled`) are\n\t* invoked once the mutation settles, in addition to any callbacks defined\n\t* on the observer's own options.\n\t*\n\t* @example\n\t* ```ts\n\t* await observer.mutate(\n\t* { title: 'New post' },\n\t* { onSuccess: (data) => console.log(data) },\n\t* )\n\t* ```\n\t*/\n\tmutate(variables, options) {\n\t\tthis.#mutateOptions = options;\n\t\tthis.#currentMutation?.removeObserver(this);\n\t\tthis.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n\t\tthis.#currentMutation.addObserver(this);\n\t\treturn this.#currentMutation.execute(variables);\n\t}\n\t#updateResult() {\n\t\tconst state = this.#currentMutation?.state ?? getDefaultState();\n\t\tthis.#currentResult = {\n\t\t\t...state,\n\t\t\tisPending: state.status === \"pending\",\n\t\t\tisSuccess: state.status === \"success\",\n\t\t\tisError: state.status === \"error\",\n\t\t\tisIdle: state.status === \"idle\",\n\t\t\tmutate: this.mutate,\n\t\t\treset: this.reset\n\t\t};\n\t}\n\t#notify(action) {\n\t\tnotifyManager.batch(() => {\n\t\t\tif (this.#mutateOptions && this.hasListeners()) {\n\t\t\t\tconst variables = this.#currentResult.variables;\n\t\t\t\tconst onMutateResult = this.#currentResult.context;\n\t\t\t\tconst context = {\n\t\t\t\t\tclient: this.#client,\n\t\t\t\t\tmeta: this.options.meta,\n\t\t\t\t\tmutationKey: this.options.mutationKey\n\t\t\t\t};\n\t\t\t\tif (action?.type === \"success\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSuccess?.(action.data, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(action.data, null, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t} else if (action?.type === \"error\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onError?.(action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.#mutateOptions.onSettled?.(void 0, action.error, variables, onMutateResult, context);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tPromise.reject(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\tlistener(this.#currentResult);\n\t\t\t});\n\t\t});\n\t}\n};\n//#endregion\nexport { MutationObserver };\n\n//# sourceMappingURL=mutationObserver.js.map","import { replaceEqualDeep, shallowEqualObjects } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { QueryObserver } from \"./queryObserver.js\";\n//#region src/queriesObserver.ts\nfunction difference(array1, array2) {\n\tconst excludeSet = new Set(array2);\n\treturn array1.filter((x) => !excludeSet.has(x));\n}\n/**\n* A `QueriesObserver` watches an array of queries at once, exposing them as\n* a single array of `QueryObserverResult`s (or, when a `combine` option is\n* given, as a combined value derived from that array). It manages one\n* internal `QueryObserver` per query, and is the primitive that framework\n* adapters (e.g. `useQueries`) build their hooks on top of.\n*\n* @example\n* ```ts\n* const observer = new QueriesObserver(queryClient, [\n* { queryKey: ['post', 1], queryFn: fetchPost },\n* { queryKey: ['post', 2], queryFn: fetchPost },\n* ])\n*\n* const unsubscribe = observer.subscribe((result) => {\n* console.log(result)\n* })\n* ```\n*/\nvar QueriesObserver = class extends Subscribable {\n\t#client;\n\t#result;\n\t#queries;\n\t#options;\n\t#observers;\n\t#combinedResult;\n\t#lastCombine;\n\t#lastResult;\n\t#lastQueryHashes;\n\t#observerMatches = [];\n\tconstructor(client, queries, options) {\n\t\tsuper();\n\t\tthis.#client = client;\n\t\tthis.#options = options;\n\t\tthis.#queries = [];\n\t\tthis.#observers = [];\n\t\tthis.#result = [];\n\t\tthis.setQueries(queries);\n\t}\n\tonSubscribe() {\n\t\tif (this.listeners.size === 1) this.#observers.forEach((observer) => {\n\t\t\tobserver.subscribe((result) => {\n\t\t\t\tthis.#onUpdate(observer, result);\n\t\t\t});\n\t\t});\n\t}\n\tonUnsubscribe() {\n\t\tif (!this.listeners.size) this.destroy();\n\t}\n\t/**\n\t* Stops observing all queries: clears all listeners and destroys every\n\t* underlying `QueryObserver` this observer manages.\n\t*/\n\tdestroy() {\n\t\tthis.listeners = /* @__PURE__ */ new Set();\n\t\tthis.#observers.forEach((observer) => {\n\t\t\tobserver.destroy();\n\t\t});\n\t}\n\t/**\n\t* Replaces the set of queries being observed. Existing `QueryObserver`s\n\t* are reused for queries that match an already-observed query hash;\n\t* observers for queries that are no longer present are destroyed, and new\n\t* observers are created and subscribed to for newly added queries.\n\t*\n\t* @example\n\t* ```ts\n\t* observer.setQueries([\n\t* { queryKey: ['post', 1], queryFn: fetchPost },\n\t* { queryKey: ['post', 3], queryFn: fetchPost },\n\t* ])\n\t* ```\n\t*/\n\tsetQueries(queries, options) {\n\t\tthis.#queries = queries;\n\t\tthis.#options = options;\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tconst queryHashes = queries.map((query) => this.#client.defaultQueryOptions(query).queryHash);\n\t\t\tif (new Set(queryHashes).size !== queryHashes.length) console.warn(\"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.\");\n\t\t}\n\t\tnotifyManager.batch(() => {\n\t\t\tconst prevObservers = this.#observers;\n\t\t\tconst newObserverMatches = this.#findMatchingObservers(this.#queries);\n\t\t\tnewObserverMatches.forEach((match) => match.observer.setOptions(match.defaultedQueryOptions));\n\t\t\tconst newObservers = newObserverMatches.map((match) => match.observer);\n\t\t\tconst newResult = newObservers.map((observer) => observer.getCurrentResult());\n\t\t\tconst hasLengthChange = prevObservers.length !== newObservers.length;\n\t\t\tconst hasIndexChange = newObservers.some((observer, index) => observer !== prevObservers[index]);\n\t\t\tconst hasStructuralChange = hasLengthChange || hasIndexChange;\n\t\t\tconst hasResultChange = hasStructuralChange ? true : newResult.some((result, index) => {\n\t\t\t\tconst prev = this.#result[index];\n\t\t\t\treturn !prev || !shallowEqualObjects(result, prev);\n\t\t\t});\n\t\t\tif (!hasStructuralChange && !hasResultChange) return;\n\t\t\tif (hasStructuralChange) {\n\t\t\t\tthis.#observerMatches = newObserverMatches;\n\t\t\t\tthis.#observers = newObservers;\n\t\t\t}\n\t\t\tthis.#result = newResult;\n\t\t\tif (!this.hasListeners()) return;\n\t\t\tif (hasStructuralChange) {\n\t\t\t\tdifference(prevObservers, newObservers).forEach((observer) => {\n\t\t\t\t\tobserver.destroy();\n\t\t\t\t});\n\t\t\t\tdifference(newObservers, prevObservers).forEach((observer) => {\n\t\t\t\t\tobserver.subscribe((result) => {\n\t\t\t\t\t\tthis.#onUpdate(observer, result);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.#notify();\n\t\t});\n\t}\n\t/**\n\t* Returns the most recently computed array of `QueryObserverResult`s, one\n\t* per observed query, in the same order as the queries passed to the\n\t* constructor or `setQueries`.\n\t*\n\t* @example\n\t* ```ts\n\t* const results = observer.getCurrentResult()\n\t* const data = results.map((result) => result.data)\n\t* ```\n\t*/\n\tgetCurrentResult() {\n\t\treturn this.#result;\n\t}\n\t/**\n\t* Returns the underlying `Query` instances currently being observed, in\n\t* the same order as the queries passed to the constructor or `setQueries`.\n\t*/\n\tgetQueries() {\n\t\treturn this.#observers.map((observer) => observer.getCurrentQuery());\n\t}\n\t/**\n\t* Returns the underlying `QueryObserver` instances this observer manages,\n\t* in the same order as the queries passed to the constructor or\n\t* `setQueries`.\n\t*/\n\tgetObservers() {\n\t\treturn this.#observers;\n\t}\n\t/**\n\t* The `QueriesObserver` counterpart of {@link QueryObserver#getOptimisticResult} — computes\n\t* the result for the given (already-defaulted) queries right now, synchronously. Called by\n\t* framework adapters (e.g. `useQueries`) ahead of subscribing, returning a tuple of the raw\n\t* per-query results, a function to compute the combined result from them, and a function to\n\t* wrap the results for property-access tracking.\n\t*/\n\tgetOptimisticResult(queries, combine) {\n\t\tconst matches = this.#findMatchingObservers(queries);\n\t\tconst result = matches.map((match) => match.observer.getOptimisticResult(match.defaultedQueryOptions));\n\t\tconst queryHashes = matches.map((match) => match.defaultedQueryOptions.queryHash);\n\t\treturn [\n\t\t\tresult,\n\t\t\t(r) => {\n\t\t\t\treturn this.#combineResult(r ?? result, combine, queryHashes);\n\t\t\t},\n\t\t\t() => {\n\t\t\t\treturn this.#trackResult(result, matches);\n\t\t\t}\n\t\t];\n\t}\n\t#trackResult(result, matches) {\n\t\tconst trackedProps = /* @__PURE__ */ new Set();\n\t\treturn matches.map((match, index) => {\n\t\t\tconst observerResult = result[index];\n\t\t\treturn !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {\n\t\t\t\tif (!trackedProps.has(accessedProp)) {\n\t\t\t\t\ttrackedProps.add(accessedProp);\n\t\t\t\t\tmatches.forEach((m) => {\n\t\t\t\t\t\tm.observer.trackProp(accessedProp);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}) : observerResult;\n\t\t});\n\t}\n\t#combineResult(input, combine, queryHashes) {\n\t\tif (combine) {\n\t\t\tconst lastHashes = this.#lastQueryHashes;\n\t\t\tconst queryHashesChanged = queryHashes !== void 0 && lastHashes !== void 0 && (lastHashes.length !== queryHashes.length || queryHashes.some((hash, i) => hash !== lastHashes[i]));\n\t\t\tif (this.#result !== this.#lastResult || queryHashesChanged || combine !== this.#lastCombine) {\n\t\t\t\tthis.#lastCombine = combine;\n\t\t\t\tthis.#lastResult = this.#result;\n\t\t\t\tif (queryHashes !== void 0) this.#lastQueryHashes = queryHashes;\n\t\t\t\tthis.#combinedResult = replaceEqualDeep(this.#combinedResult, combine(input));\n\t\t\t}\n\t\t\treturn this.#combinedResult;\n\t\t}\n\t\treturn input;\n\t}\n\t#shouldSkipCombine() {\n\t\treturn !this.#options?.combine || this.#observers.some((observer, index) => {\n\t\t\treturn observer.options.suspense && this.#result[index]?.data === void 0;\n\t\t});\n\t}\n\t#findMatchingObservers(queries) {\n\t\tconst prevObserversMap = /* @__PURE__ */ new Map();\n\t\tthis.#observers.forEach((observer) => {\n\t\t\tconst key = observer.options.queryHash;\n\t\t\tif (!key) return;\n\t\t\tconst previousObservers = prevObserversMap.get(key);\n\t\t\tif (previousObservers) previousObservers.push(observer);\n\t\t\telse prevObserversMap.set(key, [observer]);\n\t\t});\n\t\tconst observers = [];\n\t\tqueries.forEach((options) => {\n\t\t\tconst defaultedOptions = this.#client.defaultQueryOptions(options);\n\t\t\tconst observer = prevObserversMap.get(defaultedOptions.queryHash)?.shift() ?? new QueryObserver(this.#client, defaultedOptions);\n\t\t\tobservers.push({\n\t\t\t\tdefaultedQueryOptions: defaultedOptions,\n\t\t\t\tobserver\n\t\t\t});\n\t\t});\n\t\treturn observers;\n\t}\n\t#onUpdate(observer, result) {\n\t\tconst index = this.#observers.indexOf(observer);\n\t\tif (index !== -1) {\n\t\t\tthis.#result = this.#result.slice();\n\t\t\tthis.#result[index] = result;\n\t\t\tthis.#notify();\n\t\t}\n\t}\n\t#notify() {\n\t\tif (this.hasListeners()) {\n\t\t\tconst shouldSkipCombine = this.#shouldSkipCombine();\n\t\t\tconst previousResult = this.#combinedResult;\n\t\t\tconst newResult = shouldSkipCombine ? previousResult : this.#combineResult(this.#trackResult(this.#result, this.#observerMatches), this.#options?.combine);\n\t\t\tif (shouldSkipCombine || previousResult !== newResult) notifyManager.batch(() => {\n\t\t\t\tthis.listeners.forEach((listener) => {\n\t\t\t\t\tlistener(this.#result);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n};\n//#endregion\nexport { QueriesObserver };\n\n//# sourceMappingURL=queriesObserver.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { useIsRestoring } from \"./IsRestoringProvider.js\";\nimport { useQueryErrorResetBoundary } from \"./QueryErrorResetBoundary.js\";\nimport { ensurePreventErrorBoundaryRetry, getHasError, useClearResetErrorBoundary } from \"./errorBoundaryUtils.js\";\nimport { ensureSuspenseTimers, fetchOptimistic, shouldSuspend } from \"./suspense.js\";\nimport * as React from \"react\";\nimport { QueriesObserver, QueryObserver, noop, notifyManager } from \"@tanstack/query-core\";\n//#region src/useQueries.ts\n/**\n* The `useQueries` hook can be used to fetch a variable number of queries.\n*\n* The `queries` key accepts an array with query option objects mostly identical to `useQuery` — the top-level\n* `subscribed` option isn't accepted per query (see `placeholderData` below for another difference). A custom\n* `QueryClient` is supplied once, as `useQueries`' own top-level second argument, rather than per query.\n*\n* Having the same query key more than once in the array of query objects may cause some data to be shared\n* between queries. To avoid this, consider de-duplicating the queries and map the results back to the desired\n* structure.\n*\n* The `combine` option can be used to combine the results of the queries into a single value. The result will\n* be structurally shared to be as referentially stable as possible.\n*\n* @remarks The `combine` function only re-runs if it changed referentially, or if any of the query results\n* changed. An inlined `combine` function, as shown in the example below, therefore runs on every render — wrap\n* it in `useCallback`, or extract it to a stable function reference if it doesn't have any dependencies, to\n* avoid that.\n*\n* Unlike `useQuery`, `useQueries` cannot infer the `data` argument of an _inline_ `select` from its sibling\n* `queryFn`. Because `useQueries` infers the type of the whole `queries` array at once, the `select` parameter\n* of a query object written inline cannot be contextually typed from that same object's `queryFn`, so it falls\n* back to `unknown` — a [known TypeScript limitation](https://github.com/TanStack/query/issues/6556). Annotate\n* the `select` parameter explicitly, or define the query with {@link queryOptions}, which resolves its types in\n* a single object _before_ it reaches `useQueries`, to work around this — see the example below. The same\n* limitation applies to {@link useSuspenseQueries}.\n*\n* `placeholderData` is supported here too, but unlike `useQuery`, it doesn't receive information from\n* previously rendered queries, because the number of queries can differ between renders.\n* @param queryClient - Use this to provide a custom `QueryClient`. Otherwise, the one from the nearest context\n* will be used.\n* @returns The combined result. Without `combine`, this is an array with all the query results, in the same\n* order as the input. When `combine` is provided, this is the value returned by `combine` instead.\n*\n* @example\n* ```tsx\n* import { useQueries } from '@tanstack/react-query'\n*\n* function Posts({ ids }: { ids: Array<number> }) {\n* const postQueries = useQueries({\n* queries: ids.map((id) => ({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* staleTime: Infinity,\n* })),\n* })\n*\n* return (\n* <ul>\n* {postQueries.map((query, index) => {\n* if (query.isPending) return <li key={ids[index]}>Loading...</li>\n* if (query.isError) return <li key={ids[index]}>Error: {query.error.message}</li>\n* return <li key={ids[index]}>{query.data.title}</li>\n* })}\n* </ul>\n* )\n* }\n* ```\n*\n* @example\n* Combining results into a single value:\n* ```tsx\n* import { useQueries } from '@tanstack/react-query'\n*\n* function Posts({ ids }: { ids: Array<number> }) {\n* const { data, isPending, isError } = useQueries({\n* queries: ids.map((id) => ({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* })),\n* combine: (postQueries) => {\n* return {\n* data: postQueries.map((query) => query.data),\n* isPending: postQueries.some((query) => query.isPending),\n* isError: postQueries.some((query) => query.isError),\n* }\n* },\n* })\n*\n* if (isPending) return 'Loading...'\n* if (isError) return 'Error loading posts'\n*\n* return (\n* <ul>\n* {data.map((post) => (\n* <li key={post?.id}>{post?.title}</li>\n* ))}\n* </ul>\n* )\n* }\n* ```\n*\n* @example\n* Typing `select` via {@link queryOptions}. Note that spreading a `queryOptions` result and overriding\n* `select` inline still falls back to `unknown` — wrap the spread in `queryOptions` again so the override is\n* resolved before it reaches `useQueries`:\n* ```tsx\n* import { queryOptions, useQueries } from '@tanstack/react-query'\n*\n* const postOptions = (id: number) =>\n* queryOptions({\n* queryKey: ['post', id],\n* queryFn: () => fetchPost(id),\n* })\n*\n* function PostTitle({ id }: { id: number }) {\n* const [{ data: broken }] = useQueries({\n* queries: [\n* {\n* ...postOptions(id),\n* // ❌ `data` is `unknown` here\n* select: (data) => data.title,\n* },\n* ],\n* })\n*\n* const [{ data: fixed }] = useQueries({\n* queries: [\n* queryOptions({\n* ...postOptions(id),\n* // ✅ `data` is `Post`\n* select: (data) => data.title,\n* }),\n* ],\n* })\n*\n* return <h1>{fixed}</h1>\n* }\n* ```\n*/\nfunction useQueries({ queries, ...options }, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst isRestoring = useIsRestoring();\n\tconst errorResetBoundary = useQueryErrorResetBoundary();\n\tconst subscribed = options.subscribed !== false;\n\tconst defaultedQueries = React.useMemo(() => queries.map((opts) => {\n\t\tconst defaultedOptions = client.defaultQueryOptions(opts);\n\t\tdefaultedOptions._optimisticResults = isRestoring ? \"isRestoring\" : subscribed ? \"optimistic\" : void 0;\n\t\treturn defaultedOptions;\n\t}), [\n\t\tqueries,\n\t\tclient,\n\t\tisRestoring,\n\t\tsubscribed\n\t]);\n\tdefaultedQueries.forEach((queryOptions) => {\n\t\tensureSuspenseTimers(queryOptions);\n\t\tconst query = client.getQueryCache().get(queryOptions.queryHash);\n\t\tensurePreventErrorBoundaryRetry(queryOptions, errorResetBoundary, query);\n\t});\n\tuseClearResetErrorBoundary(errorResetBoundary);\n\tconst [observer] = React.useState(() => new QueriesObserver(client, defaultedQueries, options));\n\tconst [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries, options.combine);\n\tconst shouldSubscribe = !isRestoring && subscribed;\n\tReact.useSyncExternalStore(React.useCallback((onStoreChange) => shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tReact.useEffect(() => {\n\t\tobserver.setQueries(defaultedQueries, options);\n\t}, [\n\t\tdefaultedQueries,\n\t\toptions,\n\t\tobserver\n\t]);\n\tconst suspensePromises = optimisticResult.some((result, index) => shouldSuspend(defaultedQueries[index], result)) ? optimisticResult.flatMap((result, index) => {\n\t\tconst opts = defaultedQueries[index];\n\t\tif (opts && shouldSuspend(opts, result)) {\n\t\t\tconst queryObserver = new QueryObserver(client, opts);\n\t\t\treturn fetchOptimistic(opts, queryObserver, errorResetBoundary);\n\t\t}\n\t\treturn [];\n\t}) : [];\n\tif (suspensePromises.length > 0) throw Promise.all(suspensePromises);\n\tconst firstSingleResultWhichShouldThrow = optimisticResult.find((result, index) => {\n\t\tconst query = defaultedQueries[index];\n\t\treturn query && getHasError({\n\t\t\tresult,\n\t\t\terrorResetBoundary,\n\t\t\tthrowOnError: query.throwOnError,\n\t\t\tquery: client.getQueryCache().get(query.queryHash),\n\t\t\tsuspense: query.suspense\n\t\t});\n\t});\n\tif (firstSingleResultWhichShouldThrow) throw firstSingleResultWhichShouldThrow.error;\n\treturn getCombinedResult(trackResult());\n}\n//#endregion\nexport { useQueries };\n\n//# sourceMappingURL=useQueries.js.map","\"use client\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport * as React from \"react\";\nimport { MutationObserver, noop, notifyManager, shouldThrowError } from \"@tanstack/query-core\";\n//#region src/useMutation.ts\n/**\n* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.\n* `useMutation` is the hook for that.\n*\n* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look\n* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).\n* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.\n* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will\n* be used.\n* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second\n* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared\n* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks\n* fire only for the latest call you've made, and only while the component is still mounted — unmounting before\n* the mutation settles removes the subscription and prevents them from firing.\n*\n* @example\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <button\n* onClick={() =>\n* addMutation.mutate('Item', {\n* onError: (error) => console.error('Failed to add item:', error),\n* })\n* }\n* >\n* Add\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* Rendering the mutation's own state, rather than just firing it off:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* return (\n* <div>\n* {addMutation.isPending ? (\n* 'Adding todo...'\n* ) : (\n* <>\n* {addMutation.isError ? (\n* <div>An error occurred: {addMutation.error.message}</div>\n* ) : null}\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* </>\n* )}\n* </div>\n* )\n* }\n* ```\n*\n* @example\n* Optimistic update via `onMutate`, rolling back on `onError`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodo() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onMutate: async (newTodo) => {\n* await queryClient.cancelQueries({ queryKey: ['todos'] })\n* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])\n*\n* queryClient.setQueryData<Array<string>>(['todos'], (old) => [\n* ...(old ?? []),\n* newTodo,\n* ])\n*\n* // Passed to `onError` as `onMutateResult` if the mutation fails.\n* return { previousTodos }\n* },\n* onError: (_err, _newTodo, onMutateResult) => {\n* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)\n* },\n* onSettled: () => {\n* queryClient.invalidateQueries({ queryKey: ['todos'] })\n* },\n* })\n*\n* return (\n* <button onClick={() => addMutation.mutate('Item')}>Add</button>\n* )\n* }\n* ```\n*\n* @example\n* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a\n* promise per call instead, so you can wait for all of them when they succeed:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* try {\n* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))\n* } catch (error) {\n* console.error('Failed to add todos:', error)\n* }\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*\n* @example\n* If some of the mutations above can fail independently of the others, and you want to know which ones\n* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for\n* `Promise.allSettled`:\n* ```tsx\n* import { useMutation, useQueryClient } from '@tanstack/react-query'\n*\n* function AddTodos() {\n* const queryClient = useQueryClient()\n*\n* const addMutation = useMutation({\n* mutationFn: addTodo,\n* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),\n* })\n*\n* async function handleAddAll(todos: Array<string>) {\n* const addResults = await Promise.allSettled(\n* todos.map((todo) => addMutation.mutateAsync(todo)),\n* )\n*\n* addResults.forEach((addResult, index) => {\n* if (addResult.status === 'rejected') {\n* console.error(`Failed to add \"${todos[index]}\":`, addResult.reason)\n* }\n* })\n* }\n*\n* return (\n* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>\n* Add all\n* </button>\n* )\n* }\n* ```\n*/\nfunction useMutation(options, queryClient) {\n\tconst client = useQueryClient(queryClient);\n\tconst [observer] = React.useState(() => new MutationObserver(client, options));\n\tReact.useEffect(() => {\n\t\tobserver.setOptions(options);\n\t}, [observer, options]);\n\tconst result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());\n\tconst mutate = React.useCallback((...args) => {\n\t\tobserver.mutate(args[0], args[1]).catch(noop);\n\t}, [observer]);\n\tif (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;\n\treturn {\n\t\t...result,\n\t\tmutate,\n\t\tmutateAsync: result.mutate\n\t};\n}\n//#endregion\nexport { useMutation };\n\n//# sourceMappingURL=useMutation.js.map","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const api = { setState, getState, getInitialState, subscribe };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);\n\nexport { createStore };\n","import React from 'react';\nimport { createStore } from 'zustand/vanilla';\n\nconst identity = (arg) => arg;\nfunction useStore(api, selector = identity) {\n const slice = React.useSyncExternalStore(\n api.subscribe,\n React.useCallback(() => selector(api.getState()), [api, selector]),\n React.useCallback(() => selector(api.getInitialState()), [api, selector])\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n const api = createStore(createState);\n const useBoundStore = (selector) => useStore(api, selector);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = ((createState) => createState ? createImpl(createState) : createImpl);\n\nexport { create, useStore };\n","const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...args) => api.dispatch(...args), ...initial };\n};\nconst redux = reduxImpl;\n\nconst shouldDispatchFromDevtools = (api) => !!api.dispatchFromDevtools && typeof api.dispatch === \"function\";\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api) return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst removeStoreFromTrackedConnections = (name, store) => {\n if (store === void 0) return;\n const connectionInfo = trackedConnections.get(name);\n if (!connectionInfo) return;\n delete connectionInfo.stores[store];\n if (Object.keys(connectionInfo.stores).length === 0) {\n trackedConnections.delete(name);\n }\n};\nconst v8StackLineRe = /^at (?:new |async )?(.+?) \\(/;\nconst geckoStackLineRe = /^([^@]+)@/;\nfunction findCallerName(stack) {\n var _a, _b, _c;\n if (!stack) return void 0;\n const traceLines = stack.split(\"\\n\");\n const apiSetStateLineIndex = traceLines.findIndex(\n (traceLine) => traceLine.includes(\"api.setState\")\n );\n if (apiSetStateLineIndex < 0) return void 0;\n const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || \"\";\n return ((_b = v8StackLineRe.exec(callerLine)) == null ? void 0 : _b[1]) || ((_c = geckoStackLineRe.exec(callerLine)) == null ? void 0 : _c[1]);\n}\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = ((state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording) return r;\n const action = nameOrAction === void 0 ? {\n type: anonymousActionType || findCallerName(new Error().stack) || \"anonymous\"\n } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n });\n api.devtools = {\n cleanup: () => {\n if (connection && typeof connection.unsubscribe === \"function\") {\n connection.unsubscribe();\n }\n removeStoreFromTrackedConnections(options.name, store);\n }\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (shouldDispatchFromDevtools(api)) {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && args[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...args);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (shouldDispatchFromDevtools(api)) {\n api.dispatch(action);\n }\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState) return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, fn) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0) fn(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = ((selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n });\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nfunction combine(initialState, create) {\n return (...args) => Object.assign({}, initialState, create(...args));\n}\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst persistImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => window.localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n let hydrationVersion = 0;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n return setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n return setItem();\n },\n get,\n api\n );\n api.getInitialState = () => configResult;\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage) return;\n const currentVersion = ++hydrationVersion;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n const migration = options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n if (migration instanceof Promise) {\n return migration.then((result) => [true, result]);\n }\n return [true, migration];\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return [false, deserializedStorageValue.state];\n }\n }\n return [false, void 0];\n }).then((migrationResult) => {\n var _a2;\n if (currentVersion !== hydrationVersion) {\n return;\n }\n const [migrated, migratedState] = migrationResult;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n if (migrated) {\n return setItem();\n }\n }).then(() => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(get(), void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n if (currentVersion !== hydrationVersion) {\n return;\n }\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n ++hydrationVersion;\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persist = persistImpl;\n\nfunction ssrSafe(config, isSSR = typeof window === \"undefined\") {\n return (set, get, api) => {\n if (!isSSR) {\n return config(set, get, api);\n }\n const ssrSet = () => {\n throw new Error(\"Cannot set state of Zustand store in SSR\");\n };\n api.setState = ssrSet;\n return config(ssrSet, get, api);\n };\n}\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector, ssrSafe as unstable_ssrSafe };\n","const isIterable = (obj) => Symbol.iterator in obj;\nconst hasIterableEntries = (value) => (\n // HACK: avoid checking entries type\n \"entries\" in value\n);\nconst compareEntries = (valueA, valueB) => {\n const mapA = valueA instanceof Map ? valueA : new Map(valueA.entries());\n const mapB = valueB instanceof Map ? valueB : new Map(valueB.entries());\n if (mapA.size !== mapB.size) {\n return false;\n }\n for (const [key, value] of mapA) {\n if (!mapB.has(key) || !Object.is(value, mapB.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst compareIterables = (valueA, valueB) => {\n const iteratorA = valueA[Symbol.iterator]();\n const iteratorB = valueB[Symbol.iterator]();\n let nextA = iteratorA.next();\n let nextB = iteratorB.next();\n while (!nextA.done && !nextB.done) {\n if (!Object.is(nextA.value, nextB.value)) {\n return false;\n }\n nextA = iteratorA.next();\n nextB = iteratorB.next();\n }\n return !!nextA.done && !!nextB.done;\n};\nfunction shallow(valueA, valueB) {\n if (Object.is(valueA, valueB)) {\n return true;\n }\n if (typeof valueA !== \"object\" || valueA === null || typeof valueB !== \"object\" || valueB === null) {\n return false;\n }\n if (Object.getPrototypeOf(valueA) !== Object.getPrototypeOf(valueB)) {\n return false;\n }\n if (isIterable(valueA) && isIterable(valueB)) {\n if (hasIterableEntries(valueA) && hasIterableEntries(valueB)) {\n return compareEntries(valueA, valueB);\n }\n return compareIterables(valueA, valueB);\n }\n return compareEntries(\n { entries: () => Object.entries(valueA) },\n { entries: () => Object.entries(valueB) }\n );\n}\n\nexport { shallow };\n","import React from 'react';\nimport { shallow } from 'zustand/vanilla/shallow';\n\nfunction useShallow(selector) {\n const prev = React.useRef(void 0);\n return (state) => {\n const next = selector(state);\n return shallow(prev.current, next) ? prev.current : prev.current = next;\n };\n}\n\nexport { useShallow };\n","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.5\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10],"mappings":";;;;;AASA,IAAIwB,oBAA8B,IAAI,IAAI,GACtCC,oBAA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QE,IAAIA,EAAE,OAAO,CAAC;UAEtB,OAAO;KAWX,AARA5O,EAAO,KAAKxC,CAAK,GAGjB,EAAW,OAAcoR,IAAIpR,EAAM,OAAO,CAAC,GAC3C,KAEA,IAAIA,GAEAiR,KAAa,MACf,IAAqB,KAAGE,GACxB;IAGJ;GACF;EACF;EACE,OAAOhC;CACT,EAAA,CAAG;CAEH,AAAI,OAAO,UAAW,cAAc,OAAO,MACzC,OAAO,WAAY;EAAE,OAAOA;CAAU,CAAC,IACvB0C,MAAW,UAAeA,KAAU,OACpD,EAAO,UAAU1C,IACR,OAAO,UAAY,OAAe,WAAW,QACtD,QAAQ,OAAO,YAAY,CAAC,CAAC,CAAC,CAC7B,QAAQ,YAAY,WAAY;EAC/B,OAAOA;CACT,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { DashboardFilter } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Find the dashboard filter the date control is bound to: the universal time
|
|
4
|
+
* filter when present, otherwise the first simple `inDateRange` filter.
|
|
5
|
+
*/
|
|
6
|
+
export declare function findDateControlFilter(filters: DashboardFilter[]): DashboardFilter | undefined;
|
|
2
7
|
export declare function useCompactFilterBar(dashboardFilters: DashboardFilter[], onDashboardFiltersChange: (filters: DashboardFilter[]) => void): {
|
|
3
8
|
localFilters: DashboardFilter[];
|
|
4
9
|
showCustomDropdown: boolean;
|
|
@@ -17,6 +17,8 @@ interface PortletCardHeaderProps {
|
|
|
17
17
|
xlsExportAvailable: boolean;
|
|
18
18
|
exportInProgress: boolean;
|
|
19
19
|
showCacheBustIndicator: boolean;
|
|
20
|
+
/** Labels of mapped dashboard date filters that cannot narrow this portlet */
|
|
21
|
+
unreachableDateFilterLabels?: string[];
|
|
20
22
|
icons: CardIcons;
|
|
21
23
|
onRefresh: (options?: {
|
|
22
24
|
bustCache?: boolean;
|