1import{G as a,O as t,P as h}from"./vue.00f7c436.js";import{_ as c,bj as i}from"./index.474d7b13.js";import"./sentry.09480738.js";const l={name:"TmlSearchable",props:{items:{type:Array},searchableProperties:{type:Object,required:!0}},data(){return{searched:[],searchable:null,searching:!1,searchTerm:null}},computed:{noResults(){return this.searched.length===0},allItems(){return this.items}},watch:{items:{immediate:!0,handler(e){e&&e.length&&(this.searchable=new i(e,this.searchableProperties))}}},methods:{async search(e){!this.searchable||(this.searchTerm=e,this.searching=!0,this.searched=await this.searchable.query(e),this.searched.length===0?this.$emit("no-results",this.searched,this.searchTerm):this.$emit("search",this.searched,this.searchTerm),this.searching=!1)}}};function n(e,m,u,o,s,r){return a(e.$slots,"default",t(h({search:r.search,searching:s.searching,searchTerm:s.searchTerm,searched:s.searched,noResults:r.noResults,allItems:r.allItems})))}const b=c(l,[["render",n]]);export{b as default}; 2//# sourceMappingURL=TmlSearchable.e5678453.js.map
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.