@lunora/studio 1.0.0-alpha.146 → 1.0.0-alpha.147
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/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/mount.mjs +1 -1
- package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -1
- package/dist/packem_chunks/ApiTab.mjs +1 -1
- package/dist/packem_chunks/AuditPanel.mjs +1 -1
- package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -1
- package/dist/packem_chunks/ExportImportPanel.mjs +3 -3
- package/dist/packem_chunks/FileBrowser.mjs +1 -1
- package/dist/packem_chunks/FunctionRunner.mjs +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -1
- package/dist/packem_chunks/HealthPanel.mjs +1 -1
- package/dist/packem_chunks/InsightsPanel.mjs +1 -1
- package/dist/packem_chunks/LogsPanel.mjs +1 -1
- package/dist/packem_chunks/MailPanel.mjs +1 -1
- package/dist/packem_chunks/MetricsPanel.mjs +1 -1
- package/dist/packem_chunks/NotificationsPanel.mjs +1 -1
- package/dist/packem_chunks/PitrPanel.mjs +1 -1
- package/dist/packem_chunks/SchemaViewer.mjs +1 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -1
- package/dist/packem_chunks/SettingsPanel.mjs +1 -1
- package/dist/packem_chunks/SqlEditorPanel.mjs +7 -8
- package/dist/packem_chunks/TableEditor.mjs +1 -1
- package/dist/packem_chunks/agents-panel.mjs +1 -1
- package/dist/packem_chunks/analytics-panel.mjs +1 -1
- package/dist/packem_chunks/auth-audit-panel.mjs +1 -1
- package/dist/packem_chunks/auth-config-panel.mjs +1 -1
- package/dist/packem_chunks/auth-sessions-panel.mjs +1 -1
- package/dist/packem_chunks/containers-panel.mjs +1 -1
- package/dist/packem_chunks/dashboards-panel.mjs +1 -1
- package/dist/packem_chunks/evals-panel.mjs +1 -1
- package/dist/packem_chunks/fanout-panel.mjs +1 -1
- package/dist/packem_chunks/flags-panel.mjs +1 -1
- package/dist/packem_chunks/issues-panel.mjs +1 -1
- package/dist/packem_chunks/kv-browser.mjs +1 -1
- package/dist/packem_chunks/log-drains-panel.mjs +1 -1
- package/dist/packem_chunks/migrations-route.mjs +1 -1
- package/dist/packem_chunks/organizations-panel.mjs +1 -1
- package/dist/packem_chunks/payments-panel.mjs +1 -1
- package/dist/packem_chunks/permissions-panel.mjs +1 -1
- package/dist/packem_chunks/queues-panel.mjs +1 -1
- package/dist/packem_chunks/reactors-panel.mjs +1 -1
- package/dist/packem_chunks/rls-panel.mjs +1 -1
- package/dist/packem_chunks/schedule-panel.mjs +1 -1
- package/dist/packem_chunks/storage-rules-panel.mjs +1 -1
- package/dist/packem_chunks/subscriptions-panel.mjs +1 -1
- package/dist/packem_chunks/sync-client-panel.mjs +1 -1
- package/dist/packem_chunks/traces-panel.mjs +1 -1
- package/dist/packem_chunks/users-panel.mjs +1 -1
- package/dist/packem_chunks/vector-browser.mjs +1 -1
- package/dist/packem_chunks/workflows-panel.mjs +1 -1
- package/dist/packem_shared/{ApiDocsPanel-CHCIjzZu.mjs → ApiDocsPanel-BImfQhyJ.mjs} +1 -1
- package/dist/packem_shared/{ApiReferencePanel-Cqy9Z7mO.mjs → ApiReferencePanel-B4i-KeOf.mjs} +1 -1
- package/dist/packem_shared/{CommandPalette-DtLEYVhX.mjs → CommandPalette-CSdz9zax.mjs} +1 -1
- package/dist/packem_shared/DataBrowser-Bpj-0P1G.mjs +4 -0
- package/dist/packem_shared/{GlobalDataBrowser-CDpzXZxj.mjs → GlobalDataBrowser-BTbqR6Wc.mjs} +1 -1
- package/dist/packem_shared/{HomePanel-4gpRjcch.mjs → HomePanel-_BwLI4TQ.mjs} +1 -1
- package/dist/packem_shared/{MigrationsPanel-Cz0x3Pv6.mjs → MigrationsPanel-BPWzFdxC.mjs} +1 -1
- package/dist/packem_shared/{OpenRpcReferencePanel-DZicbIOf.mjs → OpenRpcReferencePanel-BKJEX7we.mjs} +1 -1
- package/dist/packem_shared/{ScheduledJobs-BWziDVZO.mjs → ScheduledJobs-B4DPADwk.mjs} +1 -1
- package/dist/packem_shared/{Studio-C_yEjXcG.mjs → Studio-CcWQdYrV.mjs} +1 -1
- package/dist/packem_shared/{StudioApp-BQAxVB3v.mjs → StudioApp-B5jLGbeH.mjs} +1 -1
- package/dist/packem_shared/{advisor-view-DyXQCN4y.mjs → advisor-view-CPgOok_h.mjs} +1 -1
- package/dist/packem_shared/{data-grid-B8WGnT-5.mjs → data-grid-DTBAKZlm.mjs} +1 -1
- package/dist/packem_shared/{error-alert-ClpDVYvo.mjs → error-alert-tf5zvSLV.mjs} +1 -1
- package/dist/packem_shared/{grid-features-CGs2pKcr.mjs → grid-features-Dl7bCGRN.mjs} +4 -4
- package/dist/packem_shared/{home-panel-CHtt8k50.mjs → home-panel-DCUKd8Uk.mjs} +1 -1
- package/dist/packem_shared/internal-B6haJbiP.mjs +2 -0
- package/dist/packem_shared/{log-line-DpRfHaVQ.mjs → log-line-BoObzuue.mjs} +1 -1
- package/dist/packem_shared/{recording-client-CMvFFEC0.mjs → recording-client-BXUIyBL4.mjs} +1 -1
- package/dist/packem_shared/{reference-view-DS7FFPpP.mjs → reference-view-AC9FgXSz.mjs} +1 -1
- package/dist/packem_shared/{schema-diagram-C27ETi10.mjs → schema-diagram-CDj_69jF.mjs} +1 -1
- package/dist/packem_shared/{sql-result-table-BLIMecXM.mjs → sql-result-table-C5y0jwaK.mjs} +1 -1
- package/dist/packem_shared/{studio-DF0GqQBP.mjs → studio-OqNyRY1N.mjs} +1 -1
- package/dist/packem_shared/table-list-sidebar-DHG1UJC4.mjs +1 -0
- package/dist/packem_shared/{use-admin-query-BvZH4unR.mjs → use-admin-query-BKXiqLci.mjs} +1 -1
- package/dist/packem_shared/{use-async-submit-C1A11ka9.mjs → use-async-submit-BTr3w2-K.mjs} +1 -1
- package/dist/packem_shared/{use-auth-config-DocoJ5uQ.mjs → use-auth-config-BQKGdSFh.mjs} +1 -1
- package/dist/packem_shared/{use-open-trace-CTQIPjo9.mjs → use-open-trace-BCW0c9qq.mjs} +1 -1
- package/dist/packem_shared/{use-sql-assistant-BGoWYcGL.mjs → use-sql-assistant-BhIMDQHV.mjs} +1 -1
- package/dist/packem_shared/{wire-codec-BE-vgg1L.mjs → wire-codec-C0jSa3ZC.mjs} +1 -1
- package/dist/standalone/{chunk-6T3STPM7.js → chunk-2ES4GR4C.js} +1 -1
- package/dist/standalone/{chunk-HLE46T7J.js → chunk-2GPQJLCR.js} +1 -1
- package/dist/standalone/chunk-2GZVY7CX.js +1 -0
- package/dist/standalone/chunk-2LN3T5HY.js +15 -0
- package/dist/standalone/{chunk-5L3SHBMK.js → chunk-2LOBQ4CX.js} +1 -1
- package/dist/standalone/{chunk-E6LDY3TC.js → chunk-2Z5PSAHC.js} +1 -1
- package/dist/standalone/{chunk-3BFUVYWS.js → chunk-3CGQYQDZ.js} +1 -1
- package/dist/standalone/{chunk-UZ5QI3PB.js → chunk-3KDC7UYQ.js} +1 -1
- package/dist/standalone/{chunk-HQPQTWW4.js → chunk-4R6AMNIM.js} +1 -1
- package/dist/standalone/{chunk-XABVLLMA.js → chunk-4XIC6MLF.js} +1 -1
- package/dist/standalone/{chunk-RFTFYKFL.js → chunk-5EWLJXES.js} +1 -1
- package/dist/standalone/{chunk-PWHV7BUN.js → chunk-5K2UDZLN.js} +1 -1
- package/dist/standalone/{chunk-MHLBCDVW.js → chunk-5OFSVXDU.js} +1 -1
- package/dist/standalone/chunk-6DQKYWZI.js +1 -0
- package/dist/standalone/{chunk-6NO6WOSN.js → chunk-6UG4S7I7.js} +1 -1
- package/dist/standalone/chunk-7BRTPMJO.js +1 -0
- package/dist/standalone/{chunk-EDYGNYP2.js → chunk-7IY5BR52.js} +1 -1
- package/dist/standalone/{chunk-KLQEN4KA.js → chunk-A4UOWQOI.js} +1 -1
- package/dist/standalone/{chunk-5JEYBOS6.js → chunk-BOTGXX4H.js} +1 -1
- package/dist/standalone/{chunk-2KAH7DVZ.js → chunk-BVRZVNKL.js} +1 -1
- package/dist/standalone/{chunk-PEEGF7YA.js → chunk-CZY6LNTK.js} +2 -2
- package/dist/standalone/{chunk-CZU3LZ2O.js → chunk-DLT5B4TL.js} +1 -1
- package/dist/standalone/{chunk-L3JA4OKZ.js → chunk-DX6FAHR2.js} +1 -1
- package/dist/standalone/{chunk-IAWCSJRR.js → chunk-EERTS7JH.js} +1 -1
- package/dist/standalone/{chunk-SMVAE2AQ.js → chunk-EHSU2WDS.js} +1 -1
- package/dist/standalone/chunk-FIACUWE5.js +1 -0
- package/dist/standalone/{chunk-NXKPFGOP.js → chunk-FODLDLE2.js} +8 -8
- package/dist/standalone/{chunk-DDI4VSJH.js → chunk-GDB2JX2H.js} +1 -1
- package/dist/standalone/{chunk-MDVH5C5A.js → chunk-GIOZAYBS.js} +1 -1
- package/dist/standalone/{chunk-DMPVOWA7.js → chunk-GWW7SJR6.js} +1 -1
- package/dist/standalone/{chunk-IYYZMNOB.js → chunk-HR42URDR.js} +1 -1
- package/dist/standalone/{chunk-H3UCYGKY.js → chunk-HRYPE4NU.js} +1 -1
- package/dist/standalone/{chunk-E723DEAW.js → chunk-IABM4BFJ.js} +1 -1
- package/dist/standalone/{chunk-ZZENQM5W.js → chunk-INWAISDG.js} +4 -4
- package/dist/standalone/{chunk-VSHZE77Y.js → chunk-JAKYTDUH.js} +1 -1
- package/dist/standalone/chunk-JOYK6ITY.js +1 -0
- package/dist/standalone/{chunk-CIQRB2ET.js → chunk-JWPJS6AI.js} +1 -1
- package/dist/standalone/{chunk-JOQUDV7F.js → chunk-JY4ANRPG.js} +1 -1
- package/dist/standalone/{chunk-YL7OENDU.js → chunk-KCEVLJ65.js} +1 -1
- package/dist/standalone/{chunk-H5PZ7JXM.js → chunk-KJ4YYMID.js} +1 -1
- package/dist/standalone/{chunk-BQ4P3PLU.js → chunk-KQFH6FFC.js} +1 -1
- package/dist/standalone/{chunk-7B3OQXWL.js → chunk-LFDP6ANM.js} +1 -1
- package/dist/standalone/{chunk-MJG6GTPL.js → chunk-LJYUUOBB.js} +1 -1
- package/dist/standalone/{chunk-BN5TOI5O.js → chunk-LK4TLRSU.js} +1 -1
- package/dist/standalone/{chunk-AJQKSUVQ.js → chunk-MNGNHBOS.js} +1 -1
- package/dist/standalone/chunk-N74RUMRA.js +7 -0
- package/dist/standalone/{chunk-447V2Q3F.js → chunk-NZ57KZSG.js} +1 -1
- package/dist/standalone/{chunk-VXWAQW3F.js → chunk-OEVYSTUL.js} +1 -1
- package/dist/standalone/{chunk-JRN7SEJN.js → chunk-OSLV4PT6.js} +1 -1
- package/dist/standalone/chunk-PIGJKRDD.js +3 -0
- package/dist/standalone/{chunk-OUD7BAWE.js → chunk-PL664H45.js} +1 -1
- package/dist/standalone/{chunk-YWYJLVEP.js → chunk-QNSRFASE.js} +1 -1
- package/dist/standalone/{chunk-2IUHQB2Q.js → chunk-QYEQOTRN.js} +7 -8
- package/dist/standalone/{chunk-B5WPIRI3.js → chunk-R5QR5EZZ.js} +1 -1
- package/dist/standalone/{chunk-HDWOQTDN.js → chunk-RDYIEOYN.js} +1 -1
- package/dist/standalone/{chunk-GMEE5NFG.js → chunk-SLFPZM2C.js} +1 -1
- package/dist/standalone/{chunk-TWXJF4C2.js → chunk-SU737V7V.js} +1 -1
- package/dist/standalone/{chunk-EX33M5EE.js → chunk-T3VYCKM7.js} +1 -1
- package/dist/standalone/{chunk-3JV5F5SY.js → chunk-TIUMFAN2.js} +1 -1
- package/dist/standalone/{chunk-7MJY23GU.js → chunk-VGJ6HFCF.js} +1 -1
- package/dist/standalone/{chunk-JSXJND3V.js → chunk-VLCHF5SE.js} +1 -1
- package/dist/standalone/{chunk-CKKZCUAV.js → chunk-VWFNJLMK.js} +1 -1
- package/dist/standalone/{chunk-V5M356X3.js → chunk-VWXU7LIX.js} +1 -1
- package/dist/standalone/{chunk-2IRZXHAZ.js → chunk-WWXSQVPE.js} +1 -1
- package/dist/standalone/{chunk-RNZ7XXND.js → chunk-WXRI2LBR.js} +1 -1
- package/dist/standalone/{chunk-XGPF7VOP.js → chunk-XHM5CP2I.js} +1 -1
- package/dist/standalone/{chunk-IDB7SMQU.js → chunk-XVX3KH35.js} +1 -1
- package/dist/standalone/chunk-XZCNX7YU.js +11 -0
- package/dist/standalone/{chunk-VHMOFAJT.js → chunk-YCEVUCMI.js} +1 -1
- package/dist/standalone/{chunk-3DL3MLWV.js → chunk-ZLPC3XZF.js} +1 -1
- package/dist/standalone/chunk-ZTDD3M5D.js +1 -0
- package/dist/standalone/{chunk-46XX646F.js → chunk-ZYCM7BV2.js} +1 -1
- package/dist/standalone/studio.js +1 -1
- package/package.json +6 -6
- package/dist/packem_shared/DataBrowser-Bf32rBcr.mjs +0 -4
- package/dist/packem_shared/internal-D4gBuklE.mjs +0 -2
- package/dist/packem_shared/quote-identifier-CGiYFBvY.mjs +0 -1
- package/dist/packem_shared/table-list-sidebar-DKpSAP6p.mjs +0 -1
- package/dist/standalone/chunk-2L64LHIR.js +0 -1
- package/dist/standalone/chunk-3HEXTCWR.js +0 -1
- package/dist/standalone/chunk-5AUOM7FK.js +0 -1
- package/dist/standalone/chunk-FZKQX74O.js +0 -1
- package/dist/standalone/chunk-IB3MWLG4.js +0 -1
- package/dist/standalone/chunk-JMNCMGSE.js +0 -1
- package/dist/standalone/chunk-L2OWXMYF.js +0 -1
- package/dist/standalone/chunk-QPVND4TE.js +0 -3
- package/dist/standalone/chunk-RIO2HPN7.js +0 -15
- package/dist/standalone/chunk-UKQTCLDK.js +0 -7
- package/dist/standalone/chunk-W3Q32C24.js +0 -11
- /package/dist/standalone/{chunk-7AU5QSY7.js → chunk-LSWAITBZ.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{a,b as ee,d as fe,e as
|
|
1
|
+
import{a,b as ee,d as fe,e as Ne}from"./chunk-YKXDMIHQ.js";var he=ee((de,W)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof W=="object"&&W.exports?W.exports=t():e.moo=t()})(de,function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=typeof new RegExp().sticky=="boolean";function s(n){return n&&t.call(n)==="[object RegExp]"}a(s,"isRegExp");function i(n){return n&&typeof n=="object"&&!s(n)&&!Array.isArray(n)}a(i,"isObject");function l(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,function(o){return o==="-"?"\\x2d":"\\"+o})}a(l,"reEscape");function c(n){var o=new RegExp("|"+n);return o.exec("").length-1}a(c,"reGroups");function h(n){return"("+n+")"}a(h,"reCapture");function v(n){if(!n.length)return"(?!)";var o=n.map(function(u){return"(?:"+u+")"}).join("|");return"(?:"+o+")"}a(v,"reUnion");function S(n){if(typeof n=="string")return"(?:"+l(n)+")";if(s(n)){if(n.ignoreCase)throw new Error("RegExp /i flag not allowed");if(n.global)throw new Error("RegExp /g flag is implied");if(n.sticky)throw new Error("RegExp /y flag is implied");if(n.multiline)throw new Error("RegExp /m flag is implied");return n.source}else throw new Error("Not a pattern: "+n)}a(S,"regexpOrLiteral");function k(n,o){return n.length>o?n:Array(o-n.length+1).join(" ")+n}a(k,"pad");function $(n,o){for(var u=n.length,f=0;;){var g=n.lastIndexOf(`
|
|
2
2
|
`,u-1);if(g===-1||(f++,u=g,f===o)||u===0)break}var d=f<o?0:u+1;return n.substring(d).split(`
|
|
3
|
-
`)}a($,"lastNLines");function K(n){for(var o=Object.getOwnPropertyNames(n),u=[],f=0;f<o.length;f++){var g=o[f],d=n[g],y=[].concat(d);if(g==="include"){for(var w=0;w<y.length;w++)u.push({include:y[w]});continue}var m=[];y.forEach(function(p){i(p)?(m.length&&u.push(M(g,m)),u.push(M(g,p)),m=[]):m.push(p)}),m.length&&u.push(M(g,m))}return u}a(K,"objectToRules");function O(n){for(var o=[],u=0;u<n.length;u++){var f=n[u];if(f.include){for(var g=[].concat(f.include),d=0;d<g.length;d++)o.push({include:g[d]});continue}if(!f.type)throw new Error("Rule has no type: "+JSON.stringify(f));o.push(M(f.type,f))}return o}a(O,"arrayToRules");function M(n,o){if(i(o)||(o={match:o}),o.include)throw new Error("Matching rules cannot also include states");var u={defaultType:n,lineBreaks:!!o.error||!!o.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var f in o)e.call(o,f)&&(u[f]=o[f]);if(typeof u.type=="string"&&n!==u.type)throw new Error("Type transform cannot be a string (type '"+u.type+"' for token '"+n+"')");var g=u.match;return u.match=Array.isArray(g)?g:g?[g]:[],u.match.sort(function(d,y){return s(d)&&s(y)?0:s(y)?-1:s(d)?1:y.length-d.length}),u}a(M,"ruleOptions");function D(n){return Array.isArray(n)?O(n):K(n)}a(D,"toRules");var N=M("error",{lineBreaks:!0,shouldThrow:!0});function F(n,o){for(var u=null,f=Object.create(null),g=!0,d=null,y=[],w=[],m=0;m<n.length;m++)n[m].fallback&&(g=!1);for(var m=0;m<n.length;m++){var p=n[m];if(p.include)throw new Error("Inheritance is not allowed in stateless lexers");if(p.error||p.fallback){if(u)throw!p.fallback==!u.fallback?new Error("Multiple "+(p.fallback?"fallback":"error")+" rules not allowed (for token '"+p.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+p.defaultType+"')");u=p}var b=p.match.slice();if(g)for(;b.length&&typeof b[0]=="string"&&b[0].length===1;){var q=b.shift();f[q.charCodeAt(0)]=p}if(p.pop||p.push||p.next){if(!o)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+p.defaultType+"')");if(p.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+p.defaultType+"')")}if(b.length!==0){g=!1,y.push(p);for(var C=0;C<b.length;C++){var P=b[C];if(s(P)){if(d===null)d=P.unicode;else if(d!==P.unicode&&p.fallback===!1)throw new Error("If one rule is /u then all must be")}}var I=v(b.map(S)),T=new RegExp(I);if(T.test(""))throw new Error("RegExp matches empty string: "+T);var
|
|
3
|
+
`)}a($,"lastNLines");function K(n){for(var o=Object.getOwnPropertyNames(n),u=[],f=0;f<o.length;f++){var g=o[f],d=n[g],y=[].concat(d);if(g==="include"){for(var w=0;w<y.length;w++)u.push({include:y[w]});continue}var m=[];y.forEach(function(p){i(p)?(m.length&&u.push(M(g,m)),u.push(M(g,p)),m=[]):m.push(p)}),m.length&&u.push(M(g,m))}return u}a(K,"objectToRules");function O(n){for(var o=[],u=0;u<n.length;u++){var f=n[u];if(f.include){for(var g=[].concat(f.include),d=0;d<g.length;d++)o.push({include:g[d]});continue}if(!f.type)throw new Error("Rule has no type: "+JSON.stringify(f));o.push(M(f.type,f))}return o}a(O,"arrayToRules");function M(n,o){if(i(o)||(o={match:o}),o.include)throw new Error("Matching rules cannot also include states");var u={defaultType:n,lineBreaks:!!o.error||!!o.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var f in o)e.call(o,f)&&(u[f]=o[f]);if(typeof u.type=="string"&&n!==u.type)throw new Error("Type transform cannot be a string (type '"+u.type+"' for token '"+n+"')");var g=u.match;return u.match=Array.isArray(g)?g:g?[g]:[],u.match.sort(function(d,y){return s(d)&&s(y)?0:s(y)?-1:s(d)?1:y.length-d.length}),u}a(M,"ruleOptions");function D(n){return Array.isArray(n)?O(n):K(n)}a(D,"toRules");var N=M("error",{lineBreaks:!0,shouldThrow:!0});function F(n,o){for(var u=null,f=Object.create(null),g=!0,d=null,y=[],w=[],m=0;m<n.length;m++)n[m].fallback&&(g=!1);for(var m=0;m<n.length;m++){var p=n[m];if(p.include)throw new Error("Inheritance is not allowed in stateless lexers");if(p.error||p.fallback){if(u)throw!p.fallback==!u.fallback?new Error("Multiple "+(p.fallback?"fallback":"error")+" rules not allowed (for token '"+p.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+p.defaultType+"')");u=p}var b=p.match.slice();if(g)for(;b.length&&typeof b[0]=="string"&&b[0].length===1;){var q=b.shift();f[q.charCodeAt(0)]=p}if(p.pop||p.push||p.next){if(!o)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+p.defaultType+"')");if(p.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+p.defaultType+"')")}if(b.length!==0){g=!1,y.push(p);for(var C=0;C<b.length;C++){var P=b[C];if(s(P)){if(d===null)d=P.unicode;else if(d!==P.unicode&&p.fallback===!1)throw new Error("If one rule is /u then all must be")}}var I=v(b.map(S)),T=new RegExp(I);if(T.test(""))throw new Error("RegExp matches empty string: "+T);var L=c(I);if(L>0)throw new Error("RegExp has capture groups: "+T+`
|
|
4
4
|
Use (?: \u2026 ) instead`);if(!p.lineBreaks&&T.test(`
|
|
5
|
-
`))throw new Error("Rule should declare lineBreaks: "+T);w.push(h(I))}}var R=u&&u.fallback,
|
|
6
|
-
`)f=1;else for(;g.exec(o);)f++,d=g.lastIndex}var y={type:typeof n.type=="function"&&n.type(o)||n.defaultType,value:typeof n.value=="function"?n.value(o):o,text:o,toString:
|
|
5
|
+
`))throw new Error("Rule should declare lineBreaks: "+T);w.push(h(I))}}var R=u&&u.fallback,U=r&&!R?"ym":"gm",H=r||R?"":"|";d===!0&&(U+="u");var Pe=new RegExp(v(w)+H,U);return{regexp:Pe,groups:y,fast:f,error:u||N}}a(F,"compileRules");function Q(n){var o=F(D(n));return new _({start:o},"start")}a(Q,"compile");function ue(n,o,u){var f=n&&(n.push||n.next);if(f&&!u[f])throw new Error("Missing state '"+f+"' (in token '"+n.defaultType+"' of state '"+o+"')");if(n&&n.pop&&+n.pop!=1)throw new Error("pop must be 1 (in token '"+n.defaultType+"' of state '"+o+"')")}a(ue,"checkStateGroup");function Be(n,o){var u=n.$all?D(n.$all):[];delete n.$all;var f=Object.getOwnPropertyNames(n);o||(o=f[0]);for(var g=Object.create(null),d=0;d<f.length;d++){var y=f[d];g[y]=D(n[y]).concat(u)}for(var d=0;d<f.length;d++)for(var y=f[d],w=g[y],m=Object.create(null),p=0;p<w.length;p++){var b=w[p];if(b.include){var q=[p,1];if(b.include!==y&&!m[b.include]){m[b.include]=!0;var C=g[b.include];if(!C)throw new Error("Cannot include nonexistent state '"+b.include+"' (in state '"+y+"')");for(var P=0;P<C.length;P++){var I=C[P];w.indexOf(I)===-1&&q.push(I)}}w.splice.apply(w,q),p--}}for(var T=Object.create(null),d=0;d<f.length;d++){var y=f[d];T[y]=F(g[y],!0)}for(var d=0;d<f.length;d++){for(var L=f[d],R=T[L],U=R.groups,p=0;p<U.length;p++)ue(U[p],L,T);for(var H=Object.getOwnPropertyNames(R.fast),p=0;p<H.length;p++)ue(R.fast[H[p]],L,T)}return new _(T,o)}a(Be,"compileStates");function De(n){for(var o=typeof Map<"u",u=o?new Map:Object.create(null),f=Object.getOwnPropertyNames(n),g=0;g<f.length;g++){var d=f[g],y=n[d],w=Array.isArray(y)?y:[y];w.forEach(function(m){if(typeof m!="string")throw new Error("keyword must be string (in keyword '"+d+"')");o?u.set(m,d):u[m]=d})}return function(m){return o?u.get(m):u[m]}}a(De,"keywordTransform");var _=a(function(n,o){this.startState=o,this.states=n,this.buffer="",this.stack=[],this.reset()},"Lexer");_.prototype.reset=function(n,o){return this.buffer=n||"",this.index=0,this.line=o?o.line:1,this.col=o?o.col:1,this.queuedToken=o?o.queuedToken:null,this.queuedText=o?o.queuedText:"",this.queuedThrow=o?o.queuedThrow:null,this.setState(o?o.state:this.startState),this.stack=o&&o.stack?o.stack.slice():[],this},_.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},_.prototype.setState=function(n){if(!(!n||this.state===n)){this.state=n;var o=this.states[n];this.groups=o.groups,this.error=o.error,this.re=o.regexp,this.fast=o.fast}},_.prototype.popState=function(){this.setState(this.stack.pop())},_.prototype.pushState=function(n){this.stack.push(this.state),this.setState(n)};var qe=r?function(n,o){return n.exec(o)}:function(n,o){var u=n.exec(o);return u[0].length===0?null:u};_.prototype._getGroup=function(n){for(var o=this.groups.length,u=0;u<o;u++)if(n[u+1]!==void 0)return this.groups[u];throw new Error("Cannot find token type for matched text")};function Ce(){return this.value}if(a(Ce,"tokenToString"),_.prototype.next=function(){var n=this.index;if(this.queuedGroup){var o=this._token(this.queuedGroup,this.queuedText,n);return this.queuedGroup=null,this.queuedText="",o}var u=this.buffer;if(n!==u.length){var y=this.fast[u.charCodeAt(n)];if(y)return this._token(y,u.charAt(n),n);var f=this.re;f.lastIndex=n;var g=qe(f,u),d=this.error;if(g==null)return this._token(d,u.slice(n,u.length),n);var y=this._getGroup(g),w=g[0];return d.fallback&&g.index!==n?(this.queuedGroup=y,this.queuedText=w,this._token(d,u.slice(n,g.index),n)):this._token(y,w,n)}},_.prototype._token=function(n,o,u){var f=0;if(n.lineBreaks){var g=/\n/g,d=1;if(o===`
|
|
6
|
+
`)f=1;else for(;g.exec(o);)f++,d=g.lastIndex}var y={type:typeof n.type=="function"&&n.type(o)||n.defaultType,value:typeof n.value=="function"?n.value(o):o,text:o,toString:Ce,offset:u,lineBreaks:f,line:this.line,col:this.col},w=o.length;if(this.index+=w,this.line+=f,f!==0?this.col=w-d+1:this.col+=w,n.shouldThrow){var m=new Error(this.formatError(y,"invalid syntax"));throw m}return n.pop?this.popState():n.push?this.pushState(n.push):n.next&&this.setState(n.next),y},typeof Symbol<"u"&&Symbol.iterator){var X=a(function(n){this.lexer=n},"LexerIterator");X.prototype.next=function(){var n=this.lexer.next();return{value:n,done:!n}},X.prototype[Symbol.iterator]=function(){return this},_.prototype[Symbol.iterator]=function(){return new X(this)}}return _.prototype.formatError=function(n,o){if(n==null)var u=this.buffer.slice(this.index),n={text:u,offset:this.index,lineBreaks:u.indexOf(`
|
|
7
7
|
`)===-1?0:1,line:this.line,col:this.col};var f=2,g=Math.max(n.line-f,1),d=n.line+f,y=String(d).length,w=$(this.buffer,this.line-n.line+f+1).slice(0,5),m=[];m.push(o+" at line "+n.line+" col "+n.col+":"),m.push("");for(var p=0;p<w.length;p++){var b=w[p],q=g+p;m.push(k(String(q),y)+" "+b),q===n.line&&m.push(k("",y+n.col+1)+"^")}return m.join(`
|
|
8
|
-
`)},_.prototype.clone=function(){return new _(this.states,this.state)},_.prototype.has=function(n){return!0},{compile:Q,states:Me,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:Be}})});var pe=ee(A=>{"use strict";var Ne=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:!0});A.lexer=A.states=void 0;var Fe=Ne(he());A.states={body:{doubleapos:{match:"''",value:a(()=>"'","value")},quoted:{lineBreaks:!0,match:/'[{}#](?:[^']|'')*'(?!')/u,value:a(e=>e.slice(1,-1).replace(/''/g,"'"),"value")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:a(e=>e.substring(1).trim(),"value")},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:a(e=>e.split(",")[1].trim(),"value")},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:a(e=>e.split(",")[1].trim(),"value")},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:a(e=>e.substring(1).trim(),"value")},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:a(e=>e.split(":")[1].trim(),"value")},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:a(e=>e.substring(0,e.indexOf("{")).trim(),"value")},end:{match:/\s*\}/u,pop:1}}};A.lexer=Fe.default.states(A.states)});var me=ee(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.ParseError=void 0;z.parse=Ue;var ye=pe(),j=a(e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),"getContext"),te=a(e=>e==="plural"||e==="select"||e==="selectordinal","isSelectType");function Ie(e,r){let t="",s="";for(let l of r){let c=l.ctx.text;switch(s+=c,l.type){case"content":t+=l.value;break;case"argument":case"function":case"octothorpe":t+=c;break;default:throw new x(e,`Unsupported part in strict mode function arg style: ${c}`)}}return[{type:"content",value:t.trim(),ctx:Object.assign({},r[0].ctx,{text:s})}]}a(Ie,"strictArgStyleParam");var Re=["number","date","time","spellout","ordinal","duration"],ge=["zero","one","two","few","many","other"],x=class extends Error{static{a(this,"ParseError")}constructor(r,t){super(ye.lexer.formatError(r,t))}};z.ParseError=x;var re=class{static{a(this,"Parser")}constructor(r,t){var s,i,l,c;this.lexer=ye.lexer.reset(r),this.cardinalKeys=(s=t?.cardinal)!==null&&s!==void 0?s:ge,this.ordinalKeys=(i=t?.ordinal)!==null&&i!==void 0?i:ge,this.strict=(l=t?.strict)!==null&&l!==void 0?l:!1,this.strictPluralKeys=(c=t?.strictPluralKeys)!==null&&c!==void 0?c:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(r,t,s){if(s[0]==="="){if(t==="select")throw new x(r,`The case ${s} is not valid with select`)}else if(t!=="select"){let i=t==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&i.length>0&&!i.includes(s)){let l=`The ${t} case ${s} is not valid in this locale`;throw new x(r,l)}}}parseSelect({value:r},t,s,i){let l={type:i,arg:r,cases:[],ctx:s};i==="plural"||i==="selectordinal"?t=!0:this.strict&&(t=!1);for(let c of this.lexer)switch(c.type){case"offset":if(i==="select")throw new x(c,"Unexpected plural offset for select");if(l.cases.length>0)throw new x(c,"Plural offset must be set before cases");l.pluralOffset=Number(c.value),s.text+=c.text,s.lineBreaks+=c.lineBreaks;break;case"case":{this.checkSelectKey(c,i,c.value),l.cases.push({key:c.value,tokens:this.parseBody(t),ctx:j(c)});break}case"end":return l;default:throw new x(c,`Unexpected lexer token: ${c.type}`)}throw new x(null,"Unexpected message end")}parseArgToken(r,t){let s=j(r),i=this.lexer.next();if(!i)throw new x(null,"Unexpected message end");if(s.text+=i.text,s.lineBreaks+=i.lineBreaks,this.strict&&(i.type==="func-simple"||i.type==="func-args")&&!Re.includes(i.value)){let l=`Invalid strict mode function arg type: ${i.value}`;throw new x(r,l)}switch(i.type){case"end":return{type:"argument",arg:r.value,ctx:s};case"func-simple":{let l=this.lexer.next();if(!l)throw new x(null,"Unexpected message end");if(l.type!=="end")throw new x(l,`Unexpected lexer token: ${l.type}`);if(s.text+=l.text,te(i.value.toLowerCase()))throw new x(i,`Invalid type identifier: ${i.value}`);return{type:"function",arg:r.value,key:i.value,ctx:s}}case"func-args":{if(te(i.value.toLowerCase())){let c=`Invalid type identifier: ${i.value}`;throw new x(i,c)}let l=this.parseBody(this.strict?!1:t);return this.strict&&l.length>0&&(l=Ie(r,l)),{type:"function",arg:r.value,key:i.value,param:l,ctx:s}}case"select":if(te(i.value))return this.parseSelect(r,t,s,i.value);throw new x(i,`Unexpected select type ${i.value}`);default:throw new x(i,`Unexpected lexer token: ${i.type}`)}}parseBody(r,t){let s=[],i=null;for(let l of this.lexer)if(l.type==="argument")i&&(i=null),s.push(this.parseArgToken(l,r));else if(l.type==="octothorpe"&&r)i&&(i=null),s.push({type:"octothorpe",ctx:j(l)});else{if(l.type==="end"&&!t)return s;{let c=l.value;if(!r&&l.type==="quoted"&&c[0]==="#"){if(c.includes("{")){let h=`Unsupported escape pattern: ${c}`;throw new x(l,h)}c=l.text}i?(i.value+=c,i.ctx.text+=l.text,i.ctx.lineBreaks+=l.lineBreaks):(i={type:"content",value:c,ctx:j(l)},s.push(i))}}if(t)return s;throw new x(null,"Unexpected message end")}};function Ue(e,r={}){return new re(e,r).parse()}a(Ue,"parse")});var xe=fe(me(),1);var E=class extends Error{static{a(this,"DateFormatError")}constructor(r,t,s){super(r),this.token=t,this.type=s||"error"}},ve=a(e=>e<4?"short":e===4?"long":"narrow","alpha"),G=a(e=>e%2===0?"2-digit":"numeric","numeric");function Le(e,r){switch(e.char){case"y":return{year:G(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return r(`${e.desc} is not supported; falling back to year:numeric`,E.WARNING),{year:"numeric"}}}a(Le,"yearOptions");function ze(e,r){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:r(`${e.desc} is not supported with width ${e.width}`);return}}a(ze,"monthStyle");function Ge(e,r){let{char:t,desc:s,width:i}=e;if(t==="d")return G(i);r(`${s} is not supported`)}a(Ge,"dayStyle");function Ke(e,r){let{char:t,desc:s,width:i}=e;if((t==="c"||t==="e")&&i<3){let l=`Numeric value is not supported for ${s}; falling back to weekday:short`;r(l,E.WARNING)}return ve(i)}a(Ke,"weekdayStyle");function He(e){let r=G(e.width),t;switch(e.char){case"h":t="h12";break;case"H":t="h23";break;case"k":t="h24";break;case"K":t="h11";break}return t?{hour:r,hourCycle:t}:{hour:r}}a(He,"hourOptions");function We(e,r){let{char:t,desc:s,width:i}=e;switch(t){case"v":case"z":return i===4?"long":"short";case"V":if(i===4)return"long";r(`${s} is not supported with width ${i}`);return;case"X":r(`${s} is not supported`);return}return"short"}a(We,"timeZoneNameStyle");function je(e,r){switch(e.field){case"era":return{era:ve(e.width)};case"year":return Le(e,r);case"month":return{month:ze(e,r)};case"day":return{day:Ge(e,r)};case"weekday":return{weekday:Ke(e,r)};case"period":return;case"hour":return He(e);case"min":return{minute:G(e.width)};case"sec":return{second:G(e.width)};case"tz":return{timeZoneName:We(e,r)};case"quarter":case"week":case"sec-frac":case"ms":r(`${e.desc} is not supported`)}}a(je,"compileOptions");function ne(e,r,t=s=>{throw s}){let s={timeZone:r},i=[];for(let l of e){let{error:c,field:h,str:v}=l;if(c){let k=new E(c.message,l);k.stack=c.stack,t(k)}if(v){let k=`Ignoring string part: ${v}`;t(new E(k,l,E.WARNING))}h&&(i.indexOf(h)===-1?i.push(h):t(new E(`Duplicate ${h} token`,l)));let S=je(l,(k,$)=>t(new E(k,l,$)));S&&Object.assign(s,S)}return s}a(ne,"getDateFormatOptions");var Ze={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},we=a(e=>e>="A"&&e<="Z"||e>="a"&&e<="z","isLetter");function Je(e,r){let t=e[r],s=1;for(;e[++r]===t;)++s;let i=Ze[t];if(!i){let l=`The letter ${t} is not a valid field identifier`;return{char:t,error:new Error(l),width:s}}return{char:t,field:i.field,desc:i.desc,width:s}}a(Je,"readFieldToken");function Ve(e,r){let t=e[++r],s=2;if(t==="'")return{char:"'",str:t,width:s};for(;;){let i=e[++r];if(++s,i===void 0){let l=`Unterminated quoted literal in pattern: ${t||e}`;return{char:"'",error:new Error(l),str:t,width:s}}else if(i==="'"){if(e[++r]!=="'")return{char:"'",str:t,width:s};++s}t+=i}}a(Ve,"readQuotedToken");function Ye(e,r){let t=e[r];if(!t)return null;if(we(t))return Je(e,r);if(t==="'")return Ve(e,r);let s=t,i=1;for(;;){let l=e[++r];if(!l||we(l)||l==="'")return{char:t,str:s,width:i};s+=l,i+=1}}a(Ye,"readToken");function Z(e){let r=[],t=0;for(;;){let s=Ye(e,t);if(!s)return r;r.push(s),t+=s.width}}a(Z,"parseDateTokens");function be(e,r){return e.filter(t=>t.type!=="content").length?e.map(t=>{if(t.type==="content")return r(t.value);if(t.type==="octothorpe")return"#";if(t.type==="argument")return[t.arg];if(t.type==="function"){let l=t?.param?.[0];if(t.key==="date"&&l){let c=Qe(l.value.trim(),h=>{throw new Error(`Unable to compile date expression: ${h.message}`)});return[t.arg,t.key,c]}return l?[t.arg,t.key,l.value.trim()]:[t.arg,t.key]}let s=t.pluralOffset,i={};return t.cases.forEach(({key:l,tokens:c})=>{let h=l[0]==="="?l.slice(1):l;i[h]=be(c,r)}),[t.arg,t.type,{offset:s,...i}]}):e.map(t=>r(t.value))}a(be,"processTokens");function Qe(e,r){if(/^::/.test(e)){let t=Z(e.substring(2));return ne(t,void 0,r)}return e}a(Qe,"compileDateExpression");function Xe(e,r=t=>t){return be((0,xe.parse)(e),r)}a(Xe,"compileMessageOrThrow");function _e(e,r=t=>t){try{return Xe(e,r)}catch(t){return console.error(`${t.message}
|
|
8
|
+
`)},_.prototype.clone=function(){return new _(this.states,this.state)},_.prototype.has=function(n){return!0},{compile:Q,states:Be,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:De}})});var pe=ee(A=>{"use strict";var Fe=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:!0});A.lexer=A.states=void 0;var Ie=Fe(he());A.states={body:{doubleapos:{match:"''",value:a(()=>"'","value")},quoted:{lineBreaks:!0,match:/'[{}#](?:[^']|'')*'(?!')/u,value:a(e=>e.slice(1,-1).replace(/''/g,"'"),"value")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:a(e=>e.substring(1).trim(),"value")},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:a(e=>e.split(",")[1].trim(),"value")},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:a(e=>e.split(",")[1].trim(),"value")},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:a(e=>e.substring(1).trim(),"value")},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:a(e=>e.split(":")[1].trim(),"value")},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:a(e=>e.substring(0,e.indexOf("{")).trim(),"value")},end:{match:/\s*\}/u,pop:1}}};A.lexer=Ie.default.states(A.states)});var me=ee(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.ParseError=void 0;z.parse=Ue;var ye=pe(),j=a(e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),"getContext"),te=a(e=>e==="plural"||e==="select"||e==="selectordinal","isSelectType");function Re(e,t){let r="",s="";for(let l of t){let c=l.ctx.text;switch(s+=c,l.type){case"content":r+=l.value;break;case"argument":case"function":case"octothorpe":r+=c;break;default:throw new x(e,`Unsupported part in strict mode function arg style: ${c}`)}}return[{type:"content",value:r.trim(),ctx:Object.assign({},t[0].ctx,{text:s})}]}a(Re,"strictArgStyleParam");var Le=["number","date","time","spellout","ordinal","duration"],ge=["zero","one","two","few","many","other"],x=class extends Error{static{a(this,"ParseError")}constructor(t,r){super(ye.lexer.formatError(t,r))}};z.ParseError=x;var re=class{static{a(this,"Parser")}constructor(t,r){var s,i,l,c;this.lexer=ye.lexer.reset(t),this.cardinalKeys=(s=r?.cardinal)!==null&&s!==void 0?s:ge,this.ordinalKeys=(i=r?.ordinal)!==null&&i!==void 0?i:ge,this.strict=(l=r?.strict)!==null&&l!==void 0?l:!1,this.strictPluralKeys=(c=r?.strictPluralKeys)!==null&&c!==void 0?c:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(t,r,s){if(s[0]==="="){if(r==="select")throw new x(t,`The case ${s} is not valid with select`)}else if(r!=="select"){let i=r==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&i.length>0&&!i.includes(s)){let l=`The ${r} case ${s} is not valid in this locale`;throw new x(t,l)}}}parseSelect({value:t},r,s,i){let l={type:i,arg:t,cases:[],ctx:s};i==="plural"||i==="selectordinal"?r=!0:this.strict&&(r=!1);for(let c of this.lexer)switch(c.type){case"offset":if(i==="select")throw new x(c,"Unexpected plural offset for select");if(l.cases.length>0)throw new x(c,"Plural offset must be set before cases");l.pluralOffset=Number(c.value),s.text+=c.text,s.lineBreaks+=c.lineBreaks;break;case"case":{this.checkSelectKey(c,i,c.value),l.cases.push({key:c.value,tokens:this.parseBody(r),ctx:j(c)});break}case"end":return l;default:throw new x(c,`Unexpected lexer token: ${c.type}`)}throw new x(null,"Unexpected message end")}parseArgToken(t,r){let s=j(t),i=this.lexer.next();if(!i)throw new x(null,"Unexpected message end");if(s.text+=i.text,s.lineBreaks+=i.lineBreaks,this.strict&&(i.type==="func-simple"||i.type==="func-args")&&!Le.includes(i.value)){let l=`Invalid strict mode function arg type: ${i.value}`;throw new x(t,l)}switch(i.type){case"end":return{type:"argument",arg:t.value,ctx:s};case"func-simple":{let l=this.lexer.next();if(!l)throw new x(null,"Unexpected message end");if(l.type!=="end")throw new x(l,`Unexpected lexer token: ${l.type}`);if(s.text+=l.text,te(i.value.toLowerCase()))throw new x(i,`Invalid type identifier: ${i.value}`);return{type:"function",arg:t.value,key:i.value,ctx:s}}case"func-args":{if(te(i.value.toLowerCase())){let c=`Invalid type identifier: ${i.value}`;throw new x(i,c)}let l=this.parseBody(this.strict?!1:r);return this.strict&&l.length>0&&(l=Re(t,l)),{type:"function",arg:t.value,key:i.value,param:l,ctx:s}}case"select":if(te(i.value))return this.parseSelect(t,r,s,i.value);throw new x(i,`Unexpected select type ${i.value}`);default:throw new x(i,`Unexpected lexer token: ${i.type}`)}}parseBody(t,r){let s=[],i=null;for(let l of this.lexer)if(l.type==="argument")i&&(i=null),s.push(this.parseArgToken(l,t));else if(l.type==="octothorpe"&&t)i&&(i=null),s.push({type:"octothorpe",ctx:j(l)});else{if(l.type==="end"&&!r)return s;{let c=l.value;if(!t&&l.type==="quoted"&&c[0]==="#"){if(c.includes("{")){let h=`Unsupported escape pattern: ${c}`;throw new x(l,h)}c=l.text}i?(i.value+=c,i.ctx.text+=l.text,i.ctx.lineBreaks+=l.lineBreaks):(i={type:"content",value:c,ctx:j(l)},s.push(i))}}if(r)return s;throw new x(null,"Unexpected message end")}};function Ue(e,t={}){return new re(e,t).parse()}a(Ue,"parse")});var xe=fe(me(),1);var E=class extends Error{static{a(this,"DateFormatError")}constructor(t,r,s){super(t),this.token=r,this.type=s||"error"}},ve=a(e=>e<4?"short":e===4?"long":"narrow","alpha"),G=a(e=>e%2===0?"2-digit":"numeric","numeric");function ze(e,t){switch(e.char){case"y":return{year:G(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return t(`${e.desc} is not supported; falling back to year:numeric`,E.WARNING),{year:"numeric"}}}a(ze,"yearOptions");function Ge(e,t){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:t(`${e.desc} is not supported with width ${e.width}`);return}}a(Ge,"monthStyle");function Ke(e,t){let{char:r,desc:s,width:i}=e;if(r==="d")return G(i);t(`${s} is not supported`)}a(Ke,"dayStyle");function He(e,t){let{char:r,desc:s,width:i}=e;if((r==="c"||r==="e")&&i<3){let l=`Numeric value is not supported for ${s}; falling back to weekday:short`;t(l,E.WARNING)}return ve(i)}a(He,"weekdayStyle");function We(e){let t=G(e.width),r;switch(e.char){case"h":r="h12";break;case"H":r="h23";break;case"k":r="h24";break;case"K":r="h11";break}return r?{hour:t,hourCycle:r}:{hour:t}}a(We,"hourOptions");function je(e,t){let{char:r,desc:s,width:i}=e;switch(r){case"v":case"z":return i===4?"long":"short";case"V":if(i===4)return"long";t(`${s} is not supported with width ${i}`);return;case"X":t(`${s} is not supported`);return}return"short"}a(je,"timeZoneNameStyle");function Ze(e,t){switch(e.field){case"era":return{era:ve(e.width)};case"year":return ze(e,t);case"month":return{month:Ge(e,t)};case"day":return{day:Ke(e,t)};case"weekday":return{weekday:He(e,t)};case"period":return;case"hour":return We(e);case"min":return{minute:G(e.width)};case"sec":return{second:G(e.width)};case"tz":return{timeZoneName:je(e,t)};case"quarter":case"week":case"sec-frac":case"ms":t(`${e.desc} is not supported`)}}a(Ze,"compileOptions");function ne(e,t,r=s=>{throw s}){let s={timeZone:t},i=[];for(let l of e){let{error:c,field:h,str:v}=l;if(c){let k=new E(c.message,l);k.stack=c.stack,r(k)}if(v){let k=`Ignoring string part: ${v}`;r(new E(k,l,E.WARNING))}h&&(i.indexOf(h)===-1?i.push(h):r(new E(`Duplicate ${h} token`,l)));let S=Ze(l,(k,$)=>r(new E(k,l,$)));S&&Object.assign(s,S)}return s}a(ne,"getDateFormatOptions");var Je={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},we=a(e=>e>="A"&&e<="Z"||e>="a"&&e<="z","isLetter");function Ve(e,t){let r=e[t],s=1;for(;e[++t]===r;)++s;let i=Je[r];if(!i){let l=`The letter ${r} is not a valid field identifier`;return{char:r,error:new Error(l),width:s}}return{char:r,field:i.field,desc:i.desc,width:s}}a(Ve,"readFieldToken");function Ye(e,t){let r=e[++t],s=2;if(r==="'")return{char:"'",str:r,width:s};for(;;){let i=e[++t];if(++s,i===void 0){let l=`Unterminated quoted literal in pattern: ${r||e}`;return{char:"'",error:new Error(l),str:r,width:s}}else if(i==="'"){if(e[++t]!=="'")return{char:"'",str:r,width:s};++s}r+=i}}a(Ye,"readQuotedToken");function Qe(e,t){let r=e[t];if(!r)return null;if(we(r))return Ve(e,t);if(r==="'")return Ye(e,t);let s=r,i=1;for(;;){let l=e[++t];if(!l||we(l)||l==="'")return{char:r,str:s,width:i};s+=l,i+=1}}a(Qe,"readToken");function Z(e){let t=[],r=0;for(;;){let s=Qe(e,r);if(!s)return t;t.push(s),r+=s.width}}a(Z,"parseDateTokens");function be(e,t){return e.filter(r=>r.type!=="content").length?e.map(r=>{if(r.type==="content")return t(r.value);if(r.type==="octothorpe")return"#";if(r.type==="argument")return[r.arg];if(r.type==="function"){let l=r?.param?.[0];if(r.key==="date"&&l){let c=Xe(l.value.trim(),h=>{throw new Error(`Unable to compile date expression: ${h.message}`)});return[r.arg,r.key,c]}return l?[r.arg,r.key,l.value.trim()]:[r.arg,r.key]}let s=r.pluralOffset,i={};return r.cases.forEach(({key:l,tokens:c})=>{let h=l[0]==="="?l.slice(1):l;i[h]=be(c,t)}),[r.arg,r.type,{offset:s,...i}]}):e.map(r=>t(r.value))}a(be,"processTokens");function Xe(e,t){if(/^::/.test(e)){let r=Z(e.substring(2));return ne(r,void 0,t)}return e}a(Xe,"compileDateExpression");function et(e,t=r=>r){return be((0,xe.parse)(e),t)}a(et,"compileMessageOrThrow");function _e(e,t=r=>r){try{return et(e,t)}catch(r){return console.error(`${r.message}
|
|
9
9
|
|
|
10
|
-
Message: ${e}`),[e]}}a(_e,"compileMessage");var B=a(e=>typeof e=="string","isString"),
|
|
10
|
+
Message: ${e}`),[e]}}a(_e,"compileMessage");var B=a(e=>typeof e=="string","isString"),tt=a(e=>typeof e=="function","isFunction"),ke=new Map,Te="en";function oe(e){return[...Array.isArray(e)?e:[e],Te]}a(oe,"normalizeLocales");function le(e,t,r){let s=oe(e);r||(r="default");let i;if(typeof r=="string")switch(i={day:"numeric",month:"short",year:"numeric"},r){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=r;return J(()=>V("date",s,r),()=>new Intl.DateTimeFormat(s,i)).format(B(t)?new Date(t):t)}a(le,"date");function rt(e,t,r){let s;if(r||(r="default"),typeof r=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=r;return le(e,t,s)}a(rt,"time");function se(e,t,r){let s=oe(e);return J(()=>V("number",s,r),()=>new Intl.NumberFormat(s,r)).format(t)}a(se,"number");function Se(e,t,r,{offset:s=0,...i}){let l=oe(e),c=t?J(()=>V("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):J(()=>V("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return i[r]??i[c.select(r-s)]??i.other}a(Se,"plural");function J(e,t){let r=e(),s=ke.get(r);return s||(s=t(),ke.set(r,s)),s}a(J,"getMemoized");function V(e,t,r){let s=t.join("-");return`${e}-${s}-${JSON.stringify(r)}`}a(V,"cacheKey");var Ee=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Oe=a(e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(t,r,s)=>{if(r){let i=parseInt(r,16);return String.fromCharCode(i)}else{let i=parseInt(s,16);return String.fromCharCode(i)}}),"decodeEscapeSequences"),Ae="%__lingui_octothorpe__%",nt=a((e,t,r={})=>{let s=t||e,i=a(c=>typeof c=="object"?c:r[c],"style"),l=a((c,h)=>{let v=Object.keys(r).length?i("number"):void 0,S=se(s,c,v);return h.replace(new RegExp(Ae,"g"),S)},"replaceOctothorpe");return{plural:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!1,c,h);return l(c-v,S)},"plural"),selectordinal:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!0,c,h);return l(c-v,S)},"selectordinal"),select:st,number:a((c,h)=>se(s,c,i(h)||{style:h}),"number"),date:a((c,h)=>le(s,c,i(h)||h),"date"),time:a((c,h)=>rt(s,c,i(h)||h),"time")}},"getDefaultFormats"),st=a((e,t)=>t[e]??t.other,"selectFormatter");function it(e,t,r){return(s={},i)=>{let l=nt(t,r,i),c=a((v,S=!1)=>Array.isArray(v)?v.reduce((k,$)=>{if($==="#"&&S)return k+Ae;if(B($))return k+$;let[K,O,M]=$,D={};O==="plural"||O==="selectordinal"||O==="select"?Object.entries(M).forEach(([F,Q])=>{D[F]=c(Q,O==="plural"||O==="selectordinal")}):D=M;let N;if(O){let F=l[O];N=F(s[K],D)}else N=s[K];return N==null?k:k+N},""):v,"formatMessage"),h=c(e);return B(h)&&Ee.test(h)?Oe(h):B(h)?h:h?String(h):""}}a(it,"interpolate");var ie=class{static{a(this,"EventEmitter")}_events={};on(t,r){return this._events[t]??=new Set,this._events[t].add(r),()=>this.removeListener(t,r)}removeListener(t,r){let s=this._events[t];s?.delete(r),s?.size===0&&delete this._events[t]}emit(t,...r){let s=this._events[t];if(s)for(let i of[...s])i.apply(this,r)}},ae=class extends ie{static{a(this,"I18n")}_locale="";_locales;_messages={};_missing;_messageCompiler;constructor(t){super(),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),(typeof t.locale=="string"||t.locales)&&this.activate(t.locale??Te,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}setMessagesCompiler(t){return this._messageCompiler=t,this}_load(t,r){let s=this._messages[t];s?Object.assign(s,r):this._messages[t]=r}load(t,r){typeof t=="string"&&typeof r=="object"?this._load(t,r):Object.entries(t).forEach(([s,i])=>this._load(s,i)),this.emit("change")}loadAndActivate({locale:t,locales:r,messages:s}){this._locale=t,this._locales=r||void 0,this._messages[this._locale]=s,this.emit("change")}activate(t,r){this._locale=t,this._locales=r,this.emit("change")}_(t,r,s){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let i=s?.message;t||(t=""),B(t)||(r=t.values||r,i=t.message,t=t.id);let l=this.messages[t],c=l===void 0,h=this._missing;if(h&&c)return tt(h)?h(this._locale,t):h;c&&this.emit("missing",{id:t,locale:this._locale});let v=l||i||t;return B(v)&&(this._messageCompiler?v=this._messageCompiler(v):console.warn(`Uncompiled message detected! Message:
|
|
11
11
|
|
|
12
12
|
> ${v}
|
|
13
13
|
|
|
@@ -15,5 +15,5 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
15
15
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
16
16
|
|
|
17
17
|
Please compile your catalog first.
|
|
18
|
-
`)),B(v)&&Ee.test(v)?Oe(v):B(v)?v:
|
|
19
|
-
`):void 0},"
|
|
18
|
+
`)),B(v)&&Ee.test(v)?Oe(v):B(v)?v:it(v,this._locale,this._locales)(r,s?.formats)}t=this._.bind(this);date(t,r){return le(this._locales||this._locale,t,r)}number(t,r){return se(this._locales||this._locale,t,r)}};function ce(e={}){return new ae(e)}a(ce,"setupI18n");var Nt=ce();var Y=fe(Ne(),1);var at={},$e="en",ot={en:at},lt=a((e=$e,t=ot)=>{let r=ce();r.setMessagesCompiler(_e);for(let[s,i]of Object.entries(t))r.load(s,i);return r.activate(t[e]===void 0?$e:e),r},"d"),ct=lt(),ut=(0,Y.createContext)(ct),Ut=a(()=>{let e=(0,Y.use)(ut);return(t,r)=>e._(t,r)},"T");var Kt=a((e,t,r,s,i)=>{switch(t){case"action":return e.action(r,s,i);case"mutation":return e.mutation(r,s,i);default:return e.query(r,s,i)}},"a"),Ht=a(e=>({__lunoraRef:e}),"f"),Wt=a(e=>{let t=e.trim();return t===""?{}:{shardKey:t}},"u"),jt=a(e=>e instanceof Error?e.message:String(e),"d"),Zt=a(e=>{if(e===null||typeof e!="object"||!("code"in e))return;let{code:t}=e;return typeof t=="string"?t:void 0},"g"),Jt=a(e=>{if(e===null||typeof e!="object"||!("hint"in e))return;let{hint:t}=e;return typeof t=="string"?t:Array.isArray(t)?t.filter(r=>typeof r=="string").join(`
|
|
19
|
+
`):void 0},"l"),Vt=a(e=>{if(e===null||typeof e!="object"||!("docsUrl"in e))return;let t=e.docsUrl;if(typeof t=="string")try{let{protocol:r}=new URL(t);return r==="http:"||r==="https:"?t:void 0}catch{return}},"y"),Me=a(e=>{if(e==null)return"\u2014";if(e<1024)return`${e.toString()} B`;let t=["KB","MB","GB","TB"],r=e/1024,s=0;for(;r>=1024&&s<t.length-1;)r/=1024,s+=1;return`${r.toFixed(1)} ${t[s]??"TB"}`},"e"),ft=a((e,t)=>typeof t=="bigint"?t.toString():t instanceof ArrayBuffer||ArrayBuffer.isView(t)?`<bytes: ${Me(t.byteLength)}>`:t,"s"),Yt=a(e=>{if(e==null)return"";switch(typeof e){case"bigint":case"boolean":case"number":return e.toString();case"string":return e;case"symbol":return e.toString();default:return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?`<bytes: ${Me(e.byteLength)}>`:JSON.stringify(e,ft)}},"h"),dt=a((e,t)=>{e.catch(r=>{t?.(r)})},"c"),Qt=a(e=>{if(e!==void 0&&e!=="")return e;let t=globalThis.location;return t?.origin!==void 0&&t.origin!==""?t.origin:"http://localhost:5173"},"m"),Xt=a(e=>{let t="navigator"in globalThis?globalThis.navigator.clipboard:void 0;return t===void 0?!1:(dt(t.writeText(e)),!0)},"p"),er=a((e,t="")=>{if(e==null||e==="")return t;let r=new Date(e);return Number.isNaN(r.getTime())?String(e):r.toLocaleString()},"b");export{lt as a,ct as b,ut as c,Ut as d,Kt as e,Ht as f,Wt as g,jt as h,Zt as i,Jt as j,Vt as k,Me as l,ft as m,Yt as n,dt as o,Qt as p,Xt as q,er as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as F,b as O}from"./chunk-MNAASONZ.js";import{a as B}from"./chunk-
|
|
1
|
+
import{a as F,b as O}from"./chunk-MNAASONZ.js";import{a as B}from"./chunk-BOTGXX4H.js";import{a as V}from"./chunk-S3CRZLGS.js";import{a as T}from"./chunk-IABM4BFJ.js";import"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import{P as L}from"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import"./chunk-5GFSKIB2.js";import{b as C}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as j}from"./chunk-5K2UDZLN.js";import"./chunk-ULIQFBZU.js";import"./chunk-GWW7SJR6.js";import"./chunk-35DM4JJG.js";import{a as R}from"./chunk-4ZEL6BYL.js";import{c as M}from"./chunk-KQFH6FFC.js";import"./chunk-XZCNX7YU.js";import"./chunk-FSRSK4LY.js";import"./chunk-2LN3T5HY.js";import{a as K}from"./chunk-FKVZRPV5.js";import{a as z,b as A,c as q,d as p,e as n,f as d}from"./chunk-HEAQVSNS.js";import{a as I,e as E}from"./chunk-WUWBZPUK.js";import{d as b,r as k}from"./chunk-FODLDLE2.js";import{a as i,d as y,e as ee,g as te}from"./chunk-YKXDMIHQ.js";var o=y(ee(),1);var e=y(te(),1);var D=80,re=i(s=>{if(s===void 0)return"";let t=JSON.stringify(s);return t.length>D?`${t.slice(0,D)}\u2026`:t},"te"),ae=41,J=480,H=5,ie=i((s,t)=>F(s,l=>{t(l.height>0?l:{height:J,width:l.width})}),"ae"),Ne=i(({initialShardKey:s})=>{let t=b(),{queryShardKey:l,setShardKey:P,shardKey:U}=V(s),[h,W]=(0,o.useState)(""),{data:f,error:g,errorSource:Z,isLoading:_,liveError:$}=M(R.getAuditLog,{},{live:!0,shardKey:l}),m=(0,o.useMemo)(()=>f?.entries??[],[f]),c=(0,o.useMemo)(()=>{let a=h.trim().toLowerCase();return a===""?m:m.filter(r=>r.op.toLowerCase().includes(a)||(r.table??"").toLowerCase().includes(a)||(r.id??"").toLowerCase().includes(a))},[m,h]),x=(0,o.useRef)(null),v=O({count:c.length,estimateSize:i(()=>ae,"estimateSize"),getScrollElement:i(()=>x.current,"getScrollElement"),initialRect:{height:J,width:800},observeElementRect:ie,overscan:8}),u=v.getVirtualItems(),G=v.getTotalSize(),N=u[0]?.start??0,w=G-(u.at(-1)?.end??0),Q={height:N},X={height:w},Y=i(a=>{W(a.target.value)},"_");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-audit",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(T,{onChange:P,testId:"au-shard-input",value:U}),(0,e.jsx)(B,{message:$,prefix:"au"}),(0,e.jsx)(L,{"aria-label":t("Filter audit log"),className:"h-8 w-48","data-testid":"au-search",onChange:Y,placeholder:t("filter op, table, id"),value:h})]}),g!==null&&(0,e.jsx)(j,{error:Z,testId:"au-error"}),g===null&&!_&&c.length===0&&(0,e.jsx)(K,{description:t("State-changing admin operations are recorded here."),icon:(0,e.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M8 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-2M9 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V3Zm-1 9h8m-8 4h5"})}),testId:"au-empty",title:t("No audit entries.")}),c.length>0&&(0,e.jsx)(I,{className:"overflow-hidden py-0",children:(0,e.jsx)(E,{className:"max-h-[30rem] overflow-auto px-0",ref:x,children:(0,e.jsxs)(z,{"data-testid":"au-table",children:[(0,e.jsx)(A,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(n,{children:t("time")}),(0,e.jsx)(n,{children:t("op")}),(0,e.jsx)(n,{children:t("table")}),(0,e.jsx)(n,{children:t("id")}),(0,e.jsx)(n,{children:t("detail")})]})}),(0,e.jsxs)(q,{children:[N>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:H,style:Q})}),u.map(a=>{let r=c[a.index],S=re(r.detail);return(0,e.jsxs)(p,{"data-testid":"au-row",children:[(0,e.jsx)(d,{className:"text-muted-foreground tabular-nums",children:k(r.ts,"\u2014")}),(0,e.jsx)(d,{children:(0,e.jsx)(C,{variant:"secondary",children:r.op})}),(0,e.jsx)(d,{className:"font-medium",children:r.table??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(d,{className:"max-w-[20ch] truncate font-mono text-xs",children:r.id??(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,e.jsx)(d,{className:"max-w-[32ch] truncate font-mono text-xs text-muted-foreground",title:S||void 0,children:S||(0,e.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},r.seq)}),w>0&&(0,e.jsx)("tr",{"aria-hidden":"true",children:(0,e.jsx)("td",{colSpan:H,style:X})})]})]})})})]})},"Ne");export{Ne as AuditPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as y}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as R}from"./chunk-
|
|
1
|
+
import{b as y}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as R}from"./chunk-5K2UDZLN.js";import"./chunk-ULIQFBZU.js";import"./chunk-GWW7SJR6.js";import"./chunk-35DM4JJG.js";import{a as v}from"./chunk-4ZEL6BYL.js";import{c as $}from"./chunk-KQFH6FFC.js";import"./chunk-XZCNX7YU.js";import"./chunk-FSRSK4LY.js";import"./chunk-2LN3T5HY.js";import{a as S}from"./chunk-FKVZRPV5.js";import{a as A,b as C,c as I,d as x,e as c,f as n}from"./chunk-HEAQVSNS.js";import{a as k,e as w}from"./chunk-WUWBZPUK.js";import{d as N}from"./chunk-FODLDLE2.js";import{a as f,d as b,f as E,g as O}from"./chunk-YKXDMIHQ.js";var j=b(E(),1);var r=b(O(),1);var _=f((e,t)=>({delete:e("Delete"),list:e("List"),read:e("Read"),write:e("Write")})[t],"I"),T={delete:2,list:3,read:0,write:1},B=f(e=>[...e].toSorted((t,a)=>t.bucket.localeCompare(a.bucket)||T[t.on]-T[a.on]||(t.prefix??"").localeCompare(a.prefix??"")),"O"),q=f(()=>{let e=(0,j.c)(14),t=N(),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];let{data:l,error:i,errorSource:d}=$(v.storageRules,a),h=l!==void 0,m;if(e[1]!==l||e[2]!==i||e[3]!==d||e[4]!==h||e[5]!==t){let g=B(Array.isArray(l?.rules)?l.rules:[]),u;e[7]!==i||e[8]!==d?(u=i!==null&&(0,r.jsx)(R,{error:d,testId:"storage-rules-error"}),e[7]=i,e[8]=d,e[9]=u):u=e[9];let o;e[10]!==t?(o=t("Storage rules are declared in code with defineStorageRule and gate ctx.storage access per bucket. This view is read-only."),e[10]=t,e[11]=o):o=e[11];let p;e[12]!==o?(p=(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"storage-rules-note",children:o}),e[12]=o,e[13]=p):p=e[13],m=(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-storage-rules-panel",children:[u,p,h&&g.length===0?(0,r.jsx)(S,{description:t("No defineStorageRule is wired through .use(storageRules(...)) in this deployment. Add one to gate object access by key prefix."),testId:"storage-rules-empty",title:t("No storage rules defined")}):(0,r.jsx)(k,{className:"overflow-hidden py-0",children:(0,r.jsx)(w,{className:"px-0",children:(0,r.jsxs)(A,{"data-testid":"storage-rules-table",children:[(0,r.jsx)(C,{children:(0,r.jsxs)(x,{children:[(0,r.jsx)(c,{children:t("Bucket")}),(0,r.jsx)(c,{children:t("Operation")}),(0,r.jsx)(c,{children:t("Key prefix")}),(0,r.jsx)(c,{children:t("Guarded by")})]})}),(0,r.jsx)(I,{children:g.map(s=>(0,r.jsxs)(x,{"data-testid":`storage-rule-${s.bucket}-${s.on}-${s.prefix??""}`,children:[(0,r.jsx)(n,{className:"font-mono text-xs",children:s.bucket}),(0,r.jsx)(n,{children:(0,r.jsx)(y,{variant:"secondary",children:_(t,s.on)})}),(0,r.jsx)(n,{className:"font-mono text-xs",children:s.prefix??(0,r.jsx)("span",{className:"text-muted-foreground",children:t("(whole bucket)")})}),(0,r.jsx)(n,{className:"font-mono text-xs text-muted-foreground",children:s.procedure})]},`${s.bucket}:${s.on}:${s.prefix??""}:${s.procedure}`))})]})})})]}),e[1]=l,e[2]=i,e[3]=d,e[4]=h,e[5]=t,e[6]=m}else m=e[6];return m},"M");export{q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-KQFH6FFC.js";import{a as n}from"./chunk-YKXDMIHQ.js";var b="__lunora_admin__:",g=new Set(["action","mutation","query"]),c=Symbol("lunora.operationSeq"),_=n(t=>{if(typeof t!="object"||t===null)return;let e=t[c];return typeof e=="number"?e:void 0},"g"),d=n((t,e)=>{if(!(typeof t!="object"||t===null||!Object.isExtensible(t)))try{Object.defineProperty(t,c,{configurable:!0,enumerable:!1,value:e,writable:!0})}catch{}},"h"),m=n(t=>{if(typeof t!="object"||t===null)return;let e=t.__lunoraRef;return typeof e=="string"&&e.startsWith(b)?e:void 0},"p"),h=n(t=>{if(typeof t!="object"||t===null)return"";let{shardKey:e}=t;return typeof e=="string"?e:""},"O"),w=n(t=>new Proxy(t,{get(e,u,y){let i=Reflect.get(e,u,y);if(typeof i!="function"||typeof u!="string"||!g.has(u))return typeof i=="function"?i.bind(e):i;let f=i;return async(...o)=>{let l=m(o[0]);if(l===void 0)return f.apply(e,o);let p=typeof o[1]=="object"&&o[1]!==null?o[1]:{},a=s.start(l,p,h(o[2]));try{let r=await f.apply(e,o);return s.settle(a,{result:r}),r}catch(r){throw s.settle(a,{error:r instanceof Error?r.message:String(r)}),d(r,a),r}}}}),"E");export{_ as a,w as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as v}from"./chunk-F7UC63UN.js";import{a as Q}from"./chunk-66UGPQVC.js";import{a as L}from"./chunk-S3CRZLGS.js";import{a as G}from"./chunk-
|
|
1
|
+
import{a as v}from"./chunk-F7UC63UN.js";import{a as Q}from"./chunk-66UGPQVC.js";import{a as L}from"./chunk-S3CRZLGS.js";import{a as G}from"./chunk-IABM4BFJ.js";import"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import"./chunk-5GFSKIB2.js";import{b as $}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as W}from"./chunk-5K2UDZLN.js";import"./chunk-ULIQFBZU.js";import"./chunk-GWW7SJR6.js";import"./chunk-35DM4JJG.js";import{a as E}from"./chunk-4ZEL6BYL.js";import{c as B}from"./chunk-KQFH6FFC.js";import"./chunk-XZCNX7YU.js";import"./chunk-FSRSK4LY.js";import"./chunk-2LN3T5HY.js";import{a as A}from"./chunk-FKVZRPV5.js";import{a as q,b as H,c as O,d as K,e as T,f as D}from"./chunk-HEAQVSNS.js";import{a as _}from"./chunk-WUWBZPUK.js";import{d as j}from"./chunk-FODLDLE2.js";import{a as S,d as F,f as J,g as V}from"./chunk-YKXDMIHQ.js";var R=F(J(),1);var t=F(V(),1);var U=S(c=>`${c.toString()} ms`,"D"),X=S(c=>c.totalConnections===0&&c.shapePoke.passes===0&&c.whisper.passes===0&&c.shapeProbe.run===0&&c.shapeProbe.served===0&&c.globalPoll.drains===0&&c.globalPoll.pairsSkipped===0,"J"),z=S(c=>{let e=(0,R.c)(48),{counters:o,includeTiming:a,prefix:r,t:l,title:u}=c,d=`${r}-section`,n;e[0]!==u?(n=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:u}),e[0]=u,e[1]=n):n=e[1];let s=`${r}-stats`,i;e[2]!==l?(i=l("Passes"),e[2]=l,e[3]=i):i=e[3];let m=`${r}-passes`,I;e[4]!==o.passes||e[5]!==i||e[6]!==m?(I=(0,t.jsx)(v,{label:i,testId:m,value:o.passes}),e[4]=o.passes,e[5]=i,e[6]=m,e[7]=I):I=e[7];let g;e[8]!==l?(g=l("Sockets iterated"),e[8]=l,e[9]=g):g=e[9];let k=`${r}-iterated`,p;e[10]!==o.socketsIterated||e[11]!==g||e[12]!==k?(p=(0,t.jsx)(v,{label:g,testId:k,value:o.socketsIterated}),e[10]=o.socketsIterated,e[11]=g,e[12]=k,e[13]=p):p=e[13];let f;e[14]!==l?(f=l("Delivered"),e[14]=l,e[15]=f):f=e[15];let y=`${r}-delivered`,h;e[16]!==o.socketsDelivered||e[17]!==f||e[18]!==y?(h=(0,t.jsx)(v,{label:f,testId:y,value:o.socketsDelivered}),e[16]=o.socketsDelivered,e[17]=f,e[18]=y,e[19]=h):h=e[19];let x;e[20]!==l?(x=l("Peak width"),e[20]=l,e[21]=x):x=e[21];let N=`${r}-peak`,b;e[22]!==o.peakSocketsIterated||e[23]!==x||e[24]!==N?(b=(0,t.jsx)(v,{label:x,testId:N,value:o.peakSocketsIterated}),e[22]=o.peakSocketsIterated,e[23]=x,e[24]=N,e[25]=b):b=e[25];let C;e[26]!==o.totalMs||e[27]!==a||e[28]!==r||e[29]!==l?(C=a&&(0,t.jsx)(v,{label:l("Total time"),testId:`${r}-total-ms`,value:U(o.totalMs)}),e[26]=o.totalMs,e[27]=a,e[28]=r,e[29]=l,e[30]=C):C=e[30];let P;e[31]!==o.maxMs||e[32]!==a||e[33]!==r||e[34]!==l?(P=a&&(0,t.jsx)(v,{label:l("Max time"),testId:`${r}-max-ms`,value:U(o.maxMs)}),e[31]=o.maxMs,e[32]=a,e[33]=r,e[34]=l,e[35]=P):P=e[35];let M;e[36]!==h||e[37]!==b||e[38]!==C||e[39]!==P||e[40]!==s||e[41]!==I||e[42]!==p?(M=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":s,children:[I,p,h,b,C,P]}),e[36]=h,e[37]=b,e[38]=C,e[39]=P,e[40]=s,e[41]=I,e[42]=p,e[43]=M):M=e[43];let w;return e[44]!==d||e[45]!==M||e[46]!==n?(w=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":d,children:[n,M]}),e[44]=d,e[45]=M,e[46]=n,e[47]=w):w=e[47],w},"F"),Y=S(c=>{let e=(0,R.c)(20),{counters:o,t:a}=c,r;e[0]!==a?(r=a("Membership probes"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:r}),e[2]=r,e[3]=l):l=e[3];let u;e[4]!==a?(u=a("Queries run"),e[4]=a,e[5]=u):u=e[5];let d;e[6]!==o.run||e[7]!==u?(d=(0,t.jsx)(v,{label:u,testId:"fanout-probe-run",value:o.run}),e[6]=o.run,e[7]=u,e[8]=d):d=e[8];let n;e[9]!==a?(n=a("Shared from cache"),e[9]=a,e[10]=n):n=e[10];let s;e[11]!==o.served||e[12]!==n?(s=(0,t.jsx)(v,{label:n,testId:"fanout-probe-served",value:o.served}),e[11]=o.served,e[12]=n,e[13]=s):s=e[13];let i;e[14]!==d||e[15]!==s?(i=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":"fanout-probe-stats",children:[d,s]}),e[14]=d,e[15]=s,e[16]=i):i=e[16];let m;return e[17]!==l||e[18]!==i?(m=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-probe-section",children:[l,i]}),e[17]=l,e[18]=i,e[19]=m):m=e[19],m},"V"),Z=S(c=>{let e=(0,R.c)(20),{counters:o,t:a}=c,r;e[0]!==a?(r=a("Global shape polls"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:r}),e[2]=r,e[3]=l):l=e[3];let u;e[4]!==a?(u=a("Global reads"),e[4]=a,e[5]=u):u=e[5];let d;e[6]!==o.drains||e[7]!==u?(d=(0,t.jsx)(v,{label:u,testId:"fanout-global-poll-drains",value:o.drains}),e[6]=o.drains,e[7]=u,e[8]=d):d=e[8];let n;e[9]!==a?(n=a("Pairs skipped"),e[9]=a,e[10]=n):n=e[10];let s;e[11]!==o.pairsSkipped||e[12]!==n?(s=(0,t.jsx)(v,{label:n,testId:"fanout-global-poll-pairs-skipped",value:o.pairsSkipped}),e[11]=o.pairsSkipped,e[12]=n,e[13]=s):s=e[13];let i;e[14]!==d||e[15]!==s?(i=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":"fanout-global-poll-stats",children:[d,s]}),e[14]=d,e[15]=s,e[16]=i):i=e[16];let m;return e[17]!==l||e[18]!==i?(m=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-global-poll-section",children:[l,i]}),e[17]=l,e[18]=i,e[19]=m):m=e[19],m},"X"),pe=S(c=>{let e=(0,R.c)(31),{initialShardKey:o}=c,a=j(),{queryShardKey:r,setShardKey:l,shardKey:u}=L(o),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={},e[0]=d):d=e[0];let n;e[1]!==r?(n={keepPreviousData:!0,shardKey:r},e[1]=r,e[2]=n):n=e[2];let{data:s,error:i,errorSource:m,refetch:I}=B(E.getFanoutMetrics,d,n);Q(I,!0);let g;e[3]!==s?(g=s!==void 0&&X(s),e[3]=s,e[4]=g):g=e[4];let k=g,p;e[5]!==l||e[6]!==u?(p=(0,t.jsx)(G,{onChange:l,testId:"fanout-shard-input",value:u}),e[5]=l,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==s||e[9]!==a?(f=s!==void 0&&(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"fanout-count",children:[s.promoted&&(0,t.jsx)($,{"data-testid":"fanout-promoted",variant:s.relayCount>=s.maxRelays?"destructive":"default",children:s.relayCount>=s.maxRelays?a("auto-scaled: {relayCount}/{maxRelays} relays (at ceiling)",{maxRelays:s.maxRelays,relayCount:s.relayCount}):a("auto-scaled: {relayCount}/{maxRelays} relays",{maxRelays:s.maxRelays,relayCount:s.relayCount})}),(0,t.jsx)($,{variant:"secondary",children:a("{count} connections",{count:s.totalConnections})}),(0,t.jsx)($,{variant:"secondary",children:a("peak {count} subscribers",{count:s.peakSubscribers})})]}),e[8]=s,e[9]=a,e[10]=f):f=e[10];let y;e[11]!==p||e[12]!==f?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[p,f]}),e[11]=p,e[12]=f,e[13]=y):y=e[13];let h;e[14]!==i||e[15]!==m?(h=i!==null&&(0,t.jsx)(W,{error:m,testId:"fanout-error"}),e[14]=i,e[15]=m,e[16]=h):h=e[16];let x;e[17]!==i||e[18]!==k||e[19]!==a?(x=i===null&&k&&(0,t.jsx)(A,{description:a("Realtime fan-out cost and per-topic subscriber counts for this shard."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M4 12h4l3 7 4-14 3 7h2"})}),testId:"fanout-empty",title:a("No fan-out activity yet.")}),e[17]=i,e[18]=k,e[19]=a,e[20]=x):x=e[20];let N;e[21]!==i||e[22]!==k||e[23]!==s||e[24]!==a?(N=i===null&&s!==void 0&&!k&&(0,t.jsxs)(t.Fragment,{children:[s.topics.length>0&&(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-topics-section",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:a("Hot topics")}),(0,t.jsx)(_,{className:"overflow-hidden py-0",children:(0,t.jsxs)(q,{"data-testid":"fanout-topics-table",children:[(0,t.jsx)(H,{children:(0,t.jsxs)(K,{children:[(0,t.jsx)(T,{children:a("Topic")}),(0,t.jsx)(T,{children:a("Kind")}),(0,t.jsx)(T,{className:"text-right",children:a("Subscribers")})]})}),(0,t.jsx)(O,{children:s.topics.map(ee)})]})})]}),(0,t.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"fanout-cost",children:[(0,t.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:a("Fan-out cost since this instance woke")}),(0,t.jsx)(z,{counters:s.shapePoke,includeTiming:!0,prefix:"fanout-poke",t:a,title:a("Shape pokes")}),(0,t.jsx)(z,{counters:s.whisper,includeTiming:!1,prefix:"fanout-whisper",t:a,title:a("Whisper broadcasts")}),(0,t.jsx)(Y,{counters:s.shapeProbe,t:a}),(0,t.jsx)(Z,{counters:s.globalPoll,t:a})]})]}),e[21]=i,e[22]=k,e[23]=s,e[24]=a,e[25]=N):N=e[25];let b;return e[26]!==y||e[27]!==h||e[28]!==x||e[29]!==N?(b=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"fanout-panel",children:[y,h,x,N]}),e[26]=y,e[27]=h,e[28]=x,e[29]=N,e[30]=b):b=e[30],b},"me");function ee(c){return(0,t.jsxs)(K,{"data-testid":"fanout-topic-row",children:[(0,t.jsx)(D,{className:"font-mono text-xs",children:c.topic}),(0,t.jsx)(D,{children:(0,t.jsx)($,{variant:"outline",children:c.kind})}),(0,t.jsx)(D,{className:"text-right font-medium tabular-nums",children:c.subscribers})]},`${c.kind}:${c.topic}`)}S(ee,"Y");export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as we}from"./chunk-SMVAE2AQ.js";import{a as Ne}from"./chunk-RPQL45FL.js";import{b as ve,c as ye}from"./chunk-4GTO7FL5.js";import{a as ge}from"./chunk-VVOVVU53.js";import{a as xe}from"./chunk-5JEYBOS6.js";import"./chunk-SB35BJ7A.js";import"./chunk-FO26ZU7E.js";import{a as fe}from"./chunk-S3CRZLGS.js";import{a as he}from"./chunk-E723DEAW.js";import{b as pe}from"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import{P as me}from"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import"./chunk-TGHH7ZFA.js";import"./chunk-5GFSKIB2.js";import{b as oe}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as be}from"./chunk-PWHV7BUN.js";import"./chunk-ULIQFBZU.js";import"./chunk-DMPVOWA7.js";import"./chunk-35DM4JJG.js";import{a as ce}from"./chunk-4ZEL6BYL.js";import{c as ie}from"./chunk-BQ4P3PLU.js";import"./chunk-W3Q32C24.js";import"./chunk-FSRSK4LY.js";import"./chunk-RIO2HPN7.js";import{a as ue}from"./chunk-FKVZRPV5.js";import{d as U,r as de}from"./chunk-NXKPFGOP.js";import{a as m,d as le,e as $e,f as Ce,g as Le,i as te}from"./chunk-YKXDMIHQ.js";var B=le(Ce(),1),O=le($e(),1);var s=le(Le(),1);var Te=.5,Me=4,Ie=m(n=>Math.min(100,Math.max(0,n)),"ce"),Pe=m((n,e)=>{if(!Number.isFinite(e)||e<=0)return{leftPercent:0,widthPercent:100};let t=Ie(n.offsetMs/e*100),a=n.durationMs/e*100,l=Math.max(Te,Math.min(Ie(a),100-t));return{leftPercent:t,widthPercent:l}},"Le"),Ke=m((n,e,t=!1)=>{let a=e.trim().toLowerCase(),l=t?n.filter(r=>!r.ok):n;return a===""?[...l]:l.filter(r=>r.rootName.toLowerCase().includes(a)||r.functionPath.toLowerCase().includes(a)||r.traceId.toLowerCase().includes(a)||r.spans.some(o=>o.name.toLowerCase().includes(a)||o.spanId.toLowerCase().includes(a)))},"Ce"),G=m(n=>Number.isFinite(n)?n>0&&n<1?`${n.toFixed(2)}ms`:`${String(Math.round(n))}ms`:"\u2014","q"),De=m(n=>!Number.isFinite(n)||n<=0?[]:Array.from({length:Me},(e,t)=>{let a=(t+1)/Me;return{label:G(n*a),percent:a*100}}),"Ee"),Se=m(n=>{if(typeof n=="string")return n;try{return JSON.stringify(n)}catch{return String(n)}},"ue"),ee=m(n=>{let e=(0,B.c)(7),{label:t,value:a}=n,l;e[0]!==t?(l=(0,s.jsx)("dt",{className:"w-40 shrink-0 text-muted-foreground",children:t}),e[0]=t,e[1]=l):l=e[1];let r;e[2]!==a?(r=(0,s.jsx)("dd",{className:"min-w-0 break-all",children:a}),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==l||e[5]!==r?(o=(0,s.jsxs)("div",{className:"flex gap-2",children:[l,r]}),e[4]=l,e[5]=r,e[6]=o):o=e[6],o},"Y"),Fe=m(n=>{let e=(0,B.c)(68),{span:t}=n,a=U(),l,r,o,d,i,u;if(e[0]!==t.attributes||e[1]!==t.durationMs||e[2]!==t.error||e[3]!==t.events||e[4]!==t.kind||e[5]!==t.offsetMs||e[6]!==t.parentSpanId||e[7]!==t.spanId||e[8]!==a){let $=Object.entries(t.attributes??{}),_;e[15]!==t.events?(_=t.events??[],e[15]=t.events,e[16]=_):_=e[16],l=_,r="border-t border-border bg-background/60 px-3 py-2 font-mono text-xs",o="tr-span-detail";let y;e[17]!==a?(y=a("Span ID"),e[17]=a,e[18]=y):y=e[18];let w;e[19]!==t.spanId||e[20]!==y?(w=(0,s.jsx)(ee,{label:y,value:t.spanId}),e[19]=t.spanId,e[20]=y,e[21]=w):w=e[21];let M;e[22]!==a?(M=a("Parent span ID"),e[22]=a,e[23]=M):M=e[23];let p;e[24]!==t.parentSpanId||e[25]!==a?(p=t.parentSpanId===""?a("\u2014 (trace root)"):t.parentSpanId,e[24]=t.parentSpanId,e[25]=a,e[26]=p):p=e[26];let h;e[27]!==p||e[28]!==M?(h=(0,s.jsx)(ee,{label:M,value:p}),e[27]=p,e[28]=M,e[29]=h):h=e[29];let b;e[30]!==a?(b=a("Kind"),e[30]=a,e[31]=b):b=e[31];let C=t.kind??"internal",S;e[32]!==b||e[33]!==C?(S=(0,s.jsx)(ee,{label:b,value:C}),e[32]=b,e[33]=C,e[34]=S):S=e[34];let I;e[35]!==a?(I=a("Started at"),e[35]=a,e[36]=I):I=e[36];let g;e[37]!==t.offsetMs||e[38]!==a?(g=a("+{offset}",{offset:G(t.offsetMs)}),e[37]=t.offsetMs,e[38]=a,e[39]=g):g=e[39];let x;e[40]!==I||e[41]!==g?(x=(0,s.jsx)(ee,{label:I,value:g}),e[40]=I,e[41]=g,e[42]=x):x=e[42];let k;e[43]!==a?(k=a("Duration"),e[43]=a,e[44]=k):k=e[44];let f;e[45]!==t.durationMs?(f=G(t.durationMs),e[45]=t.durationMs,e[46]=f):f=e[46];let N;e[47]!==k||e[48]!==f?(N=(0,s.jsx)(ee,{label:k,value:f}),e[47]=k,e[48]=f,e[49]=N):N=e[49],e[50]!==h||e[51]!==S||e[52]!==x||e[53]!==N||e[54]!==w?(d=(0,s.jsxs)("dl",{className:"flex flex-col gap-1",children:[w,h,S,x,N]}),e[50]=h,e[51]=S,e[52]=x,e[53]=N,e[54]=w,e[55]=d):d=e[55],e[56]!==t.error?(i=t.error!==void 0&&(0,s.jsxs)("div",{className:"mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-2 py-1.5","data-testid":"tr-detail-error",children:[(0,s.jsx)("span",{className:"font-semibold text-destructive",children:t.error.type}),(0,s.jsx)("p",{className:"whitespace-pre-wrap break-all text-destructive",children:t.error.message})]}),e[56]=t.error,e[57]=i):i=e[57],u=$.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-attributes",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Attributes")}),(0,s.jsx)("dl",{className:"flex flex-col gap-1",children:$.map(je)})]}),e[0]=t.attributes,e[1]=t.durationMs,e[2]=t.error,e[3]=t.events,e[4]=t.kind,e[5]=t.offsetMs,e[6]=t.parentSpanId,e[7]=t.spanId,e[8]=a,e[9]=l,e[10]=r,e[11]=o,e[12]=d,e[13]=i,e[14]=u}else l=e[9],r=e[10],o=e[11],d=e[12],i=e[13],u=e[14];let c;e[58]!==l||e[59]!==a?(c=l.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-events",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Events")}),(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:l.map(Oe)})]}),e[58]=l,e[59]=a,e[60]=c):c=e[60];let v;return e[61]!==r||e[62]!==o||e[63]!==d||e[64]!==i||e[65]!==u||e[66]!==c?(v=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,i,u,c]}),e[61]=r,e[62]=o,e[63]=d,e[64]=i,e[65]=u,e[66]=c,e[67]=v):v=e[67],v},"Pe");function je(n){let[e,t]=n;return(0,s.jsx)(ee,{label:e,value:Se(t)},e)}m(je,"Fe");function Ee(n){let[e,t]=n;return`${e}=${Se(t)}`}m(Ee,"Ke");function Oe(n){return(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:de(n.ts)}),(0,s.jsx)(oe,{variant:"secondary",children:n.name}),(0,s.jsx)("span",{className:"min-w-0 break-all text-muted-foreground",children:Object.entries(n.attributes??{}).map(Ee).join(" ")})]},`${n.name}:${String(n.ts)}`)}m(Oe,"Ae");var Be=14,ke="grid grid-cols-[14rem_1fr_4rem_16rem_16rem] items-center gap-2 px-3",Re=m(n=>{let e=(0,B.c)(17),{traceDurationMs:t}=n,a,l,r,o,d,i;if(e[0]!==t){i=Symbol.for("react.early_return_sentinel");e:{let v=De(t);if(v.length===0){i=null;break e}e[7]===Symbol.for("react.memo_cache_sentinel")?(r=te(ke,"border-b border-border py-1 font-mono text-[10px] text-muted-foreground"),e[7]=r):r=e[7],o="tr-ruler",e[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)("span",{}),e[8]=d):d=e[8],a="relative h-3",l=v.map(ze)}e[0]=t,e[1]=a,e[2]=l,e[3]=r,e[4]=o,e[5]=d,e[6]=i}else a=e[1],l=e[2],r=e[3],o=e[4],d=e[5],i=e[6];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;e[9]!==a||e[10]!==l?(u=(0,s.jsx)("span",{className:a,children:l}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let c;return e[12]!==r||e[13]!==o||e[14]!==d||e[15]!==u?(c=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,u]}),e[12]=r,e[13]=o,e[14]=d,e[15]=u,e[16]=c):c=e[16],c},"Re"),We=m(n=>{let e=(0,B.c)(60),{span:t,traceDurationMs:a}=n,l=U(),[r,o]=(0,O.useState)(!1),d;e[0]!==t||e[1]!==a?(d=Pe(t,a),e[0]=t,e[1]=a,e[2]=d):d=e[2];let{leftPercent:i,widthPercent:u}=d,c;e[3]!==t.attributes?(c=Ne(t.attributes),e[3]=t.attributes,e[4]=c):c=e[4];let v=c,$=t.depth*Be,_;e[5]!==$?(_={paddingLeft:$},e[5]=$,e[6]=_):_=e[6];let y=_,w=`${String(i)}%`,M=`${String(u)}%`,p;e[7]!==w||e[8]!==M?(p={left:w,width:M},e[7]=w,e[8]=M,e[9]=p):p=e[9];let h=p,b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=m(()=>{o(Je)},"h"),e[10]=b):b=e[10];let C=b,S=t.depth,I=`tr-span-detail-${t.spanId}`,g;e[11]!==t.durationMs||e[12]!==t.error||e[13]!==t.name||e[14]!==t.offsetMs||e[15]!==l?(g=l("{name}, {duration}, starts {offset} in{failure}",{duration:G(t.durationMs),failure:t.error===void 0?"":l(", failed: {message}",{message:t.error.message}),name:t.name,offset:G(t.offsetMs)}),e[11]=t.durationMs,e[12]=t.error,e[13]=t.name,e[14]=t.offsetMs,e[15]=l,e[16]=g):g=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=te(ke,"w-full border-b border-border py-1.5 text-left font-mono text-xs hover:bg-muted/50"),e[17]=x):x=e[17];let k=`tr-span-toggle-${t.spanId}`,f;e[18]!==t.ok?(f=t.ok?null:(0,s.jsx)("span",{"aria-hidden":"true",className:"mr-1 text-destructive","data-testid":"tr-span-error",children:"\u25CF"}),e[18]=t.ok,e[19]=f):f=e[19];let N;e[20]!==y||e[21]!==t.name||e[22]!==f?(N=(0,s.jsxs)("span",{className:"truncate",style:y,title:t.name,children:[f,t.name]}),e[20]=y,e[21]=t.name,e[22]=f,e[23]=N):N=e[23];let R=t.ok?"bg-primary/70":"bg-destructive",L;e[24]!==R?(L=te("absolute inset-y-0 rounded-sm",R),e[24]=R,e[25]=L):L=e[25];let E;e[26]!==h||e[27]!==i||e[28]!==L||e[29]!==u?(E=(0,s.jsx)("span",{"aria-hidden":"true",className:"relative h-3 overflow-hidden rounded-sm bg-muted",children:(0,s.jsx)("span",{className:L,"data-left":i,"data-testid":"tr-span-bar","data-width":u,style:h})}),e[26]=h,e[27]=i,e[28]=L,e[29]=u,e[30]=E):E=e[30];let W;e[31]!==t.durationMs?(W=G(t.durationMs),e[31]=t.durationMs,e[32]=W):W=e[32];let D;e[33]!==W?(D=(0,s.jsx)("span",{className:"text-right tabular-nums text-muted-foreground",children:W}),e[33]=W,e[34]=D):D=e[34];let q;e[35]!==t.error?(q=t.error===void 0?null:(0,s.jsx)("span",{className:"text-destructive","data-testid":"tr-span-error-message",title:t.error.message,children:`${t.error.type}: ${t.error.message}`}),e[35]=t.error,e[36]=q):q=e[36];let T;e[37]!==q?(T=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:q}),e[37]=q,e[38]=T):T=e[38];let z;e[39]!==v?(z=v===""?null:(0,s.jsx)("span",{"data-testid":"tr-span-attributes",title:v,children:v}),e[39]=v,e[40]=z):z=e[40];let P;e[41]!==z?(P=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:z}),e[41]=z,e[42]=P):P=e[42];let J;e[43]!==r||e[44]!==I||e[45]!==g||e[46]!==k||e[47]!==N||e[48]!==E||e[49]!==D||e[50]!==T||e[51]!==P?(J=(0,s.jsxs)("button",{"aria-controls":I,"aria-expanded":r,"aria-label":g,className:x,"data-testid":k,onClick:C,type:"button",children:[N,E,D,T,P]}),e[43]=r,e[44]=I,e[45]=g,e[46]=k,e[47]=N,e[48]=E,e[49]=D,e[50]=T,e[51]=P,e[52]=J):J=e[52];let F;e[53]!==r||e[54]!==t?(F=r&&(0,s.jsx)("div",{id:`tr-span-detail-${t.spanId}`,children:(0,s.jsx)(Fe,{span:t})}),e[53]=r,e[54]=t,e[55]=F):F=e[55];let K;return e[56]!==t.depth||e[57]!==J||e[58]!==F?(K=(0,s.jsxs)("li",{"data-depth":S,"data-testid":"tr-span-row",children:[J,F]}),e[56]=t.depth,e[57]=J,e[58]=F,e[59]=K):K=e[59],K},"Be"),qe=m(n=>{let e=(0,B.c)(15),{durationMs:t,spans:a}=n,l=U(),r;e[0]!==t?(r=(0,s.jsx)(Re,{traceDurationMs:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==l?(o=l("Trace waterfall"),e[2]=l,e[3]=o):o=e[3];let d;if(e[4]!==t||e[5]!==a){let c;e[7]!==t?(c=m(v=>(0,s.jsx)(We,{span:v,traceDurationMs:t},v.spanId),"c"),e[7]=t,e[8]=c):c=e[8],d=a.map(c),e[4]=t,e[5]=a,e[6]=d}else d=e[6];let i;e[9]!==o||e[10]!==d?(i=(0,s.jsx)("ul",{"aria-label":o,children:d}),e[9]=o,e[10]=d,e[11]=i):i=e[11];let u;return e[12]!==r||e[13]!==i?(u=(0,s.jsxs)(s.Fragment,{children:[r,i]}),e[12]=r,e[13]=i,e[14]=u):u=e[14],u},"Oe");function ze(n){return(0,s.jsx)("span",{className:te("absolute inset-y-0 border-l border-border/70",n.percent===100?"-translate-x-full pr-1":"pl-1"),style:{left:`${String(n.percent)}%`},children:n.label},n.percent)}m(ze,"je");function Je(n){return!n}m(Je,"We");var Ue=m(n=>Array.isArray(n?.traces)?n.traces:[],"Ue"),Ge=m(n=>{let e=(0,B.c)(12),{entries:t}=n,a=U(),l;e[0]!==t.length||e[1]!==a?(l=a("Logs ({count})",{count:t.length}),e[0]=t.length,e[1]=a,e[2]=l):l=e[2];let r;e[3]!==l?(r=(0,s.jsx)("p",{className:"mb-1 font-mono text-xs text-muted-foreground",children:l}),e[3]=l,e[4]=r):r=e[4];let o;e[5]!==t?(o=t.map(Qe),e[5]=t,e[6]=o):o=e[6];let d;e[7]!==o?(d=(0,s.jsx)("div",{role:"grid",children:o}),e[7]=o,e[8]=d):d=e[8];let i;return e[9]!==r||e[10]!==d?(i=(0,s.jsxs)("div",{className:"border-t border-border px-3 py-2","data-testid":"tr-logs",children:[r,d]}),e[9]=r,e[10]=d,e[11]=i):i=e[11],i},"qe"),He=m(n=>{let e=(0,B.c)(50),{expanded:t,logs:a,onToggle:l,trace:r}=n,o=U(),d;e[0]!==l||e[1]!==r.traceId?(d=m(()=>{l(r.traceId)},"i"),e[0]=l,e[1]=r.traceId,e[2]=d):d=e[2];let i=d,u=`tr-row-${r.traceId}`,c=`tr-waterfall-${r.traceId}`,v=`tr-toggle-${r.traceId}`,$=t?"\u25BE":"\u25B8",_;e[3]!==$?(_=(0,s.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 text-xs text-muted-foreground",children:$}),e[3]=$,e[4]=_):_=e[4];let y;e[5]!==r.rootName?(y=(0,s.jsx)("span",{className:"w-56 shrink-0 truncate text-sm font-medium",title:r.rootName,children:r.rootName}),e[5]=r.rootName,e[6]=y):y=e[6];let w;e[7]!==r.functionPath?(w=(0,s.jsx)("span",{className:"w-48 shrink-0 truncate font-mono text-xs text-muted-foreground",title:r.functionPath,children:r.functionPath}),e[7]=r.functionPath,e[8]=w):w=e[8];let M;e[9]!==r.durationMs?(M=G(r.durationMs),e[9]=r.durationMs,e[10]=M):M=e[10];let p;e[11]!==M?(p=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:M}),e[11]=M,e[12]=p):p=e[12];let h;e[13]!==o||e[14]!==r.spans.length?(h=o("{count} spans",{count:r.spans.length}),e[13]=o,e[14]=r.spans.length,e[15]=h):h=e[15];let b;e[16]!==h?(b=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:h}),e[16]=h,e[17]=b):b=e[17];let C=r.ok?"secondary":"destructive",S;e[18]!==o||e[19]!==r.ok?(S=r.ok?o("ok"):o("error"),e[18]=o,e[19]=r.ok,e[20]=S):S=e[20];let I;e[21]!==C||e[22]!==S?(I=(0,s.jsx)("span",{className:"shrink-0",children:(0,s.jsx)(oe,{variant:C,children:S})}),e[21]=C,e[22]=S,e[23]=I):I=e[23];let g;e[24]!==r.startTs?(g=de(r.startTs),e[24]=r.startTs,e[25]=g):g=e[25];let x;e[26]!==g?(x=(0,s.jsx)("span",{className:"flex-1 truncate text-right font-mono text-xs tabular-nums text-muted-foreground",children:g}),e[26]=g,e[27]=x):x=e[27];let k;e[28]!==t||e[29]!==i||e[30]!==p||e[31]!==b||e[32]!==I||e[33]!==x||e[34]!==c||e[35]!==v||e[36]!==_||e[37]!==y||e[38]!==w?(k=(0,s.jsxs)("button",{"aria-controls":c,"aria-expanded":t,className:"flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-muted/50","data-testid":v,onClick:i,type:"button",children:[_,y,w,p,b,I,x]}),e[28]=t,e[29]=i,e[30]=p,e[31]=b,e[32]=I,e[33]=x,e[34]=c,e[35]=v,e[36]=_,e[37]=y,e[38]=w,e[39]=k):k=e[39];let f;e[40]!==t||e[41]!==a||e[42]!==r.durationMs||e[43]!==r.spans||e[44]!==r.traceId?(f=t&&(0,s.jsxs)("div",{className:"bg-muted/20","data-testid":`tr-waterfall-${r.traceId}`,id:`tr-waterfall-${r.traceId}`,children:[(0,s.jsx)(qe,{durationMs:r.durationMs,spans:r.spans}),a.length>0&&(0,s.jsx)(Ge,{entries:a})]}),e[40]=t,e[41]=a,e[42]=r.durationMs,e[43]=r.spans,e[44]=r.traceId,e[45]=f):f=e[45];let N;return e[46]!==k||e[47]!==f||e[48]!==u?(N=(0,s.jsxs)("div",{className:"border-b border-border last:border-b-0","data-testid":u,children:[k,f]}),e[46]=k,e[47]=f,e[48]=u,e[49]=N):N=e[49],N},"ze"),ft=m(n=>{let e=(0,B.c)(58),{initialShardKey:t}=n,a=U(),[l]=(0,O.useState)(ve),{queryShardKey:r,setShardKey:o,shardKey:d}=fe(l?.shardKey!==void 0&&l.shardKey!==""?l.shardKey:t??""),[i,u]=(0,O.useState)(l?.traceId??""),[c,v]=(0,O.useState)(!1),[$,_]=(0,O.useState)(Ae),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0],(0,O.useEffect)(Ve,y);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={},e[1]=w):w=e[1];let M;e[2]!==r?(M={live:!0,shardKey:r},e[2]=r,e[3]=M):M=e[3];let{data:p,error:h,errorSource:b,isLoading:C,liveError:S}=ie(ce.getTraces,w,M),I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I={},e[4]=I):I=e[4];let g=$.size>0,x;e[5]!==r||e[6]!==g?(x={enabled:g,live:!0,shardKey:r},e[5]=r,e[6]=g,e[7]=x):x=e[7];let{data:k}=ie(ce.getLogs,I,x),f,N;e[8]!==p||e[9]!==r?(f=m(()=>{p!==void 0&&pe(r)},"p"),N=[p,r],e[8]=p,e[9]=r,e[10]=f,e[11]=N):(f=e[10],N=e[11]),(0,O.useEffect)(f,N);let R;if(e[12]!==p||e[13]!==h||e[14]!==b||e[15]!==$||e[16]!==C||e[17]!==S||e[18]!==k?.entries||e[19]!==c||e[20]!==i||e[21]!==o||e[22]!==d||e[23]!==a){let L=Ue(p),E=p?.total??L.length,W=E>L.length,D=Ke(L,i,c),q=Map.groupBy((k?.entries??[]).toReversed(),Xe),T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=m(j=>{u(j.target.value)},"C"),e[25]=T):T=e[25];let z=T,P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=m(j=>{_(_e=>{let ne=new Set(_e);return ne.has(j)?ne.delete(j):ne.add(j),ne})},"E"),e[26]=P):P=e[26];let J=P,F=h===null&&D.length===0&&!C,K;e[27]!==o||e[28]!==d?(K=(0,s.jsx)(he,{onChange:o,testId:"tr-shard-input",value:d}),e[27]=o,e[28]=d,e[29]=K):K=e[29];let H;e[30]!==a?(H=a("Search traces"),e[30]=a,e[31]=H):H=e[31];let Q;e[32]!==a?(Q=a("search trace, span, or function"),e[32]=a,e[33]=Q):Q=e[33];let A;e[34]!==i||e[35]!==H||e[36]!==Q?(A=(0,s.jsx)(me,{"aria-label":H,className:"h-8 w-56","data-testid":"tr-search",onChange:z,placeholder:Q,value:i}),e[34]=i,e[35]=H,e[36]=Q,e[37]=A):A=e[37];let V;e[38]!==c?(V=(0,s.jsx)(ge,{checked:c,"data-testid":"tr-only-errors",id:"tr-only-errors",onCheckedChange:v}),e[38]=c,e[39]=V):V=e[39];let X;e[40]!==a?(X=a("Errors only"),e[40]=a,e[41]=X):X=e[41];let Y;e[42]!==V||e[43]!==X?(Y=(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",htmlFor:"tr-only-errors",children:[V,X]}),e[42]=V,e[43]=X,e[44]=Y):Y=e[44];let Z;e[45]!==S?(Z=(0,s.jsx)(xe,{message:S,prefix:"tr"}),e[45]=S,e[46]=Z):Z=e[46];let re;e[47]!==K||e[48]!==A||e[49]!==Y||e[50]!==Z?(re=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K,A,Y,Z]}),e[47]=K,e[48]=A,e[49]=Y,e[50]=Z,e[51]=re):re=e[51];let ae;e[52]!==h||e[53]!==b?(ae=h!==null&&(0,s.jsx)(be,{error:b,testId:"tr-error"}),e[52]=h,e[53]=b,e[54]=ae):ae=e[54];let se;e[55]!==F||e[56]!==a?(se=F&&(0,s.jsx)(ue,{description:a("Traces recorded with ctx.trace show up here as your app handles traffic. The span buffer resets when the shard hibernates."),icon:(0,s.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M4 6h10M7 12h13M10 18h7"})}),testId:"tr-empty",title:a("No traces")}),e[55]=F,e[56]=a,e[57]=se):se=e[57],R=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-traces-panel",children:[re,ae,se,h===null&&W&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"tr-truncated",children:a("Showing the {shown} most recent of {total} traces in the buffer.",{shown:L.length,total:E})}),h===null&&D.length>0&&(0,s.jsx)("div",{"aria-label":a("Recent traces"),className:"overflow-hidden rounded-xl border border-border shadow-xs","data-testid":"tr-list",children:D.map(j=>(0,s.jsx)(He,{expanded:$.has(j.traceId),logs:q.get(j.traceId)??[],onToggle:J,trace:j},j.traceId))})]}),e[12]=p,e[13]=h,e[14]=b,e[15]=$,e[16]=C,e[17]=S,e[18]=k?.entries,e[19]=c,e[20]=i,e[21]=o,e[22]=d,e[23]=a,e[24]=R}else R=e[24];return R},"gt");function Qe(n,e){return(0,s.jsx)("div",{className:"flex items-center border-b border-border py-1 font-mono text-xs last:border-b-0","data-testid":"tr-log-row",role:"row",children:(0,s.jsx)(we,{entry:n})},`${String(e)}:${String(n.timestamp)}`)}m(Qe,"Ge");function Ae(){return new Set}m(Ae,"He");function Ve(){ye()}m(Ve,"Je");function Xe(n){return n.traceId}m(Xe,"Qe");export{ft as default};
|
|
1
|
+
import{b as we}from"./chunk-EHSU2WDS.js";import{a as Ne}from"./chunk-RPQL45FL.js";import{b as ve,c as ye}from"./chunk-4GTO7FL5.js";import{a as ge}from"./chunk-VVOVVU53.js";import{a as xe}from"./chunk-BOTGXX4H.js";import"./chunk-SB35BJ7A.js";import"./chunk-FO26ZU7E.js";import{a as fe}from"./chunk-S3CRZLGS.js";import{a as he}from"./chunk-IABM4BFJ.js";import{b as pe}from"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import{P as me}from"./chunk-46ZJ3TM4.js";import"./chunk-4L4WTGN5.js";import"./chunk-TGHH7ZFA.js";import"./chunk-5GFSKIB2.js";import{b as oe}from"./chunk-NCCAMFB6.js";import"./chunk-25NFR6EB.js";import{a as be}from"./chunk-5K2UDZLN.js";import"./chunk-ULIQFBZU.js";import"./chunk-GWW7SJR6.js";import"./chunk-35DM4JJG.js";import{a as ce}from"./chunk-4ZEL6BYL.js";import{c as ie}from"./chunk-KQFH6FFC.js";import"./chunk-XZCNX7YU.js";import"./chunk-FSRSK4LY.js";import"./chunk-2LN3T5HY.js";import{a as ue}from"./chunk-FKVZRPV5.js";import{d as U,r as de}from"./chunk-FODLDLE2.js";import{a as m,d as le,e as $e,f as Ce,g as Le,i as te}from"./chunk-YKXDMIHQ.js";var B=le(Ce(),1),O=le($e(),1);var s=le(Le(),1);var Te=.5,Me=4,Ie=m(n=>Math.min(100,Math.max(0,n)),"ce"),Pe=m((n,e)=>{if(!Number.isFinite(e)||e<=0)return{leftPercent:0,widthPercent:100};let t=Ie(n.offsetMs/e*100),a=n.durationMs/e*100,l=Math.max(Te,Math.min(Ie(a),100-t));return{leftPercent:t,widthPercent:l}},"Le"),Ke=m((n,e,t=!1)=>{let a=e.trim().toLowerCase(),l=t?n.filter(r=>!r.ok):n;return a===""?[...l]:l.filter(r=>r.rootName.toLowerCase().includes(a)||r.functionPath.toLowerCase().includes(a)||r.traceId.toLowerCase().includes(a)||r.spans.some(o=>o.name.toLowerCase().includes(a)||o.spanId.toLowerCase().includes(a)))},"Ce"),G=m(n=>Number.isFinite(n)?n>0&&n<1?`${n.toFixed(2)}ms`:`${String(Math.round(n))}ms`:"\u2014","q"),De=m(n=>!Number.isFinite(n)||n<=0?[]:Array.from({length:Me},(e,t)=>{let a=(t+1)/Me;return{label:G(n*a),percent:a*100}}),"Ee"),Se=m(n=>{if(typeof n=="string")return n;try{return JSON.stringify(n)}catch{return String(n)}},"ue"),ee=m(n=>{let e=(0,B.c)(7),{label:t,value:a}=n,l;e[0]!==t?(l=(0,s.jsx)("dt",{className:"w-40 shrink-0 text-muted-foreground",children:t}),e[0]=t,e[1]=l):l=e[1];let r;e[2]!==a?(r=(0,s.jsx)("dd",{className:"min-w-0 break-all",children:a}),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==l||e[5]!==r?(o=(0,s.jsxs)("div",{className:"flex gap-2",children:[l,r]}),e[4]=l,e[5]=r,e[6]=o):o=e[6],o},"Y"),Fe=m(n=>{let e=(0,B.c)(68),{span:t}=n,a=U(),l,r,o,d,i,u;if(e[0]!==t.attributes||e[1]!==t.durationMs||e[2]!==t.error||e[3]!==t.events||e[4]!==t.kind||e[5]!==t.offsetMs||e[6]!==t.parentSpanId||e[7]!==t.spanId||e[8]!==a){let $=Object.entries(t.attributes??{}),_;e[15]!==t.events?(_=t.events??[],e[15]=t.events,e[16]=_):_=e[16],l=_,r="border-t border-border bg-background/60 px-3 py-2 font-mono text-xs",o="tr-span-detail";let y;e[17]!==a?(y=a("Span ID"),e[17]=a,e[18]=y):y=e[18];let w;e[19]!==t.spanId||e[20]!==y?(w=(0,s.jsx)(ee,{label:y,value:t.spanId}),e[19]=t.spanId,e[20]=y,e[21]=w):w=e[21];let M;e[22]!==a?(M=a("Parent span ID"),e[22]=a,e[23]=M):M=e[23];let p;e[24]!==t.parentSpanId||e[25]!==a?(p=t.parentSpanId===""?a("\u2014 (trace root)"):t.parentSpanId,e[24]=t.parentSpanId,e[25]=a,e[26]=p):p=e[26];let h;e[27]!==p||e[28]!==M?(h=(0,s.jsx)(ee,{label:M,value:p}),e[27]=p,e[28]=M,e[29]=h):h=e[29];let b;e[30]!==a?(b=a("Kind"),e[30]=a,e[31]=b):b=e[31];let C=t.kind??"internal",S;e[32]!==b||e[33]!==C?(S=(0,s.jsx)(ee,{label:b,value:C}),e[32]=b,e[33]=C,e[34]=S):S=e[34];let I;e[35]!==a?(I=a("Started at"),e[35]=a,e[36]=I):I=e[36];let g;e[37]!==t.offsetMs||e[38]!==a?(g=a("+{offset}",{offset:G(t.offsetMs)}),e[37]=t.offsetMs,e[38]=a,e[39]=g):g=e[39];let x;e[40]!==I||e[41]!==g?(x=(0,s.jsx)(ee,{label:I,value:g}),e[40]=I,e[41]=g,e[42]=x):x=e[42];let k;e[43]!==a?(k=a("Duration"),e[43]=a,e[44]=k):k=e[44];let f;e[45]!==t.durationMs?(f=G(t.durationMs),e[45]=t.durationMs,e[46]=f):f=e[46];let N;e[47]!==k||e[48]!==f?(N=(0,s.jsx)(ee,{label:k,value:f}),e[47]=k,e[48]=f,e[49]=N):N=e[49],e[50]!==h||e[51]!==S||e[52]!==x||e[53]!==N||e[54]!==w?(d=(0,s.jsxs)("dl",{className:"flex flex-col gap-1",children:[w,h,S,x,N]}),e[50]=h,e[51]=S,e[52]=x,e[53]=N,e[54]=w,e[55]=d):d=e[55],e[56]!==t.error?(i=t.error!==void 0&&(0,s.jsxs)("div",{className:"mt-2 rounded-md border border-destructive/40 bg-destructive/10 px-2 py-1.5","data-testid":"tr-detail-error",children:[(0,s.jsx)("span",{className:"font-semibold text-destructive",children:t.error.type}),(0,s.jsx)("p",{className:"whitespace-pre-wrap break-all text-destructive",children:t.error.message})]}),e[56]=t.error,e[57]=i):i=e[57],u=$.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-attributes",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Attributes")}),(0,s.jsx)("dl",{className:"flex flex-col gap-1",children:$.map(je)})]}),e[0]=t.attributes,e[1]=t.durationMs,e[2]=t.error,e[3]=t.events,e[4]=t.kind,e[5]=t.offsetMs,e[6]=t.parentSpanId,e[7]=t.spanId,e[8]=a,e[9]=l,e[10]=r,e[11]=o,e[12]=d,e[13]=i,e[14]=u}else l=e[9],r=e[10],o=e[11],d=e[12],i=e[13],u=e[14];let c;e[58]!==l||e[59]!==a?(c=l.length>0&&(0,s.jsxs)("div",{className:"mt-2","data-testid":"tr-detail-events",children:[(0,s.jsx)("p",{className:"mb-1 text-muted-foreground",children:a("Events")}),(0,s.jsx)("ul",{className:"flex flex-col gap-1",children:l.map(Oe)})]}),e[58]=l,e[59]=a,e[60]=c):c=e[60];let v;return e[61]!==r||e[62]!==o||e[63]!==d||e[64]!==i||e[65]!==u||e[66]!==c?(v=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,i,u,c]}),e[61]=r,e[62]=o,e[63]=d,e[64]=i,e[65]=u,e[66]=c,e[67]=v):v=e[67],v},"Pe");function je(n){let[e,t]=n;return(0,s.jsx)(ee,{label:e,value:Se(t)},e)}m(je,"Fe");function Ee(n){let[e,t]=n;return`${e}=${Se(t)}`}m(Ee,"Ke");function Oe(n){return(0,s.jsxs)("li",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:de(n.ts)}),(0,s.jsx)(oe,{variant:"secondary",children:n.name}),(0,s.jsx)("span",{className:"min-w-0 break-all text-muted-foreground",children:Object.entries(n.attributes??{}).map(Ee).join(" ")})]},`${n.name}:${String(n.ts)}`)}m(Oe,"Ae");var Be=14,ke="grid grid-cols-[14rem_1fr_4rem_16rem_16rem] items-center gap-2 px-3",Re=m(n=>{let e=(0,B.c)(17),{traceDurationMs:t}=n,a,l,r,o,d,i;if(e[0]!==t){i=Symbol.for("react.early_return_sentinel");e:{let v=De(t);if(v.length===0){i=null;break e}e[7]===Symbol.for("react.memo_cache_sentinel")?(r=te(ke,"border-b border-border py-1 font-mono text-[10px] text-muted-foreground"),e[7]=r):r=e[7],o="tr-ruler",e[8]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsx)("span",{}),e[8]=d):d=e[8],a="relative h-3",l=v.map(ze)}e[0]=t,e[1]=a,e[2]=l,e[3]=r,e[4]=o,e[5]=d,e[6]=i}else a=e[1],l=e[2],r=e[3],o=e[4],d=e[5],i=e[6];if(i!==Symbol.for("react.early_return_sentinel"))return i;let u;e[9]!==a||e[10]!==l?(u=(0,s.jsx)("span",{className:a,children:l}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let c;return e[12]!==r||e[13]!==o||e[14]!==d||e[15]!==u?(c=(0,s.jsxs)("div",{className:r,"data-testid":o,children:[d,u]}),e[12]=r,e[13]=o,e[14]=d,e[15]=u,e[16]=c):c=e[16],c},"Re"),We=m(n=>{let e=(0,B.c)(60),{span:t,traceDurationMs:a}=n,l=U(),[r,o]=(0,O.useState)(!1),d;e[0]!==t||e[1]!==a?(d=Pe(t,a),e[0]=t,e[1]=a,e[2]=d):d=e[2];let{leftPercent:i,widthPercent:u}=d,c;e[3]!==t.attributes?(c=Ne(t.attributes),e[3]=t.attributes,e[4]=c):c=e[4];let v=c,$=t.depth*Be,_;e[5]!==$?(_={paddingLeft:$},e[5]=$,e[6]=_):_=e[6];let y=_,w=`${String(i)}%`,M=`${String(u)}%`,p;e[7]!==w||e[8]!==M?(p={left:w,width:M},e[7]=w,e[8]=M,e[9]=p):p=e[9];let h=p,b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=m(()=>{o(Je)},"h"),e[10]=b):b=e[10];let C=b,S=t.depth,I=`tr-span-detail-${t.spanId}`,g;e[11]!==t.durationMs||e[12]!==t.error||e[13]!==t.name||e[14]!==t.offsetMs||e[15]!==l?(g=l("{name}, {duration}, starts {offset} in{failure}",{duration:G(t.durationMs),failure:t.error===void 0?"":l(", failed: {message}",{message:t.error.message}),name:t.name,offset:G(t.offsetMs)}),e[11]=t.durationMs,e[12]=t.error,e[13]=t.name,e[14]=t.offsetMs,e[15]=l,e[16]=g):g=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=te(ke,"w-full border-b border-border py-1.5 text-left font-mono text-xs hover:bg-muted/50"),e[17]=x):x=e[17];let k=`tr-span-toggle-${t.spanId}`,f;e[18]!==t.ok?(f=t.ok?null:(0,s.jsx)("span",{"aria-hidden":"true",className:"mr-1 text-destructive","data-testid":"tr-span-error",children:"\u25CF"}),e[18]=t.ok,e[19]=f):f=e[19];let N;e[20]!==y||e[21]!==t.name||e[22]!==f?(N=(0,s.jsxs)("span",{className:"truncate",style:y,title:t.name,children:[f,t.name]}),e[20]=y,e[21]=t.name,e[22]=f,e[23]=N):N=e[23];let R=t.ok?"bg-primary/70":"bg-destructive",L;e[24]!==R?(L=te("absolute inset-y-0 rounded-sm",R),e[24]=R,e[25]=L):L=e[25];let E;e[26]!==h||e[27]!==i||e[28]!==L||e[29]!==u?(E=(0,s.jsx)("span",{"aria-hidden":"true",className:"relative h-3 overflow-hidden rounded-sm bg-muted",children:(0,s.jsx)("span",{className:L,"data-left":i,"data-testid":"tr-span-bar","data-width":u,style:h})}),e[26]=h,e[27]=i,e[28]=L,e[29]=u,e[30]=E):E=e[30];let W;e[31]!==t.durationMs?(W=G(t.durationMs),e[31]=t.durationMs,e[32]=W):W=e[32];let D;e[33]!==W?(D=(0,s.jsx)("span",{className:"text-right tabular-nums text-muted-foreground",children:W}),e[33]=W,e[34]=D):D=e[34];let q;e[35]!==t.error?(q=t.error===void 0?null:(0,s.jsx)("span",{className:"text-destructive","data-testid":"tr-span-error-message",title:t.error.message,children:`${t.error.type}: ${t.error.message}`}),e[35]=t.error,e[36]=q):q=e[36];let T;e[37]!==q?(T=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:q}),e[37]=q,e[38]=T):T=e[38];let z;e[39]!==v?(z=v===""?null:(0,s.jsx)("span",{"data-testid":"tr-span-attributes",title:v,children:v}),e[39]=v,e[40]=z):z=e[40];let P;e[41]!==z?(P=(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:z}),e[41]=z,e[42]=P):P=e[42];let J;e[43]!==r||e[44]!==I||e[45]!==g||e[46]!==k||e[47]!==N||e[48]!==E||e[49]!==D||e[50]!==T||e[51]!==P?(J=(0,s.jsxs)("button",{"aria-controls":I,"aria-expanded":r,"aria-label":g,className:x,"data-testid":k,onClick:C,type:"button",children:[N,E,D,T,P]}),e[43]=r,e[44]=I,e[45]=g,e[46]=k,e[47]=N,e[48]=E,e[49]=D,e[50]=T,e[51]=P,e[52]=J):J=e[52];let F;e[53]!==r||e[54]!==t?(F=r&&(0,s.jsx)("div",{id:`tr-span-detail-${t.spanId}`,children:(0,s.jsx)(Fe,{span:t})}),e[53]=r,e[54]=t,e[55]=F):F=e[55];let K;return e[56]!==t.depth||e[57]!==J||e[58]!==F?(K=(0,s.jsxs)("li",{"data-depth":S,"data-testid":"tr-span-row",children:[J,F]}),e[56]=t.depth,e[57]=J,e[58]=F,e[59]=K):K=e[59],K},"Be"),qe=m(n=>{let e=(0,B.c)(15),{durationMs:t,spans:a}=n,l=U(),r;e[0]!==t?(r=(0,s.jsx)(Re,{traceDurationMs:t}),e[0]=t,e[1]=r):r=e[1];let o;e[2]!==l?(o=l("Trace waterfall"),e[2]=l,e[3]=o):o=e[3];let d;if(e[4]!==t||e[5]!==a){let c;e[7]!==t?(c=m(v=>(0,s.jsx)(We,{span:v,traceDurationMs:t},v.spanId),"c"),e[7]=t,e[8]=c):c=e[8],d=a.map(c),e[4]=t,e[5]=a,e[6]=d}else d=e[6];let i;e[9]!==o||e[10]!==d?(i=(0,s.jsx)("ul",{"aria-label":o,children:d}),e[9]=o,e[10]=d,e[11]=i):i=e[11];let u;return e[12]!==r||e[13]!==i?(u=(0,s.jsxs)(s.Fragment,{children:[r,i]}),e[12]=r,e[13]=i,e[14]=u):u=e[14],u},"Oe");function ze(n){return(0,s.jsx)("span",{className:te("absolute inset-y-0 border-l border-border/70",n.percent===100?"-translate-x-full pr-1":"pl-1"),style:{left:`${String(n.percent)}%`},children:n.label},n.percent)}m(ze,"je");function Je(n){return!n}m(Je,"We");var Ue=m(n=>Array.isArray(n?.traces)?n.traces:[],"Ue"),Ge=m(n=>{let e=(0,B.c)(12),{entries:t}=n,a=U(),l;e[0]!==t.length||e[1]!==a?(l=a("Logs ({count})",{count:t.length}),e[0]=t.length,e[1]=a,e[2]=l):l=e[2];let r;e[3]!==l?(r=(0,s.jsx)("p",{className:"mb-1 font-mono text-xs text-muted-foreground",children:l}),e[3]=l,e[4]=r):r=e[4];let o;e[5]!==t?(o=t.map(Qe),e[5]=t,e[6]=o):o=e[6];let d;e[7]!==o?(d=(0,s.jsx)("div",{role:"grid",children:o}),e[7]=o,e[8]=d):d=e[8];let i;return e[9]!==r||e[10]!==d?(i=(0,s.jsxs)("div",{className:"border-t border-border px-3 py-2","data-testid":"tr-logs",children:[r,d]}),e[9]=r,e[10]=d,e[11]=i):i=e[11],i},"qe"),He=m(n=>{let e=(0,B.c)(50),{expanded:t,logs:a,onToggle:l,trace:r}=n,o=U(),d;e[0]!==l||e[1]!==r.traceId?(d=m(()=>{l(r.traceId)},"i"),e[0]=l,e[1]=r.traceId,e[2]=d):d=e[2];let i=d,u=`tr-row-${r.traceId}`,c=`tr-waterfall-${r.traceId}`,v=`tr-toggle-${r.traceId}`,$=t?"\u25BE":"\u25B8",_;e[3]!==$?(_=(0,s.jsx)("span",{"aria-hidden":"true",className:"w-3 shrink-0 text-xs text-muted-foreground",children:$}),e[3]=$,e[4]=_):_=e[4];let y;e[5]!==r.rootName?(y=(0,s.jsx)("span",{className:"w-56 shrink-0 truncate text-sm font-medium",title:r.rootName,children:r.rootName}),e[5]=r.rootName,e[6]=y):y=e[6];let w;e[7]!==r.functionPath?(w=(0,s.jsx)("span",{className:"w-48 shrink-0 truncate font-mono text-xs text-muted-foreground",title:r.functionPath,children:r.functionPath}),e[7]=r.functionPath,e[8]=w):w=e[8];let M;e[9]!==r.durationMs?(M=G(r.durationMs),e[9]=r.durationMs,e[10]=M):M=e[10];let p;e[11]!==M?(p=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:M}),e[11]=M,e[12]=p):p=e[12];let h;e[13]!==o||e[14]!==r.spans.length?(h=o("{count} spans",{count:r.spans.length}),e[13]=o,e[14]=r.spans.length,e[15]=h):h=e[15];let b;e[16]!==h?(b=(0,s.jsx)("span",{className:"w-20 shrink-0 text-right font-mono text-xs tabular-nums text-muted-foreground",children:h}),e[16]=h,e[17]=b):b=e[17];let C=r.ok?"secondary":"destructive",S;e[18]!==o||e[19]!==r.ok?(S=r.ok?o("ok"):o("error"),e[18]=o,e[19]=r.ok,e[20]=S):S=e[20];let I;e[21]!==C||e[22]!==S?(I=(0,s.jsx)("span",{className:"shrink-0",children:(0,s.jsx)(oe,{variant:C,children:S})}),e[21]=C,e[22]=S,e[23]=I):I=e[23];let g;e[24]!==r.startTs?(g=de(r.startTs),e[24]=r.startTs,e[25]=g):g=e[25];let x;e[26]!==g?(x=(0,s.jsx)("span",{className:"flex-1 truncate text-right font-mono text-xs tabular-nums text-muted-foreground",children:g}),e[26]=g,e[27]=x):x=e[27];let k;e[28]!==t||e[29]!==i||e[30]!==p||e[31]!==b||e[32]!==I||e[33]!==x||e[34]!==c||e[35]!==v||e[36]!==_||e[37]!==y||e[38]!==w?(k=(0,s.jsxs)("button",{"aria-controls":c,"aria-expanded":t,className:"flex w-full items-center gap-3 px-3 py-2 text-left hover:bg-muted/50","data-testid":v,onClick:i,type:"button",children:[_,y,w,p,b,I,x]}),e[28]=t,e[29]=i,e[30]=p,e[31]=b,e[32]=I,e[33]=x,e[34]=c,e[35]=v,e[36]=_,e[37]=y,e[38]=w,e[39]=k):k=e[39];let f;e[40]!==t||e[41]!==a||e[42]!==r.durationMs||e[43]!==r.spans||e[44]!==r.traceId?(f=t&&(0,s.jsxs)("div",{className:"bg-muted/20","data-testid":`tr-waterfall-${r.traceId}`,id:`tr-waterfall-${r.traceId}`,children:[(0,s.jsx)(qe,{durationMs:r.durationMs,spans:r.spans}),a.length>0&&(0,s.jsx)(Ge,{entries:a})]}),e[40]=t,e[41]=a,e[42]=r.durationMs,e[43]=r.spans,e[44]=r.traceId,e[45]=f):f=e[45];let N;return e[46]!==k||e[47]!==f||e[48]!==u?(N=(0,s.jsxs)("div",{className:"border-b border-border last:border-b-0","data-testid":u,children:[k,f]}),e[46]=k,e[47]=f,e[48]=u,e[49]=N):N=e[49],N},"ze"),ft=m(n=>{let e=(0,B.c)(58),{initialShardKey:t}=n,a=U(),[l]=(0,O.useState)(ve),{queryShardKey:r,setShardKey:o,shardKey:d}=fe(l?.shardKey!==void 0&&l.shardKey!==""?l.shardKey:t??""),[i,u]=(0,O.useState)(l?.traceId??""),[c,v]=(0,O.useState)(!1),[$,_]=(0,O.useState)(Ae),y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[0]=y):y=e[0],(0,O.useEffect)(Ve,y);let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w={},e[1]=w):w=e[1];let M;e[2]!==r?(M={live:!0,shardKey:r},e[2]=r,e[3]=M):M=e[3];let{data:p,error:h,errorSource:b,isLoading:C,liveError:S}=ie(ce.getTraces,w,M),I;e[4]===Symbol.for("react.memo_cache_sentinel")?(I={},e[4]=I):I=e[4];let g=$.size>0,x;e[5]!==r||e[6]!==g?(x={enabled:g,live:!0,shardKey:r},e[5]=r,e[6]=g,e[7]=x):x=e[7];let{data:k}=ie(ce.getLogs,I,x),f,N;e[8]!==p||e[9]!==r?(f=m(()=>{p!==void 0&&pe(r)},"p"),N=[p,r],e[8]=p,e[9]=r,e[10]=f,e[11]=N):(f=e[10],N=e[11]),(0,O.useEffect)(f,N);let R;if(e[12]!==p||e[13]!==h||e[14]!==b||e[15]!==$||e[16]!==C||e[17]!==S||e[18]!==k?.entries||e[19]!==c||e[20]!==i||e[21]!==o||e[22]!==d||e[23]!==a){let L=Ue(p),E=p?.total??L.length,W=E>L.length,D=Ke(L,i,c),q=Map.groupBy((k?.entries??[]).toReversed(),Xe),T;e[25]===Symbol.for("react.memo_cache_sentinel")?(T=m(j=>{u(j.target.value)},"C"),e[25]=T):T=e[25];let z=T,P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=m(j=>{_(_e=>{let ne=new Set(_e);return ne.has(j)?ne.delete(j):ne.add(j),ne})},"E"),e[26]=P):P=e[26];let J=P,F=h===null&&D.length===0&&!C,K;e[27]!==o||e[28]!==d?(K=(0,s.jsx)(he,{onChange:o,testId:"tr-shard-input",value:d}),e[27]=o,e[28]=d,e[29]=K):K=e[29];let H;e[30]!==a?(H=a("Search traces"),e[30]=a,e[31]=H):H=e[31];let Q;e[32]!==a?(Q=a("search trace, span, or function"),e[32]=a,e[33]=Q):Q=e[33];let A;e[34]!==i||e[35]!==H||e[36]!==Q?(A=(0,s.jsx)(me,{"aria-label":H,className:"h-8 w-56","data-testid":"tr-search",onChange:z,placeholder:Q,value:i}),e[34]=i,e[35]=H,e[36]=Q,e[37]=A):A=e[37];let V;e[38]!==c?(V=(0,s.jsx)(ge,{checked:c,"data-testid":"tr-only-errors",id:"tr-only-errors",onCheckedChange:v}),e[38]=c,e[39]=V):V=e[39];let X;e[40]!==a?(X=a("Errors only"),e[40]=a,e[41]=X):X=e[41];let Y;e[42]!==V||e[43]!==X?(Y=(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",htmlFor:"tr-only-errors",children:[V,X]}),e[42]=V,e[43]=X,e[44]=Y):Y=e[44];let Z;e[45]!==S?(Z=(0,s.jsx)(xe,{message:S,prefix:"tr"}),e[45]=S,e[46]=Z):Z=e[46];let re;e[47]!==K||e[48]!==A||e[49]!==Y||e[50]!==Z?(re=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[K,A,Y,Z]}),e[47]=K,e[48]=A,e[49]=Y,e[50]=Z,e[51]=re):re=e[51];let ae;e[52]!==h||e[53]!==b?(ae=h!==null&&(0,s.jsx)(be,{error:b,testId:"tr-error"}),e[52]=h,e[53]=b,e[54]=ae):ae=e[54];let se;e[55]!==F||e[56]!==a?(se=F&&(0,s.jsx)(ue,{description:a("Traces recorded with ctx.trace show up here as your app handles traffic. The span buffer resets when the shard hibernates."),icon:(0,s.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M4 6h10M7 12h13M10 18h7"})}),testId:"tr-empty",title:a("No traces")}),e[55]=F,e[56]=a,e[57]=se):se=e[57],R=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-traces-panel",children:[re,ae,se,h===null&&W&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"tr-truncated",children:a("Showing the {shown} most recent of {total} traces in the buffer.",{shown:L.length,total:E})}),h===null&&D.length>0&&(0,s.jsx)("div",{"aria-label":a("Recent traces"),className:"overflow-hidden rounded-xl border border-border shadow-xs","data-testid":"tr-list",children:D.map(j=>(0,s.jsx)(He,{expanded:$.has(j.traceId),logs:q.get(j.traceId)??[],onToggle:J,trace:j},j.traceId))})]}),e[12]=p,e[13]=h,e[14]=b,e[15]=$,e[16]=C,e[17]=S,e[18]=k?.entries,e[19]=c,e[20]=i,e[21]=o,e[22]=d,e[23]=a,e[24]=R}else R=e[24];return R},"gt");function Qe(n,e){return(0,s.jsx)("div",{className:"flex items-center border-b border-border py-1 font-mono text-xs last:border-b-0","data-testid":"tr-log-row",role:"row",children:(0,s.jsx)(we,{entry:n})},`${String(e)}:${String(n.timestamp)}`)}m(Qe,"Ge");function Ae(){return new Set}m(Ae,"He");function Ve(){ye()}m(Ve,"Je");function Xe(n){return n.traceId}m(Xe,"Qe");export{ft as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-OGUKYRFM.js";import{P as j}from"./chunk-46ZJ3TM4.js";import{d as b}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-OGUKYRFM.js";import{P as j}from"./chunk-46ZJ3TM4.js";import{d as b}from"./chunk-FODLDLE2.js";import{a as m,d as S,e as w,f as $,g as A}from"./chunk-YKXDMIHQ.js";var y=S($(),1),h=S(w(),1);var a=S(A(),1);var z=m(i=>{let t=(0,y.c)(21),{id:f,onChange:g,testId:e,value:v}=i,s=b(),u=(0,h.useId)(),[d]=(0,h.useState)(F),c;t[0]!==g?(c=m(C=>{g(C.target.value)},"d"),t[0]=g,t[1]=c):c=t[1];let I=c,o;t[2]!==s?(o=s("Shard key"),t[2]=s,t[3]=o):o=t[3];let x=d.length>0?u:void 0,r;t[4]!==s?(r=s("shard key (optional)"),t[4]=s,t[5]=r):r=t[5];let l;t[6]!==f||t[7]!==I||t[8]!==o||t[9]!==x||t[10]!==r||t[11]!==e||t[12]!==v?(l=(0,a.jsx)(j,{"aria-label":o,className:"h-8 w-48","data-testid":e,id:f,list:x,onChange:I,placeholder:r,value:v}),t[6]=f,t[7]=I,t[8]=o,t[9]=x,t[10]=r,t[11]=e,t[12]=v,t[13]=l):l=t[13];let n;t[14]!==u||t[15]!==d||t[16]!==e?(n=d.length>0&&(0,a.jsx)("datalist",{"data-testid":`${e}-recents`,id:u,children:d.map(N)}),t[14]=u,t[15]=d,t[16]=e,t[17]=n):n=t[17];let p;return t[18]!==l||t[19]!==n?(p=(0,a.jsxs)(a.Fragment,{children:[l,n]}),t[18]=l,t[19]=n,t[20]=p):p=t[20],p},"A");function F(){return k()}m(F,"$");function N(i){return(0,a.jsx)("option",{"aria-label":i,value:i},i)}m(N,"w");export{z as a};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as D,b as V,c as q,d as J,e as
|
|
2
|
-
`)},"ee"),oe=m(l=>JSON.stringify(l,
|
|
3
|
-
`);t.push(`INSERT INTO ${
|
|
1
|
+
import{a as D,b as V,c as q,d as J,e as O,f as _,g as A,h as K}from"./chunk-TJRQUJFS.js";import{a as W}from"./chunk-XZMOZFE6.js";import{a as Q}from"./chunk-SU737V7V.js";import{d as L,m as F,n as E,o as G,q as H}from"./chunk-FODLDLE2.js";import{a as m,d as I,e as Y,f as Z,g as ee}from"./chunk-YKXDMIHQ.js";var R=I(Z(),1),U=I(Y(),1);var $="inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",be=`${$} aria-pressed:bg-accent aria-pressed:text-accent-foreground`;var s=I(ee(),1);var z=m(l=>`"${l.replaceAll('"','""')}"`,"V"),te=/["\n,]/u,le=/^[=+\-@\t\r]/u,P=m(l=>{if(l==null)return"";let e;return typeof l=="string"?e=le.test(l)?` ${l}`:l:typeof l=="number"||typeof l=="boolean"||typeof l=="bigint"?e=String(l):e=E(l),te.test(e)?`"${e.replaceAll('"','""')}"`:e},"q"),ne=m((l,e)=>{let n=l.map(t=>P(t)).join(","),a=e.map(t=>l.map(o=>P(t[o])).join(","));return[n,...a].join(`
|
|
2
|
+
`)},"ee"),oe=m(l=>JSON.stringify(l,F,2),"te"),X=500,ae=m(l=>l==null?"NULL":typeof l=="number"?Number.isFinite(l)?String(l):"NULL":typeof l=="bigint"?String(l):typeof l=="boolean"?l?"1":"0":`'${(typeof l=="string"?l:E(l)).replaceAll("'","''")}'`,"le"),re=m((l,e,n)=>{if(e.length===0||n.length===0)return"";let a=e.map(o=>z(o)).join(", "),t=[];for(let o=0;o<n.length;o+=X){let i=n.slice(o,o+X).map(r=>` (${e.map(d=>ae(r[d])).join(", ")})`).join(`,
|
|
3
|
+
`);t.push(`INSERT INTO ${z(l)} (${a}) VALUES
|
|
4
4
|
${i};`)}return t.join(`
|
|
5
5
|
|
|
6
|
-
`)},"oe"),M=m((l,e,n)=>{if(!("document"in globalThis))return;let a=globalThis.URL.createObjectURL(new globalThis.Blob([e],{type:n})),t=globalThis.document.createElement("a");t.href=a,t.download=l,globalThis.document.body.append(t),t.click(),t.remove(),globalThis.URL.revokeObjectURL(a)},"
|
|
6
|
+
`)},"oe"),M=m((l,e,n)=>{if(!("document"in globalThis))return;let a=globalThis.URL.createObjectURL(new globalThis.Blob([e],{type:n})),t=globalThis.document.createElement("a");t.href=a,t.download=l,globalThis.document.body.append(t),t.click(),t.remove(),globalThis.URL.revokeObjectURL(a)},"A"),se=m(l=>{let e=(0,R.c)(36),{columns:n,name:a,rows:t}=l,o=L(),i;e[0]!==n||e[1]!==a||e[2]!==t?(i=m(()=>{M(`${a}.csv`,ne(n,t),"text/csv;charset=utf-8")},"r"),e[0]=n,e[1]=a,e[2]=t,e[3]=i):i=e[3];let r=i,d;e[4]!==a||e[5]!==t?(d=m(()=>{M(`${a}.json`,oe(t),"application/json")},"a"),e[4]=a,e[5]=t,e[6]=d):d=e[6];let b=d,u;e[7]!==n||e[8]!==a||e[9]!==t?(u=m(()=>{M(`${a}.sql`,re(a,n,t),"application/sql;charset=utf-8")},"f"),e[7]=n,e[8]=a,e[9]=t,e[10]=u):u=e[10];let c=u,x=t.length===0,p;e[11]!==x?(p=(0,s.jsx)(V,{className:$,"data-testid":"grid-export",disabled:x,title:"Exports only the rows loaded on the current page, not the whole table",children:"Export page"}),e[11]=x,e[12]=p):p=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=(0,s.jsx)(O,{children:"Export loaded rows"}),e[13]=h):h=e[13];let g;e[14]!==o?(g=o("CSV"),e[14]=o,e[15]=g):g=e[15];let y;e[16]!==r||e[17]!==g?(y=(0,s.jsx)(_,{"data-testid":"grid-export-csv",onClick:r,children:g}),e[16]=r,e[17]=g,e[18]=y):y=e[18];let w;e[19]!==o?(w=o("JSON"),e[19]=o,e[20]=w):w=e[20];let k;e[21]!==b||e[22]!==w?(k=(0,s.jsx)(_,{"data-testid":"grid-export-json",onClick:b,children:w}),e[21]=b,e[22]=w,e[23]=k):k=e[23];let N;e[24]!==o?(N=o("SQL"),e[24]=o,e[25]=N):N=e[25];let f;e[26]!==c||e[27]!==N?(f=(0,s.jsx)(_,{"data-testid":"grid-export-sql",onClick:c,children:N}),e[26]=c,e[27]=N,e[28]=f):f=e[28];let C;e[29]!==k||e[30]!==f||e[31]!==y?(C=(0,s.jsxs)(q,{align:"end",children:[h,y,k,f]}),e[29]=k,e[30]=f,e[31]=y,e[32]=C):C=e[32];let v;return e[33]!==C||e[34]!==p?(v=(0,s.jsxs)(D,{children:[p,C]}),e[33]=C,e[34]=p,e[35]=v):v=e[35],v},"ne"),ie=m(l=>{let e=(0,R.c)(9),{column:n}=l,a;e[0]!==n?(a=m(()=>{n.toggleVisibility()},"s"),e[0]=n,e[1]=a):a=e[1];let t=a,o;e[2]!==n?(o=n.getIsVisible(),e[2]=n,e[3]=o):o=e[3];let i=`grid-column-${n.id}`,r;return e[4]!==n.id||e[5]!==t||e[6]!==o||e[7]!==i?(r=(0,s.jsx)(A,{checked:o,closeOnClick:!1,"data-testid":i,onCheckedChange:t,children:n.id}),e[4]=n.id,e[5]=t,e[6]=o,e[7]=i,e[8]=r):r=e[8],r},"se"),ce=[],de=m(({backRelations:l=ce,enabledBackRelations:e,onToggleBackRelation:n,table:a})=>{let t=L(),o=a.getIsAllColumnsVisible(),i=m(()=>{a.toggleAllColumnsVisible(!o)},"r");return(0,s.jsxs)(D,{children:[(0,s.jsx)(V,{className:$,"data-testid":"grid-columns",children:t("Columns")}),(0,s.jsxs)(q,{align:"end",className:"max-h-80 overflow-y-auto",children:[(0,s.jsxs)(J,{children:[(0,s.jsx)(O,{children:t("Columns")}),(0,s.jsx)(A,{checked:o,closeOnClick:!1,"data-testid":"grid-columns-all",onCheckedChange:i,children:t(o?"Hide all":"Show all")}),(0,s.jsx)(K,{}),a.getAllLeafColumns().filter(r=>!r.id.startsWith("__back__:")).map(r=>(0,s.jsx)(ie,{column:r},r.id))]}),l.length>0&&n!==void 0&&(0,s.jsxs)(J,{children:[(0,s.jsx)(K,{}),(0,s.jsx)(O,{children:t("Related")}),l.map(r=>{let d=`${r.table}.${r.column}`;return(0,s.jsx)(A,{checked:e?.has(d)===!0,closeOnClick:!1,"data-testid":`grid-back-relation-${d}`,onCheckedChange:m(()=>{n(d)},"onCheckedChange"),children:`\u2190 ${r.table}.${r.column}`},d)})]})]})]})},"re"),me=m(l=>{let e=(0,R.c)(19),{count:n,editable:a,onClear:t,onDelete:o}=l,i=L(),r;e[0]!==n||e[1]!==i?(r=i("{count} selected",{count:n}),e[0]=n,e[1]=i,e[2]=r):r=e[2];let d;e[3]!==r?(d=(0,s.jsx)("span",{className:"font-medium tabular-nums","data-testid":"grid-selection-count",children:r}),e[3]=r,e[4]=d):d=e[4];let b;e[5]!==i?(b=i("Clear"),e[5]=i,e[6]=b):b=e[6];let u;e[7]!==t||e[8]!==b?(u=(0,s.jsx)("button",{className:$,"data-testid":"grid-selection-clear",onClick:t,type:"button",children:b}),e[7]=t,e[8]=b,e[9]=u):u=e[9];let c;e[10]!==n||e[11]!==a||e[12]!==o||e[13]!==i?(c=a&&(0,s.jsx)(Q,{confirmLabel:i("Delete {count} rows?",{count:n}),onConfirm:o,testId:"grid-selection-delete",children:i("Delete {count}",{count:n})}),e[10]=n,e[11]=a,e[12]=o,e[13]=i,e[14]=c):c=e[14];let x;return e[15]!==d||e[16]!==u||e[17]!==c?(x=(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-border bg-accent/40 px-3 py-1.5 text-xs","data-testid":"grid-selection-bar",children:[d,u,c]}),e[15]=d,e[16]=u,e[17]=c,e[18]=x):x=e[18],x},"ce"),ue=/\.(?:avif|bmp|gif|ico|jpe?g|png|svg|webp)$/iu,ge=m(l=>{let e=(0,R.c)(9),{bucket:n,objectKey:a,resolveUrl:t}=l,[o,i]=(0,U.useState)(null),[r,d]=(0,U.useState)(!1),b,u;e[0]!==n||e[1]!==a||e[2]!==t?(b=m(()=>{let h={cancelled:!1};return G((async()=>{try{let g=await t(a,n);h.cancelled||i(g)}catch{h.cancelled||d(!0)}})()),()=>{h.cancelled=!0}},"u"),u=[n,a,t],e[0]=n,e[1]=a,e[2]=t,e[3]=b,e[4]=u):(b=e[3],u=e[4]),(0,U.useEffect)(b,u);let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=m(()=>{d(!0)},"c"),e[5]=c):c=e[5];let x=c;if(o===null||r)return null;let p;return e[6]!==a||e[7]!==o?(p=(0,s.jsx)("div",{className:"flex max-h-64 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted/30",children:(0,s.jsx)("img",{alt:a,className:"max-h-64 object-contain","data-testid":"grid-cell-image",onError:x,src:o})}),e[6]=a,e[7]=o,e[8]=p):p=e[8],p},"de"),we=m(l=>{let e=(0,R.c)(37),{bucket:n,column:a,onClose:t,resolveUrl:o,value:i}=l,r=L(),[d,b]=(0,U.useState)(!1),u;e[0]!==i?(u=E(i),e[0]=i,e[1]=u):u=e[1];let c=u,x;e[2]!==c?(x=m(()=>{H(c)&&b(!0)},"C"),e[2]=c,e[3]=x):x=e[3];let p=x,h;e[4]!==r?(h=r("Cell value"),e[4]=r,e[5]=h):h=e[5];let g;e[6]!==a?(g=(0,s.jsx)("h2",{className:"truncate font-mono text-sm font-semibold text-foreground",children:a}),e[6]=a,e[7]=g):g=e[7];let y;e[8]!==d||e[9]!==r?(y=r(d?"Copied":"Copy"),e[8]=d,e[9]=r,e[10]=y):y=e[10];let w;e[11]!==p||e[12]!==y?(w=(0,s.jsx)("button",{className:$,"data-testid":"grid-cell-copy",onClick:p,type:"button",children:y}),e[11]=p,e[12]=y,e[13]=w):w=e[13];let k;e[14]!==r?(k=r("Close"),e[14]=r,e[15]=k):k=e[15];let N;e[16]!==t||e[17]!==k?(N=(0,s.jsx)("button",{className:$,"data-testid":"grid-cell-close",onClick:t,type:"button",children:k}),e[16]=t,e[17]=k,e[18]=N):N=e[18];let f;e[19]!==w||e[20]!==N?(f=(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[w,N]}),e[19]=w,e[20]=N,e[21]=f):f=e[21];let C;e[22]!==g||e[23]!==f?(C=(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[g,f]}),e[22]=g,e[23]=f,e[24]=C):C=e[24];let v;e[25]!==n||e[26]!==o||e[27]!==i?(v=o!==void 0&&typeof i=="string"&&ue.test(i)&&(0,s.jsx)(ge,{bucket:n,objectKey:i,resolveUrl:o}),e[25]=n,e[26]=o,e[27]=i,e[28]=v):v=e[28];let j;e[29]!==c?(j=(0,s.jsx)("pre",{className:"min-h-0 flex-1 overflow-auto rounded-md border border-border bg-muted/30 p-3 font-mono text-xs whitespace-pre-wrap","data-testid":"grid-cell-value",children:c}),e[29]=c,e[30]=j):j=e[30];let S;return e[31]!==t||e[32]!==C||e[33]!==v||e[34]!==j||e[35]!==h?(S=(0,s.jsxs)(W,{className:"max-h-[70vh] w-[min(40rem,90vw)]",label:h,onClose:t,panelTestId:"grid-cell-dialog",testId:"grid-cell-dialog-overlay",variant:"dialog",children:[C,v,j]}),e[31]=t,e[32]=C,e[33]=v,e[34]=j,e[35]=h,e[36]=S):S=e[36],S},"ye"),Ne=m(l=>{let e=(0,R.c)(36),{backRelations:n,enabledBackRelations:a,onToggleBackRelation:t,columns:o,editable:i,name:r,onBulkDelete:d,onToggleTranspose:b,rows:u,table:c,transposed:x}=l,p=L(),h;e[0]!==c?(h=c.getSelectedRowModel(),e[0]=c,e[1]=h):h=e[1];let g=h.rows,y;e[2]!==c?(y=m(()=>{c.resetRowSelection()},"w"),e[2]=c,e[3]=y):y=e[3];let w=y,k;e[4]!==d||e[5]!==g||e[6]!==c?(k=m(()=>{d(g.map(pe)),c.resetRowSelection()},"x"),e[4]=d,e[5]=g,e[6]=c,e[7]=k):k=e[7];let N=k,f;e[8]!==o||e[9]!==r||e[10]!==u?(f=(0,s.jsx)(se,{columns:o,name:r,rows:u}),e[8]=o,e[9]=r,e[10]=u,e[11]=f):f=e[11];let C;e[12]!==n||e[13]!==a||e[14]!==t||e[15]!==c?(C=(0,s.jsx)(de,{backRelations:n,enabledBackRelations:a,onToggleBackRelation:t,table:c}),e[12]=n,e[13]=a,e[14]=t,e[15]=c,e[16]=C):C=e[16];let v;e[17]!==p?(v=p("Swap rows and columns"),e[17]=p,e[18]=v):v=e[18];let j;e[19]!==p?(j=p("Transpose"),e[19]=p,e[20]=j):j=e[20];let S;e[21]!==b||e[22]!==v||e[23]!==j||e[24]!==x?(S=(0,s.jsx)("button",{"aria-pressed":x,className:$,"data-testid":"grid-transpose",onClick:b,title:v,type:"button",children:j}),e[21]=b,e[22]=v,e[23]=j,e[24]=x,e[25]=S):S=e[25];let T;e[26]!==i||e[27]!==w||e[28]!==N||e[29]!==g.length?(T=g.length>0&&(0,s.jsx)(me,{count:g.length,editable:i,onClear:w,onDelete:N}),e[26]=i,e[27]=w,e[28]=N,e[29]=g.length,e[30]=T):T=e[30];let B;return e[31]!==f||e[32]!==C||e[33]!==S||e[34]!==T?(B=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5","data-testid":"grid-actions",children:[f,C,S,T]}),e[31]=f,e[32]=C,e[33]=S,e[34]=T,e[35]=B):B=e[35],B},"Ne");function pe(l){return l.id}m(pe,"fe");export{$ as a,be as b,se as c,me as d,we as e,Ne as f};
|