@json-to-office/jto 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +4 -1
- package/dist/cli.js.map +1 -1
- package/dist/client/assets/{HomePage-tunH4yrJ.js → HomePage-sVLlj9Ih.js} +4 -4
- package/dist/client/assets/{HomePage-tunH4yrJ.js.map → HomePage-sVLlj9Ih.js.map} +1 -1
- package/dist/client/assets/{JsonEditorPage-BoWB1SW8.js → JsonEditorPage-Bk0UwNIu.js} +3 -3
- package/dist/client/assets/{JsonEditorPage-BoWB1SW8.js.map → JsonEditorPage-Bk0UwNIu.js.map} +1 -1
- package/dist/client/assets/{MonacoPluginProvider-CZLdOK0o.js → MonacoPluginProvider-t4Vd1z6N.js} +5 -5
- package/dist/client/assets/{MonacoPluginProvider-CZLdOK0o.js.map → MonacoPluginProvider-t4Vd1z6N.js.map} +1 -1
- package/dist/client/assets/{_virtual_jto-plugin-type-libs-BP6g-o7Z.js → _virtual_jto-plugin-type-libs-KqQsxXBM.js} +90 -8
- package/dist/client/assets/{_virtual_jto-plugin-type-libs-BP6g-o7Z.js.map → _virtual_jto-plugin-type-libs-KqQsxXBM.js.map} +1 -1
- package/dist/client/assets/_virtual_jto-sandbox-runtime-BNTRqpDp.js +2 -0
- package/dist/client/assets/_virtual_jto-sandbox-runtime-BNTRqpDp.js.map +1 -0
- package/dist/client/assets/{editor-C6m04j66.js → editor-D0yLm95a.js} +2 -2
- package/dist/client/assets/{editor-C6m04j66.js.map → editor-D0yLm95a.js.map} +1 -1
- package/dist/client/assets/{editor-monaco-json-DsYufbUM.js → editor-monaco-json-TrlIXpMT.js} +2 -2
- package/dist/client/assets/{editor-monaco-json-DsYufbUM.js.map → editor-monaco-json-TrlIXpMT.js.map} +1 -1
- package/dist/client/assets/{index-BDoOeKmB.js → index-RkEpNfKk.js} +2 -2
- package/dist/client/assets/{index-BDoOeKmB.js.map → index-RkEpNfKk.js.map} +1 -1
- package/dist/client/assets/index-cFu0HL2j.js +27 -0
- package/dist/client/assets/index-cFu0HL2j.js.map +1 -0
- package/dist/client/assets/{preview-CutpTQQJ.js → preview-CQEw5MyC.js} +2 -2
- package/dist/client/assets/{preview-CutpTQQJ.js.map → preview-CQEw5MyC.js.map} +1 -1
- package/dist/client/assets/{useQualityAnalysis-k0GXJxAw.js → useQualityAnalysis-CpRjizha.js} +3 -3
- package/dist/client/assets/{useQualityAnalysis-k0GXJxAw.js.map → useQualityAnalysis-CpRjizha.js.map} +1 -1
- package/dist/client/index.html +1 -1
- package/package.json +6 -6
- package/dist/client/assets/_virtual_jto-sandbox-runtime-U0ykVFSo.js +0 -2
- package/dist/client/assets/_virtual_jto-sandbox-runtime-U0ykVFSo.js.map +0 -1
- package/dist/client/assets/index-B7DLwiJH.js +0 -27
- package/dist/client/assets/index-B7DLwiJH.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-sVLlj9Ih.js","assets/react-vendor-BmQ2Ko_D.js","assets/MonacoPluginProvider-t4Vd1z6N.js","assets/state-vendor-Cq67_JbF.js","assets/monaco-editor-DJsdM0WK.js","assets/radix-ui-BzbaiLpZ.js","assets/ui-vendor-BsAtAN16.js","assets/index-RkEpNfKk.js","assets/query-vendor--rhYD8mC.js","assets/JsonEditorPage-Bk0UwNIu.js","assets/NotFoundPage-rSUaByPC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Dc=Object.defineProperty;var zc=(e,n,i)=>n in e?Dc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var rt=(e,n,i)=>zc(e,typeof n!="symbol"?n+"":n,i);import{r as he,j,O as _c,u as Wc,B as Hc,d as qc}from"./react-vendor-BmQ2Ko_D.js";import{Q as Kc,a as Gc}from"./query-vendor--rhYD8mC.js";import{P as Vc,C as Ka,A as Jc,a as Xc,R as Yc,T as Zc}from"./radix-ui-BzbaiLpZ.js";import{c as Qc}from"./ui-vendor-BsAtAN16.js";import{loader as ed}from"./monaco-editor-DJsdM0WK.js";import{c as Ga}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 td="modulepreload",nd=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=nd(l),l in ca)return;ca[l]=!0;const d=l.endsWith(".css"),g=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${g}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":td,d||(p.as="script"),p.crossOrigin="",p.href=l,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((O,m)=>{p.addEventListener("load",O),p.addEventListener("error",()=>m(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)})},id={theme:"system",setTheme:()=>null,resolvedTheme:"light"},Va=he.createContext(id);function rd({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(Va.Provider,{...r,value:c,children:e})}const F0=()=>{const e=he.useContext(Va);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},ao="-",od=e=>{const n=sd(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const c=s.split(ao);return c[0]===""&&c.length!==1&&c.shift(),Ja(c,n)||ad(s)},getConflictingClassGroupIds:(s,c)=>{const l=i[s]||[];return c&&r[s]?[...l,...r[s]]:l}}},Ja=(e,n)=>{var s;if(e.length===0)return n.classGroupId;const i=e[0],r=n.nextPart.get(i),o=r?Ja(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=/^\[(.+)\]$/,ad=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}},sd=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(ld(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},ld=e=>e.isThemeGetter,cd=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=":",dd=Mr.length,pd=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+dd;continue}if(b==="/"){d=h;continue}}b==="["?s++:b==="]"?s--:b==="("?c++:b===")"&&c--}const g=a.length===0?o:o.substring(l),p=ud(g),O=p!==g,m=d&&d>l?d-l:void 0;return{modifiers:a,hasImportantModifier:O,baseClassName:p,maybePostfixModifierPosition:m}};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},ud=e=>e.endsWith(Ur)?e.substring(0,e.length-1):e.startsWith(Ur)?e.substring(1):e,md=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}},fd=e=>({cache:cd(e.cacheSize),parseClassName:pd(e),sortModifiers:md(e),...od(e)}),gd=/\s+/,hd=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,s=[],c=e.trim().split(gd);let l="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:p,modifiers:O,hasImportantModifier:m,baseClassName:h,maybePostfixModifierPosition:b}=i(g);if(p){l=g+(l.length>0?" "+l:l);continue}let L=!!b,N=r(L?h.substring(0,b):h);if(!N){if(!L){l=g+(l.length>0?" "+l:l);continue}if(N=r(h),!N){l=g+(l.length>0?" "+l:l);continue}L=!1}const I=a(O).join(":"),w=m?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 k=_[T];s.push(w+k)}l=g+(l.length>0?" "+l:l)}return l};function bd(){let e=0,n,i,r="";for(;e<arguments.length;)(n=arguments[e++])&&(i=Xa(n))&&(r&&(r+=" "),r+=i);return r}const Xa=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=Xa(e[r]))&&(i&&(i+=" "),i+=n);return i};function Od(e,...n){let i,r,o,a=s;function s(l){const d=n.reduce((g,p)=>p(g),e());return i=fd(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 g=hd(l,i);return o(l,g),g}return function(){return a(bd.apply(null,arguments))}}const de=e=>{const n=i=>i[e]||[];return n.isThemeGetter=!0,n},Ya=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Za=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yd=/^\d+\/\d+$/,xd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sd=/\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$/,wd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ld=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xt=e=>yd.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=>xd.test(e),Pd=()=>!0,$d=e=>Sd.test(e)&&!wd.test(e),so=()=>!1,Id=e=>Ld.test(e),Nd=e=>vd.test(e),Ad=e=>!P(e)&&!$(e),kd=e=>pn(e,ts,so),P=e=>Ya.test(e),At=e=>pn(e,ns,$d),gr=e=>pn(e,zd,B),Td=e=>pn(e,Qa,so),Fd=e=>pn(e,es,Nd),jd=e=>pn(e,so,Id),$=e=>Za.test(e),ii=e=>un(e,ns),Rd=e=>un(e,_d),Ud=e=>un(e,Qa),Md=e=>un(e,ts),Bd=e=>un(e,es),Ed=e=>un(e,Wd,!0),pn=(e,n,i)=>{const r=Ya.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},un=(e,n,i=!1)=>{const r=Za.exec(e);return r?r[1]?n(r[1]):i:!1},Qa=e=>e==="position",Cd=new Set(["image","url"]),es=e=>Cd.has(e),Dd=new Set(["length","size","percentage"]),ts=e=>Dd.has(e),ns=e=>e==="length",zd=e=>e==="number",_d=e=>e==="family-name",Wd=e=>e==="shadow",Hd=()=>{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"),g=de("shadow"),p=de("inset-shadow"),O=de("drop-shadow"),m=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=()=>[Xt,"px","full","auto",$,P,l],k=()=>[Nt,"none","subgrid",$,P],W=()=>["auto",{span:["full",Nt,$,P]},$,P],A=()=>[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=()=>[Xt,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",$,P,l],z=()=>[e,$,P],Vt=()=>[ua,At],ge=()=>["","none","full",d,$,P],Z=()=>["",B,ii,At],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"],Jt=()=>["","none",m,$,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=()=>[Xt,"full","px",$,P,l];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mt],breakpoint:[mt],color:[Pd],container:[mt],"drop-shadow":[mt],ease:["in","out","in-out"],font:[Ad],"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",Xt,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:[Xt,"full","auto",$,P,c,l]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[B,Xt,"auto","initial","none",P]}],grow:[{grow:["",B,$,P]}],shrink:[{shrink:["",B,$,P]}],order:[{order:[Nt,"first","last","none",$,P]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"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,At]}],"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:[Rd,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",$,At]}],"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(),Ud,Td]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Md,kd]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nt,$,P],radial:["",$,P],conic:[Nt,$,P]},Bd,Fd]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:Vt()}],"gradient-via-pos":[{via:Vt()}],"gradient-to-pos":[{to:Vt()}],"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,At]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",g,Ed,jd]}],"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,At]}],"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:Jt()}],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":Jt()}],"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,At,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","*","**"]}},qd=Od(Hd);function bt(...e){return qd(Qc(e))}const Kd=Xc,j0=Yc,R0=Zc,Gd=he.forwardRef(({className:e,sideOffset:n=4,children:i,...r},o)=>j.jsx(Vc,{children:j.jsxs(Ka,{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(Jc,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-popover fill-popover"})]})}));Gd.displayName=Ka.displayName;const is=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}));is.displayName="Toast";const Vd=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}));Vd.displayName="ToastAction";const rs=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"})]})}));rs.displayName="ToastClose";const os=he.forwardRef(({className:e,...n},i)=>j.jsx("div",{ref:i,className:bt("text-sm font-semibold",e),...n}));os.displayName="ToastTitle";const as=he.forwardRef(({className:e,...n},i)=>j.jsx("div",{ref:i,className:bt("text-sm opacity-90",e),...n}));as.displayName="ToastDescription";const ss=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}));ss.displayName="ToastViewport";const Jd=1,ls=5e3;let hr=0;function Xd(){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})},ls);br.set(e,n)},Yd=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,Jd)};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=Yd(fi,e),mi.forEach(n=>{n(fi)})}function Zd({...e}){const n=Xd(),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()},ls),{id:n,dismiss:r,update:i}}function Qd(){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:Zd,dismiss:i=>Nn({type:"DISMISS_TOAST",toastId:i})}}function ep(){const{toasts:e,dismiss:n}=Qd();return j.jsx(ss,{children:e.map(function({id:i,title:r,description:o,action:a,open:s,...c}){return s===!1?null:j.jsxs(is,{...c,children:[j.jsxs("div",{className:"grid gap-1",children:[r&&j.jsx(os,{children:r}),o&&j.jsx(as,{children:o})]}),a,j.jsx(rs,{onClick:l=>{l.preventDefault(),l.stopPropagation(),n(i)}})]},i)})})}function tp(){return j.jsx(rd,{defaultTheme:"system",storageKey:"vite-ui-theme",children:j.jsxs(Kd,{delayDuration:300,children:[j.jsx("div",{className:"min-h-screen bg-background font-sans antialiased",children:j.jsx(_c,{})}),j.jsx(ep,{})]})})}function np({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 ip=he.lazy(()=>oo(()=>import("./HomePage-sVLlj9Ih.js").then(e=>e.H),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.HomePage}))),rp=he.lazy(()=>oo(()=>import("./JsonEditorPage-Bk0UwNIu.js"),__vite__mapDeps([9,1,2,3,4,8,5,6])).then(e=>({default:e.JsonEditorPage}))),op=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(np,{className:"w-8 h-8"})}),children:e}),ap=[{path:"/",element:j.jsx(tp,{}),children:[{index:!0,element:j.jsx(Or,{children:j.jsx(ip,{})})},{path:"json-editor",element:j.jsx(Or,{children:j.jsx(rp,{})})}]},{path:"*",element:j.jsx(Or,{children:j.jsx(op,{})})}];function sp(){return Wc(ap)}const lp=new Kc({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function cp(){return j.jsx(Gc,{client:lp,children:j.jsx(Hc,{children:j.jsx(sp,{})})})}function dp(e){return oe(e)&&!Ne(e)&&!Dn(e)&&Symbol.asyncIterator in e}function Ne(e){return Array.isArray(e)}function cs(e){return typeof e=="bigint"}function Cn(e){return typeof e=="boolean"}function lo(e){return e instanceof globalThis.Date}function pp(e){return typeof e=="function"}function up(e){return oe(e)&&!Ne(e)&&!Dn(e)&&Symbol.iterator in e}function mp(e){return e===null}function tt(e){return typeof e=="number"}function oe(e){return typeof e=="object"&&e!==null}function ds(e){return e instanceof globalThis.RegExp}function ne(e){return typeof e=="string"}function fp(e){return typeof e=="symbol"}function Dn(e){return e instanceof globalThis.Uint8Array}function ie(e){return e===void 0}function gp(e){return e.map(n=>Oi(n))}function hp(e){return new Date(e.getTime())}function bp(e){return new Uint8Array(e)}function Op(e){return new RegExp(e.source,e.flags)}function yp(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)?gp(e):lo(e)?hp(e):Dn(e)?bp(e):ds(e)?Op(e):oe(e)?yp(e):e}function ke(e){return Oi(e)}function co(e,n){return ke(n===void 0?e:{...n,...e})}function ps(e){return nt(e)&&globalThis.Symbol.asyncIterator in e}function us(e){return nt(e)&&globalThis.Symbol.iterator in e}function ms(e){return e instanceof globalThis.Promise}function zn(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function xp(e){return e instanceof globalThis.Map}function Sp(e){return e instanceof globalThis.Set}function wp(e){return globalThis.ArrayBuffer.isView(e)}function po(e){return e instanceof globalThis.Uint8Array}function Lp(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 Ai(e){return typeof e=="boolean"}function at(e){return typeof e=="number"}function fs(e){return globalThis.Number.isInteger(e)}function ki(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 vp(e){return ki(e)||Ai(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 Pp(e){return globalThis.Object.freeze(e).map(n=>yi(n))}function $p(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)?Pp(e):lo(e)?e:Dn(e)?e:ds(e)?e:oe(e)?$p(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 ke(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 gs(e){return E(e,"Any")}function hs(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 Ip(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 bs(e){return Cn(e)||tt(e)||ne(e)}function Bt(e){return E(e,"Literal")}function Et(e){return E(e,"MappedKey")}function Ue(e){return E(e,"MappedResult")}function Hn(e){return E(e,"Never")}function Np(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 Os(e){return E(e,"RegExp")}function qn(e){return E(e,"String")}function go(e){return E(e,"Symbol")}function Ct(e){return E(e,"TemplateLiteral")}function Ap(e){return E(e,"This")}function Ei(e){return oe(e)&&Ee in e}function Dt(e){return E(e,"Tuple")}function ho(e){return E(e,"Undefined")}function fe(e){return E(e,"Union")}function kp(e){return E(e,"Uint8Array")}function Tp(e){return E(e,"Unknown")}function Fp(e){return E(e,"Unsafe")}function jp(e){return E(e,"Void")}function ys(e){return oe(e)&&v in e&&ne(e[v])}function lt(e){return gs(e)||hs(e)||mn(e)||Wn(e)||Ri(e)||ji(e)||fn(e)||gn(e)||Ip(e)||hn(e)||bn(e)||ze(e)||Ui(e)||Bt(e)||Et(e)||Ue(e)||Hn(e)||Np(e)||fo(e)||On(e)||Ye(e)||Mi(e)||Bi(e)||$e(e)||Os(e)||qn(e)||go(e)||Ct(e)||Ap(e)||Dt(e)||ho(e)||fe(e)||kp(e)||Tp(e)||Fp(e)||jp(e)||ys(e)}const Rp=["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 xs(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 Ss(e){return Oo(e)||Oe(e)}function Ln(e){return ie(e)||cs(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 Up(e){return ie(e)||ne(e)&&bo(e)&&xs(e)}function Mp(e){return ie(e)||ne(e)&&bo(e)}function ws(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 Bp(e){return C(e,"Argument")&&tt(e.index)}function zt(e){return C(e,"Array")&&e.type==="array"&&K(e.$id)&&Oe(e.items)&&V(e.minItems)&&V(e.maxItems)&&Oo(e.uniqueItems)&&ws(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 _t(e){return C(e,"Boolean")&&e.type==="boolean"&&K(e.$id)}function Ep(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 Ls(e){return oe(e)&&Object.entries(e).every(([n,i])=>bo(n)&&Oe(i))}function Wt(e){return C(e,"Intersect")&&!(ne(e.type)&&e.type!=="object")&&Ne(e.allOf)&&e.allOf.every(n=>Oe(n)&&!Hp(n))&&K(e.type)&&(Oo(e.unevaluatedProperties)||ws(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 vs(e){return xt(e)&&ne(e.const)}function Ps(e){return xt(e)&&tt(e.const)}function $s(e){return xt(e)&&Cn(e.const)}function xt(e){return C(e,"Literal")&&K(e.$id)&&Cp(e.const)}function Cp(e){return Cn(e)||tt(e)||ne(e)}function Dp(e){return C(e,"MappedKey")&&Ne(e.keys)&&e.keys.every(n=>tt(n)||ne(n))}function zp(e){return C(e,"MappedResult")&&Ls(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)&&Ls(e.properties)&&Ss(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)&&Ss(e.additionalProperties)&&oe(e.patternProperties)&&(n=>{const i=Object.getOwnPropertyNames(n.patternProperties);return i.length===1&&xs(i[0])&&oe(n.patternProperties)&&Oe(n.patternProperties[i[0]])})(e)}function _p(e){return C(e,"Ref")&&K(e.$id)&&ne(e.$ref)}function kn(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)&&Up(e.pattern)&&Mp(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 Wp(e){return C(e,"This")&&K(e.$id)&&ne(e.$ref)}function Hp(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 Rt(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 qp(e){return C(e,"Unsafe")}function Hi(e){return C(e,"Void")&&e.type==="void"&&K(e.$id)}function Kp(e){return oe(e)&&v in e&&ne(e[v])&&!Rp.includes(e[v])}function Oe(e){return oe(e)&&(Ke(e)||Bp(e)||zt(e)||_t(e)||Ci(e)||yo(e)||Ep(e)||Di(e)||zi(e)||_i(e)||pt(e)||Wt(e)||xo(e)||xt(e)||Dp(e)||zp(e)||St(e)||on(e)||So(e)||Pe(e)||ee(e)||wo(e)||be(e)||_p(e)||kn(e)||Ge(e)||Tn(e)||Fn(e)||Wp(e)||Wi(e)||Rt(e)||ct(e)||Kn(e)||Ve(e)||qp(e)||Hi(e)||Kp(e))}const Gp="(true|false)",gi="(0|[1-9][0-9]*)",Is="(.*)",Vp="(?!.*)",an=`^${gi}$`,sn=`^${Is}$`,Jp=`^${Vp}$`,Lo=new Map;function Ns(e){return Lo.has(e)}function As(e,n){Lo.set(e,n)}function ks(e){return Lo.get(e)}const Ts=new Map;function vo(e){return Ts.has(e)}function Fs(e){return Ts.get(e)}function Xp(e,n){return e.includes(n)}function Yp(e){return[...new Set(e)]}function Zp(e,n){return e.filter(i=>n.includes(i))}function Qp(e,n){return e.reduce((i,r)=>Zp(i,r),n)}function eu(e){return e.length===1?e[0]:e.length>1?Qp(e.slice(1),e[0]):[]}function tu(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 nu(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 iu(e,n){const{[n]:i,...r}=e;return r}function Fe(e,n){return n.reduce((i,r)=>iu(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 ru(e){return e.some(n=>yt(n))}function fa(e){return e.map(n=>yt(n)?ou(n):n)}function ou(e){return Fe(e,[dt])}function au(e,n){return ru(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):au(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 su(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 js(e,n){return No(e,n,"|")}function lu(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 cu(e){return e.slice(1,e.length-1)}function du(e){let n=0;for(let i=0;i<e.length;i++)if(st(e,i)&&(n+=1),Rn(e,i)&&(n-=1),js(e,i)&&n===0)return!0;return!1}function pu(e){for(let n=0;n<e.length;n++)if(st(e,n))return!0;return!1}function uu(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),js(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 mu(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 lu(e)?ln(cu(e)):du(e)?uu(e):pu(e)?mu(e):{type:"const",const:su(e)}}function Ao(e){return ln(e.slice(1,e.length-1))}class fu extends Xe{}function gu(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 hu(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 bu(e){return e.type==="const"&&e.const===".*"}function Un(e){return gu(e)||bu(e)?!1:hu(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 fu("Unknown expression type")})()}function Ou(e){const n=Ao(e.pattern);return Un(n)}class yu extends Xe{}function*Rs(e){if(e.length===1)return yield*e[0];for(const n of e[0])for(const i of Rs(e.slice(1)))yield`${n}${i}`}function*xu(e){return yield*Rs(e.expr.map(n=>[...qi(n)]))}function*Su(e){for(const n of e.expr)yield*qi(n)}function*wu(e){return yield e.const}function*qi(e){return e.type==="and"?yield*xu(e):e.type==="or"?yield*Su(e):e.type==="const"?yield*wu(e):(()=>{throw new yu("Unknown expression")})()}function Us(e){const n=Ao(e.pattern);return Un(n)?[...qi(n)]:[]}function re(e,n){return x({[v]:"Literal",const:e,type:typeof e},n)}function Ms(e){return x({[v]:"Boolean",type:"boolean"},e)}function ko(e){return x({[v]:"BigInt",type:"bigint"},e)}function Ht(e){return x({[v]:"Number",type:"number"},e)}function Ut(e){return x({[v]:"String",type:"string"},e)}function*Lu(e){const n=e.trim().replace(/"|'/g,"");return n==="boolean"?yield Ms():n==="number"?yield Ht():n==="bigint"?yield ko():n==="string"?yield Ut():yield(()=>{const i=n.split("|").map(r=>re(r.trim()));return i.length===0?te():i.length===1?i[0]:yn(i)})()}function*vu(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=Lu(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=vu(e.slice(n));return yield*[i,...r]}yield re(e)}function Pu(e){return[...Er(e)]}class $u extends Xe{}function Iu(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bs(e,n){return Ct(e)?e.pattern.slice(1,e.pattern.length-1):fe(e)?`(${e.anyOf.map(i=>Bs(i,n)).join("|")})`:On(e)?`${n}${gi}`:bn(e)?`${n}${gi}`:Ri(e)?`${n}${gi}`:qn(e)?`${n}${Is}`:Bt(e)?`${n}${Iu(e.const.toString())}`:Wn(e)?`${n}${Gp}`:(()=>{throw new $u(`Unexpected Kind '${e[v]}'`)})()}function ha(e){return`^${e.map(n=>Bs(n,"")).join("")}$`}function Si(e){const i=Us(e).map(r=>re(r));return yn(i)}function Es(e,n){const i=ne(e)?ha(Pu(e)):ha(e);return x({[v]:"TemplateLiteral",type:"string",pattern:i},n)}function Nu(e){return Us(e).map(i=>i.toString())}function Au(e){const n=[];for(const i of e)n.push(...wt(i));return n}function ku(e){return[e.toString()]}function wt(e){return[...new Set(Ct(e)?Nu(e):fe(e)?Au(e.anyOf):Bt(e)?ku(e.const):On(e)?["[number]"]:bn(e)?["[number]"]:[])]}function Tu(e,n,i){const r={};for(const o of Object.getOwnPropertyNames(n))r[o]=Ki(e,wt(n[o]),i);return r}function Fu(e,n,i){return Tu(e,n.properties,i)}function ju(e,n,i){const r=Fu(e,n,i);return ye(r)}function Cs(e,n){return e.map(i=>Ds(i,n))}function Ru(e){return e.filter(n=>!Hn(n))}function Uu(e,n){return Hs(Ru(Cs(e,n)))}function Mu(e){return e.some(n=>Hn(n))?[]:e}function Bu(e,n){return yn(Mu(Cs(e,n)))}function Eu(e,n){return n in e?e[n]:n==="[number]"?yn(e):te()}function Cu(e,n){return n==="[number]"?e:te()}function Du(e,n){return n in e?e[n]:te()}function Ds(e,n){return ze(e)?Uu(e.allOf,n):fe(e)?Bu(e.anyOf,n):Dt(e)?Eu(e.items??[],n):mn(e)?Cu(e.items,n):Ye(e)?Du(e.properties,n):te()}function zs(e,n){return n.map(i=>Ds(e,i))}function ba(e,n){return yn(zs(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)?ju(e,n,i):Et(n)?Hu(e,n,i):x(lt(n)?ba(e,wt(n)):ba(e,n),i)}function zu(e,n,i){return{[n]:Ki(e,[n],ke(i))}}function _u(e,n,i){return n.reduce((r,o)=>({...r,...zu(e,o,i)}),{})}function Wu(e,n,i){return _u(e,n.keys,i)}function Hu(e,n,i){const r=Wu(e,n,i);return ye(r)}function To(e,n){return x({[v]:"Iterator",type:"Iterator",items:e},n)}function qu(e){const n=[];for(let i in e)yt(e[i])||n.push(i);return n}function Ku(e,n){const i=qu(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=Ku;function _s(e,n){return x({[v]:"Promise",type:"Promise",item:e},n)}function Gu(e){return x(Fe(e,[_n]))}function Vu(e){return x({...e,[_n]:"Readonly"})}function Ju(e,n){return n===!1?Gu(e):Vu(e)}function Lt(e,n){const i=n??!0;return Ue(e)?Zu(e,i):Ju(e,i)}function Xu(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Lt(e[r],n);return i}function Yu(e,n){return Xu(e.properties,n)}function Zu(e,n){const i=Yu(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 Ws(e,n){return e in n?Me(e,n[e]):ye(n)}function Qu(e){return{[e]:re(e)}}function em(e){const n={};for(const i of e)n[i]=re(i);return n}function tm(e,n){return Xp(n,e)?Qu(e):em(n)}function nm(e,n){const i=tm(e,n);return Ws(e,i)}function vn(e,n){return n.map(i=>Me(e,i))}function im(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)?Ws(e,n.properties):Et(n)?nm(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):Dt(n)?xn(vn(e,n.items??[]),i):Ye(n)?me(im(e,n.properties),i):mn(n)?Po(Me(e,n.items),i):Mi(n)?_s(Me(e,n.item),i):n}function rm(e,n){const i={};for(const r of e)i[r]=Me(r,n);return i}function om(e,n,i){const r=lt(e)?wt(e):e,o=n({[v]:"MappedKey",keys:r}),a=rm(r,o);return me(a,i)}function am(e){return x(Fe(e,[dt]))}function sm(e){return x({...e,[dt]:"Optional"})}function lm(e,n){return n===!1?am(e):sm(e)}function vt(e,n){const i=n??!0;return Ue(e)?pm(e,i):lm(e,i)}function cm(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=vt(e[r],n);return i}function dm(e,n){return cm(e.properties,n)}function pm(e,n){const i=dm(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 um(e){return e.every(n=>yt(n))}function mm(e){return Fe(e,[dt])}function Oa(e){return e.map(n=>yt(n)?mm(n):n)}function fm(e,n){return um(e)?vt(Cr(Oa(e),n)):Cr(Oa(e),n)}function Hs(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 fm(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 gm(e,n){return le("Awaited",[le(e,n)])}function hm(e){return le("Awaited",[Vn(e)])}function bm(e){return Pt(qs(e))}function Om(e){return xe(qs(e))}function ym(e){return Gi(e)}function qs(e){return e.map(n=>Gi(n))}function Gi(e,n){return x(fn(e)?gm(e.target,e.parameters):ze(e)?bm(e.allOf):fe(e)?Om(e.anyOf):Mi(e)?ym(e.item):$e(e)?hm(e.$ref):e,n)}function Ks(e){const n=[];for(const i of e)n.push(Vi(i));return n}function xm(e){const n=Ks(e);return tu(n)}function Sm(e){const n=Ks(e);return eu(n)}function wm(e){return e.map((n,i)=>i.toString())}function Lm(e){return["[number]"]}function vm(e){return globalThis.Object.getOwnPropertyNames(e)}function Pm(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)?xm(e.allOf):fe(e)?Sm(e.anyOf):Dt(e)?wm(e.items??[]):mn(e)?Lm(e.items):Ye(e)?vm(e.properties):Bi(e)?Pm(e.patternProperties):[]}let Dr=!1;function wi(e){Dr=!0;const n=Vi(e);return Dr=!1,`^(${n.map(r=>`(${r})`).join("|")})$`}function $m(e,n){return le("KeyOf",[le(e,n)])}function Im(e){return le("KeyOf",[Vn(e)])}function Nm(e,n){const i=Vi(e),r=Am(i),o=yn(r);return x(o,n)}function Am(e){return e.map(n=>n==="[number]"?Ht():re(n))}function Fo(e,n){return fn(e)?$m(e.target,e.parameters):$e(e)?Im(e.$ref):Ue(e)?Fm(e,n):Nm(e,n)}function km(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Fo(e[r],ke(n));return i}function Tm(e,n){return km(e.properties,n)}function Fm(e,n){const i=Tm(e,n);return ye(i)}function jm(e){const n=[];for(const i of e)n.push(...Vi(i));return Yp(n)}function Rm(e){return e.filter(n=>!Hn(n))}function Um(e,n){const i=[];for(const r of e)i.push(...zs(r,[n]));return Rm(i)}function Mm(e,n){const i={};for(const r of n)i[r]=Hs(Um(e,r));return i}function Bm(e,n){const i=jm(e),r=Mm(e,i);return me(r,n)}function Gs(e){return x({[v]:"Date",type:"Date"},e)}function Vs(e){return x({[v]:"Null",type:"null"},e)}function Js(e){return x({[v]:"Symbol",type:"symbol"},e)}function Xs(e){return x({[v]:"Undefined",type:"undefined"},e)}function Ys(e){return x({[v]:"Uint8Array",type:"Uint8Array"},e)}function Ji(e){return x({[v]:"Unknown"},e)}function Em(e){return e.map(n=>jo(n,!1))}function Cm(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 dp(e)||up(e)?ri(jn(),n):Ne(e)?Lt(xn(Em(e))):Dn(e)?Ys():lo(e)?Gs():oe(e)?ri(me(Cm(e)),n):pp(e)?ri(Gn([],Ji()),n):ie(e)?Xs():mp(e)?Vs():fp(e)?Js():cs(e)?ko():tt(e)||Cn(e)||ne(e)?re(e):me({})}function Dm(e,n){return x(jo(e,!0),n)}function zm(e,n){return gn(e)?xn(e.parameters,n):te(n)}function _m(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 Wm extends Xe{}var f;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(f||(f={}));function De(e){return e===f.False?e:f.True}function Sn(e){throw new Wm(e)}function ae(e){return St(e)||Wt(e)||ct(e)||Ve(e)||Ke(e)}function se(e,n){return St(n)?el():Wt(n)?Xi(e,n):ct(n)?Uo(e,n):Ve(n)?rl():Ke(n)?Ro():Sn("StructuralRight")}function Ro(e,n){return f.True}function Hm(e,n){return Wt(n)?Xi(e,n):ct(n)&&n.anyOf.some(i=>Ke(i)||Ve(i))?f.True:ct(n)?f.Union:Ve(n)||Ke(n)?f.True:f.Union}function qm(e,n){return Ve(e)?f.False:Ke(e)?f.Union:St(e)?f.True:f.False}function Km(e,n){return ee(n)&&Yi(n)?f.True:ae(n)?se(e,n):zt(n)?De(q(e.items,n.items)):f.False}function Gm(e,n){return ae(n)?se(e,n):yo(n)?De(q(e.items,n.items)):f.False}function Vm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ci(n)?f.True:f.False}function Zs(e,n){return $s(e)||_t(e)?f.True:f.False}function Jm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):_t(n)?f.True:f.False}function Xm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):Di(n)?e.parameters.length>n.parameters.length?f.False:e.parameters.every((i,r)=>De(q(n.parameters[r],i))===f.True)?De(q(e.returns,n.returns)):f.False:f.False}function Ym(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):zi(n)?f.True:f.False}function Zm(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):_i(n)?e.parameters.length>n.parameters.length?f.False:e.parameters.every((i,r)=>De(q(n.parameters[r],i))===f.True)?De(q(e.returns,n.returns)):f.False:f.False}function Qs(e,n){return xt(e)&&tt(e.const)||Pe(e)||pt(e)?f.True:f.False}function Qm(e,n){return pt(n)||Pe(n)?f.True:ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):f.False}function Xi(e,n){return n.allOf.every(i=>q(e,i)===f.True)?f.True:f.False}function ef(e,n){return e.allOf.some(i=>q(i,n)===f.True)?f.True:f.False}function tf(e,n){return ae(n)?se(e,n):xo(n)?De(q(e.items,n.items)):f.False}function nf(e,n){return xt(n)&&n.const===e.const?f.True:ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ge(n)?il(e):Pe(n)?tl(e):pt(n)?Qs(e):_t(n)?Zs(e):f.False}function el(e,n){return f.False}function rf(e,n){return f.True}function ya(e){let[n,i]=[e,0];for(;on(n);)n=n.not,i+=1;return i%2===0?n:Ji()}function of(e,n){return on(e)?q(ya(e),n):on(n)?q(e,ya(n)):Sn("Invalid fallthrough for Not")}function af(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):So(n)?f.True:f.False}function tl(e,n){return Ps(e)||Pe(e)||pt(e)?f.True:f.False}function sf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):pt(n)||Pe(n)?f.True:f.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])&&Rt(e.properties.description.anyOf[1])||Ge(e.properties.description.anyOf[1])&&Rt(e.properties.description.anyOf[0]))}function yr(e){return Ie(e,0)}function wa(e){return Ie(e,0)}function lf(e){return Ie(e,0)}function cf(e){return Ie(e,0)}function df(e){return Yi(e)}function pf(e){const n=Ht();return Ie(e,0)||Ie(e,1)&&"length"in e.properties&&De(q(e.properties.length,n))===f.True}function uf(e){return Ie(e,0)}function Yi(e){const n=Ht();return Ie(e,0)||Ie(e,1)&&"length"in e.properties&&De(q(e.properties.length,n))===f.True}function mf(e){const n=Gn([jn()],jn());return Ie(e,0)||Ie(e,1)&&"then"in e.properties&&De(q(e.properties.then,n))===f.True}function nl(e,n){return q(e,n)===f.False||xi(e)&&!xi(n)?f.False:f.True}function we(e,n){return Ve(e)?f.False:Ke(e)?f.Union:St(e)||vs(e)&&xa(n)||Ps(e)&&yr(n)||$s(e)&&wa(n)||Tn(e)&&Sa(n)||Ci(e)&&lf(n)||Ge(e)&&xa(n)||Tn(e)&&Sa(n)||Pe(e)&&yr(n)||pt(e)&&yr(n)||_t(e)&&wa(n)||Kn(e)&&df(n)||zi(e)&&cf(n)||Di(e)&&uf(n)||_i(e)&&pf(n)?f.True:be(e)&&Ge(zr(e))?n[Fi]==="Record"?f.True:f.False:be(e)&&Pe(zr(e))?Ie(n,0)?f.True:f.False:f.False}function ff(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 f.False;if(xi(n.properties[i]))return f.True;if(nl(e.properties[i],n.properties[i])===f.False)return f.False}return f.True})():f.False}function gf(e,n){return ae(n)?se(e,n):ee(n)&&mf(n)?f.True:wo(n)?De(q(e.item,n.item)):f.False}function zr(e){return an in e.patternProperties?Ht():sn in e.patternProperties?Ut():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 vs(e)&&Pe(i)&&De(q(e,r))===f.True?f.True:Kn(e)&&Pe(i)||Ge(e)&&Pe(i)||zt(e)&&Pe(i)?q(e,r):ee(e)?(()=>{for(const o of Object.getOwnPropertyNames(e.properties))if(nl(r,e.properties[o])===f.False)return f.False;return f.True})():f.False}function hf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?q(_r(e),_r(n)):f.False}function bf(e,n){const i=kn(e)?Ut():e,r=kn(n)?Ut():n;return q(i,r)}function il(e,n){return xt(e)&&ne(e.const)||Ge(e)?f.True:f.False}function Of(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Ge(n)?f.True:f.False}function yf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Tn(n)?f.True:f.False}function xf(e,n){return Fn(e)?q(Si(e),n):Fn(n)?q(e,Si(n)):Sn("Invalid fallthrough for TemplateLiteral")}function Sf(e,n){return zt(n)&&e.items!==void 0&&e.items.every(i=>q(i,n.items)===f.True)}function wf(e,n){return St(e)?f.True:Ve(e)?f.False:Ke(e)?f.Union:f.False}function Lf(e,n){return ae(n)?se(e,n):ee(n)&&Yi(n)||zt(n)&&Sf(e,n)?f.True:Wi(n)?ie(e.items)&&!ie(n.items)||!ie(e.items)&&ie(n.items)?f.False:ie(e.items)&&!ie(n.items)||e.items.every((i,r)=>q(i,n.items[r])===f.True)?f.True:f.False:f.False}function vf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Kn(n)?f.True:f.False}function Pf(e,n){return ae(n)?se(e,n):ee(n)?we(e,n):be(n)?_e(e,n):Hi(n)?Nf(e):Rt(n)?f.True:f.False}function Uo(e,n){return n.anyOf.some(i=>q(e,i)===f.True)?f.True:f.False}function $f(e,n){return e.anyOf.every(i=>q(i,n)===f.True)?f.True:f.False}function rl(e,n){return f.True}function If(e,n){return St(n)?el():Wt(n)?Xi(e,n):ct(n)?Uo(e,n):Ke(n)?Ro():Ge(n)?il(e):Pe(n)?tl(e):pt(n)?Qs(e):_t(n)?Zs(e):zt(n)?qm(e):Wi(n)?wf(e):ee(n)?we(e,n):Ve(n)?f.True:f.False}function Nf(e,n){return Rt(e)||Rt(e)?f.True:f.False}function Af(e,n){return Wt(n)?Xi(e,n):ct(n)?Uo(e,n):Ve(n)?rl():Ke(n)?Ro():ee(n)?we(e,n):Hi(n)?f.True:f.False}function q(e,n){return Fn(e)||Fn(n)?xf(e,n):kn(e)||kn(n)?bf(e,n):on(e)||on(n)?of(e,n):Ke(e)?Hm(e,n):zt(e)?Km(e,n):Ci(e)?Vm(e,n):_t(e)?Jm(e,n):yo(e)?Gm(e,n):Di(e)?Xm(e,n):zi(e)?Ym(e,n):_i(e)?Zm(e,n):pt(e)?Qm(e,n):Wt(e)?ef(e,n):xo(e)?tf(e,n):xt(e)?nf(e,n):St(e)?rf():So(e)?af(e,n):Pe(e)?sf(e,n):ee(e)?ff(e,n):be(e)?hf(e,n):Ge(e)?Of(e,n):Tn(e)?yf(e,n):Wi(e)?Lf(e,n):wo(e)?gf(e,n):Kn(e)?vf(e,n):Rt(e)?Pf(e,n):ct(e)?$f(e,n):Ve(e)?If(e,n):Hi(e)?Af(e,n):Sn(`Unknown left type operand '${e[v]}'`)}function Jn(e,n){return q(e,n)}function kf(e,n,i,r,o){const a={};for(const s of globalThis.Object.getOwnPropertyNames(e))a[s]=Mo(e[s],n,i,r,ke(o));return a}function Tf(e,n,i,r,o){return kf(e.properties,n,i,r,o)}function Ff(e,n,i,r,o){const a=Tf(e,n,i,r,o);return ye(a)}function jf(e,n,i,r){const o=Jn(e,n);return o===f.Union?xe([i,r]):o===f.True?i:r}function Mo(e,n,i,r,o){return Ue(e)?Ff(e,n,i,r,o):Et(e)?x(Bf(e,n,i,r,o)):x(jf(e,n,i,r),o)}function Rf(e,n,i,r,o){return{[e]:Mo(re(e),n,i,r,ke(o))}}function Uf(e,n,i,r,o){return e.reduce((a,s)=>({...a,...Rf(s,n,i,r,o)}),{})}function Mf(e,n,i,r,o){return Uf(e.keys,n,i,r,o)}function Bf(e,n,i,r,o){const a=Mf(e,n,i,r,o);return ye(a)}function Ef(e){return e.allOf.every(n=>Xn(n))}function Cf(e){return e.anyOf.some(n=>Xn(n))}function Df(e){return!Xn(e.not)}function Xn(e){return e[v]==="Intersect"?Ef(e):e[v]==="Union"?Cf(e):e[v]==="Not"?Df(e):e[v]==="Undefined"}function zf(e,n){return Bo(Si(e),n)}function _f(e,n){const i=e.filter(r=>Jn(r,n)===f.False);return i.length===1?i[0]:xe(i)}function Bo(e,n,i={}){return Ct(e)?x(zf(e,n),i):Ue(e)?x(qf(e,n),i):x(fe(e)?_f(e.anyOf,n):Jn(e,n)!==f.False?te():e,i)}function Wf(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Bo(e[r],n);return i}function Hf(e,n){return Wf(e.properties,n)}function qf(e,n){const i=Hf(e,n);return ye(i)}function Kf(e,n){return Eo(Si(e),n)}function Gf(e,n){const i=e.filter(r=>Jn(r,n)!==f.False);return i.length===1?i[0]:xe(i)}function Eo(e,n,i){return Ct(e)?x(Kf(e,n),i):Ue(e)?x(Xf(e,n),i):x(fe(e)?Gf(e.anyOf,n):Jn(e,n)!==f.False?e:te(),i)}function Vf(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Eo(e[r],n);return i}function Jf(e,n){return Vf(e.properties,n)}function Xf(e,n){const i=Jf(e,n);return ye(i)}function Yf(e,n){return gn(e)?x(e.returns,n):te(n)}function ol(e){return Lt(vt(e))}function qt(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 Zf(e,n,i){return Ou(e)?Co(wt(e),n,i):qt(e.pattern,n,i)}function Qf(e,n,i){return Co(wt(xe(e)),n,i)}function eg(e,n,i){return Co([e.toString()],n,i)}function tg(e,n,i){return qt(e.source,n,i)}function ng(e,n,i){const r=ie(e.pattern)?sn:e.pattern;return qt(r,n,i)}function ig(e,n,i){return qt(sn,n,i)}function rg(e,n,i){return qt(Jp,n,i)}function og(e,n,i){return me({true:n,false:n},i)}function ag(e,n,i){return qt(an,n,i)}function sg(e,n,i){return qt(an,n,i)}function al(e,n,i={}){return fe(e)?Qf(e.anyOf,n,i):Ct(e)?Zf(e,n,i):Bt(e)?eg(e.const,n,i):Wn(e)?og(e,n,i):bn(e)?ag(e,n,i):On(e)?sg(e,n,i):Os(e)?tg(e,n,i):qn(e)?ng(e,n,i):gs(e)?ig(e,n,i):Hn(e)?rg(e,n,i):te(i)}function Do(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function lg(e){const n=Do(e);return n===sn?Ut():n===an?Ht():Ut({pattern:n})}function sl(e){return e.patternProperties[Do(e)]}function cg(e,n){return n.parameters=Yn(e,n.parameters),n.returns=Je(e,n.returns),n}function dg(e,n){return n.parameters=Yn(e,n.parameters),n.returns=Je(e,n.returns),n}function pg(e,n){return n.allOf=Yn(e,n.allOf),n}function ug(e,n){return n.anyOf=Yn(e,n.anyOf),n}function mg(e,n){return ie(n.items)||(n.items=Yn(e,n.items)),n}function fg(e,n){return n.items=Je(e,n.items),n}function gg(e,n){return n.items=Je(e,n.items),n}function hg(e,n){return n.items=Je(e,n.items),n}function bg(e,n){return n.item=Je(e,n.item),n}function Og(e,n){const i=wg(e,n.properties);return{...n,...me(i)}}function yg(e,n){const i=Je(e,lg(n)),r=Je(e,sl(n)),o=al(i,r);return{...n,...o}}function xg(e,n){return n.index in e?e[n.index]:Ji()}function Sg(e,n){const i=mo(n),r=yt(n),o=Je(e,n);return i&&r?ol(o):i&&!r?Lt(o):!i&&r?vt(o):o}function wg(e,n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:Sg(e,n[r])}),{})}function Yn(e,n){return n.map(i=>Je(e,i))}function Je(e,n){return gn(n)?cg(e,n):hn(n)?dg(e,n):ze(n)?pg(e,n):fe(n)?ug(e,n):Dt(n)?mg(e,n):mn(n)?fg(e,n):ji(n)?gg(e,n):Ui(n)?hg(e,n):Mi(n)?bg(e,n):Ye(n)?Og(e,n):Bi(n)?yg(e,n):hs(n)?xg(e,n):n}function Lg(e,n){return Je(n,co(e))}function vg(e){return x({[v]:"Integer",type:"integer"},e)}function Pg(e,n,i){return{[e]:wn(re(e),n,ke(i))}}function $g(e,n,i){return e.reduce((o,a)=>({...o,...Pg(a,n,i)}),{})}function Ig(e,n,i){return $g(e.keys,n,i)}function Ng(e,n,i){const r=Ig(e,n,i);return ye(r)}function Ag(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toLowerCase(),i].join("")}function kg(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toUpperCase(),i].join("")}function Tg(e){return e.toUpperCase()}function Fg(e){return e.toLowerCase()}function jg(e,n,i){const r=Ao(e.pattern);if(!Un(r))return{...e,pattern:ll(e.pattern,n)};const s=[...qi(r)].map(d=>re(d)),c=cl(s,n),l=xe(c);return Es([l],i)}function ll(e,n){return typeof e=="string"?n==="Uncapitalize"?Ag(e):n==="Capitalize"?kg(e):n==="Uppercase"?Tg(e):n==="Lowercase"?Fg(e):e:e.toString()}function cl(e,n){return e.map(i=>wn(i,n))}function wn(e,n,i={}){return Et(e)?Ng(e,n,i):Ct(e)?jg(e,n,i):fe(e)?xe(cl(e.anyOf,n),i):Bt(e)?re(ll(e.const,n),i):x(e,i)}function Rg(e,n={}){return wn(e,"Capitalize",n)}function Ug(e,n={}){return wn(e,"Lowercase",n)}function Mg(e,n={}){return wn(e,"Uncapitalize",n)}function Bg(e,n={}){return wn(e,"Uppercase",n)}function Eg(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=Zi(e[o],n,ke(i));return r}function Cg(e,n,i){return Eg(e.properties,n,i)}function Dg(e,n,i){const r=Cg(e,n,i);return ye(r)}function zg(e,n){return e.map(i=>zo(i,n))}function _g(e,n){return e.map(i=>zo(i,n))}function Wg(e,n){const{[n]:i,...r}=e;return r}function Hg(e,n){return n.reduce((i,r)=>Wg(i,r),e)}function qg(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=Hg(e.properties,n);return me(r,i)}function Kg(e){const n=e.reduce((i,r)=>bs(r)?[...i,re(r)]:i,[]);return xe(n)}function zo(e,n){return ze(e)?Pt(zg(e.allOf,n)):fe(e)?xe(_g(e.anyOf,n)):Ye(e)?qg(e,n):me({})}function Zi(e,n,i){const r=Ne(n)?Kg(n):n,o=lt(n)?wt(n):n,a=$e(e),s=$e(n);return Ue(e)?Dg(e,o,i):Et(n)?Xg(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 Gg(e,n,i){return{[n]:Zi(e,[n],ke(i))}}function Vg(e,n,i){return n.reduce((r,o)=>({...r,...Gg(e,o,i)}),{})}function Jg(e,n,i){return Vg(e,n.keys,i)}function Xg(e,n,i){const r=Jg(e,n,i);return ye(r)}function Yg(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=Qi(e[o],n,ke(i));return r}function Zg(e,n,i){return Yg(e.properties,n,i)}function Qg(e,n,i){const r=Zg(e,n,i);return ye(r)}function eh(e,n){return e.map(i=>_o(i,n))}function th(e,n){return e.map(i=>_o(i,n))}function nh(e,n){const i={};for(const r of n)r in e&&(i[r]=e[r]);return i}function ih(e,n){const i=Fe(e,[Ee,"$id","required","properties"]),r=nh(e.properties,n);return me(r,i)}function rh(e){const n=e.reduce((i,r)=>bs(r)?[...i,re(r)]:i,[]);return xe(n)}function _o(e,n){return ze(e)?Pt(eh(e.allOf,n)):fe(e)?xe(th(e.anyOf,n)):Ye(e)?ih(e,n):me({})}function Qi(e,n,i){const r=Ne(n)?rh(n):n,o=lt(n)?wt(n):n,a=$e(e),s=$e(n);return Ue(e)?Qg(e,o,i):Et(n)?lh(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 oh(e,n,i){return{[n]:Qi(e,[n],ke(i))}}function ah(e,n,i){return n.reduce((r,o)=>({...r,...oh(e,o,i)}),{})}function sh(e,n,i){return ah(e,n.keys,i)}function lh(e,n,i){const r=sh(e,n,i);return ye(r)}function ch(e,n){return le("Partial",[le(e,n)])}function dh(e){return le("Partial",[Vn(e)])}function ph(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=vt(e[i]);return n}function uh(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=ph(e.properties);return me(i,n)}function La(e){return e.map(n=>dl(n))}function dl(e){return fn(e)?ch(e.target,e.parameters):$e(e)?dh(e.$ref):ze(e)?Pt(La(e.allOf)):fe(e)?xe(La(e.anyOf)):Ye(e)?uh(e):Ri(e)||Wn(e)||bn(e)||Bt(e)||fo(e)||On(e)||qn(e)||go(e)||ho(e)?e:me({})}function Wo(e,n){return Ue(e)?gh(e,n):x({...dl(e),...n})}function mh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Wo(e[r],ke(n));return i}function fh(e,n){return mh(e.properties,n)}function gh(e,n){const i=fh(e,n);return ye(i)}function hh(e,n){return le("Required",[le(e,n)])}function bh(e){return le("Required",[Vn(e)])}function Oh(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=Fe(e[i],[dt]);return n}function yh(e){const n=Fe(e,[Ee,"$id","required","properties"]),i=Oh(e.properties);return me(i,n)}function va(e){return e.map(n=>pl(n))}function pl(e){return fn(e)?hh(e.target,e.parameters):$e(e)?bh(e.$ref):ze(e)?Pt(va(e.allOf)):fe(e)?xe(va(e.anyOf)):Ye(e)?yh(e):Ri(e)||Wn(e)||bn(e)||Bt(e)||fo(e)||On(e)||qn(e)||go(e)||ho(e)?e:me({})}function Ho(e,n){return Ue(e)?wh(e,n):x({...pl(e),...n})}function xh(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Ho(e[r],n);return i}function Sh(e,n){return xh(e.properties,n)}function wh(e,n){const i=Sh(e,n);return ye(i)}function Lh(e,n){return n.map(i=>$e(i)?qo(e,i.$ref):je(e,i))}function qo(e,n){return n in e?$e(e[n])?qo(e,e[n].$ref):je(e,e[n]):te()}function vh(e){return Gi(e[0])}function Ph(e){return Ki(e[0],e[1])}function $h(e){return Fo(e[0])}function Ih(e){return Wo(e[0])}function Nh(e){return Zi(e[0],e[1])}function Ah(e){return Qi(e[0],e[1])}function kh(e){return Ho(e[0])}function Th(e,n,i){const r=Lh(e,i);return n==="Awaited"?vh(r):n==="Index"?Ph(r):n==="KeyOf"?$h(r):n==="Partial"?Ih(r):n==="Omit"?Nh(r):n==="Pick"?Ah(r):n==="Required"?kh(r):te()}function Fh(e,n){return Po(je(e,n))}function jh(e,n){return $o(je(e,n))}function Rh(e,n,i){return Io(Zn(e,n),je(e,i))}function Uh(e,n,i){return Gn(Zn(e,n),je(e,i))}function Mh(e,n){return Pt(Zn(e,n))}function Bh(e,n){return To(je(e,n))}function Eh(e,n){return me(globalThis.Object.keys(n).reduce((i,r)=>({...i,[r]:je(e,n[r])}),{}))}function Ch(e,n){const[i,r]=[je(e,sl(n)),Do(n)],o=co(n);return o.patternProperties[r]=i,o}function Dh(e,n){return $e(n)?{...qo(e,n.$ref),[Ee]:n[Ee]}:n}function zh(e,n){return xn(Zn(e,n))}function _h(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(Dh(e,n),n):mn(n)?x(Fh(e,n.items),n):ji(n)?x(jh(e,n.items),n):fn(n)?x(Th(e,n.target,n.parameters)):gn(n)?x(Rh(e,n.parameters,n.returns),n):hn(n)?x(Uh(e,n.parameters,n.returns),n):ze(n)?x(Mh(e,n.allOf),n):Ui(n)?x(Bh(e,n.items),n):Ye(n)?x(Eh(e,n.properties),n):Bi(n)?x(Ch(e,n)):Dt(n)?x(zh(e,n.items||[]),n):fe(n)?x(_h(e,n.anyOf),n):n}function Wh(e,n){return n in e?je(e,e[n]):te()}function Hh(e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:Wh(e,i)}),{})}class qh{constructor(n){const i=Hh(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 Kh(e){return new qh(e)}function Gh(e,n){return x({[v]:"Not",not:e},n)}function Vh(e,n){return hn(e)?xn(e.parameters,n):te()}let Jh=0;function Xh(e,n={}){ie(n.$id)&&(n.$id=`T${Jh++}`);const i=co(e({[v]:"This",$ref:`${n.$id}`}));return i.$id=n.$id,x({[Fi]:"Recursive",...i},n)}function Yh(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 Zh(e){return ze(e)?e.allOf:fe(e)?e.anyOf:Dt(e)?e.items??[]:[]}function Qh(e){return Zh(e)}function eb(e,n){return hn(e)?x(e.returns,n):te(n)}class tb{constructor(n){this.schema=n}Decode(n){return new nb(this.schema,n)}}class nb{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 ib(e){return new tb(e)}function rb(e={}){return x({[v]:e[v]??"Unsafe"},e)}function ob(e){return x({[v]:"Void",type:"void"},e)}const ab=Object.freeze(Object.defineProperty({__proto__:null,Any:jn,Argument:nu,Array:Po,AsyncIterator:$o,Awaited:Gi,BigInt:ko,Boolean:Ms,Capitalize:Rg,Composite:Bm,Const:Dm,Constructor:Io,ConstructorParameters:zm,Date:Gs,Enum:_m,Exclude:Bo,Extends:Mo,Extract:Eo,Function:Gn,Index:Ki,InstanceType:Yf,Instantiate:Lg,Integer:vg,Intersect:Pt,Iterator:To,KeyOf:Fo,Literal:re,Lowercase:Ug,Mapped:om,Module:Kh,Never:te,Not:Gh,Null:Vs,Number:Ht,Object:me,Omit:Zi,Optional:vt,Parameters:Vh,Partial:Wo,Pick:Qi,Promise:_s,Readonly:Lt,ReadonlyOptional:ol,Record:al,Recursive:Xh,Ref:Vn,RegExp:Yh,Required:Ho,Rest:Qh,ReturnType:eb,String:Ut,Symbol:Js,TemplateLiteral:Es,Transform:ib,Tuple:xn,Uint8Array:Ys,Uncapitalize:Mg,Undefined:Xs,Union:xe,Unknown:Ji,Unsafe:rb,Uppercase:Bg,Void:ob},Symbol.toStringTag,{value:"Module"})),t=ab;var sb=["Arial","Calibri","Cambria","Consolas","Courier New","Georgia","Segoe UI","Tahoma","Times New Roman","Trebuchet MS","Verdana","Helvetica","Helvetica Neue","Menlo","Monaco"];function U0(e){const n=e.toLowerCase();return sb.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."}),lb=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"}),cb=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"}),db=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"}),pb=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)"}),ub=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."}),mb=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"}),fb=t.Union([lb,cb,db,mb,pb,ub],{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.'}),gb=t.Union([t.Literal("sans"),t.Literal("serif"),t.Literal("mono"),t.Literal("display"),t.Literal("handwriting")],{description:"Broad category used for fallback selection"}),hb=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(gb),sources:t.Array(fb,{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(hb,{description:"Document-scoped font registry. Every non-safe font used in this document must be registered here."}),ul=["eyebrow","display","stat","quote","label","footer","tableHeader","tableCell","chartLabel","tracker","source"],bb=t.Union(ul.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."}),Ob=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}),yb=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}),xb=t.Object({roles:t.Optional(yb),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}),Sb=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(bb),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}),wb=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."}),Lb=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(Ob),typography:t.Optional(xb),spacing:t.Optional(Sb),chrome:t.Optional(wb),motif:t.Optional(Lb)};t.Object(nr,{additionalProperties:!1});var vb=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),Pb=["primary","secondary","accent","background","text","text2","background2","accent4","accent5","accent6"],$b=["accent1","accent2","accent3","tx1","tx2","bg1","bg2"],Go=t.Union([vb,...Pb.map(e=>t.Literal(e)),...$b.map(e=>t.Literal(e))],{description:"Hex color or semantic theme color name"}),ml=["title","subtitle","heading1","heading2","heading3","body","caption",...ul],fl=t.Union(ml.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}),Kt=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"}),Ib=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}),gl=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(Ib,{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(Kt),style:t.Optional(fl)},{description:"Text component props",additionalProperties:!1}),hl=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(Kt)},{description:"PPTX image component props",additionalProperties:!1}),bl=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"}),Nb=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}),Ab=["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"],kb=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"}),Ol=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(kb,{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"}),Tb=t.Object({preset:t.Union(Ab.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"}),yl=t.Object({type:bl,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(Ol),pattern:t.Optional(Tb)},{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(Nb,{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(Kt),style:t.Optional(fl)},{description:"Shape component props",additionalProperties:!1}),Fb=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})]),xl=t.Object({rows:t.Array(t.Array(Fb,{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(Kt)},{description:"PPTX table component props",additionalProperties:!1}),Sl=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(Kt)},{description:"PPTX Highcharts component props",additionalProperties:!1}),si=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),jb=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"}),Rb=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"}),wl=t.Object({type:jb,data:t.Array(Rb,{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(Kt)},{description:"Native PowerPoint chart component props",additionalProperties:!1});function Ll(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:gl,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:hl,hasChildren:!1,category:"content",propsRequired:!0,description:"Image element - displays images from file path, URL, or base64 data."},{name:"shape",propsSchema:yl,hasChildren:!1,category:"content",description:"Shape element - draws geometric shapes with optional text, fill, and line styling."},{name:"table",propsSchema:xl,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:Sl,hasChildren:!1,category:"content",description:"Highcharts element - renders charts via Highcharts Export Server."},{name:"chart",propsSchema:wl,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 Yt(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:Ll(e)?e.propsSchema:t.Optional(e.propsSchema)},{additionalProperties:!1,description:e.description})}var Ub=t.Union([Yt(gt[0]),Yt(gt[1]),Yt(gt[2]),Yt(gt[3]),Yt(gt[4]),Yt(gt[5])],{$id:"PptxSlideContent",discriminator:{propertyName:"name"},description:"A single PPTX slide content element (text, image, shape, table, highcharts, or chart)."}),Mb=t.Partial(gl),Bb=t.Partial(hl),Eb=t.Partial(yl),Cb=t.Partial(xl),Db=t.Partial(Sl),zb=t.Partial(wl),vl=t.Object({text:t.Optional(Mb),image:t.Optional(Bb),shape:t.Optional(Eb),table:t.Optional(Cb),highcharts:t.Optional(Db),chart:t.Optional(zb)},{additionalProperties:!0});function _b(e){switch(e.errorType){case u.ArrayContains:return"Expected array to contain at least one matching value";case u.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case u.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case u.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case u.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case u.ArrayUniqueItems:return"Expected array elements to be unique";case u.Array:return"Expected array";case u.AsyncIterator:return"Expected AsyncIterator";case u.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case u.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case u.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case u.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case u.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case u.BigInt:return"Expected bigint";case u.Boolean:return"Expected boolean";case u.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case u.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case u.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case u.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case u.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case u.Date:return"Expected Date";case u.Function:return"Expected function";case u.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case u.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case u.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case u.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case u.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case u.Integer:return"Expected integer";case u.IntersectUnevaluatedProperties:return"Unexpected property";case u.Intersect:return"Expected all values to match";case u.Iterator:return"Expected Iterator";case u.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case u.Never:return"Never";case u.Not:return"Value should not match";case u.Null:return"Expected null";case u.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case u.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case u.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case u.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case u.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case u.Number:return"Expected number";case u.Object:return"Expected object";case u.ObjectAdditionalProperties:return"Unexpected property";case u.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case u.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case u.ObjectRequiredProperty:return"Expected required property";case u.Promise:return"Expected Promise";case u.RegExp:return"Expected string to match regular expression";case u.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case u.StringFormat:return`Expected string to match '${e.schema.format}' format`;case u.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case u.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case u.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case u.String:return"Expected string";case u.Symbol:return"Expected symbol";case u.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case u.Tuple:return"Expected tuple";case u.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case u.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case u.Uint8Array:return"Expected Uint8Array";case u.Undefined:return"Expected undefined";case u.Union:return"Expected union value";case u.Void:return"Expected void";case u.Kind:return`Expected kind '${e.schema[v]}'`;default:return"Unknown error type"}}let Wb=_b;function Hb(){return Wb}class qb extends Xe{constructor(n){super(`Unable to dereference schema with $id '${n.$ref}'`),this.schema=n}}function Kb(e,n){const i=n.find(r=>r.$id===e.$ref);if(i===void 0)throw new qb(e);return Gt(i,n)}function Pl(e,n){return!et(e.$id)||n.some(i=>i.$id===e.$id)||n.push(e),n}function Gt(e,n){return e[v]==="This"||e[v]==="Ref"?Kb(e,n):e}class Gb 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 nn=BigInt("14695981039346656037");const[Vb,Jb]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Xb=Array.from({length:256}).map((e,n)=>BigInt(n)),$l=new Float64Array(1),Il=new DataView($l.buffer),Nl=new Uint8Array($l.buffer);function*Yb(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 Zb(e){Se(Re.Array);for(const n of e)cn(n)}function Qb(e){Se(Re.Boolean),Se(e?1:0)}function eO(e){Se(Re.BigInt),Il.setBigInt64(0,e);for(const n of Nl)Se(n)}function tO(e){Se(Re.Date),cn(e.getTime())}function nO(e){Se(Re.Null)}function iO(e){Se(Re.Number),Il.setFloat64(0,e);for(const n of Nl)Se(n)}function rO(e){Se(Re.Object);for(const n of globalThis.Object.getOwnPropertyNames(e).sort())cn(n),cn(e[n])}function oO(e){Se(Re.String);for(let n=0;n<e.length;n++)for(const i of Yb(e.charCodeAt(n)))Se(i)}function aO(e){Se(Re.Symbol),cn(e.description)}function sO(e){Se(Re.Uint8Array);for(let n=0;n<e.length;n++)Se(e[n])}function lO(e){return Se(Re.Undefined)}function cn(e){if(it(e))return Zb(e);if(Ai(e))return Qb(e);if(ki(e))return eO(e);if(zn(e))return tO(e);if(Ni(e))return nO();if(at(e))return iO(e);if(nt(e))return rO(e);if(et(e))return oO(e);if(Ti(e))return aO(e);if(po(e))return sO(e);if(Ot(e))return lO();throw new Gb(e)}function Se(e){nn=nn^Xb[e],nn=nn*Vb%Jb}function Al(e){return nn=BigInt("14695981039346656037"),cn(e),nn}class cO extends Xe{constructor(n){super("Unknown type"),this.schema=n}}function dO(e){return e[v]==="Any"||e[v]==="Unknown"}function M(e){return e!==void 0}function pO(e,n,i){return!0}function uO(e,n,i){return!0}function mO(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=Al(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 fO(e,n,i){return ps(i)}function gO(e,n,i){return!(!ki(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 hO(e,n,i){return Ai(i)}function bO(e,n,i){return pe(e.returns,n,i.prototype)}function OO(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 yO(e,n,i){return uo(i)}function xO(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return pe(o,[...n,...r],i)}function SO(e,n,i){return!(!fs(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 wO(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 LO(e,n,i){return us(i)}function vO(e,n,i){return i===e.const}function PO(e,n,i){return!1}function $O(e,n,i){return!pe(e.not,n,i)}function IO(e,n,i){return Ni(i)}function NO(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 AO(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)||dO(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 kO(e,n,i){return ms(i)}function TO(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,g])=>a.test(d)?pe(o,n,g):!0),c=typeof e.additionalProperties=="object"?Object.entries(i).every(([d,g])=>a.test(d)?!0:pe(e.additionalProperties,n,g)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(i).every(d=>a.test(d)):!0;return s&&c&&l}function FO(e,n,i){return pe(Gt(e,n),n,i)}function jO(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 RO(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)?Ns(e.format)?ks(e.format)(i):!1:!0}function UO(e,n,i){return Ti(i)}function MO(e,n,i){return et(i)&&new RegExp(e.pattern).test(i)}function BO(e,n,i){return pe(Gt(e,n),n,i)}function EO(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 CO(e,n,i){return Ot(i)}function DO(e,n,i){return e.anyOf.some(r=>pe(r,n,i))}function zO(e,n,i){return!(!po(i)||M(e.maxByteLength)&&!(i.length<=e.maxByteLength)||M(e.minByteLength)&&!(i.length>=e.minByteLength))}function _O(e,n,i){return!0}function WO(e,n,i){return Te.IsVoidLike(i)}function HO(e,n,i){return vo(e[v])?Fs(e[v])(e,i):!1}function pe(e,n,i){const r=M(e.$id)?Pl(e,n):n,o=e;switch(o[v]){case"Any":return pO();case"Argument":return uO();case"Array":return mO(o,r,i);case"AsyncIterator":return fO(o,r,i);case"BigInt":return gO(o,r,i);case"Boolean":return hO(o,r,i);case"Constructor":return bO(o,r,i);case"Date":return OO(o,r,i);case"Function":return yO(o,r,i);case"Import":return xO(o,r,i);case"Integer":return SO(o,r,i);case"Intersect":return wO(o,r,i);case"Iterator":return LO(o,r,i);case"Literal":return vO(o,r,i);case"Never":return PO();case"Not":return $O(o,r,i);case"Null":return IO(o,r,i);case"Number":return NO(o,r,i);case"Object":return AO(o,r,i);case"Promise":return kO(o,r,i);case"Record":return TO(o,r,i);case"Ref":return FO(o,r,i);case"RegExp":return jO(o,r,i);case"String":return RO(o,r,i);case"Symbol":return UO(o,r,i);case"TemplateLiteral":return MO(o,r,i);case"This":return BO(o,r,i);case"Tuple":return EO(o,r,i);case"Undefined":return CO(o,r,i);case"Union":return DO(o,r,i);case"Uint8Array":return zO(o,r,i);case"Unknown":return _O();case"Void":return WO(o,r,i);default:if(!vo(o[v]))throw new cO(o);return HO(o,r,i)}}function or(...e){return e.length===3?pe(e[0],e[1],e[2]):pe(e[0],[],e[1])}var u;(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"})(u||(u={}));class qO 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 kl{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:Hb()({errorType:e,path:i,schema:n,value:r,errors:o}),errors:o}}function*KO(e,n,i,r){}function*GO(e,n,i,r){}function*VO(e,n,i,r){if(!it(r))return yield S(u.Array,e,i,r);U(e.minItems)&&!(r.length>=e.minItems)&&(yield S(u.ArrayMinItems,e,i,r)),U(e.maxItems)&&!(r.length<=e.maxItems)&&(yield S(u.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=Al(c);if(s.has(l))return!1;s.add(l)}return!0}()&&(yield S(u.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(u.ArrayContains,e,i,r)),at(e.minContains)&&a<e.minContains&&(yield S(u.ArrayMinContains,e,i,r)),at(e.maxContains)&&a>e.maxContains&&(yield S(u.ArrayMaxContains,e,i,r))}function*JO(e,n,i,r){ps(r)||(yield S(u.AsyncIterator,e,i,r))}function*XO(e,n,i,r){if(!ki(r))return yield S(u.BigInt,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(u.BigIntExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(u.BigIntExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(u.BigIntMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(u.BigIntMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==BigInt(0)&&(yield S(u.BigIntMultipleOf,e,i,r))}function*YO(e,n,i,r){Ai(r)||(yield S(u.Boolean,e,i,r))}function*ZO(e,n,i,r){yield*ue(e.returns,n,i,r.prototype)}function*QO(e,n,i,r){if(!zn(r))return yield S(u.Date,e,i,r);U(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)&&(yield S(u.DateExclusiveMaximumTimestamp,e,i,r)),U(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)&&(yield S(u.DateExclusiveMinimumTimestamp,e,i,r)),U(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)&&(yield S(u.DateMaximumTimestamp,e,i,r)),U(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)&&(yield S(u.DateMinimumTimestamp,e,i,r)),U(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0&&(yield S(u.DateMultipleOfTimestamp,e,i,r))}function*ey(e,n,i,r){uo(r)||(yield S(u.Function,e,i,r))}function*ty(e,n,i,r){const o=globalThis.Object.values(e.$defs),a=e.$defs[e.$ref];yield*ue(a,[...n,...o],i,r)}function*ny(e,n,i,r){if(!fs(r))return yield S(u.Integer,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(u.IntegerExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(u.IntegerExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(u.IntegerMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(u.IntegerMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==0&&(yield S(u.IntegerMultipleOf,e,i,r))}function*iy(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(u.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(u.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*ry(e,n,i,r){us(r)||(yield S(u.Iterator,e,i,r))}function*oy(e,n,i,r){r!==e.const&&(yield S(u.Literal,e,i,r))}function*ay(e,n,i,r){yield S(u.Never,e,i,r)}function*sy(e,n,i,r){ue(e.not,n,i,r).next().done===!0&&(yield S(u.Not,e,i,r))}function*ly(e,n,i,r){Ni(r)||(yield S(u.Null,e,i,r))}function*cy(e,n,i,r){if(!Te.IsNumberLike(r))return yield S(u.Number,e,i,r);U(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield S(u.NumberExclusiveMaximum,e,i,r)),U(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield S(u.NumberExclusiveMinimum,e,i,r)),U(e.maximum)&&!(r<=e.maximum)&&(yield S(u.NumberMaximum,e,i,r)),U(e.minimum)&&!(r>=e.minimum)&&(yield S(u.NumberMinimum,e,i,r)),U(e.multipleOf)&&r%e.multipleOf!==0&&(yield S(u.NumberMultipleOf,e,i,r))}function*dy(e,n,i,r){if(!Te.IsObjectLike(r))return yield S(u.Object,e,i,r);U(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield S(u.ObjectMinProperties,e,i,r)),U(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield S(u.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(u.ObjectRequiredProperty,e.properties[c],`${i}/${ot(c)}`,void 0));if(e.additionalProperties===!1)for(const c of s)a.includes(c)||(yield S(u.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(u.ObjectRequiredProperty,l,`${i}/${ot(c)}`,void 0))):Te.IsExactOptionalProperty(r,c)&&(yield*ue(l,n,`${i}/${ot(c)}`,r[c]))}}function*py(e,n,i,r){ms(r)||(yield S(u.Promise,e,i,r))}function*uy(e,n,i,r){if(!Te.IsRecordLike(r))return yield S(u.Object,e,i,r);U(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield S(u.ObjectMinProperties,e,i,r)),U(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield S(u.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(u.ObjectAdditionalProperties,e,`${i}/${ot(c)}`,l)}}function*my(e,n,i,r){yield*ue(Gt(e,n),n,i,r)}function*fy(e,n,i,r){if(!et(r))return yield S(u.String,e,i,r);if(U(e.minLength)&&!(r.length>=e.minLength)&&(yield S(u.StringMinLength,e,i,r)),U(e.maxLength)&&!(r.length<=e.maxLength)&&(yield S(u.StringMaxLength,e,i,r)),!new RegExp(e.source,e.flags).test(r))return yield S(u.RegExp,e,i,r)}function*gy(e,n,i,r){if(!et(r))return yield S(u.String,e,i,r);U(e.minLength)&&!(r.length>=e.minLength)&&(yield S(u.StringMinLength,e,i,r)),U(e.maxLength)&&!(r.length<=e.maxLength)&&(yield S(u.StringMaxLength,e,i,r)),et(e.pattern)&&(new RegExp(e.pattern).test(r)||(yield S(u.StringPattern,e,i,r))),et(e.format)&&(Ns(e.format)?ks(e.format)(r)||(yield S(u.StringFormat,e,i,r)):yield S(u.StringFormatUnknown,e,i,r))}function*hy(e,n,i,r){Ti(r)||(yield S(u.Symbol,e,i,r))}function*by(e,n,i,r){if(!et(r))return yield S(u.String,e,i,r);new RegExp(e.pattern).test(r)||(yield S(u.StringPattern,e,i,r))}function*Oy(e,n,i,r){yield*ue(Gt(e,n),n,i,r)}function*yy(e,n,i,r){if(!it(r))return yield S(u.Tuple,e,i,r);if(e.items===void 0&&r.length!==0)return yield S(u.TupleLength,e,i,r);if(r.length!==e.maxItems)return yield S(u.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*xy(e,n,i,r){Ot(r)||(yield S(u.Undefined,e,i,r))}function*Sy(e,n,i,r){if(or(e,n,r))return;const o=e.anyOf.map(a=>new kl(ue(a,n,i,r)));yield S(u.Union,e,i,r,o)}function*wy(e,n,i,r){if(!po(r))return yield S(u.Uint8Array,e,i,r);U(e.maxByteLength)&&!(r.length<=e.maxByteLength)&&(yield S(u.Uint8ArrayMaxByteLength,e,i,r)),U(e.minByteLength)&&!(r.length>=e.minByteLength)&&(yield S(u.Uint8ArrayMinByteLength,e,i,r))}function*Ly(e,n,i,r){}function*vy(e,n,i,r){Te.IsVoidLike(r)||(yield S(u.Void,e,i,r))}function*Py(e,n,i,r){Fs(e[v])(e,r)||(yield S(u.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*KO();case"Argument":return yield*GO();case"Array":return yield*VO(a,o,i,r);case"AsyncIterator":return yield*JO(a,o,i,r);case"BigInt":return yield*XO(a,o,i,r);case"Boolean":return yield*YO(a,o,i,r);case"Constructor":return yield*ZO(a,o,i,r);case"Date":return yield*QO(a,o,i,r);case"Function":return yield*ey(a,o,i,r);case"Import":return yield*ty(a,o,i,r);case"Integer":return yield*ny(a,o,i,r);case"Intersect":return yield*iy(a,o,i,r);case"Iterator":return yield*ry(a,o,i,r);case"Literal":return yield*oy(a,o,i,r);case"Never":return yield*ay(a,o,i,r);case"Not":return yield*sy(a,o,i,r);case"Null":return yield*ly(a,o,i,r);case"Number":return yield*cy(a,o,i,r);case"Object":return yield*dy(a,o,i,r);case"Promise":return yield*py(a,o,i,r);case"Record":return yield*uy(a,o,i,r);case"Ref":return yield*my(a,o,i,r);case"RegExp":return yield*fy(a,o,i,r);case"String":return yield*gy(a,o,i,r);case"Symbol":return yield*hy(a,o,i,r);case"TemplateLiteral":return yield*by(a,o,i,r);case"This":return yield*Oy(a,o,i,r);case"Tuple":return yield*yy(a,o,i,r);case"Undefined":return yield*xy(a,o,i,r);case"Union":return yield*Sy(a,o,i,r);case"Uint8Array":return yield*wy(a,o,i,r);case"Unknown":return yield*Ly();case"Void":return yield*vy(a,o,i,r);default:if(!vo(a[v]))throw new qO(e);return yield*Py(a,o,i,r)}}function $y(...e){const n=e.length===3?ue(e[0],e[1],"",e[2]):ue(e[0],[],"",e[1]);return new kl(n)}function Iy(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Mt(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Mt(e[i]);return n}function Ny(e){return e.map(n=>Mt(n))}function Ay(e){return e.slice()}function ky(e){return new Map(Mt([...e.entries()]))}function Ty(e){return new Set(Mt([...e.entries()]))}function Fy(e){return new Date(e.toISOString())}function Mt(e){if(it(e))return Ny(e);if(zn(e))return Fy(e);if(wp(e))return Ay(e);if(xp(e))return ky(e);if(Sp(e))return Ty(e);if(nt(e))return Iy(e);if(vp(e))return e;throw new Error("ValueClone: Unable to clone value")}function ut(e,n){const i=Lp(e,"default")?e.default:void 0,r=uo(i)?i():Mt(i);return Ot(n)?r:nt(n)&&nt(r)?Object.assign(r,n):n}function Wr(e){return ys(e)&&"default"in e}function jy(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 Ry(e,n,i){return zn(i)?i:ut(e,i)}function Uy(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return Le(o,[...n,...r],i)}function My(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 By(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 Ey(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 Cy(e,n,i){return Le(Gt(e,n),n,ut(e,i))}function Dy(e,n,i){return Le(Gt(e,n),n,i)}function zy(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 _y(e,n,i){const r=ut(e,i);for(const o of e.anyOf){const a=Le(o,n,Mt(r));if(or(o,n,a))return a}return r}function Le(e,n,i){const r=Pl(e,n),o=e;switch(o[v]){case"Array":return jy(o,r,i);case"Date":return Ry(o,r,i);case"Import":return Uy(o,r,i);case"Intersect":return My(o,r,i);case"Object":return By(o,r,i);case"Record":return Ey(o,r,i);case"Ref":return Cy(o,r,i);case"This":return Dy(o,r,i);case"Tuple":return zy(o,r,i);case"Union":return _y(o,r,i);default:return ut(o,i)}}function Wy(...e){return e.length===3?Le(e[0],e[1],e[2]):Le(e[0],[],e[1])}var Qe={};function Hy(){return typeof process>"u"||!Qe?!1:!!(Qe.CI||Qe.GITHUB_ACTIONS||Qe.GITLAB_CI)}function qy(){var e;return typeof process>"u"||Qe!=null&&Qe.NO_COLOR?!1:Qe!=null&&Qe.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!Hy()}qy();var Ky=/^(\d+)\.(\d+)\.(\d+)$/;function $a(e){const n=e.match(Ky);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 Gy(e,n){const i=$a(e),r=$a(n);return i.major-r.major||i.minor-r.minor||i.patch-r.patch}function Tl(e){if(e.length===0)throw new Error("Cannot determine latest version from empty array");return e.reduce((n,i)=>Gy(i,n)>0?i:n)}function Fl(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 Vy(e){var i;const n=(i=e.properties)==null?void 0:i.version;return typeof(n==null?void 0:n.const)=="string"}function Jy(e){return Array.isArray(e.required)&&e.required.includes("name")}function Xy(e){const n=new Map;for(const i of e){const r=Fl(i),o=n.get(r);o?o.push(i):n.set(r,[i])}return n}function Yy(e,n){const i=n.find(r=>!Vy(r)&&typeof r.description=="string")??n.find(r=>typeof r.description=="string");return{const:e,type:"string",...i?{description:i.description}:{}}}function jl(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=>Fl(l)!==void 0&&Jy(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")?Xy(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])=>Yy(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 Hr(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 qr(e,n,i){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(r=>{typeof r=="object"&&r!==null&&qr(r,n,i)});return}e.$ref===n&&(e.$ref=i);for(const r of Object.values(e))typeof r=="object"&&r!==null&&qr(r,n,i)}}function Zy(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 g=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,m=r(O);p.items=m?{$ref:m}:{}}if(o(p.$ref)){const O=r(p.$ref);O?p.$ref=O:delete p.$ref}if(l==="$id"&&o(d)&&g!==`definitions.${d}.$id`){delete s[l];continue}a(d,g)}}}a(e)}function Qy(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,qr(l,O,"#")}const d={...s};function g(O,m=""){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(m!==`definitions.${N}`){const{$id:I,...w}=L;d[N]=w,O[h]={$ref:`#/definitions/${N}`},g(w,`definitions.${N}`);continue}}g(b,m?`${m}.${h}`:h)}}}g(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),Zy(p),c==null||c(p),jl(p),p}var Ia=200,Na=36,Aa=600,ex=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),tx=new Set(["heading","body","mono","light"]),nx=new Set(["fontRegistry"]);function Kr(e,n,i){if(e!=null){if(typeof e=="string"){if(i&&(ex.has(i)||tx.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))nx.has(o)||Kr(a,n,o)}}}function Rl(e){const n=new Set;return Kr(e,n),n}var M0=Rl,B0=Rl,E0={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"},ix=["actionTitle","takeaway","source","tracker","footer"],rx=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(ix.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"}),Ul=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(),rx,{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})),Ml=t.Record(t.String({pattern:"^[a-zA-Z][a-zA-Z0-9_-]*$"}),Ul,{description:"Document-local JSON block definitions. Names are not built into the engine."}),Bl=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"}},ox=["$item","$slot","$context"],Li=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ax=["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"],Zt=(e,n)=>new Set([...e].filter(i=>n.has(i))),sx=e=>new Set(e.flatMap(n=>[...n])),ka=e=>e===null?"null":Array.isArray(e)?"array":typeof e;function An(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=Zt(a,new Set(xr.filter(c=>s.includes(c)||c==="number"&&s.includes("integer"))))}if(Object.hasOwn(e,"const")&&(a=Zt(a,new Set([ka(e.const)]))),Array.isArray(e.enum)&&(a=Zt(a,new Set(e.enum.map(ka)))),typeof e.$ref=="string"){const s=n(e.$ref);s!==void 0&&(a=Zt(a,An(s,n,o)))}for(const s of["anyOf","oneOf"])Array.isArray(e[s])&&(a=Zt(a,sx(e[s].map(c=>An(c,n,o)))));if(Array.isArray(e.allOf))for(const s of e.allOf)a=Zt(a,An(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=>An(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 kt=(e,n)=>({type:"object",properties:e,required:n,additionalProperties:!1}),Sr=e=>({type:"string",pattern:"^(|/.*)$",description:e}),lx=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."}),cx=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}},dx=e=>({type:"object",required:[e]}),ci=Object.keys(Jo);function El(e,n,i=[],r="docx"){const o=`BlockTemplate_${n}`,a=lx(r),s=cx(r),c=A=>({description:A,anyOf:[Sr(A),...ox.map(R=>kt({[R]:Sr(a[R])},[R]))]}),l=`${o}_Body`,d=A=>({$ref:`#/definitions/${A}`});if(e[l])return d(l);const g={...e},p=g[n];g[n]={...p,anyOf:(p.anyOf??[p]).filter(A=>{var R,J;return!i.includes((J=(R=A.properties)==null?void 0:R.name)==null?void 0:J.const)})};const O=A=>{if(!A.startsWith("#/definitions/"))return;let R=g;for(const J of A.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},m=new Map,h=new Map;let b=0;const L=d(n),N=new Map,I=A=>{const R=JSON.stringify(A);let J=N.get(R);return J||(J=`${o}_Shared${b++}`,N.set(R,J),e[J]=A),d(J)},w=Object.fromEntries(ci.map(A=>[A,I(dx(A))])),D=I({anyOf:Object.values(w)}),_=[...new Set(["",...ci.flatMap(A=>Array.from({length:A.length-1},(R,J)=>A.slice(0,J+1)))])],T=I({type:"object",propertyNames:{pattern:`^(?:${_.map(A=>A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})$`}});function k(A){if(typeof A=="boolean")return A;const R=JSON.stringify(A),J=h.get(R);if(J)return{...d(J),...wr(A)};const Q=`${o}_Literal${b++}`;h.set(R,Q),e[Q]={};const X={...A};if(typeof A.$ref=="string"){const y=O(A.$ref);if(y!==void 0){const F=k(y);typeof F=="object"?X.$ref=F.$ref:(delete X.$ref,F||(X.not={}))}}A.properties&&(X.properties=Object.fromEntries(Object.entries(A.properties).map(([y,F])=>[y,["name","version"].includes(y)&&typeof F=="object"&&typeof F.const=="string"?F:W(F)]))),A.patternProperties&&(X.patternProperties=Object.fromEntries(Object.entries(A.patternProperties).map(([y,F])=>[y,W(F)]))),A.items!==void 0&&(X.items=Array.isArray(A.items)?A.items.map(y=>W(y,!0)):W(A.items,!0));for(const y of["additionalProperties","additionalItems"])typeof A[y]=="object"&&(X[y]=W(A[y],y==="additionalItems"));for(const y of["anyOf","oneOf","allOf"])Array.isArray(A[y])&&(X[y]=A[y].map(F=>{var ce,z;const Y=k(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"])A[y]!==void 0&&(X[y]=k(A[y]));return e[Q]=X,{...d(Q),...wr(A)}}function W(A,R=!1){if(A===!1)return!1;const J=wr(A),Q=typeof A=="object"?{...A}:A;typeof Q=="object"&&(delete Q.description,delete Q.markdownDescription);const X=`${R?"sequence":"value"}:${JSON.stringify(Q)}`,y=m.get(X);if(y)return{...d(y),...J};const F=`${o}_Value${b++}`;m.set(X,F),e[F]={};const Y=d(F),ce=An(Q,O);if(ce.size===0)return e[F]={allOf:[k(Q)]},Y;const z=()=>R?W(Q):Y,Vt=()=>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]=kt({[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]=kt({$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(Vt(),"Value or components to emit when the slot tested by $if is present."),else:li(Vt(),"Value or components to emit otherwise. Omit to produce no output.")},["$if","then"]);break;case"$each":Z[G]=kt({$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]=kt({$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]=kt({$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]=kt({$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 Jt=G;throw new Error(`Missing authoring schema for directive ${Jt}`)}}}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,Jt])=>[Ze,I(Jt)]))}):!1}))},else:k(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 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 px(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 ux(e){return[e.description,px(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:[...ax]},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];i={...c},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=ux(e);return r&&(i.markdownDescription=r),i}function mx(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 fx(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:mx(e[o],n)}}}))),r}function gx(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=fx(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 g=d;if(((O=(p=g.properties)==null?void 0:p.name)==null?void 0:O.const)==="block"&&g.properties.props){g.properties.props=Xo(s);return}for(const[m,h]of Object.entries(g))m!=="$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 Cl(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)=>Cl(a,`${n} ${c+1}`,i))}case"object":return Dl(e.properties??{},i);case"component":return i==="docx"?{name:"paragraph",props:{text:n}}:{name:"text",props:{text:n}};default:return n}}function Dl(e,n){return Object.fromEntries(Object.entries(e).filter(([,i])=>i.required&&i.default===void 0||i.role).map(([i,r])=>[i,Cl(r,i,n)]))}function hx(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:Dl(n.slots,i.format)}}}var bx=["docx","pptx"],vr=t.String({pattern:"^[a-z][a-z0-9]*(-[a-z0-9]+)*$",description:"Kebab-case identifier."}),Ox=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."}),yx=t.Object({description:t.String({minLength:1}),whenToUse:t.String({minLength:1}),pages:Ox,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(bx.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,yx,{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 xx=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"}),Sx=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"}),zl=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(xx),gutter:t.Optional(Sx)},{additionalProperties:!1,description:"Grid layout configuration"}),He=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),wx=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"}),_l=t.Object({...nr,displayName:t.Optional(t.String()),description:t.Optional(t.String()),version:t.Optional(t.String()),name:t.String({description:"Theme name"}),colors:t.Object({primary:He,secondary:He,accent:He,background:He,text:He,text2:t.Optional(He),background2:t.Optional(He),accent4:t.Optional(He),accent5:t.Optional(He),accent6:t.Optional(He)},{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:He},{additionalProperties:!1,description:"Default text styling"}),styles:t.Optional(t.Partial(t.Object(Object.fromEntries(ml.map(e=>[e,wx]))),{additionalProperties:!1,description:"Named text style presets"})),componentDefaults:t.Optional(vl)},{additionalProperties:!1,description:"Presentation theme configuration"}),jt=["pptxgenjs","office-open"],bi="pptxgenjs";function ar(e){return`PptxComponentDefinition_${e}`}function Lx(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];vx(r);break}return Wl(r),r}function vx(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,Wl(s))}}function vi(e){if(!(!e||typeof e!="object"))return e.properties}function Wl(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})]),Px=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(Kt),gridConfig:t.Optional(t.Object({...zl.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."}),$x=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: consulting (the house style), default, dark, minimal.',examples:["consulting","default","dark","minimal"],default:"default"}),_l],{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(vl),grid:t.Optional(zl),blocks:t.Optional(Ml),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 Ix=t.Object({color:t.Optional(Go),gradient:t.Optional(Ol),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}),Nx=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}),Ax=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(Ix),transition:t.Optional(Nx),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}),Ta=[...gt.map(({name:e})=>e),"block","group"],Mn=[{name:"pptx",propsSchema:$x,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:Ax,hasChildren:!0,allowedChildren:Ta,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:Px,hasChildren:!0,allowedChildren:Ta,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:Bl,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(jt.map(a=>t.Literal(a)),{description:'Renderer backend. Omitted defaults to "pptxgenjs".'}))),r.props=i?Lx(e.name,e.propsSchema,i.renderer):e.propsSchema,e.hasChildren&&n&&(r.children=t.Optional(t.Array(n))),Ll(e)||(r.props=t.Optional(r.props)),t.Object(r,{additionalProperties:!1,description:e.description})}function kx(e){return Mn.map(n=>$n(n,e))}function Hl(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],m=O.length===1?O[0]:t.Union(O);a.set(d.name,$n(d,m,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 Tx(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 Fx(e={}){const{customComponents:n=[]}=e,i=jt.map(r=>jx(n,r,r!==bi));return t.Union(i,{description:"Presentation definition, discriminated by the optional renderer field. Omitted renderer means pptxgenjs."})}function jx(e,n,i){return t.Recursive(r=>{const o=[];for(const c of e)if(c.versions.length>0){const l=Tl(c.versions.map(g=>g.version)),d=c.versions.map(g=>Tx(c,g,r,g.version===l));o.push(...d)}const s=[...Hl(r,o,{renderer:n,requireDiscriminator:i}),...o];return s.length===0?t.Object({}):t.Union(s)},{$id:ar(n)})}t.Union([...kx(t.Any())],{discriminator:{propertyName:"name"},description:"Standard PPTX component definition with discriminated union"});t.Recursive(e=>t.Union([...Hl(e)],{discriminator:{propertyName:"name"},description:"PPTX component definition with discriminated union"}));function Rx(e){const n=e.definitions??{},i=new Map;for(const o of jt){const a=ar(o);n[a]&&i.set(o,El(n,a,["pptx","slide"],"pptx"))}const r=o=>{var s,c,l,d,g,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),m=(p=(g=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:g.blocks)==null?void 0:p.patternProperties;if(O&&m)for(const h of Object.values(m))h.properties.body.items=O}Object.values(a).forEach(r)};r(e)}function Ux(e){const n=e.anyOf;if(!Array.isArray(n))return;const i=new Map;for(const a of jt){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=jt.filter(a=>a!==bi&&i.has(a));delete e.anyOf,e.type="object",e.properties={renderer:{description:'Renderer backend. Omitted defaults to "pptxgenjs".',anyOf:jt.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 Mx(e){var r,o;const n=e.definitions??{},i=[];for(const a of jt){const s=ar(a),c=n[s];if(!c)continue;const l=`PptxSlotContent_${a}`;if(!n[l]){const g=Hr(c).find(O=>{var m,h;return((h=(m=O.properties)==null?void 0:m.name)==null?void 0:h.const)==="slide"}),p=(o=(r=g==null?void 0:g.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 Bx(e,n={}){return Qy(e,{...n,enrich:i=>{Rx(i),Ux(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 ql=new Set(["name","id","enabled","props","children"]);[...ql];var Ex=new Set([...ql,"$schema"]);Ex.add("renderer");var H=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'}),Kl=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"'}),Gl=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"]}),Vl=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:120})),color:t.Optional(H),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}),rn=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"}),Jl=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Text alignment options including justify"}),Cx=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}),Dx=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(H)},{description:"Border configuration",additionalProperties:!1});var Xl=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}),Yl=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}),zx=t.Union([t.Literal("left"),t.Literal("right"),t.Literal("center"),t.Literal("decimal"),t.Literal("bar")],{description:"Tab stop alignment type"}),_x=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"}),Wx=t.Object({type:zx,position:t.Number({minimum:0,description:"Tab stop position in twips (1/20 of a point)"}),leader:t.Optional(_x)},{description:"Tab stop definition (w:tab in w:tabs)",additionalProperties:!1}),Hx=t.Array(Wx,{description:"Tab stops for the paragraph. Tab characters (\\t) in the text jump to these positions."}),qx=t.Union([t.Literal("character"),t.Literal("column"),t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Horizontal position relative to"}),Kx=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("paragraph"),t.Literal("line"),t.Literal("text")],{description:"Vertical position relative to"}),Gx=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Horizontal alignment"}),Vx=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Vertical alignment"}),Jx=t.Union([t.Literal("none"),t.Literal("square"),t.Literal("topAndBottom"),t.Literal("around"),t.Literal("tight"),t.Literal("through")],{description:"Text wrapping type"}),Xx=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(qx),align:t.Optional(Gx),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(Kx),align:t.Optional(Vx),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:Jx,side:t.Optional(Xx),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 Yx={};t.Object(Yx,{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")'}),Zx="^-?\\d+(\\.\\d+)?%$",Qx="^\\d+(\\.\\d+)?%$",Fa=t.Union([t.Number({description:"Inches from the canvas origin"}),t.String({pattern:Zx,description:'Percentage of the canvas extent on this axis, e.g. "25%"'})],{description:"Position in inches (number) or as a canvas percentage"}),ja=t.Union([t.Number({minimum:0,description:"Size in inches"}),t.String({pattern:Qx,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(Fa),y:t.Optional(Fa),w:t.Optional(ja),h:t.Optional(ja),rotate:t.Optional(t.Number({description:"Clockwise rotation in degrees"}))},Zl=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())},eS=t.Object({text:t.String({description:"Run text"}),color:t.Optional(It),...dr,underline:t.Optional(Zl),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"}),tS=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"}),Ql=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."}),nS=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"}),ec=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),tc=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical text anchoring inside the box"}),nc=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"}),iS=t.Object({text:t.Optional(t.String({description:"Plain text content"})),runs:t.Optional(t.Array(eS,{minItems:1,description:'Formatted runs, as an alternative to "text"'})),...Qo,color:t.Optional(It),...dr,underline:t.Optional(Zl),strike:t.Optional(t.Boolean({description:"Strikethrough"})),align:t.Optional(ec),valign:t.Optional(tc),margin:t.Optional(nc),fill:t.Optional(Ql)},{additionalProperties:!1,description:"Native visual text element — becomes a Word text box (wps:wsp) inside the drawing group"}),rS=t.Object({type:bl,...Qo,fill:t.Optional(Ql),line:t.Optional(nS),text:t.Optional(t.Union([t.String(),t.Array(tS,{minItems:1})],{description:"Text drawn inside the shape"})),...dr,fontColor:t.Optional(It),align:t.Optional(ec),valign:t.Optional(tc),margin:t.Optional(nc),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"}),oS=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 aS=t.Union([Pr("text",iS,"Text element - a native Word text box drawn on the visual canvas."),Pr("shape",rS,"Shape element - a native preset-geometry shape, optionally holding text."),Pr("image",oS,"Image element - a native picture; an SVG stays vector.")],{$id:"DocxNativeVisualContent",discriminator:{propertyName:"name"},description:"A single native visual element (text, shape, or image)."}),sS=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"}),lS=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}),cS=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(lS)},{description:"pptx canvas definition for the visual",additionalProperties:!1}),ic={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"}))},dS=t.Object({renderMode:t.Optional(t.Literal("raster",{description:"Render as a rasterized pptx slide (the default when omitted)."})),canvas:cS,elements:t.Optional(t.Array(Ub,{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:Aa,default:Ia,description:`Raster resolution in DPI (default ${Ia}, range ${Na}-${Aa}). Higher = sharper + larger.`})),serverUrl:t.Optional(t.String({description:"Rasterization service URL override (default from services.pptx)"})),...ic},{$id:"DocxVisualRasterProps",description:"Visual component props (pptx-rendered graphic)",additionalProperties:!1}),pS=t.Object({renderMode:t.Literal("native",{description:'Draw natively as a Word DrawingML group. Requires the "office-open" renderer.'}),canvas:sS,elements:t.Optional(t.Array(aS,{description:"Native drawing elements (text, shape, image), positioned with x/y/w/h in inches or canvas percentages"})),...ic},{$id:"DocxVisualNativeProps",description:'Visual component props (native Word drawing group; requires renderer "office-open")',additionalProperties:!1}),uS=t.Union([dS,pS],{description:"Visual component props — rasterized pptx slide (default) or a native Word drawing group"}),pr=["docxjs","office-open"],mS="docxjs";function Bn(e){return`ComponentDefinition_${e}`}function rc(e,n,i){const r=Zr(n);return Yr(r,Bn(i)),e==="visual"&&i!=="office-open"?fS(r)??r:(i==="office-open"&&Xr(r),r)}function fS(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 gS(e){const n=e.definitions??{},i=new Map;for(const o of pr){const a=Bn(o);n[a]&&i.set(o,El(n,a,["docx","section"]))}const r=o=>{var s,c,l,d,g,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),m=(p=(g=(d=a.properties.props)==null?void 0:d.properties)==null?void 0:g.blocks)==null?void 0:p.patternProperties;if(O&&m)for(const h of Object.values(m)){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 hS(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 bS=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(bS,{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}),OS=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}),oc={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"}))},yS=t.Object(oc,{description:"A reply within a comment thread",additionalProperties:!1}),mr=t.Object({...oc,replies:t.Optional(t.Array(yS,{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}),ac=t.Object({text:t.String({description:"Heading text (required)"}),level:t.Optional(Cx),font:t.Optional(t.Partial(rn)),language:t.Optional(Gl),noProof:t.Optional(Vl),noProofWords:t.Optional(Yo),alignment:t.Optional(Jl),spacing:t.Optional($t),indent:t.Optional(Yl),lineSpacing:t.Optional(t.Union([t.Number({minimum:0}),Xl],{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}),sc=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}),xS=t.Array(sc,{description:"Footnote bodies for `[^id]` markers in this paragraph, placed at the foot of the page. An unreferenced body is not emitted.",minItems:1}),SS=t.Array(sc,{description:"Endnote bodies for `[^id]` markers in this paragraph, collected at the end of the document. An unreferenced body is not emitted.",minItems:1}),wS=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"}),Ra=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Frame anchor type"}),LS=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Frame horizontal alignment"}),vS=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Frame vertical alignment"}),PS=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(Ra),align:t.Optional(LS),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(Ra),align:t.Optional(vS),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:wS},{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}),$S=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Paragraph text alignment"}),lc=t.Object({text:t.String({description:"Text content (required)"}),font:t.Optional(t.Partial(rn)),themeStyle:t.Optional(t.String()),language:t.Optional(Gl),noProof:t.Optional(Vl),noProofWords:t.Optional(Yo),boldColor:t.Optional(H),spacing:t.Optional($t),alignment:t.Optional($S),indent:t.Optional(Yl),tabStops:t.Optional(Hx),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(PS),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(xS),endnotes:t.Optional(SS)},{description:"Paragraph component props (font nested for theme consistency; no flat font properties)",additionalProperties:!1}),cc=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}),dc=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}),IS=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})])),pc=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),uc=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical cell alignment"}),mc=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({...Xl.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})]),NS=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})]),fc=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(H),backgroundColor:t.Optional(Kl),horizontalAlignment:t.Optional(pc),verticalAlignment:t.Optional(uc),font:t.Optional(mc),borderColor:t.Optional(Qr),borderSize:t.Optional(eo),padding:t.Optional(fc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"}))},{additionalProperties:!1});function gc(e){const n=t.Union([t.String(),e]),i={color:t.Optional(H),backgroundColor:t.Optional(Kl),horizontalAlignment:t.Optional(pc),verticalAlignment:t.Optional(uc),font:t.Optional(mc),borderColor:t.Optional(Qr),borderSize:t.Optional(eo),padding:t.Optional(fc),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(NS),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(OS),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 hc=gc(IS),bc=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}),Oc=bc(),AS=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}),yc=t.Object({columns:t.Union([t.Number({minimum:1,description:"Number of equal-width columns (converter will normalize to array)"}),t.Array(AS,{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}),xc=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"}),kS=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(H),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}),TS=t.Object({level:t.Number({minimum:0,maximum:8,description:"Nesting level (0 = root, 1 = first sublevel, etc.)"}),format:t.Optional(xc),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(kS)},{description:"Configuration for a single list level",additionalProperties:!1}),Sc=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(TS,{description:"Configuration for each nesting level",minItems:1,maxItems:9})),format:t.Optional(t.Union([xc,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."})),spacing:t.Optional(Dx),alignment:t.Optional(Jl),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"],FS=t.Partial(t.Omit(ac,ea)),jS=t.Partial(t.Omit(lc,ea)),RS=t.Partial(cc),US=t.Partial(dc),MS=t.Partial(t.Omit(hc,["rows"])),BS=t.Partial(Oc),ES=t.Partial(yc),CS=t.Partial(t.Omit(Sc,ea)),wc=t.Object({heading:t.Optional(FS),paragraph:t.Optional(jS),image:t.Optional(RS),statistic:t.Optional(US),table:t.Optional(MS),section:t.Optional(BS),columns:t.Optional(ES),list:t.Optional(CS)},{additionalProperties:!0}),DS=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 zS=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:DS},{description:"Page configuration including dimensions and margins",additionalProperties:!1}),Lc=t.Object({heading:rn,body:rn,mono:rn,light:rn},{additionalProperties:!1,description:"Font definitions for different text types"}),_S=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"}),vc={style:_S,size:t.Number({minimum:0,description:"Width in eighths of a point (docx sz)"}),color:H,space:t.Optional(t.Number({minimum:0,description:"Space between text and border in points"}))},pi=t.Object(vc,{additionalProperties:!1,description:"Paragraph border side definition"}),WS=t.Object(vc,{additionalProperties:!1,description:"Rule drawn between consecutive paragraphs sharing this border set (w:between), in place of their adjoining bottom and top edges"}),Pc=t.Object({top:t.Optional(pi),bottom:t.Optional(pi),left:t.Optional(pi),right:t.Optional(pi),between:t.Optional(WS)},{additionalProperties:!1,description:"Paragraph borders (per side, plus the between-paragraph rule)"}),$c=t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")])),qe=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Zo.properties,alignment:$c,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(Pc),indent:t.Optional(lr)},{additionalProperties:!1}),HS=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"}),qS=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"}),KS=t.Object({type:qS,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(HS)},{description:"Tab stop configuration with position, alignment, and optional leader",additionalProperties:!1}),Qt=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...Zo.properties,alignment:$c,tabStops:t.Optional(t.Array(KS,{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(Pc),indent:t.Optional(lr)},{additionalProperties:!1}),Ic=t.Object({normal:t.Optional(qe),heading1:t.Optional(qe),heading2:t.Optional(qe),heading3:t.Optional(qe),heading4:t.Optional(qe),heading5:t.Optional(qe),heading6:t.Optional(qe),title:t.Optional(qe),subtitle:t.Optional(qe),TOC1:t.Optional(Qt),TOC2:t.Optional(Qt),TOC3:t.Optional(Qt),TOC4:t.Optional(Qt),TOC5:t.Optional(Qt),TOC6:t.Optional(Qt)},{additionalProperties:qe,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)]),...qe.properties},{additionalProperties:!1});var Nc=t.Object({primary:H,secondary:H,accent:H,text:H,background:H,border:H,textPrimary:H,textSecondary:H,textMuted:H,borderPrimary:H,borderSecondary:H,backgroundPrimary:H,backgroundSecondary:H,accent4:t.Optional(H),accent5:t.Optional(H),accent6:t.Optional(H)},{additionalProperties:!1}),GS=t.Object({...nr,colors:t.Optional(t.Partial(Nc)),fonts:t.Optional(t.Partial(Lc)),styles:t.Optional(Ic)},{additionalProperties:!1,description:"Partial theme deep-merged over the resolved named theme: define or override palette tokens, font roles, and named styles in-document."}),VS=t.Object({...nr,$schema:t.Optional(t.String()),name:t.String(),displayName:t.String(),description:t.String(),version:t.String(),colors:Nc,fonts:Lc,fontRegistry:t.Optional(tr),page:zS,styles:t.Optional(Ic),componentDefaults:t.Optional(wc),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 C0(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 JS=t.Object({},{additionalProperties:!1}),XS=e=>t.Object({blocks:t.Optional(Ml),theme:t.Optional(t.String({description:'Theme name to apply (default: "minimal"). Built-ins: consulting (the house style), minimal, devportal, vermilion.',examples:["consulting","minimal","devportal","vermilion"],default:"minimal"})),themeOverrides:t.Optional(GS),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, executive-report, technical-report, legal-appendix; an unknown name falls back to the format default.",examples:["client-report","executive-report","technical-report","legal-appendix"]})),fontRegistry:t.Optional(tr),componentDefaults:t.Optional(wc),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}),YS=XS(),ZS=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(H)},{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(H)},{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(H)},{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(H)},{additionalProperties:!1}))},{additionalProperties:!1})),shading:t.Optional(t.Object({fill:t.Optional(H)},{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"]}}}]))}}}}}}]}),QS=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"}),ew=t.Union([t.Literal("document"),t.Literal("section")],{description:"TOC scope: document-wide or section-only"}),tw=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 nw=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(QS),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([ew,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(tw,{description:"Custom style mappings for TOC entries. Maps custom theme styles to TOC levels."}))},{description:"Table of Contents component props",additionalProperties:!1}),iw=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(H),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}),rw=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%")'}))}),ow=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"}),aw=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}),sw=t.Object({type:ow,data:t.Array(aw,{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:YS,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:Oc,createPropsSchema:bc,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:yc,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:ZS,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:ac,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:lc,hasChildren:!1,category:"content",description:"Paragraph text - supports formatting like bold, italic, and color. Main content element."},{name:"image",propsSchema:cc,hasChildren:!1,category:"content",description:"Image element - displays images with optional caption. Supports various formats."},{name:"statistic",propsSchema:dc,hasChildren:!1,category:"content",description:"Statistic display - shows a number with description. Perfect for KPIs and metrics."},{name:"block",propsSchema:Bl,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:JS,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:hc,createPropsSchema:gc,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:Sc,hasChildren:!1,category:"content",description:"List element - bulleted or numbered list items. Supports nested lists."},{name:"toc",propsSchema:nw,hasChildren:!1,category:"content",description:"Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles."},{name:"divider",propsSchema:iw,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:rw,hasChildren:!1,category:"content",description:"Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options."},{name:"chart",propsSchema:sw,hasChildren:!1,renderers:["office-open"],category:"content",description:'Native Word chart - editable, scalable, no export server needed. Requires renderer "office-open".'},{name:"visual",propsSchema:uS,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 Ua(e){return ht.find(n=>n.name===e)}function lw(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?rc(e.name,a,r.renderer):a;return o.props=lw(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 cw(e){return ht.map(n=>In(n,e))}function Ac(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 g=c.length-1;g>=0;g--){const p=c[g];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(g,1);continue}if(!p.allowedChildren){s.set(p.name,In(p,e,e,i)),c.splice(g,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(g,1)}if(c.length===d)throw new Error(`Circular allowedChildren among: ${c.map(g=>g.name).join(", ")}`)}const l=new Map([...s,...o]);return{schemas:[...l.values()],byName:l}}function dw(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 g=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)&&g!==`definitions.${d}.$id`){delete s[l];continue}a(d,g)}}}a(e)}function pw(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[m,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[m]={$ref:`#/definitions/${L}`},d(I,`definitions.${L}`);continue}}d(h,O?`${O}.${m}`:m)}}}d(c);const g={$schema:i};return r&&(g.$id=r),Object.assign(g,c),o!==void 0&&(g.title=o),a!==void 0&&(g.description=a),Object.keys(l).length>0&&(g.definitions=l),dw(g),gS(g),jl(g),g}function uw(e={}){return t.Union(pr.map(n=>mw(e,n,n!==mS)),{description:"Document definition, discriminated by the optional renderer field. Omitted renderer means docxjs."})}function mw(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),g=t.Recursive(O=>{const m=[];for(const I of o)if(I.versionedProps&&I.versionedProps.length>0){const w=I.versionedProps,D=Tl(w.map(W=>W.version));for(const W of w){const A=W.description||I.description,R={name:t.Literal(I.name),id:t.Optional(t.String()),version:A?t.Literal(W.version,{description:A}):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}`;m.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 k=_.description?`${I.name} (latest: v${D}) — ${_.description}`:I.description?`${I.name} (latest: v${D}) — ${I.description}`:`${I.name} (latest: v${D})`;m.push(t.Object(T,{additionalProperties:!1,description:k}))}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))),m.push(t.Object(D,{additionalProperties:!1,...I.description?{description:I.description}:{}}))}const{schemas:h,byName:b}=r?Ac(O,m,{renderer:n,requireDiscriminator:i}):{schemas:[],byName:new Map},L=Ua("section");c=["section",...(L==null?void 0:L.allowedChildren)??[]].map(I=>b.get(I)).filter(I=>I!==void 0),l=m;const N=[...h,...m];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=Ua("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(rc(p.name,p.propsSchema,n)),children:t.Array(t.Union([...c,...l],{discriminator:{propertyName:"name"}}))},{additionalProperties:!1,title:a,description:s,definitions:{[d]:g}})}t.Union([...cw(t.Any())],{discriminator:{propertyName:"name"},description:"Standard component definition with discriminated union"});var fw=t.Recursive(e=>t.Union([...Ac(e).schemas],{discriminator:{propertyName:"name"},description:"Component definition with discriminated union"})),gw=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")]))}),hw=t.Object({name:t.Literal("text-space-after"),id:t.Optional(t.String()),props:gw}),bw=hw;Object.fromEntries([...ht.map(e=>[e.name,e.propsSchema]),["custom",bw]]);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 Ow(){return{includeEmojis:!kc(),verbosity:"normal",includeSuggestions:!0,includePath:!0,maxMessageLength:0,includeDocLinks:!1,colorSupport:yw()}}Ow();function kc(){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 yw(){var e;return typeof process>"u"||ve!=null&&ve.NO_COLOR?!1:ve!=null&&ve.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!kc()}t.Object({definition:fw,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"});As("uri",e=>{try{return new URL(e),!0}catch{return e.includes(".json")||e.includes("/")||e.includes("\\")?!0:/^https?:\/\/.+/.test(e)}});As("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 xw=["chart","columns","divider","heading","highcharts","image","list","paragraph","docx","section","statistic","table","text-box","toc","visual","block","group"];new Set(xw);const Ir=t.Object({basePath:t.String({default:""})});function Sw(e){const n=Wy(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=[...$y(Ir,n)];throw new Error(`Environment validation failed: ${i.map(r=>r.message).join(", ")}`)}return n}Sw({basePath:""});const ww=["docx","pptx"];function Lw(){if(typeof window>"u")return"docx";const e=window.__JTO_FORMAT__;return ww.includes(e)?e:"docx"}const Ce=Lw(),D0=Ce==="docx"?"Document":"Presentation",z0=Ce==="docx"?".docx":".pptx";function vw(){var r;const e=uw({customComponents:[]}),n=pw(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 Pw(){var r;const e=Fx({customComponents:[]}),n=Bx(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 $w(){return Ce==="docx"?vw():Pw()}function Iw(){const n=JSON.parse(JSON.stringify(Ce==="docx"?VS:_l));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 Nw(e=Ce==="docx"?["*.docx.json"]:["*.pptx.json"]){return{uri:"https://json-to-office.dev/schema/report/v1.0.0",fileMatch:e,schema:$w()}}function Aw(e=[`*.${Ce}.theme.json`]){return{uri:"https://json-to-office.dev/schemas/theme/v1.0.0",fileMatch:e,schema:Iw()}}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=kw(o)),(r=e.properties)!=null&&r.props&&Tw(o,e.properties.props)}Object.values(e).forEach(o=>{typeof o=="object"&&o!==null&&ta(o)})}}function kw(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 Tw(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 Ae="/api",Tt=`${Ae}/${Ce}`,_0={discovery:{all:`${Ae}/discovery/all`,plugins:`${Ae}/discovery/plugins`,documents:`${Ae}/discovery/documents`,themes:`${Ae}/discovery/themes`,schemas:{document:`${Ae}/discovery/schemas/document`,theme:`${Ae}/discovery/schemas/theme`}},generate:`${Tt}/generate`,validate:`${Tt}/validate`,diff:`${Tt}/diff`,fonts:{catalog:`${Ae}/fonts/catalog`,materialize:`${Ae}/fonts/materialize`},preview:{libreoffice:`${Tt}/preview/libreoffice`,libreofficeFromJson:`${Tt}/preview/libreoffice-from-json`},renderers:`${Tt}/renderers`,cacheStats:`${Tt}/cache-stats`};class Fw{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(`${Ae}/discovery/schemas/document`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i?{plugins:i}:{},customComponents:r})});else{let l=`${Ae}/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(`${Ae}/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 jw=new Fw,Rw=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),Uw=new Set(["heading","body"]);function Mw(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()},g=()=>{const h=i[i.length-1];if(!h||h.kind!=="object")return!1;const b=h.key;return!b||o.includes("fontRegistry")?!1:Rw.has(b)?!0:Uw.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();g()&&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}),m(),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}},m=()=>{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 Bw=Ga(e=>({open:!1,contextual:void 0,openFor:n=>e({open:!0,contextual:n}),close:()=>e({open:!1,contextual:void 0})})),Ma="jto.pickFont";let Nr=null,Ar=null;function Ew(e){Nr&&Nr.dispose(),Ar&&Ar.dispose(),Ar=e.editor.registerCommand(Ma,(n,i,r)=>{Bw.getState().openFor({jsonPath:i,currentValue:r})}),Nr=e.languages.registerCodeLensProvider("json",{provideCodeLenses(n){const i=n.getValue();return{lenses:Mw(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:Ma,title:o.value?`Pick font… (current: ${o.value})`:"Pick font…",arguments:[o.path,o.value]}}}),dispose:()=>{}}},resolveCodeLens(n,i){return i}})}const Tc="jto-light",Fc="jto-dark",Cw={surface:"#ffffff",popover:"#ffffff",foreground:"#1a1f2e",muted:"#546f9c",border:"#e2e6ed",fill:"#f8f9fc",lineHighlight:"#edeff3",selection:"#4f7ef833",inserted:"#16a34a26",removed:"#ef444426"},Dw={surface:"#282c3e",popover:"#32374e",foreground:"#fafafa",muted:"#a4b2cc",border:"#494e65",fill:"#3b4054",lineHighlight:"#3b405499",selection:"#85a6fa33",inserted:"#34d39926",removed:"#fca5a526"};function Ba(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 Ea=!1;function zw(e){Ea||(e.editor.defineTheme(Tc,{base:"vs",inherit:!0,rules:[],colors:Ba(Cw)}),e.editor.defineTheme(Fc,{base:"vs-dark",inherit:!0,rules:[],colors:Ba(Dw)}),Ea=!0)}function W0(e){return e==="dark"?Fc:Tc}const _w={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 the profile requires — a takeaway, a source — left empty. Off unless a profile 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 the profile expects. Off unless a profile 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."}]}],pptx:[{id:"pptx/canvas",label:"Canvas",category:"composition",defaultSeverity:"info",description:"Slide dimensions: legacy 4:3, or a partially declared size.",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 the profile requires — a takeaway, a source — left empty. Off unless a profile 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 the profile 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 Ww(){return _w[Ce]}const Hw="inmemory://jto/quality-policy.json",qw="https://json-to-office.dev/schema/quality-policy/v1",Kw={enum:["error","warning","info"],description:"Overrides the severity this rule reports at."};function Gw(){const e=Ww(),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",...Kw},...i.parameters.length>0&&{parameters:{type:"object",description:"Tuning for this rule.",properties:r,additionalProperties:!1}}},additionalProperties:!1}}return{uri:qw,fileMatch:[Hw,"*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 Vw=Ga((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??(g=>g),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}})),Jw=3e4;let kr=null;function jc(){return kr??(kr=fetch(`${Ae}/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(()=>{kr=null},Jw),[]))),kr}function Xw(e,n=!1){const i=e.length;let r=0,o="",a=0,s=16,c=0,l=0,d=0,g=0,p=0;function O(w,D){let _=0,T=0;for(;_<w;){let k=e.charCodeAt(r);if(k>=48&&k<=57)T=T*16+k-48;else if(k>=65&&k<=70)T=T*16+k-65+10;else if(k>=97&&k<=102)T=T*16+k-97+10;else break;r++,_++}return _<w&&(T=-1),T}function m(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&&en(e.charCodeAt(r));)r++;if(r<e.length&&e.charCodeAt(r)===46)if(r++,r<e.length&&en(e.charCodeAt(r)))for(r++;r<e.length&&en(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&&en(e.charCodeAt(r))){for(r++;r<e.length&&en(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 k=O(4);k>=0?w+=String.fromCharCode(k):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,g=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 k=e.charCodeAt(r);if(k===42&&e.charCodeAt(r+1)===47){r+=2,T=!0;break}r++,Pn(k)&&(k===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||!en(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:m,getPosition:()=>r,scan:n?I:L,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-g,getTokenError:()=>p}}function Tr(e){return e===32||e===9}function Pn(e){return e===10||e===13}function en(e){return e>=48&&e<=57}var Ca;(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"})(Ca||(Ca={}));new Array(20).fill(0).map((e,n)=>" ".repeat(n));const tn=200;new Array(tn).fill(0).map((e,n)=>`
|
|
9
|
+
`+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>`\r
|
|
10
|
+
`+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>`
|
|
11
|
+
`+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>"\r"+" ".repeat(n)),new Array(tn).fill(0).map((e,n)=>`\r
|
|
12
|
+
`+" ".repeat(n));var En;(function(e){e.DEFAULT={allowTrailingComma:!1}})(En||(En={}));function Yw(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,g,p){a.value=l,a.offset=d,a.length=g,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,g)=>{if(n<d||(c(l,d,g,"property"),i[i.length-1]=l,n<=d+g))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,g)=>{if(n<d||(c(l,d,g,Uc(l)),n<=d+g))throw r},onSeparator:(l,d,g)=>{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 g=0;d<l.length&&g<i.length;g++)if(l[d]===i[g]||l[d]==="*")d++;else if(l[d]!=="**")return!1;return d===l.length}}}function Zw(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,g)=>{n.push({error:l,offset:d,length:g})}},i),o[0]}function Qw(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,g)=>{r=a({type:"property",offset:d,length:-1,parent:r,children:[]}),r.children.push({type:"string",value:l,offset:d,length:g,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,g)=>{a({type:Uc(l),offset:d,length:g,parent:r,value:l}),o(d+g)},onSeparator:(l,d,g)=>{r.type==="property"&&(l===":"?r.colonOffset=d:l===","&&o(d))},onError:(l,d,g)=>{n.push({error:l,offset:d,length:g})}},i);const c=r.children[0];return c&&delete c.parent,c}function e0(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 t0(e,n,i=!1){return n>=e.offset&&n<e.offset+e.length||i&&n===e.offset+e.length}function Rc(e,n,i=!1){if(t0(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=Rc(r[o],n,i);if(a)return a}return e}}function na(e,n,i=En.DEFAULT){const r=Xw(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 g(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),m=g(n.onObjectEnd),h=d(n.onArrayBegin),b=g(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:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:D||k(11);break;case 2:k(12);break;case 6:k(16);break}switch(y){case 12:case 13:D?k(10):I();break;case 16:k(1);break;case 15:case 14:break;default:return y}}}function k(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 A(){switch(r.getToken()){case 11:const y=r.getTokenValue();let F=Number(y);isNaN(F)&&(k(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?(k(3,[],[2,5]),!1):(W(!1),r.getToken()===6?(N(":"),T(),X()||k(4,[],[2,5])):k(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||k(4,[],[]),N(","),T(),r.getToken()===2&&_)break}else y&&k(6,[],[]);R()||k(4,[],[2,5]),y=!0}return m(),r.getToken()!==2?k(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||k(4,[],[]),N(","),T(),r.getToken()===4&&_)break}else F&&k(6,[],[]);y?(o.push(0),y=!1):o[o.length-1]++,X()||k(4,[],[4,5]),F=!0}return b(),y||o.pop(),r.getToken()!==4?k(8,[4],[]):T(),!0}function X(){switch(r.getToken()){case 3:return Q();case 1:return J();case 10:return W(!0);default:return A()}}return T(),r.getToken()===17?i.allowEmptyContent?!0:(k(4,[],[]),!1):X()?(r.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}function Uc(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 Da;(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"})(Da||(Da={}));var za;(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"})(za||(za={}));const n0=Yw,i0=Zw,Mc=Qw,dn=e0,r0=Rc,o0=no;var _a;(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"})(_a||(_a={}));const a0={pptx:["slide","group"],docx:["docx","section","group"]};function Wa(e,n){const i=dn(e,[...n,"name"]);return(i==null?void 0:i.type)==="string"?i.value:void 0}function s0(e,n){return!e.slice(n.offset,n.offset+n.length).includes(`
|
|
13
|
+
`)}function ia(e){try{return Mc(e,[],{allowTrailingComma:!0})}catch{return}}function l0(e,n,i,r=ia(e)){var O,m,h;if(!r)return null;const o=n0(e,n),a=o.path,s=r0(r,n,!0);if(!o.isAtPropertyKey&&a.length>=2&&a[a.length-1]==="ref"&&a[a.length-2]==="props"&&Wa(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=Wa(r,a.slice(0,c-1));if(!l||!a0[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"||!s0(e,d))return null;const g=d.children??[];return!(g.length===0||g.length===1&&["","name"].includes(String(((h=(m=g[0].children)==null?void 0:m[0])==null?void 0:h.value)??"")))||a.length>c+2?null:{kind:"component",replace:{offset:d.offset,length:d.length}}}function c0(e){return e.replace(/[\\$}]/g,n=>`\\${n}`)}function Ha(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}:${c0(l)}}"`})}function Bc(e){var n;return((n=/\n([ \t]+)\S/.exec(e))==null?void 0:n[1])??" "}function d0(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 p0(e,n){return e.split(`
|
|
15
|
+
`).map((i,r)=>r===0?i:n+i).join(`
|
|
16
|
+
`)}function u0(e,n,i=ia(e)){var L;if(!i||i.type!=="object")return[];const r=Bc(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,g=d0(e,l.offset),p=N=>g+r.repeat(N),O=c.map(([N,I])=>`${p(d)}${JSON.stringify(N)}: ${p0(JSON.stringify(I,null,r),p(d))}`).join(`,
|
|
17
|
+
`),m=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
|
+
${m},`:`
|
|
25
|
+
${m}
|
|
26
|
+
${g}`;return[{offset:l.offset+1,length:0,content:b}]}function m0(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 f0(e,n,i){const r=ia(e),o=l0(e,n,i.format,r);if(!o)return[];const a=e.slice(o.replace.offset,n).replace(/[\w-]*$/,""),s=(m,h,b,L,N,I)=>({kind:m,label:h,detail:b,documentation:L,insertText:N,filterText:a+h,replace:o.replace,additionalEdits:I}),c=i.references.filter(m=>m.format===i.format&&!(m.name in i.definitions)),l=m=>u0(e,m0(m,i.references,i.definitions),r);if(o.kind==="ref")return c.map(m=>s("ref",m.name,`block from ${m.template}`,m.description,JSON.stringify(m.name),l(m)));const d=Bc(e);let g=i.document;if(g===void 0)try{g=i0(e,[],{allowTrailingComma:!0})}catch{g=void 0}const p=Object.entries(i.definitions).map(([m,h])=>s("component",m,"block defined in this document",h.description??"",Ha(hx(m,h,{document:g,format:i.format}),d),[])),O=c.map(m=>s("component",m.name,`block from ${m.template}`,m.description,Ha(m.example,d),l(m)));return[...p,...O]}function g0(e){if(!e.trim())return{};let n;try{n=Mc(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=o0(s)}catch{continue}or(Ul,l)&&(r[c]=l)}return r}function Ec(e){return JSON.stringify(e)}let io=!1,ui=null,ro=[],Fr=[],jr=0,Pi=null,ra={},qa=Ec({});const $i="https://json-to-office.dev/schema/report/v1.0.0";async function oa(){if(!io)try{const e=await ed.init();aa(e),io=!0,console.log("Monaco configured globally with JSON schemas")}catch(e){console.error("Failed to configure Monaco globally:",e)}}function Cc(e){return e.replace(/,(\s*[}\]])/g,"$1")}function aa(e){zw(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=Cc(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}]}}}),S0(e),jc(),Ew(e);const n=Nw();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 h0(e){return Ce==="pptx"?Mx(e):hS(e)}function sa(e){if(!Pi)return;const n=JSON.parse(JSON.stringify(Pi));ro.length&&y0(n,ro),gx(n,ra,h0(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,Aw(),Gw()],schemaRequest:"ignore"})}function b0(e,n){const i=Ec(n);return i===qa?!1:(ra=n,qa=i,sa(e),!0)}async function O0(){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 y0(e,n){var o,a,s,c,l,d,g,p,O;function i(m){if(!m||m.type!=="string")return;const h=Array.isArray(m.examples)?m.examples:[];m.examples=[...new Set([...h,...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=m=>{var h;return typeof(m==null?void 0:m.$ref)=="string"?(h=e==null?void 0:e.definitions)==null?void 0:h[m.$ref.replace("#/definitions/","")]:m};for(const m of Hr(e)){const h=r(m);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 Hr(h))i((O=(p=(g=b==null?void 0:b.properties)==null?void 0:g.props)==null?void 0:p.properties)==null?void 0:O.theme)}}function x0(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 S0(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(m=>{var w,D,_;let h="";m.documentation&&(typeof m.documentation=="string"?h=m.documentation:m.documentation.value&&(h=m.documentation.value)),!h&&m.detail&&(h=m.detail);let b;if(m.textEdit){const T=m.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=m.textEdit)==null?void 0:w.newText)??m.insertText??(typeof m.label=="string"?m.label:((D=m.label)==null?void 0:D.label)??"");let N;m.documentation&&(typeof m.documentation=="string"?N=m.documentation:m.documentation.kind==="markdown"?N={value:m.documentation.value}:N=m.documentation.value);const I={label:typeof m.label=="string"?m.label:((_=m.label)==null?void 0:_.label)??"",kind:x0(m.kind,e),detail:h,documentation:N,insertText:L,range:b,sortText:m.sortText,filterText:m.filterText,preselect:m.preselect};return m.insertTextFormat===2&&(I.insertTextRules=e.languages.CompletionItemInsertTextRule.InsertAsSnippet),I}),l=n.getValue(),d=((O=Vw.getState().getEditorForModel(n))==null?void 0:O.toStorageValue(l))??l;let g;try{g=JSON.parse(d)}catch{g=void 0}const p=m=>{const h=n.getPositionAt(m.offset),b=n.getPositionAt(m.offset+m.length);return{startLineNumber:h.lineNumber,startColumn:h.column,endLineNumber:b.lineNumber,endColumn:b.column}};for(const m of f0(l,n.getOffsetAt(i),{references:await jc(),definitions:g0(d),format:Ce,document:g}))c.push({label:m.label,kind:m.kind==="ref"?e.languages.CompletionItemKind.Value:e.languages.CompletionItemKind.Snippet,detail:m.detail,documentation:m.documentation?{value:m.documentation}:void 0,insertText:m.insertText,filterText:m.filterText,insertTextRules:m.kind==="component"?e.languages.CompletionItemInsertTextRule.InsertAsSnippet:void 0,range:p(m.replace),additionalTextEdits:m.additionalEdits.map(h=>({range:p(h),text:h.content})),sortText:`0 ${m.label}`});return{suggestions:c}}})}async function w0(e,n,i,r){var a;const o=++jr;try{r&&(Fr=r);const s=await jw.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 m=O.getValue(),h=Cc(m);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(m){console.error("Failed to revalidate model:",O.uri.toString(),m),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 H0=Object.freeze(Object.defineProperty({__proto__:null,configureMonaco:oa,configureMonacoInstance:aa,resetMonacoConfig:O0,updateMonacoDocumentBlocks:b0,updateMonacoWithPlugins:w0},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 L0=document.getElementById("root"),v0=qc.createRoot(L0);v0.render(j.jsx(cp,{}));export{Ae as A,b0 as B,or as C,g0 as D,$y as E,Ce as F,H0 as G,Mn as P,Hw as Q,np as S,t as T,E0 as W,oo as _,_0 as a,C0 as b,bt as c,Kd as d,j0 as e,R0 as f,Gd as g,Vw as h,F0 as i,D0 as j,B0 as k,M0 as l,U0 as m,z0 as n,Bw as o,Mc as p,ht as q,w0 as r,jw as s,zw as t,Qd as u,W0 as v,Ww as w,dn as x,VS as y,_l as z};
|
|
27
|
+
//# sourceMappingURL=index-cFu0HL2j.js.map
|