pptx-react-viewer 1.1.38 → 1.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -258,17 +258,17 @@ ${r}
258
258
  </p:sldLayoutIdLst>`);t.file(u,g);}async function nne(t,e){let n="[Content_Types].xml",r=await t.file(n)?.async("string");if(!r)throw new Error("Content types file not found");let o=` <Override PartName="/ppt/slideLayouts/slideLayout${e}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml"/>`,i=r.replace("</Types>",`${o}
259
259
  </Types>`);t.file(n,i);}async function TUe(t,e,n,r=1){let o=await t.save(e.slides),i=await jg.loadAsync(o),a=ene(i)+1,l=`ppt/slideLayouts/slideLayout${a}.xml`;i.file(l,uU(n)),i.file(`ppt/slideLayouts/_rels/slideLayout${a}.xml.rels`,Qte(r)),await tne(i,a,r),await nne(i,a);let c=await i.generateAsync({type:"arraybuffer"}),u=new kp,d=await u.load(c);return {layoutPath:l,layoutName:n.name,handler:u,data:d}}async function _Ue(t,e,n,r=1){if(n.length===0)return {layoutPaths:[],handler:t,data:e};let o=await t.save(e.slides),i=await jg.loadAsync(o),s=ene(i),a=[];for(let d=0;d<n.length;d++){let p=n[d],f=s+d+1,h=`ppt/slideLayouts/slideLayout${f}.xml`;i.file(h,uU(p)),i.file(`ppt/slideLayouts/_rels/slideLayout${f}.xml.rels`,Qte(r)),await tne(i,f,r),await nne(i,f),a.push(h);}let l=await i.generateAsync({type:"arraybuffer"}),c=new kp,u=await c.load(l);return {layoutPaths:a,handler:c,data:u}}function MUe(t,e){let n=e.toLowerCase(),r=t.layoutOptions?.find(o=>o.name.toLowerCase()===n);if(r)return r;if(t.slideMasters)for(let o of t.slideMasters){let i=o.layouts?.find(s=>s.name?.toLowerCase()===n);if(i)return {path:i.path,name:i.name??e}}}function EUe(t,e){let n=t.layoutOptions?.find(r=>r.type===e);if(n)return n}function EO(t){if(!t||t.trim()==="")return [];let e=[],n=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g,r;for(;(r=n.exec(t))!==null;){let o=r[1].toUpperCase(),i=r[2].trim();if(o==="Z"){e.push({type:"Z",args:[]});continue}if(i===""){e.push({type:o,args:[]});continue}let s=i.replace(/,/g," ").replace(/-/g," -").split(/\s+/).filter(a=>a!=="").map(Number).filter(a=>!isNaN(a));e.push({type:o,args:s});}return e}function rne(t){return t.map(e=>{if(e.type==="Z")return "Z";let n=e.args.map(r=>Number.isInteger(r)?r.toString():r.toFixed(4)).join(" ");return `${e.type} ${n}`}).join(" ")}function PUe(t){switch(t){case "M":case "L":case "T":return 2;case "H":case "V":return 1;case "C":return 6;case "S":case "Q":return 4;case "A":return 7;case "Z":return 0;default:return 0}}function PO(t){let e=[];for(let n of t){let r=PUe(n.type);if(r===0||n.args.length<=r){e.push({type:n.type,args:[...n.args]});continue}let o=n.type==="M"?"L":n.type;for(let i=0;i<n.args.length;i+=r){let s=n.args.slice(i,i+r);s.length===r&&e.push({type:i===0?n.type:o,args:s});}}return e}function AUe(t,e,n){if(!e||e.trim()==="")throw new Error("newShapeType must be a non-empty string");t.shapeType=e,n!==void 0?t.shapeAdjustments={...n}:t.shapeAdjustments=void 0,t.pathData=void 0,t.pathWidth=void 0,t.pathHeight=void 0,t.customGeometryPaths=void 0,t.adjustmentHandles=void 0;}function RUe(t,e,n,r){if(!e||e.trim()==="")throw new Error("svgPath must be a non-empty string");t.shapeType=void 0,t.shapeAdjustments=void 0,t.adjustmentHandles=void 0,t.pathData=e,t.pathWidth=n,t.pathHeight=r,t.customGeometryPaths=void 0;}function kUe(t,e,n){let r=Math.max(0,Math.min(1,n));if(r===0)return t;if(r===1)return e;let o=PO(EO(t)),i=PO(EO(e));if(o.length===0&&i.length===0)return "";if(o.length===0)return e;if(i.length===0)return t;let s=Math.max(o.length,i.length),a=[];for(let l=0;l<s;l++){let c=o[l],u=i[l];if(!c&&u){let h=Array.from({length:u.args.length}).fill(0);a.push({type:u.type,args:u.args.map((m,g)=>Jy(h[g],m,r))});continue}if(c&&!u){let h=Array.from({length:c.args.length}).fill(0);a.push({type:c.type,args:c.args.map((m,g)=>Jy(m,h[g],r))});continue}if(!c||!u)continue;if(c.type==="Z"&&u.type==="Z"){a.push({type:"Z",args:[]});continue}if(c.type==="Z"||u.type==="Z"){let h=c.type!=="Z"?c:u,m=c.type==="Z",g=Array.from({length:h.args.length}).fill(0);a.push({type:h.type,args:h.args.map((x,v)=>m?Jy(g[v],x,r):Jy(x,g[v],r))});continue}if(c.type===u.type){let h=Math.max(c.args.length,u.args.length),m=[];for(let g=0;g<h;g++){let x=g<c.args.length?c.args[g]:0,v=g<u.args.length?u.args[g]:0;m.push(Jy(x,v,r));}a.push({type:c.type,args:m});continue}let d=r<.5?c.type:u.type,p=Math.max(c.args.length,u.args.length),f=[];for(let h=0;h<p;h++){let m=h<c.args.length?c.args[h]:0,g=h<u.args.length?u.args[h]:0;f.push(Jy(m,g,r));}a.push({type:d,args:f});}return rne(a)}function Jy(t,e,n){return t+(e-t)*n}function IUe(t){return PO(EO(t))}function NUe(t){return rne(t)}function VUe(t){return Math.round(t*iR)}function WUe(t){return Math.round(t/2.54*iR)}function XUe(t){return Math.round(t/25.4*iR)}function jUe(t){return Math.round(t/zUe*iR)}function YUe(t){return Math.round(t/dU)}function KUe(t){return Math.round(t*dU)}function qUe(t){return Math.round(t*pU)}function ZUe(t){return Math.round(t/2.54*pU)}function QUe(t){return dne[t]}function t$e(t){let e=t.split("/");return e.length===2?e[1].replace(/[^a-z0-9]/g,""):"bin"}function pne(t){let e=t.match(/^data:([^;]+);base64,(.+)$/s);if(!e)throw new Error("Invalid data URL format");let n=e[1].toLowerCase(),r=e$e[n]??t$e(n),o=e[2],i=atob(o),s=new Uint8Array(i.length);for(let a=0;a<i.length;a++)s[a]=i.charCodeAt(a);return {bytes:s,ext:r}}function fne(t,e){let n=String(t).padStart(3,"0"),r=e.startsWith(".")?e.slice(1):e;return `image-${n}.${r}`}function ql(t){return t==null?"":String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function r$e(t){if(typeof t!="string")return "#";let e=t.trim();if(e.length===0)return "#";let n=e.toLowerCase();for(let r of n$e)if(n.startsWith(r))return e;return "#"}function fU(t){return t.trim().replace(/\\/g,"/")}function o$e(t){let e=fU(t),n=e.lastIndexOf("/");return n<0?".":n===0?"/":e.slice(0,n)}function i$e(t,e){if(e)return e;if(!t)return;let n=fU(t),r=n.lastIndexOf(".");return r<0?`${n}.md`:`${n.slice(0,r)}.md`}function mh(t){if(typeof t!="string")return;let e=t.trim();if(e.length!==0&&(/^#[0-9a-f]{3,8}$/i.test(e)||y$e.has(e.toLowerCase())))return e}function b$e(t){if(typeof t!="string")return;let e=t.trim();if(e.length!==0&&/^[a-zA-Z0-9 _\-,'"]{1,80}$/.test(e))return e}function S$e(t,e,n,r,o,i=1){let s=n?.bodyInsetLeft?n.bodyInsetLeft*i:Math.round(r*YP),a=n?.bodyInsetRight?n.bodyInsetRight*i:Math.round(r*YP),l=n?.bodyInsetTop?n.bodyInsetTop*i:Math.round(o*YP),c=n?.bodyInsetBottom?n.bodyInsetBottom*i:Math.round(o*YP),u=r-s-a;if(u<=0)return;let d=w$e(e),p=C$e(t,d,u,i);if(p.length===0)return;let f=p.reduce((x,v)=>x+v.height*1.3,0),h=o-l-c,m=n?.vAlign??"top",g;m==="middle"?g=l+(h-f)/2:m==="bottom"?g=o-c-f:g=l;for(let x of p){g+=x.height;let v=x.align??n?.align??"left",S;v==="center"?S=s+(u-x.width)/2:v==="right"?S=s+u-x.width:S=s;for(let w of x.runs)t.font=xne(w.style,i),t.fillStyle=w.style.color??"#000000",t.fillText(w.text,S,g),S+=w.measuredWidth;g+=x.height*.3;}}function w$e(t){let e=[[]];for(let n of t)n.isParagraphBreak?e.push([]):n.text&&e[e.length-1].push(n);return e.filter(n=>n.length>0)}function C$e(t,e,n,r){let o=[];for(let i of e){let s=i[0]?.style?.align,a=[],l=0,c=0;for(let u of i){t.font=xne(u.style,r);let p=(u.style.fontSize??gne)*r*1.2,f=u.text.split(/(?<=\s)(?=\S)|(?<=\S)(?=\s)/);for(let h of f){if(!h)continue;if(/^\s+$/.test(h)){if(a.length>0){let x=t.measureText(h).width;a.push({text:h,style:u.style,measuredWidth:x}),l+=x;}continue}let m=h,g=t.measureText(m).width;if(l+g>n&&a.length>0){for(;a.length>0&&/^\s+$/.test(a[a.length-1].text);){let x=a.pop();l-=x.measuredWidth;}o.push({runs:a,width:l,height:c,align:s}),a=[],l=0,c=0;}a.push({text:m,style:u.style,measuredWidth:g}),l+=g,c=Math.max(c,p);}}a.length>0&&o.push({runs:a,width:l,height:c,align:s});}return o}function xne(t,e){let n=(t.fontSize??gne)*e,r=t.bold?"bold":"normal",o=t.italic?"italic":"normal",i=t.fontFamily?Rp(t.fontFamily):"sans-serif";return `${o} ${r} ${n}px ${i}`}function M$e(t){let e=t.shapeStyle;if(!e||!R$e(e)&&!_B(e))return null;let n=Math.round(t.width),r=Math.round(t.height);if(n<AZ||r<AZ)return null;let i=(t.textSegments?.length??0)>0?_$e:T$e,s=1;(n>i||r>i)&&(s=i/Math.max(n,r),n=Math.round(n*s),r=Math.round(r*s));let a=E$e(n,r);if(!a)return null;let l=a.getContext("2d");if(!l)return null;if(A$e(l,e,n,r),t.pathData){let c=t.pathWidth??n,u=t.pathHeight??r,d=n/(c||1),p=r/(u||1),f=new Path2D(t.pathData);l.save(),l.scale(d,p),l.fill(f),_B(e)&&(kZ(l,e),l.stroke(f)),l.restore();}else RZ(l,t.shapeType,n,r),l.fill(),_B(e)&&(kZ(l,e),RZ(l,t.shapeType,n,r),l.stroke());return l.globalAlpha=1,t.textSegments?.length&&S$e(l,t.textSegments,t.textStyle,n,r,s),a.toDataURL("image/png")}function E$e(t,e){try{if(typeof document<"u"&&document.createElement){let n=document.createElement("canvas");return n.width=t,n.height=e,n}}catch{}return null}function RZ(t,e,n,r){switch(t.beginPath(),e??"rect"){case "ellipse":t.ellipse(n/2,r/2,n/2,r/2,0,0,Math.PI*2);break;case "roundRect":{let i=Math.min(n,r)*.1;P$e(t,0,0,n,r,i);break}default:t.rect(0,0,n,r);break}}function P$e(t,e,n,r,o,i){t.moveTo(e+i,n),t.lineTo(e+r-i,n),t.quadraticCurveTo(e+r,n,e+r,n+i),t.lineTo(e+r,n+o-i),t.quadraticCurveTo(e+r,n+o,e+r-i,n+o),t.lineTo(e+i,n+o),t.quadraticCurveTo(e,n+o,e,n+o-i),t.lineTo(e,n+i),t.quadraticCurveTo(e,n,e+i,n),t.closePath();}function A$e(t,e,n,r){if(e.fillMode==="gradient"&&e.fillGradientStops?.length){let o=(e.fillGradientAngle??0)*Math.PI/180,i=n/2,s=r/2,a=Math.max(n,r)/2,l=Math.cos(o)*a,c=Math.sin(o)*a,u;e.fillGradientType==="radial"?u=t.createRadialGradient(i,s,0,i,s,a):u=t.createLinearGradient(i-l,s-c,i+l,s+c);for(let d of e.fillGradientStops){let p=Math.max(0,Math.min(1,d.position));u.addColorStop(p,d.color);}t.fillStyle=u;}else e.fillColor&&e.fillColor!=="transparent"?t.fillStyle=e.fillColor:t.fillStyle="rgba(0,0,0,0)";e.fillOpacity!==void 0&&e.fillOpacity<1&&(t.globalAlpha=e.fillOpacity);}function kZ(t,e){t.strokeStyle=e.strokeColor??"#000000",t.lineWidth=e.strokeWidth??1,e.strokeOpacity!==void 0&&e.strokeOpacity<1&&(t.globalAlpha=e.strokeOpacity);}function R$e(t){return t.fillMode==="none"?false:t.fillMode==="gradient"&&t.fillGradientStops?.length?true:t.fillMode==="solid"||t.fillMode==="pattern"?!!t.fillColor&&t.fillColor!=="transparent":t.fillMode==="image"?!!t.fillImageUrl:!!(t.fillColor&&t.fillColor!=="transparent")}function _B(t){return !!t.strokeColor&&t.strokeColor!=="transparent"&&(t.strokeWidth??0)>0}function N$e(t,e,n){let r=O$e(t,"level");if(typeof r=="number")return Math.max(0,Math.floor(r));let o=n?.[e],i=o?.marginLeft??0,s=o?.indent??0,a=Math.max(0,i+Math.max(s,0));return a<=0?0:Math.max(0,Math.round(a/24))}function D$e(t,e){if(t.autoNumType){let n=t.autoNumStartAt??1,r=t.paragraphIndex??e,o=Math.max(1,n+r);return L$e(o,t.autoNumType)}if(t.imageRelId||t.imageDataUrl)return "-";if(t.char){let n=t.char.trim();if(/^[-*+>]$/.test(n))return n}return "-"}function L$e(t,e){let n=e.toLowerCase(),r=String(t);return n.includes("roman")&&(r=B$e(t),n.includes("lc")&&(r=r.toLowerCase())),n.includes("alpha")&&(r=F$e(t),n.includes("uc")&&(r=r.toUpperCase()),n.includes("lc")&&(r=r.toLowerCase())),n.includes("parenboth")?`(${r})`:n.includes("parenr")?`${r})`:n.includes("minus")?`${r}-`:`${r}.`}function F$e(t){let e=Math.max(1,t),n="";for(;e>0;)e-=1,n=String.fromCharCode(97+e%26)+n,e=Math.floor(e/26);return n}function B$e(t){let e=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],n=Math.max(1,t),r="";for(let[o,i]of e)for(;n>=o;)r+=i,n-=o;return r}function O$e(t,e){if(!t||typeof t!="object")return;let n=t[e];if(!(typeof n!="number"||Number.isNaN(n)))return n}function $$e(t){if(t.style.hyperlink)return false;let e=t.style.fontFamily?.toLowerCase()??"";return U$e.some(n=>e.includes(n))}function V$e(t,e){if(!t)return null;let n=[],r="SourceGraphic",o=(a,l)=>{n.push(l.replace("__IN__",r).replace("__OUT__",a)),r=a;};if(t.grayscale&&o("p1",'<feColorMatrix in="__IN__" type="saturate" values="0" result="__OUT__"/>'),typeof t.saturation=="number"){let a=W$e(1+t.saturation/100);o("p2",`<feColorMatrix in="__IN__" type="saturate" values="${hr(a)}" result="__OUT__"/>`);}if(typeof t.hsl?.hue=="number"&&o("p3",`<feColorMatrix in="__IN__" type="hueRotate" values="${hr(t.hsl.hue)}" result="__OUT__"/>`),typeof t.brightness=="number"||typeof t.contrast=="number"){let a=(t.brightness??0)/100,l=1+(t.contrast??0)/100,c=l,u=a+(1-l)/2;o("p4",`<feComponentTransfer in="__IN__" result="__OUT__"><feFuncR type="linear" slope="${hr(c)}" intercept="${hr(u)}"/><feFuncG type="linear" slope="${hr(c)}" intercept="${hr(u)}"/><feFuncB type="linear" slope="${hr(c)}" intercept="${hr(u)}"/></feComponentTransfer>`);}if(t.lum&&(typeof t.lum.bright=="number"||typeof t.lum.contrast=="number")){let a=(t.lum.bright??0)/100,l=1+(t.lum.contrast??0)/100,c=l,u=a+(1-l)/2;o("p5",`<feComponentTransfer in="__IN__" result="__OUT__"><feFuncR type="linear" slope="${hr(c)}" intercept="${hr(u)}"/><feFuncG type="linear" slope="${hr(c)}" intercept="${hr(u)}"/><feFuncB type="linear" slope="${hr(c)}" intercept="${hr(u)}"/></feComponentTransfer>`);}if(typeof t.biLevel=="number"){o("p6a",'<feColorMatrix in="__IN__" type="saturate" values="0" result="__OUT__"/>');let a=Fg(t.biLevel/100,0,1);o("p6b",`<feComponentTransfer in="__IN__" result="__OUT__"><feFuncR type="discrete" tableValues="${a===0?"1 1":`0 ${MB()}`}"/><feFuncG type="discrete" tableValues="${a===0?"1 1":`0 ${MB()}`}"/><feFuncB type="discrete" tableValues="${a===0?"1 1":`0 ${MB()}`}"/></feComponentTransfer>`);}if(t.duotone){let a=Bw(t.duotone.color1),l=Bw(t.duotone.color2);o("p7a",'<feColorMatrix in="__IN__" type="saturate" values="0" result="__OUT__"/>'),o("p7b",`<feComponentTransfer in="__IN__" result="__OUT__"><feFuncR type="linear" slope="${hr(l.r-a.r)}" intercept="${hr(a.r)}"/><feFuncG type="linear" slope="${hr(l.g-a.g)}" intercept="${hr(a.g)}"/><feFuncB type="linear" slope="${hr(l.b-a.b)}" intercept="${hr(a.b)}"/></feComponentTransfer>`);}if(t.tint&&typeof t.tint.amt=="number"){let a=Fg(t.tint.amt/100,-1,1);a<0&&o("p8",`<feColorMatrix in="__IN__" type="saturate" values="${hr(1+a)}" result="__OUT__"/>`),typeof t.tint.hue=="number"&&o("p8h",`<feColorMatrix in="__IN__" type="hueRotate" values="${hr(t.tint.hue)}" result="__OUT__"/>`);}if(t.clrRepl){let a=Bw(t.clrRepl.color);o("p9",`<feColorMatrix in="__IN__" type="matrix" result="__OUT__" values="0 0 0 0 ${hr(a.r)} 0 0 0 0 ${hr(a.g)} 0 0 0 0 ${hr(a.b)} 0 0 0 1 0"/>`);}if(t.colorWash){Bw(t.colorWash.color);let a=Fg((t.colorWash.opacity??50)/100,0,1);n.push(`<feFlood flood-color="${t.colorWash.color}" flood-opacity="${hr(a)}" result="wash"/><feComposite in="wash" in2="${r}" operator="in" result="washmasked"/><feBlend in="washmasked" in2="${r}" mode="normal" result="washed"/>`),r="washed";}if(t.clrChange&&t.clrChange.clrToTransparent&&Bw(t.clrChange.clrFrom),typeof t.alphaModFix=="number"){let a=Fg(t.alphaModFix/100,0,1);o("pa1",`<feColorMatrix in="__IN__" type="matrix" result="__OUT__" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${hr(a)} 0"/>`);}if(t.alphaInv&&o("pa2",'<feComponentTransfer in="__IN__" result="__OUT__"><feFuncA type="linear" slope="-1" intercept="1"/></feComponentTransfer>'),t.alphaCeiling&&o("pa3",'<feComponentTransfer in="__IN__" result="__OUT__"><feFuncA type="discrete" tableValues="0 1 1 1 1 1 1 1 1 1"/></feComponentTransfer>'),t.alphaFloor&&o("pa4",'<feComponentTransfer in="__IN__" result="__OUT__"><feFuncA type="discrete" tableValues="0 0 0 0 0 0 0 0 0 1"/></feComponentTransfer>'),typeof t.alphaRepl=="number"){let a=Fg(t.alphaRepl/100,0,1);o("pa5",`<feComponentTransfer in="__IN__" result="__OUT__"><feFuncA type="linear" slope="0" intercept="${hr(a)}"/></feComponentTransfer>`);}if(typeof t.alphaBiLevel=="number"){let a=Fg(t.alphaBiLevel/100,0,1);o("pa6",`<feComponentTransfer in="__IN__" result="__OUT__"><feFuncA type="discrete" tableValues="${X$e(a)}"/></feComponentTransfer>`);}if(typeof t.artisticEffect=="string"&&/blur/i.test(t.artisticEffect)){let a=Math.max(0,(t.artisticRadius??0)/12700);a>0&&o("pb",`<feGaussianBlur in="__IN__" stdDeviation="${hr(a)}" result="__OUT__"/>`);}if(n.length===0)return null;let i=`imgfx-${e}`;return {defsXml:`<filter id="${i}" x="-10%" y="-10%" width="120%" height="120%">${n.join("")}</filter>`,filterId:i}}function Fg(t,e,n){return t<e?e:t>n?n:t}function W$e(t){return Fg(t,0,2)}function hr(t){return Number.isFinite(t)?Number(t.toFixed(4)).toString():"0"}function MB(t){return "1"}function X$e(t){let e=[];for(let n=0;n<10;n++)e.push(n/10>=t?"1":"0");return e.join(" ")}function Bw(t){let e=/^#?([0-9a-f]{6})/i.exec(t.trim());if(!e)return {r:0,g:0,b:0};let n=parseInt(e[1]??"000000",16);return {r:(n>>16&255)/255,g:(n>>8&255)/255,b:(n&255)/255}}function Mh(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function Xr(t){let e="";for(let[n,r]of Object.entries(t))r!==void 0&&r!==""&&(e+=` ${n}="${Mh(String(r))}"`);return e}function K$e(t){return {defaultFontFamily:t?.defaultFontFamily??"Arial",defaultFontSize:t?.defaultFontSize??18}}function q$e(t=0){return {defs:[],markerCache:new Map,markerIdCounter:0,slideIndex:t,filterCounter:0}}function IZ(t,e){let n=e,r=t.markerCache.get(n);if(r)return r;let o=`arrow_${++t.markerIdCounter}`,i=`<marker id="${o}" markerWidth="10" markerHeight="7" refX="10" refY="3.5" orient="auto" markerUnits="strokeWidth"><polygon points="0 0, 10 3.5, 0 7" fill="${Mh(e)}" /></marker>`;return t.defs.push(i),t.markerCache.set(n,o),o}function Z$e(t){let e=[];e.push(`translate(${t.x},${t.y})`),t.rotation&&e.push(`rotate(${t.rotation},${t.width/2},${t.height/2})`);let n="flipHorizontal"in t&&t.flipHorizontal,r="flipVertical"in t&&t.flipVertical;return (n||r)&&(e.push(`translate(${n?t.width:0},${r?t.height:0})`),e.push(`scale(${n?-1:1},${r?-1:1})`)),e.join(" ")}function NZ(t,e){if(t.type!=="text"&&t.type!=="shape"&&t.type!=="connector")return "";let n=t.text;if(!n)return "";let r=t.textSegments,o=t.textStyle,i=o?.fontFamily??e.defaultFontFamily,s=o?.fontSize??e.defaultFontSize,a=o?.color??"#000000",l=o?.align??"left",c="start",u=4;if(l==="center"?(c="middle",u=t.width/2):l==="right"&&(c="end",u=t.width-4),r&&r.length>0){let m=[];m.push(`<text${Xr({x:u,"text-anchor":c,"font-family":i,"font-size":s,fill:a})}>`);let g=s*1.2,x=true;for(let v of r){if(v.isParagraphBreak){g=s*1.2,x=true;continue}if(!v.text)continue;let S=v.style,w={};x&&(w.x=u,w.dy=g,x=false),S.fontFamily&&S.fontFamily!==i&&(w["font-family"]=S.fontFamily),S.fontSize&&S.fontSize!==s&&(w["font-size"]=S.fontSize),S.color&&S.color!==a&&(w.fill=S.color),S.bold&&(w["font-weight"]="bold"),S.italic&&(w["font-style"]="italic"),S.underline&&(w["text-decoration"]="underline"),m.push(`<tspan${Xr(w)}>${Mh(v.text)}</tspan>`);}return m.push("</text>"),m.join("")}let d=o?.bold,p=o?.italic,f=n.split(`
260
260
  `),h=[];h.push(`<text${Xr({x:u,"text-anchor":c,"font-family":i,"font-size":s,fill:a,"font-weight":d?"bold":void 0,"font-style":p?"italic":void 0})}>`);for(let m=0;m<f.length;m++)h.push(`<tspan${Xr({x:u,dy:s*1.2})}>${Mh(f[m])}</tspan>`);return h.push("</text>"),h.join("")}function DZ(t){if(t.type!=="shape"&&t.type!=="text")return "";let e="shapeStyle"in t?t.shapeStyle:void 0,n="shapeType"in t?t.shapeType:void 0,r=e?.fillColor??"none",o=e?.strokeColor??"none",i=e?.strokeWidth??(o!=="none"?1:0),s=e?.fillMode,a=r;s==="none"?a="none":s==="gradient"&&e?.fillGradient&&(a=e.fillGradientStops?.[0]?.color??r);let l=e?.fillOpacity,c=e?.strokeOpacity,u={fill:a,stroke:o,"stroke-width":i||void 0,"fill-opacity":l!==void 0?l:void 0,"stroke-opacity":c!==void 0?c:void 0},d="pathData"in t?t.pathData:void 0;if(d)return `<path${Xr({...u,d})} />`;switch(n){case "ellipse":case "oval":return `<ellipse${Xr({...u,cx:t.width/2,cy:t.height/2,rx:t.width/2,ry:t.height/2})} />`;case "triangle":case "isoTriangle":return `<polygon${Xr({...u,points:`${t.width/2},0 ${t.width},${t.height} 0,${t.height}`})} />`;case "diamond":return `<polygon${Xr({...u,points:`${t.width/2},0 ${t.width},${t.height/2} ${t.width/2},${t.height} 0,${t.height/2}`})} />`;default:return `<rect${Xr({...u,width:t.width,height:t.height,rx:n==="roundRect"?Math.min(t.width,t.height)*.1:void 0})} />`}}function J$e(t,e){if(t.type!=="image"&&t.type!=="picture")return "";let n=t.imageData;if(!n)return `<rect${Xr({width:t.width,height:t.height,fill:"#E0E0E0",stroke:"#999","stroke-width":1})} /><text${Xr({x:t.width/2,y:t.height/2,"text-anchor":"middle","font-size":12,fill:"#666"})}>image</text>`;let r=t.imageEffects?V$e(t.imageEffects,Q$e(e)):null,o=r?` filter="url(#${r.filterId})"`:"";return r&&e.defs.push(r.defsXml),`<image${Xr({width:t.width,height:t.height,preserveAspectRatio:"none"})} href="${Mh(n)}"${o} />`}function Q$e(t,e){let n=t.filterCounter++;return `${t.slideIndex}-${n}`}function e6e(t,e){if(t.type!=="connector")return "";let n=t.shapeStyle,r=n?.strokeColor??"#000000",o=n?.strokeWidth??1,i,s;return n?.connectorStartArrow&&n.connectorStartArrow!=="none"&&(i=`url(#${IZ(e,r)})`),n?.connectorEndArrow&&n.connectorEndArrow!=="none"&&(s=`url(#${IZ(e,r)})`),`<line${Xr({x1:0,y1:0,x2:t.width,y2:t.height,stroke:r,"stroke-width":o,"marker-start":i,"marker-end":s})} />`}function t6e(t,e){if(t.type!=="table")return "";let n=t.tableData;if(!n||!n.rows.length)return `<rect${Xr({width:t.width,height:t.height,fill:"#F0F0F0",stroke:"#CCC","stroke-width":1})} />`;let r=n.columnWidths,o=n.rows.length,i=t.height/o,s=[],a=0;for(let l of n.rows){let c=l.height??i,u=0;for(let d=0;d<l.cells.length;d++){let p=l.cells[d];if(p.vMerge||p.hMerge){u+=(r[d]??0)*t.width;continue}let f=(r[d]??1/l.cells.length)*t.width*(p.gridSpan??1),h=p.style?.backgroundColor??"none",m=p.style?.borderColor??"#CCCCCC",g=p.style?.color??"#000000",x=p.style?.fontSize??e.defaultFontSize,v=p.style?.bold;s.push(`<rect${Xr({x:u,y:a,width:f,height:c,fill:h,stroke:m,"stroke-width":.5})} />`),p.text&&s.push(`<text${Xr({x:u+4,y:a+c/2,"dominant-baseline":"central","font-family":e.defaultFontFamily,"font-size":x,fill:g,"font-weight":v?"bold":void 0})}>${Mh(p.text)}</text>`),u+=f;}a+=c;}return s.join("")}function n6e(t,e,n){if(t.type!=="group")return "";let r=[];for(let o of t.children)r.push(bne(o,e,n));return r.join("")}function r6e(t){if(t.type!=="ink")return "";let e=[];for(let n=0;n<t.inkPaths.length;n++){let r=t.inkPaths[n],o=t.inkColors?.[n]??"#000000",i=t.inkWidths?.[n]??1,s=t.inkOpacities?.[n];e.push(`<path${Xr({d:r,fill:"none",stroke:o,"stroke-width":i,"stroke-opacity":s,"stroke-linecap":"round"})} />`);}return e.join("")}function o6e(t){return `<rect${Xr({width:t.width,height:t.height,fill:"#F5F5F5",stroke:"#CCCCCC","stroke-width":1,"stroke-dasharray":"4 2"})} /><text${Xr({x:t.width/2,y:t.height/2,"text-anchor":"middle","dominant-baseline":"central","font-family":"Arial","font-size":11,fill:"#999999"})}>${Mh(t.type)}</text>`}function bne(t,e,n){if(t.hidden)return "";let r=Z$e(t),o=t.opacity,i="";switch(t.type){case "text":i=DZ(t)+NZ(t,e);break;case "shape":i=DZ(t)+NZ(t,e);break;case "connector":i=e6e(t,n);break;case "image":case "picture":i=J$e(t,n);break;case "table":i=t6e(t,e);break;case "group":i=n6e(t,e,n);break;case "ink":i=r6e(t);break;case "chart":case "smartArt":case "ole":case "media":case "contentPart":case "zoom":case "model3d":case "unknown":i=o6e(t);break}return i?`<g${Xr({transform:r,opacity:o!==void 0&&o<1?o:void 0})}>${i}</g>`:""}function i6e(t,e,n){if(t.backgroundImage)return `<rect${Xr({width:e,height:n,fill:"#FFFFFF"})} /><image${Xr({width:e,height:n,preserveAspectRatio:"xMidYMid slice"})} href="${Mh(t.backgroundImage)}" />`;let r=t.backgroundColor??"#FFFFFF";return `<rect${Xr({width:e,height:n,fill:r})} />`}var U_e,td,V_e,W_e,X_e,j_e,Y_e,K_e,q_e,Z_e,LZ,Ku,PB,sMe,VO,aMe,lMe,cMe,uMe,dMe,Dw,uA,GZ,VZ,WZ,XZ,jZ,YZ,KZ,JZ,QZ,eJ,tJ,nJ,rJ,oJ,AB,iJ,sJ,dA,RMe,aJ,Qw,XO,Ir,DMe,LMe,pA,FMe,BMe,cJ,OMe,uJ,kB,IB,UMe,dJ,$Me,HMe,zMe,GMe,VMe,WMe,qMe,ZMe,JMe,QMe,hEe,mEe,gEe,xEe,yEe,bEe,vEe,hJ,SEe,xJ,yJ,bJ,BEe,OEe,UEe,wJ,CJ,TJ,_J,MJ,PJ,AJ,RJ,kJ,IJ,NJ,DJ,LJ,FJ,eC,_A,VEe,WEe,GJ,VJ,WJ,aPe,lPe,cPe,KJ,ZO,yB,wPe,qJ,EA,CPe,TPe,_Pe,ZJ,JJ,QJ,eQ,kPe,IPe,NPe,BPe,iQ,sQ,aQ,GPe,lQ,QO,uQ,dQ,BB,Bq,pQ,XPe,jPe,YPe,KPe,fQ,qPe,ZPe,JPe,QPe,eAe,tAe,nAe,hQ,mQ,yQ,ZP,OB,aAe,lAe,cAe,uAe,Oq,UB,fAe,hAe,mAe,gAe,xAe,yAe,SAe,NAe,DAe,LAe,FAe,GAe,zg,o4,gA,nd,rd,wRe,TRe,_Re,bA,jQ,YQ,tee,xke,Wq,FA,KB,Ch,yke,bke,Pg,vke,qB,eA,zw,Ng,ZB,iee,Es,Zq,Zke,UA,NP,xee,tIe,yee,JB,QB,bee,Jq,iIe,sIe,DP,Qq,HA,Pee,Aee,Ree,kee,Iee,gIe,yIe,LP,tZ,bIe,vIe,SIe,wIe,HIe,zIe,eb,BP,eNe,tNe,Tp,$ee,bh,nNe,rNe,Gw,Hee,zee,VA,WA,XA,U4,Gee,lNe,cNe,uNe,Og,Ug,dNe,Wee,wNe,ENe,aZ,UNe,GNe,qNe,tDe,Fw,pDe,fDe,hDe,mDe,gDe,SDe,wDe,CDe,TDe,_De,MDe,EDe,Mp,FDe,BDe,ODe,UDe,$De,HDe,zDe,GDe,vB,VDe,WDe,XDe,jDe,Yu,YDe,KDe,qDe,ZDe,t5e,n5e,o5e,s5e,Zee,fZ,l5e,f5e,ete,S5e,w5e,C5e,T5e,_5e,M5e,E5e,P5e,A5e,R5e,k5e,I5e,N5e,L5e,F5e,O5e,$5e,H5e,z5e,X5e,j5e,Y5e,K5e,q5e,Z5e,J5e,Q5e,eLe,tLe,nLe,hZ,mZ,rLe,oLe,gZ,xZ,yZ,iLe,sLe,aLe,lLe,cLe,uLe,dLe,pLe,fLe,hLe,bZ,mLe,gLe,xLe,yLe,bLe,vLe,SLe,wLe,CLe,TLe,_Le,MLe,ELe,PLe,ALe,RLe,kLe,ILe,NLe,DLe,H4,LLe,ate,FLe,kp,ULe,$Le,rs,eFe,G4,fte,V4,nFe,rFe,oFe,iFe,sFe,aFe,lFe,cFe,uFe,dFe,pFe,fFe,hFe,mFe,lC,gFe,xFe,yFe,bFe,vFe,SFe,wFe,CFe,TFe,_Fe,MFe,EFe,PFe,AFe,RFe,kFe,IFe,NFe,DFe,LFe,FFe,BFe,OFe,UFe,$Fe,HFe,cC,zFe,GFe,VFe,WFe,XFe,jFe,YFe,KFe,qFe,qA,ZFe,JFe,QFe,e3e,t3e,n3e,r3e,o3e,i3e,s3e,a3e,od,l3e,c3e,u3e,d3e,p3e,f3e,h3e,m3e,g3e,x3e,y3e,ub,b3e,v3e,S3e,w3e,C3e,T3e,_3e,M3e,E3e,P3e,A3e,R3e,k3e,I3e,N3e,D3e,L3e,F3e,B3e,O3e,U3e,$3e,H3e,z3e,G3e,V3e,W3e,X3e,j3e,Ip,K3e,q3e,Z3e,J3e,Q3e,eBe,tBe,nBe,rBe,oBe,iBe,sBe,aBe,gte,yO,bO,lBe,cBe,uBe,dBe,pBe,fBe,hBe,mBe,gBe,xBe,yBe,bBe,vBe,SBe,wBe,CBe,TBe,_Be,kh,MBe,EBe,PBe,ABe,RBe,kBe,IBe,NBe,DBe,LBe,FBe,pb,BBe,OBe,UBe,$Be,yte,vO,SO,HBe,zBe,GBe,VBe,hb,WBe,XBe,jBe,YBe,KBe,qBe,ZBe,JBe,QBe,eOe,tOe,sa,nOe,rOe,oOe,iOe,sOe,aOe,lOe,cOe,uOe,dOe,pOe,fOe,hOe,mOe,gOe,xOe,yOe,bOe,vOe,SOe,wOe,COe,TOe,_Oe,MOe,EOe,POe,AOe,ROe,kOe,aA,NOe,DOe,W4,LOe,FOe,BOe,OOe,Zo,a4e,l4e,XP,Zy,hh,c4e,u4e,d4e,TO,Zw,$te,Hte,zte,Gte,_O,iUe,wUe,DUe,LUe,FUe,BUe,OUe,UUe,$Ue,HUe,iR,zUe,dU,pU,GUe,JUe,dne,e$e,hne,n$e,mne,s$e,a$e,l$e,c$e,u$e,d$e,p$e,f$e,h$e,m$e,g$e,x$e,y$e,v$e,gne,YP,T$e,_$e,AZ,k$e,I$e,yne,U$e,H$e,z$e,G$e,j$e,Y$e,hU,Lt=Ct(()=>{nq();fB();fB();U_e={push:["l","r","u","d"],wipe:["l","r","u","d"],cover:["l","r","u","d","lu","ld","ru","rd"],uncover:["l","r","u","d","lu","ld","ru","rd"],pull:["l","r","u","d","lu","ld","ru","rd"],strips:["lu","ld","ru","rd"],split:["in","out"],blinds:["horz","vert"],checker:["horz","vert"],comb:["horz","vert"],randomBar:["horz","vert"]};td=["dk1","lt1","dk2","lt2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],V_e={id:"office",name:"Office",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#44546A",lt2:"#E7E6E6",accent1:"#4472C4",accent2:"#ED7D31",accent3:"#A5A5A5",accent4:"#FFC000",accent5:"#5B9BD5",accent6:"#70AD47",hlink:"#0563C1",folHlink:"#954F72"},fontScheme:{majorFont:{latin:"Calibri Light"},minorFont:{latin:"Calibri"}}},W_e={id:"facet",name:"Facet",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#2C3E50",lt2:"#DADEDF",accent1:"#90C226",accent2:"#54A021",accent3:"#E6B91E",accent4:"#E76618",accent5:"#C42F1A",accent6:"#918655",hlink:"#99CA3C",folHlink:"#B9D181"},fontScheme:{majorFont:{latin:"Trebuchet MS"},minorFont:{latin:"Trebuchet MS"}}},X_e={id:"integral",name:"Integral",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#335B74",lt2:"#DFE3E5",accent1:"#1CADE4",accent2:"#2683C6",accent3:"#27CED7",accent4:"#42BA97",accent5:"#3E8853",accent6:"#62A39F",hlink:"#6BB76D",folHlink:"#B5D1CC"},fontScheme:{majorFont:{latin:"Tw Cen MT Condensed"},minorFont:{latin:"Tw Cen MT"}}},j_e={id:"ion",name:"Ion",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#1B1D2C",lt2:"#D4D4D8",accent1:"#B01513",accent2:"#EA6312",accent3:"#E6B729",accent4:"#6AAC90",accent5:"#54849A",accent6:"#9E5E9B",hlink:"#58C1BA",folHlink:"#F4B183"},fontScheme:{majorFont:{latin:"Century Gothic"},minorFont:{latin:"Century Gothic"}}},Y_e={id:"organic",name:"Organic",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#4A3B2A",lt2:"#E8DED1",accent1:"#83992A",accent2:"#3C9770",accent3:"#44709D",accent4:"#A23C33",accent5:"#D97828",accent6:"#DEB340",hlink:"#A0B552",folHlink:"#C4A656"},fontScheme:{majorFont:{latin:"Garamond"},minorFont:{latin:"Garamond"}}},K_e={id:"retrospect",name:"Retrospect",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#637052",lt2:"#CCD1B9",accent1:"#E48312",accent2:"#BD582C",accent3:"#865640",accent4:"#9B8357",accent5:"#C2BC80",accent6:"#94A088",hlink:"#E48312",folHlink:"#BD582C"},fontScheme:{majorFont:{latin:"Calibri Light"},minorFont:{latin:"Calibri"}}},q_e={id:"slate",name:"Slate",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#212745",lt2:"#B4B7C8",accent1:"#4E67C8",accent2:"#5ECCF3",accent3:"#A7EA52",accent4:"#5DCEAF",accent5:"#FF8021",accent6:"#F14124",hlink:"#56C7AA",folHlink:"#59A8D1"},fontScheme:{majorFont:{latin:"Century Gothic"},minorFont:{latin:"Century Gothic"}}},Z_e={id:"metropolitan",name:"Metropolitan",colorScheme:{dk1:"#000000",lt1:"#FFFFFF",dk2:"#162F3A",lt2:"#E0E9ED",accent1:"#1FA7DA",accent2:"#FF5C15",accent3:"#FFBA00",accent4:"#FD625E",accent5:"#945ECF",accent6:"#13A10E",hlink:"#1FA7DA",folHlink:"#945ECF"},fontScheme:{majorFont:{latin:"Calibri Light"},minorFont:{latin:"Calibri"}}},LZ=[V_e,W_e,X_e,j_e,Y_e,K_e,q_e,Z_e],Ku=6e4;PB=0;sMe={text:{x:100,y:100,width:600,height:50},shape:{x:200,y:200,width:300,height:200},image:{x:100,y:100,width:400,height:300},table:{x:50,y:150,width:860,height:200},chart:{x:100,y:150,width:600,height:400},connector:{x:100,y:100,width:200,height:0},media:{x:100,y:100,width:480,height:270},group:{x:0,y:0,width:600,height:400}};VO=class{slide;constructor(t,e,n){this.slide={id:`slide${t}`,rId:`rId${t+1}`,slideNumber:t,elements:[],layoutPath:e??"ppt/slideLayouts/slideLayout1.xml",layoutName:n??"Title Slide"};}addText(t,e){return this.slide.elements.push(BO(t,e)),this}addShape(t,e){return this.slide.elements.push(OO(t,e)),this}addConnector(t){return this.slide.elements.push(UO(t)),this}addImage(t,e){return this.slide.elements.push($O(t,e)),this}addTable(t,e){return this.slide.elements.push(HO(t,e)),this}addChart(t,e,n){return this.slide.elements.push(Jw(t,e,n)),this}addMedia(t,e,n){return this.slide.elements.push(zO(t,e,n)),this}addGroup(t,e){return this.slide.elements.push(GO(t,e)),this}addElement(t){return this.slide.elements.push(t),this}setBackground(t){switch(t.type){case "solid":this.slide.backgroundColor=t.color;break;case "gradient":{let e=t.stops.map(n=>`${n.color} ${Math.round(n.position*100)}%`).join(", ");this.slide.backgroundGradient=`linear-gradient(${t.angle??180}deg, ${e})`;break}case "image":this.slide.backgroundImage=t.source;break}return this}setTransition(t){return this.slide.transition={type:t.type,durationMs:t.duration??500,direction:t.direction,advanceAfterMs:t.advanceAfterMs},this}addAnimation(t,e){return this.slide.animations||(this.slide.animations=[]),this.slide.animations.push({elementId:t,entrance:e.preset,trigger:e.trigger??"onClick",durationMs:e.duration??500,delayMs:e.delay??0}),this}setNotes(t){return this.slide.notes=t,this}setHidden(t){return this.slide.hidden=t,this}setSection(t,e){return this.slide.sectionName=t,this.slide.sectionId=e,this}addFreeform(t,e){return this.slide.elements.push(zZ(t,e)),this}addBuilderElement(t){return this.slide.elements.push(t.build()),this}removeElement(t){return this.slide.elements=this.slide.elements.filter(e=>e.id!==t),this}getElements(){return this.slide.elements}get elementCount(){return this.slide.elements.length}getLastElement(){return this.slide.elements[this.slide.elements.length-1]}setName(t){return this.slide.name=t,this}build(){return this.slide}},aMe=12192e3,lMe=6858e3,cMe={dk1:"#000000",lt1:"#FFFFFF",dk2:"#44546A",lt2:"#E7E6E6",accent1:"#4472C4",accent2:"#ED7D31",accent3:"#A5A5A5",accent4:"#FFC000",accent5:"#5B9BD5",accent6:"#70AD47",hlink:"#0563C1",folHlink:"#954F72"},uMe="Calibri Light",dMe="Calibri";Dw=[{name:"Title Slide",type:"title"},{name:"Title and Content",type:"obj"},{name:"Section Header",type:"secHead"},{name:"Two Content",type:"twoObj"},{name:"Comparison",type:"twoTxTwoObj"},{name:"Title Only",type:"titleOnly"},{name:"Blank",type:"blank"},{name:"Content with Caption",type:"objTx"},{name:"Picture with Caption",type:"picTx"},{name:"Title and Vertical Text",type:"vertTx"},{name:"Vertical Title and Text",type:"vertTitleAndTx"}];uA=class{constructor(){}static async create(t){let e=t?.width??aMe,n=t?.height??lMe,r=t?.theme?.name??"Office Theme",o={...cMe,...t?.theme?.colors},i=t?.theme?.fonts?.majorFont??uMe,s=t?.theme?.fonts?.minorFont??dMe,a=Dw.length,l=Math.max(0,t?.initialSlideCount??0),c=Dw.findIndex(m=>m.type==="blank")+1||7,u=new jg;u.file("[Content_Types].xml",fMe(a,l)),u.file("_rels/.rels",hMe()),u.file("ppt/presentation.xml",mMe(e,n,l)),u.file("ppt/_rels/presentation.xml.rels",gMe(a,l)),u.file("ppt/slideMasters/slideMaster1.xml",xMe(a)),u.file("ppt/slideMasters/_rels/slideMaster1.xml.rels",yMe(a));for(let m=0;m<a;m++){let g=Dw[m];u.file(`ppt/slideLayouts/slideLayout${m+1}.xml`,bMe(g.name,g.type)),u.file(`ppt/slideLayouts/_rels/slideLayout${m+1}.xml.rels`,vMe());}for(let m=0;m<l;m++)u.file(`ppt/slides/slide${m+1}.xml`,SMe()),u.file(`ppt/slides/_rels/slide${m+1}.xml.rels`,wMe(c));u.file("ppt/theme/theme1.xml",CMe(r,o,i,s)),u.file("ppt/presProps.xml",TMe()),u.file("ppt/viewProps.xml",_Me()),u.file("ppt/tableStyles.xml",MMe()),u.file("docProps/core.xml",EMe(t?.title,t?.creator)),u.file("docProps/app.xml",PMe(l));let d=await u.generateAsync({type:"arraybuffer"}),p=new kp,f=await p.load(d);return {handler:p,data:f,createSlide:m=>{let g=f.slides.length+1,x=Dw.findIndex(w=>w.name===m)+1||7,v=`ppt/slideLayouts/slideLayout${x}.xml`,S=m??Dw[x-1]?.name??"Blank";return new VO(g,v,S)}}}},GZ=class{context;constructor(t){this.context=t;}createXmlElement(t){let{element:e}=t,n=e.shapeType&&e.shapeType!=="line"?this.context.normalizePresetGeometry(e.shapeType):"straightConnector1",r=e.shapeStyle?.strokeColor||"#1F2937",o=Math.max(1,e.shapeStyle?.strokeWidth||1),i={"@_w":String(Math.round(o*this.context.emuPerPx))};r==="transparent"||o<=0?i["a:noFill"]={}:i["a:solidFill"]={"a:srgbClr":{"@_val":r.replace("#","")}},e.shapeStyle?.strokeDash&&(e.shapeStyle.strokeDash==="solid"?(delete i["a:prstDash"],delete i["a:custDash"]):e.shapeStyle.strokeDash==="custom"?(delete i["a:prstDash"],e.shapeStyle.customDashSegments&&e.shapeStyle.customDashSegments.length>0?i["a:custDash"]={"a:ds":e.shapeStyle.customDashSegments.map(l=>({"@_d":String(l.dash),"@_sp":String(l.space)}))}:i["a:custDash"]={"a:ds":{"@_d":"200000","@_sp":"200000"}}):(i["a:prstDash"]={"@_val":e.shapeStyle.strokeDash},delete i["a:custDash"])),e.shapeStyle?.connectorStartArrow&&e.shapeStyle.connectorStartArrow!=="none"&&(i["a:headEnd"]={"@_type":e.shapeStyle.connectorStartArrow}),e.shapeStyle?.connectorEndArrow&&e.shapeStyle.connectorEndArrow!=="none"&&(i["a:tailEnd"]={"@_type":e.shapeStyle.connectorEndArrow});let s={};e.shapeStyle?.connectorStartConnection?.shapeId&&(s["a:stCxn"]={"@_id":e.shapeStyle.connectorStartConnection.shapeId,"@_idx":String(e.shapeStyle.connectorStartConnection.connectionSiteIndex??0)}),e.shapeStyle?.connectorEndConnection?.shapeId&&(s["a:endCxn"]={"@_id":e.shapeStyle.connectorEndConnection.shapeId,"@_idx":String(e.shapeStyle.connectorEndConnection.connectionSiteIndex??0)});let a=this.context.getNextId();return {"p:nvCxnSpPr":{"p:cNvPr":{"@_id":String(a),"@_name":`Connector ${a}`},"p:cNvCxnSpPr":s,"p:nvPr":{}},"p:spPr":{"a:xfrm":{"a:off":{"@_x":String(Math.round(e.x*this.context.emuPerPx)),"@_y":String(Math.round(e.y*this.context.emuPerPx))},"a:ext":{"@_cx":String(Math.round(e.width*this.context.emuPerPx)),"@_cy":String(Math.round(e.height*this.context.emuPerPx))},"@_rot":e.rotation?String(Math.round(e.rotation*6e4)):void 0,"@_flipH":e.flipHorizontal?"1":void 0,"@_flipV":e.flipVertical?"1":void 0},"a:prstGeom":{"@_prst":n,"a:avLst":{}},"a:ln":i}}}},VZ=class{context;constructor(t){this.context=t;}createXmlElement(t){let{element:e,relationshipId:n}=t,r=this.context.getNextId(),o=e.mediaType==="audio"?"audio":"video",i=o==="audio"?"Audio":"Video",s=o==="audio"?"a:audioFile":"a:videoFile",a=e.isLinked?"@_r:link":"@_r:embed";return {"p:nvGraphicFramePr":{"p:cNvPr":{"@_id":String(r),"@_name":`${i} ${r}`},"p:cNvGraphicFramePr":{},"p:nvPr":{}},"p:xfrm":{"a:off":{"@_x":String(Math.round(e.x*this.context.emuPerPx)),"@_y":String(Math.round(e.y*this.context.emuPerPx))},"a:ext":{"@_cx":String(Math.round(e.width*this.context.emuPerPx)),"@_cy":String(Math.round(e.height*this.context.emuPerPx))},"@_rot":e.rotation?String(Math.round(e.rotation*6e4)):void 0,"@_flipH":e.flipHorizontal?"1":void 0,"@_flipV":e.flipVertical?"1":void 0},"a:graphic":{"a:graphicData":{"@_uri":"http://schemas.openxmlformats.org/drawingml/2006/media",[s]:{[a]:n}}}}}},WZ=class{context;constructor(t){this.context=t;}createXmlElement(t){let{element:e,relationshipId:n}=t,r=this.context.getNextId();return {"p:nvPicPr":{"p:cNvPr":{"@_id":String(r),"@_name":`Picture ${r}`},"p:cNvPicPr":{},"p:nvPr":{}},"p:blipFill":{"a:blip":{"@_r:embed":n},"a:stretch":{"a:fillRect":{}}},"p:spPr":{"a:xfrm":{"a:off":{"@_x":String(Math.round(e.x*this.context.emuPerPx)),"@_y":String(Math.round(e.y*this.context.emuPerPx))},"a:ext":{"@_cx":String(Math.round(e.width*this.context.emuPerPx)),"@_cy":String(Math.round(e.height*this.context.emuPerPx))},"@_rot":e.rotation?String(Math.round(e.rotation*6e4)):void 0,"@_flipH":e.flipHorizontal?"1":void 0,"@_flipV":e.flipVertical?"1":void 0},"a:prstGeom":{"@_prst":"rect","a:avLst":{}}}}}},XZ=class{context;constructor(t){this.context=t;}createXmlElement(t){let{element:e}=t,n=e.type==="text",r=n?"TextBox":"Rectangle",o=this.context.normalizePresetGeometry(e.shapeType),i=Object.entries(e.shapeAdjustments||{}).filter(([l,c])=>l.trim().length>0&&Number.isFinite(c)),s=i.length>0?{"a:gd":i.map(([l,c])=>({"@_name":l,"@_fmla":`val ${Math.round(c)}`}))}:{},a=this.context.getNextId();return {"p:nvSpPr":{"p:cNvPr":{"@_id":String(a),"@_name":`${r} ${a}`},"p:cNvSpPr":{"@_txBox":n?"1":"0"},"p:nvPr":{}},"p:spPr":{"a:xfrm":{"a:off":{"@_x":String(Math.round(e.x*this.context.emuPerPx)),"@_y":String(Math.round(e.y*this.context.emuPerPx))},"a:ext":{"@_cx":String(Math.round(e.width*this.context.emuPerPx)),"@_cy":String(Math.round(e.height*this.context.emuPerPx))},"@_rot":e.rotation?String(Math.round(e.rotation*6e4)):void 0,"@_flipH":e.flipHorizontal?"1":void 0,"@_flipV":e.flipVertical?"1":void 0},"a:prstGeom":{"@_prst":o,"a:avLst":s}},"p:txBody":{"a:bodyPr":{"@_wrap":"square","@_anchor":this.context.toDrawingTextVerticalAlign(e.textStyle?.vAlign)},"a:lstStyle":{},"a:p":[{"a:r":{"a:rPr":{"@_lang":"en-US"},"a:t":n?e.text:""}}]}}}},jZ=class{createTextShapeFactory(t){return new XZ(t)}createConnectorFactory(t){return new GZ(t)}createPictureFactory(t){return new WZ(t)}createMediaGraphicFrameFactory(t){return new VZ(t)}},YZ=class{emuPerPx;toDrawingTextVerticalAlign;nextId=1e4;textShapeXmlFactory;connectorXmlFactory;pictureXmlFactory;mediaGraphicFrameXmlFactory;constructor(t){this.emuPerPx=t.emuPerPx,this.toDrawingTextVerticalAlign=t.toDrawingTextVerticalAlign;let e=t.factoryProvider||new jZ,n={emuPerPx:this.emuPerPx,getNextId:()=>this.getNextId(),normalizePresetGeometry:r=>this.normalizePresetGeometry(r),toDrawingTextVerticalAlign:r=>this.toDrawingTextVerticalAlign(r)};this.textShapeXmlFactory=e.createTextShapeFactory(n),this.connectorXmlFactory=e.createConnectorFactory(n),this.pictureXmlFactory=e.createPictureFactory(n),this.mediaGraphicFrameXmlFactory=e.createMediaGraphicFrameFactory(n);}resetIdCounter(t){this.nextId=t;}getNextId(){return this.nextId++}normalizePresetGeometry(t){return t?t==="cylinder"?"can":/^[A-Za-z][A-Za-z0-9_]*$/.test(t)?t:"rect":"rect"}createElementXml(t){return this.textShapeXmlFactory.createXmlElement({element:t})}createConnectorXml(t){return this.connectorXmlFactory.createXmlElement({element:t})}createPictureXml(t,e){return this.pictureXmlFactory.createXmlElement({element:t,relationshipId:e})}createMediaGraphicFrameXml(t,e){return this.mediaGraphicFrameXmlFactory.createXmlElement({element:t,relationshipId:e})}},KZ=class KP{mimeByExtension={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",tiff:"image/tiff",svg:"image/svg+xml",emf:"image/x-emf",wmf:"image/x-wmf",mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",ogv:"video/ogg",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mp3:"audio/mpeg",m4a:"audio/mp4",wav:"audio/wav",ogg:"audio/ogg",oga:"audio/ogg",wma:"audio/x-ms-wma",flac:"audio/flac"};applySlideAndMediaUpdates(e){let n=this.ensureTypesRoot(e.contentTypesData),r=this.ensureArray(n.Default),o=this.ensureArray(n.Override),i=new Set(e.slidePaths.map(l=>this.normalizePartName(l.startsWith("/")?l.substring(1):l))),s=o.filter(l=>{if(l?.["@_ContentType"]!==e.slideContentType)return true;let c=l?.["@_PartName"];return typeof c!="string"?false:i.has(this.normalizePartName(c))}),a=new Set;for(let l of s){if(l?.["@_ContentType"]!==e.slideContentType)continue;let c=l?.["@_PartName"];typeof c=="string"&&a.add(this.normalizePartName(c));}for(let l of i)a.has(l)||s.push({"@_PartName":l,"@_ContentType":e.slideContentType});return this.applyMediaDefaults(r,e.usedMediaPaths),n.Default=r,n.Override=s,e.contentTypesData.Types=n,e.contentTypesData}applyCommentUpdates(e){let n=this.ensureTypesRoot(e.contentTypesData),r=this.ensureArray(n.Default),o=this.ensureArray(n.Override),i=new Set(Array.from(e.activeCommentPaths).map(c=>this.normalizePartName(c))),s=o.filter(c=>{let u=String(c?.["@_ContentType"]||""),d=c?.["@_PartName"],p=typeof d=="string"?this.normalizePartName(d):void 0;return p?u===e.commentContentType?i.has(p):u===e.commentAuthorContentType?e.hasCommentAuthors&&p===e.commentAuthorsPartName:true:true}),a=new Set,l=false;for(let c of s){let u=String(c?.["@_ContentType"]||""),d=c?.["@_PartName"];if(typeof d!="string")continue;let p=this.normalizePartName(d);u===e.commentContentType&&a.add(p),u===e.commentAuthorContentType&&p===e.commentAuthorsPartName&&(l=true);}for(let c of i)a.has(c)||s.push({"@_PartName":c,"@_ContentType":e.commentContentType});return e.hasCommentAuthors&&!l&&s.push({"@_PartName":e.commentAuthorsPartName,"@_ContentType":e.commentAuthorContentType}),n.Default=r,n.Override=s,e.contentTypesData.Types=n,e.contentTypesData}applyMediaDefaults(e,n){let r=new Set;for(let o of e){let i=o?.["@_Extension"];typeof i=="string"&&r.add(i.toLowerCase());}for(let o of n){let i=o.split(".").pop()?.toLowerCase();if(!i||r.has(i))continue;let s=this.mimeByExtension[i];s&&(e.push({"@_Extension":i,"@_ContentType":s}),r.add(i));}}ensureTypesRoot(e){return e.Types||{}}ensureArray(e){return Array.isArray(e)?e:e==null?[]:[e]}normalizePartName(e){return e.startsWith("/")?e:`/${e}`}static CUSTOM_XML_CONTENT_TYPE="application/vnd.openxmlformats-officedocument.customXmlProperties+xml";applyCustomXmlUpdates(e){if(e.customXmlParts.length===0)return;let n=this.ensureTypesRoot(e.contentTypesData),r=this.ensureArray(n.Override),o=new Set;for(let i of r){let s=i?.["@_PartName"];typeof s=="string"&&o.add(this.normalizePartName(s));}for(let i of e.customXmlParts){if(!i.properties)continue;let s=this.normalizePartName(`customXml/itemProps${i.id}.xml`);o.has(s)||(r.push({"@_PartName":s,"@_ContentType":KP.CUSTOM_XML_CONTENT_TYPE}),o.add(s));}n.Override=r,e.contentTypesData.Types=n;}static PRESENTATION_CONTENT_TYPES={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml"};static VBA_PROJECT_CONTENT_TYPE="application/vnd.ms-office.vbaProject";applyOutputFormatOverride(e,n,r){if(n==="pptx")return;let o=this.ensureTypesRoot(e),i=this.ensureArray(o.Override),s=KP.PRESENTATION_CONTENT_TYPES[n];for(let a of i){let l=String(a?.["@_PartName"]||"");if(this.normalizePartName(l)==="/ppt/presentation.xml"){a["@_ContentType"]=s;break}}if(n==="pptm"&&r){let a="/ppt/vbaProject.bin";i.some(c=>{let u=String(c?.["@_PartName"]||"");return this.normalizePartName(u)===a})||i.push({"@_PartName":a,"@_ContentType":KP.VBA_PROJECT_CONTENT_TYPE});}o.Override=i,e.Types=o;}};JZ=class{applySaveOptions(t){let e=t.presentationData["p:presentation"];return e&&(this.applyHeaderFooter(e,t.options?.headerFooter),this.applySlideDimensions(e,t.rawSlideWidthEmu,t.rawSlideHeightEmu,t.rawSlideSizeType),this.applyCustomShows(e,t.options?.customShows),this.applySections(e,t.options?.sections,t.xmlLookupService),this.applyPhotoAlbum(e,t.options?.photoAlbum),this.applyKinsoku(e,t.options?.kinsoku),this.applyModifyVerifier(e,t.options?.modifyVerifier),t.presentationData["p:presentation"]=e),t.presentationData}applyHeaderFooter(t,e){t["p:hf"]!==void 0&&delete t["p:hf"];}applySlideDimensions(t,e,n,r){let o=t["p:sldSz"];o&&(e<=0&&n<=0||(e>0&&(o["@_cx"]=String(e)),n>0&&(o["@_cy"]=String(n)),r&&(o["@_type"]=r)));}applyCustomShows(t,e){!e||e.length===0||(t["p:custShowLst"]={"p:custShow":e.map(n=>({"@_name":n.name,"@_id":String(n.id),"p:sldLst":{"p:sld":n.slideRIds.map(r=>({"@_r:id":r}))}}))});}applySections(t,e,n){if(!e||e.length===0)return;let r={"p14:section":e.map(a=>{let l={"@_name":a.name,"@_id":a.id,"p14:sldIdLst":{"p14:sldId":a.slideIds.map(c=>({"@_id":c}))}};if(a.collapsed||a.color){let c={};a.collapsed&&(c["@_collapsed"]="1"),a.color&&(c["@_clr"]=a.color.replace("#","")),l["p15:sectionPr"]=c;}return l})},o=false,i=n.getChildByLocalName(t,"extLst");if(i){let a=n.getChildrenArrayByLocalName(i,"ext");for(let l of a)if(n.getChildByLocalName(l,"sectionLst")){for(let c of Object.keys(l))if(c.split(":").pop()==="sectionLst"){l[c]=r,o=true;break}if(o)break}}if(o)return;let s=Object.keys(t).find(a=>a.split(":").pop()==="sectionLst");s&&(t[s]=r);}applyPhotoAlbum(t,e){if(!e)return;let n=t["p:photoAlbum"]||{};e.bw!==void 0&&(n["@_bw"]=e.bw?"1":"0"),e.showCaptions!==void 0&&(n["@_showCaptions"]=e.showCaptions?"1":"0"),e.layout!==void 0&&(n["@_layout"]=e.layout),e.frame!==void 0&&(n["@_frame"]=e.frame),t["p:photoAlbum"]=n;}applyKinsoku(t,e){ZZ(t,e);}applyModifyVerifier(t,e){if(e===null){delete t["p:modifyVerifier"];return}if(!e)return;let n={};e.algorithmName!==void 0&&(n["@_algorithmName"]=e.algorithmName),e.hashData!==void 0&&(n["@_hashData"]=e.hashData),e.saltData!==void 0&&(n["@_saltData"]=e.saltData),e.spinValue!==void 0&&(n["@_spinValue"]=String(e.spinValue)),e.algIdExt!==void 0&&(n["@_algIdExt"]=e.algIdExt),e.cryptAlgorithmSid!==void 0&&(n["@_cryptAlgorithmSid"]=String(e.cryptAlgorithmSid)),e.cryptAlgorithmType!==void 0&&(n["@_cryptAlgorithmType"]=e.cryptAlgorithmType),e.cryptProvider!==void 0&&(n["@_cryptProvider"]=e.cryptProvider),e.cryptProviderType!==void 0&&(n["@_cryptProviderType"]=e.cryptProviderType),e.cryptAlgorithmClass!==void 0&&(n["@_cryptAlgorithmClass"]=e.cryptAlgorithmClass),t["p:modifyVerifier"]=n;}},QZ=class{async reconcile(t){let e=await t.zip.file("ppt/_rels/presentation.xml.rels")?.async("string"),n=e?t.parser.parse(e):{Relationships:{"@_xmlns":t.relationshipsNamespace,Relationship:[]}},r=n.Relationships||{};r["@_xmlns"]||(r["@_xmlns"]=t.relationshipsNamespace);let o=this.ensureArray(r.Relationship),i=new Set,s=[],a=new Map;for(let h of o){let m=h?.["@_Id"],g=h?.["@_Target"],x=h?.["@_Type"];if(typeof m=="string"&&m.length>0&&i.add(m),x===t.slideRelationshipType&&typeof m=="string"&&typeof g=="string"){a.set(m,g);continue}s.push(h);}let l=()=>{let h=1;for(;i.has(`rId${h}`);)h+=1;let m=`rId${h}`;return i.add(m),m},c=t.presentationData?.["p:presentation"]?t.presentationData["p:presentation"]:null,u=c?c["p:sldIdLst"]||{}:null,d=u?this.ensureArray(u["p:sldId"]):[],p=new Map,f=255;for(let h of d){let m=h?.["@_r:id"];typeof m=="string"&&m.length>0&&p.set(m,h);let g=Number.parseInt(String(h?.["@_id"]??""),10);Number.isFinite(g)&&(f=Math.max(f,g));}for(let h=0;h<t.slides.length;h++){let m=t.slides[h];if(m.slideNumber=h+1,t.slideMap.get(m.id)){!m.rId||m.rId.length===0||!a.has(m.rId)?m.rId=l():i.add(m.rId),a.set(m.rId,t.toPresentationTarget(m.id));continue}await this.attachNewSlide({input:t,slide:m,usedRIds:i,slideTargetByRid:a,nextRelationshipId:l});}this.removeInactiveSlides({input:t,activeSlidePaths:new Set(t.slides.map(h=>h.id)),slideTargetByRid:a}),r.Relationship=[...s,...t.slides.map(h=>({"@_Id":h.rId,"@_Type":t.slideRelationshipType,"@_Target":t.toPresentationTarget(h.id)}))],n.Relationships=r,t.zip.file("ppt/_rels/presentation.xml.rels",t.xmlBuilder.build(n)),c&&u&&t.presentationData&&(u["p:sldId"]=t.slides.map(h=>{let m=p.get(h.rId);return m||(f+=1,{"@_id":String(f),"@_r:id":h.rId})}),t.presentationData["p:presentation"]=this.insertSlideIdListInOrder(c,u));}insertSlideIdListInOrder(t,e){let n=new Set(["p:sldMasterIdLst","p:notesMasterIdLst","p:handoutMasterIdLst"]),r={},o=false;for(let i of Object.keys(t))i!=="p:sldIdLst"&&(!o&&!i.startsWith("@_")&&!n.has(i)&&(r["p:sldIdLst"]=e,o=true),r[i]=t[i]);return o||(r["p:sldIdLst"]=e),r}async attachNewSlide(t){let e=t.input.findSourceSlidePath(t.slide.sourceSlideId),n=e?t.input.deepCloneXml(t.input.slideMap.get(e)):void 0,r=`ppt/slides/slide${t.input.saveSession.nextSlideNumber()}.xml`,o=!t.slide.rId||t.slide.rId.length===0||t.usedRIds.has(t.slide.rId)?t.nextRelationshipId():t.slide.rId;t.usedRIds.add(o);let i=t.input.deepCloneXml(t.slide.rawXml)||n||t.input.createEmptySlideXml();t.input.slideMap.set(r,i),t.slide.id=r,t.slide.rId=o,t.slide.rawXml=i;let s=t.input.toSlideRelsPath(r);if(!await this.tryCopySourceRelationships({input:t.input,sourceSlidePath:e,newSlidePath:r,newSlideRelsPath:s})){let l={Relationships:{"@_xmlns":t.input.relationshipsNamespace,Relationship:[{"@_Id":"rId1","@_Type":t.input.slideLayoutRelationshipType,"@_Target":"../slideLayouts/slideLayout1.xml"}]}};t.input.zip.file(s,t.input.xmlBuilder.build(l)),t.input.slideRelsMap.set(r,new Map([["rId1","../slideLayouts/slideLayout1.xml"]]));}t.slideTargetByRid.set(o,t.input.toPresentationTarget(r));}async tryCopySourceRelationships(t){if(!t.sourceSlidePath)return false;let e=t.input.toSlideRelsPath(t.sourceSlidePath),n=await t.input.zip.file(e)?.async("string");return n?(t.input.zip.file(t.newSlideRelsPath,n),await t.input.loadSlideRelationships(t.newSlidePath,t.newSlideRelsPath),true):false}removeInactiveSlides(t){let e=new Set;for(let[,n]of t.slideTargetByRid.entries())e.add(t.input.toSlidePathFromTarget(n));for(let n of t.input.slideMap.keys())n.startsWith("ppt/slides/slide")&&e.add(n);for(let n of e)t.activeSlidePaths.has(n)||(t.input.slideMap.delete(n),t.input.slideRelsMap.delete(n),t.input.zip.remove(n),t.input.zip.remove(t.input.toSlideRelsPath(n)));}ensureArray(t){return Array.isArray(t)?t:t==null?[]:[t]}};eJ=class{relationships;usedRelationshipIds=new Set;hyperlinkRelationshipIdByTarget=new Map;hyperlinkRelationshipType;constructor(t){this.relationships=t.relationships,this.hyperlinkRelationshipType=t.hyperlinkRelationshipType||"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";for(let e of this.relationships){let n=String(e?.["@_Id"]||"").trim();n.length>0&&this.usedRelationshipIds.add(n);}}nextRelationshipId(){let t=1;for(;this.usedRelationshipIds.has(`rId${t}`);)t+=1;let e=`rId${t}`;return this.usedRelationshipIds.add(e),e}upsertRelationship(t,e,n,r){let o=this.relationships.find(s=>s?.["@_Id"]===t);if(o){o["@_Type"]=e,o["@_Target"]=n,r&&r.trim().length>0?o["@_TargetMode"]=r:delete o["@_TargetMode"];return}let i={"@_Id":t,"@_Type":e,"@_Target":n};r&&r.trim().length>0&&(i["@_TargetMode"]=r),this.relationships.push(i);}resolveHyperlinkRelationshipId(t){let e=String(t||"").trim();if(e.length===0)return;let n=this.hyperlinkRelationshipIdByTarget.get(e);if(n)return n;let r=this.relationships.find(a=>a?.["@_Type"]!==this.hyperlinkRelationshipType?false:String(a?.["@_Target"]||"").trim()===e),o=String(r?.["@_Id"]||"").trim();if(o.length>0)return this.hyperlinkRelationshipIdByTarget.set(e,o),o;let i=this.nextRelationshipId(),s=AMe(e)?"External":void 0;return this.upsertRelationship(i,this.hyperlinkRelationshipType,e,s),this.hyperlinkRelationshipIdByTarget.set(e,i),i}removeCommentRelationships(t){let e=this.relationships.filter(r=>this.isCommentRelationship(r,t)),n=this.relationships.filter(r=>!this.isCommentRelationship(r,t));return this.relationships.length=0,n.forEach(r=>{this.relationships.push(r);}),{relationshipId:String(e[0]?.["@_Id"]||"").trim(),target:String(e[0]?.["@_Target"]||"").trim()}}findFirstByTypeOrTargetIncludes(t,e){let n=e.toLowerCase().trim();return this.relationships.find(r=>String(r?.["@_Type"]||"")===t?true:String(r?.["@_Target"]||"").toLowerCase().trim().includes(n))}toRelationshipMap(){let t=new Map;return this.relationships.forEach(e=>{let n=String(e?.["@_Id"]||"").trim();if(n.length===0)return;let r=String(e?.["@_Target"]||"").trim();r.length!==0&&t.set(n,r);}),t}isCommentRelationship(t,e){return String(t?.["@_Type"]||"")===e?true:String(t?.["@_Target"]||"").toLowerCase().trim().includes("comments/comment")}},tJ=class{writeComments(t){let e=(t.slide.comments||[]).map(i=>({...i,text:String(i.text||"").trim()})).filter(i=>i.text.length>0);if(e.length===0)return;let n=t.existingCommentRelationship.relationshipId.length>0?t.existingCommentRelationship.relationshipId:t.relationshipRegistry.nextRelationshipId(),r=t.existingCommentRelationship.target;r.length===0?r=t.saveState.toSlideCommentTarget(t.saveState.nextCommentPath()):r.startsWith("comments/")&&(r=`../${r}`);let o=t.resolvePartPath(t.slide.id,r);t.saveState.activateCommentPath(o),t.zip.file(o,t.xmlBuilder.build(t.slideCommentsXmlFactory.createXmlElement({slideComments:e,saveState:t.saveState}))),t.relationshipRegistry.upsertRelationship(n,t.slideCommentRelationshipType,r);}},nJ=class{applyTransform(t,e,n){let r=t["p:spPr"]?.["a:xfrm"]||t["p:xfrm"];r&&(r["a:off"]||(r["a:off"]={}),r["a:ext"]||(r["a:ext"]={}),r["a:off"]["@_x"]=String(Math.round(e.x*n)),r["a:off"]["@_y"]=String(Math.round(e.y*n)),r["a:ext"]["@_cx"]=String(Math.round(e.width*n)),r["a:ext"]["@_cy"]=String(Math.round(e.height*n)),e.rotation!==void 0&&(r["@_rot"]=String(Math.round(e.rotation*6e4))),e.skewX!==void 0&&(r["@_skewX"]=String(Math.round(e.skewX*6e4))),e.skewY!==void 0&&(r["@_skewY"]=String(Math.round(e.skewY*6e4))),e.flipHorizontal?r["@_flipH"]="1":delete r["@_flipH"],e.flipVertical?r["@_flipV"]="1":delete r["@_flipV"]);}},rJ=class{resolveMediaRelationshipType(t,e){return t==="audio"?e.audio:t==="video"?e.video:e.media}getMediaRelationshipIdFromShape(t){if(!t)return;let e=t["a:graphic"]?.["a:graphicData"];if(!e)return;let n=String(e["a:videoFile"]?.["@_r:link"]||"").trim();if(n.length>0)return n;let r=String(e["a:audioFile"]?.["@_r:link"]||"").trim();return r.length>0?r:void 0}ensureGraphicFrameMediaReference(t,e,n){t["a:graphic"]||(t["a:graphic"]={});let r=t["a:graphic"];r["a:graphicData"]||(r["a:graphicData"]={});let o=r["a:graphicData"];if(o["@_uri"]="http://schemas.openxmlformats.org/drawingml/2006/media",e==="audio"){o["a:audioFile"]={"@_r:link":n},delete o["a:videoFile"];return}o["a:videoFile"]={"@_r:link":n},delete o["a:audioFile"];}},oJ=class{async updateNotesPart(t){if(t.slide.notes===void 0&&(!t.slide.notesSegments||t.slide.notesSegments.length===0))return;let e=t.relationshipRegistry.findFirstByTypeOrTargetIncludes(t.slideNotesRelationshipType,"notesslide");if(!e){this.reportMissingNotesRelationship(t);return}let n=String(e["@_Target"]||"").trim();if(n.length===0)return;let r=t.resolvePartPath(t.slide.id,n),o=await t.zip.file(r)?.async("string");if(!o){this.reportMissingNotesPart(t,r);return}let i=t.parser.parse(o);if(!t.updateNotesXmlText(i,t.slide.notes??"",t.slide.notesSegments)){this.reportSkippedNotesUpdate(t);return}t.zip.file(r,t.xmlBuilder.build(i));}reportMissingNotesRelationship(t){t.compatibilityReporter.reportWarning({code:"SAVE_NOTES_RELATIONSHIP_MISSING",message:"Slide notes were edited, but the slide has no notes relationship. Notes update was skipped.",scope:"save",slideId:t.slide.id});}reportMissingNotesPart(t,e){t.compatibilityReporter.reportWarning({code:"SAVE_NOTES_PART_MISSING",message:"Speaker notes relationship exists but the notes part is missing. Notes update was skipped.",scope:"save",slideId:t.slide.id,xmlPath:e});}reportSkippedNotesUpdate(t){t.compatibilityReporter.reportWarning({code:"SAVE_NOTES_UPDATE_SKIPPED",message:"Speaker notes were present but no editable notes body was found. Notes were left unchanged.",scope:"save",slideId:t.slide.id});}};AB=["a:blur","a:fillOverlay","a:glow","a:innerShdw","a:outerShdw","a:prstShdw","a:reflection","a:softEdge"],iJ=["a:xfrm","a:custGeom","a:prstGeom","a:noFill","a:solidFill","a:gradFill","a:blipFill","a:pattFill","a:grpFill","a:ln","a:effectLst","a:effectDag","a:scene3d","a:sp3d","a:extLst"],sJ=["a:lnL","a:lnR","a:lnT","a:lnB","a:lnTlToBr","a:lnBlToTr","a:cell3D","a:noFill","a:solidFill","a:gradFill","a:blipFill","a:pattFill","a:grpFill","a:headers","a:extLst"],dA=["a:blip","a:srcRect","a:tile","a:stretch"],RMe=["a:lnRef","a:fillRef","a:effectRef","a:fontRef"],aJ=class{applyBackground(t){let e=typeof t.slide.backgroundColor=="string"&&t.slide.backgroundColor.length>0&&t.slide.backgroundColor!=="transparent",n=typeof t.slide.backgroundImage=="string"?t.slide.backgroundImage:"",r=n.length>0,o=r&&n.startsWith("data:"),i=typeof t.slide.backgroundGradient=="string"&&t.slide.backgroundGradient.length>0,s=t.slideNode["p:cSld"]||{};if(!(e||r||i)){delete s["p:bg"],t.slideNode["p:cSld"]=s;return}let a=s["p:bg"],c=a?.["p:bgPr"]?.["a:blipFill"]!==void 0;if(!o&&c){this.reorderCSldBgFirst(s,a),t.slideNode["p:cSld"]=s;return}let u={};if(o){let f=t.parseDataUrlToBytes(n);if(f){let h=t.saveState.nextMediaPath(f.extension);t.zip.file(h,f.bytes);let m=t.relationshipRegistry.nextRelationshipId(),g=h.replace(/^ppt\//,"../");t.relationshipRegistry.upsertRelationship(m,t.slideImageRelationshipType,g),u["a:blipFill"]=Wg({"a:blip":{"@_r:embed":m},"a:stretch":{"a:fillRect":{}}},dA);}}else e&&t.slide.backgroundColor&&(u["a:solidFill"]={"a:srgbClr":{"@_val":t.slide.backgroundColor.replace("#","").toUpperCase()}});let d=u["a:blipFill"]!==void 0||u["a:solidFill"]!==void 0||u["a:gradFill"]!==void 0||u["a:pattFill"]!==void 0||u["a:noFill"]!==void 0||u["a:grpFill"]!==void 0;if(d&&(u["a:effectLst"]={}),t.slide.backgroundShadeToTitle===true?u["@_shadeToTitle"]="1":t.slide.backgroundShadeToTitle===false&&(u["@_shadeToTitle"]="0"),!d){delete s["p:bg"],t.slideNode["p:cSld"]=s;return}let p={"p:bg":{"p:bgPr":u}};for(let f of Object.keys(s))f!=="p:bg"&&(p[f]=s[f]);t.slideNode["p:cSld"]=p;}reorderCSldBgFirst(t,e){let n=Object.keys(t);if(n.length>0&&n[0]==="p:bg")return;let r={"p:bg":e};for(let o of n)o!=="p:bg"&&(r[o]=t[o]);for(let o of Object.keys(t))delete t[o];for(let o of Object.keys(r))t[o]=r[o];}};Qw={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dkblue:"#00008B",dkcyan:"#008B8B",dkgoldenrod:"#B8860B",dkgray:"#A9A9A9",dkgrey:"#A9A9A9",dkgreen:"#006400",dkkhaki:"#BDB76B",dkmagenta:"#8B008B",dkolivegreen:"#556B2F",dkorange:"#FF8C00",dkorchid:"#9932CC",dkred:"#8B0000",dksalmon:"#E9967A",dkseagreen:"#8FBC8F",dkslateblue:"#483D8B",dkslategray:"#2F4F4F",dkslategrey:"#2F4F4F",dkturquoise:"#00CED1",dkviolet:"#9400D3",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",ltblue:"#ADD8E6",ltcoral:"#F08080",ltcyan:"#E0FFFF",ltgoldenrodyellow:"#FAFAD2",ltgray:"#D3D3D3",ltgrey:"#D3D3D3",ltgreen:"#90EE90",ltpink:"#FFB6C1",ltsalmon:"#FFA07A",ltseagreen:"#20B2AA",ltskyblue:"#87CEFA",ltslategray:"#778899",ltslategrey:"#778899",ltsteelblue:"#B0C4DE",ltyellow:"#FFFFE0",magenta:"#FF00FF",maroon:"#800000",medaquamarine:"#66CDAA",medblue:"#0000CD",medorchid:"#BA55D3",medpurple:"#9370DB",medseagreen:"#3CB371",medslateblue:"#7B68EE",medspringgreen:"#00FA9A",medturquoise:"#48D1CC",medvioletred:"#C71585",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},XO={scrollBar:"#C8C8C8",background:"#FFFFFF",activeCaption:"#0054E3",inactiveCaption:"#DBDFE6",menu:"#F0F0F0",window:"#FFFFFF",windowFrame:"#646464",menuText:"#000000",windowText:"#000000",captionText:"#000000",activeBorder:"#B4B4B4",inactiveBorder:"#F4F7FC",appWorkspace:"#ABABAB",highlight:"#0078D7",highlightText:"#FFFFFF",btnFace:"#F0F0F0",btnShadow:"#A0A0A0",grayText:"#6D6D6D",btnText:"#000000",inactiveCaptionText:"#544E43",btnHighlight:"#FFFFFF","3dDkShadow":"#696969","3dLight":"#E3E3E3",infoText:"#000000",infoBk:"#FFFFE1",hotLight:"#CC6600",gradientActiveCaption:"#B9D1EA",gradientInactiveCaption:"#D7E4F2",menuHighlight:"#0078D7",menuBar:"#F0F0F0"},Ir=9525,DMe=1280,LMe=720,pA=12,FMe="#111827",BMe="#3b82f6",cJ="#1f2937",OMe='"Segoe UI", "Helvetica Neue", Arial, sans-serif',uJ=24,kB=1,IB=100,UMe="pptx-presence-v1",dJ={dk1:"#000000",lt1:"#FFFFFF",dk2:"#1F497D",lt2:"#EEECE1",accent1:"#4472C4",accent2:"#ED7D31",accent3:"#A5A5A5",accent4:"#FFC000",accent5:"#5B9BD5",accent6:"#70AD47",hlink:"#0563C1",folHlink:"#954F72",tx1:"#000000",tx2:"#44546A",bg1:"#FFFFFF",bg2:"#E7E6E6",phclr:"#4472C4"},$Me=[{value:"straightConnector1",label:"Straight"},{value:"bentConnector2",label:"Bent"},{value:"bentConnector3",label:"Double Bent"},{value:"bentConnector4",label:"Triple Bent"},{value:"bentConnector5",label:"Quad Bent"},{value:"curvedConnector2",label:"Curved"},{value:"curvedConnector3",label:"Curved (Cubic)"},{value:"curvedConnector4",label:"Curved 4"},{value:"curvedConnector5",label:"Curved 5"}],HMe=[{value:"none",label:"None"},{value:"triangle",label:"Triangle"},{value:"stealth",label:"Stealth"},{value:"diamond",label:"Diamond"},{value:"oval",label:"Oval"},{value:"arrow",label:"Open Arrow"}],zMe=[{value:"solid",label:"Solid"},{value:"dot",label:"Dot"},{value:"dash",label:"Dash"},{value:"dashDot",label:"Dash Dot"},{value:"lgDash",label:"Long Dash"},{value:"lgDashDot",label:"Long Dash Dot"},{value:"lgDashDotDot",label:"Long Dash Dot Dot"},{value:"sysDot",label:"System Dot"},{value:"sysDash",label:"System Dash"},{value:"sysDashDot",label:"System Dash Dot"},{value:"sysDashDotDot",label:"System Dash Dot Dot"},{value:"custom",label:"Custom"}],GMe=class{context;constructor(t){this.context=t;}parseColorChoice(t,e){if(!t)return;if(t["a:scrgbClr"]){let r=t["a:scrgbClr"],o=this.percentAttrToUnit(r["@_r"]),i=this.percentAttrToUnit(r["@_g"]),s=this.percentAttrToUnit(r["@_b"]);if(o!==void 0&&i!==void 0&&s!==void 0){let a=this.rgbToHex(o*255,i*255,s*255);return this.applyColorTransforms(a,r)}}if(t["a:srgbClr"]){let r=t["a:srgbClr"],o=String(r["@_val"]||"").trim();if(/^[0-9a-fA-F]{6}$/.test(o))return this.applyColorTransforms(`#${o.toUpperCase()}`,r)}if(t["a:sysClr"]){let r=t["a:sysClr"],o=String(r["@_lastClr"]||"").trim();if(/^[0-9a-fA-F]{6}$/.test(o))return this.applyColorTransforms(`#${o.toUpperCase()}`,r);let i=String(r["@_val"]||"").trim();if(i){let s=XO[i];if(s)return this.applyColorTransforms(s,r)}}if(t["a:prstClr"]){let r=t["a:prstClr"],o=String(r["@_val"]||"").toLowerCase(),i=Qw[o];if(i)return this.applyColorTransforms(i,r)}let n=t["a:schemeClr"]??t["a:styleClr"];if(n){let r=String(n["@_val"]||"").trim().toLowerCase();if(!r)return;let o;return r==="phclr"?o=e??this.context.resolveThemeColor("phclr"):o=this.context.resolveThemeColor(r),o?this.applyColorTransforms(o,n):void 0}if(t["a:hslClr"]){let r=t["a:hslClr"],o=Xw(r["@_hue"]),i=this.percentAttrToUnit(r["@_sat"]),s=this.percentAttrToUnit(r["@_lum"]);if(o!==void 0&&i!==void 0&&s!==void 0){let a=Xg(o,i,s),l=this.rgbToHex(a.r,a.g,a.b);return this.applyColorTransforms(l,r)}}}parseColor(t,e){if(t)return this.parseColorChoice(t,e)}percentAttrToUnit(t){let e=Number.parseFloat(String(t??"").trim());if(Number.isFinite(e))return Math.min(1,Math.max(0,e/1e5))}clampUnitInterval(t){return Math.min(1,Math.max(0,t))}hexToRgb(t){let e=t.replace("#","");if(/^[0-9a-fA-F]{6}$/.test(e))return {r:Number.parseInt(e.slice(0,2),16),g:Number.parseInt(e.slice(2,4),16),b:Number.parseInt(e.slice(4,6),16)}}rgbToHex(t,e,n){let r=o=>this.clampColorChannel(o).toString(16).padStart(2,"0").toUpperCase();return `#${r(t)}${r(e)}${r(n)}`}applyColorTransforms(t,e){return Zc(t,e)}clampColorChannel(t){return Math.min(255,Math.max(0,Math.round(t)))}},VMe="@_",WMe="#text";qMe=class{context;constructor(t){this.context=t;}extractGradientOpacity(t){let e=this.context.ensureArray(Rt(t,"a:gsLst")?.["a:gs"]);if(e.length===0)return;let n=e.map(o=>this.context.extractColorOpacity(o)).filter(o=>o!==void 0);if(n.length===0)return;let r=n.reduce((o,i)=>o+i,0);return this.context.clampUnitInterval(r/n.length)}extractGradientStops(t){let e=this.context.ensureArray(Rt(t,"a:gsLst")?.["a:gs"]);if(e.length===0)return [];let n=[...e].sort((o,i)=>{let s=Number.parseInt(String(o["@_pos"]||"0"),10),a=Number.parseInt(String(i["@_pos"]||"0"),10);return !Number.isFinite(s)&&!Number.isFinite(a)?0:Number.isFinite(s)?Number.isFinite(a)?s-a:-1:1}),r=[];return n.forEach(o=>{let i=this.context.parseColor(o);if(!i)return;let s=Number.parseInt(String(o["@_pos"]||"0"),10),a=Number.isFinite(s)?this.context.clampUnitInterval(s/1e5)*100:0,l=this.context.extractColorOpacity(o),c=this.extractColorSubNode(o);r.push({color:i,position:a,opacity:l,...c?{originalColorXml:c}:{}});}),r}extractGradientType(t){return t["a:path"]?"radial":"linear"}extractGradientPathType(t){let e=t["a:path"];if(!e)return;let n=String(e["@_path"]||"").trim().toLowerCase();return n==="circle"||n==="rect"||n==="shape"?n:"circle"}extractGradientFocalPoint(t){let e=t["a:path"];if(!e)return;let n=e["a:fillToRect"];if(!n)return;let r=Number.parseInt(String(n["@_l"]||"0"),10),o=Number.parseInt(String(n["@_t"]||"0"),10),i=Number.parseInt(String(n["@_r"]||"0"),10),s=Number.parseInt(String(n["@_b"]||"0"),10),a=Number.isFinite(r)?r/1e5:0,l=Number.isFinite(o)?o/1e5:0,c=Number.isFinite(i)?i/1e5:0,u=Number.isFinite(s)?s/1e5:0,d=this.context.clampUnitInterval((a+(1-c))/2),p=this.context.clampUnitInterval((l+(1-u))/2);return {x:d,y:p}}extractGradientFillToRect(t){let e=t["a:path"];if(!e)return;let n=e["a:fillToRect"];if(!n)return;let r=Number.parseInt(String(n["@_l"]||"0"),10),o=Number.parseInt(String(n["@_t"]||"0"),10),i=Number.parseInt(String(n["@_r"]||"0"),10),s=Number.parseInt(String(n["@_b"]||"0"),10);return {l:Number.isFinite(r)?this.context.clampUnitInterval(r/1e5):0,t:Number.isFinite(o)?this.context.clampUnitInterval(o/1e5):0,r:Number.isFinite(i)?this.context.clampUnitInterval(i/1e5):0,b:Number.isFinite(s)?this.context.clampUnitInterval(s/1e5):0}}extractGradientFlip(t){let e=String(t["@_flip"]||"").trim().toLowerCase();if(e==="x"||e==="y"||e==="xy"||e==="none")return e}extractGradientRotWithShape(t){let e=t["@_rotWithShape"];if(e==null)return;let n=String(e).trim().toLowerCase();if(n==="1"||n==="true")return true;if(n==="0"||n==="false")return false}extractGradientScaled(t){let e=t["a:lin"];if(!e)return;let n=e["@_scaled"];if(n==null)return;let r=String(n).trim().toLowerCase();if(r==="1"||r==="true")return true;if(r==="0"||r==="false")return false}extractGradientAngle(t){let e=Number.parseInt(String(t["a:lin"]?.["@_ang"]||""),10);return Number.isFinite(e)?(e/6e4%360+360)%360:90}buildGradientCssFromStops(t,e,n,r,o,i){if(t.length===0)return;let s=t.map(a=>{let l=this.colorWithOpacity(a.color,a.opacity),c=typeof a.position=="number"&&Number.isFinite(a.position)?`${this.context.clampUnitInterval(a.position/100)*100}%`:void 0;return c?`${l} ${c}`:l});if(e==="radial"){let a=s.join(", "),l=o||"circle",c=50,u=50;i?(c=(i.l+(1-i.r))/2*100,u=(i.t+(1-i.b))/2*100):r&&(c=r.x*100,u=r.y*100);let d=`${Math.round(c)}%`,p=`${Math.round(u)}%`;if(l==="rect"){let f=Math.max(c,100-c),h=Math.max(u,100-u);return `radial-gradient(${Math.round(f)}% ${Math.round(h)}% at ${d} ${p}, ${a})`}return l==="shape"?`radial-gradient(farthest-side at ${d} ${p}, ${a})`:`radial-gradient(circle at ${d} ${p}, ${a})`}return `linear-gradient(${n.toFixed(2)}deg, ${s.join(", ")})`}extractGradientFillCss(t){let e=this.extractGradientStops(t);if(e.length!==0)return this.buildGradientCssFromStops(e,this.extractGradientType(t),this.extractGradientAngle(t),this.extractGradientFocalPoint(t),this.extractGradientPathType(t),this.extractGradientFillToRect(t))}buildGradientFillXml(t){let e=(t.fillGradientStops||[]).filter(o=>!!o?.color).map(o=>{let i=typeof o.position=="number"&&Number.isFinite(o.position)?o.position:0,s=Math.round(this.context.clampUnitInterval(i/100)*1e5);if(o.originalColorXml)return {"@_pos":String(s),...o.originalColorXml};let a=String(o.color||"").trim(),l=typeof o.opacity=="number"&&Number.isFinite(o.opacity)?this.context.clampUnitInterval(o.opacity):void 0,c={"@_pos":String(s),"a:srgbClr":{"@_val":a.replace("#","")}};return l!==void 0&&(c["a:srgbClr"]["a:alpha"]={"@_val":String(Math.round(l*1e5))}),c});if(e.length===0)return;let n=t.fillGradientType||"linear",r={};if(t.fillGradientFlip&&t.fillGradientFlip!=="none"&&(r["@_flip"]=t.fillGradientFlip),t.fillGradientRotWithShape!==void 0&&(r["@_rotWithShape"]=t.fillGradientRotWithShape?"1":"0"),r["a:gsLst"]={"a:gs":e},n==="radial"){let i={"@_path":t.fillGradientPathType||"circle"};if(t.fillGradientFillToRect){let s=t.fillGradientFillToRect;i["a:fillToRect"]={"@_l":String(Math.round(s.l*1e5)),"@_t":String(Math.round(s.t*1e5)),"@_r":String(Math.round(s.r*1e5)),"@_b":String(Math.round(s.b*1e5))};}else if(t.fillGradientFocalPoint){let s=t.fillGradientFocalPoint,a=Math.round(s.x*1e5),l=Math.round(s.y*1e5),c=Math.round((1-s.x)*1e5),u=Math.round((1-s.y)*1e5);i["a:fillToRect"]={"@_l":String(a),"@_t":String(l),"@_r":String(c),"@_b":String(u)};}r["a:path"]=i;}else {let o=typeof t.fillGradientAngle=="number"&&Number.isFinite(t.fillGradientAngle)?t.fillGradientAngle:90,i={"@_ang":String(Math.round(o*6e4))};t.fillGradientScaled!==void 0?i["@_scaled"]=t.fillGradientScaled?"1":"0":i["@_scaled"]="1",r["a:lin"]=i;}return r}extractGradientFillColor(t){let e=this.extractStopsSorted(t);if(e.length===0)return;let n=this.context.parseColor(e[0]),r=e.length>1?this.context.parseColor(e[e.length-1]):void 0;if(!n)return r;if(!r)return n;let o=this.context.hexToRgb(n),i=this.context.hexToRgb(r);return !o||!i?n:this.context.rgbToHex((o.r+i.r)/2,(o.g+i.g)/2,(o.b+i.b)/2)}extractStopsSorted(t){let e=this.context.ensureArray(Rt(t,"a:gsLst")?.["a:gs"]);return e.length===0?[]:[...e].sort((n,r)=>{let o=Number.parseInt(String(n["@_pos"]||"0"),10),i=Number.parseInt(String(r["@_pos"]||"0"),10);return !Number.isFinite(o)&&!Number.isFinite(i)?0:Number.isFinite(o)?Number.isFinite(i)?o-i:-1:1})}extractColorSubNode(t){let e=["a:srgbClr","a:schemeClr","a:sysClr","a:prstClr","a:scrgbClr","a:hslClr"];for(let n of e)if(t[n])return {[n]:t[n]}}colorWithOpacity(t,e){if(e===void 0)return t;let n=this.context.hexToRgb(t);return n?`rgba(${n.r}, ${n.g}, ${n.b}, ${this.context.clampUnitInterval(e)})`:t}},ZMe=new Set(["a:cont","a:blend","a:xfrmEffect","a:relOff"]),JMe=new Set(["darken","lighten","mult","over","screen"]),QMe=new Set(["sib","tree"]);hEe=class{context;constructor(t){this.context=t;}extractEffectDagStyle(t){let e=t["a:effectDag"];if(!e)return {};let n={};n.effectDagXml=e;let r=fJ(e);return r&&(n.effectDagTree=r),this.extractDagShadow(e,n),this.extractDagInnerShadow(e,n),this.extractDagGlow(e,n),this.extractDagSoftEdge(e,n),this.extractDagReflection(e,n),this.extractDagBlur(e,n),sEe(e,n),aEe(e,n),lEe(e,n),cEe(e,n),uEe(e,n),dEe(e,n),pEe(e,n,this.context),fEe(e,n),n}extractDagShadow(t,e){let n=t["a:outerShdw"];if(!n)return;e.shadowColor=this.context.parseColor(n),e.shadowOpacity=this.context.extractColorOpacity(n);let r=parseInt(String(n["@_blurRad"]||""),10);Number.isFinite(r)&&r>=0&&(e.shadowBlur=r/this.context.emuPerPx);let o=parseInt(String(n["@_dist"]||""),10),i=parseInt(String(n["@_dir"]||""),10),s=Number.isFinite(o)&&o>=0?o/this.context.emuPerPx:void 0,a=Number.isFinite(i)?i/6e4:0,l=a*Math.PI/180;s!==void 0&&(e.shadowOffsetX=Math.round(Math.cos(l)*s*100)/100,e.shadowOffsetY=Math.round(Math.sin(l)*s*100)/100),e.shadowAngle=a,e.shadowDistance=s;}extractDagInnerShadow(t,e){let n=t["a:innerShdw"];if(!n)return;e.innerShadowColor=this.context.parseColor(n),e.innerShadowOpacity=this.context.extractColorOpacity(n);let r=parseInt(String(n["@_blurRad"]||""),10);Number.isFinite(r)&&r>=0&&(e.innerShadowBlur=r/this.context.emuPerPx);let o=parseInt(String(n["@_dist"]||""),10),i=parseInt(String(n["@_dir"]||""),10),s=Number.isFinite(o)&&o>=0?o/this.context.emuPerPx:void 0,l=(Number.isFinite(i)?i/6e4:0)*Math.PI/180;s!==void 0&&(e.innerShadowOffsetX=Math.round(Math.cos(l)*s*100)/100,e.innerShadowOffsetY=Math.round(Math.sin(l)*s*100)/100);}extractDagGlow(t,e){let n=t["a:glow"];if(!n)return;e.glowColor=this.context.parseColor(n),e.glowOpacity=this.context.extractColorOpacity(n);let r=parseInt(String(n["@_rad"]||""),10);Number.isFinite(r)&&r>=0&&(e.glowRadius=r/this.context.emuPerPx);}extractDagSoftEdge(t,e){let n=t["a:softEdge"];if(!n)return;let r=parseInt(String(n["@_rad"]||""),10);Number.isFinite(r)&&r>=0&&(e.softEdgeRadius=r/this.context.emuPerPx);}extractDagReflection(t,e){let n=t["a:reflection"];if(!n)return;let r=parseInt(String(n["@_blurRad"]||""),10);Number.isFinite(r)&&r>=0&&(e.reflectionBlurRadius=r/this.context.emuPerPx);let o=parseInt(String(n["@_stA"]||""),10);Number.isFinite(o)&&(e.reflectionStartOpacity=o/1e5);let i=parseInt(String(n["@_endA"]||""),10);Number.isFinite(i)&&(e.reflectionEndOpacity=i/1e5);let s=parseInt(String(n["@_endPos"]||""),10);Number.isFinite(s)&&(e.reflectionEndPosition=s/1e5);let a=parseInt(String(n["@_dist"]||""),10);Number.isFinite(a)&&a>=0&&(e.reflectionDistance=a/this.context.emuPerPx);}extractDagBlur(t,e){let n=t["a:blur"];if(!n)return;let r=parseInt(String(n["@_rad"]||""),10);Number.isFinite(r)&&r>=0&&(e.blurRadius=r/this.context.emuPerPx);let o=String(n["@_grow"]||"").trim();(o==="1"||o==="true")&&(e.blurGrow=true);}},mEe={shdw1:2,shdw2:4,shdw3:6,shdw4:3,shdw5:5,shdw6:8,shdw7:4,shdw8:6,shdw9:8,shdw10:10,shdw11:4,shdw12:6,shdw13:3,shdw14:5,shdw15:4,shdw16:6,shdw17:3,shdw18:5,shdw19:4,shdw20:8},gEe={shdw1:.35,shdw2:.38,shdw3:.4,shdw4:.45,shdw5:.48,shdw6:.5,shdw7:.38,shdw8:.4,shdw9:.42,shdw10:.45,shdw11:.38,shdw12:.4,shdw13:.5,shdw14:.52,shdw15:.55,shdw16:.58,shdw17:.42,shdw18:.45,shdw19:.48,shdw20:.5},xEe=new Set(["tl","t","tr","l","ctr","r","bl","b","br"]);yEe=class{context;constructor(t){this.context=t;}extractShadowStyle(t){let n=t["a:effectLst"]?.["a:outerShdw"];if(!n)return this.extractPresetShadowStyle(t);let r=this.context.parseColor(n),o=this.context.extractColorOpacity(n),i=Number.parseInt(String(n["@_blurRad"]||""),10),s=Number.parseInt(String(n["@_dist"]||""),10),a=Number.parseInt(String(n["@_dir"]||""),10),l=Number.isFinite(i)&&i>=0?i/this.context.emuPerPx:void 0,c=Number.isFinite(s)&&s>=0?s/this.context.emuPerPx:void 0,u=Number.isFinite(a)?a/6e4:0,d=u*Math.PI/180,p=c!==void 0?Math.round(Math.cos(d)*c*100)/100:void 0,f=c!==void 0?Math.round(Math.sin(d)*c*100)/100:void 0,h=n["@_rotWithShape"],m=typeof h=="boolean"?h:h==="1"||h==="true"?true:h==="0"||h==="false"?false:void 0,g=ju(n["@_sx"]),x=ju(n["@_sy"]),v=ju(n["@_kx"]),S=ju(n["@_ky"]),w=Rq(n["@_algn"]);return {shadowColor:r,shadowOpacity:o,shadowBlur:l,shadowOffsetX:p,shadowOffsetY:f,shadowAngle:u,shadowDistance:c,shadowRotateWithShape:m,shadowScaleX:g,shadowScaleY:x,shadowSkewX:v,shadowSkewY:S,shadowAlignment:w}}extractPresetShadowStyle(t){let e=t["a:effectLst"];if(!e)return {};let n=e["a:prstShdw"];if(!n)return {};let r=String(n["@_prst"]||"").trim(),o=parseFloat(String(n["@_dist"]||"0")),i=parseFloat(String(n["@_dir"]||"0")),s=o/this.context.emuPerPx,a=i/6e4*(Math.PI/180),l=mEe[r],c=this.context.parseColor(n)||"#000000",u=this.context.extractColorOpacity(n);return {shadowOffsetX:Math.round(s*Math.cos(a)*100)/100,shadowOffsetY:Math.round(s*Math.sin(a)*100)/100,shadowColor:c,shadowOpacity:u??(l!==void 0?gEe[r]??.5:.5),shadowBlur:l??4,presetShadowName:r.length>0?r:void 0}}extractInnerShadowStyle(t){let n=t["a:effectLst"]?.["a:innerShdw"];if(!n)return {};let r=this.context.parseColor(n),o=this.context.extractColorOpacity(n),i=Number.parseInt(String(n["@_blurRad"]||""),10),s=Number.parseInt(String(n["@_dist"]||""),10),a=Number.parseInt(String(n["@_dir"]||""),10),l=Number.isFinite(i)&&i>=0?i/this.context.emuPerPx:void 0,c=Number.isFinite(s)&&s>=0?s/this.context.emuPerPx:void 0,d=(Number.isFinite(a)?a/6e4:0)*Math.PI/180,p=c!==void 0?Math.round(Math.cos(d)*c*100)/100:void 0,f=c!==void 0?Math.round(Math.sin(d)*c*100)/100:void 0,h=kq(n["@_rotWithShape"]);return {innerShadowColor:r,innerShadowOpacity:o,innerShadowBlur:l,innerShadowOffsetX:p,innerShadowOffsetY:f,innerShadowRotateWithShape:h}}extractGlowStyle(t){let n=t["a:effectLst"]?.["a:glow"];if(!n)return {};let r=this.context.parseColor(n),o=this.context.extractColorOpacity(n),i=Number.parseInt(String(n["@_rad"]||""),10),s=Number.isFinite(i)&&i>=0?i/this.context.emuPerPx:void 0;return {glowColor:r,glowRadius:s,glowOpacity:o}}extractSoftEdgeStyle(t){let n=t["a:effectLst"]?.["a:softEdge"];if(!n)return {};let r=Number.parseInt(String(n["@_rad"]||""),10);return {softEdgeRadius:Number.isFinite(r)&&r>=0?r/this.context.emuPerPx:void 0}}extractReflectionStyle(t){let n=t["a:effectLst"]?.["a:reflection"];if(!n)return {};let r=Number.parseInt(String(n["@_blurRad"]||""),10),o=Number.isFinite(r)&&r>=0?r/this.context.emuPerPx:void 0,i=Number.parseInt(String(n["@_stA"]||""),10),s=Number.isFinite(i)?i/1e5:void 0,a=Number.parseInt(String(n["@_endA"]||""),10),l=Number.isFinite(a)?a/1e5:void 0,c=Number.parseInt(String(n["@_endPos"]||""),10),u=Number.isFinite(c)?c/1e5:void 0,d=Number.parseInt(String(n["@_dir"]||""),10),p=Number.isFinite(d)?d/6e4:void 0,f=Number.parseInt(String(n["@_rot"]||""),10),h=Number.isFinite(f)?f/6e4:void 0,m=Number.parseInt(String(n["@_dist"]||""),10),g=Number.isFinite(m)&&m>=0?m/this.context.emuPerPx:void 0,x=ju(n["@_fadeDir"]),v=x!==void 0?x/6e4:void 0,S=ju(n["@_sx"]),w=ju(n["@_sy"]),C=ju(n["@_kx"]),T=ju(n["@_ky"]),E=Rq(n["@_algn"]),M=kq(n["@_rotWithShape"]),P=ju(n["@_stPos"]),R=P!==void 0?P/1e5:void 0;return {reflectionBlurRadius:o,reflectionStartOpacity:s,reflectionEndOpacity:l,reflectionEndPosition:u,reflectionDirection:p,reflectionRotation:h,reflectionDistance:g,reflectionFadeDirection:v,reflectionScaleX:S,reflectionScaleY:w,reflectionSkewX:C,reflectionSkewY:T,reflectionAlignment:E,reflectionRotateWithShape:M,reflectionStartPosition:R}}extractBlurStyle(t){let n=t["a:effectLst"]?.["a:blur"];if(!n)return {};let r=Number.parseInt(String(n["@_rad"]||""),10),o=Number.isFinite(r)&&r>=0?r/this.context.emuPerPx:void 0,i=String(n["@_grow"]||"").trim();return {blurRadius:o,blurGrow:i==="1"||i==="true"?true:void 0}}},bEe=class{context;constructor(t){this.context=t;}buildOuterShadowXml(t){let e=String(t.shadowColor||"").trim();if(e.length===0||e==="transparent")return;let n=typeof t.shadowOpacity=="number"&&Number.isFinite(t.shadowOpacity)?this.context.clampUnitInterval(t.shadowOpacity):.35,r=typeof t.shadowBlur=="number"&&Number.isFinite(t.shadowBlur)?Math.max(0,t.shadowBlur):6,o,i;if(typeof t.shadowAngle=="number"&&typeof t.shadowDistance=="number")i=t.shadowAngle,o=t.shadowDistance;else {let a=typeof t.shadowOffsetX=="number"&&Number.isFinite(t.shadowOffsetX)?t.shadowOffsetX:4,l=typeof t.shadowOffsetY=="number"&&Number.isFinite(t.shadowOffsetY)?t.shadowOffsetY:4;o=Math.sqrt(a*a+l*l),i=(Math.atan2(l,a)*180/Math.PI+360)%360;}let s={"@_blurRad":String(Math.round(r*this.context.emuPerPx)),"@_dist":String(Math.round(o*this.context.emuPerPx)),"@_dir":String(Math.round(i*6e4)),"a:srgbClr":{"@_val":e.replace("#",""),"a:alpha":{"@_val":String(Math.round(n*1e5))}}};return typeof t.shadowScaleX=="number"&&(s["@_sx"]=String(Math.round(t.shadowScaleX))),typeof t.shadowScaleY=="number"&&(s["@_sy"]=String(Math.round(t.shadowScaleY))),typeof t.shadowSkewX=="number"&&(s["@_kx"]=String(Math.round(t.shadowSkewX))),typeof t.shadowSkewY=="number"&&(s["@_ky"]=String(Math.round(t.shadowSkewY))),t.shadowAlignment&&(s["@_algn"]=t.shadowAlignment),typeof t.shadowRotateWithShape=="boolean"&&(s["@_rotWithShape"]=t.shadowRotateWithShape?"1":"0"),s}buildPresetShadowXml(t){let e=t.presetShadowName;if(!e||e.length===0)return;let n=String(t.shadowColor||"#000000").trim(),r=typeof t.shadowOpacity=="number"&&Number.isFinite(t.shadowOpacity)?this.context.clampUnitInterval(t.shadowOpacity):.5,o,i;if(typeof t.shadowAngle=="number"&&typeof t.shadowDistance=="number")i=t.shadowAngle,o=t.shadowDistance;else {let s=typeof t.shadowOffsetX=="number"?t.shadowOffsetX:0,a=typeof t.shadowOffsetY=="number"?t.shadowOffsetY:0;o=Math.sqrt(s*s+a*a),i=(Math.atan2(a,s)*180/Math.PI+360)%360;}return {"@_prst":e,"@_dist":String(Math.round(o*this.context.emuPerPx)),"@_dir":String(Math.round(i*6e4)),"a:srgbClr":{"@_val":n.replace("#",""),"a:alpha":{"@_val":String(Math.round(r*1e5))}}}}buildInnerShadowXml(t){let e=String(t.innerShadowColor||"").trim();if(e.length===0||e==="transparent")return;let n=typeof t.innerShadowOffsetX=="number"&&Number.isFinite(t.innerShadowOffsetX)?t.innerShadowOffsetX:0,r=typeof t.innerShadowOffsetY=="number"&&Number.isFinite(t.innerShadowOffsetY)?t.innerShadowOffsetY:0,o=typeof t.innerShadowBlur=="number"&&Number.isFinite(t.innerShadowBlur)?Math.max(0,t.innerShadowBlur):6,i=typeof t.innerShadowOpacity=="number"&&Number.isFinite(t.innerShadowOpacity)?this.context.clampUnitInterval(t.innerShadowOpacity):.5,s=Math.sqrt(n*n+r*r),a=(Math.atan2(r,n)*180/Math.PI+360)%360,l={"@_blurRad":String(Math.round(o*this.context.emuPerPx)),"@_dist":String(Math.round(s*this.context.emuPerPx)),"@_dir":String(Math.round(a*6e4)),"a:srgbClr":{"@_val":e.replace("#",""),"a:alpha":{"@_val":String(Math.round(i*1e5))}}};return typeof t.innerShadowRotateWithShape=="boolean"&&(l["@_rotWithShape"]=t.innerShadowRotateWithShape?"1":"0"),l}buildGlowXml(t){let e=String(t.glowColor||"").trim();if(e.length===0||e==="transparent")return;let n=typeof t.glowRadius=="number"&&Number.isFinite(t.glowRadius)&&t.glowRadius>0?t.glowRadius:void 0;if(n===void 0)return;let r=typeof t.glowOpacity=="number"&&Number.isFinite(t.glowOpacity)?this.context.clampUnitInterval(t.glowOpacity):.4;return {"@_rad":String(Math.round(n*this.context.emuPerPx)),"a:srgbClr":{"@_val":e.replace("#",""),"a:alpha":{"@_val":String(Math.round(r*1e5))}}}}buildSoftEdgeXml(t){let e=typeof t.softEdgeRadius=="number"&&Number.isFinite(t.softEdgeRadius)&&t.softEdgeRadius>0?t.softEdgeRadius:void 0;if(e!==void 0)return {"@_rad":String(Math.round(e*this.context.emuPerPx))}}buildReflectionXml(t){if(!(typeof t.reflectionBlurRadius=="number"&&t.reflectionBlurRadius>0||typeof t.reflectionStartOpacity=="number"&&t.reflectionStartOpacity>0||typeof t.reflectionDistance=="number"&&t.reflectionDistance>0))return;let n={};return typeof t.reflectionBlurRadius=="number"&&t.reflectionBlurRadius>0&&(n["@_blurRad"]=String(Math.round(t.reflectionBlurRadius*this.context.emuPerPx))),typeof t.reflectionStartOpacity=="number"&&(n["@_stA"]=String(Math.round(t.reflectionStartOpacity*1e5))),typeof t.reflectionEndOpacity=="number"&&(n["@_endA"]=String(Math.round(t.reflectionEndOpacity*1e5))),typeof t.reflectionEndPosition=="number"&&(n["@_endPos"]=String(Math.round(t.reflectionEndPosition*1e5))),typeof t.reflectionDirection=="number"&&(n["@_dir"]=String(Math.round(t.reflectionDirection*6e4))),typeof t.reflectionRotation=="number"&&(n["@_rot"]=String(Math.round(t.reflectionRotation*6e4))),typeof t.reflectionDistance=="number"&&t.reflectionDistance>0&&(n["@_dist"]=String(Math.round(t.reflectionDistance*this.context.emuPerPx))),typeof t.reflectionFadeDirection=="number"&&(n["@_fadeDir"]=String(Math.round(t.reflectionFadeDirection*6e4))),typeof t.reflectionScaleX=="number"&&(n["@_sx"]=String(Math.round(t.reflectionScaleX))),typeof t.reflectionScaleY=="number"&&(n["@_sy"]=String(Math.round(t.reflectionScaleY))),typeof t.reflectionSkewX=="number"&&(n["@_kx"]=String(Math.round(t.reflectionSkewX))),typeof t.reflectionSkewY=="number"&&(n["@_ky"]=String(Math.round(t.reflectionSkewY))),t.reflectionAlignment&&(n["@_algn"]=t.reflectionAlignment),typeof t.reflectionRotateWithShape=="boolean"&&(n["@_rotWithShape"]=t.reflectionRotateWithShape?"1":"0"),typeof t.reflectionStartPosition=="number"&&(n["@_stPos"]=String(Math.round(t.reflectionStartPosition*1e5))),n}buildBlurXml(t){let e=typeof t.blurRadius=="number"&&Number.isFinite(t.blurRadius)&&t.blurRadius>0?t.blurRadius:void 0;if(e!==void 0)return {"@_rad":String(Math.round(e*this.context.emuPerPx)),"@_grow":t.blurGrow?"1":"0"}}buildLineEffectListXml(t){let e={},n=false,r=String(t.lineShadowColor||"").trim();if(r.length>0&&r!=="transparent"){let i=typeof t.lineShadowOffsetX=="number"?t.lineShadowOffsetX:2,s=typeof t.lineShadowOffsetY=="number"?t.lineShadowOffsetY:2,a=typeof t.lineShadowBlur=="number"?Math.max(0,t.lineShadowBlur):4,l=typeof t.lineShadowOpacity=="number"?this.context.clampUnitInterval(t.lineShadowOpacity):.35,c=Math.sqrt(i*i+s*s),u=(Math.atan2(s,i)*180/Math.PI+360)%360;e["a:outerShdw"]={"@_blurRad":String(Math.round(a*this.context.emuPerPx)),"@_dist":String(Math.round(c*this.context.emuPerPx)),"@_dir":String(Math.round(u*6e4)),"a:srgbClr":{"@_val":r.replace("#",""),"a:alpha":{"@_val":String(Math.round(l*1e5))}}},n=true;}let o=String(t.lineGlowColor||"").trim();if(o.length>0&&o!=="transparent"){let i=typeof t.lineGlowRadius=="number"&&t.lineGlowRadius>0?t.lineGlowRadius:void 0;if(i!==void 0){let s=typeof t.lineGlowOpacity=="number"?this.context.clampUnitInterval(t.lineGlowOpacity):.4;e["a:glow"]={"@_rad":String(Math.round(i*this.context.emuPerPx)),"a:srgbClr":{"@_val":o.replace("#",""),"a:alpha":{"@_val":String(Math.round(s*1e5))}}},n=true;}}return n?e:void 0}},vEe=class{extractor;dagExtractor;builder;constructor(t){this.extractor=new yEe({emuPerPx:t.emuPerPx,parseColor:t.parseColor,extractColorOpacity:t.extractColorOpacity}),this.dagExtractor=new hEe({emuPerPx:t.emuPerPx,parseColor:t.parseColor,extractColorOpacity:t.extractColorOpacity,ensureArray:t.ensureArray}),this.builder=new bEe({emuPerPx:t.emuPerPx,clampUnitInterval:t.clampUnitInterval});}extractShadowStyle(t){return this.extractor.extractShadowStyle(t)}extractInnerShadowStyle(t){return this.extractor.extractInnerShadowStyle(t)}extractGlowStyle(t){return this.extractor.extractGlowStyle(t)}extractSoftEdgeStyle(t){return this.extractor.extractSoftEdgeStyle(t)}extractReflectionStyle(t){return this.extractor.extractReflectionStyle(t)}extractBlurStyle(t){return this.extractor.extractBlurStyle(t)}extractEffectDagStyle(t){return this.dagExtractor.extractEffectDagStyle(t)}buildOuterShadowXml(t){return this.builder.buildOuterShadowXml(t)}buildPresetShadowXml(t){return this.builder.buildPresetShadowXml(t)}buildInnerShadowXml(t){return this.builder.buildInnerShadowXml(t)}buildGlowXml(t){return this.builder.buildGlowXml(t)}buildSoftEdgeXml(t){return this.builder.buildSoftEdgeXml(t)}buildReflectionXml(t){return this.builder.buildReflectionXml(t)}buildBlurXml(t){return this.builder.buildBlurXml(t)}buildLineEffectListXml(t){return this.builder.buildLineEffectListXml(t)}},hJ=class{colorTransformCodec;gradientStyleCodec;shapeEffectXmlCodec;constructor(t){this.colorTransformCodec=new GMe({resolveThemeColor:t.resolveThemeColor}),this.gradientStyleCodec=new qMe({ensureArray:t.ensureArray,parseColor:(e,n)=>this.parseColor(e,n),extractColorOpacity:e=>this.extractColorOpacity(e),clampUnitInterval:e=>this.clampUnitInterval(e),hexToRgb:e=>this.hexToRgb(e),rgbToHex:(e,n,r)=>this.rgbToHex(e,n,r)}),this.shapeEffectXmlCodec=new vEe({emuPerPx:t.emuPerPx,parseColor:(e,n)=>this.parseColor(e,n),extractColorOpacity:e=>this.extractColorOpacity(e),clampUnitInterval:e=>this.clampUnitInterval(e),ensureArray:t.ensureArray});}parseColorChoice(t,e){return this.colorTransformCodec.parseColorChoice(t,e)}parseColor(t,e){return this.colorTransformCodec.parseColor(t,e)}percentAttrToUnit(t){return this.colorTransformCodec.percentAttrToUnit(t)}clampUnitInterval(t){return this.colorTransformCodec.clampUnitInterval(t)}hexToRgb(t){return this.colorTransformCodec.hexToRgb(t)}rgbToHex(t,e,n){return this.colorTransformCodec.rgbToHex(t,e,n)}applyColorTransforms(t,e){return this.colorTransformCodec.applyColorTransforms(t,e)}extractColorChoiceNode(t){if(!t)return;let e=["a:srgbClr","a:schemeClr","a:prstClr","a:sysClr"];for(let n of e){let r=t[n];if(r)return r}}extractColorOpacity(t){let e=this.extractColorChoiceNode(t);if(!e)return;let n=this.percentAttrToUnit(e["a:alpha"]?.["@_val"]),r=this.percentAttrToUnit(e["a:alphaMod"]?.["@_val"]),o=this.percentAttrToUnit(e["a:alphaOff"]?.["@_val"]);if(n===void 0&&r===void 0&&o===void 0)return;let i=n??1;return r!==void 0&&(i*=r),o!==void 0&&(i+=o),this.clampUnitInterval(i)}colorWithOpacity(t,e){if(e===void 0)return t;let n=this.hexToRgb(t);return n?`rgba(${n.r}, ${n.g}, ${n.b}, ${this.clampUnitInterval(e)})`:t}extractGradientOpacity(t){return this.gradientStyleCodec.extractGradientOpacity(t)}extractGradientStops(t){return this.gradientStyleCodec.extractGradientStops(t)}extractGradientType(t){return this.gradientStyleCodec.extractGradientType(t)}extractGradientAngle(t){return this.gradientStyleCodec.extractGradientAngle(t)}buildGradientCssFromStops(t,e,n){return this.gradientStyleCodec.buildGradientCssFromStops(t,e,n)}extractGradientFillCss(t){return this.gradientStyleCodec.extractGradientFillCss(t)}extractShadowStyle(t){return this.shapeEffectXmlCodec.extractShadowStyle(t)}extractInnerShadowStyle(t){return this.shapeEffectXmlCodec.extractInnerShadowStyle(t)}extractGlowStyle(t){return this.shapeEffectXmlCodec.extractGlowStyle(t)}extractSoftEdgeStyle(t){return this.shapeEffectXmlCodec.extractSoftEdgeStyle(t)}extractReflectionStyle(t){return this.shapeEffectXmlCodec.extractReflectionStyle(t)}extractBlurStyle(t){return this.shapeEffectXmlCodec.extractBlurStyle(t)}extractEffectDagStyle(t){return this.shapeEffectXmlCodec.extractEffectDagStyle(t)}buildGradientFillXml(t){return this.gradientStyleCodec.buildGradientFillXml(t)}buildOuterShadowXml(t){return this.shapeEffectXmlCodec.buildOuterShadowXml(t)}buildPresetShadowXml(t){return this.shapeEffectXmlCodec.buildPresetShadowXml(t)}buildInnerShadowXml(t){return this.shapeEffectXmlCodec.buildInnerShadowXml(t)}buildGlowXml(t){return this.shapeEffectXmlCodec.buildGlowXml(t)}buildSoftEdgeXml(t){return this.shapeEffectXmlCodec.buildSoftEdgeXml(t)}buildReflectionXml(t){return this.shapeEffectXmlCodec.buildReflectionXml(t)}buildBlurXml(t){return this.shapeEffectXmlCodec.buildBlurXml(t)}buildLineEffectListXml(t){return this.shapeEffectXmlCodec.buildLineEffectListXml(t)}extractGradientFillColor(t){return this.gradientStyleCodec.extractGradientFillColor(t)}extractGradientFlip(t){return this.gradientStyleCodec.extractGradientFlip(t)}extractGradientRotWithShape(t){return this.gradientStyleCodec.extractGradientRotWithShape(t)}extractGradientScaled(t){return this.gradientStyleCodec.extractGradientScaled(t)}extractGradientPathType(t){return this.gradientStyleCodec.extractGradientPathType(t)}extractGradientFocalPoint(t){return this.gradientStyleCodec.extractGradientFocalPoint(t)}extractGradientFillToRect(t){return this.gradientStyleCodec.extractGradientFillToRect(t)}},SEe=["a:srgbClr","a:schemeClr","a:sysClr","a:prstClr","a:scrgbClr","a:hslClr"];xJ=class{context;constructor(t){this.context=t;}extractShapeStyle(t,e){let n={},r=t||{},o=r["a:solidFill"],i=r["a:gradFill"],s=r["a:pattFill"],a=r["a:noFill"],l=r["a:blipFill"];if(o){n.fillMode="solid",n.fillColor=this.context.parseColor(o),n.fillOpacity=this.context.extractColorOpacity(o);let d=cb(o);d&&(n.fillColorXml=d);}else if(i){n.fillMode="gradient",n.fillColor=this.context.extractGradientFillColor(i),n.fillOpacity=this.context.extractGradientOpacity(i),n.fillGradient=this.context.extractGradientFillCss(i),n.fillGradientStops=this.context.extractGradientStops(i),n.fillGradientAngle=this.context.extractGradientAngle(i),n.fillGradientType=this.context.extractGradientType(i),n.fillGradientPathType=this.context.extractGradientPathType(i),n.fillGradientFocalPoint=this.context.extractGradientFocalPoint(i),n.fillGradientFillToRect=this.context.extractGradientFillToRect(i);let d=this.context.extractGradientFlip(i);d&&(n.fillGradientFlip=d);let p=this.context.extractGradientRotWithShape(i);p!==void 0&&(n.fillGradientRotWithShape=p);let f=this.context.extractGradientScaled(i);f!==void 0&&(n.fillGradientScaled=f);}else if(s){n.fillMode="pattern",n.fillColor=this.context.parseColor(s["a:fgClr"])||this.context.parseColor(s["a:bgClr"]),n.fillOpacity=this.context.extractColorOpacity(s["a:fgClr"])||this.context.extractColorOpacity(s["a:bgClr"]);let d=String(s["@_prst"]||"").trim();d.length>0&&(n.fillPatternPreset=d);let p=this.context.parseColor(s["a:bgClr"]);p&&(n.fillPatternBackgroundColor=p);let f=s["a:fgClr"];f&&(n.fillPatternFgClrXml=f);let h=s["a:bgClr"];h&&(n.fillPatternBgClrXml=h);}else if(a){let d=this.extractHiddenFillFromExtLst(r);if(d){let p=d["a:solidFill"],f=d["a:gradFill"];p?(n.fillMode="solid",n.fillColor=this.context.parseColor(p),n.fillOpacity=this.context.extractColorOpacity(p)):f?(n.fillMode="gradient",n.fillColor=this.context.extractGradientFillColor(f),n.fillOpacity=this.context.extractGradientOpacity(f),n.fillGradient=this.context.extractGradientFillCss(f),n.fillGradientStops=this.context.extractGradientStops(f),n.fillGradientAngle=this.context.extractGradientAngle(f),n.fillGradientType=this.context.extractGradientType(f)):(n.fillMode="none",n.fillColor="transparent",n.fillOpacity=0);}else n.fillMode="none",n.fillColor="transparent",n.fillOpacity=0;}else l?(n.fillMode="image",n.fillColor="transparent",n.fillOpacity=0):r["a:grpFill"]!==void 0?n.fillMode="group":e?.["a:fillRef"]&&this.context.resolveThemeFillRef(e["a:fillRef"],n);let c=r["a:ln"];if(c){if(TEe(c,r,n,this.context,p=>this.extractHiddenLineFromExtLst(p)))return n}else e?.["a:lnRef"]&&this.context.resolveThemeLineRef(e["a:lnRef"],n);Object.assign(n,this.context.extractShadowStyle(r)),Object.assign(n,this.context.extractInnerShadowStyle(r)),Object.assign(n,this.context.extractGlowStyle(r)),Object.assign(n,this.context.extractSoftEdgeStyle(r)),Object.assign(n,this.context.extractReflectionStyle(r)),Object.assign(n,this.context.extractBlurStyle(r)),Object.assign(n,this.context.extractEffectDagStyle(r)),e?.["a:effectRef"]&&this.context.resolveThemeEffectRef(e["a:effectRef"],n);let u=e?.["a:fontRef"];if(u){let d=String(u["@_idx"]||"").trim();d.length>0&&(n.fontRefIdx=d);let p=this.extractFontRefColorXml(u);p&&(n.fontRefColorXml=p);}return wEe(r,n),CEe(r,n,this.context),n}extractFontRefColorXml(t){if(!t)return;let e=["a:scrgbClr","a:srgbClr","a:hslClr","a:sysClr","a:schemeClr","a:prstClr"];for(let n of e){let r=t[n];if(r!==void 0)return {[n]:r}}}extractHiddenFillFromExtLst(t){let e=t["a:extLst"];if(!e)return;let n=this.context.ensureArray(e["a:ext"]);for(let r of n){let o=r;if(String(o?.["@_uri"]||"")==="{AF507438-7753-43E0-B8FC-AC1667EBCBE1}")return o["a14:hiddenFill"]??o["p14:hiddenFill"]}}extractHiddenLineFromExtLst(t){let e=t["a:extLst"];if(!e)return;let n=this.context.ensureArray(e["a:ext"]);for(let r of n){let o=r;if(String(o?.["@_uri"]||"")==="{91240B29-F687-4F45-9708-019B960494DF}")return o["a14:hiddenLine"]??o["p14:hiddenLine"]}}};yJ=class{context;constructor(t){this.context=t;}parseTableData(t){try{let e=t["a:tbl"];if(!e)return;let n=this.context.ensureArray(e["a:tblGrid"]?.["a:gridCol"]),r=n.reduce((p,f)=>{let h=parseInt(String(f?.["@_w"]||"0"),10)||0;return p+h},0),o=r>0?n.map(p=>(parseInt(String(p?.["@_w"]||"0"),10)||0)/r):n.map(()=>1/Math.max(n.length,1)),i=e["a:tblPr"]||{},s=this.extractTableStyleId(i),l=this.context.ensureArray(e["a:tr"]).map(p=>{let f=parseInt(String(p?.["@_h"]||"0"),10)||0,h=Math.round(f/this.context.emuPerPx),m=this.context.ensureArray(p["a:tc"]);return {height:h,cells:m.map(g=>{let x=this.extractCellExtraAttributes(g["a:tcPr"]);return {text:this.extractTableCellText(g),style:this.extractTableCellStyleFromXml(g),gridSpan:g["@_gridSpan"]?parseInt(String(g["@_gridSpan"]),10):void 0,rowSpan:g["@_rowSpan"]?parseInt(String(g["@_rowSpan"]),10):void 0,vMerge:g["@_vMerge"]==="1",hMerge:g["@_hMerge"]==="1",...x?{extraAttributes:x}:{}}})}}),c=this.extractBandCycle(i,"bandRowCycle"),u=this.extractBandCycle(i,"bandColCycle"),d=i["@_rtl"]==="1";return {rows:l,columnWidths:o,bandedRows:i["@_bandRow"]==="1",firstRowHeader:i["@_firstRow"]==="1",bandedColumns:i["@_bandCol"]==="1",lastRow:i["@_lastRow"]==="1",firstCol:i["@_firstCol"]==="1",lastCol:i["@_lastCol"]==="1",tableStyleId:s,bandRowCycle:c??1,bandColCycle:u??1,...d?{rtl:!0}:{}}}catch{return}}extractTableStyleId(t){let e=t["a:tableStyleId"];if(e!=null){let i=String(typeof e=="string"||typeof e=="number"?e:e["#text"]??"").trim();if(i.length>0)return i}let n=t["a:tblStyle"],r=String(n?.["@_val"]||t["@_tblStyle"]||"").trim();return r.length>0?r:void 0}extractBandCycle(t,e){let n=`@_${e}`,r=t[n];if(r!=null){let i=parseInt(String(r),10);if(Number.isFinite(i)&&i>0)return i}let o=t[`a:${e}`];if(o){let i=parseInt(String(o["@_val"]??""),10);if(Number.isFinite(i)&&i>0)return i}}extractCellExtraAttributes(t){if(!t)return;let e=["horzOverflow","anchorCtr","headers","hideSlicers","slicerCacheId"],n={};for(let r of e){let o=t[`@_${r}`];o!=null&&String(o).length>0&&(n[r]=String(o));}return Object.keys(n).length>0?n:void 0}extractTableCellText(t){let e=this.context.ensureArray(t?.["a:txBody"]?.["a:p"]),n=[];for(let r of e){let o=this.context.ensureArray(r["a:r"]),i=this.context.ensureArray(r["a:fld"]),s="";for(let a of o)s+=String(a?.["a:t"]??"");for(let a of i)s+=String(a?.["a:t"]??"");n.push(s);}return n.join(`
261
- `)}extractTableCellStyleFromXml(t){try{let e=t?.["a:tcPr"],n={},r=!1;return r=REe(e,n,this.context)||r,r=kEe(e,n,this.context)||r,r=IEe(e,n,this.context)||r,r=NEe(e,n)||r,r=DEe(t,n,this.context)||r,r?n:void 0}catch{return}}},bJ=class{context;constructor(t){this.context=t;}parseMediaData(t,e){let n={};try{let r=t["a:videoFile"],o=t["a:audioFile"];if(r){n.mediaType="video";let i=r["@_r:link"],s=r["@_r:embed"],a=i??s;n.isLinked=typeof i=="string"&&i.length>0,typeof a=="string"&&a.length>0&&(n.mediaPath=this.resolveRelationshipTarget(e,a),n.mediaMimeType=this.getMediaMimeType(n.mediaPath));}else if(o){n.mediaType="audio";let i=o["@_r:link"],s=o["@_r:embed"],a=i??s;n.isLinked=typeof i=="string"&&i.length>0,typeof a=="string"&&a.length>0&&(n.mediaPath=this.resolveRelationshipTarget(e,a),n.mediaMimeType=this.getMediaMimeType(n.mediaPath));}else n.mediaType="unknown";}catch{n.mediaType="unknown";}return n}resolveRelationshipTarget(t,e){let r=this.context.slideRelsMap.get(t)?.get(e);if(r)return this.context.resolvePath(t,r)}getMediaMimeType(t){if(!t)return;let e=(this.context.getPathExtension(t)??"").toLowerCase();return {mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mov:"video/quicktime",mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",wma:"audio/x-ms-wma",oga:"audio/ogg"}[e]}},BEe=[{pattern:/^Excel\./i,type:"excel",extension:"xlsx"},{pattern:/^Word\./i,type:"word",extension:"docx"},{pattern:/^PowerPoint\./i,type:"excel",extension:"pptx"},{pattern:/^Visio\./i,type:"visio",extension:"vsdx"},{pattern:/^Equation\./i,type:"mathtype",extension:"wmf"},{pattern:/^MathType/i,type:"mathtype",extension:"wmf"},{pattern:/^AcroExch\./i,type:"pdf",extension:"pdf"},{pattern:/^Acrobat\./i,type:"pdf",extension:"pdf"},{pattern:/^Package$/i,type:"package",extension:"bin"}],OEe=new Map([["00020820-0000-0000-C000-000000000046",{type:"excel",extension:"xls"}],["00020830-0000-0000-C000-000000000046",{type:"excel",extension:"xlsx"}],["00020906-0000-0000-C000-000000000046",{type:"word",extension:"doc"}],["F4754C9B-64F5-4B40-8AF4-679732AC0607",{type:"word",extension:"docx"}],["0003000C-0000-0000-C000-000000000046",{type:"package",extension:"bin"}],["B801CA65-A1FC-11D0-85AD-444553540000",{type:"pdf",extension:"pdf"}],["00021A20-0000-0000-C000-000000000046",{type:"visio",extension:"vsd"}],["0002CE02-0000-0000-C000-000000000046",{type:"mathtype",extension:"wmf"}]]);UEe=new Set(["{D42C27E5-1956-4C4D-AC15-FE9D03D7D63E}"]);wJ=class{context;constructor(t){this.context=t;}parseGraphicFrame(t,e,n){try{let r=t["p:xfrm"],o=r?.["a:off"]||{},i=r?.["a:ext"]||{},s=t["a:graphic"]?.["a:graphicData"],{flipHorizontal:a,flipVertical:l}=this.context.readFlipState(r),c=this.parseGraphicFrameType(s);n&&this.context.inspectGraphicFrameCompatibility(c,n,e);let u={id:e,type:c,x:Math.round(parseInt(String(o["@_x"]||"0"),10)/this.context.emuPerPx),y:Math.round(parseInt(String(o["@_y"]||"0"),10)/this.context.emuPerPx),width:Math.round(parseInt(String(i["@_cx"]||"0"),10)/this.context.emuPerPx),height:Math.round(parseInt(String(i["@_cy"]||"0"),10)/this.context.emuPerPx),rotation:r?.["@_rot"]?parseInt(String(r["@_rot"]),10)/6e4:void 0,skewX:r?.["@_skewX"]?parseInt(String(r["@_skewX"]),10)/6e4:void 0,skewY:r?.["@_skewY"]?parseInt(String(r["@_skewY"]),10)/6e4:void 0,flipHorizontal:a,flipVertical:l,rawXml:t},d=$Ee(s);if(c==="table"&&s){let p=this.context.parseTableData(s);return {...u,tableData:p,...d.length>0?{extensionXml:d}:{}}}if(c==="ink"&&s){let p=zEe(s),f=p?GEe(p):{inkPaths:[],inkColors:[],inkWidths:[]};return {...u,inkPaths:f.inkPaths,...f.inkColors.length>0?{inkColors:f.inkColors}:{},...f.inkWidths.length>0?{inkWidths:f.inkWidths}:{},...d.length>0?{extensionXml:d}:{}}}if(c==="media"&&s&&n){let p=this.context.parseMediaData(s,n);return {...u,...p,...d.length>0?{extensionXml:d}:{}}}if(c==="ole"&&s){let p=s["p:oleObj"],f=String(p?.["@_progId"]||"").trim()||void 0,h=String(p?.["@_name"]||"").trim()||void 0,m=String(p?.["@_classid"]||"").trim()||void 0,g=p?.["p:embed"],x=p?.["p:link"],v=p?.["@_showAsIcon"],S=v===void 0?void 0:String(v)==="1"||String(v).toLowerCase()==="true",w=p?.["@_imgW"],C=p?.["@_imgH"],T=w!==void 0&&String(w).length>0?parseInt(String(w),10):void 0,E=C!==void 0&&String(C).length>0?parseInt(String(C),10):void 0,M,P,R=String(x?.["@_r:id"]||g?.["@_r:id"]||p?.["@_r:id"]||p?.["@_id"]||"").trim(),k,L=!!x&&!g;R&&n&&(M=this.context.slideRelsMap.get(n)?.get(R),this.context.externalRelsMap.get(n)?.has(R)&&(L=!0,k=M));let N=p?.["p:pic"]?.["p:blipFill"]?.["a:blip"],B=String(N?.["@_r:embed"]||"").trim();B&&n&&(P=this.context.slideRelsMap.get(n)?.get(B));let{oleObjectType:O,oleFileExtension:H}=vJ(f,m),K=SJ(M)??H,ee=t?.["p:nvGraphicFramePr"]?.["p:cNvPr"],j=n?this.context.slideRelsMap.get(n):void 0,{actionClick:re,actionHover:ne}=this.context.parseElementActions(ee,j,this.context.getOrderedSlidePaths());return {...u,oleProgId:f,oleName:h,oleClsId:m,oleObjectType:O,oleFileExtension:K,isLinked:L,externalPath:k,oleTarget:M,previewImage:P,oleShowAsIcon:S,oleImgW:T,oleImgH:E,actionClick:re,actionHover:ne,...d.length>0?{extensionXml:d}:{}}}return {...u,...d.length>0?{extensionXml:d}:{}}}catch{return null}}parseGraphicFrameType(t){if(!t)return "unknown";let e=String(t["@_uri"]||"").toLowerCase();if(t["a:tbl"]||e.includes("/drawingml/2006/table"))return "table";if(t["c:chart"]||e.includes("/drawingml/2006/chart"))return "chart";if(t["dgm:relIds"]||e.includes("/drawingml/2006/diagram"))return "smartArt";if(t["p:oleObj"]||e.includes("/drawingml/2006/ole"))return "ole";if(t["a:videoFile"]||t["a:audioFile"]||e.includes("/drawingml/2006/media"))return "media";if(t["aink:ink"]||e.includes("/2010/ink")||e.includes("drawing/2010/ink"))return "ink";let n=t["mc:AlternateContent"];if(n){let r=Array.isArray(n["mc:Choice"])?n["mc:Choice"]:n["mc:Choice"]?[n["mc:Choice"]]:[];for(let o of r)if(String(o?.["@_Requires"]||"").toLowerCase().includes("aink")||o?.["aink:ink"])return "ink"}return "unknown"}},CJ=class{context;constructor(t){this.context=t;}parseConnector(t,e,n){try{let r=t["p:spPr"],o=r?.["a:xfrm"];if(!o)return null;let i=o["a:off"],s=o["a:ext"];if(!i||!s)return null;let a=String(r?.["a:prstGeom"]?.["@_prst"]||"straightConnector1"),l=this.context.parseGeometryAdjustments(r?.["a:prstGeom"]),c=o["@_rot"]?parseInt(String(o["@_rot"]),10)/6e4:void 0,u=o["@_skewX"]?parseInt(String(o["@_skewX"]),10)/6e4:void 0,d=o["@_skewY"]?parseInt(String(o["@_skewY"]),10)/6e4:void 0,{flipHorizontal:p,flipVertical:f}=this.context.readFlipState(o),h=t?.["p:nvCxnSpPr"]?.["p:cNvCxnSpPr"],m=this.context.extractShapeStyle(r),g=h?.["a:stCxn"];if(g){let R={};g["@_id"]&&(R.shapeId=String(g["@_id"])),g["@_idx"]!==void 0&&(R.connectionSiteIndex=parseInt(String(g["@_idx"]),10)),m&&(m.connectorStartConnection=R);}let x=h?.["a:endCxn"];if(x){let R={};x["@_id"]&&(R.shapeId=String(x["@_id"])),x["@_idx"]!==void 0&&(R.connectionSiteIndex=parseInt(String(x["@_idx"]),10)),m&&(m.connectorEndConnection=R);}let v=t?.["p:nvCxnSpPr"]?.["p:cNvPr"],S=n?this.context.slideRelsMap.get(n):void 0,{actionClick:w,actionHover:C}=this.context.parseElementActions(v,S,this.context.getOrderedSlidePaths()),T=v?.["@_name"]?String(v["@_name"]).trim():void 0,E=this.context.parseShapeLocks(h?.["a:cxnSpLocks"]??h?.["a:spLocks"]),M=t["p:txBody"],P=this.context.parseConnectorTextBody?.(M,n);return {id:e,name:T||void 0,type:"connector",x:Math.round(parseInt(String(i["@_x"]||"0"),10)/this.context.emuPerPx),y:Math.round(parseInt(String(i["@_y"]||"0"),10)/this.context.emuPerPx),width:Math.round(parseInt(String(s["@_cx"]||"0"),10)/this.context.emuPerPx),height:Math.round(parseInt(String(s["@_cy"]||"0"),10)/this.context.emuPerPx),shapeType:a,shapeAdjustments:l,rotation:c,skewX:u,skewY:d,flipHorizontal:p,flipVertical:f,shapeStyle:m,rawXml:t,actionClick:w,actionHover:C,locks:E,...P?{text:P.text,textStyle:P.textStyle,textSegments:P.textSegments}:{}}}catch{return null}}},TJ=class{width=0;height=0;widthEmu=0;heightEmu=0;notesWidthEmu=0;notesHeightEmu=0;slides=[];layoutOptions=[];headerFooter;presentationProperties;customShows;sections;warnings=[];themeColorMap={};theme;tableStyleMap;embeddedFonts;mruColors;notesMaster;handoutMaster;slideMasters;tags;customProperties;coreProperties;appProperties;themeOptions;hasMacros;hasDigitalSignatures;digitalSignatureCount;presentationGuides;customXmlParts;photoAlbum;kinsoku;modifyVerifier;customerData;slideSizeType;thumbnailData;commentAuthors;conformance;withDimensions(t,e,n,r){return this.width=t,this.height=e,this.widthEmu=n,this.heightEmu=r,this}withNotesDimensions(t,e){return this.notesWidthEmu=t,this.notesHeightEmu=e,this}withSlides(t){return this.slides=t,this}withLayoutOptions(t){return this.layoutOptions=t,this}withHeaderFooter(t){return this.headerFooter=t,this}withPresentationProperties(t){return this.presentationProperties=t,this}withCustomShows(t){return this.customShows=t,this}withSections(t){return this.sections=t,this}withWarnings(t){return this.warnings=t,this}withThemeColorMap(t){return this.themeColorMap=t,this}withTheme(t){return this.theme=t,this}withTableStyleMap(t){return this.tableStyleMap=t,this}withEmbeddedFonts(t){return this.embeddedFonts=t,this}withMruColors(t){return this.mruColors=t,this}withNotesMaster(t){return this.notesMaster=t,this}withHandoutMaster(t){return this.handoutMaster=t,this}withSlideMasters(t){return this.slideMasters=t,this}withTags(t){return this.tags=t,this}withCustomProperties(t){return this.customProperties=t,this}withCoreProperties(t){return this.coreProperties=t,this}withAppProperties(t){return this.appProperties=t,this}withThemeOptions(t){return this.themeOptions=t,this}withHasMacros(t){return this.hasMacros=t,this}withHasDigitalSignatures(t){return this.hasDigitalSignatures=t,this}withDigitalSignatureCount(t){return this.digitalSignatureCount=t,this}withPresentationGuides(t){return this.presentationGuides=t,this}withCustomXmlParts(t){return this.customXmlParts=t,this}withPhotoAlbum(t){return this.photoAlbum=t,this}withKinsoku(t){return this.kinsoku=t,this}withModifyVerifier(t){return this.modifyVerifier=t,this}withCustomerData(t){return this.customerData=t,this}withSlideSizeType(t){return this.slideSizeType=t,this}withThumbnailData(t){return this.thumbnailData=t,this}withCommentAuthors(t){return this.commentAuthors=t,this}withConformance(t){return this.conformance=t,this}build(){return {width:this.width,height:this.height,widthEmu:this.widthEmu,heightEmu:this.heightEmu,slideSizeType:this.slideSizeType,notesWidthEmu:this.notesWidthEmu>0?this.notesWidthEmu:void 0,notesHeightEmu:this.notesHeightEmu>0?this.notesHeightEmu:void 0,slides:this.slides,layoutOptions:this.layoutOptions,headerFooter:this.headerFooter,presentationProperties:this.presentationProperties,customShows:this.customShows,sections:this.sections,warnings:this.warnings,themeColorMap:this.themeColorMap,theme:this.theme,tableStyleMap:this.tableStyleMap,embeddedFonts:this.embeddedFonts,mruColors:this.mruColors,notesMaster:this.notesMaster,handoutMaster:this.handoutMaster,slideMasters:this.slideMasters,tags:this.tags,customProperties:this.customProperties,coreProperties:this.coreProperties,appProperties:this.appProperties,themeOptions:this.themeOptions,hasMacros:this.hasMacros,hasDigitalSignatures:this.hasDigitalSignatures,digitalSignatureCount:this.digitalSignatureCount,presentationGuides:this.presentationGuides,photoAlbum:this.photoAlbum,kinsoku:this.kinsoku,modifyVerifier:this.modifyVerifier,customXmlParts:this.customXmlParts,customerData:this.customerData,thumbnailData:this.thumbnailData,commentAuthors:this.commentAuthors,conformance:this.conformance}}},_J=class{commentAuthorMap;commentAuthorDetails;emuPerPx;usedSlideNumbers=new Set;usedMediaPaths=new Set;existingCommentPaths=new Set;activeCommentPaths=new Set;existingAuthorIdByName=new Map;usedAuthorIdByName=new Map;commentLastIdxByAuthorId=new Map;maxCommentPartIndex=0;maxAuthorId=-1;constructor(t){this.commentAuthorMap=t.commentAuthorMap,this.commentAuthorDetails=t.commentAuthorDetails??new Map,this.emuPerPx=t.emuPerPx,this.initializeZipState(t.zip),this.initializeCommentAuthorState(t.commentAuthorMap);}nextSlideNumber(){let t=1;for(;this.usedSlideNumbers.has(t);)t+=1;return this.usedSlideNumbers.add(t),t}nextMediaPath(t,e="image"){let n=1,r=e==="audio"?"audio":e==="video"?"video":"image",o=`ppt/media/${r}${n}.${t}`;for(;this.usedMediaPaths.has(o);)n+=1,o=`ppt/media/${r}${n}.${t}`;return this.usedMediaPaths.add(o),o}getUsedMediaPaths(){return this.usedMediaPaths}nextCommentPath(){return this.maxCommentPartIndex+=1,`ppt/comments/comment${this.maxCommentPartIndex}.xml`}toSlideCommentTarget(t){return `../${t.startsWith("ppt/")?t.substring(4):t}`}activateCommentPath(t){this.activeCommentPaths.add(t);}isCommentPathActive(t){return this.activeCommentPaths.has(t)}getExistingCommentPaths(){return this.existingCommentPaths}getActiveCommentPaths(){return this.activeCommentPaths}toEmu(t,e=0){return typeof t!="number"||!Number.isFinite(t)?e:Math.round(t*this.emuPerPx)}resolveCommentAuthorId(t){let e=String(t||"User").trim()||"User",n=this.usedAuthorIdByName.get(e);if(n)return n;let r=this.existingAuthorIdByName.get(e);return r||(this.maxAuthorId+=1,r=String(Math.max(this.maxAuthorId,0))),this.usedAuthorIdByName.set(e,r),this.commentAuthorMap.set(r,e),r}resolveCommentIndex(t,e,n){let r=Number.parseInt(String(e||""),10),o=Number.isFinite(r)?r:n,i=this.commentLastIdxByAuthorId.get(t)??-1;return this.commentLastIdxByAuthorId.set(t,Math.max(i,o)),o}hasUsedCommentAuthors(){return this.usedAuthorIdByName.size>0}getUsedCommentAuthors(){return Array.from(this.usedAuthorIdByName.entries()).map(([t,e],n)=>{let r=this.commentAuthorDetails.get(e);if(r)return {authorId:e,authorName:t,initials:r.initials,lastCommentIndex:Math.max(r.lastIdx,this.commentLastIdxByAuthorId.get(e)??0),colorIndex:r.clrIdx};let o=Number.parseInt(e,10),i=Number.isFinite(o)?Math.max(0,o):n;return {authorId:e,authorName:t,initials:this.toCommentInitials(t),lastCommentIndex:this.commentLastIdxByAuthorId.get(e)??0,colorIndex:i%10}}).sort((t,e)=>{let n=Number.parseInt(String(t.authorId||""),10),r=Number.parseInt(String(e.authorId||""),10);return Number.isFinite(n)&&Number.isFinite(r)?n-r:String(t.authorId||"").localeCompare(String(e.authorId||""))})}initializeZipState(t){t.forEach(e=>{let n=e.match(/^ppt\/slides\/slide(\d+)\.xml$/);if(n){let i=Number.parseInt(n[1],10);Number.isFinite(i)&&this.usedSlideNumbers.add(i);}e.startsWith("ppt/media/")&&this.usedMediaPaths.add(e);let r=e.match(/^ppt\/comments\/comment(\d+)\.xml$/);if(!r)return;this.existingCommentPaths.add(e);let o=Number.parseInt(r[1],10);Number.isFinite(o)&&(this.maxCommentPartIndex=Math.max(this.maxCommentPartIndex,o));});}initializeCommentAuthorState(t){for(let[e,n]of t.entries()){let r=n.trim();if(r.length===0)continue;this.existingAuthorIdByName.has(r)||this.existingAuthorIdByName.set(r,e);let o=Number.parseInt(e,10);Number.isFinite(o)&&(this.maxAuthorId=Math.max(this.maxAuthorId,o));}}toCommentInitials(t){let e=t.split(/\s+/).map(n=>n.trim()).filter(n=>n.length>0);return e.length===0?"U":e.slice(0,2).map(n=>n[0].toUpperCase()).join("")}},MJ=class{zip=null;commentAuthorMap=null;_commentAuthorDetails=null;emuPerPx=9525;withZip(t){return this.zip=t,this}withCommentAuthorMap(t){return this.commentAuthorMap=t,this}withCommentAuthorDetails(t){return this._commentAuthorDetails=t,this}withEmuPerPx(t){return this.emuPerPx=t,this}build(){if(!this.zip)throw new Error("PptxSaveStateBuilder requires zip before build().");if(!this.commentAuthorMap)throw new Error("PptxSaveStateBuilder requires commentAuthorMap before build().");return new _J({zip:this.zip,commentAuthorMap:this.commentAuthorMap,commentAuthorDetails:this._commentAuthorDetails??void 0,emuPerPx:this.emuPerPx})}};PJ=class{validateAndDeduplicateIds(t,e){let n=[];if(EJ(t,n,e),n.length===0)return 0;let r=new Set,o=[],i=0;for(let a of n){let l=Number.parseInt(String(a["@_id"]??"0"),10),c=Number.isFinite(l)?l:0;c>i&&(i=c),c===0||r.has(c)?o.push(a):r.add(c);}let s=0;for(let a of o)i+=1,a["@_id"]=String(i),r.add(i),s+=1;return s}},AJ=class{createXmlElement(t){return {"p:cmLst":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","p:cm":t.slideComments.map((e,n)=>this.createCommentNode(t,e,n))}}}createCommentNode(t,e,n){let r=t.saveState.resolveCommentAuthorId(e.author),o=t.saveState.resolveCommentIndex(r,e.id,n),i=this.resolveCreatedAt(e.createdAt),s=t.saveState.toEmu(e.x,0),a=t.saveState.toEmu(e.y,0);return {"@_authorId":r,"@_dt":i,"@_idx":String(o),"p:pos":{"@_x":String(s),"@_y":String(a)},"p:text":String(e.text||"")}}resolveCreatedAt(t){let e=String(t||"").trim();return e.length===0||Number.isNaN(Date.parse(e))?new Date().toISOString():new Date(e).toISOString()}},RJ=class{createXmlElement(t){return {"p:cmAuthorLst":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","p:cmAuthor":t.saveState.getUsedCommentAuthors().map(e=>({"@_id":e.authorId,"@_name":e.authorName,"@_initials":e.initials,"@_lastIdx":String(e.lastCommentIndex),"@_clrIdx":String(e.colorIndex)}))}}}},kJ=class{createSlideCommentsFactory(){return new AJ}createCommentAuthorsFactory(){return new RJ}},IJ=class{warnings=[];warningKeys=new Set;resetWarnings(){this.warnings=[],this.warningKeys.clear();}getWarnings(){return this.warnings.map(t=>({...t}))}getXmlLocalName(t){if(!t)return "";let e=t.startsWith("@_")?t.slice(2):t,n=e.lastIndexOf(":");return n<0?e:e.slice(n+1)}reportWarning(t){let e=this.getWarningKey(t);if(this.warningKeys.has(e))return;this.warningKeys.add(e);let n={code:t.code,message:t.message,severity:t.severity||"warning",scope:t.scope,slideId:t.slideId,elementId:t.elementId,xmlPath:t.xmlPath};this.warnings.push(n);let r=n.slideId?`slide=${n.slideId}`:"presentation",o=n.xmlPath?` path=${n.xmlPath}`:"",i=`[PptxHandler][${n.severity}] ${n.code} (${r}) ${n.message}${o}`;n.severity==="info"?console.info(i):console.warn(i);}inspectPresentationCompatibility(){}inspectSlideCompatibility(t,e){}inspectShapeCompatibility(t,e,n,r){}inspectPictureCompatibility(t,e,n,r){}inspectGraphicFrameCompatibility(t,e,n){}normalizeWarningPath(t){return t?t.replace(/\[\d+\]/g,"[]"):""}getWarningKey(t){return [t.code,t.scope,t.slideId||"*",this.normalizeWarningPath(t.xmlPath)].join("|")}},NJ=class{context;constructor(t){this.context=t;}async updateOnSave(t,e){let n=this.toW3cDate(new Date),r=this.context.zip.file("docProps/core.xml");if(r)try{let i=await r.async("string"),s=this.context.parser.parse(i),a=s["cp:coreProperties"];if(a){this.applyCorePropertiesOverrides(a,e?.coreProperties);let l=this.extractXmlNodeText(a["cp:revision"]),c=Number.parseInt(l||"",10),u=Number.isFinite(c)&&c>=0?c+1:1;a["cp:revision"]=String(u);let d=a["dcterms:modified"];if(d&&typeof d=="object"&&!Array.isArray(d)){let f=d;f["@_xsi:type"]="dcterms:W3CDTF",f["#text"]=n,a["dcterms:modified"]=f;}else a["dcterms:modified"]={"@_xsi:type":"dcterms:W3CDTF","#text":n};this.extractXmlNodeText(a["cp:lastModifiedBy"])||(a["cp:lastModifiedBy"]="pptx"),s["cp:coreProperties"]=a,this.context.zip.file("docProps/core.xml",this.context.builder.build(s));}}catch(i){console.warn("Failed to update core document properties:",i);}let o=this.context.zip.file("docProps/app.xml");if(o){try{let i=await o.async("string"),s=this.context.parser.parse(i),a=s.Properties;if(!a)return;this.applyAppPropertiesOverrides(a,e?.appProperties);let l=t.filter(u=>u.hidden).length,c=t.filter(u=>String(u.notes||"").trim().length>0).length;a.Slides=String(t.length),a.HiddenSlides=String(l),a.Notes=String(c),s.Properties=a,this.context.zip.file("docProps/app.xml",this.context.builder.build(s));}catch(i){console.warn("Failed to update application document properties:",i);}await this.updateCustomProperties(e?.customProperties);}}applyCorePropertiesOverrides(t,e){if(!e)return;let n=[["title","dc:title"],["subject","dc:subject"],["creator","dc:creator"],["keywords","cp:keywords"],["description","dc:description"],["lastModifiedBy","cp:lastModifiedBy"],["revision","cp:revision"],["created","dcterms:created"],["modified","dcterms:modified"],["category","cp:category"],["contentStatus","cp:contentStatus"]];for(let[r,o]of n){let i=e[r];if(i===void 0)continue;let s=String(i).trim();s.length===0?delete t[o]:o.startsWith("dcterms:")?t[o]={"@_xsi:type":"dcterms:W3CDTF","#text":s}:t[o]=s;}}applyAppPropertiesOverrides(t,e){if(!e)return;let n=[["application","Application"],["appVersion","AppVersion"],["presentationFormat","PresentationFormat"],["company","Company"],["manager","Manager"],["template","Template"]],r=[["slides","Slides"],["hiddenSlides","HiddenSlides"],["notes","Notes"],["totalTime","TotalTime"],["words","Words"],["paragraphs","Paragraphs"]];for(let[o,i]of n){let s=e[o];if(s===void 0)continue;let a=String(s).trim();a.length===0?delete t[i]:t[i]=a;}for(let[o,i]of r){let s=e[o];if(s===void 0)continue;let a=Number(s);Number.isFinite(a)&&(t[i]=String(Math.trunc(a)));}}async updateCustomProperties(t){if(!t)return;let e=t.filter(r=>r.name.trim().length>0).map((r,o)=>({...r,pid:o+2}));if(e.length===0){this.context.zip.remove("docProps/custom.xml"),await this.removeCustomPropertiesPackagingArtifacts();return}let n={Properties:{"@_xmlns":"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties","@_xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",property:e.map(r=>{let o=this.normalizeCustomPropertyType(r.type),i={"@_fmtid":"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}","@_pid":String(r.pid),"@_name":r.name};return i[`vt:${o}`]=String(r.value??""),i})}};this.context.zip.file("docProps/custom.xml",this.context.builder.build(n)),await this.ensureCustomPropertiesPackagingArtifacts();}async ensureCustomPropertiesPackagingArtifacts(){let t="application/vnd.openxmlformats-officedocument.custom-properties+xml",e="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",n=this.context.zip.file("[Content_Types].xml");if(n)try{let o=await n.async("string"),i=this.context.parser.parse(o),s=i.Types;if(s){let a=Array.isArray(s.Override)?s.Override:s.Override?[s.Override]:[];a.some(c=>String(c?.["@_PartName"]||"")==="/docProps/custom.xml")||(a.push({"@_PartName":"/docProps/custom.xml","@_ContentType":t}),s.Override=a.length===1?a[0]:a,this.context.zip.file("[Content_Types].xml",this.context.builder.build(i)));}}catch(o){console.warn("Failed to update [Content_Types].xml for custom properties:",o);}let r=this.context.zip.file("_rels/.rels");if(r)try{let o=await r.async("string"),i=this.context.parser.parse(o),s=i.Relationships;if(s){let a=Array.isArray(s.Relationship)?s.Relationship:s.Relationship?[s.Relationship]:[];if(!a.some(c=>String(c?.["@_Type"]||"")===e)){let c=0;for(let u of a){let d=String(u?.["@_Id"]||""),p=Number.parseInt(d.replace(/^rId/,""),10);Number.isFinite(p)&&p>c&&(c=p);}a.push({"@_Id":`rId${c+1}`,"@_Type":e,"@_Target":"docProps/custom.xml"}),s.Relationship=a,this.context.zip.file("_rels/.rels",this.context.builder.build(i));}}}catch(o){console.warn("Failed to update _rels/.rels for custom properties:",o);}}async removeCustomPropertiesPackagingArtifacts(){let t="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",e=this.context.zip.file("[Content_Types].xml");if(e)try{let r=await e.async("string"),o=this.context.parser.parse(r),i=o.Types;if(i){let s=Array.isArray(i.Override)?i.Override:i.Override?[i.Override]:[],a=s.filter(l=>String(l?.["@_PartName"]||"")!=="/docProps/custom.xml");a.length!==s.length&&(i.Override=a.length===1?a[0]:a,this.context.zip.file("[Content_Types].xml",this.context.builder.build(o)));}}catch{}let n=this.context.zip.file("_rels/.rels");if(n)try{let r=await n.async("string"),o=this.context.parser.parse(r),i=o.Relationships;if(i){let s=Array.isArray(i.Relationship)?i.Relationship:i.Relationship?[i.Relationship]:[],a=s.filter(l=>String(l?.["@_Type"]||"")!==t);a.length!==s.length&&(i.Relationship=a,this.context.zip.file("_rels/.rels",this.context.builder.build(o)));}}catch{}}normalizeCustomPropertyType(t){let e=new Set(["lpwstr","i4","bool","filetime","r8","i2","ui4","lpstr"]),n=String(t||"lpwstr").trim().toLowerCase();return e.has(n)?n:"lpwstr"}extractXmlNodeText(t){if(t!=null){if(typeof t=="string"){let e=t.trim();return e.length>0?e:void 0}if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let e=t["#text"];if(e==null)return;let n=String(e).trim();return n.length>0?n:void 0}}}toW3cDate(t){return t.toISOString().replace(/\.\d{3}Z$/,"Z")}},DJ=class{setBackground(t,e,n){let r=this.resolvePartContext(t,e);if(!r)return;let o=r.xmlMap.get(e);if(!o)return;let i=o[r.rootTag]||{},s=i["p:cSld"]||{};if(n&&n.length>0&&n!=="transparent"){let a=n.replace("#","").toUpperCase();s["p:bg"]={"p:bgPr":{"a:solidFill":{"a:srgbClr":{"@_val":a}},"a:effectLst":{}}};}else delete s["p:bg"];i["p:cSld"]=s,o[r.rootTag]=i;}getBackgroundColor(t,e,n){let r=this.resolvePartContext(t,e);if(!r)return;let o=r.xmlMap.get(e);if(o)return n(o,r.rootTag)}resolvePartContext(t,e){let n=e.includes("slideLayout"),r=e.includes("slideMaster");if(!(!n&&!r))return n?{xmlMap:t.layoutXmlMap,rootTag:"p:sldLayout"}:{xmlMap:t.masterXmlMap,rootTag:"p:sldMaster"}}},LJ=914400/96,FJ=12700/8,eC="{72B1D4B2-8646-4E06-B1EF-53B0C71A9B0A}",_A="{2D200454-25E2-4014-A478-2F8E8D3F5837}",VEe=["p14:sldGuideLst","p15:sldGuideLst","p14:guideLst","p15:guideLst","sldGuideLst","guideLst"],WEe=["p14:guide","p15:guide","guide"];GJ=class{async loadSlides(t){let n=t.presentationData["p:presentation"]?.["p:sldIdLst"],r=this.toXmlObjectArray(n?.["p:sldId"]);if(r.length===0)return t.setOrderedSlidePaths([]),[];let o=await this.loadPresentationSlideRels(t),i=[];for(let a of r){let l=String(a["@_r:id"]||"").trim(),c=o.get(l);if(!c)continue;let u=c.startsWith("/")?c.substring(1):`ppt/${c}`;i.push(u);}t.setOrderedSlidePaths(i);let s=[];for(let a=0;a<r.length;a++){let l=await this.loadSingleSlide(t,r[a],a,o);l&&s.push(l);}return await this.enrichSmartArtData(s,t),await this.enrichChartData(s,t),s}async loadPresentationSlideRels(t){let e=await t.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return new Map;let r=t.parser.parse(e).Relationships?.Relationship,o=this.toXmlObjectArray(r),i=new Map;for(let s of o){let a=String(s["@_Id"]||"").trim(),l=String(s["@_Target"]||"").trim();a.length===0||l.length===0||i.set(a,l);}return i}async loadSingleSlide(t,e,n,r){let o=String(e["@_r:id"]||"").trim();if(!o)return;let i=r.get(o);if(!i)return;let s=i.startsWith("/")?i.substring(1):`ppt/${i}`;t.zip.file(s)||(s=`ppt/${i}`);let a=await t.zip.file(s)?.async("string");if(!a)return;let l=t.parser.parse(a);t.compatibilityService.inspectSlideCompatibility(l,s),t.slideMap.set(s,l);let c=String(e["@_id"]||"").trim(),u=c?t.sectionBySlideId.get(c):void 0,d=`${s.replace("slides/","slides/_rels/")}.rels`;await t.loadSlideRelationships(s,d);let p=t.parseSlideClrMapOverride(l);t.setCurrentSlideClrMapOverride(p),await t.setActiveMasterForSlide?.(s);let f;try{let h=t.findLayoutPathForSlide(s);if(h){let j=await t.loadThemeOverride(h);j&&(f=t.applyThemeOverrideState(j));}let m=await t.getLayoutElements(s),g=await t.parseSlide(l,s),x=t.extractMediaTimingMap(l,s);x.size>0&&await t.enrichMediaElementsWithTiming(g,x);let v=[...m,...g],S=t.extractBackgroundColor(l)||await t.getLayoutBackgroundColor(s),w=t.extractBackgroundGradient(l)||await t.getLayoutBackgroundGradient(s),C=await t.extractBackgroundImage(l,s);C||(C=await t.getLayoutBackgroundImage(s));let T=await t.extractSlideNotes(s),E=await t.extractSlideComments(s),M=await t.extractModernSlideComments(s),P=M.length>0?[...E,...M]:E,R=t.isSlideHidden(l,e),k=t.extractBackgroundPattern(l),L=t.extractBackgroundShadeToTitle(l),D=t.extractBackgroundShowAnimation(l),U=t.extractShowMasterShapes(l),N=t.parseSlideTransition(l,s),B=t.parseEditorAnimations(l),O=t.parseNativeAnimations(l),H=l["p:sld"]?.["p:timing"],z=BJ(l),K=await t.parseSlideCustomerData(l,s),ee=t.parseSlideActiveXControls(l);return {id:s,rId:o,slideNumber:n+1,hidden:R,sectionId:u?.sectionId,sectionName:u?.sectionName,elements:v,backgroundColor:S,backgroundGradient:w||void 0,backgroundImage:C,transition:N,animations:B,nativeAnimations:O,rawTiming:H||void 0,notes:T.notes,notesSegments:T.notesSegments,comments:P,rawXml:l,clrMapOverride:p??void 0,backgroundPattern:k,backgroundShadeToTitle:L??void 0,backgroundShowAnimation:D??void 0,showMasterShapes:U??void 0,guides:z.length>0?z:void 0,customerData:K.length>0?K:void 0,activeXControls:ee.length>0?ee:void 0}}finally{f&&f(),t.setCurrentSlideClrMapOverride(null);}}async enrichSmartArtData(t,e){for(let n of t)for(let r of n.elements)if(!(r.type!=="smartArt"||r.smartArtData))try{let o=await e.getSmartArtDataForGraphicFrame(n.id,r.rawXml);o&&(r.smartArtData=o);}catch{}}async enrichChartData(t,e){for(let n of t)for(let r of n.elements)if(!(r.type!=="chart"||r.chartData))try{let o=await e.getChartDataForGraphicFrame(n.id,r.rawXml);o&&(r.chartData=o);}catch{}}toXmlObjectArray(t){return Array.isArray(t)?t.filter(e=>this.isXmlObject(e)):this.isXmlObject(t)?[t]:[]}isXmlObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}},VJ=class{getChildByLocalName(t,e){if(!t)return;let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return n;let r=`:${e}`,o=Object.keys(t).find(s=>s.endsWith(r));if(!o)return;let i=t[o];if(!(!i||typeof i!="object"||Array.isArray(i)))return i}getChildrenArrayByLocalName(t,e){if(!t)return [];let n=t[e];if(n!==void 0)return this.toXmlArray(n);let r=`:${e}`,o=Object.keys(t).find(i=>i.endsWith(r));return o?this.toXmlArray(t[o]):[]}getScalarChildByLocalName(t,e){if(!t)return;let n=t[e];if(typeof n=="string"||typeof n=="number")return String(n);let r=`:${e}`;for(let[o,i]of Object.entries(t))if(!(o!==e&&!o.endsWith(r))&&(typeof i=="string"||typeof i=="number"))return String(i)}toXmlArray(t){return Array.isArray(t)?t.filter(e=>this.isXmlObject(e)):this.isXmlObject(t)?[t]:[]}isXmlObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}};WJ=class{xmlLookupService;editorMetaExtensionUri;editorMetaNamespaceUri;constructor(t){this.xmlLookupService=t.xmlLookupService,this.editorMetaExtensionUri=t.editorMetaExtensionUri,this.editorMetaNamespaceUri=t.editorMetaNamespaceUri;}parseEditorAnimations(t){let e=this.xmlLookupService.getChildByLocalName(t,"sld"),n=this.xmlLookupService.getChildByLocalName(e,"extLst"),o=this.xmlLookupService.getChildrenArrayByLocalName(n,"ext").find(c=>String(c?.["@_uri"]||"").trim()===this.editorMetaExtensionUri);if(!o)return;let i=this.xmlLookupService.getChildByLocalName(o,"editorMeta"),s=this.xmlLookupService.getChildByLocalName(i,"animations"),a=this.xmlLookupService.getChildrenArrayByLocalName(s,"animation");if(a.length===0)return [];let l=[];return a.forEach(c=>{let u=String(c?.["@_elementId"]||"").trim();if(u.length===0)return;let d=Yy(c?.["@_entrance"]),p=Yy(c?.["@_exit"]),f=Yy(c?.["@_emphasis"]),h=Number.parseInt(String(c?.["@_durationMs"]||""),10),m=Number.parseInt(String(c?.["@_delayMs"]||""),10),g=Number.parseInt(String(c?.["@_order"]||""),10),x=Number.parseInt(String(c?.["@_repeatCount"]||""),10),v=XEe(c?.["@_trigger"]),S=jEe(c?.["@_timingCurve"]),w=YEe(c?.["@_repeatMode"]),C=KEe(c?.["@_direction"]),T=qEe(c?.["@_sequence"]),E=ZEe(c?.["@_afterAnimation"]),M=c?.["@_afterAnimationColor"]?String(c["@_afterAnimationColor"]).trim():void 0,P=c?.["@_motionPath"]?String(c["@_motionPath"]).trim():void 0;l.push({elementId:u,entrance:d==="none"?void 0:d,exit:p==="none"?void 0:p,emphasis:f==="none"?void 0:f,durationMs:Number.isFinite(h)&&h>0?h:void 0,delayMs:Number.isFinite(m)&&m>=0?m:void 0,order:Number.isFinite(g)?g:void 0,trigger:v,timingCurve:S,repeatCount:Number.isFinite(x)&&x>0?x:void 0,repeatMode:w,direction:C,sequence:T,afterAnimation:E,afterAnimationColor:M||void 0,motionPath:P||void 0});}),l.sort((c,u)=>(c.order||0)-(u.order||0))}applyEditorAnimations(t,e){let n=e.map(s=>{let a=String(s.elementId||"").trim();if(a.length===0)return null;let l=Yy(s.entrance),c=Yy(s.exit),u=Yy(s.emphasis),d=typeof s.durationMs=="number"&&Number.isFinite(s.durationMs)&&s.durationMs>0?Math.round(s.durationMs):void 0,p=typeof s.delayMs=="number"&&Number.isFinite(s.delayMs)&&s.delayMs>=0?Math.round(s.delayMs):void 0,f=typeof s.order=="number"&&Number.isFinite(s.order)?Math.round(s.order):void 0,h=typeof s.repeatCount=="number"&&Number.isFinite(s.repeatCount)&&s.repeatCount>0?s.repeatCount:void 0;return !l&&!c&&!u&&!s.motionPath?null:{"@_elementId":a,"@_entrance":l&&l!=="none"?l:void 0,"@_exit":c&&c!=="none"?c:void 0,"@_emphasis":u&&u!=="none"?u:void 0,"@_durationMs":d?String(d):void 0,"@_delayMs":p!==void 0?String(Math.max(0,p)):void 0,"@_order":f!==void 0?String(f):void 0,"@_trigger":s.trigger??void 0,"@_timingCurve":s.timingCurve??void 0,"@_repeatCount":h!==void 0?String(h):void 0,"@_repeatMode":s.repeatMode??void 0,"@_direction":s.direction??void 0,"@_sequence":s.sequence??void 0,"@_afterAnimation":s.afterAnimation??void 0,"@_afterAnimationColor":s.afterAnimationColor??void 0,"@_motionPath":s.motionPath??void 0}}).filter(s=>!!s).sort((s,a)=>{let l=Number.parseInt(String(s["@_order"]||"0"),10),c=Number.parseInt(String(a["@_order"]||"0"),10);return l-c}),r=this.xmlLookupService.getChildByLocalName(t,"extLst")||{},i=this.xmlLookupService.getChildrenArrayByLocalName(r,"ext").filter(s=>String(s?.["@_uri"]||"").trim()!==this.editorMetaExtensionUri);if(n.length===0){i.length>0?t["p:extLst"]={"p:ext":i}:delete t["p:extLst"];return}t["@_xmlns:pptx"]=this.editorMetaNamespaceUri,i.push({"@_uri":this.editorMetaExtensionUri,"pptx:editorMeta":{"pptx:animations":{"pptx:animation":n}}}),t["p:extLst"]={"p:ext":i};}};aPe=new Set(["@_id","@_nodeType","@_presetClass","@_presetID","@_presetSubtype","@_dur","@_delay","@_repeatCount","@_autoRev","@_fill","@_accel","@_decel","@_restart","@_grpId","@_afterEffect"]),lPe=["@_evtFilter","@_display","@_masterRel","@_nodePh","@_endSync","@_progress","@_syncBehavior","@_tmFilter"];cPe=new Set(["onBegin","onEnd","begin","end","onClick","onMouseOver","onMouseOut","onNext","onPrev","onStopAudio"]);KJ=class{parseNativeAnimations(t){try{let e=t?.["p:sld"]?.["p:timing"];if(!e||typeof e!="object")return;let n=e["p:tnLst"];if(!n||typeof n!="object")return;let r=[],o=n["p:par"];if(!o||typeof o!="object")return;this.walkTimingTree(o,r,"onClick"),this.parseInteractiveSequences(o,r),this.parseMediaAnimations(e,r);let i=e["p:bldLst"],s=bPe(i);for(let c of s)for(let u of r)u.targetId===c.spid&&(u.groupId=c.grpId);let a=xPe(i);for(let c of a)for(let u of r)u.targetId===c.spid&&(u.smartArtBuild=c.bld);let l=yPe(i);for(let c of l)for(let u of r)u.targetId===c.spid&&(u.graphicBuild=c.bld);return oPe(e,r),r.length>0?r:void 0}catch(e){console.warn("Failed to parse native animations:",e);return}}walkTimingTree(t,e,n){if(!t)return;let r=t["p:cTn"];if(r){let s=String(r["@_nodeType"]||""),a=r["@_presetClass"],l=r["@_presetID"]?Number.parseInt(String(r["@_presetID"]),10):void 0,c=r["@_dur"]?Number.parseInt(String(r["@_dur"]),10):void 0,u=r["@_delay"]?Number.parseInt(String(r["@_delay"]),10):void 0,d=n;s==="afterPrevious"||s==="afterPrev"?d="afterPrevious":s==="withPrevious"||s==="withEffect"?d="withPrevious":s==="clickEffect"?d="onClick":(s==="mouseOver"||s==="onMouseOver"||s==="hoverEffect")&&(d="onHover");let p=r["p:stCondLst"];if(p){let w=zt(p["p:cond"]);for(let C of w){let T=C["@_delay"];T!==void 0&&Number.parseInt(String(T),10)>0&&(d="afterDelay"),C["@_evt"]==="onMouseOver"&&(d="onHover");}}let f=LB(p),h=r["p:endCondLst"],m=LB(h),g=JEe(r),x=h,v=XJ(r);if(a&&v){let w=["entr","exit","emph","path"].includes(a)?a:void 0,C=r["p:childTnLst"],T=QEe(C),E=rPe(r),M=dPe(C),P=mPe(r),R=gPe(C),k=this.extractTextTargetFromCTn(r),L=nPe(C),D=Nq(r),U=Dq(r);e.push({targetId:v,trigger:d,presetClass:w,presetId:l,durationMs:c,delayMs:u,triggerDelayMs:d==="afterDelay"?u:void 0,motionPath:T.motionPath,motionOrigin:T.motionOrigin,motionPathRotateAuto:T.motionPathRotateAuto,motionPathEditMode:T.motionPathEditMode,motionPtsTypes:T.motionPtsTypes,rotationBy:T.rotationBy,rotationFrom:T.rotationFrom,rotationTo:T.rotationTo,scaleByX:T.scaleByX,scaleByY:T.scaleByY,scaleFromX:T.scaleFromX,scaleFromY:T.scaleFromY,scaleToX:T.scaleToX,scaleToY:T.scaleToY,scaleZoomContents:T.scaleZoomContents,keyframes:L??void 0,repeatCount:E.repeatCount,autoReverse:E.autoReverse,soundRId:g.soundRId,stopSound:g.stopSound,startConditions:f??void 0,endConditions:m??void 0,rawEndCondLst:x??void 0,colorAnimation:M??void 0,iterate:P??void 0,commandType:R.commandType,commandString:R.commandString,textTarget:k??void 0,cTnAttributes:D,afterEffect:U});}let S=r["p:childTnLst"];if(S){let w=zt(S["p:par"]),C=zt(S["p:seq"]),T=zt(S["p:excl"]);for(let E of w)this.walkTimingTree(E,e,d);for(let E of C)this.walkTimingTree(E,e,d);for(let E of T){let M=[];this.walkTimingTree(E,M,d);for(let P of M)P.exclusive=true,e.push(P);}}}let o=zt(t["p:par"]),i=zt(t["p:seq"]);for(let s of o)this.walkTimingTree(s,e,n);for(let s of i)this.walkTimingTree(s,e,n);}parseMediaAnimations(t,e){this.collectMediaNodes(t,e);}collectMediaNodes(t,e){if(!t)return;for(let o of ["p:audio","p:video"]){let i=zt(t[o]);for(let s of i){let a=s["p:cMediaNode"];if(!a)continue;let c=a["p:tgtEl"]?.["p:spTgt"],u=c?.["@_spid"]?String(c["@_spid"]):void 0;if(!u)continue;let d=a["p:cTn"],p=d?Nq(d):void 0,f=d?Dq(d):void 0,h=d&&d["@_dur"]!==void 0&&String(d["@_dur"])!=="indefinite"?Number.parseInt(String(d["@_dur"]),10):void 0;e.push({kind:"media",mediaType:o==="p:audio"?"audio":"video",targetId:u,durationMs:h!==void 0&&!Number.isNaN(h)?h:void 0,cTnAttributes:p,afterEffect:f});}}let r=t["p:cTn"]?.["p:childTnLst"];if(r){for(let o of ["p:par","p:seq","p:excl"]){let i=zt(r[o]);for(let s of i)this.collectMediaNodes(s,e);}this.collectMediaNodes(r,e);}for(let o of ["p:par","p:seq","p:excl","p:tnLst"]){let i=zt(t[o]);for(let s of i)this.collectMediaNodes(s,e);}}extractTextTargetFromCTn(t){let e=t["p:childTnLst"];if(!e)return;let n=[...zt(e["p:animEffect"]),...zt(e["p:anim"]),...zt(e["p:set"])];for(let r of n){let s=r["p:cBhvr"]?.["p:tgtEl"]?.["p:spTgt"];if(s){let a=hPe(s);if(a)return a}}}parseInteractiveSequences(t,e){let n=t["p:cTn"];if(!n)return;let r=n["p:childTnLst"];if(!r)return;let o=zt(r["p:seq"]);for(let i of o){let s=i["p:cTn"];if(!s||String(s["@_nodeType"]||"")==="mainSeq")continue;let l=sPe(s);if(!l)continue;let c=[];this.walkTimingTree(i,c,"onShapeClick");for(let u of c)u.triggerShapeId=l,u.trigger="onShapeClick",e.push(u);}}},ZO=new Set(["conveyor","doors","ferris","flash","flythrough","gallery","glitter","honeycomb","pan","prism","reveal","ripple","shred","switch","vortex","warp","wheelReverse","window","cube","flip","rotate","orbit"]);yB="{C7C9D14B-FE2A-4D35-B620-AB07D5B017F4}",wPe=new Set(["fade","push","wipe","split","randomBar","cut","blinds","checker","circle","comb","cover","diamond","dissolve","plus","pull","random","strips","uncover","wedge","wheel","zoom","newsflash"]),qJ=class{xmlLookupService;getXmlLocalName;constructor(t){this.xmlLookupService=t.xmlLookupService,this.getXmlLocalName=t.getXmlLocalName;}parseSlideTransition(t){let e=this.xmlLookupService.getChildByLocalName(t,"sld"),n=this.xmlLookupService.getChildByLocalName(e,"transition");if(!n)return;let r="cut",o,i,s,a,l,c,u;for(let[S,w]of Object.entries(n)){if(S.startsWith("@_"))continue;let C=this.getXmlLocalName(S);if(C==="sndAc"){c=w;continue}if(C==="extLst"){u=w;continue}if(wPe.has(C)&&(r=C),w&&typeof w=="object"&&!Array.isArray(w)){let T=w,E=String(T["@_dir"]||"").trim();E.length>0&&(o=E);let M=String(T["@_orient"]||"").trim();(M==="horz"||M==="vert")&&(i=M);let P=String(T["@_spokes"]||"").trim();if(P.length>0){let L=Number.parseInt(P,10);Number.isFinite(L)&&L>=1&&(s=L);}let R=String(T["@_pattern"]||"").trim();R.length>0&&(a=R);let k=String(T["@_thruBlk"]||"").trim();k.length>0&&(l=!["0","false","off"].includes(k.toLowerCase()));}}if(u&&r==="cut"){let S=vPe(u,this.xmlLookupService,this.getXmlLocalName);S?(r=S.type,S.direction&&(o=S.direction),S.orient&&(i=S.orient),S.pattern&&(a=S.pattern)):this.parseMorphFromExtLst(u)&&(r="morph");}let d=Number.parseInt(String(n["@_dur"]||""),10),p=Number.isFinite(d)&&d>0?d:void 0,f=String(n["@_advClick"]||"").trim(),h=f.length>0?!["0","false","off"].includes(f.toLowerCase()):void 0,m=Number.parseInt(String(n["@_advTm"]||""),10),g=Number.isFinite(m)&&m>=0?m:void 0,x,v;if(c){let S=this.xmlLookupService.getChildByLocalName(c,"stSnd");if(S){let C=this.xmlLookupService.getChildByLocalName(S,"snd");if(C){let T=C["@_r:embed"]??C["@_embed"];T&&(x=String(T));}}let w=false;for(let C of Object.keys(c))if(!C.startsWith("@_")&&this.getXmlLocalName(C)==="endSnd"){w=true;break}w&&(v=true);}return {type:r,direction:o,orient:i,spokes:s,pattern:a,thruBlk:l,durationMs:p,advanceOnClick:h,advanceAfterMs:g,soundRId:x,stopSound:v,rawSoundAction:c,rawExtLst:u}}parseMorphFromExtLst(t){let e=this.xmlLookupService.getChildrenArrayByLocalName(t,"ext");for(let n of e){if(!n)continue;let r=String(n["@_uri"]||"").trim(),o=r.toUpperCase()===yB.toUpperCase();for(let i of Object.keys(n))if(!i.startsWith("@_")&&this.getXmlLocalName(i)==="morph")return o||r.length===0,true}return false}buildSlideTransitionXml(t){if(!t||t.type==="none")return;let e=t.type||"cut",n=ZO.has(e),r=e==="morph",o={};if(n)o["p:extLst"]=SPe(e,t.direction,t.orient,t.pattern,t.rawExtLst,this.xmlLookupService,this.getXmlLocalName);else if(r)o["p:extLst"]=this.buildMorphExtLst(t.rawExtLst);else if(e==="cut"||e==="fade"){let i={};typeof t.thruBlk=="boolean"&&(i["@_thruBlk"]=t.thruBlk?"1":"0"),o[`p:${e}`]=i;}else {let i={},s=String(t.direction||"").trim();s.length>0&&(i["@_dir"]=s),t.orient&&(i["@_orient"]=t.orient),typeof t.spokes=="number"&&t.spokes>=1&&(i["@_spokes"]=String(t.spokes)),t.pattern&&(i["@_pattern"]=t.pattern),typeof t.thruBlk=="boolean"&&(i["@_thruBlk"]=t.thruBlk?"1":"0"),o[`p:${e}`]=i;}return typeof t.durationMs=="number"&&Number.isFinite(t.durationMs)&&t.durationMs>0&&(o["@_dur"]=String(Math.round(t.durationMs))),typeof t.advanceOnClick=="boolean"&&(o["@_advClick"]=t.advanceOnClick?"1":"0"),typeof t.advanceAfterMs=="number"&&Number.isFinite(t.advanceAfterMs)&&t.advanceAfterMs>=0&&(o["@_advTm"]=String(Math.round(t.advanceAfterMs))),t.stopSound?o["p:sndAc"]={"p:endSnd":{}}:t.rawSoundAction&&(o["p:sndAc"]=t.rawSoundAction),t.rawExtLst&&!n&&!r&&(o["p:extLst"]=t.rawExtLst),o}buildMorphExtLst(t){let e={"@_uri":yB,"p159:morph":{"@_xmlns:p159":"http://schemas.microsoft.com/office/powerpoint/2015/09/main"}};if(!t)return {"p:ext":e};let r=this.xmlLookupService.getChildrenArrayByLocalName(t,"ext").filter(i=>{if(!i||String(i["@_uri"]||"").trim().toUpperCase()===yB.toUpperCase())return false;for(let a of Object.keys(i))if(!a.startsWith("@_")&&this.getXmlLocalName(a)==="morph")return false;return true}),o=[e,...r];return {"p:ext":o.length===1?o[0]:o}}},EA={appear:{presetClass:"entr",presetId:1,defaultSubtype:0},fadeIn:{presetClass:"entr",presetId:10,defaultSubtype:0},flyIn:{presetClass:"entr",presetId:2,defaultSubtype:4},zoomIn:{presetClass:"entr",presetId:23,defaultSubtype:0},blindsIn:{presetClass:"entr",presetId:3,defaultSubtype:0},boxIn:{presetClass:"entr",presetId:4,defaultSubtype:0},checkerboardIn:{presetClass:"entr",presetId:5,defaultSubtype:0},expandIn:{presetClass:"entr",presetId:6,defaultSubtype:0},dissolveIn:{presetClass:"entr",presetId:9,defaultSubtype:0},flashIn:{presetClass:"entr",presetId:12,defaultSubtype:0},peekIn:{presetClass:"entr",presetId:16,defaultSubtype:0},randomBarsIn:{presetClass:"entr",presetId:17,defaultSubtype:0},wipeIn:{presetClass:"entr",presetId:22,defaultSubtype:0},riseUp:{presetClass:"entr",presetId:26,defaultSubtype:0},bounceIn:{presetClass:"entr",presetId:37,defaultSubtype:0},floatIn:{presetClass:"entr",presetId:42,defaultSubtype:0},swivel:{presetClass:"entr",presetId:47,defaultSubtype:0},spinnerIn:{presetClass:"entr",presetId:49,defaultSubtype:0},growTurnIn:{presetClass:"entr",presetId:53,defaultSubtype:0},splitIn:{presetClass:"entr",presetId:31,defaultSubtype:0},wheelIn:{presetClass:"entr",presetId:21,defaultSubtype:1},circleIn:{presetClass:"entr",presetId:7,defaultSubtype:0},diamondIn:{presetClass:"entr",presetId:8,defaultSubtype:0},flashBulbIn:{presetClass:"entr",presetId:11,defaultSubtype:0},plusIn:{presetClass:"entr",presetId:13,defaultSubtype:0},spiralIn:{presetClass:"entr",presetId:15,defaultSubtype:0},stretchIn:{presetClass:"entr",presetId:18,defaultSubtype:0},stripsIn:{presetClass:"entr",presetId:19,defaultSubtype:0},wedgeIn:{presetClass:"entr",presetId:20,defaultSubtype:0},randomEffectsIn:{presetClass:"entr",presetId:24,defaultSubtype:0},boomerangIn:{presetClass:"entr",presetId:25,defaultSubtype:0},creditsIn:{presetClass:"entr",presetId:27,defaultSubtype:0},floatUp:{presetClass:"entr",presetId:28,defaultSubtype:0},pinwheelIn:{presetClass:"entr",presetId:29,defaultSubtype:0},spinner2In:{presetClass:"entr",presetId:30,defaultSubtype:0},whipIn:{presetClass:"entr",presetId:32,defaultSubtype:0},arriveIn:{presetClass:"entr",presetId:33,defaultSubtype:0},basicSwivelIn:{presetClass:"entr",presetId:34,defaultSubtype:0},beveledArrivalIn:{presetClass:"entr",presetId:35,defaultSubtype:0},curveUpIn:{presetClass:"entr",presetId:36,defaultSubtype:0},foldIn:{presetClass:"entr",presetId:38,defaultSubtype:0},fadedSwivelIn:{presetClass:"entr",presetId:39,defaultSubtype:0},fadedZoomIn:{presetClass:"entr",presetId:40,defaultSubtype:0},lightSpeedIn:{presetClass:"entr",presetId:41,defaultSubtype:0},flipIn:{presetClass:"entr",presetId:43,defaultSubtype:0},glideIn:{presetClass:"entr",presetId:44,defaultSubtype:0},growRotateIn:{presetClass:"entr",presetId:45,defaultSubtype:0},growWithColorIn:{presetClass:"entr",presetId:46,defaultSubtype:0},magnifyIn:{presetClass:"entr",presetId:48,defaultSubtype:0},slingIn:{presetClass:"entr",presetId:50,defaultSubtype:0},compressIn:{presetClass:"entr",presetId:51,defaultSubtype:0},unfoldIn:{presetClass:"entr",presetId:52,defaultSubtype:0},zoomRotateIn:{presetClass:"entr",presetId:54,defaultSubtype:0},curvyStarIn:{presetClass:"entr",presetId:55,defaultSubtype:0},rotateIn:{presetClass:"entr",presetId:56,defaultSubtype:0},centerRevolveIn:{presetClass:"entr",presetId:57,defaultSubtype:0},threadIn:{presetClass:"entr",presetId:58,defaultSubtype:0},dropIn:{presetClass:"entr",presetId:59,defaultSubtype:0},ascendIn:{presetClass:"entr",presetId:60,defaultSubtype:0},descendIn:{presetClass:"entr",presetId:61,defaultSubtype:0},centerStageIn:{presetClass:"entr",presetId:62,defaultSubtype:0},easeIn:{presetClass:"entr",presetId:63,defaultSubtype:0},stretchyIn:{presetClass:"entr",presetId:64,defaultSubtype:0},zipIn:{presetClass:"entr",presetId:65,defaultSubtype:0},barsIn:{presetClass:"entr",presetId:66,defaultSubtype:0},coverIn:{presetClass:"entr",presetId:67,defaultSubtype:0},revealIn:{presetClass:"entr",presetId:68,defaultSubtype:0},crawlIn:{presetClass:"entr",presetId:7,defaultSubtype:4},disappear:{presetClass:"exit",presetId:1,defaultSubtype:0},flyOut:{presetClass:"exit",presetId:2,defaultSubtype:4},shrinkOut:{presetClass:"exit",presetId:6,defaultSubtype:0},dissolveOut:{presetClass:"exit",presetId:9,defaultSubtype:0},fadeOut:{presetClass:"exit",presetId:10,defaultSubtype:0},wipeOut:{presetClass:"exit",presetId:22,defaultSubtype:0},zoomOut:{presetClass:"exit",presetId:23,defaultSubtype:0},bounceOut:{presetClass:"exit",presetId:37,defaultSubtype:0},blindsOut:{presetClass:"exit",presetId:3,defaultSubtype:0},boxOut:{presetClass:"exit",presetId:4,defaultSubtype:0},checkerboardOut:{presetClass:"exit",presetId:5,defaultSubtype:0},circleOut:{presetClass:"exit",presetId:6,defaultSubtype:1},crawlOut:{presetClass:"exit",presetId:7,defaultSubtype:4},diamondOut:{presetClass:"exit",presetId:8,defaultSubtype:0},flashBulbOut:{presetClass:"exit",presetId:11,defaultSubtype:0},flashOnceOut:{presetClass:"exit",presetId:12,defaultSubtype:0},plusOut:{presetClass:"exit",presetId:13,defaultSubtype:0},randomBarsOut:{presetClass:"exit",presetId:14,defaultSubtype:0},spiralOut:{presetClass:"exit",presetId:15,defaultSubtype:0},peekOut:{presetClass:"exit",presetId:16,defaultSubtype:0},splitOut:{presetClass:"exit",presetId:17,defaultSubtype:0},collapseOut:{presetClass:"exit",presetId:18,defaultSubtype:0},stripsOut:{presetClass:"exit",presetId:19,defaultSubtype:0},wedgeOut:{presetClass:"exit",presetId:20,defaultSubtype:0},wheelOut:{presetClass:"exit",presetId:21,defaultSubtype:1},randomEffectsOut:{presetClass:"exit",presetId:24,defaultSubtype:0},boomerangOut:{presetClass:"exit",presetId:25,defaultSubtype:0},sinkDown:{presetClass:"exit",presetId:26,defaultSubtype:0},creditsOut:{presetClass:"exit",presetId:27,defaultSubtype:0},floatDown:{presetClass:"exit",presetId:28,defaultSubtype:0},pinwheelOut:{presetClass:"exit",presetId:29,defaultSubtype:0},spinner2Out:{presetClass:"exit",presetId:30,defaultSubtype:0},contractOut:{presetClass:"exit",presetId:31,defaultSubtype:0},whipOut:{presetClass:"exit",presetId:32,defaultSubtype:0},leaveOut:{presetClass:"exit",presetId:33,defaultSubtype:0},basicSwivelOut:{presetClass:"exit",presetId:34,defaultSubtype:0},beveledDeparture:{presetClass:"exit",presetId:35,defaultSubtype:0},curveDownOut:{presetClass:"exit",presetId:36,defaultSubtype:0},unfoldOut:{presetClass:"exit",presetId:38,defaultSubtype:0},fadedSwivelOut:{presetClass:"exit",presetId:39,defaultSubtype:0},fadedZoomOut:{presetClass:"exit",presetId:40,defaultSubtype:0},lightSpeedOut:{presetClass:"exit",presetId:41,defaultSubtype:0},floatOut:{presetClass:"exit",presetId:42,defaultSubtype:0},flipOut:{presetClass:"exit",presetId:43,defaultSubtype:0},glideOut:{presetClass:"exit",presetId:44,defaultSubtype:0},shrinkRotate:{presetClass:"exit",presetId:45,defaultSubtype:0},shrinkWithColor:{presetClass:"exit",presetId:46,defaultSubtype:0},swivelOut:{presetClass:"exit",presetId:47,defaultSubtype:0},shrinkTurn:{presetClass:"exit",presetId:48,defaultSubtype:0},pinwheel4Out:{presetClass:"exit",presetId:49,defaultSubtype:0},slingOut:{presetClass:"exit",presetId:50,defaultSubtype:0},stretchOut:{presetClass:"exit",presetId:51,defaultSubtype:0},foldOut:{presetClass:"exit",presetId:52,defaultSubtype:0},shrinkSpin:{presetClass:"exit",presetId:53,defaultSubtype:0},zoomRotateOut:{presetClass:"exit",presetId:54,defaultSubtype:0},curvyStarOut:{presetClass:"exit",presetId:55,defaultSubtype:0},rotateOut:{presetClass:"exit",presetId:56,defaultSubtype:0},centerRevolveOut:{presetClass:"exit",presetId:57,defaultSubtype:0},threadOut:{presetClass:"exit",presetId:58,defaultSubtype:0},dropOut:{presetClass:"exit",presetId:59,defaultSubtype:0},ascendOut:{presetClass:"exit",presetId:60,defaultSubtype:0},descendOut:{presetClass:"exit",presetId:61,defaultSubtype:0},exitStage:{presetClass:"exit",presetId:62,defaultSubtype:0},easeOut:{presetClass:"exit",presetId:63,defaultSubtype:0},stretchyOut:{presetClass:"exit",presetId:64,defaultSubtype:0},zipOut:{presetClass:"exit",presetId:65,defaultSubtype:0},barsOut:{presetClass:"exit",presetId:66,defaultSubtype:0},uncoverOut:{presetClass:"exit",presetId:67,defaultSubtype:0},concealOut:{presetClass:"exit",presetId:68,defaultSubtype:0},boldFlash:{presetClass:"emph",presetId:1,defaultSubtype:0},wave:{presetClass:"emph",presetId:2,defaultSubtype:0},colorWave:{presetClass:"emph",presetId:2,defaultSubtype:0},growShrink:{presetClass:"emph",presetId:6,defaultSubtype:0},spin:{presetClass:"emph",presetId:8,defaultSubtype:0},transparency:{presetClass:"emph",presetId:9,defaultSubtype:0},teeter:{presetClass:"emph",presetId:14,defaultSubtype:0},pulse:{presetClass:"emph",presetId:26,defaultSubtype:0},bounce:{presetClass:"emph",presetId:26,defaultSubtype:0},flash:{presetClass:"emph",presetId:1,defaultSubtype:0},brushOnColor:{presetClass:"emph",presetId:3,defaultSubtype:0},brushOnUnderline:{presetClass:"emph",presetId:4,defaultSubtype:0},changeFont:{presetClass:"emph",presetId:5,defaultSubtype:0},changeFontColor:{presetClass:"emph",presetId:7,defaultSubtype:0},changeFontSize:{presetClass:"emph",presetId:10,defaultSubtype:0},changeFontStyle:{presetClass:"emph",presetId:11,defaultSubtype:0},growWithColor:{presetClass:"emph",presetId:12,defaultSubtype:0},desaturate:{presetClass:"emph",presetId:13,defaultSubtype:0},verticalHighlight:{presetClass:"emph",presetId:15,defaultSubtype:0},wave2:{presetClass:"emph",presetId:16,defaultSubtype:0},blast:{presetClass:"emph",presetId:17,defaultSubtype:0},boldReveal:{presetClass:"emph",presetId:18,defaultSubtype:0},washOut:{presetClass:"emph",presetId:19,defaultSubtype:0},shimmer:{presetClass:"emph",presetId:20,defaultSubtype:0},flicker:{presetClass:"emph",presetId:21,defaultSubtype:0},growWithColorSustain:{presetClass:"emph",presetId:22,defaultSubtype:0},lighten:{presetClass:"emph",presetId:23,defaultSubtype:0},darken:{presetClass:"emph",presetId:24,defaultSubtype:0},styleEmphasis:{presetClass:"emph",presetId:25,defaultSubtype:0},colorPulse:{presetClass:"emph",presetId:27,defaultSubtype:0},colorBlend:{presetClass:"emph",presetId:28,defaultSubtype:0},complementaryColor:{presetClass:"emph",presetId:29,defaultSubtype:0},complementaryColor2:{presetClass:"emph",presetId:30,defaultSubtype:0},contrastingColor:{presetClass:"emph",presetId:31,defaultSubtype:0},pulseOnce:{presetClass:"emph",presetId:32,defaultSubtype:0},underlineEmph:{presetClass:"emph",presetId:33,defaultSubtype:0},boldFlashVariant:{presetClass:"emph",presetId:34,defaultSubtype:0},teeterVariant:{presetClass:"emph",presetId:35,defaultSubtype:0},waveVariant:{presetClass:"emph",presetId:36,defaultSubtype:0},objectColor:{presetClass:"emph",presetId:37,defaultSubtype:0},fillColor:{presetClass:"emph",presetId:38,defaultSubtype:0},lineColor:{presetClass:"emph",presetId:39,defaultSubtype:0},brushOnColorSustain:{presetClass:"emph",presetId:40,defaultSubtype:0},colorWaveSustain:{presetClass:"emph",presetId:41,defaultSubtype:0},flashEmph:{presetClass:"emph",presetId:42,defaultSubtype:0},flickerSlow:{presetClass:"emph",presetId:43,defaultSubtype:0},growBig:{presetClass:"emph",presetId:44,defaultSubtype:0},shrinkSmall:{presetClass:"emph",presetId:45,defaultSubtype:0},colorLighten:{presetClass:"emph",presetId:46,defaultSubtype:0},colorDarken:{presetClass:"emph",presetId:47,defaultSubtype:0},boldItalics:{presetClass:"emph",presetId:48,defaultSubtype:0},spinSlow:{presetClass:"emph",presetId:49,defaultSubtype:0},spinFast:{presetClass:"emph",presetId:50,defaultSubtype:0},wobble:{presetClass:"emph",presetId:51,defaultSubtype:0},jiggle:{presetClass:"emph",presetId:52,defaultSubtype:0},bounceInPlace:{presetClass:"emph",presetId:53,defaultSubtype:0},heartbeat:{presetClass:"emph",presetId:54,defaultSubtype:0},glow:{presetClass:"emph",presetId:55,defaultSubtype:0},brighten:{presetClass:"emph",presetId:56,defaultSubtype:0},dim:{presetClass:"emph",presetId:57,defaultSubtype:0},saturate:{presetClass:"emph",presetId:58,defaultSubtype:0},colorCycle:{presetClass:"emph",presetId:59,defaultSubtype:0},rainbow:{presetClass:"emph",presetId:60,defaultSubtype:0},shake:{presetClass:"emph",presetId:61,defaultSubtype:0},vibrate:{presetClass:"emph",presetId:62,defaultSubtype:0},sway:{presetClass:"emph",presetId:63,defaultSubtype:0},bob:{presetClass:"emph",presetId:64,defaultSubtype:0}};CPe=[[1,"appear"],[2,"flyIn"],[3,"blindsIn"],[4,"boxIn"],[5,"checkerboardIn"],[6,"expandIn"],[7,"crawlIn"],[8,"diamondIn"],[9,"dissolveIn"],[10,"fadeIn"],[11,"flashBulbIn"],[12,"flashIn"],[13,"plusIn"],[15,"spiralIn"],[16,"peekIn"],[17,"randomBarsIn"],[18,"stretchIn"],[19,"stripsIn"],[20,"wedgeIn"],[21,"wheelIn"],[22,"wipeIn"],[23,"zoomIn"],[26,"riseUp"],[37,"bounceIn"],[42,"floatIn"],[47,"swivel"],[49,"spinnerIn"],[53,"growTurnIn"]],TPe=[[1,"disappear"],[2,"flyOut"],[6,"shrinkOut"],[9,"dissolveOut"],[10,"fadeOut"],[22,"wipeOut"],[23,"zoomOut"],[37,"bounceOut"]],_Pe=[[1,"boldFlash"],[2,"colorWave"],[6,"growShrink"],[8,"spin"],[9,"transparency"],[14,"teeter"],[26,"pulse"]],ZJ=JO("entr",CPe),JJ=JO("exit",TPe),QJ=JO("emph",_Pe);eQ={fromBottom:4,fromLeft:8,fromRight:2,fromTop:1,fromTopLeft:9,fromTopRight:3,fromBottomLeft:12,fromBottomRight:6};kPe=new Set(["spin","teeter"]),IPe=new Set(["growShrink"]),NPe=new Set(["transparency","flash","boldFlash"]);BPe=[{tm:0,value:"1",valueType:"str"},{tm:5e4,value:"0.4",valueType:"str"},{tm:1e5,value:"1",valueType:"str"}];iQ=class{nextId=1;buildTimingXml(t,e){let n=t.filter(h=>h.entrance||h.exit||h.emphasis||h.motionPath).sort((h,m)=>(h.order??0)-(m.order??0));if(n.length===0)return e;if(e){let h=typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));return EPe(h,n)}this.nextId=1;let r=n.filter(h=>h.trigger!=="onShapeClick"),o=n.filter(h=>h.trigger==="onShapeClick"&&h.triggerShapeId),i=this.buildAnimationSequence(r);if(i.length===0&&o.length===0)return e;let s=this.allocateId(),a=this.allocateId(),l=[];for(let h of i)l.push(h);let c={"p:cTn":{"@_id":String(a),"@_dur":"indefinite","@_nodeType":"mainSeq","p:childTnLst":{"p:par":l.length===1?l[0]:l}},"p:prevCondLst":{"p:cond":{"@_evt":"onPrev","@_delay":"0","p:tgtEl":{"p:sldTgt":{}}}},"p:nextCondLst":{"p:cond":{"@_evt":"onNext","@_delay":"0","p:tgtEl":{"p:sldTgt":{}}}}},u=zPe(o,this.allocateId.bind(this)),d=u.length===0?c:[c,...u],p={"p:tnLst":{"p:par":{"p:cTn":{"@_id":String(s),"@_dur":"indefinite","@_restart":"never","@_nodeType":"tmRoot","p:childTnLst":{"p:seq":d}}}}},f=HPe(n);return f&&(p["p:bldLst"]=f),p}buildAnimationSequence(t){let e=[],n=[];for(let r of t){let o=this.buildEffectNodesForAnimation(r);if(o.length===0)continue;((r.trigger??"onClick")==="onClick"||n.length===0)&&(n.length>0&&e.push(n),n=[]);for(let s of o)n.push(s);}return n.length>0&&e.push(n),e.map(r=>{let o=this.allocateId();return {"p:cTn":{"@_id":String(o),"@_fill":"hold","p:stCondLst":{"p:cond":{"@_delay":"indefinite"}},"p:childTnLst":{"p:par":r.length===1?r[0]:r}}}})}buildEffectNodesForAnimation(t){return oQ(t,this.allocateId.bind(this))}allocateId(){return this.nextId++}},sQ=class{createParser(){return new XMLParser({ignoreAttributes:false,attributeNamePrefix:"@_",parseAttributeValue:false,parseTagValue:false,processEntities:false})}createBuilder(){return new XMLBuilder({ignoreAttributes:false,attributeNamePrefix:"@_",format:false})}createDocumentPropertiesUpdater(t,e,n){return new NJ({zip:t,parser:e,builder:n})}createDependencies(t){let e=new VJ,n=new IJ;return {xmlLookupService:e,compatibilityService:n,slideLoaderService:new GJ,templateBackgroundService:new DJ,slideTransitionService:new qJ({xmlLookupService:e,getXmlLocalName:t.getXmlLocalName}),editorAnimationService:new WJ({xmlLookupService:e,editorMetaExtensionUri:t.editorMetaExtensionUri,editorMetaNamespaceUri:t.editorMetaNamespaceUri}),nativeAnimationService:new KJ,animationWriteService:new iQ,documentPropertiesUpdater:this.createDocumentPropertiesUpdater(t.zip,t.parser,t.builder)}}},aQ=class{create(t="transitional"){return t==="strict"?{slideRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/slide",slideLayoutRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/slideLayout",slideImageRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/image",slideMediaRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/media",slideVideoRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/video",slideAudioRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/audio",slideCommentRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/comments",slideNotesRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/notesSlide",relationshipsNamespace:"http://purl.oclc.org/ooxml/package/relationships",slideContentType:"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",commentContentType:"application/vnd.openxmlformats-officedocument.presentationml.comments+xml",commentAuthorContentType:"application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml",commentAuthorsPartName:"/ppt/commentAuthors.xml",conformance:"strict"}:{slideRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",slideLayoutRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout",slideImageRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",slideMediaRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/media",slideVideoRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",slideAudioRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio",slideCommentRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",slideNotesRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide",relationshipsNamespace:"http://schemas.openxmlformats.org/package/2006/relationships",slideContentType:"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",commentContentType:"application/vnd.openxmlformats-officedocument.presentationml.comments+xml",commentAuthorContentType:"application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml",commentAuthorsPartName:"/ppt/commentAuthors.xml",conformance:"transitional"}}},GPe=new aQ,lQ=(t="transitional")=>GPe.create(t),QO=class cQ{data;constructor(e){this.data=e;}static from(e){return new cQ(e)}Slides(e){return this.slide(e)}slide(e){if(!Number.isInteger(e))throw new Error(`Slide index must be an integer. Received: ${e}`);if(e<0||e>=this.data.slides.length)throw new Error(`Slide index ${e} is out of range (0-${Math.max(this.data.slides.length-1,0)}).`);return new uQ(this.data.slides[e],this)}slides(e){return this.slide(e)}project(){return this.data}Project(){return this.project()}},uQ=class{slideValue;rootBuilder;constructor(t,e){this.slideValue=t,this.rootBuilder=e;}get Notes(){return new BB(this.slideValue,this)}notes(){return new BB(this.slideValue,this)}elements(){return new dQ(this.slideValue,this)}project(){return this.slideValue}Project(){return this.project()}done(){return this.rootBuilder}Done(){return this.done()}},dQ=class{slideValue;slideBuilder;constructor(t,e){this.slideValue=t,this.slideBuilder=e;}add(t){return this.slideValue.elements=[...this.slideValue.elements,t],this}removeById(t){let e=String(t).trim();return e.length===0?this:(this.slideValue.elements=this.slideValue.elements.filter(n=>String(n.id).trim()!==e),this)}updateById(t,e){let n=String(t).trim();return n.length===0?this:(this.slideValue.elements=this.slideValue.elements.map(r=>String(r.id).trim()!==n?r:e(r)),this)}project(){return this.slideValue.elements}done(){return this.slideBuilder}},BB=class{slideValue;slideBuilder;constructor(t,e){this.slideValue=t,this.slideBuilder=e;}add(t){let e=String(t);if(e.length===0)return this;let n=this.slideValue.notes||"";return this.slideValue.notes=n.length>0?`${n}
261
+ `)}extractTableCellStyleFromXml(t){try{let e=t?.["a:tcPr"],n={},r=!1;return r=REe(e,n,this.context)||r,r=kEe(e,n,this.context)||r,r=IEe(e,n,this.context)||r,r=NEe(e,n)||r,r=DEe(t,n,this.context)||r,r?n:void 0}catch{return}}},bJ=class{context;constructor(t){this.context=t;}parseMediaData(t,e){let n={};try{let r=t["a:videoFile"],o=t["a:audioFile"];if(r){n.mediaType="video";let i=r["@_r:link"],s=r["@_r:embed"],a=i??s;n.isLinked=typeof i=="string"&&i.length>0,typeof a=="string"&&a.length>0&&(n.mediaPath=this.resolveRelationshipTarget(e,a),n.mediaMimeType=this.getMediaMimeType(n.mediaPath));}else if(o){n.mediaType="audio";let i=o["@_r:link"],s=o["@_r:embed"],a=i??s;n.isLinked=typeof i=="string"&&i.length>0,typeof a=="string"&&a.length>0&&(n.mediaPath=this.resolveRelationshipTarget(e,a),n.mediaMimeType=this.getMediaMimeType(n.mediaPath));}else n.mediaType="unknown";}catch{n.mediaType="unknown";}return n}resolveRelationshipTarget(t,e){let r=this.context.slideRelsMap.get(t)?.get(e);if(r)return this.context.resolvePath(t,r)}getMediaMimeType(t){if(!t)return;let e=(this.context.getPathExtension(t)??"").toLowerCase();return {mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mov:"video/quicktime",mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",wma:"audio/x-ms-wma",oga:"audio/ogg"}[e]}},BEe=[{pattern:/^Excel\./i,type:"excel",extension:"xlsx"},{pattern:/^Word\./i,type:"word",extension:"docx"},{pattern:/^PowerPoint\./i,type:"excel",extension:"pptx"},{pattern:/^Visio\./i,type:"visio",extension:"vsdx"},{pattern:/^Equation\./i,type:"mathtype",extension:"wmf"},{pattern:/^MathType/i,type:"mathtype",extension:"wmf"},{pattern:/^AcroExch\./i,type:"pdf",extension:"pdf"},{pattern:/^Acrobat\./i,type:"pdf",extension:"pdf"},{pattern:/^Package$/i,type:"package",extension:"bin"}],OEe=new Map([["00020820-0000-0000-C000-000000000046",{type:"excel",extension:"xls"}],["00020830-0000-0000-C000-000000000046",{type:"excel",extension:"xlsx"}],["00020906-0000-0000-C000-000000000046",{type:"word",extension:"doc"}],["F4754C9B-64F5-4B40-8AF4-679732AC0607",{type:"word",extension:"docx"}],["0003000C-0000-0000-C000-000000000046",{type:"package",extension:"bin"}],["B801CA65-A1FC-11D0-85AD-444553540000",{type:"pdf",extension:"pdf"}],["00021A20-0000-0000-C000-000000000046",{type:"visio",extension:"vsd"}],["0002CE02-0000-0000-C000-000000000046",{type:"mathtype",extension:"wmf"}]]);UEe=new Set(["{D42C27E5-1956-4C4D-AC15-FE9D03D7D63E}"]);wJ=class{context;constructor(t){this.context=t;}parseGraphicFrame(t,e,n){try{let r=t["p:xfrm"],o=r?.["a:off"]||{},i=r?.["a:ext"]||{},s=t["a:graphic"]?.["a:graphicData"],{flipHorizontal:a,flipVertical:l}=this.context.readFlipState(r),c=this.parseGraphicFrameType(s);n&&this.context.inspectGraphicFrameCompatibility(c,n,e);let u={id:e,type:c,x:Math.round(parseInt(String(o["@_x"]||"0"),10)/this.context.emuPerPx),y:Math.round(parseInt(String(o["@_y"]||"0"),10)/this.context.emuPerPx),width:Math.round(parseInt(String(i["@_cx"]||"0"),10)/this.context.emuPerPx),height:Math.round(parseInt(String(i["@_cy"]||"0"),10)/this.context.emuPerPx),rotation:r?.["@_rot"]?parseInt(String(r["@_rot"]),10)/6e4:void 0,skewX:r?.["@_skewX"]?parseInt(String(r["@_skewX"]),10)/6e4:void 0,skewY:r?.["@_skewY"]?parseInt(String(r["@_skewY"]),10)/6e4:void 0,flipHorizontal:a,flipVertical:l,rawXml:t},d=$Ee(s);if(c==="table"&&s){let p=this.context.parseTableData(s);return {...u,tableData:p,...d.length>0?{extensionXml:d}:{}}}if(c==="ink"&&s){let p=zEe(s),f=p?GEe(p):{inkPaths:[],inkColors:[],inkWidths:[]};return {...u,inkPaths:f.inkPaths,...f.inkColors.length>0?{inkColors:f.inkColors}:{},...f.inkWidths.length>0?{inkWidths:f.inkWidths}:{},...d.length>0?{extensionXml:d}:{}}}if(c==="media"&&s&&n){let p=this.context.parseMediaData(s,n);return {...u,...p,...d.length>0?{extensionXml:d}:{}}}if(c==="ole"&&s){let p=s["p:oleObj"],f=String(p?.["@_progId"]||"").trim()||void 0,h=String(p?.["@_name"]||"").trim()||void 0,m=String(p?.["@_classid"]||"").trim()||void 0,g=p?.["p:embed"],x=p?.["p:link"],v=p?.["@_showAsIcon"],S=v===void 0?void 0:String(v)==="1"||String(v).toLowerCase()==="true",w=p?.["@_imgW"],C=p?.["@_imgH"],T=w!==void 0&&String(w).length>0?parseInt(String(w),10):void 0,E=C!==void 0&&String(C).length>0?parseInt(String(C),10):void 0,M,P,R=String(x?.["@_r:id"]||g?.["@_r:id"]||p?.["@_r:id"]||p?.["@_id"]||"").trim(),k,L=!!x&&!g;R&&n&&(M=this.context.slideRelsMap.get(n)?.get(R),this.context.externalRelsMap.get(n)?.has(R)&&(L=!0,k=M));let N=p?.["p:pic"]?.["p:blipFill"]?.["a:blip"],B=String(N?.["@_r:embed"]||"").trim();B&&n&&(P=this.context.slideRelsMap.get(n)?.get(B));let{oleObjectType:O,oleFileExtension:H}=vJ(f,m),K=SJ(M)??H,ee=t?.["p:nvGraphicFramePr"]?.["p:cNvPr"],j=n?this.context.slideRelsMap.get(n):void 0,{actionClick:re,actionHover:ne}=this.context.parseElementActions(ee,j,this.context.getOrderedSlidePaths());return {...u,oleProgId:f,oleName:h,oleClsId:m,oleObjectType:O,oleFileExtension:K,isLinked:L,externalPath:k,oleTarget:M,previewImage:P,oleShowAsIcon:S,oleImgW:T,oleImgH:E,actionClick:re,actionHover:ne,...d.length>0?{extensionXml:d}:{}}}return {...u,...d.length>0?{extensionXml:d}:{}}}catch{return null}}parseGraphicFrameType(t){if(!t)return "unknown";let e=String(t["@_uri"]||"").toLowerCase();if(t["a:tbl"]||e.includes("/drawingml/2006/table"))return "table";if(t["c:chart"]||e.includes("/drawingml/2006/chart"))return "chart";if(t["dgm:relIds"]||e.includes("/drawingml/2006/diagram"))return "smartArt";if(t["p:oleObj"]||e.includes("/drawingml/2006/ole"))return "ole";if(t["a:videoFile"]||t["a:audioFile"]||e.includes("/drawingml/2006/media"))return "media";if(t["aink:ink"]||e.includes("/2010/ink")||e.includes("drawing/2010/ink"))return "ink";let n=t["mc:AlternateContent"];if(n){let r=Array.isArray(n["mc:Choice"])?n["mc:Choice"]:n["mc:Choice"]?[n["mc:Choice"]]:[];for(let o of r)if(String(o?.["@_Requires"]||"").toLowerCase().includes("aink")||o?.["aink:ink"])return "ink"}return "unknown"}},CJ=class{context;constructor(t){this.context=t;}parseConnector(t,e,n){try{let r=t["p:spPr"],o=r?.["a:xfrm"];if(!o)return null;let i=o["a:off"],s=o["a:ext"];if(!i||!s)return null;let a=String(r?.["a:prstGeom"]?.["@_prst"]||"straightConnector1"),l=this.context.parseGeometryAdjustments(r?.["a:prstGeom"]),c=o["@_rot"]?parseInt(String(o["@_rot"]),10)/6e4:void 0,u=o["@_skewX"]?parseInt(String(o["@_skewX"]),10)/6e4:void 0,d=o["@_skewY"]?parseInt(String(o["@_skewY"]),10)/6e4:void 0,{flipHorizontal:p,flipVertical:f}=this.context.readFlipState(o),h=t?.["p:nvCxnSpPr"]?.["p:cNvCxnSpPr"],m=this.context.extractShapeStyle(r),g=h?.["a:stCxn"];if(g){let R={};g["@_id"]&&(R.shapeId=String(g["@_id"])),g["@_idx"]!==void 0&&(R.connectionSiteIndex=parseInt(String(g["@_idx"]),10)),m&&(m.connectorStartConnection=R);}let x=h?.["a:endCxn"];if(x){let R={};x["@_id"]&&(R.shapeId=String(x["@_id"])),x["@_idx"]!==void 0&&(R.connectionSiteIndex=parseInt(String(x["@_idx"]),10)),m&&(m.connectorEndConnection=R);}let v=t?.["p:nvCxnSpPr"]?.["p:cNvPr"],S=n?this.context.slideRelsMap.get(n):void 0,{actionClick:w,actionHover:C}=this.context.parseElementActions(v,S,this.context.getOrderedSlidePaths()),T=v?.["@_name"]?String(v["@_name"]).trim():void 0,E=this.context.parseShapeLocks(h?.["a:cxnSpLocks"]??h?.["a:spLocks"]),M=t["p:txBody"],P=this.context.parseConnectorTextBody?.(M,n);return {id:e,name:T||void 0,type:"connector",x:Math.round(parseInt(String(i["@_x"]||"0"),10)/this.context.emuPerPx),y:Math.round(parseInt(String(i["@_y"]||"0"),10)/this.context.emuPerPx),width:Math.round(parseInt(String(s["@_cx"]||"0"),10)/this.context.emuPerPx),height:Math.round(parseInt(String(s["@_cy"]||"0"),10)/this.context.emuPerPx),shapeType:a,shapeAdjustments:l,rotation:c,skewX:u,skewY:d,flipHorizontal:p,flipVertical:f,shapeStyle:m,rawXml:t,actionClick:w,actionHover:C,locks:E,...P?{text:P.text,textStyle:P.textStyle,textSegments:P.textSegments}:{}}}catch{return null}}},TJ=class{width=0;height=0;widthEmu=0;heightEmu=0;notesWidthEmu=0;notesHeightEmu=0;slides=[];layoutOptions=[];headerFooter;presentationProperties;customShows;sections;warnings=[];themeColorMap={};theme;tableStyleMap;embeddedFonts;mruColors;notesMaster;handoutMaster;slideMasters;tags;customProperties;coreProperties;appProperties;themeOptions;hasMacros;hasDigitalSignatures;digitalSignatureCount;presentationGuides;customXmlParts;photoAlbum;kinsoku;modifyVerifier;customerData;slideSizeType;thumbnailData;commentAuthors;conformance;withDimensions(t,e,n,r){return this.width=t,this.height=e,this.widthEmu=n,this.heightEmu=r,this}withNotesDimensions(t,e){return this.notesWidthEmu=t,this.notesHeightEmu=e,this}withSlides(t){return this.slides=t,this}withLayoutOptions(t){return this.layoutOptions=t,this}withHeaderFooter(t){return this.headerFooter=t,this}withPresentationProperties(t){return this.presentationProperties=t,this}withCustomShows(t){return this.customShows=t,this}withSections(t){return this.sections=t,this}withWarnings(t){return this.warnings=t,this}withThemeColorMap(t){return this.themeColorMap=t,this}withTheme(t){return this.theme=t,this}withTableStyleMap(t){return this.tableStyleMap=t,this}withEmbeddedFonts(t){return this.embeddedFonts=t,this}withMruColors(t){return this.mruColors=t,this}withNotesMaster(t){return this.notesMaster=t,this}withHandoutMaster(t){return this.handoutMaster=t,this}withSlideMasters(t){return this.slideMasters=t,this}withTags(t){return this.tags=t,this}withCustomProperties(t){return this.customProperties=t,this}withCoreProperties(t){return this.coreProperties=t,this}withAppProperties(t){return this.appProperties=t,this}withThemeOptions(t){return this.themeOptions=t,this}withHasMacros(t){return this.hasMacros=t,this}withHasDigitalSignatures(t){return this.hasDigitalSignatures=t,this}withDigitalSignatureCount(t){return this.digitalSignatureCount=t,this}withPresentationGuides(t){return this.presentationGuides=t,this}withCustomXmlParts(t){return this.customXmlParts=t,this}withPhotoAlbum(t){return this.photoAlbum=t,this}withKinsoku(t){return this.kinsoku=t,this}withModifyVerifier(t){return this.modifyVerifier=t,this}withCustomerData(t){return this.customerData=t,this}withSlideSizeType(t){return this.slideSizeType=t,this}withThumbnailData(t){return this.thumbnailData=t,this}withCommentAuthors(t){return this.commentAuthors=t,this}withConformance(t){return this.conformance=t,this}build(){return {width:this.width,height:this.height,widthEmu:this.widthEmu,heightEmu:this.heightEmu,slideSizeType:this.slideSizeType,notesWidthEmu:this.notesWidthEmu>0?this.notesWidthEmu:void 0,notesHeightEmu:this.notesHeightEmu>0?this.notesHeightEmu:void 0,slides:this.slides,layoutOptions:this.layoutOptions,headerFooter:this.headerFooter,presentationProperties:this.presentationProperties,customShows:this.customShows,sections:this.sections,warnings:this.warnings,themeColorMap:this.themeColorMap,theme:this.theme,tableStyleMap:this.tableStyleMap,embeddedFonts:this.embeddedFonts,mruColors:this.mruColors,notesMaster:this.notesMaster,handoutMaster:this.handoutMaster,slideMasters:this.slideMasters,tags:this.tags,customProperties:this.customProperties,coreProperties:this.coreProperties,appProperties:this.appProperties,themeOptions:this.themeOptions,hasMacros:this.hasMacros,hasDigitalSignatures:this.hasDigitalSignatures,digitalSignatureCount:this.digitalSignatureCount,presentationGuides:this.presentationGuides,photoAlbum:this.photoAlbum,kinsoku:this.kinsoku,modifyVerifier:this.modifyVerifier,customXmlParts:this.customXmlParts,customerData:this.customerData,thumbnailData:this.thumbnailData,commentAuthors:this.commentAuthors,conformance:this.conformance}}},_J=class{commentAuthorMap;commentAuthorDetails;emuPerPx;usedSlideNumbers=new Set;usedMediaPaths=new Set;existingCommentPaths=new Set;activeCommentPaths=new Set;existingAuthorIdByName=new Map;usedAuthorIdByName=new Map;commentLastIdxByAuthorId=new Map;maxCommentPartIndex=0;maxAuthorId=-1;constructor(t){this.commentAuthorMap=t.commentAuthorMap,this.commentAuthorDetails=t.commentAuthorDetails??new Map,this.emuPerPx=t.emuPerPx,this.initializeZipState(t.zip),this.initializeCommentAuthorState(t.commentAuthorMap);}nextSlideNumber(){let t=1;for(;this.usedSlideNumbers.has(t);)t+=1;return this.usedSlideNumbers.add(t),t}nextMediaPath(t,e="image"){let n=1,r=e==="audio"?"audio":e==="video"?"video":"image",o=`ppt/media/${r}${n}.${t}`;for(;this.usedMediaPaths.has(o);)n+=1,o=`ppt/media/${r}${n}.${t}`;return this.usedMediaPaths.add(o),o}getUsedMediaPaths(){return this.usedMediaPaths}nextCommentPath(){return this.maxCommentPartIndex+=1,`ppt/comments/comment${this.maxCommentPartIndex}.xml`}toSlideCommentTarget(t){return `../${t.startsWith("ppt/")?t.substring(4):t}`}activateCommentPath(t){this.activeCommentPaths.add(t);}isCommentPathActive(t){return this.activeCommentPaths.has(t)}getExistingCommentPaths(){return this.existingCommentPaths}getActiveCommentPaths(){return this.activeCommentPaths}toEmu(t,e=0){return typeof t!="number"||!Number.isFinite(t)?e:Math.round(t*this.emuPerPx)}resolveCommentAuthorId(t){let e=String(t||"User").trim()||"User",n=this.usedAuthorIdByName.get(e);if(n)return n;let r=this.existingAuthorIdByName.get(e);return r||(this.maxAuthorId+=1,r=String(Math.max(this.maxAuthorId,0))),this.usedAuthorIdByName.set(e,r),this.commentAuthorMap.set(r,e),r}resolveCommentIndex(t,e,n){let r=Number.parseInt(String(e||""),10),o=Number.isFinite(r)?r:n,i=this.commentLastIdxByAuthorId.get(t)??-1;return this.commentLastIdxByAuthorId.set(t,Math.max(i,o)),o}hasUsedCommentAuthors(){return this.usedAuthorIdByName.size>0}getUsedCommentAuthors(){return Array.from(this.usedAuthorIdByName.entries()).map(([t,e],n)=>{let r=this.commentAuthorDetails.get(e);if(r)return {authorId:e,authorName:t,initials:r.initials,lastCommentIndex:Math.max(r.lastIdx,this.commentLastIdxByAuthorId.get(e)??0),colorIndex:r.clrIdx};let o=Number.parseInt(e,10),i=Number.isFinite(o)?Math.max(0,o):n;return {authorId:e,authorName:t,initials:this.toCommentInitials(t),lastCommentIndex:this.commentLastIdxByAuthorId.get(e)??0,colorIndex:i%10}}).sort((t,e)=>{let n=Number.parseInt(String(t.authorId||""),10),r=Number.parseInt(String(e.authorId||""),10);return Number.isFinite(n)&&Number.isFinite(r)?n-r:String(t.authorId||"").localeCompare(String(e.authorId||""))})}initializeZipState(t){t.forEach(e=>{let n=e.match(/^ppt\/slides\/slide(\d+)\.xml$/);if(n){let i=Number.parseInt(n[1],10);Number.isFinite(i)&&this.usedSlideNumbers.add(i);}e.startsWith("ppt/media/")&&this.usedMediaPaths.add(e);let r=e.match(/^ppt\/comments\/comment(\d+)\.xml$/);if(!r)return;this.existingCommentPaths.add(e);let o=Number.parseInt(r[1],10);Number.isFinite(o)&&(this.maxCommentPartIndex=Math.max(this.maxCommentPartIndex,o));});}initializeCommentAuthorState(t){for(let[e,n]of t.entries()){let r=n.trim();if(r.length===0)continue;this.existingAuthorIdByName.has(r)||this.existingAuthorIdByName.set(r,e);let o=Number.parseInt(e,10);Number.isFinite(o)&&(this.maxAuthorId=Math.max(this.maxAuthorId,o));}}toCommentInitials(t){let e=t.split(/\s+/).map(n=>n.trim()).filter(n=>n.length>0);return e.length===0?"U":e.slice(0,2).map(n=>n[0].toUpperCase()).join("")}},MJ=class{zip=null;commentAuthorMap=null;_commentAuthorDetails=null;emuPerPx=9525;withZip(t){return this.zip=t,this}withCommentAuthorMap(t){return this.commentAuthorMap=t,this}withCommentAuthorDetails(t){return this._commentAuthorDetails=t,this}withEmuPerPx(t){return this.emuPerPx=t,this}build(){if(!this.zip)throw new Error("PptxSaveStateBuilder requires zip before build().");if(!this.commentAuthorMap)throw new Error("PptxSaveStateBuilder requires commentAuthorMap before build().");return new _J({zip:this.zip,commentAuthorMap:this.commentAuthorMap,commentAuthorDetails:this._commentAuthorDetails??void 0,emuPerPx:this.emuPerPx})}};PJ=class{validateAndDeduplicateIds(t,e){let n=[];if(EJ(t,n,e),n.length===0)return 0;let r=new Set,o=[],i=0;for(let a of n){let l=Number.parseInt(String(a["@_id"]??"0"),10),c=Number.isFinite(l)?l:0;c>i&&(i=c),c===0||r.has(c)?o.push(a):r.add(c);}let s=0;for(let a of o)i+=1,a["@_id"]=String(i),r.add(i),s+=1;return s}},AJ=class{createXmlElement(t){return {"p:cmLst":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","p:cm":t.slideComments.map((e,n)=>this.createCommentNode(t,e,n))}}}createCommentNode(t,e,n){let r=t.saveState.resolveCommentAuthorId(e.author),o=t.saveState.resolveCommentIndex(r,e.id,n),i=this.resolveCreatedAt(e.createdAt),s=t.saveState.toEmu(e.x,0),a=t.saveState.toEmu(e.y,0);return {"@_authorId":r,"@_dt":i,"@_idx":String(o),"p:pos":{"@_x":String(s),"@_y":String(a)},"p:text":String(e.text||"")}}resolveCreatedAt(t){let e=String(t||"").trim();return e.length===0||Number.isNaN(Date.parse(e))?new Date().toISOString():new Date(e).toISOString()}},RJ=class{createXmlElement(t){return {"p:cmAuthorLst":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","p:cmAuthor":t.saveState.getUsedCommentAuthors().map(e=>({"@_id":e.authorId,"@_name":e.authorName,"@_initials":e.initials,"@_lastIdx":String(e.lastCommentIndex),"@_clrIdx":String(e.colorIndex)}))}}}},kJ=class{createSlideCommentsFactory(){return new AJ}createCommentAuthorsFactory(){return new RJ}},IJ=class{warnings=[];warningKeys=new Set;resetWarnings(){this.warnings=[],this.warningKeys.clear();}getWarnings(){return this.warnings.map(t=>({...t}))}getXmlLocalName(t){if(!t)return "";let e=t.startsWith("@_")?t.slice(2):t,n=e.lastIndexOf(":");return n<0?e:e.slice(n+1)}reportWarning(t){let e=this.getWarningKey(t);if(this.warningKeys.has(e))return;this.warningKeys.add(e);let n={code:t.code,message:t.message,severity:t.severity||"warning",scope:t.scope,slideId:t.slideId,elementId:t.elementId,xmlPath:t.xmlPath};this.warnings.push(n);let r=n.slideId?`slide=${n.slideId}`:"presentation",o=n.xmlPath?` path=${n.xmlPath}`:"",i=`[PptxHandler][${n.severity}] ${n.code} (${r}) ${n.message}${o}`;n.severity==="info"?console.info(i):console.warn(i);}inspectPresentationCompatibility(){}inspectSlideCompatibility(t,e){}inspectShapeCompatibility(t,e,n,r){}inspectPictureCompatibility(t,e,n,r){}inspectGraphicFrameCompatibility(t,e,n){}normalizeWarningPath(t){return t?t.replace(/\[\d+\]/g,"[]"):""}getWarningKey(t){return [t.code,t.scope,t.slideId||"*",this.normalizeWarningPath(t.xmlPath)].join("|")}},NJ=class{context;constructor(t){this.context=t;}async updateOnSave(t,e){let n=this.toW3cDate(new Date),r=this.context.zip.file("docProps/core.xml");if(r)try{let i=await r.async("string"),s=this.context.parser.parse(i),a=s["cp:coreProperties"];if(a){this.applyCorePropertiesOverrides(a,e?.coreProperties);let l=this.extractXmlNodeText(a["cp:revision"]),c=Number.parseInt(l||"",10),u=Number.isFinite(c)&&c>=0?c+1:1;a["cp:revision"]=String(u);let d=a["dcterms:modified"];if(d&&typeof d=="object"&&!Array.isArray(d)){let f=d;f["@_xsi:type"]="dcterms:W3CDTF",f["#text"]=n,a["dcterms:modified"]=f;}else a["dcterms:modified"]={"@_xsi:type":"dcterms:W3CDTF","#text":n};this.extractXmlNodeText(a["cp:lastModifiedBy"])||(a["cp:lastModifiedBy"]="pptx"),s["cp:coreProperties"]=a,this.context.zip.file("docProps/core.xml",this.context.builder.build(s));}}catch(i){console.warn("Failed to update core document properties:",i);}let o=this.context.zip.file("docProps/app.xml");if(o){try{let i=await o.async("string"),s=this.context.parser.parse(i),a=s.Properties;if(!a)return;this.applyAppPropertiesOverrides(a,e?.appProperties);let l=t.filter(u=>u.hidden).length,c=t.filter(u=>String(u.notes||"").trim().length>0).length;a.Slides=String(t.length),a.HiddenSlides=String(l),a.Notes=String(c),s.Properties=a,this.context.zip.file("docProps/app.xml",this.context.builder.build(s));}catch(i){console.warn("Failed to update application document properties:",i);}await this.updateCustomProperties(e?.customProperties);}}applyCorePropertiesOverrides(t,e){if(!e)return;let n=[["title","dc:title"],["subject","dc:subject"],["creator","dc:creator"],["keywords","cp:keywords"],["description","dc:description"],["lastModifiedBy","cp:lastModifiedBy"],["revision","cp:revision"],["created","dcterms:created"],["modified","dcterms:modified"],["category","cp:category"],["contentStatus","cp:contentStatus"]];for(let[r,o]of n){let i=e[r];if(i===void 0)continue;let s=String(i).trim();s.length===0?delete t[o]:o.startsWith("dcterms:")?t[o]={"@_xsi:type":"dcterms:W3CDTF","#text":s}:t[o]=s;}}applyAppPropertiesOverrides(t,e){if(!e)return;let n=[["application","Application"],["appVersion","AppVersion"],["presentationFormat","PresentationFormat"],["company","Company"],["manager","Manager"],["template","Template"]],r=[["slides","Slides"],["hiddenSlides","HiddenSlides"],["notes","Notes"],["totalTime","TotalTime"],["words","Words"],["paragraphs","Paragraphs"]];for(let[o,i]of n){let s=e[o];if(s===void 0)continue;let a=String(s).trim();a.length===0?delete t[i]:t[i]=a;}for(let[o,i]of r){let s=e[o];if(s===void 0)continue;let a=Number(s);Number.isFinite(a)&&(t[i]=String(Math.trunc(a)));}}async updateCustomProperties(t){if(!t)return;let e=t.filter(r=>r.name.trim().length>0).map((r,o)=>({...r,pid:o+2}));if(e.length===0){this.context.zip.remove("docProps/custom.xml"),await this.removeCustomPropertiesPackagingArtifacts();return}let n={Properties:{"@_xmlns":"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties","@_xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",property:e.map(r=>{let o=this.normalizeCustomPropertyType(r.type),i={"@_fmtid":"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}","@_pid":String(r.pid),"@_name":r.name};return i[`vt:${o}`]=String(r.value??""),i})}};this.context.zip.file("docProps/custom.xml",this.context.builder.build(n)),await this.ensureCustomPropertiesPackagingArtifacts();}async ensureCustomPropertiesPackagingArtifacts(){let t="application/vnd.openxmlformats-officedocument.custom-properties+xml",e="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",n=this.context.zip.file("[Content_Types].xml");if(n)try{let o=await n.async("string"),i=this.context.parser.parse(o),s=i.Types;if(s){let a=Array.isArray(s.Override)?s.Override:s.Override?[s.Override]:[];a.some(c=>String(c?.["@_PartName"]||"")==="/docProps/custom.xml")||(a.push({"@_PartName":"/docProps/custom.xml","@_ContentType":t}),s.Override=a.length===1?a[0]:a,this.context.zip.file("[Content_Types].xml",this.context.builder.build(i)));}}catch(o){console.warn("Failed to update [Content_Types].xml for custom properties:",o);}let r=this.context.zip.file("_rels/.rels");if(r)try{let o=await r.async("string"),i=this.context.parser.parse(o),s=i.Relationships;if(s){let a=Array.isArray(s.Relationship)?s.Relationship:s.Relationship?[s.Relationship]:[];if(!a.some(c=>String(c?.["@_Type"]||"")===e)){let c=0;for(let u of a){let d=String(u?.["@_Id"]||""),p=Number.parseInt(d.replace(/^rId/,""),10);Number.isFinite(p)&&p>c&&(c=p);}a.push({"@_Id":`rId${c+1}`,"@_Type":e,"@_Target":"docProps/custom.xml"}),s.Relationship=a,this.context.zip.file("_rels/.rels",this.context.builder.build(i));}}}catch(o){console.warn("Failed to update _rels/.rels for custom properties:",o);}}async removeCustomPropertiesPackagingArtifacts(){let t="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",e=this.context.zip.file("[Content_Types].xml");if(e)try{let r=await e.async("string"),o=this.context.parser.parse(r),i=o.Types;if(i){let s=Array.isArray(i.Override)?i.Override:i.Override?[i.Override]:[],a=s.filter(l=>String(l?.["@_PartName"]||"")!=="/docProps/custom.xml");a.length!==s.length&&(i.Override=a.length===1?a[0]:a,this.context.zip.file("[Content_Types].xml",this.context.builder.build(o)));}}catch{}let n=this.context.zip.file("_rels/.rels");if(n)try{let r=await n.async("string"),o=this.context.parser.parse(r),i=o.Relationships;if(i){let s=Array.isArray(i.Relationship)?i.Relationship:i.Relationship?[i.Relationship]:[],a=s.filter(l=>String(l?.["@_Type"]||"")!==t);a.length!==s.length&&(i.Relationship=a,this.context.zip.file("_rels/.rels",this.context.builder.build(o)));}}catch{}}normalizeCustomPropertyType(t){let e=new Set(["lpwstr","i4","bool","filetime","r8","i2","ui4","lpstr"]),n=String(t||"lpwstr").trim().toLowerCase();return e.has(n)?n:"lpwstr"}extractXmlNodeText(t){if(t!=null){if(typeof t=="string"){let e=t.trim();return e.length>0?e:void 0}if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let e=t["#text"];if(e==null)return;let n=String(e).trim();return n.length>0?n:void 0}}}toW3cDate(t){return t.toISOString().replace(/\.\d{3}Z$/,"Z")}},DJ=class{setBackground(t,e,n){let r=this.resolvePartContext(t,e);if(!r)return;let o=r.xmlMap.get(e);if(!o)return;let i=o[r.rootTag]||{},s=i["p:cSld"]||{};if(n&&n.length>0&&n!=="transparent"){let a=n.replace("#","").toUpperCase();s["p:bg"]={"p:bgPr":{"a:solidFill":{"a:srgbClr":{"@_val":a}},"a:effectLst":{}}};}else delete s["p:bg"];i["p:cSld"]=s,o[r.rootTag]=i;}getBackgroundColor(t,e,n){let r=this.resolvePartContext(t,e);if(!r)return;let o=r.xmlMap.get(e);if(o)return n(o,r.rootTag)}resolvePartContext(t,e){let n=e.includes("slideLayout"),r=e.includes("slideMaster");if(!(!n&&!r))return n?{xmlMap:t.layoutXmlMap,rootTag:"p:sldLayout"}:{xmlMap:t.masterXmlMap,rootTag:"p:sldMaster"}}},LJ=914400/96,FJ=12700/8,eC="{72B1D4B2-8646-4E06-B1EF-53B0C71A9B0A}",_A="{2D200454-25E2-4014-A478-2F8E8D3F5837}",VEe=["p14:sldGuideLst","p15:sldGuideLst","p14:guideLst","p15:guideLst","sldGuideLst","guideLst"],WEe=["p14:guide","p15:guide","guide"];GJ=class{async loadSlides(t){let n=t.presentationData["p:presentation"]?.["p:sldIdLst"],r=this.toXmlObjectArray(n?.["p:sldId"]);if(r.length===0)return t.setOrderedSlidePaths([]),[];let o=await this.loadPresentationSlideRels(t),i=[];for(let a of r){let l=String(a["@_r:id"]||"").trim(),c=o.get(l);if(!c)continue;let u=c.startsWith("/")?c.substring(1):`ppt/${c}`;i.push(u);}t.setOrderedSlidePaths(i);let s=[];for(let a=0;a<r.length;a++){let l=await this.loadSingleSlide(t,r[a],a,o);l&&s.push(l);}return await this.enrichSmartArtData(s,t),await this.enrichChartData(s,t),s}async loadPresentationSlideRels(t){let e=await t.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return new Map;let r=t.parser.parse(e).Relationships?.Relationship,o=this.toXmlObjectArray(r),i=new Map;for(let s of o){let a=String(s["@_Id"]||"").trim(),l=String(s["@_Target"]||"").trim();a.length===0||l.length===0||i.set(a,l);}return i}async loadSingleSlide(t,e,n,r){let o=String(e["@_r:id"]||"").trim();if(!o)return;let i=r.get(o);if(!i)return;let s=i.startsWith("/")?i.substring(1):`ppt/${i}`;t.zip.file(s)||(s=`ppt/${i}`);let a=await t.zip.file(s)?.async("string");if(!a)return;let l=t.parser.parse(a);t.compatibilityService.inspectSlideCompatibility(l,s),t.slideMap.set(s,l);let c=String(e["@_id"]||"").trim(),u=c?t.sectionBySlideId.get(c):void 0,d=`${s.replace("slides/","slides/_rels/")}.rels`;await t.loadSlideRelationships(s,d);let p=t.parseSlideClrMapOverride(l);t.setCurrentSlideClrMapOverride(p),await t.setActiveMasterForSlide?.(s);let f;try{let h=t.findLayoutPathForSlide(s);if(h){let j=await t.loadThemeOverride(h);j&&(f=t.applyThemeOverrideState(j));}let m=await t.getLayoutElements(s),g=await t.parseSlide(l,s),x=t.extractMediaTimingMap(l,s);x.size>0&&await t.enrichMediaElementsWithTiming(g,x);let v=[...m,...g],S=t.extractBackgroundColor(l)||await t.getLayoutBackgroundColor(s),w=t.extractBackgroundGradient(l)||await t.getLayoutBackgroundGradient(s),C=await t.extractBackgroundImage(l,s);C||(C=await t.getLayoutBackgroundImage(s));let T=await t.extractSlideNotes(s),E=await t.extractSlideComments(s),M=await t.extractModernSlideComments(s),P=M.length>0?[...E,...M]:E,R=t.isSlideHidden(l,e),k=t.extractBackgroundPattern(l),L=t.extractBackgroundShadeToTitle(l),D=t.extractBackgroundShowAnimation(l),U=t.extractShowMasterShapes(l),N=t.parseSlideTransition(l,s),B=t.parseEditorAnimations(l),O=t.parseNativeAnimations(l),H=l["p:sld"]?.["p:timing"],z=BJ(l),K=await t.parseSlideCustomerData(l,s),ee=t.parseSlideActiveXControls(l);return {id:s,rId:o,slideNumber:n+1,hidden:R,sectionId:u?.sectionId,sectionName:u?.sectionName,elements:v,backgroundColor:S,backgroundGradient:w||void 0,backgroundImage:C,transition:N,animations:B,nativeAnimations:O,rawTiming:H||void 0,notes:T.notes,notesSegments:T.notesSegments,comments:P,rawXml:l,clrMapOverride:p??void 0,backgroundPattern:k,backgroundShadeToTitle:L??void 0,backgroundShowAnimation:D??void 0,showMasterShapes:U??void 0,guides:z.length>0?z:void 0,customerData:K.length>0?K:void 0,activeXControls:ee.length>0?ee:void 0}}finally{f&&f(),t.setCurrentSlideClrMapOverride(null);}}async enrichSmartArtData(t,e){for(let n of t)for(let r of n.elements)if(!(r.type!=="smartArt"||r.smartArtData))try{let o=await e.getSmartArtDataForGraphicFrame(n.id,r.rawXml);o&&(r.smartArtData=o);}catch{}}async enrichChartData(t,e){for(let n of t)for(let r of n.elements)if(!(r.type!=="chart"||r.chartData))try{let o=await e.getChartDataForGraphicFrame(n.id,r.rawXml);o&&(r.chartData=o);}catch{}}toXmlObjectArray(t){return Array.isArray(t)?t.filter(e=>this.isXmlObject(e)):this.isXmlObject(t)?[t]:[]}isXmlObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}},VJ=class{getChildByLocalName(t,e){if(!t)return;let n=t[e];if(n&&typeof n=="object"&&!Array.isArray(n))return n;let r=`:${e}`,o=Object.keys(t).find(s=>s.endsWith(r));if(!o)return;let i=t[o];if(!(!i||typeof i!="object"||Array.isArray(i)))return i}getChildrenArrayByLocalName(t,e){if(!t)return [];let n=t[e];if(n!==void 0)return this.toXmlArray(n);let r=`:${e}`,o=Object.keys(t).find(i=>i.endsWith(r));return o?this.toXmlArray(t[o]):[]}getScalarChildByLocalName(t,e){if(!t)return;let n=t[e];if(typeof n=="string"||typeof n=="number")return String(n);let r=`:${e}`;for(let[o,i]of Object.entries(t))if(!(o!==e&&!o.endsWith(r))&&(typeof i=="string"||typeof i=="number"))return String(i)}toXmlArray(t){return Array.isArray(t)?t.filter(e=>this.isXmlObject(e)):this.isXmlObject(t)?[t]:[]}isXmlObject(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}};WJ=class{xmlLookupService;editorMetaExtensionUri;editorMetaNamespaceUri;constructor(t){this.xmlLookupService=t.xmlLookupService,this.editorMetaExtensionUri=t.editorMetaExtensionUri,this.editorMetaNamespaceUri=t.editorMetaNamespaceUri;}parseEditorAnimations(t){let e=this.xmlLookupService.getChildByLocalName(t,"sld"),n=this.xmlLookupService.getChildByLocalName(e,"extLst"),o=this.xmlLookupService.getChildrenArrayByLocalName(n,"ext").find(c=>String(c?.["@_uri"]||"").trim()===this.editorMetaExtensionUri);if(!o)return;let i=this.xmlLookupService.getChildByLocalName(o,"editorMeta"),s=this.xmlLookupService.getChildByLocalName(i,"animations"),a=this.xmlLookupService.getChildrenArrayByLocalName(s,"animation");if(a.length===0)return [];let l=[];return a.forEach(c=>{let u=String(c?.["@_elementId"]||"").trim();if(u.length===0)return;let d=Yy(c?.["@_entrance"]),p=Yy(c?.["@_exit"]),f=Yy(c?.["@_emphasis"]),h=Number.parseInt(String(c?.["@_durationMs"]||""),10),m=Number.parseInt(String(c?.["@_delayMs"]||""),10),g=Number.parseInt(String(c?.["@_order"]||""),10),x=Number.parseInt(String(c?.["@_repeatCount"]||""),10),v=XEe(c?.["@_trigger"]),S=jEe(c?.["@_timingCurve"]),w=YEe(c?.["@_repeatMode"]),C=KEe(c?.["@_direction"]),T=qEe(c?.["@_sequence"]),E=ZEe(c?.["@_afterAnimation"]),M=c?.["@_afterAnimationColor"]?String(c["@_afterAnimationColor"]).trim():void 0,P=c?.["@_motionPath"]?String(c["@_motionPath"]).trim():void 0;l.push({elementId:u,entrance:d==="none"?void 0:d,exit:p==="none"?void 0:p,emphasis:f==="none"?void 0:f,durationMs:Number.isFinite(h)&&h>0?h:void 0,delayMs:Number.isFinite(m)&&m>=0?m:void 0,order:Number.isFinite(g)?g:void 0,trigger:v,timingCurve:S,repeatCount:Number.isFinite(x)&&x>0?x:void 0,repeatMode:w,direction:C,sequence:T,afterAnimation:E,afterAnimationColor:M||void 0,motionPath:P||void 0});}),l.sort((c,u)=>(c.order||0)-(u.order||0))}applyEditorAnimations(t,e){let n=e.map(s=>{let a=String(s.elementId||"").trim();if(a.length===0)return null;let l=Yy(s.entrance),c=Yy(s.exit),u=Yy(s.emphasis),d=typeof s.durationMs=="number"&&Number.isFinite(s.durationMs)&&s.durationMs>0?Math.round(s.durationMs):void 0,p=typeof s.delayMs=="number"&&Number.isFinite(s.delayMs)&&s.delayMs>=0?Math.round(s.delayMs):void 0,f=typeof s.order=="number"&&Number.isFinite(s.order)?Math.round(s.order):void 0,h=typeof s.repeatCount=="number"&&Number.isFinite(s.repeatCount)&&s.repeatCount>0?s.repeatCount:void 0;return !l&&!c&&!u&&!s.motionPath?null:{"@_elementId":a,"@_entrance":l&&l!=="none"?l:void 0,"@_exit":c&&c!=="none"?c:void 0,"@_emphasis":u&&u!=="none"?u:void 0,"@_durationMs":d?String(d):void 0,"@_delayMs":p!==void 0?String(Math.max(0,p)):void 0,"@_order":f!==void 0?String(f):void 0,"@_trigger":s.trigger??void 0,"@_timingCurve":s.timingCurve??void 0,"@_repeatCount":h!==void 0?String(h):void 0,"@_repeatMode":s.repeatMode??void 0,"@_direction":s.direction??void 0,"@_sequence":s.sequence??void 0,"@_afterAnimation":s.afterAnimation??void 0,"@_afterAnimationColor":s.afterAnimationColor??void 0,"@_motionPath":s.motionPath??void 0}}).filter(s=>!!s).sort((s,a)=>{let l=Number.parseInt(String(s["@_order"]||"0"),10),c=Number.parseInt(String(a["@_order"]||"0"),10);return l-c}),r=this.xmlLookupService.getChildByLocalName(t,"extLst")||{},i=this.xmlLookupService.getChildrenArrayByLocalName(r,"ext").filter(s=>String(s?.["@_uri"]||"").trim()!==this.editorMetaExtensionUri);if(n.length===0){i.length>0?t["p:extLst"]={"p:ext":i}:delete t["p:extLst"];return}t["@_xmlns:pptx"]=this.editorMetaNamespaceUri,i.push({"@_uri":this.editorMetaExtensionUri,"pptx:editorMeta":{"pptx:animations":{"pptx:animation":n}}}),t["p:extLst"]={"p:ext":i};}};aPe=new Set(["@_id","@_nodeType","@_presetClass","@_presetID","@_presetSubtype","@_dur","@_delay","@_repeatCount","@_autoRev","@_fill","@_accel","@_decel","@_restart","@_grpId","@_afterEffect"]),lPe=["@_evtFilter","@_display","@_masterRel","@_nodePh","@_endSync","@_progress","@_syncBehavior","@_tmFilter"];cPe=new Set(["onBegin","onEnd","begin","end","onClick","onMouseOver","onMouseOut","onNext","onPrev","onStopAudio"]);KJ=class{parseNativeAnimations(t){try{let e=t?.["p:sld"]?.["p:timing"];if(!e||typeof e!="object")return;let n=e["p:tnLst"];if(!n||typeof n!="object")return;let r=[],o=n["p:par"];if(!o||typeof o!="object")return;this.walkTimingTree(o,r,"onClick"),this.parseInteractiveSequences(o,r),this.parseMediaAnimations(e,r);let i=e["p:bldLst"],s=bPe(i);for(let c of s)for(let u of r)u.targetId===c.spid&&(u.groupId=c.grpId);let a=xPe(i);for(let c of a)for(let u of r)u.targetId===c.spid&&(u.smartArtBuild=c.bld);let l=yPe(i);for(let c of l)for(let u of r)u.targetId===c.spid&&(u.graphicBuild=c.bld);return oPe(e,r),r.length>0?r:void 0}catch(e){console.warn("Failed to parse native animations:",e);return}}walkTimingTree(t,e,n){if(!t)return;let r=t["p:cTn"];if(r){let s=String(r["@_nodeType"]||""),a=r["@_presetClass"],l=r["@_presetID"]?Number.parseInt(String(r["@_presetID"]),10):void 0,c=r["@_dur"]?Number.parseInt(String(r["@_dur"]),10):void 0,u=r["@_delay"]?Number.parseInt(String(r["@_delay"]),10):void 0,d=n;s==="afterPrevious"||s==="afterPrev"?d="afterPrevious":s==="withPrevious"||s==="withEffect"?d="withPrevious":s==="clickEffect"?d="onClick":(s==="mouseOver"||s==="onMouseOver"||s==="hoverEffect")&&(d="onHover");let p=r["p:stCondLst"];if(p){let w=zt(p["p:cond"]);for(let C of w){let T=C["@_delay"];T!==void 0&&Number.parseInt(String(T),10)>0&&(d="afterDelay"),C["@_evt"]==="onMouseOver"&&(d="onHover");}}let f=LB(p),h=r["p:endCondLst"],m=LB(h),g=JEe(r),x=h,v=XJ(r);if(a&&v){let w=["entr","exit","emph","path"].includes(a)?a:void 0,C=r["p:childTnLst"],T=QEe(C),E=rPe(r),M=dPe(C),P=mPe(r),R=gPe(C),k=this.extractTextTargetFromCTn(r),L=nPe(C),D=Nq(r),U=Dq(r);e.push({targetId:v,trigger:d,presetClass:w,presetId:l,durationMs:c,delayMs:u,triggerDelayMs:d==="afterDelay"?u:void 0,motionPath:T.motionPath,motionOrigin:T.motionOrigin,motionPathRotateAuto:T.motionPathRotateAuto,motionPathEditMode:T.motionPathEditMode,motionPtsTypes:T.motionPtsTypes,rotationBy:T.rotationBy,rotationFrom:T.rotationFrom,rotationTo:T.rotationTo,scaleByX:T.scaleByX,scaleByY:T.scaleByY,scaleFromX:T.scaleFromX,scaleFromY:T.scaleFromY,scaleToX:T.scaleToX,scaleToY:T.scaleToY,scaleZoomContents:T.scaleZoomContents,keyframes:L??void 0,repeatCount:E.repeatCount,autoReverse:E.autoReverse,soundRId:g.soundRId,stopSound:g.stopSound,startConditions:f??void 0,endConditions:m??void 0,rawEndCondLst:x??void 0,colorAnimation:M??void 0,iterate:P??void 0,commandType:R.commandType,commandString:R.commandString,textTarget:k??void 0,cTnAttributes:D,afterEffect:U});}let S=r["p:childTnLst"];if(S){let w=zt(S["p:par"]),C=zt(S["p:seq"]),T=zt(S["p:excl"]);for(let E of w)this.walkTimingTree(E,e,d);for(let E of C)this.walkTimingTree(E,e,d);for(let E of T){let M=[];this.walkTimingTree(E,M,d);for(let P of M)P.exclusive=true,e.push(P);}}}let o=zt(t["p:par"]),i=zt(t["p:seq"]);for(let s of o)this.walkTimingTree(s,e,n);for(let s of i)this.walkTimingTree(s,e,n);}parseMediaAnimations(t,e){this.collectMediaNodes(t,e);}collectMediaNodes(t,e){if(!t)return;for(let o of ["p:audio","p:video"]){let i=zt(t[o]);for(let s of i){let a=s["p:cMediaNode"];if(!a)continue;let c=a["p:tgtEl"]?.["p:spTgt"],u=c?.["@_spid"]?String(c["@_spid"]):void 0;if(!u)continue;let d=a["p:cTn"],p=d?Nq(d):void 0,f=d?Dq(d):void 0,h=d&&d["@_dur"]!==void 0&&String(d["@_dur"])!=="indefinite"?Number.parseInt(String(d["@_dur"]),10):void 0;e.push({kind:"media",mediaType:o==="p:audio"?"audio":"video",targetId:u,durationMs:h!==void 0&&!Number.isNaN(h)?h:void 0,cTnAttributes:p,afterEffect:f});}}let r=t["p:cTn"]?.["p:childTnLst"];if(r){for(let o of ["p:par","p:seq","p:excl"]){let i=zt(r[o]);for(let s of i)this.collectMediaNodes(s,e);}this.collectMediaNodes(r,e);}for(let o of ["p:par","p:seq","p:excl","p:tnLst"]){let i=zt(t[o]);for(let s of i)this.collectMediaNodes(s,e);}}extractTextTargetFromCTn(t){let e=t["p:childTnLst"];if(!e)return;let n=[...zt(e["p:animEffect"]),...zt(e["p:anim"]),...zt(e["p:set"])];for(let r of n){let s=r["p:cBhvr"]?.["p:tgtEl"]?.["p:spTgt"];if(s){let a=hPe(s);if(a)return a}}}parseInteractiveSequences(t,e){let n=t["p:cTn"];if(!n)return;let r=n["p:childTnLst"];if(!r)return;let o=zt(r["p:seq"]);for(let i of o){let s=i["p:cTn"];if(!s||String(s["@_nodeType"]||"")==="mainSeq")continue;let l=sPe(s);if(!l)continue;let c=[];this.walkTimingTree(i,c,"onShapeClick");for(let u of c)u.triggerShapeId=l,u.trigger="onShapeClick",e.push(u);}}},ZO=new Set(["conveyor","doors","ferris","flash","flythrough","gallery","glitter","honeycomb","pan","prism","reveal","ripple","shred","switch","vortex","warp","wheelReverse","window","cube","flip","rotate","orbit"]);yB="{C7C9D14B-FE2A-4D35-B620-AB07D5B017F4}",wPe=new Set(["fade","push","wipe","split","randomBar","cut","blinds","checker","circle","comb","cover","diamond","dissolve","plus","pull","random","strips","uncover","wedge","wheel","zoom","newsflash"]),qJ=class{xmlLookupService;getXmlLocalName;constructor(t){this.xmlLookupService=t.xmlLookupService,this.getXmlLocalName=t.getXmlLocalName;}parseSlideTransition(t){let e=this.xmlLookupService.getChildByLocalName(t,"sld"),n=this.xmlLookupService.getChildByLocalName(e,"transition");if(!n)return;let r="cut",o,i,s,a,l,c,u;for(let[S,w]of Object.entries(n)){if(S.startsWith("@_"))continue;let C=this.getXmlLocalName(S);if(C==="sndAc"){c=w;continue}if(C==="extLst"){u=w;continue}if(wPe.has(C)&&(r=C),w&&typeof w=="object"&&!Array.isArray(w)){let T=w,E=String(T["@_dir"]||"").trim();E.length>0&&(o=E);let M=String(T["@_orient"]||"").trim();(M==="horz"||M==="vert")&&(i=M);let P=String(T["@_spokes"]||"").trim();if(P.length>0){let L=Number.parseInt(P,10);Number.isFinite(L)&&L>=1&&(s=L);}let R=String(T["@_pattern"]||"").trim();R.length>0&&(a=R);let k=String(T["@_thruBlk"]||"").trim();k.length>0&&(l=!["0","false","off"].includes(k.toLowerCase()));}}if(u&&r==="cut"){let S=vPe(u,this.xmlLookupService,this.getXmlLocalName);S?(r=S.type,S.direction&&(o=S.direction),S.orient&&(i=S.orient),S.pattern&&(a=S.pattern)):this.parseMorphFromExtLst(u)&&(r="morph");}let d=Number.parseInt(String(n["@_dur"]||""),10),p=Number.isFinite(d)&&d>0?d:void 0,f=String(n["@_advClick"]||"").trim(),h=f.length>0?!["0","false","off"].includes(f.toLowerCase()):void 0,m=Number.parseInt(String(n["@_advTm"]||""),10),g=Number.isFinite(m)&&m>=0?m:void 0,x,v;if(c){let S=this.xmlLookupService.getChildByLocalName(c,"stSnd");if(S){let C=this.xmlLookupService.getChildByLocalName(S,"snd");if(C){let T=C["@_r:embed"]??C["@_embed"];T&&(x=String(T));}}let w=false;for(let C of Object.keys(c))if(!C.startsWith("@_")&&this.getXmlLocalName(C)==="endSnd"){w=true;break}w&&(v=true);}return {type:r,direction:o,orient:i,spokes:s,pattern:a,thruBlk:l,durationMs:p,advanceOnClick:h,advanceAfterMs:g,soundRId:x,stopSound:v,rawSoundAction:c,rawExtLst:u}}parseMorphFromExtLst(t){let e=this.xmlLookupService.getChildrenArrayByLocalName(t,"ext");for(let n of e){if(!n)continue;let r=String(n["@_uri"]||"").trim(),o=r.toUpperCase()===yB.toUpperCase();for(let i of Object.keys(n))if(!i.startsWith("@_")&&this.getXmlLocalName(i)==="morph")return o||r.length===0,true}return false}buildSlideTransitionXml(t){if(!t||t.type==="none")return;let e=t.type||"cut",n=ZO.has(e),r=e==="morph",o={};if(n)o["p:extLst"]=SPe(e,t.direction,t.orient,t.pattern,t.rawExtLst,this.xmlLookupService,this.getXmlLocalName);else if(r)o["p:extLst"]=this.buildMorphExtLst(t.rawExtLst);else if(e==="cut"||e==="fade"){let i={};typeof t.thruBlk=="boolean"&&(i["@_thruBlk"]=t.thruBlk?"1":"0"),o[`p:${e}`]=i;}else {let i={},s=String(t.direction||"").trim();s.length>0&&(i["@_dir"]=s),t.orient&&(i["@_orient"]=t.orient),typeof t.spokes=="number"&&t.spokes>=1&&(i["@_spokes"]=String(t.spokes)),t.pattern&&(i["@_pattern"]=t.pattern),typeof t.thruBlk=="boolean"&&(i["@_thruBlk"]=t.thruBlk?"1":"0"),o[`p:${e}`]=i;}return typeof t.durationMs=="number"&&Number.isFinite(t.durationMs)&&t.durationMs>0&&(o["@_dur"]=String(Math.round(t.durationMs))),typeof t.advanceOnClick=="boolean"&&(o["@_advClick"]=t.advanceOnClick?"1":"0"),typeof t.advanceAfterMs=="number"&&Number.isFinite(t.advanceAfterMs)&&t.advanceAfterMs>=0&&(o["@_advTm"]=String(Math.round(t.advanceAfterMs))),t.stopSound?o["p:sndAc"]={"p:endSnd":{}}:t.rawSoundAction&&(o["p:sndAc"]=t.rawSoundAction),t.rawExtLst&&!n&&!r&&(o["p:extLst"]=t.rawExtLst),o}buildMorphExtLst(t){let e={"@_uri":yB,"p159:morph":{"@_xmlns:p159":"http://schemas.microsoft.com/office/powerpoint/2015/09/main"}};if(!t)return {"p:ext":e};let r=this.xmlLookupService.getChildrenArrayByLocalName(t,"ext").filter(i=>{if(!i||String(i["@_uri"]||"").trim().toUpperCase()===yB.toUpperCase())return false;for(let a of Object.keys(i))if(!a.startsWith("@_")&&this.getXmlLocalName(a)==="morph")return false;return true}),o=[e,...r];return {"p:ext":o.length===1?o[0]:o}}},EA={appear:{presetClass:"entr",presetId:1,defaultSubtype:0},fadeIn:{presetClass:"entr",presetId:10,defaultSubtype:0},flyIn:{presetClass:"entr",presetId:2,defaultSubtype:4},zoomIn:{presetClass:"entr",presetId:23,defaultSubtype:0},blindsIn:{presetClass:"entr",presetId:3,defaultSubtype:0},boxIn:{presetClass:"entr",presetId:4,defaultSubtype:0},checkerboardIn:{presetClass:"entr",presetId:5,defaultSubtype:0},expandIn:{presetClass:"entr",presetId:6,defaultSubtype:0},dissolveIn:{presetClass:"entr",presetId:9,defaultSubtype:0},flashIn:{presetClass:"entr",presetId:12,defaultSubtype:0},peekIn:{presetClass:"entr",presetId:16,defaultSubtype:0},randomBarsIn:{presetClass:"entr",presetId:17,defaultSubtype:0},wipeIn:{presetClass:"entr",presetId:22,defaultSubtype:0},riseUp:{presetClass:"entr",presetId:26,defaultSubtype:0},bounceIn:{presetClass:"entr",presetId:37,defaultSubtype:0},floatIn:{presetClass:"entr",presetId:42,defaultSubtype:0},swivel:{presetClass:"entr",presetId:47,defaultSubtype:0},spinnerIn:{presetClass:"entr",presetId:49,defaultSubtype:0},growTurnIn:{presetClass:"entr",presetId:53,defaultSubtype:0},splitIn:{presetClass:"entr",presetId:31,defaultSubtype:0},wheelIn:{presetClass:"entr",presetId:21,defaultSubtype:1},circleIn:{presetClass:"entr",presetId:7,defaultSubtype:0},diamondIn:{presetClass:"entr",presetId:8,defaultSubtype:0},flashBulbIn:{presetClass:"entr",presetId:11,defaultSubtype:0},plusIn:{presetClass:"entr",presetId:13,defaultSubtype:0},spiralIn:{presetClass:"entr",presetId:15,defaultSubtype:0},stretchIn:{presetClass:"entr",presetId:18,defaultSubtype:0},stripsIn:{presetClass:"entr",presetId:19,defaultSubtype:0},wedgeIn:{presetClass:"entr",presetId:20,defaultSubtype:0},randomEffectsIn:{presetClass:"entr",presetId:24,defaultSubtype:0},boomerangIn:{presetClass:"entr",presetId:25,defaultSubtype:0},creditsIn:{presetClass:"entr",presetId:27,defaultSubtype:0},floatUp:{presetClass:"entr",presetId:28,defaultSubtype:0},pinwheelIn:{presetClass:"entr",presetId:29,defaultSubtype:0},spinner2In:{presetClass:"entr",presetId:30,defaultSubtype:0},whipIn:{presetClass:"entr",presetId:32,defaultSubtype:0},arriveIn:{presetClass:"entr",presetId:33,defaultSubtype:0},basicSwivelIn:{presetClass:"entr",presetId:34,defaultSubtype:0},beveledArrivalIn:{presetClass:"entr",presetId:35,defaultSubtype:0},curveUpIn:{presetClass:"entr",presetId:36,defaultSubtype:0},foldIn:{presetClass:"entr",presetId:38,defaultSubtype:0},fadedSwivelIn:{presetClass:"entr",presetId:39,defaultSubtype:0},fadedZoomIn:{presetClass:"entr",presetId:40,defaultSubtype:0},lightSpeedIn:{presetClass:"entr",presetId:41,defaultSubtype:0},flipIn:{presetClass:"entr",presetId:43,defaultSubtype:0},glideIn:{presetClass:"entr",presetId:44,defaultSubtype:0},growRotateIn:{presetClass:"entr",presetId:45,defaultSubtype:0},growWithColorIn:{presetClass:"entr",presetId:46,defaultSubtype:0},magnifyIn:{presetClass:"entr",presetId:48,defaultSubtype:0},slingIn:{presetClass:"entr",presetId:50,defaultSubtype:0},compressIn:{presetClass:"entr",presetId:51,defaultSubtype:0},unfoldIn:{presetClass:"entr",presetId:52,defaultSubtype:0},zoomRotateIn:{presetClass:"entr",presetId:54,defaultSubtype:0},curvyStarIn:{presetClass:"entr",presetId:55,defaultSubtype:0},rotateIn:{presetClass:"entr",presetId:56,defaultSubtype:0},centerRevolveIn:{presetClass:"entr",presetId:57,defaultSubtype:0},threadIn:{presetClass:"entr",presetId:58,defaultSubtype:0},dropIn:{presetClass:"entr",presetId:59,defaultSubtype:0},ascendIn:{presetClass:"entr",presetId:60,defaultSubtype:0},descendIn:{presetClass:"entr",presetId:61,defaultSubtype:0},centerStageIn:{presetClass:"entr",presetId:62,defaultSubtype:0},easeIn:{presetClass:"entr",presetId:63,defaultSubtype:0},stretchyIn:{presetClass:"entr",presetId:64,defaultSubtype:0},zipIn:{presetClass:"entr",presetId:65,defaultSubtype:0},barsIn:{presetClass:"entr",presetId:66,defaultSubtype:0},coverIn:{presetClass:"entr",presetId:67,defaultSubtype:0},revealIn:{presetClass:"entr",presetId:68,defaultSubtype:0},crawlIn:{presetClass:"entr",presetId:7,defaultSubtype:4},disappear:{presetClass:"exit",presetId:1,defaultSubtype:0},flyOut:{presetClass:"exit",presetId:2,defaultSubtype:4},shrinkOut:{presetClass:"exit",presetId:6,defaultSubtype:0},dissolveOut:{presetClass:"exit",presetId:9,defaultSubtype:0},fadeOut:{presetClass:"exit",presetId:10,defaultSubtype:0},wipeOut:{presetClass:"exit",presetId:22,defaultSubtype:0},zoomOut:{presetClass:"exit",presetId:23,defaultSubtype:0},bounceOut:{presetClass:"exit",presetId:37,defaultSubtype:0},blindsOut:{presetClass:"exit",presetId:3,defaultSubtype:0},boxOut:{presetClass:"exit",presetId:4,defaultSubtype:0},checkerboardOut:{presetClass:"exit",presetId:5,defaultSubtype:0},circleOut:{presetClass:"exit",presetId:6,defaultSubtype:1},crawlOut:{presetClass:"exit",presetId:7,defaultSubtype:4},diamondOut:{presetClass:"exit",presetId:8,defaultSubtype:0},flashBulbOut:{presetClass:"exit",presetId:11,defaultSubtype:0},flashOnceOut:{presetClass:"exit",presetId:12,defaultSubtype:0},plusOut:{presetClass:"exit",presetId:13,defaultSubtype:0},randomBarsOut:{presetClass:"exit",presetId:14,defaultSubtype:0},spiralOut:{presetClass:"exit",presetId:15,defaultSubtype:0},peekOut:{presetClass:"exit",presetId:16,defaultSubtype:0},splitOut:{presetClass:"exit",presetId:17,defaultSubtype:0},collapseOut:{presetClass:"exit",presetId:18,defaultSubtype:0},stripsOut:{presetClass:"exit",presetId:19,defaultSubtype:0},wedgeOut:{presetClass:"exit",presetId:20,defaultSubtype:0},wheelOut:{presetClass:"exit",presetId:21,defaultSubtype:1},randomEffectsOut:{presetClass:"exit",presetId:24,defaultSubtype:0},boomerangOut:{presetClass:"exit",presetId:25,defaultSubtype:0},sinkDown:{presetClass:"exit",presetId:26,defaultSubtype:0},creditsOut:{presetClass:"exit",presetId:27,defaultSubtype:0},floatDown:{presetClass:"exit",presetId:28,defaultSubtype:0},pinwheelOut:{presetClass:"exit",presetId:29,defaultSubtype:0},spinner2Out:{presetClass:"exit",presetId:30,defaultSubtype:0},contractOut:{presetClass:"exit",presetId:31,defaultSubtype:0},whipOut:{presetClass:"exit",presetId:32,defaultSubtype:0},leaveOut:{presetClass:"exit",presetId:33,defaultSubtype:0},basicSwivelOut:{presetClass:"exit",presetId:34,defaultSubtype:0},beveledDeparture:{presetClass:"exit",presetId:35,defaultSubtype:0},curveDownOut:{presetClass:"exit",presetId:36,defaultSubtype:0},unfoldOut:{presetClass:"exit",presetId:38,defaultSubtype:0},fadedSwivelOut:{presetClass:"exit",presetId:39,defaultSubtype:0},fadedZoomOut:{presetClass:"exit",presetId:40,defaultSubtype:0},lightSpeedOut:{presetClass:"exit",presetId:41,defaultSubtype:0},floatOut:{presetClass:"exit",presetId:42,defaultSubtype:0},flipOut:{presetClass:"exit",presetId:43,defaultSubtype:0},glideOut:{presetClass:"exit",presetId:44,defaultSubtype:0},shrinkRotate:{presetClass:"exit",presetId:45,defaultSubtype:0},shrinkWithColor:{presetClass:"exit",presetId:46,defaultSubtype:0},swivelOut:{presetClass:"exit",presetId:47,defaultSubtype:0},shrinkTurn:{presetClass:"exit",presetId:48,defaultSubtype:0},pinwheel4Out:{presetClass:"exit",presetId:49,defaultSubtype:0},slingOut:{presetClass:"exit",presetId:50,defaultSubtype:0},stretchOut:{presetClass:"exit",presetId:51,defaultSubtype:0},foldOut:{presetClass:"exit",presetId:52,defaultSubtype:0},shrinkSpin:{presetClass:"exit",presetId:53,defaultSubtype:0},zoomRotateOut:{presetClass:"exit",presetId:54,defaultSubtype:0},curvyStarOut:{presetClass:"exit",presetId:55,defaultSubtype:0},rotateOut:{presetClass:"exit",presetId:56,defaultSubtype:0},centerRevolveOut:{presetClass:"exit",presetId:57,defaultSubtype:0},threadOut:{presetClass:"exit",presetId:58,defaultSubtype:0},dropOut:{presetClass:"exit",presetId:59,defaultSubtype:0},ascendOut:{presetClass:"exit",presetId:60,defaultSubtype:0},descendOut:{presetClass:"exit",presetId:61,defaultSubtype:0},exitStage:{presetClass:"exit",presetId:62,defaultSubtype:0},easeOut:{presetClass:"exit",presetId:63,defaultSubtype:0},stretchyOut:{presetClass:"exit",presetId:64,defaultSubtype:0},zipOut:{presetClass:"exit",presetId:65,defaultSubtype:0},barsOut:{presetClass:"exit",presetId:66,defaultSubtype:0},uncoverOut:{presetClass:"exit",presetId:67,defaultSubtype:0},concealOut:{presetClass:"exit",presetId:68,defaultSubtype:0},boldFlash:{presetClass:"emph",presetId:1,defaultSubtype:0},wave:{presetClass:"emph",presetId:2,defaultSubtype:0},colorWave:{presetClass:"emph",presetId:2,defaultSubtype:0},growShrink:{presetClass:"emph",presetId:6,defaultSubtype:0},spin:{presetClass:"emph",presetId:8,defaultSubtype:0},transparency:{presetClass:"emph",presetId:9,defaultSubtype:0},teeter:{presetClass:"emph",presetId:14,defaultSubtype:0},pulse:{presetClass:"emph",presetId:26,defaultSubtype:0},bounce:{presetClass:"emph",presetId:26,defaultSubtype:0},flash:{presetClass:"emph",presetId:1,defaultSubtype:0},brushOnColor:{presetClass:"emph",presetId:3,defaultSubtype:0},brushOnUnderline:{presetClass:"emph",presetId:4,defaultSubtype:0},changeFont:{presetClass:"emph",presetId:5,defaultSubtype:0},changeFontColor:{presetClass:"emph",presetId:7,defaultSubtype:0},changeFontSize:{presetClass:"emph",presetId:10,defaultSubtype:0},changeFontStyle:{presetClass:"emph",presetId:11,defaultSubtype:0},growWithColor:{presetClass:"emph",presetId:12,defaultSubtype:0},desaturate:{presetClass:"emph",presetId:13,defaultSubtype:0},verticalHighlight:{presetClass:"emph",presetId:15,defaultSubtype:0},wave2:{presetClass:"emph",presetId:16,defaultSubtype:0},blast:{presetClass:"emph",presetId:17,defaultSubtype:0},boldReveal:{presetClass:"emph",presetId:18,defaultSubtype:0},washOut:{presetClass:"emph",presetId:19,defaultSubtype:0},shimmer:{presetClass:"emph",presetId:20,defaultSubtype:0},flicker:{presetClass:"emph",presetId:21,defaultSubtype:0},growWithColorSustain:{presetClass:"emph",presetId:22,defaultSubtype:0},lighten:{presetClass:"emph",presetId:23,defaultSubtype:0},darken:{presetClass:"emph",presetId:24,defaultSubtype:0},styleEmphasis:{presetClass:"emph",presetId:25,defaultSubtype:0},colorPulse:{presetClass:"emph",presetId:27,defaultSubtype:0},colorBlend:{presetClass:"emph",presetId:28,defaultSubtype:0},complementaryColor:{presetClass:"emph",presetId:29,defaultSubtype:0},complementaryColor2:{presetClass:"emph",presetId:30,defaultSubtype:0},contrastingColor:{presetClass:"emph",presetId:31,defaultSubtype:0},pulseOnce:{presetClass:"emph",presetId:32,defaultSubtype:0},underlineEmph:{presetClass:"emph",presetId:33,defaultSubtype:0},boldFlashVariant:{presetClass:"emph",presetId:34,defaultSubtype:0},teeterVariant:{presetClass:"emph",presetId:35,defaultSubtype:0},waveVariant:{presetClass:"emph",presetId:36,defaultSubtype:0},objectColor:{presetClass:"emph",presetId:37,defaultSubtype:0},fillColor:{presetClass:"emph",presetId:38,defaultSubtype:0},lineColor:{presetClass:"emph",presetId:39,defaultSubtype:0},brushOnColorSustain:{presetClass:"emph",presetId:40,defaultSubtype:0},colorWaveSustain:{presetClass:"emph",presetId:41,defaultSubtype:0},flashEmph:{presetClass:"emph",presetId:42,defaultSubtype:0},flickerSlow:{presetClass:"emph",presetId:43,defaultSubtype:0},growBig:{presetClass:"emph",presetId:44,defaultSubtype:0},shrinkSmall:{presetClass:"emph",presetId:45,defaultSubtype:0},colorLighten:{presetClass:"emph",presetId:46,defaultSubtype:0},colorDarken:{presetClass:"emph",presetId:47,defaultSubtype:0},boldItalics:{presetClass:"emph",presetId:48,defaultSubtype:0},spinSlow:{presetClass:"emph",presetId:49,defaultSubtype:0},spinFast:{presetClass:"emph",presetId:50,defaultSubtype:0},wobble:{presetClass:"emph",presetId:51,defaultSubtype:0},jiggle:{presetClass:"emph",presetId:52,defaultSubtype:0},bounceInPlace:{presetClass:"emph",presetId:53,defaultSubtype:0},heartbeat:{presetClass:"emph",presetId:54,defaultSubtype:0},glow:{presetClass:"emph",presetId:55,defaultSubtype:0},brighten:{presetClass:"emph",presetId:56,defaultSubtype:0},dim:{presetClass:"emph",presetId:57,defaultSubtype:0},saturate:{presetClass:"emph",presetId:58,defaultSubtype:0},colorCycle:{presetClass:"emph",presetId:59,defaultSubtype:0},rainbow:{presetClass:"emph",presetId:60,defaultSubtype:0},shake:{presetClass:"emph",presetId:61,defaultSubtype:0},vibrate:{presetClass:"emph",presetId:62,defaultSubtype:0},sway:{presetClass:"emph",presetId:63,defaultSubtype:0},bob:{presetClass:"emph",presetId:64,defaultSubtype:0}};CPe=[[1,"appear"],[2,"flyIn"],[3,"blindsIn"],[4,"boxIn"],[5,"checkerboardIn"],[6,"expandIn"],[7,"crawlIn"],[8,"diamondIn"],[9,"dissolveIn"],[10,"fadeIn"],[11,"flashBulbIn"],[12,"flashIn"],[13,"plusIn"],[15,"spiralIn"],[16,"peekIn"],[17,"randomBarsIn"],[18,"stretchIn"],[19,"stripsIn"],[20,"wedgeIn"],[21,"wheelIn"],[22,"wipeIn"],[23,"zoomIn"],[26,"riseUp"],[37,"bounceIn"],[42,"floatIn"],[47,"swivel"],[49,"spinnerIn"],[53,"growTurnIn"]],TPe=[[1,"disappear"],[2,"flyOut"],[6,"shrinkOut"],[9,"dissolveOut"],[10,"fadeOut"],[22,"wipeOut"],[23,"zoomOut"],[37,"bounceOut"]],_Pe=[[1,"boldFlash"],[2,"colorWave"],[6,"growShrink"],[8,"spin"],[9,"transparency"],[14,"teeter"],[26,"pulse"]],ZJ=JO("entr",CPe),JJ=JO("exit",TPe),QJ=JO("emph",_Pe);eQ={fromBottom:4,fromLeft:8,fromRight:2,fromTop:1,fromTopLeft:9,fromTopRight:3,fromBottomLeft:12,fromBottomRight:6};kPe=new Set(["spin","teeter"]),IPe=new Set(["growShrink"]),NPe=new Set(["transparency","flash","boldFlash"]);BPe=[{tm:0,value:"1",valueType:"str"},{tm:5e4,value:"0.4",valueType:"str"},{tm:1e5,value:"1",valueType:"str"}];iQ=class{nextId=1;buildTimingXml(t,e){let n=t.filter(h=>h.entrance||h.exit||h.emphasis||h.motionPath).sort((h,m)=>(h.order??0)-(m.order??0));if(n.length===0)return e;if(e){let h=typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e));return EPe(h,n)}this.nextId=1;let r=n.filter(h=>h.trigger!=="onShapeClick"),o=n.filter(h=>h.trigger==="onShapeClick"&&h.triggerShapeId),i=this.buildAnimationSequence(r);if(i.length===0&&o.length===0)return e;let s=this.allocateId(),a=this.allocateId(),l=[];for(let h of i)l.push(h);let c={"p:cTn":{"@_id":String(a),"@_dur":"indefinite","@_nodeType":"mainSeq","p:childTnLst":{"p:par":l.length===1?l[0]:l}},"p:prevCondLst":{"p:cond":{"@_evt":"onPrev","@_delay":"0","p:tgtEl":{"p:sldTgt":{}}}},"p:nextCondLst":{"p:cond":{"@_evt":"onNext","@_delay":"0","p:tgtEl":{"p:sldTgt":{}}}}},u=zPe(o,this.allocateId.bind(this)),d=u.length===0?c:[c,...u],p={"p:tnLst":{"p:par":{"p:cTn":{"@_id":String(s),"@_dur":"indefinite","@_restart":"never","@_nodeType":"tmRoot","p:childTnLst":{"p:seq":d}}}}},f=HPe(n);return f&&(p["p:bldLst"]=f),p}buildAnimationSequence(t){let e=[],n=[];for(let r of t){let o=this.buildEffectNodesForAnimation(r);if(o.length===0)continue;((r.trigger??"onClick")==="onClick"||n.length===0)&&(n.length>0&&e.push(n),n=[]);for(let s of o)n.push(s);}return n.length>0&&e.push(n),e.map(r=>{let o=this.allocateId();return {"p:cTn":{"@_id":String(o),"@_fill":"hold","p:stCondLst":{"p:cond":{"@_delay":"indefinite"}},"p:childTnLst":{"p:par":r.length===1?r[0]:r}}}})}buildEffectNodesForAnimation(t){return oQ(t,this.allocateId.bind(this))}allocateId(){return this.nextId++}},sQ=class{createParser(){return new XMLParser({ignoreAttributes:false,attributeNamePrefix:"@_",parseAttributeValue:false,parseTagValue:false,processEntities:false})}createBuilder(){return new XMLBuilder({ignoreAttributes:false,attributeNamePrefix:"@_",format:false})}createDocumentPropertiesUpdater(t,e,n){return new NJ({zip:t,parser:e,builder:n})}createDependencies(t){let e=new VJ,n=new IJ;return {xmlLookupService:e,compatibilityService:n,slideLoaderService:new GJ,templateBackgroundService:new DJ,slideTransitionService:new qJ({xmlLookupService:e,getXmlLocalName:t.getXmlLocalName}),editorAnimationService:new WJ({xmlLookupService:e,editorMetaExtensionUri:t.editorMetaExtensionUri,editorMetaNamespaceUri:t.editorMetaNamespaceUri}),nativeAnimationService:new KJ,animationWriteService:new iQ,documentPropertiesUpdater:this.createDocumentPropertiesUpdater(t.zip,t.parser,t.builder)}}},aQ=class{create(t="transitional"){return t==="strict"?{slideRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/slide",slideLayoutRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/slideLayout",slideImageRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/image",slideMediaRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/media",slideVideoRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/video",slideAudioRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/audio",slideCommentRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/comments",slideNotesRelationshipType:"http://purl.oclc.org/ooxml/officeDocument/relationships/notesSlide",relationshipsNamespace:"http://schemas.openxmlformats.org/package/2006/relationships",slideContentType:"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",commentContentType:"application/vnd.openxmlformats-officedocument.presentationml.comments+xml",commentAuthorContentType:"application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml",commentAuthorsPartName:"/ppt/commentAuthors.xml",conformance:"strict"}:{slideRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",slideLayoutRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout",slideImageRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",slideMediaRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/media",slideVideoRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",slideAudioRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio",slideCommentRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",slideNotesRelationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide",relationshipsNamespace:"http://schemas.openxmlformats.org/package/2006/relationships",slideContentType:"application/vnd.openxmlformats-officedocument.presentationml.slide+xml",commentContentType:"application/vnd.openxmlformats-officedocument.presentationml.comments+xml",commentAuthorContentType:"application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml",commentAuthorsPartName:"/ppt/commentAuthors.xml",conformance:"transitional"}}},GPe=new aQ,lQ=(t="transitional")=>GPe.create(t),QO=class cQ{data;constructor(e){this.data=e;}static from(e){return new cQ(e)}Slides(e){return this.slide(e)}slide(e){if(!Number.isInteger(e))throw new Error(`Slide index must be an integer. Received: ${e}`);if(e<0||e>=this.data.slides.length)throw new Error(`Slide index ${e} is out of range (0-${Math.max(this.data.slides.length-1,0)}).`);return new uQ(this.data.slides[e],this)}slides(e){return this.slide(e)}project(){return this.data}Project(){return this.project()}},uQ=class{slideValue;rootBuilder;constructor(t,e){this.slideValue=t,this.rootBuilder=e;}get Notes(){return new BB(this.slideValue,this)}notes(){return new BB(this.slideValue,this)}elements(){return new dQ(this.slideValue,this)}project(){return this.slideValue}Project(){return this.project()}done(){return this.rootBuilder}Done(){return this.done()}},dQ=class{slideValue;slideBuilder;constructor(t,e){this.slideValue=t,this.slideBuilder=e;}add(t){return this.slideValue.elements=[...this.slideValue.elements,t],this}removeById(t){let e=String(t).trim();return e.length===0?this:(this.slideValue.elements=this.slideValue.elements.filter(n=>String(n.id).trim()!==e),this)}updateById(t,e){let n=String(t).trim();return n.length===0?this:(this.slideValue.elements=this.slideValue.elements.map(r=>String(r.id).trim()!==n?r:e(r)),this)}project(){return this.slideValue.elements}done(){return this.slideBuilder}},BB=class{slideValue;slideBuilder;constructor(t,e){this.slideValue=t,this.slideBuilder=e;}add(t){let e=String(t);if(e.length===0)return this;let n=this.slideValue.notes||"";return this.slideValue.notes=n.length>0?`${n}
262
262
  ${e}`:e,this.syncSegmentsFromNotes(),this}Add(t){return this.add(t)}set(t){let e=String(t);return this.slideValue.notes=e.length>0?e:void 0,this.syncSegmentsFromNotes(),this}Set(t){return this.set(t)}clear(){return this.slideValue.notes=void 0,this.slideValue.notesSegments=void 0,this}Clear(){return this.clear()}get(){return this.slideValue.notes}Get(){return this.get()}done(){return this.slideBuilder}Done(){return this.done()}syncSegmentsFromNotes(){let t=this.slideValue.notes||"";if(t.length===0){this.slideValue.notesSegments=void 0;return}let e=t.split(`
263
263
  `),n=[];e.forEach((r,o)=>{n.push({text:r,style:{}}),o<e.length-1&&n.push({text:`
264
- `,isParagraphBreak:true,style:{}});}),this.slideValue.notesSegments=n;}},Bq={title:"Title Slide",tx:"Title and Text",twoColTx:"Two Column Text",tbl:"Title and Table",txOverObj:"Text Over Object",obj:"Title and Content",txAndObj:"Text and Content",objAndTx:"Content and Text",objOverTx:"Object Over Text",twoObj:"Two Content",twoObjAndObj:"Two Content and Content",objAndTwoObj:"Content and Two Content",twoObjAndTx:"Two Content and Text",twoObjOverTx:"Two Content Over Text",fourObj:"Four Content",twoTxTwoObj:"Comparison",blank:"Blank",vertTx:"Vertical Text",clipArtAndTx:"Clip Art and Text",clipArtAndVertTx:"Clip Art and Vertical Text",vertTitleAndTx:"Vertical Title and Text",vertTitleAndTxOverChart:"Vertical Title and Text Over Chart",titleOnly:"Title Only",objTx:"Content with Caption",picTx:"Picture with Caption",secHead:"Section Header",objOnly:"Object Only",mediaAndTx:"Media and Text",dgm:"Diagram",chart:"Chart",cust:"Custom"};pQ="http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin",XPe="http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature",jPe="urn:pptx-viewer:ooxml-signature:v1",YPe="http://www.w3.org/2000/09/xmldsig#",KPe="http://schemas.openxmlformats.org/package/2006/RelationshipTransform",fQ="http://www.w3.org/2000/09/xmldsig#enveloped-signature",qPe=new Set(["http://www.w3.org/TR/2001/REC-xml-c14n-20010315","http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments","http://www.w3.org/2001/10/xml-exc-c14n#","http://www.w3.org/2001/10/xml-exc-c14n#WithComments",fQ]),ZPe="PPTX_VIEWER_TRUST_ROOTS_FILE",JPe="PPTX_VIEWER_TRUST_ROOTS_PEM",QPe="PPTX_VIEWER_REQUIRE_REVOCATION_CHECK",eAe="PPTX_VIEWER_FAIL_ON_REVOCATION_UNKNOWN",tAe="PPTX_VIEWER_REQUIRE_TIMESTAMP",nAe={"http://www.w3.org/2000/09/xmldsig#sha1":"sha1","http://www.w3.org/2001/04/xmlenc#sha256":"sha256","http://www.w3.org/2001/04/xmlenc#sha384":"sha384","http://www.w3.org/2001/04/xmlenc#sha512":"sha512"},hQ={"http://www.w3.org/2000/09/xmldsig#sha1":"SHA-1","http://www.w3.org/2001/04/xmlenc#sha256":"SHA-256","http://www.w3.org/2001/04/xmlenc#sha384":"SHA-384","http://www.w3.org/2001/04/xmlenc#sha512":"SHA-512"},mQ="_xmlsignatures/";yQ=500*1024*1024,ZP=65536,OB=class extends Error{code="ZIP_BOMB";uncompressedBytes;limit;entryCount;constructor(t,e){super(t),this.name="ZipBombError",this.uncompressedBytes=e.uncompressedBytes,this.limit=e.limit,this.entryCount=e.entryCount;}},aAe=34,lAe=20556,cAe=4,uAe=268435456;Oq=32,UB=16,fAe=/\{?([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}?/i;hAe={linear:"linear",exp:"exponential",log:"logarithmic",poly:"polynomial",power:"power",movingAvg:"movingAvg"},mAe={both:"both",minus:"minus",plus:"plus"},gAe={cust:"cust",fixedVal:"fixedVal",percentage:"percentage",stdDev:"stdDev",stdErr:"stdErr"};xAe={circle:"circle",dash:"dash",diamond:"diamond",dot:"dot",none:"none",picture:"picture",plus:"plus",square:"square",star:"star",triangle:"triangle",x:"x",auto:"auto"};yAe={catAx:"catAx",valAx:"valAx",dateAx:"dateAx",serAx:"serAx"};SAe=new Set(["hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions"]);NAe=2e3,DAe={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",lime:"#00ff00",aqua:"#00ffff",teal:"#008080",navy:"#000080",fuchsia:"#ff00ff",purple:"#800080",orange:"#ffa500",window:"#ffffff",windowtext:"#000000",buttonface:"#f0f0f0",infobk:"#ffffe1"};LAe=9525,FAe=.75;GAe={1:"rect",2:"parallelogram",3:"trapezoid",4:"diamond",5:"pentagon",6:"hexagon",7:"heptagon",8:"octagon",9:"decagon",10:"dodecagon",13:"cube",16:"can",20:"straightConnector1",21:"bentConnector3",22:"curvedConnector3",23:"line",24:"line",32:"rect",33:"rect",34:"rect",75:"rect",109:"cloudCallout",110:"borderCallout1",172:"ellipse",173:"rect",183:"sun",184:"moon",185:"bracketPair",186:"bracePair",187:"star4",188:"star5",189:"star8",202:"rect"};zg=new Set(["v:shape","v:rect","v:oval","v:line","v:roundrect","v:polyline","v:arc","v:group","v:image"]);o4=new Set(["p14","p15","p16","p16r3","p228","p232","a14","a15","a16","asvg","aclsl","asl","w14","w15","c16","c16r3","cx","x14"]);gA=new Set(["p:sp","p:pic","p:graphicFrame","p:grpSp","p:cxnSp","p:contentPart","p16:model3D",...zg]);nd=["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],rd={bg1:"lt1",tx1:"dk1",bg2:"lt2",tx2:"dk2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink"};wRe={nextslide:"nextSlide",previousslide:"prevSlide",firstslide:"firstSlide",lastslide:"lastSlide",endshow:"endShow"};TRe={"video/mp4":"mp4","video/webm":"webm","video/ogg":"ogv","video/quicktime":"mov","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","audio/mpeg":"mp3","audio/mp3":"mp3","audio/mp4":"m4a","audio/x-m4a":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/flac":"flac","image/jpeg":"jpg","image/png":"png","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","application/octet-stream":"bin"},_Re=new Set(["pptx-resource:","blob:","data:"]);bA=["#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#70AD47"];jQ=0;YQ=256;tee=0;xke=new Uint8Array([208,207,17,224,161,27,26,225]),Wq=new Uint8Array([80,75]);FA=class extends Error{isEncrypted=true;constructor(t){super(t),this.name="EncryptedFileError";}},KB=new Uint8Array([208,207,17,224,161,27,26,225]),Ch=4294967294,yke=4294967295,bke=4294967293,Pg=4294967290,vke=0,qB=2,eA=5,zw=128,Ng=class extends Error{constructor(t){super(t),this.name="Ole2ParseError";}};ZB=class extends Error{constructor(t="The password is incorrect."){super(t),this.name="IncorrectPasswordError";}},iee=class extends Error{constructor(t="Data integrity check failed. The encrypted file may be corrupted or tampered with."){super(t),this.name="DataIntegrityError";}};Es={verifierHashInput:new Uint8Array([254,167,210,118,59,75,158,121]),verifierHashValue:new Uint8Array([215,170,15,109,48,97,52,78]),encryptedKeyValue:new Uint8Array([20,110,11,231,171,172,208,214]),dataIntegrityHmacKey:new Uint8Array([95,178,173,1,12,185,225,246]),dataIntegrityHmacValue:new Uint8Array([160,103,127,2,178,44,132,51])};Zq=new Set(["scatter","bubble"]),Zke=new Set(["bar","line","area","bar3D","line3D","area3D"]);UA=["list","process","hierarchy","cycle","matrix","pyramid","funnel","target","gear","venn","timeline","relationship","chevron","bending"];NP=12700;xee=[["http://purl.oclc.org/ooxml/presentationml/main","http://schemas.openxmlformats.org/presentationml/2006/main"],["http://purl.oclc.org/ooxml/drawingml/main","http://schemas.openxmlformats.org/drawingml/2006/main"],["http://purl.oclc.org/ooxml/drawingml/chart","http://schemas.openxmlformats.org/drawingml/2006/chart"],["http://purl.oclc.org/ooxml/drawingml/chartDrawing","http://schemas.openxmlformats.org/drawingml/2006/chartDrawing"],["http://purl.oclc.org/ooxml/drawingml/diagram","http://schemas.openxmlformats.org/drawingml/2006/diagram"],["http://purl.oclc.org/ooxml/drawingml/lockedCanvas","http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"],["http://purl.oclc.org/ooxml/drawingml/picture","http://schemas.openxmlformats.org/drawingml/2006/picture"],["http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing","http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"],["http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"],["http://purl.oclc.org/ooxml/officeDocument/relationships","http://schemas.openxmlformats.org/officeDocument/2006/relationships"],["http://purl.oclc.org/ooxml/officeDocument/relationships/chart","http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"],["http://purl.oclc.org/ooxml/officeDocument/relationships/comments","http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"],["http://purl.oclc.org/ooxml/officeDocument/relationships/customXml","http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramColors","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramData","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramLayout","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramStyle","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramStyle"],["http://purl.oclc.org/ooxml/officeDocument/relationships/extended-properties","http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"],["http://purl.oclc.org/ooxml/officeDocument/relationships/font","http://schemas.openxmlformats.org/officeDocument/2006/relationships/font"],["http://purl.oclc.org/ooxml/officeDocument/relationships/handoutMaster","http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster"],["http://purl.oclc.org/ooxml/officeDocument/relationships/hyperlink","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"],["http://purl.oclc.org/ooxml/officeDocument/relationships/image","http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"],["http://purl.oclc.org/ooxml/officeDocument/relationships/media","http://schemas.openxmlformats.org/officeDocument/2006/relationships/media"],["http://purl.oclc.org/ooxml/officeDocument/relationships/notesMaster","http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster"],["http://purl.oclc.org/ooxml/officeDocument/relationships/notesSlide","http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"],["http://purl.oclc.org/ooxml/officeDocument/relationships/oleObject","http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"],["http://purl.oclc.org/ooxml/officeDocument/relationships/presProps","http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps"],["http://purl.oclc.org/ooxml/officeDocument/relationships/slide","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"],["http://purl.oclc.org/ooxml/officeDocument/relationships/slideLayout","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"],["http://purl.oclc.org/ooxml/officeDocument/relationships/slideMaster","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"],["http://purl.oclc.org/ooxml/officeDocument/relationships/tags","http://schemas.openxmlformats.org/officeDocument/2006/relationships/tags"],["http://purl.oclc.org/ooxml/officeDocument/relationships/theme","http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"],["http://purl.oclc.org/ooxml/officeDocument/relationships/themeOverride","http://schemas.openxmlformats.org/officeDocument/2006/relationships/themeOverride"],["http://purl.oclc.org/ooxml/officeDocument/relationships/video","http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"],["http://purl.oclc.org/ooxml/officeDocument/relationships/audio","http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"],["http://purl.oclc.org/ooxml/officeDocument/relationships/viewProps","http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps"],["http://purl.oclc.org/ooxml/officeDocument/relationships/tableStyles","http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"],["http://purl.oclc.org/ooxml/officeDocument/math","http://schemas.openxmlformats.org/officeDocument/2006/math"],["http://purl.oclc.org/ooxml/officeDocument/bibliography","http://schemas.openxmlformats.org/officeDocument/2006/bibliography"],["http://purl.oclc.org/ooxml/officeDocument/custom-properties","http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"],["http://purl.oclc.org/ooxml/officeDocument/extended-properties","http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"],["http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes","http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"],["http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument","http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"],["http://purl.oclc.org/ooxml/package/relationships","http://schemas.openxmlformats.org/package/2006/relationships"],["http://purl.oclc.org/ooxml/package/relationships/metadata/core-properties","http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"],["http://purl.oclc.org/ooxml/package/relationships/digital-signature/origin","http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"],["http://purl.oclc.org/ooxml/package/relationships/digital-signature/signature","http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature"],["http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.openxmlformats.org/spreadsheetml/2006/main"],["http://purl.oclc.org/ooxml/wordprocessingml/main","http://schemas.openxmlformats.org/wordprocessingml/2006/main"],["http://purl.oclc.org/ooxml/markup-compatibility/2006","http://schemas.openxmlformats.org/markup-compatibility/2006"]],tIe=new Map(xee),yee=new Map(xee.map(([t,e])=>[e,t])),JB="http://purl.oclc.org/ooxml/",QB="http://schemas.openxmlformats.org/",bee=new Set(["presentationml","drawingml","spreadsheetml","wordprocessingml","officeDocument"]);Jq=12,iIe=1.3,sIe=.6,DP=7;Qq=2;HA={Calibri:["Carlito","Liberation Sans","Arial","sans-serif"],"Calibri Light":["Carlito","Liberation Sans","Arial","sans-serif"],Cambria:["Caladea","Liberation Serif","Times New Roman","serif"],"Cambria Math":["STIX Two Math","Latin Modern Math","Times New Roman","serif"],Consolas:["Liberation Mono","Courier New","monospace"],"Segoe UI":["Liberation Sans","Helvetica Neue","Arial","sans-serif"],"Segoe UI Light":["Liberation Sans","Helvetica Neue","Arial","sans-serif"],"Segoe UI Semibold":["Liberation Sans","Helvetica Neue","Arial","sans-serif"],"Times New Roman":["Liberation Serif","Times","serif"],Arial:["Liberation Sans","Helvetica","sans-serif"],"Arial Black":["Liberation Sans","Helvetica","sans-serif"],"Arial Narrow":["Liberation Sans Narrow","Helvetica Neue","sans-serif"],"Courier New":["Liberation Mono","Courier","monospace"],Verdana:["DejaVu Sans","Bitstream Vera Sans","sans-serif"],Georgia:["Liberation Serif","Times New Roman","serif"],Tahoma:["DejaVu Sans","Liberation Sans","sans-serif"],Trebuchet:["Liberation Sans","sans-serif"],"Trebuchet MS":["Liberation Sans","sans-serif"],"Comic Sans MS":["Comic Neue","cursive"],Impact:["Charcoal","sans-serif"],"Lucida Console":["Liberation Mono","monospace"],"Lucida Sans Unicode":["Lucida Grande","Liberation Sans","sans-serif"],Palatino:["Palatino Linotype","Book Antiqua","serif"],"Palatino Linotype":["Palatino","Book Antiqua","serif"],"Book Antiqua":["Palatino Linotype","Palatino","serif"],"MS PGothic":["Noto Sans CJK JP","Hiragino Sans","Yu Gothic","sans-serif"],"MS PMincho":["Noto Serif CJK JP","Hiragino Mincho ProN","Yu Mincho","serif"],"MS Gothic":["Noto Sans CJK JP","Hiragino Sans","Yu Gothic","sans-serif"],"MS Mincho":["Noto Serif CJK JP","Hiragino Mincho ProN","Yu Mincho","serif"],SimSun:["Noto Serif CJK SC","STSong","serif"],SimHei:["Noto Sans CJK SC","STHeiti","sans-serif"],"Microsoft YaHei":["Noto Sans CJK SC","PingFang SC","sans-serif"],NSimSun:["Noto Serif CJK SC","STSong","serif"],FangSong:["Noto Serif CJK SC","STFangsong","serif"],KaiTi:["Noto Serif CJK SC","STKaiti","serif"],Batang:["Noto Serif CJK KR","AppleMyungjo","serif"],Dotum:["Noto Sans CJK KR","AppleGothic","sans-serif"],Gulim:["Noto Sans CJK KR","AppleGothic","sans-serif"],Malgun:["Noto Sans CJK KR","Apple SD Gothic Neo","sans-serif"],"Malgun Gothic":["Noto Sans CJK KR","Apple SD Gothic Neo","sans-serif"],"Arabic Typesetting":["Noto Naskh Arabic","serif"],"Simplified Arabic":["Noto Sans Arabic","sans-serif"],"Traditional Arabic":["Noto Naskh Arabic","serif"],Mangal:["Noto Sans Devanagari","sans-serif"],Vrinda:["Noto Sans Bengali","sans-serif"],Raavi:["Noto Sans Gurmukhi","sans-serif"],Shruti:["Noto Sans Gujarati","sans-serif"],Tunga:["Noto Sans Kannada","sans-serif"],Kartika:["Noto Sans Malayalam","sans-serif"],Iskoola:["Noto Sans Sinhala","sans-serif"],"Iskoola Pota":["Noto Sans Sinhala","sans-serif"],Leelawadee:["Noto Sans Thai","sans-serif"],"Leelawadee UI":["Noto Sans Thai","sans-serif"],"Cordia New":["Noto Sans Thai","sans-serif"],DokChampa:["Noto Sans Lao","sans-serif"],Nyala:["Noto Sans Ethiopic","sans-serif"],MoolBoran:["Noto Sans Khmer","sans-serif"],"Century Gothic":["URW Gothic","Futura","sans-serif"],"Franklin Gothic":["Liberation Sans","Helvetica Neue","sans-serif"],"Franklin Gothic Medium":["Liberation Sans","Helvetica Neue","sans-serif"],Garamond:["EB Garamond","Cormorant Garamond","serif"],"Tw Cen MT":["Century Gothic","Futura","sans-serif"],Rockwell:["Roboto Slab","Rockwell","serif"],Candara:["Liberation Sans","Optima","sans-serif"],Constantia:["Liberation Serif","Palatino","serif"],Corbel:["Liberation Sans","Lucida Grande","sans-serif"]},Pee={0:"sans-serif",1:"sans-serif",2:"serif",3:"cursive",4:"fantasy",5:"sans-serif"},Aee=new Set([11,12,13]),Ree=9,kee={1:100,2:100,3:200,4:300,5:400,6:500,7:600,8:700,9:800,10:900,11:900},Iee={serif:["Times New Roman","Georgia","serif"],"sans-serif":["Arial","Helvetica","sans-serif"],monospace:["Courier New","Consolas","monospace"],cursive:["Comic Sans MS","cursive"],fantasy:["Impact","fantasy"]};gIe=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);yIe=["[Content_Types].xml","_rels/.rels","ppt/presentation.xml"],LP={rels:"application/vnd.openxmlformats-package.relationships+xml",xml:"application/xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",emf:"image/x-emf",wmf:"image/x-wmf",svg:"image/svg+xml",mp4:"video/mp4",mp3:"audio/mpeg",wav:"audio/wav",bin:"application/vnd.ms-office.vbaProject"},tZ={"/ppt/presentation.xml":"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml","/ppt/presProps.xml":"application/vnd.openxmlformats-officedocument.presentationml.presProps+xml","/ppt/viewProps.xml":"application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml","/ppt/tableStyles.xml":"application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml","/docProps/core.xml":"application/vnd.openxmlformats-package.core-properties+xml","/docProps/app.xml":"application/vnd.ms-officedocument.extended-properties+xml"},bIe="application/vnd.openxmlformats-officedocument.presentationml.slide+xml",vIe="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml",SIe="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml",wIe="application/vnd.openxmlformats-officedocument.theme+xml";HIe=new Set(["image","picture"]),zIe=new Set(["image","picture","chart","smartArt","media"]);eb=["fromBottom","fromLeft","fromRight","fromTop"],BP=["toBottom","toLeft","toRight","toTop"],eNe=["fromBottom","fromLeft","fromRight","fromTop","fromBottomLeft","fromBottomRight","fromTopLeft","fromTopRight"],tNe=["toBottom","toLeft","toRight","toTop","toBottomLeft","toBottomRight","toTopLeft","toTopRight"],Tp=["horizontal","vertical"],$ee=["horizontalIn","horizontalOut","verticalIn","verticalOut"],bh=["in","out"],nNe=["inFromScreenCenter","inSlightly","objectCenter"],rNe=["outFromScreenCenter","outSlightly","objectCenter"],Gw=["clockwise","counterClockwise"],Hee=["1spoke","2spoke","3spoke","4spoke","8spoke"],zee=["across","down"],VA=[{presetId:"entr.1",label:"Appear",category:"entrance",defaultDurationMs:0,hasDirection:false,hasTextBuild:true},{presetId:"entr.2",label:"Fly In",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:eNe,hasTextBuild:true},{presetId:"entr.3",label:"Blinds",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.4",label:"Box",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.5",label:"Checkerboard",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:zee,hasTextBuild:true},{presetId:"entr.6",label:"Circle",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.7",label:"Crawl In",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.8",label:"Diamond",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.9",label:"Dissolve In",category:"entrance",defaultDurationMs:700,hasDirection:false,hasTextBuild:true},{presetId:"entr.10",label:"Fade",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.11",label:"Flash Bulb",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"entr.12",label:"Flash Once",category:"entrance",defaultDurationMs:300,hasDirection:false,hasTextBuild:false},{presetId:"entr.13",label:"Plus",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.14",label:"Random Bars",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.15",label:"Spiral In",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.16",label:"Peek In",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.17",label:"Split",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:$ee,hasTextBuild:true},{presetId:"entr.18",label:"Stretch",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:["fromBottom","fromLeft","fromRight","fromTop","across"],hasTextBuild:true},{presetId:"entr.19",label:"Strips",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:["leftDown","leftUp","rightDown","rightUp"],hasTextBuild:true},{presetId:"entr.20",label:"Wedge",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.21",label:"Wheel",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:Hee,hasTextBuild:true},{presetId:"entr.22",label:"Wipe",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.23",label:"Zoom",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:nNe,hasTextBuild:true},{presetId:"entr.24",label:"Random Effects",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"entr.25",label:"Boomerang",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.26",label:"Rise Up",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.27",label:"Credits",category:"entrance",defaultDurationMs:8e3,hasDirection:false,hasTextBuild:false},{presetId:"entr.28",label:"Float Up",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.29",label:"Pinwheel",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.30",label:"Spinner",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:Gw,hasTextBuild:true},{presetId:"entr.31",label:"Expand",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.32",label:"Whip",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.33",label:"Arrive",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.34",label:"Basic Swivel",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.35",label:"Beveled Arrival",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.36",label:"Curve Up",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.37",label:"Bounce",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.38",label:"Fold",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.39",label:"Faded Swivel",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.40",label:"Faded Zoom",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.41",label:"Light Speed",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.42",label:"Float In",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.43",label:"Flip",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.44",label:"Glide",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.45",label:"Grow & Rotate",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.46",label:"Grow with Color",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.47",label:"Swivel",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.48",label:"Magnify",category:"entrance",defaultDurationMs:1500,hasDirection:false,hasTextBuild:true},{presetId:"entr.49",label:"Pinwheel IV",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.50",label:"Sling",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.51",label:"Compress",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.52",label:"Unfold",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.53",label:"Grow & Turn",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.54",label:"Zoom Rotate",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.55",label:"Curvy Star",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.56",label:"Rotate",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.57",label:"Center Revolve",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.58",label:"Thread",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.59",label:"Drop In",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.60",label:"Ascend",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.61",label:"Descend",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.62",label:"Center Stage",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.63",label:"Ease In",category:"entrance",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"entr.64",label:"Stretchy",category:"entrance",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"entr.65",label:"Zip",category:"entrance",defaultDurationMs:600,hasDirection:false,hasTextBuild:true},{presetId:"entr.66",label:"Bars",category:"entrance",defaultDurationMs:600,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.67",label:"Cover",category:"entrance",defaultDurationMs:700,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.68",label:"Reveal",category:"entrance",defaultDurationMs:700,hasDirection:true,directions:eb,hasTextBuild:true}],WA=[{presetId:"exit.1",label:"Disappear",category:"exit",defaultDurationMs:0,hasDirection:false,hasTextBuild:true},{presetId:"exit.2",label:"Fly Out",category:"exit",defaultDurationMs:500,hasDirection:true,directions:tNe,hasTextBuild:true},{presetId:"exit.3",label:"Blinds",category:"exit",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.4",label:"Box",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.5",label:"Checkerboard",category:"exit",defaultDurationMs:500,hasDirection:true,directions:zee,hasTextBuild:true},{presetId:"exit.6",label:"Circle",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.7",label:"Crawl Out",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:BP,hasTextBuild:true},{presetId:"exit.8",label:"Diamond",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.9",label:"Dissolve Out",category:"exit",defaultDurationMs:700,hasDirection:false,hasTextBuild:true},{presetId:"exit.10",label:"Fade",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.11",label:"Flash Bulb",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"exit.12",label:"Flash Once",category:"exit",defaultDurationMs:300,hasDirection:false,hasTextBuild:false},{presetId:"exit.13",label:"Plus",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.14",label:"Random Bars",category:"exit",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.15",label:"Spiral Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.16",label:"Peek Out",category:"exit",defaultDurationMs:500,hasDirection:true,directions:BP,hasTextBuild:true},{presetId:"exit.17",label:"Split",category:"exit",defaultDurationMs:500,hasDirection:true,directions:$ee,hasTextBuild:true},{presetId:"exit.18",label:"Collapse",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.19",label:"Strips",category:"exit",defaultDurationMs:500,hasDirection:true,directions:["leftDown","leftUp","rightDown","rightUp"],hasTextBuild:true},{presetId:"exit.20",label:"Wedge",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.21",label:"Wheel",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:Hee,hasTextBuild:true},{presetId:"exit.22",label:"Wipe",category:"exit",defaultDurationMs:500,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"exit.23",label:"Zoom",category:"exit",defaultDurationMs:500,hasDirection:true,directions:rNe,hasTextBuild:true},{presetId:"exit.24",label:"Random Effects",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"exit.25",label:"Boomerang",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.26",label:"Sink Down",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.27",label:"Credits",category:"exit",defaultDurationMs:8e3,hasDirection:false,hasTextBuild:false},{presetId:"exit.28",label:"Float Down",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.29",label:"Pinwheel",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.30",label:"Spinner",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:Gw,hasTextBuild:true},{presetId:"exit.31",label:"Contract",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.32",label:"Whip",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.33",label:"Leave",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.34",label:"Basic Swivel",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.35",label:"Beveled Departure",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.36",label:"Curve Down",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.37",label:"Bounce",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.38",label:"Unfold",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.39",label:"Faded Swivel",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.40",label:"Faded Zoom",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.41",label:"Light Speed",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.42",label:"Float Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.43",label:"Flip",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.44",label:"Glide",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.45",label:"Shrink & Rotate",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.46",label:"Shrink with Color",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.47",label:"Swivel",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.48",label:"Shrink & Turn",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.49",label:"Pinwheel IV",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.50",label:"Sling",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.51",label:"Stretch Out",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.52",label:"Fold Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.53",label:"Shrink & Spin",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.54",label:"Zoom Rotate",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.55",label:"Curvy Star",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.56",label:"Rotate",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.57",label:"Center Revolve",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.58",label:"Thread Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.59",label:"Drop Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.60",label:"Ascend",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.61",label:"Descend",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.62",label:"Exit Stage",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.63",label:"Ease Out",category:"exit",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"exit.64",label:"Stretchy",category:"exit",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"exit.65",label:"Zip Out",category:"exit",defaultDurationMs:600,hasDirection:false,hasTextBuild:true},{presetId:"exit.66",label:"Bars Out",category:"exit",defaultDurationMs:600,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.67",label:"Uncover",category:"exit",defaultDurationMs:700,hasDirection:true,directions:BP,hasTextBuild:true},{presetId:"exit.68",label:"Conceal",category:"exit",defaultDurationMs:700,hasDirection:true,directions:BP,hasTextBuild:true}],XA=[{presetId:"emph.1",label:"Bold Flash",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.2",label:"Color Wave",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.3",label:"Brush on Color",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.4",label:"Brush on Underline",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.5",label:"Change Font",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.6",label:"Grow/Shrink",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.7",label:"Change Font Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.8",label:"Spin",category:"emphasis",defaultDurationMs:1e3,hasDirection:true,directions:Gw,hasTextBuild:false},{presetId:"emph.9",label:"Transparency",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.10",label:"Change Font Size",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.11",label:"Change Font Style",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.12",label:"Grow with Color",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.13",label:"Desaturate",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.14",label:"Teeter",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.15",label:"Vertical Highlight",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.16",label:"Wave",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.17",label:"Blast",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.18",label:"Bold Reveal",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.19",label:"Wash Out",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.20",label:"Shimmer",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.21",label:"Flicker",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.22",label:"Grow with Color (Sustain)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.23",label:"Lighten",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.24",label:"Darken",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.25",label:"Style Emphasis",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.26",label:"Pulse",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.27",label:"Color Pulse",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.28",label:"Color Blend",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.29",label:"Complementary Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.30",label:"Complementary Color 2",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.31",label:"Contrasting Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.32",label:"Pulse Once",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.33",label:"Underline",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.34",label:"Bold Flash (Variant)",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.35",label:"Teeter (Variant)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.36",label:"Wave (Variant)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.37",label:"Object Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.38",label:"Fill Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.39",label:"Line Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.40",label:"Brush on Color (Sustain)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.41",label:"Color Wave (Sustain)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.42",label:"Flash",category:"emphasis",defaultDurationMs:300,hasDirection:false,hasTextBuild:false},{presetId:"emph.43",label:"Flicker Slow",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.44",label:"Grow Big",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.45",label:"Shrink Small",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.46",label:"Color Lighten",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.47",label:"Color Darken",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.48",label:"Bold Italics",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.49",label:"Spin Slow",category:"emphasis",defaultDurationMs:2e3,hasDirection:true,directions:Gw,hasTextBuild:false},{presetId:"emph.50",label:"Spin Fast",category:"emphasis",defaultDurationMs:500,hasDirection:true,directions:Gw,hasTextBuild:false},{presetId:"emph.51",label:"Wobble",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.52",label:"Jiggle",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.53",label:"Bounce In Place",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.54",label:"Heartbeat",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.55",label:"Glow",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.56",label:"Brighten",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.57",label:"Dim",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.58",label:"Saturate",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.59",label:"Color Cycle",category:"emphasis",defaultDurationMs:1500,hasDirection:false,hasTextBuild:false},{presetId:"emph.60",label:"Rainbow",category:"emphasis",defaultDurationMs:1500,hasDirection:false,hasTextBuild:false},{presetId:"emph.61",label:"Shake",category:"emphasis",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:false},{presetId:"emph.62",label:"Vibrate",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.63",label:"Sway",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.64",label:"Bob",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false}],U4=[{presetId:"path.line.up",label:"Lines: Up",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.down",label:"Lines: Down",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.left",label:"Lines: Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.right",label:"Lines: Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.upLeft",label:"Lines: Up-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.upRight",label:"Lines: Up-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.downLeft",label:"Lines: Down-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.downRight",label:"Lines: Down-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.up",label:"Arcs: Up",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.down",label:"Arcs: Down",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.left",label:"Arcs: Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.right",label:"Arcs: Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.upLeft",label:"Turns: Up-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.upRight",label:"Turns: Up-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.downLeft",label:"Turns: Down-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.downRight",label:"Turns: Down-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.uTurn",label:"Turns: U-Turn",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.circle",label:"Shapes: Circle",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.diamond",label:"Shapes: Diamond",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.hexagon",label:"Shapes: Hexagon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.octagon",label:"Shapes: Octagon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.parallelogram",label:"Shapes: Parallelogram",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.pentagon",label:"Shapes: Pentagon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.rightTriangle",label:"Shapes: Right Triangle",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.equilateralTriangle",label:"Shapes: Equilateral Triangle",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.trapezoid",label:"Shapes: Trapezoid",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.square",label:"Shapes: Square",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star4",label:"Shapes: 4 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star5",label:"Shapes: 5 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star6",label:"Shapes: 6 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star8",label:"Shapes: 8 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.crescent",label:"Shapes: Crescent Moon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.heart",label:"Shapes: Heart",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.football",label:"Shapes: Football",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.teardrop",label:"Shapes: Teardrop",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.deCay",label:"Loops: Decaying Wave",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8",label:"Loops: Figure 8",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8Four",label:"Loops: Figure 8 Four",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.horizFigure8",label:"Loops: Horizontal Figure 8",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.vertFigure8",label:"Loops: Vertical Figure 8",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.loopDeLoop",label:"Loops: Loop de Loop",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.neutron",label:"Loops: Neutron",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.peanut",label:"Loops: Peanut",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.pretzel",label:"Loops: Pretzel",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.spring",label:"Loops: Spring",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.swoosh",label:"Loops: Swoosh",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.zigzag",label:"Loops: Zigzag",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.heartBeat",label:"Loops: Heartbeat",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.curvyLeft",label:"Loops: Curvy Left",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.curvyRight",label:"Loops: Curvy Right",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.curvyStar",label:"Loops: Curvy Star",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8Side",label:"Loops: Figure 8 Side",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.spiral",label:"Loops: Spiral",category:"motionPath",defaultDurationMs:3e3,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.wave",label:"Loops: Wave",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.bean",label:"Loops: Bean",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.buzzSaw",label:"Loops: Buzz Saw",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.cogwheel",label:"Loops: Cogwheel",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.cornerStar",label:"Loops: Corner Star",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.crossPath",label:"Loops: Cross",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.diamond4",label:"Loops: Diamond 4",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.fanIn",label:"Loops: Fan In",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8Top",label:"Loops: Figure 8 Top",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.heartBig",label:"Loops: Big Heart",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.inverted",label:"Loops: Inverted",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.plus",label:"Loops: Plus",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.custom",label:"Custom Path",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false}],Gee=[...VA,...WA,...XA,...U4];lNe="http://schemas.openxmlformats.org/drawingml/2006/chart",cNe="http://schemas.openxmlformats.org/drawingml/2006/main",uNe="http://schemas.openxmlformats.org/officeDocument/2006/relationships",Og=111111111,Ug=222222222,dNe=new Set(["scatter","bubble"]);Wee=new Set(["minorGridlines","title","numFmt","majorTickMark","minorTickMark","tickLblPos","spPr","txPr","crossAx","crosses","crossesAt","crossBetween","majorUnit","minorUnit","dispUnits","extLst"]),wNe=new Set([...Wee].filter(t=>t!=="minorGridlines"));ENe=new Set(["numFmt","majorTickMark","minorTickMark","tickLblPos","spPr","txPr","crossAx","crosses","crossesAt","auto","lblAlgn","lblOffset","tickLblSkip","tickMarkSkip","noMultiLvlLbl","dispUnits","majorUnit","minorUnit","baseTimeUnit","majorTimeUnit","minorTimeUnit"]);aZ={bar:"barChart",line:"lineChart",area:"areaChart",pie:"pieChart",doughnut:"doughnutChart",scatter:"scatterChart",bubble:"bubbleChart",radar:"radarChart"};UNe=new Set(["dLbls","trendline","errBars","cat","val","xVal","yVal","bubbleSize","bubble3D","smooth","extLst"]);GNe=new Set(["idx","invertIfNegative","spPr","explosion"]);qNe=new Set(["dPt","dLbls","trendline","errBars","cat","val","xVal","yVal","bubbleSize","bubble3D","smooth","extLst"]);tDe={linear:"linear",exponential:"exp",logarithmic:"log",polynomial:"poly",power:"power",movingAvg:"movingAvg"};Fw=9525;pDe=class{zip;parser;builder;presentationData=null;slideMap=new Map;slideRelsMap=new Map;externalRelsMap=new Map;layoutCache=new Map;masterCache=new Map;layoutXmlMap=new Map;masterXmlMap=new Map;layoutPlaceholderDefaultsCache=new Map;masterPlaceholderDefaultsCache=new Map;presentationDefaultTextStyle;imageDataCache=new Map;blobUrlCache=new Set;eagerDecodeImages=false;allowExternalImages=false;orderedSlidePaths=[];themeColorMap={};themeFontMap={};themeFormatScheme;themeOverrideCache=new Map;currentSlideClrMapOverride=null;masterClrMaps=new Map;masterThemeColorMaps=new Map;masterThemeFontMaps=new Map;masterThemeFormatSchemes=new Map;masterThemePaths=new Map;masterThemeMajorFontScripts=new Map;masterThemeMinorFontScripts=new Map;masterThemeNames=new Map;masterThemeFontSchemeNames=new Map;masterThemeColorSchemeNames=new Map;originalThemeXmlByPath=new Map;dirtyThemePaths=new Set;masterTxStylesCache=new Map;masterThemeObjectDefaults=new Map;masterThemeExtraClrSchemeLst=new Map;masterThemeCustClrLst=new Map;masterThemeExtLst=new Map;currentMasterClrMap=null;globalThemeColorMapSnapshot={};globalThemeFontMapSnapshot={};globalThemeFormatSchemeSnapshot;thumbnailData=null;vbaProjectBin=null;vbaRelatedParts=new Map;signatureDetection=null;customXmlParts=[];alternateContentBlockByRawXml=new WeakMap;loadedEmbeddedFonts=[];commentAuthorMap=new Map;commentAuthorDetails=new Map;layoutOptions=[];compatibilityService;slideLoaderService;slideTransitionService;editorAnimationService;nativeAnimationService;animationWriteService;templateBackgroundService;xmlLookupService;dependencyFactory;rawSlideWidthEmu=0;rawSlideHeightEmu=0;rawSlideSizeType;elementXmlBuilder;contentTypesBuilder;elementTransformUpdater;presentationSaveBuilder;presentationSlidesReconciler;slideBackgroundBuilder;slideCommentPartWriter;slideMediaRelationshipBuilder;slideNotesPartUpdater;slideCommentsXmlFactory;commentAuthorsXmlFactory;colorStyleCodec;connectorParser;shapeStyleExtractor;tableDataParser;mediaDataParser;graphicFrameParser;documentPropertiesUpdater;static EMU_PER_PX=9525;static EDITOR_META_EXTENSION_URI="{A6F62C1B-B45C-4E8A-8B0A-1B3E5F8C8D4A}";static EDITOR_META_NAMESPACE_URI="http://schemas.pptx.ai/pptx/editor-meta";isStrictOoxml=false;_originalParser=null;detectAndSetStrictConformance(t){if(wee(t)&&(this.isStrictOoxml=true,Kw(t),!this._originalParser)){this._originalParser=this.parser;let e=this.parser;this.parser=new Proxy(e,{get(n,r,o){return r==="parse"?function(i,s){let a=n.parse(i,s??false);return typeof a=="object"&&a!==null&&Kw(a),a}:Reflect.get(n,r,o)}});}}restoreOriginalParser(){this._originalParser&&(this.parser=this._originalParser,this._originalParser=null);}},fDe=class extends pDe{async exportSlides(t,e){this.compatibilityService.reportWarning({code:"EXPORT_BACKEND_UNAVAILABLE",message:`Export to "${e.format}" requires a platform-specific rendering backend. No export backend is configured in this runtime.`,severity:"warning",scope:"presentation"});let n=e.slideIndices&&e.slideIndices.length>0?e.slideIndices:t.map((o,i)=>i),r=new Map;for(let o of n)!Number.isInteger(o)||o<0||o>=t.length||r.set(o,new Uint8Array);return r}normalizeTableStyleGuid(t){let e=t.trim().toUpperCase();return e.startsWith("{")?e:`{${e}}`}deriveTableStyleAccentKey(...t){for(let e of t)if(e?.schemeColor?.startsWith("accent"))return e.schemeColor}extractTableBackground(t){if(!t)return;let r=(t["a:fill"]?.["a:solidFill"]??t["a:solidFill"])?.["a:schemeClr"],o=r&&String(r["@_val"]||"").trim()||void 0,i=o?{schemeColor:o}:void 0,s=!!t["a:effectLst"];if(!(!i&&!s))return {...i?{fill:i}:{},...s?{hasEffectLst:s}:{}}}extractTableStyleSectionFill(t){if(!t)return;let e=t["a:tcStyle"];if(!e)return;let n=e["a:fill"];if(!n)return;let r=n["a:solidFill"];if(!r)return;let o=r["a:schemeClr"];if(!o)return;let i=String(o["@_val"]||"").trim()||void 0;if(!i)return;let s=o["a:tint"],a=s&&parseInt(String(s["@_val"]||"0"),10)||void 0,l=o["a:shade"],c=l&&parseInt(String(l["@_val"]||"0"),10)||void 0;return {schemeColor:i,tint:a,shade:c}}extractTableStyleSectionText(t){if(!t)return;let e=t["a:tcTxStyle"];if(!e)return;let n={},r=false;e["@_b"]==="on"&&(n.bold=true,r=true),e["@_i"]==="on"&&(n.italic=true,r=true);let i=e["a:fontRef"]?.["a:schemeClr"]??e["a:schemeClr"];if(i){let s=String(i["@_val"]||"").trim();if(s){n.fontSchemeColor=s,r=true;let a=i["a:tint"];a&&(n.fontTint=parseInt(String(a["@_val"]||"0"),10)||void 0);let l=i["a:shade"];l&&(n.fontShade=parseInt(String(l["@_val"]||"0"),10)||void 0);}}return r?n:void 0}ensureArray(t){return t?Array.isArray(t)?t:[t]:[]}async parseTableStyles(){let t=await this.zip.file("ppt/tableStyles.xml")?.async("string");if(t)try{let n=this.parser.parse(t)["a:tblStyleLst"];if(!n)return;let r=this.ensureArray(n["a:tblStyle"]);if(r.length===0)return;let o={};for(let i of r){let s=String(i["@_styleId"]||"").trim();if(!s)continue;let a=this.normalizeTableStyleGuid(s),l=String(i["@_styleName"]||"").trim()||void 0,c=this.extractTableStyleSectionFill(i["a:wholeTbl"]),u=this.extractTableStyleSectionFill(i["a:band1H"]),d=this.extractTableStyleSectionFill(i["a:band2H"]),p=this.extractTableStyleSectionFill(i["a:band1V"]),f=this.extractTableStyleSectionFill(i["a:band2V"]),h=this.extractTableStyleSectionFill(i["a:firstRow"]),m=this.extractTableStyleSectionFill(i["a:lastRow"]),g=this.extractTableStyleSectionFill(i["a:firstCol"]),x=this.extractTableStyleSectionFill(i["a:lastCol"]),v=this.extractTableStyleSectionFill(i["a:seCell"]),S=this.extractTableStyleSectionFill(i["a:swCell"]),w=this.extractTableStyleSectionFill(i["a:neCell"]),C=this.extractTableStyleSectionFill(i["a:nwCell"]),T=this.extractTableBackground(i["a:tblBg"]),E=this.deriveTableStyleAccentKey(c,u,p,h),M=["wholeTbl","firstRow","lastRow","firstCol","lastCol","band1H","band2H","band1V","band2V","seCell","swCell","neCell","nwCell"],P={};for(let k of M){let L=this.extractTableStyleSectionText(i[`a:${k}`]);L&&(P[`${k}Text`]=L);}let R={styleId:a,styleName:l,accentKey:E,...T?{tableBackground:T}:{},wholeTblFill:c,band1HFill:u,band2HFill:d,band1VFill:p,band2VFill:f,firstRowFill:h,lastRowFill:m,firstColFill:g,lastColFill:x,...v?{seCellFill:v}:{},...S?{swCellFill:S}:{},...w?{neCellFill:w}:{},...C?{nwCellFill:C}:{},...P};o[a]=R;}return Object.keys(o).length>0?o:void 0}catch(e){console.warn("Failed to parse ppt/tableStyles.xml:",e);return}}},hDe=class extends fDe{serializeSingleAction(t,e,n,r){if(!n){delete t[e];return}let o={},i=n.rId;!i&&n.url&&(i=r(n.url)??void 0),i&&(o["@_r:id"]=i),n.action&&(o["@_action"]=n.action),n.tooltip&&(o["@_tooltip"]=n.tooltip),n.highlightClick&&(o["@_highlightClick"]="1");let s=n.soundRId;s&&(o["a:snd"]={"@_r:embed":s}),t[e]=o;}getTreeBucketKeyForElementType(t){return t==="picture"||t==="image"?"p:pic":t==="connector"?"p:cxnSp":t==="table"||t==="chart"||t==="smartArt"||t==="ole"||t==="media"?"p:graphicFrame":"p:sp"}getCnvPrNode(t,e){return e==="p:pic"?on(t,"p:nvPicPr","p:cNvPr"):e==="p:cxnSp"?on(t,"p:nvCxnSpPr","p:cNvPr"):e==="p:graphicFrame"?on(t,"p:nvGraphicFramePr","p:cNvPr"):on(t,"p:nvSpPr","p:cNvPr")}serializeElementActions(t,e,n){let r=this.getTreeBucketKeyForElementType(e.type),o=this.getCnvPrNode(t,r);if(!o)return;let i="actionClick"in e?e.actionClick:void 0,s="actionHover"in e?e.actionHover:void 0;this.serializeSingleAction(o,"a:hlinkClick",i,n),this.serializeSingleAction(o,"a:hlinkHover",s,n);}serializeShapeLocks(t,e){let n="locks"in e?e.locks:void 0,r=this.getTreeBucketKeyForElementType(e.type),o,i;if(r==="p:pic")o=on(t,"p:nvPicPr","p:cNvPicPr"),i="a:picLocks";else if(r==="p:cxnSp")o=on(t,"p:nvCxnSpPr","p:cNvCxnSpPr"),i="a:cxnSpLocks";else if(r==="p:sp")o=on(t,"p:nvSpPr","p:cNvSpPr"),i="a:spLocks";else return;if(!o)return;if(!n){delete o[i];return}let s={},a=[["noGrouping","@_noGrp"],["noRotation","@_noRot"],["noMove","@_noMove"],["noResize","@_noResize"],["noTextEdit","@_noTextEdit"],["noSelect","@_noSelect"],["noChangeAspect","@_noChangeAspect"],["noEditPoints","@_noEditPoints"],["noAdjustHandles","@_noAdjustHandles"],["noChangeArrowheads","@_noChangeArrowheads"],["noChangeShapeType","@_noChangeShapeType"]],l=false;for(let[c,u]of a)n[c]!==void 0&&(s[u]=n[c]?"1":"0",l=true);l?o[i]=s:delete o[i];}},mDe=class extends hDe{parseAction(t,e,n){if(!t)return;let r=String(t["@_r:id"]||t["@_id"]||"").trim(),o=String(t["@_action"]||"").trim(),i=String(t["@_tooltip"]||"").trim(),s=String(t["@_highlightClick"]||"").trim();if(r.length===0&&o.length===0&&i.length===0)return;let a={};r.length>0&&(a.rId=r),o.length>0&&(a.action=o),i.length>0&&(a.tooltip=i),(s==="1"||s==="true")&&(a.highlightClick=true);let l=t["a:snd"],c=String(l?.["@_r:embed"]||l?.["@_r:link"]||"").trim();if(c.length>0&&(a.soundRId=c),r.length>0&&e){let u=e.get(r);if(u){a.url=u;let d=u.match(/slide(\d+)\.xml$/i);if(d){let p=parseInt(d[1],10),f=n.findIndex(h=>{let m=h.match(/slide(\d+)\.xml$/i);return m?parseInt(m[1],10)===p:false});f>=0&&(a.targetSlideIndex=f);}}}if(a.soundRId&&e){let u=e.get(a.soundRId);u&&(a.soundPath=u);}return a}parseElementActions(t,e,n){if(!t)return {};let r={},o=t["a:hlinkClick"],i=t["a:hlinkHover"],s=this.parseAction(o,e,n),a=this.parseAction(i,e,n);return s&&(r.actionClick=s),a&&(r.actionHover=a),r}parseColor(t,e){return this.colorStyleCodec.parseColor(t,e)}extractTextFillVariants(t){let e={};if(!t)return e;let n=t["a:gradFill"];if(n){let o=n["a:gsLst"];if(o){let i=this.ensureArray(o["a:gs"]);if(i.length>=2){let s=i.map(u=>{let d=parseInt(String(u["@_pos"]||"0"))/1e3;return `${this.parseColor(u)||"#000000"} ${d}%`}),a=n["a:lin"]?parseInt(String(n["a:lin"]["@_ang"]||"0"))/6e4:0,l=n["a:path"]?"radial":"linear";e.textFillGradient=`linear-gradient(${a}deg, ${s.join(", ")})`;let c=[];for(let u of i){let d=u,p=this.parseColor(d)||"#000000",f=parseInt(String(d["@_pos"]||"0"),10),h=Number.isFinite(f)?f/1e5*100:0,m=this.extractColorOpacity(d);c.push({color:p,position:h,...m!==void 0?{opacity:m}:{}});}e.textFillGradientStops=c,e.textFillGradientAngle=a,e.textFillGradientType=l;}}}let r=t["a:pattFill"];if(r){e.textFillPattern=String(r["@_prst"]||"");let o=r["a:fgClr"],i=r["a:bgClr"];o&&(e.textFillPatternForeground=this.parseColor(o)),i&&(e.textFillPatternBackground=this.parseColor(i));}return e}extractColorOpacity(t){return this.colorStyleCodec.extractColorOpacity(t)}},gDe=class extends mDe{extractImageEffects(t){if(!t)return null;let e={},n=false,r=t["@_bright"]??t["@_brt"];if(r!==null){let w=parseInt(String(r));Number.isFinite(w)&&(e.brightness=w/1e3,n=true);}let o=t["@_contrast"]??t["@_cont"];if(o!==null){let w=parseInt(String(o));Number.isFinite(w)&&(e.contrast=w/1e3,n=true);}t["a:grayscl"]&&(e.grayscale=true,n=true);let i=t["a:alphaModFix"];if(i){let w=i["@_amt"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.alphaModFix=C,n=true);}}let s=t["a:biLevel"];if(s){let w=s["@_thresh"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.biLevel=C,n=true);}}let a=t["a:clrChange"];if(a){let w=a["a:clrFrom"],C=a["a:clrTo"];if(w&&C){let T=this.parseColor(w)||"#000000",E=this.parseColor(C)||"#ffffff",M=this.extractColorOpacity(C);e.clrChange={clrFrom:T,clrTo:E,clrToTransparent:M!==void 0&&M<=0},n=true;}}let l=t["a:duotone"];if(l){let w=[...this.ensureArray(l["a:srgbClr"]),...this.ensureArray(l["a:schemeClr"]),...this.ensureArray(l["a:prstClr"])];w.length>=2&&(e.duotone={color1:this.parseColor(w[0])||"#000000",color2:this.parseColor(w[1])||"#ffffff"},n=true);}let c=t["a:alphaInv"];if(c){let w=this.parseColor(c);e.alphaInv=w?{color:w}:{},n=true;}t["a:alphaCeiling"]&&(e.alphaCeiling=true,n=true),t["a:alphaFloor"]&&(e.alphaFloor=true,n=true);let u=t["a:alphaMod"];if(u){let w=u["a:cont"];e.alphaMod=w?{contRawXml:w}:{},n=true;}let d=t["a:alphaRepl"];if(d){let w=d["@_a"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.alphaRepl=C,n=true);}}let p=t["a:alphaBiLevel"];if(p){let w=p["@_thresh"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.alphaBiLevel=C,n=true);}}let f=t["a:clrRepl"];if(f){let w=this.parseColor(f);w&&(e.clrRepl={color:w,rawXml:f},n=true);}let h=t["a:lum"];if(h){let w={},C=h["@_bright"],T=h["@_contrast"];if(C!==void 0){let E=parseInt(String(C))/1e3;Number.isFinite(E)&&(w.bright=E);}if(T!==void 0){let E=parseInt(String(T))/1e3;Number.isFinite(E)&&(w.contrast=E);}e.lum=w,n=true;}let m=t["a:hsl"];if(m){let w={},C=m["@_hue"],T=m["@_sat"],E=m["@_lum"];if(C!==void 0){let M=parseInt(String(C))/6e4;Number.isFinite(M)&&(w.hue=M);}if(T!==void 0){let M=parseInt(String(T))/1e3;Number.isFinite(M)&&(w.sat=M);}if(E!==void 0){let M=parseInt(String(E))/1e3;Number.isFinite(M)&&(w.lum=M);}e.hsl=w,n=true;}let g=t["a:tint"];if(g){let w={},C=g["@_hue"],T=g["@_amt"];if(C!==void 0){let E=parseInt(String(C))/6e4;Number.isFinite(E)&&(w.hue=E);}if(T!==void 0){let E=parseInt(String(T))/1e3;Number.isFinite(E)&&(w.amt=E);}e.tint=w,n=true;}let x=t["a:fillOverlay"];if(x){let w=String(x["@_blend"]||"over"),C=["over","mult","screen","darken","lighten"].includes(w)?w:"over",T={};for(let E of Object.keys(x))E!=="@_blend"&&(T[E]=x[E]);e.fillOverlay={blend:C,fillRawXml:T},n=true;}let v=t["a:blur"];if(v){let w={},C=v["@_rad"];if(C!==void 0){let E=parseInt(String(C));Number.isFinite(E)&&(w.rad=E);}let T=v["@_grow"];if(T!==void 0){let E=String(T).toLowerCase();w.grow=E==="1"||E==="true";}e.blur=w,n=true;}let S=Rt(t,"a:extLst");if(S){let w=this.ensureArray(S["a:ext"]);for(let C of w)if((gn(C,"uri")||"")==="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}"){let E=Rt(C,"a14:imgEffect")||Rt(C,"a14:imgLayer");if(E){let M=Object.keys(E).filter(P=>P.startsWith("a14:artistic"));if(M.length>0){let P=M[0].replace("a14:","");e.artisticEffect=P,n=true;let R=E[M[0]];if(R){let k=R["@_radius"]??R["@_amount"]??R["@_pressure"];k!==null&&(e.artisticRadius=parseInt(String(k))||0);}}}}}return n?e:null}inspectArtisticEffects(t,e,n){}extractSvgBlipRelId(t){if(!t)return;let e=Rt(t,"a:extLst");if(!e)return;let n=this.ensureArray(e["a:ext"]);for(let r of n)if((gn(r,"uri")||"")==="{96DAC541-7B7A-43D3-8B79-37D633B846F1}"){let i=Rt(r,"asvg:svgBlip")||Rt(r,"a16:svgBlip");if(i)return gn(i,"r:embed")||gn(i,"r:link")||""}}resolveRelationshipTarget(t,e){return this.mediaDataParser.resolveRelationshipTarget(t,e)}};SDe=class extends gDe{walkMediaTimingTree(t,e,n){if(!t)return;for(let o of ["p:video","p:audio"]){let i=this.ensureArray(t[o]);for(let s of i){let a=s["p:cMediaNode"];if(!a)continue;let c=a["p:tgtEl"]?.["p:spTgt"],u=c?.["@_spid"]?String(c["@_spid"]):void 0;if(!u)continue;let d=a["p:cTn"],p=bDe(d,o),f=a["@_fullScrn"]==="1",h,m=a["@_vol"];if(m!==void 0){let T=parseInt(String(m));Number.isFinite(T)&&(h=Math.max(0,Math.min(1,T/1e5)));}let g=a["@_showWhenStopped"]==="0",x,v=a["@_posterFrame"];v&&(x=this.resolveRelationshipTarget(n,String(v)));let S=vDe(s,a,u,T=>this.ensureArray(T)),w=p.trimStartMs??S.trimStartMs,C=p.trimEndMs??S.trimEndMs;e.set(u,{trimStartMs:w!==void 0&&!isNaN(w)?w:void 0,trimEndMs:C!==void 0&&!isNaN(C)?C:void 0,fullScreen:f||void 0,loop:p.loop||void 0,posterFramePath:x,volume:h,fadeInDuration:S.fadeInDuration,fadeOutDuration:S.fadeOutDuration,autoPlay:p.autoPlay||void 0,playAcrossSlides:p.playAcrossSlides||void 0,hideWhenNotPlaying:g||void 0,bookmarks:S.bookmarks.length>0?S.bookmarks:void 0,playbackSpeed:S.playbackSpeed});}}let r=t["p:cTn"];if(r){let o=r["p:childTnLst"];if(o){for(let i of ["p:par","p:seq","p:excl"]){let s=this.ensureArray(o[i]);for(let a of s)this.walkMediaTimingTree(a,e,n);}this.walkMediaTimingTree(o,e,n);}}for(let o of ["p:par","p:seq","p:excl","p:tnLst"]){let i=this.ensureArray(t[o]);for(let s of i)this.walkMediaTimingTree(s,e,n);}}extractMediaTimingMap(t,e){let n=new Map;try{let r=t?.["p:sld"]?.["p:timing"];if(!r)return n;this.walkMediaTimingTree(r,n,e);}catch(r){console.warn("Failed to parse media timing data:",r);}return n}getXmlShapeId(t){return xDe(t)}getPathExtension(t){return jee(t)}getImageMimeType(t){return yDe(t)}async getMediaArrayBuffer(t){if(!t)return;let e=this.zip.file(t);if(e)try{return await e.async("arraybuffer")}catch{return}}},wDe=typeof globalThis.URL?.createObjectURL=="function"&&typeof globalThis.Blob<"u",CDe=class extends SDe{createImageUrl(t,e){if(wDe){let o=new Blob([new Uint8Array(t)],{type:e}),i=URL.createObjectURL(o);return this.blobUrlCache.add(i),i}let n=new Uint8Array(t),r="";for(let o=0;o<n.length;o++)r+=String.fromCharCode(n[o]);return `data:${e};base64,${btoa(r)}`}async getImageData(t){if(!t)return;let e=this.getPathExtension(t);if(t.startsWith("http://")||t.startsWith("https://"))return this.allowExternalImages!==true?void 0:t;if(t.startsWith("data:"))return t;if(this.imageDataCache.has(t))return this.imageDataCache.get(t);let n=this.zip.file(t);if(!n){console.warn(`[pptx] Image file not found in archive: ${t}`);return}try{if(e==="emf"||e==="wmf"){let i=await n.async("arraybuffer"),s=e==="emf"?await Iw(i):await Nw(i);if(s)return this.imageDataCache.set(t,s),s;let a=t.replace(/\.[^.]+$/,"");for(let l of ["png","jpg","jpeg","gif"]){let c=`${a}.${l}`,u=this.zip.file(c);if(u)try{let d=await u.async("arraybuffer"),p=l==="jpg"?"image/jpeg":`image/${l}`,f=this.createImageUrl(d,p);return this.imageDataCache.set(t,f),f}catch{}}return}let r=await n.async("arraybuffer"),o=this.createImageUrl(r,this.getImageMimeType(t));return this.imageDataCache.set(t,o),o}catch(r){console.warn(`[pptx] Failed to load image: ${t}`,r);return}}async enrichMediaElementsWithTiming(t,e,n=0){if(!(n>32)){for(let o of t){if(o.type!=="media")continue;let i=this.getXmlShapeId(o.rawXml);if(!i)continue;let s=e.get(i);if(s&&(s.trimStartMs!==void 0&&(o.trimStartMs=s.trimStartMs),s.trimEndMs!==void 0&&(o.trimEndMs=s.trimEndMs),s.fullScreen!==void 0&&(o.fullScreen=s.fullScreen),s.loop!==void 0&&(o.loop=s.loop),s.volume!==void 0&&(o.volume=s.volume),s.fadeInDuration!==void 0&&(o.fadeInDuration=s.fadeInDuration),s.fadeOutDuration!==void 0&&(o.fadeOutDuration=s.fadeOutDuration),s.autoPlay!==void 0&&(o.autoPlay=s.autoPlay),s.playAcrossSlides!==void 0&&(o.playAcrossSlides=s.playAcrossSlides),s.hideWhenNotPlaying!==void 0&&(o.hideWhenNotPlaying=s.hideWhenNotPlaying),s.bookmarks!==void 0&&s.bookmarks.length>0&&(o.bookmarks=s.bookmarks),s.playbackSpeed!==void 0&&(o.playbackSpeed=s.playbackSpeed),s.posterFramePath)){o.posterFramePath=s.posterFramePath;try{let a=await this.getImageData(s.posterFramePath);a&&(o.posterFrameData=a);}catch{}}}for(let o of t)o.type==="group"&&o.children&&await this.enrichMediaElementsWithTiming(o.children,e,n+1);}}parseNativeAnimations(t){return this.nativeAnimationService.parseNativeAnimations(t)}},TDe=class extends CDe{buildRelativeTargetPath(t,e){let n=t.split("/"),r=e.split("/");for(n.pop();n.length>0&&r.length>0&&n[0]===r[0];)n.shift(),r.shift();return [...Array.from({length:n.length}).fill(".."),...r].join("/")}async setMasterThemeRelationship(t,e){let n=t.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),r=this.zip.file(n);if(!r)return;let o=await r.async("string"),i=this.parser.parse(o),s=i.Relationships||{},a=this.ensureArray(s.Relationship),l=a.find(c=>String(c["@_Type"]||"").includes("/theme"));l&&(l["@_Target"]=this.buildRelativeTargetPath(t,e),s.Relationship=a,i.Relationships=s,this.zip.file(n,this.builder.build(i)));}async setPresentationTheme(t,e=true){let n=t.trim().replace(/\\/g,"/");if(!n.startsWith("ppt/theme/"))return;let r=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!r||r.length===0)return;let o=e?r:[r[0]];await Promise.all(o.map(async i=>{await this.setMasterThemeRelationship(i.name,n);}));}async parseAppProperties(){try{let t=this.zip.file("docProps/app.xml");if(!t)return;let e=await t.async("string"),r=this.parser.parse(e)?.Properties;if(!r)return;let o=l=>{let c=r[l];return c==null?void 0:String(c).trim()||void 0},i=l=>{let c=r[l];if(c==null)return;let u=Number(c);return Number.isFinite(u)?u:void 0},s={application:o("Application"),appVersion:o("AppVersion"),presentationFormat:o("PresentationFormat"),slides:i("Slides"),hiddenSlides:i("HiddenSlides"),notes:i("Notes"),totalTime:i("TotalTime"),words:i("Words"),paragraphs:i("Paragraphs"),company:o("Company"),manager:o("Manager"),template:o("Template")};return Object.values(s).some(l=>l!==void 0)?s:void 0}catch(t){console.warn("Failed to parse app properties:",t);return}}async parseCoreProperties(){try{let t=this.zip.file("docProps/core.xml");if(!t)return;let e=await t.async("string"),r=this.parser.parse(e)?.["cp:coreProperties"];if(!r)return;let o=a=>{let l=r[a];return l==null?void 0:String(typeof l=="object"&&l!==null?l["#text"]??"":l).trim()||void 0},i={title:o("dc:title"),subject:o("dc:subject"),creator:o("dc:creator"),keywords:o("cp:keywords"),description:o("dc:description"),lastModifiedBy:o("cp:lastModifiedBy"),revision:o("cp:revision"),created:o("dcterms:created"),modified:o("dcterms:modified"),category:o("cp:category"),contentStatus:o("cp:contentStatus")};return Object.values(i).some(a=>a!==void 0)?i:void 0}catch(t){console.warn("Failed to parse core properties:",t);return}}async parseCustomProperties(){let t=[];try{let e=this.zip.file("docProps/custom.xml");if(!e)return t;let n=await e.async("string"),o=this.parser.parse(n)?.Properties;if(!o)return t;let i=this.ensureArray(o.property);for(let s of i){let a=String(s["@_name"]||"").trim();if(!a)continue;let l="",c="unknown",u=["vt:lpwstr","vt:i4","vt:bool","vt:filetime","vt:r8","vt:i2","vt:ui4","vt:lpstr"];for(let d of u)if(s[d]!==void 0){l=String(s[d]),c=d.replace("vt:","");break}t.push({name:a,value:l,type:c});}}catch(e){console.warn("Failed to parse custom properties:",e);}return t}resolvePartPath(t,e){return e.startsWith("/")?e.substring(1):t.substring(0,t.lastIndexOf("/")+1)+e}async parseCustDataLst(t,e,n){if(!t)return [];let r=t["p:custDataLst"];if(!r)return [];let o=this.ensureArray(r["p:custData"]);if(o.length===0)return [];let i=this.zip.file(e);if(!i)return [];let s=await i.async("string"),l=this.parser.parse(s).Relationships||{},c=this.ensureArray(l.Relationship),u=new Map;for(let p of c){let f=String(p["@_Id"]||"").trim(),h=String(p["@_Target"]||"").trim();f&&h&&u.set(f,h);}let d=[];for(let p of o){let f=String(p["@_r:id"]||"").trim();if(!f)continue;let h=u.get(f);if(!h)continue;let m=this.resolvePartPath(n,h),g;try{let x=this.zip.file(m);x&&(g=await x.async("string"));}catch{}d.push({id:m,relId:f,data:g});}return d}async parsePresentationCustomerData(){try{let t=this.presentationData?.["p:presentation"];return await this.parseCustDataLst(t,"ppt/_rels/presentation.xml.rels","ppt/presentation.xml")}catch(t){return console.warn("Failed to parse presentation customer data:",t),[]}}async parseSlideCustomerData(t,e){try{let r=t["p:sld"]?.["p:cSld"],o=`${e.replace("slides/","slides/_rels/")}.rels`;return await this.parseCustDataLst(r,o,e)}catch(n){return console.warn(`Failed to parse slide customer data for ${e}:`,n),[]}}parseSlideActiveXControls(t){return Cee(t)}async parseThumbnail(){let t=["docProps/thumbnail.jpeg","docProps/thumbnail.jpg","docProps/thumbnail.png","docProps/thumbnail.emf"];for(let e of t){let n=this.zip.file(e);if(n)try{return await n.async("uint8array")}catch{}}return null}async parseTags(){let t=[];try{let e=this.zip.file(/^ppt\/tags\/tag\d+\.xml$/);if(!e||e.length===0)return t;for(let n of e){let r=n.name,o=await n.async("string"),s=this.parser.parse(o)?.["p:tagLst"];if(!s)continue;let l=this.ensureArray(s["p:tag"]).map(c=>({name:String(c["@_name"]||"").trim(),value:String(c["@_val"]||"").trim()})).filter(c=>c.name.length>0);l.length>0&&t.push({path:r,tags:l});}}catch(e){console.warn("Failed to parse tags:",e);}return t}},_De=class sO extends TDe{parseBackgroundColor(e){if(!e)return;let n=Rt(e,"p:bgPr");if(n)return this.parseColor(Rt(n,"a:solidFill"));let r=Rt(e,"p:bgRef");if(r)return this.parseColor(r)}extractPlaceholderList(e){if(!e)return [];let n=this.ensureArray(e["p:sp"]),r=[];for(let o of n){let i=on(o,"p:nvSpPr","p:nvPr","p:ph");if(!i)continue;let s=(gn(i,"type")??"body").trim(),a=gn(i,"idx");r.push({type:s,idx:a});}return r}static ALLOWED_PATH_ROOTS=new Set(["ppt","customXml","docProps","_rels"]);resolvePath(e,n){let r=e.split("/").filter(Boolean),o=n.split("/");r.length>0&&!e.endsWith("/")&&r.pop();for(let a of o)if(a===".."){if(r.length===0)return "";r.pop();}else a!=="."&&r.push(a);let i=r.join("/");if(i.length===0)return "";let s=r[0];return sO.ALLOWED_PATH_ROOTS.has(s)?i:""}resolveImagePath(e,n){let r=e.substring(0,e.lastIndexOf("/")+1),o=n.startsWith("..")?this.resolvePath(r,n):n.startsWith("/")?n.substring(1):r+n;if(o.length===0)return "";let i=o.indexOf("/"),s=i===-1?o:o.substring(0,i);return sO.ALLOWED_PATH_ROOTS.has(s)?o:""}async parseSlideMasters(){let e=[];try{let n=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!n||n.length===0)return e;for(let r of n){let o=r.name,i=await r.async("string"),s=this.parser.parse(i),a=s?.["p:sldMaster"];if(!a)continue;this.masterXmlMap.has(o)||this.masterXmlMap.set(o,s);let l=a["p:cSld"]?.["p:bg"],c=this.parseBackgroundColor(l),u=a["p:cSld"]?.["p:spTree"],d=this.extractPlaceholderList(u),p,f=o.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),h=this.zip.file(f);if(h){let x=await h.async("string"),v=this.parser.parse(x),S=this.ensureArray(Rt(v,"Relationships")?.Relationship);for(let w of S)if(String(w["@_Type"]||"").includes("/theme")){p=this.resolveImagePath(o,String(w["@_Target"]||""));break}}let m=[];if(h){let x=await h.async("string"),v=this.parser.parse(x),S=this.ensureArray(Rt(v,"Relationships")?.Relationship);for(let w of S)String(w["@_Type"]||"").includes("/slideLayout")&&m.push(this.resolveImagePath(o,String(w["@_Target"]||"")));}let g=[];for(let x of m){let v=await this.parseSlideLayoutAttributes(x);v&&g.push(v);}e.push({path:o,backgroundColor:c,themePath:p,layoutPaths:m.length>0?m:void 0,layouts:g.length>0?g:void 0,placeholders:d.length>0?d:void 0});}}catch(n){console.warn("Failed to parse slide masters:",n);}return e}async parseHandoutMaster(){try{let e=this.zip.file(/^ppt\/handoutMasters\/handoutMaster\d+\.xml$/);if(!e||e.length===0)return;let n=e[0].name,r=await e[0].async("string"),i=this.parser.parse(r)?.["p:handoutMaster"];if(!i)return;let s=on(i,"p:cSld","p:bg"),a=this.parseBackgroundColor(s),l=on(i,"p:cSld","p:spTree"),c=this.extractPlaceholderList(l),u={path:n,backgroundColor:a,placeholders:c},d=sA(i["p:hf"]);return d&&(u.headerFooter=d),u}catch(e){console.warn("Failed to parse handout master:",e);return}}async parseNotesMaster(){try{let e=this.zip.file(/^ppt\/notesMasters\/notesMaster\d+\.xml$/);if(!e||e.length===0)return;let n=e[0].name,r=await e[0].async("string"),i=this.parser.parse(r)?.["p:notesMaster"];if(!i)return;let s=on(i,"p:cSld","p:bg"),a=this.parseBackgroundColor(s),l=on(i,"p:cSld","p:spTree"),c=this.extractPlaceholderList(l),u={path:n,backgroundColor:a,placeholders:c},d=sA(i["p:hf"]);return d&&(u.headerFooter=d),u}catch(e){console.warn("Failed to parse notes master:",e);return}}async parseSlideLayoutAttributes(e){try{let n=this.zip.file(e);if(!n)return;let r=await n.async("string"),o=this.parser.parse(r),i=o?.["p:sldLayout"];if(!i)return;this.layoutXmlMap.has(e)||this.layoutXmlMap.set(e,o);let s={path:e},a=(gn(Rt(i,"p:cSld"),"name")??"").trim();a&&(s.name=a);let l=String(i["@_matchingName"]||"").trim();l&&(s.matchingName=l);let c=i["@_preserve"];if(c!==void 0){let v=String(c).trim().toLowerCase();s.preserve=v==="1"||v==="true";}let u=i["@_showMasterPhAnim"];if(u!==void 0){let v=String(u).trim().toLowerCase();s.showMasterPhAnim=v!=="0"&&v!=="false";}let d=i["@_userDrawn"];if(d!==void 0){let v=String(d).trim().toLowerCase();s.userDrawn=v==="1"||v==="true";}let p=sA(i["p:hf"]);p&&(s.headerFooter=p);let f=i["p:clrMapOvr"];if(f&&f["a:masterClrMapping"]===void 0){let v=f["a:overrideClrMapping"];if(v){let S=["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],w={};for(let C of S){let T=String(v[`@_${C}`]||"").trim().toLowerCase();T&&(w[C]=T);}Object.keys(w).length>0&&(s.clrMapOverride=w);}}let h=on(i,"p:cSld","p:bg"),m=this.parseBackgroundColor(h);m&&(s.backgroundColor=m);let g=on(i,"p:cSld","p:spTree"),x=this.extractPlaceholderList(g);return x.length>0&&(s.placeholders=x),s}catch(n){console.warn("Failed to parse slide layout attributes:",n);return}}parseCustomShows(){try{let e=on(this.presentationData,"p:presentation","p:custShowLst");if(!e)return;let n=this.ensureArray(e["p:custShow"]);return n.length===0?void 0:n.map(r=>{let o=String(r["@_name"]||""),i=String(r["@_id"]||""),s=r["p:sldLst"],l=(s?this.ensureArray(s["p:sld"]):[]).map(c=>String(c["@_r:id"]||"")).filter(c=>c.length>0);return {name:o,id:i,slideRIds:l}})}catch(e){console.warn("Failed to parse custom slide shows:",e);return}}},MDe=class extends _De{async parsePresentationProperties(){try{let t=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!t)return;let e=this.parser.parse(t),r=this.ensureArray(e?.Relationships?.Relationship).find(h=>String(h?.["@_Type"]||"").includes("presProps")||String(h?.["@_Target"]||"").includes("presProps")),o=r?String(r["@_Target"]||""):"presProps.xml",i=o.startsWith("/")?o.substring(1):`ppt/${o}`,s=await this.zip.file(i)?.async("string");if(!s)return;let l=this.parser.parse(s)?.["p:presentationPr"];if(!l)return;let c={},u=l["p:showPr"];u&&Object.assign(c,dDe(u));let d=l["p:prnPr"];if(d){c.printFrameSlides=d["@_frameSlides"]==="1";let h=d["@_sldPerPg"]??d["@_slidesPerPage"];if(h!==void 0){let g=Number.parseInt(String(h),10);Number.isFinite(g)&&g>0&&(c.printSlidesPerPage=g);}let m=d["@_clrMode"];(m==="clr"||m==="gray"||m==="bw")&&(c.printColorMode=m);}let p=l["p:clrMru"];if(p){let m=this.ensureArray(p["a:srgbClr"]).map(g=>{let x=String(g?.["@_val"]||"").trim();return x.length>0?`#${x}`:""}).filter(g=>g.length>0);m.length>0&&(c.mruColors=m);}let f=l["p:gridSpacing"];if(f){let h=parseInt(String(f["@_cx"]??"0"),10),m=parseInt(String(f["@_cy"]??"0"),10);h>0&&m>0&&(c.gridSpacing={cx:h,cy:m});}return c}catch(t){console.warn("Failed to parse presentation properties:",t);return}}async parseViewProperties(){try{let t=await this.zip.file("ppt/viewProps.xml")?.async("string");if(!t)return;let n=this.parser.parse(t)?.["p:viewPr"];return n?JAe(n):void 0}catch(t){console.warn("Failed to parse view properties:",t);return}}extractChartStyle(t,e){if(!t&&!e)return;let n={},r=false,o=this.xmlLookupService.getChildByLocalName(t,"style");if(o?.["@_val"]&&(n.styleId=parseInt(String(o["@_val"])),r=true),e){let i=this.xmlLookupService.getChildByLocalName(e,"legend");if(i){n.hasLegend=true,r=true;let l=this.xmlLookupService.getChildByLocalName(i,"legendPos");l?.["@_val"]&&(n.legendPosition=String(l["@_val"]));}this.xmlLookupService.getChildByLocalName(e,"title")&&(n.hasTitle=true,r=true);let a=this.xmlLookupService.getChildByLocalName(e,"plotArea");if(a){let l=this.xmlLookupService.getChildByLocalName(a,"valAx");l&&this.xmlLookupService.getChildByLocalName(l,"majorGridlines")&&(n.hasGridlines=true,r=true);let c=Object.keys(a).filter(u=>this.compatibilityService.getXmlLocalName(u).endsWith("Chart"));for(let u of c){let d=a[u];if(!d)continue;let p=this.xmlLookupService.getChildByLocalName(d,"dLbls");if(p&&!n.dataLabels){let f=S=>this.xmlLookupService.getChildByLocalName(p,S)?.["@_val"]==="1",h=f("showVal"),m=f("showCatName"),g=f("showSerName"),x=f("showPercent"),v=f("showLegendKey");if(h||m||g||x||v){n.hasDataLabels=true,r=true;let S={showValue:h,showCategory:m,showSeriesName:g,showPercent:x,showLegendKey:v},w=this.xmlLookupService.getChildByLocalName(p,"dLblPos")?.["@_val"];w!==void 0&&(S.position=String(w)),n.dataLabels=S;}}if(!n.hasDataLabels){let f=this.xmlLookupService.getChildrenArrayByLocalName(d,"ser");for(let h of f){let m=this.xmlLookupService.getChildByLocalName(h,"dLbls");m&&this.xmlLookupService.getChildByLocalName(m,"showVal")?.["@_val"]==="1"&&(n.hasDataLabels=true,r=true);}}}}}return r?n:void 0}toPresentationTarget(t){let e=t.startsWith("/")?t.substring(1):t;return e.startsWith("ppt/")?e.substring(4):e}toSlidePathFromTarget(t){let e=t.startsWith("/")?t.substring(1):t;return e.startsWith("ppt/")?e:`ppt/${e}`}toSlideRelsPath(t){return `${t.replace("slides/","slides/_rels/")}.rels`}},EDe=class extends MDe{createEmptySlideXml(){return {"p:sld":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","p:cSld":{"p:spTree":{"p:nvGrpSpPr":{"p:cNvPr":{"@_id":"1","@_name":""},"p:cNvGrpSpPr":{},"p:nvPr":{}},"p:grpSpPr":{"a:xfrm":{"a:off":{"@_x":"0","@_y":"0"},"a:ext":{"@_cx":"0","@_cy":"0"},"a:chOff":{"@_x":"0","@_y":"0"},"a:chExt":{"@_cx":"0","@_cy":"0"}}}}},"p:clrMapOvr":{"a:masterClrMapping":{}}}}}deepCloneXml(t){if(t)try{return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}catch{return}}findSourceSlidePath(t){if(t&&this.slideMap.has(t)&&t.startsWith("ppt/slides/slide"))return t;for(let e of this.slideMap.keys())if(e.startsWith("ppt/slides/slide"))return e}async loadSlideRelationships(t,e){let n=await this.zip.file(e)?.async("string");if(!n)return;let r=this.parser.parse(n),o=new Map,i=new Set;r?.Relationships?.Relationship&&(Array.isArray(r.Relationships.Relationship)?r.Relationships.Relationship:[r.Relationships.Relationship]).forEach(a=>{if(a["@_Id"]&&a["@_Target"]){let l=String(a["@_Id"]);o.set(l,String(a["@_Target"])),String(a["@_TargetMode"]||"").toLowerCase()==="external"&&i.add(l);}}),this.slideRelsMap.set(t,o),i.size>0&&this.externalRelsMap.set(t,i);}async reconcilePresentationSlidesForSave(t){await this.presentationSlidesReconciler.reconcile({...t,zip:this.zip,parser:this.parser,xmlBuilder:this.builder,presentationData:this.presentationData,slideMap:this.slideMap,slideRelsMap:this.slideRelsMap,toPresentationTarget:e=>this.toPresentationTarget(e),toSlidePathFromTarget:e=>this.toSlidePathFromTarget(e),toSlideRelsPath:e=>this.toSlideRelsPath(e),createEmptySlideXml:()=>this.createEmptySlideXml(),deepCloneXml:e=>this.deepCloneXml(e),findSourceSlidePath:e=>this.findSourceSlidePath(e),loadSlideRelationships:(e,n)=>this.loadSlideRelationships(e,n)});}buildSlideTransitionXml(t){return this.slideTransitionService.buildSlideTransitionXml(t)}applyEditorAnimations(t,e){this.editorAnimationService.applyEditorAnimations(t,e);}ensureSlideTree(t){t["p:sld"]||(t["p:sld"]={});let e=t["p:sld"];e["p:cSld"]||(e["p:cSld"]={});let n=e["p:cSld"];if(!n["p:spTree"]){let o=this.createEmptySlideXml()["p:sld"]?.["p:cSld"]?.["p:spTree"];o&&(n["p:spTree"]=o);}return e["p:cSld"]=n,t["p:sld"]=e,n["p:spTree"]}parseDataUrlToBytes(t){return jB(t)}async resolveMediaToBytes(t){let e=jB(t);return e||XQ(t)}textAlignToDrawingValue(t){if(t==="left")return "l";if(t==="center")return "ctr";if(t==="right")return "r";if(t==="justify")return "just"}pixelsToPoints(t){return t*(72/96)}createParagraphSpacingXmlFromPx(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.max(0,this.pixelsToPoints(t));return {"a:spcPts":{"@_val":String(Math.round(e*100))}}}createLineSpacingXmlFromMultiplier(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.max(.1,Math.min(5,t));return {"a:spcPct":{"@_val":String(Math.round(e*1e5))}}}},Mp=9525;FDe=class Kee extends EDe{createRunPropertiesFromTextStyle(e,n){let r={"@_lang":e?.language||"en-US","@_dirty":"0"};if(!e)return r;if(typeof e.fontSize=="number"&&Number.isFinite(e.fontSize)&&(r["@_sz"]=String(Math.round(e.fontSize*(72/96)*100))),e.bold!==void 0&&(r["@_b"]=e.bold?"1":"0"),e.italic!==void 0&&(r["@_i"]=e.italic?"1":"0"),e.underline&&(r["@_u"]=e.underlineStyle||"sng"),e.strikethrough!==void 0&&(r["@_strike"]=e.strikethrough?e.strikeType||"sngStrike":"noStrike"),typeof e.baseline=="number"&&e.baseline!==0&&(r["@_baseline"]=String(e.baseline)),typeof e.characterSpacing=="number"&&e.characterSpacing!==0&&(r["@_spc"]=String(e.characterSpacing)),typeof e.kerning=="number"&&e.kerning!==0&&(r["@_kern"]=String(e.kerning)),e.textCaps&&e.textCaps!=="none"&&(r["@_cap"]=e.textCaps),e.kumimoji!==void 0&&(r["@_kumimoji"]=e.kumimoji?"1":"0"),e.normalizeHeight!==void 0&&(r["@_normalizeH"]=e.normalizeHeight?"1":"0"),e.noProof!==void 0&&(r["@_noProof"]=e.noProof?"1":"0"),e.dirty!==void 0&&(r["@_dirty"]=e.dirty?"1":"0"),e.spellingError!==void 0&&(r["@_err"]=e.spellingError?"1":"0"),e.smartTagClean!==void 0&&(r["@_smtClean"]=e.smartTagClean?"1":"0"),e.bookmark&&(r["@_bmk"]=e.bookmark),e.altLanguage&&(r["@_altLang"]=e.altLanguage),typeof e.smartTagId=="number"&&Number.isFinite(e.smartTagId)&&(r["@_smtId"]=String(e.smartTagId)),e.textOutlineWidth||e.textOutlineColor){let i={};typeof e.textOutlineWidth=="number"&&e.textOutlineWidth>0&&(i["@_w"]=String(Math.round(e.textOutlineWidth*Kee.EMU_PER_PX))),e.textOutlineColor&&(i["a:solidFill"]={"a:srgbClr":{"@_val":e.textOutlineColor.replace("#","")}}),r["a:ln"]=i;}if(e.color){let i=e.colorXml?this.parseColor(e.colorXml):void 0;r["a:solidFill"]=jw(e.colorXml,i,e.color);}else if(e.textFillGradientStops&&e.textFillGradientStops.length>0){let i=e.textFillGradientStops.filter(s=>!!s?.color).map(s=>{let a=(s.position??0)/100,l=Math.round(Math.max(0,Math.min(1,a))*1e5),c={"@_pos":String(l),"a:srgbClr":{"@_val":String(s.color||"").replace("#","")}};return typeof s.opacity=="number"&&Number.isFinite(s.opacity)&&s.opacity<1&&(c["a:srgbClr"]["a:alpha"]={"@_val":String(Math.round(s.opacity*1e5))}),c});if(i.length>0){let s={"a:gsLst":{"a:gs":i}};if((e.textFillGradientType||"linear")==="linear"){let l=typeof e.textFillGradientAngle=="number"&&Number.isFinite(e.textFillGradientAngle)?e.textFillGradientAngle:0;s["a:lin"]={"@_ang":String(Math.round(l*6e4)),"@_scaled":"1"};}else s["a:path"]={"@_path":"circle"};r["a:gradFill"]=s;}}else if(e.textFillPattern){let i={"@_prst":e.textFillPattern};e.textFillPatternForeground&&(i["a:fgClr"]={"a:srgbClr":{"@_val":e.textFillPatternForeground.replace("#","")}}),e.textFillPatternBackground&&(i["a:bgClr"]={"a:srgbClr":{"@_val":e.textFillPatternBackground.replace("#","")}}),r["a:pattFill"]=i;}let o=PDe(e);if(o&&(r["a:effectLst"]=o),e.textEffectDagXml&&(r["a:effectDag"]=e.textEffectDagXml),e.highlightColor&&(r["a:highlight"]={"a:srgbClr":{"@_val":e.highlightColor.replace("#","")}}),e.underline&&e.underlineColor&&(r["a:uFill"]={"a:solidFill":{"a:srgbClr":{"@_val":e.underlineColor.replace("#","")}}}),e.fontFamily&&(r["a:latin"]=$P({"@_typeface":e.fontFamily},e.latinFontPanose,e.latinFontPitchFamily,e.latinFontCharset),r["a:ea"]=$P({"@_typeface":e.eastAsiaFont||e.fontFamily},e.eastAsiaFontPanose,e.eastAsiaFontPitchFamily,e.eastAsiaFontCharset),r["a:cs"]=$P({"@_typeface":e.complexScriptFont||e.fontFamily},e.complexScriptFontPanose,e.complexScriptFontPitchFamily,e.complexScriptFontCharset)),e.symbolFont&&(r["a:sym"]=$P({"@_typeface":e.symbolFont},e.symbolFontPanose,e.symbolFontPitchFamily,e.symbolFontCharset)),e.hyperlink&&n){let i=String(e.hyperlink).trim();if(i.startsWith("ppaction://")){let s={"@_action":i};e.hyperlinkTooltip&&(s["@_tooltip"]=e.hyperlinkTooltip),e.hyperlinkRId&&(s["@_r:id"]=e.hyperlinkRId),this.applyHyperlinkExtraAttrs(s,e),r["a:hlinkClick"]=s;}else if(i.length>0){let s=n(i);if(s){let a={"@_r:id":s};e.hyperlinkTooltip&&(a["@_tooltip"]=e.hyperlinkTooltip),e.hyperlinkAction&&(a["@_action"]=e.hyperlinkAction),this.applyHyperlinkExtraAttrs(a,e),r["a:hlinkClick"]=a;}}}if(e.hyperlinkMouseOver&&n){let i=String(e.hyperlinkMouseOver).trim();if(i.length>0){let s=n(i);s&&(r["a:hlinkMouseOver"]={"@_r:id":s});}}return r}applyHyperlinkExtraAttrs(e,n){n.hyperlinkInvalidUrl&&(e["@_invalidUrl"]=n.hyperlinkInvalidUrl),n.hyperlinkTargetFrame&&(e["@_tgtFrame"]=n.hyperlinkTargetFrame),n.hyperlinkHistory!==void 0&&(e["@_history"]=n.hyperlinkHistory?"1":"0"),n.hyperlinkHighlightClick!==void 0&&(e["@_highlightClick"]=n.hyperlinkHighlightClick?"1":"0"),n.hyperlinkEndSound!==void 0&&(e["@_endSnd"]=n.hyperlinkEndSound?"1":"0");}},BDe=class extends FDe{createParagraphsFromTextContent(t,e,n,r){let o=this.textAlignToDrawingValue(e?.align),i={spacingBefore:this.createParagraphSpacingXmlFromPx(e?.paragraphSpacingBefore),spacingAfter:this.createParagraphSpacingXmlFromPx(e?.paragraphSpacingAfter),lineSpacing:this.createLineSpacingXmlFromMultiplier(e?.lineSpacing),lineSpacingExactPt:e?.lineSpacingExactPt},s=(v,S,w,C)=>{let T=aDe(e,o,S,i,w);return cDe(v,T,C)},a=(v,S)=>({"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:t":v}),l=(v,S,w,C)=>({"@_type":w,...C?{"@_id":C}:{},"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:t":v}),c=(v,S)=>{let w={};v.rubyAlignment&&(w["@_algn"]=v.rubyAlignment),v.rubyFontSize!==void 0&&(w["@_hps"]=String(Math.round(v.rubyFontSize*2)));let T={"a:rPr":this.createRunPropertiesFromTextStyle(v.rubyStyle??S,r),"a:t":v.rubyText??""},M={"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:t":v.text};return {"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:ruby":{"a:rubyPr":w,"a:rt":{"a:r":T},"a:rubyBase":{"a:r":M}}}},u=[],d=[],p,f,h,m=()=>{d.length===0&&d.push(a("",e)),u.push(s(d,p,f,h)),d=[],p=void 0,f=void 0,h=void 0;};if(n&&n.length>0){let v=uDe(e,n);return n.forEach(S=>{let w={...e,...S.style,...v};if(d.length===0&&(S.bulletInfo&&(p=S.bulletInfo),S.paragraphLevel!==void 0&&(f=S.paragraphLevel),S.endParaRunProperties&&(h=S.endParaRunProperties)),S.isLineBreak){let E={};S.breakRunProperties&&typeof S.breakRunProperties=="object"?E["a:rPr"]={...S.breakRunProperties}:E["a:rPr"]=this.createRunPropertiesFromTextStyle(w,r),E.__isLineBreak=true,d.push(E);return}if(S.equationXml&&typeof S.equationXml=="object"){let E={__isEquation:true,__equationXml:S.equationXml};d.push(E);return}let T=String(S.text??"").split(`
264
+ `,isParagraphBreak:true,style:{}});}),this.slideValue.notesSegments=n;}},Bq={title:"Title Slide",tx:"Title and Text",twoColTx:"Two Column Text",tbl:"Title and Table",txOverObj:"Text Over Object",obj:"Title and Content",txAndObj:"Text and Content",objAndTx:"Content and Text",objOverTx:"Object Over Text",twoObj:"Two Content",twoObjAndObj:"Two Content and Content",objAndTwoObj:"Content and Two Content",twoObjAndTx:"Two Content and Text",twoObjOverTx:"Two Content Over Text",fourObj:"Four Content",twoTxTwoObj:"Comparison",blank:"Blank",vertTx:"Vertical Text",clipArtAndTx:"Clip Art and Text",clipArtAndVertTx:"Clip Art and Vertical Text",vertTitleAndTx:"Vertical Title and Text",vertTitleAndTxOverChart:"Vertical Title and Text Over Chart",titleOnly:"Title Only",objTx:"Content with Caption",picTx:"Picture with Caption",secHead:"Section Header",objOnly:"Object Only",mediaAndTx:"Media and Text",dgm:"Diagram",chart:"Chart",cust:"Custom"};pQ="http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin",XPe="http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature",jPe="urn:pptx-viewer:ooxml-signature:v1",YPe="http://www.w3.org/2000/09/xmldsig#",KPe="http://schemas.openxmlformats.org/package/2006/RelationshipTransform",fQ="http://www.w3.org/2000/09/xmldsig#enveloped-signature",qPe=new Set(["http://www.w3.org/TR/2001/REC-xml-c14n-20010315","http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments","http://www.w3.org/2001/10/xml-exc-c14n#","http://www.w3.org/2001/10/xml-exc-c14n#WithComments",fQ]),ZPe="PPTX_VIEWER_TRUST_ROOTS_FILE",JPe="PPTX_VIEWER_TRUST_ROOTS_PEM",QPe="PPTX_VIEWER_REQUIRE_REVOCATION_CHECK",eAe="PPTX_VIEWER_FAIL_ON_REVOCATION_UNKNOWN",tAe="PPTX_VIEWER_REQUIRE_TIMESTAMP",nAe={"http://www.w3.org/2000/09/xmldsig#sha1":"sha1","http://www.w3.org/2001/04/xmlenc#sha256":"sha256","http://www.w3.org/2001/04/xmlenc#sha384":"sha384","http://www.w3.org/2001/04/xmlenc#sha512":"sha512"},hQ={"http://www.w3.org/2000/09/xmldsig#sha1":"SHA-1","http://www.w3.org/2001/04/xmlenc#sha256":"SHA-256","http://www.w3.org/2001/04/xmlenc#sha384":"SHA-384","http://www.w3.org/2001/04/xmlenc#sha512":"SHA-512"},mQ="_xmlsignatures/";yQ=500*1024*1024,ZP=65536,OB=class extends Error{code="ZIP_BOMB";uncompressedBytes;limit;entryCount;constructor(t,e){super(t),this.name="ZipBombError",this.uncompressedBytes=e.uncompressedBytes,this.limit=e.limit,this.entryCount=e.entryCount;}},aAe=34,lAe=20556,cAe=4,uAe=268435456;Oq=32,UB=16,fAe=/\{?([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}?/i;hAe={linear:"linear",exp:"exponential",log:"logarithmic",poly:"polynomial",power:"power",movingAvg:"movingAvg"},mAe={both:"both",minus:"minus",plus:"plus"},gAe={cust:"cust",fixedVal:"fixedVal",percentage:"percentage",stdDev:"stdDev",stdErr:"stdErr"};xAe={circle:"circle",dash:"dash",diamond:"diamond",dot:"dot",none:"none",picture:"picture",plus:"plus",square:"square",star:"star",triangle:"triangle",x:"x",auto:"auto"};yAe={catAx:"catAx",valAx:"valAx",dateAx:"dateAx",serAx:"serAx"};SAe=new Set(["hundreds","thousands","tenThousands","hundredThousands","millions","tenMillions","hundredMillions","billions","trillions"]);NAe=2e3,DAe={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",magenta:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",lime:"#00ff00",aqua:"#00ffff",teal:"#008080",navy:"#000080",fuchsia:"#ff00ff",purple:"#800080",orange:"#ffa500",window:"#ffffff",windowtext:"#000000",buttonface:"#f0f0f0",infobk:"#ffffe1"};LAe=9525,FAe=.75;GAe={1:"rect",2:"parallelogram",3:"trapezoid",4:"diamond",5:"pentagon",6:"hexagon",7:"heptagon",8:"octagon",9:"decagon",10:"dodecagon",13:"cube",16:"can",20:"straightConnector1",21:"bentConnector3",22:"curvedConnector3",23:"line",24:"line",32:"rect",33:"rect",34:"rect",75:"rect",109:"cloudCallout",110:"borderCallout1",172:"ellipse",173:"rect",183:"sun",184:"moon",185:"bracketPair",186:"bracePair",187:"star4",188:"star5",189:"star8",202:"rect"};zg=new Set(["v:shape","v:rect","v:oval","v:line","v:roundrect","v:polyline","v:arc","v:group","v:image"]);o4=new Set(["p14","p15","p16","p16r3","p228","p232","a14","a15","a16","asvg","aclsl","asl","w14","w15","c16","c16r3","cx","x14"]);gA=new Set(["p:sp","p:pic","p:graphicFrame","p:grpSp","p:cxnSp","p:contentPart","p16:model3D",...zg]);nd=["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],rd={bg1:"lt1",tx1:"dk1",bg2:"lt2",tx2:"dk2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink"};wRe={nextslide:"nextSlide",previousslide:"prevSlide",firstslide:"firstSlide",lastslide:"lastSlide",endshow:"endShow"};TRe={"video/mp4":"mp4","video/webm":"webm","video/ogg":"ogv","video/quicktime":"mov","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","audio/mpeg":"mp3","audio/mp3":"mp3","audio/mp4":"m4a","audio/x-m4a":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/flac":"flac","image/jpeg":"jpg","image/png":"png","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","application/octet-stream":"bin"},_Re=new Set(["pptx-resource:","blob:","data:"]);bA=["#4472C4","#ED7D31","#A5A5A5","#FFC000","#5B9BD5","#70AD47"];jQ=0;YQ=256;tee=0;xke=new Uint8Array([208,207,17,224,161,27,26,225]),Wq=new Uint8Array([80,75]);FA=class extends Error{isEncrypted=true;constructor(t){super(t),this.name="EncryptedFileError";}},KB=new Uint8Array([208,207,17,224,161,27,26,225]),Ch=4294967294,yke=4294967295,bke=4294967293,Pg=4294967290,vke=0,qB=2,eA=5,zw=128,Ng=class extends Error{constructor(t){super(t),this.name="Ole2ParseError";}};ZB=class extends Error{constructor(t="The password is incorrect."){super(t),this.name="IncorrectPasswordError";}},iee=class extends Error{constructor(t="Data integrity check failed. The encrypted file may be corrupted or tampered with."){super(t),this.name="DataIntegrityError";}};Es={verifierHashInput:new Uint8Array([254,167,210,118,59,75,158,121]),verifierHashValue:new Uint8Array([215,170,15,109,48,97,52,78]),encryptedKeyValue:new Uint8Array([20,110,11,231,171,172,208,214]),dataIntegrityHmacKey:new Uint8Array([95,178,173,1,12,185,225,246]),dataIntegrityHmacValue:new Uint8Array([160,103,127,2,178,44,132,51])};Zq=new Set(["scatter","bubble"]),Zke=new Set(["bar","line","area","bar3D","line3D","area3D"]);UA=["list","process","hierarchy","cycle","matrix","pyramid","funnel","target","gear","venn","timeline","relationship","chevron","bending"];NP=12700;xee=[["http://purl.oclc.org/ooxml/presentationml/main","http://schemas.openxmlformats.org/presentationml/2006/main"],["http://purl.oclc.org/ooxml/drawingml/main","http://schemas.openxmlformats.org/drawingml/2006/main"],["http://purl.oclc.org/ooxml/drawingml/chart","http://schemas.openxmlformats.org/drawingml/2006/chart"],["http://purl.oclc.org/ooxml/drawingml/chartDrawing","http://schemas.openxmlformats.org/drawingml/2006/chartDrawing"],["http://purl.oclc.org/ooxml/drawingml/diagram","http://schemas.openxmlformats.org/drawingml/2006/diagram"],["http://purl.oclc.org/ooxml/drawingml/lockedCanvas","http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"],["http://purl.oclc.org/ooxml/drawingml/picture","http://schemas.openxmlformats.org/drawingml/2006/picture"],["http://purl.oclc.org/ooxml/drawingml/spreadsheetDrawing","http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"],["http://purl.oclc.org/ooxml/drawingml/wordprocessingDrawing","http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"],["http://purl.oclc.org/ooxml/officeDocument/relationships","http://schemas.openxmlformats.org/officeDocument/2006/relationships"],["http://purl.oclc.org/ooxml/officeDocument/relationships/chart","http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"],["http://purl.oclc.org/ooxml/officeDocument/relationships/comments","http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"],["http://purl.oclc.org/ooxml/officeDocument/relationships/customXml","http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramColors","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramColors"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramData","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramLayout","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramLayout"],["http://purl.oclc.org/ooxml/officeDocument/relationships/diagramStyle","http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramStyle"],["http://purl.oclc.org/ooxml/officeDocument/relationships/extended-properties","http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"],["http://purl.oclc.org/ooxml/officeDocument/relationships/font","http://schemas.openxmlformats.org/officeDocument/2006/relationships/font"],["http://purl.oclc.org/ooxml/officeDocument/relationships/handoutMaster","http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster"],["http://purl.oclc.org/ooxml/officeDocument/relationships/hyperlink","http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"],["http://purl.oclc.org/ooxml/officeDocument/relationships/image","http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"],["http://purl.oclc.org/ooxml/officeDocument/relationships/media","http://schemas.openxmlformats.org/officeDocument/2006/relationships/media"],["http://purl.oclc.org/ooxml/officeDocument/relationships/notesMaster","http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster"],["http://purl.oclc.org/ooxml/officeDocument/relationships/notesSlide","http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesSlide"],["http://purl.oclc.org/ooxml/officeDocument/relationships/oleObject","http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"],["http://purl.oclc.org/ooxml/officeDocument/relationships/presProps","http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps"],["http://purl.oclc.org/ooxml/officeDocument/relationships/slide","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"],["http://purl.oclc.org/ooxml/officeDocument/relationships/slideLayout","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"],["http://purl.oclc.org/ooxml/officeDocument/relationships/slideMaster","http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster"],["http://purl.oclc.org/ooxml/officeDocument/relationships/tags","http://schemas.openxmlformats.org/officeDocument/2006/relationships/tags"],["http://purl.oclc.org/ooxml/officeDocument/relationships/theme","http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme"],["http://purl.oclc.org/ooxml/officeDocument/relationships/themeOverride","http://schemas.openxmlformats.org/officeDocument/2006/relationships/themeOverride"],["http://purl.oclc.org/ooxml/officeDocument/relationships/video","http://schemas.openxmlformats.org/officeDocument/2006/relationships/video"],["http://purl.oclc.org/ooxml/officeDocument/relationships/audio","http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio"],["http://purl.oclc.org/ooxml/officeDocument/relationships/viewProps","http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps"],["http://purl.oclc.org/ooxml/officeDocument/relationships/tableStyles","http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles"],["http://purl.oclc.org/ooxml/officeDocument/math","http://schemas.openxmlformats.org/officeDocument/2006/math"],["http://purl.oclc.org/ooxml/officeDocument/bibliography","http://schemas.openxmlformats.org/officeDocument/2006/bibliography"],["http://purl.oclc.org/ooxml/officeDocument/custom-properties","http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"],["http://purl.oclc.org/ooxml/officeDocument/extended-properties","http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"],["http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes","http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"],["http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument","http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"],["http://purl.oclc.org/ooxml/schemaLibrary/main","http://schemas.openxmlformats.org/schemaLibrary/2006/main"],["http://purl.oclc.org/ooxml/descriptions/base","http://descriptions.openxmlformats.org/description/base"],["http://purl.oclc.org/ooxml/descriptions/full","http://descriptions.openxmlformats.org/description/full"],["http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.openxmlformats.org/spreadsheetml/2006/main"],["http://purl.oclc.org/ooxml/wordprocessingml/main","http://schemas.openxmlformats.org/wordprocessingml/2006/main"]],tIe=new Map(xee),yee=new Map(xee.map(([t,e])=>[e,t])),JB="http://purl.oclc.org/ooxml/",QB="http://schemas.openxmlformats.org/",bee=new Set(["presentationml","drawingml","spreadsheetml","wordprocessingml","officeDocument","schemaLibrary"]);Jq=12,iIe=1.3,sIe=.6,DP=7;Qq=2;HA={Calibri:["Carlito","Liberation Sans","Arial","sans-serif"],"Calibri Light":["Carlito","Liberation Sans","Arial","sans-serif"],Cambria:["Caladea","Liberation Serif","Times New Roman","serif"],"Cambria Math":["STIX Two Math","Latin Modern Math","Times New Roman","serif"],Consolas:["Liberation Mono","Courier New","monospace"],"Segoe UI":["Liberation Sans","Helvetica Neue","Arial","sans-serif"],"Segoe UI Light":["Liberation Sans","Helvetica Neue","Arial","sans-serif"],"Segoe UI Semibold":["Liberation Sans","Helvetica Neue","Arial","sans-serif"],"Times New Roman":["Liberation Serif","Times","serif"],Arial:["Liberation Sans","Helvetica","sans-serif"],"Arial Black":["Liberation Sans","Helvetica","sans-serif"],"Arial Narrow":["Liberation Sans Narrow","Helvetica Neue","sans-serif"],"Courier New":["Liberation Mono","Courier","monospace"],Verdana:["DejaVu Sans","Bitstream Vera Sans","sans-serif"],Georgia:["Liberation Serif","Times New Roman","serif"],Tahoma:["DejaVu Sans","Liberation Sans","sans-serif"],Trebuchet:["Liberation Sans","sans-serif"],"Trebuchet MS":["Liberation Sans","sans-serif"],"Comic Sans MS":["Comic Neue","cursive"],Impact:["Charcoal","sans-serif"],"Lucida Console":["Liberation Mono","monospace"],"Lucida Sans Unicode":["Lucida Grande","Liberation Sans","sans-serif"],Palatino:["Palatino Linotype","Book Antiqua","serif"],"Palatino Linotype":["Palatino","Book Antiqua","serif"],"Book Antiqua":["Palatino Linotype","Palatino","serif"],"MS PGothic":["Noto Sans CJK JP","Hiragino Sans","Yu Gothic","sans-serif"],"MS PMincho":["Noto Serif CJK JP","Hiragino Mincho ProN","Yu Mincho","serif"],"MS Gothic":["Noto Sans CJK JP","Hiragino Sans","Yu Gothic","sans-serif"],"MS Mincho":["Noto Serif CJK JP","Hiragino Mincho ProN","Yu Mincho","serif"],SimSun:["Noto Serif CJK SC","STSong","serif"],SimHei:["Noto Sans CJK SC","STHeiti","sans-serif"],"Microsoft YaHei":["Noto Sans CJK SC","PingFang SC","sans-serif"],NSimSun:["Noto Serif CJK SC","STSong","serif"],FangSong:["Noto Serif CJK SC","STFangsong","serif"],KaiTi:["Noto Serif CJK SC","STKaiti","serif"],Batang:["Noto Serif CJK KR","AppleMyungjo","serif"],Dotum:["Noto Sans CJK KR","AppleGothic","sans-serif"],Gulim:["Noto Sans CJK KR","AppleGothic","sans-serif"],Malgun:["Noto Sans CJK KR","Apple SD Gothic Neo","sans-serif"],"Malgun Gothic":["Noto Sans CJK KR","Apple SD Gothic Neo","sans-serif"],"Arabic Typesetting":["Noto Naskh Arabic","serif"],"Simplified Arabic":["Noto Sans Arabic","sans-serif"],"Traditional Arabic":["Noto Naskh Arabic","serif"],Mangal:["Noto Sans Devanagari","sans-serif"],Vrinda:["Noto Sans Bengali","sans-serif"],Raavi:["Noto Sans Gurmukhi","sans-serif"],Shruti:["Noto Sans Gujarati","sans-serif"],Tunga:["Noto Sans Kannada","sans-serif"],Kartika:["Noto Sans Malayalam","sans-serif"],Iskoola:["Noto Sans Sinhala","sans-serif"],"Iskoola Pota":["Noto Sans Sinhala","sans-serif"],Leelawadee:["Noto Sans Thai","sans-serif"],"Leelawadee UI":["Noto Sans Thai","sans-serif"],"Cordia New":["Noto Sans Thai","sans-serif"],DokChampa:["Noto Sans Lao","sans-serif"],Nyala:["Noto Sans Ethiopic","sans-serif"],MoolBoran:["Noto Sans Khmer","sans-serif"],"Century Gothic":["URW Gothic","Futura","sans-serif"],"Franklin Gothic":["Liberation Sans","Helvetica Neue","sans-serif"],"Franklin Gothic Medium":["Liberation Sans","Helvetica Neue","sans-serif"],Garamond:["EB Garamond","Cormorant Garamond","serif"],"Tw Cen MT":["Century Gothic","Futura","sans-serif"],Rockwell:["Roboto Slab","Rockwell","serif"],Candara:["Liberation Sans","Optima","sans-serif"],Constantia:["Liberation Serif","Palatino","serif"],Corbel:["Liberation Sans","Lucida Grande","sans-serif"]},Pee={0:"sans-serif",1:"sans-serif",2:"serif",3:"cursive",4:"fantasy",5:"sans-serif"},Aee=new Set([11,12,13]),Ree=9,kee={1:100,2:100,3:200,4:300,5:400,6:500,7:600,8:700,9:800,10:900,11:900},Iee={serif:["Times New Roman","Georgia","serif"],"sans-serif":["Arial","Helvetica","sans-serif"],monospace:["Courier New","Consolas","monospace"],cursive:["Comic Sans MS","cursive"],fantasy:["Impact","fantasy"]};gIe=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);yIe=["[Content_Types].xml","_rels/.rels","ppt/presentation.xml"],LP={rels:"application/vnd.openxmlformats-package.relationships+xml",xml:"application/xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",emf:"image/x-emf",wmf:"image/x-wmf",svg:"image/svg+xml",mp4:"video/mp4",mp3:"audio/mpeg",wav:"audio/wav",bin:"application/vnd.ms-office.vbaProject"},tZ={"/ppt/presentation.xml":"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml","/ppt/presProps.xml":"application/vnd.openxmlformats-officedocument.presentationml.presProps+xml","/ppt/viewProps.xml":"application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml","/ppt/tableStyles.xml":"application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml","/docProps/core.xml":"application/vnd.openxmlformats-package.core-properties+xml","/docProps/app.xml":"application/vnd.ms-officedocument.extended-properties+xml"},bIe="application/vnd.openxmlformats-officedocument.presentationml.slide+xml",vIe="application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml",SIe="application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml",wIe="application/vnd.openxmlformats-officedocument.theme+xml";HIe=new Set(["image","picture"]),zIe=new Set(["image","picture","chart","smartArt","media"]);eb=["fromBottom","fromLeft","fromRight","fromTop"],BP=["toBottom","toLeft","toRight","toTop"],eNe=["fromBottom","fromLeft","fromRight","fromTop","fromBottomLeft","fromBottomRight","fromTopLeft","fromTopRight"],tNe=["toBottom","toLeft","toRight","toTop","toBottomLeft","toBottomRight","toTopLeft","toTopRight"],Tp=["horizontal","vertical"],$ee=["horizontalIn","horizontalOut","verticalIn","verticalOut"],bh=["in","out"],nNe=["inFromScreenCenter","inSlightly","objectCenter"],rNe=["outFromScreenCenter","outSlightly","objectCenter"],Gw=["clockwise","counterClockwise"],Hee=["1spoke","2spoke","3spoke","4spoke","8spoke"],zee=["across","down"],VA=[{presetId:"entr.1",label:"Appear",category:"entrance",defaultDurationMs:0,hasDirection:false,hasTextBuild:true},{presetId:"entr.2",label:"Fly In",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:eNe,hasTextBuild:true},{presetId:"entr.3",label:"Blinds",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.4",label:"Box",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.5",label:"Checkerboard",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:zee,hasTextBuild:true},{presetId:"entr.6",label:"Circle",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.7",label:"Crawl In",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.8",label:"Diamond",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.9",label:"Dissolve In",category:"entrance",defaultDurationMs:700,hasDirection:false,hasTextBuild:true},{presetId:"entr.10",label:"Fade",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.11",label:"Flash Bulb",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"entr.12",label:"Flash Once",category:"entrance",defaultDurationMs:300,hasDirection:false,hasTextBuild:false},{presetId:"entr.13",label:"Plus",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"entr.14",label:"Random Bars",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.15",label:"Spiral In",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.16",label:"Peek In",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.17",label:"Split",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:$ee,hasTextBuild:true},{presetId:"entr.18",label:"Stretch",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:["fromBottom","fromLeft","fromRight","fromTop","across"],hasTextBuild:true},{presetId:"entr.19",label:"Strips",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:["leftDown","leftUp","rightDown","rightUp"],hasTextBuild:true},{presetId:"entr.20",label:"Wedge",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.21",label:"Wheel",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:Hee,hasTextBuild:true},{presetId:"entr.22",label:"Wipe",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.23",label:"Zoom",category:"entrance",defaultDurationMs:500,hasDirection:true,directions:nNe,hasTextBuild:true},{presetId:"entr.24",label:"Random Effects",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"entr.25",label:"Boomerang",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.26",label:"Rise Up",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.27",label:"Credits",category:"entrance",defaultDurationMs:8e3,hasDirection:false,hasTextBuild:false},{presetId:"entr.28",label:"Float Up",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.29",label:"Pinwheel",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.30",label:"Spinner",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:Gw,hasTextBuild:true},{presetId:"entr.31",label:"Expand",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.32",label:"Whip",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.33",label:"Arrive",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.34",label:"Basic Swivel",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.35",label:"Beveled Arrival",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.36",label:"Curve Up",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.37",label:"Bounce",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.38",label:"Fold",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.39",label:"Faded Swivel",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.40",label:"Faded Zoom",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.41",label:"Light Speed",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.42",label:"Float In",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.43",label:"Flip",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.44",label:"Glide",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.45",label:"Grow & Rotate",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.46",label:"Grow with Color",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.47",label:"Swivel",category:"entrance",defaultDurationMs:1e3,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.48",label:"Magnify",category:"entrance",defaultDurationMs:1500,hasDirection:false,hasTextBuild:true},{presetId:"entr.49",label:"Pinwheel IV",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.50",label:"Sling",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.51",label:"Compress",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.52",label:"Unfold",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.53",label:"Grow & Turn",category:"entrance",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"entr.54",label:"Zoom Rotate",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.55",label:"Curvy Star",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.56",label:"Rotate",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.57",label:"Center Revolve",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.58",label:"Thread",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.59",label:"Drop In",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.60",label:"Ascend",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.61",label:"Descend",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.62",label:"Center Stage",category:"entrance",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"entr.63",label:"Ease In",category:"entrance",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"entr.64",label:"Stretchy",category:"entrance",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"entr.65",label:"Zip",category:"entrance",defaultDurationMs:600,hasDirection:false,hasTextBuild:true},{presetId:"entr.66",label:"Bars",category:"entrance",defaultDurationMs:600,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"entr.67",label:"Cover",category:"entrance",defaultDurationMs:700,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"entr.68",label:"Reveal",category:"entrance",defaultDurationMs:700,hasDirection:true,directions:eb,hasTextBuild:true}],WA=[{presetId:"exit.1",label:"Disappear",category:"exit",defaultDurationMs:0,hasDirection:false,hasTextBuild:true},{presetId:"exit.2",label:"Fly Out",category:"exit",defaultDurationMs:500,hasDirection:true,directions:tNe,hasTextBuild:true},{presetId:"exit.3",label:"Blinds",category:"exit",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.4",label:"Box",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.5",label:"Checkerboard",category:"exit",defaultDurationMs:500,hasDirection:true,directions:zee,hasTextBuild:true},{presetId:"exit.6",label:"Circle",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.7",label:"Crawl Out",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:BP,hasTextBuild:true},{presetId:"exit.8",label:"Diamond",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.9",label:"Dissolve Out",category:"exit",defaultDurationMs:700,hasDirection:false,hasTextBuild:true},{presetId:"exit.10",label:"Fade",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.11",label:"Flash Bulb",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"exit.12",label:"Flash Once",category:"exit",defaultDurationMs:300,hasDirection:false,hasTextBuild:false},{presetId:"exit.13",label:"Plus",category:"exit",defaultDurationMs:500,hasDirection:true,directions:bh,hasTextBuild:true},{presetId:"exit.14",label:"Random Bars",category:"exit",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.15",label:"Spiral Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.16",label:"Peek Out",category:"exit",defaultDurationMs:500,hasDirection:true,directions:BP,hasTextBuild:true},{presetId:"exit.17",label:"Split",category:"exit",defaultDurationMs:500,hasDirection:true,directions:$ee,hasTextBuild:true},{presetId:"exit.18",label:"Collapse",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.19",label:"Strips",category:"exit",defaultDurationMs:500,hasDirection:true,directions:["leftDown","leftUp","rightDown","rightUp"],hasTextBuild:true},{presetId:"exit.20",label:"Wedge",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.21",label:"Wheel",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:Hee,hasTextBuild:true},{presetId:"exit.22",label:"Wipe",category:"exit",defaultDurationMs:500,hasDirection:true,directions:eb,hasTextBuild:true},{presetId:"exit.23",label:"Zoom",category:"exit",defaultDurationMs:500,hasDirection:true,directions:rNe,hasTextBuild:true},{presetId:"exit.24",label:"Random Effects",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"exit.25",label:"Boomerang",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.26",label:"Sink Down",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.27",label:"Credits",category:"exit",defaultDurationMs:8e3,hasDirection:false,hasTextBuild:false},{presetId:"exit.28",label:"Float Down",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.29",label:"Pinwheel",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.30",label:"Spinner",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:Gw,hasTextBuild:true},{presetId:"exit.31",label:"Contract",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.32",label:"Whip",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.33",label:"Leave",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.34",label:"Basic Swivel",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.35",label:"Beveled Departure",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.36",label:"Curve Down",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.37",label:"Bounce",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.38",label:"Unfold",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.39",label:"Faded Swivel",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.40",label:"Faded Zoom",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.41",label:"Light Speed",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.42",label:"Float Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.43",label:"Flip",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.44",label:"Glide",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.45",label:"Shrink & Rotate",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.46",label:"Shrink with Color",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.47",label:"Swivel",category:"exit",defaultDurationMs:1e3,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.48",label:"Shrink & Turn",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.49",label:"Pinwheel IV",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.50",label:"Sling",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.51",label:"Stretch Out",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.52",label:"Fold Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.53",label:"Shrink & Spin",category:"exit",defaultDurationMs:500,hasDirection:false,hasTextBuild:true},{presetId:"exit.54",label:"Zoom Rotate",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.55",label:"Curvy Star",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.56",label:"Rotate",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.57",label:"Center Revolve",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.58",label:"Thread Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.59",label:"Drop Out",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.60",label:"Ascend",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.61",label:"Descend",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.62",label:"Exit Stage",category:"exit",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:true},{presetId:"exit.63",label:"Ease Out",category:"exit",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"exit.64",label:"Stretchy",category:"exit",defaultDurationMs:800,hasDirection:false,hasTextBuild:true},{presetId:"exit.65",label:"Zip Out",category:"exit",defaultDurationMs:600,hasDirection:false,hasTextBuild:true},{presetId:"exit.66",label:"Bars Out",category:"exit",defaultDurationMs:600,hasDirection:true,directions:Tp,hasTextBuild:true},{presetId:"exit.67",label:"Uncover",category:"exit",defaultDurationMs:700,hasDirection:true,directions:BP,hasTextBuild:true},{presetId:"exit.68",label:"Conceal",category:"exit",defaultDurationMs:700,hasDirection:true,directions:BP,hasTextBuild:true}],XA=[{presetId:"emph.1",label:"Bold Flash",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.2",label:"Color Wave",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.3",label:"Brush on Color",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.4",label:"Brush on Underline",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.5",label:"Change Font",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.6",label:"Grow/Shrink",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.7",label:"Change Font Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.8",label:"Spin",category:"emphasis",defaultDurationMs:1e3,hasDirection:true,directions:Gw,hasTextBuild:false},{presetId:"emph.9",label:"Transparency",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.10",label:"Change Font Size",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.11",label:"Change Font Style",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.12",label:"Grow with Color",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.13",label:"Desaturate",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.14",label:"Teeter",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.15",label:"Vertical Highlight",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.16",label:"Wave",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.17",label:"Blast",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.18",label:"Bold Reveal",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.19",label:"Wash Out",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.20",label:"Shimmer",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.21",label:"Flicker",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.22",label:"Grow with Color (Sustain)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.23",label:"Lighten",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.24",label:"Darken",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.25",label:"Style Emphasis",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.26",label:"Pulse",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.27",label:"Color Pulse",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.28",label:"Color Blend",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.29",label:"Complementary Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.30",label:"Complementary Color 2",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.31",label:"Contrasting Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.32",label:"Pulse Once",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.33",label:"Underline",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.34",label:"Bold Flash (Variant)",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.35",label:"Teeter (Variant)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.36",label:"Wave (Variant)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.37",label:"Object Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.38",label:"Fill Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.39",label:"Line Color",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.40",label:"Brush on Color (Sustain)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.41",label:"Color Wave (Sustain)",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.42",label:"Flash",category:"emphasis",defaultDurationMs:300,hasDirection:false,hasTextBuild:false},{presetId:"emph.43",label:"Flicker Slow",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.44",label:"Grow Big",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.45",label:"Shrink Small",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.46",label:"Color Lighten",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.47",label:"Color Darken",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.48",label:"Bold Italics",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.49",label:"Spin Slow",category:"emphasis",defaultDurationMs:2e3,hasDirection:true,directions:Gw,hasTextBuild:false},{presetId:"emph.50",label:"Spin Fast",category:"emphasis",defaultDurationMs:500,hasDirection:true,directions:Gw,hasTextBuild:false},{presetId:"emph.51",label:"Wobble",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.52",label:"Jiggle",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.53",label:"Bounce In Place",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.54",label:"Heartbeat",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.55",label:"Glow",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.56",label:"Brighten",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.57",label:"Dim",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.58",label:"Saturate",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.59",label:"Color Cycle",category:"emphasis",defaultDurationMs:1500,hasDirection:false,hasTextBuild:false},{presetId:"emph.60",label:"Rainbow",category:"emphasis",defaultDurationMs:1500,hasDirection:false,hasTextBuild:false},{presetId:"emph.61",label:"Shake",category:"emphasis",defaultDurationMs:500,hasDirection:true,directions:Tp,hasTextBuild:false},{presetId:"emph.62",label:"Vibrate",category:"emphasis",defaultDurationMs:500,hasDirection:false,hasTextBuild:false},{presetId:"emph.63",label:"Sway",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false},{presetId:"emph.64",label:"Bob",category:"emphasis",defaultDurationMs:1e3,hasDirection:false,hasTextBuild:false}],U4=[{presetId:"path.line.up",label:"Lines: Up",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.down",label:"Lines: Down",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.left",label:"Lines: Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.right",label:"Lines: Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.upLeft",label:"Lines: Up-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.upRight",label:"Lines: Up-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.downLeft",label:"Lines: Down-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.line.downRight",label:"Lines: Down-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.up",label:"Arcs: Up",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.down",label:"Arcs: Down",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.left",label:"Arcs: Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.arc.right",label:"Arcs: Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.upLeft",label:"Turns: Up-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.upRight",label:"Turns: Up-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.downLeft",label:"Turns: Down-Left",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.downRight",label:"Turns: Down-Right",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.turn.uTurn",label:"Turns: U-Turn",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.circle",label:"Shapes: Circle",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.diamond",label:"Shapes: Diamond",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.hexagon",label:"Shapes: Hexagon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.octagon",label:"Shapes: Octagon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.parallelogram",label:"Shapes: Parallelogram",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.pentagon",label:"Shapes: Pentagon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.rightTriangle",label:"Shapes: Right Triangle",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.equilateralTriangle",label:"Shapes: Equilateral Triangle",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.trapezoid",label:"Shapes: Trapezoid",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.square",label:"Shapes: Square",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star4",label:"Shapes: 4 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star5",label:"Shapes: 5 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star6",label:"Shapes: 6 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.star8",label:"Shapes: 8 Point Star",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.crescent",label:"Shapes: Crescent Moon",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.heart",label:"Shapes: Heart",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.football",label:"Shapes: Football",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.teardrop",label:"Shapes: Teardrop",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.deCay",label:"Loops: Decaying Wave",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8",label:"Loops: Figure 8",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8Four",label:"Loops: Figure 8 Four",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.horizFigure8",label:"Loops: Horizontal Figure 8",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.vertFigure8",label:"Loops: Vertical Figure 8",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.loopDeLoop",label:"Loops: Loop de Loop",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.neutron",label:"Loops: Neutron",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.peanut",label:"Loops: Peanut",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.pretzel",label:"Loops: Pretzel",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.spring",label:"Loops: Spring",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.swoosh",label:"Loops: Swoosh",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.zigzag",label:"Loops: Zigzag",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.heartBeat",label:"Loops: Heartbeat",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.curvyLeft",label:"Loops: Curvy Left",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.curvyRight",label:"Loops: Curvy Right",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.curvyStar",label:"Loops: Curvy Star",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8Side",label:"Loops: Figure 8 Side",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.spiral",label:"Loops: Spiral",category:"motionPath",defaultDurationMs:3e3,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.wave",label:"Loops: Wave",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.bean",label:"Loops: Bean",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.buzzSaw",label:"Loops: Buzz Saw",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.cogwheel",label:"Loops: Cogwheel",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.cornerStar",label:"Loops: Corner Star",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.crossPath",label:"Loops: Cross",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.diamond4",label:"Loops: Diamond 4",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.fanIn",label:"Loops: Fan In",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.figure8Top",label:"Loops: Figure 8 Top",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.heartBig",label:"Loops: Big Heart",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.inverted",label:"Loops: Inverted",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.loop.plus",label:"Loops: Plus",category:"motionPath",defaultDurationMs:2500,hasDirection:false,hasTextBuild:false},{presetId:"path.custom",label:"Custom Path",category:"motionPath",defaultDurationMs:2e3,hasDirection:false,hasTextBuild:false}],Gee=[...VA,...WA,...XA,...U4];lNe="http://schemas.openxmlformats.org/drawingml/2006/chart",cNe="http://schemas.openxmlformats.org/drawingml/2006/main",uNe="http://schemas.openxmlformats.org/officeDocument/2006/relationships",Og=111111111,Ug=222222222,dNe=new Set(["scatter","bubble"]);Wee=new Set(["minorGridlines","title","numFmt","majorTickMark","minorTickMark","tickLblPos","spPr","txPr","crossAx","crosses","crossesAt","crossBetween","majorUnit","minorUnit","dispUnits","extLst"]),wNe=new Set([...Wee].filter(t=>t!=="minorGridlines"));ENe=new Set(["numFmt","majorTickMark","minorTickMark","tickLblPos","spPr","txPr","crossAx","crosses","crossesAt","auto","lblAlgn","lblOffset","tickLblSkip","tickMarkSkip","noMultiLvlLbl","dispUnits","majorUnit","minorUnit","baseTimeUnit","majorTimeUnit","minorTimeUnit"]);aZ={bar:"barChart",line:"lineChart",area:"areaChart",pie:"pieChart",doughnut:"doughnutChart",scatter:"scatterChart",bubble:"bubbleChart",radar:"radarChart"};UNe=new Set(["dLbls","trendline","errBars","cat","val","xVal","yVal","bubbleSize","bubble3D","smooth","extLst"]);GNe=new Set(["idx","invertIfNegative","spPr","explosion"]);qNe=new Set(["dPt","dLbls","trendline","errBars","cat","val","xVal","yVal","bubbleSize","bubble3D","smooth","extLst"]);tDe={linear:"linear",exponential:"exp",logarithmic:"log",polynomial:"poly",power:"power",movingAvg:"movingAvg"};Fw=9525;pDe=class{zip;parser;builder;presentationData=null;slideMap=new Map;slideRelsMap=new Map;externalRelsMap=new Map;layoutCache=new Map;masterCache=new Map;layoutXmlMap=new Map;masterXmlMap=new Map;layoutPlaceholderDefaultsCache=new Map;masterPlaceholderDefaultsCache=new Map;presentationDefaultTextStyle;imageDataCache=new Map;blobUrlCache=new Set;eagerDecodeImages=false;allowExternalImages=false;orderedSlidePaths=[];themeColorMap={};themeFontMap={};themeFormatScheme;themeOverrideCache=new Map;currentSlideClrMapOverride=null;masterClrMaps=new Map;masterThemeColorMaps=new Map;masterThemeFontMaps=new Map;masterThemeFormatSchemes=new Map;masterThemePaths=new Map;masterThemeMajorFontScripts=new Map;masterThemeMinorFontScripts=new Map;masterThemeNames=new Map;masterThemeFontSchemeNames=new Map;masterThemeColorSchemeNames=new Map;originalThemeXmlByPath=new Map;dirtyThemePaths=new Set;masterTxStylesCache=new Map;masterThemeObjectDefaults=new Map;masterThemeExtraClrSchemeLst=new Map;masterThemeCustClrLst=new Map;masterThemeExtLst=new Map;currentMasterClrMap=null;globalThemeColorMapSnapshot={};globalThemeFontMapSnapshot={};globalThemeFormatSchemeSnapshot;thumbnailData=null;vbaProjectBin=null;vbaRelatedParts=new Map;signatureDetection=null;customXmlParts=[];alternateContentBlockByRawXml=new WeakMap;loadedEmbeddedFonts=[];commentAuthorMap=new Map;commentAuthorDetails=new Map;layoutOptions=[];compatibilityService;slideLoaderService;slideTransitionService;editorAnimationService;nativeAnimationService;animationWriteService;templateBackgroundService;xmlLookupService;dependencyFactory;rawSlideWidthEmu=0;rawSlideHeightEmu=0;rawSlideSizeType;elementXmlBuilder;contentTypesBuilder;elementTransformUpdater;presentationSaveBuilder;presentationSlidesReconciler;slideBackgroundBuilder;slideCommentPartWriter;slideMediaRelationshipBuilder;slideNotesPartUpdater;slideCommentsXmlFactory;commentAuthorsXmlFactory;colorStyleCodec;connectorParser;shapeStyleExtractor;tableDataParser;mediaDataParser;graphicFrameParser;documentPropertiesUpdater;static EMU_PER_PX=9525;static EDITOR_META_EXTENSION_URI="{A6F62C1B-B45C-4E8A-8B0A-1B3E5F8C8D4A}";static EDITOR_META_NAMESPACE_URI="http://schemas.pptx.ai/pptx/editor-meta";isStrictOoxml=false;_originalParser=null;detectAndSetStrictConformance(t){if(wee(t)&&(this.isStrictOoxml=true,Kw(t),!this._originalParser)){this._originalParser=this.parser;let e=this.parser;this.parser=new Proxy(e,{get(n,r,o){return r==="parse"?function(i,s){let a=n.parse(i,s??false);return typeof a=="object"&&a!==null&&Kw(a),a}:Reflect.get(n,r,o)}});}}restoreOriginalParser(){this._originalParser&&(this.parser=this._originalParser,this._originalParser=null);}},fDe=class extends pDe{async exportSlides(t,e){this.compatibilityService.reportWarning({code:"EXPORT_BACKEND_UNAVAILABLE",message:`Export to "${e.format}" requires a platform-specific rendering backend. No export backend is configured in this runtime.`,severity:"warning",scope:"presentation"});let n=e.slideIndices&&e.slideIndices.length>0?e.slideIndices:t.map((o,i)=>i),r=new Map;for(let o of n)!Number.isInteger(o)||o<0||o>=t.length||r.set(o,new Uint8Array);return r}normalizeTableStyleGuid(t){let e=t.trim().toUpperCase();return e.startsWith("{")?e:`{${e}}`}deriveTableStyleAccentKey(...t){for(let e of t)if(e?.schemeColor?.startsWith("accent"))return e.schemeColor}extractTableBackground(t){if(!t)return;let r=(t["a:fill"]?.["a:solidFill"]??t["a:solidFill"])?.["a:schemeClr"],o=r&&String(r["@_val"]||"").trim()||void 0,i=o?{schemeColor:o}:void 0,s=!!t["a:effectLst"];if(!(!i&&!s))return {...i?{fill:i}:{},...s?{hasEffectLst:s}:{}}}extractTableStyleSectionFill(t){if(!t)return;let e=t["a:tcStyle"];if(!e)return;let n=e["a:fill"];if(!n)return;let r=n["a:solidFill"];if(!r)return;let o=r["a:schemeClr"];if(!o)return;let i=String(o["@_val"]||"").trim()||void 0;if(!i)return;let s=o["a:tint"],a=s&&parseInt(String(s["@_val"]||"0"),10)||void 0,l=o["a:shade"],c=l&&parseInt(String(l["@_val"]||"0"),10)||void 0;return {schemeColor:i,tint:a,shade:c}}extractTableStyleSectionText(t){if(!t)return;let e=t["a:tcTxStyle"];if(!e)return;let n={},r=false;e["@_b"]==="on"&&(n.bold=true,r=true),e["@_i"]==="on"&&(n.italic=true,r=true);let i=e["a:fontRef"]?.["a:schemeClr"]??e["a:schemeClr"];if(i){let s=String(i["@_val"]||"").trim();if(s){n.fontSchemeColor=s,r=true;let a=i["a:tint"];a&&(n.fontTint=parseInt(String(a["@_val"]||"0"),10)||void 0);let l=i["a:shade"];l&&(n.fontShade=parseInt(String(l["@_val"]||"0"),10)||void 0);}}return r?n:void 0}ensureArray(t){return t?Array.isArray(t)?t:[t]:[]}async parseTableStyles(){let t=await this.zip.file("ppt/tableStyles.xml")?.async("string");if(t)try{let n=this.parser.parse(t)["a:tblStyleLst"];if(!n)return;let r=this.ensureArray(n["a:tblStyle"]);if(r.length===0)return;let o={};for(let i of r){let s=String(i["@_styleId"]||"").trim();if(!s)continue;let a=this.normalizeTableStyleGuid(s),l=String(i["@_styleName"]||"").trim()||void 0,c=this.extractTableStyleSectionFill(i["a:wholeTbl"]),u=this.extractTableStyleSectionFill(i["a:band1H"]),d=this.extractTableStyleSectionFill(i["a:band2H"]),p=this.extractTableStyleSectionFill(i["a:band1V"]),f=this.extractTableStyleSectionFill(i["a:band2V"]),h=this.extractTableStyleSectionFill(i["a:firstRow"]),m=this.extractTableStyleSectionFill(i["a:lastRow"]),g=this.extractTableStyleSectionFill(i["a:firstCol"]),x=this.extractTableStyleSectionFill(i["a:lastCol"]),v=this.extractTableStyleSectionFill(i["a:seCell"]),S=this.extractTableStyleSectionFill(i["a:swCell"]),w=this.extractTableStyleSectionFill(i["a:neCell"]),C=this.extractTableStyleSectionFill(i["a:nwCell"]),T=this.extractTableBackground(i["a:tblBg"]),E=this.deriveTableStyleAccentKey(c,u,p,h),M=["wholeTbl","firstRow","lastRow","firstCol","lastCol","band1H","band2H","band1V","band2V","seCell","swCell","neCell","nwCell"],P={};for(let k of M){let L=this.extractTableStyleSectionText(i[`a:${k}`]);L&&(P[`${k}Text`]=L);}let R={styleId:a,styleName:l,accentKey:E,...T?{tableBackground:T}:{},wholeTblFill:c,band1HFill:u,band2HFill:d,band1VFill:p,band2VFill:f,firstRowFill:h,lastRowFill:m,firstColFill:g,lastColFill:x,...v?{seCellFill:v}:{},...S?{swCellFill:S}:{},...w?{neCellFill:w}:{},...C?{nwCellFill:C}:{},...P};o[a]=R;}return Object.keys(o).length>0?o:void 0}catch(e){console.warn("Failed to parse ppt/tableStyles.xml:",e);return}}},hDe=class extends fDe{serializeSingleAction(t,e,n,r){if(!n){delete t[e];return}let o={},i=n.rId;!i&&n.url&&(i=r(n.url)??void 0),i&&(o["@_r:id"]=i),n.action&&(o["@_action"]=n.action),n.tooltip&&(o["@_tooltip"]=n.tooltip),n.highlightClick&&(o["@_highlightClick"]="1");let s=n.soundRId;s&&(o["a:snd"]={"@_r:embed":s}),t[e]=o;}getTreeBucketKeyForElementType(t){return t==="picture"||t==="image"?"p:pic":t==="connector"?"p:cxnSp":t==="table"||t==="chart"||t==="smartArt"||t==="ole"||t==="media"?"p:graphicFrame":"p:sp"}getCnvPrNode(t,e){return e==="p:pic"?on(t,"p:nvPicPr","p:cNvPr"):e==="p:cxnSp"?on(t,"p:nvCxnSpPr","p:cNvPr"):e==="p:graphicFrame"?on(t,"p:nvGraphicFramePr","p:cNvPr"):on(t,"p:nvSpPr","p:cNvPr")}serializeElementActions(t,e,n){let r=this.getTreeBucketKeyForElementType(e.type),o=this.getCnvPrNode(t,r);if(!o)return;let i="actionClick"in e?e.actionClick:void 0,s="actionHover"in e?e.actionHover:void 0;this.serializeSingleAction(o,"a:hlinkClick",i,n),this.serializeSingleAction(o,"a:hlinkHover",s,n);}serializeShapeLocks(t,e){let n="locks"in e?e.locks:void 0,r=this.getTreeBucketKeyForElementType(e.type),o,i;if(r==="p:pic")o=on(t,"p:nvPicPr","p:cNvPicPr"),i="a:picLocks";else if(r==="p:cxnSp")o=on(t,"p:nvCxnSpPr","p:cNvCxnSpPr"),i="a:cxnSpLocks";else if(r==="p:sp")o=on(t,"p:nvSpPr","p:cNvSpPr"),i="a:spLocks";else return;if(!o)return;if(!n){delete o[i];return}let s={},a=[["noGrouping","@_noGrp"],["noRotation","@_noRot"],["noMove","@_noMove"],["noResize","@_noResize"],["noTextEdit","@_noTextEdit"],["noSelect","@_noSelect"],["noChangeAspect","@_noChangeAspect"],["noEditPoints","@_noEditPoints"],["noAdjustHandles","@_noAdjustHandles"],["noChangeArrowheads","@_noChangeArrowheads"],["noChangeShapeType","@_noChangeShapeType"]],l=false;for(let[c,u]of a)n[c]!==void 0&&(s[u]=n[c]?"1":"0",l=true);l?o[i]=s:delete o[i];}},mDe=class extends hDe{parseAction(t,e,n){if(!t)return;let r=String(t["@_r:id"]||t["@_id"]||"").trim(),o=String(t["@_action"]||"").trim(),i=String(t["@_tooltip"]||"").trim(),s=String(t["@_highlightClick"]||"").trim();if(r.length===0&&o.length===0&&i.length===0)return;let a={};r.length>0&&(a.rId=r),o.length>0&&(a.action=o),i.length>0&&(a.tooltip=i),(s==="1"||s==="true")&&(a.highlightClick=true);let l=t["a:snd"],c=String(l?.["@_r:embed"]||l?.["@_r:link"]||"").trim();if(c.length>0&&(a.soundRId=c),r.length>0&&e){let u=e.get(r);if(u){a.url=u;let d=u.match(/slide(\d+)\.xml$/i);if(d){let p=parseInt(d[1],10),f=n.findIndex(h=>{let m=h.match(/slide(\d+)\.xml$/i);return m?parseInt(m[1],10)===p:false});f>=0&&(a.targetSlideIndex=f);}}}if(a.soundRId&&e){let u=e.get(a.soundRId);u&&(a.soundPath=u);}return a}parseElementActions(t,e,n){if(!t)return {};let r={},o=t["a:hlinkClick"],i=t["a:hlinkHover"],s=this.parseAction(o,e,n),a=this.parseAction(i,e,n);return s&&(r.actionClick=s),a&&(r.actionHover=a),r}parseColor(t,e){return this.colorStyleCodec.parseColor(t,e)}extractTextFillVariants(t){let e={};if(!t)return e;let n=t["a:gradFill"];if(n){let o=n["a:gsLst"];if(o){let i=this.ensureArray(o["a:gs"]);if(i.length>=2){let s=i.map(u=>{let d=parseInt(String(u["@_pos"]||"0"))/1e3;return `${this.parseColor(u)||"#000000"} ${d}%`}),a=n["a:lin"]?parseInt(String(n["a:lin"]["@_ang"]||"0"))/6e4:0,l=n["a:path"]?"radial":"linear";e.textFillGradient=`linear-gradient(${a}deg, ${s.join(", ")})`;let c=[];for(let u of i){let d=u,p=this.parseColor(d)||"#000000",f=parseInt(String(d["@_pos"]||"0"),10),h=Number.isFinite(f)?f/1e5*100:0,m=this.extractColorOpacity(d);c.push({color:p,position:h,...m!==void 0?{opacity:m}:{}});}e.textFillGradientStops=c,e.textFillGradientAngle=a,e.textFillGradientType=l;}}}let r=t["a:pattFill"];if(r){e.textFillPattern=String(r["@_prst"]||"");let o=r["a:fgClr"],i=r["a:bgClr"];o&&(e.textFillPatternForeground=this.parseColor(o)),i&&(e.textFillPatternBackground=this.parseColor(i));}return e}extractColorOpacity(t){return this.colorStyleCodec.extractColorOpacity(t)}},gDe=class extends mDe{extractImageEffects(t){if(!t)return null;let e={},n=false,r=t["@_bright"]??t["@_brt"];if(r!==null){let w=parseInt(String(r));Number.isFinite(w)&&(e.brightness=w/1e3,n=true);}let o=t["@_contrast"]??t["@_cont"];if(o!==null){let w=parseInt(String(o));Number.isFinite(w)&&(e.contrast=w/1e3,n=true);}t["a:grayscl"]&&(e.grayscale=true,n=true);let i=t["a:alphaModFix"];if(i){let w=i["@_amt"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.alphaModFix=C,n=true);}}let s=t["a:biLevel"];if(s){let w=s["@_thresh"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.biLevel=C,n=true);}}let a=t["a:clrChange"];if(a){let w=a["a:clrFrom"],C=a["a:clrTo"];if(w&&C){let T=this.parseColor(w)||"#000000",E=this.parseColor(C)||"#ffffff",M=this.extractColorOpacity(C);e.clrChange={clrFrom:T,clrTo:E,clrToTransparent:M!==void 0&&M<=0},n=true;}}let l=t["a:duotone"];if(l){let w=[...this.ensureArray(l["a:srgbClr"]),...this.ensureArray(l["a:schemeClr"]),...this.ensureArray(l["a:prstClr"])];w.length>=2&&(e.duotone={color1:this.parseColor(w[0])||"#000000",color2:this.parseColor(w[1])||"#ffffff"},n=true);}let c=t["a:alphaInv"];if(c){let w=this.parseColor(c);e.alphaInv=w?{color:w}:{},n=true;}t["a:alphaCeiling"]&&(e.alphaCeiling=true,n=true),t["a:alphaFloor"]&&(e.alphaFloor=true,n=true);let u=t["a:alphaMod"];if(u){let w=u["a:cont"];e.alphaMod=w?{contRawXml:w}:{},n=true;}let d=t["a:alphaRepl"];if(d){let w=d["@_a"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.alphaRepl=C,n=true);}}let p=t["a:alphaBiLevel"];if(p){let w=p["@_thresh"];if(w!==void 0){let C=parseInt(String(w))/1e3;Number.isFinite(C)&&(e.alphaBiLevel=C,n=true);}}let f=t["a:clrRepl"];if(f){let w=this.parseColor(f);w&&(e.clrRepl={color:w,rawXml:f},n=true);}let h=t["a:lum"];if(h){let w={},C=h["@_bright"],T=h["@_contrast"];if(C!==void 0){let E=parseInt(String(C))/1e3;Number.isFinite(E)&&(w.bright=E);}if(T!==void 0){let E=parseInt(String(T))/1e3;Number.isFinite(E)&&(w.contrast=E);}e.lum=w,n=true;}let m=t["a:hsl"];if(m){let w={},C=m["@_hue"],T=m["@_sat"],E=m["@_lum"];if(C!==void 0){let M=parseInt(String(C))/6e4;Number.isFinite(M)&&(w.hue=M);}if(T!==void 0){let M=parseInt(String(T))/1e3;Number.isFinite(M)&&(w.sat=M);}if(E!==void 0){let M=parseInt(String(E))/1e3;Number.isFinite(M)&&(w.lum=M);}e.hsl=w,n=true;}let g=t["a:tint"];if(g){let w={},C=g["@_hue"],T=g["@_amt"];if(C!==void 0){let E=parseInt(String(C))/6e4;Number.isFinite(E)&&(w.hue=E);}if(T!==void 0){let E=parseInt(String(T))/1e3;Number.isFinite(E)&&(w.amt=E);}e.tint=w,n=true;}let x=t["a:fillOverlay"];if(x){let w=String(x["@_blend"]||"over"),C=["over","mult","screen","darken","lighten"].includes(w)?w:"over",T={};for(let E of Object.keys(x))E!=="@_blend"&&(T[E]=x[E]);e.fillOverlay={blend:C,fillRawXml:T},n=true;}let v=t["a:blur"];if(v){let w={},C=v["@_rad"];if(C!==void 0){let E=parseInt(String(C));Number.isFinite(E)&&(w.rad=E);}let T=v["@_grow"];if(T!==void 0){let E=String(T).toLowerCase();w.grow=E==="1"||E==="true";}e.blur=w,n=true;}let S=Rt(t,"a:extLst");if(S){let w=this.ensureArray(S["a:ext"]);for(let C of w)if((gn(C,"uri")||"")==="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}"){let E=Rt(C,"a14:imgEffect")||Rt(C,"a14:imgLayer");if(E){let M=Object.keys(E).filter(P=>P.startsWith("a14:artistic"));if(M.length>0){let P=M[0].replace("a14:","");e.artisticEffect=P,n=true;let R=E[M[0]];if(R){let k=R["@_radius"]??R["@_amount"]??R["@_pressure"];k!==null&&(e.artisticRadius=parseInt(String(k))||0);}}}}}return n?e:null}inspectArtisticEffects(t,e,n){}extractSvgBlipRelId(t){if(!t)return;let e=Rt(t,"a:extLst");if(!e)return;let n=this.ensureArray(e["a:ext"]);for(let r of n)if((gn(r,"uri")||"")==="{96DAC541-7B7A-43D3-8B79-37D633B846F1}"){let i=Rt(r,"asvg:svgBlip")||Rt(r,"a16:svgBlip");if(i)return gn(i,"r:embed")||gn(i,"r:link")||""}}resolveRelationshipTarget(t,e){return this.mediaDataParser.resolveRelationshipTarget(t,e)}};SDe=class extends gDe{walkMediaTimingTree(t,e,n){if(!t)return;for(let o of ["p:video","p:audio"]){let i=this.ensureArray(t[o]);for(let s of i){let a=s["p:cMediaNode"];if(!a)continue;let c=a["p:tgtEl"]?.["p:spTgt"],u=c?.["@_spid"]?String(c["@_spid"]):void 0;if(!u)continue;let d=a["p:cTn"],p=bDe(d,o),f=a["@_fullScrn"]==="1",h,m=a["@_vol"];if(m!==void 0){let T=parseInt(String(m));Number.isFinite(T)&&(h=Math.max(0,Math.min(1,T/1e5)));}let g=a["@_showWhenStopped"]==="0",x,v=a["@_posterFrame"];v&&(x=this.resolveRelationshipTarget(n,String(v)));let S=vDe(s,a,u,T=>this.ensureArray(T)),w=p.trimStartMs??S.trimStartMs,C=p.trimEndMs??S.trimEndMs;e.set(u,{trimStartMs:w!==void 0&&!isNaN(w)?w:void 0,trimEndMs:C!==void 0&&!isNaN(C)?C:void 0,fullScreen:f||void 0,loop:p.loop||void 0,posterFramePath:x,volume:h,fadeInDuration:S.fadeInDuration,fadeOutDuration:S.fadeOutDuration,autoPlay:p.autoPlay||void 0,playAcrossSlides:p.playAcrossSlides||void 0,hideWhenNotPlaying:g||void 0,bookmarks:S.bookmarks.length>0?S.bookmarks:void 0,playbackSpeed:S.playbackSpeed});}}let r=t["p:cTn"];if(r){let o=r["p:childTnLst"];if(o){for(let i of ["p:par","p:seq","p:excl"]){let s=this.ensureArray(o[i]);for(let a of s)this.walkMediaTimingTree(a,e,n);}this.walkMediaTimingTree(o,e,n);}}for(let o of ["p:par","p:seq","p:excl","p:tnLst"]){let i=this.ensureArray(t[o]);for(let s of i)this.walkMediaTimingTree(s,e,n);}}extractMediaTimingMap(t,e){let n=new Map;try{let r=t?.["p:sld"]?.["p:timing"];if(!r)return n;this.walkMediaTimingTree(r,n,e);}catch(r){console.warn("Failed to parse media timing data:",r);}return n}getXmlShapeId(t){return xDe(t)}getPathExtension(t){return jee(t)}getImageMimeType(t){return yDe(t)}async getMediaArrayBuffer(t){if(!t)return;let e=this.zip.file(t);if(e)try{return await e.async("arraybuffer")}catch{return}}},wDe=typeof globalThis.URL?.createObjectURL=="function"&&typeof globalThis.Blob<"u",CDe=class extends SDe{createImageUrl(t,e){if(wDe){let o=new Blob([new Uint8Array(t)],{type:e}),i=URL.createObjectURL(o);return this.blobUrlCache.add(i),i}let n=new Uint8Array(t),r="";for(let o=0;o<n.length;o++)r+=String.fromCharCode(n[o]);return `data:${e};base64,${btoa(r)}`}async getImageData(t){if(!t)return;let e=this.getPathExtension(t);if(t.startsWith("http://")||t.startsWith("https://"))return this.allowExternalImages!==true?void 0:t;if(t.startsWith("data:"))return t;if(this.imageDataCache.has(t))return this.imageDataCache.get(t);let n=this.zip.file(t);if(!n){console.warn(`[pptx] Image file not found in archive: ${t}`);return}try{if(e==="emf"||e==="wmf"){let i=await n.async("arraybuffer"),s=e==="emf"?await Iw(i):await Nw(i);if(s)return this.imageDataCache.set(t,s),s;let a=t.replace(/\.[^.]+$/,"");for(let l of ["png","jpg","jpeg","gif"]){let c=`${a}.${l}`,u=this.zip.file(c);if(u)try{let d=await u.async("arraybuffer"),p=l==="jpg"?"image/jpeg":`image/${l}`,f=this.createImageUrl(d,p);return this.imageDataCache.set(t,f),f}catch{}}return}let r=await n.async("arraybuffer"),o=this.createImageUrl(r,this.getImageMimeType(t));return this.imageDataCache.set(t,o),o}catch(r){console.warn(`[pptx] Failed to load image: ${t}`,r);return}}async enrichMediaElementsWithTiming(t,e,n=0){if(!(n>32)){for(let o of t){if(o.type!=="media")continue;let i=this.getXmlShapeId(o.rawXml);if(!i)continue;let s=e.get(i);if(s&&(s.trimStartMs!==void 0&&(o.trimStartMs=s.trimStartMs),s.trimEndMs!==void 0&&(o.trimEndMs=s.trimEndMs),s.fullScreen!==void 0&&(o.fullScreen=s.fullScreen),s.loop!==void 0&&(o.loop=s.loop),s.volume!==void 0&&(o.volume=s.volume),s.fadeInDuration!==void 0&&(o.fadeInDuration=s.fadeInDuration),s.fadeOutDuration!==void 0&&(o.fadeOutDuration=s.fadeOutDuration),s.autoPlay!==void 0&&(o.autoPlay=s.autoPlay),s.playAcrossSlides!==void 0&&(o.playAcrossSlides=s.playAcrossSlides),s.hideWhenNotPlaying!==void 0&&(o.hideWhenNotPlaying=s.hideWhenNotPlaying),s.bookmarks!==void 0&&s.bookmarks.length>0&&(o.bookmarks=s.bookmarks),s.playbackSpeed!==void 0&&(o.playbackSpeed=s.playbackSpeed),s.posterFramePath)){o.posterFramePath=s.posterFramePath;try{let a=await this.getImageData(s.posterFramePath);a&&(o.posterFrameData=a);}catch{}}}for(let o of t)o.type==="group"&&o.children&&await this.enrichMediaElementsWithTiming(o.children,e,n+1);}}parseNativeAnimations(t){return this.nativeAnimationService.parseNativeAnimations(t)}},TDe=class extends CDe{buildRelativeTargetPath(t,e){let n=t.split("/"),r=e.split("/");for(n.pop();n.length>0&&r.length>0&&n[0]===r[0];)n.shift(),r.shift();return [...Array.from({length:n.length}).fill(".."),...r].join("/")}async setMasterThemeRelationship(t,e){let n=t.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),r=this.zip.file(n);if(!r)return;let o=await r.async("string"),i=this.parser.parse(o),s=i.Relationships||{},a=this.ensureArray(s.Relationship),l=a.find(c=>String(c["@_Type"]||"").includes("/theme"));l&&(l["@_Target"]=this.buildRelativeTargetPath(t,e),s.Relationship=a,i.Relationships=s,this.zip.file(n,this.builder.build(i)));}async setPresentationTheme(t,e=true){let n=t.trim().replace(/\\/g,"/");if(!n.startsWith("ppt/theme/"))return;let r=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!r||r.length===0)return;let o=e?r:[r[0]];await Promise.all(o.map(async i=>{await this.setMasterThemeRelationship(i.name,n);}));}async parseAppProperties(){try{let t=this.zip.file("docProps/app.xml");if(!t)return;let e=await t.async("string"),r=this.parser.parse(e)?.Properties;if(!r)return;let o=l=>{let c=r[l];return c==null?void 0:String(c).trim()||void 0},i=l=>{let c=r[l];if(c==null)return;let u=Number(c);return Number.isFinite(u)?u:void 0},s={application:o("Application"),appVersion:o("AppVersion"),presentationFormat:o("PresentationFormat"),slides:i("Slides"),hiddenSlides:i("HiddenSlides"),notes:i("Notes"),totalTime:i("TotalTime"),words:i("Words"),paragraphs:i("Paragraphs"),company:o("Company"),manager:o("Manager"),template:o("Template")};return Object.values(s).some(l=>l!==void 0)?s:void 0}catch(t){console.warn("Failed to parse app properties:",t);return}}async parseCoreProperties(){try{let t=this.zip.file("docProps/core.xml");if(!t)return;let e=await t.async("string"),r=this.parser.parse(e)?.["cp:coreProperties"];if(!r)return;let o=a=>{let l=r[a];return l==null?void 0:String(typeof l=="object"&&l!==null?l["#text"]??"":l).trim()||void 0},i={title:o("dc:title"),subject:o("dc:subject"),creator:o("dc:creator"),keywords:o("cp:keywords"),description:o("dc:description"),lastModifiedBy:o("cp:lastModifiedBy"),revision:o("cp:revision"),created:o("dcterms:created"),modified:o("dcterms:modified"),category:o("cp:category"),contentStatus:o("cp:contentStatus")};return Object.values(i).some(a=>a!==void 0)?i:void 0}catch(t){console.warn("Failed to parse core properties:",t);return}}async parseCustomProperties(){let t=[];try{let e=this.zip.file("docProps/custom.xml");if(!e)return t;let n=await e.async("string"),o=this.parser.parse(n)?.Properties;if(!o)return t;let i=this.ensureArray(o.property);for(let s of i){let a=String(s["@_name"]||"").trim();if(!a)continue;let l="",c="unknown",u=["vt:lpwstr","vt:i4","vt:bool","vt:filetime","vt:r8","vt:i2","vt:ui4","vt:lpstr"];for(let d of u)if(s[d]!==void 0){l=String(s[d]),c=d.replace("vt:","");break}t.push({name:a,value:l,type:c});}}catch(e){console.warn("Failed to parse custom properties:",e);}return t}resolvePartPath(t,e){return e.startsWith("/")?e.substring(1):t.substring(0,t.lastIndexOf("/")+1)+e}async parseCustDataLst(t,e,n){if(!t)return [];let r=t["p:custDataLst"];if(!r)return [];let o=this.ensureArray(r["p:custData"]);if(o.length===0)return [];let i=this.zip.file(e);if(!i)return [];let s=await i.async("string"),l=this.parser.parse(s).Relationships||{},c=this.ensureArray(l.Relationship),u=new Map;for(let p of c){let f=String(p["@_Id"]||"").trim(),h=String(p["@_Target"]||"").trim();f&&h&&u.set(f,h);}let d=[];for(let p of o){let f=String(p["@_r:id"]||"").trim();if(!f)continue;let h=u.get(f);if(!h)continue;let m=this.resolvePartPath(n,h),g;try{let x=this.zip.file(m);x&&(g=await x.async("string"));}catch{}d.push({id:m,relId:f,data:g});}return d}async parsePresentationCustomerData(){try{let t=this.presentationData?.["p:presentation"];return await this.parseCustDataLst(t,"ppt/_rels/presentation.xml.rels","ppt/presentation.xml")}catch(t){return console.warn("Failed to parse presentation customer data:",t),[]}}async parseSlideCustomerData(t,e){try{let r=t["p:sld"]?.["p:cSld"],o=`${e.replace("slides/","slides/_rels/")}.rels`;return await this.parseCustDataLst(r,o,e)}catch(n){return console.warn(`Failed to parse slide customer data for ${e}:`,n),[]}}parseSlideActiveXControls(t){return Cee(t)}async parseThumbnail(){let t=["docProps/thumbnail.jpeg","docProps/thumbnail.jpg","docProps/thumbnail.png","docProps/thumbnail.emf"];for(let e of t){let n=this.zip.file(e);if(n)try{return await n.async("uint8array")}catch{}}return null}async parseTags(){let t=[];try{let e=this.zip.file(/^ppt\/tags\/tag\d+\.xml$/);if(!e||e.length===0)return t;for(let n of e){let r=n.name,o=await n.async("string"),s=this.parser.parse(o)?.["p:tagLst"];if(!s)continue;let l=this.ensureArray(s["p:tag"]).map(c=>({name:String(c["@_name"]||"").trim(),value:String(c["@_val"]||"").trim()})).filter(c=>c.name.length>0);l.length>0&&t.push({path:r,tags:l});}}catch(e){console.warn("Failed to parse tags:",e);}return t}},_De=class sO extends TDe{parseBackgroundColor(e){if(!e)return;let n=Rt(e,"p:bgPr");if(n)return this.parseColor(Rt(n,"a:solidFill"));let r=Rt(e,"p:bgRef");if(r)return this.parseColor(r)}extractPlaceholderList(e){if(!e)return [];let n=this.ensureArray(e["p:sp"]),r=[];for(let o of n){let i=on(o,"p:nvSpPr","p:nvPr","p:ph");if(!i)continue;let s=(gn(i,"type")??"body").trim(),a=gn(i,"idx");r.push({type:s,idx:a});}return r}static ALLOWED_PATH_ROOTS=new Set(["ppt","customXml","docProps","_rels"]);resolvePath(e,n){let r=e.split("/").filter(Boolean),o=n.split("/");r.length>0&&!e.endsWith("/")&&r.pop();for(let a of o)if(a===".."){if(r.length===0)return "";r.pop();}else a!=="."&&r.push(a);let i=r.join("/");if(i.length===0)return "";let s=r[0];return sO.ALLOWED_PATH_ROOTS.has(s)?i:""}resolveImagePath(e,n){let r=e.substring(0,e.lastIndexOf("/")+1),o=n.startsWith("..")?this.resolvePath(r,n):n.startsWith("/")?n.substring(1):r+n;if(o.length===0)return "";let i=o.indexOf("/"),s=i===-1?o:o.substring(0,i);return sO.ALLOWED_PATH_ROOTS.has(s)?o:""}async parseSlideMasters(){let e=[];try{let n=this.zip.file(/^ppt\/slideMasters\/slideMaster\d+\.xml$/);if(!n||n.length===0)return e;for(let r of n){let o=r.name,i=await r.async("string"),s=this.parser.parse(i),a=s?.["p:sldMaster"];if(!a)continue;this.masterXmlMap.has(o)||this.masterXmlMap.set(o,s);let l=a["p:cSld"]?.["p:bg"],c=this.parseBackgroundColor(l),u=a["p:cSld"]?.["p:spTree"],d=this.extractPlaceholderList(u),p,f=o.replace(/ppt\/slideMasters\/(slideMaster\d+)\.xml/,"ppt/slideMasters/_rels/$1.xml.rels"),h=this.zip.file(f);if(h){let x=await h.async("string"),v=this.parser.parse(x),S=this.ensureArray(Rt(v,"Relationships")?.Relationship);for(let w of S)if(String(w["@_Type"]||"").includes("/theme")){p=this.resolveImagePath(o,String(w["@_Target"]||""));break}}let m=[];if(h){let x=await h.async("string"),v=this.parser.parse(x),S=this.ensureArray(Rt(v,"Relationships")?.Relationship);for(let w of S)String(w["@_Type"]||"").includes("/slideLayout")&&m.push(this.resolveImagePath(o,String(w["@_Target"]||"")));}let g=[];for(let x of m){let v=await this.parseSlideLayoutAttributes(x);v&&g.push(v);}e.push({path:o,backgroundColor:c,themePath:p,layoutPaths:m.length>0?m:void 0,layouts:g.length>0?g:void 0,placeholders:d.length>0?d:void 0});}}catch(n){console.warn("Failed to parse slide masters:",n);}return e}async parseHandoutMaster(){try{let e=this.zip.file(/^ppt\/handoutMasters\/handoutMaster\d+\.xml$/);if(!e||e.length===0)return;let n=e[0].name,r=await e[0].async("string"),i=this.parser.parse(r)?.["p:handoutMaster"];if(!i)return;let s=on(i,"p:cSld","p:bg"),a=this.parseBackgroundColor(s),l=on(i,"p:cSld","p:spTree"),c=this.extractPlaceholderList(l),u={path:n,backgroundColor:a,placeholders:c},d=sA(i["p:hf"]);return d&&(u.headerFooter=d),u}catch(e){console.warn("Failed to parse handout master:",e);return}}async parseNotesMaster(){try{let e=this.zip.file(/^ppt\/notesMasters\/notesMaster\d+\.xml$/);if(!e||e.length===0)return;let n=e[0].name,r=await e[0].async("string"),i=this.parser.parse(r)?.["p:notesMaster"];if(!i)return;let s=on(i,"p:cSld","p:bg"),a=this.parseBackgroundColor(s),l=on(i,"p:cSld","p:spTree"),c=this.extractPlaceholderList(l),u={path:n,backgroundColor:a,placeholders:c},d=sA(i["p:hf"]);return d&&(u.headerFooter=d),u}catch(e){console.warn("Failed to parse notes master:",e);return}}async parseSlideLayoutAttributes(e){try{let n=this.zip.file(e);if(!n)return;let r=await n.async("string"),o=this.parser.parse(r),i=o?.["p:sldLayout"];if(!i)return;this.layoutXmlMap.has(e)||this.layoutXmlMap.set(e,o);let s={path:e},a=(gn(Rt(i,"p:cSld"),"name")??"").trim();a&&(s.name=a);let l=String(i["@_matchingName"]||"").trim();l&&(s.matchingName=l);let c=i["@_preserve"];if(c!==void 0){let v=String(c).trim().toLowerCase();s.preserve=v==="1"||v==="true";}let u=i["@_showMasterPhAnim"];if(u!==void 0){let v=String(u).trim().toLowerCase();s.showMasterPhAnim=v!=="0"&&v!=="false";}let d=i["@_userDrawn"];if(d!==void 0){let v=String(d).trim().toLowerCase();s.userDrawn=v==="1"||v==="true";}let p=sA(i["p:hf"]);p&&(s.headerFooter=p);let f=i["p:clrMapOvr"];if(f&&f["a:masterClrMapping"]===void 0){let v=f["a:overrideClrMapping"];if(v){let S=["bg1","tx1","bg2","tx2","accent1","accent2","accent3","accent4","accent5","accent6","hlink","folHlink"],w={};for(let C of S){let T=String(v[`@_${C}`]||"").trim().toLowerCase();T&&(w[C]=T);}Object.keys(w).length>0&&(s.clrMapOverride=w);}}let h=on(i,"p:cSld","p:bg"),m=this.parseBackgroundColor(h);m&&(s.backgroundColor=m);let g=on(i,"p:cSld","p:spTree"),x=this.extractPlaceholderList(g);return x.length>0&&(s.placeholders=x),s}catch(n){console.warn("Failed to parse slide layout attributes:",n);return}}parseCustomShows(){try{let e=on(this.presentationData,"p:presentation","p:custShowLst");if(!e)return;let n=this.ensureArray(e["p:custShow"]);return n.length===0?void 0:n.map(r=>{let o=String(r["@_name"]||""),i=String(r["@_id"]||""),s=r["p:sldLst"],l=(s?this.ensureArray(s["p:sld"]):[]).map(c=>String(c["@_r:id"]||"")).filter(c=>c.length>0);return {name:o,id:i,slideRIds:l}})}catch(e){console.warn("Failed to parse custom slide shows:",e);return}}},MDe=class extends _De{async parsePresentationProperties(){try{let t=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!t)return;let e=this.parser.parse(t),r=this.ensureArray(e?.Relationships?.Relationship).find(h=>String(h?.["@_Type"]||"").includes("presProps")||String(h?.["@_Target"]||"").includes("presProps")),o=r?String(r["@_Target"]||""):"presProps.xml",i=o.startsWith("/")?o.substring(1):`ppt/${o}`,s=await this.zip.file(i)?.async("string");if(!s)return;let l=this.parser.parse(s)?.["p:presentationPr"];if(!l)return;let c={},u=l["p:showPr"];u&&Object.assign(c,dDe(u));let d=l["p:prnPr"];if(d){c.printFrameSlides=d["@_frameSlides"]==="1";let h=d["@_sldPerPg"]??d["@_slidesPerPage"];if(h!==void 0){let g=Number.parseInt(String(h),10);Number.isFinite(g)&&g>0&&(c.printSlidesPerPage=g);}let m=d["@_clrMode"];(m==="clr"||m==="gray"||m==="bw")&&(c.printColorMode=m);}let p=l["p:clrMru"];if(p){let m=this.ensureArray(p["a:srgbClr"]).map(g=>{let x=String(g?.["@_val"]||"").trim();return x.length>0?`#${x}`:""}).filter(g=>g.length>0);m.length>0&&(c.mruColors=m);}let f=l["p:gridSpacing"];if(f){let h=parseInt(String(f["@_cx"]??"0"),10),m=parseInt(String(f["@_cy"]??"0"),10);h>0&&m>0&&(c.gridSpacing={cx:h,cy:m});}return c}catch(t){console.warn("Failed to parse presentation properties:",t);return}}async parseViewProperties(){try{let t=await this.zip.file("ppt/viewProps.xml")?.async("string");if(!t)return;let n=this.parser.parse(t)?.["p:viewPr"];return n?JAe(n):void 0}catch(t){console.warn("Failed to parse view properties:",t);return}}extractChartStyle(t,e){if(!t&&!e)return;let n={},r=false,o=this.xmlLookupService.getChildByLocalName(t,"style");if(o?.["@_val"]&&(n.styleId=parseInt(String(o["@_val"])),r=true),e){let i=this.xmlLookupService.getChildByLocalName(e,"legend");if(i){n.hasLegend=true,r=true;let l=this.xmlLookupService.getChildByLocalName(i,"legendPos");l?.["@_val"]&&(n.legendPosition=String(l["@_val"]));}this.xmlLookupService.getChildByLocalName(e,"title")&&(n.hasTitle=true,r=true);let a=this.xmlLookupService.getChildByLocalName(e,"plotArea");if(a){let l=this.xmlLookupService.getChildByLocalName(a,"valAx");l&&this.xmlLookupService.getChildByLocalName(l,"majorGridlines")&&(n.hasGridlines=true,r=true);let c=Object.keys(a).filter(u=>this.compatibilityService.getXmlLocalName(u).endsWith("Chart"));for(let u of c){let d=a[u];if(!d)continue;let p=this.xmlLookupService.getChildByLocalName(d,"dLbls");if(p&&!n.dataLabels){let f=S=>this.xmlLookupService.getChildByLocalName(p,S)?.["@_val"]==="1",h=f("showVal"),m=f("showCatName"),g=f("showSerName"),x=f("showPercent"),v=f("showLegendKey");if(h||m||g||x||v){n.hasDataLabels=true,r=true;let S={showValue:h,showCategory:m,showSeriesName:g,showPercent:x,showLegendKey:v},w=this.xmlLookupService.getChildByLocalName(p,"dLblPos")?.["@_val"];w!==void 0&&(S.position=String(w)),n.dataLabels=S;}}if(!n.hasDataLabels){let f=this.xmlLookupService.getChildrenArrayByLocalName(d,"ser");for(let h of f){let m=this.xmlLookupService.getChildByLocalName(h,"dLbls");m&&this.xmlLookupService.getChildByLocalName(m,"showVal")?.["@_val"]==="1"&&(n.hasDataLabels=true,r=true);}}}}}return r?n:void 0}toPresentationTarget(t){let e=t.startsWith("/")?t.substring(1):t;return e.startsWith("ppt/")?e.substring(4):e}toSlidePathFromTarget(t){let e=t.startsWith("/")?t.substring(1):t;return e.startsWith("ppt/")?e:`ppt/${e}`}toSlideRelsPath(t){return `${t.replace("slides/","slides/_rels/")}.rels`}},EDe=class extends MDe{createEmptySlideXml(){return {"p:sld":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","p:cSld":{"p:spTree":{"p:nvGrpSpPr":{"p:cNvPr":{"@_id":"1","@_name":""},"p:cNvGrpSpPr":{},"p:nvPr":{}},"p:grpSpPr":{"a:xfrm":{"a:off":{"@_x":"0","@_y":"0"},"a:ext":{"@_cx":"0","@_cy":"0"},"a:chOff":{"@_x":"0","@_y":"0"},"a:chExt":{"@_cx":"0","@_cy":"0"}}}}},"p:clrMapOvr":{"a:masterClrMapping":{}}}}}deepCloneXml(t){if(t)try{return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}catch{return}}findSourceSlidePath(t){if(t&&this.slideMap.has(t)&&t.startsWith("ppt/slides/slide"))return t;for(let e of this.slideMap.keys())if(e.startsWith("ppt/slides/slide"))return e}async loadSlideRelationships(t,e){let n=await this.zip.file(e)?.async("string");if(!n)return;let r=this.parser.parse(n),o=new Map,i=new Set;r?.Relationships?.Relationship&&(Array.isArray(r.Relationships.Relationship)?r.Relationships.Relationship:[r.Relationships.Relationship]).forEach(a=>{if(a["@_Id"]&&a["@_Target"]){let l=String(a["@_Id"]);o.set(l,String(a["@_Target"])),String(a["@_TargetMode"]||"").toLowerCase()==="external"&&i.add(l);}}),this.slideRelsMap.set(t,o),i.size>0&&this.externalRelsMap.set(t,i);}async reconcilePresentationSlidesForSave(t){await this.presentationSlidesReconciler.reconcile({...t,zip:this.zip,parser:this.parser,xmlBuilder:this.builder,presentationData:this.presentationData,slideMap:this.slideMap,slideRelsMap:this.slideRelsMap,toPresentationTarget:e=>this.toPresentationTarget(e),toSlidePathFromTarget:e=>this.toSlidePathFromTarget(e),toSlideRelsPath:e=>this.toSlideRelsPath(e),createEmptySlideXml:()=>this.createEmptySlideXml(),deepCloneXml:e=>this.deepCloneXml(e),findSourceSlidePath:e=>this.findSourceSlidePath(e),loadSlideRelationships:(e,n)=>this.loadSlideRelationships(e,n)});}buildSlideTransitionXml(t){return this.slideTransitionService.buildSlideTransitionXml(t)}applyEditorAnimations(t,e){this.editorAnimationService.applyEditorAnimations(t,e);}ensureSlideTree(t){t["p:sld"]||(t["p:sld"]={});let e=t["p:sld"];e["p:cSld"]||(e["p:cSld"]={});let n=e["p:cSld"];if(!n["p:spTree"]){let o=this.createEmptySlideXml()["p:sld"]?.["p:cSld"]?.["p:spTree"];o&&(n["p:spTree"]=o);}return e["p:cSld"]=n,t["p:sld"]=e,n["p:spTree"]}parseDataUrlToBytes(t){return jB(t)}async resolveMediaToBytes(t){let e=jB(t);return e||XQ(t)}textAlignToDrawingValue(t){if(t==="left")return "l";if(t==="center")return "ctr";if(t==="right")return "r";if(t==="justify")return "just"}pixelsToPoints(t){return t*(72/96)}createParagraphSpacingXmlFromPx(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.max(0,this.pixelsToPoints(t));return {"a:spcPts":{"@_val":String(Math.round(e*100))}}}createLineSpacingXmlFromMultiplier(t){if(typeof t!="number"||!Number.isFinite(t))return;let e=Math.max(.1,Math.min(5,t));return {"a:spcPct":{"@_val":String(Math.round(e*1e5))}}}},Mp=9525;FDe=class Kee extends EDe{createRunPropertiesFromTextStyle(e,n){let r={"@_lang":e?.language||"en-US","@_dirty":"0"};if(!e)return r;if(typeof e.fontSize=="number"&&Number.isFinite(e.fontSize)&&(r["@_sz"]=String(Math.round(e.fontSize*(72/96)*100))),e.bold!==void 0&&(r["@_b"]=e.bold?"1":"0"),e.italic!==void 0&&(r["@_i"]=e.italic?"1":"0"),e.underline&&(r["@_u"]=e.underlineStyle||"sng"),e.strikethrough!==void 0&&(r["@_strike"]=e.strikethrough?e.strikeType||"sngStrike":"noStrike"),typeof e.baseline=="number"&&e.baseline!==0&&(r["@_baseline"]=String(e.baseline)),typeof e.characterSpacing=="number"&&e.characterSpacing!==0&&(r["@_spc"]=String(e.characterSpacing)),typeof e.kerning=="number"&&e.kerning!==0&&(r["@_kern"]=String(e.kerning)),e.textCaps&&e.textCaps!=="none"&&(r["@_cap"]=e.textCaps),e.kumimoji!==void 0&&(r["@_kumimoji"]=e.kumimoji?"1":"0"),e.normalizeHeight!==void 0&&(r["@_normalizeH"]=e.normalizeHeight?"1":"0"),e.noProof!==void 0&&(r["@_noProof"]=e.noProof?"1":"0"),e.dirty!==void 0&&(r["@_dirty"]=e.dirty?"1":"0"),e.spellingError!==void 0&&(r["@_err"]=e.spellingError?"1":"0"),e.smartTagClean!==void 0&&(r["@_smtClean"]=e.smartTagClean?"1":"0"),e.bookmark&&(r["@_bmk"]=e.bookmark),e.altLanguage&&(r["@_altLang"]=e.altLanguage),typeof e.smartTagId=="number"&&Number.isFinite(e.smartTagId)&&(r["@_smtId"]=String(e.smartTagId)),e.textOutlineWidth||e.textOutlineColor){let i={};typeof e.textOutlineWidth=="number"&&e.textOutlineWidth>0&&(i["@_w"]=String(Math.round(e.textOutlineWidth*Kee.EMU_PER_PX))),e.textOutlineColor&&(i["a:solidFill"]={"a:srgbClr":{"@_val":e.textOutlineColor.replace("#","")}}),r["a:ln"]=i;}if(e.color){let i=e.colorXml?this.parseColor(e.colorXml):void 0;r["a:solidFill"]=jw(e.colorXml,i,e.color);}else if(e.textFillGradientStops&&e.textFillGradientStops.length>0){let i=e.textFillGradientStops.filter(s=>!!s?.color).map(s=>{let a=(s.position??0)/100,l=Math.round(Math.max(0,Math.min(1,a))*1e5),c={"@_pos":String(l),"a:srgbClr":{"@_val":String(s.color||"").replace("#","")}};return typeof s.opacity=="number"&&Number.isFinite(s.opacity)&&s.opacity<1&&(c["a:srgbClr"]["a:alpha"]={"@_val":String(Math.round(s.opacity*1e5))}),c});if(i.length>0){let s={"a:gsLst":{"a:gs":i}};if((e.textFillGradientType||"linear")==="linear"){let l=typeof e.textFillGradientAngle=="number"&&Number.isFinite(e.textFillGradientAngle)?e.textFillGradientAngle:0;s["a:lin"]={"@_ang":String(Math.round(l*6e4)),"@_scaled":"1"};}else s["a:path"]={"@_path":"circle"};r["a:gradFill"]=s;}}else if(e.textFillPattern){let i={"@_prst":e.textFillPattern};e.textFillPatternForeground&&(i["a:fgClr"]={"a:srgbClr":{"@_val":e.textFillPatternForeground.replace("#","")}}),e.textFillPatternBackground&&(i["a:bgClr"]={"a:srgbClr":{"@_val":e.textFillPatternBackground.replace("#","")}}),r["a:pattFill"]=i;}let o=PDe(e);if(o&&(r["a:effectLst"]=o),e.textEffectDagXml&&(r["a:effectDag"]=e.textEffectDagXml),e.highlightColor&&(r["a:highlight"]={"a:srgbClr":{"@_val":e.highlightColor.replace("#","")}}),e.underline&&e.underlineColor&&(r["a:uFill"]={"a:solidFill":{"a:srgbClr":{"@_val":e.underlineColor.replace("#","")}}}),e.fontFamily&&(r["a:latin"]=$P({"@_typeface":e.fontFamily},e.latinFontPanose,e.latinFontPitchFamily,e.latinFontCharset),r["a:ea"]=$P({"@_typeface":e.eastAsiaFont||e.fontFamily},e.eastAsiaFontPanose,e.eastAsiaFontPitchFamily,e.eastAsiaFontCharset),r["a:cs"]=$P({"@_typeface":e.complexScriptFont||e.fontFamily},e.complexScriptFontPanose,e.complexScriptFontPitchFamily,e.complexScriptFontCharset)),e.symbolFont&&(r["a:sym"]=$P({"@_typeface":e.symbolFont},e.symbolFontPanose,e.symbolFontPitchFamily,e.symbolFontCharset)),e.hyperlink&&n){let i=String(e.hyperlink).trim();if(i.startsWith("ppaction://")){let s={"@_action":i};e.hyperlinkTooltip&&(s["@_tooltip"]=e.hyperlinkTooltip),e.hyperlinkRId&&(s["@_r:id"]=e.hyperlinkRId),this.applyHyperlinkExtraAttrs(s,e),r["a:hlinkClick"]=s;}else if(i.length>0){let s=n(i);if(s){let a={"@_r:id":s};e.hyperlinkTooltip&&(a["@_tooltip"]=e.hyperlinkTooltip),e.hyperlinkAction&&(a["@_action"]=e.hyperlinkAction),this.applyHyperlinkExtraAttrs(a,e),r["a:hlinkClick"]=a;}}}if(e.hyperlinkMouseOver&&n){let i=String(e.hyperlinkMouseOver).trim();if(i.length>0){let s=n(i);s&&(r["a:hlinkMouseOver"]={"@_r:id":s});}}return r}applyHyperlinkExtraAttrs(e,n){n.hyperlinkInvalidUrl&&(e["@_invalidUrl"]=n.hyperlinkInvalidUrl),n.hyperlinkTargetFrame&&(e["@_tgtFrame"]=n.hyperlinkTargetFrame),n.hyperlinkHistory!==void 0&&(e["@_history"]=n.hyperlinkHistory?"1":"0"),n.hyperlinkHighlightClick!==void 0&&(e["@_highlightClick"]=n.hyperlinkHighlightClick?"1":"0"),n.hyperlinkEndSound!==void 0&&(e["@_endSnd"]=n.hyperlinkEndSound?"1":"0");}},BDe=class extends FDe{createParagraphsFromTextContent(t,e,n,r){let o=this.textAlignToDrawingValue(e?.align),i={spacingBefore:this.createParagraphSpacingXmlFromPx(e?.paragraphSpacingBefore),spacingAfter:this.createParagraphSpacingXmlFromPx(e?.paragraphSpacingAfter),lineSpacing:this.createLineSpacingXmlFromMultiplier(e?.lineSpacing),lineSpacingExactPt:e?.lineSpacingExactPt},s=(v,S,w,C)=>{let T=aDe(e,o,S,i,w);return cDe(v,T,C)},a=(v,S)=>({"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:t":v}),l=(v,S,w,C)=>({"@_type":w,...C?{"@_id":C}:{},"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:t":v}),c=(v,S)=>{let w={};v.rubyAlignment&&(w["@_algn"]=v.rubyAlignment),v.rubyFontSize!==void 0&&(w["@_hps"]=String(Math.round(v.rubyFontSize*2)));let T={"a:rPr":this.createRunPropertiesFromTextStyle(v.rubyStyle??S,r),"a:t":v.rubyText??""},M={"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:t":v.text};return {"a:rPr":this.createRunPropertiesFromTextStyle(S,r),"a:ruby":{"a:rubyPr":w,"a:rt":{"a:r":T},"a:rubyBase":{"a:r":M}}}},u=[],d=[],p,f,h,m=()=>{d.length===0&&d.push(a("",e)),u.push(s(d,p,f,h)),d=[],p=void 0,f=void 0,h=void 0;};if(n&&n.length>0){let v=uDe(e,n);return n.forEach(S=>{let w={...e,...S.style,...v};if(d.length===0&&(S.bulletInfo&&(p=S.bulletInfo),S.paragraphLevel!==void 0&&(f=S.paragraphLevel),S.endParaRunProperties&&(h=S.endParaRunProperties)),S.isLineBreak){let E={};S.breakRunProperties&&typeof S.breakRunProperties=="object"?E["a:rPr"]={...S.breakRunProperties}:E["a:rPr"]=this.createRunPropertiesFromTextStyle(w,r),E.__isLineBreak=true,d.push(E);return}if(S.equationXml&&typeof S.equationXml=="object"){let E={__isEquation:true,__equationXml:S.equationXml};d.push(E);return}let T=String(S.text??"").split(`
265
265
  `);T.forEach((E,M)=>{if(S.rubyText!==void 0){let P={...S,text:E};d.push(c(P,w));}else if(S.fieldType){let P=l(E,w,S.fieldType,S.fieldGuid);P.__isField=true,d.push(P);}else d.push(a(E,w));M<T.length-1&&m();});}),(d.length>0||u.length===0)&&m(),u}return (typeof t=="string"?t:"").split(`
266
266
  `).forEach(v=>{u.push(s([a(v,e)]));}),u.length===0&&u.push(s([a("",e)])),u}},ODe=class extends BDe{updateNotesXmlText(t,e,n){let o=t?.["p:notes"]?.["p:cSld"]?.["p:spTree"];if(!o)return false;let i=this.ensureArray(o["p:sp"]);if(i.length===0)return false;let s=i.find(c=>{let u=c?.["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"];return String(u?.["@_type"]||"").trim().toLowerCase()==="body"})||i.find(c=>!!c?.["p:txBody"])||i[0];if(!s)return false;s["p:txBody"]||(s["p:txBody"]={"a:bodyPr":{},"a:lstStyle":{}});let a=s["p:txBody"],l=n;return n&&n.length>0&&e!==void 0&&n.map(u=>String(u.text??"")).join("")!==e&&(l=void 0),a["a:p"]=this.createParagraphsFromTextContent(e,void 0,l),true}createPictureXml(t,e){return this.elementXmlBuilder.createPictureXml(t,e)}createMediaGraphicFrameXml(t,e){return this.elementXmlBuilder.createMediaGraphicFrameXml(t,e)}getMediaMimeType(t){return this.mediaDataParser.getMediaMimeType(t)}createElementXml(t){return this.elementXmlBuilder.createElementXml(t)}createConnectorXml(t){return this.elementXmlBuilder.createConnectorXml(t)}},UDe="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",$De="http://schemas.openxmlformats.org/drawingml/2006/chart",HDe="application/vnd.openxmlformats-officedocument.drawingml.chart+xml",zDe="http://schemas.openxmlformats.org/drawingml/2006/chart",GDe="http://schemas.openxmlformats.org/officeDocument/2006/relationships",vB="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject",VDe="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",WDe="http://schemas.openxmlformats.org/presentationml/2006/ole",XDe=class tb extends ODe{createTableGraphicFrameXml(e){let n=tb.EMU_PER_PX,r=String(Math.round(e.x*n)),o=String(Math.round(e.y*n)),i=String(Math.round(Math.max(e.width,1)*n)),s=String(Math.round(Math.max(e.height,1)*n)),a={"@_firstRow":e.tableData?.firstRowHeader?"1":"0","@_bandRow":e.tableData?.bandedRows?"1":"0"};return e.tableData?.tableStyleId&&(a["a:tableStyleId"]=e.tableData.tableStyleId),{"p:nvGraphicFramePr":{"p:cNvPr":{"@_id":"0","@_name":e.name||"Table"},"p:cNvGraphicFramePr":{"a:graphicFrameLocks":{"@_noGrp":"1"}},"p:nvPr":{}},"p:xfrm":{"a:off":{"@_x":r,"@_y":o},"a:ext":{"@_cx":i,"@_cy":s}},"a:graphic":{"a:graphicData":{"@_uri":"http://schemas.openxmlformats.org/drawingml/2006/table","a:tbl":{"a:tblPr":a,"a:tblGrid":{}}}}}}createChartGraphicFrameXml(e,n){let r=tb.EMU_PER_PX,o=String(Math.round(e.x*r)),i=String(Math.round(e.y*r)),s=String(Math.round(Math.max(e.width,1)*r)),a=String(Math.round(Math.max(e.height,1)*r));return {"p:nvGraphicFramePr":{"p:cNvPr":{"@_id":"0","@_name":e.name||"Chart"},"p:cNvGraphicFramePr":{},"p:nvPr":{}},"p:xfrm":{"a:off":{"@_x":o,"@_y":i},"a:ext":{"@_cx":s,"@_cy":a}},"a:graphic":{"a:graphicData":{"@_uri":$De,"c:chart":{"@_xmlns:c":zDe,"@_xmlns:r":GDe,"@_r:id":n}}}}}createOleGraphicFrameXml(e,n){let r=tb.EMU_PER_PX,o=String(Math.round(e.x*r)),i=String(Math.round(e.y*r)),s=String(Math.round(Math.max(e.width,1)*r)),a=String(Math.round(Math.max(e.height,1)*r)),l={"@_showAsIcon":e.oleShowAsIcon?"1":"0","@_imgW":e.oleImgW!==void 0?String(e.oleImgW):s,"@_imgH":e.oleImgH!==void 0?String(e.oleImgH):a};return e.oleProgId&&(l["@_progId"]=e.oleProgId),e.oleName&&(l["@_name"]=e.oleName),e.oleClsId&&(l["@_classid"]=e.oleClsId),n&&(l["@_r:id"]=n),e.isLinked?l["p:link"]={"@_r:id":n,"@_updateAutomatic":"1"}:l["p:embed"]={},l["p:pic"]={"p:nvPicPr":{"p:cNvPr":{"@_id":"0","@_name":e.oleName||"OleObject"},"p:cNvPicPr":{},"p:nvPr":{}},"p:blipFill":{"a:blip":{},"a:stretch":{"a:fillRect":{}}},"p:spPr":{"a:xfrm":{"a:off":{"@_x":o,"@_y":i},"a:ext":{"@_cx":s,"@_cy":a}},"a:prstGeom":{"@_prst":"rect","a:avLst":{}}}},{"p:nvGraphicFramePr":{"p:cNvPr":{"@_id":"0","@_name":e.oleName||e.fileName||"OleObject"},"p:cNvGraphicFramePr":{"a:graphicFrameLocks":{"@_noChangeAspect":"1"}},"p:nvPr":{}},"p:xfrm":{"a:off":{"@_x":o,"@_y":i},"a:ext":{"@_cx":s,"@_cy":a}},"a:graphic":{"a:graphicData":{"@_uri":WDe,"p:oleObj":l}}}}applyOleTypedFieldUpdates(e,n){let r=e["a:graphic"]?.["a:graphicData"]?.["p:oleObj"];if(r)if(n.oleProgId&&(r["@_progId"]=n.oleProgId),n.oleName!==void 0&&(n.oleName.length>0?r["@_name"]=n.oleName:delete r["@_name"]),n.oleClsId&&(r["@_classid"]=n.oleClsId),n.oleShowAsIcon!==void 0&&(r["@_showAsIcon"]=n.oleShowAsIcon?"1":"0"),n.oleImgW!==void 0&&(r["@_imgW"]=String(n.oleImgW)),n.oleImgH!==void 0&&(r["@_imgH"]=String(n.oleImgH)),n.isLinked===true){if(!r["p:link"]){let o=String(r["p:embed"]?.["@_r:id"]||r["@_r:id"]||"").trim();r["p:link"]=o?{"@_r:id":o,"@_updateAutomatic":"1"}:{"@_updateAutomatic":"1"};}delete r["p:embed"];}else n.isLinked===false&&(r["p:embed"]||(r["p:embed"]={}),delete r["p:link"]);}resolveOleEmbedRelationshipId(e,n){if(!n)return;let o=n.replace(/^ppt\//u,"../").replace(/^\/+/u,"").toLowerCase();for(let a of e){if(String(a?.["@_Type"]||"")!==vB)continue;let c=String(a?.["@_Target"]||"").toLowerCase().trim();if(c===o||c.endsWith(o)||o.endsWith(c)){let u=String(a?.["@_Id"]||"").trim();if(u.length>0)return u}}let i=e.find(a=>String(a?.["@_Type"]||"")===vB),s=String(i?.["@_Id"]||"").trim();return s.length>0?s:void 0}static OLE_OBJECT_RELATIONSHIP_TYPE=vB;static OLE_IMAGE_RELATIONSHIP_TYPE=VDe;createInkShapeXml(e){let n=tb.EMU_PER_PX,r=String(Math.round(e.x*n)),o=String(Math.round(e.y*n)),i=String(Math.round(Math.max(e.width,1)*n)),s=String(Math.round(Math.max(e.height,1)*n)),a=e.inkPaths.map(f=>{let h=[],m=[],g=f.match(/[ML]\s*[\d.eE+-]+\s+[\d.eE+-]+/gu);if(g)for(let v of g){let S=v.trim().split(/\s+/u),w=S[0],C=parseFloat(S[1]),T=parseFloat(S[2]),E={"@_x":String(Math.round(C*n)),"@_y":String(Math.round(T*n))};w==="M"?h.push({"a:pt":E}):w==="L"&&m.push({"a:pt":E});}let x={"@_w":i,"@_h":s,"@_stroke":"1","@_fill":"none"};return h.length>0&&(x["a:moveTo"]=h.length===1?h[0]:h),m.length>0&&(x["a:lnTo"]=m.length===1?m[0]:m),x}),l=e.inkColors?.[0]??"#000000",c=e.inkWidths?.[0]??2,u=e.inkOpacities?.[0]??1,d=l.replace("#","");return {"p:nvSpPr":{"p:cNvPr":{"@_id":"0","@_name":e.id},"p:cNvSpPr":{},"p:nvPr":{}},"p:spPr":{"a:xfrm":{"a:off":{"@_x":r,"@_y":o},"a:ext":{"@_cx":i,"@_cy":s}},"a:custGeom":{"a:avLst":{},"a:gdLst":{},"a:ahLst":{},"a:cxnLst":{},"a:rect":{"@_l":"0","@_t":"0","@_r":i,"@_b":s},"a:pathLst":{"a:path":a.length===1?a[0]:a}},"a:noFill":{},"a:ln":{"@_w":String(Math.round(c*n)),"@_cap":"rnd","a:solidFill":{"a:srgbClr":{"@_val":d,...u<1?{"a:alpha":{"@_val":String(Math.round(u*1e5))}}:{}}},"a:round":{}}}}}buildGroupShapeXml(e){if(e.rawXml&&e.children.length===0)return e.rawXml;let n=tb.EMU_PER_PX,r=Math.round(e.x*n),o=Math.round(e.y*n),i=Math.round(e.width*n),s=Math.round(e.height*n),a=0,l=0,c=i,u=s,d={"p:nvGrpSpPr":{"p:cNvPr":{"@_id":"0","@_name":e.id},"p:cNvGrpSpPr":{},"p:nvPr":{}},"p:grpSpPr":{"a:xfrm":{"a:off":{"@_x":String(r),"@_y":String(o)},"a:ext":{"@_cx":String(i),"@_cy":String(s)},"a:chOff":{"@_x":String(a),"@_y":String(l)},"a:chExt":{"@_cx":String(c),"@_cy":String(u)}}}},p=[],f=[],h=[];for(let m of e.children){let g=m.rawXml;if(!g&&(m.type==="text"||m.type==="shape")&&(g=this.createElementXml(m)),!g&&m.type==="connector"&&(g=this.createConnectorXml(m)),!g)continue;let x=g["p:spPr"]?.["a:xfrm"]||g["p:xfrm"];x&&(x["a:off"]||(x["a:off"]={}),x["a:ext"]||(x["a:ext"]={}),x["a:off"]["@_x"]=String(Math.round(m.x*n)),x["a:off"]["@_y"]=String(Math.round(m.y*n)),x["a:ext"]["@_cx"]=String(Math.round(m.width*n)),x["a:ext"]["@_cy"]=String(Math.round(m.height*n))),m.type==="picture"||m.type==="image"?f.push(g):m.type==="connector"?h.push(g):p.push(g);}return p.length>0&&(d["p:sp"]=p),f.length>0&&(d["p:pic"]=f),h.length>0&&(d["p:cxnSp"]=h),d}},jDe=class extends XDe{clampCropForSave(t){return typeof t!="number"||!Number.isFinite(t)?0:Math.max(0,Math.min(.95,t))}applyImageCropToBlipFill(t,e){if(!t)return;let n=this.clampCropForSave(e.cropLeft),r=this.clampCropForSave(e.cropTop),o=this.clampCropForSave(e.cropRight),i=this.clampCropForSave(e.cropBottom),s=n+o,a=r+i;if(!(s>1e-4||a>1e-4)){delete t["a:srcRect"];return}let c=s>=.99?.99/s:1,u=a>=.99?.99/a:1,d=this.clampCropForSave(n*c),p=this.clampCropForSave(o*c),f=this.clampCropForSave(r*u),h=this.clampCropForSave(i*u);t["a:srcRect"]={"@_l":String(Math.round(d*1e5)),"@_t":String(Math.round(f*1e5)),"@_r":String(Math.round(p*1e5)),"@_b":String(Math.round(h*1e5))};}applyImageEffectsToBlip(t,e){if(!t)return;let n=t["a:blip"];if(!n)return;let r=e??{};if(typeof r.brightness=="number"&&Number.isFinite(r.brightness)?n["@_bright"]=String(Math.round(r.brightness*1e3)):(delete n["@_bright"],delete n["@_brt"]),typeof r.contrast=="number"&&Number.isFinite(r.contrast)?n["@_contrast"]=String(Math.round(r.contrast*1e3)):(delete n["@_contrast"],delete n["@_cont"]),r.grayscale?n["a:grayscl"]={}:delete n["a:grayscl"],typeof r.alphaModFix=="number"&&Number.isFinite(r.alphaModFix)?n["a:alphaModFix"]={"@_amt":String(Math.round(r.alphaModFix*1e3))}:delete n["a:alphaModFix"],typeof r.biLevel=="number"&&Number.isFinite(r.biLevel)?n["a:biLevel"]={"@_thresh":String(Math.round(r.biLevel*1e3))}:delete n["a:biLevel"],r.duotone&&typeof r.duotone.color1=="string"&&typeof r.duotone.color2=="string"?n["a:duotone"]={"a:srgbClr":[{"@_val":r.duotone.color1.replace("#","")},{"@_val":r.duotone.color2.replace("#","")}]}:delete n["a:duotone"],r.clrChange&&typeof r.clrChange.clrFrom=="string"&&typeof r.clrChange.clrTo=="string"){let o={"a:srgbClr":{"@_val":r.clrChange.clrTo.replace("#","")}};r.clrChange.clrToTransparent&&(o["a:srgbClr"]["a:alpha"]={"@_val":"0"}),n["a:clrChange"]={"a:clrFrom":{"a:srgbClr":{"@_val":r.clrChange.clrFrom.replace("#","")}},"a:clrTo":o};}else delete n["a:clrChange"];if(r.alphaInv){let o={};r.alphaInv.color&&(o["a:srgbClr"]={"@_val":r.alphaInv.color.replace("#","")}),n["a:alphaInv"]=o;}else delete n["a:alphaInv"];if(r.alphaCeiling?n["a:alphaCeiling"]={}:delete n["a:alphaCeiling"],r.alphaFloor?n["a:alphaFloor"]={}:delete n["a:alphaFloor"],r.alphaMod){let o={};r.alphaMod.contRawXml&&(o["a:cont"]=r.alphaMod.contRawXml),n["a:alphaMod"]=o;}else delete n["a:alphaMod"];if(typeof r.alphaRepl=="number"&&Number.isFinite(r.alphaRepl)?n["a:alphaRepl"]={"@_a":String(Math.round(r.alphaRepl*1e3))}:delete n["a:alphaRepl"],typeof r.alphaBiLevel=="number"&&Number.isFinite(r.alphaBiLevel)?n["a:alphaBiLevel"]={"@_thresh":String(Math.round(r.alphaBiLevel*1e3))}:delete n["a:alphaBiLevel"],r.clrRepl?r.clrRepl.rawXml?n["a:clrRepl"]=r.clrRepl.rawXml:typeof r.clrRepl.color=="string"&&(n["a:clrRepl"]={"a:srgbClr":{"@_val":r.clrRepl.color.replace("#","")}}):delete n["a:clrRepl"],r.lum){let o={};typeof r.lum.bright=="number"&&Number.isFinite(r.lum.bright)&&(o["@_bright"]=String(Math.round(r.lum.bright*1e3))),typeof r.lum.contrast=="number"&&Number.isFinite(r.lum.contrast)&&(o["@_contrast"]=String(Math.round(r.lum.contrast*1e3))),n["a:lum"]=o;}else delete n["a:lum"];if(r.hsl){let o={};typeof r.hsl.hue=="number"&&Number.isFinite(r.hsl.hue)&&(o["@_hue"]=String(Math.round(r.hsl.hue*6e4))),typeof r.hsl.sat=="number"&&Number.isFinite(r.hsl.sat)&&(o["@_sat"]=String(Math.round(r.hsl.sat*1e3))),typeof r.hsl.lum=="number"&&Number.isFinite(r.hsl.lum)&&(o["@_lum"]=String(Math.round(r.hsl.lum*1e3))),n["a:hsl"]=o;}else delete n["a:hsl"];if(r.tint){let o={};typeof r.tint.hue=="number"&&Number.isFinite(r.tint.hue)&&(o["@_hue"]=String(Math.round(r.tint.hue*6e4))),typeof r.tint.amt=="number"&&Number.isFinite(r.tint.amt)&&(o["@_amt"]=String(Math.round(r.tint.amt*1e3))),n["a:tint"]=o;}else delete n["a:tint"];if(r.fillOverlay){let o={"@_blend":r.fillOverlay.blend};if(r.fillOverlay.fillRawXml)for(let i of Object.keys(r.fillOverlay.fillRawXml))o[i]=r.fillOverlay.fillRawXml[i];n["a:fillOverlay"]=o;}else delete n["a:fillOverlay"];if(r.blur){let o={};typeof r.blur.rad=="number"&&Number.isFinite(r.blur.rad)&&(o["@_rad"]=String(Math.round(r.blur.rad))),typeof r.blur.grow=="boolean"&&(o["@_grow"]=r.blur.grow?"1":"0"),n["a:blur"]=o;}else delete n["a:blur"];}normalizePresetGeometry(t){return this.elementXmlBuilder.normalizePresetGeometry(t)}buildGradientFillXml(t){return this.colorStyleCodec.buildGradientFillXml(t)}clampUnitInterval(t){return this.colorStyleCodec.clampUnitInterval(t)}buildOuterShadowXml(t){return this.colorStyleCodec.buildOuterShadowXml(t)}buildPresetShadowXml(t){return this.colorStyleCodec.buildPresetShadowXml(t)}buildInnerShadowXml(t){return this.colorStyleCodec.buildInnerShadowXml(t)}buildGlowXml(t){return this.colorStyleCodec.buildGlowXml(t)}buildSoftEdgeXml(t){return this.colorStyleCodec.buildSoftEdgeXml(t)}buildReflectionXml(t){return this.colorStyleCodec.buildReflectionXml(t)}buildBlurXml(t){return this.colorStyleCodec.buildBlurXml(t)}buildLineEffectListXml(t){return this.colorStyleCodec.buildLineEffectListXml(t)}textVerticalAlignToDrawingValue(t){if(t==="top")return "t";if(t==="middle")return "ctr";if(t==="bottom")return "b"}textDirectionToDrawingValue(t){if(t==="vertical")return "vert";if(t==="vertical270")return "vert270";if(t==="eaVert")return "eaVert";if(t==="wordArtVert")return "wordArtVert";if(t==="wordArtVertRtl")return "wordArtVertRtl";if(t==="mongolianVert")return "mongolianVert"}normalizeTextColumnCount(t){let e=typeof t=="number"&&Number.isFinite(t)?t:Number.parseInt(String(t??""),10);if(Number.isFinite(e))return Math.max(1,Math.min(16,Math.round(e)))}normalizeTextLineBreaks(t){return t.replace(/\r\n/g,`
267
267
  `).replace(/\r/g,`
268
268
  `)}getTextValueForSave(t,e){return typeof t=="string"?this.normalizeTextLineBreaks(t):!e||e.length===0?"":this.normalizeTextLineBreaks(e.map(n=>String(n.text||"")).join(""))}},Yu=class extends jDe{textStylesEqual(t,e){return ["fontFamily","fontSize","bold","italic","underline","strikethrough","rtl","hyperlink","color","align","vAlign","textDirection","columnCount"].every(r=>t?.[r]===e?.[r])}hasMixedTextStyles(t){if(t.length<=1)return false;let e=t[0]?.style;return t.some((n,r)=>r>0&&!this.textStylesEqual(n.style,e))}areTextSegmentsUniform(t){return !t||t.length<=1?true:!this.hasMixedTextStyles(t)}parseBooleanAttr(t){let e=String(t??"").trim().toLowerCase();return e==="1"||e==="true"}parseOptionalBooleanAttr(t){if(t==null)return;let e=String(t).trim();if(e.length!==0)return this.parseBooleanAttr(e)}normalizeTypefaceToken(t){let e=t.trim();return e.length>0?e:void 0}resolveThemeTypeface(t){let e=this.normalizeTypefaceToken(t||"");if(e){if(e.startsWith("+")){let n=e.slice(1).toLowerCase(),r=this.themeFontMap[n];if(r)return r}return e}}cloneTextStyleValue(t){return t?{...t}:{}}compactTextSegments(t,e){let n=[];return t.forEach(r=>{let o=String(r.text||"");if(o.length===0)return;let i=this.cloneTextStyleValue(r.style),s=n[n.length-1];if(s&&this.textStylesEqual(s.style,i)){s.text+=o;return}n.push({text:o,style:i});}),n.length===0?[{text:"",style:this.cloneTextStyleValue(e)}]:n}},YDe=class extends Yu{applyHyperlinkStyle(t,e,n){let r=e["a:hlinkClick"],o=String(r?.["@_r:id"]||r?.["@_id"]||"").trim();if(o.length>0){t.hyperlinkRId=o;let l=n?.get(o);l&&(t.hyperlink=l);}let i=String(r?.["@_tooltip"]||"").trim();if(i&&(t.hyperlinkTooltip=i),r){let l=String(r["@_invalidUrl"]||"").trim();l&&(t.hyperlinkInvalidUrl=l);let c=String(r["@_tgtFrame"]||"").trim();c&&(t.hyperlinkTargetFrame=c);let u=r["@_history"];if(u!==void 0){let f=String(u).trim().toLowerCase();t.hyperlinkHistory=f!=="0"&&f!=="false";}let d=r["@_highlightClick"];if(d!==void 0){let f=String(d).trim().toLowerCase();t.hyperlinkHighlightClick=f==="1"||f==="true";}let p=r["@_endSnd"];if(p!==void 0){let f=String(p).trim().toLowerCase();t.hyperlinkEndSound=f==="1"||f==="true";}}let s=String(r?.["@_action"]||"").trim();if(s&&(t.hyperlinkAction=s,!t.hyperlink&&s.startsWith("ppaction://")&&(t.hyperlink=s)),s==="ppaction://hlinksldjump"&&o.length>0&&n){let l=n.get(o);if(l){let c=l.match(/slide(\d+)\.xml$/i);c&&(t.hyperlinkTargetSlideIndex=parseInt(c[1],10)-1);}}let a=e["a:hlinkMouseOver"];if(a){let l=String(a["@_r:id"]||a["@_id"]||"").trim();if(l.length>0){let c=n?.get(l);c?t.hyperlinkMouseOver=c:t.hyperlinkMouseOver=l;}}}applyTextRunEffects(t,e){let n=e["a:outerShdw"];if(n){let f=this.parseColor(n);f&&(t.textShadowColor=f);let h=this.extractColorOpacity(n);h!==void 0&&(t.textShadowOpacity=h);let m=Number.parseInt(String(n["@_blurRad"]||""),10);Number.isFinite(m)&&m>=0&&(t.textShadowBlur=m/Yu.EMU_PER_PX);let g=Number.parseInt(String(n["@_dist"]||""),10),x=Number.parseInt(String(n["@_dir"]||""),10);if(Number.isFinite(g)&&g>=0){let v=g/Yu.EMU_PER_PX,S=(Number.isFinite(x)?x/6e4:0)*Math.PI/180;t.textShadowOffsetX=Math.round(Math.cos(S)*v*100)/100,t.textShadowOffsetY=Math.round(Math.sin(S)*v*100)/100;}}let r=e["a:glow"];if(r){let f=this.parseColor(r);f&&(t.textGlowColor=f);let h=this.extractColorOpacity(r);h!==void 0&&(t.textGlowOpacity=h);let m=Number.parseInt(String(r["@_rad"]||""),10);Number.isFinite(m)&&m>=0&&(t.textGlowRadius=m/Yu.EMU_PER_PX);}let o=e["a:reflection"];if(o){t.textReflection=true;let f=Number.parseInt(String(o["@_blurRad"]||""),10);Number.isFinite(f)&&f>=0&&(t.textReflectionBlur=f/Yu.EMU_PER_PX);let h=Number.parseInt(String(o["@_stA"]||""),10);Number.isFinite(h)&&(t.textReflectionStartOpacity=h/1e5);let m=Number.parseInt(String(o["@_endA"]||""),10);Number.isFinite(m)&&(t.textReflectionEndOpacity=m/1e5);let g=Number.parseInt(String(o["@_dist"]||""),10);Number.isFinite(g)&&g>=0&&(t.textReflectionOffset=g/Yu.EMU_PER_PX);}let i=e["a:innerShdw"];if(i){let f=this.parseColor(i);f&&(t.textInnerShadowColor=f);let h=this.extractColorOpacity(i);h!==void 0&&(t.textInnerShadowOpacity=h);let m=Number.parseInt(String(i["@_blurRad"]||""),10);Number.isFinite(m)&&m>=0&&(t.textInnerShadowBlur=m/Yu.EMU_PER_PX);let g=Number.parseInt(String(i["@_dist"]||""),10),x=Number.parseInt(String(i["@_dir"]||""),10);if(Number.isFinite(g)&&g>=0){let v=g/Yu.EMU_PER_PX,S=(Number.isFinite(x)?x/6e4:0)*Math.PI/180;t.textInnerShadowOffsetX=Math.round(Math.cos(S)*v*100)/100,t.textInnerShadowOffsetY=Math.round(Math.sin(S)*v*100)/100;}}let s=e["a:prstShdw"];if(s){let f=String(s["@_prst"]||"").trim();f&&(t.textPresetShadowName=f);let h=this.parseColor(s);h&&(t.textPresetShadowColor=h);let m=this.extractColorOpacity(s);m!==void 0&&(t.textPresetShadowOpacity=m);let g=Number.parseInt(String(s["@_dist"]||""),10);Number.isFinite(g)&&g>=0&&(t.textPresetShadowDistance=g/Yu.EMU_PER_PX);let x=Number.parseInt(String(s["@_dir"]||""),10);Number.isFinite(x)&&(t.textPresetShadowDirection=x/6e4);}let a=e["a:blur"];if(a){let f=Number.parseInt(String(a["@_rad"]||""),10);Number.isFinite(f)&&f>=0&&(t.textBlurRadius=f/Yu.EMU_PER_PX);}let l=e["a:alphaModFix"];if(l){let f=Number.parseInt(String(l["@_amt"]||""),10);Number.isFinite(f)&&(t.textAlphaModFix=f/1e3);}let c=e["a:alphaMod"];if(c){let f=Number.parseInt(String(c["@_amt"]||""),10);Number.isFinite(f)&&(t.textAlphaMod=f/1e3);}let u=e["a:hsl"];if(u){let f=Number.parseInt(String(u["@_hue"]||""),10);Number.isFinite(f)&&(t.textHslHue=f/6e4);let h=Number.parseInt(String(u["@_sat"]||""),10);Number.isFinite(h)&&(t.textHslSaturation=h/1e3);let m=Number.parseInt(String(u["@_lum"]||""),10);Number.isFinite(m)&&(t.textHslLuminance=m/1e3);}let d=e["a:clrChange"];if(d){let f=this.parseColor(d["a:clrFrom"]),h=this.parseColor(d["a:clrTo"]);f&&(t.textClrChangeFrom=f),h&&(t.textClrChangeTo=h);}let p=e["a:duotone"];if(p){let f=[...this.ensureArray(p["a:srgbClr"]),...this.ensureArray(p["a:schemeClr"]),...this.ensureArray(p["a:prstClr"])];f.length>=2&&(t.textDuotone={color1:this.parseColor(f[0])||"#000000",color2:this.parseColor(f[1])||"#ffffff"});}}applyTextRunEffectDag(t,e){let n=e["a:effectDag"];if(!n)return;t.textEffectDagXml=n;let r=fJ(n);r&&(t.textEffectDagTree=r);}},KDe=class qee extends YDe{extractTextRunStyle(e,n,r){let o={align:n};if(!e)return o;if(e["@_sz"]){let N=parseInt(e["@_sz"])/100;o.fontSize=N*(96/72);}if(e["@_b"]!==void 0&&(o.bold=e["@_b"]==="1"),e["@_i"]!==void 0&&(o.italic=e["@_i"]==="1"),e["@_u"]!==void 0){let N=String(e["@_u"]||"").trim().toLowerCase();if(o.underline=N.length>0&&N!=="none"&&N!=="0"&&N!=="false",o.underline){let B=String(e["@_u"]||"").trim();B.length>0&&B!=="none"&&(o.underlineStyle=B);}}let i=e["a:uFill"],s=e["a:uLn"],a=i?.["a:solidFill"]||s?.["a:solidFill"];if(a){let N=this.parseColor(a);N&&(o.underlineColor=N);}if(e["@_strike"]!==void 0){let N=String(e["@_strike"]||"").trim().toLowerCase();o.strikethrough=N.length>0&&N!=="nostrike"&&N!=="none"&&N!=="0"&&N!=="false",o.strikethrough&&(o.strikeType=N==="dblstrike"?"dblStrike":"sngStrike");}let l=e["a:ln"];if(l){let N=Number.parseInt(String(l["@_w"]||""),10);Number.isFinite(N)&&N>0&&(o.textOutlineWidth=N/qee.EMU_PER_PX);let B=l["a:solidFill"];if(B){let O=this.parseColor(B);O&&(o.textOutlineColor=O);}}if(e["a:noFill"]!==void 0&&(o.textFillNone=true),e["@_baseline"]!==void 0){let N=Number.parseInt(String(e["@_baseline"]),10);Number.isFinite(N)&&N!==0&&(o.baseline=N);}if(e["@_spc"]!==void 0){let N=Number.parseInt(String(e["@_spc"]),10);Number.isFinite(N)&&(o.characterSpacing=N);}if(e["@_kern"]!==void 0){let N=Number.parseInt(String(e["@_kern"]),10);Number.isFinite(N)&&(o.kerning=N);}if(e["a:highlight"]){let N=this.parseColor(Rt(e,"a:highlight"));N&&(o.highlightColor=N);}let c=this.extractTextFillVariants(e);c.textFillGradient&&(o.textFillGradient=c.textFillGradient,o.textFillGradientStops=c.textFillGradientStops,o.textFillGradientAngle=c.textFillGradientAngle,o.textFillGradientType=c.textFillGradientType),c.textFillPattern&&(o.textFillPattern=c.textFillPattern,o.textFillPatternForeground=c.textFillPatternForeground,o.textFillPatternBackground=c.textFillPatternBackground);let u=this.parseOptionalBooleanAttr(e["@_rtl"]);u!==void 0&&(o.rtl=u);let d=Rt(e,"a:latin"),p=Rt(e,"a:ea"),f=Rt(e,"a:cs"),h=gn(d,"typeface")||gn(p,"typeface")||gn(f,"typeface"),m=this.resolveThemeTypeface(h);m&&(o.fontFamily=m);let g=this.resolveThemeTypeface(gn(p,"typeface"));g&&(o.eastAsiaFont=g);let x=this.resolveThemeTypeface(gn(f,"typeface"));x&&(o.complexScriptFont=x);let v=Rt(e,"a:solidFill");if(v){o.color=this.parseColor(v);let N=cb(v);N&&(o.colorXml=N);}this.applyHyperlinkStyle(o,e,r);let S=String(e["@_cap"]||"").trim().toLowerCase();(S==="all"||S==="small")&&(o.textCaps=S);let w=Rt(e,"a:sym");if(w){let N=this.normalizeTypefaceToken(gn(w,"typeface")||"");N&&(o.symbolFont=N);}let C=String(e["@_lang"]||"").trim();C&&(o.language=C);let T=this.parseOptionalBooleanAttr(e["@_kumimoji"]);T!==void 0&&(o.kumimoji=T);let E=this.parseOptionalBooleanAttr(e["@_normalizeH"]);E!==void 0&&(o.normalizeHeight=E);let M=this.parseOptionalBooleanAttr(e["@_noProof"]);M!==void 0&&(o.noProof=M);let P=this.parseOptionalBooleanAttr(e["@_dirty"]);P!==void 0&&(o.dirty=P);let R=this.parseOptionalBooleanAttr(e["@_err"]);R!==void 0&&(o.spellingError=R);let k=this.parseOptionalBooleanAttr(e["@_smtClean"]);k!==void 0&&(o.smartTagClean=k);let L=String(e["@_bmk"]||"").trim();L&&(o.bookmark=L);let D=String(e["@_altLang"]||"").trim();if(D&&(o.altLanguage=D),e["@_smtId"]!==void 0){let N=Number.parseInt(String(e["@_smtId"]),10);Number.isFinite(N)&&(o.smartTagId=N);}this.applyTextFontMetadata(o,d,"latin"),this.applyTextFontMetadata(o,p,"eastAsia"),this.applyTextFontMetadata(o,f,"complexScript"),this.applyTextFontMetadata(o,w,"symbol");let U=e["a:effectLst"];return U&&this.applyTextRunEffects(o,U),this.applyTextRunEffectDag(o,e),o}applyTextFontMetadata(e,n,r){if(!n)return;let o=String(n["@_panose"]||"").trim(),i=n["@_pitchFamily"],s=n["@_charset"],a=i!=null?Number.parseInt(String(i),10):void 0,l=s!=null?Number.parseInt(String(s),10):void 0;if(r==="latin"){o&&(e.latinFontPanose=o),typeof a=="number"&&Number.isFinite(a)&&(e.latinFontPitchFamily=a),typeof l=="number"&&Number.isFinite(l)&&(e.latinFontCharset=l);return}if(r==="eastAsia"){o&&(e.eastAsiaFontPanose=o),typeof a=="number"&&Number.isFinite(a)&&(e.eastAsiaFontPitchFamily=a),typeof l=="number"&&Number.isFinite(l)&&(e.eastAsiaFontCharset=l);return}if(r==="complexScript"){o&&(e.complexScriptFontPanose=o),typeof a=="number"&&Number.isFinite(a)&&(e.complexScriptFontPitchFamily=a),typeof l=="number"&&Number.isFinite(l)&&(e.complexScriptFontCharset=l);return}o&&(e.symbolFontPanose=o),typeof a=="number"&&Number.isFinite(a)&&(e.symbolFontPitchFamily=a),typeof l=="number"&&Number.isFinite(l)&&(e.symbolFontCharset=l);}},qDe=class extends KDe{extractTextSegmentsFromTxBodyForRewrite(t,e,n){if(!t)return [];let r=this.ensureArray(t["a:p"]);if(r.length===0)return [];let o=[];return r.forEach((i,s)=>{if(!i)return;let a=i["a:pPr"],l={l:"left",ctr:"center",r:"right",just:"justify",justify:"justify"},c=String(a?.["@_algn"]||"").trim().toLowerCase(),u=this.parseOptionalBooleanAttr(a?.["@_rtl"]),d=l[c]||e?.align||(u?"right":"left"),p={...e,...u!==void 0?{rtl:u}:{},...this.extractTextRunStyle(a?.["a:defRPr"],d,n)},f=(x,v)=>{if(x==null)return;let S=typeof x=="string"?x:String(x);if(S.length===0)return;let w={...p,...this.extractTextRunStyle(v,d,n)};o.push({text:S,style:w});};this.ensureArray(i["a:r"]).forEach(x=>{x&&f(x["a:t"],x["a:rPr"]);}),this.ensureArray(i["a:fld"]).forEach(x=>{if(!x)return;let v=x["a:t"],S=x["a:rPr"],w=v==null?void 0:typeof v=="string"?v:String(v);if(w===void 0||w.length===0)return;let C={...p,...this.extractTextRunStyle(S,d,n)},T=String(x["@_type"]||"").trim()||void 0,E=String(x["@_id"]||"").trim()||void 0;o.push({text:w,style:C,fieldType:T,fieldGuid:E});}),i["a:t"]!==void 0&&f(i["a:t"],i["a:rPr"]),this.ensureArray(i["a:br"]).forEach(()=>{o.push({text:`
269
269
  `,style:this.cloneTextStyleValue(p)});}),s<r.length-1&&o.push({text:`
270
270
  `,style:this.cloneTextStyleValue(p)});}),this.compactTextSegments(o,e)}remapEditedTextToExistingStyles(t,e,n){let r=this.normalizeTextLineBreaks(e),o=[];t.forEach(m=>{let g=this.normalizeTextLineBreaks(String(m.text||"")),x={...n,...m.style};for(let v of Array.from(g))o.push({char:v,style:this.cloneTextStyleValue(x)});});let i=Array.from(r);if(i.length===0)return [{text:"",style:this.cloneTextStyleValue(o[0]?.style||n)}];if(o.length===0)return [{text:r,style:this.cloneTextStyleValue(n)}];let s=o.map(m=>m.char),a=0;for(;a<s.length&&a<i.length&&s[a]===i[a];)a+=1;let l=s.length-1,c=i.length-1;for(;l>=a&&c>=a&&s[l]===i[c];)l-=1,c-=1;let u=[];for(let m=0;m<a;m++)u.push({char:i[m],style:this.cloneTextStyleValue(o[m]?.style)});let d=this.cloneTextStyleValue((a>0?o[a-1]?.style:void 0)||(l+1<o.length?o[l+1]?.style:void 0)||o[0]?.style||n);for(let m=a;m<=c&&m<i.length;m++)u.push({char:i[m],style:this.cloneTextStyleValue(d)});let p=l+1,f=c+1;for(let m=0;m<i.length-f;m++)u.push({char:i[f+m],style:this.cloneTextStyleValue(o[p+m]?.style||d)});let h=u.map(m=>({text:m.char,style:m.style}));return this.compactTextSegments(h,n)}},ZDe=class extends qDe{readPlaceholderInfoFromNvPr(t){if(!t)return null;let e=t["p:ph"];if(!e)return null;let n=e["@_idx"],r=e["@_type"],o=e["@_sz"];return {idx:n!==void 0?String(n):void 0,type:r!==void 0?String(r).toLowerCase():void 0,sz:o!==void 0?String(o).toLowerCase():void 0}}getElementPlaceholderInfo(t){let e=t.rawXml;if(!e)return null;let n=on(e,"p:nvSpPr","p:nvPr")??on(e,"p:nvPicPr","p:nvPr")??on(e,"p:nvGraphicFramePr","p:nvPr");return this.readPlaceholderInfoFromNvPr(n)}extractLayoutPlaceholders(t){let e=on(t,"p:sldLayout","p:cSld","p:spTree");if(!e)return [];let n=[],r=this.ensureArray(e["p:sp"]);for(let o of r){let i=on(o,"p:nvSpPr","p:nvPr"),s=this.readPlaceholderInfoFromNvPr(i);if(!s)continue;let l=o["p:spPr"]?.["a:xfrm"],c=l?.["a:off"],u=l?.["a:ext"],d=c?Number(c["@_x"]||0):0,p=c?Number(c["@_y"]||0):0,f=u?Number(u["@_cx"]||0):0,h=u?Number(u["@_cy"]||0):0;n.push({phInfo:s,xEmu:d,yEmu:p,cxEmu:f,cyEmu:h,shapeXml:o});}return n}buildPlaceholderMatchKey(t){let e=t.type||"body";return t.idx!==void 0?`${e}:${t.idx}`:e}remapElementsToNewLayout(t,e,n){let r=this.extractLayoutPlaceholders(e),o=new Map;for(let s of r){let a=this.buildPlaceholderMatchKey(s.phInfo);o.set(a,{...s,matched:false});}let i=[];for(let s of t){let a=this.getElementPlaceholderInfo(s);if(!a){i.push(s);continue}let l=this.buildPlaceholderMatchKey(a),u=o.get(l);if(!u&&a.type){for(let[,d]of o.entries())if(!d.matched&&d.phInfo.type===a.type){u=d;break}}if(u){u.matched=true;let d={...s};u.cxEmu>0&&u.cyEmu>0&&(d.x=Math.round(u.xEmu/Ir),d.y=Math.round(u.yEmu/Ir),d.width=Math.round(u.cxEmu/Ir),d.height=Math.round(u.cyEmu/Ir)),d.rawXml&&u.cxEmu>0&&u.cyEmu>0&&this.updateElementRawXmlTransform(d.rawXml,u.xEmu,u.yEmu,u.cxEmu,u.cyEmu),i.push(d);}}for(let[,s]of o){if(s.matched)continue;let a=new Set(["dt","ftr","sldnum","hdr"]);if(s.phInfo.type&&a.has(s.phInfo.type))continue;let l=this.createEmptyPlaceholderElement(s.phInfo,s.xEmu,s.yEmu,s.cxEmu,s.cyEmu,n);l&&i.push(l);}return i}updateElementRawXmlTransform(t,e,n,r,o){let i=t["p:spPr"];if(!i)return;let s=i["a:xfrm"];s||(s={},i["a:xfrm"]=s);let a=s["a:off"];a||(a={},s["a:off"]=a),a["@_x"]=String(e),a["@_y"]=String(n);let l=s["a:ext"];l||(l={},s["a:ext"]=l),l["@_cx"]=String(r),l["@_cy"]=String(o);}createEmptyPlaceholderElement(t,e,n,r,o,i){if(r<=0||o<=0)return null;let s={};t.type&&(s["@_type"]=t.type),t.idx!==void 0&&(s["@_idx"]=t.idx);let a={"p:nvSpPr":{"p:cNvPr":{"@_id":String(Date.now()+Math.floor(Math.random()*1e4)),"@_name":`Placeholder ${t.type||"content"}`},"p:cNvSpPr":{"a:spLocks":{"@_noGrp":"1"}},"p:nvPr":{"p:ph":s}},"p:spPr":{"a:xfrm":{"a:off":{"@_x":String(e),"@_y":String(n)},"a:ext":{"@_cx":String(r),"@_cy":String(o)}}},"p:txBody":{"a:bodyPr":{},"a:lstStyle":{},"a:p":{"a:endParaRPr":{"@_lang":"en-US"}}}};return {type:"text",id:`ph-${t.type||"content"}-${t.idx||"0"}-${Date.now()}`,x:Math.round(e/Ir),y:Math.round(n/Ir),width:Math.round(r/Ir),height:Math.round(o/Ir),text:"",rawXml:a}}};t5e=class oA extends ZDe{writeTableCellText(e,n){e["a:txBody"]||(e["a:txBody"]={"a:bodyPr":{},"a:p":{}});let r=e["a:txBody"];r["a:bodyPr"]||(r["a:bodyPr"]={});let o=this.ensureArray(r["a:p"]),i=this.ensureArray(o[0]?.["a:r"])[0]?.["a:rPr"],s=o[0]?.["a:pPr"],a=o[0]?.["a:endParaRPr"],l=i?{...i}:{"@_lang":"en-US","@_dirty":"0"},c=a?{...a}:{"@_lang":"en-US","@_dirty":"0"},d=n.split(`
271
- `).map(p=>{let f={};return s&&(f["a:pPr"]=s),f["a:r"]={"a:rPr":l,"a:t":p},f["a:endParaRPr"]=c,f});r["a:p"]=d.length===1?d[0]:d;}writeTableCellStyle(e,n){e["a:tcPr"]||(e["a:tcPr"]={});let r=e["a:tcPr"];if(JDe(r,n,a=>this.parseColor(a)),n.vAlign){let a={top:"t",middle:"ctr",bottom:"b"};r["@_anchor"]=a[n.vAlign]||"t";}if(n.textDirection&&(r["@_vert"]=n.textDirection),n.align){let a=this.ensureArray(e["a:txBody"]?.["a:p"])[0];if(a){a["a:pPr"]||(a["a:pPr"]={});let l={left:"l",center:"ctr",right:"r",justify:"just"};a["a:pPr"]["@_algn"]=l[n.align]||"l";}}let o=[{xmlKey:"a:lnT",width:n.borderTopWidth,color:n.borderTopColor,dash:n.borderTopDash},{xmlKey:"a:lnB",width:n.borderBottomWidth,color:n.borderBottomColor,dash:n.borderBottomDash},{xmlKey:"a:lnL",width:n.borderLeftWidth,color:n.borderLeftColor,dash:n.borderLeftDash},{xmlKey:"a:lnR",width:n.borderRightWidth,color:n.borderRightColor,dash:n.borderRightDash}];for(let a of o)if(a.width!==void 0||a.color!==void 0||a.dash!==void 0){r[a.xmlKey]||(r[a.xmlKey]={});let l=r[a.xmlKey];a.width!==void 0&&(l["@_w"]=String(Math.round(a.width*oA.EMU_PER_PX))),a.color&&(l["a:solidFill"]={"a:srgbClr":{"@_val":a.color.replace("#","")}}),a.dash&&a.dash!=="solid"?l["a:prstDash"]={"@_val":a.dash}:a.dash==="solid"&&delete l["a:prstDash"];}let i=oA.EMU_PER_PX;n.marginLeft!==void 0&&(r["@_marL"]=String(Math.round(n.marginLeft*i))),n.marginRight!==void 0&&(r["@_marR"]=String(Math.round(n.marginRight*i))),n.marginTop!==void 0&&(r["@_marT"]=String(Math.round(n.marginTop*i))),n.marginBottom!==void 0&&(r["@_marB"]=String(Math.round(n.marginBottom*i))),delete r["a:tcMar"],QDe(r,n,oA.EMU_PER_PX),e5e(e,n,this.ensureArray.bind(this));let s=Wg(r,sJ);for(let a of Object.keys(r))delete r[a];for(let a of Object.keys(s))r[a]=s[a];}},n5e=["horzOverflow","anchorCtr","headers","hideSlicers","slicerCacheId"];o5e="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}";s5e=40,Zee=s5e*Ir;fZ="{9D8B030D-6E8A-4147-A177-3AD203B41FA5}",l5e="http://schemas.microsoft.com/office/drawing/2014/main";f5e=class cO extends t5e{serializeTableDataToXml(e,n){try{let r=on(e,"a:graphic","a:graphicData"),o=Rt(r,"a:tbl");if(!o)return;i5e(o,n);let i=this.ensureArray(o["a:tr"]),s=this.ensureArray(Rt(o,"a:tblGrid")?.["a:gridCol"]).length,a=n.rows.length,l=n.columnWidths.length;if(a!==i.length||l!==s){d5e(o,n,cO.EMU_PER_PX,this.ensureArray.bind(this));let u=this.ensureArray(o["a:tr"]);for(let d=0;d<n.rows.length;d++){let p=n.rows[d],f=u[d];if(!f)continue;let h=this.ensureArray(f["a:tc"]);for(let m=0;m<p.cells.length;m++){let g=p.cells[m],x=h[m];x&&(g.text!==void 0&&this.writeTableCellText(x,g.text),g.style&&this.writeTableCellStyle(x,g.style),pZ(x,g.extraAttributes));}}return}for(let u=0;u<Math.min(n.rows.length,i.length);u++){let d=n.rows[u],p=i[u];d.height!==void 0&&d.height>0&&(p["@_h"]=String(Math.round(d.height*cO.EMU_PER_PX)));let f=this.ensureArray(p["a:tc"]);for(let h=0;h<Math.min(d.cells.length,f.length);h++){let m=d.cells[h],g=f[h];r5e(g,m),m.text!==void 0&&this.writeTableCellText(g,m.text),m.style&&this.writeTableCellStyle(g,m.style),pZ(g,m.extraAttributes);}}}catch(r){console.warn("Failed to serialize table data:",r);}}pendingChartUpdates;serializeChartDataToXml(e,n){e.chartPartPath&&(this.pendingChartUpdates||(this.pendingChartUpdates=[]),this.pendingChartUpdates.push({chartData:e,slidePath:n}));}async processPendingChartUpdates(){if(!(!this.pendingChartUpdates||this.pendingChartUpdates.length===0)){for(let{chartData:e}of this.pendingChartUpdates){let n=e.chartPartPath;if(!n)continue;let r=this.zip.file(n);if(r)try{let o=await r.async("string"),i=this.parser.parse(o),s=this.xmlLookupService.getChildByLocalName(i,"chartSpace");if(!s)continue;let a=this.xmlLookupService.getChildByLocalName(s,"chart");if(!a)continue;let l=this.xmlLookupService.getChildByLocalName(a,"plotArea");if(!l)continue;let c=Object.keys(l).find(x=>this.compatibilityService.getXmlLocalName(x).endsWith("Chart"));if(!c)continue;let u=l[c];if(!u)continue;let d=this.chartTypeToXmlTag(e.chartType),p=this.compatibilityService.getXmlLocalName(c);if(d&&p!==d){let x=`c:${d}`;l[x]=u,delete l[c],c=x;}let f=Object.keys(u).find(x=>this.compatibilityService.getXmlLocalName(x)==="grouping");e.grouping?f?u[f]["@_val"]=e.grouping:u["c:grouping"]={"@_val":e.grouping}:f&&delete u[f];let h=this.xmlLookupService.getChildrenArrayByLocalName(u,"ser"),m=Object.keys(u).find(x=>this.compatibilityService.getXmlLocalName(x)==="ser")??"c:ser",g=Math.min(h.length,e.series.length);for(let x=0;x<g;x++){let v=h[x],S=e.series[x],w=this.xmlLookupService.getChildByLocalName(v,"idx");w&&(w["@_val"]=String(x));let C=this.xmlLookupService.getChildByLocalName(v,"order");C&&(C["@_val"]=String(x));let T=this.xmlLookupService.getChildByLocalName(v,"tx");T&&this.updateChartCacheValues(T,!1,[S.name]);let E=this.xmlLookupService.getChildByLocalName(v,"cat")||this.xmlLookupService.getChildByLocalName(v,"xVal");E&&this.updateChartCacheValues(E,!1,e.categories);let M=this.xmlLookupService.getChildByLocalName(v,"val")||this.xmlLookupService.getChildByLocalName(v,"yVal");if(M&&this.updateChartCacheValues(M,!0,S.values.map(String)),S.color){let P=S.color.replace("#",""),R=this.xmlLookupService.getChildByLocalName(v,"spPr");if(R){let k=Object.keys(R).find(L=>this.compatibilityService.getXmlLocalName(L)==="solidFill")??"a:solidFill";R[k]={"a:srgbClr":{"@_val":P}};}else {let k=Object.keys(v).find(L=>this.compatibilityService.getXmlLocalName(L)==="spPr")??"c:spPr";v[k]={"a:solidFill":{"a:srgbClr":{"@_val":P}}};}}S.trendlines!==void 0&&sDe(v,S.trendlines,P=>this.compatibilityService.getXmlLocalName(P)),S.errBars!==void 0&&YNe(v,S.errBars,P=>this.compatibilityService.getXmlLocalName(P)),S.marker!==void 0&&eDe(v,S.marker,P=>this.compatibilityService.getXmlLocalName(P)),S.dataPoints!==void 0&&WNe(v,S.dataPoints,P=>this.compatibilityService.getXmlLocalName(P));}if(e.series.length>h.length){let x=h.length>0?h[h.length-1]:void 0,v=[];for(let w=h.length;w<e.series.length;w++){let C=e.series[w],T=this.buildNewSeriesXml(w,C,e.categories,x);v.push(T);}let S=Array.isArray(u[m])?u[m]:u[m]?[u[m]]:[];u[m]=[...S,...v];}if(e.series.length<h.length){let x=Array.isArray(u[m])?u[m]:u[m]?[u[m]]:[];u[m]=x.slice(0,e.series.length),e.series.length===1&&(u[m]=u[m][0]);}if(e.series.some(x=>x.seriesChartType!==void 0)&&FNe(l,c,e.series,e.chartType,x=>this.compatibilityService.getXmlLocalName(x)),e.title!==void 0){let x=this.xmlLookupService.getChildByLocalName(a,"title");x&&this.replaceFirstTextValue(x,"t",e.title);}if(e.externalData?.autoUpdate!==void 0){let x=this.xmlLookupService.getChildByLocalName(s,"externalData");if(x){let v=this.xmlLookupService.getChildByLocalName(x,"autoUpdate");v&&(v["@_val"]=e.externalData.autoUpdate?"1":"0"),x["@_autoUpdate"]!==void 0&&(x["@_autoUpdate"]=e.externalData.autoUpdate?"1":"0");}}if(e.pivotSource){let x=this.xmlLookupService.getChildByLocalName(s,"pivotSource");if(x){let v=this.xmlLookupService.getChildByLocalName(x,"name");if(v&&(v["#text"]=e.pivotSource.name),e.pivotSource.formatId!==void 0){let S=this.xmlLookupService.getChildByLocalName(x,"fmtId");S&&(S["@_val"]=String(e.pivotSource.formatId));}}else {let v={"c:name":{"#text":e.pivotSource.name}};e.pivotSource.formatId!==void 0&&(v["c:fmtId"]={"@_val":String(e.pivotSource.formatId)}),s["c:pivotSource"]=v;}}if(e.plotVisibleOnly!==void 0){let x=this.xmlLookupService.getChildByLocalName(a,"plotVisOnly"),v=e.plotVisibleOnly?"1":"0";x?x["@_val"]=v:a["c:plotVisOnly"]={"@_val":v};}if(e.ofPieOptions&&this.applyOfPieOptions(u,e.ofPieOptions),e.view3D&&this.applyView3D(a,e.view3D),e.chartChrome&&this.applyChartChrome(a,e.chartChrome),e.style&&KNe(a,e.style,x=>this.compatibilityService.getXmlLocalName(x)),e.style&&ONe(l,e.style,x=>this.compatibilityService.getXmlLocalName(x)),e.axes){let x=["valAx","catAx","dateAx","serAx"];for(let v of x){let S=this.xmlLookupService.getChildrenArrayByLocalName(l,v);for(let w of S){let C=this.xmlLookupService.getChildByLocalName(w,"axId"),T=C?parseInt(String(C["@_val"]),10):void 0,E=e.axes.find(P=>P.axisId!==void 0&&P.axisId===T);if(!E)continue;let M=this.xmlLookupService.getChildByLocalName(w,"scaling");if(M){if(E.logBase!==void 0&&E.logBase>0){let P=Object.keys(M).find(R=>this.compatibilityService.getXmlLocalName(R)==="logBase");P?M[P]["@_val"]=String(E.logBase):M["c:logBase"]={"@_val":String(E.logBase)};}else if(E.logScale===!1){let P=Object.keys(M).find(R=>this.compatibilityService.getXmlLocalName(R)==="logBase");P&&delete M[P];}this.upsertChartAxisChild(M,"min",E.min!==void 0?String(E.min):void 0),this.upsertChartAxisChild(M,"max",E.max!==void 0?String(E.max):void 0);}if(E.numFmt){let P=Object.keys(w).find(k=>this.compatibilityService.getXmlLocalName(k)==="numFmt"),R={"@_formatCode":E.numFmt.formatCode,"@_sourceLinked":E.numFmt.sourceLinked?"1":"0"};P?w[P]=R:w["c:numFmt"]=R;}if(this.upsertChartAxisChild(w,"majorUnit",E.majorUnit!==void 0?String(E.majorUnit):void 0),this.upsertChartAxisChild(w,"minorUnit",E.minorUnit!==void 0?String(E.minorUnit):void 0),E.tickLblPos!==void 0){let P=Object.keys(w).find(R=>this.compatibilityService.getXmlLocalName(R)==="tickLblPos");P?w[P]["@_val"]=E.tickLblPos:w["c:tickLblPos"]={"@_val":E.tickLblPos};}ANe(w,E.titleText,P=>this.compatibilityService.getXmlLocalName(P)),INe(w,{fontFamily:E.fontFamily,fontSize:E.fontSize,fontBold:E.fontBold,fontColor:E.fontColor},P=>this.compatibilityService.getXmlLocalName(P)),TNe(w,E,P=>this.compatibilityService.getXmlLocalName(P)),(v==="valAx"||v==="dateAx")&&SNe(w,E,P=>this.compatibilityService.getXmlLocalName(P));}}}this.zip.file(n,this.builder.build(i));}catch(o){console.warn(`[pptx-save] Failed to serialize chart data for ${n}:`,o);}}this.pendingChartUpdates=void 0;}}upsertChartAxisChild(e,n,r){bAe(e,n,r,o=>this.compatibilityService.getXmlLocalName(o));}updateChartCacheValues(e,n,r){let o=n?"numRef":"strRef",i=n?"numLit":"strLit",s=n?"numCache":"strCache",a=this.xmlLookupService.getChildByLocalName(e,o)||this.xmlLookupService.getChildByLocalName(e,i);if(!a)return;let l=this.xmlLookupService.getChildByLocalName(a,s)||a;if(!l)return;let c=this.xmlLookupService.getChildByLocalName(l,"ptCount");c&&(c["@_val"]=String(r.length));let u=Object.keys(l).find(d=>this.compatibilityService.getXmlLocalName(d)==="pt");u&&(l[u]=SB(r));}replaceFirstTextValue(e,n,r){return aO(e,n,r,o=>this.compatibilityService.getXmlLocalName(o))}upsertValChild(e,n,r){let o=this.xmlLookupService.getChildByLocalName(e,n),i=Object.keys(e).find(s=>this.compatibilityService.getXmlLocalName(s)===n);if(r===void 0){i&&delete e[i];return}o&&i?e[i]={...o,"@_val":r}:e[`c:${n}`]={"@_val":r};}applyOfPieOptions(e,n){this.upsertValChild(e,"ofPieType",n.ofPieType),this.upsertValChild(e,"splitType",n.splitType),this.upsertValChild(e,"splitPos",n.splitPos!==void 0?String(n.splitPos):void 0),this.upsertValChild(e,"secondPieSize",n.secondPieSize!==void 0?String(n.secondPieSize):void 0),this.upsertValChild(e,"gapWidth",n.gapWidth!==void 0?String(n.gapWidth):void 0);let r=Object.keys(e).find(o=>this.compatibilityService.getXmlLocalName(o)==="serLines");n.serLines?r||(e["c:serLines"]={}):n.serLines===false&&r&&delete e[r],n.custSplit&&n.custSplit.length>0&&(e["c:custSplit"]={"c:secondPiePt":n.custSplit.map(o=>({"@_val":String(o)}))});}applyView3D(e,n){let r={};n.rotX!==void 0&&(r["c:rotX"]={"@_val":String(n.rotX)}),n.hPercent!==void 0&&(r["c:hPercent"]={"@_val":String(n.hPercent)}),n.rotY!==void 0&&(r["c:rotY"]={"@_val":String(n.rotY)}),n.depthPercent!==void 0&&(r["c:depthPercent"]={"@_val":String(n.depthPercent)}),n.rAngAx!==void 0&&(r["c:rAngAx"]={"@_val":n.rAngAx?"1":"0"}),n.perspective!==void 0&&(r["c:perspective"]={"@_val":String(n.perspective)});let o=Object.keys(e).find(i=>this.compatibilityService.getXmlLocalName(i)==="view3D");if(Object.keys(r).length===0){o&&delete e[o];return}o?e[o]=r:e["c:view3D"]=r;}applyChartChrome(e,n){n.autoTitleDeleted!==void 0&&this.upsertValChild(e,"autoTitleDeleted",n.autoTitleDeleted?"1":"0"),n.dispBlanksAs!==void 0&&this.upsertValChild(e,"dispBlanksAs",n.dispBlanksAs),n.showDLblsOverMax!==void 0&&this.upsertValChild(e,"showDLblsOverMax",n.showDLblsOverMax?"1":"0");}chartTypeToXmlTag(e){return {bar:"barChart",bar3D:"bar3DChart",line:"lineChart",line3D:"line3DChart",pie:"pieChart",pie3D:"pie3DChart",ofPie:"ofPieChart",doughnut:"doughnutChart",area:"areaChart",area3D:"area3DChart",scatter:"scatterChart",bubble:"bubbleChart",radar:"radarChart",stock:"stockChart",surface:"surfaceChart"}[e]}buildNewSeriesXml(e,n,r,o){if(o){let a=JSON.parse(JSON.stringify(o)),l=this.xmlLookupService.getChildByLocalName(a,"idx");l&&(l["@_val"]=String(e));let c=this.xmlLookupService.getChildByLocalName(a,"order");c&&(c["@_val"]=String(e));let u=this.xmlLookupService.getChildByLocalName(a,"tx");u&&this.updateChartCacheValues(u,false,[n.name]);let d=this.xmlLookupService.getChildByLocalName(a,"cat")||this.xmlLookupService.getChildByLocalName(a,"xVal");d&&this.updateChartCacheValues(d,false,r);let p=this.xmlLookupService.getChildByLocalName(a,"val")||this.xmlLookupService.getChildByLocalName(a,"yVal");if(p&&this.updateChartCacheValues(p,true,n.values.map(String)),n.color){let f=this.xmlLookupService.getChildByLocalName(a,"spPr");if(f){let h=Object.keys(f).find(m=>this.compatibilityService.getXmlLocalName(m)==="solidFill");h?f[h]={"a:srgbClr":{"@_val":n.color.replace("#","")}}:f["a:solidFill"]={"a:srgbClr":{"@_val":n.color.replace("#","")}};}}return a}let i=(n.color||"#4472C4").replace("#","");return {"c:idx":{"@_val":String(e)},"c:order":{"@_val":String(e)},"c:tx":{"c:strRef":{"c:strCache":{"c:ptCount":{"@_val":"1"},"c:pt":{"@_idx":"0","c:v":n.name}}}},"c:spPr":{"a:solidFill":{"a:srgbClr":{"@_val":i}}},"c:cat":{"c:strRef":{"c:strCache":{"c:ptCount":{"@_val":String(r.length)},"c:pt":SB(r)}}},"c:val":{"c:numRef":{"c:numCache":{"c:formatCode":"General","c:ptCount":{"@_val":String(n.values.length)},"c:pt":SB(n.values.map(String))}}}}}};ete=new Set(["doc","pres","parTrans","sibTrans"]);S5e=class dO extends f5e{pendingSmartArtUpdates;serializeSmartArtDataToXml(e,n){e.smartArtData?.dataRelId&&(this.pendingSmartArtUpdates||(this.pendingSmartArtUpdates=[]),this.pendingSmartArtUpdates.push({element:e,slidePath:n}));}async processPendingSmartArtUpdates(){if(!(!this.pendingSmartArtUpdates||this.pendingSmartArtUpdates.length===0)){for(let{element:e,slidePath:n}of this.pendingSmartArtUpdates){let r=e.smartArtData;if(!r?.dataRelId)continue;let o=n&&n.length>0?n:this.findSlidePathForElement(e);if(!o)continue;let s=this.slideRelsMap.get(o)?.get(r.dataRelId);if(!s)continue;let a=this.resolveImagePath(o,s),l=await this.zip.file(a)?.async("string");if(l)try{let c=this.parser.parse(l),u=this.xmlLookupService.getChildByLocalName(c,"dataModel");if(!u)continue;let d=Object.keys(u).find(p=>this.compatibilityService.getXmlLocalName(p)==="ptLst");if(d){let p=u[d],f=Object.keys(p||{}).find(h=>this.compatibilityService.getXmlLocalName(h)==="pt");if(f){let h=this.ensureArray(p[f]);p[f]=b5e(h,r.nodes);}}if(r.connections&&r.connections.length>0){let p=Object.keys(u).find(f=>this.compatibilityService.getXmlLocalName(f)==="cxnLst");if(p){let f=u[p],h=Object.keys(f||{}).find(m=>this.compatibilityService.getXmlLocalName(m)==="cxn");h&&(f[h]=v5e(r.connections));}}h5e(u,r.chrome,p=>this.compatibilityService.getXmlLocalName(p)),this.zip.file(a,this.builder.build(c));}catch(c){console.warn(`Failed to save SmartArt data at ${a}:`,c);}}this.pendingSmartArtUpdates=void 0;}}findSlidePathForElement(e){for(let[n]of this.slideRelsMap)if(this.slideMap.has(n))return n;return this.orderedSlidePaths[0]}async applyNotesMasterChanges(e){if(!e)return;let n=this.zip.file(e.path);if(n)try{let r=await n.async("string"),o=this.parser.parse(r),i=o?.["p:notesMaster"];if(!i)return;let s=i["p:cSld"]||{};if(e.backgroundColor){let a=e.backgroundColor.replace("#","");s["p:bg"]={"p:bgPr":{"a:solidFill":{"a:srgbClr":{"@_val":a}},"a:effectLst":{}}};}i["p:cSld"]=s,o["p:notesMaster"]=i,this.zip.file(e.path,this.builder.build(o));}catch(r){console.warn("Failed to save notes master changes:",r);}}async applyHandoutMasterChanges(e){if(!e)return;let n=this.zip.file(e.path);if(n)try{let r=await n.async("string"),o=this.parser.parse(r),i=o?.["p:handoutMaster"];if(!i)return;let s=i["p:cSld"]||{};if(e.backgroundColor){let a=e.backgroundColor.replace("#","");s["p:bg"]={"p:bgPr":{"a:solidFill":{"a:srgbClr":{"@_val":a}},"a:effectLst":{}}};}i["p:cSld"]=s,o["p:handoutMaster"]=i,this.zip.file(e.path,this.builder.build(o));}catch(r){console.warn("Failed to save handout master changes:",r);}}async applyTagCollectionChanges(e){if(!(!e||e.length===0)){for(let n of e)if(!(!n.path||n.tags.length===0))try{let o={"p:tagLst":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","p:tag":n.tags.map(i=>({"@_name":i.name,"@_val":i.value}))}};this.zip.file(n.path,this.builder.build(o));}catch(r){console.warn(`Failed to save tag collection at ${n.path}:`,r);}}}applyCustomXmlPartsPreservation(){if(this.customXmlParts.length===0)return;let e=/^[A-Za-z0-9_-]+$/u,n=1;for(let r of this.customXmlParts){let o=String(r.id),i=e.test(o)?o:String(n++);this.zip.file(`customXml/item${i}.xml`,r.data),r.properties&&this.zip.file(`customXml/itemProps${i}.xml`,r.properties),r.rels&&this.zip.file(`customXml/_rels/item${i}.xml.rels`,r.rels);}}applyThumbnailPreservation(){if(!this.thumbnailData)return;let e=["docProps/thumbnail.jpeg","docProps/thumbnail.jpg","docProps/thumbnail.png","docProps/thumbnail.emf"],n="docProps/thumbnail.jpeg";for(let r of e)if(this.zip.file(r)){n=r;break}this.zip.file(n,this.thumbnailData);}async applyVbaProjectPreservation(){if(this.vbaProjectBin){this.zip.file("ppt/vbaProject.bin",this.vbaProjectBin);for(let[e,n]of this.vbaRelatedParts)this.zip.file(e,n);}}async applyOutputFormatOverrides(e){if(e==="pptx")return;let n=this.vbaProjectBin!==null,r=await this.zip.file("[Content_Types].xml")?.async("string");if(r){let o=this.parser.parse(r);this.contentTypesBuilder.applyOutputFormatOverride(o,e,n),this.zip.file("[Content_Types].xml",this.builder.build(o));}e==="pptm"&&n&&await this.ensureVbaRelationship();}static FONT_REL_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";static FNTDATA_CONTENT_TYPE="application/x-fontdata";async applyEmbeddedFontPreservation(e){let r=(e??this.loadedEmbeddedFonts).filter(m=>m.rawFontData&&m.rawFontData.length>0);if(r.length===0)return;let o=new Map;for(let m of r){let g=o.get(m.name)??[];g.push(m),o.set(m.name,g);}let i="ppt/_rels/presentation.xml.rels",s=await this.zip.file(i)?.async("string");if(!s||!this.presentationData)return;let a=this.parser.parse(s),l=a?.Relationships??{},c=this.ensureArray(l.Relationship),u=0;for(let m of c){let g=String(m?.["@_Id"]||""),x=parseInt(g.replace(/^rId/u,""),10);Number.isFinite(x)&&x>u&&(u=x);}let d=new Set;for(let m of c)String(m?.["@_Type"]||"").includes("/font")&&d.add(String(m?.["@_Target"]||""));let p=[];for(let[m,g]of o){let x={"p:font":{"@_typeface":m}};for(let v of g){let S=v.rawFontData,w=!!(v.originalRId&&v.partPath),C=w&&!!v.fontGuid,T=w&&!v.fontGuid&&!!v.originalPartBytes,E,M,P,R,k,L;if(C)E=v.fontGuid,M=v.partPath,P=M.startsWith("ppt/")?M.substring(4):M,R=v.originalRId,k=HB(S,E),L=`{${E}}`;else if(T)E="",M=v.partPath,P=M.startsWith("ppt/")?M.substring(4):M,R=v.originalRId,k=v.originalPartBytes,L=void 0;else {E=v.fontGuid??wQ();let N=`{${E}}.fntdata`;M=`ppt/fonts/${N}`,P=`fonts/${N}`,k=HB(S,E),L=`{${E}}`;let B=c.find(O=>String(O?.["@_Target"]||"")===P);B?R=String(B["@_Id"]):(u++,R=`rId${u}`,c.push({"@_Id":R,"@_Type":dO.FONT_REL_TYPE,"@_Target":P}));}this.zip.file(M,k);let D=v.bold&&v.italic?"p:boldItalic":v.bold?"p:bold":v.italic?"p:italic":"p:regular",U={"@_r:id":R};L&&(U["@_fontKey"]=L),x[D]=U;}p.push(x);}l.Relationship=c,a.Relationships=l,this.zip.file(i,this.builder.build(a));let f=this.presentationData["p:presentation"];f&&(f["p:embeddedFontLst"]={"p:embeddedFont":p.length===1?p[0]:p});let h=await this.zip.file("[Content_Types].xml")?.async("string");if(h){let m=this.parser.parse(h),g=m.Types||{},x=Array.isArray(g.Default)?g.Default:g.Default?[g.Default]:[];x.some(S=>String(S?.["@_Extension"]||"").toLowerCase()==="fntdata")||x.push({"@_Extension":"fntdata","@_ContentType":dO.FNTDATA_CONTENT_TYPE}),g.Default=x,m.Types=g,this.zip.file("[Content_Types].xml",this.builder.build(m));}}async ensureVbaRelationship(){let e="ppt/_rels/presentation.xml.rels",n=await this.zip.file(e)?.async("string");if(!n)return;let r=this.parser.parse(n),o=r?.Relationships??{},i=this.ensureArray(o.Relationship),s="http://schemas.microsoft.com/office/2006/relationships/vbaProject";if(i.some(c=>String(c?.["@_Type"]||"")===s))return;let l=0;for(let c of i){let u=String(c?.["@_Id"]||""),d=parseInt(u.replace(/^rId/u,""),10);Number.isFinite(d)&&d>l&&(l=d);}i.push({"@_Id":`rId${l+1}`,"@_Type":s,"@_Target":"vbaProject.bin"}),o.Relationship=i,r.Relationships=o,this.zip.file(e,this.builder.build(r));}async convertZipToStrictConformance(){let e=[];this.zip.forEach(o=>{(o.endsWith(".xml")||o.endsWith(".rels"))&&e.push(o);});let n=this._originalParser||this.parser,r=typeof n.parse=="function"?n.parse.bind(n):this.parser.parse.bind(this.parser);for(let o of e){let i=this.zip.file(o);if(!i)continue;let s=await i.async("string");if(s.trim())try{let a=r(s);if(typeof a!="object"||a===null)continue;wA(a,o==="ppt/presentation.xml"),this.zip.file(o,this.builder.build(a));}catch{}}}},w5e=class extends S5e{async applyPresentationPropertiesPart(t){if(!t)return;let e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string"),n="ppt/presProps.xml";if(e)try{let l=this.parser.parse(e),u=this.ensureArray(l?.Relationships?.Relationship).find(d=>{let p=String(d?.["@_Type"]||""),f=String(d?.["@_Target"]||"");return p.includes("presProps")||f.includes("presProps")});if(u){let d=String(u["@_Target"]||"").trim();if(d.length>0){let p=xA("ppt",d);p!==null&&(n=p);}}}catch{}let r=await this.zip.file(n)?.async("string"),o=r?this.parser.parse(r):{"p:presentationPr":{"@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"}},i=o["p:presentationPr"]||{},s=i["p:showPr"]||{},a={};for(let l of Object.keys(s))l.startsWith("@_")&&(a[l]=s[l]);if(t.loopContinuously!==void 0&&(a["@_loop"]=t.loopContinuously?"1":"0"),t.showWithNarration!==void 0&&(a["@_showNarration"]=t.showWithNarration?"1":"0"),t.showWithAnimation!==void 0&&(a["@_showAnimation"]=t.showWithAnimation?"1":"0"),t.advanceMode!==void 0&&(a["@_useTimings"]=t.advanceMode==="useTimings"?"1":"0"),t.showType==="browsed")a["p:browse"]={};else if(t.showType==="kiosk"){let l={};t.kioskRestartTime!==void 0&&t.kioskRestartTime>0&&(l["@_restart"]=String(t.kioskRestartTime)),a["p:kiosk"]=l;}else a["p:present"]={};if(t.showSlidesMode==="range"?a["p:sldRg"]={"@_st":String(t.showSlidesFrom??1),"@_end":String(t.showSlidesTo??1)}:t.showSlidesMode==="customShow"&&t.showSlidesCustomShowId?a["p:custShow"]={"@_id":t.showSlidesCustomShowId}:a["p:sldAll"]={},t.penColor?a["p:penClr"]={"a:srgbClr":{"@_val":t.penColor.replace("#","")}}:s["p:penClr"]!==void 0&&(a["p:penClr"]=s["p:penClr"]),s["p:extLst"]!==void 0&&(a["p:extLst"]=s["p:extLst"]),i["p:showPr"]=a,t.printFrameSlides!==void 0||t.printSlidesPerPage!==void 0||t.printColorMode!==void 0){let l=i["p:prnPr"]||{};t.printFrameSlides!==void 0&&(l["@_frameSlides"]=t.printFrameSlides?"1":"0"),t.printSlidesPerPage!==void 0&&(l["@_sldPerPg"]=String(t.printSlidesPerPage)),t.printColorMode!==void 0&&(l["@_clrMode"]=t.printColorMode),i["p:prnPr"]=l;}t.mruColors&&t.mruColors.length>0&&(i["p:clrMru"]={"a:srgbClr":t.mruColors.map(l=>({"@_val":l.replace("#","")}))}),t.gridSpacing&&(i["p:gridSpacing"]={"@_cx":String(t.gridSpacing.cx),"@_cy":String(t.gridSpacing.cy)}),o["p:presentationPr"]=i,this.zip.file(n,this.builder.build(o));}async stripDigitalSignatures(){if(!this.signatureDetection?.hasSignatures)return;let t=[];this.zip.forEach(o=>{t.push(o);});let e=xQ(t);for(let o of e)this.zip.remove(o);let n=await this.zip.file("_rels/.rels")?.async("string");if(n){let o=this.parser.parse(n),i=o?.Relationships??{},s=this.ensureArray(i.Relationship),a=s.filter(l=>String(l?.["@_Type"]||"")!==pQ);a.length!==s.length&&(i.Relationship=a,o.Relationships=i,this.zip.file("_rels/.rels",this.builder.build(o)));}let r=await this.zip.file("[Content_Types].xml")?.async("string");if(r){let o=this.parser.parse(r),i=o?.Types??{},s=this.ensureArray(i.Override),a=s.filter(l=>!String(l?.["@_PartName"]||"").startsWith("/_xmlsignatures/"));a.length!==s.length&&(i.Override=a,o.Types=i,this.zip.file("[Content_Types].xml",this.builder.build(o)));}this.signatureDetection=null;}},C5e=class extends w5e{collectMediaElements(t,e){for(let n of t)n.type==="media"?e.push(n):n.type==="group"&&Array.isArray(n.children)&&this.collectMediaElements(n.children,e);}getShapeIdFromRawXml(t){if(!t)return;let n=(t["p:nvSpPr"]?.["p:cNvPr"]||t["p:nvPicPr"]?.["p:cNvPr"]||t["p:nvCxnSpPr"]?.["p:cNvPr"]||t["p:nvGraphicFramePr"]?.["p:cNvPr"])?.["@_id"];if(n==null)return;let r=String(n).trim();return r.length>0?r:void 0}applyMediaTimingToTimingTree(t,e){for(let r of ["p:video","p:audio"])this.ensureArray(t[r]).forEach(i=>{let s=i["p:cMediaNode"];if(!s)return;let l=s["p:tgtEl"]?.["p:spTgt"],c=l?.["@_spid"]!==void 0?String(l["@_spid"]).trim():"";if(c.length===0)return;let u=e.get(c);if(!u)return;let d=s["p:cTn"];d||(d={},s["p:cTn"]=d),u.trimStartMs!==void 0&&Number.isFinite(u.trimStartMs)&&u.trimStartMs>=0?d["@_st"]=String(Math.round(u.trimStartMs)):delete d["@_st"],u.trimEndMs!==void 0&&Number.isFinite(u.trimEndMs)&&u.trimEndMs>=0?d["@_end"]=String(Math.round(u.trimEndMs)):delete d["@_end"],u.loop?d["@_repeatCount"]="indefinite":delete d["@_repeatCount"],u.autoPlay?d["@_nodeType"]="1":delete d["@_nodeType"],u.playAcrossSlides&&r==="p:audio"?d["@_dur"]="indefinite":u.playAcrossSlides||String(d["@_dur"])==="indefinite"&&delete d["@_dur"],u.fullScreen?s["@_fullScrn"]="1":delete s["@_fullScrn"],u.volume!==void 0&&Number.isFinite(u.volume)&&(s["@_vol"]=String(Math.round(u.volume*1e5))),u.hideWhenNotPlaying?s["@_showWhenStopped"]="0":delete s["@_showWhenStopped"];let p=u.fadeInDuration!==void 0&&u.fadeInDuration>0||u.fadeOutDuration!==void 0&&u.fadeOutDuration>0,f=u.playbackSpeed!==void 0&&u.playbackSpeed!==1,h=u.bookmarks!==void 0&&u.bookmarks.length>0;if(p||f||h){let m=i["p:extLst"];m||(m={},i["p:extLst"]=m);let g=Array.isArray(m["p:ext"])?m["p:ext"]:m["p:ext"]?[m["p:ext"]]:[];if(p||f){let x=g.find(S=>S["p14:media"]!==void 0);x||(x={"@_uri":"{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}"},g.push(x));let v=x["p14:media"];if(v||(v={},x["p14:media"]=v),p){let S={};u.fadeInDuration!==void 0&&u.fadeInDuration>0&&(S["@_in"]=String(Math.round(u.fadeInDuration*1e3))),u.fadeOutDuration!==void 0&&u.fadeOutDuration>0&&(S["@_out"]=String(Math.round(u.fadeOutDuration*1e3))),v["p14:fade"]=S;}f&&u.playbackSpeed!==void 0?v["@_spd"]=String(Math.round(u.playbackSpeed*1e5)):delete v["@_spd"];}if(h&&u.bookmarks){let x=g.find(v=>v["p14:bmkLst"]!==void 0);x||(x={"@_uri":"{C809E50D-3E49-4677-B9B1-B2B30C8E0B5F}"},g.push(x)),x["p14:bmkLst"]={"p14:bmk":u.bookmarks.map(v=>({"@_name":v.label,"@_time":String(Math.round(v.time*1e3))}))};}m["p:ext"]=g.length===1?g[0]:g;}});let n=t["p:cTn"];if(n){let r=n["p:childTnLst"];if(r){for(let o of ["p:par","p:seq","p:excl"])this.ensureArray(r[o]).forEach(s=>{this.applyMediaTimingToTimingTree(s,e);});this.applyMediaTimingToTimingTree(r,e);}}for(let r of ["p:par","p:seq","p:excl","p:tnLst"])this.ensureArray(t[r]).forEach(i=>{this.applyMediaTimingToTimingTree(i,e);});}applyMediaTimingToRawTiming(t,e){let n=[];if(this.collectMediaElements(e,n),n.length===0)return;let r=new Map;n.forEach(o=>{let i=this.getShapeIdFromRawXml(o.rawXml);i&&r.set(i,o);}),r.size!==0&&this.applyMediaTimingToTimingTree(t,r);}},T5e=class extends C5e{deduplicateExtensionLists(t){if(t==null||typeof t!="object")return;if(Array.isArray(t)){for(let n of t)this.deduplicateExtensionLists(n);return}let e=t;for(let[n,r]of Object.entries(e)){if(this.compatibilityService.getXmlLocalName(n)==="extLst"&&r&&typeof r=="object"){let i=r;for(let s of Object.keys(i)){if(this.compatibilityService.getXmlLocalName(s)!=="ext")continue;let l=i[s];if(!l)continue;let c=(Array.isArray(l)?l:[l]).filter(d=>typeof d=="object"&&d!==null);if(c.length<=1)continue;let u=new Map;for(let d=0;d<c.length;d++){let p=c[d],f=String(p?.["@_uri"]||"").trim();f.length>0&&u.set(f,d);}if(u.size<c.length){let d=new Set(u.values());for(let f=0;f<c.length;f++){let h=c[f];String(h?.["@_uri"]||"").trim().length===0&&d.add(f);}let p=c.filter((f,h)=>d.has(h));i[s]=p.length===1?p[0]:p;}}}this.deduplicateExtensionLists(r);}}applySlideDrawingGuides(t,e){let n=t["p:extLst"];if(n){let r=Object.keys(n).find(o=>this.compatibilityService.getXmlLocalName(o)==="ext");if(r){let o=n[r],i=Array.isArray(o)?o:o?[o]:[],s=i.filter(a=>{let l=String(a["@_uri"]??"");return l!==eC&&l!==_A});s.length!==i.length&&(n[r]=s.length===0?void 0:s.length===1?s[0]:s);}}if(e.guides&&e.guides.length>0){n||(n={},t["p:extLst"]=n);let r=UJ(e.guides),o=Object.keys(n).find(a=>this.compatibilityService.getXmlLocalName(a)==="ext")??"p:ext",i=n[o],s=Array.isArray(i)?i:i?[i]:[];s.push(r),n[o]=s.length===1?s[0]:s;}}resolveLayoutPathForSlide(t){let e=this.slideRelsMap.get(t);if(e)for(let[,n]of e.entries()){if(!n.includes("slideLayout"))continue;let r=t.substring(0,t.lastIndexOf("/")+1),o=xA(r,n);if(o!==null)return o}}resolveMasterPathForLayout(t){let e=this.slideRelsMap.get(t);if(e)for(let[,n]of e.entries()){if(!n.includes("slideMaster"))continue;let r=t.substring(0,t.lastIndexOf("/")+1),o=xA(r,n);if(o!==null)return o}}getTemplateSpTree(t,e){let n=this.resolveLayoutPathForSlide(t);if(!n)return;if(e.startsWith("master-")){let o=this.resolveMasterPathForLayout(n);return o?this.masterXmlMap.get(o)?.["p:sldMaster"]?.["p:cSld"]?.["p:spTree"]:void 0}return this.layoutXmlMap.get(n)?.["p:sldLayout"]?.["p:cSld"]?.["p:spTree"]}isSameShapeIdentity(t,e,n){if(e===n)return true;let r=this.getCnvPrNode(e,t),o=this.getCnvPrNode(n,t),i=String(r?.["@_id"]||""),s=String(o?.["@_id"]||""),a=String(r?.["@_name"]||""),l=String(o?.["@_name"]||"");return !i||!s||i!==s?false:!a||!l?true:a===l}ensureTemplateShapeAttached(t,e,n){let r=this.getTreeBucketKeyForElementType(e),o=this.ensureArray(t[r]);for(let i of o)if(this.isSameShapeIdentity(r,i,n))return i;return o.push(n),t[r]=o,n}},_5e=class tte extends T5e{applyFillAndStroke(e,n){let r=n.fillMode,o=this.buildGradientFillXml(n);if(r==="none"||n.fillColor==="transparent")e["a:noFill"]={},delete e["a:solidFill"],delete e["a:gradFill"],delete e["a:blipFill"];else if(r==="gradient")delete e["a:noFill"],delete e["a:solidFill"],delete e["a:blipFill"],o&&(e["a:gradFill"]=o);else if(r==="pattern"){delete e["a:noFill"],delete e["a:solidFill"],delete e["a:gradFill"],delete e["a:blipFill"];let s={},a=n.fillPatternPreset;a&&(s["@_prst"]=a),n.fillPatternFgClrXml?s["a:fgClr"]=n.fillPatternFgClrXml:n.fillColor&&(s["a:fgClr"]={"a:srgbClr":{"@_val":n.fillColor.replace("#","")}}),n.fillPatternBgClrXml?s["a:bgClr"]=n.fillPatternBgClrXml:n.fillPatternBackgroundColor&&(s["a:bgClr"]={"a:srgbClr":{"@_val":n.fillPatternBackgroundColor.replace("#","")}}),e["a:pattFill"]=s;}else if(r==="solid"||n.fillColor!==void 0){let s=String(n.fillColor||"").trim();if(s.length>0){delete e["a:noFill"],delete e["a:gradFill"],delete e["a:blipFill"];let a=n.fillColorXml?this.parseColor(n.fillColorXml):void 0;e["a:solidFill"]=jw(n.fillColorXml,a,s,n.fillOpacity);}}if(n.strokeColor!==void 0){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"],a=Math.round((n.strokeWidth||1)*tte.EMU_PER_PX);if(s["@_w"]=String(a),n.strokeColor==="transparent"||n.strokeWidth===0)s["a:noFill"]={},delete s["a:solidFill"];else {delete s["a:noFill"];let l=n.strokeColorXml?this.parseColor(n.strokeColorXml):void 0;s["a:solidFill"]=jw(n.strokeColorXml,l,n.strokeColor,n.strokeOpacity);}}if(n.strokeDash!==void 0){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];n.strokeDash==="solid"?(delete s["a:prstDash"],delete s["a:custDash"]):n.strokeDash==="custom"?(delete s["a:prstDash"],n.customDashSegments&&n.customDashSegments.length>0?s["a:custDash"]={"a:ds":n.customDashSegments.map(a=>({"@_d":String(a.dash),"@_sp":String(a.space)}))}:s["a:custDash"]={"a:ds":{"@_d":"200000","@_sp":"200000"}}):(s["a:prstDash"]={"@_val":n.strokeDash},delete s["a:custDash"]);}if(n.connectorEndArrow!==void 0&&(e["a:ln"]||n.connectorEndArrow!=="none")){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];if(n.connectorEndArrow==="none")delete s["a:tailEnd"];else {let a={"@_type":n.connectorEndArrow};n.connectorEndArrowWidth&&(a["@_w"]=n.connectorEndArrowWidth),n.connectorEndArrowLength&&(a["@_len"]=n.connectorEndArrowLength),s["a:tailEnd"]=a;}}if(n.connectorStartArrow!==void 0&&(e["a:ln"]||n.connectorStartArrow!=="none")){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];if(n.connectorStartArrow==="none")delete s["a:headEnd"];else {let a={"@_type":n.connectorStartArrow};n.connectorStartArrowWidth&&(a["@_w"]=n.connectorStartArrowWidth),n.connectorStartArrowLength&&(a["@_len"]=n.connectorStartArrowLength),s["a:headEnd"]=a;}}if(n.lineJoin!==void 0){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];if(delete s["a:round"],delete s["a:bevel"],delete s["a:miter"],n.lineJoin==="round")s["a:round"]={};else if(n.lineJoin==="bevel")s["a:bevel"]={};else if(n.lineJoin==="miter"){let a={};typeof n.miterLimit=="number"&&Number.isFinite(n.miterLimit)&&n.miterLimit!==8e5&&(a["@_lim"]=String(Math.round(n.miterLimit))),s["a:miter"]=a;}}n.lineCap!==void 0&&(e["a:ln"]||(e["a:ln"]={}),e["a:ln"]["@_cap"]=n.lineCap),n.compoundLine!==void 0&&(e["a:ln"]||(e["a:ln"]={}),e["a:ln"]["@_cmpd"]=n.compoundLine),n.lineAlignment!==void 0&&(e["a:ln"]||(e["a:ln"]={}),e["a:ln"]["@_algn"]=n.lineAlignment);let i=this.buildLineEffectListXml(n);i&&e["a:ln"]&&(e["a:ln"]["a:effectLst"]=i);}applyShapeStyleRefs(e,n){if(!(n.lnRefIdx!==void 0||n.fillRefIdx!==void 0||n.effectRefIdx!==void 0||n.fontRefIdx!==void 0))return;let i=e["p:style"]??{};if(n.lnRefIdx!==void 0){let a=i["a:lnRef"]??{};a["@_idx"]=String(n.lnRefIdx),this.replaceRefColorChoice(a,n.lnRefColorXml),i["a:lnRef"]=a;}if(n.fillRefIdx!==void 0){let a=i["a:fillRef"]??{};a["@_idx"]=String(n.fillRefIdx),this.replaceRefColorChoice(a,n.fillRefColorXml),i["a:fillRef"]=a;}if(n.effectRefIdx!==void 0){let a=i["a:effectRef"]??{};a["@_idx"]=String(n.effectRefIdx),this.replaceRefColorChoice(a,n.effectRefColorXml),i["a:effectRef"]=a;}if(n.fontRefIdx!==void 0){let a=i["a:fontRef"]??{};a["@_idx"]=n.fontRefIdx,this.replaceRefColorChoice(a,n.fontRefColorXml),i["a:fontRef"]=a;}let s=Wg(i,RMe);for(let a of Object.keys(i))delete i[a];for(let a of Object.keys(s))i[a]=s[a];e["p:style"]=i;}replaceRefColorChoice(e,n){for(let r of ["a:scrgbClr","a:srgbClr","a:hslClr","a:sysClr","a:schemeClr","a:prstClr"])delete e[r];if(n)for(let[r,o]of Object.entries(n))e[r]=o;}},M5e=class extends _5e{applyEffectsAndThreeD(t,e){let n=e.presetShadowName?this.buildPresetShadowXml(e):void 0,r=n?void 0:this.buildOuterShadowXml(e),o=this.buildInnerShadowXml(e),i=this.buildGlowXml(e),s=this.buildSoftEdgeXml(e),a=this.buildReflectionXml(e),l=this.buildBlurXml(e);if(r||n||o||i||s||a||l){let u=t["a:effectLst"]||{};n?(u["a:prstShdw"]=n,delete u["a:outerShdw"]):r&&(u["a:outerShdw"]=r,delete u["a:prstShdw"]),o&&(u["a:innerShdw"]=o),i&&(u["a:glow"]=i),s&&(u["a:softEdge"]=s),a&&(u["a:reflection"]=a),l&&(u["a:blur"]=l),t["a:effectLst"]=Wg(u,AB);}else {let u=t["a:effectLst"];u&&(e.shadowColor!==void 0&&!r&&!n&&(delete u["a:outerShdw"],delete u["a:prstShdw"]),e.innerShadowColor!==void 0&&!o&&delete u["a:innerShdw"],e.glowColor!==void 0&&!i&&delete u["a:glow"],e.softEdgeRadius!==void 0&&!s&&delete u["a:softEdge"],e.reflectionBlurRadius!==void 0&&!a&&delete u["a:reflection"],e.blurRadius!==void 0&&!l&&delete u["a:blur"],Object.keys(u).length===0?delete t["a:effectLst"]:t["a:effectLst"]=Wg(u,AB));}if(e.effectDagXml&&(t["a:effectDag"]=e.effectDagXml),e.scene3d){let u=e.scene3d;if(u.cameraPreset||u.lightRigType){let p={};if(u.cameraPreset&&(p["@_prst"]=u.cameraPreset),u.cameraRotX!==void 0||u.cameraRotY!==void 0||u.cameraRotZ!==void 0){let m={};u.cameraRotX!==void 0&&(m["@_lat"]=String(u.cameraRotX)),u.cameraRotY!==void 0&&(m["@_lon"]=String(u.cameraRotY)),u.cameraRotZ!==void 0&&(m["@_rev"]=String(u.cameraRotZ)),p["a:rot"]=m;}let f={};u.lightRigType&&(f["@_rig"]=u.lightRigType),u.lightRigDirection&&(f["@_dir"]=u.lightRigDirection);let h={};if(h["a:camera"]=p,Object.keys(f).length>0&&(h["a:lightRig"]=f),u.hasBackdrop){let m={};(u.backdropAnchorX!==void 0||u.backdropAnchorY!==void 0||u.backdropAnchorZ!==void 0)&&(m["a:anchor"]={"@_x":String(u.backdropAnchorX??0),"@_y":String(u.backdropAnchorY??0),"@_z":String(u.backdropAnchorZ??0)}),h["a:backdrop"]=m;}t["a:scene3d"]=h;}else delete t["a:scene3d"];}else e.scene3d===void 0&&delete t["a:scene3d"];if(e.shape3d){let u=e.shape3d;if(u.extrusionHeight!==void 0||u.contourWidth!==void 0||u.presetMaterial||u.bevelTopType||u.bevelBottomType||u.extrusionColor||u.contourColor){let p={};if(u.extrusionHeight!==void 0&&(p["@_extrusionH"]=String(u.extrusionHeight)),u.contourWidth!==void 0&&(p["@_contourW"]=String(u.contourWidth)),u.presetMaterial&&(p["@_prstMaterial"]=u.presetMaterial),u.bevelTopType){let f={"@_prst":u.bevelTopType};u.bevelTopWidth!==void 0&&(f["@_w"]=String(u.bevelTopWidth)),u.bevelTopHeight!==void 0&&(f["@_h"]=String(u.bevelTopHeight)),p["a:bevelT"]=f;}if(u.bevelBottomType){let f={"@_prst":u.bevelBottomType};u.bevelBottomWidth!==void 0&&(f["@_w"]=String(u.bevelBottomWidth)),u.bevelBottomHeight!==void 0&&(f["@_h"]=String(u.bevelBottomHeight)),p["a:bevelB"]=f;}u.extrusionColor&&(p["a:extrusionClr"]={"a:srgbClr":{"@_val":u.extrusionColor}}),u.contourColor&&(p["a:contourClr"]={"a:srgbClr":{"@_val":u.contourColor}}),t["a:sp3d"]=p;}else delete t["a:sp3d"];}else e.shape3d===void 0&&delete t["a:sp3d"];}},E5e=class nb extends M5e{applyTextBodyContent(e,n,r,o){if(!(typeof n.text=="string"||(n.textSegments?.length??0)>0))return;e["p:txBody"]||(e["p:txBody"]={"a:bodyPr":{},"a:lstStyle":{},"a:p":[]});let s=e["p:txBody"],a=s["a:bodyPr"]||{},l=this.textVerticalAlignToDrawingValue(n.textStyle?.vAlign);l?a["@_anchor"]=l:delete a["@_anchor"];let c=this.textDirectionToDrawingValue(n.textStyle?.textDirection);c?a["@_vert"]=c:delete a["@_vert"];let u=this.normalizeTextColumnCount(n.textStyle?.columnCount);if(u&&u>1?a["@_numCol"]=String(u):delete a["@_numCol"],n.textStyle?.columnSpacing!==void 0&&(a["@_spcCol"]=String(Math.round(n.textStyle.columnSpacing*nb.EMU_PER_PX))),n.textStyle?.hOverflow&&(a["@_horzOverflow"]=n.textStyle.hOverflow,delete a["@_hOverflow"]),n.textStyle?.vertOverflow&&(a["@_vertOverflow"]=n.textStyle.vertOverflow),this.applyAutoFitToBodyPr(a,n),this.applyBodyInsets(a,n),n.textStyle?.textWrap==="none"?a["@_wrap"]="none":n.textStyle?.textWrap==="square"&&(a["@_wrap"]="square"),$Q(a,n.textStyle),n.textStyle?.textWarpPreset){let f={"@_prst":n.textStyle.textWarpPreset},h=[];n.textStyle.textWarpAdj!==void 0&&Number.isFinite(n.textStyle.textWarpAdj)&&h.push({"@_name":"adj","@_fmla":`val ${n.textStyle.textWarpAdj}`}),n.textStyle.textWarpAdj2!==void 0&&Number.isFinite(n.textStyle.textWarpAdj2)&&h.push({"@_name":"adj2","@_fmla":`val ${n.textStyle.textWarpAdj2}`}),h.length>0&&(f["a:avLst"]={"a:gd":h.length===1?h[0]:h}),a["a:prstTxWarp"]=f;}else delete a["a:prstTxWarp"];this.applyText3d(a,n),n.linkedTxbxId!==void 0&&Number.isFinite(n.linkedTxbxId)?a["a:linkedTxbx"]={"@_id":String(n.linkedTxbxId),"@_seq":String(n.linkedTxbxSeq??0)}:delete a["a:linkedTxbx"];let d=this.getTextValueForSave(n.text,n.textSegments),p=n.textSegments;if(typeof n.text=="string"&&this.areTextSegmentsUniform(n.textSegments)){p=void 0;let f=this.extractTextSegmentsFromTxBodyForRewrite(s,n.textStyle,o());f.length>1&&this.hasMixedTextStyles(f)&&(p=this.remapEditedTextToExistingStyles(f,d,n.textStyle));}s["a:bodyPr"]=a,s["a:p"]=this.createParagraphsFromTextContent(d,n.textStyle,p,r);}applyAutoFitToBodyPr(e,n){if(n.textStyle?.autoFitMode!==void 0)if(delete e["a:spAutoFit"],delete e["a:normAutofit"],delete e["a:noAutofit"],n.textStyle.autoFitMode==="shrink")e["a:spAutoFit"]={};else if(n.textStyle.autoFitMode==="normal"){let r={};n.textStyle.autoFitFontScale!==void 0&&n.textStyle.autoFitFontScale<1&&(r["@_fontScale"]=String(Math.round(n.textStyle.autoFitFontScale*1e5))),n.textStyle.autoFitLineSpacingReduction!==void 0&&n.textStyle.autoFitLineSpacingReduction>0&&(r["@_lnSpcReduction"]=String(Math.round(n.textStyle.autoFitLineSpacingReduction*1e5))),e["a:normAutofit"]=r;}else n.textStyle.autoFitMode==="none"&&(e["a:noAutofit"]={});else if(n.textStyle?.autoFit){if(!e["a:spAutoFit"]&&!e["a:normAutofit"])if(n.textStyle.autoFitFontScale!==void 0&&n.textStyle.autoFitFontScale<1){let r={"@_fontScale":String(Math.round(n.textStyle.autoFitFontScale*1e5))};n.textStyle.autoFitLineSpacingReduction!==void 0&&n.textStyle.autoFitLineSpacingReduction>0&&(r["@_lnSpcReduction"]=String(Math.round(n.textStyle.autoFitLineSpacingReduction*1e5))),e["a:normAutofit"]=r;}else e["a:spAutoFit"]={};e["a:normAutofit"]&&n.textStyle.autoFitFontScale!==void 0&&(e["a:normAutofit"]["@_fontScale"]=String(Math.round(n.textStyle.autoFitFontScale*1e5)));}else n.textStyle?.autoFit===false&&n.textStyle?.autoFitMode===void 0&&(delete e["a:spAutoFit"],delete e["a:normAutofit"]);}applyBodyInsets(e,n){typeof n.textStyle?.bodyInsetLeft=="number"&&Number.isFinite(n.textStyle.bodyInsetLeft)&&(e["@_lIns"]=String(Math.round(n.textStyle.bodyInsetLeft*nb.EMU_PER_PX))),typeof n.textStyle?.bodyInsetTop=="number"&&Number.isFinite(n.textStyle.bodyInsetTop)&&(e["@_tIns"]=String(Math.round(n.textStyle.bodyInsetTop*nb.EMU_PER_PX))),typeof n.textStyle?.bodyInsetRight=="number"&&Number.isFinite(n.textStyle.bodyInsetRight)&&(e["@_rIns"]=String(Math.round(n.textStyle.bodyInsetRight*nb.EMU_PER_PX))),typeof n.textStyle?.bodyInsetBottom=="number"&&Number.isFinite(n.textStyle.bodyInsetBottom)&&(e["@_bIns"]=String(Math.round(n.textStyle.bodyInsetBottom*nb.EMU_PER_PX)));}applyText3d(e,n){let r=n.textStyle?.text3d;if(r&&Object.keys(r).length>0){let o={};if(r.extrusionHeight&&(o["@_extrusionH"]=String(r.extrusionHeight)),r.presetMaterial&&(o["@_prstMaterial"]=r.presetMaterial),r.bevelTopType&&r.bevelTopType!=="none"){let i={"@_prst":r.bevelTopType};r.bevelTopWidth&&(i["@_w"]=String(r.bevelTopWidth)),r.bevelTopHeight&&(i["@_h"]=String(r.bevelTopHeight)),o["a:bevelT"]=i;}if(r.bevelBottomType&&r.bevelBottomType!=="none"){let i={"@_prst":r.bevelBottomType};r.bevelBottomWidth&&(i["@_w"]=String(r.bevelBottomWidth)),r.bevelBottomHeight&&(i["@_h"]=String(r.bevelBottomHeight)),o["a:bevelB"]=i;}r.extrusionColor&&(o["a:extrusionClr"]={"a:srgbClr":{"@_val":r.extrusionColor.replace("#","")}}),e["a:sp3d"]=o;}else delete e["a:sp3d"];}},P5e=class extends E5e{applyDataSerialization(t,e,n){if(e.type==="table"&&"tableData"in e&&e.tableData&&this.serializeTableDataToXml(t,e.tableData),e.type==="chart"&&"chartData"in e&&e.chartData&&this.serializeChartDataToXml(e.chartData,n),e.type==="smartArt"&&"smartArtData"in e){let r=e;r.smartArtData?.dataRelId&&this.serializeSmartArtDataToXml(r,n);}}applyImageProperties(t,e){if(e.type!=="picture"&&e.type!=="image")return;let n=t["p:blipFill"]||t["p:spPr"]?.["a:blipFill"];this.applyImageCropToBlipFill(n,e),this.applyImageEffectsToBlip(n,e.imageEffects);let r=t?.["p:nvPicPr"]?.["p:cNvPr"];if(r){let o=String(e.altText||"").trim();o.length>0?r["@_descr"]=o:delete r["@_descr"];}}applyGeometryUpdate(t,e){if(!vn(e)||!t["p:spPr"])return;let n=t["p:spPr"],r=e;if(r.customGeometryPaths&&r.customGeometryPaths.length>0)delete n["a:prstGeom"],n["a:custGeom"]=nMe(r.customGeometryPaths,r.customGeometryRawData,{adjustHandlesXY:r.customGeometryAdjustHandlesXY,adjustHandlesPolar:r.customGeometryAdjustHandlesPolar,connectionSites:r.customGeometryConnectionSites,textRect:r.customGeometryTextRect});else if(n["a:prstGeom"]){let o=e.type==="connector"?this.normalizePresetGeometry(e.shapeType||"straightConnector1"):this.normalizePresetGeometry(e.shapeType),i=n["a:prstGeom"];if(i["@_prst"]=o,e.shapeAdjustments){let s=Object.entries(e.shapeAdjustments).filter(([a,l])=>a.trim().length>0&&Number.isFinite(l));s.length>0?i["a:avLst"]={"a:gd":s.map(([a,l])=>({"@_name":a,"@_fmla":`val ${Math.round(l)}`}))}:i["a:avLst"]||(i["a:avLst"]={});}else i["a:avLst"]||(i["a:avLst"]={});}}processImageEmbedding(t,e,n){let r=this.parseDataUrlToBytes(t.imageData);if(r){let o=t.imagePath;if(!o){o=n.saveSession.nextMediaPath(r.extension);let i=n.slideRelationshipRegistry.nextRelationshipId(),s=o.replace(/^ppt\//,"../");n.slideRelationships.push({"@_Id":i,"@_Type":n.slideImageRelationshipType,"@_Target":s}),e=this.createPictureXml(t,i);}if(o){let i=o.toLowerCase().match(/\.([^./\\]+)$/)?.[1],s=r.extension.toLowerCase();i!==void 0&&i!==s&&!(i==="jpg"&&s==="jpeg")&&!(i==="jpeg"&&s==="jpg")||this.zip.file(o,r.bytes);}}else this.compatibilityService.reportWarning({code:"SAVE_IMAGE_PAYLOAD_UNSUPPORTED",message:"Image payload could not be converted to an embedded media part. Original image linkage was preserved when possible.",scope:"save",slideId:n.slide.id,elementId:t.id});return e}processMediaEmbedding(t,e,n){let r=t.mediaType==="audio"?"audio":"video",o=this.slideMediaRelationshipBuilder.getMediaRelationshipIdFromShape(e),i={media:n.slideMediaRelationshipType,video:n.slideVideoRelationshipType,audio:n.slideAudioRelationshipType};if(typeof t.mediaData=="string"){let s=n.resolvedMediaBytes.get(t.id)??this.parseDataUrlToBytes(t.mediaData);if(s){let a=t.mediaPath;a||(a=n.saveSession.nextMediaPath(s.extension,r)),this.zip.file(a,s.bytes);let l=a.replace(/^ppt\//,"../");o||(o=n.slideRelationshipRegistry.nextRelationshipId()),n.slideRelationshipRegistry.upsertRelationship(o,this.slideMediaRelationshipBuilder.resolveMediaRelationshipType(r,i),l),e?this.slideMediaRelationshipBuilder.ensureGraphicFrameMediaReference(e,r,o):e=this.createMediaGraphicFrameXml(t,o),t.mediaPath=a,t.mediaMimeType=this.getMediaMimeType(a)||t.mediaMimeType;}else this.compatibilityService.reportWarning({code:"SAVE_MEDIA_PAYLOAD_UNSUPPORTED",message:"Media payload could not be converted to an embedded media part. Original media linkage was preserved when possible.",scope:"save",slideId:n.slide.id,elementId:t.id});}else if(!e&&typeof t.mediaPath=="string"&&t.mediaPath.length>0){let s=t.mediaPath.replace(/^ppt\//,"../");o=o||n.slideRelationshipRegistry.nextRelationshipId(),n.slideRelationshipRegistry.upsertRelationship(o,this.slideMediaRelationshipBuilder.resolveMediaRelationshipType(r,i),s),e=this.createMediaGraphicFrameXml(t,o);}return e}},A5e=class pO extends P5e{isGraphicFrameShape(e){return !!(e["p:nvGraphicFramePr"]||e["a:graphic"]&&e["p:xfrm"])}pendingChartPartPaths;nextChartPartPath(){let e=new Set,n=/^ppt\/charts\/chart(?<n>\d+)\.xml$/u,r=i=>{let s=n.exec(i);s?.groups?.n&&e.add(Number.parseInt(s.groups.n,10));};for(let i of Object.keys(this.zip.files))r(i);for(let i of this.pendingChartPartPaths??[])r(i);let o=1;for(;e.has(o);)o+=1;return `ppt/charts/chart${o}.xml`}createChartElementXml(e,n){let r=this.nextChartPartPath();this.zip.file(r,this.builder.build(bNe(e.chartData))),(this.pendingChartPartPaths??=[]).push(r);let o=n.slideRelationshipRegistry.nextRelationshipId();return n.slideRelationships.push({"@_Id":o,"@_Type":UDe,"@_Target":`../charts/${r.slice(r.lastIndexOf("/")+1)}`}),this.createChartGraphicFrameXml(e,o)}async ensureChartPartContentTypes(){let e=this.pendingChartPartPaths;if(this.pendingChartPartPaths=void 0,!e||e.length===0)return;let n=await this.zip.file("[Content_Types].xml")?.async("string");if(!n)return;let r=this.parser.parse(n),o=r.Types||{},i=Array.isArray(o.Override)?o.Override:o.Override?[o.Override]:[],s=new Set(i.map(a=>String(a?.["@_PartName"]||"")));for(let a of e){let l=`/${a}`;s.has(l)||(i.push({"@_PartName":l,"@_ContentType":HDe}),s.add(l));}o.Override=i,r.Types=o,this.zip.file("[Content_Types].xml",this.builder.build(r));}finalizeSpPrSchemaOrder(e){let n=e["p:spPr"];if(!n)return;let r=n["a:blipFill"];r&&this.reorderInPlace(r,dA),this.reorderInPlace(n,iJ);}finalizePictureBlipFillOrder(e){let n=e["p:blipFill"];n&&this.reorderInPlace(n,dA);}reorderInPlace(e,n){let r=Wg(e,n);for(let o of Object.keys(e))delete e[o];for(let o of Object.keys(r))e[o]=r[o];}isTemplateElementId(e){return e.startsWith("layout-")||e.startsWith("master-")}processSlideElement(e,n,r){let o=e.rawXml;if((e.type==="picture"||e.type==="image")&&typeof e.imageData=="string"&&(o=this.processImageEmbedding(e,o,r)??o),e.type==="media"&&(o=this.processMediaEmbedding(e,o,r)??o),e.type==="group"){let i=this.buildGroupShapeXml(e);i&&n.groups.push(i);return}if(e.type==="contentPart"){o?(this.elementTransformUpdater.applyTransform(o,e,pO.EMU_PER_PX),n.contentParts.push(o)):this.compatibilityService.reportWarning({code:"SAVE_ELEMENT_SKIPPED",message:`Content part '${e.id}' has no rawXml and was skipped during save.`,scope:"save",slideId:r.slide.id,elementId:e.id});return}if(!o&&(e.type==="text"||e.type==="shape")&&(o=this.createElementXml(e)),!o&&e.type==="connector"&&(o=this.createConnectorXml(e)),e.type==="ink"&&(o||(o=this.createInkShapeXml(e),this.compatibilityService.reportWarning({code:"SAVE_INK_ENCODED_AS_CUSTGEOM",message:"SDK-created ink element serialized as custGeom shape; pressure/tool metadata not represented in OOXML aink format.",scope:"save",slideId:r.slide.id,elementId:e.id}))),!o&&e.type==="table"&&(o=this.createTableGraphicFrameXml(e)),!o&&e.type==="chart"&&e.chartData&&(o=this.createChartElementXml(e,r)),e.type==="ole"){let i=e;if(o)this.applyOleTypedFieldUpdates(o,i);else {let s=this.resolveOleEmbedRelationshipId(r.slideRelationships,i.oleTarget)||r.slideRelationshipRegistry.nextRelationshipId();o=this.createOleGraphicFrameXml(i,s);}}if(!o){this.compatibilityService.reportWarning({code:"SAVE_ELEMENT_SKIPPED",message:`Element '${e.id}' could not be serialized and was skipped during save.`,scope:"save",slideId:r.slide.id,elementId:e.id});return}if(this.elementTransformUpdater.applyTransform(o,e,pO.EMU_PER_PX),this.applyImageProperties(o,e),this.finalizePictureBlipFillOrder(o),this.applyGeometryUpdate(o,e),vn(e)&&e.shapeStyle&&o["p:spPr"]){let i=o["p:spPr"];this.applyFillAndStroke(i,e.shapeStyle),this.applyEffectsAndThreeD(i,e.shapeStyle),this.finalizeSpPrSchemaOrder(o),this.applyShapeStyleRefs(o,e.shapeStyle);}if(Qe(e)&&this.applyTextBodyContent(o,e,r.resolveHyperlinkRelationshipId,r.getSlideRelationshipMap),this.applyDataSerialization(o,e,r.slide.id),this.serializeElementActions(o,e,r.resolveHyperlinkRelationshipId),this.serializeShapeLocks(o,e),this.isTemplateElementId(e.id)){let i=this.getTemplateSpTree(r.slide.id,e.id);i&&(e.rawXml=this.ensureTemplateShapeAttached(i,e.type,o));return}e.type==="picture"||e.type==="image"?n.pics.push(o):e.type==="connector"?n.connectors.push(o):e.type==="model3d"?n.model3ds.push(o):this.isGraphicFrameShape(o)?n.graphicFrames.push(o):n.shapes.push(o);}},R5e=new PJ,k5e=class extends A5e{async processSlideForSave(t,e,n){if(t.isDirty===false)return;let r=this.slideMap.get(t.id);if(!r)return;let o=r["p:sld"]||{};if(t.hidden?o["@_show"]="0":delete o["@_show"],o["p:clrMapOvr"]=GQ(t.clrMapOverride),t.transition!==void 0){let x=this.buildSlideTransitionXml(t.transition);x?o["p:transition"]=x:delete o["p:transition"];}if(t.animations!==void 0&&this.applyEditorAnimations(o,t.animations),t.animations&&t.animations.length>0){let x=this.animationWriteService.buildTimingXml(t.animations,t.rawTiming);x?(this.applyMediaTimingToRawTiming(x,t.elements),o["p:timing"]=x):t.rawTiming&&(this.applyMediaTimingToRawTiming(t.rawTiming,t.elements),o["p:timing"]=t.rawTiming);}else t.rawTiming&&(this.applyMediaTimingToRawTiming(t.rawTiming,t.elements),o["p:timing"]=t.rawTiming);r["p:sld"]=o;let i=this.ensureSlideTree(r),s=this.toSlideRelsPath(t.id),a=await this.zip.file(s)?.async("string"),l=a?this.parser.parse(a):{Relationships:{"@_xmlns":n.relationshipsNamespace,Relationship:[]}},c=l.Relationships||{};c["@_xmlns"]||(c["@_xmlns"]=n.relationshipsNamespace);let u=this.ensureArray(c.Relationship),d=new eJ({relationships:u}),p=d.removeCommentRelationships(n.slideCommentRelationshipType);this.slideBackgroundBuilder.applyBackground({slideNode:o,slide:t,zip:this.zip,saveState:e,relationshipRegistry:d,slideImageRelationshipType:n.slideImageRelationshipType,parseDataUrlToBytes:x=>this.parseDataUrlToBytes(x)}),this.slideCommentPartWriter.writeComments({slide:t,saveState:e,existingCommentRelationship:p,relationshipRegistry:d,slideCommentRelationshipType:n.slideCommentRelationshipType,zip:this.zip,xmlBuilder:this.builder,slideCommentsXmlFactory:this.slideCommentsXmlFactory,resolvePartPath:(x,v)=>this.resolveImagePath(x,v)}),await this.slideNotesPartUpdater.updateNotesPart({slide:t,relationshipRegistry:d,slideNotesRelationshipType:n.slideNotesRelationshipType,zip:this.zip,parser:this.parser,xmlBuilder:this.builder,resolvePartPath:(x,v)=>this.resolveImagePath(x,v),updateNotesXmlText:(x,v,S)=>this.updateNotesXmlText(x,v,S),compatibilityReporter:this.compatibilityService});let f=new Map;for(let x of t.elements){if(x.type!=="media")continue;let v=x;if(typeof v.mediaData=="string"&&!v.mediaData.startsWith("data:"))try{let S=await this.resolveMediaToBytes(v.mediaData);S&&f.set(v.id,S);}catch{console.warn(`[pptx-save] Failed to resolve media URL for element ${v.id}`);}}let h={shapes:[],pics:[],connectors:[],graphicFrames:[],groups:[],model3ds:[],contentParts:[]},m={slide:t,slideRelationships:u,slideRelationshipRegistry:d,resolveHyperlinkRelationshipId:x=>d.resolveHyperlinkRelationshipId(x),getSlideRelationshipMap:()=>d.toRelationshipMap(),resolvedMediaBytes:f,saveSession:e,slideImageRelationshipType:n.slideImageRelationshipType,slideMediaRelationshipType:n.slideMediaRelationshipType,slideVideoRelationshipType:n.slideVideoRelationshipType,slideAudioRelationshipType:n.slideAudioRelationshipType};t.elements.forEach(x=>{this.processSlideElement(x,h,m);}),i["p:sp"]=h.shapes,i["p:pic"]=h.pics,i["p:cxnSp"]=h.connectors,i["p:graphicFrame"]=h.graphicFrames,h.groups.length>0?i["p:grpSp"]=h.groups:delete i["p:grpSp"],h.model3ds.length>0?i["p16:model3D"]=h.model3ds:delete i["p16:model3D"],h.contentParts.length>0?i["p:contentPart"]=h.contentParts:delete i["p:contentPart"],this.reapplyAlternateContentEnvelopes(i,h);let g=R5e.validateAndDeduplicateIds(i,x=>this.ensureArray(x));g>0&&this.compatibilityService.reportWarning({code:"SHAPE_ID_DEDUPLICATED",message:`Reassigned ${g} duplicate shape ID(s) on slide '${t.id}'.`,scope:"save",slideId:t.id}),c.Relationship=u,l.Relationships=c,this.zip.file(s,this.builder.build(l)),this.applySlideDrawingGuides(o,t),this.deduplicateExtensionLists(r),lO(o)&&c5e(o),this.zip.file(t.id,this.builder.build(r));}reapplyAlternateContentEnvelopes(t,e){let n={"p:sp":e.shapes,"p:pic":e.pics,"p:cxnSp":e.connectors,"p:graphicFrame":e.graphicFrames,"p:grpSp":e.groups,"p:contentPart":e.contentParts,"p16:model3D":e.model3ds},r=new Map;for(let i of Object.keys(n)){let s=n[i];if(s)for(let a of s){let l=this.alternateContentBlockByRawXml.get(a);if(!l)continue;let c=r.get(l);c||(c=[],r.set(l,c)),c.push({tag:i,node:a,collector:s});}}if(r.size===0)return;let o=[];for(let[i,s]of r){for(let c of s){let u=c.collector.indexOf(c.node);u!==-1&&c.collector.splice(u,1);}let a={...i.rawAc},l=new Map;for(let c of s){let u=l.get(c.tag);u||(u=[],l.set(c.tag,u)),u.push(c.node);}if(i.selectedBranch==="choice"){let c=this.ensureArray(a["mc:Choice"]),u=i.choiceIndex??0,d=c[u];if(d){let p={...d};for(let f of gA)delete p[f];for(let[f,h]of l)p[f]=h.length===1?h[0]:h;c[u]=p,a["mc:Choice"]=c.length===1?c[0]:c;}}else {let c=a["mc:Fallback"];if(c){let u={...c};for(let d of gA)delete u[d];for(let[d,p]of l)u[d]=p.length===1?p[0]:p;a["mc:Fallback"]=u;}}o.push(a);}t["p:sp"]=e.shapes,t["p:pic"]=e.pics,t["p:cxnSp"]=e.connectors,t["p:graphicFrame"]=e.graphicFrames,e.groups.length>0?t["p:grpSp"]=e.groups:delete t["p:grpSp"],e.contentParts.length>0?t["p:contentPart"]=e.contentParts:delete t["p:contentPart"],e.model3ds.length>0?t["p16:model3D"]=e.model3ds:delete t["p16:model3D"],t["mc:AlternateContent"]=o.length===1?o[0]:o;}},I5e=class extends k5e{markThemeDirty(t){this.dirtyThemePaths.add(t);}markAllThemesDirty(){for(let t of this.originalThemeXmlByPath.keys())this.dirtyThemePaths.add(t);for(let t of this.masterThemePaths.values())this.dirtyThemePaths.add(t);}async persistThemeParts(){let t=new Set;for(let[e,n]of this.masterThemePaths.entries()){if(!n||(t.add(n),!this.dirtyThemePaths.has(n)))continue;let r=this.buildThemeXml(n,e);r&&this.zip.file(n,r);}for(let[e]of this.originalThemeXmlByPath.entries()){if(t.has(e)||!this.dirtyThemePaths.has(e))continue;let n=this.buildThemeXml(e,void 0);n&&this.zip.file(e,n);}}buildThemeXml(t,e){let n=e&&this.masterThemeColorMaps.get(e)||this.globalThemeColorMapSnapshot||this.themeColorMap,r=e&&this.masterThemeFontMaps.get(e)||this.globalThemeFontMapSnapshot||this.themeFontMap,o=this.masterThemeNames.get(t)||"Office Theme",i=this.masterThemeColorSchemeNames.get(t)||o,s=this.masterThemeFontSchemeNames.get(t)||o,a=this.masterThemeMajorFontScripts.get(t)||{},l=this.masterThemeMinorFontScripts.get(t)||{},c=this.buildClrSchemeObject(i,n),u=this.buildFontSchemeObject(s,r,a,l),d=this.extractRawSubtreeFromOriginal(t,["a:theme","a:themeElements","a:fmtScheme"]),p={"a:clrScheme":c,"a:fontScheme":u};d!==void 0?p["a:fmtScheme"]=d:p["a:fmtScheme"]=this.buildMinimalFmtScheme(o);let f={"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_name":o,"a:themeElements":p},h=this.masterThemeObjectDefaults.get(t);if(h&&(h.spDef||h.lnDef||h.txDef)){let S={};h.spDef!==void 0&&(S["a:spDef"]=h.spDef),h.lnDef!==void 0&&(S["a:lnDef"]=h.lnDef),h.txDef!==void 0&&(S["a:txDef"]=h.txDef),f["a:objectDefaults"]=S;}else f["a:objectDefaults"]={};let m=this.masterThemeExtraClrSchemeLst.get(t);f["a:extraClrSchemeLst"]=m!==void 0?m:{};let g=this.masterThemeCustClrLst.get(t);g!==void 0&&(f["a:custClrLst"]=g);let x=this.masterThemeExtLst.get(t);x!==void 0&&(f["a:extLst"]=x);let v={"?xml":{"@_version":"1.0","@_encoding":"UTF-8","@_standalone":"yes"},"a:theme":f};try{return this.builder.build(v)}catch(S){console.warn(`Failed to build theme XML for ${t}:`,S);return}}buildClrSchemeObject(t,e){let n=r=>{let o=String(e[r]||"").replace(/^#/,"");return {"a:srgbClr":{"@_val":o.length===6?o.toUpperCase():"000000"}}};return {"@_name":t,"a:dk1":n("dk1"),"a:lt1":n("lt1"),"a:dk2":n("dk2"),"a:lt2":n("lt2"),"a:accent1":n("accent1"),"a:accent2":n("accent2"),"a:accent3":n("accent3"),"a:accent4":n("accent4"),"a:accent5":n("accent5"),"a:accent6":n("accent6"),"a:hlink":n("hlink"),"a:folHlink":n("folHlink")}}buildFontSchemeObject(t,e,n,r){let o=(i,s,a,l)=>{let c={"a:latin":{"@_typeface":e[i]||"Calibri"},"a:ea":{"@_typeface":e[s]||""},"a:cs":{"@_typeface":e[a]||""}},u=Object.keys(l);if(u.length>0){let d=u.map(p=>({"@_script":p,"@_typeface":l[p]}));c["a:font"]=d.length===1?d[0]:d;}return c};return {"@_name":t,"a:majorFont":o("mj-lt","mj-ea","mj-cs",n),"a:minorFont":o("mn-lt","mn-ea","mn-cs",r)}}extractRawSubtreeFromOriginal(t,e){let n=this.originalThemeXmlByPath.get(t);if(n)try{let o=this.parser.parse(n);for(let i of e)if(o&&typeof o=="object"&&i in o)o=o[i];else return;return o}catch{return}}buildMinimalFmtScheme(t){let e={"a:solidFill":{"a:schemeClr":{"@_val":"phClr"}}};return {"@_name":t,"a:fillStyleLst":{"a:solidFill":[{"a:schemeClr":{"@_val":"phClr"}}],"a:gradFill":[]},"a:lnStyleLst":{"a:ln":[{"@_w":"6350","@_cap":"flat","@_cmpd":"sng","@_algn":"ctr",...e,"a:prstDash":{"@_val":"solid"},"a:miter":{"@_lim":"800000"}},{"@_w":"12700","@_cap":"flat","@_cmpd":"sng","@_algn":"ctr",...e,"a:prstDash":{"@_val":"solid"},"a:miter":{"@_lim":"800000"}},{"@_w":"19050","@_cap":"flat","@_cmpd":"sng","@_algn":"ctr",...e,"a:prstDash":{"@_val":"solid"},"a:miter":{"@_lim":"800000"}}]},"a:effectStyleLst":{"a:effectStyle":[{"a:effectLst":{}},{"a:effectLst":{}},{"a:effectLst":{}}]},"a:bgFillStyleLst":{"a:solidFill":[{"a:schemeClr":{"@_val":"phClr"}}],"a:gradFill":[]}}}},N5e=class extends I5e{applySlideMasterChanges(t){if(!(!t||t.length===0))for(let e of t)try{this.applySlideMasterChange(e);}catch(n){console.warn(`Failed to apply slide master changes for ${e.path}:`,n);}}applySlideMasterChange(t){let e=this.masterXmlMap.get(t.path);if(!e)return;let n=e["p:sldMaster"];if(!n)return;let r=n["p:cSld"]||{};if(VQ(r,t.backgroundColor),t.name!==void 0){let o=t.name.trim();o.length>0?r["@_name"]=o:delete r["@_name"];}n["p:cSld"]=r,t.clrMap!==void 0&&(n["p:clrMap"]=D5e(t.clrMap)),kA(n,t.headerFooter),e["p:sldMaster"]=n,this.masterXmlMap.set(t.path,e);}};L5e=class extends N5e{applySlideLayoutChanges(t){if(!(!t||t.length===0))for(let e of t)try{this.applySlideLayoutChange(e);}catch(n){console.warn(`Failed to apply slide layout changes for ${e.path}:`,n);}}applySlideLayoutChange(t){let e=this.layoutXmlMap.get(t.path);if(!e)return;let n=e["p:sldLayout"];if(!n)return;if(t.matchingName!==void 0){let o=t.matchingName.trim();o.length>0?n["@_matchingName"]=o:delete n["@_matchingName"];}t.preserve!==void 0&&(n["@_preserve"]=t.preserve?"1":"0"),t.userDrawn!==void 0&&(n["@_userDrawn"]=t.userDrawn?"1":"0"),t.showMasterPhAnim!==void 0&&(n["@_showMasterPhAnim"]=t.showMasterPhAnim?"1":"0");let r=n["p:cSld"]||{};if(VQ(r,t.backgroundColor),t.name!==void 0){let o=t.name.trim();o.length>0?r["@_name"]=o:delete r["@_name"];}n["p:cSld"]=r,rRe(n,t.clrMapOverride),kA(n,t.headerFooter),e["p:sldLayout"]=n,this.layoutXmlMap.set(t.path,e);}},F5e=class extends L5e{async applyNotesMasterStructuralChanges(t){if(!t||t.clrMap===void 0&&t.headerFooter===void 0)return;let e=this.zip.file(t.path);if(e)try{let n=await e.async("string"),r=this.parser.parse(n),o=r?.["p:notesMaster"];if(!o)return;t.clrMap!==void 0&&(o["p:clrMap"]=B5e(t.clrMap)),kA(o,t.headerFooter),r["p:notesMaster"]=o,this.zip.file(t.path,this.builder.build(r));}catch(n){console.warn("Failed to save notes master structural changes:",n);}}};O5e=class extends F5e{async applyHandoutMasterStructuralChanges(t){if(!t||t.clrMap===void 0&&t.headerFooter===void 0)return;let e=this.zip.file(t.path);if(e)try{let n=await e.async("string"),r=this.parser.parse(n),o=r?.["p:handoutMaster"];if(!o)return;t.clrMap!==void 0&&(o["p:clrMap"]=U5e(t.clrMap)),kA(o,t.headerFooter),r["p:handoutMaster"]=o,this.zip.file(t.path,this.builder.build(r));}catch(n){console.warn("Failed to save handout master structural changes:",n);}}};$5e=[{xmlKey:"a:wholeTbl",entryKey:"wholeTblFill"},{xmlKey:"a:band1H",entryKey:"band1HFill"},{xmlKey:"a:band2H",entryKey:"band2HFill"},{xmlKey:"a:band1V",entryKey:"band1VFill"},{xmlKey:"a:band2V",entryKey:"band2VFill"},{xmlKey:"a:firstRow",entryKey:"firstRowFill"},{xmlKey:"a:lastRow",entryKey:"lastRowFill"},{xmlKey:"a:firstCol",entryKey:"firstColFill"},{xmlKey:"a:lastCol",entryKey:"lastColFill"}],H5e=[{xmlKey:"a:wholeTbl",entryKey:"wholeTblText"},{xmlKey:"a:firstRow",entryKey:"firstRowText"},{xmlKey:"a:lastRow",entryKey:"lastRowText"},{xmlKey:"a:firstCol",entryKey:"firstColText"},{xmlKey:"a:lastCol",entryKey:"lastColText"},{xmlKey:"a:band1H",entryKey:"band1HText"},{xmlKey:"a:band2H",entryKey:"band2HText"},{xmlKey:"a:band1V",entryKey:"band1VText"},{xmlKey:"a:band2V",entryKey:"band2VText"}],z5e=class extends O5e{async applyViewPropertiesPart(t){if(!t)return;let e=await this.resolveViewPropsPath();if(!this.zip.file(e))return;let n=this.builder.build(eRe(t));this.zip.file(e,n);}async resolveViewPropsPath(){let t="ppt/viewProps.xml",e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return t;try{let n=this.parser.parse(e),o=this.ensureArray(n?.Relationships?.Relationship).find(a=>{let l=String(a?.["@_Type"]||""),c=String(a?.["@_Target"]||"");return l.includes("viewProps")||c.includes("viewProps")});if(!o)return t;let i=String(o["@_Target"]||"").trim();return i.length===0?t:xA("ppt",i)??t}catch{return t}}async applyTableStylesPart(t){if(!t||Object.keys(t).length===0)return;let e="ppt/tableStyles.xml",n=await this.zip.file(e)?.async("string");if(!n)return;let r;try{r=this.parser.parse(n);}catch{return}let o=r["a:tblStyleLst"];if(!o)return;let i=this.ensureArray(o["a:tblStyle"]);if(i.length===0)return;let s=new Map;for(let a of i){let l=String(a["@_styleId"]||"").trim();l&&s.set(this.normalizeTableStyleGuid(l),a);}for(let[a,l]of Object.entries(t)){let c=s.get(this.normalizeTableStyleGuid(a));c&&(l.styleName!==void 0&&(c["@_styleName"]=l.styleName),G5e(c,l));}this.zip.file(e,this.builder.build(r));}};X5e=class rte extends z5e{resolveEffectiveConformance(e){return e==="strict"||e==="transitional"?e:this.isStrictOoxml?"strict":"transitional"}async save(e,n){let r=this.resolveEffectiveConformance(n?.conformance),o=lQ(r),{slideRelationshipType:i,slideLayoutRelationshipType:s,relationshipsNamespace:a,slideContentType:l,commentContentType:c,commentAuthorContentType:u,commentAuthorsPartName:d}=o;this.compatibilityService.resetWarnings();let p=new MJ().withZip(this.zip).withCommentAuthorMap(this.commentAuthorMap).withCommentAuthorDetails(this.commentAuthorDetails).withEmuPerPx(rte.EMU_PER_PX).build();await this.reconcilePresentationSlidesForSave({slides:e,saveSession:p,slideRelationshipType:i,slideLayoutRelationshipType:s,relationshipsNamespace:a});let f=await this.zip.file("[Content_Types].xml")?.async("string");if(f){let x=this.parser.parse(f);this.contentTypesBuilder.applySlideAndMediaUpdates({contentTypesData:x,slidePaths:e.map(v=>v.id),usedMediaPaths:p.getUsedMediaPaths(),slideContentType:l}),this.zip.file("[Content_Types].xml",this.builder.build(x));}for(let x of e)await this.processSlideForSave(x,p,o);for(let x of p.getExistingCommentPaths())p.isCommentPathActive(x)||this.zip.remove(x);let h=p.hasUsedCommentAuthors();h?this.zip.file("ppt/commentAuthors.xml",this.builder.build(this.commentAuthorsXmlFactory.createXmlElement({saveState:p}))):(this.zip.remove("ppt/commentAuthors.xml"),await this.stripPresentationCommentAuthorsRelationship());let m=await this.zip.file("[Content_Types].xml")?.async("string");if(m){let x=this.parser.parse(m);this.contentTypesBuilder.applyCommentUpdates({contentTypesData:x,activeCommentPaths:p.getActiveCommentPaths(),hasCommentAuthors:h,commentContentType:c,commentAuthorContentType:u,commentAuthorsPartName:d}),this.zip.file("[Content_Types].xml",this.builder.build(x));}this.applySlideMasterChanges(n?.slideMasters),this.applySlideLayoutChanges(n?.slideLayouts);for(let[x,v]of this.layoutXmlMap.entries())this.zip.file(x,this.builder.build(v));for(let[x,v]of this.masterXmlMap.entries())this.zip.file(x,this.builder.build(v));if(await this.persistThemeParts(),await this.applyEmbeddedFontPreservation(n?.embeddedFonts),this.presentationData){this.presentationSaveBuilder.applySaveOptions({presentationData:this.presentationData,options:{headerFooter:n?.headerFooter,presentationProperties:n?.presentationProperties,customShows:n?.customShows,sections:n?.sections,photoAlbum:n?.photoAlbum,kinsoku:n?.kinsoku,modifyVerifier:n?.modifyVerifier},rawSlideWidthEmu:this.rawSlideWidthEmu,rawSlideHeightEmu:this.rawSlideHeightEmu,rawSlideSizeType:this.rawSlideSizeType,xmlLookupService:this.xmlLookupService}),this.deduplicateExtensionLists(this.presentationData);let x=this.builder.build(this.presentationData);this.zip.file("ppt/presentation.xml",x);}if(await this.applyPresentationPropertiesPart(n?.presentationProperties),await this.applyViewPropertiesPart(n?.viewProperties),await this.applyTableStylesPart(n?.tableStyles),await this.documentPropertiesUpdater.updateOnSave(e,{coreProperties:n?.coreProperties,appProperties:n?.appProperties,customProperties:n?.customProperties}),await this.applyTagCollectionChanges(n?.tags),await this.applyNotesMasterChanges(n?.notesMaster),await this.applyNotesMasterStructuralChanges(n?.notesMaster),await this.applyHandoutMasterChanges(n?.handoutMaster),await this.applyHandoutMasterStructuralChanges(n?.handoutMaster),await this.processPendingChartUpdates(),await this.ensureChartPartContentTypes(),await this.processPendingSmartArtUpdates(),this.applyCustomXmlPartsPreservation(),this.customXmlParts.length>0){let x=await this.zip.file("[Content_Types].xml")?.async("string");if(x){let v=this.parser.parse(x);this.contentTypesBuilder.applyCustomXmlUpdates({contentTypesData:v,customXmlParts:this.customXmlParts}),this.zip.file("[Content_Types].xml",this.builder.build(v));}}this.applyThumbnailPreservation(),await this.applyVbaProjectPreservation(),await this.stripDigitalSignatures();let g=n?.outputFormat??"pptx";await this.applyOutputFormatOverrides(g),r==="strict"&&await this.convertZipToStrictConformance();for(let x of Object.keys(this.zip.files))this.zip.files[x].dir&&delete this.zip.files[x];return await this.zip.generateAsync({type:"uint8array"})}async stripPresentationCommentAuthorsRelationship(){let e="ppt/_rels/presentation.xml.rels",n=await this.zip.file(e)?.async("string");if(!n)return;let r=this.parser.parse(n),o=r.Relationships;if(!o)return;let i=this.ensureArray(o.Relationship),s=i.filter(a=>{let l=String(a?.["@_Type"]??"");return l!=="http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"&&l!=="http://purl.oclc.org/ooxml/officeDocument/relationships/commentAuthors"});s.length!==i.length&&(o.Relationship=s,this.zip.file(e,this.builder.build(r)));}},j5e=class vp extends X5e{parseMediaData(e,n){return this.mediaDataParser.parseMediaData(e,n)}parseTableData(e){return this.tableDataParser.parseTableData(e)}parseGraphicFrame(e,n,r){return this.graphicFrameParser.parseGraphicFrame(e,n,r)}async parseContentPart(e,n,r){try{let o=String(e?.["@_r:id"]||"").trim(),i=[],s=e["p:xfrm"],a=s?.["a:off"],l=s?.["a:ext"],c=parseInt(String(a?.["@_x"]??"0"),10),u=parseInt(String(a?.["@_y"]??"0"),10),d=parseInt(String(l?.["@_cx"]??"0"),10),p=parseInt(String(l?.["@_cy"]??"0"),10),f=Number.isFinite(c)?c/vp.EMU_PER_PX:0,h=Number.isFinite(u)?u/vp.EMU_PER_PX:0,m=Number.isFinite(d)&&d>0?d/vp.EMU_PER_PX:120,g=Number.isFinite(p)&&p>0?p/vp.EMU_PER_PX:80;if(o&&r){let v=this.slideRelsMap.get(r)?.get(o);if(v){let S=this.resolveImagePath(r,v),w=await this.zip.file(S)?.async("string");if(w){let C=this.parser.parse(w),T=C["ink:ink"]||C.ink;if(T){let E=this.ensureArray(T["ink:trace"]??T.trace);for(let M of E){let P=typeof M=="string"?M:String(M?.["#text"]||M||"").trim();P.length>0&&i.push({path:P,color:"#000000",width:1,opacity:1});}}}}}return {id:n,type:"contentPart",x:f,y:h,width:m,height:g,inkStrokes:i.length>0?i:void 0,rawXml:e}}catch(o){return console.warn("Skipping malformed content part:",o),null}}async parseModel3DElement(e,n,r){try{let i=(e["p16:spPr"]??e["p:spPr"])?.["a:xfrm"],s=i?.["a:off"],a=i?.["a:ext"],l=parseInt(String(s?.["@_x"]??"0"),10),c=parseInt(String(s?.["@_y"]??"0"),10),u=parseInt(String(a?.["@_cx"]??"0"),10),d=parseInt(String(a?.["@_cy"]??"0"),10),p=Number.isFinite(l)?l/vp.EMU_PER_PX:0,f=Number.isFinite(c)?c/vp.EMU_PER_PX:0,h=Number.isFinite(u)&&u>0?u/vp.EMU_PER_PX:120,m=Number.isFinite(d)&&d>0?d/vp.EMU_PER_PX:80,g=i?.["@_rot"]?parseInt(String(i["@_rot"]))/6e4:void 0,x=i?.["@_skewX"]?parseInt(String(i["@_skewX"]),10)/6e4:void 0,v=i?.["@_skewY"]?parseInt(String(i["@_skewY"]),10)/6e4:void 0,S,w,C,T,E;if(r){let M=this.slideRelsMap.get(r),P=String(e["p16:model3Drel"]?.["@_r:id"]??e["@_r:embed"]??"").trim();if(P&&M){let L=M.get(P);if(L){S=this.resolveImagePath(r,L);let D=S.split(".").pop()?.toLowerCase();D==="glb"?w="model/gltf-binary":D==="gltf"&&(w="model/gltf+json");}}let R=e["p16:posterImage"],k=String(R?.["@_r:embed"]??R?.["@_r:link"]??"").trim();if(k&&M){let L=M.get(k);if(L)if(L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:"))C=L,T=L,E=L;else {let D=this.resolveImagePath(r,L);C=D,T=D,this.eagerDecodeImages&&D&&(E=await this.getImageData(D));}}}return {id:n,type:"model3d",x:p,y:f,width:h,height:m,rotation:g,skewX:x,skewY:v,modelPath:S,modelMimeType:w,posterImage:C,imagePath:T,imageData:E,rawXml:e}}catch(o){return console.warn("Skipping malformed model3D element:",o),null}}parseConnector(e,n,r){return this.connectorParser.parseConnector(e,n,r)}extractPlaceholderInfo(e){if(!e)return null;let n=e["p:ph"];if(!n)return null;let r=n["@_idx"],o=n["@_type"],i=n["@_sz"],s=n["@_orient"],a=n["@_hasCustomPrompt"],l=s!==void 0&&String(s).trim().toLowerCase()==="vert"?"vert":void 0,c;if(a!==void 0){let u=String(a).trim().toLowerCase();u==="1"||u==="true"?c=true:(u==="0"||u==="false")&&(c=false);}return {idx:r!==void 0?String(r):void 0,type:o!==void 0?String(o).toLowerCase():void 0,sz:i!==void 0?String(i).toLowerCase():void 0,orient:l,hasCustomPrompt:c}}placeholderMatches(e,n){if(!e&&!n)return true;if(!n)return false;if(!e)return true;if(e.idx!==void 0&&n.idx!==void 0)return !(e.idx!==n.idx||e.type&&n.type&&e.type!==n.type);if(e.idx!==void 0&&n.idx===void 0){let r=new Set(["title","ctrtitle","subtitle","dt","ftr","sldnum"]);return e.type&&r.has(e.type)?n.type===e.type:false}return !(e.type&&n.type&&e.type!==n.type||e.type&&!n.type)}},Y5e=class extends j5e{findPlaceholderInShapeTree(t,e){if(!t)return;let n=this.ensureArray(t["p:sp"]);for(let o of n){let i=this.extractPlaceholderInfo(on(o,"p:nvSpPr","p:nvPr"));if(this.placeholderMatches(e,i))return {shape:o}}let r=this.ensureArray(t["p:pic"]);for(let o of r){let i=this.extractPlaceholderInfo(on(o,"p:nvPicPr","p:nvPr"));if(this.placeholderMatches(e,i))return {picture:o}}}findPlaceholderContext(t,e){let n=this.resolveLayoutPathForSlide(t);if(!n)return;let r=this.layoutXmlMap.get(n),o=this.findPlaceholderInShapeTree(on(r,"p:sldLayout","p:cSld","p:spTree"),e);if(o)return o;let i=this.resolveMasterPathForLayout(n);if(!i)return;let s=this.masterXmlMap.get(i);return this.findPlaceholderInShapeTree(on(s,"p:sldMaster","p:cSld","p:spTree"),e)}mergeXmlObjects(t,e,n=0){if(n>64)return !t&&!e?void 0:t?e?{...t,...e}:{...t}:e?{...e}:void 0;if(!t&&!e)return;if(!t)return e?{...e}:void 0;if(!e)return {...t};let o={...t};for(let[i,s]of Object.entries(e)){let a=o[i];s&&typeof s=="object"&&!Array.isArray(s)&&a&&typeof a=="object"&&!Array.isArray(a)?o[i]=this.mergeXmlObjects(a,s,n+1):o[i]=s;}return o}readFlipState(t){return t?{flipHorizontal:this.parseBooleanAttr(t["@_flipH"]),flipVertical:this.parseBooleanAttr(t["@_flipV"])}:{flipHorizontal:false,flipVertical:false}}buildPlaceholderDefaultsKey(t){return t.idx!==void 0?t.type?`${t.type}_${t.idx}`:`_${t.idx}`:t.type??"body"}lookupPlaceholderDefaults(t,e){let n=this.resolveLayoutPathForSlide(t);if(!n)return;let r=this.buildPlaceholderDefaultsKey(e),i=this.layoutPlaceholderDefaultsCache.get(n)?.get(r),s=this.resolveMasterPathForLayout(n),l=(s?this.masterPlaceholderDefaultsCache.get(s):void 0)?.get(r);if(!i&&!l)return;if(!l)return i;if(!i)return l;let c={type:i.type,idx:i.idx??l.idx,bodyInsetLeft:i.bodyInsetLeft??l.bodyInsetLeft,bodyInsetTop:i.bodyInsetTop??l.bodyInsetTop,bodyInsetRight:i.bodyInsetRight??l.bodyInsetRight,bodyInsetBottom:i.bodyInsetBottom??l.bodyInsetBottom,textAnchor:i.textAnchor??l.textAnchor,autoFit:i.autoFit??l.autoFit,textWrap:i.textWrap??l.textWrap,promptText:i.promptText??l.promptText};if(i.levelStyles||l.levelStyles){let u={},d=new Set([...Object.keys(i.levelStyles??{}),...Object.keys(l.levelStyles??{})]);for(let p of d){let f=Number.parseInt(p,10),h=i.levelStyles?.[f],m=l.levelStyles?.[f];h&&m?u[f]={...m,...h}:u[f]=h??m;}c.levelStyles=u;}return c}},K5e=class ote extends Y5e{parseGeometryAdjustments(e){if(!e)return;let n=this.ensureArray(e?.["a:avLst"]?.["a:gd"]);if(n.length===0)return;let r={};for(let o of n){let i=String(o?.["@_name"]||"").trim();if(!i)continue;let s;if(o?.["@_val"]!==void 0){let a=Number.parseInt(String(o["@_val"]),10);Number.isFinite(a)&&(s=a);}if(s===void 0&&o?.["@_fmla"]){let l=String(o["@_fmla"]).trim().match(/^val\s+(-?\d+)$/i);if(l){let c=Number.parseInt(l[1],10);Number.isFinite(c)&&(s=c);}}s!==void 0&&(r[i]=s);}return Object.keys(r).length>0?r:void 0}parseAdjustmentHandles(e,n,r,o){if(!e)return;let i=e["a:ahLst"];if(!i)return;let s=[],a=IO({w:n,h:r});if(o)for(let[u,d]of Object.entries(o))a.set(u,d);let l=this.ensureArray(i["a:ahXY"]);for(let u of l){let d=String(u?.["@_gdRefX"]??"").trim(),p=String(u?.["@_gdRefY"]??"").trim(),f=d||p;if(!f)continue;let h=u["a:pos"],m=Po(h?.["@_x"],a),g=Po(h?.["@_y"],a),x={guideName:f,xFraction:n>0?m/n:void 0,yFraction:r>0?g/r:void 0};u["@_minX"]!==void 0&&(x.minValue=Po(u["@_minX"],a)),u["@_maxX"]!==void 0&&(x.maxValue=Po(u["@_maxX"],a)),u["@_minY"]!==void 0&&!x.minValue&&(x.minValue=Po(u["@_minY"],a)),u["@_maxY"]!==void 0&&!x.maxValue&&(x.maxValue=Po(u["@_maxY"],a)),s.push(x);}let c=this.ensureArray(i["a:ahPolar"]);for(let u of c){let d=String(u?.["@_gdRefR"]??"").trim(),p=String(u?.["@_gdRefAng"]??"").trim(),f=d||p;if(!f)continue;let h=u["a:pos"],m=Po(h?.["@_x"],a),g=Po(h?.["@_y"],a);s.push({guideName:f,xFraction:n>0?m/n:void 0,yFraction:r>0?g/r:void 0});}return s.length>0?s:void 0}extractCustomGeometryRawData(e){if(!e)return;let n=l=>l==null?false:typeof l!="object"?true:Object.keys(l).length>0,r={},o=e["a:gdLst"];n(o)&&(r.gdLstXml=o);let i=e["a:ahLst"];n(i)&&(r.ahLstXml=i);let s=e["a:cxnLst"];n(s)&&(r.cxnLstXml=s);let a=e["a:rect"];return n(a)&&(r.rectXml=a),Object.keys(r).length>0?r:void 0}static RECOGNISED_SP_PR_EXT_URIS=new Set(["{AF507438-7753-43E0-B8FC-AC1667EBCBE1}","{91240B29-F687-4F45-9708-019B960494DF}"]);extractOpaqueSpPrExtLst(e){if(!e)return;let n=e["a:extLst"];if(!n)return;let r=this.ensureArray(n["a:ext"]);if(r.length===0)return;let o=[];for(let i of r){let s=String(i?.["@_uri"]??"").trim();s&&ote.RECOGNISED_SP_PR_EXT_URIS.has(s)||o.push(i);}return o.length>0?o:void 0}extractCustomGeometryAdjustHandles(e){let n=e?.["a:ahLst"];if(!n)return {};let r=a=>{if(a==null)return;let l=String(a);return l.length>0?l:void 0},o={},i=this.ensureArray(n["a:ahXY"]);if(i.length>0){let a=[];for(let l of i){let c=l?.["a:pos"],u={gdRefX:r(l?.["@_gdRefX"]),gdRefY:r(l?.["@_gdRefY"]),minX:r(l?.["@_minX"]),maxX:r(l?.["@_maxX"]),minY:r(l?.["@_minY"]),maxY:r(l?.["@_maxY"]),posX:r(c?.["@_x"]),posY:r(c?.["@_y"])};a.push(u);}a.length>0&&(o.xy=a);}let s=this.ensureArray(n["a:ahPolar"]);if(s.length>0){let a=[];for(let l of s){let c=l?.["a:pos"],u={gdRefR:r(l?.["@_gdRefR"]),gdRefAng:r(l?.["@_gdRefAng"]),minR:r(l?.["@_minR"]),maxR:r(l?.["@_maxR"]),minAng:r(l?.["@_minAng"]),maxAng:r(l?.["@_maxAng"]),posX:r(c?.["@_x"]),posY:r(c?.["@_y"])};a.push(u);}a.length>0&&(o.polar=a);}return o}extractCustomGeometryConnectionSites(e){let n=e?.["a:cxnLst"];if(!n)return;let r=this.ensureArray(n["a:cxn"]);if(r.length===0)return;let o=[];for(let i of r){let s=i?.["a:pos"],a=i?.["@_ang"],l={ang:a!=null?String(a):void 0,posX:s?.["@_x"]!==void 0?String(s["@_x"]):void 0,posY:s?.["@_y"]!==void 0?String(s["@_y"]):void 0};o.push(l);}return o.length>0?o:void 0}extractCustomGeometryTextRect(e){let n=e?.["a:rect"];if(!n)return;let r={};return n["@_l"]!==void 0&&(r.l=String(n["@_l"])),n["@_t"]!==void 0&&(r.t=String(n["@_t"])),n["@_r"]!==void 0&&(r.r=String(n["@_r"])),n["@_b"]!==void 0&&(r.b=String(n["@_b"])),Object.keys(r).length>0?r:void 0}buildStructuredCustomGeometryPaths(e,n,r,o){if(!e)return;let i=e["a:pathLst"];if(!i)return;let s=this.ensureArray(i["a:path"]);if(s.length===0)return;let a=$Z(n,r,o);if(a.length===0)return;let l=new Set(["norm","lighten","lightenLess","darken","darkenLess","none"]),c=m=>{if(!(m==null||m==="")){if(m==="1"||m==="true"||m===true)return true;if(m==="0"||m==="false"||m===false)return false}},u=a[0],d=s[0],p=String(d["@_fill"]??"").trim();l.has(p)&&(u.fillMode=p);let f=c(d["@_stroke"]);f!==void 0&&(u.stroke=f);let h=c(d["@_extrusionOk"]);return h!==void 0&&(u.extrusionOk=h),a}parseCustomGeometry(e,n,r){if(!e||!e["a:pathLst"]||!e["a:pathLst"]?.["a:path"])return null;let o=this.ensureArray(e["a:avLst"]?.["a:gd"]),i=o.length>0?UZ(o):void 0,s=this.ensureArray(e["a:gdLst"]?.["a:gd"]),a=OZ(s),l=this.ensureArray(e["a:pathLst"]["a:path"]),c=l[0],u=Number.parseInt(String(c?.["@_w"]??"0"),10)||(n??0),d=Number.parseInt(String(c?.["@_h"]??"0"),10)||(r??0);if(a.length>0||i&&i.size>0){let f=NO(a,{w:u,h:d},i);return EB(l,f,h=>this.ensureArray(h))}return EB(l,new Map,f=>this.ensureArray(f))}parseCropFraction(e){let n=Number.parseInt(String(e??""),10);return Number.isFinite(n)?Math.max(0,Math.min(1e5,n))/1e5:void 0}readImageCropFromBlipFill(e){let n=e?.["a:srcRect"];if(n){let i=this.parseCropFraction(n["@_l"]),s=this.parseCropFraction(n["@_t"]),a=this.parseCropFraction(n["@_r"]),l=this.parseCropFraction(n["@_b"]);return {cropLeft:i,cropTop:s,cropRight:a,cropBottom:l}}let o=e?.["a:stretch"]?.["a:fillRect"];if(o){let i=this.parseCropFraction(o["@_l"]),s=this.parseCropFraction(o["@_t"]),a=this.parseCropFraction(o["@_r"]),l=this.parseCropFraction(o["@_b"]);if(i!==void 0||s!==void 0||a!==void 0||l!==void 0)return {cropLeft:i,cropTop:s,cropRight:a,cropBottom:l}}return {}}extractShapeStyle(e,n){return this.shapeStyleExtractor.extractShapeStyle(e,n)}},q5e=class Dg extends K5e{async parseShapeWithImageFill(e,n,r){try{let o=Rt(e,"p:spPr"),i=this.extractPlaceholderInfo(on(e,"p:nvSpPr","p:nvPr")),s=i?this.findPlaceholderContext(r,i):void 0,a=s?.shape?.["p:spPr"]||s?.picture?.["p:spPr"],l=this.mergeXmlObjects(a,o),c=l?.["a:xfrm"]||o?.["a:xfrm"]||a?.["a:xfrm"];if(!c)return null;let u=Rt(c,"a:off"),d=Rt(c,"a:ext");if(!u||!d)return null;let p=Math.round(parseInt(gn(u,"x")||"0")/Dg.EMU_PER_PX),f=Math.round(parseInt(gn(u,"y")||"0")/Dg.EMU_PER_PX),h=Math.round(parseInt(gn(d,"cx")||"0")/Dg.EMU_PER_PX),m=Math.round(parseInt(gn(d,"cy")||"0")/Dg.EMU_PER_PX),g=c["@_rot"]?parseInt(c["@_rot"])/6e4:void 0,x=c["@_skewX"]?parseInt(String(c["@_skewX"]),10)/6e4:void 0,v=c["@_skewY"]?parseInt(String(c["@_skewY"]),10)/6e4:void 0,{flipHorizontal:S,flipVertical:w}=this.readFlipState(c),C=gn(Rt(l,"a:prstGeom"),"prst"),T=this.parseGeometryAdjustments(l?.["a:prstGeom"]),E=C||"rect",M,P,R,k=l?.["a:custGeom"];if(k){let Re=this.parseCustomGeometry(k,h,m);Re&&(E="custom",M=Re.pathData,P=Re.pathWidth,R=Re.pathHeight);}let L=k??l?.["a:prstGeom"],D=this.parseAdjustmentHandles(L,h,m,T),U=l?.["a:blipFill"]||o?.["a:blipFill"],N=Rt(U,"a:blip"),B=gn(N,"r:embed"),O=gn(N,"r:link"),H=this.readImageCropFromBlipFill(U),z=U?.["a:tile"],K={};if(z){let Re=Number.parseInt(String(z["@_tx"]||""),10);Number.isFinite(Re)&&(K.tileOffsetX=Re/Dg.EMU_PER_PX);let $e=Number.parseInt(String(z["@_ty"]||""),10);Number.isFinite($e)&&(K.tileOffsetY=$e/Dg.EMU_PER_PX);let xe=Number.parseInt(String(z["@_sx"]||""),10);Number.isFinite(xe)&&(K.tileScaleX=xe/1e5);let Oe=Number.parseInt(String(z["@_sy"]||""),10);Number.isFinite(Oe)&&(K.tileScaleY=Oe/1e5);let Ee=String(z["@_flip"]||"").trim();(Ee==="x"||Ee==="y"||Ee==="xy"||Ee==="none")&&(K.tileFlip=Ee);let fe=String(z["@_algn"]||"").trim();fe.length>0&&(K.tileAlignment=fe);}this.compatibilityService.inspectPictureCompatibility(U,N,r,n),this.compatibilityService.inspectShapeCompatibility(l,e["p:txBody"],r,n);let ee,j,re=B||O;if(re){let $e=this.slideRelsMap.get(r)?.get(re);$e&&($e.startsWith("http://")||$e.startsWith("https://")||$e.startsWith("data:")?(j=$e,ee=$e):(j=this.resolveImagePath(r,$e),this.eagerDecodeImages&&j&&(ee=await this.getImageData(j))));}let ne=e["p:style"]||s?.shape?.["p:style"]||s?.picture?.["p:style"],pe=on(e,"p:nvSpPr","p:cNvPr"),Q=this.slideRelsMap.get(r),{actionClick:ce,actionHover:ue}=this.parseElementActions(pe,Q,this.orderedSlidePaths);return {id:n,type:"picture",x:p,y:f,width:h,height:m,imageData:ee,imagePath:j,...H,...K,shapeType:E,shapeAdjustments:T,adjustmentHandles:D,pathData:M,pathWidth:P,pathHeight:R,shapeStyle:this.extractShapeStyle(l,ne),rotation:g,skewX:x,skewY:v,flipHorizontal:S,flipVertical:w,rawXml:e,actionClick:ce,actionHover:ue}}catch(o){return console.warn(`[pptx] Skipping shape-with-image-fill (${n}):`,o),null}}textVerticalAlignFromDrawingValue(e){let n=String(e??"").trim().toLowerCase();if(n.length!==0){if(n==="t"||n==="top")return "top";if(n==="ctr"||n==="center")return "middle";if(n==="b"||n==="bottom")return "bottom";if(n==="dist"||n==="just")return "middle"}}textDirectionFromDrawingValue(e){let n=String(e??"").trim().toLowerCase();if(!(n.length===0||n==="horz")){if(n==="vert")return "vertical";if(n==="vert270")return "vertical270";if(n==="eavert")return "eaVert";if(n==="wordartvert")return "wordArtVert";if(n==="wordartvertrtl")return "wordArtVertRtl";if(n==="mongolianvert")return "mongolianVert"}}},Z5e=class extends q5e{applyPlaceholderBodyDefaults(t,e){if(t.bodyInsetLeft===void 0&&e.bodyInsetLeft!==void 0&&(t.bodyInsetLeft=e.bodyInsetLeft),t.bodyInsetTop===void 0&&e.bodyInsetTop!==void 0&&(t.bodyInsetTop=e.bodyInsetTop),t.bodyInsetRight===void 0&&e.bodyInsetRight!==void 0&&(t.bodyInsetRight=e.bodyInsetRight),t.bodyInsetBottom===void 0&&e.bodyInsetBottom!==void 0&&(t.bodyInsetBottom=e.bodyInsetBottom),t.vAlign===void 0&&e.textAnchor){let n=this.textVerticalAlignFromDrawingValue(e.textAnchor);n&&(t.vAlign=n);}t.autoFit===void 0&&e.autoFit!==void 0&&(t.autoFit=e.autoFit),t.textWrap===void 0&&e.textWrap&&(t.textWrap=e.textWrap);}pointsToPixels(t){return t*(96/72)}parseParagraphSpacingPx(t){if(!t)return;let e=Number.parseInt(String(t["a:spcPts"]?.["@_val"]||""),10);if(Number.isFinite(e))return this.pointsToPixels(e/100)}parseLineSpacingMultiplier(t){if(!t)return;let e=Number.parseInt(String(t["a:spcPct"]?.["@_val"]||""),10);if(Number.isFinite(e))return Math.max(.1,Math.min(5,e/1e5))}parseLineSpacingExactPt(t){if(!t)return;let e=Number.parseInt(String(t["a:spcPts"]?.["@_val"]||""),10);if(Number.isFinite(e)&&e>0)return e/100}applyPlaceholderLevelDefaults(t,e){t.fontFamily===void 0&&e.fontFamily!==void 0&&(t.fontFamily=e.fontFamily),t.fontSize===void 0&&e.fontSize!==void 0&&(t.fontSize=e.fontSize),t.bold===void 0&&e.bold!==void 0&&(t.bold=e.bold),t.italic===void 0&&e.italic!==void 0&&(t.italic=e.italic),t.color===void 0&&e.color!==void 0&&(t.color=e.color),t.paragraphMarginLeft===void 0&&e.marginLeft!==void 0&&(t.paragraphMarginLeft=e.marginLeft),t.paragraphIndent===void 0&&e.indent!==void 0&&(t.paragraphIndent=e.indent),t.lineSpacing===void 0&&t.lineSpacingExactPt===void 0&&(e.lineSpacing!==void 0?t.lineSpacing=e.lineSpacing:e.lineSpacingExactPt!==void 0&&(t.lineSpacingExactPt=e.lineSpacingExactPt)),t.paragraphSpacingBefore===void 0&&e.spaceBefore!==void 0&&(t.paragraphSpacingBefore=e.spaceBefore),t.paragraphSpacingAfter===void 0&&e.spaceAfter!==void 0&&(t.paragraphSpacingAfter=e.spaceAfter),t.align===void 0&&e.alignment!==void 0&&(t.align=e.alignment);}},J5e=class extends Z5e{resolveParagraphBulletInfo(t,e,n,r,o=false,i){if(!t)return null;let s=t["a:pPr"];if(s?.["a:buNone"])return {none:true};let a=Number.parseInt(String(s?.["@_lvl"]||"0"),10),l=Number.isFinite(a)?Math.min(Math.max(a+1,1),9):1,c=`a:lvl${l}pPr`,u=Rt(Rt(r,"a:lstStyle"),c),d=Rt(Rt(n,"a:lstStyle"),c),p=on(n,"a:lstStyle","a:defPPr"),f=on(r,"a:lstStyle","a:defPPr"),h=[s,d,u,p,f],m;for(let N of h)if(N){if(N["a:buNone"])return {none:true};if(N["a:buChar"]||N["a:buAutoNum"]||N["a:buBlip"]||N["a:buFontTx"]!==void 0||N["a:buClrTx"]!==void 0||N["a:buSzTx"]!==void 0){m=N;break}}if(!m){if(o){let N=this.presentationDefaultTextStyle?.levelStyles?.[l-1]??this.presentationDefaultTextStyle?.levelStyles?.[-1];return this.createBulletInfoFromLevelStyle(N,e)}return null}let g=m["a:buFont"],x=g?.["@_typeface"]?String(g["@_typeface"]):void 0,v=m["a:buFontTx"]!==void 0,S=m["a:buSzPct"],w;if(S?.["@_val"]!==void 0){let N=Number.parseInt(String(S["@_val"]),10);Number.isFinite(N)&&(w=N/1e3);}let C=m["a:buSzPts"],T;if(C?.["@_val"]!==void 0){let N=Number.parseInt(String(C["@_val"]),10);Number.isFinite(N)&&(T=N/100);}let E=m["a:buSzTx"]!==void 0,M=m["a:buClr"],P,R;M&&(P=this.parseColor(M),R=cb(M));let k=m["a:buClrTx"]!==void 0,L=String(m["a:buChar"]?.["@_char"]||"");if(L.length>0)return {char:L,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{},...v?{fontInherit:true}:{},...k?{colorInherit:true}:{},...E?{sizeInherit:true}:{}};let D=m["a:buAutoNum"];if(D){let N=D["@_type"]?String(D["@_type"]):void 0,B=Number.parseInt(String(D["@_startAt"]||"1"),10),O=Number.isFinite(B)?B:1;return {autoNumType:N,autoNumStartAt:O,paragraphIndex:e,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{},...v?{fontInherit:true}:{},...k?{colorInherit:true}:{},...E?{sizeInherit:true}:{}}}let U=m["a:buBlip"];if(U){let N=U["a:blip"],B=N?.["@_r:embed"]?String(N["@_r:embed"]):void 0,O={...U};if(B&&i){let z=this.slideRelsMap.get(i)?.get(B),K;if(z)if(z.startsWith("http://")||z.startsWith("https://")||z.startsWith("data:"))K=z;else {let ee=this.resolveImagePath(i,z);ee&&(K=this.imageDataCache?.get(ee));}return {imageRelId:B,imageDataUrl:K,imageBlipFillXml:O,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{}}}return {imageBlipFillXml:O,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{}}}return null}createBulletInfoFromLevelStyle(t,e){return t?t.bulletNone?{none:true}:t.bulletChar&&t.bulletChar.length>0?{char:t.bulletChar,fontFamily:t.bulletFontFamily,sizePercent:t.bulletSizePercent,sizePts:t.bulletSizePts,color:t.bulletColor}:t.bulletAutoNumType&&t.bulletAutoNumType.length>0?{autoNumType:t.bulletAutoNumType,autoNumStartAt:1,paragraphIndex:e,fontFamily:t.bulletFontFamily,sizePercent:t.bulletSizePercent,sizePts:t.bulletSizePts,color:t.bulletColor}:null:null}formatAutoNumber(t,e){let n=(i,s)=>{let a=(i-1)%26;return String.fromCharCode((s?65:97)+a)},r=(i,s)=>{let a=[1e3,900,500,400,100,90,50,40,10,9,5,4,1],l=["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"],c="",u=Math.max(1,Math.min(i,3999));for(let d=0;d<a.length;d++)for(;u>=a[d];)c+=l[d],u-=a[d];return s?c:c.toLowerCase()},o=(i,s)=>i<0||i>9?`${i}`:s==="black"?i===0?"\u24EB":String.fromCodePoint(9451+i):i===0?"\u24EA":String.fromCodePoint(9311+i);switch(t){case "arabicPeriod":case "arabicDbPeriod":return `${e}. `;case "arabicParenR":return `${e}) `;case "arabicParenBoth":return `(${e}) `;case "arabicPlain":case "arabicDbPlain":return `${e} `;case "alphaLcPeriod":return `${n(e,false)}. `;case "alphaUcPeriod":return `${n(e,true)}. `;case "alphaLcParenR":return `${n(e,false)}) `;case "alphaUcParenR":return `${n(e,true)}) `;case "alphaLcParenBoth":return `(${n(e,false)}) `;case "alphaUcParenBoth":return `(${n(e,true)}) `;case "romanLcPeriod":return `${r(e,false)}. `;case "romanUcPeriod":return `${r(e,true)}. `;case "romanLcParenR":return `${r(e,false)}) `;case "romanUcParenR":return `${r(e,true)}) `;case "romanLcParenBoth":return `(${r(e,false)}) `;case "romanUcParenBoth":return `(${r(e,true)}) `;case "circleNumDbPlain":case "circleNumWdWhitePlain":return `${o(e,"std")} `;case "circleNumWdBlackPlain":return `${o(e,"black")} `;default:return `${e}. `}}},Q5e=class fO extends J5e{parseShapeLocks(e){if(!e)return;let n={},r=false,o=s=>{let a=e[s];if(a===void 0)return;let l=String(a).trim().toLowerCase();return l==="1"||l==="true"},i=(s,a)=>{let l=o(s);l!==void 0&&(a(l),r=true);};return i("@_noGrp",s=>{n.noGrouping=s;}),i("@_noRot",s=>{n.noRotation=s;}),i("@_noMove",s=>{n.noMove=s;}),i("@_noResize",s=>{n.noResize=s;}),i("@_noTextEdit",s=>{n.noTextEdit=s;}),i("@_noSelect",s=>{n.noSelect=s;}),i("@_noChangeAspect",s=>{n.noChangeAspect=s;}),i("@_noEditPoints",s=>{n.noEditPoints=s;}),i("@_noAdjustHandles",s=>{n.noAdjustHandles=s;}),i("@_noChangeArrowheads",s=>{n.noChangeArrowheads=s;}),i("@_noChangeShapeType",s=>{n.noChangeShapeType=s;}),r?n:void 0}applyBodyProperties(e,n,r){let o={},i=e?.["a:linkedTxbx"]??n?.["a:linkedTxbx"];if(i){let T=Number.parseInt(String(i["@_id"]||""),10),E=Number.parseInt(String(i["@_seq"]||"0"),10);Number.isFinite(T)&&(o.linkedTxbxId=T,o.linkedTxbxSeq=Number.isFinite(E)?E:0);}if(!e)return o;let s=this.textVerticalAlignFromDrawingValue(e["@_anchor"]);s&&(r.vAlign=s);let a=this.textDirectionFromDrawingValue(e["@_vert"]);a&&(r.textDirection=a);let l=this.normalizeTextColumnCount(e["@_numCol"]);l&&l>1&&(r.columnCount=l);let c=parseInt(String(e["@_spcCol"]||""),10);Number.isFinite(c)&&c>0&&(r.columnSpacing=c/fO.EMU_PER_PX);let u=e["@_horzOverflow"]??e["@_hOverflow"],d=String(u||"").trim();(d==="overflow"||d==="clip")&&(r.hOverflow=d);let p=String(e["@_vertOverflow"]||"").trim();(p==="overflow"||p==="clip"||p==="ellipsis")&&(r.vertOverflow=p);let f=e["a:prstTxWarp"];if(f){let T=String(f["@_prst"]||"").trim();T.length>0&&T!=="textNoShape"&&(r.textWarpPreset=T);let E=f["a:avLst"];if(E){let M=E["a:gd"],P=Array.isArray(M)?M:M?[M]:[];for(let R of P){let k=R,L=String(k["@_name"]||"").trim(),U=String(k["@_fmla"]||"").trim().match(/^val\s+(-?\d+)$/);if(!U)continue;let N=parseInt(U[1],10);Number.isFinite(N)&&(L==="adj"?r.textWarpAdj=N:L==="adj2"&&(r.textWarpAdj2=N));}}}let h=e["a:sp3d"];if(h){let T=h["a:bevelT"],E=h["a:bevelB"],M={};h["@_extrusionH"]!==null&&(M.extrusionHeight=parseInt(String(h["@_extrusionH"]),10));let P=this.parseColor(h["a:extrusionClr"]);P&&(M.extrusionColor=P);let R=String(h["@_prstMaterial"]||"").trim();R&&(M.presetMaterial=R),T&&(M.bevelTopType=String(T["@_prst"]||"circle").trim(),T["@_w"]!==null&&(M.bevelTopWidth=parseInt(String(T["@_w"]),10)),T["@_h"]!==null&&(M.bevelTopHeight=parseInt(String(T["@_h"]),10))),E&&(M.bevelBottomType=String(E["@_prst"]||"circle").trim(),E["@_w"]!==null&&(M.bevelBottomWidth=parseInt(String(E["@_w"]),10)),E["@_h"]!==null&&(M.bevelBottomHeight=parseInt(String(E["@_h"]),10))),Object.keys(M).length>0&&(r.text3d=M);}let m=e["a:scene3d"];if(m){let T=m["a:camera"],E=m["a:lightRig"],M={},P=String(T?.["@_prst"]||"").trim();if(P&&(M.cameraPreset=P),T){let L=T["a:rot"];if(L){let D=parseInt(String(L["@_lat"]||""),10);Number.isFinite(D)&&(M.cameraRotX=D);let U=parseInt(String(L["@_lon"]||""),10);Number.isFinite(U)&&(M.cameraRotY=U);let N=parseInt(String(L["@_rev"]||""),10);Number.isFinite(N)&&(M.cameraRotZ=N);}}let R=String(E?.["@_rig"]||"").trim();R&&(M.lightRigType=R);let k=String(E?.["@_dir"]||"").trim();k&&(M.lightRigDirection=k),Object.keys(M).length>0&&(r.textBodyScene3d=M);}if(e["a:spAutoFit"]!==void 0)r.autoFit=true,r.autoFitMode="shrink";else if(e["a:normAutofit"]!==void 0){r.autoFit=true,r.autoFitMode="normal";let T=parseInt(String(e["a:normAutofit"]?.["@_fontScale"]||""),10);Number.isFinite(T)&&T>0&&(r.autoFitFontScale=T/1e5);let E=parseInt(String(e["a:normAutofit"]?.["@_lnSpcReduction"]||""),10);Number.isFinite(E)&&E>0&&(r.autoFitLineSpacingReduction=E/1e5);}else e["a:noAutofit"]!==void 0&&(r.autoFit=false,r.autoFitMode="none");let g=String(e["@_wrap"]||"").trim().toLowerCase();g==="none"?r.textWrap="none":g==="square"&&(r.textWrap="square");let x=T=>{let E=e[T];if(E===void 0)return;let M=Number.parseInt(String(E),10);return Number.isFinite(M)?M/fO.EMU_PER_PX:void 0},v=x("@_lIns");v!==void 0&&(r.bodyInsetLeft=v);let S=x("@_tIns");S!==void 0&&(r.bodyInsetTop=S);let w=x("@_rIns");w!==void 0&&(r.bodyInsetRight=w);let C=x("@_bIns");return C!==void 0&&(r.bodyInsetBottom=C),UQ(e,r),o}selectAlternateContentBranch(e){return i4(e)}},eLe=class xh extends Q5e{resolveShapeParagraphStyle(e,n,r){let o=e["a:pPr"],i=this.parseOptionalBooleanAttr(o?.["@_rtl"]);i!==void 0&&n.rtl===void 0&&(n.rtl=i);let s=i?"right":"left";if(o?.["@_algn"]&&(s={l:"left",ctr:"center",r:"right",just:"justify",justify:"justify",justLow:"justLow",dist:"dist",thaiDist:"thaiDist"}[o["@_algn"]]||"left",n.align||(n.align=s)),n.paragraphSpacingBefore===void 0){let v=this.parseParagraphSpacingPx(o?.["a:spcBef"]);v!==void 0&&(n.paragraphSpacingBefore=v);}if(n.paragraphSpacingAfter===void 0){let v=this.parseParagraphSpacingPx(o?.["a:spcAft"]);v!==void 0&&(n.paragraphSpacingAfter=v);}if(n.lineSpacing===void 0&&n.lineSpacingExactPt===void 0){let v=o?.["a:lnSpc"],S=this.parseLineSpacingMultiplier(v);if(S!==void 0)n.lineSpacing=S;else {let w=this.parseLineSpacingExactPt(v);w!==void 0&&(n.lineSpacingExactPt=w);}}if(n.paragraphMarginLeft===void 0&&o?.["@_marL"]!==void 0){let v=Number.parseInt(String(o["@_marL"]),10);Number.isFinite(v)&&(n.paragraphMarginLeft=v/xh.EMU_PER_PX);}if(n.paragraphMarginRight===void 0&&o?.["@_marR"]!==void 0){let v=Number.parseInt(String(o["@_marR"]),10);Number.isFinite(v)&&(n.paragraphMarginRight=v/xh.EMU_PER_PX);}if(n.paragraphIndent===void 0&&o?.["@_indent"]!==void 0){let v=Number.parseInt(String(o["@_indent"]),10);Number.isFinite(v)&&(n.paragraphIndent=v/xh.EMU_PER_PX);}if(!n.tabStops){let v=o?.["a:tabLst"];if(v){let S=this.ensureArray(v["a:tab"]);S.length>0&&(n.tabStops=S.filter(w=>w?.["@_pos"]!==void 0).map(w=>{let C=Number.parseInt(String(w["@_pos"]),10),T=Number.isFinite(C)?C/xh.EMU_PER_PX:0,E=String(w["@_algn"]||"l").trim(),M=E==="ctr"||E==="r"||E==="dec"?E:"l",P=String(w["@_leader"]||"").trim(),R=P==="dot"||P==="hyphen"||P==="underscore"?P:void 0;return {position:T,align:M,...R?{leader:R}:{}}}));}}if(o?.["@_defTabSz"]!==void 0&&n.defaultTabSize===void 0){let v=Number.parseInt(String(o["@_defTabSz"]),10);Number.isFinite(v)&&(n.defaultTabSize=v/xh.EMU_PER_PX);}if(o?.["@_eaLnBrk"]!==void 0&&n.eaLineBreak===void 0){let v=this.parseOptionalBooleanAttr(o["@_eaLnBrk"]);v!==void 0&&(n.eaLineBreak=v);}if(o?.["@_latinLnBrk"]!==void 0&&n.latinLineBreak===void 0){let v=this.parseOptionalBooleanAttr(o["@_latinLnBrk"]);v!==void 0&&(n.latinLineBreak=v);}if(o?.["@_fontAlgn"]!==void 0&&n.fontAlignment===void 0){let v=String(o["@_fontAlgn"]).trim();v&&(n.fontAlignment=v);}if(o?.["@_hangingPunct"]!==void 0&&n.hangingPunctuation===void 0){let v=this.parseOptionalBooleanAttr(o["@_hangingPunct"]);v!==void 0&&(n.hangingPunctuation=v);}let a=this.extractTextRunStyle(o?.["a:defRPr"],s,r.slideRelationshipMap),l=Number.parseInt(String(o?.["@_lvl"]||"0"),10),c=`a:lvl${Number.isFinite(l)?Math.min(Math.max(l+1,1),9):1}pPr`,u=this.extractTextRunStyle(r.inheritedTxBody?.["a:lstStyle"]?.[c]?.["a:defRPr"],s,r.slideRelationshipMap),d=this.extractTextRunStyle(r.txBody?.["a:lstStyle"]?.[c]?.["a:defRPr"],s,r.slideRelationshipMap),p=this.extractTextRunStyle(e?.["a:endParaRPr"],s,r.slideRelationshipMap),f={...r.bodyDefaultRunStyle,...u,...d,...p,...a};if(r.effectiveLevelStyles){let v=Number.isFinite(l)?Math.min(Math.max(l,0),8):0,S=r.effectiveLevelStyles[v]??r.effectiveLevelStyles[-1];S&&(this.applyPlaceholderLevelDefaults(f,S),this.applyPlaceholderLevelDefaults(n,S));}let h=o?.["@_marL"]!==void 0?Number.parseInt(String(o["@_marL"]),10)/xh.EMU_PER_PX:void 0,m=o?.["@_indent"]!==void 0?Number.parseInt(String(o["@_indent"]),10)/xh.EMU_PER_PX:void 0,g=h,x=m;if(r.effectiveLevelStyles){let v=Number.isFinite(l)?Math.min(Math.max(l,0),8):0,S=r.effectiveLevelStyles[v]??r.effectiveLevelStyles[-1];S&&(g===void 0&&S.marginLeft!==void 0&&(g=S.marginLeft),x===void 0&&S.indent!==void 0&&(x=S.indent));}return {paraAlign:s,mergedDefaultRunStyle:f,indent:{marginLeft:g,indent:x}}}},tLe=class extends eLe{collectShapeParagraphContent(t,e,n,r,o,i){let s=[],a=[],l,c=S=>{l||(l={...S});},u=i.placeholderInfo?.type==="body"||i.placeholderInfo?.type==="obj",d=this.resolveParagraphBulletInfo(t,e,i.txBody,i.inheritedTxBody,u,i.slidePath);if(d&&!d.none){let S;if(d.char)S=`${d.char} `;else if(d.autoNumType){let w=d.autoNumStartAt??1;S=this.formatAutoNumber(d.autoNumType,w+e);}else d.imageRelId?S="\u{1F4CE} ":S="\u2022 ";s.push(S),a.push({text:S,style:{...o},bulletInfo:d}),c(o);}let p=(S,w)=>{let C={...o,...this.extractTextRunStyle(w,r,i.slideRelationshipMap)};s.push(S),a.push({text:S,style:C}),c(C);},f=S=>{if(!S)return;let w=S["a:ruby"];if(w){let T=this.parseRubyElement(w,S["a:rPr"],r,o,i.slideRelationshipMap);if(T){s.push(T.text),a.push(T),c(T.style);return}}let C=typeof S["a:t"]=="string"?S["a:t"]:S["a:t"]!==void 0?String(S["a:t"]):"";p(C,S["a:rPr"]);},h=S=>{if(!S)return;let w=typeof S["a:t"]=="string"?S["a:t"]:S["a:t"]!==void 0?String(S["a:t"]):"",C={...o,...this.extractTextRunStyle(S["a:rPr"],r,i.slideRelationshipMap)},T=String(S["@_type"]||"").trim()||void 0,E=String(S["@_uuid"]||S["@_id"]||"").trim()||void 0;s.push(w),a.push({text:w,style:C,fieldType:T,fieldGuid:E}),c(C);},m=S=>{if(!S)return;let w="[Equation]";s.push(w),a.push({text:w,style:{...o},equationXml:S});},g=S=>{let w=this.selectAlternateContentBranch(S);if(!w)return;let C=w["a14:m"]??w["m:oMathPara"]??w["m:oMath"];if(C){m(C);return}let T=this.ensureArray(w["a:r"]);for(let M of T)f(M);let E=this.ensureArray(w["a:fld"]);for(let M of E)h(M);},x=new Set(["a:r","a:fld","a:t","a14:m","m:oMathPara","m:oMath","mc:AlternateContent","a:br"]);for(let S of Object.keys(t)){if(!x.has(S))continue;let w=this.ensureArray(t[S]);for(let C of w)switch(S){case "a:r":f(C);break;case "a:fld":h(C);break;case "a:t":{let T=typeof C=="string"?C:C!==void 0?String(C):"";p(T,t["a:rPr"]);break}case "a14:m":case "m:oMathPara":case "m:oMath":m(C);break;case "mc:AlternateContent":g(C);break;case "a:br":{let E=(C??{})["a:rPr"],M={...o,...this.extractTextRunStyle(E,r,i.slideRelationshipMap)};s.push(`
271
+ `).map(p=>{let f={};return s&&(f["a:pPr"]=s),f["a:r"]={"a:rPr":l,"a:t":p},f["a:endParaRPr"]=c,f});r["a:p"]=d.length===1?d[0]:d;}writeTableCellStyle(e,n){e["a:tcPr"]||(e["a:tcPr"]={});let r=e["a:tcPr"];if(JDe(r,n,a=>this.parseColor(a)),n.vAlign){let a={top:"t",middle:"ctr",bottom:"b"};r["@_anchor"]=a[n.vAlign]||"t";}if(n.textDirection&&(r["@_vert"]=n.textDirection),n.align){let a=this.ensureArray(e["a:txBody"]?.["a:p"])[0];if(a){a["a:pPr"]||(a["a:pPr"]={});let l={left:"l",center:"ctr",right:"r",justify:"just"};a["a:pPr"]["@_algn"]=l[n.align]||"l";}}let o=[{xmlKey:"a:lnT",width:n.borderTopWidth,color:n.borderTopColor,dash:n.borderTopDash},{xmlKey:"a:lnB",width:n.borderBottomWidth,color:n.borderBottomColor,dash:n.borderBottomDash},{xmlKey:"a:lnL",width:n.borderLeftWidth,color:n.borderLeftColor,dash:n.borderLeftDash},{xmlKey:"a:lnR",width:n.borderRightWidth,color:n.borderRightColor,dash:n.borderRightDash}];for(let a of o)if(a.width!==void 0||a.color!==void 0||a.dash!==void 0){r[a.xmlKey]||(r[a.xmlKey]={});let l=r[a.xmlKey];a.width!==void 0&&(l["@_w"]=String(Math.round(a.width*oA.EMU_PER_PX))),a.color&&(l["a:solidFill"]={"a:srgbClr":{"@_val":a.color.replace("#","")}}),a.dash&&a.dash!=="solid"?l["a:prstDash"]={"@_val":a.dash}:a.dash==="solid"&&delete l["a:prstDash"];}let i=oA.EMU_PER_PX;n.marginLeft!==void 0&&(r["@_marL"]=String(Math.round(n.marginLeft*i))),n.marginRight!==void 0&&(r["@_marR"]=String(Math.round(n.marginRight*i))),n.marginTop!==void 0&&(r["@_marT"]=String(Math.round(n.marginTop*i))),n.marginBottom!==void 0&&(r["@_marB"]=String(Math.round(n.marginBottom*i))),delete r["a:tcMar"],QDe(r,n,oA.EMU_PER_PX),e5e(e,n,this.ensureArray.bind(this));let s=Wg(r,sJ);for(let a of Object.keys(r))delete r[a];for(let a of Object.keys(s))r[a]=s[a];}},n5e=["horzOverflow","anchorCtr","headers","hideSlicers","slicerCacheId"];o5e="{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}";s5e=40,Zee=s5e*Ir;fZ="{9D8B030D-6E8A-4147-A177-3AD203B41FA5}",l5e="http://schemas.microsoft.com/office/drawing/2014/main";f5e=class cO extends t5e{serializeTableDataToXml(e,n){try{let r=on(e,"a:graphic","a:graphicData"),o=Rt(r,"a:tbl");if(!o)return;i5e(o,n);let i=this.ensureArray(o["a:tr"]),s=this.ensureArray(Rt(o,"a:tblGrid")?.["a:gridCol"]).length,a=n.rows.length,l=n.columnWidths.length;if(a!==i.length||l!==s){d5e(o,n,cO.EMU_PER_PX,this.ensureArray.bind(this));let u=this.ensureArray(o["a:tr"]);for(let d=0;d<n.rows.length;d++){let p=n.rows[d],f=u[d];if(!f)continue;let h=this.ensureArray(f["a:tc"]);for(let m=0;m<p.cells.length;m++){let g=p.cells[m],x=h[m];x&&(g.text!==void 0&&this.writeTableCellText(x,g.text),g.style&&this.writeTableCellStyle(x,g.style),pZ(x,g.extraAttributes));}}return}for(let u=0;u<Math.min(n.rows.length,i.length);u++){let d=n.rows[u],p=i[u];d.height!==void 0&&d.height>0&&(p["@_h"]=String(Math.round(d.height*cO.EMU_PER_PX)));let f=this.ensureArray(p["a:tc"]);for(let h=0;h<Math.min(d.cells.length,f.length);h++){let m=d.cells[h],g=f[h];r5e(g,m),m.text!==void 0&&this.writeTableCellText(g,m.text),m.style&&this.writeTableCellStyle(g,m.style),pZ(g,m.extraAttributes);}}}catch(r){console.warn("Failed to serialize table data:",r);}}pendingChartUpdates;serializeChartDataToXml(e,n){e.chartPartPath&&(this.pendingChartUpdates||(this.pendingChartUpdates=[]),this.pendingChartUpdates.push({chartData:e,slidePath:n}));}async processPendingChartUpdates(){if(!(!this.pendingChartUpdates||this.pendingChartUpdates.length===0)){for(let{chartData:e}of this.pendingChartUpdates){let n=e.chartPartPath;if(!n)continue;let r=this.zip.file(n);if(r)try{let o=await r.async("string"),i=this.parser.parse(o),s=this.xmlLookupService.getChildByLocalName(i,"chartSpace");if(!s)continue;let a=this.xmlLookupService.getChildByLocalName(s,"chart");if(!a)continue;let l=this.xmlLookupService.getChildByLocalName(a,"plotArea");if(!l)continue;let c=Object.keys(l).find(x=>this.compatibilityService.getXmlLocalName(x).endsWith("Chart"));if(!c)continue;let u=l[c];if(!u)continue;let d=this.chartTypeToXmlTag(e.chartType),p=this.compatibilityService.getXmlLocalName(c);if(d&&p!==d){let x=`c:${d}`;l[x]=u,delete l[c],c=x;}let f=Object.keys(u).find(x=>this.compatibilityService.getXmlLocalName(x)==="grouping");e.grouping?f?u[f]["@_val"]=e.grouping:u["c:grouping"]={"@_val":e.grouping}:f&&delete u[f];let h=this.xmlLookupService.getChildrenArrayByLocalName(u,"ser"),m=Object.keys(u).find(x=>this.compatibilityService.getXmlLocalName(x)==="ser")??"c:ser",g=Math.min(h.length,e.series.length);for(let x=0;x<g;x++){let v=h[x],S=e.series[x],w=this.xmlLookupService.getChildByLocalName(v,"idx");w&&(w["@_val"]=String(x));let C=this.xmlLookupService.getChildByLocalName(v,"order");C&&(C["@_val"]=String(x));let T=this.xmlLookupService.getChildByLocalName(v,"tx");T&&this.updateChartCacheValues(T,!1,[S.name]);let E=this.xmlLookupService.getChildByLocalName(v,"cat")||this.xmlLookupService.getChildByLocalName(v,"xVal");E&&this.updateChartCacheValues(E,!1,e.categories);let M=this.xmlLookupService.getChildByLocalName(v,"val")||this.xmlLookupService.getChildByLocalName(v,"yVal");if(M&&this.updateChartCacheValues(M,!0,S.values.map(String)),S.color){let P=S.color.replace("#",""),R=this.xmlLookupService.getChildByLocalName(v,"spPr");if(R){let k=Object.keys(R).find(L=>this.compatibilityService.getXmlLocalName(L)==="solidFill")??"a:solidFill";R[k]={"a:srgbClr":{"@_val":P}};}else {let k=Object.keys(v).find(L=>this.compatibilityService.getXmlLocalName(L)==="spPr")??"c:spPr";v[k]={"a:solidFill":{"a:srgbClr":{"@_val":P}}};}}S.trendlines!==void 0&&sDe(v,S.trendlines,P=>this.compatibilityService.getXmlLocalName(P)),S.errBars!==void 0&&YNe(v,S.errBars,P=>this.compatibilityService.getXmlLocalName(P)),S.marker!==void 0&&eDe(v,S.marker,P=>this.compatibilityService.getXmlLocalName(P)),S.dataPoints!==void 0&&WNe(v,S.dataPoints,P=>this.compatibilityService.getXmlLocalName(P));}if(e.series.length>h.length){let x=h.length>0?h[h.length-1]:void 0,v=[];for(let w=h.length;w<e.series.length;w++){let C=e.series[w],T=this.buildNewSeriesXml(w,C,e.categories,x);v.push(T);}let S=Array.isArray(u[m])?u[m]:u[m]?[u[m]]:[];u[m]=[...S,...v];}if(e.series.length<h.length){let x=Array.isArray(u[m])?u[m]:u[m]?[u[m]]:[];u[m]=x.slice(0,e.series.length),e.series.length===1&&(u[m]=u[m][0]);}if(e.series.some(x=>x.seriesChartType!==void 0)&&FNe(l,c,e.series,e.chartType,x=>this.compatibilityService.getXmlLocalName(x)),e.title!==void 0){let x=this.xmlLookupService.getChildByLocalName(a,"title");x&&this.replaceFirstTextValue(x,"t",e.title);}if(e.externalData?.autoUpdate!==void 0){let x=this.xmlLookupService.getChildByLocalName(s,"externalData");if(x){let v=this.xmlLookupService.getChildByLocalName(x,"autoUpdate");v&&(v["@_val"]=e.externalData.autoUpdate?"1":"0"),x["@_autoUpdate"]!==void 0&&(x["@_autoUpdate"]=e.externalData.autoUpdate?"1":"0");}}if(e.pivotSource){let x=this.xmlLookupService.getChildByLocalName(s,"pivotSource");if(x){let v=this.xmlLookupService.getChildByLocalName(x,"name");if(v&&(v["#text"]=e.pivotSource.name),e.pivotSource.formatId!==void 0){let S=this.xmlLookupService.getChildByLocalName(x,"fmtId");S&&(S["@_val"]=String(e.pivotSource.formatId));}}else {let v={"c:name":{"#text":e.pivotSource.name}};e.pivotSource.formatId!==void 0&&(v["c:fmtId"]={"@_val":String(e.pivotSource.formatId)}),s["c:pivotSource"]=v;}}if(e.plotVisibleOnly!==void 0){let x=this.xmlLookupService.getChildByLocalName(a,"plotVisOnly"),v=e.plotVisibleOnly?"1":"0";x?x["@_val"]=v:a["c:plotVisOnly"]={"@_val":v};}if(e.ofPieOptions&&this.applyOfPieOptions(u,e.ofPieOptions),e.view3D&&this.applyView3D(a,e.view3D),e.chartChrome&&this.applyChartChrome(a,e.chartChrome),e.style&&KNe(a,e.style,x=>this.compatibilityService.getXmlLocalName(x)),e.style&&ONe(l,e.style,x=>this.compatibilityService.getXmlLocalName(x)),e.axes){let x=["valAx","catAx","dateAx","serAx"];for(let v of x){let S=this.xmlLookupService.getChildrenArrayByLocalName(l,v);for(let w of S){let C=this.xmlLookupService.getChildByLocalName(w,"axId"),T=C?parseInt(String(C["@_val"]),10):void 0,E=e.axes.find(P=>P.axisId!==void 0&&P.axisId===T);if(!E)continue;let M=this.xmlLookupService.getChildByLocalName(w,"scaling");if(M){if(E.logBase!==void 0&&E.logBase>0){let P=Object.keys(M).find(R=>this.compatibilityService.getXmlLocalName(R)==="logBase");P?M[P]["@_val"]=String(E.logBase):M["c:logBase"]={"@_val":String(E.logBase)};}else if(E.logScale===!1){let P=Object.keys(M).find(R=>this.compatibilityService.getXmlLocalName(R)==="logBase");P&&delete M[P];}this.upsertChartAxisChild(M,"min",E.min!==void 0?String(E.min):void 0),this.upsertChartAxisChild(M,"max",E.max!==void 0?String(E.max):void 0);}if(E.numFmt){let P=Object.keys(w).find(k=>this.compatibilityService.getXmlLocalName(k)==="numFmt"),R={"@_formatCode":E.numFmt.formatCode,"@_sourceLinked":E.numFmt.sourceLinked?"1":"0"};P?w[P]=R:w["c:numFmt"]=R;}if(this.upsertChartAxisChild(w,"majorUnit",E.majorUnit!==void 0?String(E.majorUnit):void 0),this.upsertChartAxisChild(w,"minorUnit",E.minorUnit!==void 0?String(E.minorUnit):void 0),E.tickLblPos!==void 0){let P=Object.keys(w).find(R=>this.compatibilityService.getXmlLocalName(R)==="tickLblPos");P?w[P]["@_val"]=E.tickLblPos:w["c:tickLblPos"]={"@_val":E.tickLblPos};}ANe(w,E.titleText,P=>this.compatibilityService.getXmlLocalName(P)),INe(w,{fontFamily:E.fontFamily,fontSize:E.fontSize,fontBold:E.fontBold,fontColor:E.fontColor},P=>this.compatibilityService.getXmlLocalName(P)),TNe(w,E,P=>this.compatibilityService.getXmlLocalName(P)),(v==="valAx"||v==="dateAx")&&SNe(w,E,P=>this.compatibilityService.getXmlLocalName(P));}}}this.zip.file(n,this.builder.build(i));}catch(o){console.warn(`[pptx-save] Failed to serialize chart data for ${n}:`,o);}}this.pendingChartUpdates=void 0;}}upsertChartAxisChild(e,n,r){bAe(e,n,r,o=>this.compatibilityService.getXmlLocalName(o));}updateChartCacheValues(e,n,r){let o=n?"numRef":"strRef",i=n?"numLit":"strLit",s=n?"numCache":"strCache",a=this.xmlLookupService.getChildByLocalName(e,o)||this.xmlLookupService.getChildByLocalName(e,i);if(!a)return;let l=this.xmlLookupService.getChildByLocalName(a,s)||a;if(!l)return;let c=this.xmlLookupService.getChildByLocalName(l,"ptCount");c&&(c["@_val"]=String(r.length));let u=Object.keys(l).find(d=>this.compatibilityService.getXmlLocalName(d)==="pt");u&&(l[u]=SB(r));}replaceFirstTextValue(e,n,r){return aO(e,n,r,o=>this.compatibilityService.getXmlLocalName(o))}upsertValChild(e,n,r){let o=this.xmlLookupService.getChildByLocalName(e,n),i=Object.keys(e).find(s=>this.compatibilityService.getXmlLocalName(s)===n);if(r===void 0){i&&delete e[i];return}o&&i?e[i]={...o,"@_val":r}:e[`c:${n}`]={"@_val":r};}applyOfPieOptions(e,n){this.upsertValChild(e,"ofPieType",n.ofPieType),this.upsertValChild(e,"splitType",n.splitType),this.upsertValChild(e,"splitPos",n.splitPos!==void 0?String(n.splitPos):void 0),this.upsertValChild(e,"secondPieSize",n.secondPieSize!==void 0?String(n.secondPieSize):void 0),this.upsertValChild(e,"gapWidth",n.gapWidth!==void 0?String(n.gapWidth):void 0);let r=Object.keys(e).find(o=>this.compatibilityService.getXmlLocalName(o)==="serLines");n.serLines?r||(e["c:serLines"]={}):n.serLines===false&&r&&delete e[r],n.custSplit&&n.custSplit.length>0&&(e["c:custSplit"]={"c:secondPiePt":n.custSplit.map(o=>({"@_val":String(o)}))});}applyView3D(e,n){let r={};n.rotX!==void 0&&(r["c:rotX"]={"@_val":String(n.rotX)}),n.hPercent!==void 0&&(r["c:hPercent"]={"@_val":String(n.hPercent)}),n.rotY!==void 0&&(r["c:rotY"]={"@_val":String(n.rotY)}),n.depthPercent!==void 0&&(r["c:depthPercent"]={"@_val":String(n.depthPercent)}),n.rAngAx!==void 0&&(r["c:rAngAx"]={"@_val":n.rAngAx?"1":"0"}),n.perspective!==void 0&&(r["c:perspective"]={"@_val":String(n.perspective)});let o=Object.keys(e).find(i=>this.compatibilityService.getXmlLocalName(i)==="view3D");if(Object.keys(r).length===0){o&&delete e[o];return}o?e[o]=r:e["c:view3D"]=r;}applyChartChrome(e,n){n.autoTitleDeleted!==void 0&&this.upsertValChild(e,"autoTitleDeleted",n.autoTitleDeleted?"1":"0"),n.dispBlanksAs!==void 0&&this.upsertValChild(e,"dispBlanksAs",n.dispBlanksAs),n.showDLblsOverMax!==void 0&&this.upsertValChild(e,"showDLblsOverMax",n.showDLblsOverMax?"1":"0");}chartTypeToXmlTag(e){return {bar:"barChart",bar3D:"bar3DChart",line:"lineChart",line3D:"line3DChart",pie:"pieChart",pie3D:"pie3DChart",ofPie:"ofPieChart",doughnut:"doughnutChart",area:"areaChart",area3D:"area3DChart",scatter:"scatterChart",bubble:"bubbleChart",radar:"radarChart",stock:"stockChart",surface:"surfaceChart"}[e]}buildNewSeriesXml(e,n,r,o){if(o){let a=JSON.parse(JSON.stringify(o)),l=this.xmlLookupService.getChildByLocalName(a,"idx");l&&(l["@_val"]=String(e));let c=this.xmlLookupService.getChildByLocalName(a,"order");c&&(c["@_val"]=String(e));let u=this.xmlLookupService.getChildByLocalName(a,"tx");u&&this.updateChartCacheValues(u,false,[n.name]);let d=this.xmlLookupService.getChildByLocalName(a,"cat")||this.xmlLookupService.getChildByLocalName(a,"xVal");d&&this.updateChartCacheValues(d,false,r);let p=this.xmlLookupService.getChildByLocalName(a,"val")||this.xmlLookupService.getChildByLocalName(a,"yVal");if(p&&this.updateChartCacheValues(p,true,n.values.map(String)),n.color){let f=this.xmlLookupService.getChildByLocalName(a,"spPr");if(f){let h=Object.keys(f).find(m=>this.compatibilityService.getXmlLocalName(m)==="solidFill");h?f[h]={"a:srgbClr":{"@_val":n.color.replace("#","")}}:f["a:solidFill"]={"a:srgbClr":{"@_val":n.color.replace("#","")}};}}return a}let i=(n.color||"#4472C4").replace("#","");return {"c:idx":{"@_val":String(e)},"c:order":{"@_val":String(e)},"c:tx":{"c:strRef":{"c:strCache":{"c:ptCount":{"@_val":"1"},"c:pt":{"@_idx":"0","c:v":n.name}}}},"c:spPr":{"a:solidFill":{"a:srgbClr":{"@_val":i}}},"c:cat":{"c:strRef":{"c:strCache":{"c:ptCount":{"@_val":String(r.length)},"c:pt":SB(r)}}},"c:val":{"c:numRef":{"c:numCache":{"c:formatCode":"General","c:ptCount":{"@_val":String(n.values.length)},"c:pt":SB(n.values.map(String))}}}}}};ete=new Set(["doc","pres","parTrans","sibTrans"]);S5e=class dO extends f5e{pendingSmartArtUpdates;serializeSmartArtDataToXml(e,n){e.smartArtData?.dataRelId&&(this.pendingSmartArtUpdates||(this.pendingSmartArtUpdates=[]),this.pendingSmartArtUpdates.push({element:e,slidePath:n}));}async processPendingSmartArtUpdates(){if(!(!this.pendingSmartArtUpdates||this.pendingSmartArtUpdates.length===0)){for(let{element:e,slidePath:n}of this.pendingSmartArtUpdates){let r=e.smartArtData;if(!r?.dataRelId)continue;let o=n&&n.length>0?n:this.findSlidePathForElement(e);if(!o)continue;let s=this.slideRelsMap.get(o)?.get(r.dataRelId);if(!s)continue;let a=this.resolveImagePath(o,s),l=await this.zip.file(a)?.async("string");if(l)try{let c=this.parser.parse(l),u=this.xmlLookupService.getChildByLocalName(c,"dataModel");if(!u)continue;let d=Object.keys(u).find(p=>this.compatibilityService.getXmlLocalName(p)==="ptLst");if(d){let p=u[d],f=Object.keys(p||{}).find(h=>this.compatibilityService.getXmlLocalName(h)==="pt");if(f){let h=this.ensureArray(p[f]);p[f]=b5e(h,r.nodes);}}if(r.connections&&r.connections.length>0){let p=Object.keys(u).find(f=>this.compatibilityService.getXmlLocalName(f)==="cxnLst");if(p){let f=u[p],h=Object.keys(f||{}).find(m=>this.compatibilityService.getXmlLocalName(m)==="cxn");h&&(f[h]=v5e(r.connections));}}h5e(u,r.chrome,p=>this.compatibilityService.getXmlLocalName(p)),this.zip.file(a,this.builder.build(c));}catch(c){console.warn(`Failed to save SmartArt data at ${a}:`,c);}}this.pendingSmartArtUpdates=void 0;}}findSlidePathForElement(e){for(let[n]of this.slideRelsMap)if(this.slideMap.has(n))return n;return this.orderedSlidePaths[0]}async applyNotesMasterChanges(e){if(!e)return;let n=this.zip.file(e.path);if(n)try{let r=await n.async("string"),o=this.parser.parse(r),i=o?.["p:notesMaster"];if(!i)return;let s=i["p:cSld"]||{};if(e.backgroundColor){let a=e.backgroundColor.replace("#","");s["p:bg"]={"p:bgPr":{"a:solidFill":{"a:srgbClr":{"@_val":a}},"a:effectLst":{}}};}i["p:cSld"]=s,o["p:notesMaster"]=i,this.zip.file(e.path,this.builder.build(o));}catch(r){console.warn("Failed to save notes master changes:",r);}}async applyHandoutMasterChanges(e){if(!e)return;let n=this.zip.file(e.path);if(n)try{let r=await n.async("string"),o=this.parser.parse(r),i=o?.["p:handoutMaster"];if(!i)return;let s=i["p:cSld"]||{};if(e.backgroundColor){let a=e.backgroundColor.replace("#","");s["p:bg"]={"p:bgPr":{"a:solidFill":{"a:srgbClr":{"@_val":a}},"a:effectLst":{}}};}i["p:cSld"]=s,o["p:handoutMaster"]=i,this.zip.file(e.path,this.builder.build(o));}catch(r){console.warn("Failed to save handout master changes:",r);}}async applyTagCollectionChanges(e){if(!(!e||e.length===0)){for(let n of e)if(!(!n.path||n.tags.length===0))try{let o={"p:tagLst":{"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","@_xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","p:tag":n.tags.map(i=>({"@_name":i.name,"@_val":i.value}))}};this.zip.file(n.path,this.builder.build(o));}catch(r){console.warn(`Failed to save tag collection at ${n.path}:`,r);}}}applyCustomXmlPartsPreservation(){if(this.customXmlParts.length===0)return;let e=/^[A-Za-z0-9_-]+$/u,n=1;for(let r of this.customXmlParts){let o=String(r.id),i=e.test(o)?o:String(n++);this.zip.file(`customXml/item${i}.xml`,r.data),r.properties&&this.zip.file(`customXml/itemProps${i}.xml`,r.properties),r.rels&&this.zip.file(`customXml/_rels/item${i}.xml.rels`,r.rels);}}applyThumbnailPreservation(){if(!this.thumbnailData)return;let e=["docProps/thumbnail.jpeg","docProps/thumbnail.jpg","docProps/thumbnail.png","docProps/thumbnail.emf"],n="docProps/thumbnail.jpeg";for(let r of e)if(this.zip.file(r)){n=r;break}this.zip.file(n,this.thumbnailData);}async applyVbaProjectPreservation(){if(this.vbaProjectBin){this.zip.file("ppt/vbaProject.bin",this.vbaProjectBin);for(let[e,n]of this.vbaRelatedParts)this.zip.file(e,n);}}async applyOutputFormatOverrides(e){if(e==="pptx")return;let n=this.vbaProjectBin!==null,r=await this.zip.file("[Content_Types].xml")?.async("string");if(r){let o=this.parser.parse(r);this.contentTypesBuilder.applyOutputFormatOverride(o,e,n),this.zip.file("[Content_Types].xml",this.builder.build(o));}e==="pptm"&&n&&await this.ensureVbaRelationship();}static FONT_REL_TYPE="http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";static FNTDATA_CONTENT_TYPE="application/x-fontdata";async applyEmbeddedFontPreservation(e){let r=(e??this.loadedEmbeddedFonts).filter(m=>m.rawFontData&&m.rawFontData.length>0);if(r.length===0)return;let o=new Map;for(let m of r){let g=o.get(m.name)??[];g.push(m),o.set(m.name,g);}let i="ppt/_rels/presentation.xml.rels",s=await this.zip.file(i)?.async("string");if(!s||!this.presentationData)return;let a=this.parser.parse(s),l=a?.Relationships??{},c=this.ensureArray(l.Relationship),u=0;for(let m of c){let g=String(m?.["@_Id"]||""),x=parseInt(g.replace(/^rId/u,""),10);Number.isFinite(x)&&x>u&&(u=x);}let d=new Set;for(let m of c)String(m?.["@_Type"]||"").includes("/font")&&d.add(String(m?.["@_Target"]||""));let p=[];for(let[m,g]of o){let x={"p:font":{"@_typeface":m}};for(let v of g){let S=v.rawFontData,w=!!(v.originalRId&&v.partPath),C=w&&!!v.fontGuid,T=w&&!v.fontGuid&&!!v.originalPartBytes,E,M,P,R,k,L;if(C)E=v.fontGuid,M=v.partPath,P=M.startsWith("ppt/")?M.substring(4):M,R=v.originalRId,k=HB(S,E),L=`{${E}}`;else if(T)E="",M=v.partPath,P=M.startsWith("ppt/")?M.substring(4):M,R=v.originalRId,k=v.originalPartBytes,L=void 0;else {E=v.fontGuid??wQ();let N=`{${E}}.fntdata`;M=`ppt/fonts/${N}`,P=`fonts/${N}`,k=HB(S,E),L=`{${E}}`;let B=c.find(O=>String(O?.["@_Target"]||"")===P);B?R=String(B["@_Id"]):(u++,R=`rId${u}`,c.push({"@_Id":R,"@_Type":dO.FONT_REL_TYPE,"@_Target":P}));}this.zip.file(M,k);let D=v.bold&&v.italic?"p:boldItalic":v.bold?"p:bold":v.italic?"p:italic":"p:regular",U={"@_r:id":R};L&&(U["@_fontKey"]=L),x[D]=U;}p.push(x);}l.Relationship=c,a.Relationships=l,this.zip.file(i,this.builder.build(a));let f=this.presentationData["p:presentation"];f&&(f["p:embeddedFontLst"]={"p:embeddedFont":p.length===1?p[0]:p});let h=await this.zip.file("[Content_Types].xml")?.async("string");if(h){let m=this.parser.parse(h),g=m.Types||{},x=Array.isArray(g.Default)?g.Default:g.Default?[g.Default]:[];x.some(S=>String(S?.["@_Extension"]||"").toLowerCase()==="fntdata")||x.push({"@_Extension":"fntdata","@_ContentType":dO.FNTDATA_CONTENT_TYPE}),g.Default=x,m.Types=g,this.zip.file("[Content_Types].xml",this.builder.build(m));}}async ensureVbaRelationship(){let e="ppt/_rels/presentation.xml.rels",n=await this.zip.file(e)?.async("string");if(!n)return;let r=this.parser.parse(n),o=r?.Relationships??{},i=this.ensureArray(o.Relationship),s="http://schemas.microsoft.com/office/2006/relationships/vbaProject";if(i.some(c=>String(c?.["@_Type"]||"")===s))return;let l=0;for(let c of i){let u=String(c?.["@_Id"]||""),d=parseInt(u.replace(/^rId/u,""),10);Number.isFinite(d)&&d>l&&(l=d);}i.push({"@_Id":`rId${l+1}`,"@_Type":s,"@_Target":"vbaProject.bin"}),o.Relationship=i,r.Relationships=o,this.zip.file(e,this.builder.build(r));}async convertZipToStrictConformance(){let e=[];this.zip.forEach(o=>{(o.endsWith(".xml")||o.endsWith(".rels"))&&e.push(o);});let n=this._originalParser||this.parser,r=typeof n.parse=="function"?n.parse.bind(n):this.parser.parse.bind(this.parser);for(let o of e){let i=this.zip.file(o);if(!i)continue;let s=await i.async("string");if(s.trim())try{let a=r(s);if(typeof a!="object"||a===null)continue;wA(a,o==="ppt/presentation.xml"),this.zip.file(o,this.builder.build(a));}catch{}}}},w5e=class extends S5e{async applyPresentationPropertiesPart(t){if(!t)return;let e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string"),n="ppt/presProps.xml";if(e)try{let l=this.parser.parse(e),u=this.ensureArray(l?.Relationships?.Relationship).find(d=>{let p=String(d?.["@_Type"]||""),f=String(d?.["@_Target"]||"");return p.includes("presProps")||f.includes("presProps")});if(u){let d=String(u["@_Target"]||"").trim();if(d.length>0){let p=xA("ppt",d);p!==null&&(n=p);}}}catch{}let r=await this.zip.file(n)?.async("string"),o=r?this.parser.parse(r):{"p:presentationPr":{"@_xmlns:p":"http://schemas.openxmlformats.org/presentationml/2006/main","@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"}},i=o["p:presentationPr"]||{},s=i["p:showPr"]||{},a={};for(let l of Object.keys(s))l.startsWith("@_")&&(a[l]=s[l]);if(t.loopContinuously!==void 0&&(a["@_loop"]=t.loopContinuously?"1":"0"),t.showWithNarration!==void 0&&(a["@_showNarration"]=t.showWithNarration?"1":"0"),t.showWithAnimation!==void 0&&(a["@_showAnimation"]=t.showWithAnimation?"1":"0"),t.advanceMode!==void 0&&(a["@_useTimings"]=t.advanceMode==="useTimings"?"1":"0"),t.showType==="browsed")a["p:browse"]={};else if(t.showType==="kiosk"){let l={};t.kioskRestartTime!==void 0&&t.kioskRestartTime>0&&(l["@_restart"]=String(t.kioskRestartTime)),a["p:kiosk"]=l;}else a["p:present"]={};if(t.showSlidesMode==="range"?a["p:sldRg"]={"@_st":String(t.showSlidesFrom??1),"@_end":String(t.showSlidesTo??1)}:t.showSlidesMode==="customShow"&&t.showSlidesCustomShowId?a["p:custShow"]={"@_id":t.showSlidesCustomShowId}:a["p:sldAll"]={},t.penColor?a["p:penClr"]={"a:srgbClr":{"@_val":t.penColor.replace("#","")}}:s["p:penClr"]!==void 0&&(a["p:penClr"]=s["p:penClr"]),s["p:extLst"]!==void 0&&(a["p:extLst"]=s["p:extLst"]),i["p:showPr"]=a,t.printFrameSlides!==void 0||t.printSlidesPerPage!==void 0||t.printColorMode!==void 0){let l=i["p:prnPr"]||{};t.printFrameSlides!==void 0&&(l["@_frameSlides"]=t.printFrameSlides?"1":"0"),t.printSlidesPerPage!==void 0&&(l["@_sldPerPg"]=String(t.printSlidesPerPage)),t.printColorMode!==void 0&&(l["@_clrMode"]=t.printColorMode),i["p:prnPr"]=l;}t.mruColors&&t.mruColors.length>0&&(i["p:clrMru"]={"a:srgbClr":t.mruColors.map(l=>({"@_val":l.replace("#","")}))}),t.gridSpacing&&(i["p:gridSpacing"]={"@_cx":String(t.gridSpacing.cx),"@_cy":String(t.gridSpacing.cy)}),o["p:presentationPr"]=i,this.zip.file(n,this.builder.build(o));}async stripDigitalSignatures(){if(!this.signatureDetection?.hasSignatures)return;let t=[];this.zip.forEach(o=>{t.push(o);});let e=xQ(t);for(let o of e)this.zip.remove(o);let n=await this.zip.file("_rels/.rels")?.async("string");if(n){let o=this.parser.parse(n),i=o?.Relationships??{},s=this.ensureArray(i.Relationship),a=s.filter(l=>String(l?.["@_Type"]||"")!==pQ);a.length!==s.length&&(i.Relationship=a,o.Relationships=i,this.zip.file("_rels/.rels",this.builder.build(o)));}let r=await this.zip.file("[Content_Types].xml")?.async("string");if(r){let o=this.parser.parse(r),i=o?.Types??{},s=this.ensureArray(i.Override),a=s.filter(l=>!String(l?.["@_PartName"]||"").startsWith("/_xmlsignatures/"));a.length!==s.length&&(i.Override=a,o.Types=i,this.zip.file("[Content_Types].xml",this.builder.build(o)));}this.signatureDetection=null;}},C5e=class extends w5e{collectMediaElements(t,e){for(let n of t)n.type==="media"?e.push(n):n.type==="group"&&Array.isArray(n.children)&&this.collectMediaElements(n.children,e);}getShapeIdFromRawXml(t){if(!t)return;let n=(t["p:nvSpPr"]?.["p:cNvPr"]||t["p:nvPicPr"]?.["p:cNvPr"]||t["p:nvCxnSpPr"]?.["p:cNvPr"]||t["p:nvGraphicFramePr"]?.["p:cNvPr"])?.["@_id"];if(n==null)return;let r=String(n).trim();return r.length>0?r:void 0}applyMediaTimingToTimingTree(t,e){for(let r of ["p:video","p:audio"])this.ensureArray(t[r]).forEach(i=>{let s=i["p:cMediaNode"];if(!s)return;let l=s["p:tgtEl"]?.["p:spTgt"],c=l?.["@_spid"]!==void 0?String(l["@_spid"]).trim():"";if(c.length===0)return;let u=e.get(c);if(!u)return;let d=s["p:cTn"];d||(d={},s["p:cTn"]=d),u.trimStartMs!==void 0&&Number.isFinite(u.trimStartMs)&&u.trimStartMs>=0?d["@_st"]=String(Math.round(u.trimStartMs)):delete d["@_st"],u.trimEndMs!==void 0&&Number.isFinite(u.trimEndMs)&&u.trimEndMs>=0?d["@_end"]=String(Math.round(u.trimEndMs)):delete d["@_end"],u.loop?d["@_repeatCount"]="indefinite":delete d["@_repeatCount"],u.autoPlay?d["@_nodeType"]="1":delete d["@_nodeType"],u.playAcrossSlides&&r==="p:audio"?d["@_dur"]="indefinite":u.playAcrossSlides||String(d["@_dur"])==="indefinite"&&delete d["@_dur"],u.fullScreen?s["@_fullScrn"]="1":delete s["@_fullScrn"],u.volume!==void 0&&Number.isFinite(u.volume)&&(s["@_vol"]=String(Math.round(u.volume*1e5))),u.hideWhenNotPlaying?s["@_showWhenStopped"]="0":delete s["@_showWhenStopped"];let p=u.fadeInDuration!==void 0&&u.fadeInDuration>0||u.fadeOutDuration!==void 0&&u.fadeOutDuration>0,f=u.playbackSpeed!==void 0&&u.playbackSpeed!==1,h=u.bookmarks!==void 0&&u.bookmarks.length>0;if(p||f||h){let m=i["p:extLst"];m||(m={},i["p:extLst"]=m);let g=Array.isArray(m["p:ext"])?m["p:ext"]:m["p:ext"]?[m["p:ext"]]:[];if(p||f){let x=g.find(S=>S["p14:media"]!==void 0);x||(x={"@_uri":"{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}"},g.push(x));let v=x["p14:media"];if(v||(v={},x["p14:media"]=v),p){let S={};u.fadeInDuration!==void 0&&u.fadeInDuration>0&&(S["@_in"]=String(Math.round(u.fadeInDuration*1e3))),u.fadeOutDuration!==void 0&&u.fadeOutDuration>0&&(S["@_out"]=String(Math.round(u.fadeOutDuration*1e3))),v["p14:fade"]=S;}f&&u.playbackSpeed!==void 0?v["@_spd"]=String(Math.round(u.playbackSpeed*1e5)):delete v["@_spd"];}if(h&&u.bookmarks){let x=g.find(v=>v["p14:bmkLst"]!==void 0);x||(x={"@_uri":"{C809E50D-3E49-4677-B9B1-B2B30C8E0B5F}"},g.push(x)),x["p14:bmkLst"]={"p14:bmk":u.bookmarks.map(v=>({"@_name":v.label,"@_time":String(Math.round(v.time*1e3))}))};}m["p:ext"]=g.length===1?g[0]:g;}});let n=t["p:cTn"];if(n){let r=n["p:childTnLst"];if(r){for(let o of ["p:par","p:seq","p:excl"])this.ensureArray(r[o]).forEach(s=>{this.applyMediaTimingToTimingTree(s,e);});this.applyMediaTimingToTimingTree(r,e);}}for(let r of ["p:par","p:seq","p:excl","p:tnLst"])this.ensureArray(t[r]).forEach(i=>{this.applyMediaTimingToTimingTree(i,e);});}applyMediaTimingToRawTiming(t,e){let n=[];if(this.collectMediaElements(e,n),n.length===0)return;let r=new Map;n.forEach(o=>{let i=this.getShapeIdFromRawXml(o.rawXml);i&&r.set(i,o);}),r.size!==0&&this.applyMediaTimingToTimingTree(t,r);}},T5e=class extends C5e{deduplicateExtensionLists(t){if(t==null||typeof t!="object")return;if(Array.isArray(t)){for(let n of t)this.deduplicateExtensionLists(n);return}let e=t;for(let[n,r]of Object.entries(e)){if(this.compatibilityService.getXmlLocalName(n)==="extLst"&&r&&typeof r=="object"){let i=r;for(let s of Object.keys(i)){if(this.compatibilityService.getXmlLocalName(s)!=="ext")continue;let l=i[s];if(!l)continue;let c=(Array.isArray(l)?l:[l]).filter(d=>typeof d=="object"&&d!==null);if(c.length<=1)continue;let u=new Map;for(let d=0;d<c.length;d++){let p=c[d],f=String(p?.["@_uri"]||"").trim();f.length>0&&u.set(f,d);}if(u.size<c.length){let d=new Set(u.values());for(let f=0;f<c.length;f++){let h=c[f];String(h?.["@_uri"]||"").trim().length===0&&d.add(f);}let p=c.filter((f,h)=>d.has(h));i[s]=p.length===1?p[0]:p;}}}this.deduplicateExtensionLists(r);}}applySlideDrawingGuides(t,e){let n=t["p:extLst"];if(n){let r=Object.keys(n).find(o=>this.compatibilityService.getXmlLocalName(o)==="ext");if(r){let o=n[r],i=Array.isArray(o)?o:o?[o]:[],s=i.filter(a=>{let l=String(a["@_uri"]??"");return l!==eC&&l!==_A});s.length!==i.length&&(n[r]=s.length===0?void 0:s.length===1?s[0]:s);}}if(e.guides&&e.guides.length>0){n||(n={},t["p:extLst"]=n);let r=UJ(e.guides),o=Object.keys(n).find(a=>this.compatibilityService.getXmlLocalName(a)==="ext")??"p:ext",i=n[o],s=Array.isArray(i)?i:i?[i]:[];s.push(r),n[o]=s.length===1?s[0]:s;}}resolveLayoutPathForSlide(t){let e=this.slideRelsMap.get(t);if(e)for(let[,n]of e.entries()){if(!n.includes("slideLayout"))continue;let r=t.substring(0,t.lastIndexOf("/")+1),o=xA(r,n);if(o!==null)return o}}resolveMasterPathForLayout(t){let e=this.slideRelsMap.get(t);if(e)for(let[,n]of e.entries()){if(!n.includes("slideMaster"))continue;let r=t.substring(0,t.lastIndexOf("/")+1),o=xA(r,n);if(o!==null)return o}}getTemplateSpTree(t,e){let n=this.resolveLayoutPathForSlide(t);if(!n)return;if(e.startsWith("master-")){let o=this.resolveMasterPathForLayout(n);return o?this.masterXmlMap.get(o)?.["p:sldMaster"]?.["p:cSld"]?.["p:spTree"]:void 0}return this.layoutXmlMap.get(n)?.["p:sldLayout"]?.["p:cSld"]?.["p:spTree"]}isSameShapeIdentity(t,e,n){if(e===n)return true;let r=this.getCnvPrNode(e,t),o=this.getCnvPrNode(n,t),i=String(r?.["@_id"]||""),s=String(o?.["@_id"]||""),a=String(r?.["@_name"]||""),l=String(o?.["@_name"]||"");return !i||!s||i!==s?false:!a||!l?true:a===l}ensureTemplateShapeAttached(t,e,n){let r=this.getTreeBucketKeyForElementType(e),o=this.ensureArray(t[r]);for(let i of o)if(this.isSameShapeIdentity(r,i,n))return i;return o.push(n),t[r]=o,n}},_5e=class tte extends T5e{applyFillAndStroke(e,n){let r=n.fillMode,o=this.buildGradientFillXml(n);if(r==="none"||n.fillColor==="transparent")e["a:noFill"]={},delete e["a:solidFill"],delete e["a:gradFill"],delete e["a:blipFill"];else if(r==="gradient")delete e["a:noFill"],delete e["a:solidFill"],delete e["a:blipFill"],o&&(e["a:gradFill"]=o);else if(r==="pattern"){delete e["a:noFill"],delete e["a:solidFill"],delete e["a:gradFill"],delete e["a:blipFill"];let s={},a=n.fillPatternPreset;a&&(s["@_prst"]=a),n.fillPatternFgClrXml?s["a:fgClr"]=n.fillPatternFgClrXml:n.fillColor&&(s["a:fgClr"]={"a:srgbClr":{"@_val":n.fillColor.replace("#","")}}),n.fillPatternBgClrXml?s["a:bgClr"]=n.fillPatternBgClrXml:n.fillPatternBackgroundColor&&(s["a:bgClr"]={"a:srgbClr":{"@_val":n.fillPatternBackgroundColor.replace("#","")}}),e["a:pattFill"]=s;}else if(r==="solid"||n.fillColor!==void 0){let s=String(n.fillColor||"").trim();if(s.length>0){delete e["a:noFill"],delete e["a:gradFill"],delete e["a:blipFill"];let a=n.fillColorXml?this.parseColor(n.fillColorXml):void 0;e["a:solidFill"]=jw(n.fillColorXml,a,s,n.fillOpacity);}}if(n.strokeColor!==void 0){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"],a=Math.round((n.strokeWidth||1)*tte.EMU_PER_PX);if(s["@_w"]=String(a),n.strokeColor==="transparent"||n.strokeWidth===0)s["a:noFill"]={},delete s["a:solidFill"];else {delete s["a:noFill"];let l=n.strokeColorXml?this.parseColor(n.strokeColorXml):void 0;s["a:solidFill"]=jw(n.strokeColorXml,l,n.strokeColor,n.strokeOpacity);}}if(n.strokeDash!==void 0){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];n.strokeDash==="solid"?(delete s["a:prstDash"],delete s["a:custDash"]):n.strokeDash==="custom"?(delete s["a:prstDash"],n.customDashSegments&&n.customDashSegments.length>0?s["a:custDash"]={"a:ds":n.customDashSegments.map(a=>({"@_d":String(a.dash),"@_sp":String(a.space)}))}:s["a:custDash"]={"a:ds":{"@_d":"200000","@_sp":"200000"}}):(s["a:prstDash"]={"@_val":n.strokeDash},delete s["a:custDash"]);}if(n.connectorEndArrow!==void 0&&(e["a:ln"]||n.connectorEndArrow!=="none")){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];if(n.connectorEndArrow==="none")delete s["a:tailEnd"];else {let a={"@_type":n.connectorEndArrow};n.connectorEndArrowWidth&&(a["@_w"]=n.connectorEndArrowWidth),n.connectorEndArrowLength&&(a["@_len"]=n.connectorEndArrowLength),s["a:tailEnd"]=a;}}if(n.connectorStartArrow!==void 0&&(e["a:ln"]||n.connectorStartArrow!=="none")){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];if(n.connectorStartArrow==="none")delete s["a:headEnd"];else {let a={"@_type":n.connectorStartArrow};n.connectorStartArrowWidth&&(a["@_w"]=n.connectorStartArrowWidth),n.connectorStartArrowLength&&(a["@_len"]=n.connectorStartArrowLength),s["a:headEnd"]=a;}}if(n.lineJoin!==void 0){e["a:ln"]||(e["a:ln"]={});let s=e["a:ln"];if(delete s["a:round"],delete s["a:bevel"],delete s["a:miter"],n.lineJoin==="round")s["a:round"]={};else if(n.lineJoin==="bevel")s["a:bevel"]={};else if(n.lineJoin==="miter"){let a={};typeof n.miterLimit=="number"&&Number.isFinite(n.miterLimit)&&n.miterLimit!==8e5&&(a["@_lim"]=String(Math.round(n.miterLimit))),s["a:miter"]=a;}}n.lineCap!==void 0&&(e["a:ln"]||(e["a:ln"]={}),e["a:ln"]["@_cap"]=n.lineCap),n.compoundLine!==void 0&&(e["a:ln"]||(e["a:ln"]={}),e["a:ln"]["@_cmpd"]=n.compoundLine),n.lineAlignment!==void 0&&(e["a:ln"]||(e["a:ln"]={}),e["a:ln"]["@_algn"]=n.lineAlignment);let i=this.buildLineEffectListXml(n);i&&e["a:ln"]&&(e["a:ln"]["a:effectLst"]=i);}applyShapeStyleRefs(e,n){if(!(n.lnRefIdx!==void 0||n.fillRefIdx!==void 0||n.effectRefIdx!==void 0||n.fontRefIdx!==void 0))return;let i=e["p:style"]??{};if(n.lnRefIdx!==void 0){let a=i["a:lnRef"]??{};a["@_idx"]=String(n.lnRefIdx),this.replaceRefColorChoice(a,n.lnRefColorXml),i["a:lnRef"]=a;}if(n.fillRefIdx!==void 0){let a=i["a:fillRef"]??{};a["@_idx"]=String(n.fillRefIdx),this.replaceRefColorChoice(a,n.fillRefColorXml),i["a:fillRef"]=a;}if(n.effectRefIdx!==void 0){let a=i["a:effectRef"]??{};a["@_idx"]=String(n.effectRefIdx),this.replaceRefColorChoice(a,n.effectRefColorXml),i["a:effectRef"]=a;}if(n.fontRefIdx!==void 0){let a=i["a:fontRef"]??{};a["@_idx"]=n.fontRefIdx,this.replaceRefColorChoice(a,n.fontRefColorXml),i["a:fontRef"]=a;}let s=Wg(i,RMe);for(let a of Object.keys(i))delete i[a];for(let a of Object.keys(s))i[a]=s[a];e["p:style"]=i;}replaceRefColorChoice(e,n){for(let r of ["a:scrgbClr","a:srgbClr","a:hslClr","a:sysClr","a:schemeClr","a:prstClr"])delete e[r];if(n)for(let[r,o]of Object.entries(n))e[r]=o;}},M5e=class extends _5e{applyEffectsAndThreeD(t,e){let n=e.presetShadowName?this.buildPresetShadowXml(e):void 0,r=n?void 0:this.buildOuterShadowXml(e),o=this.buildInnerShadowXml(e),i=this.buildGlowXml(e),s=this.buildSoftEdgeXml(e),a=this.buildReflectionXml(e),l=this.buildBlurXml(e);if(r||n||o||i||s||a||l){let u=t["a:effectLst"]||{};n?(u["a:prstShdw"]=n,delete u["a:outerShdw"]):r&&(u["a:outerShdw"]=r,delete u["a:prstShdw"]),o&&(u["a:innerShdw"]=o),i&&(u["a:glow"]=i),s&&(u["a:softEdge"]=s),a&&(u["a:reflection"]=a),l&&(u["a:blur"]=l),t["a:effectLst"]=Wg(u,AB);}else {let u=t["a:effectLst"];u&&(e.shadowColor!==void 0&&!r&&!n&&(delete u["a:outerShdw"],delete u["a:prstShdw"]),e.innerShadowColor!==void 0&&!o&&delete u["a:innerShdw"],e.glowColor!==void 0&&!i&&delete u["a:glow"],e.softEdgeRadius!==void 0&&!s&&delete u["a:softEdge"],e.reflectionBlurRadius!==void 0&&!a&&delete u["a:reflection"],e.blurRadius!==void 0&&!l&&delete u["a:blur"],Object.keys(u).length===0?delete t["a:effectLst"]:t["a:effectLst"]=Wg(u,AB));}if(e.effectDagXml&&(t["a:effectDag"]=e.effectDagXml),e.scene3d){let u=e.scene3d;if(u.cameraPreset||u.lightRigType){let p={};if(u.cameraPreset&&(p["@_prst"]=u.cameraPreset),u.cameraRotX!==void 0||u.cameraRotY!==void 0||u.cameraRotZ!==void 0){let m={};u.cameraRotX!==void 0&&(m["@_lat"]=String(u.cameraRotX)),u.cameraRotY!==void 0&&(m["@_lon"]=String(u.cameraRotY)),u.cameraRotZ!==void 0&&(m["@_rev"]=String(u.cameraRotZ)),p["a:rot"]=m;}let f={};u.lightRigType&&(f["@_rig"]=u.lightRigType),u.lightRigDirection&&(f["@_dir"]=u.lightRigDirection);let h={};if(h["a:camera"]=p,Object.keys(f).length>0&&(h["a:lightRig"]=f),u.hasBackdrop){let m={};(u.backdropAnchorX!==void 0||u.backdropAnchorY!==void 0||u.backdropAnchorZ!==void 0)&&(m["a:anchor"]={"@_x":String(u.backdropAnchorX??0),"@_y":String(u.backdropAnchorY??0),"@_z":String(u.backdropAnchorZ??0)}),h["a:backdrop"]=m;}t["a:scene3d"]=h;}else delete t["a:scene3d"];}else e.scene3d===void 0&&delete t["a:scene3d"];if(e.shape3d){let u=e.shape3d;if(u.extrusionHeight!==void 0||u.contourWidth!==void 0||u.presetMaterial||u.bevelTopType||u.bevelBottomType||u.extrusionColor||u.contourColor){let p={};if(u.extrusionHeight!==void 0&&(p["@_extrusionH"]=String(u.extrusionHeight)),u.contourWidth!==void 0&&(p["@_contourW"]=String(u.contourWidth)),u.presetMaterial&&(p["@_prstMaterial"]=u.presetMaterial),u.bevelTopType){let f={"@_prst":u.bevelTopType};u.bevelTopWidth!==void 0&&(f["@_w"]=String(u.bevelTopWidth)),u.bevelTopHeight!==void 0&&(f["@_h"]=String(u.bevelTopHeight)),p["a:bevelT"]=f;}if(u.bevelBottomType){let f={"@_prst":u.bevelBottomType};u.bevelBottomWidth!==void 0&&(f["@_w"]=String(u.bevelBottomWidth)),u.bevelBottomHeight!==void 0&&(f["@_h"]=String(u.bevelBottomHeight)),p["a:bevelB"]=f;}u.extrusionColor&&(p["a:extrusionClr"]={"a:srgbClr":{"@_val":u.extrusionColor}}),u.contourColor&&(p["a:contourClr"]={"a:srgbClr":{"@_val":u.contourColor}}),t["a:sp3d"]=p;}else delete t["a:sp3d"];}else e.shape3d===void 0&&delete t["a:sp3d"];}},E5e=class nb extends M5e{applyTextBodyContent(e,n,r,o){if(!(typeof n.text=="string"||(n.textSegments?.length??0)>0))return;e["p:txBody"]||(e["p:txBody"]={"a:bodyPr":{},"a:lstStyle":{},"a:p":[]});let s=e["p:txBody"],a=s["a:bodyPr"]||{},l=this.textVerticalAlignToDrawingValue(n.textStyle?.vAlign);l?a["@_anchor"]=l:delete a["@_anchor"];let c=this.textDirectionToDrawingValue(n.textStyle?.textDirection);c?a["@_vert"]=c:delete a["@_vert"];let u=this.normalizeTextColumnCount(n.textStyle?.columnCount);if(u&&u>1?a["@_numCol"]=String(u):delete a["@_numCol"],n.textStyle?.columnSpacing!==void 0&&(a["@_spcCol"]=String(Math.round(n.textStyle.columnSpacing*nb.EMU_PER_PX))),n.textStyle?.hOverflow&&(a["@_horzOverflow"]=n.textStyle.hOverflow,delete a["@_hOverflow"]),n.textStyle?.vertOverflow&&(a["@_vertOverflow"]=n.textStyle.vertOverflow),this.applyAutoFitToBodyPr(a,n),this.applyBodyInsets(a,n),n.textStyle?.textWrap==="none"?a["@_wrap"]="none":n.textStyle?.textWrap==="square"&&(a["@_wrap"]="square"),$Q(a,n.textStyle),n.textStyle?.textWarpPreset){let f={"@_prst":n.textStyle.textWarpPreset},h=[];n.textStyle.textWarpAdj!==void 0&&Number.isFinite(n.textStyle.textWarpAdj)&&h.push({"@_name":"adj","@_fmla":`val ${n.textStyle.textWarpAdj}`}),n.textStyle.textWarpAdj2!==void 0&&Number.isFinite(n.textStyle.textWarpAdj2)&&h.push({"@_name":"adj2","@_fmla":`val ${n.textStyle.textWarpAdj2}`}),h.length>0&&(f["a:avLst"]={"a:gd":h.length===1?h[0]:h}),a["a:prstTxWarp"]=f;}else delete a["a:prstTxWarp"];this.applyText3d(a,n),n.linkedTxbxId!==void 0&&Number.isFinite(n.linkedTxbxId)?a["a:linkedTxbx"]={"@_id":String(n.linkedTxbxId),"@_seq":String(n.linkedTxbxSeq??0)}:delete a["a:linkedTxbx"];let d=this.getTextValueForSave(n.text,n.textSegments),p=n.textSegments;if(typeof n.text=="string"&&this.areTextSegmentsUniform(n.textSegments)){p=void 0;let f=this.extractTextSegmentsFromTxBodyForRewrite(s,n.textStyle,o());f.length>1&&this.hasMixedTextStyles(f)&&(p=this.remapEditedTextToExistingStyles(f,d,n.textStyle));}s["a:bodyPr"]=a,s["a:p"]=this.createParagraphsFromTextContent(d,n.textStyle,p,r);}applyAutoFitToBodyPr(e,n){if(n.textStyle?.autoFitMode!==void 0)if(delete e["a:spAutoFit"],delete e["a:normAutofit"],delete e["a:noAutofit"],n.textStyle.autoFitMode==="shrink")e["a:spAutoFit"]={};else if(n.textStyle.autoFitMode==="normal"){let r={};n.textStyle.autoFitFontScale!==void 0&&n.textStyle.autoFitFontScale<1&&(r["@_fontScale"]=String(Math.round(n.textStyle.autoFitFontScale*1e5))),n.textStyle.autoFitLineSpacingReduction!==void 0&&n.textStyle.autoFitLineSpacingReduction>0&&(r["@_lnSpcReduction"]=String(Math.round(n.textStyle.autoFitLineSpacingReduction*1e5))),e["a:normAutofit"]=r;}else n.textStyle.autoFitMode==="none"&&(e["a:noAutofit"]={});else if(n.textStyle?.autoFit){if(!e["a:spAutoFit"]&&!e["a:normAutofit"])if(n.textStyle.autoFitFontScale!==void 0&&n.textStyle.autoFitFontScale<1){let r={"@_fontScale":String(Math.round(n.textStyle.autoFitFontScale*1e5))};n.textStyle.autoFitLineSpacingReduction!==void 0&&n.textStyle.autoFitLineSpacingReduction>0&&(r["@_lnSpcReduction"]=String(Math.round(n.textStyle.autoFitLineSpacingReduction*1e5))),e["a:normAutofit"]=r;}else e["a:spAutoFit"]={};e["a:normAutofit"]&&n.textStyle.autoFitFontScale!==void 0&&(e["a:normAutofit"]["@_fontScale"]=String(Math.round(n.textStyle.autoFitFontScale*1e5)));}else n.textStyle?.autoFit===false&&n.textStyle?.autoFitMode===void 0&&(delete e["a:spAutoFit"],delete e["a:normAutofit"]);}applyBodyInsets(e,n){typeof n.textStyle?.bodyInsetLeft=="number"&&Number.isFinite(n.textStyle.bodyInsetLeft)&&(e["@_lIns"]=String(Math.round(n.textStyle.bodyInsetLeft*nb.EMU_PER_PX))),typeof n.textStyle?.bodyInsetTop=="number"&&Number.isFinite(n.textStyle.bodyInsetTop)&&(e["@_tIns"]=String(Math.round(n.textStyle.bodyInsetTop*nb.EMU_PER_PX))),typeof n.textStyle?.bodyInsetRight=="number"&&Number.isFinite(n.textStyle.bodyInsetRight)&&(e["@_rIns"]=String(Math.round(n.textStyle.bodyInsetRight*nb.EMU_PER_PX))),typeof n.textStyle?.bodyInsetBottom=="number"&&Number.isFinite(n.textStyle.bodyInsetBottom)&&(e["@_bIns"]=String(Math.round(n.textStyle.bodyInsetBottom*nb.EMU_PER_PX)));}applyText3d(e,n){let r=n.textStyle?.text3d;if(r&&Object.keys(r).length>0){let o={};if(r.extrusionHeight&&(o["@_extrusionH"]=String(r.extrusionHeight)),r.presetMaterial&&(o["@_prstMaterial"]=r.presetMaterial),r.bevelTopType&&r.bevelTopType!=="none"){let i={"@_prst":r.bevelTopType};r.bevelTopWidth&&(i["@_w"]=String(r.bevelTopWidth)),r.bevelTopHeight&&(i["@_h"]=String(r.bevelTopHeight)),o["a:bevelT"]=i;}if(r.bevelBottomType&&r.bevelBottomType!=="none"){let i={"@_prst":r.bevelBottomType};r.bevelBottomWidth&&(i["@_w"]=String(r.bevelBottomWidth)),r.bevelBottomHeight&&(i["@_h"]=String(r.bevelBottomHeight)),o["a:bevelB"]=i;}r.extrusionColor&&(o["a:extrusionClr"]={"a:srgbClr":{"@_val":r.extrusionColor.replace("#","")}}),e["a:sp3d"]=o;}else delete e["a:sp3d"];}},P5e=class extends E5e{applyDataSerialization(t,e,n){if(e.type==="table"&&"tableData"in e&&e.tableData&&this.serializeTableDataToXml(t,e.tableData),e.type==="chart"&&"chartData"in e&&e.chartData&&this.serializeChartDataToXml(e.chartData,n),e.type==="smartArt"&&"smartArtData"in e){let r=e;r.smartArtData?.dataRelId&&this.serializeSmartArtDataToXml(r,n);}}applyImageProperties(t,e){if(e.type!=="picture"&&e.type!=="image")return;let n=t["p:blipFill"]||t["p:spPr"]?.["a:blipFill"];this.applyImageCropToBlipFill(n,e),this.applyImageEffectsToBlip(n,e.imageEffects);let r=t?.["p:nvPicPr"]?.["p:cNvPr"];if(r){let o=String(e.altText||"").trim();o.length>0?r["@_descr"]=o:delete r["@_descr"];}}applyGeometryUpdate(t,e){if(!vn(e)||!t["p:spPr"])return;let n=t["p:spPr"],r=e;if(r.customGeometryPaths&&r.customGeometryPaths.length>0)delete n["a:prstGeom"],n["a:custGeom"]=nMe(r.customGeometryPaths,r.customGeometryRawData,{adjustHandlesXY:r.customGeometryAdjustHandlesXY,adjustHandlesPolar:r.customGeometryAdjustHandlesPolar,connectionSites:r.customGeometryConnectionSites,textRect:r.customGeometryTextRect});else if(n["a:prstGeom"]){let o=e.type==="connector"?this.normalizePresetGeometry(e.shapeType||"straightConnector1"):this.normalizePresetGeometry(e.shapeType),i=n["a:prstGeom"];if(i["@_prst"]=o,e.shapeAdjustments){let s=Object.entries(e.shapeAdjustments).filter(([a,l])=>a.trim().length>0&&Number.isFinite(l));s.length>0?i["a:avLst"]={"a:gd":s.map(([a,l])=>({"@_name":a,"@_fmla":`val ${Math.round(l)}`}))}:i["a:avLst"]||(i["a:avLst"]={});}else i["a:avLst"]||(i["a:avLst"]={});}}processImageEmbedding(t,e,n){let r=this.parseDataUrlToBytes(t.imageData);if(r){let o=t.imagePath;if(!o){o=n.saveSession.nextMediaPath(r.extension);let i=n.slideRelationshipRegistry.nextRelationshipId(),s=o.replace(/^ppt\//,"../");n.slideRelationships.push({"@_Id":i,"@_Type":n.slideImageRelationshipType,"@_Target":s}),e=this.createPictureXml(t,i);}if(o){let i=o.toLowerCase().match(/\.([^./\\]+)$/)?.[1],s=r.extension.toLowerCase();i!==void 0&&i!==s&&!(i==="jpg"&&s==="jpeg")&&!(i==="jpeg"&&s==="jpg")||this.zip.file(o,r.bytes);}}else this.compatibilityService.reportWarning({code:"SAVE_IMAGE_PAYLOAD_UNSUPPORTED",message:"Image payload could not be converted to an embedded media part. Original image linkage was preserved when possible.",scope:"save",slideId:n.slide.id,elementId:t.id});return e}processMediaEmbedding(t,e,n){let r=t.mediaType==="audio"?"audio":"video",o=this.slideMediaRelationshipBuilder.getMediaRelationshipIdFromShape(e),i={media:n.slideMediaRelationshipType,video:n.slideVideoRelationshipType,audio:n.slideAudioRelationshipType};if(typeof t.mediaData=="string"){let s=n.resolvedMediaBytes.get(t.id)??this.parseDataUrlToBytes(t.mediaData);if(s){let a=t.mediaPath;a||(a=n.saveSession.nextMediaPath(s.extension,r)),this.zip.file(a,s.bytes);let l=a.replace(/^ppt\//,"../");o||(o=n.slideRelationshipRegistry.nextRelationshipId()),n.slideRelationshipRegistry.upsertRelationship(o,this.slideMediaRelationshipBuilder.resolveMediaRelationshipType(r,i),l),e?this.slideMediaRelationshipBuilder.ensureGraphicFrameMediaReference(e,r,o):e=this.createMediaGraphicFrameXml(t,o),t.mediaPath=a,t.mediaMimeType=this.getMediaMimeType(a)||t.mediaMimeType;}else this.compatibilityService.reportWarning({code:"SAVE_MEDIA_PAYLOAD_UNSUPPORTED",message:"Media payload could not be converted to an embedded media part. Original media linkage was preserved when possible.",scope:"save",slideId:n.slide.id,elementId:t.id});}else if(!e&&typeof t.mediaPath=="string"&&t.mediaPath.length>0){let s=t.mediaPath.replace(/^ppt\//,"../");o=o||n.slideRelationshipRegistry.nextRelationshipId(),n.slideRelationshipRegistry.upsertRelationship(o,this.slideMediaRelationshipBuilder.resolveMediaRelationshipType(r,i),s),e=this.createMediaGraphicFrameXml(t,o);}return e}},A5e=class pO extends P5e{isGraphicFrameShape(e){return !!(e["p:nvGraphicFramePr"]||e["a:graphic"]&&e["p:xfrm"])}pendingChartPartPaths;nextChartPartPath(){let e=new Set,n=/^ppt\/charts\/chart(?<n>\d+)\.xml$/u,r=i=>{let s=n.exec(i);s?.groups?.n&&e.add(Number.parseInt(s.groups.n,10));};for(let i of Object.keys(this.zip.files))r(i);for(let i of this.pendingChartPartPaths??[])r(i);let o=1;for(;e.has(o);)o+=1;return `ppt/charts/chart${o}.xml`}createChartElementXml(e,n){let r=this.nextChartPartPath();this.zip.file(r,this.builder.build(bNe(e.chartData))),(this.pendingChartPartPaths??=[]).push(r);let o=n.slideRelationshipRegistry.nextRelationshipId();return n.slideRelationships.push({"@_Id":o,"@_Type":UDe,"@_Target":`../charts/${r.slice(r.lastIndexOf("/")+1)}`}),this.createChartGraphicFrameXml(e,o)}async ensureChartPartContentTypes(){let e=this.pendingChartPartPaths;if(this.pendingChartPartPaths=void 0,!e||e.length===0)return;let n=await this.zip.file("[Content_Types].xml")?.async("string");if(!n)return;let r=this.parser.parse(n),o=r.Types||{},i=Array.isArray(o.Override)?o.Override:o.Override?[o.Override]:[],s=new Set(i.map(a=>String(a?.["@_PartName"]||"")));for(let a of e){let l=`/${a}`;s.has(l)||(i.push({"@_PartName":l,"@_ContentType":HDe}),s.add(l));}o.Override=i,r.Types=o,this.zip.file("[Content_Types].xml",this.builder.build(r));}finalizeSpPrSchemaOrder(e){let n=e["p:spPr"];if(!n)return;let r=n["a:blipFill"];r&&this.reorderInPlace(r,dA),this.reorderInPlace(n,iJ);}finalizePictureBlipFillOrder(e){let n=e["p:blipFill"];n&&this.reorderInPlace(n,dA);}reorderInPlace(e,n){let r=Wg(e,n);for(let o of Object.keys(e))delete e[o];for(let o of Object.keys(r))e[o]=r[o];}isTemplateElementId(e){return e.startsWith("layout-")||e.startsWith("master-")}processSlideElement(e,n,r){let o=e.rawXml;if((e.type==="picture"||e.type==="image")&&typeof e.imageData=="string"&&(o=this.processImageEmbedding(e,o,r)??o),e.type==="media"&&(o=this.processMediaEmbedding(e,o,r)??o),e.type==="group"){let i=this.buildGroupShapeXml(e);i&&n.groups.push(i);return}if(e.type==="contentPart"){o?(this.elementTransformUpdater.applyTransform(o,e,pO.EMU_PER_PX),n.contentParts.push(o)):this.compatibilityService.reportWarning({code:"SAVE_ELEMENT_SKIPPED",message:`Content part '${e.id}' has no rawXml and was skipped during save.`,scope:"save",slideId:r.slide.id,elementId:e.id});return}if(!o&&(e.type==="text"||e.type==="shape")&&(o=this.createElementXml(e)),!o&&e.type==="connector"&&(o=this.createConnectorXml(e)),e.type==="ink"&&(o||(o=this.createInkShapeXml(e),this.compatibilityService.reportWarning({code:"SAVE_INK_ENCODED_AS_CUSTGEOM",message:"SDK-created ink element serialized as custGeom shape; pressure/tool metadata not represented in OOXML aink format.",scope:"save",slideId:r.slide.id,elementId:e.id}))),!o&&e.type==="table"&&(o=this.createTableGraphicFrameXml(e)),!o&&e.type==="chart"&&e.chartData&&(o=this.createChartElementXml(e,r)),e.type==="ole"){let i=e;if(o)this.applyOleTypedFieldUpdates(o,i);else {let s=this.resolveOleEmbedRelationshipId(r.slideRelationships,i.oleTarget)||r.slideRelationshipRegistry.nextRelationshipId();o=this.createOleGraphicFrameXml(i,s);}}if(!o){this.compatibilityService.reportWarning({code:"SAVE_ELEMENT_SKIPPED",message:`Element '${e.id}' could not be serialized and was skipped during save.`,scope:"save",slideId:r.slide.id,elementId:e.id});return}if(this.elementTransformUpdater.applyTransform(o,e,pO.EMU_PER_PX),this.applyImageProperties(o,e),this.finalizePictureBlipFillOrder(o),this.applyGeometryUpdate(o,e),vn(e)&&e.shapeStyle&&o["p:spPr"]){let i=o["p:spPr"];this.applyFillAndStroke(i,e.shapeStyle),this.applyEffectsAndThreeD(i,e.shapeStyle),this.finalizeSpPrSchemaOrder(o),this.applyShapeStyleRefs(o,e.shapeStyle);}if(Qe(e)&&this.applyTextBodyContent(o,e,r.resolveHyperlinkRelationshipId,r.getSlideRelationshipMap),this.applyDataSerialization(o,e,r.slide.id),this.serializeElementActions(o,e,r.resolveHyperlinkRelationshipId),this.serializeShapeLocks(o,e),this.isTemplateElementId(e.id)){let i=this.getTemplateSpTree(r.slide.id,e.id);i&&(e.rawXml=this.ensureTemplateShapeAttached(i,e.type,o));return}e.type==="picture"||e.type==="image"?n.pics.push(o):e.type==="connector"?n.connectors.push(o):e.type==="model3d"?n.model3ds.push(o):this.isGraphicFrameShape(o)?n.graphicFrames.push(o):n.shapes.push(o);}},R5e=new PJ,k5e=class extends A5e{async processSlideForSave(t,e,n){if(t.isDirty===false)return;let r=this.slideMap.get(t.id);if(!r)return;let o=r["p:sld"]||{};if(t.hidden?o["@_show"]="0":delete o["@_show"],o["p:clrMapOvr"]=GQ(t.clrMapOverride),t.transition!==void 0){let x=this.buildSlideTransitionXml(t.transition);x?o["p:transition"]=x:delete o["p:transition"];}if(t.animations!==void 0&&this.applyEditorAnimations(o,t.animations),t.animations&&t.animations.length>0){let x=this.animationWriteService.buildTimingXml(t.animations,t.rawTiming);x?(this.applyMediaTimingToRawTiming(x,t.elements),o["p:timing"]=x):t.rawTiming&&(this.applyMediaTimingToRawTiming(t.rawTiming,t.elements),o["p:timing"]=t.rawTiming);}else t.rawTiming&&(this.applyMediaTimingToRawTiming(t.rawTiming,t.elements),o["p:timing"]=t.rawTiming);r["p:sld"]=o;let i=this.ensureSlideTree(r),s=this.toSlideRelsPath(t.id),a=await this.zip.file(s)?.async("string"),l=a?this.parser.parse(a):{Relationships:{"@_xmlns":n.relationshipsNamespace,Relationship:[]}},c=l.Relationships||{};c["@_xmlns"]||(c["@_xmlns"]=n.relationshipsNamespace);let u=this.ensureArray(c.Relationship),d=new eJ({relationships:u}),p=d.removeCommentRelationships(n.slideCommentRelationshipType);this.slideBackgroundBuilder.applyBackground({slideNode:o,slide:t,zip:this.zip,saveState:e,relationshipRegistry:d,slideImageRelationshipType:n.slideImageRelationshipType,parseDataUrlToBytes:x=>this.parseDataUrlToBytes(x)}),this.slideCommentPartWriter.writeComments({slide:t,saveState:e,existingCommentRelationship:p,relationshipRegistry:d,slideCommentRelationshipType:n.slideCommentRelationshipType,zip:this.zip,xmlBuilder:this.builder,slideCommentsXmlFactory:this.slideCommentsXmlFactory,resolvePartPath:(x,v)=>this.resolveImagePath(x,v)}),await this.slideNotesPartUpdater.updateNotesPart({slide:t,relationshipRegistry:d,slideNotesRelationshipType:n.slideNotesRelationshipType,zip:this.zip,parser:this.parser,xmlBuilder:this.builder,resolvePartPath:(x,v)=>this.resolveImagePath(x,v),updateNotesXmlText:(x,v,S)=>this.updateNotesXmlText(x,v,S),compatibilityReporter:this.compatibilityService});let f=new Map;for(let x of t.elements){if(x.type!=="media")continue;let v=x;if(typeof v.mediaData=="string"&&!v.mediaData.startsWith("data:"))try{let S=await this.resolveMediaToBytes(v.mediaData);S&&f.set(v.id,S);}catch{console.warn(`[pptx-save] Failed to resolve media URL for element ${v.id}`);}}let h={shapes:[],pics:[],connectors:[],graphicFrames:[],groups:[],model3ds:[],contentParts:[]},m={slide:t,slideRelationships:u,slideRelationshipRegistry:d,resolveHyperlinkRelationshipId:x=>d.resolveHyperlinkRelationshipId(x),getSlideRelationshipMap:()=>d.toRelationshipMap(),resolvedMediaBytes:f,saveSession:e,slideImageRelationshipType:n.slideImageRelationshipType,slideMediaRelationshipType:n.slideMediaRelationshipType,slideVideoRelationshipType:n.slideVideoRelationshipType,slideAudioRelationshipType:n.slideAudioRelationshipType};t.elements.forEach(x=>{this.processSlideElement(x,h,m);}),i["p:sp"]=h.shapes,i["p:pic"]=h.pics,i["p:cxnSp"]=h.connectors,i["p:graphicFrame"]=h.graphicFrames,h.groups.length>0?i["p:grpSp"]=h.groups:delete i["p:grpSp"],h.model3ds.length>0?i["p16:model3D"]=h.model3ds:delete i["p16:model3D"],h.contentParts.length>0?i["p:contentPart"]=h.contentParts:delete i["p:contentPart"],this.reapplyAlternateContentEnvelopes(i,h);let g=R5e.validateAndDeduplicateIds(i,x=>this.ensureArray(x));g>0&&this.compatibilityService.reportWarning({code:"SHAPE_ID_DEDUPLICATED",message:`Reassigned ${g} duplicate shape ID(s) on slide '${t.id}'.`,scope:"save",slideId:t.id}),c.Relationship=u,l.Relationships=c,this.zip.file(s,this.builder.build(l)),this.applySlideDrawingGuides(o,t),this.deduplicateExtensionLists(r),lO(o)&&c5e(o),this.zip.file(t.id,this.builder.build(r));}reapplyAlternateContentEnvelopes(t,e){let n={"p:sp":e.shapes,"p:pic":e.pics,"p:cxnSp":e.connectors,"p:graphicFrame":e.graphicFrames,"p:grpSp":e.groups,"p:contentPart":e.contentParts,"p16:model3D":e.model3ds},r=new Map;for(let i of Object.keys(n)){let s=n[i];if(s)for(let a of s){let l=this.alternateContentBlockByRawXml.get(a);if(!l)continue;let c=r.get(l);c||(c=[],r.set(l,c)),c.push({tag:i,node:a,collector:s});}}if(r.size===0)return;let o=[];for(let[i,s]of r){for(let c of s){let u=c.collector.indexOf(c.node);u!==-1&&c.collector.splice(u,1);}let a={...i.rawAc},l=new Map;for(let c of s){let u=l.get(c.tag);u||(u=[],l.set(c.tag,u)),u.push(c.node);}if(i.selectedBranch==="choice"){let c=this.ensureArray(a["mc:Choice"]),u=i.choiceIndex??0,d=c[u];if(d){let p={...d};for(let f of gA)delete p[f];for(let[f,h]of l)p[f]=h.length===1?h[0]:h;c[u]=p,a["mc:Choice"]=c.length===1?c[0]:c;}}else {let c=a["mc:Fallback"];if(c){let u={...c};for(let d of gA)delete u[d];for(let[d,p]of l)u[d]=p.length===1?p[0]:p;a["mc:Fallback"]=u;}}o.push(a);}t["p:sp"]=e.shapes,t["p:pic"]=e.pics,t["p:cxnSp"]=e.connectors,t["p:graphicFrame"]=e.graphicFrames,e.groups.length>0?t["p:grpSp"]=e.groups:delete t["p:grpSp"],e.contentParts.length>0?t["p:contentPart"]=e.contentParts:delete t["p:contentPart"],e.model3ds.length>0?t["p16:model3D"]=e.model3ds:delete t["p16:model3D"],t["mc:AlternateContent"]=o.length===1?o[0]:o;}},I5e=class extends k5e{markThemeDirty(t){this.dirtyThemePaths.add(t);}markAllThemesDirty(){for(let t of this.originalThemeXmlByPath.keys())this.dirtyThemePaths.add(t);for(let t of this.masterThemePaths.values())this.dirtyThemePaths.add(t);}async persistThemeParts(){let t=new Set;for(let[e,n]of this.masterThemePaths.entries()){if(!n||(t.add(n),!this.dirtyThemePaths.has(n)))continue;let r=this.buildThemeXml(n,e);r&&this.zip.file(n,r);}for(let[e]of this.originalThemeXmlByPath.entries()){if(t.has(e)||!this.dirtyThemePaths.has(e))continue;let n=this.buildThemeXml(e,void 0);n&&this.zip.file(e,n);}}buildThemeXml(t,e){let n=e&&this.masterThemeColorMaps.get(e)||this.globalThemeColorMapSnapshot||this.themeColorMap,r=e&&this.masterThemeFontMaps.get(e)||this.globalThemeFontMapSnapshot||this.themeFontMap,o=this.masterThemeNames.get(t)||"Office Theme",i=this.masterThemeColorSchemeNames.get(t)||o,s=this.masterThemeFontSchemeNames.get(t)||o,a=this.masterThemeMajorFontScripts.get(t)||{},l=this.masterThemeMinorFontScripts.get(t)||{},c=this.buildClrSchemeObject(i,n),u=this.buildFontSchemeObject(s,r,a,l),d=this.extractRawSubtreeFromOriginal(t,["a:theme","a:themeElements","a:fmtScheme"]),p={"a:clrScheme":c,"a:fontScheme":u};d!==void 0?p["a:fmtScheme"]=d:p["a:fmtScheme"]=this.buildMinimalFmtScheme(o);let f={"@_xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main","@_name":o,"a:themeElements":p},h=this.masterThemeObjectDefaults.get(t);if(h&&(h.spDef||h.lnDef||h.txDef)){let S={};h.spDef!==void 0&&(S["a:spDef"]=h.spDef),h.lnDef!==void 0&&(S["a:lnDef"]=h.lnDef),h.txDef!==void 0&&(S["a:txDef"]=h.txDef),f["a:objectDefaults"]=S;}else f["a:objectDefaults"]={};let m=this.masterThemeExtraClrSchemeLst.get(t);f["a:extraClrSchemeLst"]=m!==void 0?m:{};let g=this.masterThemeCustClrLst.get(t);g!==void 0&&(f["a:custClrLst"]=g);let x=this.masterThemeExtLst.get(t);x!==void 0&&(f["a:extLst"]=x);let v={"?xml":{"@_version":"1.0","@_encoding":"UTF-8","@_standalone":"yes"},"a:theme":f};try{return this.builder.build(v)}catch(S){console.warn(`Failed to build theme XML for ${t}:`,S);return}}buildClrSchemeObject(t,e){let n=r=>{let o=String(e[r]||"").replace(/^#/,"");return {"a:srgbClr":{"@_val":o.length===6?o.toUpperCase():"000000"}}};return {"@_name":t,"a:dk1":n("dk1"),"a:lt1":n("lt1"),"a:dk2":n("dk2"),"a:lt2":n("lt2"),"a:accent1":n("accent1"),"a:accent2":n("accent2"),"a:accent3":n("accent3"),"a:accent4":n("accent4"),"a:accent5":n("accent5"),"a:accent6":n("accent6"),"a:hlink":n("hlink"),"a:folHlink":n("folHlink")}}buildFontSchemeObject(t,e,n,r){let o=(i,s,a,l)=>{let c={"a:latin":{"@_typeface":e[i]||"Calibri"},"a:ea":{"@_typeface":e[s]||""},"a:cs":{"@_typeface":e[a]||""}},u=Object.keys(l);if(u.length>0){let d=u.map(p=>({"@_script":p,"@_typeface":l[p]}));c["a:font"]=d.length===1?d[0]:d;}return c};return {"@_name":t,"a:majorFont":o("mj-lt","mj-ea","mj-cs",n),"a:minorFont":o("mn-lt","mn-ea","mn-cs",r)}}extractRawSubtreeFromOriginal(t,e){let n=this.originalThemeXmlByPath.get(t);if(n)try{let o=this.parser.parse(n);for(let i of e)if(o&&typeof o=="object"&&i in o)o=o[i];else return;return o}catch{return}}buildMinimalFmtScheme(t){let e={"a:solidFill":{"a:schemeClr":{"@_val":"phClr"}}};return {"@_name":t,"a:fillStyleLst":{"a:solidFill":[{"a:schemeClr":{"@_val":"phClr"}}],"a:gradFill":[]},"a:lnStyleLst":{"a:ln":[{"@_w":"6350","@_cap":"flat","@_cmpd":"sng","@_algn":"ctr",...e,"a:prstDash":{"@_val":"solid"},"a:miter":{"@_lim":"800000"}},{"@_w":"12700","@_cap":"flat","@_cmpd":"sng","@_algn":"ctr",...e,"a:prstDash":{"@_val":"solid"},"a:miter":{"@_lim":"800000"}},{"@_w":"19050","@_cap":"flat","@_cmpd":"sng","@_algn":"ctr",...e,"a:prstDash":{"@_val":"solid"},"a:miter":{"@_lim":"800000"}}]},"a:effectStyleLst":{"a:effectStyle":[{"a:effectLst":{}},{"a:effectLst":{}},{"a:effectLst":{}}]},"a:bgFillStyleLst":{"a:solidFill":[{"a:schemeClr":{"@_val":"phClr"}}],"a:gradFill":[]}}}},N5e=class extends I5e{applySlideMasterChanges(t){if(!(!t||t.length===0))for(let e of t)try{this.applySlideMasterChange(e);}catch(n){console.warn(`Failed to apply slide master changes for ${e.path}:`,n);}}applySlideMasterChange(t){let e=this.masterXmlMap.get(t.path);if(!e)return;let n=e["p:sldMaster"];if(!n)return;let r=n["p:cSld"]||{};if(VQ(r,t.backgroundColor),t.name!==void 0){let o=t.name.trim();o.length>0?r["@_name"]=o:delete r["@_name"];}n["p:cSld"]=r,t.clrMap!==void 0&&(n["p:clrMap"]=D5e(t.clrMap)),kA(n,t.headerFooter),e["p:sldMaster"]=n,this.masterXmlMap.set(t.path,e);}};L5e=class extends N5e{applySlideLayoutChanges(t){if(!(!t||t.length===0))for(let e of t)try{this.applySlideLayoutChange(e);}catch(n){console.warn(`Failed to apply slide layout changes for ${e.path}:`,n);}}applySlideLayoutChange(t){let e=this.layoutXmlMap.get(t.path);if(!e)return;let n=e["p:sldLayout"];if(!n)return;if(t.matchingName!==void 0){let o=t.matchingName.trim();o.length>0?n["@_matchingName"]=o:delete n["@_matchingName"];}t.preserve!==void 0&&(n["@_preserve"]=t.preserve?"1":"0"),t.userDrawn!==void 0&&(n["@_userDrawn"]=t.userDrawn?"1":"0"),t.showMasterPhAnim!==void 0&&(n["@_showMasterPhAnim"]=t.showMasterPhAnim?"1":"0");let r=n["p:cSld"]||{};if(VQ(r,t.backgroundColor),t.name!==void 0){let o=t.name.trim();o.length>0?r["@_name"]=o:delete r["@_name"];}n["p:cSld"]=r,rRe(n,t.clrMapOverride),kA(n,t.headerFooter),e["p:sldLayout"]=n,this.layoutXmlMap.set(t.path,e);}},F5e=class extends L5e{async applyNotesMasterStructuralChanges(t){if(!t||t.clrMap===void 0&&t.headerFooter===void 0)return;let e=this.zip.file(t.path);if(e)try{let n=await e.async("string"),r=this.parser.parse(n),o=r?.["p:notesMaster"];if(!o)return;t.clrMap!==void 0&&(o["p:clrMap"]=B5e(t.clrMap)),kA(o,t.headerFooter),r["p:notesMaster"]=o,this.zip.file(t.path,this.builder.build(r));}catch(n){console.warn("Failed to save notes master structural changes:",n);}}};O5e=class extends F5e{async applyHandoutMasterStructuralChanges(t){if(!t||t.clrMap===void 0&&t.headerFooter===void 0)return;let e=this.zip.file(t.path);if(e)try{let n=await e.async("string"),r=this.parser.parse(n),o=r?.["p:handoutMaster"];if(!o)return;t.clrMap!==void 0&&(o["p:clrMap"]=U5e(t.clrMap)),kA(o,t.headerFooter),r["p:handoutMaster"]=o,this.zip.file(t.path,this.builder.build(r));}catch(n){console.warn("Failed to save handout master structural changes:",n);}}};$5e=[{xmlKey:"a:wholeTbl",entryKey:"wholeTblFill"},{xmlKey:"a:band1H",entryKey:"band1HFill"},{xmlKey:"a:band2H",entryKey:"band2HFill"},{xmlKey:"a:band1V",entryKey:"band1VFill"},{xmlKey:"a:band2V",entryKey:"band2VFill"},{xmlKey:"a:firstRow",entryKey:"firstRowFill"},{xmlKey:"a:lastRow",entryKey:"lastRowFill"},{xmlKey:"a:firstCol",entryKey:"firstColFill"},{xmlKey:"a:lastCol",entryKey:"lastColFill"}],H5e=[{xmlKey:"a:wholeTbl",entryKey:"wholeTblText"},{xmlKey:"a:firstRow",entryKey:"firstRowText"},{xmlKey:"a:lastRow",entryKey:"lastRowText"},{xmlKey:"a:firstCol",entryKey:"firstColText"},{xmlKey:"a:lastCol",entryKey:"lastColText"},{xmlKey:"a:band1H",entryKey:"band1HText"},{xmlKey:"a:band2H",entryKey:"band2HText"},{xmlKey:"a:band1V",entryKey:"band1VText"},{xmlKey:"a:band2V",entryKey:"band2VText"}],z5e=class extends O5e{async applyViewPropertiesPart(t){if(!t)return;let e=await this.resolveViewPropsPath();if(!this.zip.file(e))return;let n=this.builder.build(eRe(t));this.zip.file(e,n);}async resolveViewPropsPath(){let t="ppt/viewProps.xml",e=await this.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");if(!e)return t;try{let n=this.parser.parse(e),o=this.ensureArray(n?.Relationships?.Relationship).find(a=>{let l=String(a?.["@_Type"]||""),c=String(a?.["@_Target"]||"");return l.includes("viewProps")||c.includes("viewProps")});if(!o)return t;let i=String(o["@_Target"]||"").trim();return i.length===0?t:xA("ppt",i)??t}catch{return t}}async applyTableStylesPart(t){if(!t||Object.keys(t).length===0)return;let e="ppt/tableStyles.xml",n=await this.zip.file(e)?.async("string");if(!n)return;let r;try{r=this.parser.parse(n);}catch{return}let o=r["a:tblStyleLst"];if(!o)return;let i=this.ensureArray(o["a:tblStyle"]);if(i.length===0)return;let s=new Map;for(let a of i){let l=String(a["@_styleId"]||"").trim();l&&s.set(this.normalizeTableStyleGuid(l),a);}for(let[a,l]of Object.entries(t)){let c=s.get(this.normalizeTableStyleGuid(a));c&&(l.styleName!==void 0&&(c["@_styleName"]=l.styleName),G5e(c,l));}this.zip.file(e,this.builder.build(r));}};X5e=class rte extends z5e{resolveEffectiveConformance(e){return e==="strict"||e==="transitional"?e:this.isStrictOoxml?"strict":"transitional"}async save(e,n){let r=this.resolveEffectiveConformance(n?.conformance),o=lQ(r),{slideRelationshipType:i,slideLayoutRelationshipType:s,relationshipsNamespace:a,slideContentType:l,commentContentType:c,commentAuthorContentType:u,commentAuthorsPartName:d}=o;this.compatibilityService.resetWarnings();let p=new MJ().withZip(this.zip).withCommentAuthorMap(this.commentAuthorMap).withCommentAuthorDetails(this.commentAuthorDetails).withEmuPerPx(rte.EMU_PER_PX).build();await this.reconcilePresentationSlidesForSave({slides:e,saveSession:p,slideRelationshipType:i,slideLayoutRelationshipType:s,relationshipsNamespace:a});let f=await this.zip.file("[Content_Types].xml")?.async("string");if(f){let x=this.parser.parse(f);this.contentTypesBuilder.applySlideAndMediaUpdates({contentTypesData:x,slidePaths:e.map(v=>v.id),usedMediaPaths:p.getUsedMediaPaths(),slideContentType:l}),this.zip.file("[Content_Types].xml",this.builder.build(x));}for(let x of e)await this.processSlideForSave(x,p,o);for(let x of p.getExistingCommentPaths())p.isCommentPathActive(x)||this.zip.remove(x);let h=p.hasUsedCommentAuthors();h?this.zip.file("ppt/commentAuthors.xml",this.builder.build(this.commentAuthorsXmlFactory.createXmlElement({saveState:p}))):(this.zip.remove("ppt/commentAuthors.xml"),await this.stripPresentationCommentAuthorsRelationship());let m=await this.zip.file("[Content_Types].xml")?.async("string");if(m){let x=this.parser.parse(m);this.contentTypesBuilder.applyCommentUpdates({contentTypesData:x,activeCommentPaths:p.getActiveCommentPaths(),hasCommentAuthors:h,commentContentType:c,commentAuthorContentType:u,commentAuthorsPartName:d}),this.zip.file("[Content_Types].xml",this.builder.build(x));}this.applySlideMasterChanges(n?.slideMasters),this.applySlideLayoutChanges(n?.slideLayouts);for(let[x,v]of this.layoutXmlMap.entries())this.zip.file(x,this.builder.build(v));for(let[x,v]of this.masterXmlMap.entries())this.zip.file(x,this.builder.build(v));if(await this.persistThemeParts(),await this.applyEmbeddedFontPreservation(n?.embeddedFonts),this.presentationData){if(this.presentationSaveBuilder.applySaveOptions({presentationData:this.presentationData,options:{headerFooter:n?.headerFooter,presentationProperties:n?.presentationProperties,customShows:n?.customShows,sections:n?.sections,photoAlbum:n?.photoAlbum,kinsoku:n?.kinsoku,modifyVerifier:n?.modifyVerifier},rawSlideWidthEmu:this.rawSlideWidthEmu,rawSlideHeightEmu:this.rawSlideHeightEmu,rawSlideSizeType:this.rawSlideSizeType,xmlLookupService:this.xmlLookupService}),this.deduplicateExtensionLists(this.presentationData),r==="transitional"){let v=this.presentationData["p:presentation"];v&&"@_conformance"in v&&delete v["@_conformance"];}let x=this.builder.build(this.presentationData);this.zip.file("ppt/presentation.xml",x);}if(await this.applyPresentationPropertiesPart(n?.presentationProperties),await this.applyViewPropertiesPart(n?.viewProperties),await this.applyTableStylesPart(n?.tableStyles),await this.documentPropertiesUpdater.updateOnSave(e,{coreProperties:n?.coreProperties,appProperties:n?.appProperties,customProperties:n?.customProperties}),await this.applyTagCollectionChanges(n?.tags),await this.applyNotesMasterChanges(n?.notesMaster),await this.applyNotesMasterStructuralChanges(n?.notesMaster),await this.applyHandoutMasterChanges(n?.handoutMaster),await this.applyHandoutMasterStructuralChanges(n?.handoutMaster),await this.processPendingChartUpdates(),await this.ensureChartPartContentTypes(),await this.processPendingSmartArtUpdates(),this.applyCustomXmlPartsPreservation(),this.customXmlParts.length>0){let x=await this.zip.file("[Content_Types].xml")?.async("string");if(x){let v=this.parser.parse(x);this.contentTypesBuilder.applyCustomXmlUpdates({contentTypesData:v,customXmlParts:this.customXmlParts}),this.zip.file("[Content_Types].xml",this.builder.build(v));}}this.applyThumbnailPreservation(),await this.applyVbaProjectPreservation(),await this.stripDigitalSignatures();let g=n?.outputFormat??"pptx";await this.applyOutputFormatOverrides(g),r==="strict"&&await this.convertZipToStrictConformance();for(let x of Object.keys(this.zip.files))this.zip.files[x].dir&&delete this.zip.files[x];return await this.zip.generateAsync({type:"uint8array"})}async stripPresentationCommentAuthorsRelationship(){let e="ppt/_rels/presentation.xml.rels",n=await this.zip.file(e)?.async("string");if(!n)return;let r=this.parser.parse(n),o=r.Relationships;if(!o)return;let i=this.ensureArray(o.Relationship),s=i.filter(a=>{let l=String(a?.["@_Type"]??"");return l!=="http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors"&&l!=="http://purl.oclc.org/ooxml/officeDocument/relationships/commentAuthors"});s.length!==i.length&&(o.Relationship=s,this.zip.file(e,this.builder.build(r)));}},j5e=class vp extends X5e{parseMediaData(e,n){return this.mediaDataParser.parseMediaData(e,n)}parseTableData(e){return this.tableDataParser.parseTableData(e)}parseGraphicFrame(e,n,r){return this.graphicFrameParser.parseGraphicFrame(e,n,r)}async parseContentPart(e,n,r){try{let o=String(e?.["@_r:id"]||"").trim(),i=[],s=e["p:xfrm"],a=s?.["a:off"],l=s?.["a:ext"],c=parseInt(String(a?.["@_x"]??"0"),10),u=parseInt(String(a?.["@_y"]??"0"),10),d=parseInt(String(l?.["@_cx"]??"0"),10),p=parseInt(String(l?.["@_cy"]??"0"),10),f=Number.isFinite(c)?c/vp.EMU_PER_PX:0,h=Number.isFinite(u)?u/vp.EMU_PER_PX:0,m=Number.isFinite(d)&&d>0?d/vp.EMU_PER_PX:120,g=Number.isFinite(p)&&p>0?p/vp.EMU_PER_PX:80;if(o&&r){let v=this.slideRelsMap.get(r)?.get(o);if(v){let S=this.resolveImagePath(r,v),w=await this.zip.file(S)?.async("string");if(w){let C=this.parser.parse(w),T=C["ink:ink"]||C.ink;if(T){let E=this.ensureArray(T["ink:trace"]??T.trace);for(let M of E){let P=typeof M=="string"?M:String(M?.["#text"]||M||"").trim();P.length>0&&i.push({path:P,color:"#000000",width:1,opacity:1});}}}}}return {id:n,type:"contentPart",x:f,y:h,width:m,height:g,inkStrokes:i.length>0?i:void 0,rawXml:e}}catch(o){return console.warn("Skipping malformed content part:",o),null}}async parseModel3DElement(e,n,r){try{let i=(e["p16:spPr"]??e["p:spPr"])?.["a:xfrm"],s=i?.["a:off"],a=i?.["a:ext"],l=parseInt(String(s?.["@_x"]??"0"),10),c=parseInt(String(s?.["@_y"]??"0"),10),u=parseInt(String(a?.["@_cx"]??"0"),10),d=parseInt(String(a?.["@_cy"]??"0"),10),p=Number.isFinite(l)?l/vp.EMU_PER_PX:0,f=Number.isFinite(c)?c/vp.EMU_PER_PX:0,h=Number.isFinite(u)&&u>0?u/vp.EMU_PER_PX:120,m=Number.isFinite(d)&&d>0?d/vp.EMU_PER_PX:80,g=i?.["@_rot"]?parseInt(String(i["@_rot"]))/6e4:void 0,x=i?.["@_skewX"]?parseInt(String(i["@_skewX"]),10)/6e4:void 0,v=i?.["@_skewY"]?parseInt(String(i["@_skewY"]),10)/6e4:void 0,S,w,C,T,E;if(r){let M=this.slideRelsMap.get(r),P=String(e["p16:model3Drel"]?.["@_r:id"]??e["@_r:embed"]??"").trim();if(P&&M){let L=M.get(P);if(L){S=this.resolveImagePath(r,L);let D=S.split(".").pop()?.toLowerCase();D==="glb"?w="model/gltf-binary":D==="gltf"&&(w="model/gltf+json");}}let R=e["p16:posterImage"],k=String(R?.["@_r:embed"]??R?.["@_r:link"]??"").trim();if(k&&M){let L=M.get(k);if(L)if(L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:"))C=L,T=L,E=L;else {let D=this.resolveImagePath(r,L);C=D,T=D,this.eagerDecodeImages&&D&&(E=await this.getImageData(D));}}}return {id:n,type:"model3d",x:p,y:f,width:h,height:m,rotation:g,skewX:x,skewY:v,modelPath:S,modelMimeType:w,posterImage:C,imagePath:T,imageData:E,rawXml:e}}catch(o){return console.warn("Skipping malformed model3D element:",o),null}}parseConnector(e,n,r){return this.connectorParser.parseConnector(e,n,r)}extractPlaceholderInfo(e){if(!e)return null;let n=e["p:ph"];if(!n)return null;let r=n["@_idx"],o=n["@_type"],i=n["@_sz"],s=n["@_orient"],a=n["@_hasCustomPrompt"],l=s!==void 0&&String(s).trim().toLowerCase()==="vert"?"vert":void 0,c;if(a!==void 0){let u=String(a).trim().toLowerCase();u==="1"||u==="true"?c=true:(u==="0"||u==="false")&&(c=false);}return {idx:r!==void 0?String(r):void 0,type:o!==void 0?String(o).toLowerCase():void 0,sz:i!==void 0?String(i).toLowerCase():void 0,orient:l,hasCustomPrompt:c}}placeholderMatches(e,n){if(!e&&!n)return true;if(!n)return false;if(!e)return true;if(e.idx!==void 0&&n.idx!==void 0)return !(e.idx!==n.idx||e.type&&n.type&&e.type!==n.type);if(e.idx!==void 0&&n.idx===void 0){let r=new Set(["title","ctrtitle","subtitle","dt","ftr","sldnum"]);return e.type&&r.has(e.type)?n.type===e.type:false}return !(e.type&&n.type&&e.type!==n.type||e.type&&!n.type)}},Y5e=class extends j5e{findPlaceholderInShapeTree(t,e){if(!t)return;let n=this.ensureArray(t["p:sp"]);for(let o of n){let i=this.extractPlaceholderInfo(on(o,"p:nvSpPr","p:nvPr"));if(this.placeholderMatches(e,i))return {shape:o}}let r=this.ensureArray(t["p:pic"]);for(let o of r){let i=this.extractPlaceholderInfo(on(o,"p:nvPicPr","p:nvPr"));if(this.placeholderMatches(e,i))return {picture:o}}}findPlaceholderContext(t,e){let n=this.resolveLayoutPathForSlide(t);if(!n)return;let r=this.layoutXmlMap.get(n),o=this.findPlaceholderInShapeTree(on(r,"p:sldLayout","p:cSld","p:spTree"),e);if(o)return o;let i=this.resolveMasterPathForLayout(n);if(!i)return;let s=this.masterXmlMap.get(i);return this.findPlaceholderInShapeTree(on(s,"p:sldMaster","p:cSld","p:spTree"),e)}mergeXmlObjects(t,e,n=0){if(n>64)return !t&&!e?void 0:t?e?{...t,...e}:{...t}:e?{...e}:void 0;if(!t&&!e)return;if(!t)return e?{...e}:void 0;if(!e)return {...t};let o={...t};for(let[i,s]of Object.entries(e)){let a=o[i];s&&typeof s=="object"&&!Array.isArray(s)&&a&&typeof a=="object"&&!Array.isArray(a)?o[i]=this.mergeXmlObjects(a,s,n+1):o[i]=s;}return o}readFlipState(t){return t?{flipHorizontal:this.parseBooleanAttr(t["@_flipH"]),flipVertical:this.parseBooleanAttr(t["@_flipV"])}:{flipHorizontal:false,flipVertical:false}}buildPlaceholderDefaultsKey(t){return t.idx!==void 0?t.type?`${t.type}_${t.idx}`:`_${t.idx}`:t.type??"body"}lookupPlaceholderDefaults(t,e){let n=this.resolveLayoutPathForSlide(t);if(!n)return;let r=this.buildPlaceholderDefaultsKey(e),i=this.layoutPlaceholderDefaultsCache.get(n)?.get(r),s=this.resolveMasterPathForLayout(n),l=(s?this.masterPlaceholderDefaultsCache.get(s):void 0)?.get(r);if(!i&&!l)return;if(!l)return i;if(!i)return l;let c={type:i.type,idx:i.idx??l.idx,bodyInsetLeft:i.bodyInsetLeft??l.bodyInsetLeft,bodyInsetTop:i.bodyInsetTop??l.bodyInsetTop,bodyInsetRight:i.bodyInsetRight??l.bodyInsetRight,bodyInsetBottom:i.bodyInsetBottom??l.bodyInsetBottom,textAnchor:i.textAnchor??l.textAnchor,autoFit:i.autoFit??l.autoFit,textWrap:i.textWrap??l.textWrap,promptText:i.promptText??l.promptText};if(i.levelStyles||l.levelStyles){let u={},d=new Set([...Object.keys(i.levelStyles??{}),...Object.keys(l.levelStyles??{})]);for(let p of d){let f=Number.parseInt(p,10),h=i.levelStyles?.[f],m=l.levelStyles?.[f];h&&m?u[f]={...m,...h}:u[f]=h??m;}c.levelStyles=u;}return c}},K5e=class ote extends Y5e{parseGeometryAdjustments(e){if(!e)return;let n=this.ensureArray(e?.["a:avLst"]?.["a:gd"]);if(n.length===0)return;let r={};for(let o of n){let i=String(o?.["@_name"]||"").trim();if(!i)continue;let s;if(o?.["@_val"]!==void 0){let a=Number.parseInt(String(o["@_val"]),10);Number.isFinite(a)&&(s=a);}if(s===void 0&&o?.["@_fmla"]){let l=String(o["@_fmla"]).trim().match(/^val\s+(-?\d+)$/i);if(l){let c=Number.parseInt(l[1],10);Number.isFinite(c)&&(s=c);}}s!==void 0&&(r[i]=s);}return Object.keys(r).length>0?r:void 0}parseAdjustmentHandles(e,n,r,o){if(!e)return;let i=e["a:ahLst"];if(!i)return;let s=[],a=IO({w:n,h:r});if(o)for(let[u,d]of Object.entries(o))a.set(u,d);let l=this.ensureArray(i["a:ahXY"]);for(let u of l){let d=String(u?.["@_gdRefX"]??"").trim(),p=String(u?.["@_gdRefY"]??"").trim(),f=d||p;if(!f)continue;let h=u["a:pos"],m=Po(h?.["@_x"],a),g=Po(h?.["@_y"],a),x={guideName:f,xFraction:n>0?m/n:void 0,yFraction:r>0?g/r:void 0};u["@_minX"]!==void 0&&(x.minValue=Po(u["@_minX"],a)),u["@_maxX"]!==void 0&&(x.maxValue=Po(u["@_maxX"],a)),u["@_minY"]!==void 0&&!x.minValue&&(x.minValue=Po(u["@_minY"],a)),u["@_maxY"]!==void 0&&!x.maxValue&&(x.maxValue=Po(u["@_maxY"],a)),s.push(x);}let c=this.ensureArray(i["a:ahPolar"]);for(let u of c){let d=String(u?.["@_gdRefR"]??"").trim(),p=String(u?.["@_gdRefAng"]??"").trim(),f=d||p;if(!f)continue;let h=u["a:pos"],m=Po(h?.["@_x"],a),g=Po(h?.["@_y"],a);s.push({guideName:f,xFraction:n>0?m/n:void 0,yFraction:r>0?g/r:void 0});}return s.length>0?s:void 0}extractCustomGeometryRawData(e){if(!e)return;let n=l=>l==null?false:typeof l!="object"?true:Object.keys(l).length>0,r={},o=e["a:gdLst"];n(o)&&(r.gdLstXml=o);let i=e["a:ahLst"];n(i)&&(r.ahLstXml=i);let s=e["a:cxnLst"];n(s)&&(r.cxnLstXml=s);let a=e["a:rect"];return n(a)&&(r.rectXml=a),Object.keys(r).length>0?r:void 0}static RECOGNISED_SP_PR_EXT_URIS=new Set(["{AF507438-7753-43E0-B8FC-AC1667EBCBE1}","{91240B29-F687-4F45-9708-019B960494DF}"]);extractOpaqueSpPrExtLst(e){if(!e)return;let n=e["a:extLst"];if(!n)return;let r=this.ensureArray(n["a:ext"]);if(r.length===0)return;let o=[];for(let i of r){let s=String(i?.["@_uri"]??"").trim();s&&ote.RECOGNISED_SP_PR_EXT_URIS.has(s)||o.push(i);}return o.length>0?o:void 0}extractCustomGeometryAdjustHandles(e){let n=e?.["a:ahLst"];if(!n)return {};let r=a=>{if(a==null)return;let l=String(a);return l.length>0?l:void 0},o={},i=this.ensureArray(n["a:ahXY"]);if(i.length>0){let a=[];for(let l of i){let c=l?.["a:pos"],u={gdRefX:r(l?.["@_gdRefX"]),gdRefY:r(l?.["@_gdRefY"]),minX:r(l?.["@_minX"]),maxX:r(l?.["@_maxX"]),minY:r(l?.["@_minY"]),maxY:r(l?.["@_maxY"]),posX:r(c?.["@_x"]),posY:r(c?.["@_y"])};a.push(u);}a.length>0&&(o.xy=a);}let s=this.ensureArray(n["a:ahPolar"]);if(s.length>0){let a=[];for(let l of s){let c=l?.["a:pos"],u={gdRefR:r(l?.["@_gdRefR"]),gdRefAng:r(l?.["@_gdRefAng"]),minR:r(l?.["@_minR"]),maxR:r(l?.["@_maxR"]),minAng:r(l?.["@_minAng"]),maxAng:r(l?.["@_maxAng"]),posX:r(c?.["@_x"]),posY:r(c?.["@_y"])};a.push(u);}a.length>0&&(o.polar=a);}return o}extractCustomGeometryConnectionSites(e){let n=e?.["a:cxnLst"];if(!n)return;let r=this.ensureArray(n["a:cxn"]);if(r.length===0)return;let o=[];for(let i of r){let s=i?.["a:pos"],a=i?.["@_ang"],l={ang:a!=null?String(a):void 0,posX:s?.["@_x"]!==void 0?String(s["@_x"]):void 0,posY:s?.["@_y"]!==void 0?String(s["@_y"]):void 0};o.push(l);}return o.length>0?o:void 0}extractCustomGeometryTextRect(e){let n=e?.["a:rect"];if(!n)return;let r={};return n["@_l"]!==void 0&&(r.l=String(n["@_l"])),n["@_t"]!==void 0&&(r.t=String(n["@_t"])),n["@_r"]!==void 0&&(r.r=String(n["@_r"])),n["@_b"]!==void 0&&(r.b=String(n["@_b"])),Object.keys(r).length>0?r:void 0}buildStructuredCustomGeometryPaths(e,n,r,o){if(!e)return;let i=e["a:pathLst"];if(!i)return;let s=this.ensureArray(i["a:path"]);if(s.length===0)return;let a=$Z(n,r,o);if(a.length===0)return;let l=new Set(["norm","lighten","lightenLess","darken","darkenLess","none"]),c=m=>{if(!(m==null||m==="")){if(m==="1"||m==="true"||m===true)return true;if(m==="0"||m==="false"||m===false)return false}},u=a[0],d=s[0],p=String(d["@_fill"]??"").trim();l.has(p)&&(u.fillMode=p);let f=c(d["@_stroke"]);f!==void 0&&(u.stroke=f);let h=c(d["@_extrusionOk"]);return h!==void 0&&(u.extrusionOk=h),a}parseCustomGeometry(e,n,r){if(!e||!e["a:pathLst"]||!e["a:pathLst"]?.["a:path"])return null;let o=this.ensureArray(e["a:avLst"]?.["a:gd"]),i=o.length>0?UZ(o):void 0,s=this.ensureArray(e["a:gdLst"]?.["a:gd"]),a=OZ(s),l=this.ensureArray(e["a:pathLst"]["a:path"]),c=l[0],u=Number.parseInt(String(c?.["@_w"]??"0"),10)||(n??0),d=Number.parseInt(String(c?.["@_h"]??"0"),10)||(r??0);if(a.length>0||i&&i.size>0){let f=NO(a,{w:u,h:d},i);return EB(l,f,h=>this.ensureArray(h))}return EB(l,new Map,f=>this.ensureArray(f))}parseCropFraction(e){let n=Number.parseInt(String(e??""),10);return Number.isFinite(n)?Math.max(0,Math.min(1e5,n))/1e5:void 0}readImageCropFromBlipFill(e){let n=e?.["a:srcRect"];if(n){let i=this.parseCropFraction(n["@_l"]),s=this.parseCropFraction(n["@_t"]),a=this.parseCropFraction(n["@_r"]),l=this.parseCropFraction(n["@_b"]);return {cropLeft:i,cropTop:s,cropRight:a,cropBottom:l}}let o=e?.["a:stretch"]?.["a:fillRect"];if(o){let i=this.parseCropFraction(o["@_l"]),s=this.parseCropFraction(o["@_t"]),a=this.parseCropFraction(o["@_r"]),l=this.parseCropFraction(o["@_b"]);if(i!==void 0||s!==void 0||a!==void 0||l!==void 0)return {cropLeft:i,cropTop:s,cropRight:a,cropBottom:l}}return {}}extractShapeStyle(e,n){return this.shapeStyleExtractor.extractShapeStyle(e,n)}},q5e=class Dg extends K5e{async parseShapeWithImageFill(e,n,r){try{let o=Rt(e,"p:spPr"),i=this.extractPlaceholderInfo(on(e,"p:nvSpPr","p:nvPr")),s=i?this.findPlaceholderContext(r,i):void 0,a=s?.shape?.["p:spPr"]||s?.picture?.["p:spPr"],l=this.mergeXmlObjects(a,o),c=l?.["a:xfrm"]||o?.["a:xfrm"]||a?.["a:xfrm"];if(!c)return null;let u=Rt(c,"a:off"),d=Rt(c,"a:ext");if(!u||!d)return null;let p=Math.round(parseInt(gn(u,"x")||"0")/Dg.EMU_PER_PX),f=Math.round(parseInt(gn(u,"y")||"0")/Dg.EMU_PER_PX),h=Math.round(parseInt(gn(d,"cx")||"0")/Dg.EMU_PER_PX),m=Math.round(parseInt(gn(d,"cy")||"0")/Dg.EMU_PER_PX),g=c["@_rot"]?parseInt(c["@_rot"])/6e4:void 0,x=c["@_skewX"]?parseInt(String(c["@_skewX"]),10)/6e4:void 0,v=c["@_skewY"]?parseInt(String(c["@_skewY"]),10)/6e4:void 0,{flipHorizontal:S,flipVertical:w}=this.readFlipState(c),C=gn(Rt(l,"a:prstGeom"),"prst"),T=this.parseGeometryAdjustments(l?.["a:prstGeom"]),E=C||"rect",M,P,R,k=l?.["a:custGeom"];if(k){let Re=this.parseCustomGeometry(k,h,m);Re&&(E="custom",M=Re.pathData,P=Re.pathWidth,R=Re.pathHeight);}let L=k??l?.["a:prstGeom"],D=this.parseAdjustmentHandles(L,h,m,T),U=l?.["a:blipFill"]||o?.["a:blipFill"],N=Rt(U,"a:blip"),B=gn(N,"r:embed"),O=gn(N,"r:link"),H=this.readImageCropFromBlipFill(U),z=U?.["a:tile"],K={};if(z){let Re=Number.parseInt(String(z["@_tx"]||""),10);Number.isFinite(Re)&&(K.tileOffsetX=Re/Dg.EMU_PER_PX);let $e=Number.parseInt(String(z["@_ty"]||""),10);Number.isFinite($e)&&(K.tileOffsetY=$e/Dg.EMU_PER_PX);let xe=Number.parseInt(String(z["@_sx"]||""),10);Number.isFinite(xe)&&(K.tileScaleX=xe/1e5);let Oe=Number.parseInt(String(z["@_sy"]||""),10);Number.isFinite(Oe)&&(K.tileScaleY=Oe/1e5);let Ee=String(z["@_flip"]||"").trim();(Ee==="x"||Ee==="y"||Ee==="xy"||Ee==="none")&&(K.tileFlip=Ee);let fe=String(z["@_algn"]||"").trim();fe.length>0&&(K.tileAlignment=fe);}this.compatibilityService.inspectPictureCompatibility(U,N,r,n),this.compatibilityService.inspectShapeCompatibility(l,e["p:txBody"],r,n);let ee,j,re=B||O;if(re){let $e=this.slideRelsMap.get(r)?.get(re);$e&&($e.startsWith("http://")||$e.startsWith("https://")||$e.startsWith("data:")?(j=$e,ee=$e):(j=this.resolveImagePath(r,$e),this.eagerDecodeImages&&j&&(ee=await this.getImageData(j))));}let ne=e["p:style"]||s?.shape?.["p:style"]||s?.picture?.["p:style"],pe=on(e,"p:nvSpPr","p:cNvPr"),Q=this.slideRelsMap.get(r),{actionClick:ce,actionHover:ue}=this.parseElementActions(pe,Q,this.orderedSlidePaths);return {id:n,type:"picture",x:p,y:f,width:h,height:m,imageData:ee,imagePath:j,...H,...K,shapeType:E,shapeAdjustments:T,adjustmentHandles:D,pathData:M,pathWidth:P,pathHeight:R,shapeStyle:this.extractShapeStyle(l,ne),rotation:g,skewX:x,skewY:v,flipHorizontal:S,flipVertical:w,rawXml:e,actionClick:ce,actionHover:ue}}catch(o){return console.warn(`[pptx] Skipping shape-with-image-fill (${n}):`,o),null}}textVerticalAlignFromDrawingValue(e){let n=String(e??"").trim().toLowerCase();if(n.length!==0){if(n==="t"||n==="top")return "top";if(n==="ctr"||n==="center")return "middle";if(n==="b"||n==="bottom")return "bottom";if(n==="dist"||n==="just")return "middle"}}textDirectionFromDrawingValue(e){let n=String(e??"").trim().toLowerCase();if(!(n.length===0||n==="horz")){if(n==="vert")return "vertical";if(n==="vert270")return "vertical270";if(n==="eavert")return "eaVert";if(n==="wordartvert")return "wordArtVert";if(n==="wordartvertrtl")return "wordArtVertRtl";if(n==="mongolianvert")return "mongolianVert"}}},Z5e=class extends q5e{applyPlaceholderBodyDefaults(t,e){if(t.bodyInsetLeft===void 0&&e.bodyInsetLeft!==void 0&&(t.bodyInsetLeft=e.bodyInsetLeft),t.bodyInsetTop===void 0&&e.bodyInsetTop!==void 0&&(t.bodyInsetTop=e.bodyInsetTop),t.bodyInsetRight===void 0&&e.bodyInsetRight!==void 0&&(t.bodyInsetRight=e.bodyInsetRight),t.bodyInsetBottom===void 0&&e.bodyInsetBottom!==void 0&&(t.bodyInsetBottom=e.bodyInsetBottom),t.vAlign===void 0&&e.textAnchor){let n=this.textVerticalAlignFromDrawingValue(e.textAnchor);n&&(t.vAlign=n);}t.autoFit===void 0&&e.autoFit!==void 0&&(t.autoFit=e.autoFit),t.textWrap===void 0&&e.textWrap&&(t.textWrap=e.textWrap);}pointsToPixels(t){return t*(96/72)}parseParagraphSpacingPx(t){if(!t)return;let e=Number.parseInt(String(t["a:spcPts"]?.["@_val"]||""),10);if(Number.isFinite(e))return this.pointsToPixels(e/100)}parseLineSpacingMultiplier(t){if(!t)return;let e=Number.parseInt(String(t["a:spcPct"]?.["@_val"]||""),10);if(Number.isFinite(e))return Math.max(.1,Math.min(5,e/1e5))}parseLineSpacingExactPt(t){if(!t)return;let e=Number.parseInt(String(t["a:spcPts"]?.["@_val"]||""),10);if(Number.isFinite(e)&&e>0)return e/100}applyPlaceholderLevelDefaults(t,e){t.fontFamily===void 0&&e.fontFamily!==void 0&&(t.fontFamily=e.fontFamily),t.fontSize===void 0&&e.fontSize!==void 0&&(t.fontSize=e.fontSize),t.bold===void 0&&e.bold!==void 0&&(t.bold=e.bold),t.italic===void 0&&e.italic!==void 0&&(t.italic=e.italic),t.color===void 0&&e.color!==void 0&&(t.color=e.color),t.paragraphMarginLeft===void 0&&e.marginLeft!==void 0&&(t.paragraphMarginLeft=e.marginLeft),t.paragraphIndent===void 0&&e.indent!==void 0&&(t.paragraphIndent=e.indent),t.lineSpacing===void 0&&t.lineSpacingExactPt===void 0&&(e.lineSpacing!==void 0?t.lineSpacing=e.lineSpacing:e.lineSpacingExactPt!==void 0&&(t.lineSpacingExactPt=e.lineSpacingExactPt)),t.paragraphSpacingBefore===void 0&&e.spaceBefore!==void 0&&(t.paragraphSpacingBefore=e.spaceBefore),t.paragraphSpacingAfter===void 0&&e.spaceAfter!==void 0&&(t.paragraphSpacingAfter=e.spaceAfter),t.align===void 0&&e.alignment!==void 0&&(t.align=e.alignment);}},J5e=class extends Z5e{resolveParagraphBulletInfo(t,e,n,r,o=false,i){if(!t)return null;let s=t["a:pPr"];if(s?.["a:buNone"])return {none:true};let a=Number.parseInt(String(s?.["@_lvl"]||"0"),10),l=Number.isFinite(a)?Math.min(Math.max(a+1,1),9):1,c=`a:lvl${l}pPr`,u=Rt(Rt(r,"a:lstStyle"),c),d=Rt(Rt(n,"a:lstStyle"),c),p=on(n,"a:lstStyle","a:defPPr"),f=on(r,"a:lstStyle","a:defPPr"),h=[s,d,u,p,f],m;for(let N of h)if(N){if(N["a:buNone"])return {none:true};if(N["a:buChar"]||N["a:buAutoNum"]||N["a:buBlip"]||N["a:buFontTx"]!==void 0||N["a:buClrTx"]!==void 0||N["a:buSzTx"]!==void 0){m=N;break}}if(!m){if(o){let N=this.presentationDefaultTextStyle?.levelStyles?.[l-1]??this.presentationDefaultTextStyle?.levelStyles?.[-1];return this.createBulletInfoFromLevelStyle(N,e)}return null}let g=m["a:buFont"],x=g?.["@_typeface"]?String(g["@_typeface"]):void 0,v=m["a:buFontTx"]!==void 0,S=m["a:buSzPct"],w;if(S?.["@_val"]!==void 0){let N=Number.parseInt(String(S["@_val"]),10);Number.isFinite(N)&&(w=N/1e3);}let C=m["a:buSzPts"],T;if(C?.["@_val"]!==void 0){let N=Number.parseInt(String(C["@_val"]),10);Number.isFinite(N)&&(T=N/100);}let E=m["a:buSzTx"]!==void 0,M=m["a:buClr"],P,R;M&&(P=this.parseColor(M),R=cb(M));let k=m["a:buClrTx"]!==void 0,L=String(m["a:buChar"]?.["@_char"]||"");if(L.length>0)return {char:L,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{},...v?{fontInherit:true}:{},...k?{colorInherit:true}:{},...E?{sizeInherit:true}:{}};let D=m["a:buAutoNum"];if(D){let N=D["@_type"]?String(D["@_type"]):void 0,B=Number.parseInt(String(D["@_startAt"]||"1"),10),O=Number.isFinite(B)?B:1;return {autoNumType:N,autoNumStartAt:O,paragraphIndex:e,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{},...v?{fontInherit:true}:{},...k?{colorInherit:true}:{},...E?{sizeInherit:true}:{}}}let U=m["a:buBlip"];if(U){let N=U["a:blip"],B=N?.["@_r:embed"]?String(N["@_r:embed"]):void 0,O={...U};if(B&&i){let z=this.slideRelsMap.get(i)?.get(B),K;if(z)if(z.startsWith("http://")||z.startsWith("https://")||z.startsWith("data:"))K=z;else {let ee=this.resolveImagePath(i,z);ee&&(K=this.imageDataCache?.get(ee));}return {imageRelId:B,imageDataUrl:K,imageBlipFillXml:O,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{}}}return {imageBlipFillXml:O,fontFamily:x,sizePercent:w,sizePts:T,color:P,...R?{colorXml:R}:{}}}return null}createBulletInfoFromLevelStyle(t,e){return t?t.bulletNone?{none:true}:t.bulletChar&&t.bulletChar.length>0?{char:t.bulletChar,fontFamily:t.bulletFontFamily,sizePercent:t.bulletSizePercent,sizePts:t.bulletSizePts,color:t.bulletColor}:t.bulletAutoNumType&&t.bulletAutoNumType.length>0?{autoNumType:t.bulletAutoNumType,autoNumStartAt:1,paragraphIndex:e,fontFamily:t.bulletFontFamily,sizePercent:t.bulletSizePercent,sizePts:t.bulletSizePts,color:t.bulletColor}:null:null}formatAutoNumber(t,e){let n=(i,s)=>{let a=(i-1)%26;return String.fromCharCode((s?65:97)+a)},r=(i,s)=>{let a=[1e3,900,500,400,100,90,50,40,10,9,5,4,1],l=["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"],c="",u=Math.max(1,Math.min(i,3999));for(let d=0;d<a.length;d++)for(;u>=a[d];)c+=l[d],u-=a[d];return s?c:c.toLowerCase()},o=(i,s)=>i<0||i>9?`${i}`:s==="black"?i===0?"\u24EB":String.fromCodePoint(9451+i):i===0?"\u24EA":String.fromCodePoint(9311+i);switch(t){case "arabicPeriod":case "arabicDbPeriod":return `${e}. `;case "arabicParenR":return `${e}) `;case "arabicParenBoth":return `(${e}) `;case "arabicPlain":case "arabicDbPlain":return `${e} `;case "alphaLcPeriod":return `${n(e,false)}. `;case "alphaUcPeriod":return `${n(e,true)}. `;case "alphaLcParenR":return `${n(e,false)}) `;case "alphaUcParenR":return `${n(e,true)}) `;case "alphaLcParenBoth":return `(${n(e,false)}) `;case "alphaUcParenBoth":return `(${n(e,true)}) `;case "romanLcPeriod":return `${r(e,false)}. `;case "romanUcPeriod":return `${r(e,true)}. `;case "romanLcParenR":return `${r(e,false)}) `;case "romanUcParenR":return `${r(e,true)}) `;case "romanLcParenBoth":return `(${r(e,false)}) `;case "romanUcParenBoth":return `(${r(e,true)}) `;case "circleNumDbPlain":case "circleNumWdWhitePlain":return `${o(e,"std")} `;case "circleNumWdBlackPlain":return `${o(e,"black")} `;default:return `${e}. `}}},Q5e=class fO extends J5e{parseShapeLocks(e){if(!e)return;let n={},r=false,o=s=>{let a=e[s];if(a===void 0)return;let l=String(a).trim().toLowerCase();return l==="1"||l==="true"},i=(s,a)=>{let l=o(s);l!==void 0&&(a(l),r=true);};return i("@_noGrp",s=>{n.noGrouping=s;}),i("@_noRot",s=>{n.noRotation=s;}),i("@_noMove",s=>{n.noMove=s;}),i("@_noResize",s=>{n.noResize=s;}),i("@_noTextEdit",s=>{n.noTextEdit=s;}),i("@_noSelect",s=>{n.noSelect=s;}),i("@_noChangeAspect",s=>{n.noChangeAspect=s;}),i("@_noEditPoints",s=>{n.noEditPoints=s;}),i("@_noAdjustHandles",s=>{n.noAdjustHandles=s;}),i("@_noChangeArrowheads",s=>{n.noChangeArrowheads=s;}),i("@_noChangeShapeType",s=>{n.noChangeShapeType=s;}),r?n:void 0}applyBodyProperties(e,n,r){let o={},i=e?.["a:linkedTxbx"]??n?.["a:linkedTxbx"];if(i){let T=Number.parseInt(String(i["@_id"]||""),10),E=Number.parseInt(String(i["@_seq"]||"0"),10);Number.isFinite(T)&&(o.linkedTxbxId=T,o.linkedTxbxSeq=Number.isFinite(E)?E:0);}if(!e)return o;let s=this.textVerticalAlignFromDrawingValue(e["@_anchor"]);s&&(r.vAlign=s);let a=this.textDirectionFromDrawingValue(e["@_vert"]);a&&(r.textDirection=a);let l=this.normalizeTextColumnCount(e["@_numCol"]);l&&l>1&&(r.columnCount=l);let c=parseInt(String(e["@_spcCol"]||""),10);Number.isFinite(c)&&c>0&&(r.columnSpacing=c/fO.EMU_PER_PX);let u=e["@_horzOverflow"]??e["@_hOverflow"],d=String(u||"").trim();(d==="overflow"||d==="clip")&&(r.hOverflow=d);let p=String(e["@_vertOverflow"]||"").trim();(p==="overflow"||p==="clip"||p==="ellipsis")&&(r.vertOverflow=p);let f=e["a:prstTxWarp"];if(f){let T=String(f["@_prst"]||"").trim();T.length>0&&T!=="textNoShape"&&(r.textWarpPreset=T);let E=f["a:avLst"];if(E){let M=E["a:gd"],P=Array.isArray(M)?M:M?[M]:[];for(let R of P){let k=R,L=String(k["@_name"]||"").trim(),U=String(k["@_fmla"]||"").trim().match(/^val\s+(-?\d+)$/);if(!U)continue;let N=parseInt(U[1],10);Number.isFinite(N)&&(L==="adj"?r.textWarpAdj=N:L==="adj2"&&(r.textWarpAdj2=N));}}}let h=e["a:sp3d"];if(h){let T=h["a:bevelT"],E=h["a:bevelB"],M={};h["@_extrusionH"]!==null&&(M.extrusionHeight=parseInt(String(h["@_extrusionH"]),10));let P=this.parseColor(h["a:extrusionClr"]);P&&(M.extrusionColor=P);let R=String(h["@_prstMaterial"]||"").trim();R&&(M.presetMaterial=R),T&&(M.bevelTopType=String(T["@_prst"]||"circle").trim(),T["@_w"]!==null&&(M.bevelTopWidth=parseInt(String(T["@_w"]),10)),T["@_h"]!==null&&(M.bevelTopHeight=parseInt(String(T["@_h"]),10))),E&&(M.bevelBottomType=String(E["@_prst"]||"circle").trim(),E["@_w"]!==null&&(M.bevelBottomWidth=parseInt(String(E["@_w"]),10)),E["@_h"]!==null&&(M.bevelBottomHeight=parseInt(String(E["@_h"]),10))),Object.keys(M).length>0&&(r.text3d=M);}let m=e["a:scene3d"];if(m){let T=m["a:camera"],E=m["a:lightRig"],M={},P=String(T?.["@_prst"]||"").trim();if(P&&(M.cameraPreset=P),T){let L=T["a:rot"];if(L){let D=parseInt(String(L["@_lat"]||""),10);Number.isFinite(D)&&(M.cameraRotX=D);let U=parseInt(String(L["@_lon"]||""),10);Number.isFinite(U)&&(M.cameraRotY=U);let N=parseInt(String(L["@_rev"]||""),10);Number.isFinite(N)&&(M.cameraRotZ=N);}}let R=String(E?.["@_rig"]||"").trim();R&&(M.lightRigType=R);let k=String(E?.["@_dir"]||"").trim();k&&(M.lightRigDirection=k),Object.keys(M).length>0&&(r.textBodyScene3d=M);}if(e["a:spAutoFit"]!==void 0)r.autoFit=true,r.autoFitMode="shrink";else if(e["a:normAutofit"]!==void 0){r.autoFit=true,r.autoFitMode="normal";let T=parseInt(String(e["a:normAutofit"]?.["@_fontScale"]||""),10);Number.isFinite(T)&&T>0&&(r.autoFitFontScale=T/1e5);let E=parseInt(String(e["a:normAutofit"]?.["@_lnSpcReduction"]||""),10);Number.isFinite(E)&&E>0&&(r.autoFitLineSpacingReduction=E/1e5);}else e["a:noAutofit"]!==void 0&&(r.autoFit=false,r.autoFitMode="none");let g=String(e["@_wrap"]||"").trim().toLowerCase();g==="none"?r.textWrap="none":g==="square"&&(r.textWrap="square");let x=T=>{let E=e[T];if(E===void 0)return;let M=Number.parseInt(String(E),10);return Number.isFinite(M)?M/fO.EMU_PER_PX:void 0},v=x("@_lIns");v!==void 0&&(r.bodyInsetLeft=v);let S=x("@_tIns");S!==void 0&&(r.bodyInsetTop=S);let w=x("@_rIns");w!==void 0&&(r.bodyInsetRight=w);let C=x("@_bIns");return C!==void 0&&(r.bodyInsetBottom=C),UQ(e,r),o}selectAlternateContentBranch(e){return i4(e)}},eLe=class xh extends Q5e{resolveShapeParagraphStyle(e,n,r){let o=e["a:pPr"],i=this.parseOptionalBooleanAttr(o?.["@_rtl"]);i!==void 0&&n.rtl===void 0&&(n.rtl=i);let s=i?"right":"left";if(o?.["@_algn"]&&(s={l:"left",ctr:"center",r:"right",just:"justify",justify:"justify",justLow:"justLow",dist:"dist",thaiDist:"thaiDist"}[o["@_algn"]]||"left",n.align||(n.align=s)),n.paragraphSpacingBefore===void 0){let v=this.parseParagraphSpacingPx(o?.["a:spcBef"]);v!==void 0&&(n.paragraphSpacingBefore=v);}if(n.paragraphSpacingAfter===void 0){let v=this.parseParagraphSpacingPx(o?.["a:spcAft"]);v!==void 0&&(n.paragraphSpacingAfter=v);}if(n.lineSpacing===void 0&&n.lineSpacingExactPt===void 0){let v=o?.["a:lnSpc"],S=this.parseLineSpacingMultiplier(v);if(S!==void 0)n.lineSpacing=S;else {let w=this.parseLineSpacingExactPt(v);w!==void 0&&(n.lineSpacingExactPt=w);}}if(n.paragraphMarginLeft===void 0&&o?.["@_marL"]!==void 0){let v=Number.parseInt(String(o["@_marL"]),10);Number.isFinite(v)&&(n.paragraphMarginLeft=v/xh.EMU_PER_PX);}if(n.paragraphMarginRight===void 0&&o?.["@_marR"]!==void 0){let v=Number.parseInt(String(o["@_marR"]),10);Number.isFinite(v)&&(n.paragraphMarginRight=v/xh.EMU_PER_PX);}if(n.paragraphIndent===void 0&&o?.["@_indent"]!==void 0){let v=Number.parseInt(String(o["@_indent"]),10);Number.isFinite(v)&&(n.paragraphIndent=v/xh.EMU_PER_PX);}if(!n.tabStops){let v=o?.["a:tabLst"];if(v){let S=this.ensureArray(v["a:tab"]);S.length>0&&(n.tabStops=S.filter(w=>w?.["@_pos"]!==void 0).map(w=>{let C=Number.parseInt(String(w["@_pos"]),10),T=Number.isFinite(C)?C/xh.EMU_PER_PX:0,E=String(w["@_algn"]||"l").trim(),M=E==="ctr"||E==="r"||E==="dec"?E:"l",P=String(w["@_leader"]||"").trim(),R=P==="dot"||P==="hyphen"||P==="underscore"?P:void 0;return {position:T,align:M,...R?{leader:R}:{}}}));}}if(o?.["@_defTabSz"]!==void 0&&n.defaultTabSize===void 0){let v=Number.parseInt(String(o["@_defTabSz"]),10);Number.isFinite(v)&&(n.defaultTabSize=v/xh.EMU_PER_PX);}if(o?.["@_eaLnBrk"]!==void 0&&n.eaLineBreak===void 0){let v=this.parseOptionalBooleanAttr(o["@_eaLnBrk"]);v!==void 0&&(n.eaLineBreak=v);}if(o?.["@_latinLnBrk"]!==void 0&&n.latinLineBreak===void 0){let v=this.parseOptionalBooleanAttr(o["@_latinLnBrk"]);v!==void 0&&(n.latinLineBreak=v);}if(o?.["@_fontAlgn"]!==void 0&&n.fontAlignment===void 0){let v=String(o["@_fontAlgn"]).trim();v&&(n.fontAlignment=v);}if(o?.["@_hangingPunct"]!==void 0&&n.hangingPunctuation===void 0){let v=this.parseOptionalBooleanAttr(o["@_hangingPunct"]);v!==void 0&&(n.hangingPunctuation=v);}let a=this.extractTextRunStyle(o?.["a:defRPr"],s,r.slideRelationshipMap),l=Number.parseInt(String(o?.["@_lvl"]||"0"),10),c=`a:lvl${Number.isFinite(l)?Math.min(Math.max(l+1,1),9):1}pPr`,u=this.extractTextRunStyle(r.inheritedTxBody?.["a:lstStyle"]?.[c]?.["a:defRPr"],s,r.slideRelationshipMap),d=this.extractTextRunStyle(r.txBody?.["a:lstStyle"]?.[c]?.["a:defRPr"],s,r.slideRelationshipMap),p=this.extractTextRunStyle(e?.["a:endParaRPr"],s,r.slideRelationshipMap),f={...r.bodyDefaultRunStyle,...u,...d,...p,...a};if(r.effectiveLevelStyles){let v=Number.isFinite(l)?Math.min(Math.max(l,0),8):0,S=r.effectiveLevelStyles[v]??r.effectiveLevelStyles[-1];S&&(this.applyPlaceholderLevelDefaults(f,S),this.applyPlaceholderLevelDefaults(n,S));}let h=o?.["@_marL"]!==void 0?Number.parseInt(String(o["@_marL"]),10)/xh.EMU_PER_PX:void 0,m=o?.["@_indent"]!==void 0?Number.parseInt(String(o["@_indent"]),10)/xh.EMU_PER_PX:void 0,g=h,x=m;if(r.effectiveLevelStyles){let v=Number.isFinite(l)?Math.min(Math.max(l,0),8):0,S=r.effectiveLevelStyles[v]??r.effectiveLevelStyles[-1];S&&(g===void 0&&S.marginLeft!==void 0&&(g=S.marginLeft),x===void 0&&S.indent!==void 0&&(x=S.indent));}return {paraAlign:s,mergedDefaultRunStyle:f,indent:{marginLeft:g,indent:x}}}},tLe=class extends eLe{collectShapeParagraphContent(t,e,n,r,o,i){let s=[],a=[],l,c=S=>{l||(l={...S});},u=i.placeholderInfo?.type==="body"||i.placeholderInfo?.type==="obj",d=this.resolveParagraphBulletInfo(t,e,i.txBody,i.inheritedTxBody,u,i.slidePath);if(d&&!d.none){let S;if(d.char)S=`${d.char} `;else if(d.autoNumType){let w=d.autoNumStartAt??1;S=this.formatAutoNumber(d.autoNumType,w+e);}else d.imageRelId?S="\u{1F4CE} ":S="\u2022 ";s.push(S),a.push({text:S,style:{...o},bulletInfo:d}),c(o);}let p=(S,w)=>{let C={...o,...this.extractTextRunStyle(w,r,i.slideRelationshipMap)};s.push(S),a.push({text:S,style:C}),c(C);},f=S=>{if(!S)return;let w=S["a:ruby"];if(w){let T=this.parseRubyElement(w,S["a:rPr"],r,o,i.slideRelationshipMap);if(T){s.push(T.text),a.push(T),c(T.style);return}}let C=typeof S["a:t"]=="string"?S["a:t"]:S["a:t"]!==void 0?String(S["a:t"]):"";p(C,S["a:rPr"]);},h=S=>{if(!S)return;let w=typeof S["a:t"]=="string"?S["a:t"]:S["a:t"]!==void 0?String(S["a:t"]):"",C={...o,...this.extractTextRunStyle(S["a:rPr"],r,i.slideRelationshipMap)},T=String(S["@_type"]||"").trim()||void 0,E=String(S["@_uuid"]||S["@_id"]||"").trim()||void 0;s.push(w),a.push({text:w,style:C,fieldType:T,fieldGuid:E}),c(C);},m=S=>{if(!S)return;let w="[Equation]";s.push(w),a.push({text:w,style:{...o},equationXml:S});},g=S=>{let w=this.selectAlternateContentBranch(S);if(!w)return;let C=w["a14:m"]??w["m:oMathPara"]??w["m:oMath"];if(C){m(C);return}let T=this.ensureArray(w["a:r"]);for(let M of T)f(M);let E=this.ensureArray(w["a:fld"]);for(let M of E)h(M);},x=new Set(["a:r","a:fld","a:t","a14:m","m:oMathPara","m:oMath","mc:AlternateContent","a:br"]);for(let S of Object.keys(t)){if(!x.has(S))continue;let w=this.ensureArray(t[S]);for(let C of w)switch(S){case "a:r":f(C);break;case "a:fld":h(C);break;case "a:t":{let T=typeof C=="string"?C:C!==void 0?String(C):"";p(T,t["a:rPr"]);break}case "a14:m":case "m:oMathPara":case "m:oMath":m(C);break;case "mc:AlternateContent":g(C);break;case "a:br":{let E=(C??{})["a:rPr"],M={...o,...this.extractTextRunStyle(E,r,i.slideRelationshipMap)};s.push(`
272
272
  `);let P={text:`
273
273
  `,style:M,isLineBreak:true};E&&typeof E=="object"&&(P.breakRunProperties={...E}),a.push(P);break}}}e<n-1&&(s.push(`
274
274
  `),a.push({text:`