pptx-vanilla-viewer 1.21.6 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ A release listed with no entries carried no Conventional Commit in this package'
7
7
  scope: scripts/release-plan.mjs re-releases a package whenever any of its files
8
8
  change, not only on conventional ones.
9
9
 
10
+ ## [1.21.7](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vanilla-viewer@1.21.7) - 2026-08-19
11
+
12
+ ### Bug Fixes
13
+
14
+ - **core:** Correct OOXML a:tint colour math (ECMA-376 20.1.2.3.32) (by @ChristopherVR) ([7cf29f3](https://github.com/ChristopherVR/pptx-viewer/commit/7cf29f321994b7e9df8fe11d821a2c2fe686e1cd))
15
+ - **shared:** Stretch uncropped pictures to fill their frame (by @ChristopherVR) ([ff2fee3](https://github.com/ChristopherVR/pptx-viewer/commit/ff2fee3b3bba88e9a4d50a0735e9558c65e8041e))
16
+ - **core:** Don't clone an arbitrary slide onto a new blank slide (by @ChristopherVR) ([1bd1bd6](https://github.com/ChristopherVR/pptx-viewer/commit/1bd1bd6be1aa657b89ef5782e5d3c466686102c4))
17
+ - **core:** Don't bind special placeholders to untyped ones by idx alone (by @ChristopherVR) ([d92eb11](https://github.com/ChristopherVR/pptx-viewer/commit/d92eb11095ee390a596126acc59c8dd9cc18f8a8))
18
+ - **core:** Resolve layout-switch geometry from the master when omitted (by @ChristopherVR) ([a09aa5a](https://github.com/ChristopherVR/pptx-viewer/commit/a09aa5a306e160954bbc09052444ad22ab4385a1))
19
+ - **core:** Reverse the GUID-derived XOR key for font de/obfuscation (by @ChristopherVR) ([7733edf](https://github.com/ChristopherVR/pptx-viewer/commit/7733edf62f9f9a307c470dd93cfba36c8dbb9339))
20
+ - **core:** Drop untouched placeholder prompts on repeated layout switch (by @ChristopherVR) ([8842223](https://github.com/ChristopherVR/pptx-viewer/commit/884222317ad7da002e28e6272257bb4563b89fb2))
21
+ - **security:** Resolve code-scanning ReDoS and comment-sanitization alerts (by @ChristopherVR) ([e58e3f5](https://github.com/ChristopherVR/pptx-viewer/commit/e58e3f540e4e34c3617d32efdeea4ace6899e2bf))
22
+
23
+ ## [1.21.6](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vanilla-viewer@1.21.6) - 2026-08-19
24
+
25
+ ### Bug Fixes
26
+
27
+ - **shared:** Add collaboration-active-session connected-users view-model (by @ChristopherVR) ([7add165](https://github.com/ChristopherVR/pptx-viewer/commit/7add165d14ae855889bd9aedac13e859b86d2274))
28
+ - **vanilla:** Show connected users in the active Share dialog (by @ChristopherVR) ([8b73321](https://github.com/ChristopherVR/pptx-viewer/commit/8b7332123321040a3cd93f999f84c3d23ef5eec3))
29
+
10
30
  ## [1.21.5](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-vanilla-viewer@1.21.5) - 2026-08-19
11
31
 
12
32
  ### Dependencies
@@ -0,0 +1 @@
1
+ 'use strict';var chunk6PUK7WVZ_cjs=require('./chunk-6PUK7WVZ.cjs');require('./chunk-4VDLQK6F.cjs');function K(o){let{doc:t,t:n,controller:i}=o,a=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-focus"),h=(p,m,l)=>{let s=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-focus-btn");return s.type="button",s.title=m,s.setAttribute("aria-label",m),s.appendChild(chunk6PUK7WVZ_cjs.rk(t,p)),s.addEventListener("click",l),s},x=()=>{a.replaceChildren();let p=i.getEffectiveTargets(),m=i.hasPicks(),l=i.isPinned(),s=i.isPicking(),g=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-focus-row"),f=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-focus-label");f.textContent=n("pptx.ai.focusScope"),g.appendChild(f);for(let r of chunk6PUK7WVZ_cjs.ck(p,o.getSlides())){let b=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-focus-chip");(m||l)&&b.classList.add("is-strong"),b.title=r.title,b.textContent=r.label,g.appendChild(b);}if(l){let r=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-focus-pinned");r.textContent=n("pptx.ai.pinnedFocus"),g.appendChild(r);}let C=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-focus-actions"),d=chunk6PUK7WVZ_cjs.dk(p,o.getSlides());if(d){let r=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-focus-merge");r.type="button",r.append(chunk6PUK7WVZ_cjs.rk(t,"git-merge"),t.createTextNode(n("pptx.ai.mergeSelectedTables"))),r.addEventListener("click",()=>o.onSendDirective(chunk6PUK7WVZ_cjs.ek(d.slideIndex,d.elementIdA,d.elementIdB))),C.appendChild(r);}let y=h("crosshair",n("pptx.ai.pickElement"),()=>s?i.stopPicking():i.startPicking());if(y.setAttribute("aria-pressed",String(s)),y.classList.toggle("is-active",s),C.appendChild(y),m?C.appendChild(h("close",n("pptx.ai.pickClear"),()=>i.clearPicks())):l?C.appendChild(h("pin-off",n("pptx.ai.clearFocus"),()=>i.clearPinnedFocus())):C.appendChild(h("pin",n("pptx.ai.pinFocus"),()=>i.pinFocus())),g.appendChild(C),a.appendChild(g),s){let r=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-focus-pick"),b=chunk6PUK7WVZ_cjs.rk(t,"crosshair");b.classList.add("pptxv-ai-focus-pick-icon");let k=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-focus-pick-hint");k.textContent=n("pptx.ai.pickElementHint");let T=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-focus-pick-done");T.type="button",T.textContent=n("pptx.ai.pickDone"),T.addEventListener("click",()=>i.stopPicking()),r.append(b,k,T),a.appendChild(r);}},c=i.subscribe(x);return x(),{el:a,destroy(){c(),a.remove();}}}function O(o){let{doc:t,t:n}=o,i=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-chats");i.type="button",i.append(chunk6PUK7WVZ_cjs.rk(t,"history"),t.createTextNode(n("pptx.ai.chats")));let a=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-history");a.hidden=true;let h=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-history-head"),x=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-history-title");x.textContent=n("pptx.ai.historyTitle");let c=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-history-new");c.type="button",c.append(chunk6PUK7WVZ_cjs.rk(t,"plus"),t.createTextNode(n("pptx.ai.newChat"))),h.append(x,c);let p=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-history-body"),m=chunk6PUK7WVZ_cjs.hk(t,"p","pptxv-ai-history-hint");m.textContent=n("pptx.ai.historyHint"),a.append(h,p,m);let l=chunk6PUK7WVZ_cjs.xk({deckId:o.deckId,store:o.store,getMessages:o.getMessages,setMessages:o.setMessages,untitledLabel:n("pptx.ai.untitledChat"),onChatsChanged:()=>s()});function s(){p.replaceChildren();let f=l.chats();if(f.length===0){let d=chunk6PUK7WVZ_cjs.hk(t,"p","pptxv-ai-history-empty");d.textContent=n("pptx.ai.historyEmpty"),p.appendChild(d);return}let C=chunk6PUK7WVZ_cjs.hk(t,"ul","pptxv-ai-history-list");for(let d of f){let y=chunk6PUK7WVZ_cjs.hk(t,"li","pptxv-ai-history-row"),r=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-history-resume");r.type="button",r.classList.toggle("is-active",d.id===l.activeChatId());let b=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-history-text"),k=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-history-name");k.textContent=d.title||n("pptx.ai.untitledChat");let T=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-history-meta");T.textContent=n("pptx.ai.messageCount",{count:d.messageCount}),b.append(k,T),r.append(chunk6PUK7WVZ_cjs.rk(t,"comment"),b),r.addEventListener("click",()=>{l.resumeChat(d.id),a.hidden=true;});let P=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-history-delete");P.type="button",P.title=n("pptx.ai.deleteChat"),P.setAttribute("aria-label",n("pptx.ai.deleteChat")),P.appendChild(chunk6PUK7WVZ_cjs.rk(t,"trash")),P.addEventListener("click",()=>{l.deleteChat(d.id);}),y.append(r,P),C.appendChild(y);}p.appendChild(C);}s(),i.addEventListener("click",()=>{a.hidden=!a.hidden;}),c.addEventListener("click",()=>{l.newChat(),a.hidden=true;});let g=f=>{a.hidden||!(f.target instanceof Node)||!a.contains(f.target)&&!i.contains(f.target)&&(a.hidden=true);};return t.addEventListener("mousedown",g),{button:i,el:a,notifyMessagesChanged:()=>l.notifyMessagesChanged(),destroy(){t.removeEventListener("mousedown",g),l.dispose(),i.remove(),a.remove();}}}var _={view:"eye",text:"text-box",shape:"shapes",theme:"font-color",table:"table",slide:"layout",chart:"chart",move:"move-right",delete:"trash",search:"search",nav:"move-right",animation:"play",notes:"sticky-note",tool:"wrench"};function W(o,t,n){let i=t.state==="output-error",a=t.state==="output-available",h=!i&&!a,x=chunk6PUK7WVZ_cjs.Ck(t.toolName,t.input,h?"present":"past"),c=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-tool"),p=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-tool-head"),m=chunk6PUK7WVZ_cjs.rk(o,_[x.icon]??"wrench");m.classList.add("pptxv-ai-tool-icon");let l=chunk6PUK7WVZ_cjs.hk(o,"span","pptxv-ai-tool-name");l.textContent=x.label;let s=chunk6PUK7WVZ_cjs.hk(o,"span","pptxv-ai-tool-state");if(i?(s.classList.add("is-error"),s.append(chunk6PUK7WVZ_cjs.rk(o,"alert"),o.createTextNode(n("pptx.ai.toolFailed")))):a?(s.classList.add("is-done"),s.append(chunk6PUK7WVZ_cjs.rk(o,"check"),o.createTextNode(n("pptx.ai.toolDone")))):(s.classList.add("is-running"),s.textContent=n("pptx.ai.toolRunning")),p.append(m,l,s),c.appendChild(p),i&&t.errorText){let f=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-tool-error");f.textContent=t.errorText,c.appendChild(f);}let g=chunk6PUK7WVZ_cjs.Bk(t.input);if(g){let f=chunk6PUK7WVZ_cjs.hk(o,"details","pptxv-ai-tool-details"),C=chunk6PUK7WVZ_cjs.hk(o,"summary");C.textContent=n("pptx.ai.toolDetails");let d=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-tool-raw");d.textContent=`${chunk6PUK7WVZ_cjs.Ak(t.toolName)}: ${g}`,f.append(C,d),c.appendChild(f);}return c}function q(o,t,n,i){t.replaceChildren();for(let a of n){if(a.role==="system")continue;let h=a.role==="user",x=chunk6PUK7WVZ_cjs.zk(a);if(x.length===0&&!h)continue;let c=chunk6PUK7WVZ_cjs.hk(o,"div",`pptxv-ai-msg pptxv-ai-msg-${a.role}`),p=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-msg-avatar");p.setAttribute("aria-label",i(h?"pptx.ai.you":"pptx.ai.assistant")),p.appendChild(chunk6PUK7WVZ_cjs.rk(o,h?"comment":"sparkles"));let m=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-msg-body");for(let l of x)if(l.kind==="text"){let s=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-msg-text");s.textContent=l.text,m.appendChild(s);}else m.appendChild(W(o,l,i));c.append(p,m),t.appendChild(c);}}function G(o,t,n,i,a){if(t.replaceChildren(),t.hidden=n.length===0,n.length===0)return;let h=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-proposals-header"),x=chunk6PUK7WVZ_cjs.hk(o,"span","pptxv-ai-proposals-title");if(x.textContent=i("pptx.ai.pendingChanges",{count:n.length}),h.appendChild(x),n.length>1){let c=chunk6PUK7WVZ_cjs.hk(o,"button","pptxv-ai-proposal-btn is-accept-all");c.type="button",c.textContent=i("pptx.ai.acceptAll"),c.addEventListener("click",()=>a.acceptAll()),h.appendChild(c);}t.appendChild(h);for(let c of n)t.appendChild(tt(o,c,i,a));}function tt(o,t,n,i){let a=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-proposal");a.dataset.proposalId=t.id;let h=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-proposal-eyebrow");h.textContent=n("pptx.ai.proposedChange"),a.appendChild(h);let x=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-proposal-label");if(x.textContent=t.label,a.appendChild(x),t.summary.length>0){let l=chunk6PUK7WVZ_cjs.hk(o,"ul","pptxv-ai-proposal-summary");for(let s of t.summary){let g=chunk6PUK7WVZ_cjs.hk(o,"li");g.textContent=chunk6PUK7WVZ_cjs.tk(s),l.appendChild(g);}a.appendChild(l);}let c=chunk6PUK7WVZ_cjs.hk(o,"div","pptxv-ai-proposal-actions"),p=chunk6PUK7WVZ_cjs.hk(o,"button","pptxv-ai-proposal-btn is-accept");p.type="button",p.append(chunk6PUK7WVZ_cjs.rk(o,"check"),o.createTextNode(n("pptx.ai.accept"))),p.addEventListener("click",()=>i.accept(t.id));let m=chunk6PUK7WVZ_cjs.hk(o,"button","pptxv-ai-proposal-btn is-reject");return m.type="button",m.append(chunk6PUK7WVZ_cjs.rk(o,"close"),o.createTextNode(n("pptx.ai.reject"))),m.addEventListener("click",()=>i.reject(t.id)),c.append(p,m),a.appendChild(c),a}async function wt(o){let{doc:t,host:n,t:i}=o;n.replaceChildren();let a=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-header"),h=chunk6PUK7WVZ_cjs.hk(t,"span","pptxv-ai-title");h.textContent=i("pptx.ai.title");let x=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-close");x.type="button",x.title=i("pptx.ai.close"),x.setAttribute("aria-label",i("pptx.ai.close")),x.appendChild(chunk6PUK7WVZ_cjs.rk(t,"close")),x.addEventListener("click",()=>o.onClose?.()),a.append(chunk6PUK7WVZ_cjs.rk(t,"sparkles"),h,x);let c,p=o.controller,m=p?K({doc:t,t:i,controller:p,getSlides:()=>o.bridge.getSlides(),onSendDirective:u=>{c?.sendMessage(u);}}):null,l=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-messages");l.setAttribute("role","log"),l.setAttribute("aria-live","polite");let s=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-empty");s.textContent=i("pptx.ai.emptyHint"),l.appendChild(s);let g=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-proposals");g.hidden=true;let f=chunk6PUK7WVZ_cjs.hk(t,"div","pptxv-ai-error");f.setAttribute("role","alert"),f.hidden=true;let C=chunk6PUK7WVZ_cjs.hk(t,"form","pptxv-ai-composer"),d=chunk6PUK7WVZ_cjs.hk(t,"textarea","pptxv-ai-input");d.rows=2,d.placeholder=i("pptx.ai.placeholder"),d.setAttribute("aria-label",i("pptx.ai.placeholder"));let y=chunk6PUK7WVZ_cjs.hk(t,"button","pptxv-ai-send");y.type="submit",y.setAttribute("aria-label",i("pptx.ai.send")),y.appendChild(chunk6PUK7WVZ_cjs.rk(t,"send")),C.append(d,y),n.append(a,...m?[m.el]:[],l,g,f,C);try{c=await(o.createChat??chunk6PUK7WVZ_cjs.yk)({bridge:o.bridge,config:o.config});}catch{return s.textContent=i("pptx.ai.unavailableTitle"),d.disabled=true,y.disabled=true,m?.destroy(),{destroy:()=>n.replaceChildren()}}let r=c,b=O({doc:t,t:i,deckId:chunk6PUK7WVZ_cjs.wk(o.bridge),store:o.historyStore,getMessages:()=>r.getSnapshot().messages,setMessages:u=>r.setMessages(u)});a.insertBefore(b.button,x),n.appendChild(b.el);let k=r.subscribe(()=>b.notifyMessagesChanged()),T=new Set,P=u=>{if(!p)return;let A=u.messages.flatMap(Y=>chunk6PUK7WVZ_cjs.zk(Y).filter(Z=>Z.kind==="tool")).at(-1);if(!A||A.kind!=="tool"||A.state==="input-streaming"||T.has(A.toolCallId))return;T.add(A.toolCallId);let L=chunk6PUK7WVZ_cjs.Dk(A.toolName,A.input);L&&L.slideIndex!==void 0&&o.goToSlide?.(L.slideIndex),p.flashToolTarget(L);},M=u=>{q(t,l,u.messages,i),s.hidden=u.messages.length>0,u.messages.length===0&&l.appendChild(s),G(t,g,r.proposals.list(),i,{accept:A=>{p?.flashToolTarget(null),r.proposals.apply(A),M(r.getSnapshot());},reject:A=>{r.proposals.revert(A),M(r.getSnapshot());},acceptAll:()=>{p?.flashToolTarget(null),r.proposals.acceptAll(),M(r.getSnapshot());}});let w=u.status==="submitted"||u.status==="streaming";n.classList.toggle("is-busy",w),y.setAttribute("aria-label",i(w?"pptx.ai.stop":"pptx.ai.send")),f.hidden=!u.error,f.textContent=u.error?i("pptx.ai.errorPrefix"):"",l.scrollTop=l.scrollHeight,P(u);},S=()=>{if(n.classList.contains("is-busy")){r.stop();return}let u=d.value.trim();u&&(d.value="",r.sendMessage(u));};C.addEventListener("submit",u=>{u.preventDefault(),S();}),d.addEventListener("keydown",u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),S());});let I=p?.getPrefill().nonce??0,J=()=>{if(!p)return;let u=p.getPrefill();u.nonce!==I&&(I=u.nonce,d.value=u.text,d.focus());},Q=p?.subscribe(J),X=r.subscribe(M);return M(r.getSnapshot()),{changeAnimator:r.changeAnimator,destroy(){X(),k(),b.destroy(),Q?.(),m?.destroy(),n.replaceChildren();}}}exports.createAiPanel=wt;
@@ -1 +1 @@
1
- import {$j,jk,qk,ok,pk,rk,vk,Wj,Xj,Yj,uk,tk,sk,lk}from'./chunk-7UFRWZ5D.js';import'./chunk-WOT6VMZA.js';function K(o){let{doc:t,t:n,controller:i}=o,a=$j(t,"div","pptxv-ai-focus"),h=(p,m,l)=>{let s=$j(t,"button","pptxv-ai-focus-btn");return s.type="button",s.title=m,s.setAttribute("aria-label",m),s.appendChild(jk(t,p)),s.addEventListener("click",l),s},x=()=>{a.replaceChildren();let p=i.getEffectiveTargets(),m=i.hasPicks(),l=i.isPinned(),s=i.isPicking(),g=$j(t,"div","pptxv-ai-focus-row"),f=$j(t,"span","pptxv-ai-focus-label");f.textContent=n("pptx.ai.focusScope"),g.appendChild(f);for(let r of Wj(p,o.getSlides())){let b=$j(t,"span","pptxv-ai-focus-chip");(m||l)&&b.classList.add("is-strong"),b.title=r.title,b.textContent=r.label,g.appendChild(b);}if(l){let r=$j(t,"span","pptxv-ai-focus-pinned");r.textContent=n("pptx.ai.pinnedFocus"),g.appendChild(r);}let C=$j(t,"div","pptxv-ai-focus-actions"),d=Xj(p,o.getSlides());if(d){let r=$j(t,"button","pptxv-ai-focus-merge");r.type="button",r.append(jk(t,"git-merge"),t.createTextNode(n("pptx.ai.mergeSelectedTables"))),r.addEventListener("click",()=>o.onSendDirective(Yj(d.slideIndex,d.elementIdA,d.elementIdB))),C.appendChild(r);}let y=h("crosshair",n("pptx.ai.pickElement"),()=>s?i.stopPicking():i.startPicking());if(y.setAttribute("aria-pressed",String(s)),y.classList.toggle("is-active",s),C.appendChild(y),m?C.appendChild(h("close",n("pptx.ai.pickClear"),()=>i.clearPicks())):l?C.appendChild(h("pin-off",n("pptx.ai.clearFocus"),()=>i.clearPinnedFocus())):C.appendChild(h("pin",n("pptx.ai.pinFocus"),()=>i.pinFocus())),g.appendChild(C),a.appendChild(g),s){let r=$j(t,"div","pptxv-ai-focus-pick"),b=jk(t,"crosshair");b.classList.add("pptxv-ai-focus-pick-icon");let k=$j(t,"span","pptxv-ai-focus-pick-hint");k.textContent=n("pptx.ai.pickElementHint");let T=$j(t,"button","pptxv-ai-focus-pick-done");T.type="button",T.textContent=n("pptx.ai.pickDone"),T.addEventListener("click",()=>i.stopPicking()),r.append(b,k,T),a.appendChild(r);}},c=i.subscribe(x);return x(),{el:a,destroy(){c(),a.remove();}}}function O(o){let{doc:t,t:n}=o,i=$j(t,"button","pptxv-ai-chats");i.type="button",i.append(jk(t,"history"),t.createTextNode(n("pptx.ai.chats")));let a=$j(t,"div","pptxv-ai-history");a.hidden=true;let h=$j(t,"div","pptxv-ai-history-head"),x=$j(t,"span","pptxv-ai-history-title");x.textContent=n("pptx.ai.historyTitle");let c=$j(t,"button","pptxv-ai-history-new");c.type="button",c.append(jk(t,"plus"),t.createTextNode(n("pptx.ai.newChat"))),h.append(x,c);let p=$j(t,"div","pptxv-ai-history-body"),m=$j(t,"p","pptxv-ai-history-hint");m.textContent=n("pptx.ai.historyHint"),a.append(h,p,m);let l=pk({deckId:o.deckId,store:o.store,getMessages:o.getMessages,setMessages:o.setMessages,untitledLabel:n("pptx.ai.untitledChat"),onChatsChanged:()=>s()});function s(){p.replaceChildren();let f=l.chats();if(f.length===0){let d=$j(t,"p","pptxv-ai-history-empty");d.textContent=n("pptx.ai.historyEmpty"),p.appendChild(d);return}let C=$j(t,"ul","pptxv-ai-history-list");for(let d of f){let y=$j(t,"li","pptxv-ai-history-row"),r=$j(t,"button","pptxv-ai-history-resume");r.type="button",r.classList.toggle("is-active",d.id===l.activeChatId());let b=$j(t,"span","pptxv-ai-history-text"),k=$j(t,"span","pptxv-ai-history-name");k.textContent=d.title||n("pptx.ai.untitledChat");let T=$j(t,"span","pptxv-ai-history-meta");T.textContent=n("pptx.ai.messageCount",{count:d.messageCount}),b.append(k,T),r.append(jk(t,"comment"),b),r.addEventListener("click",()=>{l.resumeChat(d.id),a.hidden=true;});let P=$j(t,"button","pptxv-ai-history-delete");P.type="button",P.title=n("pptx.ai.deleteChat"),P.setAttribute("aria-label",n("pptx.ai.deleteChat")),P.appendChild(jk(t,"trash")),P.addEventListener("click",()=>{l.deleteChat(d.id);}),y.append(r,P),C.appendChild(y);}p.appendChild(C);}s(),i.addEventListener("click",()=>{a.hidden=!a.hidden;}),c.addEventListener("click",()=>{l.newChat(),a.hidden=true;});let g=f=>{a.hidden||!(f.target instanceof Node)||!a.contains(f.target)&&!i.contains(f.target)&&(a.hidden=true);};return t.addEventListener("mousedown",g),{button:i,el:a,notifyMessagesChanged:()=>l.notifyMessagesChanged(),destroy(){t.removeEventListener("mousedown",g),l.dispose(),i.remove(),a.remove();}}}var _={view:"eye",text:"text-box",shape:"shapes",theme:"font-color",table:"table",slide:"layout",chart:"chart",move:"move-right",delete:"trash",search:"search",nav:"move-right",animation:"play",notes:"sticky-note",tool:"wrench"};function W(o,t,n){let i=t.state==="output-error",a=t.state==="output-available",h=!i&&!a,x=uk(t.toolName,t.input,h?"present":"past"),c=$j(o,"div","pptxv-ai-tool"),p=$j(o,"div","pptxv-ai-tool-head"),m=jk(o,_[x.icon]??"wrench");m.classList.add("pptxv-ai-tool-icon");let l=$j(o,"span","pptxv-ai-tool-name");l.textContent=x.label;let s=$j(o,"span","pptxv-ai-tool-state");if(i?(s.classList.add("is-error"),s.append(jk(o,"alert"),o.createTextNode(n("pptx.ai.toolFailed")))):a?(s.classList.add("is-done"),s.append(jk(o,"check"),o.createTextNode(n("pptx.ai.toolDone")))):(s.classList.add("is-running"),s.textContent=n("pptx.ai.toolRunning")),p.append(m,l,s),c.appendChild(p),i&&t.errorText){let f=$j(o,"div","pptxv-ai-tool-error");f.textContent=t.errorText,c.appendChild(f);}let g=tk(t.input);if(g){let f=$j(o,"details","pptxv-ai-tool-details"),C=$j(o,"summary");C.textContent=n("pptx.ai.toolDetails");let d=$j(o,"div","pptxv-ai-tool-raw");d.textContent=`${sk(t.toolName)}: ${g}`,f.append(C,d),c.appendChild(f);}return c}function q(o,t,n,i){t.replaceChildren();for(let a of n){if(a.role==="system")continue;let h=a.role==="user",x=rk(a);if(x.length===0&&!h)continue;let c=$j(o,"div",`pptxv-ai-msg pptxv-ai-msg-${a.role}`),p=$j(o,"div","pptxv-ai-msg-avatar");p.setAttribute("aria-label",i(h?"pptx.ai.you":"pptx.ai.assistant")),p.appendChild(jk(o,h?"comment":"sparkles"));let m=$j(o,"div","pptxv-ai-msg-body");for(let l of x)if(l.kind==="text"){let s=$j(o,"div","pptxv-ai-msg-text");s.textContent=l.text,m.appendChild(s);}else m.appendChild(W(o,l,i));c.append(p,m),t.appendChild(c);}}function G(o,t,n,i,a){if(t.replaceChildren(),t.hidden=n.length===0,n.length===0)return;let h=$j(o,"div","pptxv-ai-proposals-header"),x=$j(o,"span","pptxv-ai-proposals-title");if(x.textContent=i("pptx.ai.pendingChanges",{count:n.length}),h.appendChild(x),n.length>1){let c=$j(o,"button","pptxv-ai-proposal-btn is-accept-all");c.type="button",c.textContent=i("pptx.ai.acceptAll"),c.addEventListener("click",()=>a.acceptAll()),h.appendChild(c);}t.appendChild(h);for(let c of n)t.appendChild(tt(o,c,i,a));}function tt(o,t,n,i){let a=$j(o,"div","pptxv-ai-proposal");a.dataset.proposalId=t.id;let h=$j(o,"div","pptxv-ai-proposal-eyebrow");h.textContent=n("pptx.ai.proposedChange"),a.appendChild(h);let x=$j(o,"div","pptxv-ai-proposal-label");if(x.textContent=t.label,a.appendChild(x),t.summary.length>0){let l=$j(o,"ul","pptxv-ai-proposal-summary");for(let s of t.summary){let g=$j(o,"li");g.textContent=lk(s),l.appendChild(g);}a.appendChild(l);}let c=$j(o,"div","pptxv-ai-proposal-actions"),p=$j(o,"button","pptxv-ai-proposal-btn is-accept");p.type="button",p.append(jk(o,"check"),o.createTextNode(n("pptx.ai.accept"))),p.addEventListener("click",()=>i.accept(t.id));let m=$j(o,"button","pptxv-ai-proposal-btn is-reject");return m.type="button",m.append(jk(o,"close"),o.createTextNode(n("pptx.ai.reject"))),m.addEventListener("click",()=>i.reject(t.id)),c.append(p,m),a.appendChild(c),a}async function wt(o){let{doc:t,host:n,t:i}=o;n.replaceChildren();let a=$j(t,"div","pptxv-ai-header"),h=$j(t,"span","pptxv-ai-title");h.textContent=i("pptx.ai.title");let x=$j(t,"button","pptxv-ai-close");x.type="button",x.title=i("pptx.ai.close"),x.setAttribute("aria-label",i("pptx.ai.close")),x.appendChild(jk(t,"close")),x.addEventListener("click",()=>o.onClose?.()),a.append(jk(t,"sparkles"),h,x);let c,p=o.controller,m=p?K({doc:t,t:i,controller:p,getSlides:()=>o.bridge.getSlides(),onSendDirective:u=>{c?.sendMessage(u);}}):null,l=$j(t,"div","pptxv-ai-messages");l.setAttribute("role","log"),l.setAttribute("aria-live","polite");let s=$j(t,"div","pptxv-ai-empty");s.textContent=i("pptx.ai.emptyHint"),l.appendChild(s);let g=$j(t,"div","pptxv-ai-proposals");g.hidden=true;let f=$j(t,"div","pptxv-ai-error");f.setAttribute("role","alert"),f.hidden=true;let C=$j(t,"form","pptxv-ai-composer"),d=$j(t,"textarea","pptxv-ai-input");d.rows=2,d.placeholder=i("pptx.ai.placeholder"),d.setAttribute("aria-label",i("pptx.ai.placeholder"));let y=$j(t,"button","pptxv-ai-send");y.type="submit",y.setAttribute("aria-label",i("pptx.ai.send")),y.appendChild(jk(t,"send")),C.append(d,y),n.append(a,...m?[m.el]:[],l,g,f,C);try{c=await(o.createChat??qk)({bridge:o.bridge,config:o.config});}catch{return s.textContent=i("pptx.ai.unavailableTitle"),d.disabled=true,y.disabled=true,m?.destroy(),{destroy:()=>n.replaceChildren()}}let r=c,b=O({doc:t,t:i,deckId:ok(o.bridge),store:o.historyStore,getMessages:()=>r.getSnapshot().messages,setMessages:u=>r.setMessages(u)});a.insertBefore(b.button,x),n.appendChild(b.el);let k=r.subscribe(()=>b.notifyMessagesChanged()),T=new Set,P=u=>{if(!p)return;let A=u.messages.flatMap(Y=>rk(Y).filter(Z=>Z.kind==="tool")).at(-1);if(!A||A.kind!=="tool"||A.state==="input-streaming"||T.has(A.toolCallId))return;T.add(A.toolCallId);let L=vk(A.toolName,A.input);L&&L.slideIndex!==void 0&&o.goToSlide?.(L.slideIndex),p.flashToolTarget(L);},M=u=>{q(t,l,u.messages,i),s.hidden=u.messages.length>0,u.messages.length===0&&l.appendChild(s),G(t,g,r.proposals.list(),i,{accept:A=>{p?.flashToolTarget(null),r.proposals.apply(A),M(r.getSnapshot());},reject:A=>{r.proposals.revert(A),M(r.getSnapshot());},acceptAll:()=>{p?.flashToolTarget(null),r.proposals.acceptAll(),M(r.getSnapshot());}});let w=u.status==="submitted"||u.status==="streaming";n.classList.toggle("is-busy",w),y.setAttribute("aria-label",i(w?"pptx.ai.stop":"pptx.ai.send")),f.hidden=!u.error,f.textContent=u.error?i("pptx.ai.errorPrefix"):"",l.scrollTop=l.scrollHeight,P(u);},S=()=>{if(n.classList.contains("is-busy")){r.stop();return}let u=d.value.trim();u&&(d.value="",r.sendMessage(u));};C.addEventListener("submit",u=>{u.preventDefault(),S();}),d.addEventListener("keydown",u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),S());});let I=p?.getPrefill().nonce??0,J=()=>{if(!p)return;let u=p.getPrefill();u.nonce!==I&&(I=u.nonce,d.value=u.text,d.focus());},Q=p?.subscribe(J),X=r.subscribe(M);return M(r.getSnapshot()),{changeAnimator:r.changeAnimator,destroy(){X(),k(),b.destroy(),Q?.(),m?.destroy(),n.replaceChildren();}}}export{wt as createAiPanel};
1
+ import {hk,rk,yk,wk,xk,zk,Dk,ck,dk,ek,Ck,Bk,Ak,tk}from'./chunk-LVEPALNR.js';import'./chunk-WOT6VMZA.js';function K(o){let{doc:t,t:n,controller:i}=o,a=hk(t,"div","pptxv-ai-focus"),h=(p,m,l)=>{let s=hk(t,"button","pptxv-ai-focus-btn");return s.type="button",s.title=m,s.setAttribute("aria-label",m),s.appendChild(rk(t,p)),s.addEventListener("click",l),s},x=()=>{a.replaceChildren();let p=i.getEffectiveTargets(),m=i.hasPicks(),l=i.isPinned(),s=i.isPicking(),g=hk(t,"div","pptxv-ai-focus-row"),f=hk(t,"span","pptxv-ai-focus-label");f.textContent=n("pptx.ai.focusScope"),g.appendChild(f);for(let r of ck(p,o.getSlides())){let b=hk(t,"span","pptxv-ai-focus-chip");(m||l)&&b.classList.add("is-strong"),b.title=r.title,b.textContent=r.label,g.appendChild(b);}if(l){let r=hk(t,"span","pptxv-ai-focus-pinned");r.textContent=n("pptx.ai.pinnedFocus"),g.appendChild(r);}let C=hk(t,"div","pptxv-ai-focus-actions"),d=dk(p,o.getSlides());if(d){let r=hk(t,"button","pptxv-ai-focus-merge");r.type="button",r.append(rk(t,"git-merge"),t.createTextNode(n("pptx.ai.mergeSelectedTables"))),r.addEventListener("click",()=>o.onSendDirective(ek(d.slideIndex,d.elementIdA,d.elementIdB))),C.appendChild(r);}let y=h("crosshair",n("pptx.ai.pickElement"),()=>s?i.stopPicking():i.startPicking());if(y.setAttribute("aria-pressed",String(s)),y.classList.toggle("is-active",s),C.appendChild(y),m?C.appendChild(h("close",n("pptx.ai.pickClear"),()=>i.clearPicks())):l?C.appendChild(h("pin-off",n("pptx.ai.clearFocus"),()=>i.clearPinnedFocus())):C.appendChild(h("pin",n("pptx.ai.pinFocus"),()=>i.pinFocus())),g.appendChild(C),a.appendChild(g),s){let r=hk(t,"div","pptxv-ai-focus-pick"),b=rk(t,"crosshair");b.classList.add("pptxv-ai-focus-pick-icon");let k=hk(t,"span","pptxv-ai-focus-pick-hint");k.textContent=n("pptx.ai.pickElementHint");let T=hk(t,"button","pptxv-ai-focus-pick-done");T.type="button",T.textContent=n("pptx.ai.pickDone"),T.addEventListener("click",()=>i.stopPicking()),r.append(b,k,T),a.appendChild(r);}},c=i.subscribe(x);return x(),{el:a,destroy(){c(),a.remove();}}}function O(o){let{doc:t,t:n}=o,i=hk(t,"button","pptxv-ai-chats");i.type="button",i.append(rk(t,"history"),t.createTextNode(n("pptx.ai.chats")));let a=hk(t,"div","pptxv-ai-history");a.hidden=true;let h=hk(t,"div","pptxv-ai-history-head"),x=hk(t,"span","pptxv-ai-history-title");x.textContent=n("pptx.ai.historyTitle");let c=hk(t,"button","pptxv-ai-history-new");c.type="button",c.append(rk(t,"plus"),t.createTextNode(n("pptx.ai.newChat"))),h.append(x,c);let p=hk(t,"div","pptxv-ai-history-body"),m=hk(t,"p","pptxv-ai-history-hint");m.textContent=n("pptx.ai.historyHint"),a.append(h,p,m);let l=xk({deckId:o.deckId,store:o.store,getMessages:o.getMessages,setMessages:o.setMessages,untitledLabel:n("pptx.ai.untitledChat"),onChatsChanged:()=>s()});function s(){p.replaceChildren();let f=l.chats();if(f.length===0){let d=hk(t,"p","pptxv-ai-history-empty");d.textContent=n("pptx.ai.historyEmpty"),p.appendChild(d);return}let C=hk(t,"ul","pptxv-ai-history-list");for(let d of f){let y=hk(t,"li","pptxv-ai-history-row"),r=hk(t,"button","pptxv-ai-history-resume");r.type="button",r.classList.toggle("is-active",d.id===l.activeChatId());let b=hk(t,"span","pptxv-ai-history-text"),k=hk(t,"span","pptxv-ai-history-name");k.textContent=d.title||n("pptx.ai.untitledChat");let T=hk(t,"span","pptxv-ai-history-meta");T.textContent=n("pptx.ai.messageCount",{count:d.messageCount}),b.append(k,T),r.append(rk(t,"comment"),b),r.addEventListener("click",()=>{l.resumeChat(d.id),a.hidden=true;});let P=hk(t,"button","pptxv-ai-history-delete");P.type="button",P.title=n("pptx.ai.deleteChat"),P.setAttribute("aria-label",n("pptx.ai.deleteChat")),P.appendChild(rk(t,"trash")),P.addEventListener("click",()=>{l.deleteChat(d.id);}),y.append(r,P),C.appendChild(y);}p.appendChild(C);}s(),i.addEventListener("click",()=>{a.hidden=!a.hidden;}),c.addEventListener("click",()=>{l.newChat(),a.hidden=true;});let g=f=>{a.hidden||!(f.target instanceof Node)||!a.contains(f.target)&&!i.contains(f.target)&&(a.hidden=true);};return t.addEventListener("mousedown",g),{button:i,el:a,notifyMessagesChanged:()=>l.notifyMessagesChanged(),destroy(){t.removeEventListener("mousedown",g),l.dispose(),i.remove(),a.remove();}}}var _={view:"eye",text:"text-box",shape:"shapes",theme:"font-color",table:"table",slide:"layout",chart:"chart",move:"move-right",delete:"trash",search:"search",nav:"move-right",animation:"play",notes:"sticky-note",tool:"wrench"};function W(o,t,n){let i=t.state==="output-error",a=t.state==="output-available",h=!i&&!a,x=Ck(t.toolName,t.input,h?"present":"past"),c=hk(o,"div","pptxv-ai-tool"),p=hk(o,"div","pptxv-ai-tool-head"),m=rk(o,_[x.icon]??"wrench");m.classList.add("pptxv-ai-tool-icon");let l=hk(o,"span","pptxv-ai-tool-name");l.textContent=x.label;let s=hk(o,"span","pptxv-ai-tool-state");if(i?(s.classList.add("is-error"),s.append(rk(o,"alert"),o.createTextNode(n("pptx.ai.toolFailed")))):a?(s.classList.add("is-done"),s.append(rk(o,"check"),o.createTextNode(n("pptx.ai.toolDone")))):(s.classList.add("is-running"),s.textContent=n("pptx.ai.toolRunning")),p.append(m,l,s),c.appendChild(p),i&&t.errorText){let f=hk(o,"div","pptxv-ai-tool-error");f.textContent=t.errorText,c.appendChild(f);}let g=Bk(t.input);if(g){let f=hk(o,"details","pptxv-ai-tool-details"),C=hk(o,"summary");C.textContent=n("pptx.ai.toolDetails");let d=hk(o,"div","pptxv-ai-tool-raw");d.textContent=`${Ak(t.toolName)}: ${g}`,f.append(C,d),c.appendChild(f);}return c}function q(o,t,n,i){t.replaceChildren();for(let a of n){if(a.role==="system")continue;let h=a.role==="user",x=zk(a);if(x.length===0&&!h)continue;let c=hk(o,"div",`pptxv-ai-msg pptxv-ai-msg-${a.role}`),p=hk(o,"div","pptxv-ai-msg-avatar");p.setAttribute("aria-label",i(h?"pptx.ai.you":"pptx.ai.assistant")),p.appendChild(rk(o,h?"comment":"sparkles"));let m=hk(o,"div","pptxv-ai-msg-body");for(let l of x)if(l.kind==="text"){let s=hk(o,"div","pptxv-ai-msg-text");s.textContent=l.text,m.appendChild(s);}else m.appendChild(W(o,l,i));c.append(p,m),t.appendChild(c);}}function G(o,t,n,i,a){if(t.replaceChildren(),t.hidden=n.length===0,n.length===0)return;let h=hk(o,"div","pptxv-ai-proposals-header"),x=hk(o,"span","pptxv-ai-proposals-title");if(x.textContent=i("pptx.ai.pendingChanges",{count:n.length}),h.appendChild(x),n.length>1){let c=hk(o,"button","pptxv-ai-proposal-btn is-accept-all");c.type="button",c.textContent=i("pptx.ai.acceptAll"),c.addEventListener("click",()=>a.acceptAll()),h.appendChild(c);}t.appendChild(h);for(let c of n)t.appendChild(tt(o,c,i,a));}function tt(o,t,n,i){let a=hk(o,"div","pptxv-ai-proposal");a.dataset.proposalId=t.id;let h=hk(o,"div","pptxv-ai-proposal-eyebrow");h.textContent=n("pptx.ai.proposedChange"),a.appendChild(h);let x=hk(o,"div","pptxv-ai-proposal-label");if(x.textContent=t.label,a.appendChild(x),t.summary.length>0){let l=hk(o,"ul","pptxv-ai-proposal-summary");for(let s of t.summary){let g=hk(o,"li");g.textContent=tk(s),l.appendChild(g);}a.appendChild(l);}let c=hk(o,"div","pptxv-ai-proposal-actions"),p=hk(o,"button","pptxv-ai-proposal-btn is-accept");p.type="button",p.append(rk(o,"check"),o.createTextNode(n("pptx.ai.accept"))),p.addEventListener("click",()=>i.accept(t.id));let m=hk(o,"button","pptxv-ai-proposal-btn is-reject");return m.type="button",m.append(rk(o,"close"),o.createTextNode(n("pptx.ai.reject"))),m.addEventListener("click",()=>i.reject(t.id)),c.append(p,m),a.appendChild(c),a}async function wt(o){let{doc:t,host:n,t:i}=o;n.replaceChildren();let a=hk(t,"div","pptxv-ai-header"),h=hk(t,"span","pptxv-ai-title");h.textContent=i("pptx.ai.title");let x=hk(t,"button","pptxv-ai-close");x.type="button",x.title=i("pptx.ai.close"),x.setAttribute("aria-label",i("pptx.ai.close")),x.appendChild(rk(t,"close")),x.addEventListener("click",()=>o.onClose?.()),a.append(rk(t,"sparkles"),h,x);let c,p=o.controller,m=p?K({doc:t,t:i,controller:p,getSlides:()=>o.bridge.getSlides(),onSendDirective:u=>{c?.sendMessage(u);}}):null,l=hk(t,"div","pptxv-ai-messages");l.setAttribute("role","log"),l.setAttribute("aria-live","polite");let s=hk(t,"div","pptxv-ai-empty");s.textContent=i("pptx.ai.emptyHint"),l.appendChild(s);let g=hk(t,"div","pptxv-ai-proposals");g.hidden=true;let f=hk(t,"div","pptxv-ai-error");f.setAttribute("role","alert"),f.hidden=true;let C=hk(t,"form","pptxv-ai-composer"),d=hk(t,"textarea","pptxv-ai-input");d.rows=2,d.placeholder=i("pptx.ai.placeholder"),d.setAttribute("aria-label",i("pptx.ai.placeholder"));let y=hk(t,"button","pptxv-ai-send");y.type="submit",y.setAttribute("aria-label",i("pptx.ai.send")),y.appendChild(rk(t,"send")),C.append(d,y),n.append(a,...m?[m.el]:[],l,g,f,C);try{c=await(o.createChat??yk)({bridge:o.bridge,config:o.config});}catch{return s.textContent=i("pptx.ai.unavailableTitle"),d.disabled=true,y.disabled=true,m?.destroy(),{destroy:()=>n.replaceChildren()}}let r=c,b=O({doc:t,t:i,deckId:wk(o.bridge),store:o.historyStore,getMessages:()=>r.getSnapshot().messages,setMessages:u=>r.setMessages(u)});a.insertBefore(b.button,x),n.appendChild(b.el);let k=r.subscribe(()=>b.notifyMessagesChanged()),T=new Set,P=u=>{if(!p)return;let A=u.messages.flatMap(Y=>zk(Y).filter(Z=>Z.kind==="tool")).at(-1);if(!A||A.kind!=="tool"||A.state==="input-streaming"||T.has(A.toolCallId))return;T.add(A.toolCallId);let L=Dk(A.toolName,A.input);L&&L.slideIndex!==void 0&&o.goToSlide?.(L.slideIndex),p.flashToolTarget(L);},M=u=>{q(t,l,u.messages,i),s.hidden=u.messages.length>0,u.messages.length===0&&l.appendChild(s),G(t,g,r.proposals.list(),i,{accept:A=>{p?.flashToolTarget(null),r.proposals.apply(A),M(r.getSnapshot());},reject:A=>{r.proposals.revert(A),M(r.getSnapshot());},acceptAll:()=>{p?.flashToolTarget(null),r.proposals.acceptAll(),M(r.getSnapshot());}});let w=u.status==="submitted"||u.status==="streaming";n.classList.toggle("is-busy",w),y.setAttribute("aria-label",i(w?"pptx.ai.stop":"pptx.ai.send")),f.hidden=!u.error,f.textContent=u.error?i("pptx.ai.errorPrefix"):"",l.scrollTop=l.scrollHeight,P(u);},S=()=>{if(n.classList.contains("is-busy")){r.stop();return}let u=d.value.trim();u&&(d.value="",r.sendMessage(u));};C.addEventListener("submit",u=>{u.preventDefault(),S();}),d.addEventListener("keydown",u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),S());});let I=p?.getPrefill().nonce??0,J=()=>{if(!p)return;let u=p.getPrefill();u.nonce!==I&&(I=u.nonce,d.value=u.text,d.focus());},Q=p?.subscribe(J),X=r.subscribe(M);return M(r.getSnapshot()),{changeAnimator:r.changeAnimator,destroy(){X(),k(),b.destroy(),Q?.(),m?.destroy(),n.replaceChildren();}}}export{wt as createAiPanel};