vendor: 17,888 bytes, line 1
1import{_ as ne}from"./Bm7ZMjfe.js";import{_ as ke}from"./CxQHXzK9.js";import{v as V,l as ue,j as _,ap as j,a6 as Fe,t as Se,r as J,A as M,o as C,b as x,B as T,H as E,D as P,F as oe,E as ee,a as I,e as Q,a2 as G,a3 as Z,C as Te,J as He,ao as Me,g as Ue,h as ze,b0 as Ke,bi as We,ai as Ve,af as me,x as ye,U as Ge,M as qe,ah as Ye,aj as Ae}from"#entry";import{r as Je,a as Qe,i as Xe,l as Ze}from"./r_ymtt06.js";import{s as De}from"./DKlpaBM_.js";import{u as et}from"./o_jcWSjN.js";import{_ as Ie}from"./BB7TLOGn.js";import{a as we}from"./D-v14-qL.js";import"./5ZzcNwFp.js";import"./BaePbZMt.js";import"./r0RctCrv.js";import"./Bfu364rl.js";import"./Bm92f-5u.js";import"./CxIZtCgj.js";import"./CpXFDvqR.js";import"./BG5N8S1l.js";import"./Tz5nkhAY.js";import"./Bzi_XK8_.js";import"./BU5GxH89.js";const tt={wrapper:"flex flex-col flex-1 min-h-0 divide-y divide-gray-100 dark:divide-gray-800",container:"relative flex-1 overflow-y-auto divide-y divide-gray-100 dark:divide-gray-800 scroll-py-2",input:{wrapper:"relative flex items-center",base:"w-full placeholder-gray-400 dark:placeholder-gray-500 bg-transparent border-0 text-gray-900 dark:text-white focus:ring-0 focus:outline-none",padding:"px-4",height:"h-12",size:"sm:text-sm",icon:{base:"pointer-events-none absolute start-4 text-gray-400 dark:text-gray-500",loading:"animate-spin",size:"h-5 w-5",padding:"ps-11"},closeButton:{base:"absolute end-4",padding:"pe-10"}},emptyState:{wrapper:"flex flex-col items-center justify-center flex-1 px-6 py-14 sm:px-14",label:"text-sm text-center text-gray-900 dark:text-white",queryLabel:"text-sm text-center text-gray-900 dark:text-white",icon:"w-6 h-6 mx-auto text-gray-400 dark:text-gray-500 mb-4"},group:{wrapper:"p-2",label:"px-2.5 my-2 text-xs font-semibold text-gray-900 dark:text-white",container:"text-sm text-gray-700 dark:text-gray-200",command:{base:"flex justify-between select-none items-center rounded-md px-2.5 py-1.5 gap-2 relative",active:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white",inactive:"",label:"flex items-center gap-1.5 min-w-0",prefix:"text-gray-400 dark:text-gray-500",suffix:"text-gray-400 dark:text-gray-500",container:"flex items-center gap-1.5 min-w-0",icon:{base:"flex-shrink-0 w-5 h-5",active:"text-gray-900 dark:text-white",inactive:"text-gray-400 dark:text-gray-500"},selectedIcon:{base:"h-5 w-5 text-gray-900 dark:text-white flex-shrink-0"},avatar:{base:"flex-shrink-0",size:"2xs"},chip:{base:"flex-shrink-0 w-2 h-2 mx-1 rounded-full"},disabled:"opacity-50",shortcuts:"hidden md:inline-flex flex-shrink-0 gap-0.5"},active:"flex-shrink-0 text-gray-500 dark:text-gray-400",inactive:"flex-shrink-0 text-gray-500 dark:text-gray-400"},default:{icon:"i-heroicons-magnifying-glass-20-solid",loadingIcon:"i-heroicons-arrow-path-20-solid",emptyState:{icon:"i-heroicons-magnifying-glass-20-solid",label:"We couldn't find any items.",queryLabel:"We couldn't find any items with that term. Please try again."},closeButton:null,selectedIcon:"i-heroicons-check-20-solid"}};function N(e){return Array.isArray?Array.isArray(e):Oe(e)==="[object Array]"}function st(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function nt(e){return e==null?"":st(e)}function $(e){return typeof e=="string"}function xe(e){return typeof e=="number"}function rt(e){return e===!0||e===!1||it(e)&&Oe(e)=="[object Boolean]"}function $e(e){return typeof e=="object"}function it(e){return $e(e)&&e!==null}function S(e){return e!=null}function ie(e){return!e.trim().length}function Oe(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const ut="Incorrect 'index' type",ot=e=>`Invalid value for key ${e}`,at=e=>`Pattern length exceeds max of ${e}.`,ct=e=>`Missing ${e} property in key`,lt=e=>`Property 'weight' in key '${e}' must be a positive integer`,be=Object.prototype.hasOwnProperty;class ht{constructor(t){this._keys=[],this._keyMap={};let s=0;t.forEach(n=>{let r=Le(n);this._keys.push(r),this._keyMap[r.id]=r,s+=r.weight}),this._keys.forEach(n=>{n.weight/=s})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Le(e){let t=null,s=null,n=null,r=1,i=null;if($(e)||N(e))n=e,t=Ce(e),s=ae(e);else{if(!be.call(e,"name"))throw new Error(ct("name"));const u=e.name;if(n=u,be.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(lt(u));t=Ce(u),s=ae(u),i=e.getFn}return{path:t,id:s,weight:r,src:n,getFn:i}}function Ce(e){return N(e)?e:e.split(".")}function ae(e){return N(e)?e.join("."):e}function dt(e,t){let s=[],n=!1;const r=(i,u,a)=>{if(S(i))if(!u[a])s.push(i);else{let c=u[a];const l=i[c];if(!S(l))return;if(a===u.length-1&&($(l)||xe(l)||rt(l)))s.push(nt(l));else if(N(l)){n=!0;for(let o=0,f=l.length;o<f;o+=1)r(l[o],u,a+1)}else u.length&&r(l,u,a+1)}};return r(e,$(t)?t.split("."):t,0),n?s:s[0]}const ft={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},pt={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},gt={location:0,threshold:.6,distance:100},mt={useExtendedSearch:!1,getFn:dt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var d={...pt,...ft,...gt,...mt};const yt=/[^ ]+/g;function At(e=1,t=3){const s=new Map,n=Math.pow(10,t);return{get(r){const i=r.match(yt).length;if(s.has(i))return s.get(i);const u=1/Math.pow(i,.5*e),a=parseFloat(Math.round(u*n)/n);return s.set(i,a),a},clear(){s.clear()}}}class pe{constructor({getFn:t=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){this.norm=At(s,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((s,n)=>{this._keysMap[s.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,$(this.docs[0])?this.docs.forEach((t,s)=>{this._addString(t,s)}):this.docs.forEach((t,s)=>{this._addObject(t,s)}),this.norm.clear())}add(t){const s=this.size();$(t)?this._addString(t,s):this._addObject(t,s)}removeAt(t){this.records.splice(t,1);for(let s=t,n=this.size();s<n;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(t,s){return t[this._keysMap[s]]}size(){return this.records.length}_addString(t,s){if(!S(t)||ie(t))return;let n={v:t,i:s,n:this.norm.get(t)};this.records.push(n)}_addObject(t,s){let n={i:s,$:{}};this.keys.forEach((r,i)=>{let u=r.getFn?r.getFn(t):this.getFn(t,r.path);if(S(u)){if(N(u)){let a=[];const c=[{nestedArrIndex:-1,value:u}];for(;c.length;){const{nestedArrIndex:l,value:o}=c.pop();if(S(o))if($(o)&&!ie(o)){let f={v:o,i:l,n:this.norm.get(o)};a.push(f)}else N(o)&&o.forEach((f,h)=>{c.push({nestedArrIndex:h,value:f})})}n.$[i]=a}else if($(u)&&!ie(u)){let a={v:u,n:this.norm.get(u)};n.$[i]=a}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Ne(e,t,{getFn:s=d.getFn,fieldNormWeight:n=d.fieldNormWeight}={}){const r=new pe({getFn:s,fieldNormWeight:n});return r.setKeys(e.map(Le)),r.setSources(t),r.create(),r}function bt(e,{getFn:t=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){const{keys:n,records:r}=e,i=new pe({getFn:t,fieldNormWeight:s});return i.setKeys(n),i.setIndexRecords(r),i}function X(e,{errors:t=0,currentLocation:s=0,expectedLocation:n=0,distance:r=d.distance,ignoreLocation:i=d.ignoreLocation}={}){const u=t/e.length;if(i)return u;const a=Math.abs(n-s);return r?u+a/r:a?1:u}function Ct(e=[],t=d.minMatchCharLength){let s=[],n=-1,r=-1,i=0;for(let u=e.length;i<u;i+=1){let a=e[i];a&&n===-1?n=i:!a&&n!==-1&&(r=i-1,r-n+1>=t&&s.push([n,r]),n=-1)}return e[i-1]&&i-n>=t&&s.push([n,i-1]),s}const z=32;function Et(e,t,s,{location:n=d.location,distance:r=d.distance,threshold:i=d.threshold,findAllMatches:u=d.findAllMatches,minMatchCharLength:a=d.minMatchCharLength,includeMatches:c=d.includeMatches,ignoreLocation:l=d.ignoreLocation}={}){if(t.length>z)throw new Error(at(z));const o=t.length,f=e.length,h=Math.max(0,Math.min(n,f));let g=i,m=h;const b=a>1||c,F=b?Array(f):[];let w;for(;(w=e.indexOf(t,m))>-1;){let p=X(t,{currentLocation:w,expectedLocation:h,distance:r,ignoreLocation:l});if(g=Math.min(p,g),m=w+o,b){let y=0;for(;y<o;)F[w+y]=1,y+=1}}m=-1;let D=[],O=1,L=o+f;const re=1<<o-1;for(let p=0;p<o;p+=1){let y=0,v=L;for(;y<v;)X(t,{errors:p,currentLocation:h+v,expectedLocation:h,distance:r,ignoreLocation:l})<=g?y=v:L=v,v=Math.floor((L-y)/2+y);L=v;let K=Math.max(1,h-v+1),A=u?f:Math.min(h+v,f)+o,B=Array(A+2);B[A+1]=(1<<p)-1;for(let k=A;k>=K;k-=1){let U=k-1,ge=s[e.charAt(U)];if(b&&(F[U]=+!!ge),B[k]=(B[k+1]<<1|1)&ge,p&&(B[k]|=(D[k+1]|D[k])<<1|1|D[k+1]),B[k]&re&&(O=X(t,{errors:p,currentLocation:U,expectedLocation:h,distance:r,ignoreLocation:l}),O<=g)){if(g=O,m=U,m<=h)break;K=Math.max(1,2*h-m)}}if(X(t,{errors:p+1,currentLocation:h,expectedLocation:h,distance:r,ignoreLocation:l})>g)break;D=B}const Y={isMatch:m>=0,score:Math.max(.001,O)};if(b){const p=Ct(F,a);p.length?c&&(Y.indices=p):Y.isMatch=!1}return Y}function vt(e){let t={};for(let s=0,n=e.length;s<n;s+=1){const r=e.charAt(s);t[r]=(t[r]||0)|1<<n-s-1}return t}const te=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class Re{constructor(t,{location:s=d.location,threshold:n=d.threshold,distance:r=d.distance,includeMatches:i=d.includeMatches,findAllMatches:u=d.findAllMatches,minMatchCharLength:a=d.minMatchCharLength,isCaseSensitive:c=d.isCaseSensitive,ignoreDiacritics:l=d.ignoreDiacritics,ignoreLocation:o=d.ignoreLocation}={}){if(this.options={location:s,threshold:n,distance:r,includeMatches:i,findAllMatches:u,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:l,ignoreLocation:o},t=c?t:t.toLowerCase(),t=l?te(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const f=(g,m)=>{this.chunks.push({pattern:g,alphabet:vt(g),startIndex:m})},h=this.pattern.length;if(h>z){let g=0;const m=h%z,b=h-m;for(;g<b;)f(this.pattern.substr(g,z),g),g+=z;if(m){const F=h-z;f(this.pattern.substr(F),F)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:s,ignoreDiacritics:n,includeMatches:r}=this.options;if(t=s?t:t.toLowerCase(),t=n?te(t):t,this.pattern===t){let b={isMatch:!0,score:0};return r&&(b.indices=[[0,t.length-1]]),b}const{location:i,distance:u,threshold:a,findAllMatches:c,minMatchCharLength:l,ignoreLocation:o}=this.options;let f=[],h=0,g=!1;this.chunks.forEach(({pattern:b,alphabet:F,startIndex:w})=>{const{isMatch:D,score:O,indices:L}=Et(t,b,F,{location:i+w,distance:u,threshold:a,findAllMatches:c,minMatchCharLength:l,includeMatches:r,ignoreLocation:o});D&&(g=!0),h+=O,D&&L&&(f=[...f,...L])});let m={isMatch:g,score:g?h/this.chunks.length:1};return g&&r&&(m.indices=f),m}}class H{constructor(t){this.pattern=t}static isMultiMatch(t){return Ee(t,this.multiRegex)}static isSingleMatch(t){return Ee(t,this.singleRegex)}search(){}}function Ee(e,t){const s=e.match(t);return s?s[1]:null}class Bt extends H{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const s=t===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class kt extends H{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const n=t.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Ft extends H{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const s=t.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class St extends H{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const s=!t.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class Mt extends H{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const s=t.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Dt extends H{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const s=!t.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class je extends H{constructor(t,{location:s=d.location,threshold:n=d.threshold,distance:r=d.distance,includeMatches:i=d.includeMatches,findAllMatches:u=d.findAllMatches,minMatchCharLength:a=d.minMatchCharLength,isCaseSensitive:c=d.isCaseSensitive,ignoreDiacritics:l=d.ignoreDiacritics,ignoreLocation:o=d.ignoreLocation}={}){super(t),this._bitapSearch=new Re(t,{location:s,threshold:n,distance:r,includeMatches:i,findAllMatches:u,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:l,ignoreLocation:o})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Pe extends H{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let s=0,n;const r=[],i=this.pattern.length;for(;(n=t.indexOf(this.pattern,s))>-1;)s=n+i,r.push([n,s-1]);const u=!!r.length;return{isMatch:u,score:u?0:1,indices:r}}}const ce=[Bt,Pe,Ft,St,Dt,Mt,kt,je],ve=ce.length,It=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,wt="|";function xt(e,t={}){return e.split(wt).map(s=>{let n=s.trim().split(It).filter(i=>i&&!!i.trim()),r=[];for(let i=0,u=n.length;i<u;i+=1){const a=n[i];let c=!1,l=-1;for(;!c&&++l<ve;){const o=ce[l];let f=o.isMultiMatch(a);f&&(r.push(new o(f,t)),c=!0)}if(!c)for(l=-1;++l<ve;){const o=ce[l];let f=o.isSingleMatch(a);if(f){r.push(new o(f,t));break}}}return r})}const $t=new Set([je.type,Pe.type]);class Ot{constructor(t,{isCaseSensitive:s=d.isCaseSensitive,ignoreDiacritics:n=d.ignoreDiacritics,includeMatches:r=d.includeMatches,minMatchCharLength:i=d.minMatchCharLength,ignoreLocation:u=d.ignoreLocation,findAllMatches:a=d.findAllMatches,location:c=d.location,threshold:l=d.threshold,distance:o=d.distance}={}){this.query=null,this.options={isCaseSensitive:s,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:a,ignoreLocation:u,location:c,threshold:l,distance:o},t=s?t:t.toLowerCase(),t=n?te(t):t,this.pattern=t,this.query=xt(this.pattern,this.options)}static condition(t,s){return s.useExtendedSearch}searchIn(t){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;t=r?t:t.toLowerCase(),t=i?te(t):t;let u=0,a=[],c=0;for(let l=0,o=s.length;l<o;l+=1){const f=s[l];a.length=0,u=0;for(let h=0,g=f.length;h<g;h+=1){const m=f[h],{isMatch:b,indices:F,score:w}=m.search(t);if(b){if(u+=1,c+=w,n){const D=m.constructor.type;$t.has(D)?a=[...a,...F]:a.push(F)}}else{c=0,u=0,a.length=0;break}}if(u){let h={isMatch:!0,score:c/u};return n&&(h.indices=a),h}}return{isMatch:!1,score:1}}}const le=[];function Lt(...e){le.push(...e)}function he(e,t){for(let s=0,n=le.length;s<n;s+=1){let r=le[s];if(r.condition(e,t))return new r(e,t)}return new Re(e,t)}const se={AND:"$and",OR:"$or"},de={PATH:"$path",PATTERN:"$val"},fe=e=>!!(e[se.AND]||e[se.OR]),Nt=e=>!!e[de.PATH],Rt=e=>!N(e)&&$e(e)&&!fe(e),Be=e=>({[se.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function _e(e,t,{auto:s=!0}={}){const n=r=>{let i=Object.keys(r);const u=Nt(r);if(!u&&i.length>1&&!fe(r))return n(Be(r));if(Rt(r)){const c=u?r[de.PATH]:i[0],l=u?r[de.PATTERN]:r[c];if(!$(l))throw new Error(ot(c));const o={keyId:ae(c),pattern:l};return s&&(o.searcher=he(l,t)),o}let a={children:[],operator:i[0]};
1return i.forEach(c=>{const l=r[c];N(l)&&l.forEach(o=>{a.children.push(n(o))})}),a};return fe(e)||(e=Be(e)),n(e)}function jt(e,{ignoreFieldNorm:t=d.ignoreFieldNorm}){e.forEach(s=>{let n=1;s.matches.forEach(({key:r,norm:i,score:u})=>{const a=r?r.weight:null;n*=Math.pow(u===0&&a?Number.EPSILON:u,(a||1)*(t?1:i))}),s.score=n})}function Pt(e,t){const s=e.matches;t.matches=[],S(s)&&s.forEach(n=>{if(!S(n.indices)||!n.indices.length)return;const{indices:r,value:i}=n;let u={indices:r,value:i};n.key&&(u.key=n.key.src),n.idx>-1&&(u.refIndex=n.idx),t.matches.push(u)})}function _t(e,t){t.score=e.score}function Tt(e,t,{includeMatches:s=d.includeMatches,includeScore:n=d.includeScore}={}){const r=[];return s&&r.push(Pt),n&&r.push(_t),e.map(i=>{const{idx:u}=i,a={item:t[u],refIndex:u};return r.length&&r.forEach(c=>{c(i,a)}),a})}class q{constructor(t,s={},n){this.options={...d,...s},this.options.useExtendedSearch,this._keyStore=new ht(this.options.keys),this.setCollection(t,n)}setCollection(t,s){if(this._docs=t,s&&!(s instanceof pe))throw new Error(ut);this._myIndex=s||Ne(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){S(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const s=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,r-=1,s.push(i))}return s}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:s=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:u,ignoreFieldNorm:a}=this.options;let c=$(t)?$(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return jt(c,{ignoreFieldNorm:a}),i&&c.sort(u),xe(s)&&s>-1&&(c=c.slice(0,s)),Tt(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){const s=he(t,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:i,i:u,n:a})=>{if(!S(i))return;const{isMatch:c,score:l,indices:o}=s.searchIn(i);c&&r.push({item:i,idx:u,matches:[{score:l,value:i,norm:a,indices:o}]})}),r}_searchLogical(t){const s=_e(t,this.options),n=(a,c,l)=>{if(!a.children){const{keyId:f,searcher:h}=a,g=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(c,f),searcher:h});return g&&g.length?[{idx:l,item:c,matches:g}]:[]}const o=[];for(let f=0,h=a.children.length;f<h;f+=1){const g=a.children[f],m=n(g,c,l);if(m.length)o.push(...m);else if(a.operator===se.AND)return[]}return o},r=this._myIndex.records,i={},u=[];return r.forEach(({$:a,i:c})=>{if(S(a)){let l=n(s,a,c);l.length&&(i[c]||(i[c]={idx:c,item:a,matches:[]},u.push(i[c])),l.forEach(({matches:o})=>{i[c].matches.push(...o)}))}}),u}_searchObjectList(t){const s=he(t,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:u,i:a})=>{if(!S(u))return;let c=[];n.forEach((l,o)=>{c.push(...this._findMatches({key:l,value:u[o],searcher:s}))}),c.length&&i.push({idx:a,item:u,matches:c})}),i}_findMatches({key:t,value:s,searcher:n}){if(!S(s))return[];let r=[];if(N(s))s.forEach(({v:i,i:u,n:a})=>{if(!S(i))return;const{isMatch:c,score:l,indices:o}=n.searchIn(i);c&&r.push({score:l,key:t,value:i,idx:u,norm:a,indices:o})});else{const{v:i,n:u}=s,{isMatch:a,score:c,indices:l}=n.searchIn(i);a&&r.push({score:c,key:t,value:i,norm:u,indices:l})}return r}}q.version="7.1.0";q.createIndex=Ne;q.parseIndex=bt;q.config=d;q.parseQuery=_e;Lt(Ot);function Ht(e,t,s){const n=()=>{var u,a;return new q((u=j(t))!=null?u:[],(a=j(s))==null?void 0:a.fuseOptions)},r=V(n());ue(()=>{var u;return(u=j(s))==null?void 0:u.fuseOptions},()=>{r.value=n()},{deep:!0}),ue(()=>j(t),u=>{r.value.setCollection(u)},{deep:!0});const i=_(()=>{const u=j(s);if(u!=null&&u.matchAllWhenSearchEmpty&&!j(e))return j(t).map((c,l)=>({item:c,refIndex:l}));const a=u==null?void 0:u.resultLimit;return r.value.search(j(e),a?{limit:a}:void 0)});return{fuse:r,results:i}}const Ut=Se({components:{HComboboxOption:Je,UIcon:ne,UAvatar:Ie,UKbd:we},props:{group:{type:Object,required:!0},query:{type:String,default:""},groupAttribute:{type:String,required:!0},commandAttribute:{type:String,required:!0},selectedIcon:{type:String,required:!0},ui:{type:Object,required:!0}},setup(e){const t=_(()=>{const n=e.group[e.groupAttribute];return typeof n=="function"?n(e.query):n});function s(n,{indices:r,value:i}){if(n===i)return"";let u="",a=0;r.forEach(l=>{const o=l[1]+1,f=o-l[0]>=e.query.length;u+=[i.substring(a,l[0]),f&&"<mark>",i.substring(l[0],o),f&&"</mark>
1"].filter(Boolean).join(""),a=o}),u+=i.substring(a);const c=u.indexOf("<mark>");return c>60&&(u=`...${u.substring(c-60)}`),u}return De(()=>Me()),{label:t,highlight:s}}}),zt=["aria-label"],Kt=["innerHTML"];function Wt(e,t,s,n,r,i){const u=ne,a=Ie,c=we,l=J("HComboboxOption");return C(),M("div",{class:E(e.ui.group.wrapper)},[e.label?(C(),M("h2",{key:0,class:E(e.ui.group.label)},P(e.label),3)):x("",!0),T("div",{class:E(e.ui.group.container),"aria-label":e.group[e.groupAttribute]},[(C(!0),M(oe,null,ee(e.group.commands,(o,f)=>(C(),I(l,{key:`${e.group.key}-${f}`,value:o,disabled:o.disabled,as:"template"},{default:Q(({active:h,selected:g})=>[T("div",{class:E([e.ui.group.command.base,h?e.ui.group.command.active:e.ui.group.command.inactive,o.disabled?"cursor-not-allowed":"cursor-pointer"])},[T("div",{class:E(e.ui.group.command.container)},[G(e.$slots,`${e.group.key}-icon`,{group:e.group,command:o,active:h,selected:g},()=>[o.icon?(C(),I(u,{key:0,name:o.icon,class:E([e.ui.group.command.icon.base,h?e.ui.group.command.icon.active:e.ui.group.command.icon.inactive,o.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):o.avatar?(C(),I(a,Z({key:1,ref_for:!0},{size:e.ui.group.command.avatar.size,...o.avatar},{class:e.ui.group.command.avatar.base,"aria-hidden":"true"}),null,16,["class"])):o.chip?(C(),M("span",{key:2,class:E(e.ui.group.command.chip.base),style:Te({background:`#${o.chip}`})},null,6)):x("",!0)]),T("div",{class:E([e.ui.group.command.label,o.disabled&&e.ui.group.command.disabled])},[G(e.$slots,`${e.group.key}-command`,{group:e.group,command:o,active:h,selected:g},()=>{var m,b;return[o.prefix?(C(),M("span",{key:0,class:E(["flex-shrink-0",o.prefixClass||e.ui.group.command.prefix])},P(o.prefix),3)):x("",!0),T("span",{class:E(["truncate",{"flex-none":o.suffix||((m=o.matches)==null?void 0:m.length)}])},P(o[e.commandAttribute]),3),(b=o.matches)!=null&&b.length?(C(),M("span",{key:1,class:E(["truncate",o.suffixClass||e.ui.group.command.suffix]),innerHTML:e.highlight(o[e.commandAttribute],o.matches[0])},null,10,Kt)):o.suffix?(C(),M("span",{key:2,class:E(["truncate",o.suffixClass||e.ui.group.command.suffix])},P(o.suffix),3)):x("",!0)]})],2)],2),g?(C(),I(u,{key:0,name:e.selectedIcon,class:E(e.ui.group.command.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])):h&&(e.group.active||e.$slots[`${e.group.key}-active`])?G(e.$slots,`${e.group.key}-active`,{key:1,group:e.group,command:o,active:h,selected:g},()=>[e.group.active?(C(),M("span",{key:0,class:E(e.ui.group.active)},P(e.group.active),3)):x("",!0)]):G(e.$slots,`${e.group.key}-inactive`,{key:2,group:e.group,command:o,active:h,selected:g},()=>{var m;return[(m=o.shortcuts)!=null&&m.length?(C(),M("span",{key:0,class:E(e.ui.group.command.shortcuts)},[(C(!0),M(oe,null,ee(o.shortcuts,b=>(C(),I(c,{key:b},{default:Q(()=>[He(P(b),1)]),_:2},1024))),128))],2)):!o.disabled&&e.group.inactive?(C(),M("span",{key:1,class:E(e.ui.group.inactive)},P(e.group.inactive),3)):x("",!0)]})],2)]),_:2},1032,["value","disabled"]))),128))],10,zt)],2)}const Vt=Object.assign(Fe(Ut,[["render",Wt]]),{__name:"UCommandPaletteGroup"}),W=Ve(Ae.ui.strategy,Ae.ui.commandPalette,tt),Gt=Se({components:{HCombobox:Ze,HComboboxInput:Xe,HComboboxOptions:Qe,UIcon:ne,UButton:ke,CommandPaletteGroup:Vt},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array],default:null},by:{type:String,default:"id"},multiple:{type:Boolean,default:!1},nullable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},groups:{type:Array,default:()=>[]},icon:{type:String,default:()=>W.default.icon},loadingIcon:{type:String,default:()=>W.default.loadingIcon},selectedIcon:{type:String,default:()=>W.default.selectedIcon},closeButton:{type:Object,default:()=>W.default.closeButton},emptyState:{type:Object,default:()=>W.default.emptyState},placeholder:{type:String,default:"Search..."},groupAttribute:{type:String,default:"label"},commandAttribute:{type:String,default:"label"},autoselect:{type:Boolean,default:!0},autoclear:{type:Boolean,default:!0},debounce:{type:Number,default:200},fuse:{type:Object,default:()=>({})},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["update:modelValue","close"],setup(e,{emit:t,expose:s}){const{ui:n,attrs:r}=et("commandPalette",me(e,"ui"),W,me(e,"class")),i=V(""),u=V(),a=V(null),c=V(!1);ye(()=>{e.autoselect&&L()}),ye(()=>{setTimeout(()=>{var v;const p=(v=u.value)==null?void 0:v.$.provides;if(!p)return;const y=Object.getOwnPropertySymbols(p);a.value=y.length&&p[y[0]]},200)});const l=_(()=>Ge({},e.fuse,{fuseOptions:{keys:[e.commandAttribute]},resultLimit:12,matchAllWhenSearchEmpty:!0})),o=_(()=>{var y;const p=[];for(const v of e.groups)!v.search&&!v.static&&p.push(...((y=v.commands)==null?void 0:y.map(K=>({...K,group:v.key})))||[]);return p}),f=V({}),{results:h}=Ht(i,o,l);function g(p,y){if(p)return p.filter&&typeof p.filter=="function"&&(y=p.filter(i.value,y)),{...p,commands:y.slice(0,l.value.resultLimit)}}const m=_(()=>{if(!h.value)return[];const p=h.value.reduce((A,B)=>{var U;const{item:R,...k}=B;return R.group&&(A[U=R.group]||(A[U]=[]),A[R.group].push({...R,...k})),A},{}),y=Object.entries(p).map(([A,B])=>{const R=e.groups.find(k=>k.key===A);return R?g(R,B):null}
1).filter(Boolean),v=e.groups.filter(A=>{var B;return!!A.search&&((B=f.value[A.key])==null?void 0:B.length)}).map(A=>{const B=f.value[A.key]||[];return g(A,[...B])}),K=e.groups.filter(A=>{var B;return A.static&&((B=A.commands)==null?void 0:B.length)}).map(A=>g(A,A.commands));return[...y,...v,...K]}),b=qe(async()=>{const p=e.groups.filter(y=>!!y.search);p.length&&(c.value=!0,await Promise.all(p.map(async y=>{f.value[y.key]=await y.search(i.value)})),c.value=!1,O())},e.debounce);ue(i,()=>{b(),O()});const F=_(()=>(e.loading||c.value)&&e.loadingIcon?e.loadingIcon:e.icon),w=_(()=>Ye(n.value.input.icon.base,n.value.input.icon.size,(e.loading||c.value)&&e.loadingIcon&&n.value.input.icon.loading)),D=_(()=>e.emptyState===null?null:{...n.value.default.emptyState,...e.emptyState});function O(){setTimeout(()=>{var p;(p=u.value)==null||p.$el.dispatchEvent(new KeyboardEvent("keydown",{key:"PageUp"}))},0)}function L(){setTimeout(()=>{var p;(p=u.value)==null||p.$el.dispatchEvent(new KeyboardEvent("keydown",{key:"ArrowDown"}))},0)}function re(p){t("update:modelValue",p,{query:i.value}),e.autoclear&&setTimeout(()=>{i.value=""},0)}function Y(){i.value?i.value="":t("close")}return s({query:i,updateQuery:p=>{i.value=p},comboboxApi:a,results:h}),De(()=>Me()),{ui:n,attrs:r,groups:m,comboboxInput:u,query:i,iconName:F,iconClass:w,emptyState:D,onSelect:re,onClear:Y}}});function qt(e,t,s,n,r,i){const u=ne,a=J("HComboboxInput"),c=ke,l=J("CommandPaletteGroup"),o=J("HComboboxOptions"),f=J("HCombobox");return C(),I(f,Z({by:e.by,"model-value":e.modelValue,multiple:e.multiple,nullable:e.nullable,class:e.ui.wrapper},e.attrs,{as:"div","onUpdate:modelValue":e.onSelect}),{default:Q(()=>[Ue(T("div",{class:E(e.ui.input.wrapper)},[e.iconName?(C(),I(u,{key:0,name:e.iconName,class:E(e.iconClass),"aria-hidden":"true"},null,8,["name","class"])):x("",!0),ze(a,{ref:"comboboxInput",value:e.query,class:E([e.ui.input.base,e.ui.input.size,e.ui.input.height,e.ui.input.padding,e.icon&&e.ui.input.icon.padding,e.closeButton&&e.ui.input.closeButton.padding]),placeholder:e.placeholder,"aria-label":e.placeholder,autocomplete:"off",onChange:t[0]||(t[0]=h=>e.query=h.target.value)},null,8,["value","class","placeholder","aria-label"]),e.closeButton?(C(),I(c,Z({key:1,"aria-label":"Close"},{...e.ui.default.closeButton||{},...e.closeButton},{class:e.ui.input.closeButton.base,onClick:e.onClear}),null,16,["class","onClick"])):x("",!0)],2),[[Ke,e.searchable]]),e.groups.length?(C(),I(o,{key:0,static:"",hold:"",as:"div","aria-label":"Commands",class:E(e.ui.container)},{default:Q(()=>[(C(!0),M(oe,null,ee(e.groups,h=>(C(),I(l,{key:h.key,query:e.query,group:h,"group-attribute":e.groupAttribute,"command-attribute":e.commandAttribute,"selected-icon":e.selectedIcon,ui:e.ui},We({_:2},[ee(e.$slots,(g,m)=>({name:m,fn:Q(b=>[G(e.$slots,m,Z({ref_for:!0},b))])}))]),1032,["query","group","group-attribute","command-attribute","selected-icon","ui"]))),128))]),_:3},8,["class"])):e.emptyState?G(e.$slots,"empty-state",{key:1},()=>[T("div",{class:E(e.ui.emptyState.wrapper)},[e.emptyState.icon?(C(),I(u,{key:0,name:e.emptyState.icon,class:E(e.ui.emptyState.icon),"aria-hidden":"true"},null,8,["name","class"])):x("",!0),T("p",{class:E(e.query?e.ui.emptyState.queryLabel:e.ui.emptyState.label)},P(e.query?e.emptyState.queryLabel:e.emptyState.label),3)],2)]):x("",!0)]),_:3},16,["by","model-value","multiple","nullable","class","onUpdate:modelValue"])}const ps=Object.assign(Fe(Gt,[["render",qt]]),{__name:"UCommandPalette"});export{ps 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.