@json-to-office/jto 1.0.0 → 1.2.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 -4
- package/dist/cli.js.map +1 -1
- package/dist/client/assets/{HomePage-D3vuZyJI.js → HomePage-jkIz_s7u.js} +4 -4
- package/dist/client/assets/{HomePage-D3vuZyJI.js.map → HomePage-jkIz_s7u.js.map} +1 -1
- package/dist/client/assets/{JsonEditorPage-Cqy_bBQ5.js → JsonEditorPage-DR8UoROz.js} +3 -3
- package/dist/client/assets/{JsonEditorPage-Cqy_bBQ5.js.map → JsonEditorPage-DR8UoROz.js.map} +1 -1
- package/dist/client/assets/{MonacoPluginProvider-BNFHf2Mg.js → MonacoPluginProvider-CE5NPGwN.js} +3 -3
- package/dist/client/assets/{MonacoPluginProvider-BNFHf2Mg.js.map → MonacoPluginProvider-CE5NPGwN.js.map} +1 -1
- package/dist/client/assets/{editor-CN0fauKm.js → editor-edmvhW9F.js} +2 -2
- package/dist/client/assets/{editor-CN0fauKm.js.map → editor-edmvhW9F.js.map} +1 -1
- package/dist/client/assets/{editor-monaco-json-HXjjUFz_.js → editor-monaco-json-CAlvfPc7.js} +2 -2
- package/dist/client/assets/{editor-monaco-json-HXjjUFz_.js.map → editor-monaco-json-CAlvfPc7.js.map} +1 -1
- package/dist/client/assets/{editor-refs-store-C7y0QHBG.js → editor-refs-store-DKOJcTAk.js} +2 -2
- package/dist/client/assets/{editor-refs-store-C7y0QHBG.js.map → editor-refs-store-DKOJcTAk.js.map} +1 -1
- package/dist/client/assets/index-DLlW4q4v.js +5 -0
- package/dist/client/assets/index-DLlW4q4v.js.map +1 -0
- package/dist/client/assets/{preview-BoIgsKxW.js → preview-zo-CHAU0.js} +2 -2
- package/dist/client/assets/{preview-BoIgsKxW.js.map → preview-zo-CHAU0.js.map} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/templates/media/tech-report/fonts/OFL.txt +93 -0
- package/package.json +7 -7
- package/dist/client/assets/index-ClBlf8v3.js +0 -5
- package/dist/client/assets/index-ClBlf8v3.js.map +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-jkIz_s7u.js","assets/react-vendor-BmQ2Ko_D.js","assets/radix-ui-DFNP5I4e.js","assets/ui-vendor-DpjQWJgX.js","assets/editor-refs-store-DKOJcTAk.js","assets/state-vendor-Cq67_JbF.js","assets/MonacoPluginProvider-CE5NPGwN.js","assets/monaco-editor-DJsdM0WK.js","assets/query-vendor--rhYD8mC.js","assets/JsonEditorPage-DR8UoROz.js","assets/NotFoundPage-rSUaByPC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var jc=Object.defineProperty;var vc=(e,n,i)=>n in e?jc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i;var ht=(e,n,i)=>vc(e,typeof n!="symbol"?n+"":n,i);import{r as ee,j as I,O as Rc,u as Uc,B as kc,d as Mc}from"./react-vendor-BmQ2Ko_D.js";import{Q as Dc,a as Bc}from"./query-vendor--rhYD8mC.js";import{P as Ec,C as ta,A as zc,a as Kc,R as _c,T as Hc}from"./radix-ui-DFNP5I4e.js";import{c as Wc}from"./ui-vendor-DpjQWJgX.js";import{loader as Gc}from"./monaco-editor-DJsdM0WK.js";import{c as qc}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 Vc="modulepreload",Xc=function(e){return"/"+e},Fo={},Ir=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=Xc(l),l in Fo)return;Fo[l]=!0;const u=l.endsWith(".css"),x=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${x}`))return;const S=document.createElement("link");if(S.rel=u?"stylesheet":Vc,u||(S.as="script"),S.crossOrigin="",S.href=l,c&&S.setAttribute("nonce",c),document.head.appendChild(S),u)return new Promise((w,N)=>{S.addEventListener("load",w),S.addEventListener("error",()=>N(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)})},Jc={theme:"system",setTheme:()=>null,resolvedTheme:"light"},na=ee.createContext(Jc);function Yc({children:e,defaultTheme:n="system",storageKey:i="vite-ui-theme",...r}){const[o,a]=ee.useState(()=>localStorage.getItem(i)||n),s=o==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o;ee.useEffect(()=>{const l=window.document.documentElement;if(l.classList.remove("light","dark"),o==="system"){const u=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";l.classList.add(u);return}l.classList.add(o)},[o]);const c={theme:o,resolvedTheme:s,setTheme:l=>{localStorage.setItem(i,l),a(l)}};return I.jsx(na.Provider,{...r,value:c,children:e})}const gS=()=>{const e=ee.useContext(na);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},Fr="-",Zc=e=>{const n=el(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const c=s.split(Fr);return c[0]===""&&c.length!==1&&c.shift(),ia(c,n)||Qc(s)},getConflictingClassGroupIds:(s,c)=>{const l=i[s]||[];return c&&r[s]?[...l,...r[s]]:l}}},ia=(e,n)=>{var s;if(e.length===0)return n.classGroupId;const i=e[0],r=n.nextPart.get(i),o=r?ia(e.slice(1),r):void 0;if(o)return o;if(n.validators.length===0)return;const a=e.join(Fr);return(s=n.validators.find(({validator:c})=>c(a)))==null?void 0:s.classGroupId},No=/^\[(.+)\]$/,Qc=e=>{if(No.test(e)){const n=No.exec(e)[1],i=n==null?void 0:n.substring(0,n.indexOf(":"));if(i)return"arbitrary.."+i}},el=e=>{const{theme:n,classGroups:i}=e,r={nextPart:new Map,validators:[]};for(const o in i)or(i[o],r,o,n);return r},or=(e,n,i,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?n:$o(n,o);a.classGroupId=i;return}if(typeof o=="function"){if(tl(o)){or(o(r),n,i,r);return}n.validators.push({validator:o,classGroupId:i});return}Object.entries(o).forEach(([a,s])=>{or(s,$o(n,a),i,r)})})},$o=(e,n)=>{let i=e;return n.split(Fr).forEach(r=>{i.nextPart.has(r)||i.nextPart.set(r,{nextPart:new Map,validators:[]}),i=i.nextPart.get(r)}),i},tl=e=>e.isThemeGetter,nl=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)}}},ar="!",sr=":",il=sr.length,rl=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=o=>{const a=[];let s=0,c=0,l=0,u;for(let h=0;h<o.length;h++){let f=o[h];if(s===0&&c===0){if(f===sr){a.push(o.slice(l,h)),l=h+il;continue}if(f==="/"){u=h;continue}}f==="["?s++:f==="]"?s--:f==="("?c++:f===")"&&c--}const x=a.length===0?o:o.substring(l),S=ol(x),w=S!==x,N=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:N}};if(n){const o=n+sr,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},ol=e=>e.endsWith(ar)?e.substring(0,e.length-1):e.startsWith(ar)?e.substring(1):e,al=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}},sl=e=>({cache:nl(e.cacheSize),parseClassName:rl(e),sortModifiers:al(e),...Zc(e)}),cl=/\s+/,ll=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,s=[],c=e.trim().split(cl);let l="";for(let u=c.length-1;u>=0;u-=1){const x=c[u],{isExternal:S,modifiers:w,hasImportantModifier:N,baseClassName:h,maybePostfixModifierPosition:f}=i(x);if(S){l=x+(l.length>0?" "+l:l);continue}let F=!!f,v=r(F?h.substring(0,f):h);if(!v){if(!F){l=x+(l.length>0?" "+l:l);continue}if(v=r(h),!v){l=x+(l.length>0?" "+l:l);continue}F=!1}const P=a(w).join(":"),$e=N?P+ar:P,de=$e+v;if(s.includes(de))continue;s.push(de);const Ce=o(v,F);for(let oe=0;oe<Ce.length;++oe){const Rt=Ce[oe];s.push($e+Rt)}l=x+(l.length>0?" "+l:l)}return l};function dl(){let e=0,n,i,r="";for(;e<arguments.length;)(n=arguments[e++])&&(i=ra(n))&&(r&&(r+=" "),r+=i);return r}const ra=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=ra(e[r]))&&(i&&(i+=" "),i+=n);return i};function pl(e,...n){let i,r,o,a=s;function s(l){const u=n.reduce((x,S)=>S(x),e());return i=sl(u),r=i.cache.get,o=i.cache.set,a=c,c(l)}function c(l){const u=r(l);if(u)return u;const x=ll(l,i);return o(l,x),x}return function(){return a(dl.apply(null,arguments))}}const V=e=>{const n=i=>i[e]||[];return n.isThemeGetter=!0,n},oa=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,aa=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ul=/^\d+\/\d+$/,ml=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fl=/\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$/,gl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hl=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bl=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kt=e=>ul.test(e),A=e=>!!e&&!Number.isNaN(Number(e)),bt=e=>!!e&&Number.isInteger(Number(e)),Co=e=>e.endsWith("%")&&A(e.slice(0,-1)),tt=e=>ml.test(e),Ol=()=>!0,yl=e=>fl.test(e)&&!gl.test(e),Nr=()=>!1,xl=e=>hl.test(e),Sl=e=>bl.test(e),wl=e=>!b(e)&&!O(e),Ll=e=>Xt(e,la,Nr),b=e=>oa.test(e),Ot=e=>Xt(e,da,yl),Vi=e=>Xt(e,Rl,A),Pl=e=>Xt(e,sa,Nr),Il=e=>Xt(e,ca,Sl),Fl=e=>Xt(e,Nr,xl),O=e=>aa.test(e),zn=e=>Jt(e,da),Nl=e=>Jt(e,Ul),$l=e=>Jt(e,sa),Cl=e=>Jt(e,la),Al=e=>Jt(e,ca),Tl=e=>Jt(e,kl,!0),Xt=(e,n,i)=>{const r=oa.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},Jt=(e,n,i=!1)=>{const r=aa.exec(e);return r?r[1]?n(r[1]):i:!1},sa=e=>e==="position",jl=new Set(["image","url"]),ca=e=>jl.has(e),vl=new Set(["length","size","percentage"]),la=e=>vl.has(e),da=e=>e==="length",Rl=e=>e==="number",Ul=e=>e==="family-name",kl=e=>e==="shadow",Ml=()=>{const e=V("color"),n=V("font"),i=V("text"),r=V("font-weight"),o=V("tracking"),a=V("leading"),s=V("breakpoint"),c=V("container"),l=V("spacing"),u=V("radius"),x=V("shadow"),S=V("inset-shadow"),w=V("drop-shadow"),N=V("blur"),h=V("perspective"),f=V("aspect"),F=V("ease"),v=V("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$e=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],de=()=>["auto","hidden","clip","visible","scroll"],Ce=()=>["auto","contain","none"],oe=()=>[kt,"px","full","auto",O,b,l],Rt=()=>[bt,"none","subgrid",O,b],Q=()=>["auto",{span:["full",bt,O,b]},O,b],ft=()=>[bt,"auto",O,b],ln=()=>["auto","min","max","fr",O,b],dn=()=>[O,b,l],Wi=()=>["start","end","center","between","around","evenly","stretch","baseline"],Ut=()=>["start","end","center","stretch"],M=()=>[O,b,l],He=()=>["px",...M()],We=()=>["px","auto",...M()],gt=()=>[kt,"auto","px","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",O,b,l],D=()=>[e,O,b],Gi=()=>[Co,Ot],ce=()=>["","none","full",u,O,b],he=()=>["",A,zn,Ot],Mn=()=>["solid","dashed","dotted","double"],Lo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Po=()=>["","none",N,O,b],Io=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",O,b],Dn=()=>["none",A,O,b],Bn=()=>["none",A,O,b],qi=()=>[A,O,b],En=()=>[kt,"full","px",O,b,l];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tt],breakpoint:[tt],color:[Ol],container:[tt],"drop-shadow":[tt],ease:["in","out","in-out"],font:[wl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tt],shadow:[tt],spacing:[A],text:[tt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kt,b,O,f]}],container:["container"],columns:[{columns:[A,b,O,c]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"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:[...$e(),b,O]}],overflow:[{overflow:de()}],"overflow-x":[{"overflow-x":de()}],"overflow-y":[{"overflow-y":de()}],overscroll:[{overscroll:Ce()}],"overscroll-x":[{"overscroll-x":Ce()}],"overscroll-y":[{"overscroll-y":Ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{start:oe()}],end:[{end:oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[bt,"auto",O,b]}],basis:[{basis:[kt,"full","auto",O,b,c,l]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[A,kt,"auto","initial","none",b]}],grow:[{grow:["",A,O,b]}],shrink:[{shrink:["",A,O,b]}],order:[{order:[bt,"first","last","none",O,b]}],"grid-cols":[{"grid-cols":Rt()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":ft()}],"col-end":[{"col-end":ft()}],"grid-rows":[{"grid-rows":Rt()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":ft()}],"row-end":[{"row-end":ft()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ln()}],"auto-rows":[{"auto-rows":ln()}],gap:[{gap:dn()}],"gap-x":[{"gap-x":dn()}],"gap-y":[{"gap-y":dn()}],"justify-content":[{justify:[...Wi(),"normal"]}],"justify-items":[{"justify-items":[...Ut(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ut()]}],"align-content":[{content:["normal",...Wi()]}],"align-items":[{items:[...Ut(),"baseline"]}],"align-self":[{self:["auto",...Ut(),"baseline"]}],"place-content":[{"place-content":Wi()}],"place-items":[{"place-items":[...Ut(),"baseline"]}],"place-self":[{"place-self":["auto",...Ut()]}],p:[{p:He()}],px:[{px:He()}],py:[{py:He()}],ps:[{ps:He()}],pe:[{pe:He()}],pt:[{pt:He()}],pr:[{pr:He()}],pb:[{pb:He()}],pl:[{pl:He()}],m:[{m:We()}],mx:[{mx:We()}],my:[{my:We()}],ms:[{ms:We()}],me:[{me:We()}],mt:[{mt:We()}],mr:[{mr:We()}],mb:[{mb:We()}],ml:[{ml:We()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:gt()}],w:[{w:[c,"screen",...gt()]}],"min-w":[{"min-w":[c,"screen","none",...gt()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[s]},...gt()]}],h:[{h:["screen",...gt()]}],"min-h":[{"min-h":["screen","none",...gt()]}],"max-h":[{"max-h":["screen",...gt()]}],"font-size":[{text:["base",i,zn,Ot]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O,Vi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Co,b]}],"font-family":[{font:[Nl,b,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,O,b]}],"line-clamp":[{"line-clamp":[A,"none",O,Vi]}],leading:[{leading:[O,b,a,l]}],"list-image":[{"list-image":["none",O,b]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Mn(),"wavy"]}],"text-decoration-thickness":[{decoration:[A,"from-font","auto",O,Ot]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[A,"auto",O,b]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:["px",...M()]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",O,b]}],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",O,b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$e(),$l,Pl]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Cl,Ll]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bt,O,b],radial:["",O,b],conic:[bt,O,b]},Al,Il]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:Gi()}],"gradient-via-pos":[{via:Gi()}],"gradient-to-pos":[{to:Gi()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Mn(),"hidden","none"]}],"divide-style":[{divide:[...Mn(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...Mn(),"none","hidden"]}],"outline-offset":[{"outline-offset":[A,O,b]}],"outline-w":[{outline:["",A,zn,Ot]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",x,Tl,Fl]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",O,b,S]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[A,Ot]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":D()}],opacity:[{opacity:[A,O,b]}],"mix-blend":[{"mix-blend":[...Lo(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Lo()}],filter:[{filter:["","none",O,b]}],blur:[{blur:Po()}],brightness:[{brightness:[A,O,b]}],contrast:[{contrast:[A,O,b]}],"drop-shadow":[{"drop-shadow":["","none",w,O,b]}],grayscale:[{grayscale:["",A,O,b]}],"hue-rotate":[{"hue-rotate":[A,O,b]}],invert:[{invert:["",A,O,b]}],saturate:[{saturate:[A,O,b]}],sepia:[{sepia:["",A,O,b]}],"backdrop-filter":[{"backdrop-filter":["","none",O,b]}],"backdrop-blur":[{"backdrop-blur":Po()}],"backdrop-brightness":[{"backdrop-brightness":[A,O,b]}],"backdrop-contrast":[{"backdrop-contrast":[A,O,b]}],"backdrop-grayscale":[{"backdrop-grayscale":["",A,O,b]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[A,O,b]}],"backdrop-invert":[{"backdrop-invert":["",A,O,b]}],"backdrop-opacity":[{"backdrop-opacity":[A,O,b]}],"backdrop-saturate":[{"backdrop-saturate":[A,O,b]}],"backdrop-sepia":[{"backdrop-sepia":["",A,O,b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",O,b]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[A,"initial",O,b]}],ease:[{ease:["linear","initial",F,O,b]}],delay:[{delay:[A,O,b]}],animate:[{animate:["none",v,O,b]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,O,b]}],"perspective-origin":[{"perspective-origin":Io()}],rotate:[{rotate:Dn()}],"rotate-x":[{"rotate-x":Dn()}],"rotate-y":[{"rotate-y":Dn()}],"rotate-z":[{"rotate-z":Dn()}],scale:[{scale:Bn()}],"scale-x":[{"scale-x":Bn()}],"scale-y":[{"scale-y":Bn()}],"scale-z":[{"scale-z":Bn()}],"scale-3d":["scale-3d"],skew:[{skew:qi()}],"skew-x":[{"skew-x":qi()}],"skew-y":[{"skew-y":qi()}],transform:[{transform:[O,b,"","none","gpu","cpu"]}],"transform-origin":[{origin:Io()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:En()}],"translate-x":[{"translate-x":En()}],"translate-y":[{"translate-y":En()}],"translate-z":[{"translate-z":En()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",O,b]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",O,b]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[A,zn,Ot,Vi]}],stroke:[{stroke:["none",...D()]}],"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","*","**"]}},Dl=pl(Ml);function rt(...e){return Dl(Wc(e))}const Bl=Kc,hS=_c,bS=Hc,El=ee.forwardRef(({className:e,sideOffset:n=4,children:i,...r},o)=>I.jsx(Ec,{children:I.jsxs(ta,{ref:o,"data-slot":"tooltip-content",sideOffset:n,className:rt("bg-primary text-primary-foreground 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,I.jsx(zc,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary"})]})}));El.displayName=ta.displayName;const pa=ee.forwardRef(({className:e,variant:n="default",title:i,description:r,action:o,open:a,onOpenChange:s,...c},l)=>I.jsx("div",{ref:l,className:rt("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}));pa.displayName="Toast";const zl=ee.forwardRef(({className:e,...n},i)=>I.jsx("button",{ref:i,className:rt("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}));zl.displayName="ToastAction";const ua=ee.forwardRef(({className:e,...n},i)=>I.jsx("button",{ref:i,type:"button",className:rt("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:I.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:[I.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}));ua.displayName="ToastClose";const ma=ee.forwardRef(({className:e,...n},i)=>I.jsx("div",{ref:i,className:rt("text-sm font-semibold",e),...n}));ma.displayName="ToastTitle";const fa=ee.forwardRef(({className:e,...n},i)=>I.jsx("div",{ref:i,className:rt("text-sm opacity-90",e),...n}));fa.displayName="ToastDescription";const ga=ee.forwardRef(({className:e,...n},i)=>I.jsx("ol",{ref:i,className:rt("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}));ga.displayName="ToastViewport";const Kl=1,ha=5e3;let Xi=0;function _l(){return Xi=(Xi+1)%Number.MAX_SAFE_INTEGER,Xi.toString()}const Ji=new Map,Ao=e=>{if(Ji.has(e))return;const n=setTimeout(()=>{Ji.delete(e),mn({type:"REMOVE_TOAST",toastId:e})},ha);Ji.set(e,n)},Hl=(e,n)=>{switch(n.type){case"ADD_TOAST":return{...e,toasts:[n.toast,...e.toasts].slice(0,Kl)};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?Ao(i):e.toasts.forEach(r=>{Ao(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)}}},Gn=[];let qn={toasts:[]};function mn(e){qn=Hl(qn,e),Gn.forEach(n=>{n(qn)})}function Wl({...e}){const n=_l(),i=o=>mn({type:"UPDATE_TOAST",toast:{...o,id:n}}),r=()=>mn({type:"DISMISS_TOAST",toastId:n});return mn({type:"ADD_TOAST",toast:{...e,id:n,open:!0,onOpenChange:o=>{o||r()}}}),setTimeout(()=>{r()},ha),{id:n,dismiss:r,update:i}}function Gl(){const[e,n]=ee.useState(qn);return ee.useEffect(()=>(Gn.push(n),()=>{const i=Gn.indexOf(n);i>-1&&Gn.splice(i,1)}),[e]),{...e,toast:Wl,dismiss:i=>mn({type:"DISMISS_TOAST",toastId:i})}}function ql(){const{toasts:e,dismiss:n}=Gl();return I.jsx(ga,{children:e.map(function({id:i,title:r,description:o,action:a,open:s,...c}){return s===!1?null:I.jsxs(pa,{...c,children:[I.jsxs("div",{className:"grid gap-1",children:[r&&I.jsx(ma,{children:r}),o&&I.jsx(fa,{children:o})]}),a,I.jsx(ua,{onClick:l=>{l.preventDefault(),l.stopPropagation(),n(i)}})]},i)})})}function Vl(){return I.jsx(Yc,{defaultTheme:"system",storageKey:"vite-ui-theme",children:I.jsxs(Bl,{delayDuration:300,children:[I.jsx("div",{className:"min-h-screen bg-background font-sans antialiased",children:I.jsx(Rc,{})}),I.jsx(ql,{})]})})}function Xl({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 I.jsx("div",{className:rt("animate-spin rounded-full border-2 border-solid",o[n],a[i],e),style:{borderRightColor:"transparent"},...r})}const Jl=ee.lazy(()=>Ir(()=>import("./HomePage-jkIz_s7u.js").then(e=>e.H),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.HomePage}))),Yl=ee.lazy(()=>Ir(()=>import("./JsonEditorPage-DR8UoROz.js"),__vite__mapDeps([9,1,6,5,7,8,2,3])).then(e=>({default:e.JsonEditorPage}))),Zl=ee.lazy(()=>Ir(()=>import("./NotFoundPage-rSUaByPC.js"),__vite__mapDeps([10,1])).then(e=>({default:e.NotFoundPage}))),Yi=({children:e})=>I.jsx(ee.Suspense,{fallback:I.jsx("div",{className:"flex items-center justify-center h-screen",children:I.jsx(Xl,{className:"w-8 h-8"})}),children:e}),Ql=[{path:"/",element:I.jsx(Vl,{}),children:[{index:!0,element:I.jsx(Yi,{children:I.jsx(Jl,{})})},{path:"json-editor",element:I.jsx(Yi,{children:I.jsx(Yl,{})})}]},{path:"*",element:I.jsx(Yi,{children:I.jsx(Zl,{})})}];function ed(){return Uc(Ql)}const td=new Dc({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function nd(){return I.jsx(Bc,{client:td,children:I.jsx(kc,{children:I.jsx(ed,{})})})}var ba=["pptxgenjs","office-open"],id="pptxgenjs";function rd(e,n,i){const r=cr(n),o=Yn(r);if(i==="pptxgenjs")return e==="slide"&&(o==null||delete o.transition),r;switch(e){case"pptx":o==null||delete o.templates;break;case"slide":o==null||delete o.template;break;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];ad(r);break}return Oa(r),r}function od(e,n){return n!=="office-open"||e!=="chart"}function ad(e){var o,a;const n=(o=Yn(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=Yn(s);c!=null&&c.text&&(delete c.colspan,delete c.rowspan,delete c.margin,Oa(s))}}function Yn(e){if(!(!e||typeof e!="object"))return e.properties}function Oa(e){const n=Yn(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 cr(e){if(Array.isArray(e))return e.map(cr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=cr(e[i]);return n}function sd(e){return H(e)&&!ge(e)&&!Ln(e)&&Symbol.asyncIterator in e}function ge(e){return Array.isArray(e)}function ya(e){return typeof e=="bigint"}function wn(e){return typeof e=="boolean"}function $r(e){return e instanceof globalThis.Date}function cd(e){return typeof e=="function"}function ld(e){return H(e)&&!ge(e)&&!Ln(e)&&Symbol.iterator in e}function dd(e){return e===null}function ze(e){return typeof e=="number"}function H(e){return typeof e=="object"&&e!==null}function xa(e){return e instanceof globalThis.RegExp}function z(e){return typeof e=="string"}function pd(e){return typeof e=="symbol"}function Ln(e){return e instanceof globalThis.Uint8Array}function K(e){return e===void 0}function ud(e){return e.map(n=>Zn(n))}function md(e){return new Date(e.getTime())}function fd(e){return new Uint8Array(e)}function gd(e){return new RegExp(e.source,e.flags)}function hd(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Zn(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Zn(e[i]);return n}function Zn(e){return ge(e)?ud(e):$r(e)?md(e):Ln(e)?fd(e):xa(e)?gd(e):H(e)?hd(e):e}function be(e){return Zn(e)}function Cr(e,n){return be(n===void 0?e:{...n,...e})}function Sa(e){return Ke(e)&&globalThis.Symbol.asyncIterator in e}function wa(e){return Ke(e)&&globalThis.Symbol.iterator in e}function La(e){return e instanceof globalThis.Promise}function Pn(e){return e instanceof Date&&globalThis.Number.isFinite(e.getTime())}function bd(e){return e instanceof globalThis.Map}function Od(e){return e instanceof globalThis.Set}function yd(e){return globalThis.ArrayBuffer.isView(e)}function Ar(e){return e instanceof globalThis.Uint8Array}function xd(e,n){return n in e}function Ke(e){return e!==null&&typeof e=="object"}function _e(e){return globalThis.Array.isArray(e)&&!globalThis.ArrayBuffer.isView(e)}function ot(e){return e===void 0}function ri(e){return e===null}function oi(e){return typeof e=="boolean"}function qe(e){return typeof e=="number"}function Pa(e){return globalThis.Number.isInteger(e)}function ai(e){return typeof e=="bigint"}function Ee(e){return typeof e=="string"}function Tr(e){return typeof e=="function"}function si(e){return typeof e=="symbol"}function Sd(e){return ai(e)||oi(e)||ri(e)||qe(e)||Ee(e)||si(e)||ot(e)}var Oe;(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=Ke(s);return e.AllowArrayObject?c:c&&!_e(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?qe(s):Number.isFinite(s)}e.IsNumberLike=o;function a(s){const c=ot(s);return e.AllowNullVoid?c||s===null:c}e.IsVoidLike=a})(Oe||(Oe={}));function wd(e){return globalThis.Object.freeze(e).map(n=>Qn(n))}function Ld(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=Qn(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=Qn(e[i]);return globalThis.Object.freeze(n)}function Qn(e){return ge(e)?wd(e):$r(e)?e:Ln(e)?e:xa(e)?e:H(e)?Ld(e):e}function m(e,n){const i=n!==void 0?{...n,...e}:e;switch(Oe.InstanceMode){case"freeze":return Qn(i);case"clone":return be(i);default:return i}}class Me extends Error{constructor(n){super(n)}}const Pe=Symbol.for("TypeBox.Transform"),In=Symbol.for("TypeBox.Readonly"),Ze=Symbol.for("TypeBox.Optional"),ci=Symbol.for("TypeBox.Hint"),y=Symbol.for("TypeBox.Kind");function jr(e){return H(e)&&e[In]==="Readonly"}function at(e){return H(e)&&e[Ze]==="Optional"}function Ia(e){return T(e,"Any")}function Fa(e){return T(e,"Argument")}function Yt(e){return T(e,"Array")}function li(e){return T(e,"AsyncIterator")}function di(e){return T(e,"BigInt")}function Fn(e){return T(e,"Boolean")}function Zt(e){return T(e,"Computed")}function Qt(e){return T(e,"Constructor")}function Pd(e){return T(e,"Date")}function en(e){return T(e,"Function")}function tn(e){return T(e,"Integer")}function Fe(e){return T(e,"Intersect")}function pi(e){return T(e,"Iterator")}function T(e,n){return H(e)&&y in e&&e[y]===n}function Na(e){return wn(e)||ze(e)||z(e)}function Lt(e){return T(e,"Literal")}function Pt(e){return T(e,"MappedKey")}function we(e){return T(e,"MappedResult")}function Nn(e){return T(e,"Never")}function Id(e){return T(e,"Not")}function vr(e){return T(e,"Null")}function nn(e){return T(e,"Number")}function De(e){return T(e,"Object")}function ui(e){return T(e,"Promise")}function mi(e){return T(e,"Record")}function me(e){return T(e,"Ref")}function $a(e){return T(e,"RegExp")}function $n(e){return T(e,"String")}function Rr(e){return T(e,"Symbol")}function It(e){return T(e,"TemplateLiteral")}function Fd(e){return T(e,"This")}function fi(e){return H(e)&&Pe in e}function Ft(e){return T(e,"Tuple")}function Ur(e){return T(e,"Undefined")}function Z(e){return T(e,"Union")}function Nd(e){return T(e,"Uint8Array")}function $d(e){return T(e,"Unknown")}function Cd(e){return T(e,"Unsafe")}function Ad(e){return T(e,"Void")}function Ca(e){return H(e)&&y in e&&z(e[y])}function Xe(e){return Ia(e)||Fa(e)||Yt(e)||Fn(e)||di(e)||li(e)||Zt(e)||Qt(e)||Pd(e)||en(e)||tn(e)||Fe(e)||pi(e)||Lt(e)||Pt(e)||we(e)||Nn(e)||Id(e)||vr(e)||nn(e)||De(e)||ui(e)||mi(e)||me(e)||$a(e)||$n(e)||Rr(e)||It(e)||Fd(e)||Ft(e)||Ur(e)||Z(e)||Nd(e)||$d(e)||Cd(e)||Ad(e)||Ca(e)}const Td=["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 Aa(e){try{return new RegExp(e),!0}catch{return!1}}function kr(e){if(!z(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 Ta(e){return Mr(e)||ne(e)}function pn(e){return K(e)||ya(e)}function k(e){return K(e)||ze(e)}function Mr(e){return K(e)||wn(e)}function U(e){return K(e)||z(e)}function jd(e){return K(e)||z(e)&&kr(e)&&Aa(e)}function vd(e){return K(e)||z(e)&&kr(e)}function ja(e){return K(e)||ne(e)}function ei(e){return H(e)&&e[Ze]==="Optional"}function ve(e){return j(e,"Any")&&U(e.$id)}function Rd(e){return j(e,"Argument")&&ze(e.index)}function Nt(e){return j(e,"Array")&&e.type==="array"&&U(e.$id)&&ne(e.items)&&k(e.minItems)&&k(e.maxItems)&&Mr(e.uniqueItems)&&ja(e.contains)&&k(e.minContains)&&k(e.maxContains)}function Dr(e){return j(e,"AsyncIterator")&&e.type==="AsyncIterator"&&U(e.$id)&&ne(e.items)}function gi(e){return j(e,"BigInt")&&e.type==="bigint"&&U(e.$id)&&pn(e.exclusiveMaximum)&&pn(e.exclusiveMinimum)&&pn(e.maximum)&&pn(e.minimum)&&pn(e.multipleOf)}function $t(e){return j(e,"Boolean")&&e.type==="boolean"&&U(e.$id)}function Ud(e){return j(e,"Computed")&&z(e.target)&&ge(e.parameters)&&e.parameters.every(n=>ne(n))}function hi(e){return j(e,"Constructor")&&e.type==="Constructor"&&U(e.$id)&&ge(e.parameters)&&e.parameters.every(n=>ne(n))&&ne(e.returns)}function bi(e){return j(e,"Date")&&e.type==="Date"&&U(e.$id)&&k(e.exclusiveMaximumTimestamp)&&k(e.exclusiveMinimumTimestamp)&&k(e.maximumTimestamp)&&k(e.minimumTimestamp)&&k(e.multipleOfTimestamp)}function Oi(e){return j(e,"Function")&&e.type==="Function"&&U(e.$id)&&ge(e.parameters)&&e.parameters.every(n=>ne(n))&&ne(e.returns)}function Qe(e){return j(e,"Integer")&&e.type==="integer"&&U(e.$id)&&k(e.exclusiveMaximum)&&k(e.exclusiveMinimum)&&k(e.maximum)&&k(e.minimum)&&k(e.multipleOf)}function va(e){return H(e)&&Object.entries(e).every(([n,i])=>kr(n)&&ne(i))}function Ct(e){return j(e,"Intersect")&&!(z(e.type)&&e.type!=="object")&&ge(e.allOf)&&e.allOf.every(n=>ne(n)&&!zd(n))&&U(e.type)&&(Mr(e.unevaluatedProperties)||ja(e.unevaluatedProperties))&&U(e.$id)}function Br(e){return j(e,"Iterator")&&e.type==="Iterator"&&U(e.$id)&&ne(e.items)}function j(e,n){return H(e)&&y in e&&e[y]===n}function Ra(e){return st(e)&&z(e.const)}function Ua(e){return st(e)&&ze(e.const)}function ka(e){return st(e)&&wn(e.const)}function st(e){return j(e,"Literal")&&U(e.$id)&&kd(e.const)}function kd(e){return wn(e)||ze(e)||z(e)}function Md(e){return j(e,"MappedKey")&&ge(e.keys)&&e.keys.every(n=>ze(n)||z(n))}function Dd(e){return j(e,"MappedResult")&&va(e.properties)}function ct(e){return j(e,"Never")&&H(e.not)&&Object.getOwnPropertyNames(e.not).length===0}function _t(e){return j(e,"Not")&&ne(e.not)}function Er(e){return j(e,"Null")&&e.type==="null"&&U(e.$id)}function ue(e){return j(e,"Number")&&e.type==="number"&&U(e.$id)&&k(e.exclusiveMaximum)&&k(e.exclusiveMinimum)&&k(e.maximum)&&k(e.minimum)&&k(e.multipleOf)}function B(e){return j(e,"Object")&&e.type==="object"&&U(e.$id)&&va(e.properties)&&Ta(e.additionalProperties)&&k(e.minProperties)&&k(e.maxProperties)}function zr(e){return j(e,"Promise")&&e.type==="Promise"&&U(e.$id)&&ne(e.item)}function te(e){return j(e,"Record")&&e.type==="object"&&U(e.$id)&&Ta(e.additionalProperties)&&H(e.patternProperties)&&(n=>{const i=Object.getOwnPropertyNames(n.patternProperties);return i.length===1&&Aa(i[0])&&H(n.patternProperties)&&ne(n.patternProperties[i[0]])})(e)}function Bd(e){return j(e,"Ref")&&U(e.$id)&&z(e.$ref)}function fn(e){return j(e,"RegExp")&&U(e.$id)&&z(e.source)&&z(e.flags)&&k(e.maxLength)&&k(e.minLength)}function Re(e){return j(e,"String")&&e.type==="string"&&U(e.$id)&&k(e.minLength)&&k(e.maxLength)&&jd(e.pattern)&&vd(e.format)}function gn(e){return j(e,"Symbol")&&e.type==="symbol"&&U(e.$id)}function hn(e){return j(e,"TemplateLiteral")&&e.type==="string"&&z(e.pattern)&&e.pattern[0]==="^"&&e.pattern[e.pattern.length-1]==="$"}function Ed(e){return j(e,"This")&&U(e.$id)&&z(e.$ref)}function zd(e){return H(e)&&Pe in e}function yi(e){return j(e,"Tuple")&&e.type==="array"&&U(e.$id)&&ze(e.minItems)&&ze(e.maxItems)&&e.minItems===e.maxItems&&(K(e.items)&&K(e.additionalItems)&&e.minItems===0||ge(e.items)&&e.items.every(n=>ne(n)))}function xt(e){return j(e,"Undefined")&&e.type==="undefined"&&U(e.$id)}function Ye(e){return j(e,"Union")&&U(e.$id)&&H(e)&&ge(e.anyOf)&&e.anyOf.every(n=>ne(n))}function Cn(e){return j(e,"Uint8Array")&&e.type==="Uint8Array"&&U(e.$id)&&k(e.minByteLength)&&k(e.maxByteLength)}function Ue(e){return j(e,"Unknown")&&U(e.$id)}function Kd(e){return j(e,"Unsafe")}function xi(e){return j(e,"Void")&&e.type==="void"&&U(e.$id)}function _d(e){return H(e)&&y in e&&z(e[y])&&!Td.includes(e[y])}function ne(e){return H(e)&&(ve(e)||Rd(e)||Nt(e)||$t(e)||gi(e)||Dr(e)||Ud(e)||hi(e)||bi(e)||Oi(e)||Qe(e)||Ct(e)||Br(e)||st(e)||Md(e)||Dd(e)||ct(e)||_t(e)||Er(e)||ue(e)||B(e)||zr(e)||te(e)||Bd(e)||fn(e)||Re(e)||gn(e)||hn(e)||Ed(e)||yi(e)||xt(e)||Ye(e)||Cn(e)||Ue(e)||Kd(e)||xi(e)||_d(e))}const Hd="(true|false)",Vn="(0|[1-9][0-9]*)",Ma="(.*)",Wd="(?!.*)",Ht=`^${Vn}$`,Wt=`^${Ma}$`,Gd=`^${Wd}$`,Kr=new Map;function Da(e){return Kr.has(e)}function Ba(e,n){Kr.set(e,n)}function Ea(e){return Kr.get(e)}const za=new Map;function _r(e){return za.has(e)}function Ka(e){return za.get(e)}function qd(e,n){return e.includes(n)}function Vd(e){return[...new Set(e)]}function Xd(e,n){return e.filter(i=>n.includes(i))}function Jd(e,n){return e.reduce((i,r)=>Xd(i,r),n)}function Yd(e){return e.length===1?e[0]:e.length>1?Jd(e.slice(1),e[0]):[]}function Zd(e){const n=[];for(const i of e)n.push(...i);return n}function bn(e){return m({[y]:"Any"},e)}function Hr(e,n){return m({[y]:"Array",type:"array",items:e},n)}function Qd(e){return m({[y]:"Argument",index:e})}function Wr(e,n){return m({[y]:"AsyncIterator",type:"AsyncIterator",items:e},n)}function q(e,n,i){return m({[y]:"Computed",target:e,parameters:n},i)}function ep(e,n){const{[n]:i,...r}=e;return r}function ye(e,n){return n.reduce((i,r)=>ep(i,r),e)}function E(e){return m({[y]:"Never",not:{}},e)}function ie(e){return m({[y]:"MappedResult",properties:e})}function Gr(e,n,i){return m({[y]:"Constructor",type:"Constructor",parameters:e,returns:n},i)}function An(e,n,i){return m({[y]:"Function",type:"Function",parameters:e,returns:n},i)}function lr(e,n){return m({[y]:"Union",anyOf:e},n)}function tp(e){return e.some(n=>at(n))}function To(e){return e.map(n=>at(n)?np(n):n)}function np(e){return ye(e,[Ze])}function ip(e,n){return tp(e)?pt(lr(To(e),n)):lr(To(e),n)}function rn(e,n){return e.length===1?m(e[0],n):e.length===0?E(n):ip(e,n)}function re(e,n){return e.length===0?E(n):e.length===1?m(e[0],n):lr(e,n)}class jo extends Me{}function rp(e){return e.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function qr(e,n,i){return e[n]===i&&e.charCodeAt(n-1)!==92}function Ve(e,n){return qr(e,n,"(")}function On(e,n){return qr(e,n,")")}function _a(e,n){return qr(e,n,"|")}function op(e){if(!(Ve(e,0)&&On(e,e.length-1)))return!1;let n=0;for(let i=0;i<e.length;i++)if(Ve(e,i)&&(n+=1),On(e,i)&&(n-=1),n===0&&i!==e.length-1)return!1;return!0}function ap(e){return e.slice(1,e.length-1)}function sp(e){let n=0;for(let i=0;i<e.length;i++)if(Ve(e,i)&&(n+=1),On(e,i)&&(n-=1),_a(e,i)&&n===0)return!0;return!1}function cp(e){for(let n=0;n<e.length;n++)if(Ve(e,n))return!0;return!1}function lp(e){let[n,i]=[0,0];const r=[];for(let a=0;a<e.length;a++)if(Ve(e,a)&&(n+=1),On(e,a)&&(n-=1),_a(e,a)&&n===0){const s=e.slice(i,a);s.length>0&&r.push(Gt(s)),i=a+1}const o=e.slice(i);return o.length>0&&r.push(Gt(o)),r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"or",expr:r}}function dp(e){function n(o,a){if(!Ve(o,a))throw new jo("TemplateLiteralParser: Index must point to open parens");let s=0;for(let c=a;c<o.length;c++)if(Ve(o,c)&&(s+=1),On(o,c)&&(s-=1),s===0)return[a,c];throw new jo("TemplateLiteralParser: Unclosed group parens in expression")}function i(o,a){for(let s=a;s<o.length;s++)if(Ve(o,s))return[a,s];return[a,o.length]}const r=[];for(let o=0;o<e.length;o++)if(Ve(e,o)){const[a,s]=n(e,o),c=e.slice(a,s+1);r.push(Gt(c)),o=s}else{const[a,s]=i(e,o),c=e.slice(a,s);c.length>0&&r.push(Gt(c)),o=s-1}return r.length===0?{type:"const",const:""}:r.length===1?r[0]:{type:"and",expr:r}}function Gt(e){return op(e)?Gt(ap(e)):sp(e)?lp(e):cp(e)?dp(e):{type:"const",const:rp(e)}}function Vr(e){return Gt(e.slice(1,e.length-1))}class pp extends Me{}function up(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 mp(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 fp(e){return e.type==="const"&&e.const===".*"}function yn(e){return up(e)||fp(e)?!1:mp(e)?!0:e.type==="and"?e.expr.every(n=>yn(n)):e.type==="or"?e.expr.every(n=>yn(n)):e.type==="const"?!0:(()=>{throw new pp("Unknown expression type")})()}function gp(e){const n=Vr(e.pattern);return yn(n)}class hp extends Me{}function*Ha(e){if(e.length===1)return yield*e[0];for(const n of e[0])for(const i of Ha(e.slice(1)))yield`${n}${i}`}function*bp(e){return yield*Ha(e.expr.map(n=>[...Si(n)]))}function*Op(e){for(const n of e.expr)yield*Si(n)}function*yp(e){return yield e.const}function*Si(e){return e.type==="and"?yield*bp(e):e.type==="or"?yield*Op(e):e.type==="const"?yield*yp(e):(()=>{throw new hp("Unknown expression")})()}function Wa(e){const n=Vr(e.pattern);return yn(n)?[...Si(n)]:[]}function _(e,n){return m({[y]:"Literal",const:e,type:typeof e},n)}function Ga(e){return m({[y]:"Boolean",type:"boolean"},e)}function Xr(e){return m({[y]:"BigInt",type:"bigint"},e)}function At(e){return m({[y]:"Number",type:"number"},e)}function St(e){return m({[y]:"String",type:"string"},e)}function*xp(e){const n=e.trim().replace(/"|'/g,"");return n==="boolean"?yield Ga():n==="number"?yield At():n==="bigint"?yield Xr():n==="string"?yield St():yield(()=>{const i=n.split("|").map(r=>_(r.trim()));return i.length===0?E():i.length===1?i[0]:rn(i)})()}function*Sp(e){if(e[1]!=="{"){const n=_("$"),i=dr(e.slice(1));return yield*[n,...i]}for(let n=2;n<e.length;n++)if(e[n]==="}"){const i=xp(e.slice(2,n)),r=dr(e.slice(n+1));return yield*[...i,...r]}yield _(e)}function*dr(e){for(let n=0;n<e.length;n++)if(e[n]==="$"){const i=_(e.slice(0,n)),r=Sp(e.slice(n));return yield*[i,...r]}yield _(e)}function wp(e){return[...dr(e)]}class Lp extends Me{}function Pp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qa(e,n){return It(e)?e.pattern.slice(1,e.pattern.length-1):Z(e)?`(${e.anyOf.map(i=>qa(i,n)).join("|")})`:nn(e)?`${n}${Vn}`:tn(e)?`${n}${Vn}`:di(e)?`${n}${Vn}`:$n(e)?`${n}${Ma}`:Lt(e)?`${n}${Pp(e.const.toString())}`:Fn(e)?`${n}${Hd}`:(()=>{throw new Lp(`Unexpected Kind '${e[y]}'`)})()}function vo(e){return`^${e.map(n=>qa(n,"")).join("")}$`}function ti(e){const i=Wa(e).map(r=>_(r));return rn(i)}function Va(e,n){const i=z(e)?vo(wp(e)):vo(e);return m({[y]:"TemplateLiteral",type:"string",pattern:i},n)}function Ip(e){return Wa(e).map(i=>i.toString())}function Fp(e){const n=[];for(const i of e)n.push(...lt(i));return n}function Np(e){return[e.toString()]}function lt(e){return[...new Set(It(e)?Ip(e):Z(e)?Fp(e.anyOf):Lt(e)?Np(e.const):nn(e)?["[number]"]:tn(e)?["[number]"]:[])]}function $p(e,n,i){const r={};for(const o of Object.getOwnPropertyNames(n))r[o]=wi(e,lt(n[o]),i);return r}function Cp(e,n,i){return $p(e,n.properties,i)}function Ap(e,n,i){const r=Cp(e,n,i);return ie(r)}function Xa(e,n){return e.map(i=>Ja(i,n))}function Tp(e){return e.filter(n=>!Nn(n))}function jp(e,n){return es(Tp(Xa(e,n)))}function vp(e){return e.some(n=>Nn(n))?[]:e}function Rp(e,n){return rn(vp(Xa(e,n)))}function Up(e,n){return n in e?e[n]:n==="[number]"?rn(e):E()}function kp(e,n){return n==="[number]"?e:E()}function Mp(e,n){return n in e?e[n]:E()}function Ja(e,n){return Fe(e)?jp(e.allOf,n):Z(e)?Rp(e.anyOf,n):Ft(e)?Up(e.items??[],n):Yt(e)?kp(e.items,n):De(e)?Mp(e.properties,n):E()}function Ya(e,n){return n.map(i=>Ja(e,i))}function Ro(e,n){return rn(Ya(e,n))}function wi(e,n,i){if(me(e)||me(n)){const r="Index types using Ref parameters require both Type and Key to be of TSchema";if(!Xe(e)||!Xe(n))throw new Me(r);return q("Index",[e,n])}return we(n)?Ap(e,n,i):Pt(n)?zp(e,n,i):m(Xe(n)?Ro(e,lt(n)):Ro(e,n),i)}function Dp(e,n,i){return{[n]:wi(e,[n],be(i))}}function Bp(e,n,i){return n.reduce((r,o)=>({...r,...Dp(e,o,i)}),{})}function Ep(e,n,i){return Bp(e,n.keys,i)}function zp(e,n,i){const r=Ep(e,n,i);return ie(r)}function Jr(e,n){return m({[y]:"Iterator",type:"Iterator",items:e},n)}function Kp(e){const n=[];for(let i in e)at(e[i])||n.push(i);return n}function _p(e,n){const i=Kp(e),r=i.length>0?{[y]:"Object",type:"object",properties:e,required:i}:{[y]:"Object",type:"object",properties:e};return m(r,n)}var Y=_p;function Za(e,n){return m({[y]:"Promise",type:"Promise",item:e},n)}function Hp(e){return m(ye(e,[In]))}function Wp(e){return m({...e,[In]:"Readonly"})}function Gp(e,n){return n===!1?Hp(e):Wp(e)}function dt(e,n){const i=n??!0;return we(e)?Xp(e,i):Gp(e,i)}function qp(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=dt(e[r],n);return i}function Vp(e,n){return qp(e.properties,n)}function Xp(e,n){const i=Vp(e,n);return ie(i)}function on(e,n){return m(e.length>0?{[y]:"Tuple",type:"array",items:e,additionalItems:!1,minItems:e.length,maxItems:e.length}:{[y]:"Tuple",type:"array",minItems:e.length,maxItems:e.length},n)}function Qa(e,n){return e in n?Le(e,n[e]):ie(n)}function Jp(e){return{[e]:_(e)}}function Yp(e){const n={};for(const i of e)n[i]=_(i);return n}function Zp(e,n){return qd(n,e)?Jp(e):Yp(n)}function Qp(e,n){const i=Zp(e,n);return Qa(e,i)}function un(e,n){return n.map(i=>Le(e,i))}function eu(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(n))i[r]=Le(e,n[r]);return i}function Le(e,n){const i={...n};return at(n)?pt(Le(e,ye(n,[Ze]))):jr(n)?dt(Le(e,ye(n,[In]))):we(n)?Qa(e,n.properties):Pt(n)?Qp(e,n.keys):Qt(n)?Gr(un(e,n.parameters),Le(e,n.returns),i):en(n)?An(un(e,n.parameters),Le(e,n.returns),i):li(n)?Wr(Le(e,n.items),i):pi(n)?Jr(Le(e,n.items),i):Fe(n)?ut(un(e,n.allOf),i):Z(n)?re(un(e,n.anyOf),i):Ft(n)?on(un(e,n.items??[]),i):De(n)?Y(eu(e,n.properties),i):Yt(n)?Hr(Le(e,n.items),i):ui(n)?Za(Le(e,n.item),i):n}function tu(e,n){const i={};for(const r of e)i[r]=Le(r,n);return i}function nu(e,n,i){const r=Xe(e)?lt(e):e,o=n({[y]:"MappedKey",keys:r}),a=tu(r,o);return Y(a,i)}function iu(e){return m(ye(e,[Ze]))}function ru(e){return m({...e,[Ze]:"Optional"})}function ou(e,n){return n===!1?iu(e):ru(e)}function pt(e,n){const i=n??!0;return we(e)?cu(e,i):ou(e,i)}function au(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=pt(e[r],n);return i}function su(e,n){return au(e.properties,n)}function cu(e,n){const i=su(e,n);return ie(i)}function pr(e,n={}){const i=e.every(o=>De(o)),r=Xe(n.unevaluatedProperties)?{unevaluatedProperties:n.unevaluatedProperties}:{};return m(n.unevaluatedProperties===!1||Xe(n.unevaluatedProperties)||i?{...r,[y]:"Intersect",type:"object",allOf:e}:{...r,[y]:"Intersect",allOf:e},n)}function lu(e){return e.every(n=>at(n))}function du(e){return ye(e,[Ze])}function Uo(e){return e.map(n=>at(n)?du(n):n)}function pu(e,n){return lu(e)?pt(pr(Uo(e),n)):pr(Uo(e),n)}function es(e,n={}){if(e.length===1)return m(e[0],n);if(e.length===0)return E(n);if(e.some(i=>fi(i)))throw new Error("Cannot intersect transform types");return pu(e,n)}function ut(e,n){if(e.length===1)return m(e[0],n);if(e.length===0)return E(n);if(e.some(i=>fi(i)))throw new Error("Cannot intersect transform types");return pr(e,n)}function Tn(...e){const[n,i]=typeof e[0]=="string"?[e[0],e[1]]:[e[0].$id,e[1]];if(typeof n!="string")throw new Me("Ref: $ref must be a string");return m({[y]:"Ref",$ref:n},i)}function uu(e,n){return q("Awaited",[q(e,n)])}function mu(e){return q("Awaited",[Tn(e)])}function fu(e){return ut(ts(e))}function gu(e){return re(ts(e))}function hu(e){return Li(e)}function ts(e){return e.map(n=>Li(n))}function Li(e,n){return m(Zt(e)?uu(e.target,e.parameters):Fe(e)?fu(e.allOf):Z(e)?gu(e.anyOf):ui(e)?hu(e.item):me(e)?mu(e.$ref):e,n)}function ns(e){const n=[];for(const i of e)n.push(Pi(i));return n}function bu(e){const n=ns(e);return Zd(n)}function Ou(e){const n=ns(e);return Yd(n)}function yu(e){return e.map((n,i)=>i.toString())}function xu(e){return["[number]"]}function Su(e){return globalThis.Object.getOwnPropertyNames(e)}function wu(e){return ur?globalThis.Object.getOwnPropertyNames(e).map(i=>i[0]==="^"&&i[i.length-1]==="$"?i.slice(1,i.length-1):i):[]}function Pi(e){return Fe(e)?bu(e.allOf):Z(e)?Ou(e.anyOf):Ft(e)?yu(e.items??[]):Yt(e)?xu(e.items):De(e)?Su(e.properties):mi(e)?wu(e.patternProperties):[]}let ur=!1;function ni(e){ur=!0;const n=Pi(e);return ur=!1,`^(${n.map(r=>`(${r})`).join("|")})$`}function Lu(e,n){return q("KeyOf",[q(e,n)])}function Pu(e){return q("KeyOf",[Tn(e)])}function Iu(e,n){const i=Pi(e),r=Fu(i),o=rn(r);return m(o,n)}function Fu(e){return e.map(n=>n==="[number]"?At():_(n))}function Yr(e,n){return Zt(e)?Lu(e.target,e.parameters):me(e)?Pu(e.$ref):we(e)?Cu(e,n):Iu(e,n)}function Nu(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=Yr(e[r],be(n));return i}function $u(e,n){return Nu(e.properties,n)}function Cu(e,n){const i=$u(e,n);return ie(i)}function Au(e){const n=[];for(const i of e)n.push(...Pi(i));return Vd(n)}function Tu(e){return e.filter(n=>!Nn(n))}function ju(e,n){const i=[];for(const r of e)i.push(...Ya(r,[n]));return Tu(i)}function vu(e,n){const i={};for(const r of n)i[r]=es(ju(e,r));return i}function Ru(e,n){const i=Au(e),r=vu(e,i);return Y(r,n)}function is(e){return m({[y]:"Date",type:"Date"},e)}function rs(e){return m({[y]:"Null",type:"null"},e)}function os(e){return m({[y]:"Symbol",type:"symbol"},e)}function as(e){return m({[y]:"Undefined",type:"undefined"},e)}function ss(e){return m({[y]:"Uint8Array",type:"Uint8Array"},e)}function Ii(e){return m({[y]:"Unknown"},e)}function Uu(e){return e.map(n=>Zr(n,!1))}function ku(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=dt(Zr(e[i],!1));return n}function Kn(e,n){return n===!0?e:dt(e)}function Zr(e,n){return sd(e)||ld(e)?Kn(bn(),n):ge(e)?dt(on(Uu(e))):Ln(e)?ss():$r(e)?is():H(e)?Kn(Y(ku(e)),n):cd(e)?Kn(An([],Ii()),n):K(e)?as():dd(e)?rs():pd(e)?os():ya(e)?Xr():ze(e)||wn(e)||z(e)?_(e):Y({})}function Mu(e,n){return m(Zr(e,!0),n)}function Du(e,n){return Qt(e)?on(e.parameters,n):E(n)}function Bu(e,n){if(K(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=>_(a));return re(o,{...n,[ci]:"Enum"})}class Eu extends Me{}var p;(function(e){e[e.Union=0]="Union",e[e.True=1]="True",e[e.False=2]="False"})(p||(p={}));function Ie(e){return e===p.False?e:p.True}function an(e){throw new Eu(e)}function W(e){return ct(e)||Ct(e)||Ye(e)||Ue(e)||ve(e)}function G(e,n){return ct(n)?ds():Ct(n)?Fi(e,n):Ye(n)?eo(e,n):Ue(n)?fs():ve(n)?Qr():an("StructuralRight")}function Qr(e,n){return p.True}function zu(e,n){return Ct(n)?Fi(e,n):Ye(n)&&n.anyOf.some(i=>ve(i)||Ue(i))?p.True:Ye(n)?p.Union:Ue(n)||ve(n)?p.True:p.Union}function Ku(e,n){return Ue(e)?p.False:ve(e)?p.Union:ct(e)?p.True:p.False}function _u(e,n){return B(n)&&Ni(n)?p.True:W(n)?G(e,n):Nt(n)?Ie(R(e.items,n.items)):p.False}function Hu(e,n){return W(n)?G(e,n):Dr(n)?Ie(R(e.items,n.items)):p.False}function Wu(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):gi(n)?p.True:p.False}function cs(e,n){return ka(e)||$t(e)?p.True:p.False}function Gu(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):$t(n)?p.True:p.False}function qu(e,n){return W(n)?G(e,n):B(n)?se(e,n):hi(n)?e.parameters.length>n.parameters.length?p.False:e.parameters.every((i,r)=>Ie(R(n.parameters[r],i))===p.True)?Ie(R(e.returns,n.returns)):p.False:p.False}function Vu(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):bi(n)?p.True:p.False}function Xu(e,n){return W(n)?G(e,n):B(n)?se(e,n):Oi(n)?e.parameters.length>n.parameters.length?p.False:e.parameters.every((i,r)=>Ie(R(n.parameters[r],i))===p.True)?Ie(R(e.returns,n.returns)):p.False:p.False}function ls(e,n){return st(e)&&ze(e.const)||ue(e)||Qe(e)?p.True:p.False}function Ju(e,n){return Qe(n)||ue(n)?p.True:W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):p.False}function Fi(e,n){return n.allOf.every(i=>R(e,i)===p.True)?p.True:p.False}function Yu(e,n){return e.allOf.some(i=>R(i,n)===p.True)?p.True:p.False}function Zu(e,n){return W(n)?G(e,n):Br(n)?Ie(R(e.items,n.items)):p.False}function Qu(e,n){return st(n)&&n.const===e.const?p.True:W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):Re(n)?ms(e):ue(n)?ps(e):Qe(n)?ls(e):$t(n)?cs(e):p.False}function ds(e,n){return p.False}function em(e,n){return p.True}function ko(e){let[n,i]=[e,0];for(;_t(n);)n=n.not,i+=1;return i%2===0?n:Ii()}function tm(e,n){return _t(e)?R(ko(e),n):_t(n)?R(e,ko(n)):an("Invalid fallthrough for Not")}function nm(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):Er(n)?p.True:p.False}function ps(e,n){return Ua(e)||ue(e)||Qe(e)?p.True:p.False}function im(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):Qe(n)||ue(n)?p.True:p.False}function fe(e,n){return Object.getOwnPropertyNames(e.properties).length===n}function Mo(e){return Ni(e)}function Do(e){return fe(e,0)||fe(e,1)&&"description"in e.properties&&Ye(e.properties.description)&&e.properties.description.anyOf.length===2&&(Re(e.properties.description.anyOf[0])&&xt(e.properties.description.anyOf[1])||Re(e.properties.description.anyOf[1])&&xt(e.properties.description.anyOf[0]))}function Zi(e){return fe(e,0)}function Bo(e){return fe(e,0)}function rm(e){return fe(e,0)}function om(e){return fe(e,0)}function am(e){return Ni(e)}function sm(e){const n=At();return fe(e,0)||fe(e,1)&&"length"in e.properties&&Ie(R(e.properties.length,n))===p.True}function cm(e){return fe(e,0)}function Ni(e){const n=At();return fe(e,0)||fe(e,1)&&"length"in e.properties&&Ie(R(e.properties.length,n))===p.True}function lm(e){const n=An([bn()],bn());return fe(e,0)||fe(e,1)&&"then"in e.properties&&Ie(R(e.properties.then,n))===p.True}function us(e,n){return R(e,n)===p.False||ei(e)&&!ei(n)?p.False:p.True}function se(e,n){return Ue(e)?p.False:ve(e)?p.Union:ct(e)||Ra(e)&&Mo(n)||Ua(e)&&Zi(n)||ka(e)&&Bo(n)||gn(e)&&Do(n)||gi(e)&&rm(n)||Re(e)&&Mo(n)||gn(e)&&Do(n)||ue(e)&&Zi(n)||Qe(e)&&Zi(n)||$t(e)&&Bo(n)||Cn(e)&&am(n)||bi(e)&&om(n)||hi(e)&&cm(n)||Oi(e)&&sm(n)?p.True:te(e)&&Re(mr(e))?n[ci]==="Record"?p.True:p.False:te(e)&&ue(mr(e))?fe(n,0)?p.True:p.False:p.False}function dm(e,n){return W(n)?G(e,n):te(n)?Ne(e,n):B(n)?(()=>{for(const i of Object.getOwnPropertyNames(n.properties)){if(!(i in e.properties)&&!ei(n.properties[i]))return p.False;if(ei(n.properties[i]))return p.True;if(us(e.properties[i],n.properties[i])===p.False)return p.False}return p.True})():p.False}function pm(e,n){return W(n)?G(e,n):B(n)&&lm(n)?p.True:zr(n)?Ie(R(e.item,n.item)):p.False}function mr(e){return Ht in e.patternProperties?At():Wt in e.patternProperties?St():an("Unknown record key pattern")}function fr(e){return Ht in e.patternProperties?e.patternProperties[Ht]:Wt in e.patternProperties?e.patternProperties[Wt]:an("Unable to get record value schema")}function Ne(e,n){const[i,r]=[mr(n),fr(n)];return Ra(e)&&ue(i)&&Ie(R(e,r))===p.True?p.True:Cn(e)&&ue(i)||Re(e)&&ue(i)||Nt(e)&&ue(i)?R(e,r):B(e)?(()=>{for(const o of Object.getOwnPropertyNames(e.properties))if(us(r,e.properties[o])===p.False)return p.False;return p.True})():p.False}function um(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?R(fr(e),fr(n)):p.False}function mm(e,n){const i=fn(e)?St():e,r=fn(n)?St():n;return R(i,r)}function ms(e,n){return st(e)&&z(e.const)||Re(e)?p.True:p.False}function fm(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):Re(n)?p.True:p.False}function gm(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):gn(n)?p.True:p.False}function hm(e,n){return hn(e)?R(ti(e),n):hn(n)?R(e,ti(n)):an("Invalid fallthrough for TemplateLiteral")}function bm(e,n){return Nt(n)&&e.items!==void 0&&e.items.every(i=>R(i,n.items)===p.True)}function Om(e,n){return ct(e)?p.True:Ue(e)?p.False:ve(e)?p.Union:p.False}function ym(e,n){return W(n)?G(e,n):B(n)&&Ni(n)||Nt(n)&&bm(e,n)?p.True:yi(n)?K(e.items)&&!K(n.items)||!K(e.items)&&K(n.items)?p.False:K(e.items)&&!K(n.items)||e.items.every((i,r)=>R(i,n.items[r])===p.True)?p.True:p.False:p.False}function xm(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):Cn(n)?p.True:p.False}function Sm(e,n){return W(n)?G(e,n):B(n)?se(e,n):te(n)?Ne(e,n):xi(n)?Pm(e):xt(n)?p.True:p.False}function eo(e,n){return n.anyOf.some(i=>R(e,i)===p.True)?p.True:p.False}function wm(e,n){return e.anyOf.every(i=>R(i,n)===p.True)?p.True:p.False}function fs(e,n){return p.True}function Lm(e,n){return ct(n)?ds():Ct(n)?Fi(e,n):Ye(n)?eo(e,n):ve(n)?Qr():Re(n)?ms(e):ue(n)?ps(e):Qe(n)?ls(e):$t(n)?cs(e):Nt(n)?Ku(e):yi(n)?Om(e):B(n)?se(e,n):Ue(n)?p.True:p.False}function Pm(e,n){return xt(e)||xt(e)?p.True:p.False}function Im(e,n){return Ct(n)?Fi(e,n):Ye(n)?eo(e,n):Ue(n)?fs():ve(n)?Qr():B(n)?se(e,n):xi(n)?p.True:p.False}function R(e,n){return hn(e)||hn(n)?hm(e,n):fn(e)||fn(n)?mm(e,n):_t(e)||_t(n)?tm(e,n):ve(e)?zu(e,n):Nt(e)?_u(e,n):gi(e)?Wu(e,n):$t(e)?Gu(e,n):Dr(e)?Hu(e,n):hi(e)?qu(e,n):bi(e)?Vu(e,n):Oi(e)?Xu(e,n):Qe(e)?Ju(e,n):Ct(e)?Yu(e,n):Br(e)?Zu(e,n):st(e)?Qu(e,n):ct(e)?em():Er(e)?nm(e,n):ue(e)?im(e,n):B(e)?dm(e,n):te(e)?um(e,n):Re(e)?fm(e,n):gn(e)?gm(e,n):yi(e)?ym(e,n):zr(e)?pm(e,n):Cn(e)?xm(e,n):xt(e)?Sm(e,n):Ye(e)?wm(e,n):Ue(e)?Lm(e,n):xi(e)?Im(e,n):an(`Unknown left type operand '${e[y]}'`)}function jn(e,n){return R(e,n)}function Fm(e,n,i,r,o){const a={};for(const s of globalThis.Object.getOwnPropertyNames(e))a[s]=to(e[s],n,i,r,be(o));return a}function Nm(e,n,i,r,o){return Fm(e.properties,n,i,r,o)}function $m(e,n,i,r,o){const a=Nm(e,n,i,r,o);return ie(a)}function Cm(e,n,i,r){const o=jn(e,n);return o===p.Union?re([i,r]):o===p.True?i:r}function to(e,n,i,r,o){return we(e)?$m(e,n,i,r,o):Pt(e)?m(vm(e,n,i,r,o)):m(Cm(e,n,i,r),o)}function Am(e,n,i,r,o){return{[e]:to(_(e),n,i,r,be(o))}}function Tm(e,n,i,r,o){return e.reduce((a,s)=>({...a,...Am(s,n,i,r,o)}),{})}function jm(e,n,i,r,o){return Tm(e.keys,n,i,r,o)}function vm(e,n,i,r,o){const a=jm(e,n,i,r,o);return ie(a)}function Rm(e){return e.allOf.every(n=>vn(n))}function Um(e){return e.anyOf.some(n=>vn(n))}function km(e){return!vn(e.not)}function vn(e){return e[y]==="Intersect"?Rm(e):e[y]==="Union"?Um(e):e[y]==="Not"?km(e):e[y]==="Undefined"}function Mm(e,n){return no(ti(e),n)}function Dm(e,n){const i=e.filter(r=>jn(r,n)===p.False);return i.length===1?i[0]:re(i)}function no(e,n,i={}){return It(e)?m(Mm(e,n),i):we(e)?m(zm(e,n),i):m(Z(e)?Dm(e.anyOf,n):jn(e,n)!==p.False?E():e,i)}function Bm(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=no(e[r],n);return i}function Em(e,n){return Bm(e.properties,n)}function zm(e,n){const i=Em(e,n);return ie(i)}function Km(e,n){return io(ti(e),n)}function _m(e,n){const i=e.filter(r=>jn(r,n)!==p.False);return i.length===1?i[0]:re(i)}function io(e,n,i){return It(e)?m(Km(e,n),i):we(e)?m(Gm(e,n),i):m(Z(e)?_m(e.anyOf,n):jn(e,n)!==p.False?e:E(),i)}function Hm(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=io(e[r],n);return i}function Wm(e,n){return Hm(e.properties,n)}function Gm(e,n){const i=Wm(e,n);return ie(i)}function qm(e,n){return Qt(e)?m(e.returns,n):E(n)}function gs(e){return dt(pt(e))}function Tt(e,n,i){return m({[y]:"Record",type:"object",patternProperties:{[e]:n}},i)}function ro(e,n,i){const r={};for(const o of e)r[o]=n;return Y(r,{...i,[ci]:"Record"})}function Vm(e,n,i){return gp(e)?ro(lt(e),n,i):Tt(e.pattern,n,i)}function Xm(e,n,i){return ro(lt(re(e)),n,i)}function Jm(e,n,i){return ro([e.toString()],n,i)}function Ym(e,n,i){return Tt(e.source,n,i)}function Zm(e,n,i){const r=K(e.pattern)?Wt:e.pattern;return Tt(r,n,i)}function Qm(e,n,i){return Tt(Wt,n,i)}function ef(e,n,i){return Tt(Gd,n,i)}function tf(e,n,i){return Y({true:n,false:n},i)}function nf(e,n,i){return Tt(Ht,n,i)}function rf(e,n,i){return Tt(Ht,n,i)}function hs(e,n,i={}){return Z(e)?Xm(e.anyOf,n,i):It(e)?Vm(e,n,i):Lt(e)?Jm(e.const,n,i):Fn(e)?tf(e,n,i):tn(e)?nf(e,n,i):nn(e)?rf(e,n,i):$a(e)?Ym(e,n,i):$n(e)?Zm(e,n,i):Ia(e)?Qm(e,n,i):Nn(e)?ef(e,n,i):E(i)}function oo(e){return globalThis.Object.getOwnPropertyNames(e.patternProperties)[0]}function of(e){const n=oo(e);return n===Wt?St():n===Ht?At():St({pattern:n})}function bs(e){return e.patternProperties[oo(e)]}function af(e,n){return n.parameters=Rn(e,n.parameters),n.returns=ke(e,n.returns),n}function sf(e,n){return n.parameters=Rn(e,n.parameters),n.returns=ke(e,n.returns),n}function cf(e,n){return n.allOf=Rn(e,n.allOf),n}function lf(e,n){return n.anyOf=Rn(e,n.anyOf),n}function df(e,n){return K(n.items)||(n.items=Rn(e,n.items)),n}function pf(e,n){return n.items=ke(e,n.items),n}function uf(e,n){return n.items=ke(e,n.items),n}function mf(e,n){return n.items=ke(e,n.items),n}function ff(e,n){return n.item=ke(e,n.item),n}function gf(e,n){const i=yf(e,n.properties);return{...n,...Y(i)}}function hf(e,n){const i=ke(e,of(n)),r=ke(e,bs(n)),o=hs(i,r);return{...n,...o}}function bf(e,n){return n.index in e?e[n.index]:Ii()}function Of(e,n){const i=jr(n),r=at(n),o=ke(e,n);return i&&r?gs(o):i&&!r?dt(o):!i&&r?pt(o):o}function yf(e,n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:Of(e,n[r])}),{})}function Rn(e,n){return n.map(i=>ke(e,i))}function ke(e,n){return Qt(n)?af(e,n):en(n)?sf(e,n):Fe(n)?cf(e,n):Z(n)?lf(e,n):Ft(n)?df(e,n):Yt(n)?pf(e,n):li(n)?uf(e,n):pi(n)?mf(e,n):ui(n)?ff(e,n):De(n)?gf(e,n):mi(n)?hf(e,n):Fa(n)?bf(e,n):n}function xf(e,n){return ke(n,Cr(e))}function Sf(e){return m({[y]:"Integer",type:"integer"},e)}function wf(e,n,i){return{[e]:sn(_(e),n,be(i))}}function Lf(e,n,i){return e.reduce((o,a)=>({...o,...wf(a,n,i)}),{})}function Pf(e,n,i){return Lf(e.keys,n,i)}function If(e,n,i){const r=Pf(e,n,i);return ie(r)}function Ff(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toLowerCase(),i].join("")}function Nf(e){const[n,i]=[e.slice(0,1),e.slice(1)];return[n.toUpperCase(),i].join("")}function $f(e){return e.toUpperCase()}function Cf(e){return e.toLowerCase()}function Af(e,n,i){const r=Vr(e.pattern);if(!yn(r))return{...e,pattern:Os(e.pattern,n)};const s=[...Si(r)].map(u=>_(u)),c=ys(s,n),l=re(c);return Va([l],i)}function Os(e,n){return typeof e=="string"?n==="Uncapitalize"?Ff(e):n==="Capitalize"?Nf(e):n==="Uppercase"?$f(e):n==="Lowercase"?Cf(e):e:e.toString()}function ys(e,n){return e.map(i=>sn(i,n))}function sn(e,n,i={}){return Pt(e)?If(e,n,i):It(e)?Af(e,n,i):Z(e)?re(ys(e.anyOf,n),i):Lt(e)?_(Os(e.const,n),i):m(e,i)}function Tf(e,n={}){return sn(e,"Capitalize",n)}function jf(e,n={}){return sn(e,"Lowercase",n)}function vf(e,n={}){return sn(e,"Uncapitalize",n)}function Rf(e,n={}){return sn(e,"Uppercase",n)}function Uf(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=$i(e[o],n,be(i));return r}function kf(e,n,i){return Uf(e.properties,n,i)}function Mf(e,n,i){const r=kf(e,n,i);return ie(r)}function Df(e,n){return e.map(i=>ao(i,n))}function Bf(e,n){return e.map(i=>ao(i,n))}function Ef(e,n){const{[n]:i,...r}=e;return r}function zf(e,n){return n.reduce((i,r)=>Ef(i,r),e)}function Kf(e,n){const i=ye(e,[Pe,"$id","required","properties"]),r=zf(e.properties,n);return Y(r,i)}function _f(e){const n=e.reduce((i,r)=>Na(r)?[...i,_(r)]:i,[]);return re(n)}function ao(e,n){return Fe(e)?ut(Df(e.allOf,n)):Z(e)?re(Bf(e.anyOf,n)):De(e)?Kf(e,n):Y({})}function $i(e,n,i){const r=ge(n)?_f(n):n,o=Xe(n)?lt(n):n,a=me(e),s=me(n);return we(e)?Mf(e,o,i):Pt(n)?qf(e,n,i):a&&s?q("Omit",[e,r],i):!a&&s?q("Omit",[e,r],i):a&&!s?q("Omit",[e,r],i):m({...ao(e,o),...i})}function Hf(e,n,i){return{[n]:$i(e,[n],be(i))}}function Wf(e,n,i){return n.reduce((r,o)=>({...r,...Hf(e,o,i)}),{})}function Gf(e,n,i){return Wf(e,n.keys,i)}function qf(e,n,i){const r=Gf(e,n,i);return ie(r)}function Vf(e,n,i){const r={};for(const o of globalThis.Object.getOwnPropertyNames(e))r[o]=Ci(e[o],n,be(i));return r}function Xf(e,n,i){return Vf(e.properties,n,i)}function Jf(e,n,i){const r=Xf(e,n,i);return ie(r)}function Yf(e,n){return e.map(i=>so(i,n))}function Zf(e,n){return e.map(i=>so(i,n))}function Qf(e,n){const i={};for(const r of n)r in e&&(i[r]=e[r]);return i}function eg(e,n){const i=ye(e,[Pe,"$id","required","properties"]),r=Qf(e.properties,n);return Y(r,i)}function tg(e){const n=e.reduce((i,r)=>Na(r)?[...i,_(r)]:i,[]);return re(n)}function so(e,n){return Fe(e)?ut(Yf(e.allOf,n)):Z(e)?re(Zf(e.anyOf,n)):De(e)?eg(e,n):Y({})}function Ci(e,n,i){const r=ge(n)?tg(n):n,o=Xe(n)?lt(n):n,a=me(e),s=me(n);return we(e)?Jf(e,o,i):Pt(n)?og(e,n,i):a&&s?q("Pick",[e,r],i):!a&&s?q("Pick",[e,r],i):a&&!s?q("Pick",[e,r],i):m({...so(e,o),...i})}function ng(e,n,i){return{[n]:Ci(e,[n],be(i))}}function ig(e,n,i){return n.reduce((r,o)=>({...r,...ng(e,o,i)}),{})}function rg(e,n,i){return ig(e,n.keys,i)}function og(e,n,i){const r=rg(e,n,i);return ie(r)}function ag(e,n){return q("Partial",[q(e,n)])}function sg(e){return q("Partial",[Tn(e)])}function cg(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=pt(e[i]);return n}function lg(e){const n=ye(e,[Pe,"$id","required","properties"]),i=cg(e.properties);return Y(i,n)}function Eo(e){return e.map(n=>xs(n))}function xs(e){return Zt(e)?ag(e.target,e.parameters):me(e)?sg(e.$ref):Fe(e)?ut(Eo(e.allOf)):Z(e)?re(Eo(e.anyOf)):De(e)?lg(e):di(e)||Fn(e)||tn(e)||Lt(e)||vr(e)||nn(e)||$n(e)||Rr(e)||Ur(e)?e:Y({})}function co(e,n){return we(e)?ug(e,n):m({...xs(e),...n})}function dg(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=co(e[r],be(n));return i}function pg(e,n){return dg(e.properties,n)}function ug(e,n){const i=pg(e,n);return ie(i)}function mg(e,n){return q("Required",[q(e,n)])}function fg(e){return q("Required",[Tn(e)])}function gg(e){const n={};for(const i of globalThis.Object.getOwnPropertyNames(e))n[i]=ye(e[i],[Ze]);return n}function hg(e){const n=ye(e,[Pe,"$id","required","properties"]),i=gg(e.properties);return Y(i,n)}function zo(e){return e.map(n=>Ss(n))}function Ss(e){return Zt(e)?mg(e.target,e.parameters):me(e)?fg(e.$ref):Fe(e)?ut(zo(e.allOf)):Z(e)?re(zo(e.anyOf)):De(e)?hg(e):di(e)||Fn(e)||tn(e)||Lt(e)||vr(e)||nn(e)||$n(e)||Rr(e)||Ur(e)?e:Y({})}function lo(e,n){return we(e)?yg(e,n):m({...Ss(e),...n})}function bg(e,n){const i={};for(const r of globalThis.Object.getOwnPropertyNames(e))i[r]=lo(e[r],n);return i}function Og(e,n){return bg(e.properties,n)}function yg(e,n){const i=Og(e,n);return ie(i)}function xg(e,n){return n.map(i=>me(i)?po(e,i.$ref):xe(e,i))}function po(e,n){return n in e?me(e[n])?po(e,e[n].$ref):xe(e,e[n]):E()}function Sg(e){return Li(e[0])}function wg(e){return wi(e[0],e[1])}function Lg(e){return Yr(e[0])}function Pg(e){return co(e[0])}function Ig(e){return $i(e[0],e[1])}function Fg(e){return Ci(e[0],e[1])}function Ng(e){return lo(e[0])}function $g(e,n,i){const r=xg(e,i);return n==="Awaited"?Sg(r):n==="Index"?wg(r):n==="KeyOf"?Lg(r):n==="Partial"?Pg(r):n==="Omit"?Ig(r):n==="Pick"?Fg(r):n==="Required"?Ng(r):E()}function Cg(e,n){return Hr(xe(e,n))}function Ag(e,n){return Wr(xe(e,n))}function Tg(e,n,i){return Gr(Un(e,n),xe(e,i))}function jg(e,n,i){return An(Un(e,n),xe(e,i))}function vg(e,n){return ut(Un(e,n))}function Rg(e,n){return Jr(xe(e,n))}function Ug(e,n){return Y(globalThis.Object.keys(n).reduce((i,r)=>({...i,[r]:xe(e,n[r])}),{}))}function kg(e,n){const[i,r]=[xe(e,bs(n)),oo(n)],o=Cr(n);return o.patternProperties[r]=i,o}function Mg(e,n){return me(n)?{...po(e,n.$ref),[Pe]:n[Pe]}:n}function Dg(e,n){return on(Un(e,n))}function Bg(e,n){return re(Un(e,n))}function Un(e,n){return n.map(i=>xe(e,i))}function xe(e,n){return at(n)?m(xe(e,ye(n,[Ze])),n):jr(n)?m(xe(e,ye(n,[In])),n):fi(n)?m(Mg(e,n),n):Yt(n)?m(Cg(e,n.items),n):li(n)?m(Ag(e,n.items),n):Zt(n)?m($g(e,n.target,n.parameters)):Qt(n)?m(Tg(e,n.parameters,n.returns),n):en(n)?m(jg(e,n.parameters,n.returns),n):Fe(n)?m(vg(e,n.allOf),n):pi(n)?m(Rg(e,n.items),n):De(n)?m(Ug(e,n.properties),n):mi(n)?m(kg(e,n)):Ft(n)?m(Dg(e,n.items||[]),n):Z(n)?m(Bg(e,n.anyOf),n):n}function Eg(e,n){return n in e?xe(e,e[n]):E()}function zg(e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:Eg(e,i)}),{})}class Kg{constructor(n){const i=zg(n),r=this.WithIdentifiers(i);this.$defs=r}Import(n,i){const r={...this.$defs,[n]:m(this.$defs[n],i)};return m({[y]:"Import",$defs:r,$ref:n})}WithIdentifiers(n){return globalThis.Object.getOwnPropertyNames(n).reduce((i,r)=>({...i,[r]:{...n[r],$id:r}}),{})}}function _g(e){return new Kg(e)}function Hg(e,n){return m({[y]:"Not",not:e},n)}function Wg(e,n){return en(e)?on(e.parameters,n):E()}let Gg=0;function qg(e,n={}){K(n.$id)&&(n.$id=`T${Gg++}`);const i=Cr(e({[y]:"This",$ref:`${n.$id}`}));return i.$id=n.$id,m({[ci]:"Recursive",...i},n)}function Vg(e,n){const i=z(e)?new globalThis.RegExp(e):e;return m({[y]:"RegExp",type:"RegExp",source:i.source,flags:i.flags},n)}function Xg(e){return Fe(e)?e.allOf:Z(e)?e.anyOf:Ft(e)?e.items??[]:[]}function Jg(e){return Xg(e)}function Yg(e,n){return en(e)?m(e.returns,n):E(n)}class Zg{constructor(n){this.schema=n}Decode(n){return new Qg(this.schema,n)}}class Qg{constructor(n,i){this.schema=n,this.decode=i}EncodeTransform(n,i){const a={Encode:s=>i[Pe].Encode(n(s)),Decode:s=>this.decode(i[Pe].Decode(s))};return{...i,[Pe]:a}}EncodeSchema(n,i){const r={Decode:this.decode,Encode:n};return{...i,[Pe]:r}}Encode(n){return fi(this.schema)?this.EncodeTransform(n,this.schema):this.EncodeSchema(n,this.schema)}}function eh(e){return new Zg(e)}function th(e={}){return m({[y]:e[y]??"Unsafe"},e)}function nh(e){return m({[y]:"Void",type:"void"},e)}const ih=Object.freeze(Object.defineProperty({__proto__:null,Any:bn,Argument:Qd,Array:Hr,AsyncIterator:Wr,Awaited:Li,BigInt:Xr,Boolean:Ga,Capitalize:Tf,Composite:Ru,Const:Mu,Constructor:Gr,ConstructorParameters:Du,Date:is,Enum:Bu,Exclude:no,Extends:to,Extract:io,Function:An,Index:wi,InstanceType:qm,Instantiate:xf,Integer:Sf,Intersect:ut,Iterator:Jr,KeyOf:Yr,Literal:_,Lowercase:jf,Mapped:nu,Module:_g,Never:E,Not:Hg,Null:rs,Number:At,Object:Y,Omit:$i,Optional:pt,Parameters:Wg,Partial:co,Pick:Ci,Promise:Za,Readonly:dt,ReadonlyOptional:gs,Record:hs,Recursive:qg,Ref:Tn,RegExp:Vg,Required:lo,Rest:Jg,ReturnType:Yg,String:St,Symbol:os,TemplateLiteral:Va,Transform:eh,Tuple:on,Uint8Array:ss,Uncapitalize:vf,Undefined:as,Union:re,Unknown:Ii,Unsafe:th,Uppercase:Rf,Void:nh},Symbol.toStringTag,{value:"Module"})),t=ih;var rh=["Arial","Calibri","Cambria","Consolas","Courier New","Georgia","Segoe UI","Tahoma","Times New Roman","Trebuchet MS","Verdana","Helvetica","Helvetica Neue","Menlo","Monaco"];function OS(e){const n=e.toLowerCase();return rh.some(i=>i.toLowerCase()===n)}var xn=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"]}),kn=t.Number({minimum:100,maximum:900,description:"OpenType weight (100 thin ... 900 black). Default 400."}),Ai=t.Boolean({description:"Whether this source is italic. Default false."}),oh=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"}),ah=t.Object({kind:t.Literal("google"),family:t.String({description:'Exact Google Fonts family name (e.g. "Inter").'}),weights:t.Optional(t.Array(kn,{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"}),sh=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(kn),italic:t.Optional(Ai)},{additionalProperties:!1,description:"Local font file to embed"}),ch=t.Object({kind:t.Literal("url"),url:t.String({description:"HTTPS URL of a TTF or OTF file."}),weight:t.Optional(kn),italic:t.Optional(Ai)},{additionalProperties:!1,description:"Direct TTF/OTF URL (non-Google CDN)"}),lh=t.Object({kind:t.Literal("variable"),url:t.String({description:"HTTPS URL of a variable TTF (`fvar` axis table required)."}),weight:kn,italic:t.Optional(Ai),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."}),dh=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(kn),italic:t.Optional(Ai)},{additionalProperties:!1,description:"Inline base64 font — portable"}),ph=t.Union([oh,ah,sh,dh,ch,lh],{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.'}),uh=t.Union([t.Literal("sans"),t.Literal("serif"),t.Literal("mono"),t.Literal("display"),t.Literal("handwriting")],{description:"Broad category used for fallback selection"}),mh=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(uh),sources:t.Array(ph,{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.*."}),Ti=t.Array(mh,{description:"Document-scoped font registry. Every non-safe font used in this document must be registered here."}),fh=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),gh=["primary","secondary","accent","background","text","text2","background2","accent4","accent5","accent6"],hh=["accent1","accent2","accent3","tx1","tx2","bg1","bg2"],ji=t.Union([fh,...gh.map(e=>t.Literal(e)),...hh.map(e=>t.Literal(e))],{description:"Hex color or semantic theme color name"}),ws=["title","subtitle","heading1","heading2","heading3","body","caption"],Ls=t.Union(ws.map(e=>t.Literal(e)),{description:"Predefined style name"}),vi=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Horizontal alignment options"}),Ri=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical alignment options"}),uo=t.Object({type:t.Optional(t.Union([t.Literal("outer"),t.Literal("inner")],{description:"Shadow type"})),color:t.Optional(ji),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}),jt=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"}),bh=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}),Ui=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(bh,{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"})])),fontSize:t.Optional(t.Number({minimum:1,description:"Font size in points"})),fontFace:t.Optional(xn),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(vi),valign:t.Optional(Ri),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(uo),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(jt),style:t.Optional(Ls)},{description:"Text component props",additionalProperties:!1}),ki=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(uo),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(jt)},{description:"PPTX image component props",additionalProperties:!1}),Ps=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"}),Oh=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}),yh=["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"],xh=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"}),Is=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(xh,{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"}),Sh=t.Object({preset:t.Union(yh.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"}),Mi=t.Object({type:Ps,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(Is),pattern:t.Optional(Sh)},{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(Oh,{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(vi),valign:t.Optional(Ri),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(uo),rectRadius:t.Optional(t.Number({minimum:0,description:"Corner radius for roundRect shape in inches"})),grid:t.Optional(jt),style:t.Optional(Ls)},{description:"Shape component props",additionalProperties:!1}),wh=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(vi),valign:t.Optional(Ri),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})]),Di=t.Object({rows:t.Array(t.Array(wh,{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(vi),valign:t.Optional(Ri),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(jt)},{description:"PPTX table component props",additionalProperties:!1}),Bi=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(jt)},{description:"PPTX Highcharts component props",additionalProperties:!1}),_n=(e,n)=>t.Union([t.Number({description:e}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:n})]),Lh=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"}),Ph=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}),Ko=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"}),Ei=t.Object({type:Lh,data:t.Array(Ph,{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(Ko),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(Ko),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(_n("X position in inches","X as percentage")),y:t.Optional(_n("Y position in inches","Y as percentage")),w:t.Optional(_n("Width in inches","Width as percentage")),h:t.Optional(_n("Height in inches","Height as percentage")),grid:t.Optional(jt)},{description:"Native PowerPoint chart component props",additionalProperties:!1});function Fs(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 nt=[{name:"text",propsSchema:Ui,hasChildren:!1,category:"content",propsRequired:!0,description:"Text element - displays text with formatting, positioning and styling options."},{name:"image",propsSchema:ki,hasChildren:!1,category:"content",propsRequired:!0,description:"Image element - displays images from file path, URL, or base64 data."},{name:"shape",propsSchema:Mi,hasChildren:!1,category:"content",description:"Shape element - draws geometric shapes with optional text, fill, and line styling."},{name:"table",propsSchema:Di,hasChildren:!1,category:"content",description:"Table element - displays tabular data with rows and columns."},{name:"highcharts",propsSchema:Bi,hasChildren:!1,category:"content",description:"Highcharts element - renders charts via Highcharts Export Server."},{name:"chart",propsSchema:Ei,hasChildren:!1,category:"content",description:"Native PowerPoint chart - editable, scalable, no external server needed."}];function Mt(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:Fs(e)?e.propsSchema:t.Optional(e.propsSchema)},{additionalProperties:!1,description:e.description})}var Ih=t.Union([Mt(nt[0]),Mt(nt[1]),Mt(nt[2]),Mt(nt[3]),Mt(nt[4]),Mt(nt[5])],{$id:"PptxSlideContent",discriminator:{propertyName:"name"},description:"A single PPTX slide content element (text, image, shape, table, highcharts, or chart)."}),Fh=t.Partial(Ui),Nh=t.Partial(ki),$h=t.Partial(Mi),Ch=t.Partial(Di),Ah=t.Partial(Bi),Th=t.Partial(Ei),Ns=t.Object({text:t.Optional(Fh),image:t.Optional(Nh),shape:t.Optional($h),table:t.Optional(Ch),highcharts:t.Optional(Ah),chart:t.Optional(Th)},{additionalProperties:!0}),Be={};function jh(){return typeof process>"u"||!Be?!1:!!(Be.CI||Be.GITHUB_ACTIONS||Be.GITLAB_CI)}function vh(){var e;return typeof process>"u"||Be!=null&&Be.NO_COLOR?!1:Be!=null&&Be.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!jh()}vh();var Rh=/^(\d+)\.(\d+)\.(\d+)$/;function _o(e){const n=e.match(Rh);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 Uh(e,n){const i=_o(e),r=_o(n);return i.major-r.major||i.minor-r.minor||i.patch-r.patch}function $s(e){if(e.length===0)throw new Error("Cannot determine latest version from empty array");return e.reduce((n,i)=>Uh(i,n)>0?i:n)}function kh(e){switch(e.errorType){case d.ArrayContains:return"Expected array to contain at least one matching value";case d.ArrayMaxContains:return`Expected array to contain no more than ${e.schema.maxContains} matching values`;case d.ArrayMinContains:return`Expected array to contain at least ${e.schema.minContains} matching values`;case d.ArrayMaxItems:return`Expected array length to be less or equal to ${e.schema.maxItems}`;case d.ArrayMinItems:return`Expected array length to be greater or equal to ${e.schema.minItems}`;case d.ArrayUniqueItems:return"Expected array elements to be unique";case d.Array:return"Expected array";case d.AsyncIterator:return"Expected AsyncIterator";case d.BigIntExclusiveMaximum:return`Expected bigint to be less than ${e.schema.exclusiveMaximum}`;case d.BigIntExclusiveMinimum:return`Expected bigint to be greater than ${e.schema.exclusiveMinimum}`;case d.BigIntMaximum:return`Expected bigint to be less or equal to ${e.schema.maximum}`;case d.BigIntMinimum:return`Expected bigint to be greater or equal to ${e.schema.minimum}`;case d.BigIntMultipleOf:return`Expected bigint to be a multiple of ${e.schema.multipleOf}`;case d.BigInt:return"Expected bigint";case d.Boolean:return"Expected boolean";case d.DateExclusiveMinimumTimestamp:return`Expected Date timestamp to be greater than ${e.schema.exclusiveMinimumTimestamp}`;case d.DateExclusiveMaximumTimestamp:return`Expected Date timestamp to be less than ${e.schema.exclusiveMaximumTimestamp}`;case d.DateMinimumTimestamp:return`Expected Date timestamp to be greater or equal to ${e.schema.minimumTimestamp}`;case d.DateMaximumTimestamp:return`Expected Date timestamp to be less or equal to ${e.schema.maximumTimestamp}`;case d.DateMultipleOfTimestamp:return`Expected Date timestamp to be a multiple of ${e.schema.multipleOfTimestamp}`;case d.Date:return"Expected Date";case d.Function:return"Expected function";case d.IntegerExclusiveMaximum:return`Expected integer to be less than ${e.schema.exclusiveMaximum}`;case d.IntegerExclusiveMinimum:return`Expected integer to be greater than ${e.schema.exclusiveMinimum}`;case d.IntegerMaximum:return`Expected integer to be less or equal to ${e.schema.maximum}`;case d.IntegerMinimum:return`Expected integer to be greater or equal to ${e.schema.minimum}`;case d.IntegerMultipleOf:return`Expected integer to be a multiple of ${e.schema.multipleOf}`;case d.Integer:return"Expected integer";case d.IntersectUnevaluatedProperties:return"Unexpected property";case d.Intersect:return"Expected all values to match";case d.Iterator:return"Expected Iterator";case d.Literal:return`Expected ${typeof e.schema.const=="string"?`'${e.schema.const}'`:e.schema.const}`;case d.Never:return"Never";case d.Not:return"Value should not match";case d.Null:return"Expected null";case d.NumberExclusiveMaximum:return`Expected number to be less than ${e.schema.exclusiveMaximum}`;case d.NumberExclusiveMinimum:return`Expected number to be greater than ${e.schema.exclusiveMinimum}`;case d.NumberMaximum:return`Expected number to be less or equal to ${e.schema.maximum}`;case d.NumberMinimum:return`Expected number to be greater or equal to ${e.schema.minimum}`;case d.NumberMultipleOf:return`Expected number to be a multiple of ${e.schema.multipleOf}`;case d.Number:return"Expected number";case d.Object:return"Expected object";case d.ObjectAdditionalProperties:return"Unexpected property";case d.ObjectMaxProperties:return`Expected object to have no more than ${e.schema.maxProperties} properties`;case d.ObjectMinProperties:return`Expected object to have at least ${e.schema.minProperties} properties`;case d.ObjectRequiredProperty:return"Expected required property";case d.Promise:return"Expected Promise";case d.RegExp:return"Expected string to match regular expression";case d.StringFormatUnknown:return`Unknown format '${e.schema.format}'`;case d.StringFormat:return`Expected string to match '${e.schema.format}' format`;case d.StringMaxLength:return`Expected string length less or equal to ${e.schema.maxLength}`;case d.StringMinLength:return`Expected string length greater or equal to ${e.schema.minLength}`;case d.StringPattern:return`Expected string to match '${e.schema.pattern}'`;case d.String:return"Expected string";case d.Symbol:return"Expected symbol";case d.TupleLength:return`Expected tuple to have ${e.schema.maxItems||0} elements`;case d.Tuple:return"Expected tuple";case d.Uint8ArrayMaxByteLength:return`Expected byte length less or equal to ${e.schema.maxByteLength}`;case d.Uint8ArrayMinByteLength:return`Expected byte length greater or equal to ${e.schema.minByteLength}`;case d.Uint8Array:return"Expected Uint8Array";case d.Undefined:return"Expected undefined";case d.Union:return"Expected union value";case d.Void:return"Expected void";case d.Kind:return`Expected kind '${e.schema[y]}'`;default:return"Unknown error type"}}let Mh=kh;function Dh(){return Mh}class Bh extends Me{constructor(n){super(`Unable to dereference schema with $id '${n.$ref}'`),this.schema=n}}function Eh(e,n){const i=n.find(r=>r.$id===e.$ref);if(i===void 0)throw new Bh(e);return vt(i,n)}function Cs(e,n){return!Ee(e.$id)||n.some(i=>i.$id===e.$id)||n.push(e),n}function vt(e,n){return e[y]==="This"||e[y]==="Ref"?Eh(e,n):e}class zh extends Me{constructor(n){super("Unable to hash value"),this.value=n}}var Se;(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"})(Se||(Se={}));let zt=BigInt("14695981039346656037");const[Kh,_h]=[BigInt("1099511628211"),BigInt("18446744073709551616")],Hh=Array.from({length:256}).map((e,n)=>BigInt(n)),As=new Float64Array(1),Ts=new DataView(As.buffer),js=new Uint8Array(As.buffer);function*Wh(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 Gh(e){ae(Se.Array);for(const n of e)qt(n)}function qh(e){ae(Se.Boolean),ae(e?1:0)}function Vh(e){ae(Se.BigInt),Ts.setBigInt64(0,e);for(const n of js)ae(n)}function Xh(e){ae(Se.Date),qt(e.getTime())}function Jh(e){ae(Se.Null)}function Yh(e){ae(Se.Number),Ts.setFloat64(0,e);for(const n of js)ae(n)}function Zh(e){ae(Se.Object);for(const n of globalThis.Object.getOwnPropertyNames(e).sort())qt(n),qt(e[n])}function Qh(e){ae(Se.String);for(let n=0;n<e.length;n++)for(const i of Wh(e.charCodeAt(n)))ae(i)}function eb(e){ae(Se.Symbol),qt(e.description)}function tb(e){ae(Se.Uint8Array);for(let n=0;n<e.length;n++)ae(e[n])}function nb(e){return ae(Se.Undefined)}function qt(e){if(_e(e))return Gh(e);if(oi(e))return qh(e);if(ai(e))return Vh(e);if(Pn(e))return Xh(e);if(ri(e))return Jh();if(qe(e))return Yh(e);if(Ke(e))return Zh(e);if(Ee(e))return Qh(e);if(si(e))return eb(e);if(Ar(e))return tb(e);if(ot(e))return nb();throw new zh(e)}function ae(e){zt=zt^Hh[e],zt=zt*Kh%_h}function vs(e){return zt=BigInt("14695981039346656037"),qt(e),zt}class ib extends Me{constructor(n){super("Unknown type"),this.schema=n}}function rb(e){return e[y]==="Any"||e[y]==="Unknown"}function C(e){return e!==void 0}function ob(e,n,i){return!0}function ab(e,n,i){return!0}function sb(e,n,i){if(!_e(i)||C(e.minItems)&&!(i.length>=e.minItems)||C(e.maxItems)&&!(i.length<=e.maxItems)||!i.every(a=>X(e.items,n,a))||e.uniqueItems===!0&&!function(){const a=new Set;for(const s of i){const c=vs(s);if(a.has(c))return!1;a.add(c)}return!0}())return!1;if(!(C(e.contains)||qe(e.minContains)||qe(e.maxContains)))return!0;const r=C(e.contains)?e.contains:E(),o=i.reduce((a,s)=>X(r,n,s)?a+1:a,0);return!(o===0||qe(e.minContains)&&o<e.minContains||qe(e.maxContains)&&o>e.maxContains)}function cb(e,n,i){return Sa(i)}function lb(e,n,i){return!(!ai(i)||C(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||C(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||C(e.maximum)&&!(i<=e.maximum)||C(e.minimum)&&!(i>=e.minimum)||C(e.multipleOf)&&i%e.multipleOf!==BigInt(0))}function db(e,n,i){return oi(i)}function pb(e,n,i){return X(e.returns,n,i.prototype)}function ub(e,n,i){return!(!Pn(i)||C(e.exclusiveMaximumTimestamp)&&!(i.getTime()<e.exclusiveMaximumTimestamp)||C(e.exclusiveMinimumTimestamp)&&!(i.getTime()>e.exclusiveMinimumTimestamp)||C(e.maximumTimestamp)&&!(i.getTime()<=e.maximumTimestamp)||C(e.minimumTimestamp)&&!(i.getTime()>=e.minimumTimestamp)||C(e.multipleOfTimestamp)&&i.getTime()%e.multipleOfTimestamp!==0)}function mb(e,n,i){return Tr(i)}function fb(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return X(o,[...n,...r],i)}function gb(e,n,i){return!(!Pa(i)||C(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||C(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||C(e.maximum)&&!(i<=e.maximum)||C(e.minimum)&&!(i>=e.minimum)||C(e.multipleOf)&&i%e.multipleOf!==0)}function hb(e,n,i){const r=e.allOf.every(o=>X(o,n,i));if(e.unevaluatedProperties===!1){const o=new RegExp(ni(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s));return r&&a}else if(Xe(e.unevaluatedProperties)){const o=new RegExp(ni(e)),a=Object.getOwnPropertyNames(i).every(s=>o.test(s)||X(e.unevaluatedProperties,n,i[s]));return r&&a}else return r}function bb(e,n,i){return wa(i)}function Ob(e,n,i){return i===e.const}function yb(e,n,i){return!1}function xb(e,n,i){return!X(e.not,n,i)}function Sb(e,n,i){return ri(i)}function wb(e,n,i){return!(!Oe.IsNumberLike(i)||C(e.exclusiveMaximum)&&!(i<e.exclusiveMaximum)||C(e.exclusiveMinimum)&&!(i>e.exclusiveMinimum)||C(e.minimum)&&!(i>=e.minimum)||C(e.maximum)&&!(i<=e.maximum)||C(e.multipleOf)&&i%e.multipleOf!==0)}function Lb(e,n,i){if(!Oe.IsObjectLike(i)||C(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||C(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(!X(a,n,i[o])||(vn(a)||rb(a))&&!(o in i))return!1}else if(Oe.IsExactOptionalProperty(i,o)&&!X(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)||X(e.additionalProperties,n,i[a])):!0}function Pb(e,n,i){return La(i)}function Ib(e,n,i){if(!Oe.IsRecordLike(i)||C(e.minProperties)&&!(Object.getOwnPropertyNames(i).length>=e.minProperties)||C(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(([u,x])=>a.test(u)?X(o,n,x):!0),c=typeof e.additionalProperties=="object"?Object.entries(i).every(([u,x])=>a.test(u)?!0:X(e.additionalProperties,n,x)):!0,l=e.additionalProperties===!1?Object.getOwnPropertyNames(i).every(u=>a.test(u)):!0;return s&&c&&l}function Fb(e,n,i){return X(vt(e,n),n,i)}function Nb(e,n,i){const r=new RegExp(e.source,e.flags);return C(e.minLength)&&!(i.length>=e.minLength)||C(e.maxLength)&&!(i.length<=e.maxLength)?!1:r.test(i)}function $b(e,n,i){return!Ee(i)||C(e.minLength)&&!(i.length>=e.minLength)||C(e.maxLength)&&!(i.length<=e.maxLength)||C(e.pattern)&&!new RegExp(e.pattern).test(i)?!1:C(e.format)?Da(e.format)?Ea(e.format)(i):!1:!0}function Cb(e,n,i){return si(i)}function Ab(e,n,i){return Ee(i)&&new RegExp(e.pattern).test(i)}function Tb(e,n,i){return X(vt(e,n),n,i)}function jb(e,n,i){if(!_e(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(!X(e.items[r],n,i[r]))return!1;return!0}function vb(e,n,i){return ot(i)}function Rb(e,n,i){return e.anyOf.some(r=>X(r,n,i))}function Ub(e,n,i){return!(!Ar(i)||C(e.maxByteLength)&&!(i.length<=e.maxByteLength)||C(e.minByteLength)&&!(i.length>=e.minByteLength))}function kb(e,n,i){return!0}function Mb(e,n,i){return Oe.IsVoidLike(i)}function Db(e,n,i){return _r(e[y])?Ka(e[y])(e,i):!1}function X(e,n,i){const r=C(e.$id)?Cs(e,n):n,o=e;switch(o[y]){case"Any":return ob();case"Argument":return ab();case"Array":return sb(o,r,i);case"AsyncIterator":return cb(o,r,i);case"BigInt":return lb(o,r,i);case"Boolean":return db(o,r,i);case"Constructor":return pb(o,r,i);case"Date":return ub(o,r,i);case"Function":return mb(o,r,i);case"Import":return fb(o,r,i);case"Integer":return gb(o,r,i);case"Intersect":return hb(o,r,i);case"Iterator":return bb(o,r,i);case"Literal":return Ob(o,r,i);case"Never":return yb();case"Not":return xb(o,r,i);case"Null":return Sb(o,r,i);case"Number":return wb(o,r,i);case"Object":return Lb(o,r,i);case"Promise":return Pb(o,r,i);case"Record":return Ib(o,r,i);case"Ref":return Fb(o,r,i);case"RegExp":return Nb(o,r,i);case"String":return $b(o,r,i);case"Symbol":return Cb(o,r,i);case"TemplateLiteral":return Ab(o,r,i);case"This":return Tb(o,r,i);case"Tuple":return jb(o,r,i);case"Undefined":return vb(o,r,i);case"Union":return Rb(o,r,i);case"Uint8Array":return Ub(o,r,i);case"Unknown":return kb();case"Void":return Mb(o,r,i);default:if(!_r(o[y]))throw new ib(o);return Db(o,r,i)}}function mo(...e){return e.length===3?X(e[0],e[1],e[2]):X(e[0],[],e[1])}var d;(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"})(d||(d={}));class Bb extends Me{constructor(n){super("Unknown type"),this.schema=n}}function Ge(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function $(e){return e!==void 0}class Rs{constructor(n){this.iterator=n}[Symbol.iterator](){return this.iterator}First(){const n=this.iterator.next();return n.done?void 0:n.value}}function g(e,n,i,r,o=[]){return{type:e,schema:n,path:i,value:r,message:Dh()({errorType:e,path:i,schema:n,value:r,errors:o}),errors:o}}function*Eb(e,n,i,r){}function*zb(e,n,i,r){}function*Kb(e,n,i,r){if(!_e(r))return yield g(d.Array,e,i,r);$(e.minItems)&&!(r.length>=e.minItems)&&(yield g(d.ArrayMinItems,e,i,r)),$(e.maxItems)&&!(r.length<=e.maxItems)&&(yield g(d.ArrayMaxItems,e,i,r));for(let s=0;s<r.length;s++)yield*J(e.items,n,`${i}/${s}`,r[s]);if(e.uniqueItems===!0&&!function(){const s=new Set;for(const c of r){const l=vs(c);if(s.has(l))return!1;s.add(l)}return!0}()&&(yield g(d.ArrayUniqueItems,e,i,r)),!($(e.contains)||$(e.minContains)||$(e.maxContains)))return;const o=$(e.contains)?e.contains:E(),a=r.reduce((s,c,l)=>J(o,n,`${i}${l}`,c).next().done===!0?s+1:s,0);a===0&&(yield g(d.ArrayContains,e,i,r)),qe(e.minContains)&&a<e.minContains&&(yield g(d.ArrayMinContains,e,i,r)),qe(e.maxContains)&&a>e.maxContains&&(yield g(d.ArrayMaxContains,e,i,r))}function*_b(e,n,i,r){Sa(r)||(yield g(d.AsyncIterator,e,i,r))}function*Hb(e,n,i,r){if(!ai(r))return yield g(d.BigInt,e,i,r);$(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield g(d.BigIntExclusiveMaximum,e,i,r)),$(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield g(d.BigIntExclusiveMinimum,e,i,r)),$(e.maximum)&&!(r<=e.maximum)&&(yield g(d.BigIntMaximum,e,i,r)),$(e.minimum)&&!(r>=e.minimum)&&(yield g(d.BigIntMinimum,e,i,r)),$(e.multipleOf)&&r%e.multipleOf!==BigInt(0)&&(yield g(d.BigIntMultipleOf,e,i,r))}function*Wb(e,n,i,r){oi(r)||(yield g(d.Boolean,e,i,r))}function*Gb(e,n,i,r){yield*J(e.returns,n,i,r.prototype)}function*qb(e,n,i,r){if(!Pn(r))return yield g(d.Date,e,i,r);$(e.exclusiveMaximumTimestamp)&&!(r.getTime()<e.exclusiveMaximumTimestamp)&&(yield g(d.DateExclusiveMaximumTimestamp,e,i,r)),$(e.exclusiveMinimumTimestamp)&&!(r.getTime()>e.exclusiveMinimumTimestamp)&&(yield g(d.DateExclusiveMinimumTimestamp,e,i,r)),$(e.maximumTimestamp)&&!(r.getTime()<=e.maximumTimestamp)&&(yield g(d.DateMaximumTimestamp,e,i,r)),$(e.minimumTimestamp)&&!(r.getTime()>=e.minimumTimestamp)&&(yield g(d.DateMinimumTimestamp,e,i,r)),$(e.multipleOfTimestamp)&&r.getTime()%e.multipleOfTimestamp!==0&&(yield g(d.DateMultipleOfTimestamp,e,i,r))}function*Vb(e,n,i,r){Tr(r)||(yield g(d.Function,e,i,r))}function*Xb(e,n,i,r){const o=globalThis.Object.values(e.$defs),a=e.$defs[e.$ref];yield*J(a,[...n,...o],i,r)}function*Jb(e,n,i,r){if(!Pa(r))return yield g(d.Integer,e,i,r);$(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield g(d.IntegerExclusiveMaximum,e,i,r)),$(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield g(d.IntegerExclusiveMinimum,e,i,r)),$(e.maximum)&&!(r<=e.maximum)&&(yield g(d.IntegerMaximum,e,i,r)),$(e.minimum)&&!(r>=e.minimum)&&(yield g(d.IntegerMinimum,e,i,r)),$(e.multipleOf)&&r%e.multipleOf!==0&&(yield g(d.IntegerMultipleOf,e,i,r))}function*Yb(e,n,i,r){let o=!1;for(const a of e.allOf)for(const s of J(a,n,i,r))o=!0,yield s;if(o)return yield g(d.Intersect,e,i,r);if(e.unevaluatedProperties===!1){const a=new RegExp(ni(e));for(const s of Object.getOwnPropertyNames(r))a.test(s)||(yield g(d.IntersectUnevaluatedProperties,e,`${i}/${s}`,r))}if(typeof e.unevaluatedProperties=="object"){const a=new RegExp(ni(e));for(const s of Object.getOwnPropertyNames(r))if(!a.test(s)){const c=J(e.unevaluatedProperties,n,`${i}/${s}`,r[s]).next();c.done||(yield c.value)}}}function*Zb(e,n,i,r){wa(r)||(yield g(d.Iterator,e,i,r))}function*Qb(e,n,i,r){r!==e.const&&(yield g(d.Literal,e,i,r))}function*eO(e,n,i,r){yield g(d.Never,e,i,r)}function*tO(e,n,i,r){J(e.not,n,i,r).next().done===!0&&(yield g(d.Not,e,i,r))}function*nO(e,n,i,r){ri(r)||(yield g(d.Null,e,i,r))}function*iO(e,n,i,r){if(!Oe.IsNumberLike(r))return yield g(d.Number,e,i,r);$(e.exclusiveMaximum)&&!(r<e.exclusiveMaximum)&&(yield g(d.NumberExclusiveMaximum,e,i,r)),$(e.exclusiveMinimum)&&!(r>e.exclusiveMinimum)&&(yield g(d.NumberExclusiveMinimum,e,i,r)),$(e.maximum)&&!(r<=e.maximum)&&(yield g(d.NumberMaximum,e,i,r)),$(e.minimum)&&!(r>=e.minimum)&&(yield g(d.NumberMinimum,e,i,r)),$(e.multipleOf)&&r%e.multipleOf!==0&&(yield g(d.NumberMultipleOf,e,i,r))}function*rO(e,n,i,r){if(!Oe.IsObjectLike(r))return yield g(d.Object,e,i,r);$(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield g(d.ObjectMinProperties,e,i,r)),$(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield g(d.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 g(d.ObjectRequiredProperty,e.properties[c],`${i}/${Ge(c)}`,void 0));if(e.additionalProperties===!1)for(const c of s)a.includes(c)||(yield g(d.ObjectAdditionalProperties,e,`${i}/${Ge(c)}`,r[c]));if(typeof e.additionalProperties=="object")for(const c of s)a.includes(c)||(yield*J(e.additionalProperties,n,`${i}/${Ge(c)}`,r[c]));for(const c of a){const l=e.properties[c];e.required&&e.required.includes(c)?(yield*J(l,n,`${i}/${Ge(c)}`,r[c]),vn(e)&&!(c in r)&&(yield g(d.ObjectRequiredProperty,l,`${i}/${Ge(c)}`,void 0))):Oe.IsExactOptionalProperty(r,c)&&(yield*J(l,n,`${i}/${Ge(c)}`,r[c]))}}function*oO(e,n,i,r){La(r)||(yield g(d.Promise,e,i,r))}function*aO(e,n,i,r){if(!Oe.IsRecordLike(r))return yield g(d.Object,e,i,r);$(e.minProperties)&&!(Object.getOwnPropertyNames(r).length>=e.minProperties)&&(yield g(d.ObjectMinProperties,e,i,r)),$(e.maxProperties)&&!(Object.getOwnPropertyNames(r).length<=e.maxProperties)&&(yield g(d.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*J(a,n,`${i}/${Ge(c)}`,l));if(typeof e.additionalProperties=="object")for(const[c,l]of Object.entries(r))s.test(c)||(yield*J(e.additionalProperties,n,`${i}/${Ge(c)}`,l));if(e.additionalProperties===!1){for(const[c,l]of Object.entries(r))if(!s.test(c))return yield g(d.ObjectAdditionalProperties,e,`${i}/${Ge(c)}`,l)}}function*sO(e,n,i,r){yield*J(vt(e,n),n,i,r)}function*cO(e,n,i,r){if(!Ee(r))return yield g(d.String,e,i,r);if($(e.minLength)&&!(r.length>=e.minLength)&&(yield g(d.StringMinLength,e,i,r)),$(e.maxLength)&&!(r.length<=e.maxLength)&&(yield g(d.StringMaxLength,e,i,r)),!new RegExp(e.source,e.flags).test(r))return yield g(d.RegExp,e,i,r)}function*lO(e,n,i,r){if(!Ee(r))return yield g(d.String,e,i,r);$(e.minLength)&&!(r.length>=e.minLength)&&(yield g(d.StringMinLength,e,i,r)),$(e.maxLength)&&!(r.length<=e.maxLength)&&(yield g(d.StringMaxLength,e,i,r)),Ee(e.pattern)&&(new RegExp(e.pattern).test(r)||(yield g(d.StringPattern,e,i,r))),Ee(e.format)&&(Da(e.format)?Ea(e.format)(r)||(yield g(d.StringFormat,e,i,r)):yield g(d.StringFormatUnknown,e,i,r))}function*dO(e,n,i,r){si(r)||(yield g(d.Symbol,e,i,r))}function*pO(e,n,i,r){if(!Ee(r))return yield g(d.String,e,i,r);new RegExp(e.pattern).test(r)||(yield g(d.StringPattern,e,i,r))}function*uO(e,n,i,r){yield*J(vt(e,n),n,i,r)}function*mO(e,n,i,r){if(!_e(r))return yield g(d.Tuple,e,i,r);if(e.items===void 0&&r.length!==0)return yield g(d.TupleLength,e,i,r);if(r.length!==e.maxItems)return yield g(d.TupleLength,e,i,r);if(e.items)for(let o=0;o<e.items.length;o++)yield*J(e.items[o],n,`${i}/${o}`,r[o])}function*fO(e,n,i,r){ot(r)||(yield g(d.Undefined,e,i,r))}function*gO(e,n,i,r){if(mo(e,n,r))return;const o=e.anyOf.map(a=>new Rs(J(a,n,i,r)));yield g(d.Union,e,i,r,o)}function*hO(e,n,i,r){if(!Ar(r))return yield g(d.Uint8Array,e,i,r);$(e.maxByteLength)&&!(r.length<=e.maxByteLength)&&(yield g(d.Uint8ArrayMaxByteLength,e,i,r)),$(e.minByteLength)&&!(r.length>=e.minByteLength)&&(yield g(d.Uint8ArrayMinByteLength,e,i,r))}function*bO(e,n,i,r){}function*OO(e,n,i,r){Oe.IsVoidLike(r)||(yield g(d.Void,e,i,r))}function*yO(e,n,i,r){Ka(e[y])(e,r)||(yield g(d.Kind,e,i,r))}function*J(e,n,i,r){const o=$(e.$id)?[...n,e]:n,a=e;switch(a[y]){case"Any":return yield*Eb();case"Argument":return yield*zb();case"Array":return yield*Kb(a,o,i,r);case"AsyncIterator":return yield*_b(a,o,i,r);case"BigInt":return yield*Hb(a,o,i,r);case"Boolean":return yield*Wb(a,o,i,r);case"Constructor":return yield*Gb(a,o,i,r);case"Date":return yield*qb(a,o,i,r);case"Function":return yield*Vb(a,o,i,r);case"Import":return yield*Xb(a,o,i,r);case"Integer":return yield*Jb(a,o,i,r);case"Intersect":return yield*Yb(a,o,i,r);case"Iterator":return yield*Zb(a,o,i,r);case"Literal":return yield*Qb(a,o,i,r);case"Never":return yield*eO(a,o,i,r);case"Not":return yield*tO(a,o,i,r);case"Null":return yield*nO(a,o,i,r);case"Number":return yield*iO(a,o,i,r);case"Object":return yield*rO(a,o,i,r);case"Promise":return yield*oO(a,o,i,r);case"Record":return yield*aO(a,o,i,r);case"Ref":return yield*sO(a,o,i,r);case"RegExp":return yield*cO(a,o,i,r);case"String":return yield*lO(a,o,i,r);case"Symbol":return yield*dO(a,o,i,r);case"TemplateLiteral":return yield*pO(a,o,i,r);case"This":return yield*uO(a,o,i,r);case"Tuple":return yield*mO(a,o,i,r);case"Undefined":return yield*fO(a,o,i,r);case"Union":return yield*gO(a,o,i,r);case"Uint8Array":return yield*hO(a,o,i,r);case"Unknown":return yield*bO();case"Void":return yield*OO(a,o,i,r);default:if(!_r(a[y]))throw new Bb(e);return yield*yO(a,o,i,r)}}function xO(...e){const n=e.length===3?J(e[0],e[1],"",e[2]):J(e[0],[],"",e[1]);return new Rs(n)}function SO(e){const n={};for(const i of Object.getOwnPropertyNames(e))n[i]=wt(e[i]);for(const i of Object.getOwnPropertySymbols(e))n[i]=wt(e[i]);return n}function wO(e){return e.map(n=>wt(n))}function LO(e){return e.slice()}function PO(e){return new Map(wt([...e.entries()]))}function IO(e){return new Set(wt([...e.entries()]))}function FO(e){return new Date(e.toISOString())}function wt(e){if(_e(e))return wO(e);if(Pn(e))return FO(e);if(yd(e))return LO(e);if(bd(e))return PO(e);if(Od(e))return IO(e);if(Ke(e))return SO(e);if(Sd(e))return e;throw new Error("ValueClone: Unable to clone value")}function et(e,n){const i=xd(e,"default")?e.default:void 0,r=Tr(i)?i():wt(i);return ot(n)?r:Ke(n)&&Ke(r)?Object.assign(r,n):n}function gr(e){return Ca(e)&&"default"in e}function NO(e,n,i){if(_e(i)){for(let o=0;o<i.length;o++)i[o]=le(e.items,n,i[o]);return i}const r=et(e,i);if(!_e(r))return r;for(let o=0;o<r.length;o++)r[o]=le(e.items,n,r[o]);return r}function $O(e,n,i){return Pn(i)?i:et(e,i)}function CO(e,n,i){const r=globalThis.Object.values(e.$defs),o=e.$defs[e.$ref];return le(o,[...n,...r],i)}function AO(e,n,i){const r=et(e,i);return e.allOf.reduce((o,a)=>{const s=le(a,n,r);return Ke(s)?{...o,...s}:s},{})}function TO(e,n,i){const r=et(e,i);if(!Ke(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(!gr(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 jO(e,n,i){const r=et(e,i);if(!Ke(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)&&gr(s)&&(r[l]=le(s,n,r[l]));if(!gr(o))return r;for(const l of Object.getOwnPropertyNames(r))c.test(l)||(r[l]=le(o,n,r[l]));return r}function vO(e,n,i){return le(vt(e,n),n,et(e,i))}function RO(e,n,i){return le(vt(e,n),n,i)}function UO(e,n,i){const r=et(e,i);if(!_e(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 kO(e,n,i){const r=et(e,i);for(const o of e.anyOf){const a=le(o,n,wt(r));if(mo(o,n,a))return a}return r}function le(e,n,i){const r=Cs(e,n),o=e;switch(o[y]){case"Array":return NO(o,r,i);case"Date":return $O(o,r,i);case"Import":return CO(o,r,i);case"Intersect":return AO(o,r,i);case"Object":return TO(o,r,i);case"Record":return jO(o,r,i);case"Ref":return vO(o,r,i);case"This":return RO(o,r,i);case"Tuple":return UO(o,r,i);case"Union":return kO(o,r,i);default:return et(o,i)}}function MO(...e){return e.length===3?le(e[0],e[1],e[2]):le(e[0],[],e[1])}function Us(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 DO(e){var i;const n=(i=e.properties)==null?void 0:i.version;return typeof(n==null?void 0:n.const)=="string"}function BO(e){return Array.isArray(e.required)&&e.required.includes("name")}function EO(e){const n=new Map;for(const i of e){const r=Us(i),o=n.get(r);o?o.push(i):n.set(r,[i])}return n}function zO(e,n){const i=n.find(r=>!DO(r)&&typeof r.description=="string")??n.find(r=>typeof r.description=="string");return{const:e,type:"string",...i?{description:i.description}:{}}}function KO(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=>Us(l)!==void 0&&BO(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")?EO(a):void 0;c&&c.size>=2&&(o.type="object",o.required=["name"],o.properties={name:{anyOf:[...c.entries()].map(([l,u])=>zO(l,u))}},o.allOf=[...c.entries()].map(([l,u])=>({if:{properties:{name:{const:l}},required:["name"]},then:u.length===1?u[0]:{anyOf:u}})),delete o.anyOf);for(const l of Object.values(o))i(l)}i(e)}function _O(e){if(typeof e!="object"||e===null)return[];const n=e;return Array.isArray(n.anyOf)?n.anyOf.filter(i=>typeof i=="object"&&i!==null):Array.isArray(n.allOf)?n.allOf.flatMap(i=>{const r=i==null?void 0:i.then;if(typeof r!="object"||r===null)return[];const o=r.anyOf;return Array.isArray(o)?o.filter(a=>typeof a=="object"&&a!==null):[r]}):[]}function hr(e,n,i){if(!(typeof e!="object"||e===null)){if(Array.isArray(e)){e.forEach(r=>{typeof r=="object"&&r!==null&&hr(r,n,i)});return}e.$ref===n&&(e.$ref=i);for(const r of Object.values(e))typeof r=="object"&&r!==null&&hr(r,n,i)}}function HO(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,u]of Object.entries(s)){const x=c?`${c}.${l}`:l;if(u&&typeof u=="object"){const S=u;if(S.type==="array"&&S.items&&Object.keys(S.items).length===0&&i.has(n)&&(S.items={$ref:`#/definitions/${n}`}),S.type==="array"&&S.items&&typeof S.items=="object"&&"$ref"in S.items&&o(S.items.$ref)){const w=S.items.$ref,N=r(w);S.items=N?{$ref:N}:{}}if(o(S.$ref)){const w=r(S.$ref);w?S.$ref=w:delete S.$ref}if(l==="$id"&&o(u)&&x!==`definitions.${u}.$id`){delete s[l];continue}a(u,x)}}}a(e)}function ks(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));if(c.$id&&typeof c.$id=="string"&&/^T\d+$/.test(c.$id)){const S=c.$id;delete c.$id,hr(c,S,"#")}const l={...s};function u(S,w=""){if(!(typeof S!="object"||S===null)){for(const[N,h]of Object.entries(S))if(h&&typeof h=="object"){const f=h;if(f.$id&&typeof f.$id=="string"){const F=f.$id;if(w!==`definitions.${F}`){const{$id:v,...P}=f;l[F]=P,S[N]={$ref:`#/definitions/${F}`},u(P,`definitions.${F}`);continue}}u(h,w?`${w}.${N}`:N)}}}u(c);const x={$schema:i};return r&&(x.$id=r),Object.assign(x,c),x.$schema=i,r&&(x.$id=r),o!==void 0&&(x.title=o),a!==void 0&&(x.description=a),Object.keys(l).length>0&&(x.definitions=l),HO(x),KO(x),x}var Ho=200,Wo=36,Go=600,WO=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),GO=new Set(["heading","body","mono","light"]),qO=new Set(["fontRegistry"]);function br(e,n,i){if(e!=null){if(typeof e=="string"){if(i&&(WO.has(i)||GO.has(i))){const r=e.trim();r.length>0&&n.add(r)}return}if(Array.isArray(e)){for(const r of e)br(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))qO.has(o)||br(a,n,o)}}}function Ms(e){const n=new Set;return br(e,n),n}var yS=Ms,xS=Ms,SS={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"},VO=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"}),XO=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"}),Ds=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(VO),gutter:t.Optional(XO)},{additionalProperties:!1,description:"Grid layout configuration"}),Ae=t.String({pattern:"^#?[0-9A-Fa-f]{6}$",description:"Hex color (e.g. #FF0000)"}),JO=t.Object({fontSize:t.Optional(t.Number()),fontFace:t.Optional(xn),fontColor:t.Optional(ji),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())},{additionalProperties:!1,description:"Text style preset"}),Bs=t.Object({name:t.String({description:"Theme name"}),colors:t.Object({primary:Ae,secondary:Ae,accent:Ae,background:Ae,text:Ae,text2:t.Optional(Ae),background2:t.Optional(Ae),accent4:t.Optional(Ae),accent5:t.Optional(Ae),accent6:t.Optional(Ae)},{additionalProperties:!1,description:"Theme color palette (10-slot scheme)"}),fonts:t.Object({heading:xn,body:xn},{additionalProperties:!1,description:"Font families"}),fontRegistry:t.Optional(Ti),defaults:t.Object({fontSize:t.Number({description:"Default font size in points"}),fontColor:Ae},{additionalProperties:!1,description:"Default text styling"}),styles:t.Optional(t.Partial(t.Object(Object.fromEntries(ws.map(e=>[e,JO]))),{additionalProperties:!1,description:"Named text style presets"})),componentDefaults:t.Optional(Ns)},{additionalProperties:!1,description:"Presentation theme configuration"});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 Es=t.Object({color:t.Optional(ji),gradient:t.Optional(Is),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}),YO=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}),it=t.Union([t.Number({description:"Position/size in inches"}),t.String({pattern:"^\\d+(\\.\\d+)?%$",description:'Position/size as percentage of slide dimension (e.g., "50%")'})]);function Dt(e,n){return t.Object({name:t.Literal(e),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:n},{additionalProperties:!1})}var ZO=t.Union([Dt("text",Ui),Dt("image",ki),Dt("shape",Mi),Dt("table",Di),Dt("chart",Ei),Dt("highcharts",Bi)],{discriminator:{propertyName:"name"},description:"Fixed component on a template slide (same format as slide children)"});function Bt(e,n){return t.Object({name:t.Literal(e),props:t.Partial(n,{description:"Default props inherited by the component placed in this placeholder"})},{additionalProperties:!1})}var QO=t.Union([Bt("text",Ui),Bt("image",ki),Bt("shape",Mi),Bt("table",Di),Bt("chart",Ei),Bt("highcharts",Bi)],{discriminator:{propertyName:"name"},description:"Partial component stub — styling defaults only"}),ey=t.Object({name:t.String({description:"Unique placeholder name"}),x:t.Optional(it),y:t.Optional(it),w:t.Optional(it),h:t.Optional(it),grid:t.Optional(jt),defaults:t.Optional(QO)},{additionalProperties:!1,description:"Placeholder on a template slide — defaults is a component stub whose props are inherited by the actual component"}),ty=t.Object({name:t.String({description:"Unique template slide name"}),background:t.Optional(Es),margin:t.Optional(t.Union([t.Number({description:"Margin in inches (all sides)"}),t.Array(t.Number(),{minItems:4,maxItems:4,description:"Margin [top, right, bottom, left] in inches"})])),slideNumber:t.Optional(t.Object({x:it,y:it,w:t.Optional(it),h:t.Optional(it),color:t.Optional(ji),fontSize:t.Optional(t.Number({description:"Slide number font size in points"}))},{additionalProperties:!1,description:"Slide number position and styling"})),objects:t.Optional(t.Array(ZO,{description:"Fixed components (logos, footers, decorations) — same { name, props } format as slide children"})),placeholders:t.Optional(t.Array(ey,{description:"Placeholder regions for slide content"})),grid:t.Optional(Ds)},{additionalProperties:!1,description:"Template slide definition (reusable slide template)"}),ny=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")',default:"default"}),Bs],{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(Ti),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(Ns),grid:t.Optional(Ds),templates:t.Optional(t.Array(ty,{description:"Template slide definitions (reusable slide templates)"}))},{description:"Presentation container props",additionalProperties:!1}),iy=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(Es),transition:t.Optional(YO),notes:t.Optional(t.String({description:"Speaker notes for this slide"})),layout:t.Optional(t.String({description:'Slide layout name (e.g., "Title Slide", "Blank")'})),hidden:t.Optional(t.Boolean({description:"Hide this slide from presentation"})),template:t.Optional(t.String({description:"Template slide name to apply"}))},{description:"Slide container props",additionalProperties:!1}),Sn=[{name:"pptx",propsSchema:ny,hasChildren:!0,allowedChildren:["slide"],category:"container",propsRequired:!0,description:"Main presentation container - defines the overall presentation structure. Required as the root component.",special:{hasSchemaField:!0}},{name:"slide",propsSchema:iy,hasChildren:!0,allowedChildren:nt.map(({name:e})=>e),hasPlaceholders:!0,category:"container",description:"Slide container - groups content elements on a single slide."},...nt];function Xn(e,n,i,r){var a;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."}))};if((a=e.special)!=null&&a.hasSchemaField&&(o.$schema=t.Optional(t.String({format:"uri"})),o.renderer=r?r.requireDiscriminator?t.Literal(r.renderer,{description:"Renderer backend for this presentation"}):t.Optional(t.Literal(r.renderer,{description:'Renderer backend. Omitted defaults to "pptxgenjs".'})):t.Optional(t.Union(ba.map(s=>t.Literal(s)),{description:'Renderer backend. Omitted defaults to "pptxgenjs".'}))),o.props=r?rd(e.name,e.propsSchema,r.renderer):e.propsSchema,e.hasChildren&&n&&(o.children=t.Optional(t.Array(n))),e.hasPlaceholders&&(i??n)&&(r==null?void 0:r.renderer)!=="office-open"){const s=o.props.properties??{},c=i??n;o.props=t.Object({...s,placeholders:t.Optional(t.Record(t.String(),c,{description:'Content for named placeholders: { "title": { "name": "text", ... } }'}))},{additionalProperties:!1,description:e.propsSchema.description})}return Fs(e)||(o.props=t.Optional(o.props)),t.Object(o,{additionalProperties:!1,description:e.description})}function ry(e){return Sn.map(n=>Xn(n,e))}function zs(e,n=[],i){const r=new Map;for(const c of Sn)!c.hasChildren&&(!i||od(c.name,i.renderer))&&r.set(c.name,Xn(c,void 0,e,i));const o=Sn.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 u=s[l];if(!u.allowedChildren){a.set(u.name,Xn(u,e,e,i)),s.splice(l,1);continue}if(!u.allowedChildren.filter(h=>o.some(f=>f.name===h)).every(h=>a.has(h)))continue;const w=[...u.allowedChildren.map(h=>a.get(h)??r.get(h)).filter(h=>h!==void 0),...n],N=w.length===1?w[0]:t.Union(w);a.set(u.name,Xn(u,N,N,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()]}t.Union([...ry(t.Any())],{discriminator:{propertyName:"name"},description:"Standard PPTX component definition with discriminated union"});t.Recursive(e=>t.Union([...zs(e)],{discriminator:{propertyName:"name"},description:"PPTX component definition with discriminated union"}));function oy(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 ay(e={}){const{customComponents:n=[]}=e,i=ba.map(r=>sy(n,r,r!==id));return t.Union(i,{description:"Presentation definition, discriminated by the optional renderer field. Omitted renderer means pptxgenjs."})}function sy(e,n,i){return t.Recursive(r=>{const o=[];for(const c of e)if(c.versions.length>0){const l=$s(c.versions.map(x=>x.version)),u=c.versions.map(x=>oy(c,x,r,x.version===l));o.push(u.length===1?u[0]:t.Union(u))}const s=[...zs(r,o,{renderer:n,requireDiscriminator:i}),...o];return s.length===0?t.Object({}):t.Union(s)})}Object.fromEntries(Sn.map(e=>[e.name,e.propsSchema]));new Set(Sn.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));var Ks=new Set(["name","id","enabled","props","children"]);[...Ks];var cy=new Set([...Ks,"$schema"]);cy.add("renderer");var L=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'}),_s=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"'}),Hs=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"]}),Ws=t.Boolean({description:"Disable spell/grammar checking for this text (e.g. code snippets or identifiers)"}),fo=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"]]}),go=t.Object({size:t.Optional(t.Number({minimum:8,maximum:120})),color:t.Optional(L),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")]),value:t.Optional(t.Number({minimum:0}))},{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}),Kt=t.Object({family:xn,...go.properties},{description:"Font definition with family and optional formatting properties",additionalProperties:!1}),ho=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right")],{description:"Text alignment options"}),Gs=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Text alignment options including justify"}),ly=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)"}),cn=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}),dy=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(L)},{description:"Border configuration",additionalProperties:!1});var py=t.Object({type:t.Union([t.Literal("single"),t.Literal("atLeast"),t.Literal("exactly"),t.Literal("double"),t.Literal("multiple")]),value:t.Optional(t.Number({minimum:0}))},{description:"Line spacing configuration",additionalProperties:!1}),zi=t.Object({left:t.Optional(t.Number({minimum:0})),hanging:t.Optional(t.Number({minimum:0}))},{description:"Indentation configuration",additionalProperties:!1}),qs=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}),uy=t.Union([t.Literal("left"),t.Literal("right"),t.Literal("center"),t.Literal("decimal"),t.Literal("bar")],{description:"Tab stop alignment type"}),my=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"}),fy=t.Object({type:uy,position:t.Number({minimum:0,description:"Tab stop position in twips (1/20 of a point)"}),leader:t.Optional(my)},{description:"Tab stop definition (w:tab in w:tabs)",additionalProperties:!1}),gy=t.Array(fy,{description:"Tab stops for the paragraph. Tab characters (\\t) in the text jump to these positions."}),hy=t.Union([t.Literal("character"),t.Literal("column"),t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Horizontal position relative to"}),by=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("paragraph"),t.Literal("line"),t.Literal("text")],{description:"Vertical position relative to"}),Oy=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Horizontal alignment"}),yy=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Vertical alignment"}),xy=t.Union([t.Literal("none"),t.Literal("square"),t.Literal("topAndBottom"),t.Literal("around"),t.Literal("tight"),t.Literal("through")],{description:"Text wrapping type"}),Sy=t.Union([t.Literal("bothSides"),t.Literal("left"),t.Literal("right"),t.Literal("largest")],{description:"Text wrapping side"}),bo=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(hy),align:t.Optional(Oy),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(by),align:t.Optional(yy),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:xy,side:t.Optional(Sy),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 wy={};t.Object(wy,{description:"Base component props",additionalProperties:!0});var mt=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")'}),Ly="^-?\\d+(\\.\\d+)?%$",Py="^\\d+(\\.\\d+)?%$",qo=t.Union([t.Number({description:"Inches from the canvas origin"}),t.String({pattern:Ly,description:'Percentage of the canvas extent on this axis, e.g. "25%"'})],{description:"Position in inches (number) or as a canvas percentage"}),Vo=t.Union([t.Number({minimum:0,description:"Size in inches"}),t.String({pattern:Py,description:'Percentage of the canvas extent on this axis, e.g. "50%"'})],{description:"Size in inches (number) or as a canvas percentage"}),Oo={x:t.Optional(qo),y:t.Optional(qo),w:t.Optional(Vo),h:t.Optional(Vo),rotate:t.Optional(t.Number({description:"Clockwise rotation in degrees"}))},Vs=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(mt)},{additionalProperties:!1})],{description:"Underline: true for a single line, or a style/colour object"}),Ki={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())},Iy=t.Object({text:t.String({description:"Run text"}),color:t.Optional(mt),...Ki,underline:t.Optional(Vs),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"}),Fy=t.Object({text:t.String({description:"Segment text"}),color:t.Optional(mt),...Ki,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"}),Xs=t.Object({color:t.Optional(mt),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."}),Ny=t.Object({color:t.Optional(mt),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"}),Js=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),Ys=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical text anchoring inside the box"}),Zs=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"}),$y=t.Object({text:t.Optional(t.String({description:"Plain text content"})),runs:t.Optional(t.Array(Iy,{minItems:1,description:'Formatted runs, as an alternative to "text"'})),...Oo,color:t.Optional(mt),...Ki,underline:t.Optional(Vs),strike:t.Optional(t.Boolean({description:"Strikethrough"})),align:t.Optional(Js),valign:t.Optional(Ys),margin:t.Optional(Zs),fill:t.Optional(Xs)},{additionalProperties:!1,description:"Native visual text element — becomes a Word text box (wps:wsp) inside the drawing group"}),Cy=t.Object({type:Ps,...Oo,fill:t.Optional(Xs),line:t.Optional(Ny),text:t.Optional(t.Union([t.String(),t.Array(Fy,{minItems:1})],{description:"Text drawn inside the shape"})),...Ki,fontColor:t.Optional(mt),align:t.Optional(Js),valign:t.Optional(Ys),margin:t.Optional(Zs),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"}),Ay=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"})),...Oo,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 Qi(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 Ty=t.Union([Qi("text",$y,"Text element - a native Word text box drawn on the visual canvas."),Qi("shape",Cy,"Shape element - a native preset-geometry shape, optionally holding text."),Qi("image",Ay,"Image element - a native picture; an SVG stays vector.")],{$id:"DocxNativeVisualContent",discriminator:{propertyName:"name"},description:"A single native visual element (text, shape, or image)."}),jy=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(mt),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"}),vy=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}),Ry=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(vy)},{description:"pptx canvas definition for the visual",additionalProperties:!1}),Qs={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(ho),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(cn),floating:t.Optional(bo),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"}))},Uy=t.Object({renderMode:t.Optional(t.Literal("raster",{description:"Render as a rasterized pptx slide (the default when omitted)."})),canvas:Ry,elements:t.Optional(t.Array(Ih,{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:Wo,maximum:Go,default:Ho,description:`Raster resolution in DPI (default ${Ho}, range ${Wo}-${Go}). Higher = sharper + larger.`})),serverUrl:t.Optional(t.String({description:"Rasterization service URL override (default from services.pptx)"})),...Qs},{$id:"DocxVisualRasterProps",description:"Visual component props (pptx-rendered graphic)",additionalProperties:!1}),ky=t.Object({renderMode:t.Literal("native",{description:'Draw natively as a Word DrawingML group. Requires the "office-open" renderer.'}),canvas:jy,elements:t.Optional(t.Array(Ty,{description:"Native drawing elements (text, shape, image), positioned with x/y/w/h in inches or canvas percentages"})),...Qs},{$id:"DocxVisualNativeProps",description:'Visual component props (native Word drawing group; requires renderer "office-open")',additionalProperties:!1}),My=t.Union([Uy,ky],{description:"Visual component props — rasterized pptx slide (default) or a native Word drawing group"}),ec=["docxjs","office-open"],Dy="docxjs";function tc(e){return`ComponentDefinition_${e}`}function nc(e,n,i){const r=xr(n);return yr(r,tc(i)),e==="visual"&&i!=="office-open"?By(r)??r:(i==="office-open"&&Or(r),r)}function By(e){const n=e.anyOf;return Array.isArray(n)&&n.length>0?n[0]:void 0}function Or(e){if(Array.isArray(e)){e.forEach(Or);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))Or(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={$ref:n});for(const r of Reflect.ownKeys(i))yr(i[r],n)}function xr(e){if(Array.isArray(e))return e.map(xr);if(!e||typeof e!="object")return e;const n=Object.create(Object.getPrototypeOf(e));for(const i of Reflect.ownKeys(e))n[i]=xr(e[i]);return n}var Ey=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}),_i=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(Ey,{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}),zy=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}),ic={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"}))},Ky=t.Object(ic,{description:"A reply within a comment thread",additionalProperties:!1}),Hi=t.Object({...ic,replies:t.Optional(t.Array(Ky,{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}),rc=t.Object({text:t.String({description:"Heading text (required)"}),level:t.Optional(ly),font:t.Optional(t.Partial(Kt)),language:t.Optional(Hs),noProof:t.Optional(Ws),noProofWords:t.Optional(fo),alignment:t.Optional(Gs),spacing:t.Optional(cn),indent:t.Optional(qs),lineSpacing:t.Optional(t.Union([t.Number({minimum:0}),py])),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(_i),comment:t.Optional(Hi)},{description:"Heading component props",additionalProperties:!1}),oc=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}),_y=t.Array(oc,{description:"Footnote bodies for `[^id]` markers in this paragraph, placed at the foot of the page. An unreferenced body is not emitted.",minItems:1}),Hy=t.Array(oc,{description:"Endnote bodies for `[^id]` markers in this paragraph, collected at the end of the document. An unreferenced body is not emitted.",minItems:1}),Wy=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"}),Xo=t.Union([t.Literal("margin"),t.Literal("page"),t.Literal("text")],{description:"Frame anchor type"}),Gy=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("inside"),t.Literal("outside")],{description:"Frame horizontal alignment"}),qy=t.Union([t.Literal("top"),t.Literal("center"),t.Literal("bottom"),t.Literal("inside"),t.Literal("outside")],{description:"Frame vertical alignment"}),Vy=t.Object({horizontalPosition:t.Optional(t.Object({relative:t.Optional(Xo),align:t.Optional(Gy),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(Xo),align:t.Optional(qy),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:Wy},{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}),Xy=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Paragraph text alignment"}),ac=t.Object({text:t.String({description:"Text content (required)"}),font:t.Optional(t.Partial(Kt)),themeStyle:t.Optional(t.String()),language:t.Optional(Hs),noProof:t.Optional(Ws),noProofWords:t.Optional(fo),boldColor:t.Optional(L),spacing:t.Optional(cn),alignment:t.Optional(Xy),indent:t.Optional(qs),tabStops:t.Optional(gy),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(Vy),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(_i),comment:t.Optional(Hi),footnotes:t.Optional(_y),endnotes:t.Optional(Hy)},{description:"Paragraph component props (font nested for theme consistency; no flat font properties)",additionalProperties:!1}),sc=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(ho),caption:t.Optional(t.String({description:"Image caption (supports rich text with **bold**, *italic*, ***both***)"})),spacing:t.Optional(cn),floating:t.Optional(bo),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}),cc=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(ho),spacing:t.Optional(cn),size:t.Optional(t.Union([t.Literal("small"),t.Literal("medium"),t.Literal("large")]))},{description:"Statistic component props",additionalProperties:!1}),Jy=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})])),lc=t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")],{description:"Horizontal text alignment"}),dc=t.Union([t.Literal("top"),t.Literal("middle"),t.Literal("bottom")],{description:"Vertical cell alignment"}),pc=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"}))},{additionalProperties:!1}),Sr=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})]),wr=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})]),Yy=t.Union([t.Boolean({description:"Hide all borders when true"}),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})]),uc=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})]),er=t.Object({color:t.Optional(L),backgroundColor:t.Optional(_s),horizontalAlignment:t.Optional(lc),verticalAlignment:t.Optional(dc),font:t.Optional(pc),borderColor:t.Optional(Sr),borderSize:t.Optional(wr),padding:t.Optional(uc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"}))},{additionalProperties:!1});function mc(e){const n=t.Union([t.String(),e]),i={color:t.Optional(L),backgroundColor:t.Optional(_s),horizontalAlignment:t.Optional(lc),verticalAlignment:t.Optional(dc),font:t.Optional(pc),borderColor:t.Optional(Sr),borderSize:t.Optional(wr),padding:t.Optional(uc),height:t.Optional(t.Number({minimum:0,description:"Cell height in points"})),comment:t.Optional(Hi),revision:t.Optional(_i)},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(er),header:t.Optional(r),cells:t.Optional(t.Array(o))},{additionalProperties:!1});return t.Object({borderColor:t.Optional(Sr),borderSize:t.Optional(wr),hideBorders:t.Optional(Yy),cellDefaults:t.Optional(er),headerCellDefaults:t.Optional(er),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(zy),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 fc=mc(Jy),gc=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(cn),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}),hc=gc(),Zy=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}),bc=t.Object({columns:t.Union([t.Number({minimum:1,description:"Number of equal-width columns (converter will normalize to array)"}),t.Array(Zy,{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}),Oc=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"}),Qy=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(L),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}),ex=t.Object({level:t.Number({minimum:0,maximum:8,description:"Nesting level (0 = root, 1 = first sublevel, etc.)"}),format:t.Optional(Oc),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(zi),start:t.Optional(t.Number({minimum:1,description:"Starting number for this level (default: 1)"})),font:t.Optional(Qy)},{description:"Configuration for a single list level",additionalProperties:!1}),yc=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(_i)},{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(ex,{description:"Configuration for each nesting level",minItems:1,maxItems:9})),format:t.Optional(t.Union([Oc,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(dy),alignment:t.Optional(Gs),indent:t.Optional(t.Union([t.Number({minimum:0}),zi])),comment:t.Optional(Hi)},{description:"List component props",additionalProperties:!1}),yo=["revision","comment","footnotes","endnotes"],tx=t.Partial(t.Omit(rc,yo)),nx=t.Partial(t.Omit(ac,yo)),ix=t.Partial(sc),rx=t.Partial(cc),ox=t.Partial(t.Omit(fc,["rows"])),ax=t.Partial(hc),sx=t.Partial(bc),cx=t.Partial(t.Omit(yc,yo)),xc=t.Object({heading:t.Optional(tx),paragraph:t.Optional(nx),image:t.Optional(ix),statistic:t.Optional(rx),table:t.Optional(ox),section:t.Optional(ax),columns:t.Optional(sx),list:t.Optional(cx)},{additionalProperties:!0}),lx=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 dx=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:lx},{description:"Page configuration including dimensions and margins",additionalProperties:!1}),Sc=t.Object({heading:Kt,body:Kt,mono:Kt,light:Kt},{additionalProperties:!1,description:"Font definitions for different text types"}),px=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"}),wc={style:px,size:t.Number({minimum:0,description:"Width in eighths of a point (docx sz)"}),color:L,space:t.Optional(t.Number({minimum:0,description:"Space between text and border in points"}))},Hn=t.Object(wc,{additionalProperties:!1,description:"Paragraph border side definition"}),ux=t.Object(wc,{additionalProperties:!1,description:"Rule drawn between consecutive paragraphs sharing this border set (w:between), in place of their adjoining bottom and top edges"}),Lc=t.Object({top:t.Optional(Hn),bottom:t.Optional(Hn),left:t.Optional(Hn),right:t.Optional(Hn),between:t.Optional(ux)},{additionalProperties:!1,description:"Paragraph borders (per side, plus the between-paragraph rule)"}),Pc=t.Optional(t.Union([t.Literal("left"),t.Literal("center"),t.Literal("right"),t.Literal("justify")])),Te=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...go.properties,alignment:Pc,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(Lc),indent:t.Optional(zi)},{additionalProperties:!1}),mx=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"}),fx=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"}),gx=t.Object({type:fx,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(mx)},{description:"Tab stop configuration with position, alignment, and optional leader",additionalProperties:!1}),Et=t.Object({font:t.Optional(t.Union([t.Literal("heading"),t.Literal("body"),t.Literal("mono"),t.Literal("light")])),...go.properties,alignment:Pc,tabStops:t.Optional(t.Array(gx,{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(Lc),indent:t.Optional(zi)},{additionalProperties:!1}),Ic=t.Object({normal:t.Optional(Te),heading1:t.Optional(Te),heading2:t.Optional(Te),heading3:t.Optional(Te),heading4:t.Optional(Te),heading5:t.Optional(Te),heading6:t.Optional(Te),title:t.Optional(Te),subtitle:t.Optional(Te),TOC1:t.Optional(Et),TOC2:t.Optional(Et),TOC3:t.Optional(Et),TOC4:t.Optional(Et),TOC5:t.Optional(Et),TOC6:t.Optional(Et)},{additionalProperties:Te,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)]),...Te.properties},{additionalProperties:!1});var hx=t.Object({primary:L,secondary:L,accent:L,text:L,background:L,border:L,textPrimary:L,textSecondary:L,textMuted:L,borderPrimary:L,borderSecondary:L,backgroundPrimary:L,backgroundSecondary:L,accent4:t.Optional(L),accent5:t.Optional(L),accent6:t.Optional(L)},{additionalProperties:!1}),bx=t.Object({colors:t.Optional(t.Partial(hx)),fonts:t.Optional(t.Partial(Sc)),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."}),Ox=t.Object({$schema:t.Optional(t.String()),name:t.String(),displayName:t.String(),description:t.String(),version:t.String(),colors:t.Object({primary:L,secondary:L,accent:L,text:L,background:L,border:L,textPrimary:L,textSecondary:L,textMuted:L,borderPrimary:L,borderSecondary:L,backgroundPrimary:L,backgroundSecondary:L,accent4:t.Optional(L),accent5:t.Optional(L),accent6:t.Optional(L)},{additionalProperties:!1}),fonts:Sc,fontRegistry:t.Optional(Ti),page:dx,styles:t.Optional(Ic),componentDefaults:t.Optional(xc),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 wS(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 yx=e=>t.Object({theme:t.Optional(t.String({description:'Theme name to apply (default: "minimal")',examples:["minimal","corporate","modern"],default:"minimal"})),themeOverrides:t.Optional(bx),fontRegistry:t.Optional(Ti),componentDefaults:t.Optional(xc),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(fo),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}),xx=yx(),Sx=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(bo),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(L)},{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(L)},{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(L)},{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(L)},{additionalProperties:!1}))},{additionalProperties:!1})),shading:t.Optional(t.Object({fill:t.Optional(L)},{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"]}}}]))}}}}}}]}),wx=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"}),Lx=t.Union([t.Literal("document"),t.Literal("section")],{description:"TOC scope: document-wide or section-only"}),Px=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 Ix=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(wx),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([Lx,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(Px,{description:"Custom style mappings for TOC entries. Maps custom theme styles to TOC levels."}))},{description:"Table of Contents component props",additionalProperties:!1}),Fx=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%")'}))}),Vt=[{name:"docx",propsSchema:xx,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:hc,createPropsSchema:gc,hasChildren:!0,allowedChildren:["heading","paragraph","image","statistic","table","list","toc","highcharts","visual","columns","text-box"],category:"container",description:"Section container - groups related content with optional title. Use for organizing document structure."},{name:"columns",propsSchema:bc,hasChildren:!0,allowedChildren:["heading","paragraph","image","statistic","table","list","toc","highcharts","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:Sx,hasChildren:!0,allowedChildren:["heading","paragraph","image"],category:"layout",description:"Floating text container - allows positioning text anywhere on the page with absolute or relative positioning."},{name:"heading",propsSchema:rc,hasChildren:!1,category:"content",description:"Heading text - supports levels 1-6 for document hierarchy. Level 1 is largest."},{name:"paragraph",propsSchema:ac,hasChildren:!1,category:"content",description:"Paragraph text - supports formatting like bold, italic, and color. Main content element."},{name:"image",propsSchema:sc,hasChildren:!1,category:"content",description:"Image element - displays images with optional caption. Supports various formats."},{name:"statistic",propsSchema:cc,hasChildren:!1,category:"content",description:"Statistic display - shows a number with description. Perfect for KPIs and metrics."},{name:"table",propsSchema:fc,createPropsSchema:mc,hasChildren:!1,category:"content",description:"Data table - displays tabular data with headers. Supports formatting and alignment."},{name:"list",propsSchema:yc,hasChildren:!1,category:"content",description:"List element - bulleted or numbered list items. Supports nested lists."},{name:"toc",propsSchema:Ix,hasChildren:!1,category:"content",description:"Table of contents - automatically generates TOC from document headings. Supports depth ranges and custom styles."},{name:"highcharts",propsSchema:Fx,hasChildren:!1,category:"content",description:"Chart component powered by Highcharts - render line, bar, pie, heatmap, and more with rich options."},{name:"visual",propsSchema:My,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 Jo(e){return Vt.find(n=>n.name===e)}function Nx(e){var i;const n=e;return n.type!=="object"||(((i=n.required)==null?void 0:i.length)??0)>0}function Jn(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(ec.map(u=>t.Literal(u)),{description:'Renderer backend. Omitted defaults to "docxjs".'})));const a=e.createPropsSchema&&i?e.createPropsSchema(i):e.propsSchema,s=r?nc(e.name,a,r.renderer):a;return o.props=Nx(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 $x(e){return Vt.map(n=>Jn(n,e))}function Fc(e,n=[],i){const r=new Map;for(const l of Vt)l.hasChildren||r.set(l.name,Jn(l,void 0,e,i));const o=Vt.filter(l=>l.hasChildren),a=new Map,s=[...o];for(;s.length>0;){const l=s.length;for(let u=s.length-1;u>=0;u--){const x=s[u];if(!x.allowedChildren){a.set(x.name,Jn(x,e,e,i)),s.splice(u,1);continue}if(!x.allowedChildren.filter(f=>o.some(F=>F.name===f)).every(f=>a.has(f)))continue;const N=[...x.allowedChildren.map(f=>a.get(f)??r.get(f)).filter(f=>f!==void 0),...n],h=N.length===1?N[0]:t.Union(N);a.set(x.name,Jn(x,h,e,i)),s.splice(u,1)}if(s.length===l)throw new Error(`Circular allowedChildren among: ${s.map(u=>u.name).join(", ")}`)}const c=new Map([...a,...r]);return{schemas:[...c.values()],byName:c}}function Cx(e={}){return t.Union(ec.map(n=>Ax(e,n,n!==Dy)),{description:"Document definition, discriminated by the optional renderer field. Omitted renderer means docxjs."})}function Ax(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 u=tc(n),x=t.Recursive(w=>{const N=[];for(const P of o)if(P.versionedProps&&P.versionedProps.length>0){const $e=P.versionedProps,de=$s($e.map(Q=>Q.version));for(const Q of $e){const ft=Q.description||P.description,ln={name:t.Literal(P.name),id:t.Optional(t.String()),version:ft?t.Literal(Q.version,{description:ft}):t.Literal(Q.version),props:Q.propsSchema};Q.hasChildren&&(ln.children=t.Optional(t.Array(w)));const dn=Q.description?`${P.name} v${Q.version} — ${Q.description}`:P.description?`${P.name} v${Q.version} — ${P.description}`:`${P.name} v${Q.version}`;N.push(t.Object(ln,{additionalProperties:!1,description:dn}))}const Ce=$e.find(Q=>Q.version===de),oe={name:t.Literal(P.name),id:t.Optional(t.String()),props:Ce.propsSchema};Ce.hasChildren&&(oe.children=t.Optional(t.Array(w)));const Rt=Ce.description?`${P.name} (latest: v${de}) — ${Ce.description}`:P.description?`${P.name} (latest: v${de}) — ${P.description}`:`${P.name} (latest: v${de})`;N.push(t.Object(oe,{additionalProperties:!1,description:Rt}))}else{const $e=!!P.hasChildren,de={name:t.Literal(P.name),id:t.Optional(t.String()),props:P.propsSchema};$e&&(de.children=t.Optional(t.Array(w))),N.push(t.Object(de,{additionalProperties:!1,...P.description?{description:P.description}:{}}))}const{schemas:h,byName:f}=r?Fc(w,N,{renderer:n,requireDiscriminator:i}):{schemas:[],byName:new Map},F=Jo("section");c=["section",...(F==null?void 0:F.allowedChildren)??[]].map(P=>f.get(P)).filter(P=>P!==void 0),l=N;const v=[...h,...N];if(v.length===0)return t.Any();if(v.length===1)return v[0];{const P=o.length>0?"Component definition with discriminated union including custom components":"Component definition with discriminated union";return t.Union(v,{discriminator:{propertyName:"name"},description:P})}},{$id:u}),S=Jo("docx");if(!S)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(nc(S.name,S.propsSchema,n)),children:t.Array(t.Union([...c,...l],{discriminator:{propertyName:"name"}}))},{additionalProperties:!1,title:a,description:s,definitions:{[u]:x}})}t.Union([...$x(t.Any())],{discriminator:{propertyName:"name"},description:"Standard component definition with discriminated union"});var Tx=t.Recursive(e=>t.Union([...Fc(e).schemas],{discriminator:{propertyName:"name"},description:"Component definition with discriminated union"})),jx=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")]))}),vx=t.Object({name:t.Literal("text-space-after"),id:t.Optional(t.String()),props:jx}),Rx=vx;Object.fromEntries([...Vt.map(e=>[e.name,e.propsSchema]),["custom",Rx]]);new Set(Vt.filter(e=>{var n;return!!((n=e.special)!=null&&n.hasSchemaField)}).map(e=>e.name));var pe={};function Ux(){return{includeEmojis:!Nc(),verbosity:"normal",includeSuggestions:!0,includePath:!0,maxMessageLength:0,includeDocLinks:!1,colorSupport:kx()}}Ux();function Nc(){return typeof process>"u"||!pe?!1:!!(pe.CI||pe.CONTINUOUS_INTEGRATION||pe.GITHUB_ACTIONS||pe.GITLAB_CI||pe.CIRCLECI||pe.TRAVIS||pe.JENKINS_URL)}function kx(){var e;return typeof process>"u"||pe!=null&&pe.NO_COLOR?!1:pe!=null&&pe.FORCE_COLOR||(e=process.stdout)!=null&&e.isTTY?!0:!Nc()}t.Object({definition:Tx,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"});Ba("uri",e=>{try{return new URL(e),!0}catch{return e.includes(".json")||e.includes("/")||e.includes("\\")?!0:/^https?:\/\/.+/.test(e)}});Ba("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 Mx=["columns","heading","highcharts","image","list","paragraph","docx","section","statistic","table","text-box","toc","visual"];new Set(Mx);const tr=t.Object({basePath:t.String({default:""})});function Dx(e){const n=MO(tr,e);if(n.basePath&&n.basePath!==""&&(!n.basePath.startsWith("/")||n.basePath.endsWith("/")))throw new Error("basePath must start with / and not end with /");if(!mo(tr,n)){const i=[...xO(tr,n)];throw new Error(`Environment validation failed: ${i.map(r=>r.message).join(", ")}`)}return n}Dx({basePath:""});const Je=typeof window<"u"&&window.__JTO_FORMAT__||"docx",LS=Je==="docx"?"Document":"Presentation",PS=Je==="docx"?".docx":".pptx";function Bx(){var r;const e=Cx({customComponents:[]}),n=ks(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 xo(i),i}function Ex(){var r;const e=ay({customComponents:[]}),n=ks(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 xo(i),i}function zx(){return Je==="docx"?Bx():Ex()}function Kx(){const n=JSON.parse(JSON.stringify(Je==="docx"?Ox:Bs));Lr(n,!1);const i=Je==="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} ${Je==="docx"?"documents":"presentations"}`}}function _x(e=Je==="docx"?["*.docx.json"]:["*.pptx.json"]){return{uri:"https://json-to-office.dev/schema/report/v1.0.0",fileMatch:e,schema:zx()}}function $c(e=[`*.${Je}.theme.json`]){return{uri:"https://json-to-office.dev/schemas/theme/v1.0.0",fileMatch:e,schema:Kx()}}function xo(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=Hx(o)),(r=e.properties)!=null&&r.props&&Wx(o,e.properties.props)}Object.values(e).forEach(o=>{typeof o=="object"&&o!==null&&xo(o)})}}function Hx(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 Wx(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 Lr(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=>Lr(i,n));return}Object.keys(e).forEach(i=>{typeof e[i]=="object"&&e[i]!==null&&Lr(e[i],n)})}}const je="/api",yt=`${je}/${Je}`,IS={discovery:{all:`${je}/discovery/all`,plugins:`${je}/discovery/plugins`,documents:`${je}/discovery/documents`,themes:`${je}/discovery/themes`,schemas:{document:`${je}/discovery/schemas/document`,theme:`${je}/discovery/schemas/theme`}},generate:`${yt}/generate`,validate:`${yt}/validate`,diff:`${yt}/diff`,fonts:{catalog:`${je}/fonts/catalog`,materialize:`${je}/fonts/materialize`},preview:{libreoffice:`${yt}/preview/libreoffice`,libreofficeFromJson:`${yt}/preview/libreoffice-from-json`},renderers:`${yt}/renderers`,cacheStats:`${yt}/cache-stats`};class Gx{constructor(){ht(this,"documentSchemaCache",null);ht(this,"themeSchemaCache",null);ht(this,"pluginSchemaCache",new Map);ht(this,"cacheTimestamp",{});ht(this,"CACHE_DURATION",5*60*1e3);ht(this,"MAX_PLUGIN_CACHE",10)}async fetchDocumentSchema(n){const i=n?`document-${[...n].sort().join(",")}`:"document";if(n){const r=this.pluginSchemaCache.get(i);if(r&&this.isCacheValid(i))return r}else if(this.documentSchemaCache&&this.isCacheValid("document"))return this.documentSchemaCache;try{let r=`${je}/discovery/schemas/document`;if(n){const s=new URLSearchParams;s.append("plugins",n.join(",")),r=`${r}?${s.toString()}`}const o=await fetch(r);if(!o.ok)throw new Error(`Failed to fetch document schema: ${o.statusText}`);const a=await o.json();if(!a.success||!a.data)throw new Error(a.error||"Failed to fetch document schema");if(n){if(this.pluginSchemaCache.size>=this.MAX_PLUGIN_CACHE){const s=this.pluginSchemaCache.keys().next().value;s&&this.pluginSchemaCache.delete(s)}this.pluginSchemaCache.set(i,a.data)}else this.documentSchemaCache=a.data;return this.cacheTimestamp[i]=Date.now(),a.data}catch(r){throw console.error("Error fetching document schema:",r),r}}async fetchThemeSchema(){if(this.themeSchemaCache&&this.isCacheValid("theme"))return this.themeSchemaCache;try{const n=await fetch(`${je}/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={}}clearPluginSchemaCache(){this.pluginSchemaCache.clear(),Object.keys(this.cacheTimestamp).forEach(n=>{n.startsWith("document-")&&delete this.cacheTimestamp[n]})}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 Yo=new Gx,qx=new Set(["family","fontFace","titleFontFace","legendFontFace","dataLabelFontFace","catAxisLabelFontFace","valAxisLabelFontFace"]),Vx=new Set(["heading","body"]);function Xx(e){const n=[],i=[{kind:"object"}];let r=0;const o=[],a=h=>h===" "||h===" "||h===`
|
|
3
|
+
`||h==="\r",s=()=>{for(;r<e.length&&a(e[r]);)r++},c=()=>{const h=r;r++;let f="";for(;r<e.length;){const F=e[r];if(F==="\\"){const v=e[r+1];if(v==='"')f+='"';else if(v==="\\")f+="\\";else if(v==="/")f+="/";else if(v==="n")f+=`
|
|
4
|
+
`;else if(v==="r")f+="\r";else if(v==="t")f+=" ";else if(v==="u"){const P=e.slice(r+2,r+6);/^[0-9a-fA-F]{4}$/.test(P)?(f+=String.fromCharCode(parseInt(P,16)),r+=6):(f+="\\u",r+=2);continue}else f+=v??"";r+=2;continue}if(F==='"')return r++,{value:f,start:h,end:r};f+=F,r++}return{value:f,start:h,end:r}},l=()=>{for(;r<e.length;){const h=e[r];if(h===","||h==="}"||h==="]"||a(h))return;r++}},u=()=>{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()},x=()=>{const h=i[i.length-1];if(!h||h.kind!=="object")return!1;const f=h.key;return!f||o.includes("fontRegistry")?!1:qx.has(f)?!0:Vx.has(f)?o[o.length-1]==="fonts":!1},S=()=>{if(s(),r>=e.length)return;const h=e[r];if(h==='"'){const{value:f,start:F,end:v}=c();x()&&n.push({path:u(),value:f,valueStart:F,valueEnd:v});return}if(h==="{"){const f=i[i.length-1],F=(f==null?void 0:f.kind)==="object"?f.key:(f==null?void 0:f.kind)==="array"?f.index:void 0;F!==void 0&&o.push(F),r++,i.push({kind:"object",parentKey:F}),w(),i.pop(),F!==void 0&&o.pop();return}if(h==="["){const f=i[i.length-1],F=(f==null?void 0:f.kind)==="object"?f.key:(f==null?void 0:f.kind)==="array"?f.index:void 0;F!==void 0&&o.push(F),r++,i.push({kind:"array",index:0,parentKey:F}),N(),i.pop(),F!==void 0&&o.pop();return}l()},w=()=>{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 f=i[i.length-1];if(f&&(f.key=h),S(),f&&(f.key=void 0),s(),e[r]===","){r++;continue}if(e[r]==="}"){r++;return}return}},N=()=>{if(s(),e[r]==="]"){r++;return}for(;r<e.length;){if(S(),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(),S(),n}const Jx=qc(e=>({open:!1,contextual:void 0,openFor:n=>e({open:!0,contextual:n}),close:()=>e({open:!1,contextual:void 0})})),Zo="jto.pickFont";let nr=null,ir=null;function Yx(e){nr&&nr.dispose(),ir&&ir.dispose(),ir=e.editor.registerCommand(Zo,(n,i,r)=>{Jx.getState().openFor({jsonPath:i,currentValue:r})}),nr=e.languages.registerCodeLensProvider("json",{provideCodeLenses(n){const i=n.getValue();return{lenses:Xx(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:Zo,title:o.value?`Pick font… (current: ${o.value})`:"Pick font…",arguments:[o.path,o.value]}}}),dispose:()=>{}}},resolveCodeLens(n,i){return i}})}const Cc="jto-light",Ac="jto-dark",Zx={surface:"#ffffff",popover:"#ffffff",foreground:"#1a1f2e",muted:"#546f9c",border:"#e2e6ed",fill:"#f8f9fc",lineHighlight:"#edeff3",selection:"#4f7ef833",inserted:"#16a34a26",removed:"#ef444426"},Qx={surface:"#282c3e",popover:"#32374e",foreground:"#fafafa",muted:"#a4b2cc",border:"#494e65",fill:"#3b4054",lineHighlight:"#3b405499",selection:"#85a6fa33",inserted:"#34d39926",removed:"#fca5a526"};function Qo(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 eS(e){ea||(e.editor.defineTheme(Cc,{base:"vs",inherit:!0,rules:[],colors:Qo(Zx)}),e.editor.defineTheme(Ac,{base:"vs-dark",inherit:!0,rules:[],colors:Qo(Qx)}),ea=!0)}function FS(e){return e==="dark"?Ac:Cc}let Pr=!1,Wn=null,rr=[];async function So(){if(!Pr)try{const e=await Gc.init();wo(e),Pr=!0,console.log("Monaco configured globally with JSON schemas")}catch(e){console.error("Failed to configure Monaco globally:",e)}}function Tc(e){return e.replace(/,(\s*[}\]])/g,"$1")}function wo(e){eS(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(r){const o=r.getValue(),a=Tc(o);try{const s=JSON.parse(a),c=JSON.stringify(s,null,2);return[{range:r.getFullModelRange(),text:c}]}catch{return[{range:r.getFullModelRange(),text:a}]}}}),rS(e),Yx(e);const n=_x(),i=$c();ii(n.schema),e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,allowComments:!1,trailingCommas:"error",schemaValidation:"error",schemas:[n,i],schemaRequest:"ignore"}),console.log("Monaco instance configured with schemas:",{reportSchema:{uri:n.uri,fileMatch:n.fileMatch,schemaKeys:Object.keys(n.schema)},themeSchema:{uri:i.uri,fileMatch:i.fileMatch,schemaKeys:Object.keys(i.schema)}})}async function tS(){Pr=!1,await So()}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 nS(e,n){var r,o,a,s,c,l;function i(u){if(!u||u.type!=="string")return;const x=Array.isArray(u.examples)?u.examples:[];u.examples=[...new Set([...x,...n])]}i((a=(o=(r=e==null?void 0:e.properties)==null?void 0:r.props)==null?void 0:o.properties)==null?void 0:a.theme);for(const u of _O(e))i((l=(c=(s=u==null?void 0:u.properties)==null?void 0:s.props)==null?void 0:c.properties)==null?void 0:l.theme)}function iS(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 rS(e){Wn&&(Wn.dispose(),Wn=null),Wn=e.languages.registerCompletionItemProvider("json",{triggerCharacters:['"',":"," "],async provideCompletionItems(n,i){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});return s!=null&&s.items?{suggestions:s.items.map(l=>{var h,f,F;let u="";l.documentation&&(typeof l.documentation=="string"?u=l.documentation:l.documentation.value&&(u=l.documentation.value)),!u&&l.detail&&(u=l.detail);let x;if(l.textEdit){const v=l.textEdit.range;x={startLineNumber:v.start.line+1,startColumn:v.start.character+1,endLineNumber:v.end.line+1,endColumn:v.end.character+1}}else{const v=n.getWordUntilPosition(i);x={startLineNumber:i.lineNumber,startColumn:v.startColumn,endLineNumber:i.lineNumber,endColumn:v.endColumn}}const S=((h=l.textEdit)==null?void 0:h.newText)??l.insertText??(typeof l.label=="string"?l.label:((f=l.label)==null?void 0:f.label)??"");let w;l.documentation&&(typeof l.documentation=="string"?w=l.documentation:l.documentation.kind==="markdown"?w={value:l.documentation.value}:w=l.documentation.value);const N={label:typeof l.label=="string"?l.label:((F=l.label)==null?void 0:F.label)??"",kind:iS(l.kind,e),detail:u,documentation:w,insertText:S,range:x,sortText:l.sortText,filterText:l.filterText,preselect:l.preselect};return l.insertTextFormat===2&&(N.insertTextRules=e.languages.CompletionItemInsertTextRule.InsertAsSnippet),N})}:{suggestions:[]}}})}async function oS(e,n,i){var r;try{Yo.clearPluginSchemaCache();const o=await Yo.fetchDocumentSchema(n),a=JSON.parse(JSON.stringify(o));if(!a||typeof a!="object")throw new Error("Invalid schema received from server");ii(a),i&&(rr=i),rr.length&&nS(a,rr);const s={uri:"https://json-to-office.dev/schema/report/v1.0.0",fileMatch:["*.docx.json","*.pptx.json"],schema:a},c=$c();e.languages.registerDocumentFormattingEditProvider("json",{provideDocumentFormattingEdits(w){const N=w.getValue(),h=Tc(N);try{const f=JSON.parse(h),F=JSON.stringify(f,null,2);return[{range:w.getFullModelRange(),text:F}]}catch{return[{range:w.getFullModelRange(),text:h}]}}}),e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,enableSchemaRequest:!1,allowComments:!1,trailingCommas:"error",schemaValidation:"error",schemas:[s,c],schemaRequest:"ignore"}),console.log("Monaco updated with plugin-aware schemas:",{plugins:n||[],reportSchema:{uri:s.uri,fileMatch:s.fileMatch}});const l=e.editor.getModels();let u=!0;if(l.forEach(w=>{if(w.getLanguageId()==="json")try{e.editor.setModelLanguage(w,"json"),console.log("🔄 Re-validating model:",w.uri.toString())}catch(N){console.error("Failed to revalidate model:",w.uri.toString(),N),u=!1}}),!((r=e.languages.json.jsonDefaults.diagnosticsOptions.schemas)==null?void 0:r.some(w=>w.uri===s.uri)))throw new Error("Schema was not properly applied to Monaco editor");return console.log("✅ Schema validation successful"),u}catch(o){throw console.error("Failed to update Monaco with plugin schemas:",o),wo(e),o}}const NS=Object.freeze(Object.defineProperty({__proto__:null,configureMonaco:So,configureMonacoInstance:wo,resetMonacoConfig:tS,updateMonacoWithPlugins:oS},Symbol.toStringTag,{value:"Module"}));So().then(()=>{console.log("Monaco editor configured with JSON schemas for better autocomplete")}).catch(e=>{console.error("Failed to configure Monaco:",e)});const aS=document.getElementById("root"),sS=Mc.createRoot(aS);sS.render(I.jsx(nd,{}));export{IS as A,mo as C,xO as E,Je as F,Xl as S,t as T,SS as W,Ir as _,wS as a,Bl as b,rt as c,hS as d,bS as e,El as f,gS as g,LS as h,xS as i,yS as j,OS as k,PS as l,Jx as m,oS as n,FS as o,NS as p,eS as r,Yo as s,Gl as u};
|
|
5
|
+
//# sourceMappingURL=index-DLlW4q4v.js.map
|