"use strict";(globalThis.webpackChunkgroup_speed_dial=globalThis.webpackChunkgroup_speed_dial||[]).push([[741],{2803:(e,a,i)=>{i.r(a),i.d(a,{default:()=>b});var t=i(6849),l=i(2183),s=i(7473),r=i(1626),d=i(6994),o=i(6526),n=i(9516),c=i(6669),p=i(1619),u=i(5414),g=i(8197),m=i(8080),_=i(963),h=i(1078);const v=l.c9.get(),b=(async()=>{await m.RO,await v&&(f(),r._C.register(f))})();async function f(e=d.e.getCurrentGroup()){e.list||(await e.getDialsToDraw()).map((e=>({dial:e,dialNode:(0,c.$H)(e.domId)}))).filter((e=>e.dialNode&&e.dial.canHaveThumbnail())).forEach((({dial:a,dialNode:i})=>{i.firstElementChild.insertAdjacentElement("afterbegin",(0,p.z)("div",{class:"dial_float_label replace_dial replace_image",handlers:{onclick:(0,u.do)((()=>(async(e,a)=>{const i=g.M.groupById(a),t=i.dialById(e);if(!t||!i)return;const d=await v;if(d){const{screenshotId:e,type:i,size:l}=d;i.startsWith("image/svg")||l<6e5?(t.thumbnail={type:n.O8.FILE,position:n.X.CENTER,value:i},await(0,o._z)({type:"save_db_image",screenshotId:e,groupId:a,url:t.url,notify:!0})):(t.thumbnail={type:n.O8.FILE,position:n.X.FULL_WIDTH,value:i},await(0,o._z)({type:"take_screen",groupId:a,url:t.url,dialsEnvironment:(0,h.c)(),dialSize:t.size,screenshotId:e})),await g.M.action("replaceDial",{groupId:a,dial:t})}await l.c9.reset(),s.k.setActive(!1),r._C.unregister(f),document.querySelectorAll(".replace_image").forEach(c.bf)})(a.index,e.id)))}},[(0,p.z)("img",{src:(0,_.Z)("svg/image (2).svg")}),(0,p.z)("span",{class:"ellipsis",textContent:(0,t.tr)("add_image"),title:(0,t.tr)("add_image")})]))}))}},8080:(e,a,i)=>{i.d(a,{EK:()=>s,RO:()=>r,re:()=>l});var t=i(2214);const{promise:l,resolve:s}=Promise.withResolvers(),r=Promise.all([l,t.b])}}]);