1import{I as _,P as k}from"./7i5epezK.js";import{u as b}from"./AImC4Z4_.js";import{M as h,$ as P,Q as B,ax as i}from"./app-LxRIDceF.js";import{c as M}from"./ntTJVcoz.js";import{b as T,g as v,l as C,B as E,i as N,K as S,E as D,u as n}from"./c_mtvhGZ.js";import"./DBqXntnj.js";import"./00Uemgv0.js";const I={"data-cy-mkw-button":"",class:"mkw-button"},p="button",U=T({__name:"WidgetButton",props:{widget:{}},emits:["updateProps"],setup(c,{expose:l,emit:u}){const m={label:{type:"string",default:"BUTTON"},colored:{type:"boolean",default:!0},script:{type:"string",multiline:!0,default:'Mk:dialog("hello" "world")'}},e=c,d=u,{widgetProps:r,configure:f}=b(p,m,e,d),g=new k,y=async()=>{const s=new _(M({storageKey:"widget",token:P?.token}),{in:t=>new Promise(a=>{B({title:t}).then(({canceled:w,result:x})=>{a(w?"":x)})}),out:t=>{},log:(t,a)=>{}});let o;try{o=g.parse(r.script)}catch{i({type:"error",text:"Syntax error :("});return}try{await s.exec(o)}catch(t){i({type:"error",text:t})}};return l({name:p,configure:f,id:e.widget?e.widget.id:null}),(s,o)=>(v(),C("div",I,[E(h,{primary:n(r).colored,full:"",onClick:y},{default:N(()=>[S(D(n(r).label),1)]),_:1},8,["primary"])]))}});export{U as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.