@avakhula/ui 0.1.18 → 0.1.19

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/dist/index.js CHANGED
@@ -4901,7 +4901,7 @@ const Zd = {
4901
4901
  }), this.filter(this.filterString, t);
4902
4902
  },
4903
4903
  onClose() {
4904
- this.isOpen = !1, this.filter("", this.actualOptions), this.isMultiple ? this.$emit("close", Object.keys(this.selected)) : this.$emit("close", Object.keys(this.selected)[0]), this.$emit("blur"), this.verticalVal = this.vertical ?? "bottom";
4904
+ this.isOpen = !1, this.filterString = "", this.filterFunc(this.actualOptions, this.filterString), this.isMultiple ? this.$emit("close", Object.keys(this.selected)) : this.$emit("close", Object.keys(this.selected)[0]), this.$emit("blur"), this.verticalVal = this.vertical ?? "bottom";
4905
4905
  },
4906
4906
  onOpen() {
4907
4907
  const t = document.documentElement.scrollHeight;
@@ -26,7 +26,7 @@
26
26
  * https://markjs.io/
27
27
  * Copyright (c) 2014–2018, Julian Kühnel
28
28
  * Released under the MIT license https://git.io/vwTVl
29
- *****************************************************/(function(t,n){(function(e,o){t.exports=o()})(je,function(){class e{constructor(i,s=!0,l=[],u=5e3){this.ctx=i,this.iframes=s,this.exclude=l,this.iframesTimeout=u}static matches(i,s){const l=typeof s=="string"?[s]:s,u=i.matches||i.matchesSelector||i.msMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector;if(u){let d=!1;return l.every(p=>!u.call(i,p)||(d=!0,!1)),d}return!1}getContexts(){let i=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(s=>{const l=i.filter(u=>u.contains(s)).length>0;i.indexOf(s)!==-1||l||i.push(s)}),i}getIframeContents(i,s,l=()=>{}){let u;try{const d=i.contentWindow;if(u=d.document,!d||!u)throw new Error("iframe inaccessible")}catch{l()}u&&s(u)}isIframeBlank(i){const s="about:blank",l=i.getAttribute("src").trim();return i.contentWindow.location.href===s&&l!==s&&l}observeIframeLoad(i,s,l){let u=!1,d=null;const p=()=>{if(!u){u=!0,clearTimeout(d);try{this.isIframeBlank(i)||(i.removeEventListener("load",p),this.getIframeContents(i,s,l))}catch{l()}}};i.addEventListener("load",p),d=setTimeout(p,this.iframesTimeout)}onIframeReady(i,s,l){try{i.contentWindow.document.readyState==="complete"?this.isIframeBlank(i)?this.observeIframeLoad(i,s,l):this.getIframeContents(i,s,l):this.observeIframeLoad(i,s,l)}catch{l()}}waitForIframes(i,s){let l=0;this.forEachIframe(i,()=>!0,u=>{l++,this.waitForIframes(u.querySelector("html"),()=>{--l||s()})},u=>{u||s()})}forEachIframe(i,s,l,u=()=>{}){let d=i.querySelectorAll("iframe"),p=d.length,f=0;d=Array.prototype.slice.call(d);const c=()=>{--p<=0&&u(f)};p||c(),d.forEach(h=>{e.matches(h,this.exclude)?c():this.onIframeReady(h,v=>{s(h)&&(f++,l(v)),c()},c)})}createIterator(i,s,l){return document.createNodeIterator(i,s,l,!1)}createInstanceOnIframe(i){return new e(i.querySelector("html"),this.iframes)}compareNodeIframe(i,s,l){const u=i.compareDocumentPosition(l),d=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&d&&(s===null||s.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(i){const s=i.previousNode();return{prevNode:s,node:(s===null||i.nextNode())&&i.nextNode()}}checkIframeFilter(i,s,l,u){let d=!1,p=!1;return u.forEach((f,c)=>{f.val===l&&(d=c,p=f.handled)}),this.compareNodeIframe(i,s,l)?(d!==!1||p?d===!1||p||(u[d].handled=!0):u.push({val:l,handled:!0}),!0):(d===!1&&u.push({val:l,handled:!1}),!1)}handleOpenIframes(i,s,l,u){i.forEach(d=>{d.handled||this.getIframeContents(d.val,p=>{this.createInstanceOnIframe(p).forEachNode(s,l,u)})})}iterateThroughNodes(i,s,l,u,d){const p=this.createIterator(s,i,u);let f,c,h=[],v=[],m=()=>({prevNode:c,node:f}=this.getIteratorNode(p),f);for(;m();)this.iframes&&this.forEachIframe(s,_=>this.checkIframeFilter(f,c,_,h),_=>{this.createInstanceOnIframe(_).forEachNode(i,y=>v.push(y),u)}),v.push(f);v.forEach(_=>{l(_)}),this.iframes&&this.handleOpenIframes(h,i,l,u),d()}forEachNode(i,s,l,u=()=>{}){const d=this.getContexts();let p=d.length;p||u(),d.forEach(f=>{const c=()=>{this.iterateThroughNodes(i,f,s,l,()=>{--p<=0&&u()})};this.iframes?this.waitForIframes(f,c):c()})}}class o{constructor(i){this.ctx=i,this.ie=!1;const s=window.navigator.userAgent;(s.indexOf("MSIE")>-1||s.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(i){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},i)}get opt(){return this._opt}get iterator(){return new e(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(i,s="debug"){const l=this.opt.log;this.opt.debug&&typeof l=="object"&&typeof l[s]=="function"&&l[s](`mark.js: ${i}`)}escapeStr(i){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(i){return this.opt.wildcards!=="disabled"&&(i=this.setupWildcardsRegExp(i)),i=this.escapeStr(i),Object.keys(this.opt.synonyms).length&&(i=this.createSynonymsRegExp(i)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(i=this.setupIgnoreJoinersRegExp(i)),this.opt.diacritics&&(i=this.createDiacriticsRegExp(i)),i=this.createMergedBlanksRegExp(i),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(i=this.createJoinersRegExp(i)),this.opt.wildcards!=="disabled"&&(i=this.createWildcardsRegExp(i)),i=this.createAccuracyRegExp(i)}createSynonymsRegExp(i){const s=this.opt.synonyms,l=this.opt.caseSensitive?"":"i",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let d in s)if(s.hasOwnProperty(d)){const p=s[d],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(d):this.escapeStr(d),c=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p);f!==""&&c!==""&&(i=i.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(c)})`,`gm${l}`),u+`(${this.processSynomyms(f)}|${this.processSynomyms(c)})`+u))}return i}processSynomyms(i){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(i=this.setupIgnoreJoinersRegExp(i)),i}setupWildcardsRegExp(i){return(i=i.replace(/(?:\\)*\?/g,s=>s.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,s=>s.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(i){let s=this.opt.wildcards==="withSpaces";return i.replace(/\u0001/g,s?"[\\S\\s]?":"\\S?").replace(/\u0002/g,s?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(i){return i.replace(/[^(|)\\]/g,(s,l,u)=>{let d=u.charAt(l+1);return/[(|)\\]/.test(d)||d===""?s:s+"\0"})}createJoinersRegExp(i){let s=[];const l=this.opt.ignorePunctuation;return Array.isArray(l)&&l.length&&s.push(this.escapeStr(l.join(""))),this.opt.ignoreJoiners&&s.push("\\u00ad\\u200b\\u200c\\u200d"),s.length?i.split(/\u0000+/).join(`[${s.join("")}]*`):i}createDiacriticsRegExp(i){const s=this.opt.caseSensitive?"":"i",l=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let u=[];return i.split("").forEach(d=>{l.every(p=>{if(p.indexOf(d)!==-1){if(u.indexOf(p)>-1)return!1;i=i.replace(new RegExp(`[${p}]`,`gm${s}`),`[${p}]`),u.push(p)}return!0})}),i}createMergedBlanksRegExp(i){return i.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(i){const s="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let l=this.opt.accuracy,u=typeof l=="string"?l:l.value,d=typeof l=="string"?[]:l.limiters,p="";switch(d.forEach(f=>{p+=`|${this.escapeStr(f)}`}),u){case"partially":default:return`()(${i})`;case"complementary":return`()([^${p="\\s"+(p||this.escapeStr(s))}]*${i}[^${p}]*)`;case"exactly":return`(^|\\s${p})(${i})(?=$|\\s${p})`}}getSeparatedKeywords(i){let s=[];return i.forEach(l=>{this.opt.separateWordSearch?l.split(" ").forEach(u=>{u.trim()&&s.indexOf(u)===-1&&s.push(u)}):l.trim()&&s.indexOf(l)===-1&&s.push(l)}),{keywords:s.sort((l,u)=>u.length-l.length),length:s.length}}isNumeric(i){return Number(parseFloat(i))==i}checkRanges(i){if(!Array.isArray(i)||Object.prototype.toString.call(i[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(i),[];const s=[];let l=0;return i.sort((u,d)=>u.start-d.start).forEach(u=>{let{start:d,end:p,valid:f}=this.callNoMatchOnInvalidRanges(u,l);f&&(u.start=d,u.length=p-d,s.push(u),l=p)}),s}callNoMatchOnInvalidRanges(i,s){let l,u,d=!1;return i&&i.start!==void 0?(u=(l=parseInt(i.start,10))+parseInt(i.length,10),this.isNumeric(i.start)&&this.isNumeric(i.length)&&u-s>0&&u-l>0?d=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(i)}`),this.opt.noMatch(i))):(this.log(`Ignoring invalid range: ${JSON.stringify(i)}`),this.opt.noMatch(i)),{start:l,end:u,valid:d}}checkWhitespaceRanges(i,s,l){let u,d=!0,p=l.length,f=s-p,c=parseInt(i.start,10)-f;return(u=(c=c>p?p:c)+parseInt(i.length,10))>p&&(u=p,this.log(`End range automatically set to the max value of ${p}`)),c<0||u-c<0||c>p||u>p?(d=!1,this.log(`Invalid range: ${JSON.stringify(i)}`),this.opt.noMatch(i)):l.substring(c,u).replace(/\s+/g,"")===""&&(d=!1,this.log("Skipping whitespace only range: "+JSON.stringify(i)),this.opt.noMatch(i)),{start:c,end:u,valid:d}}getTextNodes(i){let s="",l=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{l.push({start:s.length,end:(s+=u.textContent).length,node:u})},u=>this.matchesExclude(u.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{i({value:s,nodes:l})})}matchesExclude(i){return e.matches(i,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(i,s,l){const u=this.opt.element?this.opt.element:"mark",d=i.splitText(s),p=d.splitText(l-s);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=d.textContent,d.parentNode.replaceChild(f,d),p}wrapRangeInMappedTextNode(i,s,l,u,d){i.nodes.every((p,f)=>{const c=i.nodes[f+1];if(c===void 0||c.start>s){if(!u(p.node))return!1;const h=s-p.start,v=(l>p.end?p.end:l)-p.start,m=i.value.substr(0,p.start),_=i.value.substr(v+p.start);if(p.node=this.wrapRangeInTextNode(p.node,h,v),i.value=m+_,i.nodes.forEach((y,g)=>{g>=f&&(i.nodes[g].start>0&&g!==f&&(i.nodes[g].start-=v),i.nodes[g].end-=v)}),l-=v,d(p.node.previousSibling,p.start),!(l>p.end))return!1;s=p.end}return!0})}wrapMatches(i,s,l,u,d){const p=s===0?0:s+1;this.getTextNodes(f=>{f.nodes.forEach(c=>{let h;for(c=c.node;(h=i.exec(c.textContent))!==null&&h[p]!=="";){if(!l(h[p],c))continue;let v=h.index;if(p!==0)for(let m=1;m<p;m++)v+=h[m].length;c=this.wrapRangeInTextNode(c,v,v+h[p].length),u(c.previousSibling),i.lastIndex=0}}),d()})}wrapMatchesAcrossElements(i,s,l,u,d){const p=s===0?0:s+1;this.getTextNodes(f=>{let c;for(;(c=i.exec(f.value))!==null&&c[p]!=="";){let h=c.index;if(p!==0)for(let m=1;m<p;m++)h+=c[m].length;const v=h+c[p].length;this.wrapRangeInMappedTextNode(f,h,v,m=>l(c[p],m),(m,_)=>{i.lastIndex=_,u(m)})}d()})}wrapRangeFromIndex(i,s,l,u){this.getTextNodes(d=>{const p=d.value.length;i.forEach((f,c)=>{let{start:h,end:v,valid:m}=this.checkWhitespaceRanges(f,p,d.value);m&&this.wrapRangeInMappedTextNode(d,h,v,_=>s(_,f,d.value.substring(h,v),c),_=>{l(_,f)})}),u()})}unwrapMatches(i){const s=i.parentNode;let l=document.createDocumentFragment();for(;i.firstChild;)l.appendChild(i.removeChild(i.firstChild));s.replaceChild(l,i),this.ie?this.normalizeTextNode(s):s.normalize()}normalizeTextNode(i){if(i){if(i.nodeType===3)for(;i.nextSibling&&i.nextSibling.nodeType===3;)i.nodeValue+=i.nextSibling.nodeValue,i.parentNode.removeChild(i.nextSibling);else this.normalizeTextNode(i.firstChild);this.normalizeTextNode(i.nextSibling)}}markRegExp(i,s){this.opt=s,this.log(`Searching with expression "${i}"`);let l=0,u="wrapMatches";const d=p=>{l++,this.opt.each(p)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](i,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,l),d,()=>{l===0&&this.opt.noMatch(i),this.opt.done(l)})}mark(i,s){this.opt=s;let l=0,u="wrapMatches";const{keywords:d,length:p}=this.getSeparatedKeywords(typeof i=="string"?[i]:i),f=this.opt.caseSensitive?"":"i",c=h=>{let v=new RegExp(this.createRegExp(h),`gm${f}`),m=0;this.log(`Searching with expression "${v}"`),this[u](v,1,(_,y)=>this.opt.filter(y,h,l,m),_=>{m++,l++,this.opt.each(_)},()=>{m===0&&this.opt.noMatch(h),d[p-1]===h?this.opt.done(l):c(d[d.indexOf(h)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),p===0?this.opt.done(l):c(d[0])}markRanges(i,s){this.opt=s;let l=0,u=this.checkRanges(i);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(d,p,f,c)=>this.opt.filter(d,p,f,c),(d,p)=>{l++,this.opt.each(d,p)},()=>{this.opt.done(l)})):this.opt.done(l)}unmark(i){this.opt=i;let s=this.opt.element?this.opt.element:"*";s+="[data-markjs]",this.opt.className&&(s+=`.${this.opt.className}`),this.log(`Removal selector "${s}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,l=>{this.unwrapMatches(l)},l=>{const u=e.matches(l,s),d=this.matchesExclude(l);return!u||d?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const i=new o(a);return this.mark=(s,l)=>(i.mark(s,l),this),this.markRegExp=(s,l)=>(i.markRegExp(s,l),this),this.markRanges=(s,l)=>(i.markRanges(s,l),this),this.unmark=s=>(i.unmark(s),this),this}})})(xo);var md=xo.exports;const gd=Cn(md),yd={props:{infiniteLoader:{type:Boolean,default:!0}},watch:{infiniteLoader(t){t||infiniteLoaderObserver.disconnect()}},data(){return{infiniteLoaderObserver:null}},mounted(){this.infiniteLoader&&(this.infiniteLoaderObserver=new IntersectionObserver(t=>{t.forEach(n=>{n.isIntersecting&&this.$emit("loadMoreOptions")})}),this.infiniteLoaderObserver.observe(this.$refs.infinityLoader))},beforeDestroy(){this.infiniteLoader&&(infiniteLoaderObserver==null||infiniteLoaderObserver.disconnect())},emits:["loadMoreOptions"]};function bd(t,n){let e=null;function o(...a){e&&clearTimeout(e),e=setTimeout(()=>{t.apply(this,a),e=null},n)}return o.cancel=function(){e&&(clearTimeout(e),e=null)},o}const kp="";function To(t){return JSON.parse(JSON.stringify(t))}const vd={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],mixins:[yd],props:{classList:[String,Array],keywordHighlighter:{type:Boolean,default:!0},placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},menuSize:{type:[String,Number]},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return pt()}},options:{type:[Array,Function],default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return pt()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},errorMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},searchDebounce:{type:Number,default:500},alphabeticStyle:{type:Boolean,default:!1}},emits:["close","input","blur","search","resize","submit","clearValue","toggle-bookmarked-option","update:modelValue"],watch:{value(t){this.val=t,(!Array.isArray(t)||t.join(",")!==Object.keys(this.selected).join(","))&&this.setPreparedValues(this.actualOptions,!1)},modelValue:{handler(t){this.val=t,this.actualOptions=[],this.setPreparedValues()},deep:!0},val(t){this.watchClearValue&&(!t||Array.isArray(t)&&!t.length)&&this.setPreparedValues(this.actualOptions).then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},options:{handler(t){this.initialOptions=typeof t=="function"?t:To(t)},deep:!0},initialOptions(t){let n=!0;if(typeof t=="function")n=!1;else{const e=[],o=t;Array.prototype.forEach.call(o,a=>{a.id!==void 0&&e.push(a.id)}),n=JSON.stringify(e)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=e}(this.isInitialized&&!n||this.isWatching)&&this.setPreparedValues().then(()=>{const e=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:e,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){this.marker=new gd(this.$refs.list.$el),this.registerDependency(),this.$globalEvents.$on("select:refresh",()=>{this.setPreparedValues()}),document.addEventListener("mousemove",this.onResize),document.addEventListener("mouseup",this.endResizing)},data(){var t,n,e,o,a,i,s,l;return this.defaultFilter=bd(u=>{this.marker.unmark();const d=this.filterString.toLowerCase().trim();this.countVisibleChildren=this.filterFunc.call(this,u,d),d&&this.keywordHighlighter&&this.marker.mark(d)},1e3),{initialOptions:typeof this.options=="function"?this.options:To(this.options),val:this.modelValue?this.modelValue:this.value,size:{left:this.initialSize&&this.initialSize.left||0,right:this.initialSize&&this.initialSize.right||0},resizingProp:null,isInitialized:!1,optionsIdsWatch:[],isLoading:!1,actualName:this.isMultiple?this.name+"[]":this.name,filterString:"",actualOptions:[],actualBookmarkedOptions:{},selected:[],isOpen:!1,verticalVal:this.vertical??"bottom",allOptionsIsChecked:!0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,focusedOptionId:"",actualStrings:{searchPlaceholder:lang(this.searchPlaceholderText.length?this.searchPlaceholderText:"search_placeholder",(t=this.LANG_COMPONENTS)==null?void 0:t.COMPONENT_SELECT),emptyTitle:lang("empty_title",(n=this.LANG_COMPONENTS)==null?void 0:n.COMPONENT_SELECT),selectAllOptions:lang("all_options",(e=this.LANG_COMPONENTS)==null?void 0:e.COMPONENT_SELECT),allSelected:lang("all_selected",(o=this.LANG_COMPONENTS)==null?void 0:o.COMPONENT_SELECT),loading:lang("loading",(a=this.LANG_COMPONENTS)==null?void 0:a.COMPONENT_SELECT)+"...",selectedCount:lang("selected_count",(i=this.LANG_COMPONENTS)==null?void 0:i.COMPONENT_SELECT),buttonTitle:this.buttonTitle||lang("button_title",(s=this.LANG_COMPONENTS)==null?void 0:s.COMPONENT_SELECT),requiredDependencyNotFilled:this.requiredDependencyNotFilled||lang("required_dependency_are_not_filled",(l=this.LANG_COMPONENTS)==null?void 0:l.COMPONENT_SELECT),...this.strings},dependencyValue:null}},methods:{onBlur(){setTimeout(()=>{this.isOpen||this.$emit("blur")},200)},inputKeyupDown(){this.focusOnFirstOptions()},comboboxKeyupDown(){if(this.showSearch){this.$refs.search.focus();return}this.focusOnFirstOptions()},focus(){this.$refs.combobox.focus()},focusOnFirstOptions(){this.$refs.list.$el.querySelector("[tabindex]:not(hidden)").focus()},startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",this.filterString),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.initialOptions;return this.alphabetSort&&(n=n.sort((e,o)=>e.title.toLowerCase().localeCompare(o.title.toLowerCase()))),this.prepare(n).then(([e,o])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.isInitialized=!0,this.selected=o,this.setBookmarkedOptions(e)})},clear(){this.setPreparedValues(),this.allOptionsIsChecked=!1,this.selected=[],this.isMultiple?(this.$emit("update:modelValue",null),this.$emit("input",null),this.$emit("clear-value",null)):(this.$emit("update:modelValue",[]),this.$emit("input",[]),this.$emit("clear-value",[])),this.setPreparedValues()},clearValue(){this.clear(),this.setPreparedValues()},prepare(t,n=!0){return new Promise(e=>{const o={},a=[];let i=Promise.resolve();typeof t=="function"?(this.isLoading=!0,this.dependency&&(t=t.bind(null,this.dependencyValue)),i=i.then(t)):i=i.then(()=>t),i.then(s=>(this.isLoading=!1,s.forEach(l=>{l.initiallyVisible=typeof l.visible>"u"?!0:l.visible,l.visible=l.initiallyVisible,l.readonly=!!l.readonly,l.checked=this.isMultiple?this.val!==null&&this.val.findIndex(u=>l.id==u)>-1:this.val!==null&&this.val==l.id,l.checked&&(!this.onlyEndNodes||!l.children)&&(o[l.id]=l),l.children&&(this.hasTreeChildren=!0,l.isChildrenVisible=!1),a.push(new Promise(u=>{l.children?this.prepare(l.children).then(([d,p])=>{l.children=d,this.parentAutoCheck&&(l.checked=this.checkIfOptionsChecked(l.children)),Object.assign(o,p),u(l)}):u(l)}))}),Promise.all(a).then(l=>{e([l,o])}))).catch(s=>{throw this.isLoading=!1,s})})},filterFunc(t,n){let e=0;return t.forEach(o=>{let a=o.initiallyVisible&&o.title&&o.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[o.id];if(o.children&&o.children.length){let i=this.filterFunc(o.children,n);e+=i,i&&(o.isChildrenVisible=n.length>0||!!Object.keys(this.actualBookmarkedOptions).length,o.isDisabled=i<o.children.length&&!this.isBookmarkable),a?i||(a=!1):a=!!i}o.visible=a,a&&e++}),e},submit(){this.change();const t=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":submit",{values:t,filter:this.filterId}),this.$emit("submit")},change(){const t=Object.keys(this.selected);this.isMultiple?(this.$emit("update:modelValue",t),this.$emit("input",t)):(this.$emit("update:modelValue",t[0]),this.$emit("input",t[0])),this.$globalEvents.$emit("select-"+this.filterId+":update",{values:t,filter:this.filterId}),this.$refs.dropdown.close()},checkIfOptionsChecked(t){return t.every(n=>n.checked||n.readonly)},registerCheck(t,n,e){if(n)if(t.checked=!0,this.isMultiple)this.onlyEndNodes&&t.children&&t.children.length||(this.selected[t.id]=t,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected)));else{const o=Object.keys(this.selected)[0];o&&(this.selected[o].checked=!1),this.selected={[t.id]:t},this.change()}else delete this.selected[t.id],t.checked=!1,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected));this.toggleDuplicateOptions(this.actualOptions,t.id,n),e&&(this.allOptionsIsChecked=this.checkIfOptionsChecked(this.actualOptions))},toggleDuplicateOptions(t,n,e){for(let o of t)o.id===n&&(o.checked=e),o.children&&this.toggleDuplicateOptions(o.children,n,e)},manageAll(){this.allOptionsIsChecked=!this.allOptionsIsChecked,this.traverseTree(this.actualOptions,t=>{t.readonly||this.registerCheck(t,this.allOptionsIsChecked,!1)})},traverseTree(t,n){t.forEach(e=>{n(e),e.children&&e.children.length&&this.traverseTree(e.children,n)})},getArrayOptions(t){let n=[];for(let e of t)n.push(e),e.children&&(n=n.concat(this.getArrayOptions(e.children)));return n},toggleBookmark(t){this.actualBookmarkedOptions[t.id]?delete this.actualBookmarkedOptions[t.id]:this.actualBookmarkedOptions[t.id]=t,this.$emit("toggle-bookmarked-option",t.id),this.filter(this.filterString,this.actualOptions)},setBookmarkedOptions(t){t.forEach(n=>{n.children&&n.children.length?this.setBookmarkedOptions(n.children):this.initBookmarks.includes(n.id)&&(this.actualBookmarkedOptions[n.id]=n)}),this.filter(this.filterString,t)},onClose(){this.isOpen=!1,this.filter("",this.actualOptions),this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0]),this.$emit("blur"),this.verticalVal=this.vertical??"bottom"},onOpen(){const t=document.documentElement.scrollHeight;this.isOpen=!0,this.vertical!=="bottom"&&this.$nextTick(()=>{document.documentElement.scrollHeight>t&&(this.verticalVal="top")})}},computed:{hasTrigger(){return!!this.$slots.trigger},hasTriggerContent(){return!!this.$slots.triggerContent},hasEmptyMessage(){return!!this.$slots.emptyMessage},treeDropPos(){return this.menuSize?{width:this.menuSize+"px",maxWidth:this.menuSize+"px",minWidth:this.menuSize+"px"}:{width:"auto",position:"absolute",left:-this.size.left+"px",right:-this.size.right+"px"}},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10&&!this.alphabeticStyle},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbAlert:Ft,IbIconButton:ut,IbIcon:Le,IbDropdown:ir,IbInput:qr,List:Rr,"select-option":pd},directives:{Tooltip:Wt},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)},inheritAttrs:!1},_d={key:0,class:"tree-select-empty"},$d={key:1,class:"tree-select-default-empty tree-select-empty"},wd={key:5,ref:"infinityLoader"};function kd(t,n,e,o,a,i){const s=r.resolveComponent("ib-alert"),l=r.resolveComponent("ib-icon"),u=r.resolveComponent("ib-icon-button"),d=r.resolveComponent("ib-input"),p=r.resolveComponent("select-option"),f=r.resolveComponent("list"),c=r.resolveComponent("ib-dropdown"),h=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock(r.Fragment,null,[e.errorMessage?(r.openBlock(),r.createBlock(s,{key:0,class:"tree-select-error"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.errorMessage),1)]),_:1})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["tree-select",{...e.classList,"tree-select-custom-trigger-content":i.hasTriggerContent}])},[r.createVNode(c,{disabled:a.isLoading||e.disable,"is-resizable":e.isResizable,vertical:a.verticalVal,class:r.normalizeClass({disable:e.disable}),ref:"dropdown",onClose:i.onClose,onOpen:i.onOpen},r.createSlots({body:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:r.normalizeStyle(i.treeDropPos),role:"listbox"},[e.isResizable?(r.openBlock(),r.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[6]||(n[6]=v=>i.startResizing("left"))},null,32)):r.createCommentVNode("",!0),e.isResizable?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[7]||(n[7]=v=>i.startResizing("right"))},null,544)),[[h,t.lang("resize_list","select"),void 0,{rightCenter:!0}]]):r.createCommentVNode("",!0),i.showSearch?(r.openBlock(),r.createBlock(d,{key:2,class:"tree-search",ref:"search",autocomplete:"off","show-icon":!0,value:a.filterString,debounce:e.searchDebounce,"aria-label":e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[8]||(n[8]=v=>i.filter(v,a.actualOptions)),onKeyup:r.withKeys(i.inputKeyupDown,["down"])},null,8,["value","debounce","aria-label","placeholder","onKeyup"])):r.createCommentVNode("",!0),r.createVNode(f,{ref:"list",role:"listbox",class:r.normalizeClass({"tree-select-list":!0,"has-hierarchy":i.hasHierarchy,"alphabetic-list":e.alphabeticStyle})},{default:r.withCtx(()=>[!i.requiredDependencyNotFilled&&!i.visibleOptionsCount&&i.hasEmptyMessage?(r.openBlock(),r.createElementBlock("div",_d,[r.renderSlot(t.$slots,"emptyMessage")])):!i.requiredDependencyNotFilled&&!i.visibleOptionsCount?(r.openBlock(),r.createElementBlock("div",$d,r.toDisplayString(a.actualStrings.emptyTitle),1)):r.createCommentVNode("",!0),r.withDirectives(r.createElementVNode("div",{class:"tree-select-empty"},r.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[r.vShow,i.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(r.openBlock(),r.createBlock(p,{key:2,option:{title:t.lang("none","select"),id:null,checked:i.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,role:"option",onCheck:i.registerCheck,onToggleBookmark:i.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):r.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:3},r.renderList(a.actualBookmarkedOptions,v=>(r.openBlock(),r.createBlock(p,{key:"bookmark"+v.id,class:"bookmarked-option",option:v,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,role:"option",onCheck:i.registerCheck,onToggleBookmark:i.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128)):r.createCommentVNode("",!0),i.requiredDependencyNotFilled?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[e.allOptions&&!e.alphabeticStyle&&e.isMultiple&&i.visibleOptionsCount&&!i.requiredDependencyNotFilled?(r.openBlock(),r.createBlock(p,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:i.visibleOptionsCount<i.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs,"alphabetic-style":e.alphabeticStyle,role:"option",onCheck:i.manageAll,onOnFocus:n[9]||(n[9]=v=>a.focusedOptionId=v)},null,8,["option","is-toggle","name","is-multiple","uid","only-end-nodes","show-input","alphabetic-style","onCheck"])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.actualOptions,v=>r.renderSlot(t.$slots,a.actualName,{key:e.name+v.value,option:v,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[r.withDirectives(r.createVNode(p,{option:v,"is-toggle":e.isToggle,name:a.actualName,role:"option","parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs,"alphabetic-style":e.alphabeticStyle,onCheck:i.registerCheck,onToggleBookmark:i.toggleBookmark,onOnFocus:n[10]||(n[10]=m=>a.focusedOptionId=m)},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","uid","only-end-nodes","html-title","show-input","alphabetic-style","onCheck","onToggleBookmark"]),[[r.vShow,v.visible]])])),128))],64)),t.infiniteLoader?(r.openBlock(),r.createElementBlock("div",wd,null,512)):r.createCommentVNode("",!0)]),_:3},8,["class"])],6)]),_:2},[i.hasTrigger?{name:"trigger",fn:r.withCtx(()=>[r.renderSlot(t.$slots,"trigger",{selectedCount:i.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:r.withCtx(({isOpened:v})=>[r.createElementVNode("div",{role:"combobox",tabindex:"0",class:r.normalizeClass(["tree-choice",{"tree-choice-opened":v,"has-clear-button":e.showClearButton,"tree-choice-error":e.errorMessage}]),ref:"combobox","aria-expanded":v,onClick:n[2]||(n[2]=r.withModifiers(()=>{},["prevent"])),onBlur:n[3]||(n[3]=(...m)=>i.onBlur&&i.onBlur(...m)),onKeyup:[n[4]||(n[4]=r.withKeys((...m)=>i.comboboxKeyupDown&&i.comboboxKeyupDown(...m),["down"])),n[5]||(n[5]=r.withKeys((...m)=>i.comboboxKeyupDown&&i.comboboxKeyupDown(...m),["up"]))],"aria-label":e.ariaLabel,"aria-activedescendant":a.focusedOptionId},[i.hasTriggerContent?r.renderSlot(t.$slots,"triggerContent",{key:0,selectedCount:i.selectedKeys.length,isOpen:v}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.htmlOptionTitle?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass({placeholder:!i.selectStatus}),innerHTML:i.selectStatus||e.placeholder},null,10,["innerHTML"])):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass({placeholder:!i.selectStatus})},r.toDisplayString(i.selectStatus||e.placeholder),3))],64)),e.showClearButton?r.withDirectives((r.openBlock(),r.createBlock(u,{key:2,kind:"ghost",class:"button-clear","aria-label":"Clear selection",onClick:r.withModifiers(i.clearValue,["prevent"]),onKeypress:n[0]||(n[0]=r.withKeys(r.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeydown:n[1]||(n[1]=r.withKeys(r.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeyup:r.withKeys(r.withModifiers(i.clearValue,["prevent"]),["enter"]),"help-text":e.clearButtonMessage},{default:r.withCtx(()=>[r.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick","onKeyup","help-text"])),[[r.vShow,Object.keys(a.selected).length]]):r.createCommentVNode("",!0),r.createVNode(l,{name:v?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])],42,["aria-expanded","aria-label","aria-activedescendant"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","class","onClose","onOpen"])],2)],64)}const No=_e(vd,[["render",kd]]),Cp="",Cd={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},vertical:{type:String},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:kn,IbSelect:No}},Od={class:"report-limit-selector"};function Ed(t,n,e,o,a,i){const s=r.resolveComponent("ib-label"),l=r.resolveComponent("ib-select");return r.openBlock(),r.createElementBlock("div",Od,[r.createVNode(s,null,{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.labelSelect),1)]),_:1}),r.createVNode(l,{classList:"report-limit-selector-select",value:e.value,vertical:e.vertical,options:i.prepareOptions,"is-multiple":!1,"show-clear-button":!1,"aria-label":"Pagination",onInput:i.selectItem},null,8,["value","vertical","options","onInput"])])}const Ao=_e(Cd,[["render",Ed]]),Op="",Sd={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0},vertical:{type:String}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},limitSelector(t){this.limitValue=t},limitValue(){this.currentPage=1}},methods:{changeLimit(t){Number.isInteger(t)&&(this.limitValue=t,this.$emit("set-limit",t))},onInput(t){if(t<1){this.onSelect(1);return}if(t>this.countPagePagination){this.onSelect(this.countPagePagination);return}this.onSelect(Number(t))},onSelect(t){Number.isInteger(t)&&(this.currentPage=t,this.$emit("select",t))},showItem(t){if(this.countPagePagination<=5)return this.indexSpaceLeft=null,this.indexSpaceRight=null,!0;if(t===1||t===this.countPagePagination)return!0;if(this.countPagePagination>=7){if(this.currentPage<=3&&t<=5)return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=null,!0;if(this.currentPage>=this.countPagePagination-2&&t>=this.countPagePagination-4)return this.indexSpaceLeft=null,this.indexSpaceRight=1,!0;if(3<this.currentPage<this.countPagePagination-3&&(t===this.currentPage+1||t===this.currentPage-1||t===this.currentPage))return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=1,!0}else return!0;return!1}},computed:{setCountOfRows(){return this.currentPage===1||this.countPagePagination===1?"1 - "+(this.countPagePagination>1?this.limitValue:this.countRows):this.countPagePagination===this.currentPage?(this.currentPage-1)*this.limitValue+" - "+this.countRows:(this.currentPage-1)*this.limitValue+1+" - "+this.currentPage*this.limitValue},countPagePagination(){return Math.ceil(this.countRows/this.limitValue)}},components:{IbIconButton:ut,IbIcon:Le,IbInput:qr,IbLabel:kn,IbLimitSelector:Ao,IbTooltip:ln}},xd={class:"report-controls"},Td={class:"repot-pagination"},Nd={class:"pagination-input"},Ad={class:"row-count"},Dd={class:"pagination-wrapper"},Pd=["onClick"];function Id(t,n,e,o,a,i){const s=r.resolveComponent("ib-limit-selector"),l=r.resolveComponent("ib-label"),u=r.resolveComponent("ib-input"),d=r.resolveComponent("ib-icon"),p=r.resolveComponent("ib-tooltip"),f=r.resolveComponent("ib-icon-button");return r.openBlock(),r.createElementBlock("div",xd,[r.createVNode(s,{onSelect:i.changeLimit,value:a.limitValue,vertical:e.vertical,"label-select":e.labelSelect},null,8,["onSelect","value","vertical","label-select"]),r.createElementVNode("div",Td,[e.showPaginationInput?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(l,{for:"goToPage"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.labelInput),1)]),_:1}),r.createElementVNode("div",Nd,[r.createVNode(u,{id:"goToPage",type:"number","hide-number-actions":"",debounce:500,onInput:i.onInput},null,8,["onInput"])])],64)):r.createCommentVNode("",!0),r.createElementVNode("div",Ad,r.toDisplayString(i.setCountOfRows+" of "+e.countRows),1),r.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-prev",disabled:a.currentPage===1,onClick:n[0]||(n[0]=c=>i.onSelect(a.currentPage-1))},{default:r.withCtx(()=>[r.createVNode(d,{name:"chevron-back-outline"}),e.tooltipTextPrev?(r.openBlock(),r.createBlock(p,{key:0,text:e.tooltipTextPrev},null,8,["text"])):r.createCommentVNode("",!0)]),_:1},8,["disabled"]),r.createElementVNode("ul",Dd,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.countPagePagination,(c,h)=>r.withDirectives((r.openBlock(),r.createElementBlock("li",{key:h,class:r.normalizeClass(["pagination-item",{active:h+1===a.currentPage,"dots-left":a.indexSpaceLeft===h+1,"dots-right":a.indexSpaceRight===h+1}]),onClick:v=>i.onSelect(h+1)},[r.createElementVNode("button",null,r.toDisplayString(h+1),1)],10,Pd)),[[r.vShow,i.showItem(h+1)]])),128))]),r.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-next",disabled:a.currentPage===i.countPagePagination,onClick:n[1]||(n[1]=c=>i.onSelect(a.currentPage+1))},{default:r.withCtx(()=>[r.createVNode(d,{name:"chevron-forward-outline"}),e.tooltipTextNext?(r.openBlock(),r.createBlock(p,{key:0,text:e.tooltipTextNext},null,8,["text"])):r.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Bd=_e(Sd,[["render",Id]]),On={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},Ep="",Md={props:{states:{type:String,default:On.PROGRESS},progress:{type:[String,Number],default:0},ariaLabel:{type:String,required:!0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===On.SUCCESS?"checkmark-circle":this.states===On.FAILED||this.states===On.CANCELING||this.states===On.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Do=t=>(r.pushScopeId("data-v-a0217859"),t=t(),r.popScopeId(),t),Ld={class:"ib-progress-bar-wrapper"},Rd=["aria-label","aria-valuenow"],jd=[Do(()=>r.createElementVNode("div",{class:"gradient"},null,-1))],Vd=Do(()=>r.createElementVNode("div",null,null,-1));function qd(t,n,e,o,a,i){const s=r.resolveComponent("ib-icon");return r.openBlock(),r.createElementBlock("div",Ld,[r.createElementVNode("div",{class:r.normalizeClass(i.classes)},[r.createElementVNode("div",{class:"progress",role:"meter","aria-label":e.ariaLabel,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress,style:r.normalizeStyle({width:e.progress+"%"})},jd,12,Rd),Vd],2),r.withDirectives(r.createVNode(s,{class:"status-icon",name:i.iconName},null,8,["name"]),[[r.vShow,i.iconName.length]])])}const Fd=_e(Md,[["render",qd],["__scopeId","data-v-a0217859"]]),Hd={new:`<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
29
+ *****************************************************/(function(t,n){(function(e,o){t.exports=o()})(je,function(){class e{constructor(i,s=!0,l=[],u=5e3){this.ctx=i,this.iframes=s,this.exclude=l,this.iframesTimeout=u}static matches(i,s){const l=typeof s=="string"?[s]:s,u=i.matches||i.matchesSelector||i.msMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector;if(u){let d=!1;return l.every(p=>!u.call(i,p)||(d=!0,!1)),d}return!1}getContexts(){let i=[];return(this.ctx!==void 0&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:typeof this.ctx=="string"?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(s=>{const l=i.filter(u=>u.contains(s)).length>0;i.indexOf(s)!==-1||l||i.push(s)}),i}getIframeContents(i,s,l=()=>{}){let u;try{const d=i.contentWindow;if(u=d.document,!d||!u)throw new Error("iframe inaccessible")}catch{l()}u&&s(u)}isIframeBlank(i){const s="about:blank",l=i.getAttribute("src").trim();return i.contentWindow.location.href===s&&l!==s&&l}observeIframeLoad(i,s,l){let u=!1,d=null;const p=()=>{if(!u){u=!0,clearTimeout(d);try{this.isIframeBlank(i)||(i.removeEventListener("load",p),this.getIframeContents(i,s,l))}catch{l()}}};i.addEventListener("load",p),d=setTimeout(p,this.iframesTimeout)}onIframeReady(i,s,l){try{i.contentWindow.document.readyState==="complete"?this.isIframeBlank(i)?this.observeIframeLoad(i,s,l):this.getIframeContents(i,s,l):this.observeIframeLoad(i,s,l)}catch{l()}}waitForIframes(i,s){let l=0;this.forEachIframe(i,()=>!0,u=>{l++,this.waitForIframes(u.querySelector("html"),()=>{--l||s()})},u=>{u||s()})}forEachIframe(i,s,l,u=()=>{}){let d=i.querySelectorAll("iframe"),p=d.length,f=0;d=Array.prototype.slice.call(d);const c=()=>{--p<=0&&u(f)};p||c(),d.forEach(h=>{e.matches(h,this.exclude)?c():this.onIframeReady(h,v=>{s(h)&&(f++,l(v)),c()},c)})}createIterator(i,s,l){return document.createNodeIterator(i,s,l,!1)}createInstanceOnIframe(i){return new e(i.querySelector("html"),this.iframes)}compareNodeIframe(i,s,l){const u=i.compareDocumentPosition(l),d=Node.DOCUMENT_POSITION_PRECEDING;return!!(u&d&&(s===null||s.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_FOLLOWING))}getIteratorNode(i){const s=i.previousNode();return{prevNode:s,node:(s===null||i.nextNode())&&i.nextNode()}}checkIframeFilter(i,s,l,u){let d=!1,p=!1;return u.forEach((f,c)=>{f.val===l&&(d=c,p=f.handled)}),this.compareNodeIframe(i,s,l)?(d!==!1||p?d===!1||p||(u[d].handled=!0):u.push({val:l,handled:!0}),!0):(d===!1&&u.push({val:l,handled:!1}),!1)}handleOpenIframes(i,s,l,u){i.forEach(d=>{d.handled||this.getIframeContents(d.val,p=>{this.createInstanceOnIframe(p).forEachNode(s,l,u)})})}iterateThroughNodes(i,s,l,u,d){const p=this.createIterator(s,i,u);let f,c,h=[],v=[],m=()=>({prevNode:c,node:f}=this.getIteratorNode(p),f);for(;m();)this.iframes&&this.forEachIframe(s,_=>this.checkIframeFilter(f,c,_,h),_=>{this.createInstanceOnIframe(_).forEachNode(i,y=>v.push(y),u)}),v.push(f);v.forEach(_=>{l(_)}),this.iframes&&this.handleOpenIframes(h,i,l,u),d()}forEachNode(i,s,l,u=()=>{}){const d=this.getContexts();let p=d.length;p||u(),d.forEach(f=>{const c=()=>{this.iterateThroughNodes(i,f,s,l,()=>{--p<=0&&u()})};this.iframes?this.waitForIframes(f,c):c()})}}class o{constructor(i){this.ctx=i,this.ie=!1;const s=window.navigator.userAgent;(s.indexOf("MSIE")>-1||s.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(i){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},i)}get opt(){return this._opt}get iterator(){return new e(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(i,s="debug"){const l=this.opt.log;this.opt.debug&&typeof l=="object"&&typeof l[s]=="function"&&l[s](`mark.js: ${i}`)}escapeStr(i){return i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(i){return this.opt.wildcards!=="disabled"&&(i=this.setupWildcardsRegExp(i)),i=this.escapeStr(i),Object.keys(this.opt.synonyms).length&&(i=this.createSynonymsRegExp(i)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(i=this.setupIgnoreJoinersRegExp(i)),this.opt.diacritics&&(i=this.createDiacriticsRegExp(i)),i=this.createMergedBlanksRegExp(i),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(i=this.createJoinersRegExp(i)),this.opt.wildcards!=="disabled"&&(i=this.createWildcardsRegExp(i)),i=this.createAccuracyRegExp(i)}createSynonymsRegExp(i){const s=this.opt.synonyms,l=this.opt.caseSensitive?"":"i",u=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let d in s)if(s.hasOwnProperty(d)){const p=s[d],f=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(d):this.escapeStr(d),c=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(p):this.escapeStr(p);f!==""&&c!==""&&(i=i.replace(new RegExp(`(${this.escapeStr(f)}|${this.escapeStr(c)})`,`gm${l}`),u+`(${this.processSynomyms(f)}|${this.processSynomyms(c)})`+u))}return i}processSynomyms(i){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(i=this.setupIgnoreJoinersRegExp(i)),i}setupWildcardsRegExp(i){return(i=i.replace(/(?:\\)*\?/g,s=>s.charAt(0)==="\\"?"?":"")).replace(/(?:\\)*\*/g,s=>s.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(i){let s=this.opt.wildcards==="withSpaces";return i.replace(/\u0001/g,s?"[\\S\\s]?":"\\S?").replace(/\u0002/g,s?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(i){return i.replace(/[^(|)\\]/g,(s,l,u)=>{let d=u.charAt(l+1);return/[(|)\\]/.test(d)||d===""?s:s+"\0"})}createJoinersRegExp(i){let s=[];const l=this.opt.ignorePunctuation;return Array.isArray(l)&&l.length&&s.push(this.escapeStr(l.join(""))),this.opt.ignoreJoiners&&s.push("\\u00ad\\u200b\\u200c\\u200d"),s.length?i.split(/\u0000+/).join(`[${s.join("")}]*`):i}createDiacriticsRegExp(i){const s=this.opt.caseSensitive?"":"i",l=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let u=[];return i.split("").forEach(d=>{l.every(p=>{if(p.indexOf(d)!==-1){if(u.indexOf(p)>-1)return!1;i=i.replace(new RegExp(`[${p}]`,`gm${s}`),`[${p}]`),u.push(p)}return!0})}),i}createMergedBlanksRegExp(i){return i.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(i){const s="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let l=this.opt.accuracy,u=typeof l=="string"?l:l.value,d=typeof l=="string"?[]:l.limiters,p="";switch(d.forEach(f=>{p+=`|${this.escapeStr(f)}`}),u){case"partially":default:return`()(${i})`;case"complementary":return`()([^${p="\\s"+(p||this.escapeStr(s))}]*${i}[^${p}]*)`;case"exactly":return`(^|\\s${p})(${i})(?=$|\\s${p})`}}getSeparatedKeywords(i){let s=[];return i.forEach(l=>{this.opt.separateWordSearch?l.split(" ").forEach(u=>{u.trim()&&s.indexOf(u)===-1&&s.push(u)}):l.trim()&&s.indexOf(l)===-1&&s.push(l)}),{keywords:s.sort((l,u)=>u.length-l.length),length:s.length}}isNumeric(i){return Number(parseFloat(i))==i}checkRanges(i){if(!Array.isArray(i)||Object.prototype.toString.call(i[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(i),[];const s=[];let l=0;return i.sort((u,d)=>u.start-d.start).forEach(u=>{let{start:d,end:p,valid:f}=this.callNoMatchOnInvalidRanges(u,l);f&&(u.start=d,u.length=p-d,s.push(u),l=p)}),s}callNoMatchOnInvalidRanges(i,s){let l,u,d=!1;return i&&i.start!==void 0?(u=(l=parseInt(i.start,10))+parseInt(i.length,10),this.isNumeric(i.start)&&this.isNumeric(i.length)&&u-s>0&&u-l>0?d=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(i)}`),this.opt.noMatch(i))):(this.log(`Ignoring invalid range: ${JSON.stringify(i)}`),this.opt.noMatch(i)),{start:l,end:u,valid:d}}checkWhitespaceRanges(i,s,l){let u,d=!0,p=l.length,f=s-p,c=parseInt(i.start,10)-f;return(u=(c=c>p?p:c)+parseInt(i.length,10))>p&&(u=p,this.log(`End range automatically set to the max value of ${p}`)),c<0||u-c<0||c>p||u>p?(d=!1,this.log(`Invalid range: ${JSON.stringify(i)}`),this.opt.noMatch(i)):l.substring(c,u).replace(/\s+/g,"")===""&&(d=!1,this.log("Skipping whitespace only range: "+JSON.stringify(i)),this.opt.noMatch(i)),{start:c,end:u,valid:d}}getTextNodes(i){let s="",l=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,u=>{l.push({start:s.length,end:(s+=u.textContent).length,node:u})},u=>this.matchesExclude(u.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{i({value:s,nodes:l})})}matchesExclude(i){return e.matches(i,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(i,s,l){const u=this.opt.element?this.opt.element:"mark",d=i.splitText(s),p=d.splitText(l-s);let f=document.createElement(u);return f.setAttribute("data-markjs","true"),this.opt.className&&f.setAttribute("class",this.opt.className),f.textContent=d.textContent,d.parentNode.replaceChild(f,d),p}wrapRangeInMappedTextNode(i,s,l,u,d){i.nodes.every((p,f)=>{const c=i.nodes[f+1];if(c===void 0||c.start>s){if(!u(p.node))return!1;const h=s-p.start,v=(l>p.end?p.end:l)-p.start,m=i.value.substr(0,p.start),_=i.value.substr(v+p.start);if(p.node=this.wrapRangeInTextNode(p.node,h,v),i.value=m+_,i.nodes.forEach((y,g)=>{g>=f&&(i.nodes[g].start>0&&g!==f&&(i.nodes[g].start-=v),i.nodes[g].end-=v)}),l-=v,d(p.node.previousSibling,p.start),!(l>p.end))return!1;s=p.end}return!0})}wrapMatches(i,s,l,u,d){const p=s===0?0:s+1;this.getTextNodes(f=>{f.nodes.forEach(c=>{let h;for(c=c.node;(h=i.exec(c.textContent))!==null&&h[p]!=="";){if(!l(h[p],c))continue;let v=h.index;if(p!==0)for(let m=1;m<p;m++)v+=h[m].length;c=this.wrapRangeInTextNode(c,v,v+h[p].length),u(c.previousSibling),i.lastIndex=0}}),d()})}wrapMatchesAcrossElements(i,s,l,u,d){const p=s===0?0:s+1;this.getTextNodes(f=>{let c;for(;(c=i.exec(f.value))!==null&&c[p]!=="";){let h=c.index;if(p!==0)for(let m=1;m<p;m++)h+=c[m].length;const v=h+c[p].length;this.wrapRangeInMappedTextNode(f,h,v,m=>l(c[p],m),(m,_)=>{i.lastIndex=_,u(m)})}d()})}wrapRangeFromIndex(i,s,l,u){this.getTextNodes(d=>{const p=d.value.length;i.forEach((f,c)=>{let{start:h,end:v,valid:m}=this.checkWhitespaceRanges(f,p,d.value);m&&this.wrapRangeInMappedTextNode(d,h,v,_=>s(_,f,d.value.substring(h,v),c),_=>{l(_,f)})}),u()})}unwrapMatches(i){const s=i.parentNode;let l=document.createDocumentFragment();for(;i.firstChild;)l.appendChild(i.removeChild(i.firstChild));s.replaceChild(l,i),this.ie?this.normalizeTextNode(s):s.normalize()}normalizeTextNode(i){if(i){if(i.nodeType===3)for(;i.nextSibling&&i.nextSibling.nodeType===3;)i.nodeValue+=i.nextSibling.nodeValue,i.parentNode.removeChild(i.nextSibling);else this.normalizeTextNode(i.firstChild);this.normalizeTextNode(i.nextSibling)}}markRegExp(i,s){this.opt=s,this.log(`Searching with expression "${i}"`);let l=0,u="wrapMatches";const d=p=>{l++,this.opt.each(p)};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),this[u](i,this.opt.ignoreGroups,(p,f)=>this.opt.filter(f,p,l),d,()=>{l===0&&this.opt.noMatch(i),this.opt.done(l)})}mark(i,s){this.opt=s;let l=0,u="wrapMatches";const{keywords:d,length:p}=this.getSeparatedKeywords(typeof i=="string"?[i]:i),f=this.opt.caseSensitive?"":"i",c=h=>{let v=new RegExp(this.createRegExp(h),`gm${f}`),m=0;this.log(`Searching with expression "${v}"`),this[u](v,1,(_,y)=>this.opt.filter(y,h,l,m),_=>{m++,l++,this.opt.each(_)},()=>{m===0&&this.opt.noMatch(h),d[p-1]===h?this.opt.done(l):c(d[d.indexOf(h)+1])})};this.opt.acrossElements&&(u="wrapMatchesAcrossElements"),p===0?this.opt.done(l):c(d[0])}markRanges(i,s){this.opt=s;let l=0,u=this.checkRanges(i);u&&u.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(u)),this.wrapRangeFromIndex(u,(d,p,f,c)=>this.opt.filter(d,p,f,c),(d,p)=>{l++,this.opt.each(d,p)},()=>{this.opt.done(l)})):this.opt.done(l)}unmark(i){this.opt=i;let s=this.opt.element?this.opt.element:"*";s+="[data-markjs]",this.opt.className&&(s+=`.${this.opt.className}`),this.log(`Removal selector "${s}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,l=>{this.unwrapMatches(l)},l=>{const u=e.matches(l,s),d=this.matchesExclude(l);return!u||d?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}}return function(a){const i=new o(a);return this.mark=(s,l)=>(i.mark(s,l),this),this.markRegExp=(s,l)=>(i.markRegExp(s,l),this),this.markRanges=(s,l)=>(i.markRanges(s,l),this),this.unmark=s=>(i.unmark(s),this),this}})})(xo);var md=xo.exports;const gd=Cn(md),yd={props:{infiniteLoader:{type:Boolean,default:!0}},watch:{infiniteLoader(t){t||infiniteLoaderObserver.disconnect()}},data(){return{infiniteLoaderObserver:null}},mounted(){this.infiniteLoader&&(this.infiniteLoaderObserver=new IntersectionObserver(t=>{t.forEach(n=>{n.isIntersecting&&this.$emit("loadMoreOptions")})}),this.infiniteLoaderObserver.observe(this.$refs.infinityLoader))},beforeDestroy(){this.infiniteLoader&&(infiniteLoaderObserver==null||infiniteLoaderObserver.disconnect())},emits:["loadMoreOptions"]};function bd(t,n){let e=null;function o(...a){e&&clearTimeout(e),e=setTimeout(()=>{t.apply(this,a),e=null},n)}return o.cancel=function(){e&&(clearTimeout(e),e=null)},o}const kp="";function To(t){return JSON.parse(JSON.stringify(t))}const vd={name:"IbTreeSelect",inject:["LANG_COMPONENTS"],mixins:[yd],props:{classList:[String,Array],keywordHighlighter:{type:Boolean,default:!0},placeholder:{type:String,default:""},searchPlaceholderText:{type:String,default:""},clearButtonMessage:{type:String,default:""},showClearButton:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!1},menuSize:{type:[String,Number]},initialSize:{left:0,right:0},ariaLabel:{type:String,default:""},name:String,id:{type:String,default(){return pt()}},options:{type:[Array,Function],default(){return[]}},modelValue:{type:[Number,String,Array]},value:{type:[Number,String,Array],default(){return[]}},maxSelectedNames:{type:Number,default:2},isMultiple:{type:Boolean,default:!0},parentAutoCheck:{type:Boolean,default:!0},strings:{type:Object,default(){return{}}},onlyEndNodes:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!0},htmlOptionTitle:{type:Boolean,default:!1},isBookmarkable:{type:Boolean,default:!1},initBookmarks:{type:Array,default:()=>[]},showInputs:{type:Boolean,default(t){return t.isMultiple}},dependency:{type:String},filterId:{type:String,default(){return pt()}},staticPlaceholder:{type:Boolean,default:!1},useSearch:{type:Boolean,default:!1},isWatching:{type:Boolean,default:!1},vertical:{type:String},emptyMessage:{type:String,default:""},errorMessage:{type:String,default:""},allOptions:{type:Boolean,default:!0},watchClearValue:{type:Boolean,default:!1},isToggle:{type:Boolean,default:!1},alphabetSort:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},searchDebounce:{type:Number,default:500},alphabeticStyle:{type:Boolean,default:!1}},emits:["close","input","blur","search","resize","submit","clearValue","toggle-bookmarked-option","update:modelValue"],watch:{value(t){this.val=t,(!Array.isArray(t)||t.join(",")!==Object.keys(this.selected).join(","))&&this.setPreparedValues(this.actualOptions,!1)},modelValue:{handler(t){this.val=t,this.actualOptions=[],this.setPreparedValues()},deep:!0},val(t){this.watchClearValue&&(!t||Array.isArray(t)&&!t.length)&&this.setPreparedValues(this.actualOptions).then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})})},options:{handler(t){this.initialOptions=typeof t=="function"?t:To(t)},deep:!0},initialOptions(t){let n=!0;if(typeof t=="function")n=!1;else{const e=[],o=t;Array.prototype.forEach.call(o,a=>{a.id!==void 0&&e.push(a.id)}),n=JSON.stringify(e)===JSON.stringify(this.optionsIdsWatch),this.optionsIdsWatch=e}(this.isInitialized&&!n||this.isWatching)&&this.setPreparedValues().then(()=>{const e=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:e,filter:this.filterId})})},dependency(t,n){this.$nextTick(()=>{this.registerDependency(n)})},initBookmarks(){this.actualBookmarkedOptions={},this.setBookmarkedOptions(this.actualOptions)}},mounted(){this.marker=new gd(this.$refs.list.$el),this.registerDependency(),this.$globalEvents.$on("select:refresh",()=>{this.setPreparedValues()}),document.addEventListener("mousemove",this.onResize),document.addEventListener("mouseup",this.endResizing)},data(){var t,n,e,o,a,i,s,l;return this.defaultFilter=bd(u=>{this.marker.unmark();const d=this.filterString.toLowerCase().trim();this.countVisibleChildren=this.filterFunc.call(this,u,d),d&&this.keywordHighlighter&&this.marker.mark(d)},1e3),{initialOptions:typeof this.options=="function"?this.options:To(this.options),val:this.modelValue?this.modelValue:this.value,size:{left:this.initialSize&&this.initialSize.left||0,right:this.initialSize&&this.initialSize.right||0},resizingProp:null,isInitialized:!1,optionsIdsWatch:[],isLoading:!1,actualName:this.isMultiple?this.name+"[]":this.name,filterString:"",actualOptions:[],actualBookmarkedOptions:{},selected:[],isOpen:!1,verticalVal:this.vertical??"bottom",allOptionsIsChecked:!0,hasTreeChildren:!1,uid:`f${(~~(Math.random()*1e8)).toString(16)}`,focusedOptionId:"",actualStrings:{searchPlaceholder:lang(this.searchPlaceholderText.length?this.searchPlaceholderText:"search_placeholder",(t=this.LANG_COMPONENTS)==null?void 0:t.COMPONENT_SELECT),emptyTitle:lang("empty_title",(n=this.LANG_COMPONENTS)==null?void 0:n.COMPONENT_SELECT),selectAllOptions:lang("all_options",(e=this.LANG_COMPONENTS)==null?void 0:e.COMPONENT_SELECT),allSelected:lang("all_selected",(o=this.LANG_COMPONENTS)==null?void 0:o.COMPONENT_SELECT),loading:lang("loading",(a=this.LANG_COMPONENTS)==null?void 0:a.COMPONENT_SELECT)+"...",selectedCount:lang("selected_count",(i=this.LANG_COMPONENTS)==null?void 0:i.COMPONENT_SELECT),buttonTitle:this.buttonTitle||lang("button_title",(s=this.LANG_COMPONENTS)==null?void 0:s.COMPONENT_SELECT),requiredDependencyNotFilled:this.requiredDependencyNotFilled||lang("required_dependency_are_not_filled",(l=this.LANG_COMPONENTS)==null?void 0:l.COMPONENT_SELECT),...this.strings},dependencyValue:null}},methods:{onBlur(){setTimeout(()=>{this.isOpen||this.$emit("blur")},200)},inputKeyupDown(){this.focusOnFirstOptions()},comboboxKeyupDown(){if(this.showSearch){this.$refs.search.focus();return}this.focusOnFirstOptions()},focus(){this.$refs.combobox.focus()},focusOnFirstOptions(){this.$refs.list.$el.querySelector("[tabindex]:not(hidden)").focus()},startResizing(t){this.resizingProp=t},endResizing(){this.resizingProp&&(this.resizingProp=null,this.$emit("resize",this.size))},onResize(t){switch(this.resizingProp){case"left":this.size.left=Math.max(this.size.left-t.movementX,0);break;case"right":this.size.right=Math.max(this.size.right+t.movementX,0);break}},registerDependency(t){this.dependency?(this.$globalEvents.$on("select-"+this.dependency+":update",n=>{this.clear(),this.dependencyValue=n,this.dependencyValue&&this.dependencyValue.values&&(!Array.isArray(this.dependencyValue.values)||this.dependencyValue.values.length)&&this.setPreparedValues()}),this.isLoading=!1):(this.$globalEvents.$off("select-"+t+":update"),this.setPreparedValues().then(()=>{const n=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":update",{values:n,filter:this.filterId})}))},filter(t,n){this.filterString=t,this.$emit("search",this.filterString),this.defaultFilter(n)},setPreparedValues(t){let n=t||this.initialOptions;return this.alphabetSort&&(n=n.sort((e,o)=>e.title.toLowerCase().localeCompare(o.title.toLowerCase()))),this.prepare(n).then(([e,o])=>{this.actualOptions=e,this.allOptionsIsChecked=this.checkIfOptionsChecked(e),this.isInitialized=!0,this.selected=o,this.setBookmarkedOptions(e)})},clear(){this.setPreparedValues(),this.allOptionsIsChecked=!1,this.selected=[],this.isMultiple?(this.$emit("update:modelValue",null),this.$emit("input",null),this.$emit("clear-value",null)):(this.$emit("update:modelValue",[]),this.$emit("input",[]),this.$emit("clear-value",[])),this.setPreparedValues()},clearValue(){this.clear(),this.setPreparedValues()},prepare(t,n=!0){return new Promise(e=>{const o={},a=[];let i=Promise.resolve();typeof t=="function"?(this.isLoading=!0,this.dependency&&(t=t.bind(null,this.dependencyValue)),i=i.then(t)):i=i.then(()=>t),i.then(s=>(this.isLoading=!1,s.forEach(l=>{l.initiallyVisible=typeof l.visible>"u"?!0:l.visible,l.visible=l.initiallyVisible,l.readonly=!!l.readonly,l.checked=this.isMultiple?this.val!==null&&this.val.findIndex(u=>l.id==u)>-1:this.val!==null&&this.val==l.id,l.checked&&(!this.onlyEndNodes||!l.children)&&(o[l.id]=l),l.children&&(this.hasTreeChildren=!0,l.isChildrenVisible=!1),a.push(new Promise(u=>{l.children?this.prepare(l.children).then(([d,p])=>{l.children=d,this.parentAutoCheck&&(l.checked=this.checkIfOptionsChecked(l.children)),Object.assign(o,p),u(l)}):u(l)}))}),Promise.all(a).then(l=>{e([l,o])}))).catch(s=>{throw this.isLoading=!1,s})})},filterFunc(t,n){let e=0;return t.forEach(o=>{let a=o.initiallyVisible&&o.title&&o.title.toString().toLowerCase().includes(n)&&!this.actualBookmarkedOptions[o.id];if(o.children&&o.children.length){let i=this.filterFunc(o.children,n);e+=i,i&&(o.isChildrenVisible=n.length>0||!!Object.keys(this.actualBookmarkedOptions).length,o.isDisabled=i<o.children.length&&!this.isBookmarkable),a?i||(a=!1):a=!!i}o.visible=a,a&&e++}),e},submit(){this.change();const t=Object.keys(this.selected);this.$globalEvents.$emit("select-"+this.filterId+":submit",{values:t,filter:this.filterId}),this.$emit("submit")},change(){const t=Object.keys(this.selected);this.isMultiple?(this.$emit("update:modelValue",t),this.$emit("input",t)):(this.$emit("update:modelValue",t[0]),this.$emit("input",t[0])),this.$globalEvents.$emit("select-"+this.filterId+":update",{values:t,filter:this.filterId}),this.$refs.dropdown.close()},checkIfOptionsChecked(t){return t.every(n=>n.checked||n.readonly)},registerCheck(t,n,e){if(n)if(t.checked=!0,this.isMultiple)this.onlyEndNodes&&t.children&&t.children.length||(this.selected[t.id]=t,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected)));else{const o=Object.keys(this.selected)[0];o&&(this.selected[o].checked=!1),this.selected={[t.id]:t},this.change()}else delete this.selected[t.id],t.checked=!1,this.$emit("update:modelValue",Object.keys(this.selected)),this.$emit("input",Object.keys(this.selected));this.toggleDuplicateOptions(this.actualOptions,t.id,n),e&&(this.allOptionsIsChecked=this.checkIfOptionsChecked(this.actualOptions))},toggleDuplicateOptions(t,n,e){for(let o of t)o.id===n&&(o.checked=e),o.children&&this.toggleDuplicateOptions(o.children,n,e)},manageAll(){this.allOptionsIsChecked=!this.allOptionsIsChecked,this.traverseTree(this.actualOptions,t=>{t.readonly||this.registerCheck(t,this.allOptionsIsChecked,!1)})},traverseTree(t,n){t.forEach(e=>{n(e),e.children&&e.children.length&&this.traverseTree(e.children,n)})},getArrayOptions(t){let n=[];for(let e of t)n.push(e),e.children&&(n=n.concat(this.getArrayOptions(e.children)));return n},toggleBookmark(t){this.actualBookmarkedOptions[t.id]?delete this.actualBookmarkedOptions[t.id]:this.actualBookmarkedOptions[t.id]=t,this.$emit("toggle-bookmarked-option",t.id),this.filter(this.filterString,this.actualOptions)},setBookmarkedOptions(t){t.forEach(n=>{n.children&&n.children.length?this.setBookmarkedOptions(n.children):this.initBookmarks.includes(n.id)&&(this.actualBookmarkedOptions[n.id]=n)}),this.filter(this.filterString,t)},onClose(){this.isOpen=!1,this.filterString="",this.filterFunc(this.actualOptions,this.filterString),this.isMultiple?this.$emit("close",Object.keys(this.selected)):this.$emit("close",Object.keys(this.selected)[0]),this.$emit("blur"),this.verticalVal=this.vertical??"bottom"},onOpen(){const t=document.documentElement.scrollHeight;this.isOpen=!0,this.vertical!=="bottom"&&this.$nextTick(()=>{document.documentElement.scrollHeight>t&&(this.verticalVal="top")})}},computed:{hasTrigger(){return!!this.$slots.trigger},hasTriggerContent(){return!!this.$slots.triggerContent},hasEmptyMessage(){return!!this.$slots.emptyMessage},treeDropPos(){return this.menuSize?{width:this.menuSize+"px",maxWidth:this.menuSize+"px",minWidth:this.menuSize+"px"}:{width:"auto",position:"absolute",left:-this.size.left+"px",right:-this.size.right+"px"}},hasHierarchy(){return this.actualOptions.some(t=>t.children)},selectedKeys(){return Object.keys(this.selected).filter(t=>{if(!this.onlyEndNodes||!this.selected[t].children)return!0})},selectStatus(){return this.staticPlaceholder?this.placeholder:this.isLoading?this.actualStrings.loading:this.selectedKeys.length?this.selectedKeys.length<this.maxSelectedNames?this.selectedKeys.map(t=>this.selected[t].title).join(","):this.selectedKeys.length<this.optionsCount?this.actualStrings.selectedCount.replace("{selected}",this.selectedKeys.length).replace("{all}",this.optionsCount):this.actualStrings.allSelected:this.emptyMessage},isEmpty(){return Array.isArray(this.value)?!this.value.length:!this.value},requiredDependencyNotFilled(){return this.dependency&&(!this.dependencyValue||!this.dependencyValue.values||!this.dependencyValue.values.length)},showSearch(){return this.useSearch||this.optionsCount>10&&!this.alphabeticStyle},arrayOfOptions(){return this.getArrayOptions(this.actualOptions)},optionsCount(){let t=[];for(let n of this.arrayOfOptions)(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&t.push(n.id);return t.length},visibleOptionsCount(){let t=[];return this.traverseTree(this.actualOptions,n=>{(!this.onlyEndNodes||!n.children)&&!t.includes(n.id)&&n.visible&&t.push(n.id)}),t.length+(this.isBookmarkable?Object.keys(this.actualBookmarkedOptions).length:0)}},components:{IbAlert:Ft,IbIconButton:ut,IbIcon:Le,IbDropdown:ir,IbInput:qr,List:Rr,"select-option":pd},directives:{Tooltip:Wt},beforeUnmount(){document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResizing)},inheritAttrs:!1},_d={key:0,class:"tree-select-empty"},$d={key:1,class:"tree-select-default-empty tree-select-empty"},wd={key:5,ref:"infinityLoader"};function kd(t,n,e,o,a,i){const s=r.resolveComponent("ib-alert"),l=r.resolveComponent("ib-icon"),u=r.resolveComponent("ib-icon-button"),d=r.resolveComponent("ib-input"),p=r.resolveComponent("select-option"),f=r.resolveComponent("list"),c=r.resolveComponent("ib-dropdown"),h=r.resolveDirective("tooltip");return r.openBlock(),r.createElementBlock(r.Fragment,null,[e.errorMessage?(r.openBlock(),r.createBlock(s,{key:0,class:"tree-select-error"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.errorMessage),1)]),_:1})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["tree-select",{...e.classList,"tree-select-custom-trigger-content":i.hasTriggerContent}])},[r.createVNode(c,{disabled:a.isLoading||e.disable,"is-resizable":e.isResizable,vertical:a.verticalVal,class:r.normalizeClass({disable:e.disable}),ref:"dropdown",onClose:i.onClose,onOpen:i.onOpen},r.createSlots({body:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["tree-drop",{"not-tree-child":!a.hasTreeChildren}]),style:r.normalizeStyle(i.treeDropPos),role:"listbox"},[e.isResizable?(r.openBlock(),r.createElementBlock("div",{key:0,class:"ib-dropdown-resizer ib-dropdown-resizer-left",onMousedown:n[6]||(n[6]=v=>i.startResizing("left"))},null,32)):r.createCommentVNode("",!0),e.isResizable?r.withDirectives((r.openBlock(),r.createElementBlock("div",{key:1,class:"ib-dropdown-resizer ib-dropdown-resizer-right",onMousedown:n[7]||(n[7]=v=>i.startResizing("right"))},null,544)),[[h,t.lang("resize_list","select"),void 0,{rightCenter:!0}]]):r.createCommentVNode("",!0),i.showSearch?(r.openBlock(),r.createBlock(d,{key:2,class:"tree-search",ref:"search",autocomplete:"off","show-icon":!0,value:a.filterString,debounce:e.searchDebounce,"aria-label":e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,placeholder:e.searchPlaceholderText?e.searchPlaceholderText:a.actualStrings.searchPlaceholder,onInput:n[8]||(n[8]=v=>i.filter(v,a.actualOptions)),onKeyup:r.withKeys(i.inputKeyupDown,["down"])},null,8,["value","debounce","aria-label","placeholder","onKeyup"])):r.createCommentVNode("",!0),r.createVNode(f,{ref:"list",role:"listbox",class:r.normalizeClass({"tree-select-list":!0,"has-hierarchy":i.hasHierarchy,"alphabetic-list":e.alphabeticStyle})},{default:r.withCtx(()=>[!i.requiredDependencyNotFilled&&!i.visibleOptionsCount&&i.hasEmptyMessage?(r.openBlock(),r.createElementBlock("div",_d,[r.renderSlot(t.$slots,"emptyMessage")])):!i.requiredDependencyNotFilled&&!i.visibleOptionsCount?(r.openBlock(),r.createElementBlock("div",$d,r.toDisplayString(a.actualStrings.emptyTitle),1)):r.createCommentVNode("",!0),r.withDirectives(r.createElementVNode("div",{class:"tree-select-empty"},r.toDisplayString(a.actualStrings.requiredDependencyNotFilled),513),[[r.vShow,i.requiredDependencyNotFilled]]),!e.isMultiple&&!e.isRequired&&a.actualOptions.length>0?(r.openBlock(),r.createBlock(p,{key:2,option:{title:t.lang("none","select"),id:null,checked:i.isEmpty},name:a.actualName,"parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,role:"option",onCheck:i.registerCheck,onToggleBookmark:i.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs},null,8,["option","name","parent-auto-check","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","show-input"])):r.createCommentVNode("",!0),Object.keys(a.actualBookmarkedOptions).length>0?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:3},r.renderList(a.actualBookmarkedOptions,v=>(r.openBlock(),r.createBlock(p,{key:"bookmark"+v.id,class:"bookmarked-option",option:v,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!0,"is-bookmarked":!0,role:"option",onCheck:i.registerCheck,onToggleBookmark:i.toggleBookmark,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs},null,8,["option","is-multiple","onCheck","onToggleBookmark","uid","only-end-nodes","html-title","show-input"]))),128)):r.createCommentVNode("",!0),i.requiredDependencyNotFilled?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[e.allOptions&&!e.alphabeticStyle&&e.isMultiple&&i.visibleOptionsCount&&!i.requiredDependencyNotFilled?(r.openBlock(),r.createBlock(p,{key:0,option:{title:a.actualStrings.selectAllOptions,id:"!all!",initiallyVisible:!0,visible:!0,isDisabled:i.visibleOptionsCount<i.optionsCount,checked:a.allOptionsIsChecked,isIndeterminate:!!Object.keys(a.selected).length},"is-toggle":e.isToggle,name:a.actualName,"parent-auto-check":!1,"is-multiple":e.isMultiple,"is-bookmarkable":!1,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"show-input":e.showInputs,"alphabetic-style":e.alphabeticStyle,role:"option",onCheck:i.manageAll,onOnFocus:n[9]||(n[9]=v=>a.focusedOptionId=v)},null,8,["option","is-toggle","name","is-multiple","uid","only-end-nodes","show-input","alphabetic-style","onCheck"])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.actualOptions,v=>r.renderSlot(t.$slots,a.actualName,{key:e.name+v.value,option:v,parentAutoCheck:e.parentAutoCheck,isMultiple:e.isMultiple,uid:a.uid,onlyEndNodes:e.onlyEndNodes,htmlTitle:e.htmlOptionTitle,showInput:e.showInputs},()=>[r.withDirectives(r.createVNode(p,{option:v,"is-toggle":e.isToggle,name:a.actualName,role:"option","parent-auto-check":e.parentAutoCheck,"is-multiple":e.isMultiple,"is-bookmarkable":e.isBookmarkable,uid:a.uid,"only-end-nodes":e.onlyEndNodes,"html-title":e.htmlOptionTitle,"show-input":e.showInputs,"alphabetic-style":e.alphabeticStyle,onCheck:i.registerCheck,onToggleBookmark:i.toggleBookmark,onOnFocus:n[10]||(n[10]=m=>a.focusedOptionId=m)},null,8,["option","is-toggle","name","parent-auto-check","is-multiple","is-bookmarkable","uid","only-end-nodes","html-title","show-input","alphabetic-style","onCheck","onToggleBookmark"]),[[r.vShow,v.visible]])])),128))],64)),t.infiniteLoader?(r.openBlock(),r.createElementBlock("div",wd,null,512)):r.createCommentVNode("",!0)]),_:3},8,["class"])],6)]),_:2},[i.hasTrigger?{name:"trigger",fn:r.withCtx(()=>[r.renderSlot(t.$slots,"trigger",{selectedCount:i.selectedKeys.length})]),key:"0"}:{name:"trigger",fn:r.withCtx(({isOpened:v})=>[r.createElementVNode("div",{role:"combobox",tabindex:"0",class:r.normalizeClass(["tree-choice",{"tree-choice-opened":v,"has-clear-button":e.showClearButton,"tree-choice-error":e.errorMessage}]),ref:"combobox","aria-expanded":v,onClick:n[2]||(n[2]=r.withModifiers(()=>{},["prevent"])),onBlur:n[3]||(n[3]=(...m)=>i.onBlur&&i.onBlur(...m)),onKeyup:[n[4]||(n[4]=r.withKeys((...m)=>i.comboboxKeyupDown&&i.comboboxKeyupDown(...m),["down"])),n[5]||(n[5]=r.withKeys((...m)=>i.comboboxKeyupDown&&i.comboboxKeyupDown(...m),["up"]))],"aria-label":e.ariaLabel,"aria-activedescendant":a.focusedOptionId},[i.hasTriggerContent?r.renderSlot(t.$slots,"triggerContent",{key:0,selectedCount:i.selectedKeys.length,isOpen:v}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[e.htmlOptionTitle?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass({placeholder:!i.selectStatus}),innerHTML:i.selectStatus||e.placeholder},null,10,["innerHTML"])):(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass({placeholder:!i.selectStatus})},r.toDisplayString(i.selectStatus||e.placeholder),3))],64)),e.showClearButton?r.withDirectives((r.openBlock(),r.createBlock(u,{key:2,kind:"ghost",class:"button-clear","aria-label":"Clear selection",onClick:r.withModifiers(i.clearValue,["prevent"]),onKeypress:n[0]||(n[0]=r.withKeys(r.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeydown:n[1]||(n[1]=r.withKeys(r.withModifiers(()=>{},["stop","prevent"]),["enter"])),onKeyup:r.withKeys(r.withModifiers(i.clearValue,["prevent"]),["enter"]),"help-text":e.clearButtonMessage},{default:r.withCtx(()=>[r.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick","onKeyup","help-text"])),[[r.vShow,Object.keys(a.selected).length]]):r.createCommentVNode("",!0),r.createVNode(l,{name:v?"chevron-up-outline":"chevron-down-outline",classes:"tree-select-caret"},null,8,["name"])],42,["aria-expanded","aria-label","aria-activedescendant"])]),key:"1"}]),1032,["disabled","is-resizable","vertical","class","onClose","onOpen"])],2)],64)}const No=_e(vd,[["render",kd]]),Cp="",Cd={name:"IbLimitSelector",props:{labelSelect:{type:String,required:!0},value:{type:Number},vertical:{type:String},options:{type:Array,default:()=>[10,25,50,100]}},watch(t){this.selected=t},data(){return{selected:this.value}},methods:{selectItem(t){this.selected=t,this.onChange(t)},onChange(t){Number.isInteger(+t)&&this.$emit("select",+t)}},computed:{prepareOptions(){return this.options.map(t=>({id:t,title:t}))}},components:{IbLabel:kn,IbSelect:No}},Od={class:"report-limit-selector"};function Ed(t,n,e,o,a,i){const s=r.resolveComponent("ib-label"),l=r.resolveComponent("ib-select");return r.openBlock(),r.createElementBlock("div",Od,[r.createVNode(s,null,{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.labelSelect),1)]),_:1}),r.createVNode(l,{classList:"report-limit-selector-select",value:e.value,vertical:e.vertical,options:i.prepareOptions,"is-multiple":!1,"show-clear-button":!1,"aria-label":"Pagination",onInput:i.selectItem},null,8,["value","vertical","options","onInput"])])}const Ao=_e(Cd,[["render",Ed]]),Op="",Sd={name:"IbPagination",props:{tooltipTextPrev:{type:String},tooltipTextNext:{type:String},labelInput:{type:String},labelSelect:{type:String,required:!0},countRows:{type:Number,required:!0},pageCount:{type:Number,default:null},current:{type:Number,default:1},limitSelector:{type:Number,default:10},showPaginationInput:{type:Boolean,default:!0},vertical:{type:String}},data(){return{currentPage:this.current,indexSpaceLeft:null,indexSpaceRight:null,limitValue:this.limitSelector}},watch:{current(t){this.onSelect(t)},limitSelector(t){this.limitValue=t},limitValue(){this.currentPage=1}},methods:{changeLimit(t){Number.isInteger(t)&&(this.limitValue=t,this.$emit("set-limit",t))},onInput(t){if(t<1){this.onSelect(1);return}if(t>this.countPagePagination){this.onSelect(this.countPagePagination);return}this.onSelect(Number(t))},onSelect(t){Number.isInteger(t)&&(this.currentPage=t,this.$emit("select",t))},showItem(t){if(this.countPagePagination<=5)return this.indexSpaceLeft=null,this.indexSpaceRight=null,!0;if(t===1||t===this.countPagePagination)return!0;if(this.countPagePagination>=7){if(this.currentPage<=3&&t<=5)return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=null,!0;if(this.currentPage>=this.countPagePagination-2&&t>=this.countPagePagination-4)return this.indexSpaceLeft=null,this.indexSpaceRight=1,!0;if(3<this.currentPage<this.countPagePagination-3&&(t===this.currentPage+1||t===this.currentPage-1||t===this.currentPage))return this.indexSpaceLeft=this.countPagePagination,this.indexSpaceRight=1,!0}else return!0;return!1}},computed:{setCountOfRows(){return this.currentPage===1||this.countPagePagination===1?"1 - "+(this.countPagePagination>1?this.limitValue:this.countRows):this.countPagePagination===this.currentPage?(this.currentPage-1)*this.limitValue+" - "+this.countRows:(this.currentPage-1)*this.limitValue+1+" - "+this.currentPage*this.limitValue},countPagePagination(){return Math.ceil(this.countRows/this.limitValue)}},components:{IbIconButton:ut,IbIcon:Le,IbInput:qr,IbLabel:kn,IbLimitSelector:Ao,IbTooltip:ln}},xd={class:"report-controls"},Td={class:"repot-pagination"},Nd={class:"pagination-input"},Ad={class:"row-count"},Dd={class:"pagination-wrapper"},Pd=["onClick"];function Id(t,n,e,o,a,i){const s=r.resolveComponent("ib-limit-selector"),l=r.resolveComponent("ib-label"),u=r.resolveComponent("ib-input"),d=r.resolveComponent("ib-icon"),p=r.resolveComponent("ib-tooltip"),f=r.resolveComponent("ib-icon-button");return r.openBlock(),r.createElementBlock("div",xd,[r.createVNode(s,{onSelect:i.changeLimit,value:a.limitValue,vertical:e.vertical,"label-select":e.labelSelect},null,8,["onSelect","value","vertical","label-select"]),r.createElementVNode("div",Td,[e.showPaginationInput?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(l,{for:"goToPage"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(e.labelInput),1)]),_:1}),r.createElementVNode("div",Nd,[r.createVNode(u,{id:"goToPage",type:"number","hide-number-actions":"",debounce:500,onInput:i.onInput},null,8,["onInput"])])],64)):r.createCommentVNode("",!0),r.createElementVNode("div",Ad,r.toDisplayString(i.setCountOfRows+" of "+e.countRows),1),r.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-prev",disabled:a.currentPage===1,onClick:n[0]||(n[0]=c=>i.onSelect(a.currentPage-1))},{default:r.withCtx(()=>[r.createVNode(d,{name:"chevron-back-outline"}),e.tooltipTextPrev?(r.openBlock(),r.createBlock(p,{key:0,text:e.tooltipTextPrev},null,8,["text"])):r.createCommentVNode("",!0)]),_:1},8,["disabled"]),r.createElementVNode("ul",Dd,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.countPagePagination,(c,h)=>r.withDirectives((r.openBlock(),r.createElementBlock("li",{key:h,class:r.normalizeClass(["pagination-item",{active:h+1===a.currentPage,"dots-left":a.indexSpaceLeft===h+1,"dots-right":a.indexSpaceRight===h+1}]),onClick:v=>i.onSelect(h+1)},[r.createElementVNode("button",null,r.toDisplayString(h+1),1)],10,Pd)),[[r.vShow,i.showItem(h+1)]])),128))]),r.createVNode(f,{kind:"tertiary",size:"m",class:"toggle-children button-next",disabled:a.currentPage===i.countPagePagination,onClick:n[1]||(n[1]=c=>i.onSelect(a.currentPage+1))},{default:r.withCtx(()=>[r.createVNode(d,{name:"chevron-forward-outline"}),e.tooltipTextNext?(r.openBlock(),r.createBlock(p,{key:0,text:e.tooltipTextNext},null,8,["text"])):r.createCommentVNode("",!0)]),_:1},8,["disabled"])])])}const Bd=_e(Sd,[["render",Id]]),On={PROGRESS:"progress",SUCCESS:"success",FAILED:"failed",CANCELING:"canceling",CANCELED:"canceled"},Ep="",Md={props:{states:{type:String,default:On.PROGRESS},progress:{type:[String,Number],default:0},ariaLabel:{type:String,required:!0}},computed:{classes(){const t=["ib-progress-bar"];return t.push(`progress-bar-${this.states}`),t},iconName(){return this.states===On.SUCCESS?"checkmark-circle":this.states===On.FAILED||this.states===On.CANCELING||this.states===On.CANCELED?"close-circle":""}},components:{IbIcon:Le}},Do=t=>(r.pushScopeId("data-v-a0217859"),t=t(),r.popScopeId(),t),Ld={class:"ib-progress-bar-wrapper"},Rd=["aria-label","aria-valuenow"],jd=[Do(()=>r.createElementVNode("div",{class:"gradient"},null,-1))],Vd=Do(()=>r.createElementVNode("div",null,null,-1));function qd(t,n,e,o,a,i){const s=r.resolveComponent("ib-icon");return r.openBlock(),r.createElementBlock("div",Ld,[r.createElementVNode("div",{class:r.normalizeClass(i.classes)},[r.createElementVNode("div",{class:"progress",role:"meter","aria-label":e.ariaLabel,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress,style:r.normalizeStyle({width:e.progress+"%"})},jd,12,Rd),Vd],2),r.withDirectives(r.createVNode(s,{class:"status-icon",name:i.iconName},null,8,["name"]),[[r.vShow,i.iconName.length]])])}const Fd=_e(Md,[["render",qd],["__scopeId","data-v-a0217859"]]),Hd={new:`<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
30
30
  <circle id="Ellipse" cx="5.5" cy="5.5" r="5" fill="#0369E8"/>
31
31
  </svg>
32
32
  `,success:`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
@@ -981,7 +981,8 @@ export default {
981
981
  },
982
982
  onClose() {
983
983
  this.isOpen = false;
984
- this.filter("", this.actualOptions);
984
+ this.filterString = "";
985
+ this.filterFunc(this.actualOptions, this.filterString);
985
986
 
986
987
  if (this.isMultiple) {
987
988
  this.$emit("close", Object.keys(this.selected));