pptx-vanilla-viewer 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  `),m.control.checked=g.style?.hasLegend??false,c.control.checked=g.style?.hasDataLabels??false,u.update(g),x.update(g));}}}function Dd(e,t,n){let o=e.createElement("label");o.textContent=n;let r=e.createElement("input");return r.type=t,o.appendChild(r),{label:o,control:r}}function Pd(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=4,n.appendChild(o),{label:n,control:o}}function Ad(e,t){return Dd(e,"checkbox",t)}function kd(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function Ox(e){let[t,n=""]=e.split(":",2);return {name:t.trim(),values:n.split(",").map(Number).filter(Number.isFinite)}}function Id(e,t,n){let o=e.createElement("option");o.value=n,o.textContent=n,t.appendChild(o);}function Md(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comments"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-list");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"p","pptxv-inspector-empty");i.textContent=t("pptx.comments.noComments"),o.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-add"),p=e.createElement("textarea");p.className="pptxv-inspector-comment-input",p.rows=2,p.placeholder=t("pptx.comments.addCommentPlaceholder"),p.setAttribute("aria-label",t("pptx.comments.addComment"));let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-inspector-deck-btn");s.type="button",s.textContent=t("pptx.comments.addComment"),s.addEventListener("click",()=>{let f=p.value.trim();f&&(n.addComment(f),p.value="");}),a.append(p,s),o.appendChild(a);let l=null,m="",c=null,u="",x=new Set,g=null,v=()=>{let f=g;f&&(i.hidden=f.comments.length>0,a.hidden=!f.editable,r.replaceChildren(...f.comments.map(C=>S(C,f.editable,0))));},h=(f,C)=>{let y=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-inspector-comment-action");return y.type="button",y.textContent=f,y.addEventListener("click",C),y},b=(f,C,y)=>{let P=e.createElement("textarea");return P.className="pptxv-inspector-comment-input",P.rows=2,P.value=f,P.placeholder=C,P.addEventListener("input",()=>y(P.value)),P},T=f=>{let C=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-edit"),y=b(m,"",E=>{m=E;});y.setAttribute("aria-label",t("pptx.comments.edit"));let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-actions");return P.append(h(t("pptx.comments.save"),()=>{m.trim()&&n.editComment(f.id,m.trim()),l=null,v();}),h(t("pptx.comments.cancel"),()=>{l=null,v();})),C.append(y,P),C},k=f=>{let C=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-reply-form"),y=b(u,t("pptx.comments.replyPlaceholder",{author:f.author||t("pptx.comments.unknownAuthor")}),E=>{u=E;});y.setAttribute("aria-label",t("pptx.comments.reply"));let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-actions");return P.append(h(t("pptx.comments.addReply"),()=>{u.trim()&&n.addCommentReply(f.id,u.trim()),c=null,u="",v();}),h(t("pptx.comments.cancel"),()=>{c=null,v();})),C.append(y,P),C},S=(f,C,y)=>{let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment");P.classList.toggle("is-resolved",f.resolved===true),P.classList.toggle("is-reply",y>0);let E=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-meta");if(E.textContent=f.author||t("pptx.comments.unknownAuthor"),f.resolved){let A=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-comment-badge");A.textContent=t("pptx.comments.resolved"),E.appendChild(A);}if(P.appendChild(E),l===f.id)P.appendChild(T(f));else {let A=chunkS5V27BHI_cjs.Ke(e,"p","pptxv-inspector-comment-text");if(A.textContent=f.text,P.appendChild(A),C){let I=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-actions");I.appendChild(h(t("pptx.comments.edit"),()=>{l=f.id,m=f.text,v();})),y===0&&I.appendChild(h(t("pptx.comments.reply"),()=>{c=f.id,u="",v();})),I.append(h(t(f.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>n.toggleCommentResolved(f.id)),h(t("pptx.comments.delete"),()=>n.deleteComment(f.id))),P.appendChild(I);}}let w=f.replies??[];if(w.length>0){let A=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-inspector-comment-replies-toggle");if(A.type="button",A.textContent=t("pptx.comments.repliesCount",{count:w.length}),A.setAttribute("aria-expanded",String(!x.has(f.id))),A.addEventListener("click",()=>{x.has(f.id)?x.delete(f.id):x.add(f.id),v();}),P.appendChild(A),!x.has(f.id)){let I=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-comment-replies");I.append(...w.map(H=>S(H,C,y+1))),P.appendChild(I);}}return c===f.id&&P.appendChild(k(f)),P};return {el:o,update(f){g=f,v();}}}function we(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-section"),o=chunkS5V27BHI_cjs.Ke(e,"h4","pptxv-inspector-section-title");o.textContent=t,n.appendChild(o);let r=chunkS5V27BHI_cjs.Ke(e,"div");return n.appendChild(r),{el:n,body:r}}function Ie(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-row"),o=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-row-label");o.textContent=t;let r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-row-value");return n.append(o,r),{el:n,value:r}}function lt(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-inspector-deck-btn");return o.type="button",o.textContent=t,o.addEventListener("click",n),o}function xe(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-field pptxv-field-select"),o=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=e.createElement("select");r.className="pptxv-field-select-input",r.setAttribute("aria-label",t.label);for(let i of t.options){let a=e.createElement("option");a.value=i.value,a.textContent=i.label,r.appendChild(a);}return r.addEventListener("change",()=>t.onChange(r.value)),n.appendChild(r),{el:n,setValue(i){r.value=i;},setDisabled(i){r.disabled=i;}}}function $(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-field pptxv-field-checkbox"),o=e.createElement("input");o.type="checkbox",o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>t.onChange(o.checked));let r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-field-label");return r.textContent=t.label,n.append(o,r),{el:n,setValue(i){o.checked=i;},setDisabled(i){o.disabled=i;}}}function re(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-field pptxv-field-range"),o=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-field-range-row"),i=e.createElement("input");i.type="range",i.min=String(t.min),i.max=String(t.max),i.step=String(t.step??1),i.setAttribute("aria-label",t.label);let a=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-field-range-readout"),p=t.formatValue??(l=>String(l)),s=()=>{a.textContent=p(Number.parseFloat(i.value));};return i.addEventListener("input",()=>{s(),t.onInput?.(Number.parseFloat(i.value));}),i.addEventListener("change",()=>t.onCommit(Number.parseFloat(i.value))),r.append(i,a),n.appendChild(r),{el:n,setValue(l){e.activeElement!==i&&(i.value=String(l),s());},setDisabled(l){i.disabled=l;}}}function Hd(e,t,n){let{el:o,body:r}=we(e,t("pptx.slideInspector.presentation")),i,a=xe(e,{label:t("pptx.presentationSettings.showType"),options:[{value:"presented",label:t("pptx.presentationSettings.showTypePresented")},{value:"browsed",label:t("pptx.presentationSettings.showTypeBrowsed")},{value:"kiosk",label:t("pptx.presentationSettings.showTypeKiosk")}],onChange:x=>n.updatePresentationSettings({showType:x})}),p=$(e,{label:t("pptx.presentationSettings.loopContinuously"),onChange:x=>n.updatePresentationSettings({loopContinuously:x})}),s=$(e,{label:t("pptx.presentationSettings.showNarration"),onChange:x=>n.updatePresentationSettings({showWithNarration:x})}),l=$(e,{label:t("pptx.presentationSettings.showAnimation"),onChange:x=>n.updatePresentationSettings({showWithAnimation:x})}),m=$(e,{label:t("pptx.presentationSettings.frameSlides"),onChange:x=>n.updatePresentationSettings({printProperties:chunkS5V27BHI_cjs.Tb(i,x)})}),c=e.createElement("input");c.type="number",c.min="1",c.max="16",c.className="pptxv-field-input",c.setAttribute("aria-label",t("pptx.presentationSettings.slidesPerPage")),c.addEventListener("change",()=>{let x=Number.parseInt(c.value,10);Number.isFinite(x)&&n.updatePresentationSettings({printProperties:chunkS5V27BHI_cjs.Ub(i,x)});});let u=Ie(e,t("pptx.presentationSettings.slidesPerPage"));return u.value.appendChild(c),r.append(a.el,p.el,s.el,l.el,m.el,u.el),{el:o,update(x){let g=x.presentationProperties;i=g.printProperties,a.setValue(g.showType??"presented"),p.setValue(!!g.loopContinuously),s.setValue(g.showWithNarration!==false),l.setValue(g.showWithAnimation!==false),m.setValue(chunkS5V27BHI_cjs.Sb(g.printProperties)),e.activeElement!==c&&(c.value=String(chunkS5V27BHI_cjs.Rb(g.printProperties)));for(let v of [a,p,s,l,m])v.setDisabled(!x.editable);c.disabled=!x.editable;}}}var Dn={bg1:"Background 1",tx1:"Text 1",bg2:"Background 2",tx2:"Text 2",accent1:"Accent 1",accent2:"Accent 2",accent3:"Accent 3",accent4:"Accent 4",accent5:"Accent 5",accent6:"Accent 6",hlink:"Hyperlink",folHlink:"Followed Hyperlink"};function Rd(e,t,n){let{el:o,body:r}=we(e,t("pptx.documentProperties.themeHeading")),i=e.createElement("select");i.className="pptxv-field-select-input pptxv-inspector-theme-select",i.setAttribute("aria-label",t("pptx.documentProperties.themeHeading")),r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-deck-btn-row"),p=lt(e,t("pptx.documentProperties.applyFirstMaster"),()=>n.applyThemeByPath(i.value,false)),s=lt(e,t("pptx.documentProperties.applyAllMasters"),()=>n.applyThemeByPath(i.value,true));a.append(p,s),r.appendChild(a);let l="";return {el:o,update(m){let c=m.themeOptions.map(x=>x.path).join(`
4
4
  `);if(c!==l){l=c;let x=i.value;if(i.replaceChildren(),m.themeOptions.length===0){let g=e.createElement("option");g.value="",g.textContent=t("pptx.documentProperties.noThemesOption"),i.appendChild(g);}else {for(let g of m.themeOptions){let v=e.createElement("option");v.value=g.path,v.textContent=g.name||g.path.split("/").pop()||g.path,i.appendChild(v);}m.themeOptions.some(g=>g.path===x)&&(i.value=x);}}i.disabled=m.themeOptions.length===0;let u=!m.editable||!i.value;p.disabled=u,s.disabled=u;}}}function Od(e,t,n){let{el:o,body:r}=we(e,t("pptx.themeOverride.heading")),i,a=u=>{let x=i?.activeSlide;if(!x)return;if(!i?.colorScheme){n.updateActiveSlide({clrMapOverride:u});return}let g=chunkEWJAZ6TW_cjs.Ig(x,i.colorScheme,u);n.updateActiveSlide({clrMapOverride:g.clrMapOverride,backgroundColor:g.backgroundColor,elements:g.elements});},p=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-field pptxv-field-checkbox"),s=e.createElement("input");s.type="checkbox",s.setAttribute("aria-label",t("pptx.themeOverride.enableOverride")),s.addEventListener("change",()=>{s.checked?a({...chunkEWJAZ6TW_cjs.Ze}):a(void 0);});let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-field-label");l.textContent=t("pptx.themeOverride.enableOverride"),p.append(s,l),r.appendChild(p);let m=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-override-rows");r.appendChild(m);let c=(u,x,g)=>{let v=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-override-row"),h=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-row-label");h.textContent=Dn[u],h.title=Dn[u];let b=x[u]??chunkEWJAZ6TW_cjs.Ze[u],T=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-override-swatch"),k=i?.colorScheme?.[b];typeof k=="string"&&k&&(T.style.backgroundColor=`#${k.replace(/^#/u,"")}`);let S=e.createElement("select");S.className="pptxv-field-select-input",S.setAttribute("aria-label",Dn[u]);for(let f of chunkEWJAZ6TW_cjs.l){let C=e.createElement("option");C.value=f,C.textContent=f,S.appendChild(C);}return S.value=b,S.disabled=!g,S.addEventListener("change",()=>{let f={...x,[u]:S.value};for(let C of chunkEWJAZ6TW_cjs.Ye)f[C]||(f[C]=chunkEWJAZ6TW_cjs.Ze[C]);a(f);}),v.append(h,T,S),v};return {el:o,update(u){i=u,o.hidden=!u.activeSlide;let x=u.activeSlide?.clrMapOverride;if(s.checked=x!==void 0,s.disabled=!u.editable,m.replaceChildren(),x)for(let g of chunkEWJAZ6TW_cjs.Ye)m.appendChild(c(g,x,u.editable));}}}function Fx(e,t,n){let{el:o,body:r}=we(e,t("pptx.slideSize.title")),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-grid");r.appendChild(i);let a={width:0,height:0},p=Y(e,{label:"W",min:1,onCommit:l=>n.updateCanvasSize({width:l,height:a.height})}),s=Y(e,{label:"H",min:1,onCommit:l=>n.updateCanvasSize({width:a.width,height:l})});return i.append(p.el,s.el),{el:o,update(l){a=l.canvasSize,p.setValue(l.canvasSize.width),s.setValue(l.canvasSize.height),p.setDisabled(!l.editable),s.setDisabled(!l.editable);}}}function Bx(e,t){let{el:n,body:o}=we(e,t("pptx.documentProperties.notesHandoutHeading")),r=Ie(e,t("pptx.documentProperties.notesSize")),i=Ie(e,t("pptx.master.notesMasterTitle")),a=Ie(e,t("pptx.master.handoutMasterTitle"));o.append(r.el,i.el,a.el);let p=t("pptx.digitalSignatures.notAvailable"),s=l=>l===void 0?p:`${l} ${t("pptx.notesMaster.placeholders")}`;return {el:n,update(l){r.value.textContent=l.notesCanvasSize?`${l.notesCanvasSize.width} \xD7 ${l.notesCanvasSize.height}px`:p,i.value.textContent=s(l.notesPlaceholderCount),a.value.textContent=s(l.handoutPlaceholderCount);}}}function Vx(e,t,n){let{el:o,body:r}=we(e,t("pptx.documentProperties.documentHeading")),i=Ie(e,t("pptx.properties.titleLabel")),a=Ie(e,t("pptx.properties.author")),p=lt(e,t("pptx.ribbon.documentProperties"),()=>n.openDocumentProperties());return r.append(i.el,a.el,p),{el:o,update(s){i.value.textContent=s.docTitle||"-",a.value.textContent=s.docAuthor||"-";}}}function Fd(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-deck"),r=[Hd(e,t,n),Rd(e,t,n),Od(e,t,n),Fx(e,t,n),Bx(e,t),Vx(e,t,n)];return o.append(...r.map(i=>i.el)),{el:o,update(i){for(let a of r)a.update(i);},setVisible(i){o.hidden=!i;}}}function Nx(e){return chunkEWJAZ6TW_cjs.j(e)&&e.text?e.text.slice(0,24):e.type}function Bd(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-elements"),r=chunkS5V27BHI_cjs.Ke(e,"h4","pptxv-inspector-section-title");r.textContent=t("pptx.inspector.layerOrder"),o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-layer-list");o.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"p","pptxv-inspector-empty");return a.textContent=t("pptx.selectionPane.empty"),o.appendChild(a),{el:o,update(p){i.replaceChildren(),a.hidden=p.elements.length>0,[...p.elements].reverse().forEach((s,l)=>{let m=p.elements.length-l-1,c=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-inspector-layer-row");c.type="button",c.title=`${s.type}: ${s.id}`,c.classList.toggle("is-selected",p.selectedIds.includes(s.id));let u=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-layer-num");u.textContent=String(m+1);let x=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-layer-label");x.textContent=Nx(s),c.append(u,x),c.addEventListener("click",()=>n(s.id)),i.appendChild(c);});}}}var zx=[{label:"Accent",patch:{fillColor:"#4472c4",strokeColor:"#2f5597",strokeWidth:1}},{label:"Subtle",patch:{fillColor:"#f2f2f2",strokeColor:"#a6a6a6",strokeWidth:1}},{label:"Outline",patch:{fillColor:"transparent",strokeColor:"#4472c4",strokeWidth:2}},{label:"Dark",patch:{fillColor:"#262626",strokeColor:"#000000",strokeWidth:1}}];function Vd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-shape-effects";let r=e.createElement("div");for(let S of zx){let f=e.createElement("button");f.type="button",f.textContent=S.label,f.addEventListener("click",()=>n.setShapeStyle(S.patch)),r.appendChild(f);}o.appendChild(r);let i=e.createElement("select");for(let S of chunkS5V27BHI_cjs._c){let f=e.createElement("option");f.value=S.type,f.textContent=t(S.i18nKey),i.appendChild(f);}i.addEventListener("change",()=>n.setShapeType(i.value)),o.appendChild(i);let a=(S,f)=>{let C=e.createElement("label");C.textContent=S,C.appendChild(f),o.appendChild(C);},p=(S,f)=>{let C=e.createElement("input");return C.type="number",C.min="0",C.addEventListener("change",()=>n.setShapeStyle({[f]:Number(C.value)})),a(S,C),C},s=(S,f)=>{let C=e.createElement("input");return C.type="color",C.addEventListener("input",()=>n.setShapeStyle({[f]:C.value})),a(S,C),C},l=s(t("pptx.textEffects.shadowColor"),"shadowColor"),m=p(t("pptx.textEffects.blur"),"shadowBlur"),c=p(t("pptx.shape.shadowDistance"),"shadowDistance"),u=s(t("pptx.textEffects.glowColor"),"glowColor"),x=p(t("pptx.textEffects.glow"),"glowRadius"),g=p(t("pptx.shape.softEdges"),"softEdgeRadius"),v=e.createElement("input");v.type="checkbox",v.addEventListener("change",()=>n.setShapeStyle({reflectionStartOpacity:v.checked?.5:void 0})),a(t("pptx.textEffects.reflection"),v);let h=(S,f)=>{let C=e.createElement("select");for(let P of ["none","triangle","stealth","diamond","oval","arrow"]){let E=e.createElement("option");E.value=P,E.textContent=P,C.appendChild(E);}C.addEventListener("change",()=>n.setShapeStyle({[f]:C.value==="none"?void 0:C.value}));let y=e.createElement("label");return y.textContent=S,y.appendChild(C),o.appendChild(y),C},b=h(t("pptx.connector.startArrow"),"connectorStartArrow"),T=h(t("pptx.connector.endArrow"),"connectorEndArrow"),k=[i,l,m,c,u,x,g,v,b,T];return {el:o,update(S){let f=S.shapeStyle??{};l.value=f.shadowColor??"#000000",m.value=String(f.shadowBlur??0),c.value=String(f.shadowDistance??0),u.value=f.glowColor??"#ffff00",x.value=String(f.glowRadius??0),g.value=String(f.softEdgeRadius??0),v.checked=!!f.reflectionStartOpacity,i.value=S.shapeType??"rect",i.hidden=!S.shapeType,b.value=f.connectorStartArrow??"none",T.value=f.connectorEndArrow??"none",b.parentElement.hidden=!S.isConnector,T.parentElement.hidden=!S.isConnector;for(let C of k)C.disabled=!S.canShape;for(let C of r.querySelectorAll("button"))C.disabled=!S.canShape;}}}function Nd(e){return `${Math.round(e*100)}%`}function zd(e,t,n,o){let r=n(t("pptx.shape.fillStroke")),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-row"),a=Fe(e,{label:t("pptx.inspector.fill"),onInput:o.setShapeFill},"#4f86ff"),p=Fe(e,{label:t("pptx.inspector.line"),onInput:o.setShapeStroke},"#1e3a8a"),s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-row-label");s.textContent=t("pptx.inspector.fill");let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-inspector-row-label");l.textContent=t("pptx.inspector.line"),i.append(s,a.el,l,p.el),r.appendChild(i);let m=Y(e,{label:t("pptx.ribbon.strokeWidth"),min:0,step:.5,onCommit:o.setShapeStrokeWidth});r.appendChild(m.el);let c=re(e,{label:t("pptx.strokeEffects.fillOpacity"),min:0,max:1,step:.01,formatValue:Nd,onCommit:o.setFillOpacity});r.appendChild(c.el);let u=re(e,{label:t("pptx.strokeEffects.strokeOpacity"),min:0,max:1,step:.01,formatValue:Nd,onCommit:o.setStrokeOpacity});r.appendChild(u.el);let x=$(e,{label:t("pptx.fill.gradient"),onChange(A){A?o.setGradientFill(f):o.setShapeFill(a.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(x.el);let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-gradient");r.appendChild(g);let v=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-row");g.appendChild(v);let h=D(e,{label:t("pptx.gradient.linear"),text:t("pptx.gradient.linear"),onClick:()=>o.setGradientFill({...f,type:"linear"})}),b=D(e,{label:t("pptx.gradient.radial"),text:t("pptx.gradient.radial"),onClick:()=>o.setGradientFill({...f,type:"radial"})});v.append(h.btn,b.btn);let T=Y(e,{label:t("pptx.gradient.angle"),min:0,max:360,onCommit:A=>o.setGradientFill({...f,angle:A})});g.appendChild(T.el);let k=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-gradient-stops");g.appendChild(k);let S=D(e,{label:t("pptx.gradient.addStop"),text:t("pptx.gradient.addStop"),onClick:()=>{let A=f.stops,I=A[A.length-1]?.position??100,H=A[A.length-2]?.position??0;o.addGradientStop("#ffffff",Math.round((I+H)/2));}});g.appendChild(S.btn);let f={type:"linear",angle:90,stops:[]},C=[],y=A=>{k.replaceChildren(),C=A.map((I,H)=>{let M=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-row"),O=Fe(e,{label:t("pptx.gradient.stops"),onInput:B=>o.updateGradientStop(H,{color:B})},I.color),L=Y(e,{label:t("pptx.gradient.position"),min:0,max:100,onCommit:B=>o.updateGradientStop(H,{position:B})});L.setValue(I.position);let R=D(e,{label:t("pptx.gradient.removeStop"),text:"\u2715",onClick:()=>o.removeGradientStop(H)});return R.setDisabled(A.length<=2),M.append(O.el,L.el,R.btn),k.appendChild(M),{color:O,position:L,remove:R}});},P=[a,p,m,c,u,x],E=[h,b,T,S],w=Vd(e,t,o);return r.appendChild(w.el),{el:r,update(A){r.hidden=!A.hasSelection||!A.canShape,a.setValue(A.fillColor),p.setValue(A.strokeColor),m.setValue(A.strokeWidth),c.setValue(A.fillOpacity),u.setValue(A.strokeOpacity),x.setValue(A.gradientEnabled),T.setValue(A.gradient.angle),f=A.gradient,y(A.gradient.stops),g.hidden=!A.gradientEnabled,w.update(A);for(let I of P)I.setDisabled(!A.canShape);for(let I of E)I.setDisabled(!A.canShape||!A.gradientEnabled);for(let I of C)I.color.setDisabled(!A.canShape),I.position.setDisabled(!A.canShape),I.remove.setDisabled(!A.canShape||A.gradient.stops.length<=2);}}}function Gd(e,t,n,o){let r=n(t("pptx.inspector.image")),i=e.createElement("button");i.type="button",i.textContent=t("pptx.image.replace"),i.addEventListener("click",o.replaceImage);let a=e.createElement("button");a.type="button",a.textContent=t("pptx.image.reset"),a.addEventListener("click",o.resetImage),r.append(i,a);let p=L=>`${Math.round(L)}%`,s=re(e,{label:t("pptx.imageAdjustments.brightness"),min:-100,max:100,formatValue:p,onCommit:o.setImageBrightness}),l=re(e,{label:t("pptx.imageAdjustments.contrast"),min:-100,max:100,formatValue:p,onCommit:o.setImageContrast}),m=re(e,{label:t("pptx.image.saturation"),min:-100,max:100,formatValue:p,onCommit:o.setImageSaturation});r.append(s.el,l.el,m.el);let c=e.createElement("label");c.textContent=t("pptx.image.artisticEffects");let u=e.createElement("select");for(let[L,R]of chunkS5V27BHI_cjs.Rc){let B=e.createElement("option");B.value=L,B.textContent=t(R),u.appendChild(B);}u.addEventListener("change",()=>o.setImageEffects({artisticEffect:u.value==="none"?void 0:u.value})),c.appendChild(u);let x=re(e,{label:t("pptx.imageAdjustments.transparency"),min:0,max:100,formatValue:p,onCommit:L=>o.setImageEffects({alphaModFix:100-L})}),g=re(e,{label:t("pptx.imageAdjustments.biLevelThreshold"),min:0,max:100,formatValue:p,onCommit:L=>o.setImageEffects({biLevel:L})}),v=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-grid"),h={},b=(L,R)=>{let B=e.createElement("label");B.textContent=L;let F=e.createElement("input");return F.type="color",F.addEventListener("input",()=>o.setImageEffects({duotone:{color1:R==="color1"?F.value:h.color1?.value??"#000000",color2:R==="color2"?F.value:h.color2?.value??"#ffffff"}})),B.appendChild(F),v.appendChild(B),F},T=b(t("pptx.image.duotoneDark"),"color1"),k=b(t("pptx.image.duotoneLight"),"color2");h.color1=T,h.color2=k,r.append(c,x.el,g.el,v);let S=e.createElement("input");S.type="checkbox";let f=e.createElement("input");f.type="color";let C=40,y=re(e,{label:t("pptx.image.washOpacity"),min:0,max:100,formatValue:p,onCommit:L=>{C=L,o.setImageEffects({colorWash:{color:f.value,opacity:L}});}});S.addEventListener("change",()=>o.setImageEffects({colorWash:S.checked?{color:f.value,opacity:C}:void 0})),f.addEventListener("input",()=>o.setImageEffects({colorWash:{color:f.value,opacity:C}})),r.append(S,f,y.el);let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-grid");r.appendChild(P);let E=(L,R)=>{let B=Y(e,{label:L,min:0,max:90,onCommit:F=>o.setImageCrop(R,F/100)});return P.appendChild(B.el),B},w=E(t("pptx.image.cropLeft"),"left"),A=E(t("pptx.image.cropTop"),"top"),I=E(t("pptx.image.cropRight"),"right"),H=E(t("pptx.image.cropBottom"),"bottom"),M=[s,l,m],O=[w,A,I,H];return {el:r,update(L){r.hidden=!L.hasSelection||!L.isImage,s.setValue(L.imageBrightness),l.setValue(L.imageContrast),m.setValue(L.imageSaturation),u.value=L.imageArtisticEffect,x.setValue(L.imageTransparency),g.setValue(L.imageBiLevel),T.value=L.imageDuotone1,k.value=L.imageDuotone2,S.checked=!!L.imageColorWash,f.value=L.imageColorWash?.color??"#0066cc",y.setValue(L.imageColorWash?.opacity??40),C=L.imageColorWash?.opacity??40,w.setValue(L.cropLeft*100),A.setValue(L.cropTop*100),I.setValue(L.cropRight*100),H.setValue(L.cropBottom*100);for(let R of [...M,x,g])R.setDisabled(!L.isImage);u.disabled=!L.isImage,T.disabled=!L.isImage,k.disabled=!L.isImage,i.disabled=!L.isImage,a.disabled=!L.isImage,S.disabled=!L.isImage,f.disabled=!L.isImage,y.setDisabled(!L.isImage);for(let R of O)R.setDisabled(!L.isImage);}}}function Wd(e,t,n,o){let r=n(t("pptx.media.title")),i=e.createElement("video");i.controls=true,i.preload="metadata",i.className="pptxv-media-preview",i.addEventListener("loadedmetadata",()=>{o.setMediaProperties({metadata:{duration:Number.isFinite(i.duration)?i.duration:void 0,videoWidth:i.videoWidth||void 0,videoHeight:i.videoHeight||void 0}});});let a=e.createElement("img");a.className="pptxv-media-poster",a.alt=t("pptx.media.posterFrame");let p=$(e,{label:t("pptx.media.autoPlay"),onChange:S=>o.setMediaProperties({autoPlay:S})}),s=$(e,{label:t("pptx.media.loop"),onChange:S=>o.setMediaProperties({loop:S})}),l=$(e,{label:t("pptx.media.playAcrossSlides"),onChange:S=>o.setMediaProperties({playAcrossSlides:S})}),m=$(e,{label:t("pptx.media.fullScreen"),onChange:S=>o.setMediaProperties({fullScreen:S})}),c=$(e,{label:t("pptx.media.hideWhenNotPlaying"),onChange:S=>o.setMediaProperties({hideWhenNotPlaying:S})}),u=re(e,{label:t("pptx.media.volume"),min:0,max:100,formatValue:S=>`${Math.round(S)}%`,onCommit:S=>o.setMediaProperties({volume:S/100})}),x=xe(e,{label:t("pptx.media.playbackSpeed"),options:[.5,.75,1,1.25,1.5,2].map(S=>({value:String(S),label:`${S}x`})),onChange:S=>o.setMediaProperties({playbackSpeed:Number(S)})}),g=Y(e,{label:t("pptx.media.trimStart"),min:0,onCommit:S=>o.setMediaProperties({trimStartMs:S})}),v=Y(e,{label:t("pptx.media.trimEnd"),min:0,onCommit:S=>o.setMediaProperties({trimEndMs:S})}),h=_d(e,t("pptx.media.bookmarks"));h.control.placeholder="12.5 | Intro",h.control.addEventListener("change",()=>o.setMediaProperties({bookmarks:Ud(h.control.value).map((S,f)=>{let[C,y=""]=S.split("|").map(P=>P.trim());return {id:`bookmark-${f+1}`,time:Number(C),label:y}}).filter(({time:S})=>Number.isFinite(S))}));let b=_d(e,t("pptx.media.captions"));b.control.placeholder="en | English | captions | captions.vtt",b.control.addEventListener("change",()=>o.setMediaProperties({captionTracks:Ud(b.control.value).map((S,f)=>{let[C="",y="",P="captions",E=""]=S.split("|").map(w=>w.trim());return {id:`caption-${f+1}`,language:C,label:y,kind:P,src:E||void 0}})}));let T=e.createElement("output");T.className="pptxv-media-metadata";let k=[p,s,l,m,c];return r.append(i,a,...k.map(({el:S})=>S),u.el,x.el,g.el,v.el,h.label,b.label,T),{el:r,update(S){r.hidden=!S.isMedia;let f=S.media,C=S.mediaPreviewUrl??"";i.src!==C&&(i.src=C),i.hidden=!C,i.poster=S.mediaPosterUrl??"",a.src=S.mediaPosterUrl??"",a.hidden=!S.mediaPosterUrl,p.setValue(f?.autoPlay??false),s.setValue(f?.loop??false),l.setValue(f?.playAcrossSlides??false),m.setValue(f?.fullScreen??false),c.setValue(f?.hideWhenNotPlaying??false),u.setValue((f?.volume??1)*100),x.setValue(String(f?.playbackSpeed??1)),g.setValue(f?.trimStartMs??0),v.setValue(f?.trimEndMs??0),h.control.value=(f?.bookmarks??[]).map(({time:y,label:P})=>`${y} | ${P}`).join(`
5
5
  `),b.control.value=(f?.captionTracks??[]).map(({language:y,label:P,kind:E,src:w})=>`${y} | ${P} | ${E} | ${w??""}`).join(`
6
- `),T.textContent=f?.metadata?`${f.metadata.duration??0}s, ${f.metadata.videoWidth??0} x ${f.metadata.videoHeight??0}, ${f.metadata.codecInfo??f.mediaMimeType??""}`:f?.mediaMimeType??"";for(let y of [...k,u,x,g,v])y.setDisabled(!S.isMedia);h.control.disabled=!S.isMedia,b.control.disabled=!S.isMedia;}}}function _d(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=3,n.appendChild(o),{label:n,control:o}}function Ud(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function $d(e,t,n,o){let r=n(t("pptx.arrange.positionSize")),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-grid");r.appendChild(i);let a=(x,g,v)=>{let h=Y(e,{label:x,min:v,onCommit:b=>o({[g]:b})});return i.appendChild(h.el),h},p=a(t("pptx.arrange.x"),"x"),s=a(t("pptx.arrange.y"),"y"),l=a(t("pptx.arrange.width"),"width",1),m=a(t("pptx.arrange.height"),"height",1),c=a(t("pptx.arrange.rotation"),"rotation"),u=[p,s,l,m,c];return {el:r,update(x){r.hidden=!x.hasSelection,p.setValue(x.x),s.setValue(x.y),l.setValue(x.width),m.setValue(x.height),c.setValue(x.rotation);for(let g of u)g.setDisabled(!x.hasSelection);}}}var Gx=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function qd(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-layout-grid"),p=new Map;for(let v of chunkEWJAZ6TW_cjs.Rf){let h=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-layout-button");h.type="button",h.dataset.testid=`smartart-layout-${v}`,h.textContent=t(`pptx.smartart.category.${v}`),h.addEventListener("click",()=>o.setSmartArtLayout(v)),p.set(v,h),a.appendChild(h);}r.appendChild(a);let s=xe(e,{label:t("pptx.smartart.colorScheme"),options:Gx.map(v=>({value:v,label:v})),onChange:o.setSmartArtColorScheme}),l=s.el.querySelector("select");l&&(l.dataset.testid="smartart-color-scheme"),r.appendChild(s.el);let m=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-label");m.textContent=t("pptx.smartart.textPane"),r.appendChild(m);let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-nodes"),u=e.createElement("button");u.type="button",u.textContent=t("pptx.smartart.addItem"),u.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(u,c);let x="",g=v=>{let h=v.smartArtData,b=h?.nodes.map(T=>T.id).join("|")??"";if(b===x){let T=c.querySelectorAll('[data-testid="smartart-node-text"]');h?.nodes.forEach((k,S)=>{let f=T[S];f&&e.activeElement!==f&&(f.value=k.text);});return}x=b,c.replaceChildren();for(let[T,k]of (h?.nodes??[]).entries()){let S=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-smartart-node"),f=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-node-index");f.textContent=String(T+1);let C=e.createElement("input");C.type="text",C.className="pptxv-smartart-node-input",C.dataset.testid="smartart-node-text",C.setAttribute("aria-label",`${t("pptx.smartart.item")} ${T+1}`),C.value=k.text,C.addEventListener("change",()=>o.setSmartArtNodeText(k.id,C.value));let y=e.createElement("input");y.type="color",y.value=k.style?.fillColor??"#3b82f6",y.title=t("pptx.inspector.fill"),y.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fillColor:y.value}));let P=e.createElement("input");P.type="color",P.value=k.style?.fontColor??"#ffffff",P.title=t("pptx.table.color"),P.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fontColor:P.value}));let E=e.createElement("button");E.type="button",E.textContent="B",E.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{bold:!k.style?.bold}));let w=e.createElement("button");w.type="button",w.textContent="I",w.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{italic:!k.style?.italic}));let A=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-hierarchy");for(let[I,H]of [["addChild","+Child"],["promote","Outdent"],["demote","Indent"],["remove","Delete"]]){let M=e.createElement("button");M.type="button",M.textContent=H,M.addEventListener("click",()=>o.mutateSmartArtNode(k.id,I)),A.appendChild(M);}S.append(f,C,y,P,E,w,A),c.appendChild(S);}};return {el:r,update(v){r.hidden=!v.isSmartArt;let h=v.smartArtData?.resolvedLayoutType;for(let[b,T]of p)T.disabled=!v.isSmartArt,T.classList.toggle("is-active",b===h),T.setAttribute("aria-pressed",String(b===h));s.setValue(v.smartArtData?.colorScheme??"colorful1"),s.setDisabled(!v.isSmartArt),u.disabled=!v.isSmartArt,g(v);}}}function Kd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=y=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],y);},a=(y,P)=>{let E=e.createElement("label");E.textContent=y;let w=e.createElement("select");for(let A of P){let I=e.createElement("option");I.value=A,I.textContent=A,w.appendChild(I);}return E.appendChild(w),o.appendChild(E),w},p=y=>{let P=e.createElement("label");P.textContent=y;let E=e.createElement("input");return E.type="color",P.appendChild(E),o.appendChild(P),E},s=a(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),l=a(t("pptx.table.gradientType"),["linear","radial"]),m=e.createElement("input");m.type="number",m.min="0",m.max="360",m.title=t("pptx.table.gradientAngle"),o.appendChild(m);let c=p(t("pptx.table.gradientStart")),u=p(t("pptx.table.gradientEnd")),x=a(t("pptx.table.patternPreset"),["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"]),g=p(t("pptx.table.patternForeground")),v=p(t("pptx.table.patternBackground")),h=a(t("pptx.table.cellBorders"),["top","right","bottom","left"]),b=p(t("pptx.table.borderColor")),T=e.createElement("input");T.type="number",T.min="0",T.max="20",T.title=t("pptx.table.borderWidth"),o.appendChild(T);let k=()=>i({fillMode:"gradient",gradientFillType:l.value,gradientFillAngle:Number(m.value),gradientFillStops:[{color:c.value,position:0},{color:u.value,position:100}]});s.addEventListener("change",()=>i({fillMode:s.value}));for(let y of [l,m,c,u])y.addEventListener("change",k);let S=()=>i({fillMode:"pattern",patternFillPreset:x.value,patternFillForeground:g.value,patternFillBackground:v.value});for(let y of [x,g,v])y.addEventListener("change",S);let f=()=>{let y=`${h.value[0].toUpperCase()}${h.value.slice(1)}`;i({[`border${y}Color`]:b.value,[`border${y}Width`]:Number(T.value)});};for(let y of [h,b,T])y.addEventListener("change",f);let C=o.querySelectorAll("input,select");return {el:o,update(y){r=y,o.hidden=!y.selectedTableCell;let P=y.tableCellStyle??{};s.value=P.fillMode??"solid",l.value=P.gradientFillType??"linear",m.value=String(P.gradientFillAngle??90),c.value=P.gradientFillStops?.[0]?.color??"#ff0000",u.value=P.gradientFillStops?.at(-1)?.color??"#0000ff",x.value=P.patternFillPreset??"ltDnDiag",g.value=P.patternFillForeground??"#000000",v.value=P.patternFillBackground??"#ffffff";let E=`${h.value[0].toUpperCase()}${h.value.slice(1)}`;b.value=String(P[`border${E}Color`]??"#374151"),T.value=String(P[`border${E}Width`]??1);for(let w of C)w.disabled=!y.isTable;}}}function Mn(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function jd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell";let r=e.createElement("strong");o.appendChild(r);let i=null,a=[],p=E=>{i&&n.setTableCellStyles(a.length>0?a:[i],E);},s=(E,w)=>{let A=e.createElement("label"),I=e.createElement("span");return I.textContent=E,A.append(I,w),o.appendChild(A),A},l=(E,w)=>{let A=e.createElement("input");return A.type="number",A.addEventListener("change",()=>w(Number(A.value))),s(E,A),A},m=(E,w)=>{let A=e.createElement("input");return A.type="color",A.addEventListener("input",()=>p({[w]:A.value})),s(E,A),A},c=(E,w)=>{let A=e.createElement("input");return A.type="checkbox",A.addEventListener("change",()=>p({[w]:A.checked})),s(E,A),A},u=(E,w,A)=>{let I=e.createElement("select");for(let H of w){let M=e.createElement("option");M.value=H,M.textContent=H,I.appendChild(M);}return I.addEventListener("change",()=>A(I.value)),s(E,I),I},x=l(t("pptx.table.fontSize"),E=>p({fontSize:E})),g=m(t("pptx.table.color"),"color"),v=m(t("pptx.table.background"),"backgroundColor"),h=m(t("pptx.table.cellBorders"),"borderColor"),b=l(t("pptx.table.borderWidth"),E=>p({borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E})),T=l(t("pptx.table.cellPadding"),E=>p({marginLeft:E,marginRight:E,marginTop:E,marginBottom:E})),k=c(t("pptx.format.bold"),"bold"),S=c(t("pptx.format.italic"),"italic"),f=c(t("pptx.format.underline"),"underline"),C=u(t("pptx.table.alignment"),["left","center","right"],E=>p({align:E})),y=u(t("pptx.table.verticalAlignment"),["top","middle","bottom"],E=>p({vAlign:E})),P=[x,g,v,h,b,T,k,S,f,C,y];return {el:o,update(E){if(i=E.selectedTableCell,a=E.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let w=E.tableCellStyle??{};x.value=String(w.fontSize??14),g.value=Mn(w.color,"#000000"),v.value=Mn(w.backgroundColor,"#ffffff"),h.value=Mn(w.borderColor,"#374151"),b.value=String(w.borderTopWidth??1),T.value=String(w.marginLeft??4),k.checked=!!w.bold,S.checked=!!w.italic,f.checked=!!w.underline,C.value=w.align??"left",y.value=w.vAlign??"top";for(let A of P)A.disabled=!E.isTable;}}}function Yd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(c,u)=>{let x=e.createElement("button");return x.type="button",x.textContent=c,x.addEventListener("click",()=>r&&u(r)),o.appendChild(x),x},a=c=>c.selectedTableCell,p=c=>u=>{let x=a(u);x&&n.mutateTableStructure(x,c);},s=[i(t("pptx.table.insertRowAbove"),p("insertRowAbove")),i(t("pptx.table.insertRowBelow"),p("insertRowBelow")),i(t("pptx.table.deleteRow"),p("deleteRow")),i(t("pptx.table.insertColumnLeft"),p("insertColumnLeft")),i(t("pptx.table.insertColumnRight"),p("insertColumnRight")),i(t("pptx.table.deleteColumn"),p("deleteColumn")),i(t("pptx.table.mergeCells"),c=>n.mergeTableCells(c.selectedTableCells)),i(t("pptx.table.split"),c=>{let u=a(c);u&&n.splitTableCell(u);})],l=e.createElement("input");l.type="number",l.min="5",l.max="95",l.title=t("pptx.table.columnWidths"),l.addEventListener("change",()=>{let c=r&&a(r);c&&n.setTableColumnWidth(c.column,Number(l.value));});let m=e.createElement("input");return m.type="number",m.min="1",m.title=t("pptx.table.rowHeights"),m.addEventListener("change",()=>{let c=r&&a(r);c&&n.setTableRowHeight(c.row,Number(m.value));}),o.append(l,m),{el:o,update(c){r=c;let u=a(c);o.hidden=!u,l.value=u?String(Math.round((c.tableColumnWidths[u.column]??0)*100)):"",m.value=u?String(c.tableRowHeights[u.row]??32):"";for(let x of s)x.disabled=!u;s[6].disabled=c.selectedTableCells.length<2,l.disabled=!u,m.disabled=!u;}}}function Xd(e,t,n,o){let r=n(t("pptx.inspector.table")),i=$(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=$(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),p=$(e,{label:t("pptx.table.bandedColumns"),onChange:f=>o.setTableOptions({bandedColumns:f})}),s=$(e,{label:t("pptx.table.totalRow"),onChange:f=>o.setTableOptions({lastRow:f})}),l=$(e,{label:t("pptx.table.firstColumn"),onChange:f=>o.setTableOptions({firstCol:f})}),m=$(e,{label:t("pptx.table.lastColumn"),onChange:f=>o.setTableOptions({lastCol:f})}),c=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:f=>o.setTableOptions({rtl:f})});r.append(i.el,a.el,p.el,s.el,l.el,m.el,c.el);let u=Y(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});r.appendChild(u.el);let x=e.createElement("input");x.placeholder=t("pptx.table.styleId"),x.addEventListener("change",()=>o.setTableOptions({tableStyleId:x.value}));let g=e.createElement("input");g.type="color",g.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:g.value}));let v=e.createElement("input");v.type="color",v.addEventListener("input",()=>o.setTableOptions({},{borderColor:v.value})),r.append(x,g,v);let h=jd(e,t,o),b=Kd(e,t,o),T=Yd(e,t,o);r.append(h.el,b.el,T.el);let k=[i,a,p,s,l,m,c],S=[u];return {el:r,update(f){r.hidden=!f.hasSelection||!f.isTable,i.setValue(f.tableHeaderRow),a.setValue(f.tableBandedRows),p.setValue(f.tableBandedColumns),s.setValue(f.tableLastRow),l.setValue(f.tableFirstCol),m.setValue(f.tableLastCol),c.setValue(f.tableRtl),u.setValue(f.tableCellPadding),x.value=f.tableStyleId,g.value=f.tableCellBackground,v.value=f.tableCellBorder,h.update(f),b.update(f),T.update(f);for(let C of k)C.setDisabled(!f.isTable);x.disabled=!f.isTable,g.disabled=!f.isTable,v.disabled=!f.isTable;for(let C of S)C.setDisabled(!f.isTable);}}}function Zd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=w=>n.setTextStyle(w,r?.selectedTextRange),a=w=>n.setTextStyle(w),p=(w,A)=>{let I=e.createElement("label");I.textContent=w,I.appendChild(A),o.appendChild(I);},s=(w,A,I=0,H=false)=>{let M=e.createElement("input");return M.type="number",M.min=String(I),M.addEventListener("change",()=>(H?a:i)({[A]:Number(M.value)})),p(w,M),M},l=(w,A)=>{let I=e.createElement("input");return I.type="color",I.addEventListener("input",()=>i({[A]:I.value})),p(w,I),I},m=(w,A)=>{let I=e.createElement("input");return I.type="checkbox",I.addEventListener("change",()=>i({[A]:I.checked})),p(w,I),I},c=s(t("pptx.textFormatting.columns"),"columnCount",1,true);c.max="6";let u=s(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),x=l(t("pptx.textEffects.outline"),"textOutlineColor"),g=s(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),v=m(t("pptx.textEffects.shadow"),"textShadowOpacity"),h=l(t("pptx.textEffects.shadowColor"),"textShadowColor"),b=s(t("pptx.textEffects.blur"),"textShadowBlur"),T=l(t("pptx.textEffects.glowColor"),"textGlowColor"),k=s(t("pptx.textEffects.glow"),"textGlowRadius"),S=m(t("pptx.textEffects.reflection"),"textReflection"),f=m(t("pptx.textFormatting.strikethrough"),"strikethrough"),C=l(t("pptx.textFormatting.highlight"),"highlightColor"),y=e.createElement("select");for(let w of chunkS5V27BHI_cjs.Sc){let A=e.createElement("option");A.value=w.value,A.textContent=w.label,y.appendChild(A);}y.addEventListener("change",()=>a({textWarpPreset:y.value==="textNoShape"?void 0:y.value})),p(t("pptx.textEffects.transform"),y);let P=s(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),E=Array.from(o.querySelectorAll("input,select"));return {el:o,update(w){r=w,o.hidden=!w.canText;let A=w.textStyle??{};c.value=String(A.columnCount??1),u.value=String(A.columnSpacing??0),x.value=A.textOutlineColor??"#000000",g.value=String(A.textOutlineWidth??0),v.checked=!!A.textShadowOpacity,h.value=A.textShadowColor??"#000000",b.value=String(A.textShadowBlur??4),T.value=A.textGlowColor??"#ffff00",k.value=String(A.textGlowRadius??0),S.checked=!!A.textReflection,f.checked=!!A.strikethrough,C.value=A.highlightColor??"#ffff00",y.value=A.textWarpPreset??"textNoShape",P.value=String(A.textWarpAdj??5e4);for(let I of E)I.disabled=!w.canText;}}}function Qd(e,t,n,o){let r=n(t("pptx.inspector.text")),i=xe(e,{label:t("pptx.textPanel.verticalAlign"),options:[{value:"top",label:t("pptx.textPanel.valignTop")},{value:"middle",label:t("pptx.textPanel.valignMiddle")},{value:"bottom",label:t("pptx.textPanel.valignBottom")}],onChange:o.setTextVerticalAlign});r.appendChild(i.el);let a=$(e,{label:t("pptx.textAdvanced.wrapText"),onChange:f=>o.setTextWrap(f?"square":"none")});r.appendChild(a.el);let p=xe(e,{label:t("pptx.textAdvanced.autoFit"),options:[{value:"none",label:t("pptx.textAdvanced.autoFitNone")},{value:"normal",label:t("pptx.textAdvanced.autoFitShrink")},{value:"shrink",label:t("pptx.textAdvanced.autoFitResize")}],onChange:o.setAutoFitMode});r.appendChild(p.el);let s=(f,C,y)=>Y(e,{label:f,min:y,onCommit:P=>o.setTextAdvanced({[C]:P})}),l=s(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),m=s(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),c=s(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),u=s(t("pptx.textAdvanced.spacingBefore"),"paragraphSpacingBefore",0),x=s(t("pptx.textAdvanced.spacingAfter"),"paragraphSpacingAfter",0),g=s(t("pptx.textAdvanced.indent"),"paragraphIndent"),v=s(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),h=xe(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(f=>({value:f,label:t(`pptx.textAdvanced.direction.${f}`)})),onChange:f=>o.setTextAdvanced({textDirection:f})}),b=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:f=>o.setTextAdvanced({rtl:f})}),T=[l,m,c,u,x,g,v];r.append(...T.map(({el:f})=>f),h.el,b.el);let k=Zd(e,t,o);r.appendChild(k.el);let S=[i,a,p,...T,h,b];return {el:r,update(f){r.hidden=!f.hasSelection||!f.canText,i.setValue(f.vAlign),a.setValue(f.textWrap==="square"),p.setValue(f.autoFitMode),l.setValue(f.characterSpacing),m.setValue(f.lineSpacing),c.setValue(f.lineSpacingExactPt??0),u.setValue(f.paragraphSpacingBefore),x.setValue(f.paragraphSpacingAfter),g.setValue(f.paragraphIndent),v.setValue(f.paragraphMarginLeft),h.setValue(f.textDirection),b.setValue(f.textRtl),k.update(f);for(let C of S)C.setDisabled(!f.canText);}}}function ro(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,a=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let E of a){let w=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-inspector-tab");w.type="button",w.setAttribute("role","tab"),w.textContent=E.label,w.addEventListener("click",()=>u(E.id)),r.appendChild(w),i.set(E.id,w);}let p=Bd(e,t,E=>n.selectElement(E));p.el.classList.add("pptxv-inspector-body"),o.appendChild(p.el);let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-body");o.appendChild(s);let l=Md(e,t,n);l.el.classList.add("pptxv-inspector-body"),o.appendChild(l.el);let m=Sd(e,t,n);o.appendChild(m.el);let c="properties",u=E=>{c=E;for(let[w,A]of i)A.classList.toggle("is-active",w===E),A.setAttribute("aria-selected",String(w===E));p.el.hidden=E!=="elements",s.hidden=E!=="properties",l.el.hidden=E!=="comments";},x=Fd(e,t,n);s.appendChild(x.el);let g=E=>{let w=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-section"),A=chunkS5V27BHI_cjs.Ke(e,"h4","pptxv-inspector-section-title");return A.textContent=E,w.appendChild(A),s.appendChild(w),w},v=$d(e,t,g,n.setGeometry),h=zd(e,t,g,n),b=Qd(e,t,g,n),T=Gd(e,t,g,n),k=Xd(e,t,g,n),S=qd(e,t,g,n),f=ud(e,t,g,n),C=Ld(e,t,g,n),y=Wd(e,t,g,n),P=[v,h,b,T,k,S,f,C,y];return u(c),{el:o,update(E){x.setVisible(!E.hasSelection);for(let w of P)w.update(E);},updateDeck(E){p.update(E),l.update(E),x.update(E),m.update({editable:E.editable,selectedElementId:E.selectedElementId,elements:E.elements,animations:E.activeSlide?.animations??[]});},setEditable(E){o.hidden=!E;}}}var Jd=128,_x=[1,2,3,4,6,9],Ux={body:"pptx.master.notesMasterBody",sldImg:"pptx.master.notesMasterSlideImage",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function ec(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-master-card"),a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-card-label");a.textContent=t("pptx.master.notesMasterBackground");let p=chunkS5V27BHI_cjs.Ke(e,"input","pptxv-master-background");p.type="color",p.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",p.setAttribute("aria-label","Master background color"),p.addEventListener("input",()=>r(p.value)),i.append(a,p),n.appendChild(i);}function tc(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-master-card"),a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-card-label");if(a.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(a),o.length===0){let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-empty");p.textContent=t("pptx.master.noPlaceholders"),i.appendChild(p);}for(let p of o){let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-placeholder"),l=chunkS5V27BHI_cjs.Ke(e,"span",`pptxv-master-dot is-${r}`);s.append(l,e.createTextNode(t(Ux[p.type]??p.type))),i.appendChild(s);}n.appendChild(i);}function Wx(e,t){let n=t===null?void 0:e.layouts?.[t];return {id:n?.path??e.path,rId:"",slideNumber:0,elements:n?[...e.elements??[],...n.elements??[]]:e.elements??[],backgroundColor:n?.backgroundColor??e.backgroundColor,backgroundImage:n?.backgroundImage??e.backgroundImage}}function $x(e,t,n,o){let r=Jd/Math.max(o.canvasSize.width,1);for(let[i,a]of o.masters.entries()){let p=[{layoutIndex:null,label:a.name||t("pptx.master.master")},...a.layouts?.map((s,l)=>({layoutIndex:l,label:s.name||t("pptx.master.layout")}))??[]];for(let s of p){let l=chunkS5V27BHI_cjs.Ke(e,"button",`pptxv-master-thumb${s.layoutIndex===null?"":" is-layout"}`);l.type="button",l.setAttribute("aria-label",s.label);let m=o.active.masterIndex===i&&o.active.layoutIndex===s.layoutIndex;l.classList.toggle("is-active",m),m&&l.setAttribute("aria-current","page");let c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-master-thumb-name");c.textContent=s.label;let u=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-master-thumb-frame");u.style.width=`${Jd}px`,u.style.height=`${Math.round(o.canvasSize.height*r)}px`,u.appendChild(o.renderStage(Wx(a,s.layoutIndex),r)),l.append(c,u),l.addEventListener("click",()=>o.onSelect(i,s.layoutIndex)),n.appendChild(l);}}}function Hn(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-master-sidebar");return n.hidden=true,n.setAttribute("aria-label",t("pptx.view.masterViews")),{el:n,render(o){n.replaceChildren();let r=chunkS5V27BHI_cjs.Ke(e,"header","pptxv-master-header"),i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let a=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-master-collapse");a.type="button",a.textContent="\u2039",a.title=t("pptx.masterView.collapse"),a.setAttribute("aria-label",t("pptx.masterView.collapse")),a.addEventListener("click",o.onCollapse),r.append(i,a);let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-tabs");p.setAttribute("role","tablist");for(let[l,m]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let c=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-master-tab");c.type="button",c.role="tab",c.textContent=t(m),c.setAttribute("aria-selected",String(o.tab===l)),c.classList.toggle("is-active",o.tab===l),c.addEventListener("click",()=>o.onTabChange(l)),p.appendChild(c);}let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-body");if(s.setAttribute("role","tabpanel"),o.tab==="slides")$x(e,t,s,o);else if(o.tab==="notes")o.notesMasterPresent?(ec(e,t,s,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),tc(e,t,s,o.notesPlaceholders??[],"notes")):(s.textContent=t("pptx.master.noNotesMaster"),s.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)s.textContent=t("pptx.master.noHandoutMaster"),s.classList.add("pptxv-master-empty");else {let l=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-master-card"),m=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-card-label");m.textContent=t("pptx.master.handoutSlidesPerPage");let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-counts");for(let u of _x){let x=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-master-count");x.type="button",x.textContent=String(u),x.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===u)),x.classList.toggle("is-active",o.handoutSlidesPerPage===u),x.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(u)),c.appendChild(x);}l.append(m,c),s.appendChild(l),ec(e,t,s,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),tc(e,t,s,o.handoutPlaceholders??[],"handout");}n.append(r,p,s);},setVisible(o){n.hidden=!o;}}}function Rn(e,t,n,o,r,i){let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-actions"),p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-sheet-host");p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true");let s=e.createElement("button");s.type="button",s.className="pptxv-mobile-sheet-backdrop",s.setAttribute("aria-label",t("pptx.settings.close"));let l=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-mobile-sheet"),m=chunkS5V27BHI_cjs.Ke(e,"header","pptxv-mobile-sheet-header"),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-sheet-handle"),u=e.createElement("strong");m.append(c,u);let x=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-sheet-body");l.append(m,x),p.append(s,l),p.hidden=true,a.appendChild(p);let g=null,v=0,h=[],b=[],T=true,k=false,S=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(S,r);let f=()=>{r&&S?.parentNode&&S.parentNode.insertBefore(r,S.nextSibling);},C=()=>{g=null,p.hidden=true,l.style.transform="",f();for(let M of w.querySelectorAll("button"))M.setAttribute("aria-pressed","false");};s.addEventListener("click",C);let y=chunkS5V27BHI_cjs.Oc((M,O)=>{l.style.transform=M>0?`translateY(${M}px)`:"",l.style.transition=O?"none":"";},C),P=M=>({clientY:M.clientY,pointerId:M.pointerId,currentTarget:m});m.addEventListener("pointerdown",M=>y.pointerDown(P(M))),m.addEventListener("pointermove",M=>y.pointerMove(P(M))),m.addEventListener("pointerup",M=>y.pointerUp(P(M))),m.addEventListener("pointercancel",M=>y.cancel(P(M)));let E=M=>{if(x.replaceChildren(),u.textContent=t(M==="inspector"?"pptx.field.format":`pptx.${M==="slides"?"sections.slides":M==="comments"?"toolbar.comments":M==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),p.setAttribute("aria-label",u.textContent),M==="slides"){let O=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-slide-list");for(let L=0;L<h.length;L+=1){let R=e.createElement("button");R.type="button",R.textContent=chunkS5V27BHI_cjs.ve(h[L],L),R.classList.toggle("is-active",L===v),R.addEventListener("click",()=>{o(L),C();}),O.appendChild(R);}x.appendChild(O);}else if(M==="insert"){let O=[[t("pptx.insert.addTextBox"),()=>n.insert.insert("text")],[t("pptx.ribbon.rectangle"),()=>n.insert.insert("shape","rect")],[t("pptx.insert.insertTable"),()=>n.insert.insert("table")]];for(let[L,R]of O){let B=e.createElement("button");B.type="button",B.textContent=L,B.addEventListener("click",R),x.appendChild(B);}}else if(M==="inspector"&&r)x.appendChild(r);else if(M==="comments"){b.length===0&&(x.textContent=t("pptx.comments.noneOnSlide"));for(let B of b){let F=chunkS5V27BHI_cjs.Ke(e,"article","pptxv-mobile-comment"),V=e.createElement("textarea");V.value=B.text,V.setAttribute("aria-label",t("pptx.comments.edit"));let N=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-comment-actions"),W=e.createElement("button");W.type="button",W.textContent=t("pptx.comments.save"),W.addEventListener("click",()=>n.edit.comments.editComment(B.id,V.value));let Z=e.createElement("button");Z.type="button",Z.textContent=B.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),Z.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(B.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(B.id)),N.append(W,Z,K),F.append(V,N),x.appendChild(F);}let O=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-comment-add"),L=e.createElement("textarea");L.placeholder=t("pptx.comments.addPlaceholder"),L.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let R=e.createElement("button");R.type="button",R.textContent=t("pptx.comments.addComment"),R.addEventListener("click",()=>{n.edit.comments.addComment(L.value)&&(L.value="");}),O.append(L,R),x.appendChild(O);}else {let O=[[t("pptx.ribbon.insert"),()=>n.insert.insert("text"),null],[t("pptx.presenter.previousSlide"),n.nav.prev,"navigation"],[t("pptx.presenter.nextSlide"),n.nav.next,"navigation"],[t("pptx.statusBar.zoomOut"),n.nav.zoomOut,"zoom"],[t("pptx.statusBar.zoomIn"),n.nav.zoomIn,"zoom"],[t("pptx.notes.title"),n.nav.toggleNotes,"notes"],[t("pptx.statusBar.slideShow"),n.nav.togglePresentation,"fullscreen"]];for(let[L,R,B]of O){if(B&&chunkS5V27BHI_cjs.Pd(B,i))continue;let F=e.createElement("button");F.type="button",F.textContent=L,F.addEventListener("click",R),x.appendChild(F);}}},w=e.createElement("nav");w.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let A=M=>{if(g=chunkS5V27BHI_cjs.xc(g,M),!g){C();return}E(g),p.hidden=false;for(let O of w.querySelectorAll("button"))O.setAttribute("aria-pressed",String(O.dataset.mobileAction===g));},I={slides:"panel-left",insert:"plus",inspector:"shapes",comments:"notes",notes:"sticky-note"};for(let M of chunkS5V27BHI_cjs.yc({slideCount:0})){let O=M.key;if(O==="notes"&&chunkS5V27BHI_cjs.Pd("notes",i))continue;let L=e.createElement("button");L.type="button",L.dataset.mobileAction=O,O==="notes"&&L.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),L.appendChild(chunkS5V27BHI_cjs.Te(e,I[O]));let R=chunkS5V27BHI_cjs.Ke(e,"span");R.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"notes.title"}`),L.appendChild(R),L.addEventListener("click",()=>{if(O==="notes"){n.nav.toggleNotes();return}if(O==="insert"){n.insert.insert("text");return}A(O);}),w.appendChild(L);}a.appendChild(w);let H=()=>{let M=chunkS5V27BHI_cjs.yc({slideCount:h.length});for(let O of M){let L=w.querySelector(`button[data-mobile-action='${O.key}']`);if(!L)continue;let R=O.key==="insert"||O.key==="inspector"||O.key==="comments";L.disabled=O.disabled||R&&!T||O.key==="inspector"&&!r,L.setAttribute("aria-pressed",String(O.key==="notes"?k:O.key===g));}};return {el:a,update(M,O,L){v=M,h=O,b=L,g&&E(g),H();},toggle:A,close:C,setEditable(M){T=M,!T&&g&&["insert","inspector","comments"].includes(g)&&C(),H();},setNotesExpanded(M){k=M,H();}}}function On(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=D(e,{label:t("pptx.mobileToolbar.menu"),icon:"sidebar",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),a=chunkS5V27BHI_cjs.Pd("undo",o)?null:D(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),p=chunkS5V27BHI_cjs.Pd("redo",o)?null:D(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-toolbar-spacer"),l=D(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),m=chunkS5V27BHI_cjs.Pd("fullscreen",o)?null:D(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-toolbar-ai"),u=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...a?[a.btn]:[],...p?[p.btn]:[],s,c,l.btn,...m?[m.btn]:[],u),{el:r,collaborationHost:u,aiHost:c,setEditState({editable:x,canUndo:g,canRedo:v}){for(let h of [i.btn,a?.btn,p?.btn])h&&(h.hidden=!x);u.hidden=!x,c.hidden=!x,a?.setDisabled(!g),p?.setDisabled(!v);}}}function Fn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes"),i=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-notes-header");i.type="button",i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","slide-notes-content"),i.addEventListener("click",n),r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-notes-title");a.textContent=t("pptx.notes.title"),i.appendChild(a);let p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-notes-chevron");p.setAttribute("aria-hidden","true"),i.appendChild(p);let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes-body");s.id="slide-notes-content",r.appendChild(s);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes-toolbar");s.appendChild(l);let m=e.createElement("button");m.type="button",m.className="pptxv-notes-mode",l.appendChild(m);let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes-rich-editor");c.contentEditable="true",c.setAttribute("role","textbox"),c.setAttribute("aria-multiline","true"),c.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),s.appendChild(c);let u=e.createElement("textarea");u.className="pptxv-notes-textarea",u.name="slide-notes",u.spellcheck=true,u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),s.appendChild(u);let x=false,g=null,v=false,h=chunkS5V27BHI_cjs.Fa(),b=[],T=y=>{h=y,c.hidden=!h,u.hidden=h,l.hidden=!v,m.textContent=t(h?"pptx.notes.plainEditor":"pptx.notes.richEditor"),m.setAttribute("aria-pressed",String(h));},k=()=>{if(!v)return;let y=chunkS5V27BHI_cjs.Ga(c);b=y.segments,o(y.text,y.segments);},S=(y,P,E)=>{let w=e.createElement("button");w.type="button",w.className="pptxv-notes-tool",w.textContent=y,w.title=P,w.setAttribute("aria-label",P),w.addEventListener("mousedown",A=>A.preventDefault()),w.addEventListener("click",()=>{c.focus(),E(),k();}),l.insertBefore(w,m);};S("B",t("pptx.notes.bold"),()=>chunkS5V27BHI_cjs.Ia("bold")),S("I",t("pptx.notes.italic"),()=>chunkS5V27BHI_cjs.Ia("italic")),S("U",t("pptx.notes.underline"),()=>chunkS5V27BHI_cjs.Ia("underline")),S("S",t("pptx.notes.strikethrough"),()=>chunkS5V27BHI_cjs.Ia("strikeThrough")),S("\u2022",t("pptx.notes.bulletList"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"bullet").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("1.",t("pptx.notes.numberedList"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"numbered").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("\u2192",t("pptx.notes.indent"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"indent").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("\u2190",t("pptx.notes.outdent"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"outdent").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("\u2197",t("pptx.notes.insertLink"),()=>{let y=e.getSelection()?.toString()??"",P=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!P)return;let E=window.prompt(t("pptx.notes.linkDisplayText"),y)??y;chunkS5V27BHI_cjs.Ka(chunkS5V27BHI_cjs.Ja(P),E);}),m.addEventListener("click",()=>{h?(k(),u.value=chunkS5V27BHI_cjs.Ca(b)):(b=chunkS5V27BHI_cjs.Ba(u.value),c.innerHTML=chunkS5V27BHI_cjs.Da(b)),T(!h);});let f=()=>{v&&o(u.value);};u.addEventListener("change",f),u.addEventListener("blur",f),c.addEventListener("blur",k);let C=()=>{r.dataset.collapsed=x?"false":"true",i.setAttribute("aria-expanded",String(x)),s.hidden=!x,p.textContent=x?"\u25BE":"\u25B8";};return C(),T(h),{el:r,update({slide:y,editable:P}){v=P;let E=y!==void 0;u.disabled=!E,u.readOnly=!v,c.contentEditable=String(v&&E),l.hidden=!v,u.placeholder=t(E?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let w=y?.id??null;w!==g&&(g=w,b=chunkS5V27BHI_cjs.Ea(y),u.value=chunkS5V27BHI_cjs.Ca(b),c.innerHTML=chunkS5V27BHI_cjs.Da(b));},setExpanded(y){x=y,C();}}}function Bn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=D(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),a=!chunkS5V27BHI_cjs.Pd("navigation",o),p=a?D(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,s=a?D(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-presentation-touch-counter");l.setAttribute("aria-live","polite");for(let m of [i.btn,p?.btn,s?.btn])m?.addEventListener("pointerdown",c=>c.stopPropagation()),m?.addEventListener("click",c=>c.stopPropagation());return r.append(i.btn,...p?[p.btn]:[],...s?[s.btn]:[],l),{el:r,update(m,c){let u=chunkS5V27BHI_cjs.Nc(m,c);p?.setDisabled(u.previousDisabled),s?.setDisabled(u.nextDisabled),l.textContent=u.counterLabel;}}}function oc(e){if(!e.trim())return "";try{let t=chunkS5V27BHI_cjs.n(e),n=chunkS5V27BHI_cjs.m(t);return n?chunkS5V27BHI_cjs.La(n):""}catch{return ""}}function nc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let a=chunkS5V27BHI_cjs.Ke(e,"header","pptxv-eqdlg-header"),p=chunkS5V27BHI_cjs.Ke(e,"h2");p.textContent=t("pptx.equation.insertTitle");let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-eqdlg-close");s.type="button",s.textContent="\xD7",s.setAttribute("aria-label",t("pptx.settings.close")),a.append(p,s);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-preview"),m=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-eqdlg-field"),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-label");c.textContent=t("pptx.equation.latexInput");let u=e.createElement("textarea");u.className="pptxv-eqdlg-input",u.rows=3,u.placeholder="\\frac{a}{b} + \\sqrt{c}",u.spellcheck=false;let x=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-hint");x.textContent=t("pptx.equation.latexHint"),m.append(c,u,x);let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-field"),v=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-label");v.textContent=t("pptx.equation.templates");let h=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-grid"),b=[];for(let I of chunkS5V27BHI_cjs.p){let H=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-eqdlg-template");H.type="button",H.title=t(I.i18nKey);let M=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-template-math");M.innerHTML=oc(I.latex);let O=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-template-label");O.textContent=t(I.i18nKey),H.append(M,O),H.addEventListener("click",()=>{u.value=I.latex,P(),u.focus();}),h.appendChild(H),b.push(H);}g.append(v,h);let T=()=>{let I=u.value.trim();if(!I)return null;try{let H=chunkS5V27BHI_cjs.n(I);return Object.keys(H).length>0?H:null}catch{return null}},k=true,S,f=chunkS5V27BHI_cjs.Ke(e,"footer","pptxv-eqdlg-footer"),C=D(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>w(false)}),y=D(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let I=T();I&&(n(I,S),u.value="",P(),w(false));}});y.btn.classList.add("is-primary"),f.append(C.btn,y.btn),i.append(a,l,m,g,f),o.append(r,i);let P=()=>{let I=oc(u.value);I?(l.classList.remove("is-empty"),l.innerHTML=I):(l.classList.add("is-empty"),l.textContent=t("pptx.equation.previewPlaceholder"));let H=u.value;for(let[M,O]of b.entries())O.classList.toggle("is-active",chunkS5V27BHI_cjs.p[M]?.latex===H);y.setDisabled(!k||T()===null);};u.addEventListener("input",P),o.addEventListener("keydown",I=>{I.stopPropagation(),I.key==="Escape"?w(false):I.key==="Enter"&&(I.ctrlKey||I.metaKey)&&(I.preventDefault(),y.btn.click());}),r.addEventListener("click",()=>w(false)),s.addEventListener("click",()=>w(false));let E=false,w=I=>{E=I,o.hidden=!E,E?u.focus():S=void 0;},A=()=>{let I=S!==void 0,H=t(I?"pptx.equation.editTitle":"pptx.equation.insertTitle"),M=t(I?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",H),p.textContent=H,y.btn.textContent=M,y.btn.title=M,y.btn.setAttribute("aria-label",M);};return P(),{el:o,toggle:()=>{E||(S=void 0,u.value="",A(),P()),w(!E);},setOpen:w,isOpen:()=>E,setEditable(I){k=I,u.disabled=!I,y.setDisabled(!I||T()===null);},openEdit(I,H){S=I,u.value=chunkS5V27BHI_cjs.o(H),A(),P(),w(true);}}}function Vn(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-findreplace");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.findReplace.ariaLabel"));let r=e.createElement("input");r.type="text",r.className="pptxv-findreplace-input",r.placeholder=t("pptx.findReplace.findPlaceholder"),r.setAttribute("aria-label",t("pptx.findReplace.searchText"));let i=e.createElement("input");i.type="text",i.className="pptxv-findreplace-input",i.placeholder=t("pptx.findReplace.replacePlaceholder"),i.setAttribute("aria-label",t("pptx.findReplace.replacementText"));let a=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-findreplace-checkbox"),p=e.createElement("input");p.type="checkbox",p.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),a.append(p,e.createTextNode(t("pptx.findReplace.matchCase")));let s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-findreplace-status");s.setAttribute("aria-live","polite");let l=()=>{let b=n.search(r.value,p.checked);s.textContent=b>0?t("pptx.findReplace.matchCount",{current:1,total:b}):t("pptx.findReplace.noMatches");},m=D(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:l}),c=D(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,p.checked),l();}}),u=D(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,p.checked),l();}}),x=D(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>h(false)});r.addEventListener("input",l),r.addEventListener("keydown",b=>{b.stopPropagation(),b.key==="Escape"&&h(false);}),i.addEventListener("keydown",b=>b.stopPropagation());let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-findreplace-row");g.append(r,i,a,m.btn,c.btn,u.btn,x.btn),o.append(g,s);let v=false,h=b=>{v=b,o.hidden=!v,v&&r.focus();};return {el:o,toggle:()=>h(!v),setOpen:h,isOpen:()=>v,setEditable(b){i.disabled=!b,c.setDisabled(!b),u.setDisabled(!b);}}}function rc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=Fe(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:c=>n.setSlideBackgroundColor(c)},"#ffffff"),i=D(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),a=D(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>m(false)}),p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-format-background-row"),s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-format-background-label");s.textContent=t("pptx.slideBackground.colour"),p.append(s,r.el,i.btn,a.btn),o.appendChild(p);let l=false,m=c=>{l=c,o.hidden=!l;};return {el:o,toggle:()=>m(!l),setOpen:m,isOpen:()=>l,setEditable(c){r.setDisabled(!c),i.setDisabled(!c);}}}var qx=24,Kx=1,jx=400;function pe(e){return e!==void 0&&chunkEWJAZ6TW_cjs.j(e)}function io(e){return e!==void 0&&chunkEWJAZ6TW_cjs.k(e)}function Ee(e){let t=pe(e)?e.textStyle:void 0,n=pe(e)?e.textSegments?.find(o=>o.text)?.style:void 0;return {bold:!!(t?.bold??n?.bold),italic:!!(t?.italic??n?.italic),underline:!!(t?.underline??n?.underline),strikethrough:!!(t?.strikethrough??n?.strikethrough),hasTextShadow:!!(t?.textShadowColor??n?.textShadowColor),fontSize:t?.fontSize??n?.fontSize??qx,fontFamily:t?.fontFamily??n?.fontFamily,color:t?.color??n?.color,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:t?.listType??n?.listType,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function Le(e,t){if(!pe(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function je(e,t){let n=Ee(e);return Le(e,{[t]:!n[t]})}function ao(e,t){let n=Math.min(jx,Math.max(Kx,Math.round(t)));return Le(e,{fontSize:n})}function Nn(e,t){return ao(e,Ee(e).fontSize+t)}function zn(e,t){return Le(e,{color:t})}function Gn(e,t){return Le(e,{highlightColor:t})}function Te(e,t){return io(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function _n(e,t){return Le(e,{fontFamily:t})}function Un(e,t){return Le(e,{characterSpacing:t})}var Yx={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function Wn(e){let t=Ee(e).hasTextShadow;return Le(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:Yx)}function $n(e,t){if(!pe(e)||!e.textSegments)return {};let n=chunkS5V27BHI_cjs.Va(e.textSegments,null,t);return {textSegments:n,text:n.map(o=>o.text).join("")}}function qn(e){return Le(e,{bold:false,italic:false,underline:false,strikethrough:false,highlightColor:void 0,textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0,characterSpacing:void 0})}var Xx=[{edge:"left",icon:"align-left"},{edge:"centerH",icon:"align-center"},{edge:"right",icon:"align-right"},{edge:"top",icon:"align-top"},{edge:"middle",icon:"align-middle"},{edge:"bottom",icon:"align-bottom"}];function ic(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.arrange"),o.appendChild(i);let a=D(e,{label:t("pptx.arrange.bringToFront"),icon:"bring-front",onClick:n.bringToFront}),p=D(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),s=D(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),l=D(e,{label:t("pptx.arrange.sendToBack"),icon:"send-back",onClick:n.sendToBack}),m=Xx.map(k=>D(e,{label:t("pptx.arrange.align",{direction:k.edge}),icon:k.icon,onClick:()=>n.alignElements(k.edge)})),c=D(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),u=D(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),x=D(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),g=D(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),v=D(e,{label:t("pptx.ribbon.group"),icon:"group",onClick:n.groupSelected}),h=D(e,{label:t("pptx.ribbon.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),b=D(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",onClick:n.duplicate}),T=D(e,{label:t("pptx.arrange.delete"),icon:"trash",onClick:n.delete});return r.append(a.btn,p.btn,s.btn,l.btn,...m.map(k=>k.btn),c.btn,u.btn,x.btn,g.btn,v.btn,h.btn,b.btn,T.btn),{el:o,update({editable:k,hasSelection:S,isGroup:f,selectedCount:C}){let y=k&&S;for(let P of [a,p,s,l,...m,x,g,b,T])P.setDisabled(!y);c.setDisabled(!k||C<3),u.setDisabled(!k||C<3),v.setDisabled(!k||C<2),h.setDisabled(!y||!f);}}}function ac(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let a=D(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),p=D(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),s=D(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),l=D(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return l.btn.dataset.testid="format-painter-toggle",r.append(a.btn,p.btn,s.btn,l.btn),{el:o,update({hasSelection:m,hasClipboard:c,editable:u,formatPainterActive:x}){a.setDisabled(!u||!c),p.setDisabled(!u||!m),s.setDisabled(!m),l.setDisabled(!u||!m&&!x),l.btn.dataset.active=String(x);}}}function pc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let a=D(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),p=D(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace});return r.append(a.btn,p.btn),{el:o}}function J(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-dropdown"),o=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-dropdown-trigger");o.type="button",o.title=t.triggerLabel,o.setAttribute("aria-label",t.triggerLabel),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false");let r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunkS5V27BHI_cjs.Te(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let a=false,p,s=new Map,l=c=>{a=c,i.hidden=!c,o.setAttribute("aria-expanded",String(c)),o.classList.toggle("is-active",c);},m=()=>{for(let[c,u]of s){let x=p!==void 0&&u===p;c.classList.toggle("is-selected",x),c.setAttribute("aria-selected",String(x));}};for(let c of t.items){let u=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-dropdown-item");u.type="button",u.setAttribute("role","option"),u.setAttribute("aria-selected","false"),u.textContent=c.label,c.style&&Object.assign(u.style,c.style),u.addEventListener("click",()=>{l(false),t.onSelect(c.value);}),i.appendChild(u),s.set(u,c.value);}return o.addEventListener("click",c=>{c.stopPropagation(),l(!a);}),e.addEventListener("pointerdown",c=>{a&&!n.contains(c.target)&&l(false);}),{el:n,setDisabled(c){o.disabled=c,c&&l(false);},setTriggerText(c){r.textContent=c;},setSelected(c){p=c,m();},close:()=>l(false)}}var Ye=["#000000","#ffffff","#ff0000","#00aa00","#0000ff","#ff8800","#8800cc","#00cccc","#ff69b4","#808080"];function Zx(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Xe(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-swatch-picker"),r=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-dropdown-trigger pptxv-swatch-trigger");r.type="button",r.title=n.label,r.setAttribute("aria-label",n.label),r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(chunkS5V27BHI_cjs.Te(e,n.icon));let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-swatch-menu");a.hidden=true,o.appendChild(a);let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-swatch-grid");a.appendChild(p);let s=n.fallback,l=new Map,m=()=>{for(let[v,h]of l)v.classList.toggle("is-selected",h===s);i.style.backgroundColor=s;},c=false,u=v=>{c=v,a.hidden=!v,r.setAttribute("aria-expanded",String(v)),r.classList.toggle("is-active",v);};for(let v of n.swatches){let h=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-swatch");h.type="button",h.setAttribute("data-pptx-compact",""),h.style.backgroundColor=v,h.setAttribute("aria-label",v),h.addEventListener("click",()=>{u(false),n.onSelect(v);}),p.appendChild(h),l.set(h,v);}let x=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-swatch-custom");x.textContent=t("pptx.ribbon.customColour");let g=e.createElement("input");return g.type="color",g.className="pptxv-swatch-custom-input",g.addEventListener("input",()=>n.onSelect(g.value)),x.appendChild(g),a.appendChild(x),r.addEventListener("click",v=>{v.stopPropagation(),u(!c);}),e.addEventListener("pointerdown",v=>{c&&!o.contains(v.target)&&u(false);}),m(),{el:o,setValue(v){s=Zx(v,n.fallback),g.value=s,m();},setDisabled(v){r.disabled=v,v&&u(false);}}}var sc=2;function lc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let a=J(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:chunkS5V27BHI_cjs.$c.map(C=>({label:C,value:C,style:{fontFamily:C}})),onSelect:n.setFontFamily});a.el.classList.add("pptxv-font-family-dd");let p=J(e,{triggerLabel:t("pptx.textPanel.size"),triggerText:"24",items:chunkS5V27BHI_cjs.ad.map(C=>({label:String(C),value:C})),onSelect:n.setFontSize});p.el.classList.add("pptxv-font-size-dd");let s=D(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),l=D(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),m=D(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),c=D(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),u=D(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),x=D(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-sc)}),g=D(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(sc)}),v=D(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),h=J(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunkS5V27BHI_cjs.bd.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.setCharacterSpacing});h.el.querySelector(".pptxv-dropdown-text")?.remove();let b=J(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunkS5V27BHI_cjs.dd.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.changeCase});b.el.querySelector(".pptxv-dropdown-text")?.remove();let T=Xe(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:Ye,fallback:"#000000",onSelect:n.setTextColor}),k=Xe(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:Ye,fallback:"#ffff00",onSelect:n.setHighlightColor});r.append(a.el,p.el,x.btn,g.btn,s.btn,l.btn,m.btn,c.btn,u.btn,v.btn,h.el,b.el,T.el,k.el);let S=[s,l,m,c],f=[a,p,x,g,s,l,m,c,u,v,h,b,T,k];return {el:o,update({canFormat:C,editable:y,text:P}){s.setActive(P.bold),l.setActive(P.italic),m.setActive(P.underline),c.setActive(P.strikethrough),u.setActive(P.hasTextShadow),a.setTriggerText(P.fontFamily??"Segoe UI"),a.setSelected(P.fontFamily),p.setTriggerText(String(P.fontSize)),p.setSelected(P.fontSize),T.setValue(P.color),k.setValue(P.highlightColor);for(let E of f)E.setDisabled(!y||!C);for(let E of S)(!y||!C)&&E.setActive(false);}}}var dc=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify"}];function cc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.paragraph"),o.appendChild(i);let a=D(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),p=D(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList}),s=D(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),l=D(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),m=dc.map(x=>D(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTextAlign(x.align)})),c=J(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunkS5V27BHI_cjs.cd.map(x=>({label:x.label,value:x.value})),onSelect:n.setLineSpacing});c.el.querySelector(".pptxv-dropdown-text")?.remove(),r.append(a.btn,p.btn,s.btn,l.btn,...m.map(x=>x.btn),c.el);let u=[a,p,s,l,...m,c];return {el:o,update({canFormat:x,editable:g,text:v}){a.setActive(v.listType==="bullet"),p.setActive(v.listType==="numbered");for(let[h,b]of dc.entries())m[h].setActive(v.align===b.align);c.setSelected(v.lineSpacing);for(let h of u)h.setDisabled(!g||!x);}}}function mc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu pptxv-layout-menu");o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=a=>{r=a,o.hidden=!a;};return e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);}),{el:o,setItems(a){o.replaceChildren();for(let p of a){let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-primary-menu-item");s.type="button",s.setAttribute("role","menuitem"),s.textContent=p.name,s.addEventListener("click",()=>{i(false),n(p);}),o.appendChild(s);}},toggle:()=>i(!r),close:()=>i(false)}}function uc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-slides-split"),p=D(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-slides-caret");s.type="button",s.title=t("pptx.home.chooseLayout"),s.setAttribute("aria-label",t("pptx.home.chooseLayout")),s.setAttribute("aria-haspopup","menu"),s.appendChild(chunkS5V27BHI_cjs.Te(e,"chevron-down"));let l=mc(e,t("pptx.home.chooseLayout"),v=>n.insertSlideFromLayout(v.path,v.name));s.addEventListener("click",v=>{v.stopPropagation(),l.toggle();}),a.append(p.btn,s,l.el);let m=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-slides-menu-host"),c=D(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>u.toggle()});c.btn.setAttribute("aria-haspopup","menu");let u=mc(e,t("pptx.master.layout"),v=>n.applyLayout(v.path));m.append(c.btn,u.el);let x=D(e,{label:t("pptx.sections.resetSlideTitle"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide}),g=D(e,{label:t("pptx.sections.addSection"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return r.append(a,m,x.btn,g.btn),{el:o,update({editable:v,slideCount:h,layouts:b}){let T=b.length>0;l.setItems(b),u.setItems(b),p.setDisabled(!v),s.hidden=!T,s.disabled=!v,c.setDisabled(!v||!T),x.setDisabled(!v||h===0),g.setDisabled(!v||h===0),v||(l.close(),u.close());}}}function xc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=ac(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=uc(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName"))}),p=lc(e,t,{toggleBold:r.toggleBold,toggleItalic:r.toggleItalic,toggleUnderline:r.toggleUnderline,toggleStrikethrough:r.toggleStrikethrough,toggleTextShadow:r.toggleTextShadow,setFontFamily:r.setFontFamily,setFontSize:r.setFontSize,changeFontSize:r.changeFontSize,setTextColor:r.setTextColor,setHighlightColor:r.setHighlightColor,setCharacterSpacing:r.setCharacterSpacing,changeCase:r.changeCase,clearFormatting:r.clearFormatting}),s=cc(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing}),l=ic(e,t,{bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,alignElements:r.alignElements,distributeElements:r.distributeElements,flipHorizontal:r.flipHorizontal,flipVertical:r.flipVertical,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,duplicate:r.duplicateSelected,delete:r.deleteSelected}),m=pc(e,t,{toggleFindReplace:n.onToggleFindReplace});return o.append(i.el,a.el,p.el,s.el,m.el,l.el),{el:o,update({editable:c,selectedElement:u,hasClipboard:x,slideCount:g,selectedCount:v,formatPainterActive:h,layouts:b}){let T=pe(u),k=Ee(u);i.update({hasSelection:u!==void 0,hasClipboard:x,editable:c,formatPainterActive:h}),a.update({editable:c,slideCount:g,layouts:b}),p.update({canFormat:T,editable:c,text:k}),s.update({canFormat:T,editable:c,text:k}),l.update({editable:c,hasSelection:u!==void 0,isGroup:u?.type==="group",selectedCount:v});}}}function Kn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,a=p=>{i=p,r.hidden=!p,o?.(p);};for(let p of n){p.separatorBefore&&r.appendChild(chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu-sep"));let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-primary-menu-item");s.type="button",s.setAttribute("role","menuitem"),s.textContent=p.label,s.addEventListener("click",()=>{a(false),p.run();}),r.appendChild(s);}return e.addEventListener("pointerdown",p=>{i&&!r.parentElement?.contains(p.target)&&a(false);}),{el:r,toggle:()=>a(!i),close:()=>a(false),isOpen:()=>i}}function gc(e,t,n){let{slideShow:o}=t,r=[{label:e("pptx.toolbar.present"),run:()=>o.startFromCurrent()},{label:e("pptx.slideShow.presenterView"),run:()=>o.openPresenterView()},{label:e("pptx.slideShow.rehearseTimings"),run:()=>o.startRehearsal()},{label:e("pptx.slideShow.setUp"),run:()=>o.openSetUp(),separatorBefore:true}];return chunkS5V27BHI_cjs.Pd("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function bc(e,t,n){let{file:o,nav:r}=t,i=[];return chunkS5V27BHI_cjs.Pd("export",n)||i.push({label:e("pptx.ribbon.exportPng"),run:()=>o.exportPng()},{label:e("pptx.ribbon.exportPdf"),run:()=>o.exportPdf()},{label:e("pptx.ribbon.exportVideo"),run:()=>o.exportVideo()},{label:e("pptx.ribbon.exportGif"),run:()=>o.exportGif()},{label:e("pptx.file.packageTooltip"),run:()=>o.packageForSharing()},{label:e("pptx.file.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()}),i.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true},{label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage()},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true},{label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")},{label:e("pptx.ribbon.versionHistory"),run:()=>o.openVersionHistory(),separatorBefore:true},{label:e("pptx.ribbon.documentProperties"),run:()=>o.openDocumentProperties(),separatorBefore:true},{label:e("pptx.security.protectPresentation"),run:()=>o.openPasswordProtection()},{label:e("pptx.ribbon.embedFonts"),run:()=>o.openFontEmbedding()},{label:e("pptx.viewer.digitalSignatures"),run:()=>o.openDigitalSignatures()}),i}function fc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-primary"),i=D(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-present-split"),p=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-present-main");p.type="button",p.title=t("pptx.present.presentTooltip"),p.textContent=t("pptx.toolbar.present"),p.addEventListener("click",()=>n.slideShow.startFromCurrent());let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-present-caret");s.type="button",s.title=t("pptx.present.optionsTooltip"),s.setAttribute("aria-label",t("pptx.present.optionsTooltip")),s.setAttribute("aria-haspopup","menu"),s.appendChild(chunkS5V27BHI_cjs.Te(e,"chevron-down"));let l=Kn(e,t("pptx.present.optionsTooltip"),gc(t,n,o),h=>{s.classList.toggle("is-active",h),s.setAttribute("aria-expanded",String(h));});s.addEventListener("click",h=>{h.stopPropagation(),l.toggle();}),a.append(p,s,l.el),r.appendChild(a);let m=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-show-btn");m.type="button",m.title=t("pptx.customShows.createTooltip"),m.textContent="+ Show",m.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(m),r.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-primary-sep"));let c=D(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(c.btn);let u=D(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()});r.appendChild(u.btn);let x=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu-host"),g=Kn(e,t("pptx.ribbon.moreActions"),bc(t,n,o)),v=D(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>g.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",h=>h.stopPropagation()),x.append(v.btn,g.el),r.appendChild(x),{el:r,setEditState({editable:h}){r.hidden=!h,h||(l.close(),g.close());},setAutosaveStatus(){},setInspectorOpen(h){c.setActive(h);}}}var dt=[{id:"file",labelKey:"pptx.ribbon.tab.file"},{id:"home",labelKey:"pptx.ribbon.tab.home"},{id:"insert",labelKey:"pptx.ribbon.tab.insert"},{id:"draw",labelKey:"pptx.ribbon.tab.draw"},{id:"design",labelKey:"pptx.ribbon.tab.design"},{id:"transitions",labelKey:"pptx.ribbon.tab.transitions"},{id:"animations",labelKey:"pptx.ribbon.tab.animations"},{id:"slideShow",labelKey:"pptx.ribbon.tab.slideShow"},{id:"record",labelKey:"pptx.ribbon.tab.record"},{id:"review",labelKey:"pptx.ribbon.tab.review"},{id:"view",labelKey:"pptx.ribbon.tab.view"},{id:"help",labelKey:"pptx.ribbon.tab.help"}],po="home";function jn(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let a=new Map,p=new Map;for(let s of chunkS5V27BHI_cjs.Qd(dt,o)){let l=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-ribbon-tab");s.id==="file"&&l.classList.add("pptxv-ribbon-tab-file"),l.type="button",l.setAttribute("role","tab");let m=t(s.labelKey);l.textContent=m,l.addEventListener("click",()=>n(s.id)),i.appendChild(l),a.set(s.id,l),p.set(s.id,m);}if(r){i.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-tabrow-spacer"));let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-tabrow-actions");if(!chunkS5V27BHI_cjs.Pd("record",o)){let l=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-tabrow-record");l.type="button",l.title=t("pptx.titleBar.record"),l.setAttribute("aria-label",t("pptx.titleBar.record"));let m=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-tabrow-record-dot");m.setAttribute("aria-hidden","true");let c=chunkS5V27BHI_cjs.Ke(e,"span");c.textContent=t("pptx.titleBar.record"),l.append(m,c),l.addEventListener("click",()=>r.startRecording()),s.appendChild(l);}i.appendChild(s);}return {el:i,setActive(s){for(let[l,m]of a){let c=l===s;m.classList.toggle("is-active",c),m.setAttribute("aria-selected",String(c));}},setHiddenTabs(s){for(let[l,m]of a)m.hidden=l!=="file"&&s.has(l);},applyScreenTips(s){for(let[l,m]of a){let c=s(p.get(l)??"");c?m.title=c:m.removeAttribute("title");}}}}function ct(e,t,n){let o=e.createElement("label");o.textContent=t;let r=e.createElement("input");return r.type="number",r.min="0",r.max="10000",r.step="100",r.value=String(n),o.appendChild(r),{label:o,input:r}}function mt(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");for(let a of o){let p=e.createElement("option");p.value=a,p.textContent=t(`${n}.${a}`),i.appendChild(p);}return r.appendChild(i),{label:r,select:i}}function vc(e,t,n,o,r,i,a,p){let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timeline-row");s.draggable=a,s.addEventListener("dragstart",x=>x.dataTransfer?.setData("text/plain",n.elementId)),s.addEventListener("dragover",x=>x.preventDefault()),s.addEventListener("drop",x=>{x.preventDefault();let g=x.dataTransfer?.getData("text/plain");g&&p.moveAnimation(g,o);}),s.classList.toggle("is-selected",n.elementId===i);let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-animation-timeline-name"),m=n.entrance??n.emphasis??n.exit??"custom";l.textContent=`${o+1}. ${m}`;let c=D(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>p.reorderAnimation(n.elementId,"up")}),u=D(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>p.reorderAnimation(n.elementId,"down")});return c.setDisabled(!a||o===0),u.setDisabled(!a||o===r-1),s.append(l,c.btn,u.btn),s}var Qx=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunkS5V27BHI_cjs.r},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunkS5V27BHI_cjs.t},{group:"exit",labelKey:"pptx.animation.exit",presets:chunkS5V27BHI_cjs.s}];function hc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=[];for(let y of Qx){let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),E=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");E.textContent=t(y.labelKey),P.appendChild(E);let w=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-gallery");for(let A of y.presets){let I=D(e,{label:t(`pptx.animation.preset.${A}`),text:t(`pptx.animation.preset.${A}`),onClick:()=>n.addAnimation(y.group,A)});w.appendChild(I.btn),r.push(I);}P.appendChild(w),o.appendChild(P);}let i=D(e,{label:t("pptx.animation.remove"),text:t("pptx.animation.remove"),onClick:()=>n.removeAnimation()});o.appendChild(i.btn),r.push(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timeline"),p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");p.textContent=t("pptx.animation.timeline");let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timeline-list"),l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timing-controls"),m=e.createElement("select");m.setAttribute("aria-label",t("pptx.animation.trigger"));let c=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let y of c){let P=e.createElement("option");P.value=y,P.textContent=t(`pptx.animation.trigger.${y}`),m.appendChild(P);}let u=ct(e,t("pptx.animation.duration"),500),x=ct(e,t("pptx.animation.delay"),0),g=mt(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),v=mt(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),h=mt(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),b=mt(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),T=ct(e,t("pptx.animation.repeatCount"),1),k=ct(e,t("pptx.animations.triggerShape"),0);k.input.type="text",k.input.min="",k.input.max="";let S=D(e,{label:t("pptx.animation.preview"),text:t("pptx.animation.preview"),onClick:()=>{if(!f)return;e.querySelector(`[data-element-id="${CSS.escape(f.elementId)}"]`)?.animate([{opacity:0,transform:"translateY(12px)"},{opacity:1,transform:"translateY(0)"}],{duration:f.durationMs??500,easing:"ease"});}});l.append(m,u.label,x.label,g.label,v.label,h.label,T.label,b.label,k.label,S.btn),a.append(p,s,l),o.appendChild(a);let f,C=()=>{f&&n.setAnimationTiming(f.elementId,{trigger:m.value,durationMs:u.input.valueAsNumber,delayMs:x.input.valueAsNumber,direction:g.select.value,sequence:v.select.value,timingCurve:h.select.value,repeatCount:T.input.valueAsNumber,repeatMode:b.select.value,triggerShapeId:k.input.value});};for(let y of [m,g.select,v.select,h.select,b.select])y.addEventListener("change",C);return u.input.addEventListener("change",C),x.input.addEventListener("change",C),T.input.addEventListener("change",C),k.input.addEventListener("change",C),{el:o,update({editable:y,hasSelection:P,selectedElementId:E,animations:w}){let A=!y||!P;for(let H of r)H.setDisabled(A);let I=[...w].sort((H,M)=>(H.order??0)-(M.order??0));f=I.find(({elementId:H})=>H===E),s.replaceChildren(...I.map((H,M)=>vc(e,t,H,M,I.length,E,y,n))),a.hidden=I.length===0,l.hidden=!f,m.value=f?.trigger??"onClick",k.input.value=f?.triggerShapeId??"",k.label.hidden=m.value!=="onShapeClick",u.input.value=String(f?.durationMs??500),x.input.value=String(f?.delayMs??0),g.select.value=f?.direction??"fromTop",v.select.value=f?.sequence??"asOne",h.select.value=f?.timingCurve??"ease",b.select.value=f?.repeatMode??"none",T.input.value=String(f?.repeatCount??1);for(let H of [m,u.input,x.input,g.select,v.select,h.select,b.select,T.input,k.input])H.disabled=!y;}}}var Jx=[{labelKey:"pptx.ribbon.theme.default",theme:void 0},{labelKey:"pptx.ribbon.theme.light",theme:chunkS5V27BHI_cjs.e},{labelKey:"pptx.ribbon.theme.dark",theme:chunkS5V27BHI_cjs.f}];function yc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-theme-gallery");for(let l of Jx){let m=D(e,{label:t(l.labelKey),text:t(l.labelKey),onClick:()=>n.setTheme(l.theme)}),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-theme-swatch-preview");c.style.background=l.theme?.colors?.primary??"#6b7280",m.btn.prepend(c),i.appendChild(m.btn);}r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-theme-gallery pptxv-deck-theme-gallery"),p=chunkEWJAZ6TW_cjs.m.map(l=>{let m=D(e,{label:l.name,text:l.name,onClick:()=>n.applyPresentationTheme(l.id)}),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-theme-swatch-preview");return c.style.background=`linear-gradient(135deg, ${l.colorScheme.accent1}, ${l.colorScheme.accent2})`,m.btn.prepend(c),a.appendChild(m.btn),m});r.appendChild(a);let s=D(e,{label:t("pptx.ribbon.formatBackground"),text:t("pptx.ribbon.formatBackground"),onClick:o});return r.appendChild(s.btn),{el:r,setEditable(l){s.setDisabled(!l);for(let m of p)m.setDisabled(!l);}}}var eg=[1,2,3,4,6,8,12,16],Sc=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser"}];function Cc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");a.textContent=t("pptx.ribbon.draw"),r.appendChild(a);let p=Sc.map(x=>D(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTool(x.tool)}));i.append(...p.map(x=>x.btn)),o.appendChild(r);let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");s.appendChild(l);let m=Xe(e,t,{label:t("pptx.ribbon.penColour"),icon:"pen",swatches:Ye,fallback:"#000000",onSelect:x=>n.setColor(x)}),c=J(e,{triggerLabel:t("pptx.ribbon.strokeWidth"),triggerText:"",icon:"chevron-down",items:eg.map(x=>({label:`${x} px`,value:x})),onSelect:x=>n.setWidth(x)});l.append(m.el,c.el),o.appendChild(s);let u=[...p,m,c];return {el:o,setEditable(x){for(let g of u)g.setDisabled(!x);},update(x){for(let[g,v]of Sc.entries())p[g].setActive(x.tool===v.tool);m.setValue(x.color),c.setSelected(x.width),c.setTriggerText(`${x.width} px`);}}}var wc="1.1.0";function Ec(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-account");n.appendChild(r);let i={...chunkS5V27BHI_cjs.Id,...chunkS5V27BHI_cjs.Gd().profile};r.appendChild(og(e,t,i,p=>{i=p,chunkS5V27BHI_cjs.Nd(i);}));let a=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section");r.appendChild(a),ng(e,t,a),r.appendChild(rg(e,t)),o?.enabled&&r.appendChild(ig(e,t,o));}function og(e,t,n,o){let r=n,i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section"),a=e.createElement("h2");a.textContent=t("pptx.account.profile.title"),i.appendChild(a);let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-account-profile-row"),s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-account-avatar"),l=()=>{s.textContent=chunkS5V27BHI_cjs.Kd(r),s.style.background=r.avatarColor;};l();let m=e.createElement("label");m.className="pptxv-account-name-field";let c=e.createElement("span");c.textContent=t("pptx.account.profile.nameLabel");let u=e.createElement("input");u.type="text",u.placeholder=t("pptx.account.profile.namePlaceholder"),u.value=r.displayName,u.addEventListener("input",()=>{r={...r,displayName:u.value},l(),o(r);}),m.append(c,u),p.append(s,m),i.appendChild(p);let x=e.createElement("p");x.className="pptxv-account-swatch-label",x.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(x);let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-parity-swatch-row"),v=(h,b)=>{r={...r,avatarColor:b},l();for(let T of g.querySelectorAll("button"))T.classList.toggle("is-active",T===h);o(r);};for(let h of chunkS5V27BHI_cjs.Jd){let b=e.createElement("button");b.type="button",b.className="pptxv-account-color-swatch",b.classList.toggle("is-active",h===r.avatarColor),b.style.background=h,b.setAttribute("aria-label",h),b.addEventListener("click",()=>v(b,h)),g.appendChild(b);}return i.appendChild(g),i}function ng(e,t,n){let o=e.createElement("h2");o.textContent=t("pptx.account.storage.title"),n.appendChild(o);let r=e.createElement("p");n.appendChild(r);let i=e.createElement("p");i.className="pptxv-account-privacy",i.textContent=t("pptx.account.storage.privacyBlurb"),n.appendChild(i);let a=e.createElement("button");a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.storage.clear"),n.appendChild(a);let p=e.createElement("p");p.className="pptxv-account-notice",p.hidden=true,n.appendChild(p);async function s(){let l=await chunkS5V27BHI_cjs.Ld();r.textContent=l.presentationCount>0?t("pptx.account.storage.usage",{count:l.presentationCount,size:chunkS5V27BHI_cjs.qd(l.totalBytes)}):t("pptx.account.storage.usageEmpty");}s(),a.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunkS5V27BHI_cjs.Md(),p.hidden=false,p.textContent=t("pptx.account.storage.clearedNotice"),await s()))();});}function rg(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section"),o=e.createElement("h2");o.textContent=t("pptx.account.about.title"),n.appendChild(o);let r=e.createElement("p");r.textContent="pptx-vanilla-viewer",n.appendChild(r);let i=e.createElement("p");return i.className="pptxv-account-privacy",i.textContent=t("pptx.account.about.version",{version:wc}),n.appendChild(i),n}function ig(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section"),r=e.createElement("h2");r.textContent=t("pptx.account.signIn.title"),o.appendChild(r);let i=e.createElement("p");if(i.textContent=t("pptx.account.signIn.description"),o.appendChild(i),n.signedInUser){let p=e.createElement("p");return p.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(p),o}let a=e.createElement("button");return a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.signIn.button"),a.addEventListener("click",()=>n.onSignIn()),o.appendChild(a),o}var hg={back:lucide.ArrowLeft,home:lucide.Home,new:lucide.FilePlus2,open:lucide.FolderOpen,info:lucide.Info,save:lucide.Save,saveAs:lucide.Download,print:lucide.Printer,share:lucide.Share2,export:lucide.Upload,close:lucide.X,account:lucide.UserRound,options:lucide.Settings},Tc="http://www.w3.org/2000/svg";function Pc(e,t){return ut(e,hg[t],17)}function ut(e,t,n){let o=e.createElementNS(Tc,"svg");for(let[r,i]of Object.entries({viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor","stroke-width":1.7,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))o.setAttribute(r,String(i));for(let[r,i]of t){let a=e.createElementNS(Tc,r);for(let[p,s]of Object.entries(i))s!==void 0&&a.setAttribute(p,String(s));o.appendChild(a);}return o}function De(e,t,n,o){let r=e.createElement("button");return r.type="button",r.textContent=t,o&&(r.className=o),r.addEventListener("click",n),r}function Yn(e,t,n,o){let r=De(e,"",n,o);return r.appendChild(Pc(e,t)),r}function Ac(e,t,n,o){let r=Yn(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}function Lc(e,t,n,o,r,i){let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-bs-actions"),p=(s,l,m,c)=>{let u=De(e,"",()=>r(c)),x=e.createElement("b");x.appendChild(ut(e,m,22));let g=e.createElement("span"),v=e.createElement("strong");v.textContent=s;let h=e.createElement("small");return h.textContent=l,g.append(v,h),u.append(x,g),u};return t==="saveAs"&&(a.append(p("PowerPoint Presentation","Save an editable .pptx copy.",lucide.FileText,n.save),p("PowerPoint Show","Save a .ppsx slide show.",lucide.Presentation,n.saveAsPpsx),p("Package for Sharing","Bundle the deck and linked assets.",lucide.Package,n.packageForSharing)),o&&a.append(p("Macro-Enabled Presentation","Preserve VBA in a .pptm file.",lucide.FileCode2,n.saveAsPptm))),t==="export"&&!chunkS5V27BHI_cjs.Pd("export",i)&&a.append(p("Create PDF","Publish one page per slide.",lucide.FileText,n.exportPdf),p("Export current slide","Create a high-quality PNG.",lucide.Image,n.exportPng),p("Create a Video","Export timings and animations.",lucide.Video,n.exportVideo),p("Create an Animated GIF","Make a compact looping preview.",lucide.Images,n.exportGif),p("Copy as Image","Copy the current slide.",lucide.Copy,n.copySlideAsImage)),t==="print"&&a.append(p("Print Presentation","Choose layout and output settings.",lucide.Printer,n.print)),t==="share"&&a.append(p("Share with People","Invite others to collaborate on this presentation.",lucide.UserPlus,n.openShare),p("Package for Sharing","Download a self-contained package.",lucide.Package,n.packageForSharing)),t==="info"&&a.append(p("Version History","Restore or remove the latest recovery snapshot.",lucide.Clock3,n.openVersionHistory),p("Document Properties","View and edit presentation metadata and statistics.",lucide.Info,n.openDocumentProperties),p("Protect Presentation","Control access and editing preferences.",lucide.LockKeyhole,n.openPasswordProtection),p("Embed Fonts","Keep typography consistent across devices.",lucide.Type,n.openFontEmbedding),p("Digital Signatures","View signatures attached to this presentation.",lucide.BadgeCheck,n.openDigitalSignatures)),a}function Dc(e,t,n,o,r,i){let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-backstage");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.setAttribute("aria-label","File");let p=e.createElement("aside"),s=Yn(e,"back",o,"pptxv-bs-back");s.setAttribute("aria-label","Back to presentation");let l=e.createElement("nav");p.append(s,l);let m=e.createElement("main");a.append(p,m);let c="home",u=false,x="",g=[];(async()=>(g=await chunkS5V27BHI_cjs.nd(),C()))();function v(y){y?.(),y&&o();}function h(y){if(y==="close")return o();if(y==="save")return v(n.save);if(y==="options")return v(n.openSettings);c=y,C();}function b(){l.replaceChildren();for(let y of chunkS5V27BHI_cjs.kd){y.group&&!l.querySelector("i")&&l.appendChild(e.createElement("i"));let P=Ac(e,y.id,y.label,()=>h(y.id));P.classList.toggle("active",c===y.id),l.appendChild(P);}}function T(){let y=e.createElement("h2");y.textContent="New";let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-bs-templates");for(let E of chunkS5V27BHI_cjs.ld){let w=De(e,"",()=>v(()=>n.createPresentation(E.id))),A=e.createElement("b");A.style.background=E.preview;let I=e.createElement("strong");I.textContent=E.name;let H=e.createElement("small");H.textContent=E.description,w.append(A,I,H),P.appendChild(w);}m.append(y,P);}function k(){let y=e.createElement("input");y.className="pptxv-bs-search",y.type="search",y.placeholder="Search recent presentations",y.value=x,y.addEventListener("input",()=>{x=y.value,C();}),m.appendChild(y),c==="open"&&m.appendChild(De(e,"Browse this device",()=>v(n.openFile),"pptxv-bs-primary"));let P=e.createElement("h2");P.textContent="Recent";let E=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-bs-recent"),w=e.createElement("header");w.innerHTML="<span>Name</span><span>Date modified</span><span>Size</span>",E.appendChild(w);let A=x.trim().toLowerCase(),I=A?g.filter(H=>`${H.name} ${H.location}`.toLowerCase().includes(A)):g;for(let H of I){let M=De(e,"",()=>v(()=>n.openRecentFile(H.key))),O=chunkS5V27BHI_cjs.Ke(e,"span","name"),L=e.createElement("b");L.textContent="P";let R=e.createElement("span"),B=e.createElement("strong");B.textContent=H.name;let F=e.createElement("small");F.textContent=H.location,R.append(B,F),O.append(L,R);let V=e.createElement("span");V.textContent=chunkS5V27BHI_cjs.pd(H.timestamp);let N=e.createElement("span");N.textContent=chunkS5V27BHI_cjs.qd(H.size),M.append(O,V,N),E.appendChild(M);}if(!I.length){let H=e.createElement("p");H.textContent="No recent presentations yet.",E.appendChild(H);}m.append(P,E);}function S(){m.appendChild(Lc(e,c,n,u,v,r));}function f(){let y=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-bs-card"),P=e.createElement("b");P.appendChild(ut(e,lucide.Settings,24));let E=e.createElement("h2");E.textContent="PowerPoint Options";let w=e.createElement("p");w.textContent="Configure autosave, proofing, grid, rulers, language, theme, and keyboard shortcuts.",y.append(P,E,w),y.appendChild(De(e,"Open Options",()=>v(n.openSettings),"pptxv-bs-primary")),m.appendChild(y);}function C(){b(),m.replaceChildren();let y=e.createElement("h1");y.textContent=c==="home"?"Good evening":chunkS5V27BHI_cjs.kd.find(E=>E.id===c)?.label??"Home",m.appendChild(y),(c==="home"||c==="new")&&T(),(c==="home"||c==="open")&&k(),["info","saveAs","print","share","export"].includes(c)&&S(),c==="options"&&f(),c==="account"&&Ec(e,t,m,i);let P=e.createElement("footer");P.textContent="Presentation \xB7 Saved to this browser",m.appendChild(P);}return C(),{el:a,setHasMacros(y){u=y,c==="saveAs"&&C();}}}function Mc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunkS5V27BHI_cjs.gc.map(i=>({label:i.label,value:i.shapeType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertActionButton")),o}function Hc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.chart"),triggerText:t("pptx.ribbon.chart"),items:chunkS5V27BHI_cjs.Pc.map(i=>({label:i.label,value:i.type})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertChart")),o}var Rg=[{fieldType:"slidenum",i18nKey:"pptx.field.slideNumber"},{fieldType:"datetime",i18nKey:"pptx.field.dateTime"},{fieldType:"header",i18nKey:"pptx.field.header"},{fieldType:"footer",i18nKey:"pptx.field.footer"}];function Rc(e,t,n){let o=J(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:Rg.map(i=>({label:t(i.i18nKey),value:i.fieldType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.field.insertField")),o}function Oc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.smartart.insertTitle")),i.tabIndex=-1;let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-header"),p=chunkS5V27BHI_cjs.Ke(e,"h2");p.textContent=t("pptx.smartart.insertTitle");let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-close");s.type="button",s.setAttribute("aria-label",t("pptx.smartart.close")),s.textContent="\xD7",a.append(p,s);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-body"),m=chunkS5V27BHI_cjs.Ke(e,"nav","pptxv-smartart-categories");m.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-gallery"),u=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-options");u.setAttribute("role","listbox"),u.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),c.appendChild(u),l.append(m,c);let x=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-footer"),g=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-cancel");g.type="button",g.textContent=t("pptx.smartart.cancel");let v=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-insert");v.type="button",v.textContent=t("pptx.smartart.insert"),v.disabled=true,x.append(g,v),i.append(a,l,x),o.append(r,i);let h="list",b,T=null;function k(E){b=E,v.disabled=false;for(let w of u.querySelectorAll('[role="option"]')){let A=w.dataset.layout===E.layout;w.setAttribute("aria-selected",String(A)),w.classList.toggle("is-selected",A);}}function S(E){E&&(n(E.layout,E.defaultItems),y());}function f(){u.replaceChildren();for(let E of chunkS5V27BHI_cjs.hc.filter(w=>w.category===h)){let w=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-option");w.type="button",w.dataset.layout=E.layout,w.setAttribute("role","option"),w.setAttribute("aria-selected",String(b?.layout===E.layout)),w.classList.toggle("is-selected",b?.layout===E.layout);let A=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-option-preview");A.setAttribute("aria-hidden","true"),A.appendChild(chunkS5V27BHI_cjs.Te(e,"smart-art"));let I=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-option-label");I.textContent=t(E.labelKey),w.append(A,I),w.addEventListener("click",()=>k(E)),w.addEventListener("dblclick",()=>S(E)),u.appendChild(w);}}function C(E){h=E,b=void 0,v.disabled=true;for(let w of m.querySelectorAll("button")){let A=w.dataset.category===E;w.classList.toggle("is-active",A),w.setAttribute("aria-pressed",String(A));}f();}for(let E of chunkS5V27BHI_cjs.ic){let w=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-category");w.type="button",w.dataset.category=E.id,w.textContent=t(E.labelKey),w.addEventListener("click",()=>C(E.id)),m.appendChild(w);}C(h);function y(){o.hidden||(o.hidden=true,T?.focus(),T=null);}function P(E){if(E.key==="Escape"){E.preventDefault(),y();return}if(E.key!=="Tab")return;let w=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(w.length===0)return;let A=w[0],I=w[w.length-1];E.shiftKey&&e.activeElement===A?(E.preventDefault(),I.focus()):!E.shiftKey&&e.activeElement===I&&(E.preventDefault(),A.focus());}return r.addEventListener("click",y),s.addEventListener("click",y),g.addEventListener("click",y),v.addEventListener("click",()=>S(b)),o.addEventListener("keydown",P),{el:o,open(E){let w=e.defaultView?.HTMLElement;T=w&&e.activeElement instanceof w?e.activeElement:null,o.parentElement!==E&&E.appendChild(o),o.hidden=false,i.focus();},close:y}}function Fc(e,t,n){let o=Oc(e,t,n),r=D(e,{label:t("pptx.ribbon.smartArt"),icon:"smart-art",onClick:()=>{let i=r.btn.closest(".pptxv")??e.body;o.open(i);}});return r.btn.title=t("pptx.ribbon.insertSmartArt"),{el:r.btn,setDisabled(i){r.setDisabled(i),i&&o.close();}}}var Og={square:"square",circle:"circle",database:"database",diamond:"diamond",minus:"minus",moveRight:"move-right",plus:"plus",triangle:"triangle"};function Fg(e){switch(e){case "rotate-45":return "rotate(45deg)";case "rotate-90":return "rotate(90deg)";case "-rotate-90":return "rotate(-90deg)";case "rotate-180":return "rotate(180deg)";case "-skew-x-12":return "skewX(-12deg)";default:return}}function Bc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content");r.classList.add("pptxv-ribbon-insert-content");let i=[],a=D(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),p=D(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),s=D(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),l=D(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});l.btn.title=t("pptx.ribbon.insertMedia");let m=Hc(e,t,h=>n.insertChart(h)),c=Fc(e,t,(h,b)=>n.insertSmartArt(h,b)),u=D(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});u.btn.title=t("pptx.insert.insertEquation");let x=Mc(e,t,h=>n.insertActionButton(h)),g=Rc(e,t,h=>n.insertField(h));r.append(a.btn,p.btn,s.btn,l.btn,m.el,c.el,u.btn,x.el,g.el),i.push(a,p,s,l,m,c,u,x,g);let v=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-shape-grid");r.appendChild(v);for(let h of chunkS5V27BHI_cjs._c){let b=D(e,{label:t(h.i18nKey),icon:Og[h.glyph]??"square",onClick:()=>n.insert("shape",h.type)}),T=h.glyphClass?Fg(h.glyphClass):void 0;if(T){let k=b.btn.querySelector("svg");k&&(k.style.transform=T);}v.appendChild(b.btn),i.push(b);}return {el:r,setEditable(h){for(let b of i)b.setDisabled(!h);}}}function Vc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),i=D(e,{label:t("pptx.slideShow.fromBeginningTooltip"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning}),a=D(e,{label:t("pptx.slideShow.fromCurrentTooltip"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent}),p=chunkS5V27BHI_cjs.Pd("broadcast",o)?null:D(e,{label:t("pptx.slideShow.broadcastTooltip"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast}),s=D(e,{label:t("pptx.slideShow.presenterViewTooltip"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView}),l=D(e,{label:t("pptx.slideShow.setUpTooltip"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp}),m=D(e,{label:t("pptx.slideShow.rehearseTimingsTooltip"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal}),c=D(e,{label:t("pptx.customShows.title"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),u=D(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles}),x=D(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings});return r.append(i.btn,a.btn,s.btn,l.btn,m.btn,c.btn,...p?[p.btn]:[],u.btn,x.btn),{el:r,setSubtitlesVisible:g=>u.setActive(g)}}var Bg=[{type:"none",labelKey:"pptx.ribbon.transition.none"},{type:"fade",labelKey:"pptx.ribbon.transition.fade"},{type:"push",labelKey:"pptx.ribbon.transition.push"},{type:"wipe",labelKey:"pptx.ribbon.transition.wipe"},{type:"split",labelKey:"pptx.ribbon.transition.split"},{type:"reveal",labelKey:"pptx.ribbon.transition.reveal"},{type:"cut",labelKey:"pptx.ribbon.transition.cut"},{type:"cover",labelKey:"pptx.ribbon.transition.cover"},{type:"uncover",labelKey:"pptx.ribbon.transition.uncover"}],Nc=.7;function zc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=Nc,i=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-transition-apply-all"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.ribbon.applyTransitionToAll")),i.append(a,e.createTextNode(t("pptx.ribbon.applyTransitionToAll")));let p=c=>n.applyTransition(c,Math.round(r*1e3),a.checked),s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-transition-gallery"),l=Bg.map(c=>{let u=D(e,{label:t(c.labelKey),text:t(c.labelKey),onClick:()=>p(c.type)});return s.appendChild(u.btn),u});o.appendChild(s);let m=Y(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:c=>{r=Math.max(0,c);}});return m.setValue(Nc),o.appendChild(m.el),o.appendChild(i),{el:o,setEditable(c){for(let u of l)u.setDisabled(!c);m.setDisabled(!c),a.disabled=!c;}}}function Gc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=D(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),a=D(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,i.btn,a.btn),o}function _c(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=D(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),i=D(e,{label:t("pptx.headerFooter.title"),text:t("pptx.headerFooter.title"),onClick:n.openHeaderFooter}),a=D(e,{label:t("pptx.ribbon.compareTitle"),text:t("pptx.ribbon.compare"),onClick:n.openCompare}),p=D(e,{label:t("pptx.toolbar.comments"),text:t("pptx.toolbar.comments"),onClick:n.openComments}),s=D(e,{label:t("pptx.hyperlink.editTitle"),text:t("pptx.hyperlink.editTitle"),onClick:n.openHyperlink}),l=D(e,{label:t("pptx.settings.spellCheck"),text:t("pptx.settings.spellCheck"),onClick:n.toggleSpellCheck}),m=D(e,{label:t("pptx.review.language"),text:t("pptx.review.language"),onClick:()=>n.openSettings("general")});return o.append(r.btn,i.btn,a.btn,p.btn,s.btn,l.btn,m.btn),{el:o,setEditable:c=>a.setDisabled(!c)}}function Uc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=D(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),i=D(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),a=D(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")});return o.append(a.btn,r.btn,i.btn),o}function Wc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),i=!chunkS5V27BHI_cjs.Pd("zoom",o),a=i?D(e,{label:t("pptx.statusBar.zoomOut"),icon:"zoom-out",onClick:n.zoomOut}):null,p=i?D(e,{label:t("pptx.statusBar.zoomIn"),icon:"zoom-in",onClick:n.zoomIn}):null,s=i?D(e,{label:t("pptx.view.zoomToFit"),icon:"fit",onClick:n.zoomToFit}):null,l=chunkS5V27BHI_cjs.Pd("fullscreen",o)?null:D(e,{label:t("pptx.statusBar.slideShow"),icon:"play",onClick:n.togglePresentation}),m=chunkS5V27BHI_cjs.Pd("notes",o)?null:D(e,{label:t("pptx.statusBar.toggleNotes"),icon:"notes",onClick:n.toggleNotes}),c=D(e,{label:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),u=D(e,{label:t("pptx.ribbon.templatesOff"),text:t("pptx.ribbon.templatesOff"),onClick:()=>n.toggleTemplateEditing?.()}),x=D(e,{label:t("pptx.master.title"),text:t("pptx.master.title"),onClick:()=>n.toggleMasterView?.()}),g=D(e,{label:t("pptx.view.slideSorterTooltip"),text:t("pptx.slideSorter.title"),onClick:n.openSlideSorter}),v=D(e,{label:t("pptx.selectionPane.title"),text:t("pptx.selectionPane.title"),onClick:n.openSelectionPane}),h=D(e,{label:t("pptx.view.gridlines"),text:t("pptx.view.gridlines"),onClick:()=>n.toggleViewOption("showGrid")}),b=D(e,{label:t("pptx.view.ruler"),text:t("pptx.view.ruler"),onClick:()=>n.toggleViewOption("showRulers")}),T=D(e,{label:t("pptx.view.snapToGrid"),text:t("pptx.view.snapToGrid"),onClick:()=>n.toggleViewOption("snapToGrid")}),k=D(e,{label:t("pptx.view.snapToShape"),text:t("pptx.view.snapToShape"),onClick:()=>n.toggleViewOption("snapToShape")}),S=D(e,{label:t("pptx.view.addHorizontalGuide"),text:t("pptx.view.addHorizontalGuide"),onClick:()=>n.addGuide("h")}),f=D(e,{label:t("pptx.view.addVerticalGuide"),text:t("pptx.view.addVerticalGuide"),onClick:()=>n.addGuide("v")}),C=D(e,{label:t("pptx.ribbon.eyedropper"),text:t("pptx.ribbon.eyedropper"),onClick:n.activateEyedropper});return u.btn.dataset.testid="template-edit-toggle",r.append(...a&&p&&s?[a.btn,p.btn,s.btn]:[],...l?[l.btn]:[],...m?[m.btn]:[],c.btn,u.btn,x.btn,g.btn,v.btn,h.btn,b.btn,T.btn,k.btn,S.btn,f.btn,C.btn),{el:r,setEditable(y){u.setDisabled(!y),x.setDisabled(!y),C.setDisabled(!y);},setTemplateEditing(y){let P=t(y?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");u.btn.textContent=P,u.btn.title=P,u.btn.setAttribute("aria-label",P),u.setActive(y);}}}function so(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let a=fc(e,t,n,o);i.append(a.el);let p=jn(e,t,F=>A(F),o,{startRecording:()=>n.slideShow.startRehearsal()});p.el.hidden=true,i.appendChild(p.el);let s=Vn(e,t,n.findReplace);i.appendChild(s.el);let l=nc(e,t,(F,V)=>V?n.edit.updateEquation(V,F):n.insert.insertEquation(F));i.appendChild(l.el);let m=rc(e,t,n.edit);i.appendChild(m.el);let c=F=>chunkS5V27BHI_cjs.Pd(F,o),u=c("file")?null:Dc(e,t,n.file,()=>A("home"),o,r),x=c("home")?null:xc(e,t,{edit:n.edit,onToggleFindReplace:()=>s.toggle()}),g=c("insert")?null:Bc(e,t,n.insert,()=>l.toggle()),v=c("draw")?null:Cc(e,t,n.draw),h=c("design")?null:yc(e,t,n.design,()=>m.toggle()),b=c("transitions")?null:zc(e,t,n.edit),T=c("animations")?null:hc(e,t,n.edit),k=c("slideShow")?null:Vc(e,t,n.slideShow,o),S=c("record")?null:Gc(e,t,n.slideShow),f=c("review")?null:_c(e,t,n.nav),C=c("view")?null:Wc(e,t,n.nav,o),y=c("help")?null:Uc(e,t,n.nav),P={file:u?.el,home:x?.el,insert:g?.el,draw:v?.el,design:h?.el,transitions:b?.el,animations:T?.el,slideShow:k?.el,record:S??void 0,review:f?.el,view:C?.el,help:y??void 0},E=chunkS5V27BHI_cjs.Qd(dt,o);for(let F of E){let V=P[F.id];V&&(V.hidden=true,i.appendChild(V));}let w=E.find(F=>F.id===po)?.id??E[0]?.id??po;function A(F){if(P[F]){w=F,p.setActive(F);for(let V of Object.keys(P)){let N=P[V];N&&(N.hidden=V!==F);}}}A(w);let I,H={hasClipboard:false,slideCount:0,selectedCount:0},M=()=>{x?.update({editable:L,selectedElement:I,hasClipboard:H.hasClipboard,formatPainterActive:H.formatPainterActive??false,slideCount:H.slideCount,selectedCount:H.selectedCount??0,layouts:H.layouts??[]});},O=()=>{T?.update({editable:L,hasSelection:I!==void 0,selectedElementId:H.selectedElementId,animations:H.animations??[]});},L=false,R=new Set;return {el:i,update(){},setEditState(F){a.setEditState(F),p.el.hidden=!F.editable;},setNotesExpanded(){},setAutosaveStatus:(F,V)=>a.setAutosaveStatus(F,V),setEditable(F){L=F,f?.setEditable(F),C?.setEditable(F),g?.setEditable(F),v?.setEditable(F),s.setEditable(F),l.setEditable(F),m.setEditable(F),h?.setEditable(F),b?.setEditable(F),M(),O();},setDrawState:F=>v?.update(F),setTemplateEditing:F=>C?.setTemplateEditing(F),setHasMacros:F=>u?.setHasMacros(F),setSubtitlesVisible:F=>k?.setSubtitlesVisible(F),setInspectorOpen:F=>a.setInspectorOpen(F),openEquationEditor:(F,V)=>l.openEdit(F,V),setHiddenOptionTabs:F=>{if(R=new Set(F.filter(V=>V!=="file")),p.setHiddenTabs(R),R.has(w)){let V=R.has("home")?E.find(N=>!R.has(N.id))?.id:"home";V&&A(V);}},applyScreenTips:F=>p.applyScreenTips(F),updateSelection(F,V){I=F,H=V,M(),O();}}}function $c(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-statusbar"),a=()=>{let P=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-sep");return P.setAttribute("aria-hidden","true"),P},p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-counter");p.setAttribute("aria-live","polite");let s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-text");s.textContent=t("pptx.statusBar.language");let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(p,a(),s,a(),l),i.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-spacer"));let m=false,c="",u="idle",x=()=>{l.textContent=c.length>0?c:t(m?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),l.classList.toggle("is-saving",u==="saving"),l.classList.toggle("is-error",u==="error");};x();let g=!chunkS5V27BHI_cjs.Pd("notes",o),v=!chunkS5V27BHI_cjs.Pd("fullscreen",o),h=!chunkS5V27BHI_cjs.Pd("zoom",o),b=null;if(g){b=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),b.type="button",b.title=t("pptx.statusBar.toggleNotes"),b.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),b.setAttribute("aria-pressed","false"),b.setAttribute("data-pptx-compact",""),b.appendChild(Vg(e,"sticky-note"));let P=chunkS5V27BHI_cjs.Ke(e,"span");P.textContent=t("pptx.notes.title"),b.appendChild(P),b.addEventListener("click",n.toggleNotes);}let T=D(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});T.btn.setAttribute("data-pptx-compact","");let k=D(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});k.btn.setAttribute("data-pptx-compact","");let S=v?D(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;S?.btn.setAttribute("data-pptx-compact","");let f=null,C=null,y=null;return h&&(f=D(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),f.btn.setAttribute("data-pptx-compact",""),C=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-statusbar-zoom"),C.type="button",C.title=t("pptx.statusBar.zoomToFit"),C.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),C.setAttribute("data-pptx-compact",""),C.addEventListener("click",n.zoomToFit),y=D(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),y.btn.setAttribute("data-pptx-compact","")),i.append(...b?[b]:[],a(),T.btn,k.btn,...S?[S.btn]:[],...[],a(),...f&&C&&y?[f.btn,C,y.btn]:[]),{el:i,update({current:P,total:E,zoomPercent:w}){p.textContent=E>0?t("pptx.statusBar.slideOf",{current:P+1,total:E}):t("pptx.statusBar.noSlides"),C&&(C.textContent=`${Math.round(w)}%`);},setNotesExpanded(P){b?.setAttribute("aria-pressed",String(P)),b?.classList.toggle("is-active",P);},setSaveStatus(P,E){c=P,u=E,x();},setDirty(P){m=P,x();},setPresenting(P){T.btn.classList.toggle("is-active",!P),S?.btn.classList.toggle("is-active",P);}}}function Vg(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-icon");return n.appendChild(Ng(e,t)),n}function Ng(e,t){return chunkS5V27BHI_cjs.Te(e,t)}function qc(e){let{doc:t,t:n,actions:o}=e,r=chunkS5V27BHI_cjs.ra(e.sections,e.slides);return r.map((i,a)=>{let p=chunkS5V27BHI_cjs.Ke(t,"section","pptxv-thumb-section"),s=chunkS5V27BHI_cjs.Ke(t,"header","pptxv-thumb-section-header"),l=chunkS5V27BHI_cjs.Ke(t,"button","pptxv-thumb-section-toggle");if(l.type="button",l.setAttribute("aria-expanded",String(!i.section?.collapsed)),l.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(p.dataset.sectionId=i.section.id,l.addEventListener("click",()=>o?.toggle(i.section.id))),s.appendChild(l),i.section&&o){let m=chunkS5V27BHI_cjs.Ke(t,"span","pptxv-thumb-section-actions"),c=(u,x,g,v=false)=>{let h=chunkS5V27BHI_cjs.Ke(t,"button");h.type="button",h.setAttribute("data-pptx-compact",""),h.title=u,h.setAttribute("aria-label",u),h.textContent=x,h.disabled=v,h.addEventListener("click",g),m.appendChild(h);};c(n("pptx.sections.rename"),"\u270E",()=>{let u=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);u!=null&&o.rename(i.section.id,u);}),c(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),a===0),c(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),a===r.length-1),c(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),s.appendChild(m);}if(p.appendChild(s),!i.section?.collapsed){let m=chunkS5V27BHI_cjs.Ke(t,"div","pptxv-thumb-section-slides");i.slides.forEach((c,u)=>m.appendChild(e.buildSlide(c,i.slideIndexes[u]))),p.appendChild(m);}return p})}var xt=128;function Xn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-thumbs");r.setAttribute("role","navigation"),r.setAttribute("aria-label",t("pptx.sections.slides"));let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-list");r.appendChild(i);let a=null,p=false,s=false,l=()=>{a&&(a.hidden=!p||s);};if(o){a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-footer"),a.hidden=true;let f=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-thumbs-add");f.type="button",f.appendChild(chunkS5V27BHI_cjs.Te(e,"plus")),f.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),f.addEventListener("click",()=>o()),a.appendChild(f),r.appendChild(a);}let m=new Map,c=0,u=[],x={width:1,height:1},g=null,v=[],h,b=1,T=false,k=(f,C,y)=>{let P=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-thumb");P.type="button",P.dataset.slideIndex=String(C),P.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:C+1}));let E=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-num");E.textContent=String(C+1);let w=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(x.height*y)}px`});return w.appendChild(g(f,y)),P.append(E,w),P.addEventListener("click",()=>n(C)),m.set(C,P),P},S=()=>{if(!g)return;m=new Map;let f=xt/Math.max(x.width,1);if(v.length>0){i.replaceChildren(...qc({doc:e,t,sections:v,slides:u,actions:h,buildSlide:(w,A)=>k(w,A,f)})),m.get(c)?.classList.add("is-active");return}let C=T?chunkS5V27BHI_cjs.vd(u.length,b,i.scrollTop,i.clientHeight||600):chunkS5V27BHI_cjs.vd(u.length,b,0,u.length*b,0),y=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});T&&(y.style.position="absolute",y.style.insetInline="0",y.style.top=`${C.offsetY}px`);for(let w=C.startIndex;w<=C.endIndex;w+=1){let A=u[w];A&&y.appendChild(k(A,w,f));}let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-space",{position:"relative",height:T?`${C.totalHeight}px`:"auto"});T&&(P.dataset.virtualized="true"),P.appendChild(y),i.replaceChildren(P);let E=m.get(c);E?.classList.add("is-active"),E?.setAttribute("aria-current","page");};return i.addEventListener("scroll",()=>{T&&S();}),{el:r,render(f,C,y,P,E){s=false,l(),u=f,x=C,g=y,v=P??[],h=E;let w=xt/Math.max(C.width,1);b=Math.round(C.height*w)+8,T=!P?.length&&f.length>=chunkS5V27BHI_cjs.ud,r.classList.toggle("pptxv-thumbs-virtualized",T),S(),this.setActive(c);},setActive(f){if(c=f,T){let y=f*b,P=y+b,E=i.clientHeight||600;y<i.scrollTop?i.scrollTop=y:P>i.scrollTop+E&&(i.scrollTop=Math.max(0,P-E)),S();}m.forEach((y,P)=>{y.classList.toggle("is-active",P===f),P===f?y.setAttribute("aria-current","page"):y.removeAttribute("aria-current");});let C=m.get(f);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"});},setVisible(f){r.hidden=!f;},setAddSlideVisible(f){p=f,l();},renderMasters(f,C,y,P,E){s=true,l(),i.replaceChildren(),m=new Map,T=false,r.classList.remove("pptxv-thumbs-virtualized");let w=xt/Math.max(C.width,1),A=(I,H,M,O)=>{let L=chunkS5V27BHI_cjs.Ke(e,"button",`pptxv-thumb${O===null?"":" pptxv-master-layout"}`);L.type="button",L.setAttribute("aria-label",H),L.classList.toggle("is-active",E.masterIndex===M&&E.layoutIndex===O),E.masterIndex===M&&E.layoutIndex===O&&L.setAttribute("aria-current","page");let R=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-num");R.textContent=H;let B=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(C.height*w)}px`});B.appendChild(y(I,w)),L.append(R,B),L.addEventListener("click",()=>P(M,O)),i.appendChild(L);};f.forEach((I,H)=>{A({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),H,null),I.layouts?.forEach((M,O)=>A({id:M.path,rId:"",slideNumber:0,elements:[...I.elements??[],...M.elements??[]],backgroundColor:M.backgroundColor??I.backgroundColor,backgroundImage:M.backgroundImage??I.backgroundImage},M.name||t("pptx.master.layout"),H,O));});}}}function zg(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function Kc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch-box");r.appendChild(chunkS5V27BHI_cjs.Te(e,"search"));let i=e.createElement("input");i.type="text",i.className="pptxv-cmdsearch-input",i.placeholder=t("pptx.titleBar.searchPlaceholder"),i.setAttribute("aria-label",t("pptx.titleBar.search")),r.appendChild(i),o.appendChild(r);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch-menu");a.hidden=true,o.appendChild(a);let p=()=>{a.hidden=true,a.replaceChildren();},s=c=>{i.value="",p(),c.run();},l=[],m=()=>{if(l=zg(i.value,n,t),i.value.trim().length===0){p();return}if(a.replaceChildren(),l.length===0){let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch-empty");c.textContent=t("pptx.titleBar.searchNoResults"),a.appendChild(c);}for(let c of l){let u=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(c.labelKey),u.addEventListener("mousedown",x=>{x.preventDefault(),s(c);}),a.appendChild(u);}a.hidden=false;};return i.addEventListener("input",m),i.addEventListener("focus",m),i.addEventListener("blur",p),i.addEventListener("keydown",c=>{c.stopPropagation(),c.key==="Enter"&&l.length>0?s(l[0]):c.key==="Escape"&&(i.value="",p());}),{el:o}}var Gg={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function jc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,a=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-autosave"),p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-autosave-label");p.textContent=t("pptx.titleBar.autoSave");let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-titlebar-switch");s.type="button",s.setAttribute("role","switch"),s.title=t("pptx.titleBar.toggleAutoSave"),s.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),s.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-switch-knob"));let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-autosave-label");a.append(p,s,l),o.appendChild(a);let m=()=>{s.classList.toggle("is-on",i),s.setAttribute("aria-checked",String(i)),l.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};s.addEventListener("click",()=>{i=n.onToggleAutosave(),m(),E();});let c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-sep");o.appendChild(c);let u=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-qat");o.appendChild(u);let x=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-sep");o.appendChild(x);let g={editable:true,canUndo:false,canRedo:false},v=null,h=null,b=A=>{A==="save"?n.save():A==="undo"?n.undo():A==="redo"?n.redo():n.quickAccess?.run(A);},T=()=>{u.replaceChildren(),v=null,h=null;let A=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};u.hidden=!A.visible||!g.editable;for(let I of A.commandIds){if((I==="undo"||I==="redo")&&chunkS5V27BHI_cjs.Pd(I,n.hiddenActions))continue;let H=chunkS5V27BHI_cjs.Sd.find(R=>R.id===I);if(!H)continue;let M=t(H.labelKey),O=Gg[H.icon],L=D(e,{label:M,icon:O,text:O===void 0?"Ab":void 0,textLabel:A.showCommandLabels?M:void 0,className:"pptxv-titlebar-btn",onClick:()=>b(I)});if(n.quickAccess){let R=n.quickAccess.screenTip(M);R===void 0?L.btn.removeAttribute("title"):L.btn.title=R;}I==="undo"?(v=L,L.setDisabled(!g.canUndo)):I==="redo"&&(h=L,L.setDisabled(!g.canRedo)),u.appendChild(L.btn);}},k=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-file"),S=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-filename");S.textContent=n.fileName||t(chunkS5V27BHI_cjs.fd);let f=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-dot");f.textContent="\u2022",f.setAttribute("aria-hidden","true");let C=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-status");k.append(S,f,C),o.appendChild(k);let y="idle",P=false,E=()=>{C.textContent=t(chunkS5V27BHI_cjs.ed({autosaveState:y,isDirty:P,autosaveEnabled:i})),C.classList.toggle("is-error",i&&y==="error"),C.classList.toggle("is-saving",i&&y==="saving");},w=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-search");return w.appendChild(Kc(e,t,n.commands).el),o.appendChild(w),o.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-spacer")),m(),E(),T(),{el:o,setEditState(A){g=A;for(let H of [a,c,x])H.hidden=!A.editable;let I=n.quickAccess?.getState();u.hidden=!A.editable||I?.visible===false,f.hidden=!A.editable,C.hidden=!A.editable,w.hidden=!A.editable,v?.setDisabled(!A.canUndo),h?.setDisabled(!A.canRedo);},setAutosaveState(A){y=A,E();},setDirty(A){P=A,E();},setAutosaveEnabled(A){i=A,m(),E();},refreshQuickAccess:T}}function Zn(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv");o.tabIndex=0,o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.titleBar.defaultFileName")),o.setAttribute("aria-busy","false");let r=null,i=null;n.showToolbar&&(r=jc(e,t,n.titleBar),o.appendChild(r.el),i=so(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el));let a=null,p=n.showToolbar?On(e,t,{openMenu:()=>a?.toggle("menu"),undo:n.ribbonHandlers.primary.undo,redo:n.ribbonHandlers.primary.redo,save:n.ribbonHandlers.file.save,present:n.ribbonHandlers.slideShow.startFromCurrent},n.hiddenActions):null;p&&(p.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(p.el));let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-body");o.appendChild(s);let l=An(e,t,n.onSelectSlide);o.appendChild(l.el);let m=Hn(e,t);s.appendChild(m.el);let c=null;n.showThumbnails&&(c=Xn(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide()),s.appendChild(c.el));let u=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-viewport");u.setAttribute("data-pptx-viewport",""),s.appendChild(u);let x=null;n.showInspector&&(x=ro(e,t,n.inspectorHandlers),x.setEditable(n.editable),s.appendChild(x.el));let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-stage-wrap");u.appendChild(g);let v=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-empty");v.textContent=t("pptx.statusBar.noSlides"),v.hidden=true,u.appendChild(v);let h=Fn(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(h.el);let b=n.showToolbar?$c(e,t,{toggleNotes:n.ribbonHandlers.nav.toggleNotes,normalView:n.ribbonHandlers.nav.normalView,openSlideSorter:n.ribbonHandlers.nav.openSlideSorter,togglePresentation:n.ribbonHandlers.nav.togglePresentation,zoomIn:n.ribbonHandlers.nav.zoomIn,zoomOut:n.ribbonHandlers.nav.zoomOut,zoomToFit:n.ribbonHandlers.nav.zoomToFit},n.hiddenActions):null;b&&o.appendChild(b.el),a=n.showToolbar?Rn(e,t,n.ribbonHandlers,n.onSelectSlide,x?.el??null,n.hiddenActions):null,a&&(a.setEditable(n.editable),o.appendChild(a.el));let T=Bn(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);T.update(0,0),o.appendChild(T.el);let k=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-overlay pptxv-loading");k.textContent=t("common.loading"),k.setAttribute("role","status"),k.setAttribute("aria-live","polite"),k.hidden=true,o.appendChild(k);let S=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-overlay pptxv-error");S.setAttribute("role","alert");let f=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-error-message");return S.appendChild(f),S.hidden=true,o.appendChild(S),{root:o,ribbon:i,titleBar:r,inspector:x,accessibility:l,masterSidebar:m,thumbnails:c,viewport:u,stageWrap:g,notes:h,statusBar:b,mobileToolbar:p,mobileActionSheets:a,presentationTouchControls:T,setLoading(C){k.hidden=!C,o.setAttribute("aria-busy",String(C));},setError(C){S.hidden=C===null,f.textContent=C??"";},setEmpty(C){v.hidden=!C,g.hidden=C;},setPresenting(C){o.classList.toggle("pptxv-presenting",C);}}}function Qn(e,t){let n=o=>{let r=o.target;if(!(r&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(r.tagName))){switch(o.key){case "ArrowRight":case "ArrowDown":case "PageDown":case " ":t.next();break;case "ArrowLeft":case "ArrowUp":case "PageUp":t.prev();break;case "Home":t.first();break;case "End":t.last();break;case "Escape":t.escape();break;default:return}o.preventDefault();}};return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n);}}var _g=.1,Ug=8;function Jn(e,t){let n=chunkS5V27BHI_cjs.Mc({getScale:t.getScale,minScale:_g,maxScale:Ug,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:p=>{t.isSwipeEnabled()&&(p===-1?t.onNext():t.onPrevious());}}}),o=p=>n.onTouchStart(p),r=p=>n.onTouchMove(p),i=p=>n.onTouchEnd(p),a=()=>n.onTouchCancel();return e.addEventListener("touchstart",o,{passive:false,capture:true}),e.addEventListener("touchmove",r,{passive:false,capture:true}),e.addEventListener("touchend",i,{passive:true,capture:true}),e.addEventListener("touchcancel",a,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",a,true),n.cancel();}}function er(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,a=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",a),{async enter(){if(!i()){if(o)try{await e.requestFullscreen(),e.focus();return}catch{}r=true,t(true),e.focus();}},async exit(){if(o&&n.fullscreenElement===e){await n.exitFullscreen();return}r&&(r=false,t(false));},isActive:i,dispose(){o&&n.removeEventListener("fullscreenchange",a);}}}function tr(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:a}=e,p=Zn(t,o,{showToolbar:r.showToolbar??true,showThumbnails:r.showThumbnails??true,showFormatToolbar:r.showFormatToolbar??true,showInspector:r.showInspector??true,editable:r.editable??false,hiddenActions:r.hiddenActions,titleBar:{fileName:r.fileName,autosaveEnabled:r.autosave??false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:Wg(e),hiddenActions:r.hiddenActions},accountAuth:r.accountAuth,...dd(e)}),s=at(p.root,e.initialTheme??r.theme,[]);n.appendChild(p.root),p.statusBar?.setNotesExpanded(i.get().notesExpanded),p.statusBar?.setDirty(i.get().dirty),p.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),p.titleBar?.setDirty(i.get().dirty);let l=Qn(p.root,{next:e.next,prev:e.prev,first:e.goToFirstSlide,last:e.goToLastSlide,escape:e.exitPresentation}),m=Jn(p.root,{getScale:()=>a.effectiveScale(),onPinchZoom:x=>i.set({zoom:x}),isSwipeEnabled:()=>{let x=i.get();return x.presenting||!x.editable},onNext:()=>{let x=i.get();cd({presenting:x.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:x.slides[x.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),c=er(p.root,x=>{i.set({presenting:x});}),u=null;return typeof ResizeObserver<"u"&&(u=new ResizeObserver(()=>{i.get().zoom==="fit"&&a.renderStage();}),u.observe(p.viewport)),{chrome:p,presentation:c,detachKeyboard:l,detachTouchGestures:m,resizeObserver:u,appliedThemeVars:s}}function Wg(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function or(e,t){t(),e.detachKeyboard(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function nr(e){return {doc:e.doc,container:e.container,t:e.t,options:e.options,store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>{e.lifecycle.presentation.isActive()?e.exitPresentation():e.enterPresentation();},returnToNormalView:()=>{e.store.get().presenting&&e.exitPresentation(),e.container.querySelector("[data-pptx-slide-sorter]")?.remove();},undo:()=>e.undo(),redo:()=>e.redo(),toggleAutosave:()=>e.toggleAutosave(),startPresentationFromBeginning:()=>{e.goToSlide(0),e.enterPresentation();},startPresentationFromCurrent:()=>{e.enterPresentation();},openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openShare:()=>e.openShare(),openAccessibility:()=>e.openAccessibility(),openSettings:t=>e.openSettings(t),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSetUpSlideShow:()=>e.openSetUpSlideShow(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),packageForSharing:()=>e.packageForSharing(),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),goToFirstSlide:()=>e.goToSlide(0),goToLastSlide:()=>e.goToSlide(e.getSlideCount()-1),exitPresentation:()=>{e.exitPresentation();},commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),print:()=>Promise.resolve((e.openPrintDialog(),true)),openFile:()=>e.openFile(),openRecentFile:t=>e.openRecentFile(t),createPresentation:t=>e.createPresentation(t),getEditActions:()=>e.editor.getEditActions(),getFindReplaceActions:()=>e.editor.getFindReplaceActions(),setTheme:t=>e.setTheme(t),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t)}}function G(e){if(e.masterViewTarget){if(e.masterViewTab==="notes")return e.notesMaster?.elements??[];if(e.masterViewTab==="handout")return e.handoutMaster?.elements??[];let n=e.slideMasters[e.masterViewTarget.masterIndex];return e.masterViewTarget.layoutIndex===null?n?.elements??[]:n?.layouts?.[e.masterViewTarget.layoutIndex]?.elements??[]}let t=e.slides[e.currentSlide];return t?e.editTemplateMode?e.templateElementsBySlideId[t.id]??[]:t.elements:[]}function j(e,t){if(e.masterViewTarget){if(e.masterViewTab==="notes")return {notesMaster:e.notesMaster?{...e.notesMaster,elements:t}:void 0};if(e.masterViewTab==="handout")return {handoutMaster:e.handoutMaster?{...e.handoutMaster,elements:t}:void 0};let{masterIndex:o,layoutIndex:r}=e.masterViewTarget;return {slideMasters:e.slideMasters.map((i,a)=>a!==o?i:r===null?{...i,elements:t}:{...i,layouts:i.layouts?.map((p,s)=>s===r?{...p,elements:t}:p)})}}let n=e.slides[e.currentSlide];return n?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[n.id]:t}}:{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:t}:o)}:{slides:e.slides}}function te(e,t){return G(e).find(n=>n.id===t)}function rr(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let a=n(i);Object.keys(a).length!==0&&(t.pushHistory(),e.set(j(o,G(o).map(p=>p.id===r?{...p,...a}:p))),t.commitChange());}}function ir(e,t,n){return e[t]?.elements.find(o=>o.id===n)}function Yc(e,t,n){return e.map((o,r)=>r===t?{...chunkEWJAZ6TW_cjs.Z(o),elements:n(o.elements)}:o)}function ar(e,t,n){return Yc(e,t,o=>o.filter(r=>r.id!==n))}function lo(e){return e.map(chunkEWJAZ6TW_cjs.Z)}function gt(e,t,n){return Yc(e,t,o=>[...o,n])}function pr(e,t,n,o){return e.map((r,i)=>i===t?{...chunkEWJAZ6TW_cjs.Z(r),notes:n,notesSegments:o?.map(a=>({...a,style:{...a.style}}))}:r)}function oe(e,t,n){return e.map((o,r)=>r===t?{...chunkEWJAZ6TW_cjs.Z(o),...n}:o)}function sr(e,t){return e.map(n=>({...chunkEWJAZ6TW_cjs.Z(n),...t}))}function lr(e){let{store:t,ops:n}=e,o=(r,i)=>{let a=t.get(),p=a.slides[a.currentSlide];if(!a.editable||!p?.animations?.some(l=>l.elementId===r))return;let s=i(p.animations);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:s})}),n.commitChange();};return {addAnimation(r,i){let a=t.get(),p=a.selectedElementId,s=a.slides[a.currentSlide];if(!a.editable||!p||!s)return;let l=chunkS5V27BHI_cjs.L(s.animations??[],p,r,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:l})}),n.commitChange();},removeAnimation(){let r=t.get(),i=r.selectedElementId,a=r.slides[r.currentSlide];if(!r.editable||!i||!a?.animations?.length)return;let p=chunkS5V27BHI_cjs.M(a.animations,i);p.length!==a.animations.length&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{animations:p})}),n.commitChange());},setAnimationEffect(r,i){let a=t.get(),p=a.selectedElementId,s=a.slides[a.currentSlide];if(!a.editable||!p||!s)return;let m=(r==="entrance"?chunkS5V27BHI_cjs.x:r==="exit"?chunkS5V27BHI_cjs.y:chunkS5V27BHI_cjs.z)(s.animations??[],p,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:m})}),n.commitChange();},setAnimationTiming(r,i){o(r,a=>{let p=[...a];return i.durationMs!==void 0&&(p=chunkS5V27BHI_cjs.C(p,r,i.durationMs)),i.delayMs!==void 0&&(p=chunkS5V27BHI_cjs.D(p,r,i.delayMs)),i.trigger!==void 0&&(p=chunkS5V27BHI_cjs.A(p,r,i.trigger)),i.direction!==void 0&&(p=chunkS5V27BHI_cjs.F(p,r,i.direction)),i.sequence!==void 0&&(p=chunkS5V27BHI_cjs.G(p,r,i.sequence)),i.timingCurve!==void 0&&(p=chunkS5V27BHI_cjs.E(p,r,i.timingCurve)),i.repeatCount!==void 0&&(p=chunkS5V27BHI_cjs.H(p,r,i.repeatCount)),i.repeatMode!==void 0&&(p=chunkS5V27BHI_cjs.I(p,r,i.repeatMode)),i.triggerShapeId!==void 0&&(p=chunkS5V27BHI_cjs.B(p,r,i.triggerShapeId||void 0)),p});},reorderAnimation(r,i){o(r,a=>i==="up"?chunkS5V27BHI_cjs.J(a,r):chunkS5V27BHI_cjs.K(a,r));},moveAnimation(r,i){o(r,a=>{let p=[...a].sort((m,c)=>(m.order??0)-(c.order??0)),s=p.findIndex(m=>m.elementId===r);if(s<0)return p;let[l]=p.splice(s,1);return p.splice(Math.max(0,Math.min(i,p.length)),0,l),p.map((m,c)=>({...m,order:c}))});}}}function Xc(e,t){return t.size===0?[...e]:e.map(n=>{let o=t.get(n.id);return o?{...n,x:o.x??n.x,y:o.y??n.y}:n})}function dr(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return Xc(e,chunkS5V27BHI_cjs.X(r,n))}function cr(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return Xc(e,chunkS5V27BHI_cjs.Y(r,n))}function mr(e,t,n){switch(t){case "left":return {x:0};case "right":return {x:n.width-e.width};case "centerH":return {x:(n.width-e.width)/2};case "top":return {y:0};case "bottom":return {y:n.height-e.height};case "middle":return {y:(n.height-e.height)/2}}}function co(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function ur(e,t,n){return chunkS5V27BHI_cjs.ia(e,t,n)}function xr(e,t,n){return chunkS5V27BHI_cjs.ja(e,t,n)}function gr(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let a=t.get(),p=a.selectedElementId,s=G(a);!a.editable||!p||!s||i(s,p)!==s&&(n.pushHistory(),t.set(j(a,i(s,p))),n.commitChange());};return {bringForward:()=>r(chunkS5V27BHI_cjs.oa),sendBackward:()=>r(chunkS5V27BHI_cjs.pa),bringToFront:()=>r(chunkS5V27BHI_cjs.ma),sendToBack:()=>r(chunkS5V27BHI_cjs.na),alignElements(i){let a=t.get();if(a.selectedElementIds.length<2){o(p=>mr(p,i,a.canvasSize));return}n.pushHistory(),t.set(j(a,dr(G(a),a.selectedElementIds,i))),n.commitChange();},distributeElements(i){let a=t.get();!a.editable||a.selectedElementIds.length<3||(n.pushHistory(),t.set(j(a,cr(G(a),a.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>co(i,"horizontal")),flipVertical:()=>o(i=>co(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let a=ur(G(i),i.selectedElementIds,i.editTemplateMode?chunkS5V27BHI_cjs.Uc(true,i.selectedElementIds[0]):chunkS5V27BHI_cjs.Tc());a.groupId&&(n.pushHistory(),t.set({...j(i,a.elements),selectedElementId:a.groupId,selectedElementIds:[a.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),a=i.selectedElementId,p=G(i),s=n.selectedElement(i);if(!i.editable||!a||!p||!s||s.type!=="group")return;let l=s.children.map(c=>i.editTemplateMode?chunkS5V27BHI_cjs.Uc(true,c.id||s.id):chunkS5V27BHI_cjs.Tc()),m=xr(p,a,l);m.childIds.length!==0&&(n.pushHistory(),t.set({...j(i,m.elements),selectedElementId:m.childIds.at(-1)??null,selectedElementIds:m.childIds}),n.commitChange());}}}function br(e){let{store:t,ops:n}=e;return {setSlideBackgroundColor(o){let r=t.get();if(r.editable){if(r.masterViewTarget){n.pushHistory(),r.masterViewTab==="notes"&&r.notesMaster?t.set({notesMaster:{...r.notesMaster,backgroundColor:o}}):r.masterViewTab==="handout"&&r.handoutMaster?t.set({handoutMaster:{...r.handoutMaster,backgroundColor:o}}):t.set({slideMasters:Zc(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{backgroundColor:o})}),n.commitChange());}},clearSlideBackground(){let o=t.get();if(o.editable){if(o.masterViewTarget){n.pushHistory(),o.masterViewTab==="notes"&&o.notesMaster?t.set({notesMaster:{...o.notesMaster,backgroundColor:void 0,backgroundImage:void 0}}):o.masterViewTab==="handout"&&o.handoutMaster?t.set({handoutMaster:{...o.handoutMaster,backgroundColor:void 0,backgroundImage:void 0}}):t.set({slideMasters:Zc(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:oe(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}}}}function Zc(e,t){let n=e.masterViewTarget;return n?e.slideMasters.map((o,r)=>r!==n.masterIndex?o:n.layoutIndex===null?{...o,...t}:{...o,layouts:o.layouts?.map((i,a)=>a===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function fr(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunkS5V27BHI_cjs.Vc(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunkS5V27BHI_cjs.Vc(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunkS5V27BHI_cjs.Wc(r.element);n.pushHistory(),t.set({...j(o,[...G(o),i]),selectedElementId:i.id,selectedElementIds:[i.id]}),n.commitChange();}}}function vr(e){let{store:t,ops:n}=e;return {updatePresentationSettings(o){n.updatePresentationProperties({...t.get().presentationProperties,...o});},applyThemeByPath(o,r){let i=e.getHandler();!i||!o||!t.get().editable||(async()=>(await i.setPresentationTheme(o,r),t.set({slideMasters:t.get().slideMasters.map((a,p)=>r||p===0?{...a,themePath:o}:a)}),n.commitChange()))();},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,o)}),n.commitChange());},updateCanvasSize(o){!Number.isFinite(o.width)||!Number.isFinite(o.height)||t.get().editable&&(t.set({canvasSize:{width:Math.max(1,Math.round(o.width)),height:Math.max(1,Math.round(o.height))}}),n.commitChange());}}}async function hr(e,t){let n=new $g__default.default,o=n.folder("presentation-package");if(!o)throw new Error("Unable to create presentation package");return o.file(t,e),o.file("README.txt",chunkS5V27BHI_cjs.le(t)),n.generateAsync({type:"blob"})}function Qc(e,t,n,o){t.querySelectorAll(".pptxv-alignment-guide").forEach(r=>r.remove());for(let r of n){let i=e.createElement("div");i.className=`pptxv-alignment-guide is-${r.axis}`,i.style[r.axis==="h"?"top":"left"]=`${r.position*o}px`,t.appendChild(i);}}var qg={type:"linear",angle:90,stops:[{color:"#4472c4",position:0,opacity:1},{color:"#ffffff",position:100,opacity:1}]};function Kg(e){return e&&chunkEWJAZ6TW_cjs.k(e)?{fillColor:e.shapeStyle?.fillColor,strokeColor:e.shapeStyle?.strokeColor,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,strokeColor:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function yr(e,t=null,n=[],o=null,r=new Map){let i=Kg(e),a=e?chunkS5V27BHI_cjs.Ma(e):void 0,p=e?chunkS5V27BHI_cjs.Fc(e):void 0,s=e?chunkS5V27BHI_cjs.Hc(e):void 0,l=e?chunkS5V27BHI_cjs.Jc(e):void 0,m=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,canShape:io(e),canText:pe(e),isImage:e!==void 0&&chunkEWJAZ6TW_cjs.g(e),isChart:e?.type==="chart",isMedia:e?.type==="media",isTable:e?.type==="table",isSmartArt:e?.type==="smartArt",smartArtData:e?.type==="smartArt"?e.smartArtData:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:i.fillColor,strokeColor:i.strokeColor,strokeWidth:i.strokeWidth,shapeStyle:e&&chunkEWJAZ6TW_cjs.k(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:i.fillOpacity,strokeOpacity:i.strokeOpacity,gradientEnabled:e!==void 0&&chunkS5V27BHI_cjs.Ac(e),gradient:e?chunkS5V27BHI_cjs.zc(e):qg,vAlign:a?.vAlign??"top",textWrap:e?chunkS5V27BHI_cjs.Pa(e):"square",autoFitMode:e?chunkS5V27BHI_cjs.Qa(e):"none",characterSpacing:a?.characterSpacing??0,lineSpacing:a?.lineSpacing??1,lineSpacingExactPt:a?.lineSpacingExactPt??null,paragraphSpacingBefore:a?.paragraphSpacingBefore??0,paragraphSpacingAfter:a?.paragraphSpacingAfter??0,paragraphIndent:a?.paragraphIndent??0,paragraphMarginLeft:a?.paragraphMarginLeft??0,textDirection:a?.textDirection??"horizontal",textRtl:a?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:p?.brightness??0,imageContrast:p?.contrast??0,imageSaturation:p?.saturation??0,imageArtisticEffect:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunkEWJAZ6TW_cjs.g(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.colorWash:void 0,actionClick:e?.actionClick?chunkEWJAZ6TW_cjs.te(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunkEWJAZ6TW_cjs.te(e.actionHover,"hover"):void 0,chartData:e?.type==="chart"?e.chartData:void 0,media:e?.type==="media"?e:void 0,mediaPreviewUrl:e?.type==="media"?e.mediaData??(e.mediaPath?r.get(e.mediaPath):void 0):void 0,mediaPosterUrl:e?.type==="media"?e.posterFrameData??(e.posterFramePath?r.get(e.posterFramePath):void 0):void 0,cropLeft:s?.cropLeft??0,cropTop:s?.cropTop??0,cropRight:s?.cropRight??0,cropBottom:s?.cropBottom??0,tableHeaderRow:l?.firstRowHeader??false,tableBandedRows:l?.bandedRows??false,tableBandedColumns:l?.bandedColumns??false,tableLastRow:e?.type==="table"?e.tableData?.lastRow??false:false,tableFirstCol:e?.type==="table"?e.tableData?.firstCol??false:false,tableLastCol:e?.type==="table"?e.tableData?.lastCol??false:false,tableRtl:e?.type==="table"?e.tableData?.rtl??false:false,tableStyleId:e?.type==="table"?e.tableData?.tableStyleId??"":"",tableCellBackground:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.backgroundColor??"#ffffff":"#ffffff",tableCellBorder:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.borderColor??"#000000":"#000000",tableCellPadding:l?.cellPadding??0,selectedTableCell:m?t:null,selectedTableCells:m?n:[],tableCellStyle:m?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(c=>c.height??32)??[]:[]}}function jg(e){let t=[],n=new Set;for(let o of e.slideMasters)for(let r of o.layouts??[])!r.path||n.has(r.path)||(n.add(r.path),t.push({path:r.path,name:r.name||r.path.split("/").pop()||r.path}));return t}function Jc(e){return ()=>{let t=e.store.get(),n=e.getChrome(),{ribbon:o,inspector:r}=n,i=t.editable&&!t.presenting;if(n.thumbnails?.setAddSlideVisible(i),!o&&!r)return;o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen);let a=i?e.selectedElement(t):void 0;o?.updateSelection(a,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],layouts:jg(t)}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth}),r?.update(yr(a,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls));let p=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,elements:p?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:a?.id,comments:p?.comments??[],docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:p,colorScheme:t.colorScheme,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function em(e){if(e.length===0)return null;if(e.length>1){let n=chunkS5V27BHI_cjs.fa(e);return n?{...n,rotation:n.rotation??0}:null}let t=e[0];return {x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0}}function tm(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function Sr(e){let t=null,n=p=>tm(p.clientX,p.clientY,e.getStageOrigin(),e.getScale());function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",a);}function r(p){!t||p.pointerId!==t.pointerId||t.points.push(n(p));}function i(p){if(!t||p.pointerId!==t.pointerId)return;t.points.push(n(p));let s=t;o(),t=null,e.onCommitStroke({points:s.points,color:e.getColor(),width:e.getWidth(),tool:s.tool});}function a(p){!t||p.pointerId!==t.pointerId||(o(),t=null);}return {onStagePointerDown(p){if(p.button!==0)return;let s=e.getTool();if(s!=="select"){if(s==="eraser"){let l=ee(p.target,e.getStageRoot());l&&(p.preventDefault(),p.stopPropagation(),e.onEraseAt(l));return}p.preventDefault(),p.stopPropagation(),t={tool:s,pointerId:p.pointerId,points:[n(p)]},window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",a);}},isActive:()=>t!==null,dispose(){o(),t=null;}}}function Cr(e){let{store:t,editActions:n,interactions:o}=e,r=Sr({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:a=>n.commitStroke(a),onEraseAt:a=>n.eraseInkElement(a)}),i=a=>a.editable&&!a.presenting&&a.drawTool!=="select";return {onStagePointerDown(a){if(i(t.get())){r.onStagePointerDown(a);return}o.onStagePointerDown(a);},onStageDblClick(a){i(t.get())||o.onStageDblClick(a);},syncCursor(a){if(!a)return;let p=t.get();a.dataset.drawTool=i(p)?p.drawTool:"select";},setTool(a){let p=t.get();p.drawTool!==a&&(a!=="select"&&o.closeInline(true),t.set({drawTool:a,selectedElementId:a==="select"?p.selectedElementId:null}));},setColor:a=>t.set({drawColor:a}),setWidth:a=>t.set({drawWidth:Math.max(1,Math.round(a))}),dispose:()=>r.dispose()}}function Yg(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function wr(e,t){return e.map(n=>{let o=t(n);return o.replies?.length?{...o,replies:wr(o.replies,t)}:o})}function om(e,t){return e.filter(n=>n.id!==t).map(n=>n.replies?.length?{...n,replies:om(n.replies,t)}:n)}function nm(e){let t=n=>{let o=e.store.get();!o.editable||!o.slides[o.currentSlide]||(e.ops.pushHistory(),e.store.set({slides:Yg(o.slides,o.currentSlide,n)}),e.ops.commitChange());};return {addComment(n,o){let r=n.trim();if(!r)return null;let i=e.store.get();if(!i.editable||!i.slides[i.currentSlide])return null;let a=chunkS5V27BHI_cjs.Tc();return t(p=>[...p,{id:a,text:r,author:"You",createdAt:new Date().toISOString(),resolved:false,elementId:o}]),a},addCommentReply(n,o){let r=o.trim();if(!r)return null;let i=e.store.get(),a=i.slides[i.currentSlide];if(!i.editable||!a)return null;let p=(a.comments??[]).find(m=>m.id===n);if(!p)return null;let s=chunkS5V27BHI_cjs.Tc(),l={id:s,text:r,author:"You",createdAt:new Date().toISOString(),threadId:n,elementId:p.elementId};return t(m=>m.map(c=>c.id===n?{...c,replies:[...c.replies??[],l]}:c)),s},editComment(n,o){let r=o.trim();r&&t(i=>wr(i,a=>a.id===n?{...a,text:r}:a));},deleteComment(n){t(o=>om(o,n));},toggleCommentResolved(n){t(o=>wr(o,r=>r.id===n?{...r,resolved:!r.resolved}:r));}}}function Er(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunkS5V27BHI_cjs.wc(o);i&&(n.pushHistory(),t.set({slides:gt(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=ir(r.slides,r.currentSlide,o);if(!i||i.type!=="ink")return false;n.pushHistory();let a=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:ar(r.slides,r.currentSlide,o),selectedElementId:a}),n.commitChange(),true}}}var Xg={width:320,height:80},Zg={width:600,height:250},Qg={width:200,height:150},rm={width:240,height:0};function se(e,t){e.x=Math.max(0,Math.round((t.width-e.width)/2)),e.y=Math.max(0,Math.round((t.height-e.height)/2));}function Tr(e,t,n="rect"){let o,r;switch(e){case "text":o=chunkEWJAZ6TW_cjs.A("Text",{fontSize:18,color:"#000000"}),r=Xg;break;case "table":o={...chunkS5V27BHI_cjs.la(3,3),id:chunkEWJAZ6TW_cjs.ie("table")},r=Zg;break;case "shape":n==="connector"?(o=chunkEWJAZ6TW_cjs.C({type:"straight",stroke:{color:"#000000",width:2}}),r=rm):(o=chunkEWJAZ6TW_cjs.B(n),r=n==="line"?rm:Qg);break}return o.width=r.width,o.height=r.height,se(o,t),o}function Jg(e,t){return new Promise(n=>{let o=new Image;o.onload=()=>{let r=o.width/Math.max(1,o.height),i=Math.min(t,o.width||t),a=Math.max(1,Math.round(i/(r||1)));n({width:i,height:a});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function mo(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="image/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=new FileReader;a.onload=async()=>{let p=typeof a.result=="string"?a.result:"";if(!p){n(null);return}let s=Math.round(t.width*.6),{width:l,height:m}=await Jg(p,s),c={id:chunkEWJAZ6TW_cjs.ie("image"),type:"image",name:"Image",x:0,y:0,width:l,height:m,imageData:p};se(c,t),n(c);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var eb={width:420,height:64},ze={width:640,height:360};function tb(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||ze.width,i=o.videoHeight||ze.height;if(r>ze.width||i>ze.height){let a=Math.min(ze.width/r,ze.height/i);n({width:Math.round(r*a),height:Math.round(i*a)});return}n({width:r,height:i});},o.onerror=()=>n(ze),o.src=t;})}function Pr(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="video/*,audio/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=i.type.startsWith("audio/")?"audio":i.type.startsWith("video/")?"video":null;if(!a){n(null);return}let p=new FileReader;p.onload=async()=>{let s=typeof p.result=="string"?p.result:"";if(!s){n(null);return}let l=a==="audio"?eb:await tb(e,s),m={id:chunkEWJAZ6TW_cjs.ie("media"),type:"media",mediaType:a,mediaMimeType:i.type||void 0,mediaData:s,x:0,y:0,width:l.width,height:l.height};se(m,t),n(m);},p.onerror=()=>n(null),p.readAsDataURL(i);}),o.click();})}var im={width:400,height:80},am={width:600,height:340},pm={width:200,height:40};function Ar(e,t){let n=chunkS5V27BHI_cjs.Qc(e);return se(n,t),n}function kr(e,t,n){let o={id:chunkEWJAZ6TW_cjs.ie("smartart"),type:"smartArt",x:0,y:0,width:am.width,height:am.height,smartArtData:chunkS5V27BHI_cjs.jc(e,t,r=>chunkEWJAZ6TW_cjs.ie(`smartart-node-${r}`))};return se(o,n),o}function Ir(e,t){let n="[Equation]",o={id:chunkEWJAZ6TW_cjs.ie("equation"),type:"shape",x:0,y:0,width:im.width,height:im.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return se(o,t),o}function Lr(e,t){let n=chunkS5V27BHI_cjs.fc(e,chunkEWJAZ6TW_cjs.ie("actionbutton"));return n?(se(n,t),n):null}function Dr(e,t){return chunkS5V27BHI_cjs.ka(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Mr(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunkEWJAZ6TW_cjs.ie("field"),type:"shape",x:0,y:0,width:pm.width,height:pm.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return se(r,n),r}function sm(e,t,n){let o=new Set(t.map(({row:r,column:i})=>`${r}:${i}`));return {...e,rows:e.rows.map((r,i)=>({...r,cells:r.cells.map((a,p)=>o.has(`${i}:${p}`)?{...a,style:{...a.style,...n}}:a)}))}}function lm(e,t,n){switch(n){case "insertRowAbove":return chunkS5V27BHI_cjs.Q(e,t.row,"above");case "insertRowBelow":return chunkS5V27BHI_cjs.Q(e,t.row,"below");case "deleteRow":return chunkS5V27BHI_cjs.R(e,t.row);case "insertColumnLeft":return chunkS5V27BHI_cjs.S(e,t.column,"left");case "insertColumnRight":return chunkS5V27BHI_cjs.S(e,t.column,"right");case "deleteColumn":return chunkS5V27BHI_cjs.T(e,t.column)}}function dm(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100)),i=1-e.columnWidths[t],a=1-o;return {...e,columnWidths:e.columnWidths.map((p,s)=>s===t?o:i>0?p/i*a:p)}}function cm(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function mm(e,t){if(t.length<2)return e;let n=t.map(({row:l})=>l),o=t.map(({column:l})=>l),r=Math.min(...n),i=Math.max(...n),a=Math.min(...o),p=Math.max(...o);if(t.length!==(i-r+1)*(p-a+1))return e;let s=e.rows.map((l,m)=>({...l,cells:l.cells.map((c,u)=>m<r||m>i||u<a||u>p?c:m===r&&u===a?{...c,text:t.map(({row:x,column:g})=>e.rows[x]?.cells[g]?.text).filter(Boolean).join(" "),gridSpan:p>a?p-a+1:void 0,rowSpan:i>r?i-r+1:void 0}:{...c,text:"",hMerge:u>a||void 0,vMerge:m>r||void 0})}));return {...e,rows:s}}function um(e,t){let n=e.rows[t.row]?.cells[t.column],o=Math.max(1,n?.rowSpan??1),r=Math.max(1,n?.gridSpan??1),i=chunkS5V27BHI_cjs.U(e,t.row,t.column);return i?{...e,rows:i.map((a,p)=>({...a,cells:a.cells.map((s,l)=>p>=t.row&&p<t.row+o&&l>=t.column&&l<t.column+r?{...s,hMerge:void 0,vMerge:void 0}:s)}))}:e}var ob={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function Hr(e){return {setTextVerticalAlign:t=>e(n=>chunkS5V27BHI_cjs.Oa(n,t)),setTextWrap:t=>e(n=>chunkS5V27BHI_cjs.Ra(n,t)),setAutoFitMode:t=>e(n=>chunkS5V27BHI_cjs.Sa(n,t)),setTextAdvanced:t=>e(n=>chunkS5V27BHI_cjs.Na(n,t)),setTextStyle:(t,n)=>e(o=>"textStyle"in o?n&&o.textSegments?.length?{textSegments:chunkS5V27BHI_cjs.Ua(o.textSegments,n,t).newSegments}:{textStyle:{...o.textStyle,...t}}:{}),setFillOpacity:t=>e(n=>Te(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>Te(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunkS5V27BHI_cjs.Bc(n,t)),addGradientStop:(t,n)=>e(o=>chunkS5V27BHI_cjs.Cc(o,t,n)),removeGradientStop:t=>e(n=>chunkS5V27BHI_cjs.Dc(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunkS5V27BHI_cjs.Ec(o,t,n)),setImageBrightness:t=>e(n=>chunkS5V27BHI_cjs.Gc(n,{brightness:t})),setImageContrast:t=>e(n=>chunkS5V27BHI_cjs.Gc(n,{contrast:t})),setImageSaturation:t=>e(n=>chunkS5V27BHI_cjs.Gc(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunkS5V27BHI_cjs.Ic(o,{[ob[t]]:n})),setImageEffects:t=>e(n=>chunkEWJAZ6TW_cjs.g(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunkEWJAZ6TW_cjs.ue(n)})),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunkS5V27BHI_cjs.Kc(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunkS5V27BHI_cjs.Kc(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunkS5V27BHI_cjs.Lc(n,t)),setTableOptions:(t,n)=>e(o=>o.type!=="table"||!o.tableData?{}:{tableData:{...o.tableData,...t,rows:n?o.tableData.rows.map(r=>({...r,cells:r.cells.map(i=>({...i,style:{...i.style,...n}}))})):o.tableData.rows}}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,a)=>a===t?{...i,cells:i.cells.map((p,s)=>s===n?{...p,style:{...p.style,...o}}:p)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:sm(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:lm(o.tableData,t,n)}:{}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:dm(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:cm(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:mm(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:um(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:chunkEWJAZ6TW_cjs.Qe(o.smartArtData,t,n)}:{}),setSmartArtNodeStyle:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:chunkEWJAZ6TW_cjs.We(o.smartArtData,t,n)}:{}),mutateSmartArtNode:(t,n)=>e(o=>{if(o.type!=="smartArt"||!o.smartArtData)return {};let r=o.smartArtData;return {smartArtData:n==="add"?chunkEWJAZ6TW_cjs.Oe(r,"New item"):n==="addChild"?chunkEWJAZ6TW_cjs.Ue(r,t,"New item"):n==="remove"?chunkEWJAZ6TW_cjs.Pe(r,t):n==="promote"?chunkEWJAZ6TW_cjs.Se(r,t):chunkEWJAZ6TW_cjs.Te(r,t)}}),setSmartArtLayout:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:chunkEWJAZ6TW_cjs.Sf(n.smartArtData,t)}:{}),setSmartArtColorScheme:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:{...n.smartArtData,colorScheme:t}}:{})}}function Rr(e,t){let n=(o,r)=>{t.pushHistory(),e.set({sections:o,slides:r}),t.commitChange();};return {addSection(o,r=e.get().currentSlide){let i=e.get(),a=o.trim();if(!i.editable||!a||!i.slides[r])return null;let p=chunkS5V27BHI_cjs.sa(i.sections,i.slides,a,r),s=p.sections.find(l=>!i.sections.some(m=>m.id===l.id));return n(p.sections,p.slides),s?.id??null},renameSection(o,r){let i=e.get(),a=r.trim(),p=i.sections.find(l=>l.id===o);if(!i.editable||!p||!a||p.name===a)return;let s=chunkS5V27BHI_cjs.ta(i.sections,i.slides,o,a);n(s.sections,s.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(a=>a.id===o))return;let i=chunkS5V27BHI_cjs.ua(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),a=r==="up"?chunkS5V27BHI_cjs.va(i.sections,o):chunkS5V27BHI_cjs.wa(i.sections,o);!i.editable||a===i.sections||n(a,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let a=chunkS5V27BHI_cjs.xa(i.sections,i.slides,o,r);a.sections!==i.sections&&n(a.sections,a.slides);},toggleSection(o){let r=e.get();r.sections.some(i=>i.id===o)&&e.set({sections:r.sections.map(i=>i.id===o?{...i,collapsed:!i.collapsed}:i)});}}}function uo(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function Or(e){let{store:t,ops:n}=e;function o(r,i,a){let p=e.getHandler();p&&p.applyLayoutToSlide(r,i,[...t.get().slides]).then(s=>{let l=t.get();if(l.slides[r]?.id===a){n.pushHistory();let m=[...l.slides];m[r]=s,t.set({slides:m}),n.commitChange();}},()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,a=chunkS5V27BHI_cjs.za(i+1),p=uo([...r.slides.slice(0,i),a,...r.slides.slice(i)]);t.set({slides:p,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let a=r.currentSlide+1,p={...chunkEWJAZ6TW_cjs.Z(i),id:chunkS5V27BHI_cjs.ya()},s=r.templateElementsBySlideId[i.id]??[],l=uo([...r.slides.slice(0,a),p,...r.slides.slice(a)]);t.set({slides:l,templateElementsBySlideId:{...r.templateElementsBySlideId,[p.id]:s.map(chunkEWJAZ6TW_cjs.Y)},currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=uo(r.slides.filter((s,l)=>l!==r.currentSlide)),a=Math.min(r.currentSlide,i.length-1),p={...r.templateElementsBySlideId};delete p[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let a=t.get();if(!a.editable||!r)return;n.pushHistory();let p=a.currentSlide+1,s={...chunkS5V27BHI_cjs.za(p+1),layoutPath:r,...i?{layoutName:i}:{}},l=uo([...a.slides.slice(0,p),s,...a.slides.slice(p)]);t.set({slides:l,currentSlide:p,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(p,r,s.id);},applyLayout(r){let i=t.get(),a=i.slides[i.currentSlide];!i.editable||!a||!r||o(i.currentSlide,r,a.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide];!r.editable||!i?.layoutPath||o(r.currentSlide,i.layoutPath,i.id);}}}var nb=24;function xo(e,t){if(!pe(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function go(e,t){let n=Ee(e).listType;return xo(e,{listType:n===t?"none":t})}function bo(e,t){let n=Ee(e).paragraphMarginLeft,o=Math.max(0,n+t*nb);return xo(e,{paragraphMarginLeft:o})}function Fr(e,t){return xo(e,{align:t})}function Br(e,t){return xo(e,{lineSpacing:t})}function Vr(e){return {toggleBold:()=>e(t=>je(t,"bold")),toggleItalic:()=>e(t=>je(t,"italic")),toggleUnderline:()=>e(t=>je(t,"underline")),toggleStrikethrough:()=>e(t=>je(t,"strikethrough")),toggleTextShadow:()=>e(t=>Wn(t)),changeFontSize:t=>e(n=>Nn(n,t)),setFontSize:t=>e(n=>ao(n,t)),setFontFamily:t=>e(n=>_n(n,t)),setTextColor:t=>e(n=>zn(n,t)),setHighlightColor:t=>e(n=>Gn(n,t)),setCharacterSpacing:t=>e(n=>Un(n,t)),changeCase:t=>e(n=>$n(n,t)),clearFormatting:()=>e(t=>qn(t)),toggleBulletList:()=>e(t=>go(t,"bullet")),toggleNumberedList:()=>e(t=>go(t,"numbered")),increaseIndent:()=>e(t=>bo(t,1)),decreaseIndent:()=>e(t=>bo(t,-1)),setTextAlign:t=>e(n=>Fr(n,t)),setLineSpacing:t=>e(n=>Br(n,t))}}function Nr(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i){let a=t.get(),p=a.slides[a.currentSlide];if(!a.editable||!p)return;let s=Math.max(0,Math.round(r));if(n.pushHistory(),i){let l={type:o,durationMs:s};t.set({slides:sr(a.slides,{transition:l})});}else {let l={...p.transition,type:o,durationMs:s};t.set({slides:oe(a.slides,a.currentSlide,{transition:l})});}n.commitChange();}}}function zr(e){let{doc:t,store:n,ops:o}=e,r=rr(n,o),i=a=>{if(!a)return;let p=n.get();!p.editable||!p.slides[p.currentSlide]||(o.pushHistory(),n.set({slides:gt(p.slides,p.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {...Vr(r),...gr({store:n,ops:o,applyToSelected:r}),...fr({store:n,ops:o}),...Or({store:n,ops:o,getHandler:e.getHandler}),...br({store:n,ops:o}),...Nr({store:n,ops:o}),...lr({store:n,ops:o}),...Hr(r),...Er({store:n,ops:o}),...vr({store:n,ops:o,getHandler:e.getHandler}),sections:Rr(n,o),comments:nm({store:n,ops:o}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:a=>r(p=>Te(p,{fillColor:a,fillMode:"solid"})),setShapeStroke:a=>r(p=>Te(p,{strokeColor:a})),setShapeStrokeWidth:a=>r(p=>Te(p,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(p=>Te(p,a)),setShapeType:a=>r(p=>p.type==="shape"?{shapeType:a}:{}),setGeometry(a){r(()=>{let p={};return a.x!==void 0&&Number.isFinite(a.x)&&(p.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(p.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(p.width=Math.max(chunkEWJAZ6TW_cjs.Ha,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(p.height=Math.max(chunkEWJAZ6TW_cjs.Ha,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(p.rotation=a.rotation),p});},insert(a,p){let s=n.get();s.slides[s.currentSlide]&&i(Tr(a,s.canvasSize,p));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await mo(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await Pr(t,a.canvasSize));},insertChart(a){let p=n.get();p.slides[p.currentSlide]&&i(Ar(a,p.canvasSize));},insertSmartArt(a,p){let s=n.get();s.slides[s.currentSlide]&&i(kr(a,p,s.canvasSize));},insertEquation(a){let p=n.get();p.slides[p.currentSlide]&&i(Ir(a,p.canvasSize));},updateEquation:(a,p)=>o.updateEquation(a,p),insertActionButton(a){let p=n.get();p.slides[p.currentSlide]&&i(Lr(a,p.canvasSize));},insertField(a,p){let s=n.get();if(!s.slides[s.currentSlide])return;let l=p??Dr(a,{slideNumber:s.currentSlide+1});i(Mr(a,l,s.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),toggleViewOption(a){let p=n.get();n.set({[a]:!p[a]});for(let s of t.querySelectorAll(".pptxv"))s.classList.toggle(`pptxv-${a}`,!p[a]);},addGuide(a){let p=n.get();n.set({guides:[...p.guides,chunkS5V27BHI_cjs.kc(`guide-${Date.now()}`,a,p.canvasSize)]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await mo(t,n.get().canvasSize);!a||a.type!=="image"||r(p=>p.type==="image"?{imageData:a.imageData,imagePath:a.imagePath,svgData:a.svgData,svgPath:a.svgPath}:{});},resetSelectedImage:()=>r(a=>a.type==="image"?{imageEffects:void 0,cropLeft:void 0,cropTop:void 0,cropRight:void 0,cropBottom:void 0}:{})}}function Gr(e){let{store:t,ops:n}=e,o=(r,i)=>{i!==0&&(n.pushHistory(),t.set({slides:[...r]}),n.commitChange());};return {search(r,i){return r?chunkS5V27BHI_cjs.oc(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,a){let p=t.get();if(!p.editable||!r)return 0;let s=chunkS5V27BHI_cjs.oc(p.slides,r,{matchCase:a}),{slides:l,replacements:m}=chunkS5V27BHI_cjs.pc(p.slides,s,0,i);return o(l,m),m},replaceAll(r,i,a){let p=t.get();if(!p.editable||!r)return 0;let{slides:s,replacements:l}=chunkS5V27BHI_cjs.qc(p.slides,r,i,{matchCase:a});return o(s,l),l}}}var xm=1,gm=10,rb=new Set(["nw","ne","se","sw"]);function bm(e){return rb.has(e)}function _r(e,t,n,o=chunkEWJAZ6TW_cjs.Ha){if(!bm(n)||t.width<=0||t.height<=0)return e;let r=e.width/t.width,i=e.height/t.height,a=Math.abs(r-1)>=Math.abs(i-1)?r:i,p=t.width*a,s=t.height*a;if(p<o||s<o){let c=Math.max(o/t.width,o/t.height);p=t.width*c,s=t.height*c;}let l=n==="nw"||n==="sw",m=n==="nw"||n==="ne";return {x:l?t.x+t.width-p:t.x,y:m?t.y+t.height-s:t.y,width:p,height:s,rotation:e.rotation}}function Ur(e,t){let n=t?gm:xm;switch(e){case "ArrowLeft":return {dx:-n,dy:0};case "ArrowRight":return {dx:n,dy:0};case "ArrowUp":return {dx:0,dy:-n};case "ArrowDown":return {dx:0,dy:n};default:return null}}var ib=/^(?:INPUT|TEXTAREA|SELECT)$/u;function Wr(e){return t=>{if(!e.isActive())return;let n=t.target instanceof HTMLElement?t.target:null;if(n&&(ib.test(n.tagName)||n.isContentEditable))return;let o=t.ctrlKey||t.metaKey,r=t.key;if(r==="Escape"&&e.cancelFormatPainter()){t.preventDefault();return}if(o&&(r==="z"||r==="Z")){t.preventDefault(),t.shiftKey?e.redo():e.undo();return}if(o&&(r==="y"||r==="Y")){t.preventDefault(),e.redo();return}if(o&&(r==="v"||r==="V")){t.preventDefault(),e.paste();return}if(e.getSelectedId()===null)return;if(r==="Escape"){t.preventDefault(),e.deselect();return}if(r==="Delete"||r==="Backspace"){t.preventDefault(),e.deleteSelected();return}if(o&&(r==="d"||r==="D")){t.preventDefault(),e.duplicateSelected();return}if(o&&(r==="c"||r==="C")){t.preventDefault(),e.copySelected();return}if(o&&(r==="x"||r==="X")){t.preventDefault(),e.cutSelected();return}let i=Ur(r,t.shiftKey);i&&(t.preventDefault(),e.nudgeSelected(i.dx,i.dy));}}function fm(e,t){let n=e.store.get();!n.editable||!n.handoutMaster||n.handoutSlidesPerPage===t||(e.pushHistory(),e.store.set({handoutSlidesPerPage:t,handoutMaster:{...n.handoutMaster,slidesPerPage:t}}),e.commitChange());}function vm(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null}}function hm(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),a=te(i,t);if(a?.type!=="table"||!a.tableData?.rows[n]?.cells[o])return;e.pushHistory();let p=a.tableData.rows.map((s,l)=>({...s,cells:s.cells.map((m,c)=>l===n&&c===o?{...m,text:r,textRuns:void 0}:m)}));e.store.set(j(i,G(i).map(s=>s.id===t&&s.type==="table"?{...s,tableData:{...s.tableData,rows:p}}:s))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=te(o,t);!r||!chunkEWJAZ6TW_cjs.j(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(j(o,G(o).map(i=>i.id===t&&chunkEWJAZ6TW_cjs.j(i)?{...i,textSegments:i.textSegments?.map(a=>a.equationXml?{...a,equationXml:n}:a)}:i))),e.commitChange());}}}function $r(e){return !e||!chunkEWJAZ6TW_cjs.j(e)||e.locks?.noTextEdit?false:!e.textSegments?.some(t=>t.equationXml)}function qr(e,t){let n=chunkEWJAZ6TW_cjs.j(e)?e:void 0,o=n?.textSegments,r=n?.textStyle;return {text:t,textSegments:chunkS5V27BHI_cjs.Ya(t,o,r)}}function bt(e){let t="",n=o=>{for(let r of Array.from(o.childNodes)){if(r.nodeType===3){t+=r.nodeValue??"";continue}if(!(r instanceof HTMLElement))continue;if(r.tagName==="BR"){t+=`
6
+ `),T.textContent=f?.metadata?`${f.metadata.duration??0}s, ${f.metadata.videoWidth??0} x ${f.metadata.videoHeight??0}, ${f.metadata.codecInfo??f.mediaMimeType??""}`:f?.mediaMimeType??"";for(let y of [...k,u,x,g,v])y.setDisabled(!S.isMedia);h.control.disabled=!S.isMedia,b.control.disabled=!S.isMedia;}}}function _d(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=3,n.appendChild(o),{label:n,control:o}}function Ud(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function $d(e,t,n,o){let r=n(t("pptx.arrange.positionSize")),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-grid");r.appendChild(i);let a=(x,g,v)=>{let h=Y(e,{label:x,min:v,onCommit:b=>o({[g]:b})});return i.appendChild(h.el),h},p=a(t("pptx.arrange.x"),"x"),s=a(t("pptx.arrange.y"),"y"),l=a(t("pptx.arrange.width"),"width",1),m=a(t("pptx.arrange.height"),"height",1),c=a(t("pptx.arrange.rotation"),"rotation"),u=[p,s,l,m,c];return {el:r,update(x){r.hidden=!x.hasSelection,p.setValue(x.x),s.setValue(x.y),l.setValue(x.width),m.setValue(x.height),c.setValue(x.rotation);for(let g of u)g.setDisabled(!x.hasSelection);}}}var Gx=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function qd(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-layout-grid"),p=new Map;for(let v of chunkEWJAZ6TW_cjs.Rf){let h=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-layout-button");h.type="button",h.dataset.testid=`smartart-layout-${v}`,h.textContent=t(`pptx.smartart.category.${v}`),h.addEventListener("click",()=>o.setSmartArtLayout(v)),p.set(v,h),a.appendChild(h);}r.appendChild(a);let s=xe(e,{label:t("pptx.smartart.colorScheme"),options:Gx.map(v=>({value:v,label:v})),onChange:o.setSmartArtColorScheme}),l=s.el.querySelector("select");l&&(l.dataset.testid="smartart-color-scheme"),r.appendChild(s.el);let m=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-label");m.textContent=t("pptx.smartart.textPane"),r.appendChild(m);let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-nodes"),u=e.createElement("button");u.type="button",u.textContent=t("pptx.smartart.addItem"),u.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(u,c);let x="",g=v=>{let h=v.smartArtData,b=h?.nodes.map(T=>T.id).join("|")??"";if(b===x){let T=c.querySelectorAll('[data-testid="smartart-node-text"]');h?.nodes.forEach((k,S)=>{let f=T[S];f&&e.activeElement!==f&&(f.value=k.text);});return}x=b,c.replaceChildren();for(let[T,k]of (h?.nodes??[]).entries()){let S=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-smartart-node"),f=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-node-index");f.textContent=String(T+1);let C=e.createElement("input");C.type="text",C.className="pptxv-smartart-node-input",C.dataset.testid="smartart-node-text",C.setAttribute("aria-label",`${t("pptx.smartart.item")} ${T+1}`),C.value=k.text,C.addEventListener("change",()=>o.setSmartArtNodeText(k.id,C.value));let y=e.createElement("input");y.type="color",y.value=k.style?.fillColor??"#3b82f6",y.title=t("pptx.inspector.fill"),y.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fillColor:y.value}));let P=e.createElement("input");P.type="color",P.value=k.style?.fontColor??"#ffffff",P.title=t("pptx.table.color"),P.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fontColor:P.value}));let E=e.createElement("button");E.type="button",E.textContent="B",E.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{bold:!k.style?.bold}));let w=e.createElement("button");w.type="button",w.textContent="I",w.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{italic:!k.style?.italic}));let A=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-hierarchy");for(let[I,H]of [["addChild","+Child"],["promote","Outdent"],["demote","Indent"],["remove","Delete"]]){let M=e.createElement("button");M.type="button",M.textContent=H,M.addEventListener("click",()=>o.mutateSmartArtNode(k.id,I)),A.appendChild(M);}S.append(f,C,y,P,E,w,A),c.appendChild(S);}};return {el:r,update(v){r.hidden=!v.isSmartArt;let h=v.smartArtData?.resolvedLayoutType;for(let[b,T]of p)T.disabled=!v.isSmartArt,T.classList.toggle("is-active",b===h),T.setAttribute("aria-pressed",String(b===h));s.setValue(v.smartArtData?.colorScheme??"colorful1"),s.setDisabled(!v.isSmartArt),u.disabled=!v.isSmartArt,g(v);}}}function Kd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=y=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],y);},a=(y,P)=>{let E=e.createElement("label");E.textContent=y;let w=e.createElement("select");for(let A of P){let I=e.createElement("option");I.value=A,I.textContent=A,w.appendChild(I);}return E.appendChild(w),o.appendChild(E),w},p=y=>{let P=e.createElement("label");P.textContent=y;let E=e.createElement("input");return E.type="color",P.appendChild(E),o.appendChild(P),E},s=a(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),l=a(t("pptx.table.gradientType"),["linear","radial"]),m=e.createElement("input");m.type="number",m.min="0",m.max="360",m.title=t("pptx.table.gradientAngle"),o.appendChild(m);let c=p(t("pptx.table.gradientStart")),u=p(t("pptx.table.gradientEnd")),x=a(t("pptx.table.patternPreset"),["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"]),g=p(t("pptx.table.patternForeground")),v=p(t("pptx.table.patternBackground")),h=a(t("pptx.table.cellBorders"),["top","right","bottom","left"]),b=p(t("pptx.table.borderColor")),T=e.createElement("input");T.type="number",T.min="0",T.max="20",T.title=t("pptx.table.borderWidth"),o.appendChild(T);let k=()=>i({fillMode:"gradient",gradientFillType:l.value,gradientFillAngle:Number(m.value),gradientFillStops:[{color:c.value,position:0},{color:u.value,position:100}]});s.addEventListener("change",()=>i({fillMode:s.value}));for(let y of [l,m,c,u])y.addEventListener("change",k);let S=()=>i({fillMode:"pattern",patternFillPreset:x.value,patternFillForeground:g.value,patternFillBackground:v.value});for(let y of [x,g,v])y.addEventListener("change",S);let f=()=>{let y=`${h.value[0].toUpperCase()}${h.value.slice(1)}`;i({[`border${y}Color`]:b.value,[`border${y}Width`]:Number(T.value)});};for(let y of [h,b,T])y.addEventListener("change",f);let C=o.querySelectorAll("input,select");return {el:o,update(y){r=y,o.hidden=!y.selectedTableCell;let P=y.tableCellStyle??{};s.value=P.fillMode??"solid",l.value=P.gradientFillType??"linear",m.value=String(P.gradientFillAngle??90),c.value=P.gradientFillStops?.[0]?.color??"#ff0000",u.value=P.gradientFillStops?.at(-1)?.color??"#0000ff",x.value=P.patternFillPreset??"ltDnDiag",g.value=P.patternFillForeground??"#000000",v.value=P.patternFillBackground??"#ffffff";let E=`${h.value[0].toUpperCase()}${h.value.slice(1)}`;b.value=String(P[`border${E}Color`]??"#374151"),T.value=String(P[`border${E}Width`]??1);for(let w of C)w.disabled=!y.isTable;}}}function Mn(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function jd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell";let r=e.createElement("strong");o.appendChild(r);let i=null,a=[],p=E=>{i&&n.setTableCellStyles(a.length>0?a:[i],E);},s=(E,w)=>{let A=e.createElement("label"),I=e.createElement("span");return I.textContent=E,A.append(I,w),o.appendChild(A),A},l=(E,w)=>{let A=e.createElement("input");return A.type="number",A.addEventListener("change",()=>w(Number(A.value))),s(E,A),A},m=(E,w)=>{let A=e.createElement("input");return A.type="color",A.addEventListener("input",()=>p({[w]:A.value})),s(E,A),A},c=(E,w)=>{let A=e.createElement("input");return A.type="checkbox",A.addEventListener("change",()=>p({[w]:A.checked})),s(E,A),A},u=(E,w,A)=>{let I=e.createElement("select");for(let H of w){let M=e.createElement("option");M.value=H,M.textContent=H,I.appendChild(M);}return I.addEventListener("change",()=>A(I.value)),s(E,I),I},x=l(t("pptx.table.fontSize"),E=>p({fontSize:E})),g=m(t("pptx.table.color"),"color"),v=m(t("pptx.table.background"),"backgroundColor"),h=m(t("pptx.table.cellBorders"),"borderColor"),b=l(t("pptx.table.borderWidth"),E=>p({borderTopWidth:E,borderRightWidth:E,borderBottomWidth:E,borderLeftWidth:E})),T=l(t("pptx.table.cellPadding"),E=>p({marginLeft:E,marginRight:E,marginTop:E,marginBottom:E})),k=c(t("pptx.format.bold"),"bold"),S=c(t("pptx.format.italic"),"italic"),f=c(t("pptx.format.underline"),"underline"),C=u(t("pptx.table.alignment"),["left","center","right"],E=>p({align:E})),y=u(t("pptx.table.verticalAlignment"),["top","middle","bottom"],E=>p({vAlign:E})),P=[x,g,v,h,b,T,k,S,f,C,y];return {el:o,update(E){if(i=E.selectedTableCell,a=E.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let w=E.tableCellStyle??{};x.value=String(w.fontSize??14),g.value=Mn(w.color,"#000000"),v.value=Mn(w.backgroundColor,"#ffffff"),h.value=Mn(w.borderColor,"#374151"),b.value=String(w.borderTopWidth??1),T.value=String(w.marginLeft??4),k.checked=!!w.bold,S.checked=!!w.italic,f.checked=!!w.underline,C.value=w.align??"left",y.value=w.vAlign??"top";for(let A of P)A.disabled=!E.isTable;}}}function Yd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(c,u)=>{let x=e.createElement("button");return x.type="button",x.textContent=c,x.addEventListener("click",()=>r&&u(r)),o.appendChild(x),x},a=c=>c.selectedTableCell,p=c=>u=>{let x=a(u);x&&n.mutateTableStructure(x,c);},s=[i(t("pptx.table.insertRowAbove"),p("insertRowAbove")),i(t("pptx.table.insertRowBelow"),p("insertRowBelow")),i(t("pptx.table.deleteRow"),p("deleteRow")),i(t("pptx.table.insertColumnLeft"),p("insertColumnLeft")),i(t("pptx.table.insertColumnRight"),p("insertColumnRight")),i(t("pptx.table.deleteColumn"),p("deleteColumn")),i(t("pptx.table.mergeCells"),c=>n.mergeTableCells(c.selectedTableCells)),i(t("pptx.table.split"),c=>{let u=a(c);u&&n.splitTableCell(u);})],l=e.createElement("input");l.type="number",l.min="5",l.max="95",l.title=t("pptx.table.columnWidths"),l.addEventListener("change",()=>{let c=r&&a(r);c&&n.setTableColumnWidth(c.column,Number(l.value));});let m=e.createElement("input");return m.type="number",m.min="1",m.title=t("pptx.table.rowHeights"),m.addEventListener("change",()=>{let c=r&&a(r);c&&n.setTableRowHeight(c.row,Number(m.value));}),o.append(l,m),{el:o,update(c){r=c;let u=a(c);o.hidden=!u,l.value=u?String(Math.round((c.tableColumnWidths[u.column]??0)*100)):"",m.value=u?String(c.tableRowHeights[u.row]??32):"";for(let x of s)x.disabled=!u;s[6].disabled=c.selectedTableCells.length<2,l.disabled=!u,m.disabled=!u;}}}function Xd(e,t,n,o){let r=n(t("pptx.inspector.table")),i=$(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=$(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),p=$(e,{label:t("pptx.table.bandedColumns"),onChange:f=>o.setTableOptions({bandedColumns:f})}),s=$(e,{label:t("pptx.table.totalRow"),onChange:f=>o.setTableOptions({lastRow:f})}),l=$(e,{label:t("pptx.table.firstColumn"),onChange:f=>o.setTableOptions({firstCol:f})}),m=$(e,{label:t("pptx.table.lastColumn"),onChange:f=>o.setTableOptions({lastCol:f})}),c=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:f=>o.setTableOptions({rtl:f})});r.append(i.el,a.el,p.el,s.el,l.el,m.el,c.el);let u=Y(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});r.appendChild(u.el);let x=e.createElement("input");x.placeholder=t("pptx.table.styleId"),x.addEventListener("change",()=>o.setTableOptions({tableStyleId:x.value}));let g=e.createElement("input");g.type="color",g.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:g.value}));let v=e.createElement("input");v.type="color",v.addEventListener("input",()=>o.setTableOptions({},{borderColor:v.value})),r.append(x,g,v);let h=jd(e,t,o),b=Kd(e,t,o),T=Yd(e,t,o);r.append(h.el,b.el,T.el);let k=[i,a,p,s,l,m,c],S=[u];return {el:r,update(f){r.hidden=!f.hasSelection||!f.isTable,i.setValue(f.tableHeaderRow),a.setValue(f.tableBandedRows),p.setValue(f.tableBandedColumns),s.setValue(f.tableLastRow),l.setValue(f.tableFirstCol),m.setValue(f.tableLastCol),c.setValue(f.tableRtl),u.setValue(f.tableCellPadding),x.value=f.tableStyleId,g.value=f.tableCellBackground,v.value=f.tableCellBorder,h.update(f),b.update(f),T.update(f);for(let C of k)C.setDisabled(!f.isTable);x.disabled=!f.isTable,g.disabled=!f.isTable,v.disabled=!f.isTable;for(let C of S)C.setDisabled(!f.isTable);}}}function Zd(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=w=>n.setTextStyle(w,r?.selectedTextRange),a=w=>n.setTextStyle(w),p=(w,A)=>{let I=e.createElement("label");I.textContent=w,I.appendChild(A),o.appendChild(I);},s=(w,A,I=0,H=false)=>{let M=e.createElement("input");return M.type="number",M.min=String(I),M.addEventListener("change",()=>(H?a:i)({[A]:Number(M.value)})),p(w,M),M},l=(w,A)=>{let I=e.createElement("input");return I.type="color",I.addEventListener("input",()=>i({[A]:I.value})),p(w,I),I},m=(w,A)=>{let I=e.createElement("input");return I.type="checkbox",I.addEventListener("change",()=>i({[A]:I.checked})),p(w,I),I},c=s(t("pptx.textFormatting.columns"),"columnCount",1,true);c.max="6";let u=s(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),x=l(t("pptx.textEffects.outline"),"textOutlineColor"),g=s(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),v=m(t("pptx.textEffects.shadow"),"textShadowOpacity"),h=l(t("pptx.textEffects.shadowColor"),"textShadowColor"),b=s(t("pptx.textEffects.blur"),"textShadowBlur"),T=l(t("pptx.textEffects.glowColor"),"textGlowColor"),k=s(t("pptx.textEffects.glow"),"textGlowRadius"),S=m(t("pptx.textEffects.reflection"),"textReflection"),f=m(t("pptx.textFormatting.strikethrough"),"strikethrough"),C=l(t("pptx.textFormatting.highlight"),"highlightColor"),y=e.createElement("select");for(let w of chunkS5V27BHI_cjs.Sc){let A=e.createElement("option");A.value=w.value,A.textContent=w.label,y.appendChild(A);}y.addEventListener("change",()=>a({textWarpPreset:y.value==="textNoShape"?void 0:y.value})),p(t("pptx.textEffects.transform"),y);let P=s(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),E=Array.from(o.querySelectorAll("input,select"));return {el:o,update(w){r=w,o.hidden=!w.canText;let A=w.textStyle??{};c.value=String(A.columnCount??1),u.value=String(A.columnSpacing??0),x.value=A.textOutlineColor??"#000000",g.value=String(A.textOutlineWidth??0),v.checked=!!A.textShadowOpacity,h.value=A.textShadowColor??"#000000",b.value=String(A.textShadowBlur??4),T.value=A.textGlowColor??"#ffff00",k.value=String(A.textGlowRadius??0),S.checked=!!A.textReflection,f.checked=!!A.strikethrough,C.value=A.highlightColor??"#ffff00",y.value=A.textWarpPreset??"textNoShape",P.value=String(A.textWarpAdj??5e4);for(let I of E)I.disabled=!w.canText;}}}function Qd(e,t,n,o){let r=n(t("pptx.inspector.text")),i=xe(e,{label:t("pptx.textPanel.verticalAlign"),options:[{value:"top",label:t("pptx.textPanel.valignTop")},{value:"middle",label:t("pptx.textPanel.valignMiddle")},{value:"bottom",label:t("pptx.textPanel.valignBottom")}],onChange:o.setTextVerticalAlign});r.appendChild(i.el);let a=$(e,{label:t("pptx.textAdvanced.wrapText"),onChange:f=>o.setTextWrap(f?"square":"none")});r.appendChild(a.el);let p=xe(e,{label:t("pptx.textAdvanced.autoFit"),options:[{value:"none",label:t("pptx.textAdvanced.autoFitNone")},{value:"normal",label:t("pptx.textAdvanced.autoFitShrink")},{value:"shrink",label:t("pptx.textAdvanced.autoFitResize")}],onChange:o.setAutoFitMode});r.appendChild(p.el);let s=(f,C,y)=>Y(e,{label:f,min:y,onCommit:P=>o.setTextAdvanced({[C]:P})}),l=s(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),m=s(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),c=s(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),u=s(t("pptx.textAdvanced.spacingBefore"),"paragraphSpacingBefore",0),x=s(t("pptx.textAdvanced.spacingAfter"),"paragraphSpacingAfter",0),g=s(t("pptx.textAdvanced.indent"),"paragraphIndent"),v=s(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),h=xe(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(f=>({value:f,label:t(`pptx.textAdvanced.direction.${f}`)})),onChange:f=>o.setTextAdvanced({textDirection:f})}),b=$(e,{label:t("pptx.textAdvanced.rtl"),onChange:f=>o.setTextAdvanced({rtl:f})}),T=[l,m,c,u,x,g,v];r.append(...T.map(({el:f})=>f),h.el,b.el);let k=Zd(e,t,o);r.appendChild(k.el);let S=[i,a,p,...T,h,b];return {el:r,update(f){r.hidden=!f.hasSelection||!f.canText,i.setValue(f.vAlign),a.setValue(f.textWrap==="square"),p.setValue(f.autoFitMode),l.setValue(f.characterSpacing),m.setValue(f.lineSpacing),c.setValue(f.lineSpacingExactPt??0),u.setValue(f.paragraphSpacingBefore),x.setValue(f.paragraphSpacingAfter),g.setValue(f.paragraphIndent),v.setValue(f.paragraphMarginLeft),h.setValue(f.textDirection),b.setValue(f.textRtl),k.update(f);for(let C of S)C.setDisabled(!f.canText);}}}function ro(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,a=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let E of a){let w=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-inspector-tab");w.type="button",w.setAttribute("role","tab"),w.textContent=E.label,w.addEventListener("click",()=>u(E.id)),r.appendChild(w),i.set(E.id,w);}let p=Bd(e,t,E=>n.selectElement(E));p.el.classList.add("pptxv-inspector-body"),o.appendChild(p.el);let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-body");o.appendChild(s);let l=Md(e,t,n);l.el.classList.add("pptxv-inspector-body"),o.appendChild(l.el);let m=Sd(e,t,n);o.appendChild(m.el);let c="properties",u=E=>{c=E;for(let[w,A]of i)A.classList.toggle("is-active",w===E),A.setAttribute("aria-selected",String(w===E));p.el.hidden=E!=="elements",s.hidden=E!=="properties",l.el.hidden=E!=="comments";},x=Fd(e,t,n);s.appendChild(x.el);let g=E=>{let w=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-inspector-section"),A=chunkS5V27BHI_cjs.Ke(e,"h4","pptxv-inspector-section-title");return A.textContent=E,w.appendChild(A),s.appendChild(w),w},v=$d(e,t,g,n.setGeometry),h=zd(e,t,g,n),b=Qd(e,t,g,n),T=Gd(e,t,g,n),k=Xd(e,t,g,n),S=qd(e,t,g,n),f=ud(e,t,g,n),C=Ld(e,t,g,n),y=Wd(e,t,g,n),P=[v,h,b,T,k,S,f,C,y];return u(c),{el:o,update(E){x.setVisible(!E.hasSelection);for(let w of P)w.update(E);},updateDeck(E){p.update(E),l.update(E),x.update(E),m.update({editable:E.editable,selectedElementId:E.selectedElementId,elements:E.elements,animations:E.activeSlide?.animations??[]});},setEditable(E){o.hidden=!E;}}}var Jd=128,_x=[1,2,3,4,6,9],Ux={body:"pptx.master.notesMasterBody",sldImg:"pptx.master.notesMasterSlideImage",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function ec(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-master-card"),a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-card-label");a.textContent=t("pptx.master.notesMasterBackground");let p=chunkS5V27BHI_cjs.Ke(e,"input","pptxv-master-background");p.type="color",p.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",p.setAttribute("aria-label","Master background color"),p.addEventListener("input",()=>r(p.value)),i.append(a,p),n.appendChild(i);}function tc(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-master-card"),a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-card-label");if(a.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(a),o.length===0){let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-empty");p.textContent=t("pptx.master.noPlaceholders"),i.appendChild(p);}for(let p of o){let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-placeholder"),l=chunkS5V27BHI_cjs.Ke(e,"span",`pptxv-master-dot is-${r}`);s.append(l,e.createTextNode(t(Ux[p.type]??p.type))),i.appendChild(s);}n.appendChild(i);}function Wx(e,t){let n=t===null?void 0:e.layouts?.[t];return {id:n?.path??e.path,rId:"",slideNumber:0,elements:n?[...e.elements??[],...n.elements??[]]:e.elements??[],backgroundColor:n?.backgroundColor??e.backgroundColor,backgroundImage:n?.backgroundImage??e.backgroundImage}}function $x(e,t,n,o){let r=Jd/Math.max(o.canvasSize.width,1);for(let[i,a]of o.masters.entries()){let p=[{layoutIndex:null,label:a.name||t("pptx.master.master")},...a.layouts?.map((s,l)=>({layoutIndex:l,label:s.name||t("pptx.master.layout")}))??[]];for(let s of p){let l=chunkS5V27BHI_cjs.Ke(e,"button",`pptxv-master-thumb${s.layoutIndex===null?"":" is-layout"}`);l.type="button",l.setAttribute("aria-label",s.label);let m=o.active.masterIndex===i&&o.active.layoutIndex===s.layoutIndex;l.classList.toggle("is-active",m),m&&l.setAttribute("aria-current","page");let c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-master-thumb-name");c.textContent=s.label;let u=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-master-thumb-frame");u.style.width=`${Jd}px`,u.style.height=`${Math.round(o.canvasSize.height*r)}px`,u.appendChild(o.renderStage(Wx(a,s.layoutIndex),r)),l.append(c,u),l.addEventListener("click",()=>o.onSelect(i,s.layoutIndex)),n.appendChild(l);}}}function Hn(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-master-sidebar");return n.hidden=true,n.setAttribute("aria-label",t("pptx.view.masterViews")),{el:n,render(o){n.replaceChildren();let r=chunkS5V27BHI_cjs.Ke(e,"header","pptxv-master-header"),i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let a=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-master-collapse");a.type="button",a.textContent="\u2039",a.title=t("pptx.masterView.collapse"),a.setAttribute("aria-label",t("pptx.masterView.collapse")),a.addEventListener("click",o.onCollapse),r.append(i,a);let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-tabs");p.setAttribute("role","tablist");for(let[l,m]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let c=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-master-tab");c.type="button",c.role="tab",c.textContent=t(m),c.setAttribute("aria-selected",String(o.tab===l)),c.classList.toggle("is-active",o.tab===l),c.addEventListener("click",()=>o.onTabChange(l)),p.appendChild(c);}let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-body");if(s.setAttribute("role","tabpanel"),o.tab==="slides")$x(e,t,s,o);else if(o.tab==="notes")o.notesMasterPresent?(ec(e,t,s,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),tc(e,t,s,o.notesPlaceholders??[],"notes")):(s.textContent=t("pptx.master.noNotesMaster"),s.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)s.textContent=t("pptx.master.noHandoutMaster"),s.classList.add("pptxv-master-empty");else {let l=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-master-card"),m=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-card-label");m.textContent=t("pptx.master.handoutSlidesPerPage");let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-master-counts");for(let u of _x){let x=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-master-count");x.type="button",x.textContent=String(u),x.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===u)),x.classList.toggle("is-active",o.handoutSlidesPerPage===u),x.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(u)),c.appendChild(x);}l.append(m,c),s.appendChild(l),ec(e,t,s,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),tc(e,t,s,o.handoutPlaceholders??[],"handout");}n.append(r,p,s);},setVisible(o){n.hidden=!o;}}}function Rn(e,t,n,o,r,i){let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-actions"),p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-sheet-host");p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true");let s=e.createElement("button");s.type="button",s.className="pptxv-mobile-sheet-backdrop",s.setAttribute("aria-label",t("pptx.settings.close"));let l=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-mobile-sheet"),m=chunkS5V27BHI_cjs.Ke(e,"header","pptxv-mobile-sheet-header"),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-sheet-handle"),u=e.createElement("strong");m.append(c,u);let x=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-sheet-body");l.append(m,x),p.append(s,l),p.hidden=true,a.appendChild(p);let g=null,v=0,h=[],b=[],T=true,k=false,S=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(S,r);let f=()=>{r&&S?.parentNode&&S.parentNode.insertBefore(r,S.nextSibling);},C=()=>{g=null,p.hidden=true,l.style.transform="",f();for(let M of w.querySelectorAll("button"))M.setAttribute("aria-pressed","false");};s.addEventListener("click",C);let y=chunkS5V27BHI_cjs.Oc((M,O)=>{l.style.transform=M>0?`translateY(${M}px)`:"",l.style.transition=O?"none":"";},C),P=M=>({clientY:M.clientY,pointerId:M.pointerId,currentTarget:m});m.addEventListener("pointerdown",M=>y.pointerDown(P(M))),m.addEventListener("pointermove",M=>y.pointerMove(P(M))),m.addEventListener("pointerup",M=>y.pointerUp(P(M))),m.addEventListener("pointercancel",M=>y.cancel(P(M)));let E=M=>{if(x.replaceChildren(),u.textContent=t(M==="inspector"?"pptx.field.format":`pptx.${M==="slides"?"sections.slides":M==="comments"?"toolbar.comments":M==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),p.setAttribute("aria-label",u.textContent),M==="slides"){let O=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-slide-list");for(let L=0;L<h.length;L+=1){let R=e.createElement("button");R.type="button",R.textContent=chunkS5V27BHI_cjs.ve(h[L],L),R.classList.toggle("is-active",L===v),R.addEventListener("click",()=>{o(L),C();}),O.appendChild(R);}x.appendChild(O);}else if(M==="insert"){let O=[[t("pptx.insert.addTextBox"),()=>n.insert.insert("text")],[t("pptx.ribbon.rectangle"),()=>n.insert.insert("shape","rect")],[t("pptx.insert.insertTable"),()=>n.insert.insert("table")]];for(let[L,R]of O){let B=e.createElement("button");B.type="button",B.textContent=L,B.addEventListener("click",R),x.appendChild(B);}}else if(M==="inspector"&&r)x.appendChild(r);else if(M==="comments"){b.length===0&&(x.textContent=t("pptx.comments.noneOnSlide"));for(let B of b){let F=chunkS5V27BHI_cjs.Ke(e,"article","pptxv-mobile-comment"),V=e.createElement("textarea");V.value=B.text,V.setAttribute("aria-label",t("pptx.comments.edit"));let N=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-comment-actions"),W=e.createElement("button");W.type="button",W.textContent=t("pptx.comments.save"),W.addEventListener("click",()=>n.edit.comments.editComment(B.id,V.value));let Z=e.createElement("button");Z.type="button",Z.textContent=B.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),Z.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(B.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(B.id)),N.append(W,Z,K),F.append(V,N),x.appendChild(F);}let O=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-comment-add"),L=e.createElement("textarea");L.placeholder=t("pptx.comments.addPlaceholder"),L.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let R=e.createElement("button");R.type="button",R.textContent=t("pptx.comments.addComment"),R.addEventListener("click",()=>{n.edit.comments.addComment(L.value)&&(L.value="");}),O.append(L,R),x.appendChild(O);}else {let O=[[t("pptx.ribbon.insert"),()=>n.insert.insert("text"),null],[t("pptx.presenter.previousSlide"),n.nav.prev,"navigation"],[t("pptx.presenter.nextSlide"),n.nav.next,"navigation"],[t("pptx.statusBar.zoomOut"),n.nav.zoomOut,"zoom"],[t("pptx.statusBar.zoomIn"),n.nav.zoomIn,"zoom"],[t("pptx.notes.title"),n.nav.toggleNotes,"notes"],[t("pptx.statusBar.slideShow"),n.nav.togglePresentation,"fullscreen"]];for(let[L,R,B]of O){if(B&&chunkS5V27BHI_cjs.Pd(B,i))continue;let F=e.createElement("button");F.type="button",F.textContent=L,F.addEventListener("click",R),x.appendChild(F);}}},w=e.createElement("nav");w.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let A=M=>{if(g=chunkS5V27BHI_cjs.xc(g,M),!g){C();return}E(g),p.hidden=false;for(let O of w.querySelectorAll("button"))O.setAttribute("aria-pressed",String(O.dataset.mobileAction===g));},I={slides:"panel-left",insert:"plus",inspector:"shapes",comments:"notes",notes:"sticky-note"};for(let M of chunkS5V27BHI_cjs.yc({slideCount:0})){let O=M.key;if(O==="notes"&&chunkS5V27BHI_cjs.Pd("notes",i))continue;let L=e.createElement("button");L.type="button",L.dataset.mobileAction=O,O==="notes"&&L.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),L.appendChild(chunkS5V27BHI_cjs.Te(e,I[O]));let R=chunkS5V27BHI_cjs.Ke(e,"span");R.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"notes.title"}`),L.appendChild(R),L.addEventListener("click",()=>{if(O==="notes"){n.nav.toggleNotes();return}if(O==="insert"){n.insert.insert("text");return}A(O);}),w.appendChild(L);}a.appendChild(w);let H=()=>{let M=chunkS5V27BHI_cjs.yc({slideCount:h.length});for(let O of M){let L=w.querySelector(`button[data-mobile-action='${O.key}']`);if(!L)continue;let R=O.key==="insert"||O.key==="inspector"||O.key==="comments";L.disabled=O.disabled||R&&!T||O.key==="inspector"&&!r,L.setAttribute("aria-pressed",String(O.key==="notes"?k:O.key===g));}};return {el:a,update(M,O,L){v=M,h=O,b=L,g&&E(g),H();},toggle:A,close:C,setEditable(M){T=M,!T&&g&&["insert","inspector","comments"].includes(g)&&C(),H();},setNotesExpanded(M){k=M,H();}}}function On(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=D(e,{label:t("pptx.mobileToolbar.menu"),icon:"sidebar",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),a=chunkS5V27BHI_cjs.Pd("undo",o)?null:D(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),p=chunkS5V27BHI_cjs.Pd("redo",o)?null:D(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-toolbar-spacer"),l=D(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),m=chunkS5V27BHI_cjs.Pd("fullscreen",o)?null:D(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-toolbar-ai"),u=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...a?[a.btn]:[],...p?[p.btn]:[],s,c,l.btn,...m?[m.btn]:[],u),{el:r,collaborationHost:u,aiHost:c,setEditState({editable:x,canUndo:g,canRedo:v}){for(let h of [i.btn,a?.btn,p?.btn])h&&(h.hidden=!x);u.hidden=!x,c.hidden=!x,a?.setDisabled(!g),p?.setDisabled(!v);}}}function Fn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes"),i=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-notes-header");i.type="button",i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","slide-notes-content"),i.addEventListener("click",n),r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-notes-title");a.textContent=t("pptx.notes.title"),i.appendChild(a);let p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-notes-chevron");p.setAttribute("aria-hidden","true"),i.appendChild(p);let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes-body");s.id="slide-notes-content",r.appendChild(s);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes-toolbar");s.appendChild(l);let m=e.createElement("button");m.type="button",m.className="pptxv-notes-mode",l.appendChild(m);let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-notes-rich-editor");c.contentEditable="true",c.setAttribute("role","textbox"),c.setAttribute("aria-multiline","true"),c.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),s.appendChild(c);let u=e.createElement("textarea");u.className="pptxv-notes-textarea",u.name="slide-notes",u.spellcheck=true,u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),s.appendChild(u);let x=false,g=null,v=false,h=chunkS5V27BHI_cjs.Fa(),b=[],T=y=>{h=y,c.hidden=!h,u.hidden=h,l.hidden=!v,m.textContent=t(h?"pptx.notes.plainEditor":"pptx.notes.richEditor"),m.setAttribute("aria-pressed",String(h));},k=()=>{if(!v)return;let y=chunkS5V27BHI_cjs.Ga(c);b=y.segments,o(y.text,y.segments);},S=(y,P,E)=>{let w=e.createElement("button");w.type="button",w.className="pptxv-notes-tool",w.textContent=y,w.title=P,w.setAttribute("aria-label",P),w.addEventListener("mousedown",A=>A.preventDefault()),w.addEventListener("click",()=>{c.focus(),E(),k();}),l.insertBefore(w,m);};S("B",t("pptx.notes.bold"),()=>chunkS5V27BHI_cjs.Ia("bold")),S("I",t("pptx.notes.italic"),()=>chunkS5V27BHI_cjs.Ia("italic")),S("U",t("pptx.notes.underline"),()=>chunkS5V27BHI_cjs.Ia("underline")),S("S",t("pptx.notes.strikethrough"),()=>chunkS5V27BHI_cjs.Ia("strikeThrough")),S("\u2022",t("pptx.notes.bulletList"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"bullet").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("1.",t("pptx.notes.numberedList"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"numbered").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("\u2192",t("pptx.notes.indent"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"indent").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("\u2190",t("pptx.notes.outdent"),()=>{b=chunkS5V27BHI_cjs.Ha(c,b,"outdent").segments,c.innerHTML=chunkS5V27BHI_cjs.Da(b);}),S("\u2197",t("pptx.notes.insertLink"),()=>{let y=e.getSelection()?.toString()??"",P=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!P)return;let E=window.prompt(t("pptx.notes.linkDisplayText"),y)??y;chunkS5V27BHI_cjs.Ka(chunkS5V27BHI_cjs.Ja(P),E);}),m.addEventListener("click",()=>{h?(k(),u.value=chunkS5V27BHI_cjs.Ca(b)):(b=chunkS5V27BHI_cjs.Ba(u.value),c.innerHTML=chunkS5V27BHI_cjs.Da(b)),T(!h);});let f=()=>{v&&o(u.value);};u.addEventListener("change",f),u.addEventListener("blur",f),c.addEventListener("blur",k);let C=()=>{r.dataset.collapsed=x?"false":"true",i.setAttribute("aria-expanded",String(x)),s.hidden=!x,p.textContent=x?"\u25BE":"\u25B8";};return C(),T(h),{el:r,update({slide:y,editable:P}){v=P;let E=y!==void 0;u.disabled=!E,u.readOnly=!v,c.contentEditable=String(v&&E),l.hidden=!v,u.placeholder=t(E?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let w=y?.id??null;w!==g&&(g=w,b=chunkS5V27BHI_cjs.Ea(y),u.value=chunkS5V27BHI_cjs.Ca(b),c.innerHTML=chunkS5V27BHI_cjs.Da(b));},setExpanded(y){x=y,C();}}}function Bn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=D(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),a=!chunkS5V27BHI_cjs.Pd("navigation",o),p=a?D(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,s=a?D(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-presentation-touch-counter");l.setAttribute("aria-live","polite");for(let m of [i.btn,p?.btn,s?.btn])m?.addEventListener("pointerdown",c=>c.stopPropagation()),m?.addEventListener("click",c=>c.stopPropagation());return r.append(i.btn,...p?[p.btn]:[],...s?[s.btn]:[],l),{el:r,update(m,c){let u=chunkS5V27BHI_cjs.Nc(m,c);p?.setDisabled(u.previousDisabled),s?.setDisabled(u.nextDisabled),l.textContent=u.counterLabel;}}}function oc(e){if(!e.trim())return "";try{let t=chunkS5V27BHI_cjs.n(e),n=chunkS5V27BHI_cjs.m(t);return n?chunkS5V27BHI_cjs.La(n):""}catch{return ""}}function nc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let a=chunkS5V27BHI_cjs.Ke(e,"header","pptxv-eqdlg-header"),p=chunkS5V27BHI_cjs.Ke(e,"h2");p.textContent=t("pptx.equation.insertTitle");let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-eqdlg-close");s.type="button",s.textContent="\xD7",s.setAttribute("aria-label",t("pptx.settings.close")),a.append(p,s);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-preview"),m=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-eqdlg-field"),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-label");c.textContent=t("pptx.equation.latexInput");let u=e.createElement("textarea");u.className="pptxv-eqdlg-input",u.rows=3,u.placeholder="\\frac{a}{b} + \\sqrt{c}",u.spellcheck=false;let x=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-hint");x.textContent=t("pptx.equation.latexHint"),m.append(c,u,x);let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-field"),v=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-label");v.textContent=t("pptx.equation.templates");let h=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-eqdlg-grid"),b=[];for(let I of chunkS5V27BHI_cjs.p){let H=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-eqdlg-template");H.type="button",H.title=t(I.i18nKey);let M=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-template-math");M.innerHTML=oc(I.latex);let O=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-eqdlg-template-label");O.textContent=t(I.i18nKey),H.append(M,O),H.addEventListener("click",()=>{u.value=I.latex,P(),u.focus();}),h.appendChild(H),b.push(H);}g.append(v,h);let T=()=>{let I=u.value.trim();if(!I)return null;try{let H=chunkS5V27BHI_cjs.n(I);return Object.keys(H).length>0?H:null}catch{return null}},k=true,S,f=chunkS5V27BHI_cjs.Ke(e,"footer","pptxv-eqdlg-footer"),C=D(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>w(false)}),y=D(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let I=T();I&&(n(I,S),u.value="",P(),w(false));}});y.btn.classList.add("is-primary"),f.append(C.btn,y.btn),i.append(a,l,m,g,f),o.append(r,i);let P=()=>{let I=oc(u.value);I?(l.classList.remove("is-empty"),l.innerHTML=I):(l.classList.add("is-empty"),l.textContent=t("pptx.equation.previewPlaceholder"));let H=u.value;for(let[M,O]of b.entries())O.classList.toggle("is-active",chunkS5V27BHI_cjs.p[M]?.latex===H);y.setDisabled(!k||T()===null);};u.addEventListener("input",P),o.addEventListener("keydown",I=>{I.stopPropagation(),I.key==="Escape"?w(false):I.key==="Enter"&&(I.ctrlKey||I.metaKey)&&(I.preventDefault(),y.btn.click());}),r.addEventListener("click",()=>w(false)),s.addEventListener("click",()=>w(false));let E=false,w=I=>{E=I,o.hidden=!E,E?u.focus():S=void 0;},A=()=>{let I=S!==void 0,H=t(I?"pptx.equation.editTitle":"pptx.equation.insertTitle"),M=t(I?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",H),p.textContent=H,y.btn.textContent=M,y.btn.title=M,y.btn.setAttribute("aria-label",M);};return P(),{el:o,toggle:()=>{E||(S=void 0,u.value="",A(),P()),w(!E);},setOpen:w,isOpen:()=>E,setEditable(I){k=I,u.disabled=!I,y.setDisabled(!I||T()===null);},openEdit(I,H){S=I,u.value=chunkS5V27BHI_cjs.o(H),A(),P(),w(true);}}}function Vn(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-findreplace");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.findReplace.ariaLabel"));let r=e.createElement("input");r.type="text",r.className="pptxv-findreplace-input",r.placeholder=t("pptx.findReplace.findPlaceholder"),r.setAttribute("aria-label",t("pptx.findReplace.searchText"));let i=e.createElement("input");i.type="text",i.className="pptxv-findreplace-input",i.placeholder=t("pptx.findReplace.replacePlaceholder"),i.setAttribute("aria-label",t("pptx.findReplace.replacementText"));let a=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-findreplace-checkbox"),p=e.createElement("input");p.type="checkbox",p.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),a.append(p,e.createTextNode(t("pptx.findReplace.matchCase")));let s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-findreplace-status");s.setAttribute("aria-live","polite");let l=()=>{let b=n.search(r.value,p.checked);s.textContent=b>0?t("pptx.findReplace.matchCount",{current:1,total:b}):t("pptx.findReplace.noMatches");},m=D(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:l}),c=D(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,p.checked),l();}}),u=D(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,p.checked),l();}}),x=D(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>h(false)});r.addEventListener("input",l),r.addEventListener("keydown",b=>{b.stopPropagation(),b.key==="Escape"&&h(false);}),i.addEventListener("keydown",b=>b.stopPropagation());let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-findreplace-row");g.append(r,i,a,m.btn,c.btn,u.btn,x.btn),o.append(g,s);let v=false,h=b=>{v=b,o.hidden=!v,v&&r.focus();};return {el:o,toggle:()=>h(!v),setOpen:h,isOpen:()=>v,setEditable(b){i.disabled=!b,c.setDisabled(!b),u.setDisabled(!b);}}}function rc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=Fe(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:c=>n.setSlideBackgroundColor(c)},"#ffffff"),i=D(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),a=D(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>m(false)}),p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-format-background-row"),s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-format-background-label");s.textContent=t("pptx.slideBackground.colour"),p.append(s,r.el,i.btn,a.btn),o.appendChild(p);let l=false,m=c=>{l=c,o.hidden=!l;};return {el:o,toggle:()=>m(!l),setOpen:m,isOpen:()=>l,setEditable(c){r.setDisabled(!c),i.setDisabled(!c);}}}var qx=24,Kx=1,jx=400;function pe(e){return e!==void 0&&chunkEWJAZ6TW_cjs.j(e)}function io(e){return e!==void 0&&chunkEWJAZ6TW_cjs.k(e)}function Ee(e){let t=pe(e)?e.textStyle:void 0,n=pe(e)?e.textSegments?.find(o=>o.text)?.style:void 0;return {bold:!!(t?.bold??n?.bold),italic:!!(t?.italic??n?.italic),underline:!!(t?.underline??n?.underline),strikethrough:!!(t?.strikethrough??n?.strikethrough),hasTextShadow:!!(t?.textShadowColor??n?.textShadowColor),fontSize:t?.fontSize??n?.fontSize??qx,fontFamily:t?.fontFamily??n?.fontFamily,color:t?.color??n?.color,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:t?.listType??n?.listType,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function Le(e,t){if(!pe(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function je(e,t){let n=Ee(e);return Le(e,{[t]:!n[t]})}function ao(e,t){let n=Math.min(jx,Math.max(Kx,Math.round(t)));return Le(e,{fontSize:n})}function Nn(e,t){return ao(e,Ee(e).fontSize+t)}function zn(e,t){return Le(e,{color:t})}function Gn(e,t){return Le(e,{highlightColor:t})}function Te(e,t){return io(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function _n(e,t){return Le(e,{fontFamily:t})}function Un(e,t){return Le(e,{characterSpacing:t})}var Yx={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function Wn(e){let t=Ee(e).hasTextShadow;return Le(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:Yx)}function $n(e,t){if(!pe(e)||!e.textSegments)return {};let n=chunkS5V27BHI_cjs.Va(e.textSegments,null,t);return {textSegments:n,text:n.map(o=>o.text).join("")}}function qn(e){return Le(e,{bold:false,italic:false,underline:false,strikethrough:false,highlightColor:void 0,textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0,characterSpacing:void 0})}var Xx=[{edge:"left",icon:"align-left"},{edge:"centerH",icon:"align-center"},{edge:"right",icon:"align-right"},{edge:"top",icon:"align-top"},{edge:"middle",icon:"align-middle"},{edge:"bottom",icon:"align-bottom"}];function ic(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.arrange"),o.appendChild(i);let a=D(e,{label:t("pptx.arrange.bringToFront"),icon:"bring-front",onClick:n.bringToFront}),p=D(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),s=D(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),l=D(e,{label:t("pptx.arrange.sendToBack"),icon:"send-back",onClick:n.sendToBack}),m=Xx.map(k=>D(e,{label:t("pptx.arrange.align",{direction:k.edge}),icon:k.icon,onClick:()=>n.alignElements(k.edge)})),c=D(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),u=D(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),x=D(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),g=D(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),v=D(e,{label:t("pptx.ribbon.group"),icon:"group",onClick:n.groupSelected}),h=D(e,{label:t("pptx.ribbon.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),b=D(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",onClick:n.duplicate}),T=D(e,{label:t("pptx.arrange.delete"),icon:"trash",onClick:n.delete});return r.append(a.btn,p.btn,s.btn,l.btn,...m.map(k=>k.btn),c.btn,u.btn,x.btn,g.btn,v.btn,h.btn,b.btn,T.btn),{el:o,update({editable:k,hasSelection:S,isGroup:f,selectedCount:C}){let y=k&&S;for(let P of [a,p,s,l,...m,x,g,b,T])P.setDisabled(!y);c.setDisabled(!k||C<3),u.setDisabled(!k||C<3),v.setDisabled(!k||C<2),h.setDisabled(!y||!f);}}}function ac(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let a=D(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),p=D(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),s=D(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),l=D(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return l.btn.dataset.testid="format-painter-toggle",r.append(a.btn,p.btn,s.btn,l.btn),{el:o,update({hasSelection:m,hasClipboard:c,editable:u,formatPainterActive:x}){a.setDisabled(!u||!c),p.setDisabled(!u||!m),s.setDisabled(!m),l.setDisabled(!u||!m&&!x),l.btn.dataset.active=String(x);}}}function pc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let a=D(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),p=D(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace});return r.append(a.btn,p.btn),{el:o}}function J(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-dropdown"),o=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-dropdown-trigger");o.type="button",o.title=t.triggerLabel,o.setAttribute("aria-label",t.triggerLabel),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false");let r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunkS5V27BHI_cjs.Te(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let a=false,p,s=new Map,l=c=>{a=c,i.hidden=!c,o.setAttribute("aria-expanded",String(c)),o.classList.toggle("is-active",c);},m=()=>{for(let[c,u]of s){let x=p!==void 0&&u===p;c.classList.toggle("is-selected",x),c.setAttribute("aria-selected",String(x));}};for(let c of t.items){let u=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-dropdown-item");u.type="button",u.setAttribute("role","option"),u.setAttribute("aria-selected","false"),u.textContent=c.label,c.style&&Object.assign(u.style,c.style),u.addEventListener("click",()=>{l(false),t.onSelect(c.value);}),i.appendChild(u),s.set(u,c.value);}return o.addEventListener("click",c=>{c.stopPropagation(),l(!a);}),e.addEventListener("pointerdown",c=>{a&&!n.contains(c.target)&&l(false);}),{el:n,setDisabled(c){o.disabled=c,c&&l(false);},setTriggerText(c){r.textContent=c;},setSelected(c){p=c,m();},close:()=>l(false)}}var Ye=["#000000","#ffffff","#ff0000","#00aa00","#0000ff","#ff8800","#8800cc","#00cccc","#ff69b4","#808080"];function Zx(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Xe(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-swatch-picker"),r=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-dropdown-trigger pptxv-swatch-trigger");r.type="button",r.title=n.label,r.setAttribute("aria-label",n.label),r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(chunkS5V27BHI_cjs.Te(e,n.icon));let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-swatch-menu");a.hidden=true,o.appendChild(a);let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-swatch-grid");a.appendChild(p);let s=n.fallback,l=new Map,m=()=>{for(let[v,h]of l)v.classList.toggle("is-selected",h===s);i.style.backgroundColor=s;},c=false,u=v=>{c=v,a.hidden=!v,r.setAttribute("aria-expanded",String(v)),r.classList.toggle("is-active",v);};for(let v of n.swatches){let h=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-swatch");h.type="button",h.setAttribute("data-pptx-compact",""),h.style.backgroundColor=v,h.setAttribute("aria-label",v),h.addEventListener("click",()=>{u(false),n.onSelect(v);}),p.appendChild(h),l.set(h,v);}let x=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-swatch-custom");x.textContent=t("pptx.ribbon.customColour");let g=e.createElement("input");return g.type="color",g.className="pptxv-swatch-custom-input",g.addEventListener("input",()=>n.onSelect(g.value)),x.appendChild(g),a.appendChild(x),r.addEventListener("click",v=>{v.stopPropagation(),u(!c);}),e.addEventListener("pointerdown",v=>{c&&!o.contains(v.target)&&u(false);}),m(),{el:o,setValue(v){s=Zx(v,n.fallback),g.value=s,m();},setDisabled(v){r.disabled=v,v&&u(false);}}}var sc=2;function lc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let a=J(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:chunkS5V27BHI_cjs.$c.map(C=>({label:C,value:C,style:{fontFamily:C}})),onSelect:n.setFontFamily});a.el.classList.add("pptxv-font-family-dd");let p=J(e,{triggerLabel:t("pptx.textPanel.size"),triggerText:"24",items:chunkS5V27BHI_cjs.ad.map(C=>({label:String(C),value:C})),onSelect:n.setFontSize});p.el.classList.add("pptxv-font-size-dd");let s=D(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),l=D(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),m=D(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),c=D(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),u=D(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),x=D(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-sc)}),g=D(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(sc)}),v=D(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),h=J(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunkS5V27BHI_cjs.bd.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.setCharacterSpacing});h.el.querySelector(".pptxv-dropdown-text")?.remove();let b=J(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunkS5V27BHI_cjs.dd.map(C=>({label:t(C.i18nKey),value:C.value})),onSelect:n.changeCase});b.el.querySelector(".pptxv-dropdown-text")?.remove();let T=Xe(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:Ye,fallback:"#000000",onSelect:n.setTextColor}),k=Xe(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:Ye,fallback:"#ffff00",onSelect:n.setHighlightColor});r.append(a.el,p.el,x.btn,g.btn,s.btn,l.btn,m.btn,c.btn,u.btn,v.btn,h.el,b.el,T.el,k.el);let S=[s,l,m,c],f=[a,p,x,g,s,l,m,c,u,v,h,b,T,k];return {el:o,update({canFormat:C,editable:y,text:P}){s.setActive(P.bold),l.setActive(P.italic),m.setActive(P.underline),c.setActive(P.strikethrough),u.setActive(P.hasTextShadow),a.setTriggerText(P.fontFamily??"Segoe UI"),a.setSelected(P.fontFamily),p.setTriggerText(String(P.fontSize)),p.setSelected(P.fontSize),T.setValue(P.color),k.setValue(P.highlightColor);for(let E of f)E.setDisabled(!y||!C);for(let E of S)(!y||!C)&&E.setActive(false);}}}var dc=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify"}];function cc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.paragraph"),o.appendChild(i);let a=D(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),p=D(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList}),s=D(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),l=D(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),m=dc.map(x=>D(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTextAlign(x.align)})),c=J(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunkS5V27BHI_cjs.cd.map(x=>({label:x.label,value:x.value})),onSelect:n.setLineSpacing});c.el.querySelector(".pptxv-dropdown-text")?.remove(),r.append(a.btn,p.btn,s.btn,l.btn,...m.map(x=>x.btn),c.el);let u=[a,p,s,l,...m,c];return {el:o,update({canFormat:x,editable:g,text:v}){a.setActive(v.listType==="bullet"),p.setActive(v.listType==="numbered");for(let[h,b]of dc.entries())m[h].setActive(v.align===b.align);c.setSelected(v.lineSpacing);for(let h of u)h.setDisabled(!g||!x);}}}function mc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu pptxv-layout-menu");o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=a=>{r=a,o.hidden=!a;};return e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);}),{el:o,setItems(a){o.replaceChildren();for(let p of a){let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-primary-menu-item");s.type="button",s.setAttribute("role","menuitem"),s.textContent=p.name,s.addEventListener("click",()=>{i(false),n(p);}),o.appendChild(s);}},toggle:()=>i(!r),close:()=>i(false)}}function uc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-slides-split"),p=D(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-slides-caret");s.type="button",s.title=t("pptx.home.chooseLayout"),s.setAttribute("aria-label",t("pptx.home.chooseLayout")),s.setAttribute("aria-haspopup","menu"),s.appendChild(chunkS5V27BHI_cjs.Te(e,"chevron-down"));let l=mc(e,t("pptx.home.chooseLayout"),v=>n.insertSlideFromLayout(v.path,v.name));s.addEventListener("click",v=>{v.stopPropagation(),l.toggle();}),a.append(p.btn,s,l.el);let m=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-slides-menu-host"),c=D(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>u.toggle()});c.btn.setAttribute("aria-haspopup","menu");let u=mc(e,t("pptx.master.layout"),v=>n.applyLayout(v.path));m.append(c.btn,u.el);let x=D(e,{label:t("pptx.sections.resetSlideTitle"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide}),g=D(e,{label:t("pptx.sections.addSection"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return r.append(a,m,x.btn,g.btn),{el:o,update({editable:v,slideCount:h,layouts:b}){let T=b.length>0;l.setItems(b),u.setItems(b),p.setDisabled(!v),s.hidden=!T,s.disabled=!v,c.setDisabled(!v||!T),x.setDisabled(!v||h===0),g.setDisabled(!v||h===0),v||(l.close(),u.close());}}}function xc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=ac(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=uc(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName"))}),p=lc(e,t,{toggleBold:r.toggleBold,toggleItalic:r.toggleItalic,toggleUnderline:r.toggleUnderline,toggleStrikethrough:r.toggleStrikethrough,toggleTextShadow:r.toggleTextShadow,setFontFamily:r.setFontFamily,setFontSize:r.setFontSize,changeFontSize:r.changeFontSize,setTextColor:r.setTextColor,setHighlightColor:r.setHighlightColor,setCharacterSpacing:r.setCharacterSpacing,changeCase:r.changeCase,clearFormatting:r.clearFormatting}),s=cc(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing}),l=ic(e,t,{bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,alignElements:r.alignElements,distributeElements:r.distributeElements,flipHorizontal:r.flipHorizontal,flipVertical:r.flipVertical,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,duplicate:r.duplicateSelected,delete:r.deleteSelected}),m=pc(e,t,{toggleFindReplace:n.onToggleFindReplace});return o.append(i.el,a.el,p.el,s.el,m.el,l.el),{el:o,update({editable:c,selectedElement:u,hasClipboard:x,slideCount:g,selectedCount:v,formatPainterActive:h,layouts:b}){let T=pe(u),k=Ee(u);i.update({hasSelection:u!==void 0,hasClipboard:x,editable:c,formatPainterActive:h}),a.update({editable:c,slideCount:g,layouts:b}),p.update({canFormat:T,editable:c,text:k}),s.update({canFormat:T,editable:c,text:k}),l.update({editable:c,hasSelection:u!==void 0,isGroup:u?.type==="group",selectedCount:v});}}}function Kn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,a=p=>{i=p,r.hidden=!p,o?.(p);};for(let p of n){p.separatorBefore&&r.appendChild(chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu-sep"));let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-primary-menu-item");s.type="button",s.setAttribute("role","menuitem"),s.textContent=p.label,s.addEventListener("click",()=>{a(false),p.run();}),r.appendChild(s);}return e.addEventListener("pointerdown",p=>{i&&!r.parentElement?.contains(p.target)&&a(false);}),{el:r,toggle:()=>a(!i),close:()=>a(false),isOpen:()=>i}}function gc(e,t,n){let{slideShow:o}=t,r=[{label:e("pptx.toolbar.present"),run:()=>o.startFromCurrent()},{label:e("pptx.slideShow.presenterView"),run:()=>o.openPresenterView()},{label:e("pptx.slideShow.rehearseTimings"),run:()=>o.startRehearsal()},{label:e("pptx.slideShow.setUp"),run:()=>o.openSetUp(),separatorBefore:true}];return chunkS5V27BHI_cjs.Pd("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function bc(e,t,n){let{file:o,nav:r}=t,i=[];return chunkS5V27BHI_cjs.Pd("export",n)||i.push({label:e("pptx.ribbon.exportPng"),run:()=>o.exportPng()},{label:e("pptx.ribbon.exportPdf"),run:()=>o.exportPdf()},{label:e("pptx.ribbon.exportVideo"),run:()=>o.exportVideo()},{label:e("pptx.ribbon.exportGif"),run:()=>o.exportGif()},{label:e("pptx.file.packageTooltip"),run:()=>o.packageForSharing()},{label:e("pptx.file.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()}),i.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true},{label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage()},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true},{label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")},{label:e("pptx.ribbon.versionHistory"),run:()=>o.openVersionHistory(),separatorBefore:true},{label:e("pptx.ribbon.documentProperties"),run:()=>o.openDocumentProperties(),separatorBefore:true},{label:e("pptx.security.protectPresentation"),run:()=>o.openPasswordProtection()},{label:e("pptx.ribbon.embedFonts"),run:()=>o.openFontEmbedding()},{label:e("pptx.viewer.digitalSignatures"),run:()=>o.openDigitalSignatures()}),i}function fc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-primary"),i=D(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-present-split"),p=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-present-main");p.type="button",p.title=t("pptx.present.presentTooltip"),p.textContent=t("pptx.toolbar.present"),p.addEventListener("click",()=>n.slideShow.startFromCurrent());let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-present-caret");s.type="button",s.title=t("pptx.present.optionsTooltip"),s.setAttribute("aria-label",t("pptx.present.optionsTooltip")),s.setAttribute("aria-haspopup","menu"),s.appendChild(chunkS5V27BHI_cjs.Te(e,"chevron-down"));let l=Kn(e,t("pptx.present.optionsTooltip"),gc(t,n,o),h=>{s.classList.toggle("is-active",h),s.setAttribute("aria-expanded",String(h));});s.addEventListener("click",h=>{h.stopPropagation(),l.toggle();}),a.append(p,s,l.el),r.appendChild(a);let m=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-show-btn");m.type="button",m.title=t("pptx.customShows.createTooltip"),m.textContent="+ Show",m.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(m),r.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-primary-sep"));let c=D(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(c.btn);let u=D(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()});r.appendChild(u.btn);let x=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-primary-menu-host"),g=Kn(e,t("pptx.ribbon.moreActions"),bc(t,n,o)),v=D(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>g.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",h=>h.stopPropagation()),x.append(v.btn,g.el),r.appendChild(x),{el:r,setEditState({editable:h}){r.hidden=!h,h||(l.close(),g.close());},setAutosaveStatus(){},setInspectorOpen(h){c.setActive(h);}}}var dt=[{id:"file",labelKey:"pptx.ribbon.tab.file"},{id:"home",labelKey:"pptx.ribbon.tab.home"},{id:"insert",labelKey:"pptx.ribbon.tab.insert"},{id:"draw",labelKey:"pptx.ribbon.tab.draw"},{id:"design",labelKey:"pptx.ribbon.tab.design"},{id:"transitions",labelKey:"pptx.ribbon.tab.transitions"},{id:"animations",labelKey:"pptx.ribbon.tab.animations"},{id:"slideShow",labelKey:"pptx.ribbon.tab.slideShow"},{id:"record",labelKey:"pptx.ribbon.tab.record"},{id:"review",labelKey:"pptx.ribbon.tab.review"},{id:"view",labelKey:"pptx.ribbon.tab.view"},{id:"help",labelKey:"pptx.ribbon.tab.help"}],po="home";function jn(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let a=new Map,p=new Map;for(let s of chunkS5V27BHI_cjs.Qd(dt,o)){let l=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-ribbon-tab");s.id==="file"&&l.classList.add("pptxv-ribbon-tab-file"),l.type="button",l.setAttribute("role","tab");let m=t(s.labelKey);l.textContent=m,l.addEventListener("click",()=>n(s.id)),i.appendChild(l),a.set(s.id,l),p.set(s.id,m);}if(r){i.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-tabrow-spacer"));let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-tabrow-actions");if(!chunkS5V27BHI_cjs.Pd("record",o)){let l=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-tabrow-record");l.type="button",l.title=t("pptx.titleBar.record"),l.setAttribute("aria-label",t("pptx.titleBar.record"));let m=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-tabrow-record-dot");m.setAttribute("aria-hidden","true");let c=chunkS5V27BHI_cjs.Ke(e,"span");c.textContent=t("pptx.titleBar.record"),l.append(m,c),l.addEventListener("click",()=>r.startRecording()),s.appendChild(l);}i.appendChild(s);}return {el:i,setActive(s){for(let[l,m]of a){let c=l===s;m.classList.toggle("is-active",c),m.setAttribute("aria-selected",String(c));}},setHiddenTabs(s){for(let[l,m]of a)m.hidden=l!=="file"&&s.has(l);},applyScreenTips(s){for(let[l,m]of a){let c=s(p.get(l)??"");c?m.title=c:m.removeAttribute("title");}}}}function ct(e,t,n){let o=e.createElement("label");o.textContent=t;let r=e.createElement("input");return r.type="number",r.min="0",r.max="10000",r.step="100",r.value=String(n),o.appendChild(r),{label:o,input:r}}function mt(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");for(let a of o){let p=e.createElement("option");p.value=a,p.textContent=t(`${n}.${a}`),i.appendChild(p);}return r.appendChild(i),{label:r,select:i}}function vc(e,t,n,o,r,i,a,p){let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timeline-row");s.draggable=a,s.addEventListener("dragstart",x=>x.dataTransfer?.setData("text/plain",n.elementId)),s.addEventListener("dragover",x=>x.preventDefault()),s.addEventListener("drop",x=>{x.preventDefault();let g=x.dataTransfer?.getData("text/plain");g&&p.moveAnimation(g,o);}),s.classList.toggle("is-selected",n.elementId===i);let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-animation-timeline-name"),m=n.entrance??n.emphasis??n.exit??"custom";l.textContent=`${o+1}. ${m}`;let c=D(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>p.reorderAnimation(n.elementId,"up")}),u=D(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>p.reorderAnimation(n.elementId,"down")});return c.setDisabled(!a||o===0),u.setDisabled(!a||o===r-1),s.append(l,c.btn,u.btn),s}var Qx=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunkS5V27BHI_cjs.r},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunkS5V27BHI_cjs.t},{group:"exit",labelKey:"pptx.animation.exit",presets:chunkS5V27BHI_cjs.s}];function hc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=[];for(let y of Qx){let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),E=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");E.textContent=t(y.labelKey),P.appendChild(E);let w=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-gallery");for(let A of y.presets){let I=D(e,{label:t(`pptx.animation.preset.${A}`),text:t(`pptx.animation.preset.${A}`),onClick:()=>n.addAnimation(y.group,A)});w.appendChild(I.btn),r.push(I);}P.appendChild(w),o.appendChild(P);}let i=D(e,{label:t("pptx.animation.remove"),text:t("pptx.animation.remove"),onClick:()=>n.removeAnimation()});o.appendChild(i.btn),r.push(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timeline"),p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");p.textContent=t("pptx.animation.timeline");let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timeline-list"),l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-animation-timing-controls"),m=e.createElement("select");m.setAttribute("aria-label",t("pptx.animation.trigger"));let c=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let y of c){let P=e.createElement("option");P.value=y,P.textContent=t(`pptx.animation.trigger.${y}`),m.appendChild(P);}let u=ct(e,t("pptx.animation.duration"),500),x=ct(e,t("pptx.animation.delay"),0),g=mt(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),v=mt(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),h=mt(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),b=mt(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),T=ct(e,t("pptx.animation.repeatCount"),1),k=ct(e,t("pptx.animations.triggerShape"),0);k.input.type="text",k.input.min="",k.input.max="";let S=D(e,{label:t("pptx.animation.preview"),text:t("pptx.animation.preview"),onClick:()=>{if(!f)return;e.querySelector(`[data-element-id="${CSS.escape(f.elementId)}"]`)?.animate([{opacity:0,transform:"translateY(12px)"},{opacity:1,transform:"translateY(0)"}],{duration:f.durationMs??500,easing:"ease"});}});l.append(m,u.label,x.label,g.label,v.label,h.label,T.label,b.label,k.label,S.btn),a.append(p,s,l),o.appendChild(a);let f,C=()=>{f&&n.setAnimationTiming(f.elementId,{trigger:m.value,durationMs:u.input.valueAsNumber,delayMs:x.input.valueAsNumber,direction:g.select.value,sequence:v.select.value,timingCurve:h.select.value,repeatCount:T.input.valueAsNumber,repeatMode:b.select.value,triggerShapeId:k.input.value});};for(let y of [m,g.select,v.select,h.select,b.select])y.addEventListener("change",C);return u.input.addEventListener("change",C),x.input.addEventListener("change",C),T.input.addEventListener("change",C),k.input.addEventListener("change",C),{el:o,update({editable:y,hasSelection:P,selectedElementId:E,animations:w}){let A=!y||!P;for(let H of r)H.setDisabled(A);let I=[...w].sort((H,M)=>(H.order??0)-(M.order??0));f=I.find(({elementId:H})=>H===E),s.replaceChildren(...I.map((H,M)=>vc(e,t,H,M,I.length,E,y,n))),a.hidden=I.length===0,l.hidden=!f,m.value=f?.trigger??"onClick",k.input.value=f?.triggerShapeId??"",k.label.hidden=m.value!=="onShapeClick",u.input.value=String(f?.durationMs??500),x.input.value=String(f?.delayMs??0),g.select.value=f?.direction??"fromTop",v.select.value=f?.sequence??"asOne",h.select.value=f?.timingCurve??"ease",b.select.value=f?.repeatMode??"none",T.input.value=String(f?.repeatCount??1);for(let H of [m,u.input,x.input,g.select,v.select,h.select,b.select,T.input,k.input])H.disabled=!y;}}}var Jx=[{labelKey:"pptx.ribbon.theme.default",theme:void 0},{labelKey:"pptx.ribbon.theme.light",theme:chunkS5V27BHI_cjs.e},{labelKey:"pptx.ribbon.theme.dark",theme:chunkS5V27BHI_cjs.f}];function yc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-theme-gallery");for(let l of Jx){let m=D(e,{label:t(l.labelKey),text:t(l.labelKey),onClick:()=>n.setTheme(l.theme)}),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-theme-swatch-preview");c.style.background=l.theme?.colors?.primary??"#6b7280",m.btn.prepend(c),i.appendChild(m.btn);}r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-theme-gallery pptxv-deck-theme-gallery"),p=chunkEWJAZ6TW_cjs.m.map(l=>{let m=D(e,{label:l.name,text:l.name,onClick:()=>n.applyPresentationTheme(l.id)}),c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-theme-swatch-preview");return c.style.background=`linear-gradient(135deg, ${l.colorScheme.accent1}, ${l.colorScheme.accent2})`,m.btn.prepend(c),a.appendChild(m.btn),m});r.appendChild(a);let s=D(e,{label:t("pptx.ribbon.formatBackground"),text:t("pptx.ribbon.formatBackground"),onClick:o});return r.appendChild(s.btn),{el:r,setEditable(l){s.setDisabled(!l);for(let m of p)m.setDisabled(!l);}}}var eg=[1,2,3,4,6,8,12,16],Sc=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser"}];function Cc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-rgroup-label");a.textContent=t("pptx.ribbon.draw"),r.appendChild(a);let p=Sc.map(x=>D(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTool(x.tool)}));i.append(...p.map(x=>x.btn)),o.appendChild(r);let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup"),l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rgroup-row");s.appendChild(l);let m=Xe(e,t,{label:t("pptx.ribbon.penColour"),icon:"pen",swatches:Ye,fallback:"#000000",onSelect:x=>n.setColor(x)}),c=J(e,{triggerLabel:t("pptx.ribbon.strokeWidth"),triggerText:"",icon:"chevron-down",items:eg.map(x=>({label:`${x} px`,value:x})),onSelect:x=>n.setWidth(x)});l.append(m.el,c.el),o.appendChild(s);let u=[...p,m,c];return {el:o,setEditable(x){for(let g of u)g.setDisabled(!x);},update(x){for(let[g,v]of Sc.entries())p[g].setActive(x.tool===v.tool);m.setValue(x.color),c.setSelected(x.width),c.setTriggerText(`${x.width} px`);}}}var wc="1.2.0";function Ec(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-account");n.appendChild(r);let i={...chunkS5V27BHI_cjs.Id,...chunkS5V27BHI_cjs.Gd().profile};r.appendChild(og(e,t,i,p=>{i=p,chunkS5V27BHI_cjs.Nd(i);}));let a=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section");r.appendChild(a),ng(e,t,a),r.appendChild(rg(e,t)),o?.enabled&&r.appendChild(ig(e,t,o));}function og(e,t,n,o){let r=n,i=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section"),a=e.createElement("h2");a.textContent=t("pptx.account.profile.title"),i.appendChild(a);let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-account-profile-row"),s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-account-avatar"),l=()=>{s.textContent=chunkS5V27BHI_cjs.Kd(r),s.style.background=r.avatarColor;};l();let m=e.createElement("label");m.className="pptxv-account-name-field";let c=e.createElement("span");c.textContent=t("pptx.account.profile.nameLabel");let u=e.createElement("input");u.type="text",u.placeholder=t("pptx.account.profile.namePlaceholder"),u.value=r.displayName,u.addEventListener("input",()=>{r={...r,displayName:u.value},l(),o(r);}),m.append(c,u),p.append(s,m),i.appendChild(p);let x=e.createElement("p");x.className="pptxv-account-swatch-label",x.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(x);let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-parity-swatch-row"),v=(h,b)=>{r={...r,avatarColor:b},l();for(let T of g.querySelectorAll("button"))T.classList.toggle("is-active",T===h);o(r);};for(let h of chunkS5V27BHI_cjs.Jd){let b=e.createElement("button");b.type="button",b.className="pptxv-account-color-swatch",b.classList.toggle("is-active",h===r.avatarColor),b.style.background=h,b.setAttribute("aria-label",h),b.addEventListener("click",()=>v(b,h)),g.appendChild(b);}return i.appendChild(g),i}function ng(e,t,n){let o=e.createElement("h2");o.textContent=t("pptx.account.storage.title"),n.appendChild(o);let r=e.createElement("p");n.appendChild(r);let i=e.createElement("p");i.className="pptxv-account-privacy",i.textContent=t("pptx.account.storage.privacyBlurb"),n.appendChild(i);let a=e.createElement("button");a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.storage.clear"),n.appendChild(a);let p=e.createElement("p");p.className="pptxv-account-notice",p.hidden=true,n.appendChild(p);async function s(){let l=await chunkS5V27BHI_cjs.Ld();r.textContent=l.presentationCount>0?t("pptx.account.storage.usage",{count:l.presentationCount,size:chunkS5V27BHI_cjs.qd(l.totalBytes)}):t("pptx.account.storage.usageEmpty");}s(),a.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunkS5V27BHI_cjs.Md(),p.hidden=false,p.textContent=t("pptx.account.storage.clearedNotice"),await s()))();});}function rg(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section"),o=e.createElement("h2");o.textContent=t("pptx.account.about.title"),n.appendChild(o);let r=e.createElement("p");r.textContent="pptx-vanilla-viewer",n.appendChild(r);let i=e.createElement("p");return i.className="pptxv-account-privacy",i.textContent=t("pptx.account.about.version",{version:wc}),n.appendChild(i),n}function ig(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-account-section"),r=e.createElement("h2");r.textContent=t("pptx.account.signIn.title"),o.appendChild(r);let i=e.createElement("p");if(i.textContent=t("pptx.account.signIn.description"),o.appendChild(i),n.signedInUser){let p=e.createElement("p");return p.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(p),o}let a=e.createElement("button");return a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.signIn.button"),a.addEventListener("click",()=>n.onSignIn()),o.appendChild(a),o}var hg={back:lucide.ArrowLeft,home:lucide.Home,new:lucide.FilePlus2,open:lucide.FolderOpen,info:lucide.Info,save:lucide.Save,saveAs:lucide.Download,print:lucide.Printer,share:lucide.Share2,export:lucide.Upload,close:lucide.X,account:lucide.UserRound,options:lucide.Settings},Tc="http://www.w3.org/2000/svg";function Pc(e,t){return ut(e,hg[t],17)}function ut(e,t,n){let o=e.createElementNS(Tc,"svg");for(let[r,i]of Object.entries({viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor","stroke-width":1.7,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))o.setAttribute(r,String(i));for(let[r,i]of t){let a=e.createElementNS(Tc,r);for(let[p,s]of Object.entries(i))s!==void 0&&a.setAttribute(p,String(s));o.appendChild(a);}return o}function De(e,t,n,o){let r=e.createElement("button");return r.type="button",r.textContent=t,o&&(r.className=o),r.addEventListener("click",n),r}function Yn(e,t,n,o){let r=De(e,"",n,o);return r.appendChild(Pc(e,t)),r}function Ac(e,t,n,o){let r=Yn(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}function Lc(e,t,n,o,r,i){let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-bs-actions"),p=(s,l,m,c)=>{let u=De(e,"",()=>r(c)),x=e.createElement("b");x.appendChild(ut(e,m,22));let g=e.createElement("span"),v=e.createElement("strong");v.textContent=s;let h=e.createElement("small");return h.textContent=l,g.append(v,h),u.append(x,g),u};return t==="saveAs"&&(a.append(p("PowerPoint Presentation","Save an editable .pptx copy.",lucide.FileText,n.save),p("PowerPoint Show","Save a .ppsx slide show.",lucide.Presentation,n.saveAsPpsx),p("Package for Sharing","Bundle the deck and linked assets.",lucide.Package,n.packageForSharing)),o&&a.append(p("Macro-Enabled Presentation","Preserve VBA in a .pptm file.",lucide.FileCode2,n.saveAsPptm))),t==="export"&&!chunkS5V27BHI_cjs.Pd("export",i)&&a.append(p("Create PDF","Publish one page per slide.",lucide.FileText,n.exportPdf),p("Export current slide","Create a high-quality PNG.",lucide.Image,n.exportPng),p("Create a Video","Export timings and animations.",lucide.Video,n.exportVideo),p("Create an Animated GIF","Make a compact looping preview.",lucide.Images,n.exportGif),p("Copy as Image","Copy the current slide.",lucide.Copy,n.copySlideAsImage)),t==="print"&&a.append(p("Print Presentation","Choose layout and output settings.",lucide.Printer,n.print)),t==="share"&&a.append(p("Share with People","Invite others to collaborate on this presentation.",lucide.UserPlus,n.openShare),p("Package for Sharing","Download a self-contained package.",lucide.Package,n.packageForSharing)),t==="info"&&a.append(p("Version History","Restore or remove the latest recovery snapshot.",lucide.Clock3,n.openVersionHistory),p("Document Properties","View and edit presentation metadata and statistics.",lucide.Info,n.openDocumentProperties),p("Protect Presentation","Control access and editing preferences.",lucide.LockKeyhole,n.openPasswordProtection),p("Embed Fonts","Keep typography consistent across devices.",lucide.Type,n.openFontEmbedding),p("Digital Signatures","View signatures attached to this presentation.",lucide.BadgeCheck,n.openDigitalSignatures)),a}function Dc(e,t,n,o,r,i){let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-backstage");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.setAttribute("aria-label","File");let p=e.createElement("aside"),s=Yn(e,"back",o,"pptxv-bs-back");s.setAttribute("aria-label","Back to presentation");let l=e.createElement("nav");p.append(s,l);let m=e.createElement("main");a.append(p,m);let c="home",u=false,x="",g=[];(async()=>(g=await chunkS5V27BHI_cjs.nd(),C()))();function v(y){y?.(),y&&o();}function h(y){if(y==="close")return o();if(y==="save")return v(n.save);if(y==="options")return v(n.openSettings);c=y,C();}function b(){l.replaceChildren();for(let y of chunkS5V27BHI_cjs.kd){y.group&&!l.querySelector("i")&&l.appendChild(e.createElement("i"));let P=Ac(e,y.id,y.label,()=>h(y.id));P.classList.toggle("active",c===y.id),l.appendChild(P);}}function T(){let y=e.createElement("h2");y.textContent="New";let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-bs-templates");for(let E of chunkS5V27BHI_cjs.ld){let w=De(e,"",()=>v(()=>n.createPresentation(E.id))),A=e.createElement("b");A.style.background=E.preview;let I=e.createElement("strong");I.textContent=E.name;let H=e.createElement("small");H.textContent=E.description,w.append(A,I,H),P.appendChild(w);}m.append(y,P);}function k(){let y=e.createElement("input");y.className="pptxv-bs-search",y.type="search",y.placeholder="Search recent presentations",y.value=x,y.addEventListener("input",()=>{x=y.value,C();}),m.appendChild(y),c==="open"&&m.appendChild(De(e,"Browse this device",()=>v(n.openFile),"pptxv-bs-primary"));let P=e.createElement("h2");P.textContent="Recent";let E=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-bs-recent"),w=e.createElement("header");w.innerHTML="<span>Name</span><span>Date modified</span><span>Size</span>",E.appendChild(w);let A=x.trim().toLowerCase(),I=A?g.filter(H=>`${H.name} ${H.location}`.toLowerCase().includes(A)):g;for(let H of I){let M=De(e,"",()=>v(()=>n.openRecentFile(H.key))),O=chunkS5V27BHI_cjs.Ke(e,"span","name"),L=e.createElement("b");L.textContent="P";let R=e.createElement("span"),B=e.createElement("strong");B.textContent=H.name;let F=e.createElement("small");F.textContent=H.location,R.append(B,F),O.append(L,R);let V=e.createElement("span");V.textContent=chunkS5V27BHI_cjs.pd(H.timestamp);let N=e.createElement("span");N.textContent=chunkS5V27BHI_cjs.qd(H.size),M.append(O,V,N),E.appendChild(M);}if(!I.length){let H=e.createElement("p");H.textContent="No recent presentations yet.",E.appendChild(H);}m.append(P,E);}function S(){m.appendChild(Lc(e,c,n,u,v,r));}function f(){let y=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-bs-card"),P=e.createElement("b");P.appendChild(ut(e,lucide.Settings,24));let E=e.createElement("h2");E.textContent="PowerPoint Options";let w=e.createElement("p");w.textContent="Configure autosave, proofing, grid, rulers, language, theme, and keyboard shortcuts.",y.append(P,E,w),y.appendChild(De(e,"Open Options",()=>v(n.openSettings),"pptxv-bs-primary")),m.appendChild(y);}function C(){b(),m.replaceChildren();let y=e.createElement("h1");y.textContent=c==="home"?"Good evening":chunkS5V27BHI_cjs.kd.find(E=>E.id===c)?.label??"Home",m.appendChild(y),(c==="home"||c==="new")&&T(),(c==="home"||c==="open")&&k(),["info","saveAs","print","share","export"].includes(c)&&S(),c==="options"&&f(),c==="account"&&Ec(e,t,m,i);let P=e.createElement("footer");P.textContent="Presentation \xB7 Saved to this browser",m.appendChild(P);}return C(),{el:a,setHasMacros(y){u=y,c==="saveAs"&&C();}}}function Mc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunkS5V27BHI_cjs.gc.map(i=>({label:i.label,value:i.shapeType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertActionButton")),o}function Hc(e,t,n){let o=J(e,{triggerLabel:t("pptx.ribbon.chart"),triggerText:t("pptx.ribbon.chart"),items:chunkS5V27BHI_cjs.Pc.map(i=>({label:i.label,value:i.type})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertChart")),o}var Rg=[{fieldType:"slidenum",i18nKey:"pptx.field.slideNumber"},{fieldType:"datetime",i18nKey:"pptx.field.dateTime"},{fieldType:"header",i18nKey:"pptx.field.header"},{fieldType:"footer",i18nKey:"pptx.field.footer"}];function Rc(e,t,n){let o=J(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:Rg.map(i=>({label:t(i.i18nKey),value:i.fieldType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.field.insertField")),o}function Oc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.smartart.insertTitle")),i.tabIndex=-1;let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-header"),p=chunkS5V27BHI_cjs.Ke(e,"h2");p.textContent=t("pptx.smartart.insertTitle");let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-close");s.type="button",s.setAttribute("aria-label",t("pptx.smartart.close")),s.textContent="\xD7",a.append(p,s);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-body"),m=chunkS5V27BHI_cjs.Ke(e,"nav","pptxv-smartart-categories");m.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-gallery"),u=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-options");u.setAttribute("role","listbox"),u.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),c.appendChild(u),l.append(m,c);let x=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-smartart-dialog-footer"),g=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-cancel");g.type="button",g.textContent=t("pptx.smartart.cancel");let v=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-dialog-insert");v.type="button",v.textContent=t("pptx.smartart.insert"),v.disabled=true,x.append(g,v),i.append(a,l,x),o.append(r,i);let h="list",b,T=null;function k(E){b=E,v.disabled=false;for(let w of u.querySelectorAll('[role="option"]')){let A=w.dataset.layout===E.layout;w.setAttribute("aria-selected",String(A)),w.classList.toggle("is-selected",A);}}function S(E){E&&(n(E.layout,E.defaultItems),y());}function f(){u.replaceChildren();for(let E of chunkS5V27BHI_cjs.hc.filter(w=>w.category===h)){let w=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-option");w.type="button",w.dataset.layout=E.layout,w.setAttribute("role","option"),w.setAttribute("aria-selected",String(b?.layout===E.layout)),w.classList.toggle("is-selected",b?.layout===E.layout);let A=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-option-preview");A.setAttribute("aria-hidden","true"),A.appendChild(chunkS5V27BHI_cjs.Te(e,"smart-art"));let I=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-smartart-option-label");I.textContent=t(E.labelKey),w.append(A,I),w.addEventListener("click",()=>k(E)),w.addEventListener("dblclick",()=>S(E)),u.appendChild(w);}}function C(E){h=E,b=void 0,v.disabled=true;for(let w of m.querySelectorAll("button")){let A=w.dataset.category===E;w.classList.toggle("is-active",A),w.setAttribute("aria-pressed",String(A));}f();}for(let E of chunkS5V27BHI_cjs.ic){let w=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-smartart-category");w.type="button",w.dataset.category=E.id,w.textContent=t(E.labelKey),w.addEventListener("click",()=>C(E.id)),m.appendChild(w);}C(h);function y(){o.hidden||(o.hidden=true,T?.focus(),T=null);}function P(E){if(E.key==="Escape"){E.preventDefault(),y();return}if(E.key!=="Tab")return;let w=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(w.length===0)return;let A=w[0],I=w[w.length-1];E.shiftKey&&e.activeElement===A?(E.preventDefault(),I.focus()):!E.shiftKey&&e.activeElement===I&&(E.preventDefault(),A.focus());}return r.addEventListener("click",y),s.addEventListener("click",y),g.addEventListener("click",y),v.addEventListener("click",()=>S(b)),o.addEventListener("keydown",P),{el:o,open(E){let w=e.defaultView?.HTMLElement;T=w&&e.activeElement instanceof w?e.activeElement:null,o.parentElement!==E&&E.appendChild(o),o.hidden=false,i.focus();},close:y}}function Fc(e,t,n){let o=Oc(e,t,n),r=D(e,{label:t("pptx.ribbon.smartArt"),icon:"smart-art",onClick:()=>{let i=r.btn.closest(".pptxv")??e.body;o.open(i);}});return r.btn.title=t("pptx.ribbon.insertSmartArt"),{el:r.btn,setDisabled(i){r.setDisabled(i),i&&o.close();}}}var Og={square:"square",circle:"circle",database:"database",diamond:"diamond",minus:"minus",moveRight:"move-right",plus:"plus",triangle:"triangle"};function Fg(e){switch(e){case "rotate-45":return "rotate(45deg)";case "rotate-90":return "rotate(90deg)";case "-rotate-90":return "rotate(-90deg)";case "rotate-180":return "rotate(180deg)";case "-skew-x-12":return "skewX(-12deg)";default:return}}function Bc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content");r.classList.add("pptxv-ribbon-insert-content");let i=[],a=D(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),p=D(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),s=D(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),l=D(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});l.btn.title=t("pptx.ribbon.insertMedia");let m=Hc(e,t,h=>n.insertChart(h)),c=Fc(e,t,(h,b)=>n.insertSmartArt(h,b)),u=D(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});u.btn.title=t("pptx.insert.insertEquation");let x=Mc(e,t,h=>n.insertActionButton(h)),g=Rc(e,t,h=>n.insertField(h));r.append(a.btn,p.btn,s.btn,l.btn,m.el,c.el,u.btn,x.el,g.el),i.push(a,p,s,l,m,c,u,x,g);let v=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-shape-grid");r.appendChild(v);for(let h of chunkS5V27BHI_cjs._c){let b=D(e,{label:t(h.i18nKey),icon:Og[h.glyph]??"square",onClick:()=>n.insert("shape",h.type)}),T=h.glyphClass?Fg(h.glyphClass):void 0;if(T){let k=b.btn.querySelector("svg");k&&(k.style.transform=T);}v.appendChild(b.btn),i.push(b);}return {el:r,setEditable(h){for(let b of i)b.setDisabled(!h);}}}function Vc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),i=D(e,{label:t("pptx.slideShow.fromBeginningTooltip"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning}),a=D(e,{label:t("pptx.slideShow.fromCurrentTooltip"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent}),p=chunkS5V27BHI_cjs.Pd("broadcast",o)?null:D(e,{label:t("pptx.slideShow.broadcastTooltip"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast}),s=D(e,{label:t("pptx.slideShow.presenterViewTooltip"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView}),l=D(e,{label:t("pptx.slideShow.setUpTooltip"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp}),m=D(e,{label:t("pptx.slideShow.rehearseTimingsTooltip"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal}),c=D(e,{label:t("pptx.customShows.title"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),u=D(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles}),x=D(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings});return r.append(i.btn,a.btn,s.btn,l.btn,m.btn,c.btn,...p?[p.btn]:[],u.btn,x.btn),{el:r,setSubtitlesVisible:g=>u.setActive(g)}}var Bg=[{type:"none",labelKey:"pptx.ribbon.transition.none"},{type:"fade",labelKey:"pptx.ribbon.transition.fade"},{type:"push",labelKey:"pptx.ribbon.transition.push"},{type:"wipe",labelKey:"pptx.ribbon.transition.wipe"},{type:"split",labelKey:"pptx.ribbon.transition.split"},{type:"reveal",labelKey:"pptx.ribbon.transition.reveal"},{type:"cut",labelKey:"pptx.ribbon.transition.cut"},{type:"cover",labelKey:"pptx.ribbon.transition.cover"},{type:"uncover",labelKey:"pptx.ribbon.transition.uncover"}],Nc=.7;function zc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=Nc,i=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-transition-apply-all"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.ribbon.applyTransitionToAll")),i.append(a,e.createTextNode(t("pptx.ribbon.applyTransitionToAll")));let p=c=>n.applyTransition(c,Math.round(r*1e3),a.checked),s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-transition-gallery"),l=Bg.map(c=>{let u=D(e,{label:t(c.labelKey),text:t(c.labelKey),onClick:()=>p(c.type)});return s.appendChild(u.btn),u});o.appendChild(s);let m=Y(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:c=>{r=Math.max(0,c);}});return m.setValue(Nc),o.appendChild(m.el),o.appendChild(i),{el:o,setEditable(c){for(let u of l)u.setDisabled(!c);m.setDisabled(!c),a.disabled=!c;}}}function Gc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=D(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),a=D(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,i.btn,a.btn),o}function _c(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=D(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),i=D(e,{label:t("pptx.headerFooter.title"),text:t("pptx.headerFooter.title"),onClick:n.openHeaderFooter}),a=D(e,{label:t("pptx.ribbon.compareTitle"),text:t("pptx.ribbon.compare"),onClick:n.openCompare}),p=D(e,{label:t("pptx.toolbar.comments"),text:t("pptx.toolbar.comments"),onClick:n.openComments}),s=D(e,{label:t("pptx.hyperlink.editTitle"),text:t("pptx.hyperlink.editTitle"),onClick:n.openHyperlink}),l=D(e,{label:t("pptx.settings.spellCheck"),text:t("pptx.settings.spellCheck"),onClick:n.toggleSpellCheck}),m=D(e,{label:t("pptx.review.language"),text:t("pptx.review.language"),onClick:()=>n.openSettings("general")});return o.append(r.btn,i.btn,a.btn,p.btn,s.btn,l.btn,m.btn),{el:o,setEditable:c=>a.setDisabled(!c)}}function Uc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),r=D(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),i=D(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),a=D(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")});return o.append(a.btn,r.btn,i.btn),o}function Wc(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon-tab-content"),i=!chunkS5V27BHI_cjs.Pd("zoom",o),a=i?D(e,{label:t("pptx.statusBar.zoomOut"),icon:"zoom-out",onClick:n.zoomOut}):null,p=i?D(e,{label:t("pptx.statusBar.zoomIn"),icon:"zoom-in",onClick:n.zoomIn}):null,s=i?D(e,{label:t("pptx.view.zoomToFit"),icon:"fit",onClick:n.zoomToFit}):null,l=chunkS5V27BHI_cjs.Pd("fullscreen",o)?null:D(e,{label:t("pptx.statusBar.slideShow"),icon:"play",onClick:n.togglePresentation}),m=chunkS5V27BHI_cjs.Pd("notes",o)?null:D(e,{label:t("pptx.statusBar.toggleNotes"),icon:"notes",onClick:n.toggleNotes}),c=D(e,{label:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility}),u=D(e,{label:t("pptx.ribbon.templatesOff"),text:t("pptx.ribbon.templatesOff"),onClick:()=>n.toggleTemplateEditing?.()}),x=D(e,{label:t("pptx.master.title"),text:t("pptx.master.title"),onClick:()=>n.toggleMasterView?.()}),g=D(e,{label:t("pptx.view.slideSorterTooltip"),text:t("pptx.slideSorter.title"),onClick:n.openSlideSorter}),v=D(e,{label:t("pptx.selectionPane.title"),text:t("pptx.selectionPane.title"),onClick:n.openSelectionPane}),h=D(e,{label:t("pptx.view.gridlines"),text:t("pptx.view.gridlines"),onClick:()=>n.toggleViewOption("showGrid")}),b=D(e,{label:t("pptx.view.ruler"),text:t("pptx.view.ruler"),onClick:()=>n.toggleViewOption("showRulers")}),T=D(e,{label:t("pptx.view.snapToGrid"),text:t("pptx.view.snapToGrid"),onClick:()=>n.toggleViewOption("snapToGrid")}),k=D(e,{label:t("pptx.view.snapToShape"),text:t("pptx.view.snapToShape"),onClick:()=>n.toggleViewOption("snapToShape")}),S=D(e,{label:t("pptx.view.addHorizontalGuide"),text:t("pptx.view.addHorizontalGuide"),onClick:()=>n.addGuide("h")}),f=D(e,{label:t("pptx.view.addVerticalGuide"),text:t("pptx.view.addVerticalGuide"),onClick:()=>n.addGuide("v")}),C=D(e,{label:t("pptx.ribbon.eyedropper"),text:t("pptx.ribbon.eyedropper"),onClick:n.activateEyedropper});return u.btn.dataset.testid="template-edit-toggle",r.append(...a&&p&&s?[a.btn,p.btn,s.btn]:[],...l?[l.btn]:[],...m?[m.btn]:[],c.btn,u.btn,x.btn,g.btn,v.btn,h.btn,b.btn,T.btn,k.btn,S.btn,f.btn,C.btn),{el:r,setEditable(y){u.setDisabled(!y),x.setDisabled(!y),C.setDisabled(!y);},setTemplateEditing(y){let P=t(y?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");u.btn.textContent=P,u.btn.title=P,u.btn.setAttribute("aria-label",P),u.setActive(y);}}}function so(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let a=fc(e,t,n,o);i.append(a.el);let p=jn(e,t,F=>A(F),o,{startRecording:()=>n.slideShow.startRehearsal()});p.el.hidden=true,i.appendChild(p.el);let s=Vn(e,t,n.findReplace);i.appendChild(s.el);let l=nc(e,t,(F,V)=>V?n.edit.updateEquation(V,F):n.insert.insertEquation(F));i.appendChild(l.el);let m=rc(e,t,n.edit);i.appendChild(m.el);let c=F=>chunkS5V27BHI_cjs.Pd(F,o),u=c("file")?null:Dc(e,t,n.file,()=>A("home"),o,r),x=c("home")?null:xc(e,t,{edit:n.edit,onToggleFindReplace:()=>s.toggle()}),g=c("insert")?null:Bc(e,t,n.insert,()=>l.toggle()),v=c("draw")?null:Cc(e,t,n.draw),h=c("design")?null:yc(e,t,n.design,()=>m.toggle()),b=c("transitions")?null:zc(e,t,n.edit),T=c("animations")?null:hc(e,t,n.edit),k=c("slideShow")?null:Vc(e,t,n.slideShow,o),S=c("record")?null:Gc(e,t,n.slideShow),f=c("review")?null:_c(e,t,n.nav),C=c("view")?null:Wc(e,t,n.nav,o),y=c("help")?null:Uc(e,t,n.nav),P={file:u?.el,home:x?.el,insert:g?.el,draw:v?.el,design:h?.el,transitions:b?.el,animations:T?.el,slideShow:k?.el,record:S??void 0,review:f?.el,view:C?.el,help:y??void 0},E=chunkS5V27BHI_cjs.Qd(dt,o);for(let F of E){let V=P[F.id];V&&(V.hidden=true,i.appendChild(V));}let w=E.find(F=>F.id===po)?.id??E[0]?.id??po;function A(F){if(P[F]){w=F,p.setActive(F);for(let V of Object.keys(P)){let N=P[V];N&&(N.hidden=V!==F);}}}A(w);let I,H={hasClipboard:false,slideCount:0,selectedCount:0},M=()=>{x?.update({editable:L,selectedElement:I,hasClipboard:H.hasClipboard,formatPainterActive:H.formatPainterActive??false,slideCount:H.slideCount,selectedCount:H.selectedCount??0,layouts:H.layouts??[]});},O=()=>{T?.update({editable:L,hasSelection:I!==void 0,selectedElementId:H.selectedElementId,animations:H.animations??[]});},L=false,R=new Set;return {el:i,update(){},setEditState(F){a.setEditState(F),p.el.hidden=!F.editable;},setNotesExpanded(){},setAutosaveStatus:(F,V)=>a.setAutosaveStatus(F,V),setEditable(F){L=F,f?.setEditable(F),C?.setEditable(F),g?.setEditable(F),v?.setEditable(F),s.setEditable(F),l.setEditable(F),m.setEditable(F),h?.setEditable(F),b?.setEditable(F),M(),O();},setDrawState:F=>v?.update(F),setTemplateEditing:F=>C?.setTemplateEditing(F),setHasMacros:F=>u?.setHasMacros(F),setSubtitlesVisible:F=>k?.setSubtitlesVisible(F),setInspectorOpen:F=>a.setInspectorOpen(F),openEquationEditor:(F,V)=>l.openEdit(F,V),setHiddenOptionTabs:F=>{if(R=new Set(F.filter(V=>V!=="file")),p.setHiddenTabs(R),R.has(w)){let V=R.has("home")?E.find(N=>!R.has(N.id))?.id:"home";V&&A(V);}},applyScreenTips:F=>p.applyScreenTips(F),updateSelection(F,V){I=F,H=V,M(),O();}}}function $c(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-statusbar"),a=()=>{let P=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-sep");return P.setAttribute("aria-hidden","true"),P},p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-counter");p.setAttribute("aria-live","polite");let s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-text");s.textContent=t("pptx.statusBar.language");let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(p,a(),s,a(),l),i.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-spacer"));let m=false,c="",u="idle",x=()=>{l.textContent=c.length>0?c:t(m?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),l.classList.toggle("is-saving",u==="saving"),l.classList.toggle("is-error",u==="error");};x();let g=!chunkS5V27BHI_cjs.Pd("notes",o),v=!chunkS5V27BHI_cjs.Pd("fullscreen",o),h=!chunkS5V27BHI_cjs.Pd("zoom",o),b=null;if(g){b=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),b.type="button",b.title=t("pptx.statusBar.toggleNotes"),b.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),b.setAttribute("aria-pressed","false"),b.setAttribute("data-pptx-compact",""),b.appendChild(Vg(e,"sticky-note"));let P=chunkS5V27BHI_cjs.Ke(e,"span");P.textContent=t("pptx.notes.title"),b.appendChild(P),b.addEventListener("click",n.toggleNotes);}let T=D(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});T.btn.setAttribute("data-pptx-compact","");let k=D(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});k.btn.setAttribute("data-pptx-compact","");let S=v?D(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;S?.btn.setAttribute("data-pptx-compact","");let f=null,C=null,y=null;return h&&(f=D(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),f.btn.setAttribute("data-pptx-compact",""),C=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-statusbar-zoom"),C.type="button",C.title=t("pptx.statusBar.zoomToFit"),C.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),C.setAttribute("data-pptx-compact",""),C.addEventListener("click",n.zoomToFit),y=D(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),y.btn.setAttribute("data-pptx-compact","")),i.append(...b?[b]:[],a(),T.btn,k.btn,...S?[S.btn]:[],...[],a(),...f&&C&&y?[f.btn,C,y.btn]:[]),{el:i,update({current:P,total:E,zoomPercent:w}){p.textContent=E>0?t("pptx.statusBar.slideOf",{current:P+1,total:E}):t("pptx.statusBar.noSlides"),C&&(C.textContent=`${Math.round(w)}%`);},setNotesExpanded(P){b?.setAttribute("aria-pressed",String(P)),b?.classList.toggle("is-active",P);},setSaveStatus(P,E){c=P,u=E,x();},setDirty(P){m=P,x();},setPresenting(P){T.btn.classList.toggle("is-active",!P),S?.btn.classList.toggle("is-active",P);}}}function Vg(e,t){let n=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-statusbar-icon");return n.appendChild(Ng(e,t)),n}function Ng(e,t){return chunkS5V27BHI_cjs.Te(e,t)}function qc(e){let{doc:t,t:n,actions:o}=e,r=chunkS5V27BHI_cjs.ra(e.sections,e.slides);return r.map((i,a)=>{let p=chunkS5V27BHI_cjs.Ke(t,"section","pptxv-thumb-section"),s=chunkS5V27BHI_cjs.Ke(t,"header","pptxv-thumb-section-header"),l=chunkS5V27BHI_cjs.Ke(t,"button","pptxv-thumb-section-toggle");if(l.type="button",l.setAttribute("aria-expanded",String(!i.section?.collapsed)),l.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(p.dataset.sectionId=i.section.id,l.addEventListener("click",()=>o?.toggle(i.section.id))),s.appendChild(l),i.section&&o){let m=chunkS5V27BHI_cjs.Ke(t,"span","pptxv-thumb-section-actions"),c=(u,x,g,v=false)=>{let h=chunkS5V27BHI_cjs.Ke(t,"button");h.type="button",h.setAttribute("data-pptx-compact",""),h.title=u,h.setAttribute("aria-label",u),h.textContent=x,h.disabled=v,h.addEventListener("click",g),m.appendChild(h);};c(n("pptx.sections.rename"),"\u270E",()=>{let u=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);u!=null&&o.rename(i.section.id,u);}),c(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),a===0),c(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),a===r.length-1),c(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),s.appendChild(m);}if(p.appendChild(s),!i.section?.collapsed){let m=chunkS5V27BHI_cjs.Ke(t,"div","pptxv-thumb-section-slides");i.slides.forEach((c,u)=>m.appendChild(e.buildSlide(c,i.slideIndexes[u]))),p.appendChild(m);}return p})}var xt=128;function Xn(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-thumbs");r.setAttribute("role","navigation"),r.setAttribute("aria-label",t("pptx.sections.slides"));let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-list");r.appendChild(i);let a=null,p=false,s=false,l=()=>{a&&(a.hidden=!p||s);};if(o){a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-footer"),a.hidden=true;let f=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-thumbs-add");f.type="button",f.appendChild(chunkS5V27BHI_cjs.Te(e,"plus")),f.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),f.addEventListener("click",()=>o()),a.appendChild(f),r.appendChild(a);}let m=new Map,c=0,u=[],x={width:1,height:1},g=null,v=[],h,b=1,T=false,k=(f,C,y)=>{let P=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-thumb");P.type="button",P.dataset.slideIndex=String(C),P.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:C+1}));let E=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-num");E.textContent=String(C+1);let w=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(x.height*y)}px`});return w.appendChild(g(f,y)),P.append(E,w),P.addEventListener("click",()=>n(C)),m.set(C,P),P},S=()=>{if(!g)return;m=new Map;let f=xt/Math.max(x.width,1);if(v.length>0){i.replaceChildren(...qc({doc:e,t,sections:v,slides:u,actions:h,buildSlide:(w,A)=>k(w,A,f)})),m.get(c)?.classList.add("is-active");return}let C=T?chunkS5V27BHI_cjs.vd(u.length,b,i.scrollTop,i.clientHeight||600):chunkS5V27BHI_cjs.vd(u.length,b,0,u.length*b,0),y=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});T&&(y.style.position="absolute",y.style.insetInline="0",y.style.top=`${C.offsetY}px`);for(let w=C.startIndex;w<=C.endIndex;w+=1){let A=u[w];A&&y.appendChild(k(A,w,f));}let P=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-thumbs-space",{position:"relative",height:T?`${C.totalHeight}px`:"auto"});T&&(P.dataset.virtualized="true"),P.appendChild(y),i.replaceChildren(P);let E=m.get(c);E?.classList.add("is-active"),E?.setAttribute("aria-current","page");};return i.addEventListener("scroll",()=>{T&&S();}),{el:r,render(f,C,y,P,E){s=false,l(),u=f,x=C,g=y,v=P??[],h=E;let w=xt/Math.max(C.width,1);b=Math.round(C.height*w)+8,T=!P?.length&&f.length>=chunkS5V27BHI_cjs.ud,r.classList.toggle("pptxv-thumbs-virtualized",T),S(),this.setActive(c);},setActive(f){if(c=f,T){let y=f*b,P=y+b,E=i.clientHeight||600;y<i.scrollTop?i.scrollTop=y:P>i.scrollTop+E&&(i.scrollTop=Math.max(0,P-E)),S();}m.forEach((y,P)=>{y.classList.toggle("is-active",P===f),P===f?y.setAttribute("aria-current","page"):y.removeAttribute("aria-current");});let C=m.get(f);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"});},setVisible(f){r.hidden=!f;},setAddSlideVisible(f){p=f,l();},renderMasters(f,C,y,P,E){s=true,l(),i.replaceChildren(),m=new Map,T=false,r.classList.remove("pptxv-thumbs-virtualized");let w=xt/Math.max(C.width,1),A=(I,H,M,O)=>{let L=chunkS5V27BHI_cjs.Ke(e,"button",`pptxv-thumb${O===null?"":" pptxv-master-layout"}`);L.type="button",L.setAttribute("aria-label",H),L.classList.toggle("is-active",E.masterIndex===M&&E.layoutIndex===O),E.masterIndex===M&&E.layoutIndex===O&&L.setAttribute("aria-current","page");let R=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-num");R.textContent=H;let B=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-thumb-frame",{display:"block",width:`${xt}px`,height:`${Math.round(C.height*w)}px`});B.appendChild(y(I,w)),L.append(R,B),L.addEventListener("click",()=>P(M,O)),i.appendChild(L);};f.forEach((I,H)=>{A({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),H,null),I.layouts?.forEach((M,O)=>A({id:M.path,rId:"",slideNumber:0,elements:[...I.elements??[],...M.elements??[]],backgroundColor:M.backgroundColor??I.backgroundColor,backgroundImage:M.backgroundImage??I.backgroundImage},M.name||t("pptx.master.layout"),H,O));});}}}function zg(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function Kc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch-box");r.appendChild(chunkS5V27BHI_cjs.Te(e,"search"));let i=e.createElement("input");i.type="text",i.className="pptxv-cmdsearch-input",i.placeholder=t("pptx.titleBar.searchPlaceholder"),i.setAttribute("aria-label",t("pptx.titleBar.search")),r.appendChild(i),o.appendChild(r);let a=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch-menu");a.hidden=true,o.appendChild(a);let p=()=>{a.hidden=true,a.replaceChildren();},s=c=>{i.value="",p(),c.run();},l=[],m=()=>{if(l=zg(i.value,n,t),i.value.trim().length===0){p();return}if(a.replaceChildren(),l.length===0){let c=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-cmdsearch-empty");c.textContent=t("pptx.titleBar.searchNoResults"),a.appendChild(c);}for(let c of l){let u=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(c.labelKey),u.addEventListener("mousedown",x=>{x.preventDefault(),s(c);}),a.appendChild(u);}a.hidden=false;};return i.addEventListener("input",m),i.addEventListener("focus",m),i.addEventListener("blur",p),i.addEventListener("keydown",c=>{c.stopPropagation(),c.key==="Enter"&&l.length>0?s(l[0]):c.key==="Escape"&&(i.value="",p());}),{el:o}}var Gg={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function jc(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,a=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-autosave"),p=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-autosave-label");p.textContent=t("pptx.titleBar.autoSave");let s=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-titlebar-switch");s.type="button",s.setAttribute("role","switch"),s.title=t("pptx.titleBar.toggleAutoSave"),s.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),s.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-switch-knob"));let l=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-autosave-label");a.append(p,s,l),o.appendChild(a);let m=()=>{s.classList.toggle("is-on",i),s.setAttribute("aria-checked",String(i)),l.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};s.addEventListener("click",()=>{i=n.onToggleAutosave(),m(),E();});let c=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-sep");o.appendChild(c);let u=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-qat");o.appendChild(u);let x=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-sep");o.appendChild(x);let g={editable:true,canUndo:false,canRedo:false},v=null,h=null,b=A=>{A==="save"?n.save():A==="undo"?n.undo():A==="redo"?n.redo():n.quickAccess?.run(A);},T=()=>{u.replaceChildren(),v=null,h=null;let A=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};u.hidden=!A.visible||!g.editable;for(let I of A.commandIds){if((I==="undo"||I==="redo")&&chunkS5V27BHI_cjs.Pd(I,n.hiddenActions))continue;let H=chunkS5V27BHI_cjs.Sd.find(R=>R.id===I);if(!H)continue;let M=t(H.labelKey),O=Gg[H.icon],L=D(e,{label:M,icon:O,text:O===void 0?"Ab":void 0,textLabel:A.showCommandLabels?M:void 0,className:"pptxv-titlebar-btn",onClick:()=>b(I)});if(n.quickAccess){let R=n.quickAccess.screenTip(M);R===void 0?L.btn.removeAttribute("title"):L.btn.title=R;}I==="undo"?(v=L,L.setDisabled(!g.canUndo)):I==="redo"&&(h=L,L.setDisabled(!g.canRedo)),u.appendChild(L.btn);}},k=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-file"),S=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-filename");S.textContent=n.fileName||t(chunkS5V27BHI_cjs.fd);let f=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-dot");f.textContent="\u2022",f.setAttribute("aria-hidden","true");let C=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-status");k.append(S,f,C),o.appendChild(k);let y="idle",P=false,E=()=>{C.textContent=t(chunkS5V27BHI_cjs.ed({autosaveState:y,isDirty:P,autosaveEnabled:i})),C.classList.toggle("is-error",i&&y==="error"),C.classList.toggle("is-saving",i&&y==="saving");},w=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-search");return w.appendChild(Kc(e,t,n.commands).el),o.appendChild(w),o.appendChild(chunkS5V27BHI_cjs.Ke(e,"span","pptxv-titlebar-spacer")),m(),E(),T(),{el:o,setEditState(A){g=A;for(let H of [a,c,x])H.hidden=!A.editable;let I=n.quickAccess?.getState();u.hidden=!A.editable||I?.visible===false,f.hidden=!A.editable,C.hidden=!A.editable,w.hidden=!A.editable,v?.setDisabled(!A.canUndo),h?.setDisabled(!A.canRedo);},setAutosaveState(A){y=A,E();},setDirty(A){P=A,E();},setAutosaveEnabled(A){i=A,m(),E();},refreshQuickAccess:T}}function Zn(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv");o.tabIndex=0,o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.titleBar.defaultFileName")),o.setAttribute("aria-busy","false");let r=null,i=null;n.showToolbar&&(r=jc(e,t,n.titleBar),o.appendChild(r.el),i=so(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el));let a=null,p=n.showToolbar?On(e,t,{openMenu:()=>a?.toggle("menu"),undo:n.ribbonHandlers.primary.undo,redo:n.ribbonHandlers.primary.redo,save:n.ribbonHandlers.file.save,present:n.ribbonHandlers.slideShow.startFromCurrent},n.hiddenActions):null;p&&(p.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(p.el));let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-body");o.appendChild(s);let l=An(e,t,n.onSelectSlide);o.appendChild(l.el);let m=Hn(e,t);s.appendChild(m.el);let c=null;n.showThumbnails&&(c=Xn(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide()),s.appendChild(c.el));let u=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-viewport");u.setAttribute("data-pptx-viewport",""),s.appendChild(u);let x=null;n.showInspector&&(x=ro(e,t,n.inspectorHandlers),x.setEditable(n.editable),s.appendChild(x.el));let g=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-stage-wrap");u.appendChild(g);let v=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-empty");v.textContent=t("pptx.statusBar.noSlides"),v.hidden=true,u.appendChild(v);let h=Fn(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(h.el);let b=n.showToolbar?$c(e,t,{toggleNotes:n.ribbonHandlers.nav.toggleNotes,normalView:n.ribbonHandlers.nav.normalView,openSlideSorter:n.ribbonHandlers.nav.openSlideSorter,togglePresentation:n.ribbonHandlers.nav.togglePresentation,zoomIn:n.ribbonHandlers.nav.zoomIn,zoomOut:n.ribbonHandlers.nav.zoomOut,zoomToFit:n.ribbonHandlers.nav.zoomToFit},n.hiddenActions):null;b&&o.appendChild(b.el),a=n.showToolbar?Rn(e,t,n.ribbonHandlers,n.onSelectSlide,x?.el??null,n.hiddenActions):null,a&&(a.setEditable(n.editable),o.appendChild(a.el));let T=Bn(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);T.update(0,0),o.appendChild(T.el);let k=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-overlay pptxv-loading");k.textContent=t("common.loading"),k.setAttribute("role","status"),k.setAttribute("aria-live","polite"),k.hidden=true,o.appendChild(k);let S=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-overlay pptxv-error");S.setAttribute("role","alert");let f=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-error-message");return S.appendChild(f),S.hidden=true,o.appendChild(S),{root:o,ribbon:i,titleBar:r,inspector:x,accessibility:l,masterSidebar:m,thumbnails:c,viewport:u,stageWrap:g,notes:h,statusBar:b,mobileToolbar:p,mobileActionSheets:a,presentationTouchControls:T,setLoading(C){k.hidden=!C,o.setAttribute("aria-busy",String(C));},setError(C){S.hidden=C===null,f.textContent=C??"";},setEmpty(C){v.hidden=!C,g.hidden=C;},setPresenting(C){o.classList.toggle("pptxv-presenting",C);}}}function Qn(e,t){let n=o=>{let r=o.target;if(!(r&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(r.tagName))){switch(o.key){case "ArrowRight":case "ArrowDown":case "PageDown":case " ":t.next();break;case "ArrowLeft":case "ArrowUp":case "PageUp":t.prev();break;case "Home":t.first();break;case "End":t.last();break;case "Escape":t.escape();break;default:return}o.preventDefault();}};return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n);}}var _g=.1,Ug=8;function Jn(e,t){let n=chunkS5V27BHI_cjs.Mc({getScale:t.getScale,minScale:_g,maxScale:Ug,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:p=>{t.isSwipeEnabled()&&(p===-1?t.onNext():t.onPrevious());}}}),o=p=>n.onTouchStart(p),r=p=>n.onTouchMove(p),i=p=>n.onTouchEnd(p),a=()=>n.onTouchCancel();return e.addEventListener("touchstart",o,{passive:false,capture:true}),e.addEventListener("touchmove",r,{passive:false,capture:true}),e.addEventListener("touchend",i,{passive:true,capture:true}),e.addEventListener("touchcancel",a,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",a,true),n.cancel();}}function er(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,a=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",a),{async enter(){if(!i()){if(o)try{await e.requestFullscreen(),e.focus();return}catch{}r=true,t(true),e.focus();}},async exit(){if(o&&n.fullscreenElement===e){await n.exitFullscreen();return}r&&(r=false,t(false));},isActive:i,dispose(){o&&n.removeEventListener("fullscreenchange",a);}}}function tr(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:a}=e,p=Zn(t,o,{showToolbar:r.showToolbar??true,showThumbnails:r.showThumbnails??true,showFormatToolbar:r.showFormatToolbar??true,showInspector:r.showInspector??true,editable:r.editable??false,hiddenActions:r.hiddenActions,titleBar:{fileName:r.fileName,autosaveEnabled:r.autosave??false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:Wg(e),hiddenActions:r.hiddenActions},accountAuth:r.accountAuth,...dd(e)}),s=at(p.root,e.initialTheme??r.theme,[]);n.appendChild(p.root),p.statusBar?.setNotesExpanded(i.get().notesExpanded),p.statusBar?.setDirty(i.get().dirty),p.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),p.titleBar?.setDirty(i.get().dirty);let l=Qn(p.root,{next:e.next,prev:e.prev,first:e.goToFirstSlide,last:e.goToLastSlide,escape:e.exitPresentation}),m=Jn(p.root,{getScale:()=>a.effectiveScale(),onPinchZoom:x=>i.set({zoom:x}),isSwipeEnabled:()=>{let x=i.get();return x.presenting||!x.editable},onNext:()=>{let x=i.get();cd({presenting:x.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:x.slides[x.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),c=er(p.root,x=>{i.set({presenting:x});}),u=null;return typeof ResizeObserver<"u"&&(u=new ResizeObserver(()=>{i.get().zoom==="fit"&&a.renderStage();}),u.observe(p.viewport)),{chrome:p,presentation:c,detachKeyboard:l,detachTouchGestures:m,resizeObserver:u,appliedThemeVars:s}}function Wg(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function or(e,t){t(),e.detachKeyboard(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function nr(e){return {doc:e.doc,container:e.container,t:e.t,options:e.options,store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>{e.lifecycle.presentation.isActive()?e.exitPresentation():e.enterPresentation();},returnToNormalView:()=>{e.store.get().presenting&&e.exitPresentation(),e.container.querySelector("[data-pptx-slide-sorter]")?.remove();},undo:()=>e.undo(),redo:()=>e.redo(),toggleAutosave:()=>e.toggleAutosave(),startPresentationFromBeginning:()=>{e.goToSlide(0),e.enterPresentation();},startPresentationFromCurrent:()=>{e.enterPresentation();},openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openShare:()=>e.openShare(),openAccessibility:()=>e.openAccessibility(),openSettings:t=>e.openSettings(t),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSetUpSlideShow:()=>e.openSetUpSlideShow(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),packageForSharing:()=>e.packageForSharing(),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),goToFirstSlide:()=>e.goToSlide(0),goToLastSlide:()=>e.goToSlide(e.getSlideCount()-1),exitPresentation:()=>{e.exitPresentation();},commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),print:()=>Promise.resolve((e.openPrintDialog(),true)),openFile:()=>e.openFile(),openRecentFile:t=>e.openRecentFile(t),createPresentation:t=>e.createPresentation(t),getEditActions:()=>e.editor.getEditActions(),getFindReplaceActions:()=>e.editor.getFindReplaceActions(),setTheme:t=>e.setTheme(t),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t)}}function G(e){if(e.masterViewTarget){if(e.masterViewTab==="notes")return e.notesMaster?.elements??[];if(e.masterViewTab==="handout")return e.handoutMaster?.elements??[];let n=e.slideMasters[e.masterViewTarget.masterIndex];return e.masterViewTarget.layoutIndex===null?n?.elements??[]:n?.layouts?.[e.masterViewTarget.layoutIndex]?.elements??[]}let t=e.slides[e.currentSlide];return t?e.editTemplateMode?e.templateElementsBySlideId[t.id]??[]:t.elements:[]}function j(e,t){if(e.masterViewTarget){if(e.masterViewTab==="notes")return {notesMaster:e.notesMaster?{...e.notesMaster,elements:t}:void 0};if(e.masterViewTab==="handout")return {handoutMaster:e.handoutMaster?{...e.handoutMaster,elements:t}:void 0};let{masterIndex:o,layoutIndex:r}=e.masterViewTarget;return {slideMasters:e.slideMasters.map((i,a)=>a!==o?i:r===null?{...i,elements:t}:{...i,layouts:i.layouts?.map((p,s)=>s===r?{...p,elements:t}:p)})}}let n=e.slides[e.currentSlide];return n?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[n.id]:t}}:{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:t}:o)}:{slides:e.slides}}function te(e,t){return G(e).find(n=>n.id===t)}function rr(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let a=n(i);Object.keys(a).length!==0&&(t.pushHistory(),e.set(j(o,G(o).map(p=>p.id===r?{...p,...a}:p))),t.commitChange());}}function ir(e,t,n){return e[t]?.elements.find(o=>o.id===n)}function Yc(e,t,n){return e.map((o,r)=>r===t?{...chunkEWJAZ6TW_cjs.Z(o),elements:n(o.elements)}:o)}function ar(e,t,n){return Yc(e,t,o=>o.filter(r=>r.id!==n))}function lo(e){return e.map(chunkEWJAZ6TW_cjs.Z)}function gt(e,t,n){return Yc(e,t,o=>[...o,n])}function pr(e,t,n,o){return e.map((r,i)=>i===t?{...chunkEWJAZ6TW_cjs.Z(r),notes:n,notesSegments:o?.map(a=>({...a,style:{...a.style}}))}:r)}function oe(e,t,n){return e.map((o,r)=>r===t?{...chunkEWJAZ6TW_cjs.Z(o),...n}:o)}function sr(e,t){return e.map(n=>({...chunkEWJAZ6TW_cjs.Z(n),...t}))}function lr(e){let{store:t,ops:n}=e,o=(r,i)=>{let a=t.get(),p=a.slides[a.currentSlide];if(!a.editable||!p?.animations?.some(l=>l.elementId===r))return;let s=i(p.animations);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:s})}),n.commitChange();};return {addAnimation(r,i){let a=t.get(),p=a.selectedElementId,s=a.slides[a.currentSlide];if(!a.editable||!p||!s)return;let l=chunkS5V27BHI_cjs.L(s.animations??[],p,r,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:l})}),n.commitChange();},removeAnimation(){let r=t.get(),i=r.selectedElementId,a=r.slides[r.currentSlide];if(!r.editable||!i||!a?.animations?.length)return;let p=chunkS5V27BHI_cjs.M(a.animations,i);p.length!==a.animations.length&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{animations:p})}),n.commitChange());},setAnimationEffect(r,i){let a=t.get(),p=a.selectedElementId,s=a.slides[a.currentSlide];if(!a.editable||!p||!s)return;let m=(r==="entrance"?chunkS5V27BHI_cjs.x:r==="exit"?chunkS5V27BHI_cjs.y:chunkS5V27BHI_cjs.z)(s.animations??[],p,i);n.pushHistory(),t.set({slides:oe(a.slides,a.currentSlide,{animations:m})}),n.commitChange();},setAnimationTiming(r,i){o(r,a=>{let p=[...a];return i.durationMs!==void 0&&(p=chunkS5V27BHI_cjs.C(p,r,i.durationMs)),i.delayMs!==void 0&&(p=chunkS5V27BHI_cjs.D(p,r,i.delayMs)),i.trigger!==void 0&&(p=chunkS5V27BHI_cjs.A(p,r,i.trigger)),i.direction!==void 0&&(p=chunkS5V27BHI_cjs.F(p,r,i.direction)),i.sequence!==void 0&&(p=chunkS5V27BHI_cjs.G(p,r,i.sequence)),i.timingCurve!==void 0&&(p=chunkS5V27BHI_cjs.E(p,r,i.timingCurve)),i.repeatCount!==void 0&&(p=chunkS5V27BHI_cjs.H(p,r,i.repeatCount)),i.repeatMode!==void 0&&(p=chunkS5V27BHI_cjs.I(p,r,i.repeatMode)),i.triggerShapeId!==void 0&&(p=chunkS5V27BHI_cjs.B(p,r,i.triggerShapeId||void 0)),p});},reorderAnimation(r,i){o(r,a=>i==="up"?chunkS5V27BHI_cjs.J(a,r):chunkS5V27BHI_cjs.K(a,r));},moveAnimation(r,i){o(r,a=>{let p=[...a].sort((m,c)=>(m.order??0)-(c.order??0)),s=p.findIndex(m=>m.elementId===r);if(s<0)return p;let[l]=p.splice(s,1);return p.splice(Math.max(0,Math.min(i,p.length)),0,l),p.map((m,c)=>({...m,order:c}))});}}}function Xc(e,t){return t.size===0?[...e]:e.map(n=>{let o=t.get(n.id);return o?{...n,x:o.x??n.x,y:o.y??n.y}:n})}function dr(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return Xc(e,chunkS5V27BHI_cjs.X(r,n))}function cr(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return Xc(e,chunkS5V27BHI_cjs.Y(r,n))}function mr(e,t,n){switch(t){case "left":return {x:0};case "right":return {x:n.width-e.width};case "centerH":return {x:(n.width-e.width)/2};case "top":return {y:0};case "bottom":return {y:n.height-e.height};case "middle":return {y:(n.height-e.height)/2}}}function co(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function ur(e,t,n){return chunkS5V27BHI_cjs.ia(e,t,n)}function xr(e,t,n){return chunkS5V27BHI_cjs.ja(e,t,n)}function gr(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let a=t.get(),p=a.selectedElementId,s=G(a);!a.editable||!p||!s||i(s,p)!==s&&(n.pushHistory(),t.set(j(a,i(s,p))),n.commitChange());};return {bringForward:()=>r(chunkS5V27BHI_cjs.oa),sendBackward:()=>r(chunkS5V27BHI_cjs.pa),bringToFront:()=>r(chunkS5V27BHI_cjs.ma),sendToBack:()=>r(chunkS5V27BHI_cjs.na),alignElements(i){let a=t.get();if(a.selectedElementIds.length<2){o(p=>mr(p,i,a.canvasSize));return}n.pushHistory(),t.set(j(a,dr(G(a),a.selectedElementIds,i))),n.commitChange();},distributeElements(i){let a=t.get();!a.editable||a.selectedElementIds.length<3||(n.pushHistory(),t.set(j(a,cr(G(a),a.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>co(i,"horizontal")),flipVertical:()=>o(i=>co(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let a=ur(G(i),i.selectedElementIds,i.editTemplateMode?chunkS5V27BHI_cjs.Uc(true,i.selectedElementIds[0]):chunkS5V27BHI_cjs.Tc());a.groupId&&(n.pushHistory(),t.set({...j(i,a.elements),selectedElementId:a.groupId,selectedElementIds:[a.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),a=i.selectedElementId,p=G(i),s=n.selectedElement(i);if(!i.editable||!a||!p||!s||s.type!=="group")return;let l=s.children.map(c=>i.editTemplateMode?chunkS5V27BHI_cjs.Uc(true,c.id||s.id):chunkS5V27BHI_cjs.Tc()),m=xr(p,a,l);m.childIds.length!==0&&(n.pushHistory(),t.set({...j(i,m.elements),selectedElementId:m.childIds.at(-1)??null,selectedElementIds:m.childIds}),n.commitChange());}}}function br(e){let{store:t,ops:n}=e;return {setSlideBackgroundColor(o){let r=t.get();if(r.editable){if(r.masterViewTarget){n.pushHistory(),r.masterViewTab==="notes"&&r.notesMaster?t.set({notesMaster:{...r.notesMaster,backgroundColor:o}}):r.masterViewTab==="handout"&&r.handoutMaster?t.set({handoutMaster:{...r.handoutMaster,backgroundColor:o}}):t.set({slideMasters:Zc(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,{backgroundColor:o})}),n.commitChange());}},clearSlideBackground(){let o=t.get();if(o.editable){if(o.masterViewTarget){n.pushHistory(),o.masterViewTab==="notes"&&o.notesMaster?t.set({notesMaster:{...o.notesMaster,backgroundColor:void 0,backgroundImage:void 0}}):o.masterViewTab==="handout"&&o.handoutMaster?t.set({handoutMaster:{...o.handoutMaster,backgroundColor:void 0,backgroundImage:void 0}}):t.set({slideMasters:Zc(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:oe(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}}}}function Zc(e,t){let n=e.masterViewTarget;return n?e.slideMasters.map((o,r)=>r!==n.masterIndex?o:n.layoutIndex===null?{...o,...t}:{...o,layouts:o.layouts?.map((i,a)=>a===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function fr(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunkS5V27BHI_cjs.Vc(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunkS5V27BHI_cjs.Vc(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunkS5V27BHI_cjs.Wc(r.element);n.pushHistory(),t.set({...j(o,[...G(o),i]),selectedElementId:i.id,selectedElementIds:[i.id]}),n.commitChange();}}}function vr(e){let{store:t,ops:n}=e;return {updatePresentationSettings(o){n.updatePresentationProperties({...t.get().presentationProperties,...o});},applyThemeByPath(o,r){let i=e.getHandler();!i||!o||!t.get().editable||(async()=>(await i.setPresentationTheme(o,r),t.set({slideMasters:t.get().slideMasters.map((a,p)=>r||p===0?{...a,themePath:o}:a)}),n.commitChange()))();},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:oe(r.slides,r.currentSlide,o)}),n.commitChange());},updateCanvasSize(o){!Number.isFinite(o.width)||!Number.isFinite(o.height)||t.get().editable&&(t.set({canvasSize:{width:Math.max(1,Math.round(o.width)),height:Math.max(1,Math.round(o.height))}}),n.commitChange());}}}async function hr(e,t){let n=new $g__default.default,o=n.folder("presentation-package");if(!o)throw new Error("Unable to create presentation package");return o.file(t,e),o.file("README.txt",chunkS5V27BHI_cjs.le(t)),n.generateAsync({type:"blob"})}function Qc(e,t,n,o){t.querySelectorAll(".pptxv-alignment-guide").forEach(r=>r.remove());for(let r of n){let i=e.createElement("div");i.className=`pptxv-alignment-guide is-${r.axis}`,i.style[r.axis==="h"?"top":"left"]=`${r.position*o}px`,t.appendChild(i);}}var qg={type:"linear",angle:90,stops:[{color:"#4472c4",position:0,opacity:1},{color:"#ffffff",position:100,opacity:1}]};function Kg(e){return e&&chunkEWJAZ6TW_cjs.k(e)?{fillColor:e.shapeStyle?.fillColor,strokeColor:e.shapeStyle?.strokeColor,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,strokeColor:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function yr(e,t=null,n=[],o=null,r=new Map){let i=Kg(e),a=e?chunkS5V27BHI_cjs.Ma(e):void 0,p=e?chunkS5V27BHI_cjs.Fc(e):void 0,s=e?chunkS5V27BHI_cjs.Hc(e):void 0,l=e?chunkS5V27BHI_cjs.Jc(e):void 0,m=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,canShape:io(e),canText:pe(e),isImage:e!==void 0&&chunkEWJAZ6TW_cjs.g(e),isChart:e?.type==="chart",isMedia:e?.type==="media",isTable:e?.type==="table",isSmartArt:e?.type==="smartArt",smartArtData:e?.type==="smartArt"?e.smartArtData:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:i.fillColor,strokeColor:i.strokeColor,strokeWidth:i.strokeWidth,shapeStyle:e&&chunkEWJAZ6TW_cjs.k(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:i.fillOpacity,strokeOpacity:i.strokeOpacity,gradientEnabled:e!==void 0&&chunkS5V27BHI_cjs.Ac(e),gradient:e?chunkS5V27BHI_cjs.zc(e):qg,vAlign:a?.vAlign??"top",textWrap:e?chunkS5V27BHI_cjs.Pa(e):"square",autoFitMode:e?chunkS5V27BHI_cjs.Qa(e):"none",characterSpacing:a?.characterSpacing??0,lineSpacing:a?.lineSpacing??1,lineSpacingExactPt:a?.lineSpacingExactPt??null,paragraphSpacingBefore:a?.paragraphSpacingBefore??0,paragraphSpacingAfter:a?.paragraphSpacingAfter??0,paragraphIndent:a?.paragraphIndent??0,paragraphMarginLeft:a?.paragraphMarginLeft??0,textDirection:a?.textDirection??"horizontal",textRtl:a?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:p?.brightness??0,imageContrast:p?.contrast??0,imageSaturation:p?.saturation??0,imageArtisticEffect:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunkEWJAZ6TW_cjs.g(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunkEWJAZ6TW_cjs.g(e)?e.imageEffects?.colorWash:void 0,actionClick:e?.actionClick?chunkEWJAZ6TW_cjs.te(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunkEWJAZ6TW_cjs.te(e.actionHover,"hover"):void 0,chartData:e?.type==="chart"?e.chartData:void 0,media:e?.type==="media"?e:void 0,mediaPreviewUrl:e?.type==="media"?e.mediaData??(e.mediaPath?r.get(e.mediaPath):void 0):void 0,mediaPosterUrl:e?.type==="media"?e.posterFrameData??(e.posterFramePath?r.get(e.posterFramePath):void 0):void 0,cropLeft:s?.cropLeft??0,cropTop:s?.cropTop??0,cropRight:s?.cropRight??0,cropBottom:s?.cropBottom??0,tableHeaderRow:l?.firstRowHeader??false,tableBandedRows:l?.bandedRows??false,tableBandedColumns:l?.bandedColumns??false,tableLastRow:e?.type==="table"?e.tableData?.lastRow??false:false,tableFirstCol:e?.type==="table"?e.tableData?.firstCol??false:false,tableLastCol:e?.type==="table"?e.tableData?.lastCol??false:false,tableRtl:e?.type==="table"?e.tableData?.rtl??false:false,tableStyleId:e?.type==="table"?e.tableData?.tableStyleId??"":"",tableCellBackground:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.backgroundColor??"#ffffff":"#ffffff",tableCellBorder:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.borderColor??"#000000":"#000000",tableCellPadding:l?.cellPadding??0,selectedTableCell:m?t:null,selectedTableCells:m?n:[],tableCellStyle:m?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(c=>c.height??32)??[]:[]}}function jg(e){let t=[],n=new Set;for(let o of e.slideMasters)for(let r of o.layouts??[])!r.path||n.has(r.path)||(n.add(r.path),t.push({path:r.path,name:r.name||r.path.split("/").pop()||r.path}));return t}function Jc(e){return ()=>{let t=e.store.get(),n=e.getChrome(),{ribbon:o,inspector:r}=n,i=t.editable&&!t.presenting;if(n.thumbnails?.setAddSlideVisible(i),!o&&!r)return;o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen);let a=i?e.selectedElement(t):void 0;o?.updateSelection(a,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],layouts:jg(t)}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth}),r?.update(yr(a,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls));let p=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,elements:p?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:a?.id,comments:p?.comments??[],docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:p,colorScheme:t.colorScheme,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function em(e){if(e.length===0)return null;if(e.length>1){let n=chunkS5V27BHI_cjs.fa(e);return n?{...n,rotation:n.rotation??0}:null}let t=e[0];return {x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0}}function tm(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function Sr(e){let t=null,n=p=>tm(p.clientX,p.clientY,e.getStageOrigin(),e.getScale());function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",a);}function r(p){!t||p.pointerId!==t.pointerId||t.points.push(n(p));}function i(p){if(!t||p.pointerId!==t.pointerId)return;t.points.push(n(p));let s=t;o(),t=null,e.onCommitStroke({points:s.points,color:e.getColor(),width:e.getWidth(),tool:s.tool});}function a(p){!t||p.pointerId!==t.pointerId||(o(),t=null);}return {onStagePointerDown(p){if(p.button!==0)return;let s=e.getTool();if(s!=="select"){if(s==="eraser"){let l=ee(p.target,e.getStageRoot());l&&(p.preventDefault(),p.stopPropagation(),e.onEraseAt(l));return}p.preventDefault(),p.stopPropagation(),t={tool:s,pointerId:p.pointerId,points:[n(p)]},window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",a);}},isActive:()=>t!==null,dispose(){o(),t=null;}}}function Cr(e){let{store:t,editActions:n,interactions:o}=e,r=Sr({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:a=>n.commitStroke(a),onEraseAt:a=>n.eraseInkElement(a)}),i=a=>a.editable&&!a.presenting&&a.drawTool!=="select";return {onStagePointerDown(a){if(i(t.get())){r.onStagePointerDown(a);return}o.onStagePointerDown(a);},onStageDblClick(a){i(t.get())||o.onStageDblClick(a);},syncCursor(a){if(!a)return;let p=t.get();a.dataset.drawTool=i(p)?p.drawTool:"select";},setTool(a){let p=t.get();p.drawTool!==a&&(a!=="select"&&o.closeInline(true),t.set({drawTool:a,selectedElementId:a==="select"?p.selectedElementId:null}));},setColor:a=>t.set({drawColor:a}),setWidth:a=>t.set({drawWidth:Math.max(1,Math.round(a))}),dispose:()=>r.dispose()}}function Yg(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function wr(e,t){return e.map(n=>{let o=t(n);return o.replies?.length?{...o,replies:wr(o.replies,t)}:o})}function om(e,t){return e.filter(n=>n.id!==t).map(n=>n.replies?.length?{...n,replies:om(n.replies,t)}:n)}function nm(e){let t=n=>{let o=e.store.get();!o.editable||!o.slides[o.currentSlide]||(e.ops.pushHistory(),e.store.set({slides:Yg(o.slides,o.currentSlide,n)}),e.ops.commitChange());};return {addComment(n,o){let r=n.trim();if(!r)return null;let i=e.store.get();if(!i.editable||!i.slides[i.currentSlide])return null;let a=chunkS5V27BHI_cjs.Tc();return t(p=>[...p,{id:a,text:r,author:"You",createdAt:new Date().toISOString(),resolved:false,elementId:o}]),a},addCommentReply(n,o){let r=o.trim();if(!r)return null;let i=e.store.get(),a=i.slides[i.currentSlide];if(!i.editable||!a)return null;let p=(a.comments??[]).find(m=>m.id===n);if(!p)return null;let s=chunkS5V27BHI_cjs.Tc(),l={id:s,text:r,author:"You",createdAt:new Date().toISOString(),threadId:n,elementId:p.elementId};return t(m=>m.map(c=>c.id===n?{...c,replies:[...c.replies??[],l]}:c)),s},editComment(n,o){let r=o.trim();r&&t(i=>wr(i,a=>a.id===n?{...a,text:r}:a));},deleteComment(n){t(o=>om(o,n));},toggleCommentResolved(n){t(o=>wr(o,r=>r.id===n?{...r,resolved:!r.resolved}:r));}}}function Er(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunkS5V27BHI_cjs.wc(o);i&&(n.pushHistory(),t.set({slides:gt(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=ir(r.slides,r.currentSlide,o);if(!i||i.type!=="ink")return false;n.pushHistory();let a=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:ar(r.slides,r.currentSlide,o),selectedElementId:a}),n.commitChange(),true}}}var Xg={width:320,height:80},Zg={width:600,height:250},Qg={width:200,height:150},rm={width:240,height:0};function se(e,t){e.x=Math.max(0,Math.round((t.width-e.width)/2)),e.y=Math.max(0,Math.round((t.height-e.height)/2));}function Tr(e,t,n="rect"){let o,r;switch(e){case "text":o=chunkEWJAZ6TW_cjs.A("Text",{fontSize:18,color:"#000000"}),r=Xg;break;case "table":o={...chunkS5V27BHI_cjs.la(3,3),id:chunkEWJAZ6TW_cjs.ie("table")},r=Zg;break;case "shape":n==="connector"?(o=chunkEWJAZ6TW_cjs.C({type:"straight",stroke:{color:"#000000",width:2}}),r=rm):(o=chunkEWJAZ6TW_cjs.B(n),r=n==="line"?rm:Qg);break}return o.width=r.width,o.height=r.height,se(o,t),o}function Jg(e,t){return new Promise(n=>{let o=new Image;o.onload=()=>{let r=o.width/Math.max(1,o.height),i=Math.min(t,o.width||t),a=Math.max(1,Math.round(i/(r||1)));n({width:i,height:a});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function mo(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="image/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=new FileReader;a.onload=async()=>{let p=typeof a.result=="string"?a.result:"";if(!p){n(null);return}let s=Math.round(t.width*.6),{width:l,height:m}=await Jg(p,s),c={id:chunkEWJAZ6TW_cjs.ie("image"),type:"image",name:"Image",x:0,y:0,width:l,height:m,imageData:p};se(c,t),n(c);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var eb={width:420,height:64},ze={width:640,height:360};function tb(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||ze.width,i=o.videoHeight||ze.height;if(r>ze.width||i>ze.height){let a=Math.min(ze.width/r,ze.height/i);n({width:Math.round(r*a),height:Math.round(i*a)});return}n({width:r,height:i});},o.onerror=()=>n(ze),o.src=t;})}function Pr(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="video/*,audio/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=i.type.startsWith("audio/")?"audio":i.type.startsWith("video/")?"video":null;if(!a){n(null);return}let p=new FileReader;p.onload=async()=>{let s=typeof p.result=="string"?p.result:"";if(!s){n(null);return}let l=a==="audio"?eb:await tb(e,s),m={id:chunkEWJAZ6TW_cjs.ie("media"),type:"media",mediaType:a,mediaMimeType:i.type||void 0,mediaData:s,x:0,y:0,width:l.width,height:l.height};se(m,t),n(m);},p.onerror=()=>n(null),p.readAsDataURL(i);}),o.click();})}var im={width:400,height:80},am={width:600,height:340},pm={width:200,height:40};function Ar(e,t){let n=chunkS5V27BHI_cjs.Qc(e);return se(n,t),n}function kr(e,t,n){let o={id:chunkEWJAZ6TW_cjs.ie("smartart"),type:"smartArt",x:0,y:0,width:am.width,height:am.height,smartArtData:chunkS5V27BHI_cjs.jc(e,t,r=>chunkEWJAZ6TW_cjs.ie(`smartart-node-${r}`))};return se(o,n),o}function Ir(e,t){let n="[Equation]",o={id:chunkEWJAZ6TW_cjs.ie("equation"),type:"shape",x:0,y:0,width:im.width,height:im.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return se(o,t),o}function Lr(e,t){let n=chunkS5V27BHI_cjs.fc(e,chunkEWJAZ6TW_cjs.ie("actionbutton"));return n?(se(n,t),n):null}function Dr(e,t){return chunkS5V27BHI_cjs.ka(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Mr(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunkEWJAZ6TW_cjs.ie("field"),type:"shape",x:0,y:0,width:pm.width,height:pm.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return se(r,n),r}function sm(e,t,n){let o=new Set(t.map(({row:r,column:i})=>`${r}:${i}`));return {...e,rows:e.rows.map((r,i)=>({...r,cells:r.cells.map((a,p)=>o.has(`${i}:${p}`)?{...a,style:{...a.style,...n}}:a)}))}}function lm(e,t,n){switch(n){case "insertRowAbove":return chunkS5V27BHI_cjs.Q(e,t.row,"above");case "insertRowBelow":return chunkS5V27BHI_cjs.Q(e,t.row,"below");case "deleteRow":return chunkS5V27BHI_cjs.R(e,t.row);case "insertColumnLeft":return chunkS5V27BHI_cjs.S(e,t.column,"left");case "insertColumnRight":return chunkS5V27BHI_cjs.S(e,t.column,"right");case "deleteColumn":return chunkS5V27BHI_cjs.T(e,t.column)}}function dm(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100)),i=1-e.columnWidths[t],a=1-o;return {...e,columnWidths:e.columnWidths.map((p,s)=>s===t?o:i>0?p/i*a:p)}}function cm(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function mm(e,t){if(t.length<2)return e;let n=t.map(({row:l})=>l),o=t.map(({column:l})=>l),r=Math.min(...n),i=Math.max(...n),a=Math.min(...o),p=Math.max(...o);if(t.length!==(i-r+1)*(p-a+1))return e;let s=e.rows.map((l,m)=>({...l,cells:l.cells.map((c,u)=>m<r||m>i||u<a||u>p?c:m===r&&u===a?{...c,text:t.map(({row:x,column:g})=>e.rows[x]?.cells[g]?.text).filter(Boolean).join(" "),gridSpan:p>a?p-a+1:void 0,rowSpan:i>r?i-r+1:void 0}:{...c,text:"",hMerge:u>a||void 0,vMerge:m>r||void 0})}));return {...e,rows:s}}function um(e,t){let n=e.rows[t.row]?.cells[t.column],o=Math.max(1,n?.rowSpan??1),r=Math.max(1,n?.gridSpan??1),i=chunkS5V27BHI_cjs.U(e,t.row,t.column);return i?{...e,rows:i.map((a,p)=>({...a,cells:a.cells.map((s,l)=>p>=t.row&&p<t.row+o&&l>=t.column&&l<t.column+r?{...s,hMerge:void 0,vMerge:void 0}:s)}))}:e}var ob={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function Hr(e){return {setTextVerticalAlign:t=>e(n=>chunkS5V27BHI_cjs.Oa(n,t)),setTextWrap:t=>e(n=>chunkS5V27BHI_cjs.Ra(n,t)),setAutoFitMode:t=>e(n=>chunkS5V27BHI_cjs.Sa(n,t)),setTextAdvanced:t=>e(n=>chunkS5V27BHI_cjs.Na(n,t)),setTextStyle:(t,n)=>e(o=>"textStyle"in o?n&&o.textSegments?.length?{textSegments:chunkS5V27BHI_cjs.Ua(o.textSegments,n,t).newSegments}:{textStyle:{...o.textStyle,...t}}:{}),setFillOpacity:t=>e(n=>Te(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>Te(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunkS5V27BHI_cjs.Bc(n,t)),addGradientStop:(t,n)=>e(o=>chunkS5V27BHI_cjs.Cc(o,t,n)),removeGradientStop:t=>e(n=>chunkS5V27BHI_cjs.Dc(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunkS5V27BHI_cjs.Ec(o,t,n)),setImageBrightness:t=>e(n=>chunkS5V27BHI_cjs.Gc(n,{brightness:t})),setImageContrast:t=>e(n=>chunkS5V27BHI_cjs.Gc(n,{contrast:t})),setImageSaturation:t=>e(n=>chunkS5V27BHI_cjs.Gc(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunkS5V27BHI_cjs.Ic(o,{[ob[t]]:n})),setImageEffects:t=>e(n=>chunkEWJAZ6TW_cjs.g(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunkEWJAZ6TW_cjs.ue(n)})),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunkS5V27BHI_cjs.Kc(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunkS5V27BHI_cjs.Kc(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunkS5V27BHI_cjs.Lc(n,t)),setTableOptions:(t,n)=>e(o=>o.type!=="table"||!o.tableData?{}:{tableData:{...o.tableData,...t,rows:n?o.tableData.rows.map(r=>({...r,cells:r.cells.map(i=>({...i,style:{...i.style,...n}}))})):o.tableData.rows}}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,a)=>a===t?{...i,cells:i.cells.map((p,s)=>s===n?{...p,style:{...p.style,...o}}:p)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:sm(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:lm(o.tableData,t,n)}:{}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:dm(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:cm(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:mm(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:um(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:chunkEWJAZ6TW_cjs.Qe(o.smartArtData,t,n)}:{}),setSmartArtNodeStyle:(t,n)=>e(o=>o.type==="smartArt"&&o.smartArtData?{smartArtData:chunkEWJAZ6TW_cjs.We(o.smartArtData,t,n)}:{}),mutateSmartArtNode:(t,n)=>e(o=>{if(o.type!=="smartArt"||!o.smartArtData)return {};let r=o.smartArtData;return {smartArtData:n==="add"?chunkEWJAZ6TW_cjs.Oe(r,"New item"):n==="addChild"?chunkEWJAZ6TW_cjs.Ue(r,t,"New item"):n==="remove"?chunkEWJAZ6TW_cjs.Pe(r,t):n==="promote"?chunkEWJAZ6TW_cjs.Se(r,t):chunkEWJAZ6TW_cjs.Te(r,t)}}),setSmartArtLayout:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:chunkEWJAZ6TW_cjs.Sf(n.smartArtData,t)}:{}),setSmartArtColorScheme:t=>e(n=>n.type==="smartArt"&&n.smartArtData?{smartArtData:{...n.smartArtData,colorScheme:t}}:{})}}function Rr(e,t){let n=(o,r)=>{t.pushHistory(),e.set({sections:o,slides:r}),t.commitChange();};return {addSection(o,r=e.get().currentSlide){let i=e.get(),a=o.trim();if(!i.editable||!a||!i.slides[r])return null;let p=chunkS5V27BHI_cjs.sa(i.sections,i.slides,a,r),s=p.sections.find(l=>!i.sections.some(m=>m.id===l.id));return n(p.sections,p.slides),s?.id??null},renameSection(o,r){let i=e.get(),a=r.trim(),p=i.sections.find(l=>l.id===o);if(!i.editable||!p||!a||p.name===a)return;let s=chunkS5V27BHI_cjs.ta(i.sections,i.slides,o,a);n(s.sections,s.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(a=>a.id===o))return;let i=chunkS5V27BHI_cjs.ua(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),a=r==="up"?chunkS5V27BHI_cjs.va(i.sections,o):chunkS5V27BHI_cjs.wa(i.sections,o);!i.editable||a===i.sections||n(a,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let a=chunkS5V27BHI_cjs.xa(i.sections,i.slides,o,r);a.sections!==i.sections&&n(a.sections,a.slides);},toggleSection(o){let r=e.get();r.sections.some(i=>i.id===o)&&e.set({sections:r.sections.map(i=>i.id===o?{...i,collapsed:!i.collapsed}:i)});}}}function uo(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function Or(e){let{store:t,ops:n}=e;function o(r,i,a){let p=e.getHandler();p&&p.applyLayoutToSlide(r,i,[...t.get().slides]).then(s=>{let l=t.get();if(l.slides[r]?.id===a){n.pushHistory();let m=[...l.slides];m[r]=s,t.set({slides:m}),n.commitChange();}},()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,a=chunkS5V27BHI_cjs.za(i+1),p=uo([...r.slides.slice(0,i),a,...r.slides.slice(i)]);t.set({slides:p,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let a=r.currentSlide+1,p={...chunkEWJAZ6TW_cjs.Z(i),id:chunkS5V27BHI_cjs.ya()},s=r.templateElementsBySlideId[i.id]??[],l=uo([...r.slides.slice(0,a),p,...r.slides.slice(a)]);t.set({slides:l,templateElementsBySlideId:{...r.templateElementsBySlideId,[p.id]:s.map(chunkEWJAZ6TW_cjs.Y)},currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=uo(r.slides.filter((s,l)=>l!==r.currentSlide)),a=Math.min(r.currentSlide,i.length-1),p={...r.templateElementsBySlideId};delete p[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let a=t.get();if(!a.editable||!r)return;n.pushHistory();let p=a.currentSlide+1,s={...chunkS5V27BHI_cjs.za(p+1),layoutPath:r,...i?{layoutName:i}:{}},l=uo([...a.slides.slice(0,p),s,...a.slides.slice(p)]);t.set({slides:l,currentSlide:p,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(p,r,s.id);},applyLayout(r){let i=t.get(),a=i.slides[i.currentSlide];!i.editable||!a||!r||o(i.currentSlide,r,a.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide];!r.editable||!i?.layoutPath||o(r.currentSlide,i.layoutPath,i.id);}}}var nb=24;function xo(e,t){if(!pe(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function go(e,t){let n=Ee(e).listType;return xo(e,{listType:n===t?"none":t})}function bo(e,t){let n=Ee(e).paragraphMarginLeft,o=Math.max(0,n+t*nb);return xo(e,{paragraphMarginLeft:o})}function Fr(e,t){return xo(e,{align:t})}function Br(e,t){return xo(e,{lineSpacing:t})}function Vr(e){return {toggleBold:()=>e(t=>je(t,"bold")),toggleItalic:()=>e(t=>je(t,"italic")),toggleUnderline:()=>e(t=>je(t,"underline")),toggleStrikethrough:()=>e(t=>je(t,"strikethrough")),toggleTextShadow:()=>e(t=>Wn(t)),changeFontSize:t=>e(n=>Nn(n,t)),setFontSize:t=>e(n=>ao(n,t)),setFontFamily:t=>e(n=>_n(n,t)),setTextColor:t=>e(n=>zn(n,t)),setHighlightColor:t=>e(n=>Gn(n,t)),setCharacterSpacing:t=>e(n=>Un(n,t)),changeCase:t=>e(n=>$n(n,t)),clearFormatting:()=>e(t=>qn(t)),toggleBulletList:()=>e(t=>go(t,"bullet")),toggleNumberedList:()=>e(t=>go(t,"numbered")),increaseIndent:()=>e(t=>bo(t,1)),decreaseIndent:()=>e(t=>bo(t,-1)),setTextAlign:t=>e(n=>Fr(n,t)),setLineSpacing:t=>e(n=>Br(n,t))}}function Nr(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i){let a=t.get(),p=a.slides[a.currentSlide];if(!a.editable||!p)return;let s=Math.max(0,Math.round(r));if(n.pushHistory(),i){let l={type:o,durationMs:s};t.set({slides:sr(a.slides,{transition:l})});}else {let l={...p.transition,type:o,durationMs:s};t.set({slides:oe(a.slides,a.currentSlide,{transition:l})});}n.commitChange();}}}function zr(e){let{doc:t,store:n,ops:o}=e,r=rr(n,o),i=a=>{if(!a)return;let p=n.get();!p.editable||!p.slides[p.currentSlide]||(o.pushHistory(),n.set({slides:gt(p.slides,p.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {...Vr(r),...gr({store:n,ops:o,applyToSelected:r}),...fr({store:n,ops:o}),...Or({store:n,ops:o,getHandler:e.getHandler}),...br({store:n,ops:o}),...Nr({store:n,ops:o}),...lr({store:n,ops:o}),...Hr(r),...Er({store:n,ops:o}),...vr({store:n,ops:o,getHandler:e.getHandler}),sections:Rr(n,o),comments:nm({store:n,ops:o}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:a=>r(p=>Te(p,{fillColor:a,fillMode:"solid"})),setShapeStroke:a=>r(p=>Te(p,{strokeColor:a})),setShapeStrokeWidth:a=>r(p=>Te(p,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(p=>Te(p,a)),setShapeType:a=>r(p=>p.type==="shape"?{shapeType:a}:{}),setGeometry(a){r(()=>{let p={};return a.x!==void 0&&Number.isFinite(a.x)&&(p.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(p.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(p.width=Math.max(chunkEWJAZ6TW_cjs.Ha,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(p.height=Math.max(chunkEWJAZ6TW_cjs.Ha,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(p.rotation=a.rotation),p});},insert(a,p){let s=n.get();s.slides[s.currentSlide]&&i(Tr(a,s.canvasSize,p));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await mo(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await Pr(t,a.canvasSize));},insertChart(a){let p=n.get();p.slides[p.currentSlide]&&i(Ar(a,p.canvasSize));},insertSmartArt(a,p){let s=n.get();s.slides[s.currentSlide]&&i(kr(a,p,s.canvasSize));},insertEquation(a){let p=n.get();p.slides[p.currentSlide]&&i(Ir(a,p.canvasSize));},updateEquation:(a,p)=>o.updateEquation(a,p),insertActionButton(a){let p=n.get();p.slides[p.currentSlide]&&i(Lr(a,p.canvasSize));},insertField(a,p){let s=n.get();if(!s.slides[s.currentSlide])return;let l=p??Dr(a,{slideNumber:s.currentSlide+1});i(Mr(a,l,s.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),toggleViewOption(a){let p=n.get();n.set({[a]:!p[a]});for(let s of t.querySelectorAll(".pptxv"))s.classList.toggle(`pptxv-${a}`,!p[a]);},addGuide(a){let p=n.get();n.set({guides:[...p.guides,chunkS5V27BHI_cjs.kc(`guide-${Date.now()}`,a,p.canvasSize)]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await mo(t,n.get().canvasSize);!a||a.type!=="image"||r(p=>p.type==="image"?{imageData:a.imageData,imagePath:a.imagePath,svgData:a.svgData,svgPath:a.svgPath}:{});},resetSelectedImage:()=>r(a=>a.type==="image"?{imageEffects:void 0,cropLeft:void 0,cropTop:void 0,cropRight:void 0,cropBottom:void 0}:{})}}function Gr(e){let{store:t,ops:n}=e,o=(r,i)=>{i!==0&&(n.pushHistory(),t.set({slides:[...r]}),n.commitChange());};return {search(r,i){return r?chunkS5V27BHI_cjs.oc(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,a){let p=t.get();if(!p.editable||!r)return 0;let s=chunkS5V27BHI_cjs.oc(p.slides,r,{matchCase:a}),{slides:l,replacements:m}=chunkS5V27BHI_cjs.pc(p.slides,s,0,i);return o(l,m),m},replaceAll(r,i,a){let p=t.get();if(!p.editable||!r)return 0;let{slides:s,replacements:l}=chunkS5V27BHI_cjs.qc(p.slides,r,i,{matchCase:a});return o(s,l),l}}}var xm=1,gm=10,rb=new Set(["nw","ne","se","sw"]);function bm(e){return rb.has(e)}function _r(e,t,n,o=chunkEWJAZ6TW_cjs.Ha){if(!bm(n)||t.width<=0||t.height<=0)return e;let r=e.width/t.width,i=e.height/t.height,a=Math.abs(r-1)>=Math.abs(i-1)?r:i,p=t.width*a,s=t.height*a;if(p<o||s<o){let c=Math.max(o/t.width,o/t.height);p=t.width*c,s=t.height*c;}let l=n==="nw"||n==="sw",m=n==="nw"||n==="ne";return {x:l?t.x+t.width-p:t.x,y:m?t.y+t.height-s:t.y,width:p,height:s,rotation:e.rotation}}function Ur(e,t){let n=t?gm:xm;switch(e){case "ArrowLeft":return {dx:-n,dy:0};case "ArrowRight":return {dx:n,dy:0};case "ArrowUp":return {dx:0,dy:-n};case "ArrowDown":return {dx:0,dy:n};default:return null}}var ib=/^(?:INPUT|TEXTAREA|SELECT)$/u;function Wr(e){return t=>{if(!e.isActive())return;let n=t.target instanceof HTMLElement?t.target:null;if(n&&(ib.test(n.tagName)||n.isContentEditable))return;let o=t.ctrlKey||t.metaKey,r=t.key;if(r==="Escape"&&e.cancelFormatPainter()){t.preventDefault();return}if(o&&(r==="z"||r==="Z")){t.preventDefault(),t.shiftKey?e.redo():e.undo();return}if(o&&(r==="y"||r==="Y")){t.preventDefault(),e.redo();return}if(o&&(r==="v"||r==="V")){t.preventDefault(),e.paste();return}if(e.getSelectedId()===null)return;if(r==="Escape"){t.preventDefault(),e.deselect();return}if(r==="Delete"||r==="Backspace"){t.preventDefault(),e.deleteSelected();return}if(o&&(r==="d"||r==="D")){t.preventDefault(),e.duplicateSelected();return}if(o&&(r==="c"||r==="C")){t.preventDefault(),e.copySelected();return}if(o&&(r==="x"||r==="X")){t.preventDefault(),e.cutSelected();return}let i=Ur(r,t.shiftKey);i&&(t.preventDefault(),e.nudgeSelected(i.dx,i.dy));}}function fm(e,t){let n=e.store.get();!n.editable||!n.handoutMaster||n.handoutSlidesPerPage===t||(e.pushHistory(),e.store.set({handoutSlidesPerPage:t,handoutMaster:{...n.handoutMaster,slidesPerPage:t}}),e.commitChange());}function vm(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null}}function hm(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),a=te(i,t);if(a?.type!=="table"||!a.tableData?.rows[n]?.cells[o])return;e.pushHistory();let p=a.tableData.rows.map((s,l)=>({...s,cells:s.cells.map((m,c)=>l===n&&c===o?{...m,text:r,textRuns:void 0}:m)}));e.store.set(j(i,G(i).map(s=>s.id===t&&s.type==="table"?{...s,tableData:{...s.tableData,rows:p}}:s))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=te(o,t);!r||!chunkEWJAZ6TW_cjs.j(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(j(o,G(o).map(i=>i.id===t&&chunkEWJAZ6TW_cjs.j(i)?{...i,textSegments:i.textSegments?.map(a=>a.equationXml?{...a,equationXml:n}:a)}:i))),e.commitChange());}}}function $r(e){return !e||!chunkEWJAZ6TW_cjs.j(e)||e.locks?.noTextEdit?false:!e.textSegments?.some(t=>t.equationXml)}function qr(e,t){let n=chunkEWJAZ6TW_cjs.j(e)?e:void 0,o=n?.textSegments,r=n?.textStyle;return {text:t,textSegments:chunkS5V27BHI_cjs.Ya(t,o,r)}}function bt(e){let t="",n=o=>{for(let r of Array.from(o.childNodes)){if(r.nodeType===3){t+=r.nodeValue??"";continue}if(!(r instanceof HTMLElement))continue;if(r.tagName==="BR"){t+=`
7
7
  `;continue}(r.tagName==="DIV"||r.tagName==="P")&&t.length>0&&!t.endsWith(`
8
8
  `)&&(t+=`
9
9
  `),n(r);}};return n(e),t}function Kr(e){let{doc:t,overlayRoot:n,box:o,scale:r,element:i}=e,a=chunkEWJAZ6TW_cjs.j(i)?i:void 0,p=a?.text??"",s=a?.textStyle?.fontSize,l=a?.textStyle?.fontFamily,m=chunkS5V27BHI_cjs.Ke(t,"div","pptxv-inline-editor",{left:`${o.x*r}px`,top:`${o.y*r}px`,width:`${o.width*r}px`,minHeight:`${o.height*r}px`,...typeof s=="number"?{fontSize:`${s*r}px`}:{},...l!==void 0?{fontFamily:l}:{}});m.contentEditable="true",m.spellcheck=e.spellCheck??false,m.dataset.inlineEditor="",m.setAttribute("role","textbox"),m.setAttribute("aria-multiline","true"),a?.textSegments?.length?a.textSegments.forEach((g,v)=>{let h=t.createElement("span");h.dataset.segIdx=String(v),h.textContent=g.text,m.appendChild(h);}):m.textContent=p;let c=false,u=g=>{c||(c=true,m.remove(),g!==null&&g!==p&&e.onCommit(g),e.onClose());};m.addEventListener("input",()=>e.onInput?.(bt(m))),m.addEventListener("blur",()=>u(bt(m))),m.addEventListener("keydown",g=>{g.stopPropagation(),g.key==="Escape"&&(g.preventDefault(),u(bt(m)));}),m.addEventListener("pointerdown",g=>g.stopPropagation());let x=()=>e.onSelectionChange?.(chunkS5V27BHI_cjs.Ta(a?.textSegments));return m.addEventListener("keyup",x),m.addEventListener("pointerup",x),n.appendChild(m),m.focus(),{el:m,commit:()=>u(bt(m)),cancel:()=>u(null)}}var ab=100,pb=800;function jr(e){let{store:t}=e,n=new chunkS5V27BHI_cjs.qa({maxDepth:ab}),o=0,r=(u=t.get())=>u.selectedElementId?te(u,u.selectedElementId):void 0,i=(u,x=u?[u]:[])=>t.set(vm(u,x)),a=()=>({slides:lo(t.get().slides),sections:structuredClone(t.get().sections),coreProperties:structuredClone(t.get().coreProperties),appProperties:structuredClone(t.get().appProperties),customProperties:structuredClone(t.get().customProperties),templateElementsBySlideId:chunkS5V27BHI_cjs.W(t.get().templateElementsBySlideId),slideMasters:structuredClone(t.get().slideMasters),notesMaster:structuredClone(t.get().notesMaster),handoutMaster:structuredClone(t.get().handoutMaster),handoutSlidesPerPage:t.get().handoutSlidesPerPage,presentationProperties:structuredClone(t.get().presentationProperties),headerFooter:structuredClone(t.get().headerFooter),customShows:structuredClone(t.get().customShows)}),p=()=>{n.record(a(),""),o=0,e.onHistoryChange();},s=()=>{t.set({dirty:true}),e.onHistoryChange(),e.onChange?.();},l=(u,x)=>{let g=t.get(),v=G(g).map(h=>h.id===u?{...h,...x}:h);t.set(j(g,v));},m=u=>{u&&(t.set({slides:lo(u.slides),sections:structuredClone(u.sections),coreProperties:structuredClone(u.coreProperties),appProperties:structuredClone(u.appProperties),customProperties:structuredClone(u.customProperties),templateElementsBySlideId:chunkS5V27BHI_cjs.W(u.templateElementsBySlideId),slideMasters:structuredClone(u.slideMasters),notesMaster:structuredClone(u.notesMaster),handoutMaster:structuredClone(u.handoutMaster),handoutSlidesPerPage:u.handoutSlidesPerPage,presentationProperties:structuredClone(u.presentationProperties),headerFooter:structuredClone(u.headerFooter),customShows:structuredClone(u.customShows),interactionActive:false}),s());},c=hm({store:t,pushHistory:p,commitChange:s});return {selectedElement:r,select:i,pushHistory:p,commitChange:s,patchGeometry:l,deleteSelected(){let u=t.get(),x=u.selectedElementId;!u.editable||!x||!r(u)||(p(),t.set({...j(u,G(u).filter(g=>!u.selectedElementIds.includes(g.id))),selectedElementId:null,selectedElementIds:[]}),s());},duplicateSelected(){let u=t.get(),x=u.selectedElementId;if(!u.editable||!x)return null;let g=r(u);if(!g)return null;let v=chunkEWJAZ6TW_cjs.bi(g);return v.x+=20,v.y+=20,p(),t.set({...j(u,[...G(u),v]),selectedElementId:v.id,selectedElementIds:[v.id]}),s(),v.id},nudgeSelected(u,x){let g=t.get(),v=r(g),h=g.selectedElementId;if(!v||!h)return;let b=Date.now();b-o>pb&&p(),o=b,t.set(j(g,G(g).map(T=>T.id===h?{...T,x:v.x+u,y:v.y+x}:T))),s();},commitInlineText(u,x){let g=t.get(),v=te(g,u);v&&(p(),t.set(j(g,G(g).map(h=>h.id===u?{...h,...qr(v,x)}:h))),s());},commitNotes(u,x){let g=t.get(),v=g.slides[g.currentSlide];!g.editable||!v||v.notes===u&&x===void 0||(p(),t.set({slides:pr(g.slides,g.currentSlide,u,x)}),s());},setHandoutSlidesPerPage(u){fm({store:t,pushHistory:p,commitChange:s},u);},applyFormatPainter(u,x){let g=t.get(),v=te(g,u),h=te(g,x);return !g.editable||!v||!h||u===x?false:(p(),t.set(j(g,G(g).map(b=>b.id===x?chunkS5V27BHI_cjs.Xa(b,chunkS5V27BHI_cjs.Wa(v)):b))),s(),true)},...c,updateDocumentProperties(u,x,g){t.get().editable&&(p(),t.set({coreProperties:structuredClone(u),appProperties:structuredClone(x),customProperties:structuredClone(g)}),s());},updatePresentationProperties(u){t.get().editable&&(p(),t.set({presentationProperties:structuredClone(u)}),s());},updateSections(u){t.get().editable&&(p(),t.set({sections:structuredClone(u)}),s());},updateHeaderFooter(u){t.get().editable&&(p(),t.set({headerFooter:structuredClone(u)}),s());},updateCustomShows(u){t.get().editable&&(p(),t.set({customShows:structuredClone(u)}),s());},undo(){m(n.undo(a())?.snapshot);},redo(){m(n.redo(a())?.snapshot);},canUndo:()=>n.canUndo,canRedo:()=>n.canRedo,clearHistory(){n.clear(),o=0,e.onHistoryChange();},setHistoryDepth(u){n.setMaxDepth(u);},async save(u="pptx"){let x=e.getHandler();if(!x)throw new Error("No presentation is loaded.");let g=t.get(),v=await x.save(chunkS5V27BHI_cjs.Zc(g.slides,g.templateElementsBySlideId),{sections:g.sections.length>0?g.sections:void 0,coreProperties:g.coreProperties,appProperties:g.appProperties,customProperties:g.customProperties.length>0?g.customProperties:void 0,headerFooter:g.headerFooter,presentationProperties:g.presentationProperties,customShows:g.customShows.length?g.customShows:void 0,slideMasters:g.slideMasters,notesMaster:g.notesMaster,handoutMaster:g.handoutMaster,outputFormat:u});return t.set({dirty:false}),v}}}var ym=2;function Yr(e){let t=null,n=(l,m)=>({id:l,x:m.x,y:m.y,width:m.width,height:m.height,rotation:m.rotation??0});function o(l,m,c){let u=e.getScale(),x=chunkS5V27BHI_cjs.$(l.startBox,m,c,u);if(!x.rotation){let g=e.getSiblings(),v=chunkS5V27BHI_cjs.Aa(x.x,x.y,x.width,x.height,g,new Set([l.id]),[]);return [{...n(l.id,x),x:v.x,y:v.y},v.lines]}return [n(l.id,x),[]]}function r(l,m,c,u){let x=e.getScale(),g=l.handle;if(!g)return n(l.id,l.startBox);let v=chunkS5V27BHI_cjs.aa(l.startBox,g,m,c,x);return u&&(v=_r(v,l.startBox,g)),n(l.id,v)}function i(l,m){let c=e.getScale()||1,u=e.getStageOrigin(),x={x:(m.clientX-u.left)/c,y:(m.clientY-u.top)/c},g=chunkS5V27BHI_cjs.ba(chunkS5V27BHI_cjs._(l.startBox),x);return m.shiftKey&&(g=chunkS5V27BHI_cjs.ca(g)),{...n(l.id,l.startBox),rotation:g}}function a(l){let m=t;if(!m||l.pointerId!==m.pointerId)return;let c=l.clientX-m.startClientX,u=l.clientY-m.startClientY;if(!m.moved){if(Math.abs(c)<=ym&&Math.abs(u)<=ym)return;m.moved=true,e.onStart(m.id,m.kind);}let x=[],g;m.kind==="move"?[g,x]=o(m,c,u):m.kind==="resize"?g=r(m,c,u,l.shiftKey):g=i(m,l),m.last=g,e.onPreview(g,x);}function p(l){let m=t;!m||l.pointerId!==m.pointerId||(s(),t=null,e.onEnd(m.moved?m.last:null,m.moved,m.id));}function s(){window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p);}return {begin(l,m,c,u){let x=e.getElementBox(m);!x||t||(c.preventDefault(),c.stopPropagation(),t={kind:l,id:m,pointerId:c.pointerId,startClientX:c.clientX,startClientY:c.clientY,startBox:{...x},handle:u,moved:false,last:null},window.addEventListener("pointermove",a),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p));},isActive(){return t!==null},dispose(){s(),t=null;}}}function Sm(e){let{event:t,elementId:n,state:o,store:r,ops:i}=e;if(o.eyedropperActive){let m=t.target instanceof Element?t.target:null,c=m?getComputedStyle(m):null,u=c?.backgroundColor||c?.color;return u&&e.onEyedropper?.(u),r.set({eyedropperActive:false}),true}let a=t.target instanceof Element?t.target.closest("td"):null;if(!n||a?.dataset.rowIndex===void 0||a.dataset.cellIndex===void 0)return false;let p={row:Number(a.dataset.rowIndex),column:Number(a.dataset.cellIndex)},s=o.selectedTableCell,l=t.shiftKey&&o.selectedElementId===n&&s?sb(s,p):[p];return i.select(n,[n]),r.set({selectedTableCell:t.shiftKey&&s?s:p,selectedTableCells:l}),true}function Cm(e,t){return t?{...e,x:Math.round(e.x/10)*10,y:Math.round(e.y/10)*10}:e}function wm(e){return e.snapToShape?G(e).map(({id:t,x:n,y:o,width:r,height:i})=>({id:t,x:n,y:o,width:r,height:i})):[]}function sb(e,t){return Array.from({length:Math.abs(t.row-e.row)+1},(n,o)=>Array.from({length:Math.abs(t.column-e.column)+1},(r,i)=>({row:Math.min(e.row,t.row)+o,column:Math.min(e.column,t.column)+i}))).flat()}function Em(e,t,n){let o=e?.getBoundingClientRect();return o&&t>0?{x:(n.clientX-o.left)/t,y:(n.clientY-o.top)/t}:null}function Tm(e=300){let t=null;return (n,o,r)=>{if(n==="mouse"||!o)return t=null,false;let i=t!==null&&t.id===o&&r-t.time<e;return t=i?null:{id:o,time:r},i}}function Pm(e){let{doc:t,cell:n,element:o,row:r,column:i,ops:a}=e,p=t.createElement("input");p.type="text",p.className="pptxv-inline-editor pptxv-table-cell-editor",p.dataset.inlineEditor="",p.value=o.tableData?.rows[r]?.cells[i]?.text??"",Object.assign(p.style,{boxSizing:"border-box",width:"100%",height:"100%"});let s=t.createDocumentFragment();for(;n.firstChild;)s.appendChild(n.firstChild);n.appendChild(p);let l=false,m=u=>{u.composedPath().includes(p)||c(true);},c=u=>{l||(l=true,t.removeEventListener("pointerdown",m,true),u&&a.commitTableCell(o.id,r,i,p.value),n.isConnected?n.replaceChildren(u?t.createTextNode(p.value):s):p.remove());};return p.addEventListener("blur",()=>c(true)),p.addEventListener("pointerdown",u=>u.stopPropagation()),p.addEventListener("keydown",u=>{u.stopPropagation(),u.key==="Escape"?c(false):u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),c(true));}),t.addEventListener("pointerdown",m,true),p.focus(),p.select(),{close:c}}function fo(e){let t=e.elementId??ee(e.event.target,e.stage),n=t?te(e.state,t):void 0,o=n&&chunkEWJAZ6TW_cjs.j(n)?n.textSegments?.find(i=>i.equationXml)?.equationXml:void 0;if(t&&o&&e.onEditEquation)return e.onEditEquation(t,o),{handled:true,tableSession:null};let r=e.cell??(e.event.target instanceof Element?e.event.target.closest("td"):null);return !r||n?.type!=="table"||!e.overlay?{handled:false,tableSession:null}:{handled:true,tableSession:Pm({doc:e.doc,cell:r,element:n,row:Number(r.dataset.rowIndex),column:Number(r.dataset.cellIndex),ops:e.ops})}}var lb=500;function db(e,t){return e.pointerType!=="touch"?null:(e.target instanceof Element?e.target.closest("td"):null)??t.elementsFromPoint?.(e.clientX,e.clientY).find(o=>o.localName==="td")??null}function Am(e,t,n){let o=db(e,t),r=ee(e.target,n)??ee(o,n);return {cell:o,id:r}}function km(){let e=null;return (t,n,o)=>{if(t.pointerType!=="touch"||!(t.target instanceof Element))return e=null,false;let r=o??t.target.closest("td");if(!r||!n)return e=null,false;let i=`${n}:${r.dataset.rowIndex}:${r.dataset.cellIndex}`,a=e?.key===i&&t.timeStamp-e.time<=lb;return e=a?null:{key:i,time:t.timeStamp},a}}function Im(e){let t=km(),n=o=>{let r=e.getState();if(!r.editable||r.presenting||o.button!==0)return;let{cell:i,id:a}=Am(o,e.doc,e.getStage());if(!i||!t(o,a,i))return;let p=fo({event:o,state:r,doc:e.doc,stage:e.getStage(),overlay:e.getOverlay(),ops:e.ops,elementId:a,cell:i,onEditEquation:e.onEditEquation});p.handled&&(o.preventDefault(),o.stopPropagation(),e.onOpen(p.tableSession));};return e.doc.addEventListener("pointerdown",n,true),()=>e.doc.removeEventListener("pointerdown",n,true)}function Lm(e){let{doc:t,store:n,ops:o}=e,r=null,i=null,a=Im({doc:t,getState:n.get,getStage:e.getStageRoot,getOverlay:()=>e.getOverlay()?.root??null,ops:o,onOpen:S=>i=S,onEditEquation:e.onEditEquation}),p=[],s=null,l="move",m=null,c=S=>{let f=n.get(),C=G(f).filter(P=>f.selectedElementIds.includes(P.id));if(C.length>1&&f.selectedElementIds.includes(S))return chunkS5V27BHI_cjs.fa(C)??void 0;let y=te(f,S);return y?{x:y.x,y:y.y,width:y.width,height:y.height,rotation:y.rotation??0}:void 0},u=Yr({getScale:e.getScale,getElementBox:c,getSiblings:()=>wm(n.get()),getStageOrigin(){let S=e.getOverlay()?.root.getBoundingClientRect();return {left:S?.left??0,top:S?.top??0}},onStart(S,f){let C=n.get();l=f,p=G(C).filter(y=>C.selectedElementIds.includes(y.id)).map(({id:y,x:P,y:E,width:w,height:A,rotation:I})=>({id:y,x:P,y:E,width:w,height:A,rotation:I})),s=chunkS5V27BHI_cjs.fa(p),o.pushHistory(),n.set({interactionActive:true});},onPreview(S,f){if(S=Cm(S,n.get().snapToGrid),p.length>1&&s&&l!=="rotate"){let C=l==="move"?chunkS5V27BHI_cjs.ga(p,S.x-s.x,S.y-s.y):chunkS5V27BHI_cjs.ha(p,s,S);for(let y of C)o.patchGeometry(y.id,{...y,rotation:y.rotation??0});}else o.patchGeometry(S.id,S);e.getOverlay()?.setSnapLines(f,e.getScale());},onEnd(S,f,C){e.getOverlay()?.setSnapLines([],1),S&&p.length<=1&&o.patchGeometry(C,S),n.set({interactionActive:false}),f&&o.commitChange();}}),x=S=>Em(e.getOverlay()?.root,e.getScale(),S),g=S=>{if(!m||S.pointerId!==m.pointerId)return;let f=x(S),C=n.get(),y=f?chunkS5V27BHI_cjs.da({startX:m.startX,startY:m.startY,currentX:f.x,currentY:f.y},G(C)):[],P=m.additive?chunkS5V27BHI_cjs.ea(C.selectedElementIds,y):y;m.el.remove(),m=null,window.removeEventListener("pointermove",v),window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g),o.select(P.at(-1)??null,P);},v=S=>{if(!m||S.pointerId!==m.pointerId)return;let f=x(S);f&&(m.el.style.left=`${Math.min(m.startX,f.x)*e.getScale()}px`,m.el.style.top=`${Math.min(m.startY,f.y)*e.getScale()}px`,m.el.style.width=`${Math.abs(f.x-m.startX)*e.getScale()}px`,m.el.style.height=`${Math.abs(f.y-m.startY)*e.getScale()}px`);},h=Tm(),b=S=>{i?.close(S),i=null;let f=r;r=null,S?f?.commit():f?.cancel();},T=S=>{let f=n.get(),C=te(f,S),y=e.getOverlay();!C||!$r(C)||!y||r||(o.select(S),y.setEditing(true),r=Kr({doc:t,overlayRoot:y.root,box:{x:C.x,y:C.y,width:C.width,height:C.height,rotation:C.rotation??0},scale:e.getScale(),element:C,spellCheck:f.spellCheckEnabled,onInput:P=>e.onInlineTextInput?.(S,P),onCommit:P=>{e.flushInlineTextInput?.(),o.commitInlineText(S,P);},onSelectionChange:P=>n.set({selectedTextRange:P}),onClose(){r=null,e.getOverlay()?.setEditing(false);}}));},k=(S,f)=>{let C=n.get(),y=fo({event:S,state:C,doc:t,ops:o,stage:e.getStageRoot(),overlay:e.getOverlay()?.root??null,onEditEquation:e.onEditEquation});if(y.handled){i=y.tableSession;return}f&&chunkS5V27BHI_cjs.Xc(f,C.editTemplateMode)&&T(f);};return {onStagePointerDown(S){let f=n.get();if(!f.editable||f.presenting||S.button!==0)return;let C=ee(S.target,e.getStageRoot());if((r||i)&&b(true),Sm({event:S,elementId:C,state:f,store:n,ops:o,onEyedropper:e.onEyedropper}))return;if(f.formatPainterSourceId){C&&chunkS5V27BHI_cjs.Xc(C,f.editTemplateMode)&&o.applyFormatPainter(f.formatPainterSourceId,C),n.set({formatPainterSourceId:null});return}let y=C!==null&&chunkS5V27BHI_cjs.Xc(C,f.editTemplateMode);if(h(S.pointerType,y?C:null,S.timeStamp||Date.now())){S.preventDefault(),k(S,C);return}if(!y){let P=x(S),E=e.getOverlay();if(!P||!E)return;let w=t.createElement("div");w.className="pptxv-marquee",E.root.appendChild(w),m={pointerId:S.pointerId,startX:P.x,startY:P.y,additive:S.shiftKey,el:w},window.addEventListener("pointermove",v),window.addEventListener("pointerup",g),window.addEventListener("pointercancel",g);return}if(S.shiftKey){let P=f.selectedElementIds.includes(C)?f.selectedElementIds.filter(E=>E!==C):[...f.selectedElementIds,C];o.select(P.at(-1)??null,P);return}(f.selectedElementId!==C||f.selectedElementIds.length!==1)&&o.select(C,[C]),u.begin("move",C,S);},onStagePointerMove(S){if(!e.onCursorMove)return;let f=e.getOverlay()?.root.getBoundingClientRect(),C=e.getScale();!f||!(C>0)||e.onCursorMove((S.clientX-f.left)/C,(S.clientY-f.top)/C);},onStageDblClick(S){let f=n.get();if(!f.editable||f.presenting||r||i)return;let C=ee(S.target,e.getStageRoot());k(S,C);},beginHandleGesture(S,f,C){let y=n.get().selectedElementId;y&&u.begin(S,y,f,C);},closeInline:b,inlineActive:()=>r!==null||i!==null,dispose(){b(false),a(),u.dispose(),m?.el.remove(),window.removeEventListener("pointermove",v),window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g);}}}var Xr=24,cb={nw:"nwse-resize",n:"ns-resize",ne:"nesw-resize",e:"ew-resize",se:"nwse-resize",s:"ns-resize",sw:"nesw-resize",w:"ew-resize"},mb={nw:{fx:0,fy:0},n:{fx:.5,fy:0},ne:{fx:1,fy:0},e:{fx:1,fy:.5},se:{fx:1,fy:1},s:{fx:.5,fy:1},sw:{fx:0,fy:1},w:{fx:0,fy:.5}};function Zr(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-editor-overlay"),r=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-sel-box");r.hidden=true,o.appendChild(r);let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-rotate-stem",{left:"50%",top:`${-Xr}px`,height:`${Xr}px`});r.appendChild(i);let a=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-rotate-knob",{left:"50%",top:`${-Xr}px`});a.type="button",a.setAttribute("data-pptx-compact",""),a.setAttribute("aria-label",t("pptx.selectionOverlay.rotate")),a.addEventListener("pointerdown",s=>n.onRotatePointerDown(s)),r.appendChild(a);for(let s of chunkS5V27BHI_cjs.Z){let{fx:l,fy:m}=mb[s],c=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-sel-handle",{left:`${l*100}%`,top:`${m*100}%`,cursor:cb[s]});c.type="button",c.setAttribute("data-pptx-compact",""),c.dataset.handle=s,c.setAttribute("aria-label",t("pptx.selectionOverlay.resize",{handle:s})),c.addEventListener("pointerdown",u=>n.onHandlePointerDown(s,u)),r.appendChild(c);}let p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-snap-layer");return o.appendChild(p),{root:o,mount(s){(o.parentElement!==s||s.lastElementChild!==o)&&s.appendChild(o);},setBox(s,l){if(!s){r.hidden=true;return}r.hidden=false,r.style.left=`${s.x*l}px`,r.style.top=`${s.y*l}px`,r.style.width=`${s.width*l}px`,r.style.height=`${s.height*l}px`,r.style.transform=s.rotation?`rotate(${s.rotation}deg)`:"none";},setSnapLines(s,l){p.replaceChildren();for(let m of s){let c=chunkS5V27BHI_cjs.Ke(e,"div",`pptxv-snap-line pptxv-snap-${m.axis==="v"?"v":"h"}`);m.axis==="v"?c.style.left=`${m.position*l}px`:c.style.top=`${m.position*l}px`,p.appendChild(c);}},setEditing(s){o.classList.toggle("is-editing",s);},destroy(){o.remove();}}}var ub={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12"};function Qr(e){let{doc:t,store:n}=e,o=null,r=null,i=null,a=()=>{let b={editable:n.get().editable,canUndo:p.canUndo(),canRedo:p.canRedo()};e.getChrome().ribbon?.setEditState(b),e.getChrome().titleBar?.setEditState(b),e.getChrome().mobileToolbar?.setEditState(b);},p=jr({store:n,getHandler:e.getHandler,onChange:e.onChange,onHistoryChange:()=>a()}),s=zr({doc:t,store:n,ops:p,getHandler:e.getHandler}),l=Gr({store:n,ops:p}),m=Jc({store:n,getChrome:e.getChrome,selectedElement:b=>p.selectedElement(b)}),c=Lm({doc:t,store:n,ops:p,getScale:e.getScale,getOverlay:()=>o,getStageRoot:()=>r?.querySelector(".pptxv-stage")??null,onCursorMove:e.onCursorMove,onInlineTextInput:e.onInlineTextInput,flushInlineTextInput:e.flushInlineTextInput,onEditEquation:(b,T)=>e.getChrome().ribbon?.openEquationEditor(b,T),onEyedropper:b=>s.setShapeFill(b)}),u=Cr({store:n,editActions:s,interactions:c,getScale:e.getScale,getStageOrigin(){let b=o?.root.getBoundingClientRect();return {left:b?.left??0,top:b?.top??0}},getStageRoot:()=>r?.querySelector(".pptxv-stage")??null}),x=()=>{if(m(),!o)return;let b=n.get(),T=b.editable&&!b.presenting?G(b).filter(k=>b.selectedElementIds.includes(k.id)):[];o.setBox(em(T),e.getScale()),Qc(t,o.root,b.guides,e.getScale());},g=Wr({isActive:()=>{let b=n.get();return b.editable&&!b.presenting&&!c.inlineActive()},getSelectedId:()=>n.get().selectedElementId,deselect:()=>p.select(null),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>{p.duplicateSelected();},copySelected:()=>s.copy(),cutSelected:()=>s.cut(),paste:()=>s.paste(),nudgeSelected:(b,T)=>p.nudgeSelected(b,T),undo:()=>p.undo(),redo:()=>p.redo(),cancelFormatPainter:()=>n.get().formatPainterSourceId?(n.set({formatPainterSourceId:null}),true):false}),v=()=>{c.closeInline(true),r?.removeEventListener("pointerdown",u.onStagePointerDown),r?.removeEventListener("pointermove",c.onStagePointerMove),r?.removeEventListener("dblclick",u.onStageDblClick),i?.removeEventListener("keydown",g),r=null,i=null,o?.destroy(),o=null;},h=n.subscribe((b,T)=>{if(b.currentSlide!==T.currentSlide&&(c.closeInline(true),b.selectedElementId)){p.select(null);return}if((b.slides!==T.slides||b.templateElementsBySlideId!==T.templateElementsBySlideId||b.slideMasters!==T.slideMasters||b.notesMaster!==T.notesMaster||b.handoutMaster!==T.handoutMaster)&&b.selectedElementId&&!p.selectedElement(b)){p.select(null);return}b.editable!==T.editable&&(b.editable||(c.closeInline(true),b.selectedElementId&&p.select(null)),a()),(b.drawTool!==T.drawTool||b.editable!==T.editable)&&u.syncCursor(r),x();});return {attachChrome(){v();let b=e.getChrome();o=Zr(t,e.getTranslator(),{onHandlePointerDown(T,k){c.beginHandleGesture("resize",k,T);},onRotatePointerDown(T){c.beginHandleGesture("rotate",T);}}),r=b.stageWrap,i=b.root,r.addEventListener("pointerdown",u.onStagePointerDown),r.addEventListener("pointermove",c.onStagePointerMove),r.addEventListener("dblclick",u.onStageDblClick),i.addEventListener("keydown",g),o.mount(r),a(),u.syncCursor(r),x();},detachChrome:v,onStageRendered(){o&&r&&(o.mount(r),x());},capturesKeyboard(){let b=n.get();return b.editable&&(b.selectedElementId!==null||c.inlineActive())},reset(){c.closeInline(false),u.dispose(),p.clearHistory(),n.set({selectedElementId:null,selectedElementIds:[],dirty:false,interactionActive:false,drawTool:"select",formatPainterSourceId:null,editTemplateMode:false,masterViewTarget:null,masterViewTab:"slides"}),a();},setEditable(b){n.set({editable:b,...b?{}:{editTemplateMode:false,selectedElementId:null,selectedElementIds:[]}});},undo:()=>p.undo(),redo:()=>p.redo(),canUndo:()=>p.canUndo(),canRedo:()=>p.canRedo(),setHistoryDepth:b=>p.setHistoryDepth(b),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>p.duplicateSelected(),getSelectedElementId:()=>n.get().selectedElementId,selectElements:b=>p.select(b.at(-1)??null,b),applyElementPatch(b,T){let k=n.get();!k.editable||!G(k).some(S=>S.id===b)||(p.pushHistory(),n.set(j(k,G(k).map(S=>S.id===b?{...S,...T}:S))),p.commitChange());},commitSlides(b,T=n.get().currentSlide){n.get().editable&&(p.pushHistory(),n.set({slides:b,currentSlide:Math.max(0,Math.min(T,b.length-1)),selectedElementId:null,selectedElementIds:[]}),p.commitChange());},setDrawTool:b=>u.setTool(b),setDrawColor:b=>u.setColor(b),setDrawWidth:b=>u.setWidth(b),getEditActions:()=>s,getFindReplaceActions:()=>l,commitNotes:(b,T)=>p.commitNotes(b,T),setHandoutSlidesPerPage:b=>p.setHandoutSlidesPerPage(b),updateDocumentProperties:(b,T,k)=>p.updateDocumentProperties(b,T,k),updatePresentationProperties:b=>p.updatePresentationProperties(b),updateSections:b=>p.updateSections(b),updateHeaderFooter:b=>p.updateHeaderFooter(b),updateCustomShows:b=>p.updateCustomShows(b),save:b=>p.save(b),async downloadAs(b,T=`presentation.${b}`){let k=await p.save(b);chunkS5V27BHI_cjs.je(new Blob([k],{type:ub[b]}),T);},async downloadPptx(b="presentation.pptx"){await this.downloadAs("pptx",b);},async packageForSharing(b="presentation.pptx"){let T=await p.save("pptx"),k=await hr(T,b);chunkS5V27BHI_cjs.je(k,`${b.replace(/\.pptx$/iu,"")}-package.zip`);},destroy(){h(),c.dispose(),u.dispose(),v();}}}function xb(e,t){let{width:n,height:o}=chunkS5V27BHI_cjs.ne(e.width,e.height,t),r=e;if(n!==e.width||o!==e.height){let a=e.ownerDocument.createElement("canvas");a.width=n,a.height=o;let p=a.getContext("2d");if(!p)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");p.drawImage(e,0,0,n,o),r=a;}let i=r.getContext("2d");if(!i)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");return {imageData:i.getImageData(0,0,n,o),width:n,height:o}}async function Jr(e,t={}){let{slideDurationMs:n=2e3,slideTimingsMs:o,maxDimension:r=1920,onProgress:i,signal:a}=t,p=e.store.get().slides.length;if(p===0)return;let s=chunkS5V27BHI_cjs.me({totalSlides:p,slideDurationMs:n,slideTimingsMs:o}),l=[];for(let u of s){if(a?.aborted)throw chunkS5V27BHI_cjs.xb();i?.(u.slideIndex,p);let x=await e.rasterizeSlide(u.slideIndex);l.push({...xb(x,r),delayCs:u.delayCs});}let m=chunkS5V27BHI_cjs.oe(l,s[0].delayCs);i?.(p,p);let c=new ArrayBuffer(m.byteLength);new Uint8Array(c).set(m),chunkS5V27BHI_cjs.je(new Blob([c],{type:"image/gif"}),`${e.baseName}.gif`);}function vo(e,t,n,o={}){return chunkEWJAZ6TW_cjs.yj.exportSlide(e,t,n,o)}function Dm(e,t={}){return chunkEWJAZ6TW_cjs.yj.exportAll(e,t)}function gb(e){let t=window.open("","_blank","noopener,noreferrer");return t?(t.document.open(),t.document.write(e),t.document.close(),t.focus(),setTimeout(()=>{t.print();},300),true):false}async function ti(e,t={}){let{onProgress:n,signal:o,openPrintWindow:r,...i}=t,a=r??gb,p=e.store.get(),s=p.slides,l=chunkS5V27BHI_cjs.se(i,s.length),m=chunkS5V27BHI_cjs.ue(l.colorMode),c=chunkS5V27BHI_cjs.te(l.slideRange,p.currentSlide,s.length,l.customRangeFrom,l.customRangeTo);if(l.printWhat==="outline"){let v=`<div class="outline-page">${chunkS5V27BHI_cjs.we(c,s)}</div>`;return a(ei("Outline",v,l,m))}if(c.length===0)return false;if(l.printWhat==="slides"){let{width:v,height:h}=p.canvasSize,b=[];for(let T=0;T<c.length;T++){if(o?.aborted)throw chunkS5V27BHI_cjs.xb();n?.(T,c.length),b.push(vo(s[c[T]],v,h));}return n?.(c.length,c.length),a(chunkS5V27BHI_cjs.pe(b,v,h,{title:"Slides (Vector)",orientation:l.orientation,colorFilter:m}))}let u=[];for(let v=0;v<c.length;v++){if(o?.aborted)throw chunkS5V27BHI_cjs.xb();n?.(v,c.length);let h=await e.rasterizeSlide(c[v]);u.push(h.toDataURL("image/png"));}if(n?.(c.length,c.length),l.printWhat==="notes"){let v=chunkS5V27BHI_cjs.xe(u,c,s);return a(ei("Notes Pages",v,l,m))}let x=chunkS5V27BHI_cjs.ye(u,c,l.slidesPerPage),g=`Handout ${l.slidesPerPage} per page`;return a(ei(g,x,l,m))}function ei(e,t,n,o){return chunkS5V27BHI_cjs.ze({title:e,bodyHtml:t,orientation:n.orientation,colorFilter:o,frameSlides:n.frameSlides})}function bb(e){return new Promise(t=>{setTimeout(t,e);})}async function fb(e,t){let n=document.createElement("canvas");n.width=e[0].width,n.height=e[0].height;let o=n.getContext("2d");if(!o)throw new Error("[pptx-vanilla-viewer] video export failed: 2D context unavailable");let r=n.captureStream(t.fps),i=new MediaRecorder(r,{mimeType:chunkS5V27BHI_cjs.Ce([...chunkS5V27BHI_cjs.Be]),videoBitsPerSecond:t.videoBitsPerSecond}),a=[];i.ondataavailable=m=>{m.data.size>0&&a.push(m.data);};let p=new Promise((m,c)=>{i.onstop=()=>{m();},i.onerror=()=>{c(new Error("[pptx-vanilla-viewer] video export failed: MediaRecorder error"));};});i.start();let s=chunkS5V27BHI_cjs.Ae({totalSlides:e.length,slideDurationMs:t.slideDurationMs,slideTimingsMs:t.slideTimingsMs,fps:t.fps}),l=chunkS5V27BHI_cjs.De(t.fps);for(let m of s){t.onRecordProgress?.(m.slideIndex,s.length);for(let c=0;c<m.frameCount;c++){if(t.signal?.aborted)throw i.stop(),chunkS5V27BHI_cjs.xb();o.drawImage(e[m.slideIndex],0,0),await t.waitMs(l);}}return i.stop(),await p,new Blob(a,{type:"video/webm"})}async function oi(e,t={}){let{slideDurationMs:n=3e3,slideTimingsMs:o,fps:r=30,videoBitsPerSecond:i=5e6,onProgress:a,onRecordProgress:p,signal:s}=t,l=e.store.get().slides.length;if(l===0)return;let m=[];for(let u=0;u<l;u++){if(s?.aborted)throw chunkS5V27BHI_cjs.xb();a?.(u,l),m.push(await e.rasterizeSlide(u));}let c=await fb(m,{slideDurationMs:n,slideTimingsMs:o,fps:r,videoBitsPerSecond:i,onRecordProgress:p,signal:s,waitMs:e.waitMs??bb});a?.(l,l),chunkS5V27BHI_cjs.je(c,`${e.baseName}.webm`);}function vb(e){if(e===void 0)return "presentation";let t=e.trim().replace(/\.(?:pptx|pdf|png|gif|webm)$/iu,"");return t===""?"presentation":t}function ni(e){let t=false,n={store:e.store,rasterizeSlide:e.rasterizeSlide,baseName:vb(e.fileName)};async function o(p,s){if(t)return p;t=true;try{return await s()}finally{t=false;}}async function r(p){let s=e.store.get(),l=p??s.currentSlide;if(!(l<0||l>=s.slides.length))return o(void 0,async()=>{let m=await e.rasterizeSlide(l);chunkS5V27BHI_cjs.ke(m.toDataURL("image/png"),`${n.baseName}-slide-${l+1}.png`);})}async function i(p){let s=e.store.get(),l=p??s.currentSlide;if(!(l<0||l>=s.slides.length||typeof ClipboardItem>"u"||!navigator.clipboard?.write))return o(void 0,async()=>{let m=await e.rasterizeSlide(l),c=await new Promise(u=>{m.toBlob(u,"image/png");});c&&await navigator.clipboard.write([new ClipboardItem({"image/png":c})]);})}async function a(p={}){let s=e.store.get();if(s.slides.length===0)return;let{onProgress:l,signal:m}=p;return o(void 0,async()=>{let{jsPDF:c}=await import('jspdf'),{width:u,height:x}=s.canvasSize,g=u>=x?"landscape":"portrait",v=new c({orientation:g,unit:"px",format:[u,x],compress:!0}),h=s.slides.length;for(let b=0;b<h;b++){if(m?.aborted)throw chunkS5V27BHI_cjs.xb();l?.(b,h);let T=await e.rasterizeSlide(b);b>0&&v.addPage([u,x],g),v.addImage(T.toDataURL("image/png"),"PNG",0,0,u,x);}v.save(`${n.baseName}.pdf`);})}return {exportSlidePng:r,copySlideAsImage:i,exportPdf:a,exportGif:p=>o(void 0,()=>Jr(n,p)),exportVideo:p=>o(void 0,()=>oi(n,p)),print:p=>o(false,()=>ti(n,p))}}async function ri(e,t={}){let{default:n}=await import('html2canvas-pro'),o=t.onclone;return n(e,{...t,onclone:async(r,i)=>{await chunkS5V27BHI_cjs.re(r,i),chunkS5V27BHI_cjs.qe(i),typeof o=="function"&&o(r,i);}})}function hb(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()));})}function ii(e){let t=chunkS5V27BHI_cjs.Ke(e.doc,"div","pptxv-export-stage",{position:"fixed",left:"-99999px",top:"0",pointerEvents:"none",opacity:"0"});t.setAttribute("aria-hidden","true"),e.container.appendChild(t);let n=e.waitForFrame??hb;async function o(r){let i=e.store.get(),a=i.slides[r];if(!a)throw new Error(`Export failed: no slide at index ${r}`);t.replaceChildren();let p=chunkS5V27BHI_cjs.Ne({document:e.doc,slide:a,canvasSize:i.canvasSize,mediaDataUrls:i.mediaDataUrls,registry:e.registry,t:e.getTranslator(),scale:1,smartArt3D:e.smartArt3D,presenting:false});return t.appendChild(p),await n(),ri(p,{backgroundColor:"#ffffff",scale:2,width:i.canvasSize.width,height:i.canvasSize.height,logging:false})}return {rasterizeSlide:o,destroy(){t.remove();}}}var ft=class{async exportSlidePng(t){return this.exporter.exportSlidePng(t)}async copySlideAsImage(t){return this.exporter.copySlideAsImage(t)}async exportPdf(t){return this.exporter.exportPdf(t)}async exportGif(t){return this.exporter.exportGif(t)}async exportVideo(t){return this.exporter.exportVideo(t)}async print(t){return this.exporter.print(t)}};function ai(e){let t=ii(e),n=ni({store:e.store,rasterizeSlide:o=>t.rasterizeSlide(o)});return {exportSlidePng:o=>n.exportSlidePng(o),copySlideAsImage:o=>n.copySlideAsImage(o),exportPdf:o=>n.exportPdf(o),exportGif:o=>n.exportGif(o),exportVideo:o=>n.exportVideo(o),print:o=>n.print(o),destroy:()=>t.destroy()}}function yb(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/gu,(n,o)=>{let r=t[o];return r===void 0?n:String(r)}):e}function vt(e="en",t){let n=t?.[e],o=e!=="en"?t?.en:void 0;return (r,i)=>{let a=n?.[r]??o?.[r]??chunkS5V27BHI_cjs.Pe[r]??chunkS5V27BHI_cjs.Qe(r);return yb(a,i)}}async function pi(e){if(typeof e=="string"){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch presentation (${t.status}) from ${e}`);return t.arrayBuffer()}if(e instanceof Blob)return e.arrayBuffer();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}return e}async function ht(e){let t=new chunkEWJAZ6TW_cjs.Ih,n=[];try{let o=await t.load(e),r=await Sb(t,o.slides,n),i=await Cb(t,o.slides);return {handler:t,slides:i,sections:o.sections??[],presentationProperties:o.presentationProperties??{},headerFooter:o.headerFooter??{},coreProperties:o.coreProperties,appProperties:o.appProperties,customProperties:o.customProperties??[],customShows:o.customShows??[],embeddedFonts:o.embeddedFonts??[],hasDigitalSignatures:o.hasDigitalSignatures??!1,digitalSignatureCount:o.digitalSignatureCount??0,isPasswordProtected:o.isPasswordProtected??!1,canvasSize:{width:o.width??chunkS5V27BHI_cjs.j,height:o.height??chunkS5V27BHI_cjs.k},mediaDataUrls:r,colorScheme:o.theme?.colorScheme,fontScheme:o.theme?.fontScheme,tableStyleMap:o.tableStyleMap,slideMasters:o.slideMasters??[],themeOptions:o.themeOptions??[],notesMaster:o.notesMaster,handoutMaster:o.handoutMaster,hasMacros:o.hasMacros??!1,notesCanvasSize:typeof o.notesWidthEmu=="number"&&typeof o.notesHeightEmu=="number"&&o.notesWidthEmu>0&&o.notesHeightEmu>0?{width:Math.round(o.notesWidthEmu/9525),height:Math.round(o.notesHeightEmu/9525)}:void 0,blobUrls:n}}catch(o){throw Me(n),t.dispose(),o}}function Me(e){for(let t of e)t.startsWith("blob:")&&URL.revokeObjectURL(t);}async function Sb(e,t,n){let o=[];for(let i of t)chunkS5V27BHI_cjs.h(i.elements,o);let r=new Map;return await Promise.all(o.map(async i=>{let a=i.mediaPath;if(!a){i.mediaMissing=true;return}try{if(i.mediaType==="audio"||i.mediaType==="video"){let s=await e.getMediaArrayBuffer(a);if(s){let l=i.mediaMimeType||"application/octet-stream",m=URL.createObjectURL(new Blob([s],{type:l}));n.push(m),r.set(a,m);}else i.mediaMissing=!0;}else {let s=await e.getImageData(a);s?r.set(a,s):i.mediaMissing=!0;}}catch{i.mediaMissing=true;}})),r}async function Cb(e,t){let{paths:n,refs:o}=chunkS5V27BHI_cjs.i(t);if(n.size===0)return t;let r=new Map;await Promise.all(Array.from(n).map(async p=>{try{let s=await e.getImageData(p);s&&r.set(p,s);}catch{}}));let i=new Map;for(let p of o){let s=r.get(p.path);if(!s)continue;let l=i.get(p.element.id)??{};l[p.field]=s,i.set(p.element.id,l);}if(i.size===0)return t;let a=p=>{let s=false,l=p.map(m=>{let c=m,u=i.get(m.id);if(u&&(c={...m,...u}),c.type==="group"&&c.children?.length){let x=a(c.children);x!==c.children&&(c={...c,children:x});}return c!==m&&(s=true),c});return s?l:p};return t.map(p=>{let s=a(p.elements);return s===p.elements?p:{...p,elements:s}})}function ho(e){let t=e,n=new Set;return {get:()=>t,set:o=>{let r=false;for(let a of Object.keys(o))if(o[a]!==t[a]){r=true;break}if(!r)return;let i=t;t={...t,...o};for(let a of Array.from(n))a(t,i);},subscribe:o=>(n.add(o),()=>{n.delete(o);})}}function yo(){return {slides:[],sections:[],presentationProperties:{},headerFooter:{},coreProperties:void 0,appProperties:void 0,customProperties:[],customShows:[],embeddedFonts:[],hasDigitalSignatures:false,digitalSignatureCount:0,isPasswordProtected:false,templateElementsBySlideId:{},slideMasters:[],themeOptions:[],notesMaster:void 0,notesCanvasSize:void 0,handoutMaster:void 0,hasMacros:false,masterViewTab:"slides",handoutSlidesPerPage:4,masterViewTarget:null,canvasSize:{width:chunkS5V27BHI_cjs.j,height:chunkS5V27BHI_cjs.k},mediaDataUrls:new Map,colorScheme:void 0,fontScheme:void 0,tableStyleMap:void 0,currentSlide:0,zoom:"fit",loading:false,error:null,presenting:false,editable:false,selectedElementId:null,selectedElementIds:[],selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,formatPainterSourceId:null,editTemplateMode:false,dirty:false,interactionActive:false,notesExpanded:false,inspectorOpen:true,remotePresences:[],cursors:[],followedClientId:null,clipboardPayload:null,drawTool:"select",drawColor:chunkS5V27BHI_cjs.l,drawWidth:3,showGrid:false,showRulers:false,snapToGrid:false,snapToShape:true,guides:[],eyedropperActive:false,spellCheckEnabled:false}}function Ge(e,t){return t<=0?0:Math.min(Math.max(Math.trunc(e),0),t-1)}function Mm(e){let{options:t,store:n}=e,o=null,r=[],i=0;function a(){Me(r),Me(n.get().mediaDataUrls.values()),r=[],o?.dispose(),o=null;}async function p(s){let l=++i;e.getEditor()?.reset(),n.set({loading:true,error:null});try{let m=await pi(s),c=await ht(m);if(l!==i){Me(c.blobUrls),c.handler.dispose();return}a(),o=c.handler,r=c.blobUrls;let u=chunkS5V27BHI_cjs.Yc(c.slides);e.onContentApplying?.(),n.set({slides:u.slides,sections:c.sections,presentationProperties:c.presentationProperties,headerFooter:c.headerFooter,coreProperties:c.coreProperties,appProperties:c.appProperties,customProperties:c.customProperties,customShows:c.customShows,embeddedFonts:c.embeddedFonts,hasDigitalSignatures:c.hasDigitalSignatures,digitalSignatureCount:c.digitalSignatureCount,isPasswordProtected:c.isPasswordProtected,templateElementsBySlideId:u.templateElementsBySlideId,slideMasters:c.slideMasters,themeOptions:c.themeOptions,notesMaster:c.notesMaster,notesCanvasSize:c.notesCanvasSize,handoutMaster:c.handoutMaster,hasMacros:c.hasMacros,masterViewTab:"slides",handoutSlidesPerPage:c.handoutMaster?.slidesPerPage??4,masterViewTarget:null,canvasSize:c.canvasSize,mediaDataUrls:c.mediaDataUrls,colorScheme:c.colorScheme,fontScheme:c.fontScheme,tableStyleMap:c.tableStyleMap,currentSlide:Ge(t.initialSlide??0,u.slides.length),loading:!1}),e.onContentApplied?.(),t.onLoad?.({slideCount:c.slides.length,canvasSize:c.canvasSize});}catch(m){if(l!==i)return;let c=e.getTranslator(),u=m instanceof chunkEWJAZ6TW_cjs.df?c("pptx.security.currentlyProtected"):m instanceof Error?m.message:String(m);n.set({loading:false,error:u}),t.onError?.(u,m);}}return {load:p,releaseLoaded:a,getHandler:()=>o,invalidate:()=>{i++;}}}function Hm(e,t,n,o,r){t.querySelector("[data-pptx-comments-panel]")?.remove();let i=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-workspace-pane");i.dataset.pptxCommentsPanel="true";let a=chunkS5V27BHI_cjs.Ke(e,"header"),p=chunkS5V27BHI_cjs.Ke(e,"h2");p.textContent=n("pptx.toolbar.comments");let s=chunkS5V27BHI_cjs.Ke(e,"button");s.type="button",s.textContent="\xD7",s.setAttribute("aria-label",n("pptx.common.close")),a.append(p,s),i.appendChild(a);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-workspace-list");if(!o.length){let u=chunkS5V27BHI_cjs.Ke(e,"p");u.textContent=n("pptx.comments.noneOnSlide"),l.appendChild(u);}for(let u of o){let x=chunkS5V27BHI_cjs.Ke(e,"article","pptxv-comment-card");x.classList.toggle("is-resolved",!!u.resolved);let g=chunkS5V27BHI_cjs.Ke(e,"strong");g.textContent=u.author??"You";let v=chunkS5V27BHI_cjs.Ke(e,"textarea");v.value=u.text,v.setAttribute("aria-label",n("pptx.comments.edit"));let h=chunkS5V27BHI_cjs.Ke(e,"div");for(let[b,T]of [[n("pptx.comments.save"),()=>r.editComment(u.id,v.value)],[n(u.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>r.toggleCommentResolved(u.id)],[n("pptx.comments.delete"),()=>r.deleteComment(u.id)]]){let k=chunkS5V27BHI_cjs.Ke(e,"button");k.type="button",k.textContent=b,k.addEventListener("click",T),h.appendChild(k);}x.append(g,v,h),l.appendChild(x);}let m=chunkS5V27BHI_cjs.Ke(e,"textarea");m.placeholder=n("pptx.comments.addPlaceholder");let c=chunkS5V27BHI_cjs.Ke(e,"button");c.type="button",c.textContent=n("pptx.comments.addComment"),c.addEventListener("click",()=>{r.addComment(m.value)&&i.remove();}),l.append(m,c),i.appendChild(l),s.addEventListener("click",()=>i.remove()),t.appendChild(i);}function Rm(e,t,n,o){t.querySelector("[data-pptx-compare-panel]")?.remove();let r=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-compare-panel");r.dataset.pptxComparePanel="true",r.setAttribute("aria-label",n("pptx.compare.title"));let i=chunkS5V27BHI_cjs.Ke(e,"header"),a=chunkS5V27BHI_cjs.Ke(e,"div"),p=chunkS5V27BHI_cjs.Ke(e,"h2");p.textContent=n("pptx.compare.title");let s=chunkS5V27BHI_cjs.Ke(e,"p");s.textContent=n("pptx.compare.summary",{added:o.result.addedCount,removed:o.result.removedCount,changed:o.result.changedCount}),a.append(p,s);let l=chunkS5V27BHI_cjs.Ke(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.compare.close")),i.append(a,l),r.appendChild(i);let m=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-compare-actions"),c=chunkS5V27BHI_cjs.Ke(e,"button");c.type="button",c.textContent=n("pptx.compare.acceptAll"),c.addEventListener("click",()=>{o.onAcceptAll(),r.remove();}),m.appendChild(c),r.appendChild(m);let u=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-compare-list"),x=o.result.diffs.filter(g=>g.status!=="unchanged");if(x.length===0){let g=chunkS5V27BHI_cjs.Ke(e,"p");g.textContent=n("pptx.compare.noDifferences"),u.appendChild(g);}for(let g of x)u.appendChild(wb(e,n,g,o.onAccept));r.appendChild(u),t.appendChild(r),l.addEventListener("click",()=>r.remove());}function wb(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"article","pptxv-compare-row"),i=chunkS5V27BHI_cjs.Ke(e,"strong");i.textContent=`${t("pptx.compare.slideNumber",{number:Math.max(n.baseIndex,n.compareIndex)+1})} \xB7 ${t(`pptx.compare.status${Eb(n.status)}`)}`;let a=chunkS5V27BHI_cjs.Ke(e,"p");a.textContent=n.changes.map(m=>m.description).join("; ")||i.textContent;let p=chunkS5V27BHI_cjs.Ke(e,"div"),s=chunkS5V27BHI_cjs.Ke(e,"button");s.type="button",s.textContent=t("pptx.compare.reject");let l=chunkS5V27BHI_cjs.Ke(e,"button");return l.type="button",l.textContent=t("pptx.compare.accept"),s.addEventListener("click",()=>{r.classList.add("is-resolved"),s.disabled=true,l.disabled=true;}),l.addEventListener("click",()=>{o(n),r.classList.add("is-resolved"),s.disabled=true,l.disabled=true;}),p.append(s,l),r.append(i,a,p),r}function Eb(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ie(e,t,n){let o=chunkS5V27BHI_cjs.Ke(e,"button","pptxv-parity-backdrop");o.type="button",o.setAttribute("aria-label",t("pptx.common.close"));let r=chunkS5V27BHI_cjs.Ke(e,"section","pptxv-parity-dialog");r.setAttribute("role","dialog"),r.setAttribute("aria-modal","true");let i=`pptxv-dialog-${crypto.randomUUID()}`;r.setAttribute("aria-labelledby",i);let a=chunkS5V27BHI_cjs.Ke(e,"header","pptxv-parity-header"),p=chunkS5V27BHI_cjs.Ke(e,"h2");p.id=i,p.textContent=n;let s=chunkS5V27BHI_cjs.Ke(e,"button");s.type="button",s.textContent="\xD7",s.setAttribute("aria-label",t("pptx.common.close")),a.append(p,s);let l=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-parity-body"),m=chunkS5V27BHI_cjs.Ke(e,"footer","pptxv-parity-footer");r.append(a,l,m),e.body.append(o,r);let c=()=>{e.removeEventListener("keydown",u),o.remove(),r.remove();},u=x=>{x.key==="Escape"&&c();};return e.addEventListener("keydown",u),o.addEventListener("click",c),s.addEventListener("click",c),queueMicrotask(()=>s.focus()),{backdrop:o,dialog:r,body:l,footer:m,close:c}}function q(e,t,n,o,r=false){let i=chunkS5V27BHI_cjs.Ke(e,"button",r?"is-primary":"");return i.type="button",i.textContent=n,i.addEventListener("click",o),t.appendChild(i),i}function ge(e,t,n,o){let r=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-parity-check"),i=e.createElement("input");return i.type="checkbox",i.checked=o,r.append(i,e.createTextNode(n)),t.appendChild(r),i}function Om(e,t,n,o,r,i){for(let a of o){let p=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-parity-check"),s=e.createElement("input");s.type="radio",s.name=n,s.value=a.value,s.checked=a.value===r,s.addEventListener("change",()=>{s.checked&&i(a.value);}),p.append(s,e.createTextNode(a.label)),t.appendChild(p);}}function Fm(e,t,n,o,r){let i=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-parity-swatch-row");for(let a of n){let p=e.createElement("button");p.type="button",p.className="pptxv-parity-swatch",p.classList.toggle("is-active",a.key===o);let s=chunkS5V27BHI_cjs.Ke(e,"span","pptxv-parity-swatch-preview");s.style.background=a.previewColor;let l=e.createElement("span");l.textContent=a.label,p.append(s,l),p.addEventListener("click",()=>r(a.key)),i.appendChild(p);}t.appendChild(i);}function Bm(e,t,n,o,r,i){let a=ie(e,t,t("pptx.customShows.title")),p=structuredClone(n),s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-custom-shows");a.body.appendChild(s);let l=()=>{s.replaceChildren(),p.forEach(m=>{let c=chunkS5V27BHI_cjs.Ke(e,"article"),u=chunkS5V27BHI_cjs.Ke(e,"input");u.value=m.name,u.setAttribute("aria-label",t("pptx.customShows.editNameLabel")),u.addEventListener("change",()=>{m.name=u.value.trim()||m.name;});let x=chunkS5V27BHI_cjs.Ke(e,"span");x.textContent=`${m.slideRIds.length}/${o.length}`;let g=chunkS5V27BHI_cjs.Ke(e,"button");g.type="button",g.textContent=t("pptx.slideShow.fromBeginning"),g.addEventListener("click",()=>{i(m),a.close();});let v=chunkS5V27BHI_cjs.Ke(e,"button");v.type="button",v.textContent=t("pptx.customShows.delete"),v.addEventListener("click",()=>{p=p.filter(({id:b})=>b!==m.id),l();});let h=chunkS5V27BHI_cjs.Ke(e,"div");o.forEach(b=>{let T=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-parity-check"),k=e.createElement("input");k.type="checkbox",k.checked=m.slideRIds.includes(b.rId),k.addEventListener("change",()=>{m.slideRIds=k.checked?[...m.slideRIds,b.rId]:m.slideRIds.filter(S=>S!==b.rId),x.textContent=`${m.slideRIds.length}/${o.length}`;}),T.append(k,e.createTextNode(`${t("pptx.rehearse.slide")} ${b.slideNumber}`)),h.appendChild(T);}),c.append(u,x,g,v,h),s.appendChild(c);});};q(e,a.footer,t("pptx.customShows.createNew"),()=>{p.push({id:crypto.randomUUID(),name:t("pptx.customShows.createNew"),slideRIds:o.map(({rId:m})=>m)}),l();}),q(e,a.footer,t("common.cancel"),a.close),q(e,a.footer,t("common.ok"),()=>{r(p),a.close();},true),l();}function Vm(e,t,n){let o=ie(e,t,t("pptx.headerFooter.title")),r={...n.value},i=ge(e,o.body,t("pptx.headerFooter.dateAndTime"),!!r.hasDateTime),a=ge(e,o.body,t("pptx.headerFooter.slideNumber"),!!r.hasSlideNumber),p=ge(e,o.body,t("pptx.headerFooter.footer"),!!r.hasFooter),s=chunkS5V27BHI_cjs.Ke(e,"input");s.type="text",s.value=r.footerText??"",s.placeholder=t("pptx.headerFooter.footerPlaceholder"),s.hidden=!p.checked,o.body.appendChild(s),p.addEventListener("change",()=>{s.hidden=!p.checked;});let l=m=>{n.onApply({...r,hasDateTime:i.checked,hasSlideNumber:a.checked,hasFooter:p.checked,footerText:s.value},m),o.close();};q(e,o.footer,t("pptx.headerFooter.applyToAll"),()=>l("all")),q(e,o.footer,t("pptx.headerFooter.applyToCurrent"),()=>l("current"),true);}function Nm(e,t,n,o){let r=ie(e,t,t("pptx.hyperlink.editTitle")),i=chunkS5V27BHI_cjs.lc(n),a=(l,m)=>{let c=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-parity-select"),u=chunkS5V27BHI_cjs.Ke(e,"span");u.textContent=l;let x=chunkS5V27BHI_cjs.Ke(e,"input");return x.type="text",x.value=m,c.append(u,x),r.body.appendChild(c),x},p=a(t("pptx.hyperlink.urlLabel"),i.url);p.placeholder=t("pptx.hyperlink.urlPlaceholder");let s=a(t("pptx.hyperlink.tooltipLabel"),i.tooltip);q(e,r.footer,t("pptx.hyperlinkDialog.removeLink"),()=>{o(chunkS5V27BHI_cjs.nc()),r.close();}),q(e,r.footer,t("common.cancel"),r.close),q(e,r.footer,t("pptx.hyperlinkDialog.apply"),()=>{o(chunkS5V27BHI_cjs.mc(n,{url:p.value,tooltip:s.value})),r.close();},true);}function zm(e,t,n,o){let r=ie(e,t,t("pptx.print.title")),i=(g,v)=>{let h=chunkS5V27BHI_cjs.Ke(e,"label","pptxv-parity-select"),b=chunkS5V27BHI_cjs.Ke(e,"span");b.textContent=g;let T=e.createElement("select");for(let[k,S]of v){let f=e.createElement("option");f.value=k,f.textContent=S,T.appendChild(f);}return h.append(b,T),r.body.appendChild(h),T},a=i(t("pptx.print.slideRange"),[["all",t("pptx.print.allSlides")],["current",t("pptx.print.currentSlide")],["custom",t("pptx.print.customRange")]]),p=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-parity-range");p.hidden=true;let s=e.createElement("input");s.type="number",s.min="1",s.max=String(n),s.value="1";let l=e.createElement("input");l.type="number",l.min="1",l.max=String(n),l.value=String(n),p.append(s,e.createTextNode(t("pptx.slideShow.to")),l),r.body.appendChild(p),a.addEventListener("change",()=>{p.hidden=a.value!=="custom";});let m=i(t("pptx.print.printWhat"),[["slides",t("pptx.print.fullPageSlides")],["notes",t("pptx.print.notesPages")],["handouts",t("pptx.print.handouts")],["outline",t("pptx.print.outline")]]),c=i(t("pptx.print.orientation"),[["landscape",t("pptx.print.landscape")],["portrait",t("pptx.print.portrait")]]),u=i(t("pptx.print.colorMode"),[["color",t("pptx.print.color")],["grayscale",t("pptx.print.grayscale")],["pureBlackWhite",t("pptx.print.blackAndWhite")]]),x=ge(e,r.body,t("pptx.print.frameSlides"),false);q(e,r.footer,t("common.cancel"),r.close),q(e,r.footer,t("pptx.print.title"),()=>{o({slideRange:a.value,customRangeFrom:Number(s.value),customRangeTo:Number(l.value),printWhat:m.value,orientation:c.value,colorMode:u.value,frameSlides:x.checked}),r.close();},true);}function Gm(e,t,n,o){t.querySelector(".pptxv-rehearse")?.remove();let r=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-rehearse");r.setAttribute("aria-label",n("pptx.rehearse.summaryTitle"));let i=chunkS5V27BHI_cjs.Ke(e,"span"),a=chunkS5V27BHI_cjs.Ke(e,"strong"),p=chunkS5V27BHI_cjs.Ke(e,"span"),s={},l=performance.now(),m=l,c=0,u=0,x=false,g=S=>new Date(Math.max(0,S)).toISOString().slice(14,19),v=(S,f)=>{let C=chunkS5V27BHI_cjs.Ke(e,"button");return C.type="button",C.textContent=S,C.addEventListener("click",f),r.appendChild(C),C},h=v(n("pptx.rehearse.pause"),()=>{if(x=!x,x)c=performance.now();else {let S=performance.now()-c;u+=S,l+=S,m+=S;}h.textContent=n(x?"pptx.rehearse.resume":"pptx.rehearse.pause");}),b=()=>{s[o.currentSlide()]=Math.max(250,performance.now()-l-u),u=0;};v(n("pptx.presenter.next"),()=>{if(x)return;b();let S=o.currentSlide()+1;S<o.slideCount&&(o.navigate(S),l=performance.now());}),v(n("pptx.rehearse.saveTimings"),()=>{b(),o.onSave(s),r.remove();}),v(n("pptx.rehearse.discard"),()=>r.remove()),r.prepend(i,a,p);let T=window.setInterval(()=>{if(x)return;let S=performance.now();i.textContent=`${n("pptx.rehearse.slide")} ${o.currentSlide()+1}/${o.slideCount}`,a.textContent=`${n("pptx.rehearse.slideTime")}: ${g(S-l)}`,p.textContent=`${n("pptx.rehearse.totalTime")}: ${g(S-m)}`;},250),k=new MutationObserver(()=>{r.isConnected||(clearInterval(T),k.disconnect());});k.observe(t,{childList:true}),t.appendChild(r);}function _m(e,t,n,o){t.querySelector("[data-pptx-selection-pane]")?.remove();let r=chunkS5V27BHI_cjs.Ke(e,"aside","pptxv-workspace-pane");r.dataset.pptxSelectionPane="true";let i=chunkS5V27BHI_cjs.Ke(e,"header"),a=chunkS5V27BHI_cjs.Ke(e,"h2");a.textContent=n("pptx.selectionPane.title");let p=chunkS5V27BHI_cjs.Ke(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.selectionPane.close")),i.append(a,p),r.appendChild(i);let s=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-workspace-list");if(!o.elements.length){let l=chunkS5V27BHI_cjs.Ke(e,"p");l.textContent=n("pptx.selectionPane.empty"),s.appendChild(l);}[...o.elements].reverse().forEach((l,m)=>{let c=o.elements.length-m-1,u=chunkS5V27BHI_cjs.Ke(e,"div","pptxv-selection-row");u.draggable=true,u.dataset.index=String(c),u.classList.toggle("is-selected",o.selectedIds.includes(l.id));let x=chunkS5V27BHI_cjs.Ke(e,"span");x.textContent="\u2630";let g=chunkS5V27BHI_cjs.Ke(e,"button");g.type="button",g.textContent=Tb(l,c),g.addEventListener("click",()=>o.onSelect(l.id));let v=chunkS5V27BHI_cjs.Ke(e,"button");v.type="button",v.textContent=l.hidden?"\u25CB":"\u25C9",v.setAttribute("aria-label",n(l.hidden?"pptx.selectionPane.show":"pptx.selectionPane.hide")),v.addEventListener("click",()=>o.onToggleHidden(l.id)),u.addEventListener("dragstart",h=>h.dataTransfer?.setData("text/plain",String(c))),u.addEventListener("dragover",h=>h.preventDefault()),u.addEventListener("drop",h=>{h.preventDefault();let b=Number(h.dataTransfer?.getData("text/plain"));Number.isInteger(b)&&o.onReorder(b,c);}),u.append(x,g,v),s.appendChild(u);}),r.appendChild(s),p.addEventListener("click",()=>r.remove()),t.appendChild(r);}function Tb(e,t){return chunkEWJAZ6TW_cjs.j(e)&&e.text?.trim()?e.text.trim().slice(0,32):`${e.type.charAt(0).toUpperCase()}${e.type.slice(1)} ${t+1}`}function si(e){return new Date(Number.isFinite(e)?e:0).toISOString()}function Pb(e,t){let n=e.messages.map(o=>{let r=[],i=[];for(let a of chunkS5V27BHI_cjs.Ze(o)){if(a.kind==="text"){r.push(a.text);continue}i.push({toolName:a.toolName,toolCallId:a.toolCallId,state:a.state,input:t?a.input:void 0,output:t?a.output:void 0,errorText:a.errorText});}return {role:o.role,text:r.join(`