drill.define(e=>(e,c,a)=>{let l,s=Object.keys(c),n={};s.forEach(e=>{n[e]=""}),e.mainPage.watch("[selected=1]",e=>{let{val:t}=e;switch(l&&(c.unsync(l),l=null),t.length){case 1:(l=t[0]).sync(c,s,!0);break;case 0:Object.assign(c,n)}a&&a(t[0])})});