@json-to-office/jto 4.5.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/client/assets/{HomePage-CSBsGUBL.js → HomePage-PKIVItSZ.js} +4 -4
  3. package/dist/client/assets/{HomePage-CSBsGUBL.js.map → HomePage-PKIVItSZ.js.map} +1 -1
  4. package/dist/client/assets/{JsonEditorPage-BHVA2YLP.js → JsonEditorPage-CoRaWJiD.js} +3 -3
  5. package/dist/client/assets/{JsonEditorPage-BHVA2YLP.js.map → JsonEditorPage-CoRaWJiD.js.map} +1 -1
  6. package/dist/client/assets/{MonacoPluginProvider-D5aUgKZi.js → MonacoPluginProvider-BRnOmPV0.js} +5 -5
  7. package/dist/client/assets/{MonacoPluginProvider-D5aUgKZi.js.map → MonacoPluginProvider-BRnOmPV0.js.map} +1 -1
  8. package/dist/client/assets/{_virtual_jto-plugin-type-libs-gZZSIMe7.js → _virtual_jto-plugin-type-libs-BWCUBp-C.js} +86 -13
  9. package/dist/client/assets/{_virtual_jto-plugin-type-libs-gZZSIMe7.js.map → _virtual_jto-plugin-type-libs-BWCUBp-C.js.map} +1 -1
  10. package/dist/client/assets/_virtual_jto-sandbox-runtime-CH8UnjtH.js +2 -0
  11. package/dist/client/assets/_virtual_jto-sandbox-runtime-CH8UnjtH.js.map +1 -0
  12. package/dist/client/assets/{editor-Ce9XFPWx.js → editor-Dm1khfnn.js} +2 -2
  13. package/dist/client/assets/{editor-Ce9XFPWx.js.map → editor-Dm1khfnn.js.map} +1 -1
  14. package/dist/client/assets/{editor-monaco-json-u3bIh2LA.js → editor-monaco-json-DO_eqGWS.js} +2 -2
  15. package/dist/client/assets/{editor-monaco-json-u3bIh2LA.js.map → editor-monaco-json-DO_eqGWS.js.map} +1 -1
  16. package/dist/client/assets/index-BiJMw-wa.js +27 -0
  17. package/dist/client/assets/index-BiJMw-wa.js.map +1 -0
  18. package/dist/client/assets/{index-DruKDred.js → index-BjrSy9_x.js} +2 -2
  19. package/dist/client/assets/{index-DruKDred.js.map → index-BjrSy9_x.js.map} +1 -1
  20. package/dist/client/assets/{preview-Bjxi6Nq3.js → preview-Dpxghqei.js} +2 -2
  21. package/dist/client/assets/preview-Dpxghqei.js.map +1 -0
  22. package/dist/client/assets/{useQualityAnalysis-AZKgMcJ7.js → useQualityAnalysis-DxBTon99.js} +3 -3
  23. package/dist/client/assets/{useQualityAnalysis-AZKgMcJ7.js.map → useQualityAnalysis-DxBTon99.js.map} +1 -1
  24. package/dist/client/index.html +1 -1
  25. package/dist/client/templates/consulting-deck-blocks.pptx.json +1057 -156
  26. package/dist/client/templates/technical-report-blocks.docx.json +1703 -0
  27. package/package.json +7 -7
  28. package/dist/client/assets/_virtual_jto-sandbox-runtime-CVTtmFTd.js +0 -2
  29. package/dist/client/assets/_virtual_jto-sandbox-runtime-CVTtmFTd.js.map +0 -1
  30. package/dist/client/assets/index-CHGFn3dH.js +0 -27
  31. package/dist/client/assets/index-CHGFn3dH.js.map +0 -1
  32. package/dist/client/assets/preview-Bjxi6Nq3.js.map +0 -1
@@ -0,0 +1,27 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-PKIVItSZ.js","assets/react-vendor-BmQ2Ko_D.js","assets/MonacoPluginProvider-BRnOmPV0.js","assets/state-vendor-Cq67_JbF.js","assets/monaco-editor-DJsdM0WK.js","assets/radix-ui-BzbaiLpZ.js","assets/ui-vendor-BsAtAN16.js","assets/index-BjrSy9_x.js","assets/query-vendor--rhYD8mC.js","assets/JsonEditorPage-CoRaWJiD.js","assets/NotFoundPage-rSUaByPC.js"])))=>i.map(i=>d[i]);
2
+ var _c=Object.defineProperty;var Wc=(e,n,i)=>n in e?_c(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var rt=(e,n,i)=>Wc(e,typeof n!="symbol"?n+"":n,i);import{r as he,j,O as qc,u as Hc,B as Kc,d as Gc}from"./react-vendor-BmQ2Ko_D.js";import{Q as Vc,a as Jc}from"./query-vendor--rhYD8mC.js";import{P as Xc,C as Va,A as Yc,a as Zc,R as Qc,T as ed}from"./radix-ui-BzbaiLpZ.js";import{c as td}from"./ui-vendor-BsAtAN16.js";import{loader as nd}from"./monaco-editor-DJsdM0WK.js";import{c as Ja}from"./state-vendor-Cq67_JbF.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function i(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=i(o);fetch(o.href,a)}})();const id="modulepreload",rd=function(e){return"/"+e},ca={},oo=function(n,i,r){let o=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),c=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(i.map(l=>{if(l=rd(l),l in ca)return;ca[l]=!0;const d=l.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":id,d||(p.as="script"),p.crossOrigin="",p.href=l,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((O,u)=>{p.addEventListener("load",O),p.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(s){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s}return o.then(s=>{for(const c of s||[])c.status==="rejected"&&a(c.reason);return n().catch(a)})},od={theme:"system",setTheme:()=>null,resolvedTheme:"light"},Xa=he.createContext(od);function ad({children:e,defaultTheme:n="system",storageKey:i="vite-ui-theme",...r}){const[o,a]=he.useState(()=>localStorage.getItem(i)||n),s=o==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o;he.useEffect(()=>{const l=window.document.documentElement;if(l.classList.remove("light","dark"),o==="system"){const d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";l.classList.add(d);return}l.classList.add(o)},[o]);const c={theme:o,resolvedTheme:s,setTheme:l=>{localStorage.setItem(i,l),a(l)}};return j.jsx(Xa.Provider,{...r,value:c,children:e})}const M0=()=>{const e=he.useContext(Xa);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},ao="-",sd=e=>{const n=cd(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const c=s.split(ao);return c[0]===""&&c.length!==1&&c.shift(),Ya(c,n)||ld(s)},getConflictingClassGroupIds:(s,c)=>{const l=i[s]||[];return c&&r[s]?[...l,...r[s]]:l}}},Ya=(e,n)=>{var s;if(e.length===0)return n.classGroupId;const i=e[0],r=n.nextPart.get(i),o=r?Ya(e.slice(1),r):void 0;if(o)return o;if(n.validators.length===0)return;const a=e.join(ao);return(s=n.validators.find(({validator:c})=>c(a)))==null?void 0:s.classGroupId},da=/^\[(.+)\]$/,ld=e=>{if(da.test(e)){const n=da.exec(e)[1],i=n==null?void 0:n.substring(0,n.indexOf(":"));if(i)return"arbitrary.."+i}},cd=e=>{const{theme:n,classGroups:i}=e,r={nextPart:new Map,validators:[]};for(const o in i)Rr(i[o],r,o,n);return r},Rr=(e,n,i,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?n:pa(n,o);a.classGroupId=i;return}if(typeof o=="function"){if(dd(o)){Rr(o(r),n,i,r);return}n.validators.push({validator:o,classGroupId:i});return}Object.entries(o).forEach(([a,s])=>{Rr(s,pa(n,a),i,r)})})},pa=(e,n)=>{let i=e;return n.split(ao).forEach(r=>{i.nextPart.has(r)||i.nextPart.set(r,{nextPart:new Map,validators:[]}),i=i.nextPart.get(r)}),i},dd=e=>e.isThemeGetter,pd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=new Map,r=new Map;const o=(a,s)=>{i.set(a,s),n++,n>e&&(n=0,r=i,i=new Map)};return{get(a){let s=i.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){i.has(a)?i.set(a,s):o(a,s)}}},Ur="!",Mr=":",ud=Mr.length,md=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=o=>{const a=[];let s=0,c=0,l=0,d;for(let h=0;h<o.length;h++){let b=o[h];if(s===0&&c===0){if(b===Mr){a.push(o.slice(l,h)),l=h+ud;continue}if(b==="/"){d=h;continue}}b==="["?s++:b==="]"?s--:b==="("?c++:b===")"&&c--}const f=a.length===0?o:o.substring(l),p=fd(f),O=p!==f,u=d&&d>l?d-l:void 0;return{modifiers:a,hasImportantModifier:O,baseClassName:p,maybePostfixModifierPosition:u}};if(n){const o=n+Mr,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(i){const o=r;r=a=>i({className:a,parseClassName:o})}return r},fd=e=>e.endsWith(Ur)?e.substring(0,e.length-1):e.startsWith(Ur)?e.substring(1):e,gd=e=>{const n=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||n[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},hd=e=>({cache:pd(e.cacheSize),parseClassName:md(e),sortModifiers:gd(e),...sd(e)}),bd=/\s+/,Od=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,s=[],c=e.trim().split(bd);let l="";for(let d=c.length-1;d>=0;d-=1){const f=c[d],{isExternal:p,modifiers:O,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:b}=i(f);if(p){l=f+(l.length>0?" "+l:l);continue}let L=!!b,N=r(L?h.substring(0,b):h);if(!N){if(!L){l=f+(l.length>0?" "+l:l);continue}if(N=r(h),!N){l=f+(l.length>0?" "+l:l);continue}L=!1}const I=a(O).join(":"),w=u?I+Ur:I,D=w+N;if(s.includes(D))continue;s.push(D);const _=o(N,L);for(let T=0;T<_.length;++T){const A=_[T];s.push(w+A)}l=f+(l.length>0?" "+l:l)}return l};function yd(){let e=0,n,i,r="";for(;e<arguments.length;)(n=arguments[e++])&&(i=Za(n))&&(r&&(r+=" "),r+=i);return r}const Za=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=Za(e[r]))&&(i&&(i+=" "),i+=n);return i};function xd(e,...n){let i,r,o,a=s;function s(l){const d=n.reduce((f,p)=>p(f),e());return i=hd(d),r=i.cache.get,o=i.cache.set,a=c,c(l)}function c(l){const d=r(l);if(d)return d;const f=Od(l,i);return o(l,f),f}return function(){return a(yd.apply(null,arguments))}}const de=e=>{const n=i=>i[e]||[];return n.isThemeGetter=!0,n},Qa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,es=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sd=/^\d+\/\d+$/,wd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ld=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,vd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Pd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$d=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yt=e=>Sd.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),Nt=e=>!!e&&Number.isInteger(Number(e)),ua=e=>e.endsWith("%")&&B(e.slice(0,-1)),mt=e=>wd.test(e),Id=()=>!0,Nd=e=>Ld.test(e)&&!vd.test(e),so=()=>!1,kd=e=>Pd.test(e),Ad=e=>$d.test(e),Td=e=>!P(e)&&!$(e),Fd=e=>pn(e,is,so),P=e=>Qa.test(e),kt=e=>pn(e,rs,Nd),gr=e=>pn(e,Wd,B),jd=e=>pn(e,ts,so),Rd=e=>pn(e,ns,Ad),Ud=e=>pn(e,so,kd),$=e=>es.test(e),ii=e=>un(e,rs),Md=e=>un(e,qd),Bd=e=>un(e,ts),Ed=e=>un(e,is),Cd=e=>un(e,ns),Dd=e=>un(e,Hd,!0),pn=(e,n,i)=>{const r=Qa.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},un=(e,n,i=!1)=>{const r=es.exec(e);return r?r[1]?n(r[1]):i:!1},ts=e=>e==="position",zd=new Set(["image","url"]),ns=e=>zd.has(e),_d=new Set(["length","size","percentage"]),is=e=>_d.has(e),rs=e=>e==="length",Wd=e=>e==="number",qd=e=>e==="family-name",Hd=e=>e==="shadow",Kd=()=>{const e=de("color"),n=de("font"),i=de("text"),r=de("font-weight"),o=de("tracking"),a=de("leading"),s=de("breakpoint"),c=de("container"),l=de("spacing"),d=de("radius"),f=de("shadow"),p=de("inset-shadow"),O=de("drop-shadow"),u=de("blur"),h=de("perspective"),b=de("aspect"),L=de("ease"),N=de("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],T=()=>[Yt,"px","full","auto",$,P,l],A=()=>[Nt,"none","subgrid",$,P],W=()=>["auto",{span:["full",Nt,$,P]},$,P],k=()=>[Nt,"auto",$,P],R=()=>["auto","min","max","fr",$,P],J=()=>[$,P,l],Q=()=>["start","end","center","between","around","evenly","stretch","baseline"],X=()=>["start","end","center","stretch"],y=()=>[$,P,l],F=()=>["px",...y()],Y=()=>["px","auto",...y()],ce=()=>[Yt,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",$,P,l],z=()=>[e,$,P],Jt=()=>[ua,kt],ge=()=>["","none","full",d,$,P],Z=()=>["",B,ii,kt],G=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Xt=()=>["","none",u,$,P],la=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$,P],ei=()=>["none",B,$,P],ti=()=>["none",B,$,P],fr=()=>[B,$,P],ni=()=>[Yt,"full","px",$,P,l];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mt],breakpoint:[mt],color:[Id],container:[mt],"drop-shadow":[mt],ease:["in","out","in-out"],font:[Td],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mt],shadow:[mt],spacing:[B],text:[mt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yt,P,$,b]}],container:["container"],columns:[{columns:[B,P,$,c]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...w(),P,$]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Nt,"auto",$,P]}],basis:[{basis:[Yt,"full","auto",$,P,c,l]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[B,Yt,"auto","initial","none",P]}],grow:[{grow:["",B,$,P]}],shrink:[{shrink:["",B,$,P]}],order:[{order:[Nt,"first","last","none",$,P]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:J()}],"gap-x":[{"gap-x":J()}],"gap-y":[{"gap-y":J()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...X(),"baseline"]}],"align-self":[{self:["auto",...X(),"baseline"]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],w:[{w:[c,"screen",...ce()]}],"min-w":[{"min-w":[c,"screen","none",...ce()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[s]},...ce()]}],h:[{h:["screen",...ce()]}],"min-h":[{"min-h":["screen","none",...ce()]}],"max-h":[{"max-h":["screen",...ce()]}],"font-size":[{text:["base",i,ii,kt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$,gr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ua,P]}],"font-family":[{font:[Md,P,n]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,$,P]}],"line-clamp":[{"line-clamp":[B,"none",$,gr]}],leading:[{leading:[$,P,a,l]}],"list-image":[{"list-image":["none",$,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[B,"from-font","auto",$,kt]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[B,"auto",$,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:["px",...y()]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,P]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...w(),Bd,jd]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Ed,Fd]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nt,$,P],radial:["",$,P],conic:[Nt,$,P]},Cd,Rd]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:Jt()}],"gradient-via-pos":[{via:Jt()}],"gradient-to-pos":[{to:Jt()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:ge()}],"rounded-s":[{"rounded-s":ge()}],"rounded-e":[{"rounded-e":ge()}],"rounded-t":[{"rounded-t":ge()}],"rounded-r":[{"rounded-r":ge()}],"rounded-b":[{"rounded-b":ge()}],"rounded-l":[{"rounded-l":ge()}],"rounded-ss":[{"rounded-ss":ge()}],"rounded-se":[{"rounded-se":ge()}],"rounded-ee":[{"rounded-ee":ge()}],"rounded-es":[{"rounded-es":ge()}],"rounded-tl":[{"rounded-tl":ge()}],"rounded-tr":[{"rounded-tr":ge()}],"rounded-br":[{"rounded-br":ge()}],"rounded-bl":[{"rounded-bl":ge()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[B,$,P]}],"outline-w":[{outline:["",B,ii,kt]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,Dd,Ud]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",$,P,p]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[B,kt]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":z()}],opacity:[{opacity:[B,$,P]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],filter:[{filter:["","none",$,P]}],blur:[{blur:Xt()}],brightness:[{brightness:[B,$,P]}],contrast:[{contrast:[B,$,P]}],"drop-shadow":[{"drop-shadow":["","none",O,$,P]}],grayscale:[{grayscale:["",B,$,P]}],"hue-rotate":[{"hue-rotate":[B,$,P]}],invert:[{invert:["",B,$,P]}],saturate:[{saturate:[B,$,P]}],sepia:[{sepia:["",B,$,P]}],"backdrop-filter":[{"backdrop-filter":["","none",$,P]}],"backdrop-blur":[{"backdrop-blur":Xt()}],"backdrop-brightness":[{"backdrop-brightness":[B,$,P]}],"backdrop-contrast":[{"backdrop-contrast":[B,$,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",B,$,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,$,P]}],"backdrop-invert":[{"backdrop-invert":["",B,$,P]}],"backdrop-opacity":[{"backdrop-opacity":[B,$,P]}],"backdrop-saturate":[{"backdrop-saturate":[B,$,P]}],"backdrop-sepia":[{"backdrop-sepia":["",B,$,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[B,"initial",$,P]}],ease:[{ease:["linear","initial",L,$,P]}],delay:[{delay:[B,$,P]}],animate:[{animate:["none",N,$,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,$,P]}],"perspective-origin":[{"perspective-origin":la()}],rotate:[{rotate:ei()}],"rotate-x":[{"rotate-x":ei()}],"rotate-y":[{"rotate-y":ei()}],"rotate-z":[{"rotate-z":ei()}],scale:[{scale:ti()}],"scale-x":[{"scale-x":ti()}],"scale-y":[{"scale-y":ti()}],"scale-z":[{"scale-z":ti()}],"scale-3d":["scale-3d"],skew:[{skew:fr()}],"skew-x":[{"skew-x":fr()}],"skew-y":[{"skew-y":fr()}],transform:[{transform:[$,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:la()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ni()}],"translate-x":[{"translate-x":ni()}],"translate-y":[{"translate-y":ni()}],"translate-z":[{"translate-z":ni()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$,P]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$,P]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[B,ii,kt,gr]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Gd=xd(Kd);function bt(...e){return Gd(td(e))}const Vd=Zc,B0=Qc,E0=ed,Jd=he.forwardRef(({className:e,sideOffset:n=4,children:i,...r},o)=>j.jsx(Xc,{children:j.jsxs(Va,{ref:o,"data-slot":"tooltip-content",sideOffset:n,className:bt("bg-popover text-popover-foreground border shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit text-balance rounded-md px-3 py-1.5 text-xs",e),...r,children:[i,j.jsx(Yc,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-popover fill-popover"})]})}));Jd.displayName=Va.displayName;const os=he.forwardRef(({className:e,variant:n="default",title:i,description:r,action:o,open:a,onOpenChange:s,...c},l)=>j.jsx("div",{ref:l,className:bt("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-lg border p-6 pr-8 shadow-lg transition-all",n==="default"&&"border bg-background text-foreground",n==="destructive"&&"destructive group border-destructive bg-destructive text-destructive-foreground",e),...c}));os.displayName="Toast";const Xd=he.forwardRef(({className:e,...n},i)=>j.jsx("button",{ref:i,className:bt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...n}));Xd.displayName="ToastAction";const as=he.forwardRef(({className:e,...n},i)=>j.jsx("button",{ref:i,type:"button",className:bt("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground/70 group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive-foreground/40",e),"toast-close":"",...n,children:j.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[j.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}));as.displayName="ToastClose";const ss=he.forwardRef(({className:e,...n},i)=>j.jsx("div",{ref:i,className:bt("text-sm font-semibold",e),...n}));ss.displayName="ToastTitle";const ls=he.forwardRef(({className:e,...n},i)=>j.jsx("div",{ref:i,className:bt("text-sm opacity-90",e),...n}));ls.displayName="ToastDescription";const cs=he.forwardRef(({className:e,...n},i)=>j.jsx("ol",{ref:i,className:bt("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...n}));cs.displayName="ToastViewport";const Yd=1,ds=5e3;let hr=0;function Zd(){return hr=(hr+1)%Number.MAX_SAFE_INTEGER,hr.toString()}const br=new Map,ma=e=>{if(br.has(e))return;const n=setTimeout(()=>{br.delete(e),Nn({type:"REMOVE_TOAST",toastId:e})},ds);br.set(e,n)},Qd=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,Yd)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(i=>i.id===n.toast.id?{...i,...n.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=n;return i?ma(i):e.toasts.forEach(r=>{ma(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===i||i===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return n.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==n.toastId)}}},mi=[];let fi={toasts:[]};function Nn(e){fi=Qd(fi,e),mi.forEach(n=>{n(fi)})}function ep({...e}){const n=Zd(),i=o=>Nn({type:"UPDATE_TOAST",toast:{...o,id:n}}),r=()=>Nn({type:"DISMISS_TOAST",toastId:n});return Nn({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:o=>{o||r()}}}),setTimeout(()=>{r()},ds),{id:n,dismiss:r,update:i}}function tp(){const[e,n]=he.useState(fi);return he.useEffect(()=>(mi.push(n),()=>{const i=mi.indexOf(n);i>-1&&mi.splice(i,1)}),[e]),{...e,toast:ep,dismiss:i=>Nn({type:"DISMISS_TOAST",toastId:i})}}function np(){const{toasts:e,dismiss:n}=tp();return j.jsx(cs,{children:e.map(function({id:i,title:r,description:o,action:a,open:s,...c}){return s===!1?null:j.jsxs(os,{...c,children:[j.jsxs("div",{className:"grid gap-1",children:[r&&j.jsx(ss,{children:r}),o&&j.jsx(ls,{children:o})]}),a,j.jsx(as,{onClick:l=>{l.preventDefault(),l.stopPropagation(),n(i)}})]},i)})})}function ip(){return j.jsx(ad,{defaultTheme:"system",storageKey:"vite-ui-theme",children:j.jsxs(Vd,{delayDuration:300,children:[j.jsx("div",{className:"min-h-screen bg-background font-sans antialiased",children:j.jsx(qc,{})}),j.jsx(np,{})]})})}function rp({className:e,size:n="md",variant:i="primary",...r}){const o={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},a={primary:"border-primary",secondary:"border-secondary",muted:"border-muted-foreground"};return j.jsx("div",{className:bt("animate-spin rounded-full border-2 border-solid",o[n],a[i],e),style:{borderRightColor:"transparent"},...r})}const op=he.lazy(()=>oo(()=>import("./HomePage-PKIVItSZ.js").then(e=>e.H),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.HomePage}))),ap=he.lazy(()=>oo(()=>import("./JsonEditorPage-CoRaWJiD.js"),__vite__mapDeps([9,1,2,3,4,8,5,6])).then(e=>({default:e.JsonEditorPage}))),sp=he.lazy(()=>oo(()=>import("./NotFoundPage-rSUaByPC.js"),__vite__mapDeps([10,1])).then(e=>({default:e.NotFoundPage}))),Or=({children:e})=>j.jsx(he.Suspense,{fallback:j.jsx("div",{className:"flex items-center justify-center h-screen",children:j.jsx(rp,{className:"w-8 h-8"})}),children:e}),lp=[{path:"/",element:j.jsx(ip,{}),children:[{index:!0,element:j.jsx(Or,{children:j.jsx(op,{})})},{path:"json-editor",element:j.jsx(Or,{children:j.jsx(ap,{})})}]},{path:"*",element:j.jsx(Or,{children:j.jsx(sp,{})})}];function cp(){return Hc(lp)}const dp=new Vc({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function pp(){return j.jsx(Jc,{client:dp,children:j.jsx(Kc,{children:j.jsx(cp,{})})})}function up(e){return oe(e)&&!Ne(e)&&!Dn(e)&&Symbol.asyncIterator in e}function Ne(e){return Array.isArray(e)}function ps(e){return typeof e=="bigint"}function Cn(e){return typeof e=="boolean"}function lo(e){return e instanceof globalThis.Date}function mp(e){return typeof e=="function"}function fp(e){return oe(e)&&!Ne(e)&&!Dn(e)&&Symbol.iterator in e}function gp(e){return e===null}function tt(e){return typeof e=="number"}function oe(e){return typeof e=="object"&&e!==null}function us(e){return e instanceof globalThis.RegExp}function ne(e){return typeof e=="string"}function hp(e){return typeof e=="symbol"}function Dn(e){return e instanceof globalThis.Uint8Array}function ie(e){return e===void 0}function bp(e){return e.map(n=>Oi(n))}function Op(e){return new Date(e.getTime())}function yp(e){return new Uint8Array(e)}function xp(e){return new RegExp(e.source,e.flags)}function Sp(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Oi(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Oi(e[i]);return n}function Oi(e){return Ne(e)?bp(e):lo(e)?Op(e):Dn(e)?yp(e):us(e)?xp(e):oe(e)?Sp(e):e}function Ae(e){return Oi(e)}function co(e,n){return Ae(n===void 0?e:{...n,...e})}function ms(e){return nt(e)&&globalThis.Symbol.asyncIterator in e}function fs(e){return nt(e)&&globalThis.Symbol.iterator in e}function gs(e){return e instanceof globalThis.Promise}function zn(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function wp(e){return e instanceof globalThis.Map}function Lp(e){return e instanceof globalThis.Set}function vp(e){return globalThis.ArrayBuffer.isView(e)}function po(e){return e instanceof globalThis.Uint8Array}function Pp(e,n){return n in e}function nt(e){return e!==null&&typeof e=="object"}function it(e){return globalThis.Array.isArray(e)&&!globalThis.ArrayBuffer.isView(e)}function Ot(e){return e===void 0}function Ni(e){return e===null}function ki(e){return typeof e=="boolean"}function at(e){return typeof e=="number"}function hs(e){return globalThis.Number.isInteger(e)}function Ai(e){return typeof e=="bigint"}function et(e){return typeof e=="string"}function uo(e){return typeof e=="function"}function Ti(e){return typeof e=="symbol"}function $p(e){return Ai(e)||ki(e)||Ni(e)||at(e)||et(e)||Ti(e)||Ot(e)}var Te;(function(e){e.InstanceMode="default",e.ExactOptionalPropertyTypes=!1,e.AllowArrayObject=!1,e.AllowNaN=!1,e.AllowNullVoid=!1;function n(s,c){return e.ExactOptionalPropertyTypes?c in s:s[c]!==void 0}e.IsExactOptionalProperty=n;function i(s){const c=nt(s);return e.AllowArrayObject?c:c&&!it(s)}e.IsObjectLike=i;function r(s){return i(s)&&!(s instanceof Date)&&!(s instanceof Uint8Array)}e.IsRecordLike=r;function o(s){return e.AllowNaN?at(s):Number.isFinite(s)}e.IsNumberLike=o;function a(s){const c=Ot(s);return e.AllowNullVoid?c||s===null:c}e.IsVoidLike=a})(Te||(Te={}));function Ip(e){return globalThis.Object.freeze(e).map(n=>yi(n))}function Np(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=yi(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=yi(e[i]);return globalThis.Object.freeze(n)}function yi(e){return Ne(e)?Ip(e):lo(e)?e:Dn(e)?e:us(e)?e:oe(e)?Np(e):e}function x(e,n){const i=n!==void 0?{...n,...e}:e;switch(Te.InstanceMode){case"freeze":return yi(i);case"clone":return Ae(i);default:return i}}class Xe extends Error{constructor(n){super(n)}}const Ee=Symbol.for("TypeBox.Transform"),_n=Symbol.for("TypeBox.Readonly"),dt=Symbol.for("TypeBox.Optional"),Fi=Symbol.for("TypeBox.Hint"),v=Symbol.for("TypeBox.Kind");function mo(e){return oe(e)&&e[_n]==="Readonly"}function yt(e){return oe(e)&&e[dt]==="Optional"}function bs(e){return E(e,"Any")}function Os(e){return E(e,"Argument")}function mn(e){return E(e,"Array")}function ji(e){return E(e,"AsyncIterator")}function Ri(e){return E(e,"BigInt")}function Wn(e){return E(e,"Boolean")}function fn(e){return E(e,"Computed")}function gn(e){return E(e,"Constructor")}function kp(e){return E(e,"Date")}function hn(e){return E(e,"Function")}function bn(e){return E(e,"Integer")}function ze(e){return E(e,"Intersect")}function Ui(e){return E(e,"Iterator")}function E(e,n){return oe(e)&&v in e&&e[v]===n}function ys(e){return Cn(e)||tt(e)||ne(e)}function Et(e){return E(e,"Literal")}function Ct(e){return E(e,"MappedKey")}function Ue(e){return E(e,"MappedResult")}function qn(e){return E(e,"Never")}function Ap(e){return E(e,"Not")}function fo(e){return E(e,"Null")}function On(e){return E(e,"Number")}function Ye(e){return E(e,"Object")}function Mi(e){return E(e,"Promise")}function Bi(e){return E(e,"Record")}function $e(e){return E(e,"Ref")}function xs(e){return E(e,"RegExp")}function Hn(e){return E(e,"String")}function go(e){return E(e,"Symbol")}function Dt(e){return E(e,"TemplateLiteral")}function Tp(e){return E(e,"This")}function Ei(e){return oe(e)&&Ee in e}function zt(e){return E(e,"Tuple")}function ho(e){return E(e,"Undefined")}function fe(e){return E(e,"Union")}function Fp(e){return E(e,"Uint8Array")}function jp(e){return E(e,"Unknown")}function Rp(e){return E(e,"Unsafe")}function Up(e){return E(e,"Void")}function Ss(e){return oe(e)&&v in e&&ne(e[v])}function lt(e){return bs(e)||Os(e)||mn(e)||Wn(e)||Ri(e)||ji(e)||fn(e)||gn(e)||kp(e)||hn(e)||bn(e)||ze(e)||Ui(e)||Et(e)||Ct(e)||Ue(e)||qn(e)||Ap(e)||fo(e)||On(e)||Ye(e)||Mi(e)||Bi(e)||$e(e)||xs(e)||Hn(e)||go(e)||Dt(e)||Tp(e)||zt(e)||ho(e)||fe(e)||Fp(e)||jp(e)||Rp(e)||Up(e)||Ss(e)}const Mp=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function ws(e){try{return new RegExp(e),!0}catch{return!1}}function bo(e){if(!ne(e))return!1;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(i>=7&&i<=13||i===27||i===127)return!1}return!0}function Ls(e){return Oo(e)||Oe(e)}function Ln(e){return ie(e)||ps(e)}function V(e){return ie(e)||tt(e)}function Oo(e){return ie(e)||Cn(e)}function K(e){return ie(e)||ne(e)}function Bp(e){return ie(e)||ne(e)&&bo(e)&&ws(e)}function Ep(e){return ie(e)||ne(e)&&bo(e)}function vs(e){return ie(e)||Oe(e)}function xi(e){return oe(e)&&e[dt]==="Optional"}function Ke(e){return C(e,"Any")&&K(e.$id)}function Cp(e){return C(e,"Argument")&&tt(e.index)}function _t(e){return C(e,"Array")&&e.type==="array"&&K(e.$id)&&Oe(e.items)&&V(e.minItems)&&V(e.maxItems)&&Oo(e.uniqueItems)&&vs(e.contains)&&V(e.minContains)&&V(e.maxContains)}function yo(e){return C(e,"AsyncIterator")&&e.type==="AsyncIterator"&&K(e.$id)&&Oe(e.items)}function Ci(e){return C(e,"BigInt")&&e.type==="bigint"&&K(e.$id)&&Ln(e.exclusiveMaximum)&&Ln(e.exclusiveMinimum)&&Ln(e.maximum)&&Ln(e.minimum)&&Ln(e.multipleOf)}function Wt(e){return C(e,"Boolean")&&e.type==="boolean"&&K(e.$id)}function Dp(e){return C(e,"Computed")&&ne(e.target)&&Ne(e.parameters)&&e.parameters.every(n=>Oe(n))}function Di(e){return C(e,"Constructor")&&e.type==="Constructor"&&K(e.$id)&&Ne(e.parameters)&&e.parameters.every(n=>Oe(n))&&Oe(e.returns)}function zi(e){return C(e,"Date")&&e.type==="Date"&&K(e.$id)&&V(e.exclusiveMaximumTimestamp)&&V(e.exclusiveMinimumTimestamp)&&V(e.maximumTimestamp)&&V(e.minimumTimestamp)&&V(e.multipleOfTimestamp)}function _i(e){return C(e,"Function")&&e.type==="Function"&&K(e.$id)&&Ne(e.parameters)&&e.parameters.every(n=>Oe(n))&&Oe(e.returns)}function pt(e){return C(e,"Integer")&&e.type==="integer"&&K(e.$id)&&V(e.exclusiveMaximum)&&V(e.exclusiveMinimum)&&V(e.maximum)&&V(e.minimum)&&V(e.multipleOf)}function Ps(e){return oe(e)&&Object.entries(e).every(([n,i])=>bo(n)&&Oe(i))}function qt(e){return C(e,"Intersect")&&!(ne(e.type)&&e.type!=="object")&&Ne(e.allOf)&&e.allOf.every(n=>Oe(n)&&!Kp(n))&&K(e.type)&&(Oo(e.unevaluatedProperties)||vs(e.unevaluatedProperties))&&K(e.$id)}function xo(e){return C(e,"Iterator")&&e.type==="Iterator"&&K(e.$id)&&Oe(e.items)}function C(e,n){return oe(e)&&v in e&&e[v]===n}function $s(e){return xt(e)&&ne(e.const)}function Is(e){return xt(e)&&tt(e.const)}function Ns(e){return xt(e)&&Cn(e.const)}function xt(e){return C(e,"Literal")&&K(e.$id)&&zp(e.const)}function zp(e){return Cn(e)||tt(e)||ne(e)}function _p(e){return C(e,"MappedKey")&&Ne(e.keys)&&e.keys.every(n=>tt(n)||ne(n))}function Wp(e){return C(e,"MappedResult")&&Ps(e.properties)}function St(e){return C(e,"Never")&&oe(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function on(e){return C(e,"Not")&&Oe(e.not)}function So(e){return C(e,"Null")&&e.type==="null"&&K(e.$id)}function Pe(e){return C(e,"Number")&&e.type==="number"&&K(e.$id)&&V(e.exclusiveMaximum)&&V(e.exclusiveMinimum)&&V(e.maximum)&&V(e.minimum)&&V(e.multipleOf)}function ee(e){return C(e,"Object")&&e.type==="object"&&K(e.$id)&&Ps(e.properties)&&Ls(e.additionalProperties)&&V(e.minProperties)&&V(e.maxProperties)}function wo(e){return C(e,"Promise")&&e.type==="Promise"&&K(e.$id)&&Oe(e.item)}function be(e){return C(e,"Record")&&e.type==="object"&&K(e.$id)&&Ls(e.additionalProperties)&&oe(e.patternProperties)&&(n=>{const i=Object.getOwnPropertyNames(n.patternProperties);return i.length===1&&ws(i[0])&&oe(n.patternProperties)&&Oe(n.patternProperties[i[0]])})(e)}function qp(e){return C(e,"Ref")&&K(e.$id)&&ne(e.$ref)}function An(e){return C(e,"RegExp")&&K(e.$id)&&ne(e.source)&&ne(e.flags)&&V(e.maxLength)&&V(e.minLength)}function Ge(e){return C(e,"String")&&e.type==="string"&&K(e.$id)&&V(e.minLength)&&V(e.maxLength)&&Bp(e.pattern)&&Ep(e.format)}function Tn(e){return C(e,"Symbol")&&e.type==="symbol"&&K(e.$id)}function Fn(e){return C(e,"TemplateLiteral")&&e.type==="string"&&ne(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function Hp(e){return C(e,"This")&&K(e.$id)&&ne(e.$ref)}function Kp(e){return oe(e)&&Ee in e}function Wi(e){return C(e,"Tuple")&&e.type==="array"&&K(e.$id)&&tt(e.minItems)&&tt(e.maxItems)&&e.minItems===e.maxItems&&(ie(e.items)&&ie(e.additionalItems)&&e.minItems===0||Ne(e.items)&&e.items.every(n=>Oe(n)))}function Ut(e){return C(e,"Undefined")&&e.type==="undefined"&&K(e.$id)}function ct(e){return C(e,"Union")&&K(e.$id)&&oe(e)&&Ne(e.anyOf)&&e.anyOf.every(n=>Oe(n))}function Kn(e){return C(e,"Uint8Array")&&e.type==="Uint8Array"&&K(e.$id)&&V(e.minByteLength)&&V(e.maxByteLength)}function Ve(e){return C(e,"Unknown")&&K(e.$id)}function Gp(e){return C(e,"Unsafe")}function qi(e){return C(e,"Void")&&e.type==="void"&&K(e.$id)}function Vp(e){return oe(e)&&v in e&&ne(e[v])&&!Mp.includes(e[v])}function Oe(e){return oe(e)&&(Ke(e)||Cp(e)||_t(e)||Wt(e)||Ci(e)||yo(e)||Dp(e)||Di(e)||zi(e)||_i(e)||pt(e)||qt(e)||xo(e)||xt(e)||_p(e)||Wp(e)||St(e)||on(e)||So(e)||Pe(e)||ee(e)||wo(e)||be(e)||qp(e)||An(e)||Ge(e)||Tn(e)||Fn(e)||Hp(e)||Wi(e)||Ut(e)||ct(e)||Kn(e)||Ve(e)||Gp(e)||qi(e)||Vp(e))}const Jp="(true|false)",gi="(0|[1-9][0-9]*)",ks="(.*)",Xp="(?!.*)",an=`^${gi}$`,sn=`^${ks}$`,Yp=`^${Xp}$`,Lo=new Map;function As(e){return Lo.has(e)}function Ts(e,n){Lo.set(e,n)}function Fs(e){return Lo.get(e)}const js=new Map;function vo(e){return js.has(e)}function Rs(e){return js.get(e)}function Zp(e,n){return e.includes(n)}function Qp(e){return[...new Set(e)]}function eu(e,n){return e.filter(i=>n.includes(i))}function tu(e,n){return e.reduce((i,r)=>eu(i,r),n)}function nu(e){return e.length===1?e[0]:e.length>1?tu(e.slice(1),e[0]):[]}function iu(e){const n=[];for(const i of e)n.push(...i);return n}function jn(e){return x({[v]:"Any"},e)}function Po(e,n){return x({[v]:"Array",type:"array",items:e},n)}function ru(e){return x({[v]:"Argument",index:e})}function $o(e,n){return x({[v]:"AsyncIterator",type:"AsyncIterator",items:e},n)}function le(e,n,i){return x({[v]:"Computed",target:e,parameters:n},i)}function ou(e,n){const{[n]:i,...r}=e;return r}function Fe(e,n){return n.reduce((i,r)=>ou(i,r),e)}function te(e){return x({[v]:"Never",not:{}},e)}function ye(e){return x({[v]:"MappedResult",properties:e})}function Io(e,n,i){return x({[v]:"Constructor",type:"Constructor",parameters:e,returns:n},i)}function Gn(e,n,i){return x({[v]:"Function",type:"Function",parameters:e,returns:n},i)}function Br(e,n){return x({[v]:"Union",anyOf:e},n)}function au(e){return e.some(n=>yt(n))}function fa(e){return e.map(n=>yt(n)?su(n):n)}function su(e){return Fe(e,[dt])}function lu(e,n){return au(e)?vt(Br(fa(e),n)):Br(fa(e),n)}function yn(e,n){return e.length===1?x(e[0],n):e.length===0?te(n):lu(e,n)}function xe(e,n){return e.length===0?te(n):e.length===1?x(e[0],n):Br(e,n)}class ga extends Xe{}function cu(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function No(e,n,i){return e[n]===i&&e.charCodeAt(n-1)!==92}function st(e,n){return No(e,n,"(")}function Rn(e,n){return No(e,n,")")}function Us(e,n){return No(e,n,"|")}function du(e){if(!(st(e,0)&&Rn(e,e.length-1)))return!1;let n=0;for(let i=0;i<e.length;i++)if(st(e,i)&&(n+=1),Rn(e,i)&&(n-=1),n===0&&i!==e.length-1)return!1;return!0}function pu(e){return e.slice(1,e.length-1)}function uu(e){let n=0;for(let i=0;i<e.length;i++)if(st(e,i)&&(n+=1),Rn(e,i)&&(n-=1),Us(e,i)&&n===0)return!0;return!1}function mu(e){for(let n=0;n<e.length;n++)if(st(e,n))return!0;return!1}function fu(e){let[n,i]=[0,0];const r=[];for(let a=0;a<e.length;a++)if(st(e,a)&&(n+=1),Rn(e,a)&&(n-=1),Us(e,a)&&n===0){const s=e.slice(i,a);s.length>0&&r.push(ln(s)),i=a+1}const o=e.slice(i);return o.length>0&&r.push(ln(o)),r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"or",expr:r}}function gu(e){function n(o,a){if(!st(o,a))throw new ga("TemplateLiteralParser: Index must point to open parens");let s=0;for(let c=a;c<o.length;c++)if(st(o,c)&&(s+=1),Rn(o,c)&&(s-=1),s===0)return[a,c];throw new ga("TemplateLiteralParser: Unclosed group parens in expression")}function i(o,a){for(let s=a;s<o.length;s++)if(st(o,s))return[a,s];return[a,o.length]}const r=[];for(let o=0;o<e.length;o++)if(st(e,o)){const[a,s]=n(e,o),c=e.slice(a,s+1);r.push(ln(c)),o=s}else{const[a,s]=i(e,o),c=e.slice(a,s);c.length>0&&r.push(ln(c)),o=s-1}return r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"and",expr:r}}function ln(e){return du(e)?ln(pu(e)):uu(e)?fu(e):mu(e)?gu(e):{type:"const",const:cu(e)}}function ko(e){return ln(e.slice(1,e.length-1))}class hu extends Xe{}function bu(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="0"&&e.expr[1].type==="const"&&e.expr[1].const==="[1-9][0-9]*"}function Ou(e){return e.type==="or"&&e.expr.length===2&&e.expr[0].type==="const"&&e.expr[0].const==="true"&&e.expr[1].type==="const"&&e.expr[1].const==="false"}function yu(e){return e.type==="const"&&e.const===".*"}function Un(e){return bu(e)||yu(e)?!1:Ou(e)?!0:e.type==="and"?e.expr.every(n=>Un(n)):e.type==="or"?e.expr.every(n=>Un(n)):e.type==="const"?!0:(()=>{throw new hu("Unknown expression type")})()}function xu(e){const n=ko(e.pattern);return Un(n)}class Su extends Xe{}function*Ms(e){if(e.length===1)return yield*e[0];for(const n of e[0])for(const i of Ms(e.slice(1)))yield`${n}${i}`}function*wu(e){return yield*Ms(e.expr.map(n=>[...Hi(n)]))}function*Lu(e){for(const n of e.expr)yield*Hi(n)}function*vu(e){return yield e.const}function*Hi(e){return e.type==="and"?yield*wu(e):e.type==="or"?yield*Lu(e):e.type==="const"?yield*vu(e):(()=>{throw new Su("Unknown expression")})()}function Bs(e){const n=ko(e.pattern);return Un(n)?[...Hi(n)]:[]}function re(e,n){return x({[v]:"Literal",const:e,type:typeof e},n)}function Es(e){return x({[v]:"Boolean",type:"boolean"},e)}function Ao(e){return x({[v]:"BigInt",type:"bigint"},e)}function Ht(e){return x({[v]:"Number",type:"number"},e)}function Mt(e){return x({[v]:"String",type:"string"},e)}function*Pu(e){const n=e.trim().replace(/"|'/g,"");return n==="boolean"?yield Es():n==="number"?yield Ht():n==="bigint"?yield Ao():n==="string"?yield Mt():yield(()=>{const i=n.split("|").map(r=>re(r.trim()));return i.length===0?te():i.length===1?i[0]:yn(i)})()}function*$u(e){if(e[1]!=="{"){const n=re("$"),i=Er(e.slice(1));return yield*[n,...i]}for(let n=2;n<e.length;n++)if(e[n]==="}"){const i=Pu(e.slice(2,n)),r=Er(e.slice(n+1));return yield*[...i,...r]}yield re(e)}function*Er(e){for(let n=0;n<e.length;n++)if(e[n]==="$"){const i=re(e.slice(0,n)),r=$u(e.slice(n));return yield*[i,...r]}yield re(e)}function Iu(e){return[...Er(e)]}class Nu extends Xe{}function ku(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cs(e,n){return Dt(e)?e.pattern.slice(1,e.pattern.length-1):fe(e)?`(${e.anyOf.map(i=>Cs(i,n)).join("|")})`:On(e)?`${n}${gi}`:bn(e)?`${n}${gi}`:Ri(e)?`${n}${gi}`:Hn(e)?`${n}${ks}`:Et(e)?`${n}${ku(e.const.toString())}`:Wn(e)?`${n}${Jp}`:(()=>{throw new Nu(`Unexpected Kind '${e[v]}'`)})()}function ha(e){return`^${e.map(n=>Cs(n,"")).join("")}$`}function Si(e){const i=Bs(e).map(r=>re(r));return yn(i)}function Ds(e,n){const i=ne(e)?ha(Iu(e)):ha(e);return x({[v]:"TemplateLiteral",type:"string",pattern:i},n)}function Au(e){return Bs(e).map(i=>i.toString())}function Tu(e){const n=[];for(const i of e)n.push(...wt(i));return n}function Fu(e){return[e.toString()]}function wt(e){return[...new Set(Dt(e)?Au(e):fe(e)?Tu(e.anyOf):Et(e)?Fu(e.const):On(e)?["[number]"]:bn(e)?["[number]"]:[])]}function ju(e,n,i){const r={};for(const o of Object.getOwnPropertyNames(n))r[o]=Ki(e,wt(n[o]),i);return r}function Ru(e,n,i){return ju(e,n.properties,i)}function Uu(e,n,i){const r=Ru(e,n,i);return ye(r)}function zs(e,n){return e.map(i=>_s(i,n))}function Mu(e){return e.filter(n=>!qn(n))}function Bu(e,n){return Ks(Mu(zs(e,n)))}function Eu(e){return e.some(n=>qn(n))?[]:e}function Cu(e,n){return yn(Eu(zs(e,n)))}function Du(e,n){return n in e?e[n]:n==="[number]"?yn(e):te()}function zu(e,n){return n==="[number]"?e:te()}function _u(e,n){return n in e?e[n]:te()}function _s(e,n){return ze(e)?Bu(e.allOf,n):fe(e)?Cu(e.anyOf,n):zt(e)?Du(e.items??[],n):mn(e)?zu(e.items,n):Ye(e)?_u(e.properties,n):te()}function Ws(e,n){return n.map(i=>_s(e,i))}function ba(e,n){return yn(Ws(e,n))}function Ki(e,n,i){if($e(e)||$e(n)){const r="Index types using Ref parameters require both Type and Key to be of TSchema";if(!lt(e)||!lt(n))throw new Xe(r);return le("Index",[e,n])}return Ue(n)?Uu(e,n,i):Ct(n)?Ku(e,n,i):x(lt(n)?ba(e,wt(n)):ba(e,n),i)}function Wu(e,n,i){return{[n]:Ki(e,[n],Ae(i))}}function qu(e,n,i){return n.reduce((r,o)=>({...r,...Wu(e,o,i)}),{})}function Hu(e,n,i){return qu(e,n.keys,i)}function Ku(e,n,i){const r=Hu(e,n,i);return ye(r)}function To(e,n){return x({[v]:"Iterator",type:"Iterator",items:e},n)}function Gu(e){const n=[];for(let i in e)yt(e[i])||n.push(i);return n}function Vu(e,n){const i=Gu(e),r=i.length>0?{[v]:"Object",type:"object",properties:e,required:i}:{[v]:"Object",type:"object",properties:e};return x(r,n)}var me=Vu;function qs(e,n){return x({[v]:"Promise",type:"Promise",item:e},n)}function Ju(e){return x(Fe(e,[_n]))}function Xu(e){return x({...e,[_n]:"Readonly"})}function Yu(e,n){return n===!1?Ju(e):Xu(e)}function Lt(e,n){const i=n??!0;return Ue(e)?em(e,i):Yu(e,i)}function Zu(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Lt(e[r],n);return i}function Qu(e,n){return Zu(e.properties,n)}function em(e,n){const i=Qu(e,n);return ye(i)}function xn(e,n){return x(e.length>0?{[v]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[v]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},n)}function Hs(e,n){return e in n?Me(e,n[e]):ye(n)}function tm(e){return{[e]:re(e)}}function nm(e){const n={};for(const i of e)n[i]=re(i);return n}function im(e,n){return Zp(n,e)?tm(e):nm(n)}function rm(e,n){const i=im(e,n);return Hs(e,i)}function vn(e,n){return n.map(i=>Me(e,i))}function om(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(n))i[r]=Me(e,n[r]);return i}function Me(e,n){const i={...n};return yt(n)?vt(Me(e,Fe(n,[dt]))):mo(n)?Lt(Me(e,Fe(n,[_n]))):Ue(n)?Hs(e,n.properties):Ct(n)?rm(e,n.keys):gn(n)?Io(vn(e,n.parameters),Me(e,n.returns),i):hn(n)?Gn(vn(e,n.parameters),Me(e,n.returns),i):ji(n)?$o(Me(e,n.items),i):Ui(n)?To(Me(e,n.items),i):ze(n)?Pt(vn(e,n.allOf),i):fe(n)?xe(vn(e,n.anyOf),i):zt(n)?xn(vn(e,n.items??[]),i):Ye(n)?me(om(e,n.properties),i):mn(n)?Po(Me(e,n.items),i):Mi(n)?qs(Me(e,n.item),i):n}function am(e,n){const i={};for(const r of e)i[r]=Me(r,n);return i}function sm(e,n,i){const r=lt(e)?wt(e):e,o=n({[v]:"MappedKey",keys:r}),a=am(r,o);return me(a,i)}function lm(e){return x(Fe(e,[dt]))}function cm(e){return x({...e,[dt]:"Optional"})}function dm(e,n){return n===!1?lm(e):cm(e)}function vt(e,n){const i=n??!0;return Ue(e)?mm(e,i):dm(e,i)}function pm(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=vt(e[r],n);return i}function um(e,n){return pm(e.properties,n)}function mm(e,n){const i=um(e,n);return ye(i)}function Cr(e,n={}){const i=e.every(o=>Ye(o)),r=lt(n.unevaluatedProperties)?{unevaluatedProperties:n.unevaluatedProperties}:{};return x(n.unevaluatedProperties===!1||lt(n.unevaluatedProperties)||i?{...r,[v]:"Intersect",type:"object",allOf:e}:{...r,[v]:"Intersect",allOf:e},n)}function fm(e){return e.every(n=>yt(n))}function gm(e){return Fe(e,[dt])}function Oa(e){return e.map(n=>yt(n)?gm(n):n)}function hm(e,n){return fm(e)?vt(Cr(Oa(e),n)):Cr(Oa(e),n)}function Ks(e,n={}){if(e.length===1)return x(e[0],n);if(e.length===0)return te(n);if(e.some(i=>Ei(i)))throw new Error("Cannot intersect transform types");return hm(e,n)}function Pt(e,n){if(e.length===1)return x(e[0],n);if(e.length===0)return te(n);if(e.some(i=>Ei(i)))throw new Error("Cannot intersect transform types");return Cr(e,n)}function Vn(...e){const[n,i]=typeof e[0]=="string"?[e[0],e[1]]:[e[0].$id,e[1]];if(typeof n!="string")throw new Xe("Ref: $ref must be a string");return x({[v]:"Ref",$ref:n},i)}function bm(e,n){return le("Awaited",[le(e,n)])}function Om(e){return le("Awaited",[Vn(e)])}function ym(e){return Pt(Gs(e))}function xm(e){return xe(Gs(e))}function Sm(e){return Gi(e)}function Gs(e){return e.map(n=>Gi(n))}function Gi(e,n){return x(fn(e)?bm(e.target,e.parameters):ze(e)?ym(e.allOf):fe(e)?xm(e.anyOf):Mi(e)?Sm(e.item):$e(e)?Om(e.$ref):e,n)}function Vs(e){const n=[];for(const i of e)n.push(Vi(i));return n}function wm(e){const n=Vs(e);return iu(n)}function Lm(e){const n=Vs(e);return nu(n)}function vm(e){return e.map((n,i)=>i.toString())}function Pm(e){return["[number]"]}function $m(e){return globalThis.Object.getOwnPropertyNames(e)}function Im(e){return Dr?globalThis.Object.getOwnPropertyNames(e).map(i=>i[0]==="^"&&i[i.length-1]==="$"?i.slice(1,i.length-1):i):[]}function Vi(e){return ze(e)?wm(e.allOf):fe(e)?Lm(e.anyOf):zt(e)?vm(e.items??[]):mn(e)?Pm(e.items):Ye(e)?$m(e.properties):Bi(e)?Im(e.patternProperties):[]}let Dr=!1;function wi(e){Dr=!0;const n=Vi(e);return Dr=!1,`^(${n.map(r=>`(${r})`).join("|")})$`}function Nm(e,n){return le("KeyOf",[le(e,n)])}function km(e){return le("KeyOf",[Vn(e)])}function Am(e,n){const i=Vi(e),r=Tm(i),o=yn(r);return x(o,n)}function Tm(e){return e.map(n=>n==="[number]"?Ht():re(n))}function Fo(e,n){return fn(e)?Nm(e.target,e.parameters):$e(e)?km(e.$ref):Ue(e)?Rm(e,n):Am(e,n)}function Fm(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Fo(e[r],Ae(n));return i}function jm(e,n){return Fm(e.properties,n)}function Rm(e,n){const i=jm(e,n);return ye(i)}function Um(e){const n=[];for(const i of e)n.push(...Vi(i));return Qp(n)}function Mm(e){return e.filter(n=>!qn(n))}function Bm(e,n){const i=[];for(const r of e)i.push(...Ws(r,[n]));return Mm(i)}function Em(e,n){const i={};for(const r of n)i[r]=Ks(Bm(e,r));return i}function Cm(e,n){const i=Um(e),r=Em(e,i);return me(r,n)}function Js(e){return x({[v]:"Date",type:"Date"},e)}function Xs(e){return x({[v]:"Null",type:"null"},e)}function Ys(e){return x({[v]:"Symbol",type:"symbol"},e)}function Zs(e){return x({[v]:"Undefined",type:"undefined"},e)}function Qs(e){return x({[v]:"Uint8Array",type:"Uint8Array"},e)}function Ji(e){return x({[v]:"Unknown"},e)}function Dm(e){return e.map(n=>jo(n,!1))}function zm(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Lt(jo(e[i],!1));return n}function ri(e,n){return n===!0?e:Lt(e)}function jo(e,n){return up(e)||fp(e)?ri(jn(),n):Ne(e)?Lt(xn(Dm(e))):Dn(e)?Qs():lo(e)?Js():oe(e)?ri(me(zm(e)),n):mp(e)?ri(Gn([],Ji()),n):ie(e)?Zs():gp(e)?Xs():hp(e)?Ys():ps(e)?Ao():tt(e)||Cn(e)||ne(e)?re(e):me({})}function _m(e,n){return x(jo(e,!0),n)}function Wm(e,n){return gn(e)?xn(e.parameters,n):te(n)}function qm(e,n){if(ie(e))throw new Error("Enum undefined or empty");const i=globalThis.Object.getOwnPropertyNames(e).filter(a=>isNaN(a)).map(a=>e[a]),o=[...new Set(i)].map(a=>re(a));return xe(o,{...n,[Fi]:"Enum"})}class Hm extends Xe{}var g;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(g||(g={}));function De(e){return e===g.False?e:g.True}function Sn(e){throw new Hm(e)}function ae(e){return St(e)||qt(e)||ct(e)||Ve(e)||Ke(e)}function se(e,n){return St(n)?nl():qt(n)?Xi(e,n):ct(n)?Uo(e,n):Ve(n)?al():Ke(n)?Ro():Sn("StructuralRight")}function Ro(e,n){return g.True}function Km(e,n){return qt(n)?Xi(e,n):ct(n)&&n.anyOf.some(i=>Ke(i)||Ve(i))?g.True:ct(n)?g.Union:Ve(n)||Ke(n)?g.True:g.Union}function Gm(e,n){return Ve(e)?g.False:Ke(e)?g.Union:St(e)?g.True:g.False}function Vm(e,n){return ee(n)&&Yi(n)?g.True:ae(n)?se(e,n):_t(n)?De(H(e.items,n.items)):g.False}function Jm(e,n){return ae(n)?se(e,n):yo(n)?De(H(e.items,n.items)):g.False}function Xm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ci(n)?g.True:g.False}function el(e,n){return Ns(e)||Wt(e)?g.True:g.False}function Ym(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Wt(n)?g.True:g.False}function Zm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):Di(n)?e.parameters.length>n.parameters.length?g.False:e.parameters.every((i,r)=>De(H(n.parameters[r],i))===g.True)?De(H(e.returns,n.returns)):g.False:g.False}function Qm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):zi(n)?g.True:g.False}function ef(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):_i(n)?e.parameters.length>n.parameters.length?g.False:e.parameters.every((i,r)=>De(H(n.parameters[r],i))===g.True)?De(H(e.returns,n.returns)):g.False:g.False}function tl(e,n){return xt(e)&&tt(e.const)||Pe(e)||pt(e)?g.True:g.False}function tf(e,n){return pt(n)||Pe(n)?g.True:ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):g.False}function Xi(e,n){return n.allOf.every(i=>H(e,i)===g.True)?g.True:g.False}function nf(e,n){return e.allOf.some(i=>H(i,n)===g.True)?g.True:g.False}function rf(e,n){return ae(n)?se(e,n):xo(n)?De(H(e.items,n.items)):g.False}function of(e,n){return xt(n)&&n.const===e.const?g.True:ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ge(n)?ol(e):Pe(n)?il(e):pt(n)?tl(e):Wt(n)?el(e):g.False}function nl(e,n){return g.False}function af(e,n){return g.True}function ya(e){let[n,i]=[e,0];for(;on(n);)n=n.not,i+=1;return i%2===0?n:Ji()}function sf(e,n){return on(e)?H(ya(e),n):on(n)?H(e,ya(n)):Sn("Invalid fallthrough for Not")}function lf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):So(n)?g.True:g.False}function il(e,n){return Is(e)||Pe(e)||pt(e)?g.True:g.False}function cf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):pt(n)||Pe(n)?g.True:g.False}function Ie(e,n){return Object.getOwnPropertyNames(e.properties).length===n}function xa(e){return Yi(e)}function Sa(e){return Ie(e,0)||Ie(e,1)&&"description"in e.properties&&ct(e.properties.description)&&e.properties.description.anyOf.length===2&&(Ge(e.properties.description.anyOf[0])&&Ut(e.properties.description.anyOf[1])||Ge(e.properties.description.anyOf[1])&&Ut(e.properties.description.anyOf[0]))}function yr(e){return Ie(e,0)}function wa(e){return Ie(e,0)}function df(e){return Ie(e,0)}function pf(e){return Ie(e,0)}function uf(e){return Yi(e)}function mf(e){const n=Ht();return Ie(e,0)||Ie(e,1)&&"length"in e.properties&&De(H(e.properties.length,n))===g.True}function ff(e){return Ie(e,0)}function Yi(e){const n=Ht();return Ie(e,0)||Ie(e,1)&&"length"in e.properties&&De(H(e.properties.length,n))===g.True}function gf(e){const n=Gn([jn()],jn());return Ie(e,0)||Ie(e,1)&&"then"in e.properties&&De(H(e.properties.then,n))===g.True}function rl(e,n){return H(e,n)===g.False||xi(e)&&!xi(n)?g.False:g.True}function we(e,n){return Ve(e)?g.False:Ke(e)?g.Union:St(e)||$s(e)&&xa(n)||Is(e)&&yr(n)||Ns(e)&&wa(n)||Tn(e)&&Sa(n)||Ci(e)&&df(n)||Ge(e)&&xa(n)||Tn(e)&&Sa(n)||Pe(e)&&yr(n)||pt(e)&&yr(n)||Wt(e)&&wa(n)||Kn(e)&&uf(n)||zi(e)&&pf(n)||Di(e)&&ff(n)||_i(e)&&mf(n)?g.True:be(e)&&Ge(zr(e))?n[Fi]==="Record"?g.True:g.False:be(e)&&Pe(zr(e))?Ie(n,0)?g.True:g.False:g.False}function hf(e,n){return ae(n)?se(e,n):be(n)?_e(e,n):ee(n)?(()=>{for(const i of Object.getOwnPropertyNames(n.properties)){if(!(i in e.properties)&&!xi(n.properties[i]))return g.False;if(xi(n.properties[i]))return g.True;if(rl(e.properties[i],n.properties[i])===g.False)return g.False}return g.True})():g.False}function bf(e,n){return ae(n)?se(e,n):ee(n)&&gf(n)?g.True:wo(n)?De(H(e.item,n.item)):g.False}function zr(e){return an in e.patternProperties?Ht():sn in e.patternProperties?Mt():Sn("Unknown record key pattern")}function _r(e){return an in e.patternProperties?e.patternProperties[an]:sn in e.patternProperties?e.patternProperties[sn]:Sn("Unable to get record value schema")}function _e(e,n){const[i,r]=[zr(n),_r(n)];return $s(e)&&Pe(i)&&De(H(e,r))===g.True?g.True:Kn(e)&&Pe(i)||Ge(e)&&Pe(i)||_t(e)&&Pe(i)?H(e,r):ee(e)?(()=>{for(const o of Object.getOwnPropertyNames(e.properties))if(rl(r,e.properties[o])===g.False)return g.False;return g.True})():g.False}function Of(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?H(_r(e),_r(n)):g.False}function yf(e,n){const i=An(e)?Mt():e,r=An(n)?Mt():n;return H(i,r)}function ol(e,n){return xt(e)&&ne(e.const)||Ge(e)?g.True:g.False}function xf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ge(n)?g.True:g.False}function Sf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Tn(n)?g.True:g.False}function wf(e,n){return Fn(e)?H(Si(e),n):Fn(n)?H(e,Si(n)):Sn("Invalid fallthrough for TemplateLiteral")}function Lf(e,n){return _t(n)&&e.items!==void 0&&e.items.every(i=>H(i,n.items)===g.True)}function vf(e,n){return St(e)?g.True:Ve(e)?g.False:Ke(e)?g.Union:g.False}function Pf(e,n){return ae(n)?se(e,n):ee(n)&&Yi(n)||_t(n)&&Lf(e,n)?g.True:Wi(n)?ie(e.items)&&!ie(n.items)||!ie(e.items)&&ie(n.items)?g.False:ie(e.items)&&!ie(n.items)||e.items.every((i,r)=>H(i,n.items[r])===g.True)?g.True:g.False:g.False}function $f(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Kn(n)?g.True:g.False}function If(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):qi(n)?Af(e):Ut(n)?g.True:g.False}function Uo(e,n){return n.anyOf.some(i=>H(e,i)===g.True)?g.True:g.False}function Nf(e,n){return e.anyOf.every(i=>H(i,n)===g.True)?g.True:g.False}function al(e,n){return g.True}function kf(e,n){return St(n)?nl():qt(n)?Xi(e,n):ct(n)?Uo(e,n):Ke(n)?Ro():Ge(n)?ol(e):Pe(n)?il(e):pt(n)?tl(e):Wt(n)?el(e):_t(n)?Gm(e):Wi(n)?vf(e):ee(n)?we(e,n):Ve(n)?g.True:g.False}function Af(e,n){return Ut(e)||Ut(e)?g.True:g.False}function Tf(e,n){return qt(n)?Xi(e,n):ct(n)?Uo(e,n):Ve(n)?al():Ke(n)?Ro():ee(n)?we(e,n):qi(n)?g.True:g.False}function H(e,n){return Fn(e)||Fn(n)?wf(e,n):An(e)||An(n)?yf(e,n):on(e)||on(n)?sf(e,n):Ke(e)?Km(e,n):_t(e)?Vm(e,n):Ci(e)?Xm(e,n):Wt(e)?Ym(e,n):yo(e)?Jm(e,n):Di(e)?Zm(e,n):zi(e)?Qm(e,n):_i(e)?ef(e,n):pt(e)?tf(e,n):qt(e)?nf(e,n):xo(e)?rf(e,n):xt(e)?of(e,n):St(e)?af():So(e)?lf(e,n):Pe(e)?cf(e,n):ee(e)?hf(e,n):be(e)?Of(e,n):Ge(e)?xf(e,n):Tn(e)?Sf(e,n):Wi(e)?Pf(e,n):wo(e)?bf(e,n):Kn(e)?$f(e,n):Ut(e)?If(e,n):ct(e)?Nf(e,n):Ve(e)?kf(e,n):qi(e)?Tf(e,n):Sn(`Unknown left type operand '${e[v]}'`)}function Jn(e,n){return H(e,n)}function Ff(e,n,i,r,o){const a={};for(const s of globalThis.Object.getOwnPropertyNames(e))a[s]=Mo(e[s],n,i,r,Ae(o));return a}function jf(e,n,i,r,o){return Ff(e.properties,n,i,r,o)}function Rf(e,n,i,r,o){const a=jf(e,n,i,r,o);return ye(a)}function Uf(e,n,i,r){const o=Jn(e,n);return o===g.Union?xe([i,r]):o===g.True?i:r}function Mo(e,n,i,r,o){return Ue(e)?Rf(e,n,i,r,o):Ct(e)?x(Cf(e,n,i,r,o)):x(Uf(e,n,i,r),o)}function Mf(e,n,i,r,o){return{[e]:Mo(re(e),n,i,r,Ae(o))}}function Bf(e,n,i,r,o){return e.reduce((a,s)=>({...a,...Mf(s,n,i,r,o)}),{})}function Ef(e,n,i,r,o){return Bf(e.keys,n,i,r,o)}function Cf(e,n,i,r,o){const a=Ef(e,n,i,r,o);return ye(a)}function Df(e){return e.allOf.every(n=>Xn(n))}function zf(e){return e.anyOf.some(n=>Xn(n))}function _f(e){return!Xn(e.not)}function Xn(e){return e[v]==="Intersect"?Df(e):e[v]==="Union"?zf(e):e[v]==="Not"?_f(e):e[v]==="Undefined"}function Wf(e,n){return Bo(Si(e),n)}function qf(e,n){const i=e.filter(r=>Jn(r,n)===g.False);return i.length===1?i[0]:xe(i)}function Bo(e,n,i={}){return Dt(e)?x(Wf(e,n),i):Ue(e)?x(Gf(e,n),i):x(fe(e)?qf(e.anyOf,n):Jn(e,n)!==g.False?te():e,i)}function Hf(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Bo(e[r],n);return i}function Kf(e,n){return Hf(e.properties,n)}function Gf(e,n){const i=Kf(e,n);return ye(i)}function Vf(e,n){return Eo(Si(e),n)}function Jf(e,n){const i=e.filter(r=>Jn(r,n)!==g.False);return i.length===1?i[0]:xe(i)}function Eo(e,n,i){return Dt(e)?x(Vf(e,n),i):Ue(e)?x(Zf(e,n),i):x(fe(e)?Jf(e.anyOf,n):Jn(e,n)!==g.False?e:te(),i)}function Xf(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Eo(e[r],n);return i}function Yf(e,n){return Xf(e.properties,n)}function Zf(e,n){const i=Yf(e,n);return ye(i)}function Qf(e,n){return gn(e)?x(e.returns,n):te(n)}function sl(e){return Lt(vt(e))}function Kt(e,n,i){return x({[v]:"Record",type:"object",patternProperties:{[e]:n}},i)}function Co(e,n,i){const r={};for(const o of e)r[o]=n;return me(r,{...i,[Fi]:"Record"})}function eg(e,n,i){return xu(e)?Co(wt(e),n,i):Kt(e.pattern,n,i)}function tg(e,n,i){return Co(wt(xe(e)),n,i)}function ng(e,n,i){return Co([e.toString()],n,i)}function ig(e,n,i){return Kt(e.source,n,i)}function rg(e,n,i){const r=ie(e.pattern)?sn:e.pattern;return Kt(r,n,i)}function og(e,n,i){return Kt(sn,n,i)}function ag(e,n,i){return Kt(Yp,n,i)}function sg(e,n,i){return me({true:n,false:n},i)}function lg(e,n,i){return Kt(an,n,i)}function cg(e,n,i){return Kt(an,n,i)}function ll(e,n,i={}){return fe(e)?tg(e.anyOf,n,i):Dt(e)?eg(e,n,i):Et(e)?ng(e.const,n,i):Wn(e)?sg(e,n,i):bn(e)?lg(e,n,i):On(e)?cg(e,n,i):xs(e)?ig(e,n,i):Hn(e)?rg(e,n,i):bs(e)?og(e,n,i):qn(e)?ag(e,n,i):te(i)}function Do(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function dg(e){const n=Do(e);return n===sn?Mt():n===an?Ht():Mt({pattern:n})}function cl(e){return e.patternProperties[Do(e)]}function pg(e,n){return n.parameters=Yn(e,n.parameters),n.returns=Je(e,n.returns),n}function ug(e,n){return n.parameters=Yn(e,n.parameters),n.returns=Je(e,n.returns),n}function mg(e,n){return n.allOf=Yn(e,n.allOf),n}function fg(e,n){return n.anyOf=Yn(e,n.anyOf),n}function gg(e,n){return ie(n.items)||(n.items=Yn(e,n.items)),n}function hg(e,n){return n.items=Je(e,n.items),n}function bg(e,n){return n.items=Je(e,n.items),n}function Og(e,n){return n.items=Je(e,n.items),n}function yg(e,n){return n.item=Je(e,n.item),n}function xg(e,n){const i=vg(e,n.properties);return{...n,...me(i)}}function Sg(e,n){const i=Je(e,dg(n)),r=Je(e,cl(n)),o=ll(i,r);return{...n,...o}}function wg(e,n){return n.index in e?e[n.index]:Ji()}function Lg(e,n){const i=mo(n),r=yt(n),o=Je(e,n);return i&&r?sl(o):i&&!r?Lt(o):!i&&r?vt(o):o}function vg(e,n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:Lg(e,n[r])}),{})}function Yn(e,n){return n.map(i=>Je(e,i))}function Je(e,n){return gn(n)?pg(e,n):hn(n)?ug(e,n):ze(n)?mg(e,n):fe(n)?fg(e,n):zt(n)?gg(e,n):mn(n)?hg(e,n):ji(n)?bg(e,n):Ui(n)?Og(e,n):Mi(n)?yg(e,n):Ye(n)?xg(e,n):Bi(n)?Sg(e,n):Os(n)?wg(e,n):n}function Pg(e,n){return Je(n,co(e))}function $g(e){return x({[v]:"Integer",type:"integer"},e)}function Ig(e,n,i){return{[e]:wn(re(e),n,Ae(i))}}function Ng(e,n,i){return e.reduce((o,a)=>({...o,...Ig(a,n,i)}),{})}function kg(e,n,i){return Ng(e.keys,n,i)}function Ag(e,n,i){const r=kg(e,n,i);return ye(r)}function Tg(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toLowerCase(),i].join("")}function Fg(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toUpperCase(),i].join("")}function jg(e){return e.toUpperCase()}function Rg(e){return e.toLowerCase()}function Ug(e,n,i){const r=ko(e.pattern);if(!Un(r))return{...e,pattern:dl(e.pattern,n)};const s=[...Hi(r)].map(d=>re(d)),c=pl(s,n),l=xe(c);return Ds([l],i)}function dl(e,n){return typeof e=="string"?n==="Uncapitalize"?Tg(e):n==="Capitalize"?Fg(e):n==="Uppercase"?jg(e):n==="Lowercase"?Rg(e):e:e.toString()}function pl(e,n){return e.map(i=>wn(i,n))}function wn(e,n,i={}){return Ct(e)?Ag(e,n,i):Dt(e)?Ug(e,n,i):fe(e)?xe(pl(e.anyOf,n),i):Et(e)?re(dl(e.const,n),i):x(e,i)}function Mg(e,n={}){return wn(e,"Capitalize",n)}function Bg(e,n={}){return wn(e,"Lowercase",n)}function Eg(e,n={}){return wn(e,"Uncapitalize",n)}function Cg(e,n={}){return wn(e,"Uppercase",n)}function Dg(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=Zi(e[o],n,Ae(i));return r}function zg(e,n,i){return Dg(e.properties,n,i)}function _g(e,n,i){const r=zg(e,n,i);return ye(r)}function Wg(e,n){return e.map(i=>zo(i,n))}function qg(e,n){return e.map(i=>zo(i,n))}function Hg(e,n){const{[n]:i,...r}=e;return r}function Kg(e,n){return n.reduce((i,r)=>Hg(i,r),e)}function Gg(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=Kg(e.properties,n);return me(r,i)}function Vg(e){const n=e.reduce((i,r)=>ys(r)?[...i,re(r)]:i,[]);return xe(n)}function zo(e,n){return ze(e)?Pt(Wg(e.allOf,n)):fe(e)?xe(qg(e.anyOf,n)):Ye(e)?Gg(e,n):me({})}function Zi(e,n,i){const r=Ne(n)?Vg(n):n,o=lt(n)?wt(n):n,a=$e(e),s=$e(n);return Ue(e)?_g(e,o,i):Ct(n)?Zg(e,n,i):a&&s?le("Omit",[e,r],i):!a&&s?le("Omit",[e,r],i):a&&!s?le("Omit",[e,r],i):x({...zo(e,o),...i})}function Jg(e,n,i){return{[n]:Zi(e,[n],Ae(i))}}function Xg(e,n,i){return n.reduce((r,o)=>({...r,...Jg(e,o,i)}),{})}function Yg(e,n,i){return Xg(e,n.keys,i)}function Zg(e,n,i){const r=Yg(e,n,i);return ye(r)}function Qg(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=Qi(e[o],n,Ae(i));return r}function eh(e,n,i){return Qg(e.properties,n,i)}function th(e,n,i){const r=eh(e,n,i);return ye(r)}function nh(e,n){return e.map(i=>_o(i,n))}function ih(e,n){return e.map(i=>_o(i,n))}function rh(e,n){const i={};for(const r of n)r in e&&(i[r]=e[r]);return i}function oh(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=rh(e.properties,n);return me(r,i)}function ah(e){const n=e.reduce((i,r)=>ys(r)?[...i,re(r)]:i,[]);return xe(n)}function _o(e,n){return ze(e)?Pt(nh(e.allOf,n)):fe(e)?xe(ih(e.anyOf,n)):Ye(e)?oh(e,n):me({})}function Qi(e,n,i){const r=Ne(n)?ah(n):n,o=lt(n)?wt(n):n,a=$e(e),s=$e(n);return Ue(e)?th(e,o,i):Ct(n)?dh(e,n,i):a&&s?le("Pick",[e,r],i):!a&&s?le("Pick",[e,r],i):a&&!s?le("Pick",[e,r],i):x({..._o(e,o),...i})}function sh(e,n,i){return{[n]:Qi(e,[n],Ae(i))}}function lh(e,n,i){return n.reduce((r,o)=>({...r,...sh(e,o,i)}),{})}function ch(e,n,i){return lh(e,n.keys,i)}function dh(e,n,i){const r=ch(e,n,i);return ye(r)}function ph(e,n){return le("Partial",[le(e,n)])}function uh(e){return le("Partial",[Vn(e)])}function mh(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=vt(e[i]);return n}function fh(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=mh(e.properties);return me(i,n)}function La(e){return e.map(n=>ul(n))}function ul(e){return fn(e)?ph(e.target,e.parameters):$e(e)?uh(e.$ref):ze(e)?Pt(La(e.allOf)):fe(e)?xe(La(e.anyOf)):Ye(e)?fh(e):Ri(e)||Wn(e)||bn(e)||Et(e)||fo(e)||On(e)||Hn(e)||go(e)||ho(e)?e:me({})}function Wo(e,n){return Ue(e)?bh(e,n):x({...ul(e),...n})}function gh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Wo(e[r],Ae(n));return i}function hh(e,n){return gh(e.properties,n)}function bh(e,n){const i=hh(e,n);return ye(i)}function Oh(e,n){return le("Required",[le(e,n)])}function yh(e){return le("Required",[Vn(e)])}function xh(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Fe(e[i],[dt]);return n}function Sh(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=xh(e.properties);return me(i,n)}function va(e){return e.map(n=>ml(n))}function ml(e){return fn(e)?Oh(e.target,e.parameters):$e(e)?yh(e.$ref):ze(e)?Pt(va(e.allOf)):fe(e)?xe(va(e.anyOf)):Ye(e)?Sh(e):Ri(e)||Wn(e)||bn(e)||Et(e)||fo(e)||On(e)||Hn(e)||go(e)||ho(e)?e:me({})}function qo(e,n){return Ue(e)?vh(e,n):x({...ml(e),...n})}function wh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=qo(e[r],n);return i}function Lh(e,n){return wh(e.properties,n)}function vh(e,n){const i=Lh(e,n);return ye(i)}function Ph(e,n){return n.map(i=>$e(i)?Ho(e,i.$ref):je(e,i))}function Ho(e,n){return n in e?$e(e[n])?Ho(e,e[n].$ref):je(e,e[n]):te()}function $h(e){return Gi(e[0])}function Ih(e){return Ki(e[0],e[1])}function Nh(e){return Fo(e[0])}function kh(e){return Wo(e[0])}function Ah(e){return Zi(e[0],e[1])}function Th(e){return Qi(e[0],e[1])}function Fh(e){return qo(e[0])}function jh(e,n,i){const r=Ph(e,i);return n==="Awaited"?$h(r):n==="Index"?Ih(r):n==="KeyOf"?Nh(r):n==="Partial"?kh(r):n==="Omit"?Ah(r):n==="Pick"?Th(r):n==="Required"?Fh(r):te()}function Rh(e,n){return Po(je(e,n))}function Uh(e,n){return $o(je(e,n))}function Mh(e,n,i){return Io(Zn(e,n),je(e,i))}function Bh(e,n,i){return Gn(Zn(e,n),je(e,i))}function Eh(e,n){return Pt(Zn(e,n))}function Ch(e,n){return To(je(e,n))}function Dh(e,n){return me(globalThis.Object.keys(n).reduce((i,r)=>({...i,[r]:je(e,n[r])}),{}))}function zh(e,n){const[i,r]=[je(e,cl(n)),Do(n)],o=co(n);return o.patternProperties[r]=i,o}function _h(e,n){return $e(n)?{...Ho(e,n.$ref),[Ee]:n[Ee]}:n}function Wh(e,n){return xn(Zn(e,n))}function qh(e,n){return xe(Zn(e,n))}function Zn(e,n){return n.map(i=>je(e,i))}function je(e,n){return yt(n)?x(je(e,Fe(n,[dt])),n):mo(n)?x(je(e,Fe(n,[_n])),n):Ei(n)?x(_h(e,n),n):mn(n)?x(Rh(e,n.items),n):ji(n)?x(Uh(e,n.items),n):fn(n)?x(jh(e,n.target,n.parameters)):gn(n)?x(Mh(e,n.parameters,n.returns),n):hn(n)?x(Bh(e,n.parameters,n.returns),n):ze(n)?x(Eh(e,n.allOf),n):Ui(n)?x(Ch(e,n.items),n):Ye(n)?x(Dh(e,n.properties),n):Bi(n)?x(zh(e,n)):zt(n)?x(Wh(e,n.items||[]),n):fe(n)?x(qh(e,n.anyOf),n):n}function Hh(e,n){return n in e?je(e,e[n]):te()}function Kh(e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:Hh(e,i)}),{})}class Gh{constructor(n){const i=Kh(n),r=this.WithIdentifiers(i);this.$defs=r}Import(n,i){const r={...this.$defs,[n]:x(this.$defs[n],i)};return x({[v]:"Import",$defs:r,$ref:n})}WithIdentifiers(n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:{...n[r],$id:r}}),{})}}function Vh(e){return new Gh(e)}function Jh(e,n){return x({[v]:"Not",not:e},n)}function Xh(e,n){return hn(e)?xn(e.parameters,n):te()}let Yh=0;function Zh(e,n={}){ie(n.$id)&&(n.$id=`T${Yh++}`);const i=co(e({[v]:"This",$ref:`${n.$id}`}));return i.$id=n.$id,x({[Fi]:"Recursive",...i},n)}function Qh(e,n){const i=ne(e)?new globalThis.RegExp(e):e;return x({[v]:"RegExp",type:"RegExp",source:i.source,flags:i.flags},n)}function eb(e){return ze(e)?e.allOf:fe(e)?e.anyOf:zt(e)?e.items??[]:[]}function tb(e){return eb(e)}function nb(e,n){return hn(e)?x(e.returns,n):te(n)}class ib{constructor(n){this.schema=n}Decode(n){return new rb(this.schema,n)}}class rb{constructor(n,i){this.schema=n,this.decode=i}EncodeTransform(n,i){const a={Encode:s=>i[Ee].Encode(n(s)),Decode:s=>this.decode(i[Ee].Decode(s))};return{...i,[Ee]:a}}EncodeSchema(n,i){const r={Decode:this.decode,Encode:n};return{...i,[Ee]:r}}Encode(n){return Ei(this.schema)?this.EncodeTransform(n,this.schema):this.EncodeSchema(n,this.schema)}}function ob(e){return new ib(e)}function ab(e={}){return x({[v]:e[v]??"Unsafe"},e)}function sb(e){return x({[v]:"Void",type:"void"},e)}const lb=Object.freeze(Object.defineProperty({__proto__:null,Any:jn,Argument:ru,Array:Po,AsyncIterator:$o,Awaited:Gi,BigInt:Ao,Boolean:Es,Capitalize:Mg,Composite:Cm,Const:_m,Constructor:Io,ConstructorParameters:Wm,Date:Js,Enum:qm,Exclude:Bo,Extends:Mo,Extract:Eo,Function:Gn,Index:Ki,InstanceType:Qf,Instantiate:Pg,Integer:$g,Intersect:Pt,Iterator:To,KeyOf:Fo,Literal:re,Lowercase:Bg,Mapped:sm,Module:Vh,Never:te,Not:Jh,Null:Xs,Number:Ht,Object:me,Omit:Zi,Optional:vt,Parameters:Xh,Partial:Wo,Pick:Qi,Promise:qs,Readonly:Lt,ReadonlyOptional:sl,Record:ll,Recursive:Zh,Ref:Vn,RegExp:Qh,Required:qo,Rest:tb,ReturnType:nb,String:Mt,Symbol:Ys,TemplateLiteral:Ds,Transform:ob,Tuple:xn,Uint8Array:Qs,Uncapitalize:Eg,Undefined:Zs,Union:xe,Unknown:Ji,Unsafe:ab,Uppercase:Cg,Void:sb},Symbol.toStringTag,{value:"Module"})),t=lb;var cb=["Arial","Calibri","Cambria","Consolas","Courier New","Georgia","Segoe UI","Tahoma","Times New Roman","Trebuchet MS","Verdana","Helvetica","Helvetica Neue","Menlo","Monaco"];function C0(e){const n=e.toLowerCase();return cb.some(i=>i.toLowerCase()===n)}var Ft=t.String({description:"Font family name. Prefer a SAFE_FONTS entry (Arial, Calibri, Cambria, Consolas, Courier New, Georgia, Segoe UI, Tahoma, Times New Roman, Trebuchet MS, Verdana, Helvetica, Helvetica Neue, Menlo, Monaco) for zero-setup rendering. For any other font, register it in props.fontRegistry[] and reference it here by family. Unregistered non-safe names render with a host fallback.",examples:["Arial","Calibri","Georgia","Inter","Roboto"]}),Qn=t.Number({minimum:100,maximum:900,description:"OpenType weight (100 thin ... 900 black). Default 400."}),er=t.Boolean({description:"Whether this source is italic. Default false."}),db=t.Object({kind:t.Literal("safe"),family:t.String({description:"A SAFE_FONTS name — installed with Office."})},{additionalProperties:!1,description:"Office-installed font — no embedding"}),pb=t.Object({kind:t.Literal("google"),family:t.String({description:'Exact Google Fonts family name (e.g. "Inter").'}),weights:t.Optional(t.Array(Qn,{description:"Weights to fetch. Default [400, 700]."})),italics:t.Optional(t.Boolean({description:"Include italic variants. Default false."}))},{additionalProperties:!1,description:"Google Fonts — auto-fetched and embedded"}),ub=t.Object({kind:t.Literal("file"),path:t.String({description:"Path to a .ttf/.otf file. Relative paths are resolved against the JSON document file."}),weight:t.Optional(Qn),italic:t.Optional(er)},{additionalProperties:!1,description:"Local font file to embed"}),mb=t.Object({kind:t.Literal("url"),url:t.String({description:"HTTPS URL of a TTF or OTF file."}),weight:t.Optional(Qn),italic:t.Optional(er)},{additionalProperties:!1,description:"Direct TTF/OTF URL (non-Google CDN)"}),fb=t.Object({kind:t.Literal("variable"),url:t.String({description:"HTTPS URL of a variable TTF (`fvar` axis table required)."}),weight:Qn,italic:t.Optional(er),axes:t.Optional(t.Record(t.String(),t.Number(),{description:"Additional axis pin values (e.g. `{ ital: 1, opsz: 14 }`) merged on top of the derived `wght` pin. Uncommon — the `weight` field is usually enough."}))},{additionalProperties:!1,description:"Variable-font instancer. The fetcher pins `wght` to `weight` (plus any `axes` overrides) and emits a clean static TTF, bypassing upstream distributions that collapse multiple static weights onto the same glyph geometry."}),gb=t.Object({kind:t.Literal("data"),data:t.String({description:"Base64-encoded TTF/OTF or data: URL (data:font/ttf;base64,...). Makes the JSON self-contained at the cost of size."}),weight:t.Optional(Qn),italic:t.Optional(er)},{additionalProperties:!1,description:"Inline base64 font — portable"}),hb=t.Union([db,pb,ub,gb,mb,fb],{description:'A single font variant source. Use kind:"safe" for installed fonts, kind:"google" for Google Fonts, kind:"file" for local files, kind:"data" for base64, kind:"url" for direct HTTPS TTF/OTF URLs, kind:"variable" to instance a variable TTF at a specific weight.'}),bb=t.Union([t.Literal("sans"),t.Literal("serif"),t.Literal("mono"),t.Literal("display"),t.Literal("handwriting")],{description:"Broad category used for fallback selection"}),Ob=t.Object({id:t.String({description:'Registry key. By convention, match the display family name ("Inter", "Roboto Slab").'}),family:t.String({description:"Display family used in font.family / fontFace / theme.fonts.*. Usually identical to id."}),category:t.Optional(bb),sources:t.Array(hb,{minItems:1,description:"One or more weight/style variants. List at least a regular (weight 400, italic false)."})},{additionalProperties:!1,description:"A font registered for this document. Referenced by family from font.family, fontFace, and theme.fonts.*."}),tr=t.Array(Ob,{description:"Document-scoped font registry. Every non-safe font used in this document must be registered here."}),fl=["eyebrow","display","stat","quote","label","footer","tableHeader","tableCell","chartLabel","tracker","source"],yb=t.Union(fl.map(e=>t.Literal(e))),Ko=t.Union([t.Literal("none"),t.Literal("upper"),t.Literal("smallCaps")]),Be=t.String({pattern:"^(#?[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:"Six-digit hex or a theme color/palette token. References must resolve without cycles."}),xb=t.Object({rule:t.Optional(Be),textMuted:t.Optional(Be),onPrimary:t.Optional(Be),surfaceInverse:t.Optional(Be),positive:t.Optional(Be),negative:t.Optional(Be),chart:t.Optional(t.Array(Be,{minItems:1,maxItems:12}))},{additionalProperties:!1}),We=t.Object({face:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),weight:t.Optional(t.Integer({minimum:100,maximum:900})),size:t.Optional(t.Number({minimum:5,maximum:200,description:"Explicit size in points; takes precedence over the canvas scale."})),lineHeight:t.Optional(t.Number({minimum:.5,maximum:3})),tracking:t.Optional(t.Number({description:"Tracking in hundredths of an em."})),case:t.Optional(Ko),color:t.Optional(Be),spaceBefore:t.Optional(t.Number({minimum:0})),spaceAfter:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1}),Sb=t.Object({eyebrow:t.Optional(We),display:t.Optional(We),stat:t.Optional(We),quote:t.Optional(We),label:t.Optional(We),footer:t.Optional(We),tableHeader:t.Optional(We),tableCell:t.Optional(We),chartLabel:t.Optional(We),tracker:t.Optional(We),source:t.Optional(We)},{additionalProperties:!1}),oi=t.Object({base:t.Number({minimum:5,maximum:200}),ratio:t.Optional(t.Number({minimum:1,maximum:2})),baselinePt:t.Optional(t.Number({exclusiveMinimum:0,maximum:24}))},{additionalProperties:!1}),wb=t.Object({roles:t.Optional(Sb),scale:t.Optional(t.Object({a4:t.Optional(oi),letter:t.Optional(oi),wide169:t.Optional(oi),standard43:t.Optional(oi)},{additionalProperties:!1}))},{additionalProperties:!1}),ai=t.Object({safeAreaIn:t.Optional(t.Number({minimum:0})),gutterIn:t.Optional(t.Number({minimum:0})),columns:t.Optional(t.Integer({minimum:1,maximum:100})),rows:t.Optional(t.Integer({minimum:1,maximum:100}))},{additionalProperties:!1}),Lb=t.Object({basePt:t.Optional(t.Number({exclusiveMinimum:0})),blockGap:t.Optional(t.Object({tight:t.Optional(t.Number({minimum:0})),normal:t.Optional(t.Number({minimum:0})),loose:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1})),canvas:t.Optional(t.Object({a4:t.Optional(ai),letter:t.Optional(ai),wide169:t.Optional(ai),standard43:t.Optional(ai)},{additionalProperties:!1}))},{additionalProperties:!1}),ft=t.Object({type:t.Optional(yb),color:t.Optional(Be),fill:t.Optional(Be),rule:t.Optional(t.Object({weightPt:t.Optional(t.Number({minimum:0})),color:t.Optional(Be)},{additionalProperties:!1})),padPt:t.Optional(t.Number({minimum:0})),alignment:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")]))},{additionalProperties:!1}),vb=t.Object({runningHead:t.Optional(ft),tracker:t.Optional(ft),actionTitle:t.Optional(ft),keyTakeaways:t.Optional(ft),sourceLine:t.Optional(ft),confidentialFooter:t.Optional(ft),logoSlot:t.Optional(ft),cover:t.Optional(ft)},{additionalProperties:!1,description:"Visual recipes; consumers land in #361. No automatic content or presence requirements."}),Pb=t.Object({kind:t.Union([t.Literal("none"),t.Literal("rule"),t.Literal("corner"),t.Literal("band")]),color:t.Optional(Be),weightPt:t.Optional(t.Number({minimum:0})),placement:t.Optional(t.Union([t.Literal("top"),t.Literal("bottom"),t.Literal("left"),t.Literal("right"),t.Literal("topLeft"),t.Literal("topRight"),t.Literal("bottomLeft"),t.Literal("bottomRight")]))},{additionalProperties:!1,description:"At most one motif. Rendering consumers land in #361."}),nr={palette:t.Optional(xb),typography:t.Optional(wb),spacing:t.Optional(Lb),chrome:t.Optional(vb),motif:t.Optional(Pb)};t.Object(nr,{additionalProperties:!1});var $b=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),Ib=["primary","secondary","accent","background","text","text2","background2","accent4","accent5","accent6"],Nb=["accent1","accent2","accent3","tx1","tx2","bg1","bg2"],Go=t.Union([$b,...Ib.map(e=>t.Literal(e)),...Nb.map(e=>t.Literal(e))],{description:"Hex color or semantic theme color name"}),gl=["title","subtitle","heading1","heading2","heading3","body","caption",...fl],hl=t.Union(gl.map(e=>t.Literal(e)),{description:"Predefined style name"}),ir=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Horizontal alignment options"}),rr=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical alignment options"}),Vo=t.Object({type:t.Optional(t.Union([t.Literal("outer"),t.Literal("inner")],{description:"Shadow type"})),color:t.Optional(Go),blur:t.Optional(t.Number({description:"Shadow blur radius in points"})),offset:t.Optional(t.Number({description:"Shadow offset in points"})),angle:t.Optional(t.Number({description:"Shadow angle in degrees"})),opacity:t.Optional(t.Number({minimum:0,maximum:1,description:"Shadow opacity (0-1)"}))},{description:"Shadow configuration",additionalProperties:!1}),Gt=t.Object({column:t.Number({minimum:0,description:"Starting column (0-indexed)"}),row:t.Number({minimum:0,description:"Starting row (0-indexed)"}),columnSpan:t.Optional(t.Number({minimum:1,description:"Number of columns to span (default: 1)"})),rowSpan:t.Optional(t.Number({minimum:1,description:"Number of rows to span (default: 1)"}))},{additionalProperties:!1,description:"Grid-based positioning"}),kb=t.Object({text:t.String({description:"Run text content"}),color:t.Optional(t.String({description:"Run color (hex without # or semantic theme name)"})),bold:t.Optional(t.Boolean({description:"Bold run"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-run weight (100–900). Overrides `bold` when set — renderer picks the closest embedded variant via CSS font-matching."})),italic:t.Optional(t.Boolean({description:"Italic run"})),underline:t.Optional(t.Union([t.Boolean({description:"Simple underline toggle"}),t.Object({style:t.Optional(t.Union([t.Literal("sng"),t.Literal("dbl"),t.Literal("dash"),t.Literal("dotted")])),color:t.Optional(t.String({description:"Underline color (hex)"}))},{additionalProperties:!1})])),strike:t.Optional(t.Boolean({description:"Strikethrough run"})),fontSize:t.Optional(t.Number({minimum:1,description:"Run font size in points"})),fontFace:t.Optional(t.String({description:"Run font family"})),superscript:t.Optional(t.Boolean({description:"Render run as superscript"})),subscript:t.Optional(t.Boolean({description:"Render run as subscript"})),charSpacing:t.Optional(t.Number({description:"Character spacing in points"})),breakLine:t.Optional(t.Boolean({description:"Insert line break after this run"}))},{description:"A styled text run. Run options override component-level defaults.",additionalProperties:!1}),bl=t.Object({text:t.Optional(t.String({description:"Text content to display. Mutually exclusive with `runs` — set exactly one of the two."})),runs:t.Optional(t.Array(kb,{minItems:1,description:"Rich text runs with per-run styling, rendered as one text block. Mutually exclusive with `text` — set exactly one of the two. Component-level props (align, valign, fill, lineSpacing, position…) still apply to the whole block."})),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),fit:t.Optional(t.Object({maxLines:t.Optional(t.Integer({minimum:1,description:"Lines the text may occupy, estimated with the width model at the effective font size."})),shrink:t.Optional(t.Array(t.Number({minimum:1}),{minItems:1,description:"Readable font sizes to try in order when the text exceeds maxLines or the box height. The first that fits is used."}))},{additionalProperties:!1,description:"Bounded fit: estimate the lines at the effective size, step down only through the declared readable sizes, and fail generation with text_fit_overflow when nothing fits. Without maxLines the box height bounds the text; without shrink the text must fit as sized."})),fontSize:t.Optional(t.Number({minimum:1,description:"Font size in points"})),fontFace:t.Optional(Ft),color:t.Optional(t.String({description:'Text color (hex without #, e.g., "FF0000")'})),bold:t.Optional(t.Boolean({description:"Bold text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-run weight (100–900). Renderer picks the closest embedded variant via CSS font-matching and references it through a synthetic family alias. Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic text"})),underline:t.Optional(t.Union([t.Boolean({description:"Simple underline toggle"}),t.Object({style:t.Optional(t.Union([t.Literal("sng"),t.Literal("dbl"),t.Literal("dash"),t.Literal("dotted")])),color:t.Optional(t.String({description:"Underline color (hex)"}))},{additionalProperties:!1})])),strike:t.Optional(t.Boolean({description:"Strikethrough text"})),language:t.Optional(t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:'Language tag (BCP-47, e.g. "en-US", "fr-FR") for spell-checking this text. Overrides the presentation default.',examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]})),align:t.Optional(ir),valign:t.Optional(rr),breakLine:t.Optional(t.Boolean({description:"Add line break after text"})),bullet:t.Optional(t.Union([t.Boolean({description:"Enable default bullet"}),t.Object({type:t.Optional(t.Union([t.Literal("bullet"),t.Literal("number")])),style:t.Optional(t.String({description:"Bullet character or style"})),startAt:t.Optional(t.Number({description:"Starting number for numbered lists"}))},{additionalProperties:!1})])),margin:t.Optional(t.Union([t.Number({description:"Margin in points (all sides)"}),t.Array(t.Number(),{description:"Margins as [top, right, bottom, left] in points",minItems:4,maxItems:4})])),rotate:t.Optional(t.Number({description:"Rotation angle in degrees"})),shadow:t.Optional(Vo),fill:t.Optional(t.Object({color:t.String({description:"Fill color (hex without #)"}),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Fill transparency (0-100)"}))},{additionalProperties:!1})),hyperlink:t.Optional(t.Object({url:t.Optional(t.String({description:"Hyperlink URL"})),slide:t.Optional(t.Number({description:"Slide number to link to"})),tooltip:t.Optional(t.String({description:"Hyperlink tooltip"}))},{additionalProperties:!1})),lineSpacing:t.Optional(t.Number({description:"Line spacing in points"})),lineSpacingMultiple:t.Optional(t.Number({minimum:.1,maximum:10,description:"Line spacing as a multiple of the font size (e.g. 0.9 = 90%). Takes precedence over lineSpacing."})),charSpacing:t.Optional(t.Number({description:"Character spacing in points (positive = wider, negative = tighter)"})),paraSpaceBefore:t.Optional(t.Number({description:"Space before paragraph in points"})),paraSpaceAfter:t.Optional(t.Number({description:"Space after paragraph in points"})),grid:t.Optional(Gt),style:t.Optional(hl)},{description:"Text component props",additionalProperties:!1}),Ol=t.Object({path:t.Optional(t.String({description:"Image file path or URL (mutually exclusive with base64 and svg)"})),base64:t.Optional(t.String({description:"Base64-encoded image data in data URI format (mutually exclusive with path and svg)"})),svg:t.Optional(t.String({description:'Raw inline SVG markup, e.g. "<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 24 24\\">...</svg>" (mutually exclusive with path and base64). Wrapped into an image/svg+xml data URI and embedded as a vector (PowerPoint 2016+); intrinsic size taken from the SVG viewBox/width/height when w/h omitted.'})),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),sizing:t.Optional(t.Object({type:t.Union([t.Literal("contain"),t.Literal("cover"),t.Literal("crop")],{description:"Image sizing strategy"}),w:t.Optional(t.Number({description:"Target width in inches"})),h:t.Optional(t.Number({description:"Target height in inches"}))},{description:"Image sizing options",additionalProperties:!1})),rotate:t.Optional(t.Number({description:"Rotation angle in degrees"})),rounding:t.Optional(t.Boolean({description:"Apply rounded corners to image"})),shadow:t.Optional(Vo),hyperlink:t.Optional(t.Object({url:t.Optional(t.String({description:"Hyperlink URL"})),slide:t.Optional(t.Number({description:"Slide number to link to"})),tooltip:t.Optional(t.String({description:"Hyperlink tooltip"}))},{additionalProperties:!1})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),grid:t.Optional(Gt)},{description:"PPTX image component props",additionalProperties:!1}),yl=t.Union([t.Literal("rect"),t.Literal("roundRect"),t.Literal("ellipse"),t.Literal("triangle"),t.Literal("diamond"),t.Literal("pentagon"),t.Literal("hexagon"),t.Literal("star5"),t.Literal("star6"),t.Literal("line"),t.Literal("arc"),t.Literal("pie"),t.Literal("blockArc"),t.Literal("chord"),t.Literal("arrow"),t.Literal("chevron"),t.Literal("cloud"),t.Literal("heart"),t.Literal("lightning")],{description:"Shape type"}),Ab=t.Object({text:t.String(),fontSize:t.Optional(t.Number({minimum:1})),fontFace:t.Optional(t.String()),color:t.Optional(t.String({description:"Segment color (hex without # or semantic name)"})),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900})),italic:t.Optional(t.Boolean()),breakLine:t.Optional(t.Boolean({description:"Insert line break after this segment"})),spaceBefore:t.Optional(t.Number({minimum:0,description:"Space before paragraph in points"})),spaceAfter:t.Optional(t.Number({minimum:0,description:"Space after paragraph in points"})),charSpacing:t.Optional(t.Number({description:"Character spacing in points"}))},{additionalProperties:!1}),Tb=["pct5","pct10","pct20","pct25","pct30","pct40","pct50","pct60","pct70","pct75","pct80","pct90","horz","vert","ltHorz","ltVert","dkHorz","dkVert","narHorz","narVert","dashHorz","dashVert","cross","dnDiag","upDiag","ltDnDiag","ltUpDiag","dkDnDiag","dkUpDiag","wdDnDiag","wdUpDiag","dashDnDiag","dashUpDiag","diagCross","smCheck","lgCheck","smGrid","lgGrid","dotGrid","smConfetti","lgConfetti","horzBrick","diagBrick","solidDmnd","openDmnd","dotDmnd","plaid","sphere","weave","divot","shingle","wave","trellis","zigZag"],Fb=t.Object({color:t.String({description:"Stop color (hex without # or semantic theme name)"}),pos:t.Number({minimum:0,maximum:100,description:"Stop position along the gradient (0-100)"}),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Stop transparency (0-100)"}))},{additionalProperties:!1,description:"Gradient color stop"}),xl=t.Object({type:t.Union([t.Literal("linear"),t.Literal("radial")],{description:"Gradient type"}),angle:t.Optional(t.Number({minimum:0,maximum:360,description:"Gradient angle in degrees for linear gradients (0 = left→right, 90 = top→bottom). Default: 0."})),stops:t.Array(Fb,{minItems:2,description:"Gradient color stops (at least 2)"}),focus:t.Optional(t.Union([t.Literal("center"),t.Literal("topLeft"),t.Literal("topRight"),t.Literal("bottomLeft"),t.Literal("bottomRight")],{description:'Focus point for radial gradients (default: "center")'}))},{additionalProperties:!1,description:"Gradient fill configuration"}),jb=t.Object({preset:t.Union(Tb.map(e=>t.Literal(e)),{description:"OOXML pattern preset name (a:pattFill prst value)"}),foreground:t.String({description:"Pattern foreground color (hex without # or semantic name)"}),background:t.String({description:"Pattern background color (hex without # or semantic name)"})},{additionalProperties:!1,description:"Pattern fill configuration"}),Sl=t.Object({type:yl,x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),fill:t.Optional(t.Object({color:t.Optional(t.String({description:"Fill color (hex without #)"})),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Fill transparency (0-100)"})),gradient:t.Optional(xl),pattern:t.Optional(jb)},{additionalProperties:!1})),line:t.Optional(t.Object({color:t.Optional(t.String({description:"Line color (hex without #)"})),width:t.Optional(t.Number({minimum:0,description:"Line width in points"})),dashType:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("dashDot")]))},{additionalProperties:!1})),text:t.Optional(t.Union([t.String({description:"Plain text"}),t.Array(Ab,{description:"Rich text segments with per-segment formatting"})],{description:"Text content inside the shape"})),fontSize:t.Optional(t.Number({minimum:1,description:"Font size for shape text"})),fontFace:t.Optional(t.String({description:"Font family for shape text"})),fontColor:t.Optional(t.String({description:"Font color for shape text (hex without #)"})),charSpacing:t.Optional(t.Number({description:"Character spacing in points for shape text"})),bold:t.Optional(t.Boolean({description:"Bold shape text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-shape weight (100–900). Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic shape text"})),align:t.Optional(ir),valign:t.Optional(rr),rotate:t.Optional(t.Number({description:"Rotation angle in degrees"})),angleRange:t.Optional(t.Array(t.Number(),{minItems:2,maxItems:2,description:"Shape arc [start, end] angles in degrees (arc/pie/blockArc/chord shapes)"})),flipH:t.Optional(t.Boolean({description:"Flip shape horizontally"})),flipV:t.Optional(t.Boolean({description:"Flip shape vertically"})),shadow:t.Optional(Vo),rectRadius:t.Optional(t.Number({minimum:0,description:"Corner radius for roundRect shape in inches"})),grid:t.Optional(Gt),style:t.Optional(hl)},{description:"Shape component props",additionalProperties:!1}),Rb=t.Union([t.String({description:"Simple text cell"}),t.Object({text:t.String({description:"Cell text content"}),color:t.Optional(t.String({description:"Text color (hex without #)"})),fill:t.Optional(t.String({description:"Cell background color (hex without #)"})),fontSize:t.Optional(t.Number({description:"Font size in points"})),fontFace:t.Optional(t.String({description:"Font family"})),bold:t.Optional(t.Boolean({description:"Bold text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-cell weight (100–900). Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic text"})),align:t.Optional(ir),valign:t.Optional(rr),colspan:t.Optional(t.Number({minimum:1,description:"Column span"})),rowspan:t.Optional(t.Number({minimum:1,description:"Row span"})),margin:t.Optional(t.Union([t.Number({description:"Margin in points (all sides)"}),t.Array(t.Number(),{minItems:4,maxItems:4})]))},{additionalProperties:!1})]),wl=t.Object({rows:t.Array(t.Array(Rb,{description:"Row of cells"}),{description:"Table rows (array of arrays)",minItems:1}),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),colW:t.Optional(t.Union([t.Number({description:"Uniform column width in inches"}),t.Array(t.Number(),{description:"Individual column widths in inches"})])),rowH:t.Optional(t.Union([t.Number({description:"Uniform row height in inches"}),t.Array(t.Number(),{description:"Individual row heights in inches"})])),border:t.Optional(t.Object({type:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("none")])),pt:t.Optional(t.Number({minimum:0,description:"Border width in points"})),color:t.Optional(t.String({description:"Border color (hex without #)"}))},{additionalProperties:!1})),fill:t.Optional(t.String({description:"Table background color (hex without #)"})),fontSize:t.Optional(t.Number({minimum:1,description:"Default font size for all cells"})),fontFace:t.Optional(t.String({description:"Default font family for all cells"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Default weight for all cells (100–900). Same sub-family aliasing as the per-cell `fontWeight`; a cell that sets its own `fontWeight` or `bold` opts out."})),color:t.Optional(t.String({description:"Default text color for all cells (hex without #)"})),align:t.Optional(ir),valign:t.Optional(rr),headerRow:t.Optional(t.Boolean({description:"Style the first row as a header — bold, on the theme's secondary background. Cells that state their own `bold`, `fill` or `color` keep it. Unlike the DOCX table, which declares its headers structurally, a PPTX table is rows of cells and the first one is a header only because you say so."})),autoPage:t.Optional(t.Boolean({description:"Auto-paginate table across multiple slides when content overflows"})),autoPageRepeatHeader:t.Optional(t.Boolean({description:"Repeat first row as header on each auto-paged slide"})),margin:t.Optional(t.Union([t.Number({description:"Cell margin in points (all sides)"}),t.Array(t.Number(),{minItems:4,maxItems:4})])),borderRadius:t.Optional(t.Number({minimum:0,description:"Rounded corner radius in inches. Renders a roundRect shape behind the table."})),grid:t.Optional(Gt)},{description:"PPTX table component props",additionalProperties:!1}),Ll=t.Object({options:t.Intersect([t.Record(t.String(),t.Unknown()),t.Object({chart:t.Object({width:t.Number(),height:t.Number()})})]),scale:t.Optional(t.Number()),serverUrl:t.Optional(t.String({description:"Highcharts Export Server URL (default: http://localhost:7801)"})),resources:t.Optional(t.Object({css:t.Optional(t.String()),js:t.Optional(t.String()),files:t.Optional(t.Array(t.String()))})),x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"X as percentage"})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Y as percentage"})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Width as percentage"})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Height as percentage"})])),grid:t.Optional(Gt)},{description:"PPTX Highcharts component props",additionalProperties:!1}),si=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),Ub=t.Union([t.Literal("area"),t.Literal("bar"),t.Literal("bar3D"),t.Literal("bubble"),t.Literal("doughnut"),t.Literal("line"),t.Literal("pie"),t.Literal("radar"),t.Literal("scatter")],{description:"Chart type"}),Mb=t.Object({name:t.Optional(t.String({description:"Series name"})),labels:t.Optional(t.Array(t.String(),{description:"Category labels. Needed on every series, not just the first, and the same length as `values`; a series without both `labels` and `values` drops the whole chart."})),values:t.Optional(t.Array(t.Number(),{description:"Data values, one per label. Needed on every series — see `labels`."})),sizes:t.Optional(t.Array(t.Number(),{description:"Bubble sizes (bubble charts only)"}))},{additionalProperties:!1}),Pa=t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("none")],{description:"Grid line style"})),size:t.Optional(t.Number({minimum:0,description:"Grid line width (points)"})),color:t.Optional(t.String({description:"Grid line color (hex or semantic)"}))},{additionalProperties:!1,description:"Axis grid line styling"}),vl=t.Object({type:Ub,data:t.Array(Mb,{description:"Chart data series",minItems:1}),showLegend:t.Optional(t.Boolean({description:"Show chart legend"})),showTitle:t.Optional(t.Boolean({description:"Show chart title"})),showValue:t.Optional(t.Boolean({description:"Show data values"})),showPercent:t.Optional(t.Boolean({description:"Show percentages (pie/doughnut)"})),showLabel:t.Optional(t.Boolean({description:"Show category labels on data points"})),showSerName:t.Optional(t.Boolean({description:"Show series name on data points"})),title:t.Optional(t.String({description:"Chart title text"})),titleFontSize:t.Optional(t.Number({description:"Title font size (points)"})),titleColor:t.Optional(t.String({description:"Title color (hex or semantic)"})),titleFontFace:t.Optional(t.String({description:"Title font face"})),titleFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Title weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`."})),chartColors:t.Optional(t.Array(t.String(),{description:"Series colors (hex or semantic theme names). Defaults to theme palette."})),dataBorder:t.Optional(t.Object({pt:t.Number({minimum:0,description:"Border width (points)"}),color:t.String({description:"Border color (hex or semantic)"})},{additionalProperties:!1,description:"Outline on data elements (bars, slices, areas)"})),legendPos:t.Optional(t.Union([t.Literal("b"),t.Literal("l"),t.Literal("r"),t.Literal("t"),t.Literal("tr")],{description:"Legend position"})),legendFontSize:t.Optional(t.Number({description:"Legend font size"})),legendFontFace:t.Optional(t.String({description:"Legend font face"})),legendFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Legend weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`. PowerPoint gives the legend no bold toggle, so 400 and 700 both render Regular (700 warns)."})),legendColor:t.Optional(t.String({description:"Legend text color"})),catAxisTitle:t.Optional(t.String({description:"Category axis title"})),catAxisHidden:t.Optional(t.Boolean({description:"Hide category axis"})),catAxisLabelRotate:t.Optional(t.Number({description:"Category axis label rotation (degrees)"})),catAxisLabelFontSize:t.Optional(t.Number({description:"Category axis label font size"})),catAxisLabelColor:t.Optional(t.String({description:"Category axis label color (hex or semantic)"})),catAxisLabelFontFace:t.Optional(t.String({description:"Category axis label font face"})),catAxisLabelFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Category axis label weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`."})),catGridLine:t.Optional(Pa),valAxisTitle:t.Optional(t.String({description:"Value axis title"})),valAxisHidden:t.Optional(t.Boolean({description:"Hide value axis"})),valAxisMinVal:t.Optional(t.Number({description:"Value axis minimum"})),valAxisMaxVal:t.Optional(t.Number({description:"Value axis maximum"})),valAxisLabelFormatCode:t.Optional(t.String({description:'Value axis label format (e.g. "$0.00", "#%")'})),valAxisMajorUnit:t.Optional(t.Number({description:"Value axis major unit / tick interval"})),valAxisLabelColor:t.Optional(t.String({description:"Value axis label color (hex or semantic)"})),valAxisLabelFontFace:t.Optional(t.String({description:"Value axis label font face"})),valAxisLabelFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Value axis label weight (100–900). Rendered as a sub-family alias — see `dataLabelFontWeight`."})),valAxisLabelFontSize:t.Optional(t.Number({description:"Value axis label font size"})),valGridLine:t.Optional(Pa),catAxisLineShow:t.Optional(t.Boolean({description:"Show the category axis line"})),valAxisLineShow:t.Optional(t.Boolean({description:"Show the value axis line"})),barDir:t.Optional(t.Union([t.Literal("bar"),t.Literal("col")],{description:'Bar direction: "bar" (horizontal) or "col" (vertical, default)'})),barGrouping:t.Optional(t.Union([t.Literal("clustered"),t.Literal("stacked"),t.Literal("percentStacked")],{description:"Bar grouping style"})),barGapWidthPct:t.Optional(t.Number({minimum:0,maximum:500,description:"Bar gap width (0-500%)"})),barOverlapPct:t.Optional(t.Number({minimum:-100,maximum:100,description:"Overlap between series bars (-100 to 100%). 100 = fully overlapped, negative = gap."})),lineSmooth:t.Optional(t.Boolean({description:"Smooth lines"})),lineDataSymbol:t.Optional(t.Union([t.Literal("circle"),t.Literal("dash"),t.Literal("diamond"),t.Literal("dot"),t.Literal("none"),t.Literal("square"),t.Literal("triangle")],{description:"Line data point marker symbol"})),lineSize:t.Optional(t.Number({description:"Line width (points)"})),lineDataSymbolSize:t.Optional(t.Number({minimum:2,maximum:72,description:"Line data point marker size (points)"})),firstSliceAng:t.Optional(t.Number({minimum:0,maximum:359,description:"Angle of first slice (degrees)"})),holeSize:t.Optional(t.Number({minimum:10,maximum:90,description:"Doughnut hole size (%)"})),radarStyle:t.Optional(t.Union([t.Literal("standard"),t.Literal("marker"),t.Literal("filled")],{description:"Radar chart style"})),dataLabelColor:t.Optional(t.String({description:"Data label text color"})),dataLabelFontSize:t.Optional(t.Number({description:"Data label font size"})),dataLabelFontFace:t.Optional(t.String({description:"Data label font face"})),dataLabelFontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:'Data label weight (100–900); overrides `dataLabelFontBold`. PowerPoint chart labels carry no numeric weight, so a non-RIBBI weight renders by rewriting the font face to the matching sub-family ("Inter" at 300 → "Inter Light") — 400 and 700 stay on the family and use the bold toggle. Falls back to the theme body font when the sibling font face is unset.'})),dataLabelFontBold:t.Optional(t.Boolean({description:"Bold data labels"})),dataLabelPosition:t.Optional(t.Union([t.Literal("b"),t.Literal("bestFit"),t.Literal("ctr"),t.Literal("l"),t.Literal("r"),t.Literal("t"),t.Literal("inEnd"),t.Literal("outEnd")],{description:"Data label position"})),x:t.Optional(si("X position in inches","X as percentage")),y:t.Optional(si("Y position in inches","Y as percentage")),w:t.Optional(si("Width in inches","Width as percentage")),h:t.Optional(si("Height in inches","Height as percentage")),grid:t.Optional(Gt)},{description:"Native PowerPoint chart component props",additionalProperties:!1});function Pl(e){var i;if(e.propsRequired!==void 0)return e.propsRequired;const n=e.propsSchema;return n.type!=="object"||(((i=n.required)==null?void 0:i.length)??0)>0}var gt=[{name:"text",propsSchema:bl,hasChildren:!1,category:"content",propsRequired:!0,description:"Text element - displays text with formatting, positioning and styling options. Prefer the named `style` values (title, heading1, body…) and theme color tokens over raw fontSize/hex — a theme swap must restyle the deck without editing every node."},{name:"image",propsSchema:Ol,hasChildren:!1,category:"content",propsRequired:!0,description:"Image element - displays images from file path, URL, or base64 data."},{name:"shape",propsSchema:Sl,hasChildren:!1,category:"content",description:"Shape element - draws geometric shapes with optional text, fill, and line styling."},{name:"table",propsSchema:wl,hasChildren:!1,category:"content",description:"Table element, declared ROW-MAJOR: `props.rows[][]`, an array of rows, each an array of cells, with no structural header — `headerRow: true` styles the first row as one. Note the DOCX `table` is the other way round — columns each carrying their own header and cells — so a table cannot be moved between the formats unchanged."},{name:"highcharts",propsSchema:Ll,hasChildren:!1,category:"content",description:"Highcharts element - renders charts via Highcharts Export Server."},{name:"chart",propsSchema:vl,hasChildren:!1,category:"content",description:"Native PowerPoint chart - editable, scalable, no external server needed. Always set series colors (theme-derived, one accent per series) — the auto-palette reads as default Office."}];function Zt(e){return t.Object({name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true."})),props:Pl(e)?e.propsSchema:t.Optional(e.propsSchema)},{additionalProperties:!1,description:e.description})}var Bb=t.Union([Zt(gt[0]),Zt(gt[1]),Zt(gt[2]),Zt(gt[3]),Zt(gt[4]),Zt(gt[5])],{$id:"PptxSlideContent",discriminator:{propertyName:"name"},description:"A single PPTX slide content element (text, image, shape, table, highcharts, or chart)."}),Eb=t.Partial(bl),Cb=t.Partial(Ol),Db=t.Partial(Sl),zb=t.Partial(wl),_b=t.Partial(Ll),Wb=t.Partial(vl),$l=t.Object({text:t.Optional(Eb),image:t.Optional(Cb),shape:t.Optional(Db),table:t.Optional(zb),highcharts:t.Optional(_b),chart:t.Optional(Wb)},{additionalProperties:!0});function qb(e){switch(e.errorType){case m.ArrayContains:return"Expected array to contain at least one matching value";case m.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case m.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case m.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case m.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case m.ArrayUniqueItems:return"Expected array elements to be unique";case m.Array:return"Expected array";case m.AsyncIterator:return"Expected AsyncIterator";case m.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case m.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case m.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case m.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case m.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case m.BigInt:return"Expected bigint";case m.Boolean:return"Expected boolean";case m.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case m.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case m.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case m.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case m.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case m.Date:return"Expected Date";case m.Function:return"Expected function";case m.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case m.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case m.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case m.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case m.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case m.Integer:return"Expected integer";case m.IntersectUnevaluatedProperties:return"Unexpected property";case m.Intersect:return"Expected all values to match";case m.Iterator:return"Expected Iterator";case m.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case m.Never:return"Never";case m.Not:return"Value should not match";case m.Null:return"Expected null";case m.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case m.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case m.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case m.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case m.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case m.Number:return"Expected number";case m.Object:return"Expected object";case m.ObjectAdditionalProperties:return"Unexpected property";case m.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case m.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case m.ObjectRequiredProperty:return"Expected required property";case m.Promise:return"Expected Promise";case m.RegExp:return"Expected string to match regular expression";case m.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case m.StringFormat:return`Expected string to match '${e.schema.format}' format`;case m.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case m.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case m.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case m.String:return"Expected string";case m.Symbol:return"Expected symbol";case m.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case m.Tuple:return"Expected tuple";case m.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case m.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case m.Uint8Array:return"Expected Uint8Array";case m.Undefined:return"Expected undefined";case m.Union:return"Expected union value";case m.Void:return"Expected void";case m.Kind:return`Expected kind '${e.schema[v]}'`;default:return"Unknown error type"}}let Hb=qb;function Kb(){return Hb}class Gb extends Xe{constructor(n){super(`Unable to dereference schema with $id '${n.$ref}'`),this.schema=n}}function Vb(e,n){const i=n.find(r=>r.$id===e.$ref);if(i===void 0)throw new Gb(e);return Vt(i,n)}function Il(e,n){return!et(e.$id)||n.some(i=>i.$id===e.$id)||n.push(e),n}function Vt(e,n){return e[v]==="This"||e[v]==="Ref"?Vb(e,n):e}class Jb extends Xe{constructor(n){super("Unable to hash value"),this.value=n}}var Re;(function(e){e[e.Undefined=0]="Undefined",e[e.Null=1]="Null",e[e.Boolean=2]="Boolean",e[e.Number=3]="Number",e[e.String=4]="String",e[e.Object=5]="Object",e[e.Array=6]="Array",e[e.Date=7]="Date",e[e.Uint8Array=8]="Uint8Array",e[e.Symbol=9]="Symbol",e[e.BigInt=10]="BigInt"})(Re||(Re={}));let rn=BigInt("14695981039346656037");const[Xb,Yb]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Zb=Array.from({length:256}).map((e,n)=>BigInt(n)),Nl=new Float64Array(1),kl=new DataView(Nl.buffer),Al=new Uint8Array(Nl.buffer);function*Qb(e){const n=e===0?1:Math.ceil(Math.floor(Math.log2(e)+1)/8);for(let i=0;i<n;i++)yield e>>8*(n-1-i)&255}function eO(e){Se(Re.Array);for(const n of e)cn(n)}function tO(e){Se(Re.Boolean),Se(e?1:0)}function nO(e){Se(Re.BigInt),kl.setBigInt64(0,e);for(const n of Al)Se(n)}function iO(e){Se(Re.Date),cn(e.getTime())}function rO(e){Se(Re.Null)}function oO(e){Se(Re.Number),kl.setFloat64(0,e);for(const n of Al)Se(n)}function aO(e){Se(Re.Object);for(const n of globalThis.Object.getOwnPropertyNames(e).sort())cn(n),cn(e[n])}function sO(e){Se(Re.String);for(let n=0;n<e.length;n++)for(const i of Qb(e.charCodeAt(n)))Se(i)}function lO(e){Se(Re.Symbol),cn(e.description)}function cO(e){Se(Re.Uint8Array);for(let n=0;n<e.length;n++)Se(e[n])}function dO(e){return Se(Re.Undefined)}function cn(e){if(it(e))return eO(e);if(ki(e))return tO(e);if(Ai(e))return nO(e);if(zn(e))return iO(e);if(Ni(e))return rO();if(at(e))return oO(e);if(nt(e))return aO(e);if(et(e))return sO(e);if(Ti(e))return lO(e);if(po(e))return cO(e);if(Ot(e))return dO();throw new Jb(e)}function Se(e){rn=rn^Zb[e],rn=rn*Xb%Yb}function Tl(e){return rn=BigInt("14695981039346656037"),cn(e),rn}class pO extends Xe{constructor(n){super("Unknown type"),this.schema=n}}function uO(e){return e[v]==="Any"||e[v]==="Unknown"}function M(e){return e!==void 0}function mO(e,n,i){return!0}function fO(e,n,i){return!0}function gO(e,n,i){if(!it(i)||M(e.minItems)&&!(i.length>=e.minItems)||M(e.maxItems)&&!(i.length<=e.maxItems)||!i.every(a=>pe(e.items,n,a))||e.uniqueItems===!0&&!function(){const a=new Set;for(const s of i){const c=Tl(s);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(M(e.contains)||at(e.minContains)||at(e.maxContains)))return!0;const r=M(e.contains)?e.contains:te(),o=i.reduce((a,s)=>pe(r,n,s)?a+1:a,0);return!(o===0||at(e.minContains)&&o<e.minContains||at(e.maxContains)&&o>e.maxContains)}function hO(e,n,i){return ms(i)}function bO(e,n,i){return!(!Ai(i)||M(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||M(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||M(e.maximum)&&!(i<=e.maximum)||M(e.minimum)&&!(i>=e.minimum)||M(e.multipleOf)&&i%e.multipleOf!==BigInt(0))}function OO(e,n,i){return ki(i)}function yO(e,n,i){return pe(e.returns,n,i.prototype)}function xO(e,n,i){return!(!zn(i)||M(e.exclusiveMaximumTimestamp)&&!(i.getTime()<e.exclusiveMaximumTimestamp)||M(e.exclusiveMinimumTimestamp)&&!(i.getTime()>e.exclusiveMinimumTimestamp)||M(e.maximumTimestamp)&&!(i.getTime()<=e.maximumTimestamp)||M(e.minimumTimestamp)&&!(i.getTime()>=e.minimumTimestamp)||M(e.multipleOfTimestamp)&&i.getTime()%e.multipleOfTimestamp!==0)}function SO(e,n,i){return uo(i)}function wO(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return pe(o,[...n,...r],i)}function LO(e,n,i){return!(!hs(i)||M(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||M(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||M(e.maximum)&&!(i<=e.maximum)||M(e.minimum)&&!(i>=e.minimum)||M(e.multipleOf)&&i%e.multipleOf!==0)}function vO(e,n,i){const r=e.allOf.every(o=>pe(o,n,i));if(e.unevaluatedProperties===!1){const o=new RegExp(wi(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s));return r&&a}else if(lt(e.unevaluatedProperties)){const o=new RegExp(wi(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s)||pe(e.unevaluatedProperties,n,i[s]));return r&&a}else return r}function PO(e,n,i){return fs(i)}function $O(e,n,i){return i===e.const}function IO(e,n,i){return!1}function NO(e,n,i){return!pe(e.not,n,i)}function kO(e,n,i){return Ni(i)}function AO(e,n,i){return!(!Te.IsNumberLike(i)||M(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||M(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||M(e.minimum)&&!(i>=e.minimum)||M(e.maximum)&&!(i<=e.maximum)||M(e.multipleOf)&&i%e.multipleOf!==0)}function TO(e,n,i){if(!Te.IsObjectLike(i)||M(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||M(e.maxProperties)&&!(Object.getOwnPropertyNames(i).length<=e.maxProperties))return!1;const r=Object.getOwnPropertyNames(e.properties);for(const o of r){const a=e.properties[o];if(e.required&&e.required.includes(o)){if(!pe(a,n,i[o])||(Xn(a)||uO(a))&&!(o in i))return!1}else if(Te.IsExactOptionalProperty(i,o)&&!pe(a,n,i[o]))return!1}if(e.additionalProperties===!1){const o=Object.getOwnPropertyNames(i);return e.required&&e.required.length===r.length&&o.length===r.length?!0:o.every(a=>r.includes(a))}else return typeof e.additionalProperties=="object"?Object.getOwnPropertyNames(i).every(a=>r.includes(a)||pe(e.additionalProperties,n,i[a])):!0}function FO(e,n,i){return gs(i)}function jO(e,n,i){if(!Te.IsRecordLike(i)||M(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||M(e.maxProperties)&&!(Object.getOwnPropertyNames(i).length<=e.maxProperties))return!1;const[r,o]=Object.entries(e.patternProperties)[0],a=new RegExp(r),s=Object.entries(i).every(([d,f])=>a.test(d)?pe(o,n,f):!0),c=typeof e.additionalProperties=="object"?Object.entries(i).every(([d,f])=>a.test(d)?!0:pe(e.additionalProperties,n,f)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(i).every(d=>a.test(d)):!0;return s&&c&&l}function RO(e,n,i){return pe(Vt(e,n),n,i)}function UO(e,n,i){const r=new RegExp(e.source,e.flags);return M(e.minLength)&&!(i.length>=e.minLength)||M(e.maxLength)&&!(i.length<=e.maxLength)?!1:r.test(i)}function MO(e,n,i){return!et(i)||M(e.minLength)&&!(i.length>=e.minLength)||M(e.maxLength)&&!(i.length<=e.maxLength)||M(e.pattern)&&!new RegExp(e.pattern).test(i)?!1:M(e.format)?As(e.format)?Fs(e.format)(i):!1:!0}function BO(e,n,i){return Ti(i)}function EO(e,n,i){return et(i)&&new RegExp(e.pattern).test(i)}function CO(e,n,i){return pe(Vt(e,n),n,i)}function DO(e,n,i){if(!it(i)||e.items===void 0&&i.length!==0||i.length!==e.maxItems)return!1;if(!e.items)return!0;for(let r=0;r<e.items.length;r++)if(!pe(e.items[r],n,i[r]))return!1;return!0}function zO(e,n,i){return Ot(i)}function _O(e,n,i){return e.anyOf.some(r=>pe(r,n,i))}function WO(e,n,i){return!(!po(i)||M(e.maxByteLength)&&!(i.length<=e.maxByteLength)||M(e.minByteLength)&&!(i.length>=e.minByteLength))}function qO(e,n,i){return!0}function HO(e,n,i){return Te.IsVoidLike(i)}function KO(e,n,i){return vo(e[v])?Rs(e[v])(e,i):!1}function pe(e,n,i){const r=M(e.$id)?Il(e,n):n,o=e;switch(o[v]){case"Any":return mO();case"Argument":return fO();case"Array":return gO(o,r,i);case"AsyncIterator":return hO(o,r,i);case"BigInt":return bO(o,r,i);case"Boolean":return OO(o,r,i);case"Constructor":return yO(o,r,i);case"Date":return xO(o,r,i);case"Function":return SO(o,r,i);case"Import":return wO(o,r,i);case"Integer":return LO(o,r,i);case"Intersect":return vO(o,r,i);case"Iterator":return PO(o,r,i);case"Literal":return $O(o,r,i);case"Never":return IO();case"Not":return NO(o,r,i);case"Null":return kO(o,r,i);case"Number":return AO(o,r,i);case"Object":return TO(o,r,i);case"Promise":return FO(o,r,i);case"Record":return jO(o,r,i);case"Ref":return RO(o,r,i);case"RegExp":return UO(o,r,i);case"String":return MO(o,r,i);case"Symbol":return BO(o,r,i);case"TemplateLiteral":return EO(o,r,i);case"This":return CO(o,r,i);case"Tuple":return DO(o,r,i);case"Undefined":return zO(o,r,i);case"Union":return _O(o,r,i);case"Uint8Array":return WO(o,r,i);case"Unknown":return qO();case"Void":return HO(o,r,i);default:if(!vo(o[v]))throw new pO(o);return KO(o,r,i)}}function or(...e){return e.length===3?pe(e[0],e[1],e[2]):pe(e[0],[],e[1])}var m;(function(e){e[e.ArrayContains=0]="ArrayContains",e[e.ArrayMaxContains=1]="ArrayMaxContains",e[e.ArrayMaxItems=2]="ArrayMaxItems",e[e.ArrayMinContains=3]="ArrayMinContains",e[e.ArrayMinItems=4]="ArrayMinItems",e[e.ArrayUniqueItems=5]="ArrayUniqueItems",e[e.Array=6]="Array",e[e.AsyncIterator=7]="AsyncIterator",e[e.BigIntExclusiveMaximum=8]="BigIntExclusiveMaximum",e[e.BigIntExclusiveMinimum=9]="BigIntExclusiveMinimum",e[e.BigIntMaximum=10]="BigIntMaximum",e[e.BigIntMinimum=11]="BigIntMinimum",e[e.BigIntMultipleOf=12]="BigIntMultipleOf",e[e.BigInt=13]="BigInt",e[e.Boolean=14]="Boolean",e[e.DateExclusiveMaximumTimestamp=15]="DateExclusiveMaximumTimestamp",e[e.DateExclusiveMinimumTimestamp=16]="DateExclusiveMinimumTimestamp",e[e.DateMaximumTimestamp=17]="DateMaximumTimestamp",e[e.DateMinimumTimestamp=18]="DateMinimumTimestamp",e[e.DateMultipleOfTimestamp=19]="DateMultipleOfTimestamp",e[e.Date=20]="Date",e[e.Function=21]="Function",e[e.IntegerExclusiveMaximum=22]="IntegerExclusiveMaximum",e[e.IntegerExclusiveMinimum=23]="IntegerExclusiveMinimum",e[e.IntegerMaximum=24]="IntegerMaximum",e[e.IntegerMinimum=25]="IntegerMinimum",e[e.IntegerMultipleOf=26]="IntegerMultipleOf",e[e.Integer=27]="Integer",e[e.IntersectUnevaluatedProperties=28]="IntersectUnevaluatedProperties",e[e.Intersect=29]="Intersect",e[e.Iterator=30]="Iterator",e[e.Kind=31]="Kind",e[e.Literal=32]="Literal",e[e.Never=33]="Never",e[e.Not=34]="Not",e[e.Null=35]="Null",e[e.NumberExclusiveMaximum=36]="NumberExclusiveMaximum",e[e.NumberExclusiveMinimum=37]="NumberExclusiveMinimum",e[e.NumberMaximum=38]="NumberMaximum",e[e.NumberMinimum=39]="NumberMinimum",e[e.NumberMultipleOf=40]="NumberMultipleOf",e[e.Number=41]="Number",e[e.ObjectAdditionalProperties=42]="ObjectAdditionalProperties",e[e.ObjectMaxProperties=43]="ObjectMaxProperties",e[e.ObjectMinProperties=44]="ObjectMinProperties",e[e.ObjectRequiredProperty=45]="ObjectRequiredProperty",e[e.Object=46]="Object",e[e.Promise=47]="Promise",e[e.RegExp=48]="RegExp",e[e.StringFormatUnknown=49]="StringFormatUnknown",e[e.StringFormat=50]="StringFormat",e[e.StringMaxLength=51]="StringMaxLength",e[e.StringMinLength=52]="StringMinLength",e[e.StringPattern=53]="StringPattern",e[e.String=54]="String",e[e.Symbol=55]="Symbol",e[e.TupleLength=56]="TupleLength",e[e.Tuple=57]="Tuple",e[e.Uint8ArrayMaxByteLength=58]="Uint8ArrayMaxByteLength",e[e.Uint8ArrayMinByteLength=59]="Uint8ArrayMinByteLength",e[e.Uint8Array=60]="Uint8Array",e[e.Undefined=61]="Undefined",e[e.Union=62]="Union",e[e.Void=63]="Void"})(m||(m={}));class GO extends Xe{constructor(n){super("Unknown type"),this.schema=n}}function ot(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function U(e){return e!==void 0}class Fl{constructor(n){this.iterator=n}[Symbol.iterator](){return this.iterator}First(){const n=this.iterator.next();return n.done?void 0:n.value}}function S(e,n,i,r,o=[]){return{type:e,schema:n,path:i,value:r,message:Kb()({errorType:e,path:i,schema:n,value:r,errors:o}),errors:o}}function*VO(e,n,i,r){}function*JO(e,n,i,r){}function*XO(e,n,i,r){if(!it(r))return yield S(m.Array,e,i,r);U(e.minItems)&&!(r.length>=e.minItems)&&(yield S(m.ArrayMinItems,e,i,r)),U(e.maxItems)&&!(r.length<=e.maxItems)&&(yield S(m.ArrayMaxItems,e,i,r));for(let s=0;s<r.length;s++)yield*ue(e.items,n,`${i}/${s}`,r[s]);if(e.uniqueItems===!0&&!function(){const s=new Set;for(const c of r){const l=Tl(c);if(s.has(l))return!1;s.add(l)}return!0}()&&(yield S(m.ArrayUniqueItems,e,i,r)),!(U(e.contains)||U(e.minContains)||U(e.maxContains)))return;const o=U(e.contains)?e.contains:te(),a=r.reduce((s,c,l)=>ue(o,n,`${i}${l}`,c).next().done===!0?s+1:s,0);a===0&&(yield S(m.ArrayContains,e,i,r)),at(e.minContains)&&a<e.minContains&&(yield S(m.ArrayMinContains,e,i,r)),at(e.maxContains)&&a>e.maxContains&&(yield S(m.ArrayMaxContains,e,i,r))}function*YO(e,n,i,r){ms(r)||(yield S(m.AsyncIterator,e,i,r))}function*ZO(e,n,i,r){if(!Ai(r))return yield S(m.BigInt,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(m.BigIntExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(m.BigIntExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(m.BigIntMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(m.BigIntMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==BigInt(0)&&(yield S(m.BigIntMultipleOf,e,i,r))}function*QO(e,n,i,r){ki(r)||(yield S(m.Boolean,e,i,r))}function*ey(e,n,i,r){yield*ue(e.returns,n,i,r.prototype)}function*ty(e,n,i,r){if(!zn(r))return yield S(m.Date,e,i,r);U(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)&&(yield S(m.DateExclusiveMaximumTimestamp,e,i,r)),U(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)&&(yield S(m.DateExclusiveMinimumTimestamp,e,i,r)),U(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)&&(yield S(m.DateMaximumTimestamp,e,i,r)),U(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)&&(yield S(m.DateMinimumTimestamp,e,i,r)),U(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0&&(yield S(m.DateMultipleOfTimestamp,e,i,r))}function*ny(e,n,i,r){uo(r)||(yield S(m.Function,e,i,r))}function*iy(e,n,i,r){const o=globalThis.Object.values(e.$defs),a=e.$defs[e.$ref];yield*ue(a,[...n,...o],i,r)}function*ry(e,n,i,r){if(!hs(r))return yield S(m.Integer,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(m.IntegerExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(m.IntegerExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(m.IntegerMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(m.IntegerMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==0&&(yield S(m.IntegerMultipleOf,e,i,r))}function*oy(e,n,i,r){let o=!1;for(const a of e.allOf)for(const s of ue(a,n,i,r))o=!0,yield s;if(o)return yield S(m.Intersect,e,i,r);if(e.unevaluatedProperties===!1){const a=new RegExp(wi(e));for(const s of Object.getOwnPropertyNames(r))a.test(s)||(yield S(m.IntersectUnevaluatedProperties,e,`${i}/${s}`,r))}if(typeof e.unevaluatedProperties=="object"){const a=new RegExp(wi(e));for(const s of Object.getOwnPropertyNames(r))if(!a.test(s)){const c=ue(e.unevaluatedProperties,n,`${i}/${s}`,r[s]).next();c.done||(yield c.value)}}}function*ay(e,n,i,r){fs(r)||(yield S(m.Iterator,e,i,r))}function*sy(e,n,i,r){r!==e.const&&(yield S(m.Literal,e,i,r))}function*ly(e,n,i,r){yield S(m.Never,e,i,r)}function*cy(e,n,i,r){ue(e.not,n,i,r).next().done===!0&&(yield S(m.Not,e,i,r))}function*dy(e,n,i,r){Ni(r)||(yield S(m.Null,e,i,r))}function*py(e,n,i,r){if(!Te.IsNumberLike(r))return yield S(m.Number,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(m.NumberExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(m.NumberExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(m.NumberMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(m.NumberMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==0&&(yield S(m.NumberMultipleOf,e,i,r))}function*uy(e,n,i,r){if(!Te.IsObjectLike(r))return yield S(m.Object,e,i,r);U(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield S(m.ObjectMinProperties,e,i,r)),U(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield S(m.ObjectMaxProperties,e,i,r));const o=Array.isArray(e.required)?e.required:[],a=Object.getOwnPropertyNames(e.properties),s=Object.getOwnPropertyNames(r);for(const c of o)s.includes(c)||(yield S(m.ObjectRequiredProperty,e.properties[c],`${i}/${ot(c)}`,void 0));if(e.additionalProperties===!1)for(const c of s)a.includes(c)||(yield S(m.ObjectAdditionalProperties,e,`${i}/${ot(c)}`,r[c]));if(typeof e.additionalProperties=="object")for(const c of s)a.includes(c)||(yield*ue(e.additionalProperties,n,`${i}/${ot(c)}`,r[c]));for(const c of a){const l=e.properties[c];e.required&&e.required.includes(c)?(yield*ue(l,n,`${i}/${ot(c)}`,r[c]),Xn(e)&&!(c in r)&&(yield S(m.ObjectRequiredProperty,l,`${i}/${ot(c)}`,void 0))):Te.IsExactOptionalProperty(r,c)&&(yield*ue(l,n,`${i}/${ot(c)}`,r[c]))}}function*my(e,n,i,r){gs(r)||(yield S(m.Promise,e,i,r))}function*fy(e,n,i,r){if(!Te.IsRecordLike(r))return yield S(m.Object,e,i,r);U(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield S(m.ObjectMinProperties,e,i,r)),U(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield S(m.ObjectMaxProperties,e,i,r));const[o,a]=Object.entries(e.patternProperties)[0],s=new RegExp(o);for(const[c,l]of Object.entries(r))s.test(c)&&(yield*ue(a,n,`${i}/${ot(c)}`,l));if(typeof e.additionalProperties=="object")for(const[c,l]of Object.entries(r))s.test(c)||(yield*ue(e.additionalProperties,n,`${i}/${ot(c)}`,l));if(e.additionalProperties===!1){for(const[c,l]of Object.entries(r))if(!s.test(c))return yield S(m.ObjectAdditionalProperties,e,`${i}/${ot(c)}`,l)}}function*gy(e,n,i,r){yield*ue(Vt(e,n),n,i,r)}function*hy(e,n,i,r){if(!et(r))return yield S(m.String,e,i,r);if(U(e.minLength)&&!(r.length>=e.minLength)&&(yield S(m.StringMinLength,e,i,r)),U(e.maxLength)&&!(r.length<=e.maxLength)&&(yield S(m.StringMaxLength,e,i,r)),!new RegExp(e.source,e.flags).test(r))return yield S(m.RegExp,e,i,r)}function*by(e,n,i,r){if(!et(r))return yield S(m.String,e,i,r);U(e.minLength)&&!(r.length>=e.minLength)&&(yield S(m.StringMinLength,e,i,r)),U(e.maxLength)&&!(r.length<=e.maxLength)&&(yield S(m.StringMaxLength,e,i,r)),et(e.pattern)&&(new RegExp(e.pattern).test(r)||(yield S(m.StringPattern,e,i,r))),et(e.format)&&(As(e.format)?Fs(e.format)(r)||(yield S(m.StringFormat,e,i,r)):yield S(m.StringFormatUnknown,e,i,r))}function*Oy(e,n,i,r){Ti(r)||(yield S(m.Symbol,e,i,r))}function*yy(e,n,i,r){if(!et(r))return yield S(m.String,e,i,r);new RegExp(e.pattern).test(r)||(yield S(m.StringPattern,e,i,r))}function*xy(e,n,i,r){yield*ue(Vt(e,n),n,i,r)}function*Sy(e,n,i,r){if(!it(r))return yield S(m.Tuple,e,i,r);if(e.items===void 0&&r.length!==0)return yield S(m.TupleLength,e,i,r);if(r.length!==e.maxItems)return yield S(m.TupleLength,e,i,r);if(e.items)for(let o=0;o<e.items.length;o++)yield*ue(e.items[o],n,`${i}/${o}`,r[o])}function*wy(e,n,i,r){Ot(r)||(yield S(m.Undefined,e,i,r))}function*Ly(e,n,i,r){if(or(e,n,r))return;const o=e.anyOf.map(a=>new Fl(ue(a,n,i,r)));yield S(m.Union,e,i,r,o)}function*vy(e,n,i,r){if(!po(r))return yield S(m.Uint8Array,e,i,r);U(e.maxByteLength)&&!(r.length<=e.maxByteLength)&&(yield S(m.Uint8ArrayMaxByteLength,e,i,r)),U(e.minByteLength)&&!(r.length>=e.minByteLength)&&(yield S(m.Uint8ArrayMinByteLength,e,i,r))}function*Py(e,n,i,r){}function*$y(e,n,i,r){Te.IsVoidLike(r)||(yield S(m.Void,e,i,r))}function*Iy(e,n,i,r){Rs(e[v])(e,r)||(yield S(m.Kind,e,i,r))}function*ue(e,n,i,r){const o=U(e.$id)?[...n,e]:n,a=e;switch(a[v]){case"Any":return yield*VO();case"Argument":return yield*JO();case"Array":return yield*XO(a,o,i,r);case"AsyncIterator":return yield*YO(a,o,i,r);case"BigInt":return yield*ZO(a,o,i,r);case"Boolean":return yield*QO(a,o,i,r);case"Constructor":return yield*ey(a,o,i,r);case"Date":return yield*ty(a,o,i,r);case"Function":return yield*ny(a,o,i,r);case"Import":return yield*iy(a,o,i,r);case"Integer":return yield*ry(a,o,i,r);case"Intersect":return yield*oy(a,o,i,r);case"Iterator":return yield*ay(a,o,i,r);case"Literal":return yield*sy(a,o,i,r);case"Never":return yield*ly(a,o,i,r);case"Not":return yield*cy(a,o,i,r);case"Null":return yield*dy(a,o,i,r);case"Number":return yield*py(a,o,i,r);case"Object":return yield*uy(a,o,i,r);case"Promise":return yield*my(a,o,i,r);case"Record":return yield*fy(a,o,i,r);case"Ref":return yield*gy(a,o,i,r);case"RegExp":return yield*hy(a,o,i,r);case"String":return yield*by(a,o,i,r);case"Symbol":return yield*Oy(a,o,i,r);case"TemplateLiteral":return yield*yy(a,o,i,r);case"This":return yield*xy(a,o,i,r);case"Tuple":return yield*Sy(a,o,i,r);case"Undefined":return yield*wy(a,o,i,r);case"Union":return yield*Ly(a,o,i,r);case"Uint8Array":return yield*vy(a,o,i,r);case"Unknown":return yield*Py();case"Void":return yield*$y(a,o,i,r);default:if(!vo(a[v]))throw new GO(e);return yield*Iy(a,o,i,r)}}function Ny(...e){const n=e.length===3?ue(e[0],e[1],"",e[2]):ue(e[0],[],"",e[1]);return new Fl(n)}function ky(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Bt(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Bt(e[i]);return n}function Ay(e){return e.map(n=>Bt(n))}function Ty(e){return e.slice()}function Fy(e){return new Map(Bt([...e.entries()]))}function jy(e){return new Set(Bt([...e.entries()]))}function Ry(e){return new Date(e.toISOString())}function Bt(e){if(it(e))return Ay(e);if(zn(e))return Ry(e);if(vp(e))return Ty(e);if(wp(e))return Fy(e);if(Lp(e))return jy(e);if(nt(e))return ky(e);if($p(e))return e;throw new Error("ValueClone: Unable to clone value")}function ut(e,n){const i=Pp(e,"default")?e.default:void 0,r=uo(i)?i():Bt(i);return Ot(n)?r:nt(n)&&nt(r)?Object.assign(r,n):n}function Wr(e){return Ss(e)&&"default"in e}function Uy(e,n,i){if(it(i)){for(let o=0;o<i.length;o++)i[o]=Le(e.items,n,i[o]);return i}const r=ut(e,i);if(!it(r))return r;for(let o=0;o<r.length;o++)r[o]=Le(e.items,n,r[o]);return r}function My(e,n,i){return zn(i)?i:ut(e,i)}function By(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return Le(o,[...n,...r],i)}function Ey(e,n,i){const r=ut(e,i);return e.allOf.reduce((o,a)=>{const s=Le(a,n,r);return nt(s)?{...o,...s}:s},{})}function Cy(e,n,i){const r=ut(e,i);if(!nt(r))return r;const o=Object.getOwnPropertyNames(e.properties);for(const a of o){const s=Le(e.properties[a],n,r[a]);Ot(s)||(r[a]=Le(e.properties[a],n,r[a]))}if(!Wr(e.additionalProperties))return r;for(const a of Object.getOwnPropertyNames(r))o.includes(a)||(r[a]=Le(e.additionalProperties,n,r[a]));return r}function Dy(e,n,i){const r=ut(e,i);if(!nt(r))return r;const o=e.additionalProperties,[a,s]=Object.entries(e.patternProperties)[0],c=new RegExp(a);for(const l of Object.getOwnPropertyNames(r))c.test(l)&&Wr(s)&&(r[l]=Le(s,n,r[l]));if(!Wr(o))return r;for(const l of Object.getOwnPropertyNames(r))c.test(l)||(r[l]=Le(o,n,r[l]));return r}function zy(e,n,i){return Le(Vt(e,n),n,ut(e,i))}function _y(e,n,i){return Le(Vt(e,n),n,i)}function Wy(e,n,i){const r=ut(e,i);if(!it(r)||Ot(e.items))return r;const[o,a]=[e.items,Math.max(e.items.length,r.length)];for(let s=0;s<a;s++)s<o.length&&(r[s]=Le(o[s],n,r[s]));return r}function qy(e,n,i){const r=ut(e,i);for(const o of e.anyOf){const a=Le(o,n,Bt(r));if(or(o,n,a))return a}return r}function Le(e,n,i){const r=Il(e,n),o=e;switch(o[v]){case"Array":return Uy(o,r,i);case"Date":return My(o,r,i);case"Import":return By(o,r,i);case"Intersect":return Ey(o,r,i);case"Object":return Cy(o,r,i);case"Record":return Dy(o,r,i);case"Ref":return zy(o,r,i);case"This":return _y(o,r,i);case"Tuple":return Wy(o,r,i);case"Union":return qy(o,r,i);default:return ut(o,i)}}function Hy(...e){return e.length===3?Le(e[0],e[1],e[2]):Le(e[0],[],e[1])}var Qe={};function Ky(){return typeof process>"u"||!Qe?!1:!!(Qe.CI||Qe.GITHUB_ACTIONS||Qe.GITLAB_CI)}function Gy(){var e;return typeof process>"u"||Qe!=null&&Qe.NO_COLOR?!1:Qe!=null&&Qe.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!Ky()}Gy();var Vy=/^(\d+)\.(\d+)\.(\d+)$/;function $a(e){const n=e.match(Vy);if(!n)throw new Error(`Invalid semver: "${e}". Expected format: major.minor.patch`);return{major:Number(n[1]),minor:Number(n[2]),patch:Number(n[3])}}function Jy(e,n){const i=$a(e),r=$a(n);return i.major-r.major||i.minor-r.minor||i.patch-r.patch}function jl(e){if(e.length===0)throw new Error("Cannot determine latest version from empty array");return e.reduce((n,i)=>Jy(i,n)>0?i:n)}function Rl(e){var i;if(typeof e!="object"||e===null||Array.isArray(e))return;const n=(i=e.properties)==null?void 0:i.name;return typeof(n==null?void 0:n.const)=="string"?n.const:void 0}function Xy(e){var i;const n=(i=e.properties)==null?void 0:i.version;return typeof(n==null?void 0:n.const)=="string"}function Yy(e){return Array.isArray(e.required)&&e.required.includes("name")}function Zy(e){const n=new Map;for(const i of e){const r=Rl(i),o=n.get(r);o?o.push(i):n.set(r,[i])}return n}function Qy(e,n){const i=n.find(r=>!Xy(r)&&typeof r.description=="string")??n.find(r=>typeof r.description=="string");return{const:e,type:"string",...i?{description:i.description}:{}}}function Ul(e){const n=new WeakSet;function i(r){if(typeof r!="object"||r===null||n.has(r))return;if(n.add(r),Array.isArray(r)){r.forEach(i);return}const o=r,a=o.anyOf,c=Array.isArray(a)&&a.length>=2&&a.every(l=>Rl(l)!==void 0&&Yy(l))&&o.properties===void 0&&o.allOf===void 0&&o.if===void 0&&o.required===void 0&&o.additionalProperties===void 0&&(o.type===void 0||o.type==="object")?Zy(a):void 0;c&&c.size>=2&&(o.type="object",o.required=["name"],o.properties={name:{description:"Component or registered plugin to render.",anyOf:[...c.entries()].map(([l,d])=>Qy(l,d))}},o.allOf=[...c.entries()].map(([l,d])=>({if:{properties:{name:{const:l}},required:["name"]},then:d.length===1?d[0]:{anyOf:d}})),delete o.anyOf);for(const l of Object.values(o))i(l)}i(e)}function qr(e){if(typeof e!="object"||e===null)return[];const n=e;return Array.isArray(n.anyOf)?n.anyOf.filter(i=>typeof i=="object"&&i!==null):Array.isArray(n.allOf)?n.allOf.flatMap(i=>{const r=i==null?void 0:i.then;if(typeof r!="object"||r===null)return[];const o=r.anyOf;return Array.isArray(o)?o.filter(a=>typeof a=="object"&&a!==null):[r]}):[]}function Hr(e,n,i){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(r=>{typeof r=="object"&&r!==null&&Hr(r,n,i)});return}e.$ref===n&&(e.$ref=i);for(const r of Object.values(e))typeof r=="object"&&r!==null&&Hr(r,n,i)}}function ex(e,n="ComponentDefinition"){const i=new Set(Object.keys(e.definitions??{})),r=s=>{const c=i.has(s)?s:n;return i.has(c)?`#/definitions/${c}`:void 0},o=s=>typeof s=="string"&&(/^T\d+$/.test(s)||s===n||i.has(s));function a(s,c=""){if(!(typeof s!="object"||s===null))for(const[l,d]of Object.entries(s)){const f=c?`${c}.${l}`:l;if(d&&typeof d=="object"){const p=d;if(p.type==="array"&&p.items&&Object.keys(p.items).length===0&&i.has(n)&&(p.items={$ref:`#/definitions/${n}`}),p.type==="array"&&p.items&&typeof p.items=="object"&&"$ref"in p.items&&o(p.items.$ref)){const O=p.items.$ref,u=r(O);p.items=u?{$ref:u}:{}}if(o(p.$ref)){const O=r(p.$ref);O?p.$ref=O:delete p.$ref}if(l==="$id"&&o(d)&&f!==`definitions.${d}.$id`){delete s[l];continue}a(d,f)}}}a(e)}function tx(e,n={}){const{$schema:i="http://json-schema.org/draft-07/schema#",$id:r,title:o,description:a,definitions:s={},enrich:c}=n,l=JSON.parse(JSON.stringify(e));if(l.$id&&typeof l.$id=="string"&&/^T\d+$/.test(l.$id)){const O=l.$id;delete l.$id,Hr(l,O,"#")}const d={...s};function f(O,u=""){if(!(typeof O!="object"||O===null)){for(const[h,b]of Object.entries(O))if(b&&typeof b=="object"){const L=b;if(L.$id&&typeof L.$id=="string"){const N=L.$id;if(u!==`definitions.${N}`){const{$id:I,...w}=L;d[N]=w,O[h]={$ref:`#/definitions/${N}`},f(w,`definitions.${N}`);continue}}f(b,u?`${u}.${h}`:h)}}}f(l);const p={$schema:i};return r&&(p.$id=r),Object.assign(p,l),p.$schema=i,r&&(p.$id=r),o!==void 0&&(p.title=o),a!==void 0&&(p.description=a),Object.keys(d).length>0&&(p.definitions=d),ex(p),c==null||c(p),Ul(p),p}var nx=[{id:"scaffold-marker",kind:"scaffold-marker",expression:/\{\{\s*[^{}\n]*?\S[^{}\n]*?\s*\}\}/},{id:"lorem-ipsum",kind:"filler",expression:/lorem\s+ipsum/i},{id:"your-x-here",kind:"filler",expression:/\byour\b[^.!?\n]{0,40}?\bhere\b/i},{id:"goes-here",kind:"filler",expression:/\b(?:goes\s+here|go\s+here|(?:text|title|subtitle|content|image|logo|caption|name)\s+here)\b/i},{id:"click-to-add",kind:"filler",expression:/\bclick\s+to\s+(?:add|edit)\b/i},{id:"bracketed",kind:"filler",expression:/^\[[^[\]\n]*[A-Za-z][^[\]\n]*\]$/},{id:"debris",kind:"filler",expression:/^(?:todo|fixme|x{3,}|placeholder|sample\s+text|dummy\s+text|insert\s+text)$/i}];nx.map(e=>e.id);var Ia=200,Na=36,ka=600,ix=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),rx=new Set(["heading","body","mono","light"]),ox=new Set(["fontRegistry"]);function Kr(e,n,i){if(e!=null){if(typeof e=="string"){if(i&&(ix.has(i)||rx.has(i))){const r=e.trim();r.length>0&&n.add(r)}return}if(Array.isArray(e)){for(const r of e)Kr(r,n,i);return}if(typeof e=="object"){const r=e.fonts;if(i==="theme"&&r&&typeof r=="object"){for(const[o,a]of Object.entries(r))if(typeof a=="string"){const s=a.trim();s.length>0&&n.add(s)}else if(a&&typeof a=="object"){const s=a.family;typeof s=="string"&&s.trim().length>0&&n.add(s.trim())}}for(const[o,a]of Object.entries(e))ox.has(o)||Kr(a,n,o)}}}function Ml(e){const n=new Set;return Kr(e,n),n}var D0=Ml,z0=Ml,_0={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"},ax=["actionTitle","takeaway","source","tracker","footer"],sx=t.Recursive(e=>t.Object({type:t.Union(["string","number","integer","boolean","object","array","component"].map(n=>t.Literal(n)),{description:"Content type accepted by this slot. Use component for a document component or registered plugin."}),description:t.Optional(t.String({description:"Explain this slot’s content and purpose to authors."})),required:t.Optional(t.Boolean({description:"Require a value when no default is provided. Defaults to false."})),default:t.Optional(t.Unknown({description:"Value used when the caller omits this slot. Must satisfy the slot’s type and constraints."})),enum:t.Optional(t.Array(t.Union([t.String(),t.Number(),t.Boolean()]),{minItems:1,description:"Allowed scalar values for this slot."})),minItems:t.Optional(t.Integer({minimum:0,description:"Minimum number of array entries, inclusive."})),maxItems:t.Optional(t.Integer({minimum:0,description:"Maximum number of array entries, inclusive."})),minLength:t.Optional(t.Integer({minimum:0,description:"Minimum string length in characters, inclusive."})),maxLength:t.Optional(t.Integer({minimum:0,description:"Maximum string length in characters, inclusive."})),minimum:t.Optional(t.Number({description:"Minimum numeric value, inclusive."})),maximum:t.Optional(t.Number({description:"Maximum numeric value, inclusive."})),maxWords:t.Optional(t.Integer({minimum:1,description:"Maximum whitespace-separated word count. Exceeding it fails validation."})),oneLine:t.Optional(t.Boolean({description:"Reject newline characters in string values. Does not prevent visual line wrapping."})),items:t.Optional({...e,description:"Slot type and constraints for each array entry."}),properties:t.Optional(t.Record(t.String(),e,{description:"Named child slots accepted by an object slot. Undeclared properties are rejected."})),role:t.Optional(t.Union(ax.map(n=>t.Literal(n)),{description:"Content role for quality profiles: actionTitle, takeaway, source, tracker or footer. A profile may require or measure it; the theme only styles it."}))},{additionalProperties:!1}),{$id:"BlockSlot"}),Bl=t.Unsafe(t.Object({description:t.Optional(t.String({description:"Describe what this reusable block renders and when to use it."})),slots:t.Record(t.String(),sx,{description:"Named inputs and their types, defaults and constraints. Use an empty object for a block with no inputs."}),body:t.Array(t.Unknown(),{description:"Components and binding directives expanded in order when this block is invoked."}),section:t.Optional(t.Object({tracker:t.Optional(t.Unknown({description:"Section tracker value or binding, available to headers and footers through $context at /section/tracker."})),header:t.Optional(t.Array(t.Unknown(),{description:"Header component templates. Explicit header settings on the section take precedence."})),footer:t.Optional(t.Array(t.Unknown(),{description:"Footer component templates. Explicit footer settings on the section take precedence."})),pageBreak:t.Optional(t.Boolean({description:"Start the containing section on a new page. An explicit section pageBreak setting takes precedence."})),scope:t.Optional(t.Union([t.Literal("section"),t.Literal("following")],{description:"Apply header/footer templates to this section only, or inherit them in following sections. Defaults to section."}))},{additionalProperties:!1,description:"DOCX section tracker, header/footer templates and page-break behavior. Place this block at the section boundary."})),slide:t.Optional(t.Object({background:t.Optional(t.Unknown({description:"Slide background (color, gradient or image) or a binding. A background the slide states itself takes precedence."})),grid:t.Optional(t.Unknown({description:"Grid configuration merged over the presentation grid when resolving grid placements in this block’s body."})),notes:t.Optional(t.Unknown({description:"Speaker notes or a binding. Notes the slide states itself take precedence."}))},{additionalProperties:!1,description:"PPTX slide background, grid and notes supplied by this block. Invoke the block as a direct child of a slide."}))},{additionalProperties:!1})),El=t.Record(t.String({pattern:"^[a-zA-Z][a-zA-Z0-9_-]*$"}),Bl,{description:"Document-local JSON block definitions. Names are not built into the engine."}),Cl=t.Object({ref:t.String({minLength:1,description:"Name in this document’s props.blocks."}),slots:t.Optional(t.Record(t.String(),t.Unknown(),{description:"Input values keyed by the slot names declared in the referenced block definition."}))},{additionalProperties:!1}),Jo={$slot:{keys:["$slot","default","props"],result:"dynamic"},$item:{keys:["$item","default","props"],result:"dynamic"},$theme:{keys:["$theme","default"],result:"dynamic"},$context:{keys:["$context","default"],result:"dynamic"},$count:{keys:["$count"],result:"number"},$if:{keys:["$if","then","else"],result:"dynamic"},$each:{keys:["$each","template"],result:"array"},$join:{keys:["$join","separator","keepEmpty"],result:"string"},$measure:{keys:["$measure","fraction","unit"],result:"number"}},lx=["$item","$slot","$context"],Li=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),cx=["x","y","w","h","position","grid","gridConfig","direction","gap","weights","alignment","spacing"];Object.fromEntries(Object.entries(Jo).map(([e,n])=>[e,n.keys]));var xr=["null","boolean","number","string","array","object"],Qt=(e,n)=>new Set([...e].filter(i=>n.has(i))),dx=e=>new Set(e.flatMap(n=>[...n])),Aa=e=>e===null?"null":Array.isArray(e)?"array":typeof e;function kn(e,n,i=new Set){if(e===!1)return new Set;if(e===!0||i.has(e))return new Set(xr);const r=e.not;if(r===!0||r&&typeof r=="object"&&Object.keys(r).length===0)return new Set;const o=new Set(i).add(e);let a=new Set(xr);if(e.type){const s=Array.isArray(e.type)?e.type:[e.type];a=Qt(a,new Set(xr.filter(c=>s.includes(c)||c==="number"&&s.includes("integer"))))}if(Object.hasOwn(e,"const")&&(a=Qt(a,new Set([Aa(e.const)]))),Array.isArray(e.enum)&&(a=Qt(a,new Set(e.enum.map(Aa)))),typeof e.$ref=="string"){const s=n(e.$ref);s!==void 0&&(a=Qt(a,kn(s,n,o)))}for(const s of["anyOf","oneOf"])Array.isArray(e[s])&&(a=Qt(a,dx(e[s].map(c=>kn(c,n,o)))));if(Array.isArray(e.allOf))for(const s of e.allOf)a=Qt(a,kn(s,n,o));if(r&&typeof r=="object"&&r.type&&Object.keys(r).every(s=>["type","description","title","$comment"].includes(s))){const s=(Array.isArray(r.type)?r.type:[r.type]).filter(c=>c!=="integer");a=new Set([...a].filter(c=>!s.includes(c)))}return a}function hi(e,n,i=new Set){if(e===!1)return!1;if(e===!0||i.has(e))return{};const r=new Set(i).add(e),o=[];if(typeof e.$ref=="string"){const a=n(e.$ref);a!==void 0&&o.push(hi(a,n,r))}e.items!==void 0&&o.push(Array.isArray(e.items)?{anyOf:[...e.items,...e.additionalItems===!1?[]:[e.additionalItems??{}]]}:e.items);for(const a of["anyOf","oneOf"])Array.isArray(e[a])&&o.push({anyOf:e[a].filter(s=>kn(s,n).has("array")).map(s=>hi(s,n,r))});return Array.isArray(e.allOf)&&o.push(...e.allOf.map(a=>hi(a,n,r))),o.length===0?{}:o.length===1?o[0]:{allOf:o}}var At=(e,n)=>({type:"object",properties:e,required:n,additionalProperties:!1}),Sr=e=>({type:"string",pattern:"^(|/.*)$",description:e}),px=e=>({$slot:"Read a named input slot by JSON Pointer, e.g. /title or /client/name.",$item:"Read the current $each entry by JSON Pointer. Use an empty string for the whole entry or /title for a property.",$theme:"Read the active theme by JSON Pointer, e.g. /colors/primary. A missing value requires a default.",$context:e==="pptx"?"Read deck or slide context by JSON Pointer, e.g. /document/title, /slide/width or /slide/index.":"Read document or section context by JSON Pointer, e.g. /document/title or /section/tracker."}),ux=e=>e==="pptx"?{axis:"Measure the slide canvas width or height, in the unit given.",unit:"Measurement unit: points, twentieths of a point, or inches. Defaults to pt; use in for frame coordinates."}:{axis:"Measure the usable page width or height after margins, using the containing section’s page settings.",unit:"Measurement unit: points, twentieths of a point, or inches. Defaults to pt."},li=(e,n)=>({...typeof e=="boolean"?{allOf:[e]}:e,description:n}),wr=e=>typeof e=="boolean"?{}:{...e.description&&{description:e.description},...e.markdownDescription&&{markdownDescription:e.markdownDescription}},mx=e=>({type:"object",required:[e]}),ci=Object.keys(Jo);function Dl(e,n,i=[],r="docx"){const o=`BlockTemplate_${n}`,a=px(r),s=ux(r),c=k=>({description:k,anyOf:[Sr(k),...lx.map(R=>At({[R]:Sr(a[R])},[R]))]}),l=`${o}_Body`,d=k=>({$ref:`#/definitions/${k}`});if(e[l])return d(l);const f={...e},p=f[n];f[n]={...p,anyOf:(p.anyOf??[p]).filter(k=>{var R,J;return!i.includes((J=(R=k.properties)==null?void 0:R.name)==null?void 0:J.const)})};const O=k=>{if(!k.startsWith("#/definitions/"))return;let R=f;for(const J of k.slice(14).split("/")){const Q=J.replace(/~1/g,"/").replace(/~0/g,"~");if(!R||typeof R!="object"||!Object.hasOwn(R,Q))return;R=R[Q]}return typeof R=="boolean"||R&&typeof R=="object"?R:void 0},u=new Map,h=new Map;let b=0;const L=d(n),N=new Map,I=k=>{const R=JSON.stringify(k);let J=N.get(R);return J||(J=`${o}_Shared${b++}`,N.set(R,J),e[J]=k),d(J)},w=Object.fromEntries(ci.map(k=>[k,I(mx(k))])),D=I({anyOf:Object.values(w)}),_=[...new Set(["",...ci.flatMap(k=>Array.from({length:k.length-1},(R,J)=>k.slice(0,J+1)))])],T=I({type:"object",propertyNames:{pattern:`^(?:${_.map(k=>k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})$`}});function A(k){if(typeof k=="boolean")return k;const R=JSON.stringify(k),J=h.get(R);if(J)return{...d(J),...wr(k)};const Q=`${o}_Literal${b++}`;h.set(R,Q),e[Q]={};const X={...k};if(typeof k.$ref=="string"){const y=O(k.$ref);if(y!==void 0){const F=A(y);typeof F=="object"?X.$ref=F.$ref:(delete X.$ref,F||(X.not={}))}}k.properties&&(X.properties=Object.fromEntries(Object.entries(k.properties).map(([y,F])=>[y,["name","version"].includes(y)&&typeof F=="object"&&typeof F.const=="string"?F:W(F)]))),k.patternProperties&&(X.patternProperties=Object.fromEntries(Object.entries(k.patternProperties).map(([y,F])=>[y,W(F)]))),k.items!==void 0&&(X.items=Array.isArray(k.items)?k.items.map(y=>W(y,!0)):W(k.items,!0));for(const y of["additionalProperties","additionalItems"])typeof k[y]=="object"&&(X[y]=W(k[y],y==="additionalItems"));for(const y of["anyOf","oneOf","allOf"])Array.isArray(k[y])&&(X[y]=k[y].map(F=>{var ce,z;const Y=A(F);return typeof F=="object"&&typeof((z=(ce=F.properties)==null?void 0:ce.name)==null?void 0:z.const)=="string"&&typeof Y=="object"&&Y.$ref?e[Y.$ref.slice(14)]:Y}));for(const y of["then","else"])k[y]!==void 0&&(X[y]=A(k[y]));return e[Q]=X,{...d(Q),...wr(k)}}function W(k,R=!1){if(k===!1)return!1;const J=wr(k),Q=typeof k=="object"?{...k}:k;typeof Q=="object"&&(delete Q.description,delete Q.markdownDescription);const X=`${R?"sequence":"value"}:${JSON.stringify(Q)}`,y=u.get(X);if(y)return{...d(y),...J};const F=`${o}_Value${b++}`;u.set(X,F),e[F]={};const Y=d(F),ce=kn(Q,O);if(ce.size===0)return e[F]={allOf:[A(Q)]},Y;const z=()=>R?W(Q):Y,Jt=()=>R?{anyOf:[Y,{type:"array",items:Y}]}:Y,ge=()=>R?z():W(hi(Q,O)),Z={};for(const G of ci){const Ze=Jo[G].result;if(!(Ze!=="dynamic"&&!ce.has(Ze)&&!(R&&Ze==="array")))switch(G){case"$slot":case"$item":case"$theme":case"$context":Z[G]=At({[G]:Sr(a[G]),default:li(z(),"Fallback value or binding used only when the referenced value is missing. Null, false and empty values do not trigger it."),...G==="$slot"||G==="$item"?{props:{type:"object",description:"Component props merged beneath a component-slot value. Put placement (x, y, w, h, grid) and styling defaults here; the slot content may override styling but never placement."}}:{}},[G]);break;case"$if":Z[G]=At({$if:c('Test a slot by JSON Pointer, e.g. /subtitle, or a reference such as { "$item": "/numeric" }. Missing, null, false, empty text and empty arrays select else; zero selects then.'),then:li(Jt(),"Value or components to emit when the slot tested by $if is present."),else:li(Jt(),"Value or components to emit otherwise. Omit to produce no output.")},["$if","then"]);break;case"$each":Z[G]=At({$each:c('Repeat template for each entry in an array slot, e.g. /items, or in an array of the current entry, { "$item": "/cells" }. Read the current entry with $item.'),template:li(ge(),"One template evaluated per array entry. Use $item for the current entry and a group for multiple components.")},["$each","template"]);break;case"$count":Z[G]=At({$count:c('Return the number of entries in an array slot, e.g. /items, or in an array of the current entry, { "$item": "/cells" }.')},["$count"]);break;case"$join":Z[G]=At({$join:{type:"array",items:W({}),description:"Evaluate these values or bindings and join them as text. Empty values are skipped unless keepEmpty is true."},separator:{type:"string",description:"Text inserted between joined values. Defaults to an empty string."},keepEmpty:{type:"boolean",description:"Keep missing, null, false, empty text and empty arrays in the join. Defaults to false."}},["$join"]);break;case"$measure":Z[G]=At({$measure:{enum:["width","height"],description:s.axis},fraction:{type:"number",minimum:0,maximum:1,description:"Fraction of the measured dimension, from 0 to 1. Defaults to 1."},unit:{enum:["pt","twip","in"],description:s.unit}},["$measure"]);break;default:{const Xt=G;throw new Error(`Missing authoring schema for directive ${Xt}`)}}}return e[F]={allOf:[{if:D,then:{allOf:ci.map(G=>({if:w[G],then:Z[G]?I({...Z[G],properties:Object.fromEntries(Object.entries(Z[G].properties).map(([Ze,Xt])=>[Ze,I(Xt)]))}):!1}))},else:A(Q)},{if:T,then:{properties:Object.fromEntries(Object.entries(Z).map(([G,Ze])=>[G,I(Ze.properties[G])]))}}]},{...Y,...J}}return e[l]=W(L,!0),d(l)}var fx="^\\s*\\{\\{\\s*[^{}\\n]*?\\S[^{}\\n]*?\\s*\\}\\}\\s*$",Xo=e=>JSON.parse(JSON.stringify(e));function Lr(e,n,i){if(e!==void 0&&n!==void 0)return e===n?`${e} ${i}`:`${e}–${n} ${i}`;if(e!==void 0)return`at least ${e} ${i}`;if(n!==void 0)return`at most ${n} ${i}`}function gx(e){const n=[];e.required&&e.default===void 0&&n.push("Required"),e.default!==void 0&&n.push(`Default: \`${JSON.stringify(e.default)}\``),e.type==="component"&&n.push("A component; placement stays in the definition"),e.enum&&n.push(`One of ${e.enum.map(a=>`\`${JSON.stringify(a)}\``).join(", ")}`);const i=Lr(e.minLength,e.maxLength,"characters");i&&n.push(i),e.maxWords!==void 0&&n.push(`at most ${e.maxWords} words`),e.oneLine&&n.push("one line");const r=Lr(e.minimum,e.maximum,"");r&&n.push(r.trim());const o=Lr(e.minItems,e.maxItems,"entries");return o&&n.push(o),e.role&&n.push(`Role: ${e.role}`),n}function hx(e){return[e.description,gx(e).join(" · ")].filter(Boolean).join(`
3
+
4
+ `)}function Gr(e,n){let i;if(e.type==="component")i=n?{allOf:[n,{properties:{props:{propertyNames:{not:{enum:[...cx]},errorMessage:"Block placement belongs in the definition, not in a component slot."}}}}]}:{type:"object",properties:{name:{type:"string"}},required:["name"]};else{const{oneLine:o,properties:a,items:s,...c}=e;for(const l of["role","required","maxWords","description"])delete c[l];if(i={...c},c.minLength!==void 0||c.maxLength!==void 0||c.enum!==void 0){const{minLength:l,maxLength:d,enum:f,...p}=c;i={...p,anyOf:[{...l!==void 0&&{minLength:l},...d!==void 0&&{maxLength:d},...f!==void 0&&{enum:f}},{type:"string",pattern:fx}]}}o&&(i.pattern="^[^\\r\\n]*$"),s&&(i.items=Gr(s,n)),a&&(i.properties=Object.fromEntries(Object.entries(a).map(([l,d])=>[l,Gr(d,n)])),i.required=Object.entries(a).filter(([,l])=>l.required&&l.default===void 0).map(([l])=>l),i.additionalProperties=!1)}e.description&&(i.description=e.description);const r=hx(e);return r&&(i.markdownDescription=r),i}function bx(e,n){return{type:"object",additionalProperties:!1,description:"Input values keyed by the slot names declared in the referenced block definition.",properties:Object.fromEntries(Object.entries(e.slots).map(([i,r])=>[i,Gr(r,n)])),required:Object.entries(e.slots).filter(([,i])=>i.required&&i.default===void 0).map(([i])=>i)}}function Ox(e,n){const i=Object.keys(e),r={type:"object",additionalProperties:!1,required:["ref"],properties:{ref:{type:"string",minLength:1,description:"Name in this document’s props.blocks.",...i.length&&{anyOf:i.map(o=>({const:o,type:"string",description:e[o].description??`Block "${o}", defined in this document.`}))}},slots:{type:"object",description:"Input values keyed by the slot names declared in the referenced block definition."}}};return i.length&&(r.allOf=i.map(o=>({if:{properties:{ref:{const:o}},required:["ref"]},then:{properties:{slots:bx(e[o],n)}}}))),r}function yx(e,n,i){var r;for(const o of i){const a=(r=e.definitions)==null?void 0:r[o.name];if(!a)continue;const s=Ox(n,o.componentRef),c=new Set,l=d=>{var p,O;if(!d||typeof d!="object"||c.has(d))return;if(c.add(d),Array.isArray(d)){d.forEach(l);return}const f=d;if(((O=(p=f.properties)==null?void 0:p.name)==null?void 0:O.const)==="block"&&f.properties.props){f.properties.props=Xo(s);return}for(const[u,h]of Object.entries(f))u!=="$ref"&&l(h)};l(a)}}function Vr(e,n){if(Array.isArray(e)){e.forEach(i=>Vr(i,n));return}if(Li(e)){e.name==="block"&&Li(e.props)&&typeof e.props.ref=="string"&&n(e.props.ref,e);for(const i of Object.values(e))Vr(i,n)}}function zl(e,n,i){var r;if(e.default!==void 0)return Xo(e.default);if((r=e.enum)!=null&&r.length)return e.enum[0];switch(e.type){case"string":return n;case"number":case"integer":{const o=e.minimum??0;return e.maximum!==void 0&&e.maximum<o?e.maximum:o}case"boolean":return!0;case"array":{const o=Math.min(Math.max(3,e.minItems??0),e.maxItems??Number.POSITIVE_INFINITY),a=e.items??{type:"string"};return Array.from({length:o},(s,c)=>zl(a,`${n} ${c+1}`,i))}case"object":return _l(e.properties??{},i);case"component":return i==="docx"?{name:"paragraph",props:{text:n}}:{name:"text",props:{text:n}};default:return n}}function _l(e,n){return Object.fromEntries(Object.entries(e).filter(([,i])=>i.required&&i.default===void 0||i.role).map(([i,r])=>[i,zl(r,i,n)]))}function xx(e,n,i){let r;if(Li(i.document)){const o=Object.fromEntries(Object.entries(i.document).filter(([a])=>a!=="props"));Vr(o,(a,s)=>{if(r||a!==e)return;const c=s.props;r={name:"block",props:{ref:a,...Li(c.slots)&&{slots:Xo(c.slots)}}}})}return r??{name:"block",props:{ref:e,slots:_l(n.slots,i.format)}}}var Sx=["docx","pptx"],vr=t.String({pattern:"^[a-z][a-z0-9]*(-[a-z0-9]+)*$",description:"Kebab-case identifier."}),wx=t.Object({min:t.Integer({minimum:1}),max:t.Integer({minimum:1})},{additionalProperties:!1,description:"Expected length once filled: pages for a document, slides for a deck."}),Lx=t.Object({description:t.String({minLength:1}),whenToUse:t.String({minLength:1}),pages:wx,metadata:t.Optional(t.Record(t.String(),t.String(),{description:"Document metadata the scaffold writes; a value may be a scaffold marker."})),children:t.Array(t.Unknown(),{minItems:1,description:"The top-level children of the scaffolded document, in order: sections holding block invocations and ordinary components, every slot carrying a {{…}} marker whose text is the guidance for filling it."})},{additionalProperties:!1});t.Object({id:vr,format:t.Union(Sx.map(e=>t.Literal(e))),title:t.String({minLength:1}),description:t.String({minLength:1}),whenToUse:t.String({minLength:1}),theme:t.String({minLength:1,description:"Recommended theme. Any theme renders the scaffold; this one is the archetype’s house look."}),profile:vr,definitions:t.String({minLength:1,description:"The playground template whose props.blocks the variants invoke. The scaffold copies the definitions it needs, and their dependencies, into the document."}),numbering:t.Union([t.Literal("none"),t.Literal("sections")],{description:"Whether section openers carry numbers the reader cites (01, 02, …)."}),toc:t.Boolean({description:"Whether the scaffold places a table of contents."}),variants:t.Record(vr,Lx,{minProperties:1,description:"Structural variants of the same archetype, so two documents from one brief do not look alike."})},{additionalProperties:!1,description:"A document archetype as data."});var Ta=["consulting","dark","default","devportal","minimal","vermilion"],vx=t.Union([t.Number({description:"Margin in inches (all sides)"}),t.Object({top:t.Number({description:"Top margin in inches"}),right:t.Number({description:"Right margin in inches"}),bottom:t.Number({description:"Bottom margin in inches"}),left:t.Number({description:"Left margin in inches"})},{additionalProperties:!1})],{description:"Slide margins in inches"}),Px=t.Union([t.Number({description:"Gutter in inches (both axes)"}),t.Object({column:t.Number({description:"Column gutter in inches"}),row:t.Number({description:"Row gutter in inches"})},{additionalProperties:!1})],{description:"Gaps between grid tracks in inches"}),Wl=t.Object({columns:t.Optional(t.Number({minimum:1,description:"Number of columns (default: 12)"})),rows:t.Optional(t.Number({minimum:1,description:"Number of rows (default: 6)"})),margin:t.Optional(vx),gutter:t.Optional(Px)},{additionalProperties:!1,description:"Grid layout configuration"}),qe=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),$x=t.Object({fontSize:t.Optional(t.Number()),fontFace:t.Optional(Ft),fontColor:t.Optional(Go),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900})),italic:t.Optional(t.Boolean()),align:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")])),lineSpacing:t.Optional(t.Number()),charSpacing:t.Optional(t.Number()),paraSpaceAfter:t.Optional(t.Number()),paraSpaceBefore:t.Optional(t.Number()),case:t.Optional(Ko)},{additionalProperties:!1,description:"Text style preset"}),ql=t.Object({...nr,displayName:t.Optional(t.String()),description:t.Optional(t.String({description:"The visual voice: what the theme looks like, in one sentence."})),whenToUse:t.Optional(t.String({description:"The decks the theme suits; discovery and the design guide quote it."})),version:t.Optional(t.String()),name:t.String({description:"Theme name"}),colors:t.Object({primary:qe,secondary:qe,accent:qe,background:qe,text:qe,text2:t.Optional(qe),background2:t.Optional(qe),accent4:t.Optional(qe),accent5:t.Optional(qe),accent6:t.Optional(qe)},{additionalProperties:!1,description:"Theme color palette (10-slot scheme)"}),fonts:t.Object({heading:Ft,body:Ft,mono:t.Optional(Ft),light:t.Optional(Ft)},{additionalProperties:!1,description:"Font families"}),fontRegistry:t.Optional(tr),defaults:t.Object({fontSize:t.Number({description:"Default font size in points"}),fontColor:qe},{additionalProperties:!1,description:"Default text styling"}),styles:t.Optional(t.Partial(t.Object(Object.fromEntries(gl.map(e=>[e,$x]))),{additionalProperties:!1,description:"Named text style presets"})),componentDefaults:t.Optional($l)},{additionalProperties:!1,description:"Presentation theme configuration"}),Rt=["pptxgenjs","office-open"],bi="pptxgenjs";function ar(e){return`PptxComponentDefinition_${e}`}function Ix(e,n,i){const r=Jr(n),o=vi(r);if(i==="pptxgenjs")return e==="slide"&&(o==null||delete o.transition),r;switch(e){case"image":for(const a of["svg","sizing","rotate","rounding","hyperlink"])o==null||delete o[a];break;case"shape":o==null||delete o.flipV;break;case"table":for(const a of["autoPage","autoPageRepeatHeader","margin","borderRadius"])o==null||delete o[a];Nx(r);break}return Hl(r),r}function Nx(e){var o,a;const n=(o=vi(e))==null?void 0:o.rows,i=(a=n==null?void 0:n.items)==null?void 0:a.items,r=i==null?void 0:i.anyOf;if(Array.isArray(r))for(const s of r){const c=vi(s);c!=null&&c.text&&(delete c.colspan,delete c.rowspan,delete c.margin,Hl(s))}}function vi(e){if(!(!e||typeof e!="object"))return e.properties}function Hl(e){const n=vi(e),i=e.required;if(!n||!i)return;const r=i.filter(o=>o in n);r.length>0?e.required=r:delete e.required}function Jr(e){if(Array.isArray(e))return e.map(Jr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=Jr(e[i]);return n}var di=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),kx=t.Object({x:t.Optional(di("Frame left edge in inches, relative to the enclosing frame or slide","Frame left edge as a percentage of the enclosing width")),y:t.Optional(di("Frame top edge in inches, relative to the enclosing frame or slide","Frame top edge as a percentage of the enclosing height")),w:t.Optional(di("Frame width in inches","Frame width as a percentage of the enclosing width")),h:t.Optional(di("Frame height in inches","Frame height as a percentage of the enclosing height")),grid:t.Optional(Gt),gridConfig:t.Optional(t.Object({...Wl.properties},{additionalProperties:!1,description:"Grid used for grid placements of this group’s descendants, merged over the enclosing grid field by field. Inside a frame the grid spans the frame."})),direction:t.Optional(t.Union([t.Literal("row"),t.Literal("column")],{description:"Distribute the children into cells along this axis: equal cells, or weighted by `weights`. Each child fills its cell unless it states its own offsets; an omitted optional child simply redistributes the rest."})),gap:t.Optional(t.Number({minimum:0,description:"Space between distributed cells, in inches. Default 0."})),weights:t.Optional(t.Array(t.Number({exclusiveMinimum:0}),{minItems:1,description:"Relative cell sizes in child order (e.g. [1.1, 1] for a 1.1 : 1 split). Missing entries count as 1."}))},{additionalProperties:!1,description:"Transparent group. Without a frame, a plain sequence of slide content; with `x`/`y`/`w`/`h` or `grid`, a frame its children position within (numbers are offsets in inches, percentages are fractions of the frame, omitted values fill it); with `direction`, a row or column that distributes its children into cells."}),Ax=t.Object({title:t.Optional(t.String({description:"Presentation title metadata"})),author:t.Optional(t.String({description:"Presentation author metadata"})),subject:t.Optional(t.String({description:"Presentation subject metadata"})),company:t.Optional(t.String({description:"Company name metadata"})),theme:t.Optional(t.Union([t.String({description:`Theme name to apply (default: "default"). Built-ins: ${Ta.join(", ")} (consulting is the house style).`,examples:[...Ta],default:"default"}),ql],{description:'Theme to apply: a built-in/custom theme name (default: "default"), or an inline theme config object so the document stays self-contained'})),fontRegistry:t.Optional(tr),slideWidth:t.Optional(t.Number({description:"Slide width in inches (default: 10)",default:10})),slideHeight:t.Optional(t.Number({description:"Slide height in inches (default: 7.5)",default:7.5})),rtlMode:t.Optional(t.Boolean({description:"Right-to-left text direction"})),language:t.Optional(t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:'Default presentation language (BCP-47 tag, e.g. "en-US"). Sets the spell-check language for all text; individual text components can override it.',examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]})),pageNumberFormat:t.Optional(t.Union([t.Literal("9"),t.Literal("09")],{description:'Format for {PAGE_NUMBER} placeholders: "9" = bare number (default), "09" = zero-padded',default:"9"})),componentDefaults:t.Optional($l),grid:t.Optional(Wl),blocks:t.Optional(El),qualityProfile:t.Optional(t.String({description:"The quality profile validation judges this deck by when the caller names none — a blueprint scaffold writes its archetype’s profile here. A profile names required structure and content; the theme only paints. Built-ins: consulting-deck, executive-presentation, technical-presentation; an unknown name falls back to the format default.",examples:["consulting-deck","executive-presentation","technical-presentation"]}))},{description:"Presentation container props",additionalProperties:!1});t.Object({x:t.Optional(t.Union([t.Number({description:"X position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'X position as percentage (e.g., "10%")'})])),y:t.Optional(t.Union([t.Number({description:"Y position in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Y position as percentage (e.g., "10%")'})])),w:t.Optional(t.Union([t.Number({description:"Width in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Width as percentage (e.g., "80%")'})])),h:t.Optional(t.Union([t.Number({description:"Height in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Height as percentage (e.g., "20%")'})]))},{description:"Position and size in inches or percentages",additionalProperties:!1});var Tx=t.Object({color:t.Optional(Go),gradient:t.Optional(xl),image:t.Optional(t.Object({path:t.Optional(t.String({description:"Image file path or URL"})),base64:t.Optional(t.String({description:"Base64-encoded image data"}))},{description:"Background image",additionalProperties:!1}))},{description:"Slide background configuration",additionalProperties:!1}),Fx=t.Object({type:t.Optional(t.Union([t.Literal("fade"),t.Literal("push"),t.Literal("wipe"),t.Literal("zoom"),t.Literal("none")],{description:"Transition effect type"})),speed:t.Optional(t.Union([t.Literal("slow"),t.Literal("medium"),t.Literal("fast")],{description:"Transition speed"}))},{description:"Slide transition configuration",additionalProperties:!1}),jx=t.Object({meta:t.Optional(t.Object({title:t.Optional(t.String({description:"Authoring label for this slide, shown in editors and outlines. Never rendered — slide content is unaffected."}))},{additionalProperties:!1,description:"Authoring metadata; has no effect on the presentation."})),background:t.Optional(Tx),transition:t.Optional(Fx),notes:t.Optional(t.String({description:"Speaker notes for this slide"})),hidden:t.Optional(t.Boolean({description:"Hide this slide from presentation"}))},{description:"Slide container props",additionalProperties:!1}),Fa=[...gt.map(({name:e})=>e),"block","group"],Mn=[{name:"pptx",propsSchema:Ax,hasChildren:!0,allowedChildren:["slide"],category:"container",propsRequired:!0,description:"Main presentation container - defines the overall presentation structure. Required as the root component. Always declare `slideWidth`/`slideHeight` (13.333 × 7.5 for 16:9) — omitted, the renderer silently falls back to 4:3 and 16:9 content leaves a dead strip.",special:{hasSchemaField:!0}},{name:"slide",propsSchema:jx,hasChildren:!0,allowedChildren:Fa,category:"container",description:"Slide container - groups content elements on a single slide. One idea per slide: past roughly 40 words of body text, split the content across more slides."},{name:"group",propsSchema:kx,hasChildren:!0,allowedChildren:Fa,category:"layout",description:"Transparent group of slide content; also the inspectable result of block expansion. Give it a frame (x/y/w/h or grid) to position children within it, and a direction to distribute them into equal or weighted cells."},{name:"block",propsSchema:Cl,hasChildren:!1,category:"layout",description:"Invoke a JSON block defined in this document’s props.blocks. Fill its named slots; no block names are built into the engine and no coordinates are accepted here."},...gt];function $n(e,n,i){var o;const r={name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true."}))};return(o=e.special)!=null&&o.hasSchemaField&&(r.$schema=t.Optional(t.String({format:"uri"})),r.renderer=i?i.requireDiscriminator?t.Literal(i.renderer,{description:"Renderer backend for this presentation"}):t.Optional(t.Literal(i.renderer,{description:'Renderer backend. Omitted defaults to "pptxgenjs".'})):t.Optional(t.Union(Rt.map(a=>t.Literal(a)),{description:'Renderer backend. Omitted defaults to "pptxgenjs".'}))),r.props=i?Ix(e.name,e.propsSchema,i.renderer):e.propsSchema,e.hasChildren&&n&&(r.children=t.Optional(t.Array(n))),Pl(e)||(r.props=t.Optional(r.props)),t.Object(r,{additionalProperties:!1,description:e.description})}function Rx(e){return Mn.map(n=>$n(n,e))}function Kl(e,n=[],i){const r=new Map;for(const c of Mn)c.hasChildren||r.set(c.name,$n(c,void 0,i));const o=Mn.filter(c=>c.hasChildren),a=new Map,s=[...o];for(;s.length>0;){const c=s.length;for(let l=s.length-1;l>=0;l--){const d=s[l];if(d.name==="group"){const h=t.Intersect([e,t.Object({name:t.Union([...d.allowedChildren.map(b=>t.Literal(b)),...n.map(b=>{var L;return((L=b.properties)==null?void 0:L.name)??t.String()})])})]);a.set(d.name,$n(d,h,i)),s.splice(l,1);continue}if(!d.allowedChildren){a.set(d.name,$n(d,e,i)),s.splice(l,1);continue}if(!d.allowedChildren.filter(h=>o.some(b=>b.name===h)).every(h=>a.has(h)))continue;const O=[...d.allowedChildren.map(h=>a.get(h)??r.get(h)).filter(h=>h!==void 0),...n],u=O.length===1?O[0]:t.Union(O);a.set(d.name,$n(d,u,i)),s.splice(l,1)}if(s.length===c)throw new Error(`Circular allowedChildren among: ${s.map(l=>l.name).join(", ")}`)}return[...a.values(),...r.values()]}function Ux(e,n,i,r){const o={name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true."})),version:r?t.Optional(t.Literal(n.version)):t.Literal(n.version),props:n.propsSchema};return n.hasChildren&&(o.children=t.Optional(t.Array(i))),t.Object(o,{additionalProperties:!1,description:n.description??e.name})}function Mx(e={}){const{customComponents:n=[]}=e,i=Rt.map(r=>Bx(n,r,r!==bi));return t.Union(i,{description:"Presentation definition, discriminated by the optional renderer field. Omitted renderer means pptxgenjs."})}function Bx(e,n,i){return t.Recursive(r=>{const o=[];for(const c of e)if(c.versions.length>0){const l=jl(c.versions.map(f=>f.version)),d=c.versions.map(f=>Ux(c,f,r,f.version===l));o.push(...d)}const s=[...Kl(r,o,{renderer:n,requireDiscriminator:i}),...o];return s.length===0?t.Object({}):t.Union(s)},{$id:ar(n)})}t.Union([...Rx(t.Any())],{discriminator:{propertyName:"name"},description:"Standard PPTX component definition with discriminated union"});t.Recursive(e=>t.Union([...Kl(e)],{discriminator:{propertyName:"name"},description:"PPTX component definition with discriminated union"}));function Ex(e){const n=e.definitions??{},i=new Map;for(const o of Rt){const a=ar(o);n[a]&&i.set(o,Dl(n,a,["pptx","slide"],"pptx"))}const r=o=>{var s,c,l,d,f,p;if(!o||typeof o!="object")return;if(Array.isArray(o)){o.forEach(r);return}const a=o;if(((c=(s=a.properties)==null?void 0:s.name)==null?void 0:c.const)==="pptx"){const O=i.get((l=a.properties.renderer)==null?void 0:l.const),u=(p=(f=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:f.blocks)==null?void 0:p.patternProperties;if(O&&u)for(const h of Object.values(u))h.properties.body.items=O}Object.values(a).forEach(r)};r(e)}function Cx(e){const n=e.anyOf;if(!Array.isArray(n))return;const i=new Map;for(const a of Rt){const s=`#/definitions/${ar(a)}`,c=n.find(l=>l&&l.$ref===s);c&&i.set(a,c)}if(i.size!==n.length||!i.has(bi))return;const r=a=>({properties:{renderer:{const:a}},required:["renderer"]}),o=Rt.filter(a=>a!==bi&&i.has(a));delete e.anyOf,e.type="object",e.properties={renderer:{description:'Renderer backend. Omitted defaults to "pptxgenjs".',anyOf:Rt.filter(a=>i.has(a)).map(a=>({const:a,type:"string"}))}},e.allOf=[...o.map(a=>({if:r(a),then:i.get(a)})),{if:{not:{anyOf:o.map(r)}},then:i.get(bi)}]}function Dx(e){var r,o;const n=e.definitions??{},i=[];for(const a of Rt){const s=ar(a),c=n[s];if(!c)continue;const l=`PptxSlotContent_${a}`;if(!n[l]){const f=qr(c).find(O=>{var u,h;return((h=(u=O.properties)==null?void 0:u.name)==null?void 0:h.const)==="slide"}),p=(o=(r=f==null?void 0:f.properties)==null?void 0:r.children)==null?void 0:o.items;p&&(n[l]=JSON.parse(JSON.stringify(p)))}if(!n[l]){i.push({name:s});continue}const d={$ref:`#/definitions/${l}`};i.push({name:s,componentRef:d},{name:l,componentRef:d})}return i}function zx(e,n={}){return tx(e,{...n,enrich:i=>{Ex(i),Cx(i)}})}Object.fromEntries(Mn.map(e=>[e.name,e.propsSchema]));new Set(Mn.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));var Gl=new Set(["name","id","enabled","props","children"]);[...Gl];var _x=new Set([...Gl,"$schema"]);_x.add("renderer");var q=t.String({pattern:"^(#[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:'Hex color with # prefix (e.g. "#000000") or theme color name'}),Vl=t.String({pattern:"^(transparent|#[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:'Hex color with # prefix, theme color name, or "transparent"'}),Jl=t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:'BCP-47 language tag for spell/grammar checking (e.g. "en-US", "fr-FR", "de-DE")',examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]}),Xl=t.Boolean({description:"Disable spell/grammar checking for this text (e.g. code snippets or identifiers)"}),Yo=t.Array(t.String({minLength:1}),{description:"Words that should never be flagged as misspelled (whole-word, case-insensitive). E.g. brand names or technical terms.",examples:[["Wiseair","json-to-office","pptx"]]}),Zo=t.Object({case:t.Optional(Ko),size:t.Optional(t.Number({minimum:8,maximum:1638})),color:t.Optional(q),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-run weight (100–900). Any integer accepted; renderer picks the closest embedded variant via CSS font-matching. `bold: true` is shorthand for `fontWeight: 700`; if both are set, `fontWeight` wins."})),italic:t.Optional(t.Boolean()),underline:t.Optional(t.Boolean()),lineSpacing:t.Optional(t.Object({type:t.Union([t.Literal("single"),t.Literal("atLeast"),t.Literal("exactly"),t.Literal("double"),t.Literal("multiple")],{description:"`single`/`double` ignore `value`; `multiple` scales single spacing by it; `atLeast` is a floor the line grows past; `exactly` pins an absolute box the glyphs are clipped to."}),value:t.Optional(t.Number({minimum:0,description:"Points for `exactly` and `atLeast`, a factor of single spacing for `multiple`. Unlike `size` this has no floor — an empty spacer paragraph legitimately pins a fraction of a point — so an `exactly` box too small for the text it holds is reported as W_QUALITY_LINE_BOX_COLLAPSE instead."}))},{additionalProperties:!1})),spacing:t.Optional(t.Object({before:t.Optional(t.Number({minimum:0})),after:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1})),characterSpacing:t.Optional(t.Object({type:t.Union([t.Literal("condensed"),t.Literal("expanded")]),value:t.Number()},{additionalProperties:!1})),scale:t.Optional(t.Number({minimum:1,maximum:600,description:"Character width scaling in percent (w:w). 100 is normal; values below compress glyphs, above expand them (e.g. 55, 115)."}))},{additionalProperties:!1}),jt=t.Object({family:Ft,...Zo.properties},{description:"Font definition with family and optional formatting properties",additionalProperties:!1}),sr=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Text alignment options"}),Yl=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Text alignment options including justify"}),Wx=t.Union([t.Literal(1),t.Literal(2),t.Literal(3),t.Literal(4),t.Literal(5),t.Literal(6)],{description:"Heading level (1-6)"}),$t=t.Object({before:t.Optional(t.Number({minimum:0,description:"Spacing before element in points"})),after:t.Optional(t.Number({minimum:0,description:"Spacing after element in points"}))},{description:"Spacing configuration",additionalProperties:!1}),qx=t.Object({before:t.Optional(t.Number({minimum:0,description:"Spacing before list in points"})),after:t.Optional(t.Number({minimum:0,description:"Spacing after list in points"})),item:t.Optional(t.Number({minimum:0,description:"Spacing between list items in points"}))},{description:"List spacing configuration with item spacing",additionalProperties:!1});t.Object({top:t.Optional(t.Number({minimum:0})),bottom:t.Optional(t.Number({minimum:0})),left:t.Optional(t.Number({minimum:0})),right:t.Optional(t.Number({minimum:0}))},{description:"Margin configuration",additionalProperties:!1});t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{description:"Border configuration",additionalProperties:!1});var Zl=t.Object({type:t.Union([t.Literal("single"),t.Literal("atLeast"),t.Literal("exactly"),t.Literal("double"),t.Literal("multiple")],{description:"`single`/`double` ignore `value`; `multiple` scales single spacing by it; `atLeast` is a floor the line grows past; `exactly` pins an absolute box the glyphs are clipped to."}),value:t.Optional(t.Number({minimum:0,description:"Points for `exactly` and `atLeast`, a factor of single spacing for `multiple`. `exactly` has no floor of its own — an empty spacer paragraph legitimately pins a fraction of a point — so a box smaller than the text it holds is accepted here and clips it."}))},{description:"Line spacing configuration",additionalProperties:!1}),lr=t.Object({left:t.Optional(t.Number({minimum:0,description:"Left indentation in points. Omit to inherit the per-level default of 36pt (half an inch) per level."})),hanging:t.Optional(t.Number({minimum:0,description:"Hanging indent in points — how far the marker sits left of the text. Omit for the 18pt default."}))},{description:"Indentation configuration, in points",additionalProperties:!1}),Ql=t.Object({left:t.Optional(t.Number({description:"Left indentation in twips (1/20 of a point)"})),right:t.Optional(t.Number({description:"Right indentation in twips (1/20 of a point)"})),hanging:t.Optional(t.Number({minimum:0,description:"Hanging indent in twips: first line stays at the left indent, following lines are indented. Mutually exclusive with firstLine."})),firstLine:t.Optional(t.Number({minimum:0,description:"First-line indent in twips: only the first line is indented. Mutually exclusive with hanging."}))},{description:"Paragraph indentation (w:ind) in twips. Use either hanging or firstLine, not both.",additionalProperties:!1}),Hx=t.Union([t.Literal("left"),t.Literal("right"),t.Literal("center"),t.Literal("decimal"),t.Literal("bar")],{description:"Tab stop alignment type"}),Kx=t.Union([t.Literal("dot"),t.Literal("hyphen"),t.Literal("underscore"),t.Literal("middleDot"),t.Literal("none")],{description:"Leader character filling the space before the tab stop"}),Gx=t.Object({type:Hx,position:t.Number({minimum:0,description:"Tab stop position in twips (1/20 of a point)"}),leader:t.Optional(Kx)},{description:"Tab stop definition (w:tab in w:tabs)",additionalProperties:!1}),Vx=t.Array(Gx,{description:"Tab stops for the paragraph. Tab characters (\\t) in the text jump to these positions."}),Jx=t.Union([t.Literal("character"),t.Literal("column"),t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Horizontal position relative to"}),Xx=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("paragraph"),t.Literal("line"),t.Literal("text")],{description:"Vertical position relative to"}),Yx=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Horizontal alignment"}),Zx=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Vertical alignment"}),Qx=t.Union([t.Literal("none"),t.Literal("square"),t.Literal("topAndBottom"),t.Literal("around"),t.Literal("tight"),t.Literal("through")],{description:"Text wrapping type"}),eS=t.Union([t.Literal("bothSides"),t.Literal("left"),t.Literal("right"),t.Literal("largest")],{description:"Text wrapping side"}),cr=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(Jx),align:t.Optional(Yx),offset:t.Optional(t.Union([t.Number({description:"Horizontal offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'})]))},{description:"Horizontal positioning (use either align or offset, not both)",additionalProperties:!1})),verticalPosition:t.Optional(t.Object({relative:t.Optional(Xx),align:t.Optional(Zx),offset:t.Optional(t.Union([t.Number({description:"Vertical offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Vertical offset as percentage (e.g., "50%") relative to page or margin height'})]))},{description:"Vertical positioning (use either align or offset, not both)",additionalProperties:!1})),wrap:t.Optional(t.Object({type:Qx,side:t.Optional(eS),margins:t.Optional(t.Object({top:t.Optional(t.Union([t.Number({description:"Top margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Top margin as percentage of page height"})])),bottom:t.Optional(t.Union([t.Number({description:"Bottom margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Bottom margin as percentage of page height"})])),left:t.Optional(t.Union([t.Number({description:"Left margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Left margin as percentage of page width"})])),right:t.Optional(t.Union([t.Number({description:"Right margin in twips"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:"Right margin as percentage of page width"})]))},{description:"Distance from text margins",additionalProperties:!1}))},{description:"Text wrapping configuration",additionalProperties:!1})),allowOverlap:t.Optional(t.Boolean({description:"Allow element to overlap with other elements"})),behindDocument:t.Optional(t.Boolean({description:"Place element behind document text"})),lockAnchor:t.Optional(t.Boolean({description:"Lock the anchor position"})),layoutInCell:t.Optional(t.Boolean({description:"Layout element within table cell"})),zIndex:t.Optional(t.Number({minimum:0,description:"Z-order for overlapping elements (must be non-negative)"})),rotation:t.Optional(t.Number({description:"Rotation angle in degrees"})),visibility:t.Optional(t.Union([t.Literal("hidden"),t.Literal("inherit")],{description:"Visibility of the floating element"}))},{description:"Floating element properties",additionalProperties:!1});t.Object({start:t.Optional(t.Number({minimum:1})),style:t.Optional(t.Union([t.Literal("decimal"),t.Literal("lowerLetter"),t.Literal("upperLetter"),t.Literal("lowerRoman"),t.Literal("upperRoman")])),separator:t.Optional(t.String())},{description:"Numbering configuration for lists",additionalProperties:!1});var tS={};t.Object(tS,{description:"Base component props",additionalProperties:!0});var It=t.String({pattern:"^(#?[0-9A-Fa-f]{6}|[a-zA-Z][a-zA-Z0-9]*)$",description:'Hex colour ("#0F172A" or "0F172A") or a docx theme colour name (e.g. "primary")'}),nS="^-?\\d+(\\.\\d+)?%$",iS="^\\d+(\\.\\d+)?%$",ja=t.Union([t.Number({description:"Inches from the canvas origin"}),t.String({pattern:nS,description:'Percentage of the canvas extent on this axis, e.g. "25%"'})],{description:"Position in inches (number) or as a canvas percentage"}),Ra=t.Union([t.Number({minimum:0,description:"Size in inches"}),t.String({pattern:iS,description:'Percentage of the canvas extent on this axis, e.g. "50%"'})],{description:"Size in inches (number) or as a canvas percentage"}),Qo={x:t.Optional(ja),y:t.Optional(ja),w:t.Optional(Ra),h:t.Optional(Ra),rotate:t.Optional(t.Number({description:"Clockwise rotation in degrees"}))},ec=t.Union([t.Boolean({description:"Single underline in the text colour"}),t.Object({style:t.Optional(t.Union([t.Literal("sng"),t.Literal("dbl"),t.Literal("dash"),t.Literal("dotted")],{description:'Underline style (default "sng")'})),color:t.Optional(It)},{additionalProperties:!1})],{description:"Underline: true for a single line, or a style/colour object"}),dr={fontFace:t.Optional(t.String({description:"Font family name"})),fontSize:t.Optional(t.Number({minimum:1,description:"Font size in points"})),bold:t.Optional(t.Boolean()),italic:t.Optional(t.Boolean())},rS=t.Object({text:t.String({description:"Run text"}),color:t.Optional(It),...dr,underline:t.Optional(ec),strike:t.Optional(t.Boolean({description:"Strikethrough"})),breakLine:t.Optional(t.Boolean({description:"Start a new line after this run"}))},{additionalProperties:!1,description:"A formatted run inside a native visual text element"}),oS=t.Object({text:t.String({description:"Segment text"}),color:t.Optional(It),...dr,breakLine:t.Optional(t.Boolean({description:"Start a new line after this segment"}))},{additionalProperties:!1,description:"A formatted segment of a native visual shape’s text"}),tc=t.Object({color:t.Optional(It),transparency:t.Optional(t.Number({minimum:0,maximum:100,description:"Fill transparency, 0 (opaque) to 100 (invisible)"}))},{additionalProperties:!1,description:"Solid fill. Omit the whole property for no fill; gradients and patterns are raster-only."}),aS=t.Object({color:t.Optional(It),width:t.Optional(t.Number({minimum:0,description:"Outline width in points"})),dashType:t.Optional(t.Union([t.Literal("solid"),t.Literal("dash"),t.Literal("dot"),t.Literal("dashDot")],{description:'Outline dash pattern (default "solid")'}))},{additionalProperties:!1,description:"Shape outline"}),nc=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),ic=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical text anchoring inside the box"}),rc=t.Union([t.Number({minimum:0,description:"Inset on every side, in points"}),t.Array(t.Number({minimum:0}),{minItems:4,maxItems:4,description:"Insets as [top, right, bottom, left], in points"})],{description:"Text insets in points"}),sS=t.Object({text:t.Optional(t.String({description:"Plain text content"})),runs:t.Optional(t.Array(rS,{minItems:1,description:'Formatted runs, as an alternative to "text"'})),...Qo,color:t.Optional(It),...dr,underline:t.Optional(ec),strike:t.Optional(t.Boolean({description:"Strikethrough"})),align:t.Optional(nc),valign:t.Optional(ic),margin:t.Optional(rc),fill:t.Optional(tc)},{additionalProperties:!1,description:"Native visual text element — becomes a Word text box (wps:wsp) inside the drawing group"}),lS=t.Object({type:yl,...Qo,fill:t.Optional(tc),line:t.Optional(aS),text:t.Optional(t.Union([t.String(),t.Array(oS,{minItems:1})],{description:"Text drawn inside the shape"})),...dr,fontColor:t.Optional(It),align:t.Optional(nc),valign:t.Optional(ic),margin:t.Optional(rc),flipH:t.Optional(t.Boolean({description:"Mirror horizontally"})),flipV:t.Optional(t.Boolean({description:"Mirror vertically"}))},{additionalProperties:!1,description:"Native visual shape element — becomes a preset-geometry shape (wps:wsp) inside the drawing group"}),cS=t.Object({path:t.Optional(t.String({description:"File path or http(s) URL"})),base64:t.Optional(t.String({description:"Base64 data URI"})),svg:t.Optional(t.String({description:"Raw SVG markup"})),...Qo,sizing:t.Optional(t.Object({type:t.Union([t.Literal("contain"),t.Literal("cover"),t.Literal("crop")],{description:"How the image fills its box"}),w:t.Optional(t.Number({minimum:0,description:'Box width in inches; overrides the element’s own "w"'})),h:t.Optional(t.Number({minimum:0,description:'Box height in inches; overrides the element’s own "h"'}))},{additionalProperties:!1,description:'How the image fills its box. "w"/"h" state the box itself, taking precedence over the element’s "w"/"h", as they do in raster mode.'})),alt:t.Optional(t.String({description:"Alternative text for accessibility"}))},{additionalProperties:!1,description:"Native visual image element — becomes a native picture inside the drawing group"});function Pr(e,n,i){return t.Object({name:t.Literal(e),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this element is filtered out and not drawn. Defaults to true."})),props:n},{additionalProperties:!1,description:i})}var dS=t.Union([Pr("text",sS,"Text element - a native Word text box drawn on the visual canvas."),Pr("shape",lS,"Shape element - a native preset-geometry shape, optionally holding text."),Pr("image",cS,"Image element - a native picture; an SVG stays vector.")],{$id:"DocxNativeVisualContent",discriminator:{propertyName:"name"},description:"A single native visual element (text, shape, or image)."}),pS=t.Object({width:t.Number({minimum:.1,description:"Canvas width in inches"}),height:t.Number({minimum:.1,description:"Canvas height in inches"}),background:t.Optional(t.Object({color:t.Optional(It),image:t.Optional(t.Object({path:t.Optional(t.String()),base64:t.Optional(t.String())},{additionalProperties:!1}))},{additionalProperties:!1,description:"Canvas background. A colour becomes the bottom-most rectangle; an image becomes the bottom-most picture."}))},{additionalProperties:!1,description:"Drawing canvas for a native visual"}),uS=t.Object({color:t.Optional(t.String({description:'Background color (hex like "#FFFFFF" or a theme color name)'})),image:t.Optional(t.Object({path:t.Optional(t.String()),base64:t.Optional(t.String())},{additionalProperties:!1}))},{additionalProperties:!1}),mS=t.Object({width:t.Number({minimum:.1,description:"Canvas width in inches (pptx slideWidth)"}),height:t.Number({minimum:.1,description:"Canvas height in inches (pptx slideHeight)"}),theme:t.Optional(t.String({description:"pptx theme name applied to the slide"})),background:t.Optional(uS)},{description:"pptx canvas definition for the visual",additionalProperties:!1}),oc={width:t.Optional(t.Union([t.Number({minimum:1,description:"Rendered width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Rendered width as percentage (e.g. "90%")'})],{description:"Rendered width in the document, in pixels (number) or percentage string. Defaults to the canvas physical size."})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Rendered height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Rendered height as percentage (e.g. "90%")'})])),alignment:t.Optional(sr),caption:t.Optional(t.String({description:"Caption (supports rich text with **bold**, *italic*, ***both***)"})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),spacing:t.Optional($t),floating:t.Optional(cr),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"}))},fS=t.Object({renderMode:t.Optional(t.Literal("raster",{description:"Render as a rasterized pptx slide (the default when omitted)."})),canvas:mS,elements:t.Optional(t.Array(Bb,{description:"pptx slide content elements (text, image, shape, table, highcharts, chart), positioned with x/y/w/h in inches"})),dpi:t.Optional(t.Number({minimum:Na,maximum:ka,default:Ia,description:`Raster resolution in DPI (default ${Ia}, range ${Na}-${ka}). Higher = sharper + larger.`})),serverUrl:t.Optional(t.String({description:"Rasterization service URL override (default from services.pptx)"})),...oc},{$id:"DocxVisualRasterProps",description:"Visual component props (pptx-rendered graphic)",additionalProperties:!1}),gS=t.Object({renderMode:t.Literal("native",{description:'Draw natively as a Word DrawingML group. Requires the "office-open" renderer.'}),canvas:pS,elements:t.Optional(t.Array(dS,{description:"Native drawing elements (text, shape, image), positioned with x/y/w/h in inches or canvas percentages"})),...oc},{$id:"DocxVisualNativeProps",description:'Visual component props (native Word drawing group; requires renderer "office-open")',additionalProperties:!1}),hS=t.Union([fS,gS],{description:"Visual component props — rasterized pptx slide (default) or a native Word drawing group"}),pr=["docxjs","office-open"],bS="docxjs";function Bn(e){return`ComponentDefinition_${e}`}function ac(e,n,i){const r=Zr(n);return Yr(r,Bn(i)),e==="visual"&&i!=="office-open"?OS(r)??r:(i==="office-open"&&Xr(r),r)}function OS(e){const n=e.anyOf;return Array.isArray(n)&&n.length>0?n[0]:void 0}function Xr(e){if(Array.isArray(e)){e.forEach(Xr);return}if(!e||typeof e!="object")return;const n=e,i=n.properties;if(i!=null&&i.text&&(i!=null&&i.author)&&(i.replies||i.resolved)&&typeof n.description=="string"&&n.description.includes("Word review comment")){delete i.replies,delete i.resolved;const r=n.required;r&&(n.required=r.filter(o=>o!=="replies"&&o!=="resolved"))}for(const r of Reflect.ownKeys(n))Xr(n[r])}function Yr(e,n){if(Array.isArray(e)){e.forEach(r=>Yr(r,n));return}if(!e||typeof e!="object")return;const i=e;i.type==="array"&&i.items&&typeof i.items=="object"&&Object.keys(i.items).length===0&&i.items[v]==="Any"&&(i.items={$ref:n});for(const r of Reflect.ownKeys(i))Yr(i[r],n)}function Zr(e){if(Array.isArray(e))return e.map(Zr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=Zr(e[i]);return n}function yS(e){const n=e.definitions??{},i=new Map;for(const o of pr){const a=Bn(o);n[a]&&i.set(o,Dl(n,a,["docx","section"]))}const r=o=>{var s,c,l,d,f,p;if(!o||typeof o!="object")return;if(Array.isArray(o)){o.forEach(r);return}const a=o;if(((c=(s=a.properties)==null?void 0:s.name)==null?void 0:c.const)==="docx"){const O=i.get((l=a.properties.renderer)==null?void 0:l.const),u=(p=(f=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:f.blocks)==null?void 0:p.patternProperties;if(O&&u)for(const h of Object.values(u)){h.properties.body.items=O;for(const b of["header","footer"])h.properties.section.properties[b].items=O}}Object.values(a).forEach(r)};r(e)}function xS(e){const n=e.definitions??{};return pr.filter(i=>n[Bn(i)]).map(i=>{const r=Bn(i);return{name:r,componentRef:{$ref:`#/definitions/${r}`}}})}var SS=t.Object({type:t.Union([t.Literal("equal"),t.Literal("insert"),t.Literal("delete")],{description:"Segment kind: 'equal' renders as normal text, 'insert' as a tracked insertion, 'delete' as a tracked deletion"}),text:t.String({description:"Literal text of this segment (rendered without markdown)"})},{description:"A contiguous run of text sharing one revision state",additionalProperties:!1}),ur=t.Object({author:t.Optional(t.String({description:'Revision author shown in Word (default: "json-to-office")'})),date:t.Optional(t.String({format:"date-time",description:"Revision timestamp (ISO 8601). Defaults to the Unix epoch for deterministic output"})),segments:t.Array(SS,{minItems:1,description:"Ordered text segments; concatenating equal+insert segments yields the new text, equal+delete the old text"})},{description:"Tracked-change data: renders the component text as native Word revisions (accept/reject in Word)",additionalProperties:!1}),wS=t.Object({type:t.Union([t.Literal("insert"),t.Literal("delete")],{description:"Whether the element was inserted or deleted"}),author:t.Optional(t.String({description:'Revision author shown in Word (default: "json-to-office")'})),date:t.Optional(t.String({format:"date-time",description:"Revision timestamp (ISO 8601). Defaults to the Unix epoch for deterministic output"}))},{description:"Structural tracked change: the element itself was inserted or deleted",additionalProperties:!1}),sc={text:t.String({minLength:1,description:"Comment body. Newlines split it into separate paragraphs in the comment pane."}),author:t.Optional(t.String({description:'Comment author shown in Word (default: "json-to-office")'})),initials:t.Optional(t.String({description:"Author initials shown on the comment bubble (derived from the author when omitted)"})),date:t.Optional(t.String({format:"date-time",description:"Comment timestamp (ISO 8601). Defaults to the Unix epoch for deterministic output"}))},LS=t.Object(sc,{description:"A reply within a comment thread",additionalProperties:!1}),mr=t.Object({...sc,replies:t.Optional(t.Array(LS,{minItems:1,description:"Replies, in order. They anchor to the same text and Word shows them as one thread."})),resolved:t.Optional(t.Boolean({description:"Mark the whole thread resolved (w15:done). Word writes the thread state only when the document contains at least one reply."}))},{description:"A Word review comment anchored to this component's text",additionalProperties:!1}),lc=t.Object({text:t.String({description:"Heading text (required)"}),level:t.Optional(Wx),font:t.Optional(t.Partial(jt)),language:t.Optional(Jl),noProof:t.Optional(Xl),noProofWords:t.Optional(Yo),alignment:t.Optional(Yl),spacing:t.Optional($t),indent:t.Optional(Ql),lineSpacing:t.Optional(t.Union([t.Number({minimum:0}),Zl],{description:"A bare number is a multiple of single spacing. Takes precedence over `font.lineSpacing`. An `exactly` box smaller than the heading it holds is reported as W_QUALITY_LINE_BOX_COLLAPSE."})),pageBreak:t.Optional(t.Boolean({description:"Insert page break before heading"})),columnBreak:t.Optional(t.Boolean({description:"Insert column break before heading"})),numbering:t.Optional(t.Boolean({description:"Number this heading with the document's multilevel heading numbering (1., 1.1., 1.1.1.). Set globally via componentDefaults.heading.numbering; false opts a single heading out."})),keepNext:t.Optional(t.Boolean({description:"Keep heading with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of heading together on same page"})),revision:t.Optional(ur),comment:t.Optional(mr)},{description:"Heading component props",additionalProperties:!1}),cc=t.Object({id:t.String({minLength:1,pattern:"^[^\\]\\s]+$",description:'Marker id referenced from the text as `[^id]`. Any characters except whitespace and "]".'}),text:t.String({minLength:1,description:"Note body. Newlines split it into separate paragraphs where the note is placed."})},{description:"A note body bound to an inline `[^id]` marker",additionalProperties:!1}),vS=t.Array(cc,{description:"Footnote bodies for `[^id]` markers in this paragraph, placed at the foot of the page. An unreferenced body is not emitted.",minItems:1}),PS=t.Array(cc,{description:"Endnote bodies for `[^id]` markers in this paragraph, collected at the end of the document. An unreferenced body is not emitted.",minItems:1}),$S=t.Union([t.Literal("around"),t.Literal("none"),t.Literal("notBeside"),t.Literal("through"),t.Literal("tight"),t.Literal("auto")],{description:"Frame text wrapping type"}),Ua=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Frame anchor type"}),IS=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Frame horizontal alignment"}),NS=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Frame vertical alignment"}),kS=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(Ua),align:t.Optional(IS),offset:t.Optional(t.Union([t.Number({description:"Horizontal offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Horizontal offset as percentage (e.g., "50%") relative to page or margin width'})]))},{description:"Horizontal positioning (use either align or offset, not both)",additionalProperties:!1})),verticalPosition:t.Optional(t.Object({relative:t.Optional(Ua),align:t.Optional(NS),offset:t.Optional(t.Union([t.Number({description:"Vertical offset in twips (1/20 of a point)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Vertical offset as percentage (e.g., "50%") relative to page or margin height'})]))},{description:"Vertical positioning (use either align or offset, not both)",additionalProperties:!1})),wrap:t.Optional(t.Object({type:$S},{description:"Text wrapping configuration",additionalProperties:!1})),lockAnchor:t.Optional(t.Boolean({description:"Lock the anchor position"})),width:t.Optional(t.Number({minimum:1,description:"Frame width in twips (DXA units)"})),height:t.Optional(t.Number({minimum:1,description:"Frame height in twips (DXA units)"}))},{description:"Floating text frame properties",additionalProperties:!1}),AS=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Paragraph text alignment"}),dc=t.Object({text:t.String({description:"Text content (required)"}),font:t.Optional(t.Partial(jt)),themeStyle:t.Optional(t.String()),language:t.Optional(Jl),noProof:t.Optional(Xl),noProofWords:t.Optional(Yo),boldColor:t.Optional(q),spacing:t.Optional($t),alignment:t.Optional(AS),indent:t.Optional(Ql),tabStops:t.Optional(Vx),pageBreak:t.Optional(t.Boolean({description:"Insert page break before paragraph"})),columnBreak:t.Optional(t.Boolean({description:"Insert column break before paragraph"})),floating:t.Optional(kS),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"})),id:t.Optional(t.String({description:"Unique identifier for internal linking (bookmark anchor)"})),revision:t.Optional(ur),comment:t.Optional(mr),footnotes:t.Optional(vS),endnotes:t.Optional(PS)},{description:"Paragraph component props (font nested for theme consistency; no flat font properties)",additionalProperties:!1}),pc=t.Object({path:t.Optional(t.String({description:"Image source URL or file path (mutually exclusive with base64 and svg)"})),base64:t.Optional(t.String({description:'Base64-encoded image data in data URI format (e.g., "data:image/png;base64,iVBORw0KGgo...") (mutually exclusive with path and svg)'})),svg:t.Optional(t.String({description:'Raw inline SVG markup, e.g. "<svg xmlns=\\"http://www.w3.org/2000/svg\\" viewBox=\\"0 0 24 24\\">...</svg>" (mutually exclusive with path and base64). Renders as a vector image (Word 2016+); intrinsic size taken from the SVG viewBox/width/height when width/height omitted.'})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),width:t.Optional(t.Union([t.Number({minimum:1,description:"Image width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image width as percentage (e.g., "90%") relative to widthRelativeTo (defaults to content width)'})],{description:'Image width in pixels (number) or as percentage string (e.g., "90%")',default:"100%"})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Image height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image height as percentage (e.g., "90%") relative to heightRelativeTo (defaults to content height)'})],{description:'Image height in pixels (number) or as percentage string (e.g., "90%")'})),widthRelativeTo:t.Optional(t.Union([t.Literal("content"),t.Literal("page")],{description:"Reference for width percentages: content (page width minus margins) or page (full page width)",default:"content"})),heightRelativeTo:t.Optional(t.Union([t.Literal("content"),t.Literal("page")],{description:"Reference for height percentages: content (page height minus margins) or page (full page height)",default:"content"})),alignment:t.Optional(sr),caption:t.Optional(t.String({description:"Image caption (supports rich text with **bold**, *italic*, ***both***)"})),spacing:t.Optional($t),floating:t.Optional(cr),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"}))},{description:"Image component props",additionalProperties:!1}),uc=t.Object({number:t.String({description:"Statistic number/value (required)"}),description:t.String({description:"Statistic description (required)"}),unit:t.Optional(t.String({description:"Unit of measurement"})),format:t.Optional(t.String({description:"Number format pattern"})),trend:t.Optional(t.Union([t.Literal("up"),t.Literal("down"),t.Literal("neutral")])),trendValue:t.Optional(t.Union([t.String(),t.Number()])),alignment:t.Optional(sr),spacing:t.Optional($t),size:t.Optional(t.Union([t.Literal("small"),t.Literal("medium"),t.Literal("large")]))},{description:"Statistic component props",additionalProperties:!1}),TS=t.Recursive(e=>t.Union([t.String(),t.Object({name:t.String(),props:t.Object({},{additionalProperties:!0}),children:t.Optional(t.Array(e))},{additionalProperties:!1})])),mc=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),fc=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical cell alignment"}),gc=t.Object({family:t.Optional(t.String({description:"Font family name"})),size:t.Optional(t.Number({minimum:0,description:"Font size in points"})),bold:t.Optional(t.Boolean({description:"Bold text"})),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900,description:"Per-cell weight (100–900). Overrides `bold` when set."})),italic:t.Optional(t.Boolean({description:"Italic text"})),underline:t.Optional(t.Boolean({description:"Underlined text"})),lineSpacing:t.Optional(t.Object({...Zl.properties},{description:"Line spacing of the cell's paragraph. Overrides the theme's tableCell style; `exactly` gives dense, fixed-height rows.",additionalProperties:!1}))},{additionalProperties:!1}),Qr=t.Union([t.String({description:"Border color for all sides (hex without #)"}),t.Object({bottom:t.Optional(t.String({description:"Bottom border color (hex without #)"})),top:t.Optional(t.String({description:"Top border color (hex without #)"})),right:t.Optional(t.String({description:"Right border color (hex without #)"})),left:t.Optional(t.String({description:"Left border color (hex without #)"}))},{additionalProperties:!1})]),eo=t.Union([t.Number({minimum:0,description:"Border size for all sides in points"}),t.Object({bottom:t.Optional(t.Number({minimum:0,description:"Bottom border size in points"})),top:t.Optional(t.Number({minimum:0,description:"Top border size in points"})),right:t.Optional(t.Number({minimum:0,description:"Right border size in points"})),left:t.Optional(t.Number({minimum:0,description:"Left border size in points"}))},{additionalProperties:!1})]),FS=t.Union([t.Boolean({description:"Hide all borders when true. A side named in a cell/column per-side borderColor or borderSize keeps its border"}),t.Object({bottom:t.Optional(t.Boolean({description:"Hide bottom border"})),top:t.Optional(t.Boolean({description:"Hide top border"})),right:t.Optional(t.Boolean({description:"Hide right border"})),left:t.Optional(t.Boolean({description:"Hide left border"})),insideHorizontal:t.Optional(t.Boolean({description:"Hide horizontal borders between rows"})),insideVertical:t.Optional(t.Boolean({description:"Hide vertical borders between columns"}))},{description:"Selectively hide specific borders",additionalProperties:!1})]),hc=t.Union([t.Number({minimum:0,description:"Padding for all sides in points"}),t.Object({bottom:t.Optional(t.Number({minimum:0,description:"Bottom padding in points"})),top:t.Optional(t.Number({minimum:0,description:"Top padding in points"})),right:t.Optional(t.Number({minimum:0,description:"Right padding in points"})),left:t.Optional(t.Number({minimum:0,description:"Left padding in points"}))},{additionalProperties:!1})]),$r=t.Object({color:t.Optional(q),backgroundColor:t.Optional(Vl),horizontalAlignment:t.Optional(mc),verticalAlignment:t.Optional(fc),font:t.Optional(gc),borderColor:t.Optional(Qr),borderSize:t.Optional(eo),padding:t.Optional(hc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"}))},{additionalProperties:!1});function bc(e){const n=t.Union([t.String(),e]),i={color:t.Optional(q),backgroundColor:t.Optional(Vl),horizontalAlignment:t.Optional(mc),verticalAlignment:t.Optional(fc),font:t.Optional(gc),borderColor:t.Optional(Qr),borderSize:t.Optional(eo),padding:t.Optional(hc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"})),comment:t.Optional(mr),revision:t.Optional(ur)},r=t.Object({...i,content:t.Optional(n)},{additionalProperties:!1}),o=t.Object({...i,content:t.Optional(n)},{additionalProperties:!1}),a=t.Object({width:t.Optional(t.Union([t.Number({minimum:0,description:"Column width in points. When set on some columns, remaining columns will automatically share the leftover table space equally. Leave undefined to distribute space evenly among unspecified columns."}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Column width as percentage of available width (e.g., "40%")'})])),cellDefaults:t.Optional($r),header:t.Optional(r),cells:t.Optional(t.Array(o))},{additionalProperties:!1});return t.Object({borderColor:t.Optional(Qr),borderSize:t.Optional(eo),hideBorders:t.Optional(FS),cellDefaults:t.Optional($r),headerCellDefaults:t.Optional($r),width:t.Optional(t.Number({minimum:0,maximum:100,description:"Table width in percentage (0-100)"})),columns:t.Array(a,{description:"Table columns with headers and cells",minItems:1}),rows:t.Optional(t.Array(t.Object({revision:t.Optional(wS),cantSplit:t.Optional(t.Boolean({description:"Keep this row on one page"})),tableHeader:t.Optional(t.Boolean({description:"Repeat this row as a header on each page"}))},{additionalProperties:!1}),{description:"Row-parallel properties, indexed like `columns[].cells`. The model is column-major, so anything that belongs to a whole row lives here."})),keepInOnePage:t.Optional(t.Boolean({description:"Keep table rows together on the same page by setting keepNext on all paragraphs"})),keepNext:t.Optional(t.Boolean({description:"Set keepNext on the last row to keep it connected to the next element. Works independently of keepInOnePage. Defaults to false."})),repeatHeaderOnPageBreak:t.Optional(t.Boolean({description:"Repeat the header row on each page when the table spans multiple pages. Defaults to true.",default:!0}))},{description:"Table component props with column-based structure",additionalProperties:!1})}var Oc=bc(TS),yc=e=>t.Object({meta:t.Optional(t.Object({title:t.Optional(t.String({description:"Authoring label for this section, shown in editors and outlines. Never rendered — add a heading child for a visible title."}))},{additionalProperties:!1,description:"Authoring metadata; has no effect on the document."})),header:t.Optional(t.Union([t.Array(e||t.Any(),{description:"Section header components"}),t.Literal("linkToPrevious",{description:"Link header to previous section"})])),footer:t.Optional(t.Union([t.Array(e||t.Any(),{description:"Section footer components"}),t.Literal("linkToPrevious",{description:"Link footer to previous section"})])),pageBreak:t.Optional(t.Boolean({description:"Insert page break before section",default:!0})),spacing:t.Optional($t),page:t.Optional(t.Object({size:t.Optional(t.Union([t.Literal("A4"),t.Literal("A3"),t.Literal("LETTER"),t.Literal("LEGAL"),t.Object({width:t.Number({minimum:0}),height:t.Number({minimum:0})})])),margins:t.Optional(t.Object({top:t.Optional(t.Number({minimum:0})),bottom:t.Optional(t.Number({minimum:0})),left:t.Optional(t.Number({minimum:0})),right:t.Optional(t.Number({minimum:0})),header:t.Optional(t.Number({minimum:0})),footer:t.Optional(t.Number({minimum:0})),gutter:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1}))},{description:"Page configuration override for this section (overrides theme page settings)",additionalProperties:!1}))},{description:"Section component props",additionalProperties:!1}),xc=yc(),jS=t.Object({width:t.Optional(t.Union([t.Number({minimum:1,description:"Column width in points"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Column width as percentage of available width (e.g., "30%")'}),t.Literal("auto",{description:"Auto width: consume remaining space after fixed widths and gaps"})])),gap:t.Optional(t.Union([t.Number({minimum:0,description:"Gap after this column in points"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Gap after this column as percentage of available width (e.g., "5%")'})]))},{additionalProperties:!1}),Sc=t.Object({columns:t.Union([t.Number({minimum:1,description:"Number of equal-width columns (converter will normalize to array)"}),t.Array(jS,{minItems:1,description:"List of columns in order; width and gap can be points, percentages, or auto width"})]),gap:t.Optional(t.Union([t.Number({minimum:0,description:"Default gap applied after each column except the last (points)"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Default gap applied after each column except the last as percentage of available width (e.g., "5%")'})]))},{description:"Columns component props",additionalProperties:!1}),wc=t.Union([t.Literal("decimal"),t.Literal("upperRoman"),t.Literal("lowerRoman"),t.Literal("upperLetter"),t.Literal("lowerLetter"),t.Literal("bullet"),t.Literal("ordinal"),t.Literal("cardinalText"),t.Literal("ordinalText"),t.Literal("hex"),t.Literal("chicago"),t.Literal("ideographDigital"),t.Literal("japaneseCounting"),t.Literal("aiueo"),t.Literal("iroha"),t.Literal("decimalFullWidth"),t.Literal("decimalHalfWidth"),t.Literal("japaneseLegal"),t.Literal("japaneseDigitalTenThousand"),t.Literal("decimalEnclosedCircle"),t.Literal("decimalFullWidth2"),t.Literal("aiueoFullWidth"),t.Literal("irohaFullWidth"),t.Literal("decimalZero"),t.Literal("ganada"),t.Literal("chosung"),t.Literal("decimalEnclosedFullstop"),t.Literal("decimalEnclosedParen"),t.Literal("decimalEnclosedCircleChinese"),t.Literal("ideographEnclosedCircle"),t.Literal("ideographTraditional"),t.Literal("ideographZodiac"),t.Literal("ideographZodiacTraditional"),t.Literal("taiwaneseCounting"),t.Literal("ideographLegalTraditional"),t.Literal("taiwaneseCountingThousand"),t.Literal("taiwaneseDigital"),t.Literal("chineseCounting"),t.Literal("chineseLegalSimplified"),t.Literal("chineseCountingThousand"),t.Literal("koreanDigital"),t.Literal("koreanCounting"),t.Literal("koreanLegal"),t.Literal("koreanDigital2"),t.Literal("vietnameseCounting"),t.Literal("russianLower"),t.Literal("russianUpper"),t.Literal("none"),t.Literal("numberInDash"),t.Literal("hebrew1"),t.Literal("hebrew2"),t.Literal("arabicAlpha"),t.Literal("arabicAbjad"),t.Literal("hindiVowels"),t.Literal("hindiConsonants"),t.Literal("hindiNumbers"),t.Literal("hindiCounting"),t.Literal("thaiLetters"),t.Literal("thaiNumbers"),t.Literal("thaiCounting")],{description:"Number or bullet format for list levels"}),RS=t.Object({family:t.Optional(t.String({description:"Font family name"})),size:t.Optional(t.Number({minimum:1,description:"Marker size in points"})),color:t.Optional(q),bold:t.Optional(t.Boolean({description:"Bold marker"})),italic:t.Optional(t.Boolean({description:"Italic marker"})),underline:t.Optional(t.Boolean({description:"Underlined marker"}))},{description:"Styling for the number/bullet glyph only. The list text is unaffected.",additionalProperties:!1}),US=t.Object({level:t.Number({minimum:0,maximum:8,description:"Nesting level (0 = root, 1 = first sublevel, etc.)"}),format:t.Optional(wc),text:t.Optional(t.String({description:'Number format string (e.g., "%1." for "1.", "%1)" for "1)", custom bullet character for bullet format)'})),alignment:t.Optional(t.Union([t.Literal("start"),t.Literal("end"),t.Literal("left"),t.Literal("right"),t.Literal("center")],{description:"Alignment of the numbering/bullet"})),indent:t.Optional(lr),start:t.Optional(t.Number({minimum:1,description:"Starting number for this level (default: 1)"})),font:t.Optional(RS)},{description:"Configuration for a single list level",additionalProperties:!1}),Lc=t.Object({items:t.Array(t.Union([t.String(),t.Object({text:t.String(),level:t.Optional(t.Number({minimum:0,maximum:8,description:"Nesting level for this item"})),id:t.Optional(t.String({description:"Bookmark id for this item, targetable by internal links (#id) and cross-references ([@id])"})),revision:t.Optional(ur)},{additionalProperties:!1})]),{description:"List items (required)",minItems:1}),reference:t.Optional(t.String({description:"Unique reference ID for this numbering configuration (auto-generated if not provided)"})),levels:t.Optional(t.Array(US,{description:"Configuration for each nesting level",minItems:1,maxItems:9})),format:t.Optional(t.Union([wc,t.Literal("numbered"),t.Literal("none")],{description:"Format for level 0 (simplified option when levels not specified)"})),bullet:t.Optional(t.String({description:"Custom bullet character (simplified option when levels not specified)"})),start:t.Optional(t.Number({minimum:1,description:"Starting number for level 0. Applies whether or not `levels` is given; a `start` on the level itself wins."})),font:t.Optional(t.Partial(jt)),spacing:t.Optional(qx),alignment:t.Optional(Yl),keepNext:t.Optional(t.Boolean({description:"Keep every item with what follows, so the list stays with the text that introduces it"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of each item together on the same page"})),indent:t.Optional(t.Union([t.Number({minimum:0}),lr])),comment:t.Optional(mr)},{description:"List component props",additionalProperties:!1}),ea=["revision","comment","footnotes","endnotes"],MS=t.Partial(t.Omit(lc,ea)),BS=t.Partial(t.Omit(dc,ea)),ES=t.Partial(pc),CS=t.Partial(uc),DS=t.Partial(t.Omit(Oc,["rows"])),zS=t.Partial(xc),_S=t.Partial(Sc),WS=t.Partial(t.Omit(Lc,ea)),vc=t.Object({heading:t.Optional(MS),paragraph:t.Optional(BS),image:t.Optional(ES),statistic:t.Optional(CS),table:t.Optional(DS),section:t.Optional(zS),columns:t.Optional(_S),list:t.Optional(WS)},{additionalProperties:!0}),Ma=["consulting","devportal","minimal","vermilion"],qS=t.Object({top:t.Number({minimum:0}),bottom:t.Number({minimum:0}),left:t.Number({minimum:0}),right:t.Number({minimum:0}),header:t.Number({minimum:0}),footer:t.Number({minimum:0}),gutter:t.Number({minimum:0})},{additionalProperties:!1,description:"Document margin configuration"});t.Object({width:t.Number({minimum:0}),height:t.Number({minimum:0})},{additionalProperties:!1,description:"Page dimensions in twips"});var HS=t.Object({size:t.Union([t.Literal("A4"),t.Literal("A3"),t.Literal("LETTER"),t.Literal("LEGAL"),t.Object({width:t.Number({minimum:0}),height:t.Number({minimum:0})},{additionalProperties:!1})],{description:"Standard page size or custom dimensions"}),margins:qS},{description:"Page configuration including dimensions and margins",additionalProperties:!1}),Pc=t.Object({heading:jt,body:jt,mono:jt,light:jt},{additionalProperties:!1,description:"Font definitions for different text types"}),KS=t.Union([t.Literal("single"),t.Literal("dashDotStroked"),t.Literal("dashed"),t.Literal("dashSmallGap"),t.Literal("dotDash"),t.Literal("dotDotDash"),t.Literal("dotted"),t.Literal("double"),t.Literal("doubleWave"),t.Literal("inset"),t.Literal("nil"),t.Literal("none"),t.Literal("outset"),t.Literal("thick"),t.Literal("thickThinLargeGap"),t.Literal("thickThinMediumGap"),t.Literal("thickThinSmallGap"),t.Literal("thinThickLargeGap"),t.Literal("thinThickMediumGap"),t.Literal("thinThickSmallGap"),t.Literal("thinThickThinLargeGap"),t.Literal("thinThickThinMediumGap"),t.Literal("thinThickThinSmallGap"),t.Literal("threeDEmboss"),t.Literal("threeDEngrave"),t.Literal("triple"),t.Literal("wave")],{description:"Paragraph border style"}),$c={style:KS,size:t.Number({minimum:0,description:"Width in eighths of a point (docx sz)"}),color:q,space:t.Optional(t.Number({minimum:0,description:"Space between text and border in points"}))},pi=t.Object($c,{additionalProperties:!1,description:"Paragraph border side definition"}),GS=t.Object($c,{additionalProperties:!1,description:"Rule drawn between consecutive paragraphs sharing this border set (w:between), in place of their adjoining bottom and top edges"}),Ic=t.Object({top:t.Optional(pi),bottom:t.Optional(pi),left:t.Optional(pi),right:t.Optional(pi),between:t.Optional(GS)},{additionalProperties:!1,description:"Paragraph borders (per side, plus the between-paragraph rule)"}),Nc=t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")])),He=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Zo.properties,alignment:Nc,priority:t.Optional(t.Number()),baseStyle:t.Optional(t.String()),followingStyle:t.Optional(t.String()),widowControl:t.Optional(t.Boolean()),keepNext:t.Optional(t.Boolean()),keepLinesTogether:t.Optional(t.Boolean()),outlineLevel:t.Optional(t.Number()),borders:t.Optional(Ic),indent:t.Optional(lr)},{additionalProperties:!1}),VS=t.Union([t.Literal("dot"),t.Literal("hyphen"),t.Literal("middleDot"),t.Literal("none"),t.Literal("underscore")],{description:"Tab leader style: dot (dotted), hyphen (dashed), middleDot, none (blank), or underscore"}),JS=t.Union([t.Literal("left"),t.Literal("right"),t.Literal("center"),t.Literal("bar"),t.Literal("clear"),t.Literal("decimal"),t.Literal("end"),t.Literal("num"),t.Literal("start")],{description:"Tab stop alignment type"}),XS=t.Object({type:JS,position:t.Union([t.Number({description:"Tab stop position in twips (1/1440 inch). Common: 9026 for right-aligned at page margin"}),t.Literal("max",{description:"Use maximum position (TabStopPosition.MAX = 9026 twips)"})]),leader:t.Optional(VS)},{description:"Tab stop configuration with position, alignment, and optional leader",additionalProperties:!1}),en=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Zo.properties,alignment:Nc,tabStops:t.Optional(t.Array(XS,{description:"Tab stops for TOC entries. Use right-aligned tab with leader to create dotted lines to page numbers.",default:[{type:"right",position:"max",leader:"none"}]})),priority:t.Optional(t.Number()),followingStyle:t.Optional(t.String()),widowControl:t.Optional(t.Boolean()),keepNext:t.Optional(t.Boolean()),keepLinesTogether:t.Optional(t.Boolean()),outlineLevel:t.Optional(t.Number()),borders:t.Optional(Ic),indent:t.Optional(lr)},{additionalProperties:!1}),kc=t.Object({normal:t.Optional(He),heading1:t.Optional(He),heading2:t.Optional(He),heading3:t.Optional(He),heading4:t.Optional(He),heading5:t.Optional(He),heading6:t.Optional(He),title:t.Optional(He),subtitle:t.Optional(He),TOC1:t.Optional(en),TOC2:t.Optional(en),TOC3:t.Optional(en),TOC4:t.Optional(en),TOC5:t.Optional(en),TOC6:t.Optional(en)},{additionalProperties:He,description:"Style definitions supporting predefined styles (normal, heading1..6, title, subtitle), TOC entry styles (TOC1..TOC6), and arbitrary custom styles."});t.Object({level:t.Union([t.Literal(1),t.Literal(2),t.Literal(3),t.Literal(4),t.Literal(5),t.Literal(6)]),...He.properties},{additionalProperties:!1});var Ac=t.Object({primary:q,secondary:q,accent:q,text:q,background:q,border:q,textPrimary:q,textSecondary:q,textMuted:q,borderPrimary:q,borderSecondary:q,backgroundPrimary:q,backgroundSecondary:q,accent4:t.Optional(q),accent5:t.Optional(q),accent6:t.Optional(q)},{additionalProperties:!1}),YS=t.Object({...nr,colors:t.Optional(t.Partial(Ac)),fonts:t.Optional(t.Partial(Pc)),styles:t.Optional(kc)},{additionalProperties:!1,description:"Partial theme deep-merged over the resolved named theme: define or override palette tokens, font roles, and named styles in-document."}),ZS=t.Object({...nr,$schema:t.Optional(t.String()),name:t.String(),displayName:t.String(),description:t.String({description:"The visual voice: what the theme looks like, in one sentence."}),whenToUse:t.Optional(t.String({description:"The documents the theme suits; discovery and the design guide quote it."})),version:t.String(),colors:Ac,fonts:Pc,fontRegistry:t.Optional(tr),page:HS,styles:t.Optional(kc),componentDefaults:t.Optional(vc),noProofWords:t.Optional(t.Array(t.String({minLength:1}),{description:"Words that should never be flagged as misspelled (whole-word, case-insensitive)."}))},{additionalProperties:!1,description:"Theme configuration"});function W0(e="minimal-theme"){return{name:e,displayName:e.split(/[-_\s]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")||e,description:"A minimal theme with basic styling",version:"1.0.0",colors:{primary:"#2563EB",secondary:"#64748B",accent:"#F8FAFC",text:"#334155",background:"#FFFFFF",border:"#E2E8F0",textPrimary:"#334155",textSecondary:"#64748B",textMuted:"#94A3B8",borderPrimary:"#CBD5E1",borderSecondary:"#E2E8F0",backgroundPrimary:"#FFFFFF",backgroundSecondary:"#F8FAFC"},fonts:{heading:{family:"Arial",size:14},body:{family:"Arial",size:11},mono:{family:"Courier New",size:10},light:{family:"Arial",size:10}},page:{size:"A4",margins:{top:1440,bottom:1440,left:1440,right:1440,header:720,footer:720,gutter:0}},styles:{normal:{font:"body",size:11,color:"#334155",alignment:"left",lineSpacing:{type:"multiple",value:1.15},spacing:{after:8}}}}}var QS=t.Object({},{additionalProperties:!1}),ew=e=>t.Object({blocks:t.Optional(El),theme:t.Optional(t.String({description:`Theme name to apply (default: "minimal"). Built-ins: ${Ma.join(", ")} (consulting is the house style).`,examples:[...Ma],default:"minimal"})),themeOverrides:t.Optional(YS),qualityProfile:t.Optional(t.String({description:"The quality profile validation judges this document by when the caller names none — a blueprint scaffold writes its archetype’s profile here. A profile names required structure and content; the theme only paints. Built-ins: client-report, technical-report, executive-report, legal-appendix, general (the format default); an unknown name falls back to it.",examples:["client-report","technical-report","executive-report","legal-appendix","general"]})),fontRegistry:t.Optional(tr),componentDefaults:t.Optional(vc),language:t.Optional(t.String({pattern:"^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",description:`Default document language (BCP-47 tag, e.g. "en-US"). Sets Word's default proofing/spell-check language; individual components can override it locally.`,examples:["en-US","fr-FR","de-DE","it-IT","es-ES"]})),noProofWords:t.Optional(Yo),trackRevisions:t.Optional(t.Boolean({description:"Open the document in track-changes mode: Word marks any further edits as revisions. Set automatically on redline documents produced by the diff engine"})),metadata:t.Optional(t.Object({title:t.Optional(t.String({description:"Document title",examples:["Annual Report 2024","Technical Documentation"]})),subtitle:t.Optional(t.String({description:"Document subtitle"})),description:t.Optional(t.String()),author:t.Optional(t.String()),company:t.Optional(t.String({description:"Company name, written to docProps/custom.xml (Word has no core-property slot for it)"})),date:t.Optional(t.String({description:"Document date used by {DATE}/{DATETIME} placeholders (defaults to the generation timestamp)"})),version:t.Optional(t.String({description:"Document version, written to docProps/custom.xml",examples:["1.0","2024.3"]})),tags:t.Optional(t.Array(t.String()))},{description:"Document metadata (title, author, company, version, etc.). Package timestamps (dcterms:created/modified) are not part of this object: they come from the `generatedAt` generation option so repeated builds stay byte-identical.",additionalProperties:!1}))},{description:"Report component props",additionalProperties:!1}),tw=ew(),nw=t.Object({width:t.Optional(t.Union([t.Number({minimum:1,description:"Text box width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Text box width as percentage (e.g., "50%") relative to content width'})],{description:'Text box width in pixels (number) or as percentage string (e.g., "50%")'})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Text box height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Text box height as percentage (e.g., "50%") relative to content height'})],{description:'Text box height in pixels (number) or as percentage string (e.g., "50%")'})),renderAs:t.Optional(t.Union([t.Literal("table"),t.Literal("shape")],{description:"Rendering strategy. 'table' (default): borderless one-cell table — height auto-fits content, per-side borders and percentage widths resolve in Word. 'shape': native Word text box (WPS shape) — real wrap modes and z-order, but requires explicit width and height (no autofit), a single uniform border, and eagerly-resolved percentage sizes."})),floating:t.Optional(cr),style:t.Optional(t.Object({padding:t.Optional(t.Object({top:t.Optional(t.Number({minimum:0})),right:t.Optional(t.Number({minimum:0})),bottom:t.Optional(t.Number({minimum:0})),left:t.Optional(t.Number({minimum:0}))},{additionalProperties:!1})),border:t.Optional(t.Object({top:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1})),right:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1})),bottom:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1})),left:t.Optional(t.Object({style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double"),t.Literal("none")])),width:t.Optional(t.Number({minimum:0})),color:t.Optional(q)},{additionalProperties:!1}))},{additionalProperties:!1})),shading:t.Optional(t.Object({fill:t.Optional(q)},{additionalProperties:!1}))},{additionalProperties:!1}))},{additionalProperties:!1,allOf:[{if:{properties:{renderAs:{const:"shape"}},required:["renderAs"]},then:{required:["width","height"],properties:{style:{properties:{border:{properties:Object.fromEntries(["top","right","bottom","left"].map(e=>[e,{properties:{style:{enum:["solid","none"]}}}]))}}}}}}]}),iw=t.Union([t.Literal("numeric"),t.Literal("bullet"),t.Literal("none")],{description:"TOC numbering style — accepted but not applied (Word TOC fields carry no numbering switch); setting it logs a warning during generation"}),rw=t.Union([t.Literal("document"),t.Literal("section")],{description:"TOC scope: document-wide or section-only"}),ow=t.Object({styleId:t.String({description:"Custom style ID matching a key in theme.styles"}),level:t.Number({minimum:1,maximum:6,description:"TOC level (1-6) to assign to this style"})},{description:"Mapping of custom style to TOC level",additionalProperties:!1});t.Object({from:t.Optional(t.Number({minimum:1,maximum:6,default:1,description:"Starting heading level (1-6). Defaults to 1 if not specified."})),to:t.Optional(t.Number({minimum:1,maximum:6,default:3,description:"Ending heading level (1-6). Defaults to 3 if not specified."}))},{description:'Range of heading levels to include in TOC. Specify at least one of "from" or "to".',additionalProperties:!1});var aw=t.Object({pageBreak:t.Optional(t.Boolean({description:"Insert page break before TOC block"})),depth:t.Optional(t.Object({from:t.Optional(t.Number({minimum:1,maximum:6,default:1,description:"Starting heading level (1-6). Defaults to 1 if not specified."})),to:t.Optional(t.Number({minimum:1,maximum:6,default:3,description:"Ending heading level (1-6). Defaults to 3 if not specified."}))},{description:'Range of heading levels to include in TOC. Specify "from", "to", or both. Defaults: from=1, to=3',additionalProperties:!1,default:{to:3}})),pageNumbersDepth:t.Optional(t.Object({from:t.Optional(t.Number({minimum:1,maximum:6,default:1,description:"Starting heading level (1-6). Defaults to 1 if not specified."})),to:t.Optional(t.Number({minimum:1,maximum:6,default:3,description:"Ending heading level (1-6). Defaults to 3 if not specified."}))},{description:'Range of heading levels to show page numbers. Specify "from", "to", or both. When specified, page numbers are hidden for entries outside this range.',additionalProperties:!1})),numberingStyle:t.Optional(iw),title:t.Optional(t.String({description:"TOC heading title"})),includePageNumbers:t.Optional(t.Boolean({default:!0,description:"Show page numbers next to entries"})),numberSeparator:t.Optional(t.Boolean({default:!0,description:'Use tab separator between entry and page number. True applies "\\t" (default), false applies " "'})),scope:t.Optional(t.Union([rw,t.Literal("auto")],{default:"auto",description:'TOC scope: "document" for entire document, "section" for parent section only, "auto" for automatic detection (section if inside section, otherwise document)'})),styles:t.Optional(t.Array(ow,{description:"Custom style mappings for TOC entries. Maps custom theme styles to TOC levels."}))},{description:"Table of Contents component props",additionalProperties:!1}),sw=t.Object({thickness:t.Optional(t.Number({minimum:.25,maximum:12,description:"Line weight in points (default 1). OOXML measures a border in eighths of a point and Word stops at 12pt, so this is the whole usable range."})),color:t.Optional(q),style:t.Optional(t.Union([t.Literal("solid"),t.Literal("dashed"),t.Literal("dotted"),t.Literal("double")],{description:'Line style (default "solid"). `double` draws two lines and is measured per line, so it reads about twice as tall as its thickness.'})),width:t.Optional(t.Union([t.Number({minimum:1,description:"Divider width in points"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Divider width as a percentage of the text measure (e.g. "40%")'})],{description:"How far the line runs (default: the full text measure). A percentage or a point width is turned into paragraph indents, resolved against the theme page — so a partial divider inside a column or a re-margined section is measured against the page, while the default full-measure divider is exact everywhere."})),alignment:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:'Which end of the measure a partial divider sits at (default "left"). Ignored at full width.'})),spacing:t.Optional($t)},{description:"Horizontal divider — a thin line across the measure, drawn as a Word paragraph border so it stays editable in Word.",additionalProperties:!1}),lw=t.Object({options:t.Intersect([t.Record(t.String(),t.Unknown()),t.Object({chart:t.Object({width:t.Number(),height:t.Number()})})]),scale:t.Optional(t.Number()),resources:t.Optional(t.Object({css:t.Optional(t.String()),js:t.Optional(t.String()),files:t.Optional(t.Array(t.String()))})),serverUrl:t.Optional(t.String({description:"Highcharts Export Server URL (default: http://localhost:7801)"})),width:t.Optional(t.Union([t.Number({minimum:1,description:"Image width in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image width as percentage (e.g., "90%") relative to content width'})],{description:'Rendered image width in pixels (number) or as percentage string (e.g., "90%")'})),height:t.Optional(t.Union([t.Number({minimum:1,description:"Image height in pixels"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Image height as percentage (e.g., "90%") relative to content height'})],{description:'Rendered image height in pixels (number) or as percentage string (e.g., "90%")'}))}),cw=t.Union([t.Literal("area"),t.Literal("bar"),t.Literal("column"),t.Literal("doughnut"),t.Literal("line"),t.Literal("pie"),t.Literal("radar"),t.Literal("scatter")],{description:"Chart type"}),dw=t.Object({name:t.Optional(t.String({description:"Series name"})),labels:t.Optional(t.Array(t.String(),{description:"Category labels. Needed on every series, not just the first, and the same length as `values`; a series without both `labels` and `values` drops the whole chart."})),values:t.Optional(t.Array(t.Number(),{description:"Data values, one per label. Needed on every series — see `labels`."}))},{additionalProperties:!1}),pw=t.Object({type:cw,data:t.Array(dw,{description:"Chart data series",minItems:1}),title:t.Optional(t.String({description:"Chart title text"})),showTitle:t.Optional(t.Boolean({description:"Show the chart title. Defaults to true when `title` is set."})),showLegend:t.Optional(t.Boolean({description:"Show chart legend"})),legendPos:t.Optional(t.Union([t.Literal("b"),t.Literal("l"),t.Literal("r"),t.Literal("t"),t.Literal("tr")],{description:"Legend position"})),chartColors:t.Optional(t.Array(t.String(),{description:"Series colors (hex or semantic theme names). Defaults to the theme palette."})),catAxisTitle:t.Optional(t.String({description:"Category axis title"})),valAxisTitle:t.Optional(t.String({description:"Value axis title"})),width:t.Optional(t.Number({minimum:0,exclusiveMinimum:0,description:"Chart width in inches. Defaults to the content width."})),height:t.Optional(t.Number({minimum:0,exclusiveMinimum:0,description:"Chart height in inches. Defaults to 3."})),alignment:t.Optional(sr),caption:t.Optional(t.String({description:"Chart caption (supports rich text with **bold**, *italic*, ***both***)"})),alt:t.Optional(t.String({description:"Alternative text for accessibility"})),spacing:t.Optional($t),floating:t.Optional(cr),keepNext:t.Optional(t.Boolean({description:"Keep paragraph with next paragraph on same page"})),keepLines:t.Optional(t.Boolean({description:"Keep all lines of paragraph together on same page"}))},{description:'Native Word chart - editable, scalable, no export server needed. Requires renderer "office-open".',additionalProperties:!1}),ht=[{name:"docx",propsSchema:tw,hasChildren:!0,allowedChildren:["section"],category:"container",description:"Main document container - defines the overall document structure. Required as the root component.",special:{hasSchemaField:!0}},{name:"section",propsSchema:xc,createPropsSchema:yc,embeddedComponents:[{path:["header"],arity:"component-array",reportStructure:!0},{path:["footer"],arity:"component-array",reportStructure:!0}],hasChildren:!0,allowedChildren:["block","group","heading","paragraph","image","statistic","table","list","toc","divider","highcharts","chart","visual","columns","text-box"],category:"container",description:"Section container - groups related content with optional title. Use for organizing document structure."},{name:"columns",propsSchema:Sc,hasChildren:!0,allowedChildren:["block","group","heading","paragraph","image","statistic","table","list","toc","divider","highcharts","chart","visual","text-box"],category:"layout",description:"Multi-column layout - arranges content in 2-4 columns. Great for side-by-side content."},{name:"text-box",propsSchema:nw,hasChildren:!0,allowedChildren:["heading","paragraph","image","divider"],category:"layout",description:"Floating text container - allows positioning text anywhere on the page with absolute or relative positioning."},{name:"heading",propsSchema:lc,hasChildren:!1,category:"content",description:"Heading text - supports levels 1-6 for document hierarchy. Level 1 is largest. Never skip a level going down (1 → 3): the gap breaks the document outline."},{name:"paragraph",propsSchema:dc,hasChildren:!1,category:"content",description:"Paragraph text - supports formatting like bold, italic, and color. Main content element."},{name:"image",propsSchema:pc,hasChildren:!1,category:"content",description:"Image element - displays images with optional caption. Supports various formats."},{name:"statistic",propsSchema:uc,hasChildren:!1,category:"content",description:"Statistic display - shows a number with description. Perfect for KPIs and metrics."},{name:"block",propsSchema:Cl,hasChildren:!1,category:"content",description:"Invoke a JSON block defined in this document’s props.blocks. Fill its named slots; no block names are built into the engine."},{name:"group",propsSchema:QS,hasChildren:!0,allowedChildren:["group","block","heading","paragraph","image","statistic","table","list","toc","divider","highcharts","chart","visual","columns","text-box"],category:"container",description:"Transparent group of flow components; also the inspectable result of block expansion."},{name:"table",propsSchema:Oc,createPropsSchema:bc,embeddedComponents:[{path:["columns","*","header","content"],arity:"component",reportStructure:!1},{path:["columns","*","cells","*","content"],arity:"component",reportStructure:!1}],hasChildren:!1,category:"content",description:"Data table, declared COLUMN-MAJOR: `props.columns[]`, each with its own `header` and its own `cells[]` running down the column. Note the PPTX `table` is the other way round — rows of cells — so a table cannot be moved between the formats unchanged. Fixed column widths are points and must fit the page; leave some columns unsized so they share the leftover space."},{name:"list",propsSchema:Lc,hasChildren:!1,category:"content",description:"List element - bulleted or numbered list items. Supports nested lists."},{name:"toc",propsSchema:aw,hasChildren:!1,category:"content",description:"Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles."},{name:"divider",propsSchema:sw,hasChildren:!1,category:"content",description:"Horizontal divider - a thin line across the measure, for separating sections. Drawn as a Word paragraph border, so it stays a real Word object. Use this rather than collapsing a paragraph's line spacing to fake one."},{name:"highcharts",propsSchema:lw,hasChildren:!1,category:"content",description:"Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options."},{name:"chart",propsSchema:pw,hasChildren:!1,renderers:["office-open"],category:"content",description:'Native Word chart - editable, scalable, no export server needed. Requires renderer "office-open".'},{name:"visual",propsSchema:hS,hasChildren:!1,category:"content",description:'Free-canvas graphic for infographics, diagrams and layered compositions the document flow cannot express. Rasterized from a pptx slide by default; renderMode "native" draws it as an editable Word drawing group (renderer "office-open").'}];function Ba(e){return ht.find(n=>n.name===e)}function uw(e){var i;const n=e;return n.type!=="object"||(((i=n.required)==null?void 0:i.length)??0)>0}function In(e,n,i,r){var c,l;const o={name:t.Literal(e.name),id:t.Optional(t.String()),enabled:t.Optional(t.Boolean({default:!0,description:"When false, this component is filtered out and not rendered. Defaults to true. Useful for conditional component inclusion."}))};(c=e.special)!=null&&c.hasSchemaField&&(o.$schema=t.Optional(t.String({format:"uri"})),o.renderer=r?r.requireDiscriminator?t.Literal(r.renderer,{description:"Renderer backend for this document"}):t.Optional(t.Literal(r.renderer,{description:'Renderer backend. Omitted defaults to "docxjs".'})):t.Optional(t.Union(pr.map(d=>t.Literal(d)),{description:'Renderer backend. Omitted defaults to "docxjs".'})));const a=e.createPropsSchema&&i?e.createPropsSchema(i):e.propsSchema,s=r?ac(e.name,a,r.renderer):a;return o.props=uw(s)?s:t.Optional(s),e.hasChildren&&n&&(o.children=(l=e.special)!=null&&l.hasSchemaField?t.Array(n):t.Optional(t.Array(n))),t.Object(o,{additionalProperties:!1,description:e.description})}function mw(e){return ht.map(n=>In(n,e))}function Tc(e,n=[],i){const r=d=>!i||!d.renderers||d.renderers.includes(i.renderer),o=new Map;for(const d of ht)r(d)&&(d.hasChildren||o.set(d.name,In(d,void 0,e,i)));const a=ht.filter(d=>d.hasChildren&&r(d)),s=new Map,c=[...a];for(;c.length>0;){const d=c.length;for(let f=c.length-1;f>=0;f--){const p=c[f];if(p.name==="group"){const L=t.Intersect([e,t.Object({name:t.Union([...p.allowedChildren.map(N=>t.Literal(N)),...n.map(N=>N.properties.name)])})]);s.set(p.name,In(p,L,e,i)),c.splice(f,1);continue}if(!p.allowedChildren){s.set(p.name,In(p,e,e,i)),c.splice(f,1);continue}if(!p.allowedChildren.filter(L=>a.some(N=>N.name===L)).every(L=>s.has(L)))continue;const h=[...p.allowedChildren.map(L=>s.get(L)??o.get(L)).filter(L=>L!==void 0),...n],b=h.length===1?h[0]:t.Union(h);s.set(p.name,In(p,b,e,i)),c.splice(f,1)}if(c.length===d)throw new Error(`Circular allowedChildren among: ${c.map(f=>f.name).join(", ")}`)}const l=new Map([...s,...o]);return{schemas:[...l.values()],byName:l}}function fw(e,n="ComponentDefinition"){const i=new Set(Object.keys(e.definitions??{})),r=s=>{const c=i.has(s)?s:n;return i.has(c)?`#/definitions/${c}`:void 0},o=s=>typeof s=="string"&&(/^T\d+$/.test(s)||s===n||i.has(s));function a(s,c=""){if(!(typeof s!="object"||s===null))for(const[l,d]of Object.entries(s)){const f=c?`${c}.${l}`:l;if(d&&typeof d=="object"){const p=d;if(p.type==="array"&&p.items&&Object.keys(p.items).length===0&&i.has(n)&&(p.items={$ref:`#/definitions/${n}`}),p.type==="array"&&p.items&&typeof p.items=="object"&&"$ref"in p.items&&o(p.items.$ref)){const O=r(p.items.$ref);p.items=O?{$ref:O}:{}}if(o(p.$ref)){const O=r(p.$ref);O?p.$ref=O:delete p.$ref}if(l==="$id"&&o(d)&&f!==`definitions.${d}.$id`){delete s[l];continue}a(d,f)}}}a(e)}function gw(e,n={}){const{$schema:i="http://json-schema.org/draft-07/schema#",$id:r,title:o,description:a,definitions:s={}}=n,c=JSON.parse(JSON.stringify(e)),l={...s};function d(p,O=""){if(!(typeof p!="object"||p===null)){for(const[u,h]of Object.entries(p))if(h&&typeof h=="object"){const b=h;if(b.$id&&typeof b.$id=="string"){const L=b.$id;if(O!==`definitions.${L}`){const{$id:N,...I}=b;l[L]=I,p[u]={$ref:`#/definitions/${L}`},d(I,`definitions.${L}`);continue}}d(h,O?`${O}.${u}`:u)}}}d(c);const f={$schema:i};return r&&(f.$id=r),Object.assign(f,c),o!==void 0&&(f.title=o),a!==void 0&&(f.description=a),Object.keys(l).length>0&&(f.definitions=l),fw(f),yS(f),Ul(f),f}function hw(e={}){return t.Union(pr.map(n=>bw(e,n,n!==bS)),{description:"Document definition, discriminated by the optional renderer field. Omitted renderer means docxjs."})}function bw(e,n,i){const{includeStandardComponents:r=!0,customComponents:o=[],title:a="JSON Report Definition",description:s="JSON report definition with TypeBox schemas"}=e;let c=[],l=[];const d=Bn(n),f=t.Recursive(O=>{const u=[];for(const I of o)if(I.versionedProps&&I.versionedProps.length>0){const w=I.versionedProps,D=jl(w.map(W=>W.version));for(const W of w){const k=W.description||I.description,R={name:t.Literal(I.name),id:t.Optional(t.String()),version:k?t.Literal(W.version,{description:k}):t.Literal(W.version),props:W.propsSchema};W.hasChildren&&(R.children=t.Optional(t.Array(O)));const J=W.description?`${I.name} v${W.version} — ${W.description}`:I.description?`${I.name} v${W.version} — ${I.description}`:`${I.name} v${W.version}`;u.push(t.Object(R,{additionalProperties:!1,description:J}))}const _=w.find(W=>W.version===D),T={name:t.Literal(I.name),id:t.Optional(t.String()),props:_.propsSchema};_.hasChildren&&(T.children=t.Optional(t.Array(O)));const A=_.description?`${I.name} (latest: v${D}) — ${_.description}`:I.description?`${I.name} (latest: v${D}) — ${I.description}`:`${I.name} (latest: v${D})`;u.push(t.Object(T,{additionalProperties:!1,description:A}))}else{const w=!!I.hasChildren,D={name:t.Literal(I.name),id:t.Optional(t.String()),props:I.propsSchema};w&&(D.children=t.Optional(t.Array(O))),u.push(t.Object(D,{additionalProperties:!1,...I.description?{description:I.description}:{}}))}const{schemas:h,byName:b}=r?Tc(O,u,{renderer:n,requireDiscriminator:i}):{schemas:[],byName:new Map},L=Ba("section");c=["section",...(L==null?void 0:L.allowedChildren)??[]].map(I=>b.get(I)).filter(I=>I!==void 0),l=u;const N=[...h,...u];if(N.length===0)return t.Any();if(N.length===1)return N[0];{const I=o.length>0?"Component definition with discriminated union including custom components":"Component definition with discriminated union";return t.Union(N,{discriminator:{propertyName:"name"},description:I})}},{$id:d}),p=Ba("docx");if(!p)throw new Error("Docx root component not found in registry");if(c.length===0)throw new Error("Root child schemas not found in narrowed standard schemas");return t.Object({name:t.Literal("docx"),id:t.Optional(t.String()),$schema:t.Optional(t.String({format:"uri"})),renderer:i?t.Literal(n,{description:"Renderer backend for this document"}):t.Optional(t.Literal(n,{description:'Renderer backend. Omitted defaults to "docxjs".'})),props:t.Optional(ac(p.name,p.propsSchema,n)),children:t.Array(t.Union([...c,...l],{discriminator:{propertyName:"name"}}))},{additionalProperties:!1,title:a,description:s,definitions:{[d]:f}})}t.Union([...mw(t.Any())],{discriminator:{propertyName:"name"},description:"Standard component definition with discriminated union"});var Ow=t.Recursive(e=>t.Union([...Tc(e).schemas],{discriminator:{propertyName:"name"},description:"Component definition with discriminated union"})),yw=t.Object({content:t.String({description:"Text content (required)"}),spaceAfter:t.Optional(t.Number({minimum:0,description:"Spacing after text in points"})),fontSize:t.Optional(t.Number({minimum:1})),fontFamily:t.Optional(t.String()),bold:t.Optional(t.Boolean()),fontWeight:t.Optional(t.Integer({minimum:100,maximum:900})),italic:t.Optional(t.Boolean()),underline:t.Optional(t.Boolean()),color:t.Optional(t.String({pattern:"^#[0-9A-Fa-f]{6}$"})),alignment:t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")]))}),xw=t.Object({name:t.Literal("text-space-after"),id:t.Optional(t.String()),props:yw}),Sw=xw;Object.fromEntries([...ht.map(e=>[e.name,e.propsSchema]),["custom",Sw]]);new Map(ht.filter(e=>{var n;return(((n=e.embeddedComponents)==null?void 0:n.length)??0)>0}).map(e=>[e.name,e.embeddedComponents]));new Set(ht.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));new Map(ht.map(e=>{var n;return[e.name,new Set(["name","id","enabled","props",...e.hasChildren?["children"]:[],...(n=e.special)!=null&&n.hasSchemaField?["$schema","renderer"]:[]])]}));var ve={};function ww(){return{includeEmojis:!Fc(),verbosity:"normal",includeSuggestions:!0,includePath:!0,maxMessageLength:0,includeDocLinks:!1,colorSupport:Lw()}}ww();function Fc(){return typeof process>"u"||!ve?!1:!!(ve.CI||ve.CONTINUOUS_INTEGRATION||ve.GITHUB_ACTIONS||ve.GITLAB_CI||ve.CIRCLECI||ve.TRAVIS||ve.JENKINS_URL)}function Lw(){var e;return typeof process>"u"||ve!=null&&ve.NO_COLOR?!1:ve!=null&&ve.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!Fc()}t.Object({definition:Ow,format:t.Optional(t.Union([t.Literal("docx"),t.Literal("pdf"),t.Literal("html")])),options:t.Optional(t.Object({includeMetadata:t.Optional(t.Boolean()),includeComments:t.Optional(t.Boolean({deprecated:!0,description:"Deprecated and ignored. Comments are authored per component via the `comment` prop."})),trackChanges:t.Optional(t.Boolean())},{additionalProperties:!0}))},{additionalProperties:!1,description:"Document generation request"});t.Object({definition:t.Unknown(),strict:t.Optional(t.Boolean())},{additionalProperties:!1,description:"Document validation request"});t.Object({success:t.Boolean(),documentId:t.Optional(t.String()),downloadUrl:t.Optional(t.String()),error:t.Optional(t.String()),metadata:t.Optional(t.Object({pageCount:t.Optional(t.Number()),wordCount:t.Optional(t.Number()),generatedAt:t.Optional(t.String({format:"date-time"}))},{additionalProperties:!0}))},{additionalProperties:!1,description:"Document generation response"});t.Object({valid:t.Boolean(),errors:t.Array(t.Object({path:t.String(),message:t.String(),code:t.Optional(t.String())})),warnings:t.Optional(t.Array(t.Object({path:t.String(),message:t.String(),code:t.Optional(t.String())})))},{additionalProperties:!1,description:"Document validation response"});Ts("uri",e=>{try{return new URL(e),!0}catch{return e.includes(".json")||e.includes("/")||e.includes("\\")?!0:/^https?:\/\/.+/.test(e)}});Ts("date-time",e=>/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?$/.test(e)&&!isNaN(Date.parse(e)));var vw=["chart","columns","divider","heading","highcharts","image","list","paragraph","docx","section","statistic","table","text-box","toc","visual","block","group"];new Set(vw);const Ir=t.Object({basePath:t.String({default:""})});function Pw(e){const n=Hy(Ir,e);if(n.basePath&&n.basePath!==""&&(!n.basePath.startsWith("/")||n.basePath.endsWith("/")))throw new Error("basePath must start with / and not end with /");if(!or(Ir,n)){const i=[...Ny(Ir,n)];throw new Error(`Environment validation failed: ${i.map(r=>r.message).join(", ")}`)}return n}Pw({basePath:""});const $w=["docx","pptx"];function Iw(){if(typeof window>"u")return"docx";const e=window.__JTO_FORMAT__;return $w.includes(e)?e:"docx"}const Ce=Iw(),q0=Ce==="docx"?"Document":"Presentation",H0=Ce==="docx"?".docx":".pptx";function Nw(){var r;const e=hw({customComponents:[]}),n=gw(e,{$schema:"http://json-schema.org/draft-07/schema#",$id:"https://json-to-office.dev/schema/document/v1.0.0",title:"JSON to DOCX Document Definition",description:"Schema for JSON to DOCX JSON document definitions"}),i={...n,default:{name:"docx",props:{title:"New Document"},children:[]},properties:{...n.properties,children:{...((r=n.properties)==null?void 0:r.children)||{},description:'Array of document components. Type "name" to see available component types.',markdownDescription:"Array of document components. Available types:\n- `docx` - Main container\n- `section` - Section container\n- `heading` - Heading element\n- `paragraph` - Paragraph element\n- `image` - Image element\n- `table` - Data table\n- `list` - List element\n- `columns` - Column layout\n- `statistic` - Statistic element\n- `highcharts` - Highcharts chart\n- `toc` - Table of contents"}},definitions:{...n.definitions||{}}};return ta(i),i}function kw(){var r;const e=Mx({customComponents:[]}),n=zx(e,{$schema:"http://json-schema.org/draft-07/schema#",$id:"https://json-to-office.dev/schema/presentation/v1.0.0",title:"JSON to PPTX Presentation Definition",description:"Schema for JSON to PPTX JSON presentation definitions"}),i={...n,default:{name:"pptx",props:{title:"New Presentation"},children:[]},properties:{...n.properties,children:{...((r=n.properties)==null?void 0:r.children)||{},description:'Array of slide components. Type "name" to see available component types.',markdownDescription:"Array of presentation components. Available types:\n- `pptx` - Main container\n- `slide` - Slide container\n- `text` - Text element\n- `image` - Image element\n- `shape` - Shape element\n- `table` - Data table\n- `highcharts` - Highcharts chart"}},definitions:{...n.definitions||{}}};return ta(i),i}function Aw(){return Ce==="docx"?Nw():kw()}function Tw(){const n=JSON.parse(JSON.stringify(Ce==="docx"?ZS:ql));to(n,!1);const i=Ce==="docx"?"DOCX":"PPTX";return{...n,$schema:"http://json-schema.org/draft-07/schema#",$id:"https://json-to-office.dev/schemas/theme/v1.0.0",title:`JSON to ${i} Theme`,description:`Theme definition for JSON to ${i} ${Ce==="docx"?"documents":"presentations"}`}}function Fw(e=Ce==="docx"?["*.docx.json"]:["*.pptx.json"]){return{uri:"https://json-to-office.dev/schema/report/v1.0.0",fileMatch:e,schema:Aw()}}function jw(e=[`*.${Ce}.theme.json`]){return{uri:"https://json-to-office.dev/schemas/theme/v1.0.0",fileMatch:e,schema:Tw()}}function ta(e){var n,i,r;if(!(typeof e!="object"||e===null)){if(typeof((i=(n=e.properties)==null?void 0:n.name)==null?void 0:i.const)=="string"){const o=e.properties.name.const;e.description||(e.description=Rw(o)),(r=e.properties)!=null&&r.props&&Uw(o,e.properties.props)}Object.values(e).forEach(o=>{typeof o=="object"&&o!==null&&ta(o)})}}function Rw(e){return{docx:"Main document container - defines the overall document structure.",section:"Section container - groups content within a document section.",heading:"Heading element - displays headings with level and formatting.",paragraph:"Paragraph element - displays text with formatting.",columns:"Column layout - arranges content in multiple columns.",list:"List element - displays ordered or unordered lists.",statistic:"Statistic element - displays key metrics.",highcharts:"Highcharts chart - renders a chart from Highcharts options.",toc:"Table of contents - generates a document TOC.","text-box":"Text box element - a positioned box with text content.",pptx:"Main presentation container - defines the overall presentation structure.",slide:"Slide container - groups content elements within a single slide.",text:"Text element - displays text with formatting and positioning.",shape:"Shape element - geometric shapes with optional text and styling.",image:"Image element - displays images with sizing and positioning.",table:"Table element - displays tabular data with headers and rows.",custom:"Custom component - user-defined component type for specialized content."}[e]||`${e} component`}function Uw(e,n){if(!n.properties)return;const r={text:{text:"The text content to display",fontSize:"Font size in points",bold:"Whether to bold the text",color:"Text color as hex string",align:"Text alignment"},shape:{type:"Shape type (rect, ellipse, etc.)",text:"Text content inside the shape",fill:"Fill color"},heading:{text:"The heading text",level:"Heading level (1-6)"},paragraph:{text:"The paragraph text content"},image:{path:"Path or URL to the image",w:"Image width in inches",h:"Image height in inches"},table:{rows:"Array of rows, each containing cell values",colW:"Column widths"}}[e];r&&Object.entries(r).forEach(([o,a])=>{n.properties[o]&&(n.properties[o].description=a)})}function to(e,n=!0){if(!(typeof e!="object"||e===null)){if(e.$id&&/^T\d+$/.test(e.$id)&&delete e.$id,e.$ref&&/^T\d+$/.test(e.$ref)&&(n?e.$ref="#/definitions/ComponentDefinition":delete e.$ref),Array.isArray(e)){e.forEach(i=>to(i,n));return}Object.keys(e).forEach(i=>{typeof e[i]=="object"&&e[i]!==null&&to(e[i],n)})}}const ke="/api",Tt=`${ke}/${Ce}`,K0={discovery:{all:`${ke}/discovery/all`,plugins:`${ke}/discovery/plugins`,documents:`${ke}/discovery/documents`,themes:`${ke}/discovery/themes`,schemas:{document:`${ke}/discovery/schemas/document`,theme:`${ke}/discovery/schemas/theme`}},generate:`${Tt}/generate`,validate:`${Tt}/validate`,diff:`${Tt}/diff`,fonts:{catalog:`${ke}/fonts/catalog`,materialize:`${ke}/fonts/materialize`},preview:{libreoffice:`${Tt}/preview/libreoffice`,libreofficeFromJson:`${Tt}/preview/libreoffice-from-json`},renderers:`${Tt}/renderers`,cacheStats:`${Tt}/cache-stats`};class Mw{constructor(){rt(this,"documentSchemaCache",null);rt(this,"themeSchemaCache",null);rt(this,"pluginSchemaCache",new Map);rt(this,"cacheTimestamp",{});rt(this,"CACHE_DURATION",5*60*1e3);rt(this,"MAX_PLUGIN_CACHE",10);rt(this,"inFlight",new Map);rt(this,"cacheEpoch",0)}async fetchDocumentSchema(n,i,r){const o=i&&i.length>0?`+browser:${JSON.stringify(i)}`:"",a=n?`document-${[...n].sort().join(",")}${o}`:`document${o}`;if(!(r!=null&&r.bypassCache)){if(n||o){const d=this.pluginSchemaCache.get(a);if(d&&this.isCacheValid(a))return d}else if(this.documentSchemaCache&&this.isCacheValid("document"))return this.documentSchemaCache}const s=this.cacheEpoch,c=this.inFlight.get(a);if(c&&c.epoch>=s)return c.promise;const l=this.requestDocumentSchema(a,n,i,o,s).finally(()=>{var d;((d=this.inFlight.get(a))==null?void 0:d.promise)===l&&this.inFlight.delete(a)});return this.inFlight.set(a,{promise:l,epoch:s}),l}async requestDocumentSchema(n,i,r,o,a){try{let s;if(o)s=await fetch(`${ke}/discovery/schemas/document`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i?{plugins:i}:{},customComponents:r})});else{let l=`${ke}/discovery/schemas/document`;if(i){const d=new URLSearchParams;d.append("plugins",i.join(",")),l=`${l}?${d.toString()}`}s=await fetch(l)}if(!s.ok)throw new Error(`Failed to fetch document schema: ${s.statusText}`);const c=await s.json();if(!c.success||!c.data)throw new Error(c.error||"Failed to fetch document schema");if(a===this.cacheEpoch){if(i||o){if(this.pluginSchemaCache.size>=this.MAX_PLUGIN_CACHE){const l=this.pluginSchemaCache.keys().next().value;l&&this.pluginSchemaCache.delete(l)}this.pluginSchemaCache.set(n,c.data)}else this.documentSchemaCache=c.data;this.cacheTimestamp[n]=Date.now()}return c.data}catch(s){throw console.error("Error fetching document schema:",s),s}}async fetchThemeSchema(){if(this.themeSchemaCache&&this.isCacheValid("theme"))return this.themeSchemaCache;try{const n=await fetch(`${ke}/discovery/schemas/theme`);if(!n.ok)throw new Error(`Failed to fetch theme schema: ${n.statusText}`);const i=await n.json();if(!i.success||!i.data)throw new Error(i.error||"Failed to fetch theme schema");return this.themeSchemaCache=i.data,this.cacheTimestamp.theme=Date.now(),i.data}catch(n){throw console.error("Error fetching theme schema:",n),n}}async getSchemaForActiveTab(n){return n==="theme"?this.fetchThemeSchema():this.fetchDocumentSchema()}clearCache(){this.documentSchemaCache=null,this.themeSchemaCache=null,this.pluginSchemaCache.clear(),this.cacheTimestamp={},this.cacheEpoch++}clearPluginSchemaCache(){this.pluginSchemaCache.clear(),Object.keys(this.cacheTimestamp).forEach(n=>{n.startsWith("document-")&&delete this.cacheTimestamp[n]}),this.cacheEpoch++}isCacheValid(n){const i=this.cacheTimestamp[n];return i?Date.now()-i<this.CACHE_DURATION:!1}formatSchemaForDisplay(n){return JSON.stringify(n,null,2)}getSchemaMetadata(n){return{title:n.title,description:n.description,version:n.version||n.$id,$schema:n.$schema}}}const Bw=new Mw,Ew=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),Cw=new Set(["heading","body"]);function Dw(e){const n=[],i=[{kind:"object"}];let r=0;const o=[],a=h=>h===" "||h===" "||h===`
5
+ `||h==="\r",s=()=>{for(;r<e.length&&a(e[r]);)r++},c=()=>{const h=r;r++;let b="";for(;r<e.length;){const L=e[r];if(L==="\\"){const N=e[r+1];if(N==='"')b+='"';else if(N==="\\")b+="\\";else if(N==="/")b+="/";else if(N==="n")b+=`
6
+ `;else if(N==="r")b+="\r";else if(N==="t")b+=" ";else if(N==="u"){const I=e.slice(r+2,r+6);/^[0-9a-fA-F]{4}$/.test(I)?(b+=String.fromCharCode(parseInt(I,16)),r+=6):(b+="\\u",r+=2);continue}else b+=N??"";r+=2;continue}if(L==='"')return r++,{value:b,start:h,end:r};b+=L,r++}return{value:b,start:h,end:r}},l=()=>{for(;r<e.length;){const h=e[r];if(h===","||h==="}"||h==="]"||a(h))return;r++}},d=()=>{const h=i[i.length-1];return h?h.kind==="object"?h.key===void 0?o.slice():[...o,h.key]:h.kind==="array"?[...o,h.index??0]:o.slice():o.slice()},f=()=>{const h=i[i.length-1];if(!h||h.kind!=="object")return!1;const b=h.key;return!b||o.includes("fontRegistry")?!1:Ew.has(b)?!0:Cw.has(b)?o[o.length-1]==="fonts":!1},p=()=>{if(s(),r>=e.length)return;const h=e[r];if(h==='"'){const{value:b,start:L,end:N}=c();f()&&n.push({path:d(),value:b,valueStart:L,valueEnd:N});return}if(h==="{"){const b=i[i.length-1],L=(b==null?void 0:b.kind)==="object"?b.key:(b==null?void 0:b.kind)==="array"?b.index:void 0;L!==void 0&&o.push(L),r++,i.push({kind:"object",parentKey:L}),O(),i.pop(),L!==void 0&&o.pop();return}if(h==="["){const b=i[i.length-1],L=(b==null?void 0:b.kind)==="object"?b.key:(b==null?void 0:b.kind)==="array"?b.index:void 0;L!==void 0&&o.push(L),r++,i.push({kind:"array",index:0,parentKey:L}),u(),i.pop(),L!==void 0&&o.pop();return}l()},O=()=>{if(s(),e[r]==="}"){r++;return}for(;r<e.length;){if(s(),e[r]!=='"'){for(;r<e.length&&e[r]!=="}";)r++;e[r]==="}"&&r++;return}const{value:h}=c();if(s(),e[r]!==":")return;r++;const b=i[i.length-1];if(b&&(b.key=h),p(),b&&(b.key=void 0),s(),e[r]===","){r++;continue}if(e[r]==="}"){r++;return}return}},u=()=>{if(s(),e[r]==="]"){r++;return}for(;r<e.length;){if(p(),s(),e[r]===","){r++;const h=i[i.length-1];h&&h.kind==="array"&&(h.index=(h.index??0)+1);continue}if(e[r]==="]"){r++;return}return}};return s(),p(),n}const zw=Ja(e=>({open:!1,contextual:void 0,openFor:n=>e({open:!0,contextual:n}),close:()=>e({open:!1,contextual:void 0})})),Ea="jto.pickFont";let Nr=null,kr=null;function _w(e){Nr&&Nr.dispose(),kr&&kr.dispose(),kr=e.editor.registerCommand(Ea,(n,i,r)=>{zw.getState().openFor({jsonPath:i,currentValue:r})}),Nr=e.languages.registerCodeLensProvider("json",{provideCodeLenses(n){const i=n.getValue();return{lenses:Dw(i).map(o=>{const a=n.getPositionAt(o.valueStart),s=n.getPositionAt(o.valueEnd);return{range:{startLineNumber:a.lineNumber,startColumn:a.column,endLineNumber:s.lineNumber,endColumn:s.column},id:`jto-pick-font-${o.valueStart}`,command:{id:Ea,title:o.value?`Pick font… (current: ${o.value})`:"Pick font…",arguments:[o.path,o.value]}}}),dispose:()=>{}}},resolveCodeLens(n,i){return i}})}const jc="jto-light",Rc="jto-dark",Ww={surface:"#ffffff",popover:"#ffffff",foreground:"#1a1f2e",muted:"#546f9c",border:"#e2e6ed",fill:"#f8f9fc",lineHighlight:"#edeff3",selection:"#4f7ef833",inserted:"#16a34a26",removed:"#ef444426"},qw={surface:"#282c3e",popover:"#32374e",foreground:"#fafafa",muted:"#a4b2cc",border:"#494e65",fill:"#3b4054",lineHighlight:"#3b405499",selection:"#85a6fa33",inserted:"#34d39926",removed:"#fca5a526"};function Ca(e){return{"editor.background":e.surface,"editor.foreground":e.foreground,"editor.lineHighlightBackground":e.lineHighlight,"editor.lineHighlightBorder":"#00000000","editor.selectionBackground":e.selection,"editor.inactiveSelectionBackground":e.fill,"editorCursor.foreground":e.foreground,"editorGutter.background":e.surface,"editorLineNumber.foreground":`${e.muted}99`,"editorLineNumber.activeForeground":e.foreground,"editorIndentGuide.background1":e.border,"editorIndentGuide.activeBackground1":e.muted,"editorWhitespace.foreground":e.border,"editorWidget.background":e.popover,"editorWidget.border":e.border,"editorSuggestWidget.background":e.popover,"editorSuggestWidget.border":e.border,"editorSuggestWidget.selectedBackground":e.fill,"editorSuggestWidget.foreground":e.foreground,"editorHoverWidget.background":e.popover,"editorHoverWidget.border":e.border,"input.background":e.surface,"input.border":e.border,"dropdown.background":e.popover,"dropdown.border":e.border,"list.hoverBackground":e.fill,"list.activeSelectionBackground":e.fill,"list.activeSelectionForeground":e.foreground,"scrollbar.shadow":"#00000000","scrollbarSlider.background":`${e.muted}33`,"scrollbarSlider.hoverBackground":`${e.muted}55`,"scrollbarSlider.activeBackground":`${e.muted}77`,"diffEditor.insertedTextBackground":e.inserted,"diffEditor.removedTextBackground":e.removed,"diffEditor.border":e.border,"editorGroupHeader.tabsBackground":e.fill,"editorOverviewRuler.border":"#00000000"}}let Da=!1;function Hw(e){Da||(e.editor.defineTheme(jc,{base:"vs",inherit:!0,rules:[],colors:Ca(Ww)}),e.editor.defineTheme(Rc,{base:"vs-dark",inherit:!0,rules:[],colors:Ca(qw)}),Da=!0)}function G0(e){return e==="dark"?Rc:jc}const Kw={docx:[{id:"docx/table-width",label:"Table width",category:"integrity",defaultSeverity:"warning",description:"Explicit column widths that sum past the usable width of their section.",parameters:[{name:"toleranceTwips",type:"number",default:10,description:"Slack before an overflow counts, in twips (20 = 1pt)."}]},{id:"docx/heading-hierarchy",label:"Heading hierarchy",category:"hierarchy",defaultSeverity:"info",description:"A heading that skips a level and breaks the outline.",parameters:[]},{id:"docx/text-fit",label:"Text fit",category:"integrity",defaultSeverity:"warning",description:"A word too wide for its floating frame, or a frame whose wrapped text runs off the sheet.",parameters:[{name:"widthTolerance",type:"number",default:1.08,description:"How far past the frame the estimate must reach before it counts — 1.08 is the measured error of the width model."}]},{id:"docx/frame-collision",label:"Frame collision",category:"integrity",defaultSeverity:"warning",description:"Two page-anchored frames whose estimated text lands on the same region of a page.",parameters:[{name:"minOverlapWidthTwips",type:"number",default:240,description:"Shared width before an overlap counts, in twips (240 = 12pt)."},{name:"minOverlapLines",type:"number",default:1,description:"Shared height, in lines of text. Below one line the overlap costs no words."}]},{id:"docx/svg-text-bounds",label:"SVG text bounds",category:"integrity",defaultSeverity:"warning",description:"A text baseline outside an inline SVG’s viewBox, so the words are never painted.",parameters:[]},{id:"docx/line-box",label:"Line box",category:"legibility",defaultSeverity:"warning",description:"An `exactly` line box shorter than the capitals it has to hold.",parameters:[{name:"minimumLineBoxRatio",type:"number",default:.7,description:"Smallest line box as a fraction of font size. 0.7 em is cap height on the faces the stock templates use."}]},{id:"docx/placeholder-text",label:"Placeholder text",category:"integrity",defaultSeverity:"warning",description:"An unfilled scaffold slot, or leftover filler copy.",parameters:[]},{id:"docx/slot-budget",label:"Slot budget",category:"composition",defaultSeverity:"warning",description:"A block slot holding more words than its budget allows — a takeaway past the word count the block sets.",parameters:[]},{id:"docx/chart-design",label:"Chart design",category:"information-design",defaultSeverity:"warning",description:"What a chart claims about its numbers: the comparison, the palette, the unit and the caption.",parameters:[{name:"maximumSeries",type:"number",default:4,description:"Series before the reader spends the chart on its legend."},{name:"maximumSlices",type:"number",default:6,description:"Slices before a pie’s wedges are too close in angle to rank by eye."}]},{id:"docx/table-design",label:"Table design",category:"information-design",defaultSeverity:"warning",description:"How a table lays its numbers out: alignment, rounding, rules and length.",parameters:[{name:"maximumRows",type:"number",default:25,description:"Rows before a table is a data dump rather than something read in place."}]},{id:"docx/font-count",label:"Font count",category:"brand",defaultSeverity:"warning",description:"Distinct font families the document can paint.",parameters:[{name:"maximumFamilies",type:"number",default:3,description:"Families before a document reads as assembled rather than designed."}]},{id:"docx/palette-adherence",label:"Palette adherence",category:"brand",defaultSeverity:"info",description:"A literal colour the resolved theme does not define.",parameters:[]},{id:"docx/required-chrome",label:"Required chrome",category:"consistency",defaultSeverity:"warning",description:"A block slot with a role a profile or policy requires — a takeaway, a source — left empty. Off until one names roles.",parameters:[{name:"required",type:"string-list",default:[],description:"Slot roles every block that declares them must fill: actionTitle, takeaway, source, tracker, footer."}]},{id:"docx/running-head",label:"Running head",category:"consistency",defaultSeverity:"warning",description:"A body section without the running head a profile or policy expects. Off until one names parts.",parameters:[{name:"required",type:"string-list",default:[],description:"Parts every section from fromSection on must carry: header, footer, pageNumber."},{name:"fromSection",type:"number",default:1,description:"Zero-based index of the first section that owes a running head; 1 leaves the cover section clean."}]},{id:"docx/exhibit-required",label:"Exhibit required",category:"composition",defaultSeverity:"warning",description:"Fewer data exhibits — charts, or tables of two or more columns — than a profile or policy expects. Off until one sets a minimum.",parameters:[{name:"minimumExhibits",type:"number",default:1,description:"Charts plus tables of two or more columns the document must carry; a kpi-row does not count."}]},{id:"docx/type-scale",label:"Type scale",category:"consistency",defaultSeverity:"warning",description:"An authored size the theme never paints: not a style, not a font role, not a step of its scale. Off until a profile or policy enables it.",parameters:[]},{id:"docx/size-count",label:"Size count",category:"consistency",defaultSeverity:"warning",description:"More distinct text sizes than maximumSizes allows, blocks included. Off until a profile or policy enables it.",parameters:[{name:"maximumSizes",type:"number",default:8,description:"Distinct sizes a document may paint; the client-report profile keeps the default."}]},{id:"docx/role-drift",label:"Role drift",category:"consistency",defaultSeverity:"warning",description:"One heading level, table role or paragraph style painted at two sizes; the theme size is the fix. Off until a profile or policy enables it.",parameters:[]}],pptx:[{id:"pptx/canvas",label:"Canvas",category:"composition",defaultSeverity:"info",description:"Slide dimensions: partially declared, legacy 4:3, or a size matching no known preset.",parameters:[]},{id:"pptx/minimum-font-size",label:"Minimum font size",category:"legibility",defaultSeverity:"warning",description:"Text below the size a projected slide can carry.",parameters:[{name:"minimumFontPt",type:"number",default:7,description:"Smallest acceptable point size. The executive profile raises this to 14."}]},{id:"pptx/text-fit",label:"Text fit",category:"integrity",defaultSeverity:"info",description:"Estimated text height against its box. An estimate, not a measurement.",parameters:[{name:"characterWidthFactor",type:"number",default:.46,description:"Average glyph width as a fraction of point size. Tuned against rendered ground truth — changing it moves both detection and false alarms."},{name:"safetyBufferPt",type:"number",default:8,description:"Slack before a tight fit is called an overflow."}]},{id:"pptx/slide-density",label:"Slide density",category:"information-design",defaultSeverity:"warning",description:"Body word count per slide.",parameters:[{name:"maximumBodyWords",type:"number",default:130,description:"Words before a slide reads as dense. The executive profile lowers this to 70."}]},{id:"pptx/text-contrast",label:"Text contrast",category:"accessibility",defaultSeverity:"warning",description:"Text against the surface behind it, judged by WCAG AA. Text over an image or a chart is skipped.",parameters:[{name:"normalRatio",type:"number",default:4.5,description:"Contrast ratio normal text has to clear."},{name:"largeRatio",type:"number",default:3,description:"Contrast ratio large text has to clear."},{name:"largeTextPt",type:"number",default:18,description:"Point size from which text counts as large."},{name:"largeBoldTextPt",type:"number",default:14,description:"Point size from which bold text counts as large."}]},{id:"pptx/placeholder-text",label:"Placeholder text",category:"integrity",defaultSeverity:"warning",description:"An unfilled scaffold slot, or leftover filler copy.",parameters:[]},{id:"pptx/box-overlap",label:"Box overlap",category:"integrity",defaultSeverity:"info",description:"Two opaque boxes on one slide that land on each other. A duplicate, or anything covering data, is a warning.",parameters:[{name:"minimumOverlapPt",type:"number",default:4,description:"Overlap on both axes before two boxes count as colliding, in points."},{name:"minimumAreaRatio",type:"number",default:.15,description:"Overlap as a fraction of the smaller box before it is reported."}]},{id:"pptx/chart-design",label:"Chart design",category:"information-design",defaultSeverity:"warning",description:"What a chart claims about its numbers: the comparison, the scale, the palette and the unit.",parameters:[{name:"maximumSeries",type:"number",default:4,description:"Series before the reader spends the chart on its legend."},{name:"maximumSlices",type:"number",default:6,description:"Slices before a pie’s wedges are too close in angle to rank by eye."}]},{id:"pptx/table-design",label:"Table design",category:"information-design",defaultSeverity:"warning",description:"How a table lays its numbers out: alignment, rounding, rules and length.",parameters:[{name:"maximumRows",type:"number",default:12,description:"Rows a slide table can carry at a size an audience can read."}]},{id:"pptx/font-count",label:"Font count",category:"brand",defaultSeverity:"warning",description:"Distinct font families the deck can paint.",parameters:[{name:"maximumFamilies",type:"number",default:3,description:"Families before a deck reads as assembled rather than designed."}]},{id:"pptx/palette-adherence",label:"Palette adherence",category:"brand",defaultSeverity:"info",description:"A literal colour the resolved theme does not define.",parameters:[]},{id:"pptx/off-canvas",label:"Off canvas",category:"integrity",defaultSeverity:"warning",description:"Text ink drawn past the edge of the slide.",parameters:[{name:"tolerancePt",type:"number",default:2,description:"Overrun in points to forgive as renderer rounding."},{name:"characterWidthFactor",type:"number",default:.46,description:"Average glyph advance as a fraction of the font size, for the ink estimate."}]},{id:"pptx/slot-budget",label:"Slot budget",category:"composition",defaultSeverity:"warning",description:"A block slot over the word budget its definition declares.",parameters:[]},{id:"pptx/required-chrome",label:"Required chrome",category:"consistency",defaultSeverity:"warning",description:"A block slot with a role a profile or policy requires — a takeaway, a source — left empty. Off until one names roles.",parameters:[{name:"required",type:"string-list",default:[],description:"Slot roles every block that declares them must fill: actionTitle, takeaway, source, tracker, footer."}]},{id:"pptx/action-title",label:"Action title length",category:"hierarchy",defaultSeverity:"warning",description:"An action-title slot that wraps past the lines a profile or policy allows. Off at 0.",parameters:[{name:"maxLines",type:"number",default:0,description:"Lines an action title may take in the box its definition drew; 0 disables the rule."}]}]};function Gw(){return Kw[Ce]}const Vw="inmemory://jto/quality-policy.json",Jw="https://json-to-office.dev/schema/quality-policy/v1",Xw={enum:["error","warning","info"],description:"Overrides the severity this rule reports at."};function Yw(){const e=Gw(),n={};for(const i of e){const r={};for(const o of i.parameters)r[o.name]=o.type==="string-list"?{type:"array",items:{type:"string"},default:[...o.default],description:`${o.description} (default ${JSON.stringify(o.default)})`}:{type:"number",default:o.default,description:`${o.description} (default ${o.default})`};n[i.id]={type:"object",description:`${i.description} Category ${i.category}; reports at ${i.defaultSeverity} by default.`,properties:{enabled:{type:"boolean",description:"Set false to switch this rule off for the run."},severity:{type:"string",...Xw},...i.parameters.length>0&&{parameters:{type:"object",description:"Tuning for this rule.",properties:r,additionalProperties:!1}}},additionalProperties:!1}}return{uri:Jw,fileMatch:[Vw,"*quality-policy.json"],schema:{type:"object",title:"Quality run policy",description:"Per-run rule configuration. The gate and profile have their own controls and are not set here.",properties:{rules:{type:"object",description:"Overrides keyed by rule id.",properties:n,additionalProperties:!1},suppressions:{type:"array",description:"Findings to mute. Every entry must say why, so a muted rule stays accountable.",items:{type:"object",required:["reason"],properties:{ruleId:{type:"string",enum:e.map(i=>i.id),description:"Mute this rule."},code:{type:"string",description:"Mute this diagnostic code, e.g. W_QUALITY_HEADING_SKIP."},path:{type:"string",description:"RFC 6901 pointer the suppression applies to."},pathMatch:{enum:["exact","subtree"],description:"`subtree` also mutes everything beneath `path`. Defaults to exact."},reason:{type:"string",minLength:1,description:"Why this finding is acceptable here."}},additionalProperties:!1}},maxDiagnostics:{type:"integer",minimum:0,description:"Stop after this many diagnostics. The report is marked truncated."},onRuleError:{enum:["continue","throw"],description:"What a crashing rule does: report and carry on, or fail the run."}},additionalProperties:!1}}}const Zw=Ja((e,n)=>({editors:new Map,activeEditorName:null,registerEditor:(i,r,o,a,s,c)=>{e(l=>{const d=new Map(l.editors);return d.set(i,{editor:r,monaco:o,documentName:i,toStorageValue:a??(f=>f),collapse:s,flushPendingSave:c}),{editors:d}})},unregisterEditor:i=>{e(r=>{const o=new Map(r.editors);return o.delete(i),{editors:o,activeEditorName:r.activeEditorName===i?null:r.activeEditorName}})},setActiveEditor:i=>{e({activeEditorName:i})},getActiveEditor:()=>{const i=n();return i.activeEditorName&&i.editors.get(i.activeEditorName)||null},getEditor:i=>n().editors.get(i)||null,getEditorForModel:i=>{for(const r of n().editors.values())if(r.editor.getModel()===i)return r;return null}})),Qw=3e4;let Ar=null;function Uc(){return Ar??(Ar=fetch(`${ke}/discovery/blocks`).then(async e=>{if(!e.ok)throw new Error(`Block discovery failed: ${e.statusText}`);const n=await e.json();if(!n.success||!n.data)throw new Error(n.error||"Block discovery failed");return n.data}).catch(e=>(console.warn("[blocks] reference catalog unavailable:",e),setTimeout(()=>{Ar=null},Qw),[]))),Ar}function e0(e,n=!1){const i=e.length;let r=0,o="",a=0,s=16,c=0,l=0,d=0,f=0,p=0;function O(w,D){let _=0,T=0;for(;_<w;){let A=e.charCodeAt(r);if(A>=48&&A<=57)T=T*16+A-48;else if(A>=65&&A<=70)T=T*16+A-65+10;else if(A>=97&&A<=102)T=T*16+A-97+10;else break;r++,_++}return _<w&&(T=-1),T}function u(w){r=w,o="",a=0,s=16,p=0}function h(){let w=r;if(e.charCodeAt(r)===48)r++;else for(r++;r<e.length&&tn(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&tn(e.charCodeAt(r)))for(r++;r<e.length&&tn(e.charCodeAt(r));)r++;else return p=3,e.substring(w,r);let D=r;if(r<e.length&&(e.charCodeAt(r)===69||e.charCodeAt(r)===101))if(r++,(r<e.length&&e.charCodeAt(r)===43||e.charCodeAt(r)===45)&&r++,r<e.length&&tn(e.charCodeAt(r))){for(r++;r<e.length&&tn(e.charCodeAt(r));)r++;D=r}else p=3;return e.substring(w,D)}function b(){let w="",D=r;for(;;){if(r>=i){w+=e.substring(D,r),p=2;break}const _=e.charCodeAt(r);if(_===34){w+=e.substring(D,r),r++;break}if(_===92){if(w+=e.substring(D,r),r++,r>=i){p=2;break}switch(e.charCodeAt(r++)){case 34:w+='"';break;case 92:w+="\\";break;case 47:w+="/";break;case 98:w+="\b";break;case 102:w+="\f";break;case 110:w+=`
7
+ `;break;case 114:w+="\r";break;case 116:w+=" ";break;case 117:const A=O(4);A>=0?w+=String.fromCharCode(A):p=4;break;default:p=5}D=r;continue}if(_>=0&&_<=31)if(Pn(_)){w+=e.substring(D,r),p=2;break}else p=6;r++}return w}function L(){if(o="",p=0,a=r,l=c,f=d,r>=i)return a=i,s=17;let w=e.charCodeAt(r);if(Tr(w)){do r++,o+=String.fromCharCode(w),w=e.charCodeAt(r);while(Tr(w));return s=15}if(Pn(w))return r++,o+=String.fromCharCode(w),w===13&&e.charCodeAt(r)===10&&(r++,o+=`
8
+ `),c++,d=r,s=14;switch(w){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=b(),s=10;case 47:const D=r-1;if(e.charCodeAt(r+1)===47){for(r+=2;r<i&&!Pn(e.charCodeAt(r));)r++;return o=e.substring(D,r),s=12}if(e.charCodeAt(r+1)===42){r+=2;const _=i-1;let T=!1;for(;r<_;){const A=e.charCodeAt(r);if(A===42&&e.charCodeAt(r+1)===47){r+=2,T=!0;break}r++,Pn(A)&&(A===13&&e.charCodeAt(r)===10&&r++,c++,d=r)}return T||(r++,p=1),o=e.substring(D,r),s=13}return o+=String.fromCharCode(w),r++,s=16;case 45:if(o+=String.fromCharCode(w),r++,r===i||!tn(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=h(),s=11;default:for(;r<i&&N(w);)r++,w=e.charCodeAt(r);if(a!==r){switch(o=e.substring(a,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(w),r++,s=16}}function N(w){if(Tr(w)||Pn(w))return!1;switch(w){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function I(){let w;do w=L();while(w>=12&&w<=15);return w}return{setPosition:u,getPosition:()=>r,scan:n?I:L,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-f,getTokenError:()=>p}}function Tr(e){return e===32||e===9}function Pn(e){return e===10||e===13}function tn(e){return e>=48&&e<=57}var za;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(za||(za={}));new Array(20).fill(0).map((e,n)=>" ".repeat(n));const nn=200;new Array(nn).fill(0).map((e,n)=>`
9
+ `+" ".repeat(n)),new Array(nn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(nn).fill(0).map((e,n)=>`\r
10
+ `+" ".repeat(n)),new Array(nn).fill(0).map((e,n)=>`
11
+ `+" ".repeat(n)),new Array(nn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(nn).fill(0).map((e,n)=>`\r
12
+ `+" ".repeat(n));var En;(function(e){e.DEFAULT={allowTrailingComma:!1}})(En||(En={}));function t0(e,n){const i=[],r=new Object;let o;const a={value:{},offset:0,length:0,type:"object",parent:void 0};let s=!1;function c(l,d,f,p){a.value=l,a.offset=d,a.length=f,a.type=p,a.colonOffset=void 0,o=a}try{na(e,{onObjectBegin:(l,d)=>{if(n<=l)throw r;o=void 0,s=n>l,i.push("")},onObjectProperty:(l,d,f)=>{if(n<d||(c(l,d,f,"property"),i[i.length-1]=l,n<=d+f))throw r},onObjectEnd:(l,d)=>{if(n<=l)throw r;o=void 0,i.pop()},onArrayBegin:(l,d)=>{if(n<=l)throw r;o=void 0,i.push(0)},onArrayEnd:(l,d)=>{if(n<=l)throw r;o=void 0,i.pop()},onLiteralValue:(l,d,f)=>{if(n<d||(c(l,d,f,Bc(l)),n<=d+f))throw r},onSeparator:(l,d,f)=>{if(n<=d)throw r;if(l===":"&&o&&o.type==="property")o.colonOffset=d,s=!1,o=void 0;else if(l===","){const p=i[i.length-1];typeof p=="number"?i[i.length-1]=p+1:(s=!0,i[i.length-1]=""),o=void 0}}})}catch(l){if(l!==r)throw l}return{path:i,previousNode:o,isAtPropertyKey:s,matches:l=>{let d=0;for(let f=0;d<l.length&&f<i.length;f++)if(l[d]===i[f]||l[d]==="*")d++;else if(l[d]!=="**")return!1;return d===l.length}}}function n0(e,n=[],i=En.DEFAULT){let r=null,o=[];const a=[];function s(l){Array.isArray(o)?o.push(l):r!==null&&(o[r]=l)}return na(e,{onObjectBegin:()=>{const l={};s(l),a.push(o),o=l,r=null},onObjectProperty:l=>{r=l},onObjectEnd:()=>{o=a.pop()},onArrayBegin:()=>{const l=[];s(l),a.push(o),o=l,r=null},onArrayEnd:()=>{o=a.pop()},onLiteralValue:s,onError:(l,d,f)=>{n.push({error:l,offset:d,length:f})}},i),o[0]}function i0(e,n=[],i=En.DEFAULT){let r={type:"array",offset:-1,length:-1,children:[],parent:void 0};function o(l){r.type==="property"&&(r.length=l-r.offset,r=r.parent)}function a(l){return r.children.push(l),l}na(e,{onObjectBegin:l=>{r=a({type:"object",offset:l,length:-1,parent:r,children:[]})},onObjectProperty:(l,d,f)=>{r=a({type:"property",offset:d,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:l,offset:d,length:f,parent:r})},onObjectEnd:(l,d)=>{o(l+d),r.length=l+d-r.offset,r=r.parent,o(l+d)},onArrayBegin:(l,d)=>{r=a({type:"array",offset:l,length:-1,parent:r,children:[]})},onArrayEnd:(l,d)=>{r.length=l+d-r.offset,r=r.parent,o(l+d)},onLiteralValue:(l,d,f)=>{a({type:Bc(l),offset:d,length:f,parent:r,value:l}),o(d+f)},onSeparator:(l,d,f)=>{r.type==="property"&&(l===":"?r.colonOffset=d:l===","&&o(d))},onError:(l,d,f)=>{n.push({error:l,offset:d,length:f})}},i);const c=r.children[0];return c&&delete c.parent,c}function r0(e,n){if(!e)return;let i=e;for(let r of n)if(typeof r=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;let o=!1;for(const a of i.children)if(Array.isArray(a.children)&&a.children[0].value===r&&a.children.length===2){i=a.children[1],o=!0;break}if(!o)return}else{const o=r;if(i.type!=="array"||o<0||!Array.isArray(i.children)||o>=i.children.length)return;i=i.children[o]}return i}function no(e){switch(e.type){case"array":return e.children.map(no);case"object":const n=Object.create(null);for(let i of e.children){const r=i.children[1];r&&(n[i.children[0].value]=no(r))}return n;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function o0(e,n,i=!1){return n>=e.offset&&n<e.offset+e.length||i&&n===e.offset+e.length}function Mc(e,n,i=!1){if(o0(e,n,i)){const r=e.children;if(Array.isArray(r))for(let o=0;o<r.length&&r[o].offset<=n;o++){const a=Mc(r[o],n,i);if(a)return a}return e}}function na(e,n,i=En.DEFAULT){const r=e0(e,!1),o=[];let a=0;function s(y){return y?()=>a===0&&y(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function c(y){return y?F=>a===0&&y(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(y){return y?F=>a===0&&y(F,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice()):()=>!0}function d(y){return y?()=>{a>0?a++:y(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>o.slice())===!1&&(a=1)}:()=>!0}function f(y){return y?()=>{a>0&&a--,a===0&&y(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:()=>!0}const p=d(n.onObjectBegin),O=l(n.onObjectProperty),u=f(n.onObjectEnd),h=d(n.onArrayBegin),b=f(n.onArrayEnd),L=l(n.onLiteralValue),N=c(n.onSeparator),I=s(n.onComment),w=c(n.onError),D=i&&i.disallowComments,_=i&&i.allowTrailingComma;function T(){for(;;){const y=r.scan();switch(r.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:D||A(11);break;case 2:A(12);break;case 6:A(16);break}switch(y){case 12:case 13:D?A(10):I();break;case 16:A(1);break;case 15:case 14:break;default:return y}}}function A(y,F=[],Y=[]){if(w(y),F.length+Y.length>0){let ce=r.getToken();for(;ce!==17;){if(F.indexOf(ce)!==-1){T();break}else if(Y.indexOf(ce)!==-1)break;ce=T()}}}function W(y){const F=r.getTokenValue();return y?L(F):(O(F),o.push(F)),T(),!0}function k(){switch(r.getToken()){case 11:const y=r.getTokenValue();let F=Number(y);isNaN(F)&&(A(2),F=0),L(F);break;case 7:L(null);break;case 8:L(!0);break;case 9:L(!1);break;default:return!1}return T(),!0}function R(){return r.getToken()!==10?(A(3,[],[2,5]),!1):(W(!1),r.getToken()===6?(N(":"),T(),X()||A(4,[],[2,5])):A(5,[],[2,5]),o.pop(),!0)}function J(){p(),T();let y=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(y||A(4,[],[]),N(","),T(),r.getToken()===2&&_)break}else y&&A(6,[],[]);R()||A(4,[],[2,5]),y=!0}return u(),r.getToken()!==2?A(7,[2],[]):T(),!0}function Q(){h(),T();let y=!0,F=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(F||A(4,[],[]),N(","),T(),r.getToken()===4&&_)break}else F&&A(6,[],[]);y?(o.push(0),y=!1):o[o.length-1]++,X()||A(4,[],[4,5]),F=!0}return b(),y||o.pop(),r.getToken()!==4?A(8,[4],[]):T(),!0}function X(){switch(r.getToken()){case 3:return Q();case 1:return J();case 10:return W(!0);default:return k()}}return T(),r.getToken()===17?i.allowEmptyContent?!0:(A(4,[],[]),!1):X()?(r.getToken()!==17&&A(9,[],[]),!0):(A(4,[],[]),!1)}function Bc(e){switch(typeof e){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(e){if(Array.isArray(e))return"array"}else return"null";return"object"}default:return"null"}}var _a;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(_a||(_a={}));var Wa;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(Wa||(Wa={}));const a0=t0,s0=n0,Ec=i0,dn=r0,l0=Mc,c0=no;var qa;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(qa||(qa={}));const d0={pptx:["slide","group"],docx:["docx","section","group"]};function Ha(e,n){const i=dn(e,[...n,"name"]);return(i==null?void 0:i.type)==="string"?i.value:void 0}function p0(e,n){return!e.slice(n.offset,n.offset+n.length).includes(`
13
+ `)}function ia(e){try{return Ec(e,[],{allowTrailingComma:!0})}catch{return}}function u0(e,n,i,r=ia(e)){var O,u,h;if(!r)return null;const o=a0(e,n),a=o.path,s=l0(r,n,!0);if(!o.isAtPropertyKey&&a.length>=2&&a[a.length-1]==="ref"&&a[a.length-2]==="props"&&Ha(r,a.slice(0,-2))==="block"&&(s==null?void 0:s.type)==="string")return{kind:"ref",replace:{offset:s.offset,length:s.length}};let c=-1;for(let b=a.length-1;b>=1;b--)if(typeof a[b]=="number"&&a[b-1]==="children"){c=b;break}if(c<0)return null;const l=Ha(r,a.slice(0,c-1));if(!l||!d0[i].includes(l))return null;const d=dn(r,a.slice(0,c+1));if(!d){const b=dn(r,a.slice(0,c));return(b==null?void 0:b.type)!=="array"||(((O=b.children)==null?void 0:O.length)??0)>0?null:{kind:"component",replace:{offset:n,length:0}}}if(d.type!=="object"||!p0(e,d))return null;const f=d.children??[];return!(f.length===0||f.length===1&&["","name"].includes(String(((h=(u=f[0].children)==null?void 0:u[0])==null?void 0:h.value)??"")))||a.length>c+2?null:{kind:"component",replace:{offset:d.offset,length:d.length}}}function m0(e){return e.replace(/[\\$}]/g,n=>`\\${n}`)}function Ka(e,n=" "){const i=[],r=s=>`\x07${s}\x07`,o=Object.fromEntries(Object.entries(e.props.slots??{}).map(([s,c])=>[s,typeof c=="string"?r(i.push(c)):c]));return JSON.stringify({name:"block",props:{ref:e.props.ref,slots:o}},null,n).replace(/"\\u0007(\d+)\\u0007"/g,(s,c)=>{const l=JSON.stringify(i[Number(c)-1]).slice(1,-1);return`"\${${c}:${m0(l)}}"`})}function Cc(e){var n;return((n=/\n([ \t]+)\S/.exec(e))==null?void 0:n[1])??" "}function f0(e,n){var r;const i=e.lastIndexOf(`
14
+ `,n-1)+1;return((r=/^[ \t]*/.exec(e.slice(i,n)))==null?void 0:r[0])??""}function g0(e,n){return e.split(`
15
+ `).map((i,r)=>r===0?i:n+i).join(`
16
+ `)}function h0(e,n,i=ia(e)){var L;if(!i||i.type!=="object")return[];const r=Cc(e),o=dn(i,["props","blocks"]),a=dn(i,["props"]),s=new Set((o==null?void 0:o.type)==="object"?(o.children??[]).map(N=>{var I,w;return String(((w=(I=N.children)==null?void 0:I[0])==null?void 0:w.value)??"")}):[]),c=Object.entries(n).filter(([N])=>!s.has(N));if(!c.length)return[];const l=(o==null?void 0:o.type)==="object"?o:(a==null?void 0:a.type)==="object"?a:i,d=l===o?1:l===a?2:3,f=f0(e,l.offset),p=N=>f+r.repeat(N),O=c.map(([N,I])=>`${p(d)}${JSON.stringify(N)}: ${g0(JSON.stringify(I,null,r),p(d))}`).join(`,
17
+ `),u=l===o?O:l===a?`${p(1)}"blocks": {
18
+ ${O}
19
+ ${p(1)}}`:`${p(1)}"props": {
20
+ ${p(2)}"blocks": {
21
+ ${O}
22
+ ${p(2)}}
23
+ ${p(1)}}`,b=(((L=l.children)==null?void 0:L.length)??0)>0?`
24
+ ${u},`:`
25
+ ${u}
26
+ ${f}`;return[{offset:l.offset+1,length:0,content:b}]}function b0(e,n,i){const r={};for(const o of[...e.dependencies,e.name]){if(o in i)continue;const a=n.find(s=>s.template===e.template&&s.name===o);a&&(r[o]=a.definition)}return r}function O0(e,n,i){const r=ia(e),o=u0(e,n,i.format,r);if(!o)return[];const a=e.slice(o.replace.offset,n).replace(/[\w-]*$/,""),s=(u,h,b,L,N,I)=>({kind:u,label:h,detail:b,documentation:L,insertText:N,filterText:a+h,replace:o.replace,additionalEdits:I}),c=i.references.filter(u=>u.format===i.format&&!(u.name in i.definitions)),l=u=>h0(e,b0(u,i.references,i.definitions),r);if(o.kind==="ref")return c.map(u=>s("ref",u.name,`block from ${u.template}`,u.description,JSON.stringify(u.name),l(u)));const d=Cc(e);let f=i.document;if(f===void 0)try{f=s0(e,[],{allowTrailingComma:!0})}catch{f=void 0}const p=Object.entries(i.definitions).map(([u,h])=>s("component",u,"block defined in this document",h.description??"",Ka(xx(u,h,{document:f,format:i.format}),d),[])),O=c.map(u=>s("component",u.name,`block from ${u.template}`,u.description,Ka(u.example,d),l(u)));return[...p,...O]}function y0(e){if(!e.trim())return{};let n;try{n=Ec(e,[],{allowTrailingComma:!0})}catch{return{}}if(!n)return{};const i=dn(n,["props","blocks"]);if(!i||i.type!=="object")return{};const r={};for(const o of i.children??[]){if(o.type!=="property"||!o.children)continue;const[a,s]=o.children,c=a==null?void 0:a.value;if(typeof c!="string"||!s)continue;let l;try{l=c0(s)}catch{continue}or(Bl,l)&&(r[c]=l)}return r}function Dc(e){return JSON.stringify(e)}let io=!1,ui=null,ro=[],Fr=[],jr=0,Pi=null,ra={},Ga=Dc({});const $i="https://json-to-office.dev/schema/report/v1.0.0";async function oa(){if(!io)try{const e=await nd.init();aa(e),io=!0,console.log("Monaco configured globally with JSON schemas")}catch(e){console.error("Failed to configure Monaco globally:",e)}}function zc(e){return e.replace(/,(\s*[}\]])/g,"$1")}function aa(e){Hw(e),e.languages.json.jsonDefaults.setModeConfiguration({documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!1,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0}),e.languages.registerDocumentFormattingEditProvider("json",{provideDocumentFormattingEdits(i){const r=i.getValue(),o=zc(r);try{const a=JSON.parse(o),s=JSON.stringify(a,null,2);return[{range:i.getFullModelRange(),text:s}]}catch{return[{range:i.getFullModelRange(),text:o}]}}}),P0(e),Uc(),_w(e);const n=Fw();Ii(n.schema),Pi=n.schema,sa(e),console.log("Monaco instance configured with schemas:",{reportSchema:{uri:$i,fileMatch:n.fileMatch,schemaKeys:Object.keys(n.schema)}})}function x0(e){return Ce==="pptx"?Dx(e):xS(e)}function sa(e){if(!Pi)return;const n=JSON.parse(JSON.stringify(Pi));ro.length&&L0(n,ro),yx(n,ra,x0(n));const i={uri:$i,fileMatch:["*.docx.json","*.pptx.json"],schema:n};e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,allowComments:!1,trailingCommas:"error",schemaValidation:"error",schemas:[i,jw(),Yw()],schemaRequest:"ignore"})}function S0(e,n){const i=Dc(n);return i===Ga?!1:(ra=n,Ga=i,sa(e),!0)}async function w0(){io=!1,await oa()}function Ii(e){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(n=>Ii(n));return}delete e.discriminator;for(const n of Object.values(e))Ii(n)}}function L0(e,n){var o,a,s,c,l,d,f,p,O;function i(u){if(!u)return;const h=u.anyOf??u.oneOf;if(Array.isArray(h)){h.forEach(i);return}if(u.type!=="string")return;const b=Array.isArray(u.examples)?u.examples:[];u.examples=[...new Set([...b,...n])]}i((s=(a=(o=e==null?void 0:e.properties)==null?void 0:o.props)==null?void 0:a.properties)==null?void 0:s.theme);const r=u=>{var h;return typeof(u==null?void 0:u.$ref)=="string"?(h=e==null?void 0:e.definitions)==null?void 0:h[u.$ref.replace("#/definitions/","")]:u};for(const u of qr(e)){const h=r(u);i((d=(l=(c=h==null?void 0:h.properties)==null?void 0:c.props)==null?void 0:l.properties)==null?void 0:d.theme);for(const b of qr(h))i((O=(p=(f=b==null?void 0:b.properties)==null?void 0:f.props)==null?void 0:p.properties)==null?void 0:O.theme)}}function v0(e,n){return e===void 0?n.languages.CompletionItemKind.Property:{1:n.languages.CompletionItemKind.Text,2:n.languages.CompletionItemKind.Method,3:n.languages.CompletionItemKind.Function,4:n.languages.CompletionItemKind.Constructor,5:n.languages.CompletionItemKind.Field,6:n.languages.CompletionItemKind.Variable,7:n.languages.CompletionItemKind.Class,8:n.languages.CompletionItemKind.Interface,9:n.languages.CompletionItemKind.Module,10:n.languages.CompletionItemKind.Property,11:n.languages.CompletionItemKind.Unit,12:n.languages.CompletionItemKind.Value,13:n.languages.CompletionItemKind.Enum,14:n.languages.CompletionItemKind.Keyword,15:n.languages.CompletionItemKind.Snippet,16:n.languages.CompletionItemKind.Color,17:n.languages.CompletionItemKind.File,18:n.languages.CompletionItemKind.Reference,19:n.languages.CompletionItemKind.Folder,20:n.languages.CompletionItemKind.EnumMember,21:n.languages.CompletionItemKind.Constant,22:n.languages.CompletionItemKind.Struct,23:n.languages.CompletionItemKind.Event,24:n.languages.CompletionItemKind.Operator,25:n.languages.CompletionItemKind.TypeParameter}[e]??n.languages.CompletionItemKind.Property}function P0(e){ui&&(ui.dispose(),ui=null),ui=e.languages.registerCompletionItemProvider("json",{triggerCharacters:['"',":"," "],async provideCompletionItems(n,i){var O;const r=e.languages.json.getWorker;if(!r)return{suggestions:[]};const s=await(await(await r())(n.uri)).doComplete(n.uri.toString(),{line:i.lineNumber-1,character:i.column-1}),c=((s==null?void 0:s.items)??[]).map(u=>{var w,D,_;let h="";u.documentation&&(typeof u.documentation=="string"?h=u.documentation:u.documentation.value&&(h=u.documentation.value)),!h&&u.detail&&(h=u.detail);let b;if(u.textEdit){const T=u.textEdit.range;b={startLineNumber:T.start.line+1,startColumn:T.start.character+1,endLineNumber:T.end.line+1,endColumn:T.end.character+1}}else{const T=n.getWordUntilPosition(i);b={startLineNumber:i.lineNumber,startColumn:T.startColumn,endLineNumber:i.lineNumber,endColumn:T.endColumn}}const L=((w=u.textEdit)==null?void 0:w.newText)??u.insertText??(typeof u.label=="string"?u.label:((D=u.label)==null?void 0:D.label)??"");let N;u.documentation&&(typeof u.documentation=="string"?N=u.documentation:u.documentation.kind==="markdown"?N={value:u.documentation.value}:N=u.documentation.value);const I={label:typeof u.label=="string"?u.label:((_=u.label)==null?void 0:_.label)??"",kind:v0(u.kind,e),detail:h,documentation:N,insertText:L,range:b,sortText:u.sortText,filterText:u.filterText,preselect:u.preselect};return u.insertTextFormat===2&&(I.insertTextRules=e.languages.CompletionItemInsertTextRule.InsertAsSnippet),I}),l=n.getValue(),d=((O=Zw.getState().getEditorForModel(n))==null?void 0:O.toStorageValue(l))??l;let f;try{f=JSON.parse(d)}catch{f=void 0}const p=u=>{const h=n.getPositionAt(u.offset),b=n.getPositionAt(u.offset+u.length);return{startLineNumber:h.lineNumber,startColumn:h.column,endLineNumber:b.lineNumber,endColumn:b.column}};for(const u of O0(l,n.getOffsetAt(i),{references:await Uc(),definitions:y0(d),format:Ce,document:f}))c.push({label:u.label,kind:u.kind==="ref"?e.languages.CompletionItemKind.Value:e.languages.CompletionItemKind.Snippet,detail:u.detail,documentation:u.documentation?{value:u.documentation}:void 0,insertText:u.insertText,filterText:u.filterText,insertTextRules:u.kind==="component"?e.languages.CompletionItemInsertTextRule.InsertAsSnippet:void 0,range:p(u.replace),additionalTextEdits:u.additionalEdits.map(h=>({range:p(h),text:h.content})),sortText:`0 ${u.label}`});return{suggestions:c}}})}async function $0(e,n,i,r){var a;const o=++jr;try{r&&(Fr=r);const s=await Bw.fetchDocumentSchema(n,Fr,{bypassCache:!0});if(o!==jr)return!0;const c=JSON.parse(JSON.stringify(s));if(!c||typeof c!="object")throw new Error("Invalid schema received from server");Ii(c),i&&(ro=i),e.languages.registerDocumentFormattingEditProvider("json",{provideDocumentFormattingEdits(O){const u=O.getValue(),h=zc(u);try{const b=JSON.parse(h),L=JSON.stringify(b,null,2);return[{range:O.getFullModelRange(),text:L}]}catch{return[{range:O.getFullModelRange(),text:h}]}}}),Pi=c,sa(e),console.log("Monaco updated with plugin-aware schemas:",{plugins:n||[],browserPlugins:Fr.map(O=>O.name),blocks:Object.keys(ra),reportSchema:{uri:$i}});const l=e.editor.getModels();let d=!0;if(l.forEach(O=>{if(O.getLanguageId()==="json")try{e.editor.setModelLanguage(O,"json"),console.log("🔄 Re-validating model:",O.uri.toString())}catch(u){console.error("Failed to revalidate model:",O.uri.toString(),u),d=!1}}),!((a=e.languages.json.jsonDefaults.diagnosticsOptions.schemas)==null?void 0:a.some(O=>O.uri===$i)))throw new Error("Schema was not properly applied to Monaco editor");return console.log("✅ Schema validation successful"),d}catch(s){throw console.error("Failed to update Monaco with plugin schemas:",s),o===jr&&aa(e),s}}const V0=Object.freeze(Object.defineProperty({__proto__:null,configureMonaco:oa,configureMonacoInstance:aa,resetMonacoConfig:w0,updateMonacoDocumentBlocks:S0,updateMonacoWithPlugins:$0},Symbol.toStringTag,{value:"Module"}));oa().then(()=>{console.log("Monaco editor configured with JSON schemas for better autocomplete")}).catch(e=>{console.error("Failed to configure Monaco:",e)});const I0=document.getElementById("root"),N0=Gc.createRoot(I0);N0.render(j.jsx(pp,{}));export{ke as A,S0 as B,or as C,y0 as D,Ny as E,Ce as F,V0 as G,Mn as P,Vw as Q,rp as S,t as T,_0 as W,oo as _,K0 as a,W0 as b,bt as c,Vd as d,B0 as e,E0 as f,Jd as g,Zw as h,M0 as i,q0 as j,z0 as k,D0 as l,C0 as m,H0 as n,zw as o,Ec as p,ht as q,$0 as r,Bw as s,Hw as t,tp as u,G0 as v,Gw as w,dn as x,ZS as y,ql as z};
27
+ //# sourceMappingURL=index-BiJMw-wa.js.map