react-semaphor 0.1.609 → 0.1.610

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.
Files changed (56) hide show
  1. package/dist/assistant-context/index.js +1 -1
  2. package/dist/brand-studio/index.js +2 -2
  3. package/dist/briefings/index.js +1 -1
  4. package/dist/chunks/appearance-provider-CxsEFvNA.js +703 -0
  5. package/dist/chunks/{assistant-chat-DAmFZEnD.js → assistant-chat-BqdXuU42.js} +5 -5
  6. package/dist/chunks/{bookmark-impact-BEVaXjug.js → bookmark-impact-BAYpeKb-.js} +1 -1
  7. package/dist/chunks/{bookmark-state-DnkzIsyw.js → bookmark-state-B3lDH0E_.js} +1 -1
  8. package/dist/chunks/{brand-BjC1mPjw.js → brand-9AazkIHH.js} +1 -1
  9. package/dist/chunks/{card-filter-builder-BGIVEHmJ.js → card-filter-builder-CpSD-8yA.js} +3 -3
  10. package/dist/chunks/{check-input-qgwboKei.js → check-input-D36evEN2.js} +1 -1
  11. package/dist/chunks/{currency-presentation-binding-ClrH_6Tq.js → currency-presentation-binding-CUh82q48.js} +1 -1
  12. package/dist/chunks/{custom-visual-inputs-CoAs_73N.js → custom-visual-inputs-obG5lDlW.js} +1 -1
  13. package/dist/chunks/{custom-visual-write-BWApKrHe.js → custom-visual-write-fOcTV3dl.js} +1 -1
  14. package/dist/chunks/{dashboard-DbBgEesz.js → dashboard-BVYXrYaU.js} +1 -1
  15. package/dist/chunks/{dashboard-briefing-launcher-DadG4ES9.js → dashboard-briefing-launcher-CVjONGRj.js} +6 -6
  16. package/dist/chunks/{dashboard-controls-CyQg_GC1.js → dashboard-controls-Cca_ra4d.js} +5 -5
  17. package/dist/chunks/{dashboard-json-ZSAQQkcR.js → dashboard-json-CUHyo-if.js} +1 -1
  18. package/dist/chunks/{dashboard-temporal-snapshot-BSTfqT29.js → dashboard-temporal-snapshot-DyRl61Yv.js} +1 -1
  19. package/dist/chunks/dates-Cym78NYg.js +1 -0
  20. package/dist/chunks/{edit-dashboard-visual-DIF1fllI.js → edit-dashboard-visual-DRLguKmV.js} +3 -3
  21. package/dist/chunks/filter-reach-preview-IFwTq7Hh.js +1 -0
  22. package/dist/chunks/{kpi-trend-rule-B4ebKzNj.js → kpi-trend-rule-DSVBCJDV.js} +1 -1
  23. package/dist/chunks/{layout-grid-Cs350bW-.js → layout-grid-Ctnv2-au.js} +1 -1
  24. package/dist/chunks/{metric-formatting-toJrRqu4.js → metric-formatting-BhmZiuD8.js} +1 -1
  25. package/dist/chunks/{palette-DpLPXjUd.js → palette-Bg_6xero.js} +1 -1
  26. package/dist/chunks/{report-preferences-dialog-DEfUYExu.js → report-preferences-dialog-DQNwImoN.js} +1 -1
  27. package/dist/chunks/resolve-dashboard-input-context-Djm2WgEF.js +8 -0
  28. package/dist/chunks/{sandbox-host-BqcLSoTV.js → sandbox-host-BnadJPB9.js} +1 -1
  29. package/dist/chunks/{saved-dashboard-context-GjEJuDjj.js → saved-dashboard-context-EwdvXIE6.js} +1 -1
  30. package/dist/chunks/semaphor-ready-indicator-BJR23T8j.js +532 -0
  31. package/dist/chunks/{slider-C2nbml5r.js → slider-DD5nxK4N.js} +5 -5
  32. package/dist/chunks/{stored-dashboard-CTwrNvBy.js → stored-dashboard--6xPxYpX.js} +1 -1
  33. package/dist/chunks/{table-cell-text-DJe6I1G3.js → table-cell-text-C5J5E_Am.js} +1 -1
  34. package/dist/chunks/{variable-draft-DAVLIY3l.js → variable-draft-C8xXjy0M.js} +1 -1
  35. package/dist/dashboard/index.js +1 -1
  36. package/dist/dashboard-authoring/index.js +1 -1
  37. package/dist/extensions/index.js +1 -1
  38. package/dist/index.js +1 -1
  39. package/dist/style.css +1 -1
  40. package/dist/surfboard/index.js +1 -1
  41. package/dist/types/briefings/index.d.ts +1 -1
  42. package/dist/types/briefings/run-failures.d.ts +67 -0
  43. package/dist/types/components/visual/data-table/column-display/link-fields.d.ts +29 -0
  44. package/dist/types/components/visual/data-table/types/data-table.d.ts +6 -1
  45. package/dist/types/index.js +1 -1
  46. package/dist/types/lib/types/briefing-types.d.ts +4 -0
  47. package/dist/types/shared/dashboard-authoring/card-settings/column-display.d.ts +0 -2
  48. package/dist/types/shared/dashboard-authoring/sheet-kinds.d.ts +7 -0
  49. package/dist/types/shared/usage-events/details.d.ts +2 -2
  50. package/package.json +7 -5
  51. package/dist/chunks/appearance-provider-BW022_Qu.js +0 -613
  52. package/dist/chunks/filter-reach-preview-CfbwaLf4.js +0 -1
  53. package/dist/chunks/resolve-dashboard-input-context-Dm4PD8Gx.js +0 -8
  54. package/dist/chunks/semaphor-ready-indicator-BViyPq5k.js +0 -622
  55. package/dist/chunks/set-q-2M4nis.js +0 -1
  56. package/dist/types/briefings/run-outcomes.d.ts +0 -6
@@ -1 +1 @@
1
- import{t as se,M as ne,T as re,s as ae,V as ie,q as le,m as ce,k as de,r as me}from"../chunks/resolve-dashboard-input-context-Dm4PD8Gx.js";import{s as B}from"../chunks/check-input-qgwboKei.js";import{c as fe,e as ue,a as pe,v as ge}from"../chunks/check-input-qgwboKei.js";import{c as D,r as G,t as R,a as V}from"../chunks/sandbox-host-BqcLSoTV.js";import{f as we,e as be,b as ve,d as Se}from"../chunks/sandbox-host-BqcLSoTV.js";import{w as xe}from"../chunks/table-cell-text-DJe6I1G3.js";import{c as _}from"../chunks/compiler-XErOfUUx.js";import{b as E}from"../chunks/resolver-CjsW8Rz0.js";function X({cardBg:s,brandFamily:c}){const m=document.createElement("canvas").getContext("2d"),i=e=>{if(!e||e==="none"||e==="transparent")return null;const t=/^color\(srgb\s+([\d.e-]+)\s+([\d.e-]+)\s+([\d.e-]+)(?:\s*\/\s*([\d.e-]+))?\)/.exec(e);if(t)return[t[1]*255,t[2]*255,t[3]*255,t[4]===void 0?1:Number(t[4])];m.fillStyle="#000",m.fillStyle=e;const o=m.fillStyle;if(o.startsWith("#"))return[parseInt(o.slice(1,3),16),parseInt(o.slice(3,5),16),parseInt(o.slice(5,7),16),1];const r=o.match(/[\d.]+/g).map(Number);return[r[0],r[1],r[2],r[3]??1];},f=(e,t)=>[0,1,2].map(o=>e[o]*e[3]+t[o]*(1-e[3])).concat(1),l=e=>{const[t,o,r]=e.slice(0,3).map(d=>(d/=255,d<=0.03928?d/12.92:((d+0.055)/1.055)**2.4));return 0.2126*t+0.7152*o+0.0722*r;},a=(e,t)=>{const[o,r]=[l(e),l(t)].sort((d,g)=>g-d);return(o+0.05)/(r+0.05);},n=e=>{let t=1;for(let o=e;o&&o.nodeType===1;o=o.parentElement||o.parentNode)t*=parseFloat(getComputedStyle(o).opacity||"1");return t;},u=i(s),p=[...document.querySelectorAll("body *")].filter(e=>{if(["SCRIPT","STYLE","TITLE","DESC"].includes(e.tagName.toUpperCase())||![...e.childNodes].some(d=>d.nodeType===3&&d.textContent.trim()))return!1;const t=e.getBoundingClientRect(),o=getComputedStyle(e);return e.closest("details:not([open])")&&!e.closest("summary")?!1:t.width>0&&t.height>0&&o.visibility!=="hidden"&&o.display!=="none"&&n(e)>0.05;}),h={textCount:p.length,brandFont:0,otherFonts:{},below45:0,min:99,worst:[]};for(const e of p){const t=getComputedStyle(e),o=t.fontFamily.split(",")[0].trim().replace(/["']/g,"");o===c.replace(/["']/g,"")?h.brandFont++:h.otherFonts[o]=(h.otherFonts[o]||0)+1;const r=e instanceof SVGElement;let d=i(r?t.fill:t.color)||i(t.color);if(!d)continue;d=[d[0],d[1],d[2],d[3]*n(e)];const g=e.getBoundingClientRect(),A=Math.min(Math.max(g.left+g.width/2,0),innerWidth-1),I=Math.min(Math.max(g.top+g.height/2,0),innerHeight-1);let S=u;const x=r&&/^stroke/.test(t.paintOrder||"")&&parseFloat(t.strokeWidth)>=2?i(t.stroke):null,M=i(r?t.fill:t.color),b=x&&M&&x.slice(0,3).join()!==M.slice(0,3).join()?x:i(t.backgroundColor),F=b&&b[3]>0?[e]:document.elementsFromPoint(A,I);for(const w of F){if(w===e&&F.length===1){S=f([b[0],b[1],b[2],b[3]*n(e)],u);break;}if(w===e||e.contains(w))continue;const k=getComputedStyle(w),v=w instanceof SVGGeometryElement?i(k.fill):i(k.backgroundColor);if(v&&v[3]>0){const z=v[3]*n(w)*(w instanceof SVGGeometryElement?parseFloat(k.fillOpacity||"1"):1);S=f([v[0],v[1],v[2],z],u);break;}}const C=a(f(d,S),S),$=parseFloat(t.fontSize),O=$>=24||$>=18.66&&parseInt(t.fontWeight,10)>=600;C<4.5&&h.below45++,h.min=Math.min(h.min,C),C<(O?3:4.5)&&h.worst.push({text:e.textContent.trim().slice(0,24),ratio:Math.round(C*100)/100});}return h.min=Math.round(h.min*100)/100,h.worst=h.worst.sort((e,t)=>e.ratio-t.ratio).slice(0,3),h;}function Y(){const s=innerWidth,c=innerHeight,m=document.documentElement,i={pageScroll:Math.max(0,m.scrollWidth-s)+Math.max(0,m.scrollHeight-c),clipped:[],scrollRegions:[],overlaps:[],tinyText:0},f=e=>{const t=e.getBoundingClientRect();if(t.width<=0||t.height<=0||e.closest("details:not([open])")&&!e.closest("summary"))return!1;for(let r=e;r&&r.nodeType===1;r=r.parentElement||r.parentNode){const d=getComputedStyle(r);if(d.display==="none"||d.visibility==="hidden"||parseFloat(d.opacity)<0.05)return!1;}return!0;},l=e=>{for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const o=getComputedStyle(t);if(t instanceof SVGSVGElement||["hidden","auto","scroll","clip"].includes(o.overflowX)||["hidden","auto","scroll","clip"].includes(o.overflowY))return{el:t,scrolls:["auto","scroll"].includes(o.overflowY)||["auto","scroll"].includes(o.overflowX)};}return null;},a=[...document.querySelectorAll("body *")];for(const e of a){const t=getComputedStyle(e);(["auto","scroll"].includes(t.overflowY)&&e.scrollHeight>e.clientHeight+1||["auto","scroll"].includes(t.overflowX)&&e.scrollWidth>e.clientWidth+1)&&i.scrollRegions.push(e.tagName.toLowerCase()+(e.id?"#"+e.id:""));}const n=a.filter(e=>!["SCRIPT","STYLE","TITLE","DESC"].includes(e.tagName.toUpperCase())&&[...e.childNodes].some(t=>t.nodeType===3&&t.textContent.trim())&&f(e)),u=a.filter(e=>(e instanceof SVGGeometryElement||e.tagName==="CANVAS")&&f(e));for(const e of[...n,...u]){const t=e.getBoundingClientRect(),o=l(e);let r={left:0,top:0,right:s,bottom:c};if(o){if(o.scrolls)continue;const d=o.el.getBoundingClientRect();r={left:Math.max(0,d.left),top:Math.max(0,d.top),right:Math.min(s,d.right),bottom:Math.min(c,d.bottom)};}(t.left<r.left-2||t.top<r.top-2||t.right>r.right+2||t.bottom>r.bottom+2)&&i.clipped.length<3&&i.clipped.push((e.textContent||e.tagName).trim().slice(0,18));}for(const e of n)parseFloat(getComputedStyle(e).fontSize)<9&&i.tinyText++;const p=e=>{const t=l(e);if(!t||!t.scrolls)return!0;const o=e.getBoundingClientRect(),r=t.el.getBoundingClientRect();return o.bottom>r.top+1&&o.top<r.bottom-1&&o.right>r.left+1&&o.left<r.right-1;},h=n.filter(p).map(e=>({el:e,r:e.getBoundingClientRect()}));for(let e=0;e<h.length;e++)for(let t=e+1;t<h.length;t++){const o=h[e],r=h[t];if(o.el.contains(r.el)||r.el.contains(o.el))continue;const d=Math.min(o.r.right,r.r.right)-Math.max(o.r.left,r.r.left),g=Math.min(o.r.bottom,r.r.bottom)-Math.max(o.r.top,r.r.top);d>0&&g>0&&d*g>0.3*Math.min(o.r.width*o.r.height,r.r.width*r.r.height)&&i.overlaps.length<3&&i.overlaps.push(o.el.textContent.trim().slice(0,14)+" / "+r.el.textContent.trim().slice(0,14));}return i;}function H(s){const c=s.replace(/<script[^>]*id=["']semaphor-visual["'][\s\S]*?<\/script>/i,"").replace(/&#\d+;/g,""),m=(c.match(/#[0-9a-fA-F]{3,8}\b|rgba?\([^)]*\)|hsla?\([^)]*\)/g)||[]).length,i=[...c.matchAll(/<script[^>]*src=["']([^"']+)["']/g)].map(f=>f[1]);return{hardcodedColours:m,externalScripts:i,formatsNumbersItself:/toLocaleString|Intl\.NumberFormat|toFixed\(/.test(c)};}const y=s=>`at ${s.size.width} × ${s.size.height}, ${s.mode} mode`;function K(s,c){var f;const m=/* @__PURE__ */new Map(),i=l=>{m.has(l.code)||m.set(l.code,l);};for(const l of s){const a=l.where;l.state==="threw"||l.state==="reported_error"?i({code:"throws",severity:"error",message:`The visual failed ${y(a)}${l.detail?`: ${l.detail}`:""}.`,fix:"Guard against empty or missing values and rows; every field your code reads is in payload.fields.",where:a}):l.state==="no_hello"||l.state==="not_ready"?i({code:"never_ready",severity:"error",message:`The visual never said it was ready ${y(a)}.`,fix:"Call semaphor.ready() at the end of your onData callback, after drawing.",where:a}):l.state==="blank"&&i({code:"blank",severity:"error",message:`The visual said it was ready but drew nothing ${y(a)}.`,fix:"Draw into the page before calling semaphor.ready(), and draw something (an empty-state message) when there are no rows.",where:a});const n=l.blocked.find(h=>!/^script-src/.test(h.directive));if(n&&i({code:"network_blocked",severity:"error",message:n.directive==="navigation"?`The visual tried to leave its page for ${N(n.url)} ${y(a)}; a visual stays on its page.`:`The visual tried to reach ${N(n.url)} ${y(a)}, which the sandbox blocks.`,fix:"Draw only from the payload onData gives you; load scripts only from the allowed CDNs, and no fonts, images or data from elsewhere.",where:a}),l.state!=="ready")continue;const u=(f=l.frame)==null?void 0:f.worst[0];if(u&&i({code:"low_contrast",severity:"warning",message:`Text "${u.text}" is ${u.ratio}:1 against its background ${y(a)}; text needs 4.5:1.`,fix:"Colour text with var(--sv-fg), var(--sv-muted-fg) or the --sv-*-text colours, and text on a filled mark with the palette's paletteFg.",where:a}),l.frame&&l.frame.textCount>0&&l.frame.brandFont===0&&i({code:"font_not_applied",severity:"warning",message:`The visual's text doesn't use the dashboard's font ${y(a)}.`,fix:"Set font-family: var(--sv-font) (the default on body) and don't override it.",where:a}),a.size.width===c.width&&a.size.height===c.height&&l.overflow&&(l.overflow.pageScroll>0||l.overflow.clipped.length)){const h=l.overflow.clipped[0];i({code:"cut_off",severity:"warning",message:`Content is cut off ${y(a)}${h?` ("${h}")`:""}.`,fix:"Read payload.size and draw less when the card is small: fewer labels, shorter text, or the top rows.",where:a});}}return[...m.values()];}function Z(s){const c=H(s);return c.hardcodedColours?[{code:"hardcoded_color",severity:"warning",message:`The code writes ${c.hardcodedColours} colour${c.hardcodedColours===1?"":"s"} of its own, which won't follow the brand or dark mode.`,fix:"Use the theme variables (var(--sv-…)), semaphor.theme, or a color setting in the manifest."}]:[];}function N(s){try{return new URL(s).host||s;}catch{return s.slice(0,60);}}function J(s){const c=document.createElement("div");c.id="visual",Object.assign(c.style,{width:`${s.size.width}px`,height:`${s.size.height}px`,position:"relative",background:s.theme.vars["--sv-bg"]??"transparent"}),document.body.appendChild(c);const m=[];return new Promise(i=>{let f=!1;const l=a=>{f||a.status==="loading"||(f=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>i(a.status==="ready"?{state:"ready",blocked:m}:{state:a.reason,...(a.detail?{detail:a.detail}:{}),blocked:m}))));};D(c,{html:s.html,theme:s.theme,payload:s.payload,onState:l,onBlocked:a=>m.push(a)});});}const L=[{width:240,height:150},{width:300,height:340},{width:820,height:170},{width:900,height:520}];function Q(s){var l;const c=[...(s.organizationAppearance?[{name:"brand",spec:E({organizationAppearance:s.organizationAppearance})}]:[]),{name:"default",spec:E()}],m={id:"check",title:"Check",type:"customVisual",sql:"check",customVisual:{...(s.slots?{slots:Object.fromEntries(Object.entries(s.slots).map(([a,n])=>[a,{column:n}]))}:{}),...(s.settings?{settings:{...s.settings}}:{})}};let i=T(s.manifest,s.fields);const f=G({card:m,result:i,manifest:s.manifest}).unfilled;if(f.length){const a=s.manifest.slots.filter(n=>f.includes(n.id)).map(n=>({name:n.label,kind:n.kind,type:n.kind==="measure"?"number":"string"}));i=T(s.manifest,[...((l=s.fields)!=null&&l.length?s.fields:[]),...a]);}return c.flatMap(a=>["light","dark"].flatMap(n=>{const u=R(_({spec:a.spec,mode:n}));return L.map(p=>({where:{brand:a.name,mode:n,size:p},theme:u,payload:V({card:m,result:i,manifest:s.manifest,theme:u,size:p,locale:"en-US",printing:!1}).payload}));}));}function T(s,c){const m=c!=null&&c.length?[...c]:s.slots.map(n=>({name:n.label,kind:n.kind,type:n.kind==="measure"?"number":"string"})),i=B(m).map(n=>Object.fromEntries(Object.entries(n).map(([u,p])=>[u,p.value]))),f=new Map(m.map(n=>[n.name,n.type])),l=i.map((n,u)=>Object.fromEntries(Object.entries(n).map(([p,h])=>{switch(f.get(p)){case"number":return[p,Math.round(Number(h)/(u+2))];case"date":return[p,`2026-${String(u+4).padStart(2,"0")}-01`];case"boolean":return[p,!h];default:return[p,`${String(h)} ${u+2}`];}})));return{records:m.some(n=>n.kind==="dimension")?[...i,...l]:i.slice(0,1),columns:m.map(n=>({key:n.name,name:n.name,label:n.name,role:n.kind,dataType:n.type}))};}function ee(s){const c={name:"Sample",contract:2,slots:[{id:"category",label:"Category",kind:"dimension",optional:!0,many:!0},{id:"value",label:"Value",kind:"measure",optional:!0,many:!0}]},m=R(_({spec:E(),mode:"light"})),i={id:"sample",title:"Sample",type:"customVisual",sql:"sample"},{payload:f}=V({card:i,result:T(c,s),manifest:c,theme:m,size:{width:600,height:300},locale:"en-US",printing:!1});return{fields:f.fields,rows:f.rows.slice(0,3)};}export{L as CHECK_SIZES,se as MAX_EXTENSION_DRAFTS_PER_SAVE,ne as MAX_EXTENSION_HTML_BYTES,re as THEME_COLOR_NAMES,ae as VISUAL_CONTRACT_VERSION,ie as VISUAL_SCRIPT_ORIGINS,X as auditFrame,Y as auditOverflow,Q as buildCheckRenders,we as buildSrcdoc,fe as cardVisualFields,be as contrastRatio,ue as extensionCheckInput,pe as extensionCheckKey,le as isAllowedScript,ce as isHexColor,de as isThemeColorName,H as lintSource,me as readExtensionDocument,ve as readVisualFields,K as renderFindings,Se as resolveColorSetting,G as resolveVisualSlots,J as runExtensionCheck,ee as sampleVisualPayload,B as sampleVisualRows,Z as sourceFindings,V as toVisualPayload,R as toVisualTheme,ge as visualContractText,xe as withSavedCustomVisuals};
1
+ import{t as se,M as ne,T as re,s as ae,V as ie,q as le,m as ce,k as de,r as me}from"../chunks/resolve-dashboard-input-context-Djm2WgEF.js";import{s as B}from"../chunks/check-input-D36evEN2.js";import{c as fe,e as ue,a as pe,v as ge}from"../chunks/check-input-D36evEN2.js";import{c as D,r as G,t as R,a as V}from"../chunks/sandbox-host-BnadJPB9.js";import{f as we,e as be,b as ve,d as Se}from"../chunks/sandbox-host-BnadJPB9.js";import{w as xe}from"../chunks/table-cell-text-C5J5E_Am.js";import{c as _}from"../chunks/compiler-XErOfUUx.js";import{b as E}from"../chunks/resolver-CjsW8Rz0.js";function X({cardBg:s,brandFamily:c}){const m=document.createElement("canvas").getContext("2d"),i=e=>{if(!e||e==="none"||e==="transparent")return null;const t=/^color\(srgb\s+([\d.e-]+)\s+([\d.e-]+)\s+([\d.e-]+)(?:\s*\/\s*([\d.e-]+))?\)/.exec(e);if(t)return[t[1]*255,t[2]*255,t[3]*255,t[4]===void 0?1:Number(t[4])];m.fillStyle="#000",m.fillStyle=e;const o=m.fillStyle;if(o.startsWith("#"))return[parseInt(o.slice(1,3),16),parseInt(o.slice(3,5),16),parseInt(o.slice(5,7),16),1];const r=o.match(/[\d.]+/g).map(Number);return[r[0],r[1],r[2],r[3]??1];},f=(e,t)=>[0,1,2].map(o=>e[o]*e[3]+t[o]*(1-e[3])).concat(1),l=e=>{const[t,o,r]=e.slice(0,3).map(d=>(d/=255,d<=0.03928?d/12.92:((d+0.055)/1.055)**2.4));return 0.2126*t+0.7152*o+0.0722*r;},a=(e,t)=>{const[o,r]=[l(e),l(t)].sort((d,g)=>g-d);return(o+0.05)/(r+0.05);},n=e=>{let t=1;for(let o=e;o&&o.nodeType===1;o=o.parentElement||o.parentNode)t*=parseFloat(getComputedStyle(o).opacity||"1");return t;},u=i(s),p=[...document.querySelectorAll("body *")].filter(e=>{if(["SCRIPT","STYLE","TITLE","DESC"].includes(e.tagName.toUpperCase())||![...e.childNodes].some(d=>d.nodeType===3&&d.textContent.trim()))return!1;const t=e.getBoundingClientRect(),o=getComputedStyle(e);return e.closest("details:not([open])")&&!e.closest("summary")?!1:t.width>0&&t.height>0&&o.visibility!=="hidden"&&o.display!=="none"&&n(e)>0.05;}),h={textCount:p.length,brandFont:0,otherFonts:{},below45:0,min:99,worst:[]};for(const e of p){const t=getComputedStyle(e),o=t.fontFamily.split(",")[0].trim().replace(/["']/g,"");o===c.replace(/["']/g,"")?h.brandFont++:h.otherFonts[o]=(h.otherFonts[o]||0)+1;const r=e instanceof SVGElement;let d=i(r?t.fill:t.color)||i(t.color);if(!d)continue;d=[d[0],d[1],d[2],d[3]*n(e)];const g=e.getBoundingClientRect(),A=Math.min(Math.max(g.left+g.width/2,0),innerWidth-1),I=Math.min(Math.max(g.top+g.height/2,0),innerHeight-1);let S=u;const x=r&&/^stroke/.test(t.paintOrder||"")&&parseFloat(t.strokeWidth)>=2?i(t.stroke):null,M=i(r?t.fill:t.color),b=x&&M&&x.slice(0,3).join()!==M.slice(0,3).join()?x:i(t.backgroundColor),F=b&&b[3]>0?[e]:document.elementsFromPoint(A,I);for(const w of F){if(w===e&&F.length===1){S=f([b[0],b[1],b[2],b[3]*n(e)],u);break;}if(w===e||e.contains(w))continue;const k=getComputedStyle(w),v=w instanceof SVGGeometryElement?i(k.fill):i(k.backgroundColor);if(v&&v[3]>0){const z=v[3]*n(w)*(w instanceof SVGGeometryElement?parseFloat(k.fillOpacity||"1"):1);S=f([v[0],v[1],v[2],z],u);break;}}const C=a(f(d,S),S),$=parseFloat(t.fontSize),O=$>=24||$>=18.66&&parseInt(t.fontWeight,10)>=600;C<4.5&&h.below45++,h.min=Math.min(h.min,C),C<(O?3:4.5)&&h.worst.push({text:e.textContent.trim().slice(0,24),ratio:Math.round(C*100)/100});}return h.min=Math.round(h.min*100)/100,h.worst=h.worst.sort((e,t)=>e.ratio-t.ratio).slice(0,3),h;}function Y(){const s=innerWidth,c=innerHeight,m=document.documentElement,i={pageScroll:Math.max(0,m.scrollWidth-s)+Math.max(0,m.scrollHeight-c),clipped:[],scrollRegions:[],overlaps:[],tinyText:0},f=e=>{const t=e.getBoundingClientRect();if(t.width<=0||t.height<=0||e.closest("details:not([open])")&&!e.closest("summary"))return!1;for(let r=e;r&&r.nodeType===1;r=r.parentElement||r.parentNode){const d=getComputedStyle(r);if(d.display==="none"||d.visibility==="hidden"||parseFloat(d.opacity)<0.05)return!1;}return!0;},l=e=>{for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const o=getComputedStyle(t);if(t instanceof SVGSVGElement||["hidden","auto","scroll","clip"].includes(o.overflowX)||["hidden","auto","scroll","clip"].includes(o.overflowY))return{el:t,scrolls:["auto","scroll"].includes(o.overflowY)||["auto","scroll"].includes(o.overflowX)};}return null;},a=[...document.querySelectorAll("body *")];for(const e of a){const t=getComputedStyle(e);(["auto","scroll"].includes(t.overflowY)&&e.scrollHeight>e.clientHeight+1||["auto","scroll"].includes(t.overflowX)&&e.scrollWidth>e.clientWidth+1)&&i.scrollRegions.push(e.tagName.toLowerCase()+(e.id?"#"+e.id:""));}const n=a.filter(e=>!["SCRIPT","STYLE","TITLE","DESC"].includes(e.tagName.toUpperCase())&&[...e.childNodes].some(t=>t.nodeType===3&&t.textContent.trim())&&f(e)),u=a.filter(e=>(e instanceof SVGGeometryElement||e.tagName==="CANVAS")&&f(e));for(const e of[...n,...u]){const t=e.getBoundingClientRect(),o=l(e);let r={left:0,top:0,right:s,bottom:c};if(o){if(o.scrolls)continue;const d=o.el.getBoundingClientRect();r={left:Math.max(0,d.left),top:Math.max(0,d.top),right:Math.min(s,d.right),bottom:Math.min(c,d.bottom)};}(t.left<r.left-2||t.top<r.top-2||t.right>r.right+2||t.bottom>r.bottom+2)&&i.clipped.length<3&&i.clipped.push((e.textContent||e.tagName).trim().slice(0,18));}for(const e of n)parseFloat(getComputedStyle(e).fontSize)<9&&i.tinyText++;const p=e=>{const t=l(e);if(!t||!t.scrolls)return!0;const o=e.getBoundingClientRect(),r=t.el.getBoundingClientRect();return o.bottom>r.top+1&&o.top<r.bottom-1&&o.right>r.left+1&&o.left<r.right-1;},h=n.filter(p).map(e=>({el:e,r:e.getBoundingClientRect()}));for(let e=0;e<h.length;e++)for(let t=e+1;t<h.length;t++){const o=h[e],r=h[t];if(o.el.contains(r.el)||r.el.contains(o.el))continue;const d=Math.min(o.r.right,r.r.right)-Math.max(o.r.left,r.r.left),g=Math.min(o.r.bottom,r.r.bottom)-Math.max(o.r.top,r.r.top);d>0&&g>0&&d*g>0.3*Math.min(o.r.width*o.r.height,r.r.width*r.r.height)&&i.overlaps.length<3&&i.overlaps.push(o.el.textContent.trim().slice(0,14)+" / "+r.el.textContent.trim().slice(0,14));}return i;}function H(s){const c=s.replace(/<script[^>]*id=["']semaphor-visual["'][\s\S]*?<\/script>/i,"").replace(/&#\d+;/g,""),m=(c.match(/#[0-9a-fA-F]{3,8}\b|rgba?\([^)]*\)|hsla?\([^)]*\)/g)||[]).length,i=[...c.matchAll(/<script[^>]*src=["']([^"']+)["']/g)].map(f=>f[1]);return{hardcodedColours:m,externalScripts:i,formatsNumbersItself:/toLocaleString|Intl\.NumberFormat|toFixed\(/.test(c)};}const y=s=>`at ${s.size.width} × ${s.size.height}, ${s.mode} mode`;function K(s,c){var f;const m=/* @__PURE__ */new Map(),i=l=>{m.has(l.code)||m.set(l.code,l);};for(const l of s){const a=l.where;l.state==="threw"||l.state==="reported_error"?i({code:"throws",severity:"error",message:`The visual failed ${y(a)}${l.detail?`: ${l.detail}`:""}.`,fix:"Guard against empty or missing values and rows; every field your code reads is in payload.fields.",where:a}):l.state==="no_hello"||l.state==="not_ready"?i({code:"never_ready",severity:"error",message:`The visual never said it was ready ${y(a)}.`,fix:"Call semaphor.ready() at the end of your onData callback, after drawing.",where:a}):l.state==="blank"&&i({code:"blank",severity:"error",message:`The visual said it was ready but drew nothing ${y(a)}.`,fix:"Draw into the page before calling semaphor.ready(), and draw something (an empty-state message) when there are no rows.",where:a});const n=l.blocked.find(h=>!/^script-src/.test(h.directive));if(n&&i({code:"network_blocked",severity:"error",message:n.directive==="navigation"?`The visual tried to leave its page for ${N(n.url)} ${y(a)}; a visual stays on its page.`:`The visual tried to reach ${N(n.url)} ${y(a)}, which the sandbox blocks.`,fix:"Draw only from the payload onData gives you; load scripts only from the allowed CDNs, and no fonts, images or data from elsewhere.",where:a}),l.state!=="ready")continue;const u=(f=l.frame)==null?void 0:f.worst[0];if(u&&i({code:"low_contrast",severity:"warning",message:`Text "${u.text}" is ${u.ratio}:1 against its background ${y(a)}; text needs 4.5:1.`,fix:"Colour text with var(--sv-fg), var(--sv-muted-fg) or the --sv-*-text colours, and text on a filled mark with the palette's paletteFg.",where:a}),l.frame&&l.frame.textCount>0&&l.frame.brandFont===0&&i({code:"font_not_applied",severity:"warning",message:`The visual's text doesn't use the dashboard's font ${y(a)}.`,fix:"Set font-family: var(--sv-font) (the default on body) and don't override it.",where:a}),a.size.width===c.width&&a.size.height===c.height&&l.overflow&&(l.overflow.pageScroll>0||l.overflow.clipped.length)){const h=l.overflow.clipped[0];i({code:"cut_off",severity:"warning",message:`Content is cut off ${y(a)}${h?` ("${h}")`:""}.`,fix:"Read payload.size and draw less when the card is small: fewer labels, shorter text, or the top rows.",where:a});}}return[...m.values()];}function Z(s){const c=H(s);return c.hardcodedColours?[{code:"hardcoded_color",severity:"warning",message:`The code writes ${c.hardcodedColours} colour${c.hardcodedColours===1?"":"s"} of its own, which won't follow the brand or dark mode.`,fix:"Use the theme variables (var(--sv-…)), semaphor.theme, or a color setting in the manifest."}]:[];}function N(s){try{return new URL(s).host||s;}catch{return s.slice(0,60);}}function J(s){const c=document.createElement("div");c.id="visual",Object.assign(c.style,{width:`${s.size.width}px`,height:`${s.size.height}px`,position:"relative",background:s.theme.vars["--sv-bg"]??"transparent"}),document.body.appendChild(c);const m=[];return new Promise(i=>{let f=!1;const l=a=>{f||a.status==="loading"||(f=!0,requestAnimationFrame(()=>requestAnimationFrame(()=>i(a.status==="ready"?{state:"ready",blocked:m}:{state:a.reason,...(a.detail?{detail:a.detail}:{}),blocked:m}))));};D(c,{html:s.html,theme:s.theme,payload:s.payload,onState:l,onBlocked:a=>m.push(a)});});}const L=[{width:240,height:150},{width:300,height:340},{width:820,height:170},{width:900,height:520}];function Q(s){var l;const c=[...(s.organizationAppearance?[{name:"brand",spec:E({organizationAppearance:s.organizationAppearance})}]:[]),{name:"default",spec:E()}],m={id:"check",title:"Check",type:"customVisual",sql:"check",customVisual:{...(s.slots?{slots:Object.fromEntries(Object.entries(s.slots).map(([a,n])=>[a,{column:n}]))}:{}),...(s.settings?{settings:{...s.settings}}:{})}};let i=T(s.manifest,s.fields);const f=G({card:m,result:i,manifest:s.manifest}).unfilled;if(f.length){const a=s.manifest.slots.filter(n=>f.includes(n.id)).map(n=>({name:n.label,kind:n.kind,type:n.kind==="measure"?"number":"string"}));i=T(s.manifest,[...((l=s.fields)!=null&&l.length?s.fields:[]),...a]);}return c.flatMap(a=>["light","dark"].flatMap(n=>{const u=R(_({spec:a.spec,mode:n}));return L.map(p=>({where:{brand:a.name,mode:n,size:p},theme:u,payload:V({card:m,result:i,manifest:s.manifest,theme:u,size:p,locale:"en-US",printing:!1}).payload}));}));}function T(s,c){const m=c!=null&&c.length?[...c]:s.slots.map(n=>({name:n.label,kind:n.kind,type:n.kind==="measure"?"number":"string"})),i=B(m).map(n=>Object.fromEntries(Object.entries(n).map(([u,p])=>[u,p.value]))),f=new Map(m.map(n=>[n.name,n.type])),l=i.map((n,u)=>Object.fromEntries(Object.entries(n).map(([p,h])=>{switch(f.get(p)){case"number":return[p,Math.round(Number(h)/(u+2))];case"date":return[p,`2026-${String(u+4).padStart(2,"0")}-01`];case"boolean":return[p,!h];default:return[p,`${String(h)} ${u+2}`];}})));return{records:m.some(n=>n.kind==="dimension")?[...i,...l]:i.slice(0,1),columns:m.map(n=>({key:n.name,name:n.name,label:n.name,role:n.kind,dataType:n.type}))};}function ee(s){const c={name:"Sample",contract:2,slots:[{id:"category",label:"Category",kind:"dimension",optional:!0,many:!0},{id:"value",label:"Value",kind:"measure",optional:!0,many:!0}]},m=R(_({spec:E(),mode:"light"})),i={id:"sample",title:"Sample",type:"customVisual",sql:"sample"},{payload:f}=V({card:i,result:T(c,s),manifest:c,theme:m,size:{width:600,height:300},locale:"en-US",printing:!1});return{fields:f.fields,rows:f.rows.slice(0,3)};}export{L as CHECK_SIZES,se as MAX_EXTENSION_DRAFTS_PER_SAVE,ne as MAX_EXTENSION_HTML_BYTES,re as THEME_COLOR_NAMES,ae as VISUAL_CONTRACT_VERSION,ie as VISUAL_SCRIPT_ORIGINS,X as auditFrame,Y as auditOverflow,Q as buildCheckRenders,we as buildSrcdoc,fe as cardVisualFields,be as contrastRatio,ue as extensionCheckInput,pe as extensionCheckKey,le as isAllowedScript,ce as isHexColor,de as isThemeColorName,H as lintSource,me as readExtensionDocument,ve as readVisualFields,K as renderFindings,Se as resolveColorSetting,G as resolveVisualSlots,J as runExtensionCheck,ee as sampleVisualPayload,B as sampleVisualRows,Z as sourceFindings,V as toVisualPayload,R as toVisualTheme,ge as visualContractText,xe as withSavedCustomVisuals};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{D as U}from"./chunks/dashboard-DbBgEesz.js";import{C as ca,E as ua}from"./chunks/bookmark-state-DnkzIsyw.js";import{b as pa,A as fa,c as ha,a as ma,R as ga,D as ba}from"./chunks/report-preferences-dialog-DEfUYExu.js";import{jsx as r,jsxs as C}from"react/jsx-runtime";import{F as V,S as z,U as H,b as W,A as G,C as q,V as K,c as P,d as L,e as $,f as Q,g as Y,I as J,h as X,i as Z,j as ee,k as ae}from"./chunks/semaphor-ready-indicator-BViyPq5k.js";import{X as ya,ao as Da,ap as va,aq as Ea,B as Aa,Z as Sa,N as Ta,K as wa,J as xa,q as _a,p as Fa,M as Ba,R as Ra,m as Pa,L as La,s as Na,t as Ia,T as Oa,r as ja,aj as Ma,al as ka,am as Ua,ak as Va,aa as za,ad as Ha,a1 as Wa,ai as Ga,a5 as qa,ae as Ka,v as $a,a0 as Qa,af as Ya,ag as Ja,a9 as Xa,ac as Za,ab as es,$ as as,_ as ss,a3 as ts,ah as rs,a7 as os,a4 as ns,a6 as is,a8 as ls,w as cs,a2 as us,W as ds,H as ps,ar as fs,P as hs,o as ms,G as gs,l as bs,O as Cs,Q as ys,Y as Ds,u as vs,x as Es,n as As,y as Ss,z as Ts,E as ws,an as xs}from"./chunks/semaphor-ready-indicator-BViyPq5k.js";import{E as R,S as se,u as I,f as te,a as re,s as oe,P as ne,b as ie,B as le,d as ce,e as ue,R as de,g as pe}from"./chunks/appearance-provider-BW022_Qu.js";import{N as Fs,r as Bs,j as Rs,j as Ps,M as Ls,D as Ns,H as Is,I as Os,o as js,n as Ms,l as ks,m as Us,T as Vs,L as zs,K as Hs,J as Ws,Q as Gs,O as qs,q as Ks,t as $s,v as Qs,w as Ys,p as Js,k as Xs,x as Zs,z as et,y as at,A as st,h as tt,G as rt,F as ot,i as nt}from"./chunks/appearance-provider-BW022_Qu.js";import*as T from"react";import O,{useMemo as w,useEffect as j}from"react";import{C as lt,D as ct,L as ut,d as dt,g as pt,e as ft,h as ht,f as mt,c as gt,a as bt,i as Ct,b as yt,n as Dt,s as vt}from"./chunks/validators-U8IL8djK.js";import{c as N}from"./chunks/rendered-file-BbvwaU6z.js";import"zod";import"./chunks/pivot-result-contract-expectations-D_ane7I2.js";import"./chunks/matrix-operation-contract-DceN49RX.js";import"./chunks/analytics-base-schemas-DMFrDqn_.js";import"./value-format-preferences/index.js";import{D as fe}from"./chunks/index-DViPGDFj.js";import{D as At}from"./chunks/token-types-BM0mpZce.js";import{d as Tt,A as wt,b as xt,m as _t,e as Ft,D as Bt,g as Rt,h as Pt,j as Lt,f as Nt,S as It,U as Ot,l as jt,a as Mt,V as kt,W as Ut,i as Vt,u as zt,k as Ht,c as Wt}from"./chunks/dashboard-briefing-launcher-DadG4ES9.js";import{n as qt,s as Kt,u as $t}from"./chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js";import{createRoot as he}from"react-dom/client";import"./chunks/slider-C2nbml5r.js";import{n as F}from"./chunks/resolve-dashboard-input-context-Dm4PD8Gx.js";import{at as Yt,an as Jt,av as Xt,au as Zt,ay as er,az as ar,as as sr,ar as tr,aw as rr,aq as or,ak as nr,ap as ir,al as lr,ao as cr,aA as ur,ax as dr,am as pr}from"./chunks/resolve-dashboard-input-context-Dm4PD8Gx.js";import{D as hr}from"./chunks/report-runtime-context-CkxgMKr6.js";import{r as gr,a as br}from"./chunks/pivot-result-identity-DRhVJMsF.js";import{f as me}from"./chunks/stored-dashboard-CTwrNvBy.js";import"./chunks/schema-O1Y3WTGF.js";import"./chunks/context-Cwj8Axgd.js";import"./chunks/attribution-BEFSsbNn.js";import"react-dom";import"./chunks/dashboard-temporal-snapshot-BSTfqT29.js";import"./chunks/appearance-runtime-provider-De2VZS4F.js";import"./briefings/index.js";const ge={cssWidth:960,cssHeight:540};function sa(e){const{displayPreferences:a,cardId:s,...t}=e,l={...t,id:e.dashboardId};return/* @__PURE__ */r(R,{FallbackComponent:V,children:/* @__PURE__ */C(se,{dashboardProps:l,children:[/* @__PURE__ */r(z,{componentType:"visual",componentId:e.cardId}),/* @__PURE__ */r(H,{appearance:e.appearance,children:/* @__PURE__ */r(W,{displayPreferences:a,children:/* @__PURE__ */r(G,{children:/* @__PURE__ */r(q,{type:"visual",cardId:s,...l,children:/* @__PURE__ */r(be,{cardId:s,imageLayout:a==null?void 0:a.imageLayout})})})})})]})});}function be({cardId:e,imageLayout:a}){const s=I(p=>{var h;return(h=p.dashboard)==null?void 0:h.sheets;}),{card:t,frame:l,sheet:D}=w(()=>{var u,i;const p=s==null?void 0:s.find(o=>{var d;return(d=o.frames)==null?void 0:d.some(c=>{var n;return(n=c==null?void 0:c.cards)==null?void 0:n.some(f=>(f==null?void 0:f.id)===e);});}),h=(u=p==null?void 0:p.frames)==null?void 0:u.find(o=>{var d;return(d=o==null?void 0:o.cards)==null?void 0:d.find(c=>(c==null?void 0:c.id)===e);});return{card:(i=h==null?void 0:h.cards)==null?void 0:i.find(o=>(o==null?void 0:o.id)===e),frame:h,sheet:p};},[s,e]),g=w(()=>l?te(D,l.id):void 0,[l,D]),E=w(()=>g?[g]:[],[g]),b=re(E,fe.columns.lg),y=w(()=>{if(!a||!l)return;if(!g)return N(ge);const p=b.cardSize(g,a.dashboardWidth);return N({cssWidth:p.width,cssHeight:p.height});},[a,l,g,b]);return!t||!l?/* @__PURE__ */r(K,{description:`Couldn’t find a visual with ID ${e} on this dashboard.`,role:"status"}):y?/* @__PURE__ */r("main",{className:"flex flex-col","data-image-capture":"",style:{width:y.cssWidth,height:y.cssHeight},children:/* @__PURE__ */r(R,{FallbackComponent:P,children:/* @__PURE__ */r(L,{card:t,frame:l})})}):/* @__PURE__ */C("main",{className:"flex h-full grow flex-col",children:[/* @__PURE__ */r(R,{FallbackComponent:P,children:/* @__PURE__ */r(L,{card:t,frame:l})}),/* @__PURE__ */r($,{})]});}var Ce=Object.defineProperty,ye=(e,a,s)=>a in e?Ce(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,x=(e,a,s)=>ye(e,typeof a!="symbol"?a+"":a,s);const De={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},ve={stringify:e=>e.name,parse:(e,a,s)=>{const t=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e];})();return typeof t=="function"?t.bind(s):void 0;}},Ee={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function Ae(e){return e.replace(/([a-z0-9])([A-Z])/g,(a,s,t)=>`${s}-${t.toLowerCase()}`);}function M(e){return e.replace(/[-:]([a-z])/g,(a,s)=>`${s.toUpperCase()}`);}const Se={stringify:e=>e.name,parse:(e,a,s)=>{const t=(()=>{const l=M(a);if(typeof s<"u"&&l in s.container)return s.container[l];})();return typeof t=="function"?t.bind(s):void 0;}},Te={stringify:e=>`${e}`,parse:e=>parseFloat(e)},we={stringify:e=>e,parse:e=>e},B={string:we,number:Te,boolean:De,function:ve,method:Se,json:Ee},S=Symbol.for("r2wc.render"),_=Symbol.for("r2wc.connected"),v=Symbol.for("r2wc.context"),m=Symbol.for("r2wc.props");function xe(e,a,s){var t,l,D;a.props||(a.props=e.propTypes?Object.keys(e.propTypes):[]),a.events||(a.events=[]);const g=Array.isArray(a.props)?a.props.slice():Object.keys(a.props),E=Array.isArray(a.events)?a.events.slice():Object.keys(a.events),b={},y={},p={},h={};for(const u of g){b[u]=Array.isArray(a.props)?"string":a.props[u];const i=Ae(u);p[u]=i,h[i]=u;}for(const u of E)y[u]=Array.isArray(a.events)?{}:a.events[u];class A extends HTMLElement{constructor(){super(),x(this,D,!0),x(this,l),x(this,t,{}),x(this,"container"),a.shadow?this.container=this.attachShadow({mode:a.shadow}):this.container=this,this[m].container=this.container;for(const i of g){const o=p[i],d=this.getAttribute(o),c=b[i],n=c?B[c]:null;if(c==="method"){const f=M(o);Object.defineProperty(this[m].container,f,{enumerable:!0,configurable:!0,get(){return this[m][f];},set(k){this[m][f]=k,this[S]();}}),this[m][i]=n.parse(d,o,this);}n!=null&&n.parse&&d&&(this[m][i]=n.parse(d,o,this));}for(const i of E)this[m][i]=o=>{const d=i.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(d,{detail:o,...y[i]}));};}static get observedAttributes(){return Object.keys(h);}connectedCallback(){this[_]=!0,this[S]();}disconnectedCallback(){this[_]=!1,this[v]&&s.unmount(this[v]),delete this[v];}attributeChangedCallback(i,o,d){const c=h[i],n=b[c],f=n?B[n]:null;c in b&&f!=null&&f.parse&&d&&(this[m][c]=f.parse(d,i,this),this[S]());}[(D=_,l=v,t=m,S)](){this[_]&&(this[v]?s.update(this[v],this[m]):this[v]=s.mount(this.container,e,this[m]));}}for(const u of g){const i=p[u],o=b[u];Object.defineProperty(A.prototype,u,{enumerable:!0,configurable:!0,get(){return this[m][u];},set(d){this[m][u]=d;const c=o?B[o]:null;if(c!=null&&c.stringify){const n=c.stringify(d,i,this);this.getAttribute(i)!==n&&this.setAttribute(i,n);}else this[S]();}});}return A;}function _e(e,a,s){const t=he(e),l=O.createElement(a,s);return t.render(l),{root:t,ReactComponent:a};}function Fe({root:e,ReactComponent:a},s){const t=O.createElement(a,s);e.render(t);}function Be({root:e}){e.unmount();}function Re(e,a={}){return xe(e,a,{mount:_e,update:Fe,unmount:Be});}const Pe={id:"string",version:"string",authToken:"json",placeholders:"json",defaultFilterValues:"json",defaultControlValues:"json",controlContractOverrides:"json",documentInputValues:"json",dashboardInputExecutionSnapshot:"json",printInputCapture:"json",presentationExecutionSnapshot:"json",viewerTableSettings:"json",renderMode:"string",currentTheme:"string",customCards:"json",appearance:"json",onChartElementClicked:"function",onFilterValuesChange:"function",onEvent:"function",onDashboardLifecycleEvent:"function",onSave:"function",LoadingComponent:"function",ErrorComponent:"function",showBriefings:"boolean",selectedSheetId:"string",eventHandlers:"json",preferences:"json"},ta=typeof HTMLElement>"u"?void 0:Re(U,{props:Pe});function ra(e,a,s,t){j(()=>{e&&!s&&a&&t(me(oe(I.getState()).dashboard));},[e,s,a,t]);}function oa({name:e,items:a,value:s,onChange:t,isLoading:l,isError:D,refetch:g,className:E,icon:b,showNone:y=!1}){const p=T.useRef(null),[h,A]=T.useState(!1),[u,i]=T.useState("100%"),o=y?[...(a||[]),{id:"none",name:"None"}]:a;T.useLayoutEffect(()=>{p.current&&i(p.current.offsetWidth);},[]);function d(){var n;return l?"Loading...":D?"Error":s?(n=a==null?void 0:a.find(f=>f.id===s))==null?void 0:n.name:`Select ${e}`;}function c(n,f){t(f),A(!1);}return/* @__PURE__ */C(ne,{open:h,onOpenChange:A,children:[/* @__PURE__ */r(ie,{asChild:!0,children:/* @__PURE__ */C(le,{ref:p,variant:"outline",role:"combobox","aria-expanded":h,className:F("flex h-9 w-full justify-between",E),children:[/* @__PURE__ */C("div",{className:"flex items-center gap-2",children:[b&&/* @__PURE__ */r("div",{className:"mr-2",children:b}),/* @__PURE__ */r("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:d()})]}),/* @__PURE__ */r(ce,{className:"size-4 opacity-50"})]})}),/* @__PURE__ */r(ue,{className:"w-full p-0",style:{minWidth:u},children:/* @__PURE__ */C(Q,{children:[/* @__PURE__ */C("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[/* @__PURE__ */r(Y,{className:"h-9",placeholder:"Search..."}),/* @__PURE__ */r(J,{className:"h-7",onClick:g,children:/* @__PURE__ */r(de,{className:F("size-3.5 opacity-50",l&&"animate-spin")})})]}),/* @__PURE__ */C(X,{children:[/* @__PURE__ */C(Z,{children:["No ",e==null?void 0:e.toLowerCase()," found."]}),/* @__PURE__ */r(ee,{children:o==null?void 0:o.map(n=>/* @__PURE__ */r(ae,{className:"overflow-x-auto",value:n.name,onSelect:f=>c(f,n.id),children:/* @__PURE__ */C("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */r(pe,{className:F("size-4",s===n.id?"opacity-100":"opacity-0")}),/* @__PURE__ */r("div",{title:n.name,children:n.name})]})},n.id))})]})]})})]});}function na(e,a){j(()=>(e&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{e&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__;}),[e,a]);}export{Tt as ActivityBell,ya as ActivityProvider,G as ActivityScope,wt as AdvancedModeToggle,xt as ArrangeLayoutButton,pa as AssistantPanel,fa as AssistantProvider,ha as AssistantToolbarButton,Da as BriefingAuthor,va as BriefingAuthorDialog,Ea as BriefingUiCapabilitiesBoundary,Aa as BriefingUiCapabilitiesProvider,Sa as BriefingsApiError,lt as CALCULATED_FIELD_ENTITY_MARKER,ca as CONTROL_CARD_DEFAULT_VALUE,Ta as CardSummary,oa as Combobox,ct as DATE_FORMAT_VALUES,hr as DEFAULT_CALENDAR_CONTEXT,At as DEFAULT_SEMANTIC_DOMAIN_ACCESS,U as Dashboard,_t as DashboardBriefingLauncher,Ft as DashboardControlsSettings,wa as DashboardCreateDialog,xa as DashboardExportDialog,Bt as DashboardFavoriteToggle,Rt as DashboardFilterControlsButton,Pt as DashboardFilterControlsLauncher,ta as DashboardWC,Lt as DataVariablesListHost,ma as DisplayFormatPreferencesFields,Nt as DocumentControlsSettings,ua as EMPTY_SELECTION,Fs as ExportError,_a as FAVORITES_READ_ONLY_MESSAGE,Fa as FavoriteStarButton,ut as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,Ba as MatrixCardView,Bs as PROPOSAL_REFUSALS,ga as ReportPreferencesDialog,Ra as ResourceType,It as ScreenSizePreviewButton,se as SemaphorContextProvider,Rs as SemaphorDataProvider,Ps as SemaphorQueryClient,Pa as ShareDialog,La as SummaryCard,ba as Surfboard,Na as TOOLBAR_LG_MIN,Ia as TOOLBAR_MD_MIN,Oa as ToolbarOverflowAnchorSlot,ja as ToolbarProvider,Ot as UnsavedChangesAlert,jt as VariableEditorHost,sa as Visual,Mt as VisualEditingControls,kt as VisualsLibraryDialog,Ut as WatchDashboardButton,Ma as applyBriefingFormPatch,ka as briefingFormDraftToCreateRequest,Ua as briefingFormDraftToUpdateRequest,Va as briefingToFormDraft,za as cancelBriefingPreviewRun,Ha as cancelBriefingRun,Ls as cancelExport,me as cloneDeep,Wa as createBriefing,Ga as createBriefingFormDraft,Ns as createEmptyKpiConfig,Is as createExport,Os as createMatrixDirectExport,Yt as createSqlGenConfig,qa as deleteBriefing,Ka as deleteBriefingRun,js as downloadDocumentPdf,Ms as downloadPdf,ks as emitDashboardLoad,Us as emitDashboardUnload,$a as fitsToolbar,Jt as fmt,Vs as formatFileSize,Qa as getBriefing,Ya as getBriefingArtifact,Ja as getBriefingEvidence,Xa as getBriefingPreviewRun,Za as getBriefingRun,dt as getCalculatedFieldComputeStage,Xt as getColumnDataType,zs as getDownloadUrl,Hs as getExportStatus,Ws as getExports,pt as getFieldRuntimeColumnName,Zt as getFilterValueType,er as getFormattedTableNameForQuery,ar as getQualifiedTableName,sr as getSql,ft as hasCalculatedFieldMarker,ht as hasCalculatedFormulaInputs,mt as hasSyntheticCalculatedFieldOwner,gt as inspectCalculatedField,Vt as invalidateToken,tr as isBooleanDataType,bt as isCalculatedDimension,Ct as isCalculatedMetric,rr as isColumnInSqlGen,or as isDateDataType,yt as isDerivedField,Gs as isExportComplete,qs as isExportInProgress,nr as isGridSheet,ir as isNumberDataType,lr as isTableSheet,cr as isTextDataType,es as listBriefingRuns,as as listBriefingTenantSummaries,ss as listBriefings,Ks as mergeSemanticExecutionPayloadIntoTarget,Dt as normalizeCalculatedFieldRepresentation,qt as normalizeDashboardForDirtyCheck,ts as pauseBriefing,rs as polishBriefingText,os as previewBriefingPlan,ur as resolveDataType,dr as resolveDatamodelName,gr as resolveQueryColumnKeyMapEntry,br as resolveUniqueQueryColumnKeyMapEntry,ns as resumeBriefing,is as runBriefingNow,ls as runBriefingPreview,oe as selectEditSessionStart,$s as selectHasEditingToolbar,Qs as selectProposalRecordState,Ys as selectProposalUndoable,Kt as serializeDashboardForDirtyCheck,pr as sheetKindOf,vt as shouldDropInheritedCalculationAggregate,cs as toolbarWidthFor,us as updateBriefing,Js as useActivity,ds as useAddNewFrame,ps as useAssistant,fs as useBriefingUiCapabilities,Xs as useCard,hs as useCardSummary,Zs as useCurrentActiveCard,et as useCurrentCardConfig,at as useCurrentSheetActiveCards,st as useDashboardActions,ms as useDashboardById,gs as useDashboardFavorite,bs as useDashboardQuery,I as useDashboardStore,Cs as useDashboardSummary,zt as useDashboardUnsavedChangesCheck,ys as useDataColumns,Ht as useDataVariablesMenuEntry,tt as useDateFilterHook,$t as useDebouncedDirtyCheck,Wt as useDefaultDashboardToggle,rt as useEditorActions,Ds as useEditorAside,ot as useEditorStore,na as useExposePrintState,vs as useManagementStore,Es as useMeasuredToolbarWidth,ra as usePristineSnapshotInitializer,As as useResourceManagement,nt as useTextFilterHook,Ss as useToolbarItem,Ts as useToolbarOverflowItems,ws as useToolbarWidth,xs as validateBriefingFormDraft};
1
+ import{D as U}from"./chunks/dashboard-BVYXrYaU.js";import{C as ca,E as ua}from"./chunks/bookmark-state-B3lDH0E_.js";import{b as pa,A as fa,c as ha,a as ma,R as ga,D as ba}from"./chunks/report-preferences-dialog-DQNwImoN.js";import{jsx as r,jsxs as C}from"react/jsx-runtime";import{F as V,S as z,U as H,b as W,A as G,C as $,V as q,c as P,d as L,e as K,I as Q}from"./chunks/semaphor-ready-indicator-BJR23T8j.js";import{K as ya,ag as Da,ah as va,ai as Ea,B as Aa,L as Sa,E as Ta,y as wa,x as xa,k as _a,j as Fa,M as Ba,R as Ra,g as Pa,z as La,m as Na,n as Ia,T as Oa,l as Ma,ab as ja,ad as ka,ae as Ua,ac as Va,a2 as za,a5 as Ha,Q as Wa,aa as Ga,Z as $a,a6 as qa,o as Ka,P as Qa,a7 as Ya,a8 as Ja,a1 as Za,a4 as Xa,a3 as es,O as as,N as ss,X as ts,a9 as rs,$ as os,Y as ns,_ as is,a0 as ls,t as cs,W as us,J as ds,w as ps,aj as fs,H as hs,i as ms,v as gs,f as bs,G as Cs,u as ys,p as Ds,h as vs,q as Es,r as As,s as Ss,af as Ts}from"./chunks/semaphor-ready-indicator-BJR23T8j.js";import{E as R,S as Y,u as I,f as J,a as Z,s as X,P as ee,b as ae,B as se,d as te,e as re,g as oe,h as ne,R as ie,i as le,j as ce,k as ue,l as de,m as pe}from"./chunks/appearance-provider-CxsEFvNA.js";import{Z as xs,D as _s,p as Fs,p as Bs,Y as Rs,M as Ps,Q as Ls,T as Ns,w as Is,v as Os,r as Ms,t as js,a0 as ks,W as Us,V as Vs,U as zs,$ as Hs,_ as Ws,A as Gs,F as $s,G as qs,H as Ks,y as Qs,q as Ys,I as Js,K as Zs,J as Xs,L as et,x as at,n as st,O as tt,z as rt,N as ot,o as nt}from"./chunks/appearance-provider-CxsEFvNA.js";import*as T from"react";import O,{useMemo as w,useEffect as M}from"react";import{C as lt,D as ct,L as ut,d as dt,g as pt,e as ft,h as ht,f as mt,c as gt,a as bt,i as Ct,b as yt,n as Dt,s as vt}from"./chunks/validators-U8IL8djK.js";import{c as N}from"./chunks/rendered-file-BbvwaU6z.js";import"zod";import"./chunks/pivot-result-contract-expectations-D_ane7I2.js";import"./chunks/matrix-operation-contract-DceN49RX.js";import"./chunks/analytics-base-schemas-DMFrDqn_.js";import"./value-format-preferences/index.js";import{D as fe}from"./chunks/index-DViPGDFj.js";import{D as At}from"./chunks/token-types-BM0mpZce.js";import{d as Tt,A as wt,b as xt,m as _t,e as Ft,D as Bt,g as Rt,h as Pt,j as Lt,f as Nt,S as It,U as Ot,l as Mt,a as jt,V as kt,W as Ut,i as Vt,u as zt,k as Ht,c as Wt}from"./chunks/dashboard-briefing-launcher-CVjONGRj.js";import{n as $t,s as qt,u as Kt}from"./chunks/normalize-dashboard-for-dirty-check-ILKfqgL3.js";import{createRoot as he}from"react-dom/client";import"./chunks/slider-DD5nxK4N.js";import{n as F}from"./chunks/resolve-dashboard-input-context-Djm2WgEF.js";import{at as Yt,an as Jt,av as Zt,au as Xt,ay as er,az as ar,as as sr,ar as tr,aw as rr,aq as or,ak as nr,ap as ir,al as lr,ao as cr,aA as ur,ax as dr,am as pr}from"./chunks/resolve-dashboard-input-context-Djm2WgEF.js";import{D as hr}from"./chunks/report-runtime-context-CkxgMKr6.js";import{r as gr,a as br}from"./chunks/pivot-result-identity-DRhVJMsF.js";import{f as me}from"./chunks/stored-dashboard--6xPxYpX.js";import"./chunks/schema-O1Y3WTGF.js";import"./chunks/context-Cwj8Axgd.js";import"./chunks/attribution-BEFSsbNn.js";import"react-dom";import"./chunks/dashboard-temporal-snapshot-DyRl61Yv.js";import"./chunks/appearance-runtime-provider-De2VZS4F.js";import"./briefings/index.js";const ge={cssWidth:960,cssHeight:540};function sa(e){const{displayPreferences:a,cardId:s,...t}=e,l={...t,id:e.dashboardId};return/* @__PURE__ */r(R,{FallbackComponent:V,children:/* @__PURE__ */C(Y,{dashboardProps:l,children:[/* @__PURE__ */r(z,{componentType:"visual",componentId:e.cardId}),/* @__PURE__ */r(H,{appearance:e.appearance,children:/* @__PURE__ */r(W,{displayPreferences:a,children:/* @__PURE__ */r(G,{children:/* @__PURE__ */r($,{type:"visual",cardId:s,...l,children:/* @__PURE__ */r(be,{cardId:s,imageLayout:a==null?void 0:a.imageLayout})})})})})]})});}function be({cardId:e,imageLayout:a}){const s=I(p=>{var h;return(h=p.dashboard)==null?void 0:h.sheets;}),{card:t,frame:l,sheet:D}=w(()=>{var u,i;const p=s==null?void 0:s.find(o=>{var d;return(d=o.frames)==null?void 0:d.some(c=>{var n;return(n=c==null?void 0:c.cards)==null?void 0:n.some(f=>(f==null?void 0:f.id)===e);});}),h=(u=p==null?void 0:p.frames)==null?void 0:u.find(o=>{var d;return(d=o==null?void 0:o.cards)==null?void 0:d.find(c=>(c==null?void 0:c.id)===e);});return{card:(i=h==null?void 0:h.cards)==null?void 0:i.find(o=>(o==null?void 0:o.id)===e),frame:h,sheet:p};},[s,e]),g=w(()=>l?J(D,l.id):void 0,[l,D]),E=w(()=>g?[g]:[],[g]),b=Z(E,fe.columns.lg),y=w(()=>{if(!a||!l)return;if(!g)return N(ge);const p=b.cardSize(g,a.dashboardWidth);return N({cssWidth:p.width,cssHeight:p.height});},[a,l,g,b]);return!t||!l?/* @__PURE__ */r(q,{description:`Couldn’t find a visual with ID ${e} on this dashboard.`,role:"status"}):y?/* @__PURE__ */r("main",{className:"flex flex-col","data-image-capture":"",style:{width:y.cssWidth,height:y.cssHeight},children:/* @__PURE__ */r(R,{FallbackComponent:P,children:/* @__PURE__ */r(L,{card:t,frame:l})})}):/* @__PURE__ */C("main",{className:"flex h-full grow flex-col",children:[/* @__PURE__ */r(R,{FallbackComponent:P,children:/* @__PURE__ */r(L,{card:t,frame:l})}),/* @__PURE__ */r(K,{})]});}var Ce=Object.defineProperty,ye=(e,a,s)=>a in e?Ce(e,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[a]=s,x=(e,a,s)=>ye(e,typeof a!="symbol"?a+"":a,s);const De={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},ve={stringify:e=>e.name,parse:(e,a,s)=>{const t=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e];})();return typeof t=="function"?t.bind(s):void 0;}},Ee={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function Ae(e){return e.replace(/([a-z0-9])([A-Z])/g,(a,s,t)=>`${s}-${t.toLowerCase()}`);}function j(e){return e.replace(/[-:]([a-z])/g,(a,s)=>`${s.toUpperCase()}`);}const Se={stringify:e=>e.name,parse:(e,a,s)=>{const t=(()=>{const l=j(a);if(typeof s<"u"&&l in s.container)return s.container[l];})();return typeof t=="function"?t.bind(s):void 0;}},Te={stringify:e=>`${e}`,parse:e=>parseFloat(e)},we={stringify:e=>e,parse:e=>e},B={string:we,number:Te,boolean:De,function:ve,method:Se,json:Ee},S=Symbol.for("r2wc.render"),_=Symbol.for("r2wc.connected"),v=Symbol.for("r2wc.context"),m=Symbol.for("r2wc.props");function xe(e,a,s){var t,l,D;a.props||(a.props=e.propTypes?Object.keys(e.propTypes):[]),a.events||(a.events=[]);const g=Array.isArray(a.props)?a.props.slice():Object.keys(a.props),E=Array.isArray(a.events)?a.events.slice():Object.keys(a.events),b={},y={},p={},h={};for(const u of g){b[u]=Array.isArray(a.props)?"string":a.props[u];const i=Ae(u);p[u]=i,h[i]=u;}for(const u of E)y[u]=Array.isArray(a.events)?{}:a.events[u];class A extends HTMLElement{constructor(){super(),x(this,D,!0),x(this,l),x(this,t,{}),x(this,"container"),a.shadow?this.container=this.attachShadow({mode:a.shadow}):this.container=this,this[m].container=this.container;for(const i of g){const o=p[i],d=this.getAttribute(o),c=b[i],n=c?B[c]:null;if(c==="method"){const f=j(o);Object.defineProperty(this[m].container,f,{enumerable:!0,configurable:!0,get(){return this[m][f];},set(k){this[m][f]=k,this[S]();}}),this[m][i]=n.parse(d,o,this);}n!=null&&n.parse&&d&&(this[m][i]=n.parse(d,o,this));}for(const i of E)this[m][i]=o=>{const d=i.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(d,{detail:o,...y[i]}));};}static get observedAttributes(){return Object.keys(h);}connectedCallback(){this[_]=!0,this[S]();}disconnectedCallback(){this[_]=!1,this[v]&&s.unmount(this[v]),delete this[v];}attributeChangedCallback(i,o,d){const c=h[i],n=b[c],f=n?B[n]:null;c in b&&f!=null&&f.parse&&d&&(this[m][c]=f.parse(d,i,this),this[S]());}[(D=_,l=v,t=m,S)](){this[_]&&(this[v]?s.update(this[v],this[m]):this[v]=s.mount(this.container,e,this[m]));}}for(const u of g){const i=p[u],o=b[u];Object.defineProperty(A.prototype,u,{enumerable:!0,configurable:!0,get(){return this[m][u];},set(d){this[m][u]=d;const c=o?B[o]:null;if(c!=null&&c.stringify){const n=c.stringify(d,i,this);this.getAttribute(i)!==n&&this.setAttribute(i,n);}else this[S]();}});}return A;}function _e(e,a,s){const t=he(e),l=O.createElement(a,s);return t.render(l),{root:t,ReactComponent:a};}function Fe({root:e,ReactComponent:a},s){const t=O.createElement(a,s);e.render(t);}function Be({root:e}){e.unmount();}function Re(e,a={}){return xe(e,a,{mount:_e,update:Fe,unmount:Be});}const Pe={id:"string",version:"string",authToken:"json",placeholders:"json",defaultFilterValues:"json",defaultControlValues:"json",controlContractOverrides:"json",documentInputValues:"json",dashboardInputExecutionSnapshot:"json",printInputCapture:"json",presentationExecutionSnapshot:"json",viewerTableSettings:"json",renderMode:"string",currentTheme:"string",customCards:"json",appearance:"json",onChartElementClicked:"function",onFilterValuesChange:"function",onEvent:"function",onDashboardLifecycleEvent:"function",onSave:"function",LoadingComponent:"function",ErrorComponent:"function",showBriefings:"boolean",selectedSheetId:"string",eventHandlers:"json",preferences:"json"},ta=typeof HTMLElement>"u"?void 0:Re(U,{props:Pe});function ra(e,a,s,t){M(()=>{e&&!s&&a&&t(me(X(I.getState()).dashboard));},[e,s,a,t]);}function oa({name:e,items:a,value:s,onChange:t,isLoading:l,isError:D,refetch:g,className:E,icon:b,showNone:y=!1}){const p=T.useRef(null),[h,A]=T.useState(!1),[u,i]=T.useState("100%"),o=y?[...(a||[]),{id:"none",name:"None"}]:a;T.useLayoutEffect(()=>{p.current&&i(p.current.offsetWidth);},[]);function d(){var n;return l?"Loading...":D?"Error":s?(n=a==null?void 0:a.find(f=>f.id===s))==null?void 0:n.name:`Select ${e}`;}function c(n,f){t(f),A(!1);}return/* @__PURE__ */C(ee,{open:h,onOpenChange:A,children:[/* @__PURE__ */r(ae,{asChild:!0,children:/* @__PURE__ */C(se,{ref:p,variant:"outline",role:"combobox","aria-expanded":h,className:F("flex h-9 w-full justify-between",E),children:[/* @__PURE__ */C("div",{className:"flex items-center gap-2",children:[b&&/* @__PURE__ */r("div",{className:"mr-2",children:b}),/* @__PURE__ */r("span",{className:"max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap",children:d()})]}),/* @__PURE__ */r(te,{className:"size-4 opacity-50"})]})}),/* @__PURE__ */r(re,{className:"w-full p-0",style:{minWidth:u},children:/* @__PURE__ */C(oe,{children:[/* @__PURE__ */C("div",{className:"flex h-9 items-center justify-between border-b pr-1",children:[/* @__PURE__ */r(ne,{className:"h-9",placeholder:"Search..."}),/* @__PURE__ */r(Q,{className:"h-7",onClick:g,children:/* @__PURE__ */r(ie,{className:F("size-3.5 opacity-50",l&&"animate-spin")})})]}),/* @__PURE__ */C(le,{children:[/* @__PURE__ */C(ce,{children:["No ",e==null?void 0:e.toLowerCase()," found."]}),/* @__PURE__ */r(ue,{children:o==null?void 0:o.map(n=>/* @__PURE__ */r(de,{className:"overflow-x-auto",value:n.name,onSelect:f=>c(f,n.id),children:/* @__PURE__ */C("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */r(pe,{className:F("size-4",s===n.id?"opacity-100":"opacity-0")}),/* @__PURE__ */r("div",{title:n.name,children:n.name})]})},n.id))})]})]})})]});}function na(e,a){M(()=>(e&&a&&(window.__SEMAPHOR_PRINT_STATE__={...a}),()=>{e&&window.__SEMAPHOR_PRINT_STATE__&&delete window.__SEMAPHOR_PRINT_STATE__;}),[e,a]);}export{Tt as ActivityBell,ya as ActivityProvider,G as ActivityScope,wt as AdvancedModeToggle,xt as ArrangeLayoutButton,pa as AssistantPanel,fa as AssistantProvider,ha as AssistantToolbarButton,Da as BriefingAuthor,va as BriefingAuthorDialog,Ea as BriefingUiCapabilitiesBoundary,Aa as BriefingUiCapabilitiesProvider,Sa as BriefingsApiError,lt as CALCULATED_FIELD_ENTITY_MARKER,ca as CONTROL_CARD_DEFAULT_VALUE,Ta as CardSummary,oa as Combobox,ct as DATE_FORMAT_VALUES,hr as DEFAULT_CALENDAR_CONTEXT,At as DEFAULT_SEMANTIC_DOMAIN_ACCESS,U as Dashboard,_t as DashboardBriefingLauncher,Ft as DashboardControlsSettings,wa as DashboardCreateDialog,xa as DashboardExportDialog,Bt as DashboardFavoriteToggle,Rt as DashboardFilterControlsButton,Pt as DashboardFilterControlsLauncher,ta as DashboardWC,Lt as DataVariablesListHost,ma as DisplayFormatPreferencesFields,Nt as DocumentControlsSettings,ua as EMPTY_SELECTION,xs as ExportError,_a as FAVORITES_READ_ONLY_MESSAGE,Fa as FavoriteStarButton,ut as LEGACY_CALCULATED_FIELD_ENTITY_MARKER,Ba as MatrixCardView,_s as PROPOSAL_REFUSALS,ga as ReportPreferencesDialog,Ra as ResourceType,It as ScreenSizePreviewButton,Y as SemaphorContextProvider,Fs as SemaphorDataProvider,Bs as SemaphorQueryClient,Pa as ShareDialog,La as SummaryCard,ba as Surfboard,Na as TOOLBAR_LG_MIN,Ia as TOOLBAR_MD_MIN,Oa as ToolbarOverflowAnchorSlot,Ma as ToolbarProvider,Ot as UnsavedChangesAlert,Mt as VariableEditorHost,sa as Visual,jt as VisualEditingControls,kt as VisualsLibraryDialog,Ut as WatchDashboardButton,ja as applyBriefingFormPatch,ka as briefingFormDraftToCreateRequest,Ua as briefingFormDraftToUpdateRequest,Va as briefingToFormDraft,za as cancelBriefingPreviewRun,Ha as cancelBriefingRun,Rs as cancelExport,me as cloneDeep,Wa as createBriefing,Ga as createBriefingFormDraft,Ps as createEmptyKpiConfig,Ls as createExport,Ns as createMatrixDirectExport,Yt as createSqlGenConfig,$a as deleteBriefing,qa as deleteBriefingRun,Is as downloadDocumentPdf,Os as downloadPdf,Ms as emitDashboardLoad,js as emitDashboardUnload,Ka as fitsToolbar,Jt as fmt,ks as formatFileSize,Qa as getBriefing,Ya as getBriefingArtifact,Ja as getBriefingEvidence,Za as getBriefingPreviewRun,Xa as getBriefingRun,dt as getCalculatedFieldComputeStage,Zt as getColumnDataType,Us as getDownloadUrl,Vs as getExportStatus,zs as getExports,pt as getFieldRuntimeColumnName,Xt as getFilterValueType,er as getFormattedTableNameForQuery,ar as getQualifiedTableName,sr as getSql,ft as hasCalculatedFieldMarker,ht as hasCalculatedFormulaInputs,mt as hasSyntheticCalculatedFieldOwner,gt as inspectCalculatedField,Vt as invalidateToken,tr as isBooleanDataType,bt as isCalculatedDimension,Ct as isCalculatedMetric,rr as isColumnInSqlGen,or as isDateDataType,yt as isDerivedField,Hs as isExportComplete,Ws as isExportInProgress,nr as isGridSheet,ir as isNumberDataType,lr as isTableSheet,cr as isTextDataType,es as listBriefingRuns,as as listBriefingTenantSummaries,ss as listBriefings,Gs as mergeSemanticExecutionPayloadIntoTarget,Dt as normalizeCalculatedFieldRepresentation,$t as normalizeDashboardForDirtyCheck,ts as pauseBriefing,rs as polishBriefingText,os as previewBriefingPlan,ur as resolveDataType,dr as resolveDatamodelName,gr as resolveQueryColumnKeyMapEntry,br as resolveUniqueQueryColumnKeyMapEntry,ns as resumeBriefing,is as runBriefingNow,ls as runBriefingPreview,X as selectEditSessionStart,$s as selectHasEditingToolbar,qs as selectProposalRecordState,Ks as selectProposalUndoable,qt as serializeDashboardForDirtyCheck,pr as sheetKindOf,vt as shouldDropInheritedCalculationAggregate,cs as toolbarWidthFor,us as updateBriefing,Qs as useActivity,ds as useAddNewFrame,ps as useAssistant,fs as useBriefingUiCapabilities,Ys as useCard,hs as useCardSummary,Js as useCurrentActiveCard,Zs as useCurrentCardConfig,Xs as useCurrentSheetActiveCards,et as useDashboardActions,ms as useDashboardById,gs as useDashboardFavorite,bs as useDashboardQuery,I as useDashboardStore,Cs as useDashboardSummary,zt as useDashboardUnsavedChangesCheck,at as useDataColumns,Ht as useDataVariablesMenuEntry,st as useDateFilterHook,Kt as useDebouncedDirtyCheck,Wt as useDefaultDashboardToggle,tt as useEditorActions,rt as useEditorAside,ot as useEditorStore,na as useExposePrintState,ys as useManagementStore,Ds as useMeasuredToolbarWidth,ra as usePristineSnapshotInitializer,vs as useResourceManagement,nt as useTextFilterHook,Es as useToolbarItem,As as useToolbarOverflowItems,Ss as useToolbarWidth,Ts as validateBriefingFormDraft};