vendor: 28,611 bytes, line 1
1import{o as e,s as t}from"./Bx_iXjWP.js";import{$ as n,D as r,E as i,En as a,Ft as o,Ht as s,Lt as c,On as l,Qn as u,Rt as d,Yt as f,_ as p,b as m,bt as h,ct as g,et as _,g as v,gn as y,gt as b,k as x,mt as S,nr as C,o as w,qt as T,tt as ee,un as te,v as E,vn as D,w as ne,wn as re,wt as O,xn as k,xt as A,y as j}from"./C2bBK_b8.js";import{K as ie,ht as M,mt as N,pt as ae}from"./1Q3aFHjM.js";import{f as oe,m as se,p as ce,u as P}from"./BzNvz5uH.js";import{t as le}from"./RHbSCEx_.js";import{c as F,n as ue}from"./ZK7eL7t-.js";import{t as I}from"./DExaMvDl.js";import{b as de,n as fe,t as pe}from"./CbOzxoEd.js";import{t as L}from"./QaEseb2m.js";import{d as me}from"./DOPOD5Iq.js";import{t as R}from"./DpsNSVC9.js";import{t as he}from"./C4T2IPwm2.js";import{t as ge}from"./DsxhvsHg2.js";import{t as _e}from"./Dcyff9p32.js";import{a as ve,c as ye,i as be,l as xe,n as Se,o as Ce,r as we,s as Te,t as Ee,u as De}from"./8qsMaFDy2.js";import{M as Oe,a as z,d as ke,f as Ae,j as je,k as Me,n as Ne,r as Pe,t as B}from"./B18-934R2.js";import{n as Fe}from"./CwcJSlUY2.js";import{n as Ie,t as Le}from"./ChuzJ79H2.js";import{t as Re}from"./C0uZYiXm2.js";import{t as ze}from"./DNQC9iVU.js";import{t as Be}from"./ACMDAwwB.js";import{n as Ve,r as He,t as Ue}from"./D9ZHvnaq.js";import{n as We}from"./BAR09MNg.js";import{a as Ge,i as Ke,o as qe,s as Je}from"./tfTGpNfA.js";import{t as V}from"./BPfek_Y2.js";import{t as Ye}from"./DWSgAB02.js";import{t as Xe}from"./6yyQDoYW.js";import{t as Ze}from"./DrfZc6z-.js";import{t as Qe}from"./BDNMzG2s.js";import{d as $e,f as et}from"./B9MSWu5g.js";import{t as tt}from"./Bf8HBeTF.js";import{t as nt}from"./B0FN3_mL2.js";import{t as rt}from"./iL_sIZ7F2.js";import{t as it}from"./CbJPt89u2.js";import{t as at}from"./DJn6T9fD2.js";import{t as ot}from"./BVFUuRCb2.js";import{t as st}from"./CMFI3ElV2.js";import{t as ct}from"./BlzcBM2x2.js";import{t as lt}from"./DQUL8f9k2.js";import{s as ut}from"./Bvfg8lWs2.js";import{t as dt}from"./CD1D4taR2.js";var ft=x({__name:`ListboxGroupLabel`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e,n=Te({id:``});return(e,r)=>(S(),E(l(Ae),_(t,{id:l(n).id}),{default:T(()=>[A(e.$slots,`default`)]),_:3},16,[`id`]))}});function H(e){return Array.isArray?Array.isArray(e):bt(e)===`[object Array]`}function pt(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function mt(e){return e==null?``:pt(e)}function U(e){return typeof e==`string`}function ht(e){return typeof e==`number`}function gt(e){return e===!0||e===!1||vt(e)&&bt(e)==`[object Boolean]`}function _t(e){return typeof e==`object`}function vt(e){return _t(e)&&e!==null}function W(e){return e!=null}function yt(e){return!e.trim().length}function bt(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var xt=`Incorrect 'index' type`,St=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,Ct=e=>`Invalid value for key ${e}`,wt=e=>`Pattern length exceeds max of ${e}.`,Tt=e=>`Missing ${e} property in key`,Et=e=>`Property 'weight' in key '${e}' must be a positive integer`,Dt=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,Ot=Object.prototype.hasOwnProperty,kt=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=At(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function At(e){let t=null,n=null,r=null,i=1,a=null;if(U(e)||H(e))r=e,t=jt(e),n=Mt(e);else{if(!Ot.call(e,`name`))throw Error(Tt(`name`));let o=e.name;if(r=o,Ot.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(Et(Mt(o)));t=jt(o),n=Mt(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function jt(e){return H(e)?e:e.split(`.`)}function Mt(e){return H(e)?e.join(`.`):e}function Nt(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(W(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!W(s))return;if(a===t.length-1&&(U(s)||ht(s)||gt(s)||typeof s==`bigint`))n.push(o===void 0?mt(s):{v:mt(s),i:o});else if(H(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,U(t)?t.split(`.`):t,0),r?n:n[0]}var Pt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Ft={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},It={location:0,threshold:.6,distance:100},Lt={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:Nt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},G=Object.freeze({...Ft,...Pt,...It,...Lt});function Rt(e){return e>=9&&e<=13||e===32||e===160}function zt(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)Rt(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var Bt=class{constructor({getFn:e=G.getFn,fieldNormWeight:t=G.fieldNormWeight}={}){this.norm=zt(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(U(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(St);if(U(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(St);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!W(e)||yt(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(W(i)){if(H(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(W(n)){if(U(n)){if(!yt(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(W(n.v)){let t=U(n.v)?n.v:mt(n.v);if(!yt(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(U(i)&&!yt(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function Vt(e,t,{getFn:n=G.getFn,fieldNormWeight:r=G.fieldNormWeight}={}){let i=new Bt({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(At)),i.setSources(t),i.create(),i}function Ht(e,{getFn:t=G.getFn,fieldNormWeight:n=G.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new Bt({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Ut(e=[],t=G.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function Wt(e,t,n,{location:r=G.location,distance:i=G.distance,threshold:a=G.threshold,findAllMatches:o=G.findAllMatches,minMatchCharLength:s=G.minMatchCharLength,includeMatches:c=G.includeMatches,ignoreLocation:l=G.ignoreLocation}={}){if(t.length>32)throw Error(wt(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=Ut(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function Gt(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function Kt(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var qt={Å:`l`,Å:`L`,Ä:`d`,Ä:`D`,ø:`o`,Ã:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,Ã:`ss`},Jt=RegExp(`[`+Object.keys(qt).join(``)+`]`,`g`),Yt=typeof String.prototype.normalize==`function`?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,``).replace(Jt,e=>qt[e]):e=>e,Xt=class{constructor(e,{location:t=G.location,threshold:n=G.threshold,distance:r=G.distance,includeMatches:i=G.includeMatches,findAllMatches:a=G.findAllMatches,minMatchCharLength:o=G.minMatchCharLength,isCaseSensitive:s=G.isCaseSensitive,ignoreDiacritics:c=G.ignoreDiacritics,ignoreLocation:l=G.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?Yt(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:Gt(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?Yt(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=Wt(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=Kt(u)),p}},Zt=new Set([`fuzzy`,`include`]);function Qt(e){return e.startsWith(`inverse`)}var $t=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new Xt(e,{location:t.location??G.location,threshold:t.threshold??G.threshold,distance:t.distance??G.distance,includeMatches:t.includeMatches??G.includeMatches,findAllMatches:t.findAllMatches??G.findAllMatches,minMatchCharLength:t.minMatchCharLength??G.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??G.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??G.ignoreDiacritics,ignoreLocation:t.ignoreLocation??G.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],en=$t.length,tn=`\0`,nn=`|`;function rn(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function an(e,t){let n=e.match(t);return n?n[1]:null}function on(e,t={}){return e.replace(/\\\|/g,tn).split(nn).map(e=>{let n=rn(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<en;){let e=$t[o],n=an(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<en;){let e=$t[o],n=an(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var sn=class{constructor(e,{isCaseSensitive:t=G.isCaseSensitive,ignoreDiacritics:n=G.ignoreDiacritics,includeMatches:r=G.includeMatches,minMatchCharLength:i=G.minMatchCharLength,ignoreLocation:a=G.ignoreLocation,findAllMatches:o=G.findAllMatches,location:s=G.location,threshold:c=G.threshold,distance:l=G.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?Yt(e):e,this.pattern=e,this.query=on(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?Yt(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,Qt(r.type)&&(c=!0),n&&(Zt.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=Kt(o)),e}}return{isMatch:!1,score:1}}},cn=[];function ln(...e){cn.push(...e)}function un(e,t){for(let n=0,r=cn.length;n<r;n+=1){let r=cn[n];if(r.condition(e,t))return new r(e,t)}return new Xt(e,t)}var dn={AND:`$and`,OR:`$or`},fn={PATH:`$path`,PATTERN:`$val`},pn=e=>!!(e[dn.AND]||e[dn.OR]),mn=e=>!!e[fn.PATH],hn=e=>!H(e)&&_t(e)&&!pn(e),gn=e=>({[dn.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function _n(e,t,{auto:n=!0}={}){let r=e=>{if(U(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=un(e,t)),r}let i=Object.keys(e),a=mn(e);if(!a&&i.length>1&&!pn(e))return r(gn(e));if(hn(e)){let r=a?e[fn.PATH]:i[0],o=a?e[fn.PATTERN]:e[r];if(!U(o))throw Error(Ct(r));let s={keyId:Mt(r),pattern:o};return n&&(s.searcher=un(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];H(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return pn(e)||(e=gn(e)),r(e)}function vn(e,{ignoreFieldNorm:t=G.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function yn(e,{ignoreFieldNorm:t=G.ignoreFieldNorm}){e.forEach(e=>{e.score=vn(e.matches,{ignoreFieldNorm:t})})}var bn=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function xn(e){let t=[];return e.matches.forEach(e=>{if(!W(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function Sn(e,t,{includeMatches:n=G.includeMatches,includeScore:r=G.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=xn(e)),r&&(a.score=e.score),a})}var Cn=/[\p{L}\p{M}\p{N}_]+/gu,wn=new WeakSet;function Tn(e){wn.has(e)||(wn.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function En(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||Tn(e),t=>t.match(e)||[]):e=>e.match(Cn)||[]}function Dn({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=En(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=Yt(n)),r(n)}}}var On=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Dn({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new Xt(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=Kt(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function kn(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function An(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){kn(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n)if(Array.isArray(n))for(let t of n)kn(e,t.v,i,r);else kn(e,n.v,i,r)}}function jn(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)An(r,i,t,n);return r}function Mn(e,t,n,r){An(e,t,n,r)}function Nn(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function Pn(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)Nn(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var K=class{constructor(e,t,n){this.options={...G,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new kt(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=un(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Bt))throw Error(xt);if(this._myIndex=t||Vt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Dn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=jn(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!W(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=Dn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});Mn(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&Pn(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(St);this._invertedIndex&&Pn(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(U(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return ht(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&ht(n)&&n>0&&U(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new bn(n,u);U(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=U(e)?U(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),yn(d,{ignoreFieldNorm:s}),a&&d.sort(U(e)?u:l),ht(n)&&n>-1&&(d=d.slice(0,n));return Sn(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!W(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=vn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=_n(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===dn.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(W(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!W(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=vn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!W(t))return[];let r=[];if(H(t))t.forEach(({v:t,i,n:a})=>{if(!W(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};K.version=`7.5.0`,K.createIndex=Vt,K.parseIndex=Ht,K.config=G,K.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(Dt);return un(e,{...G,...n}).searchIn(t)}
1,K.parseQuery=_n,ln(sn),ln(On),K.use=function(...e){e.forEach(e=>ln(e))};var Fn=K;function In(e,t,n){let r=()=>new Fn(a(t)??[],a(n)?.fuseOptions),i=k(r());return s(()=>a(n)?.fuseOptions,()=>{i.value=r()},{deep:!0}),s(()=>a(t),e=>{i.value.setCollection(e)},{deep:!0}),{fuse:i,results:v(()=>{let r=a(n);if(r?.matchAllWhenSearchEmpty&&!a(e))return a(t).map((e,t)=>({item:e,refIndex:t}));let o=r?.resultLimit;return i.value.search(a(e),o?{limit:o}:void 0)})}}var Ln={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Rn(e){return e.replace(/[&<>"']/g,e=>Ln[e])}function zn(e){return/&(?:amp|lt|gt|quot|#39);/.test(e)}function Bn(e){return zn(e)?e:Rn(e)}function Vn(e,t){let n=``,r=0,i=!1;for(let a=e.length-1;a>=0;a--){if(e[a]===`>`)i=!0;else if(e[a]===`<`){i=!1,n=e[a]+n;continue}if(i||r++,r<=t)n=e[a]+n;else{n=`...`+n;break}}return n}function Hn(e,t,n,r){function i(e,n=[]){e||=``;let r=``,i=0;n.forEach(n=>{if(n.length===2&&n[0]===n[1])return;let a=n[1]+1,o=a-n[0]>=t.length;r+=[Bn(e.substring(i,n[0])),o&&`<mark>`,Bn(e.substring(n[0],a)),o&&`</mark>`].filter(Boolean).join(``),i=a}),r+=Bn(e.substring(i));let a=r.indexOf(`<mark>`);return a!==-1&&(r=Vn(r,r.length-a)),r}if(e.matches?.length){for(let t of e.matches)if(!(n&&t.key!==n)&&!r?.includes(t.key))return i(t.value,t.indices)}}var Un={slots:{root:`flex flex-col min-h-0 min-w-0 divide-y divide-default`,input:``,close:``,back:`p-0`,content:`relative overflow-hidden flex flex-col`,footer:`p-1`,viewport:`relative scroll-py-1 overflow-y-auto flex-1 focus:outline-none`,group:`p-1 isolate`,empty:`text-center text-muted`,label:`font-semibold text-highlighted`,item:`group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75`,itemLeadingIcon:`shrink-0`,itemLeadingAvatar:`shrink-0`,itemLeadingAvatarSize:``,itemLeadingChip:`shrink-0`,itemLeadingChipSize:``,itemTrailing:`ms-auto inline-flex items-center`,itemTrailingIcon:`shrink-0`,itemTrailingHighlightedIcon:`shrink-0 text-dimmed hidden group-data-highlighted:inline-flex`,itemTrailingKbds:`hidden lg:inline-flex items-center shrink-0`,itemTrailingKbdsSize:``,itemWrapper:`flex-1 flex flex-col text-start min-w-0`,itemLabel:`truncate space-x-1 text-dimmed`,itemDescription:`truncate text-muted`,itemLabelBase:`text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary`,itemLabelPrefix:`text-default`,itemLabelSuffix:`text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary`},variants:{virtualize:{true:{viewport:`p-1 isolate`},false:{viewport:`divide-y divide-default`}},size:{xs:{input:`[&>input]:h-10`,empty:`py-3 text-xs`,label:`p-1 text-[10px]/3 gap-1`,item:`p-1 text-xs gap-1`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailing:`gap-1`,itemTrailingIcon:`size-4`,itemTrailingHighlightedIcon:`size-4`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`sm`},sm:{input:`[&>input]:h-11`,empty:`py-4 text-xs`,label:`p-1.5 text-[10px]/3 gap-1.5`,item:`p-1.5 text-xs gap-1.5`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailing:`gap-1.5`,itemTrailingIcon:`size-4`,itemTrailingHighlightedIcon:`size-4`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`sm`},md:{input:`[&>input]:h-12`,empty:`py-6 text-sm`,label:`p-1.5 text-xs gap-1.5`,item:`p-1.5 text-sm gap-1.5`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailing:`gap-1.5`,itemTrailingIcon:`size-5`,itemTrailingHighlightedIcon:`size-5`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`md`},lg:{input:`[&>input]:h-13`,empty:`py-7 text-sm`,label:`p-2 text-xs gap-2`,item:`p-2 text-sm gap-2`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailing:`gap-2`,itemTrailingIcon:`size-5`,itemTrailingHighlightedIcon:`size-5`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`md`},xl:{input:`[&>input]:h-14`,empty:`py-8 text-base`,label:`p-2 text-sm gap-2`,item:`p-2 text-base gap-2`,itemLeadingIcon:`size-6`,itemLeadingAvatarSize:`xs`,itemLeadingChip:`size-6`,itemLeadingChipSize:`lg`,itemTrailing:`gap-2`,itemTrailingIcon:`size-6`,itemTrailingHighlightedIcon:`size-6`,itemTrailingKbds:`gap-0.5`,itemTrailingKbdsSize:`lg`}},active:{true:{item:`text-highlighted before:bg-elevated`,itemLeadingIcon:`text-default`},false:{item:[`text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50`,`transition-colors before:transition-colors`],itemLeadingIcon:[`text-dimmed group-data-highlighted:not-group-data-disabled:text-default`,`transition-colors`]}},loading:{true:{itemLeadingIcon:`animate-spin`}}},defaultVariants:{size:`md`}},Wn=[`innerHTML`],Gn=[`innerHTML`],Kn=Object.assign({inheritAttrs:!1},{__name:`UCommandPalette`,props:n({as:{type:null,required:!1},size:{type:null,required:!1},icon:{type:null,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},childrenIcon:{type:null,required:!1},placeholder:{type:String,required:!1},autofocus:{type:Boolean,required:!1,default:!0},close:{type:[Boolean,Object],required:!1},closeIcon:{type:null,required:!1},back:{type:[Boolean,Object],required:!1,default:!0},backIcon:{type:null,required:!1}
1,input:{type:[Boolean,Object],required:!1,default:!0},groups:{type:Array,required:!1},fuse:{type:Object,required:!1},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:`label`},descriptionKey:{type:null,required:!1,default:`description`},preserveGroupOrder:{type:Boolean,required:!1,default:!1},searchDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},multiple:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},selectionBehavior:{type:String,required:!1},by:{type:[String,Function],required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:``},searchTermModifiers:{}}),emits:n([`update:modelValue`,`highlight`,`entryFocus`,`leave`,`update:open`],[`update:searchTerm`]),setup(e,{emit:t}){let n=e,a=t,s=c(),f=o(e,`searchTerm`,{type:String,default:``}),{t:g}=We(),y=me(),b=Pe(`commandPalette`,n),x=Fe(Me(n,`as`,`disabled`,`multiple`,`modelValue`,`defaultValue`,`highlightOnHover`,`by`),a),ee=re(()=>n.virtualize?se(typeof n.virtualize==`boolean`?{}:n.virtualize,{estimateSize:Se(de.value,`md`,n.descriptionKey,!!s[`item-description`])}):!1),[te,O]=Be({props:{item:{type:Object,required:!0},group:{type:Object,required:!1},index:{type:Number,required:!1}}}),k=v(()=>Ne({extend:Ne(Un),...y.ui?.commandPalette||{}})({size:n.size,virtualize:!!n.virtualize})),ie=v(()=>se({},n.fuse,{fuseOptions:{ignoreLocation:!0,threshold:.1,keys:[n.labelKey,`suffix`]},resultLimit:12,matchAllWhenSearchEmpty:!0})),M=D([]),ae=v(()=>M.value[M.value.length-1]?.placeholder||n.placeholder||g(`commandPalette.placeholder`)),oe=v(()=>M.value?.length?[M.value[M.value.length-1]]:n.groups),ce=v(()=>oe.value?.filter(e=>e.id?!e.ignoreFilter:(console.warn("[@nuxt/ui] CommandPalette group is missing an `id` property"),!1))?.flatMap(e=>e.items?.map(t=>({...t,group:e.id}))||[])||[]),P=je(f,()=>n.searchDelay),{results:le}=In(P,ce,ie),F=Oe(le,16,!0);function ue(e,t){let r=t;return e?.postFilter&&typeof e.postFilter==`function`&&(r=e.postFilter(P.value,r)),{...e,items:r.slice(0,ie.value.resultLimit).map(e=>({...e,labelHtml:Hn(e,P.value,n.labelKey),suffixHtml:Hn(e,P.value,void 0,[n.labelKey])}))}}let I=v(()=>{let e=oe.value,t=F.value.reduce((e,t)=>{let{item:n,matches:r}=t;return n.group?(e[n.group]||=[],e[n.group]?.push({...n,matches:r}),e):e},{});if(n.preserveGroupOrder){let n=[];for(let r of e||[]){if(!r.items?.length)continue;let e=r.ignoreFilter?r.items:t[r.id];if(!e?.length)continue;let i=ue(r,e);i.items?.length&&n.push(i)}return n}let r=Object.entries(t).map(([t,n])=>{let r=e?.find(e=>e.id===t);if(!r)return;let i=ue(r,n);return i.items?.length?i:void 0}).filter(e=>!!e);return(e?.map((e,t)=>({...e,index:t}))?.filter(e=>e.ignoreFilter&&e.items?.length)?.map(e=>({...ue(e,e.items||[]),index:e.index}))?.filter(e=>e.items?.length)||[]).reduce((e,t)=>(e.splice(t.index,0,t),e),[...r])}),de=v(()=>I.value.flatMap(e=>e.items||[])),fe=d(`rootRef`);function pe(e){e.children?.length&&(M.value.push({id:`history-${M.value.length}`,label:e.label,slot:e.slot,placeholder:e.placeholder,items:e.children}),f.value=``,fe.value?.highlightFirstItem())}function L(){M.value.length&&(M.value.pop(),f.value=``,fe.value?.highlightFirstItem())}function R(){f.value||L()}function he(e,t){t.children?.length?(e.preventDefault(),pe(t)):t.onSelect?.(e)}return(t,o)=>(S(),m(w,null,[r(l(te),null,{default:T(({item:a,index:o,group:c})=>[r(Ue,_(l(He)(a),{custom:``}),{default:T(({active:d,...f})=>[r(l(ve),{value:n.valueKey?l(z)(a,n.valueKey):l(ke)(a,[`matches`,`group`,`onSelect`,`labelHtml`,`suffixHtml`,`children`]),disabled:a.disabled,"as-child":``,onSelect:e=>he(e,a)},{default:T(()=>[r(Ve,_(f,{"data-slot":`item`,class:k.value.item({class:[l(b)?.item,a.ui?.item,a.class],active:d||a.active})}),{default:T(()=>[A(t.$slots,a.slot||c?.slot||`item`,{item:a,index:o,ui:k.value},()=>[A(t.$slots,a.slot?`${a.slot}-leading`:c?.slot?`${c.slot}-leading`:`item-leading`,{item:a,index:o,ui:k.value},()=>[a.loading?(S(),E(B,{key:0,name:e.loadingIcon||l(y).ui.icons.loading,"data-slot":`itemLeadingIcon`,class:u(k.value.itemLeadingIcon({class:[l(b)?.itemLeadingIcon,a.ui?.itemLeadingIcon],loading:!0}))},null,8,[`name`,`class`])):a.icon?(S(),E(B,{key:1,name:a.icon,"data-slot":`itemLeadingIcon`,class:u(k.value.itemLeadingIcon({class:[l(b)?.itemLeadingIcon,a.ui?.itemLeadingIcon],active:d||a.active}))},null,8,[`name`,`class`])):a.avatar?(S(),E(Ke,_({key:2,size:a.ui?.itemLeadingAvatarSize||l(b)?.itemLeadingAvatarSize||k.value.itemLeadingAvatarSize()},a.avatar,{"data-slot":`itemLeadingAvatar`,class:k.value.itemLeadingAvatar({class:[l(b)?.itemLeadingAvatar,a.ui?.itemLeadingAvatar],active:d||a.active})}),null,16,[`size`,`class`])):a.chip?(S(),E(Ge,_({key:3,size:a.ui?.itemLeadingChipSize||l(b)?.itemLeadingChipSize||k.value.itemLeadingChipSize(),inset:``,standalone:``},a.chip,{"data-slot":`itemLeadingChip`,class:k.value.itemLeadingChip({class:[l(b)?.itemLeadingChip,a.ui?.itemLeadingChip],active:d||a.active})}),null,16,[`size`,`class`])):j(``,!0)]),a.prefix||a.labelHtml||l(z)(a,n.labelKey)||a.suffixHtml||a.suffix||s[a.slot?`${a.slot}-label`:c?.slot?`${c.slot}-label`:`item-label`]||l(z)(a,n.descriptionKey)||s[a.slot?`${a.slot}-description`:c?.slot?`${c.slot}-description`:`item-description`]?(S(),m(`span`,{key:0,"data-slot":`itemWrapper`,class:u(k.value.itemWrapper({class:[l(b)?.itemWrapper,a.ui?.itemWrapper]}))},[p(`span`,{"data-slot":`itemLabel`,class:u(k.value.itemLabel({class:[l(b)?.itemLabel,a.ui?.itemLabel],active:d||a.active}))},[A(t.$slots,a.slot?`${a.slot}-label`:c?.slot?`${c.slot}-label`:`item-label`,{item:a,index:o,ui:k.value},()=>[a.prefix?(S(),m(`span`,{key:0,"data-slot":`itemLabelPrefix`,class:u(k.value.itemLabelPrefix({class:[l(b)?.itemLabelPrefix,a.ui?.itemLabelPrefix]}))},C(a.prefix),3)):j(``,!0),a.labelHtml?(S(),m(`span`,{key:1,"data-slot":`itemLabelBase`,class:u(k.value.itemLabelBase({class:[l(b)?.itemLabelBase,a.ui?.itemLabelBase],active:d||a.active})),innerHTML:a.labelHtml},null,10,Wn)):(S(),m(`span`,{key:2,"data-slot":`itemLabelBase`,class:u(k.value.itemLabelBase({class:[l(b)?.itemLabelBase,a.ui?.itemLabelBase],active:d||a.active}))},C(l(z)(a,n.labelKey)),3)),a.suffixHtml?(S(),m(`span`,{key:3,"data-slot":`itemLabelSuffix`,class:u(k.value.itemLabelSuffix({class:[l(b)?.itemLabelSuffix,a.ui?.itemLabelSuffix],active:d||a.active})),innerHTML:a.suffixHtml},null,10,Gn)):a.suffix?(S(),m(`span`,{key:4,"data-slot":`itemLabelSuffix`,class:u(k.value.itemLabelSuffix({class:[l(b)?.itemLabelSuffix,a.ui?.itemLabelSuffix],active:d||a.active}))},C(a.suffix),3)):j(``,!0)])],2),l(z)(a,n.descriptionKey)||s[a.slot?`${a.slot}-description`:c?.slot?`${c.slot}-description`:`item-description`]?(S(),m(`span`,{key:0,"data-slot":`itemDescription`,class:u(k.value.itemDescription({class:[l(b)?.itemDescription,a.ui?.itemDescription]}))},[A(t.$slots,a.slot?`${a.slot}-description`:c?.slot?`${c.slot}-description`:`item-description`,{item:a,index:o,ui:k.value},()=>[i(C(l(z)(a,n.descriptionKey)),1)])],2)):j(``,!0)],2)):j(``,!0),p(`span`,{"data-slot":`itemTrailing`,class:u(k.value.itemTrailing({class:[l(b)?.itemTrailing,a.ui?.itemTrailing]}))},[A(t.$slots,a.slot?`${a.slot}-trailing`:c?.slot?`${c.slot}-trailing`:`item-trailing`,{item:a,index:o,ui:k.value},()=>[a.children&&a.children.length>0?(S(),E(B,{key:0,name:e.childrenIcon||l(y).ui.icons.chevronRight,"data-slot":`itemTrailingIcon`,class:u(k.value.itemTrailingIcon({class:[l(b)?.itemTrailingIcon,a.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])):a.kbds?.length?(S(),m(`span`,{key:1,"data-slot":`itemTrailingKbds`,class:u(k.value.itemTrailingKbds({class:[l(b)?.itemTrailingKbds,a.ui?.itemTrailingKbds]}))},[(S(!0),m(w,null,h(a.kbds,(e,t)=>(S(),E(Ie,_({key:t,size:a.ui?.itemTrailingKbdsSize||l(b)?.itemTrailingKbdsSize||k.value.itemTrailingKbdsSize()},{ref_for:!0},typeof e==`string`?{value:e}:e),null,16,[`size`]))),128))],2)):c?.highlightedIcon?(S(),E(B,{key:2,name:c.highlightedIcon,"data-slot":`itemTrailingHighlightedIcon`,class:u(k.value.itemTrailingHighlightedIcon({class:[l(b)?.itemTrailingHighlightedIcon,a.ui?.itemTrailingHighlightedIcon]}))},null,8,[`name`,`class`])):j(``,!0)]),a.children?.length?j(``,!0):(S(),E(l(be),{key:0,"as-child":``},{default:T(()=>[r(B,{name:e.selectedIcon||l(y).ui.icons.check,"data-slot":`itemTrailingIcon`,class:u(k.value.itemTrailingIcon({class:[l(b)?.itemTrailingIcon,a.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])]),_:2},1024))],2)])]),_:2},1040,[`class`])]),_:2},1032,[`value`,`disabled`,`onSelect`])]),_:2},1040)]),_:3}),r(l(De),_({...l(x),...t.$attrs},{ref_key:`rootRef`,ref:fe,"selection-behavior":e.selectionBehavior,"data-slot":`root`,class:k.value.root({class:[l(b)?.root,n.class]})}),{default:T(()=>
1[e.input?(S(),E(l(ye),{key:0,modelValue:f.value,"onUpdate:modelValue":o[1]||=e=>f.value=e,"as-child":``},{default:T(()=>[r(Ye,_({variant:`none`,size:e.size},typeof n.input==`object`?n.input:{},{placeholder:ae.value,autofocus:e.autofocus,loading:e.loading,"loading-icon":e.loadingIcon,"trailing-icon":e.trailingIcon,icon:e.icon||l(y).ui.icons.search,"data-slot":`input`,class:k.value.input({class:l(b)?.input}),onKeydown:N(R,[`backspace`])}),ne({_:2},[M.value?.length&&(e.back||s.back)?{name:`leading`,fn:T(()=>[A(t.$slots,`back`,{ui:k.value},()=>[r(V,_({size:e.size,icon:e.backIcon||l(y).ui.icons.arrowLeft,color:`neutral`,variant:`link`,"aria-label":l(g)(`commandPalette.back`)},typeof e.back==`object`?e.back:{},{"data-slot":`back`,class:k.value.back({class:l(b)?.back}),onClick:L}),null,16,[`size`,`icon`,`aria-label`,`class`])])]),key:`0`}:void 0,e.close||s.close?{name:`trailing`,fn:T(()=>[A(t.$slots,`close`,{ui:k.value},()=>[e.close?(S(),E(V,_({key:0,size:e.size,icon:e.closeIcon||l(y).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":l(g)(`commandPalette.close`)},typeof e.close==`object`?e.close:{},{"data-slot":`close`,class:k.value.close({class:l(b)?.close}),onClick:o[0]||=e=>a(`update:open`,!1)}),null,16,[`size`,`icon`,`aria-label`,`class`])):j(``,!0)])]),key:`1`}:void 0]),1040,[`size`,`placeholder`,`autofocus`,`loading`,`loading-icon`,`trailing-icon`,`icon`,`class`])]),_:3},8,[`modelValue`])):j(``,!0),r(l(xe),{"data-slot":`content`,class:u(k.value.content({class:l(b)?.content}))},{default:T(()=>[I.value?.length?(S(),m(`div`,{key:0,role:`presentation`,"data-slot":`viewport`,class:u(k.value.viewport({class:l(b)?.viewport}))},[e.virtualize?(S(),E(l(we),_({key:0,options:de.value,"text-content":e=>l(z)(e,n.labelKey)},ee.value),{default:T(({option:e,virtualItem:t})=>[r(l(O),{item:e,index:t.index},null,8,[`item`,`index`])]),_:1},16,[`options`,`text-content`])):(S(!0),m(w,{key:1},h(I.value,e=>(S(),E(l(Ce),{key:`group-${e.id}`,"data-slot":`group`,class:u(k.value.group({class:l(b)?.group}))},{default:T(()=>[l(z)(e,n.labelKey)||s[e.slot?`${e.slot}-group-label`:`group-label`]?(S(),E(l(ft),{key:0,"data-slot":`label`,class:u(k.value.label({class:l(b)?.label}))},{default:T(()=>[A(t.$slots,e.slot?`${e.slot}-group-label`:`group-label`,{group:e,label:l(z)(e,n.labelKey),ui:k.value},()=>[i(C(l(z)(e,n.labelKey)),1)])]),_:2},1032,[`class`])):j(``,!0),(S(!0),m(w,null,h(e.items,(t,n)=>(S(),E(l(O),{key:`group-${e.id}-${n}`,item:t,index:n,group:e},null,8,[`item`,`index`,`group`]))),128))]),_:2},1032,[`class`]))),128))],2)):(S(),m(`div`,{key:1,"data-slot":`empty`,class:u(k.value.empty({class:l(b)?.empty}))},[A(t.$slots,`empty`,{searchTerm:f.value},()=>[i(C(f.value?l(g)(`commandPalette.noMatch`,{searchTerm:f.value}):l(g)(`commandPalette.noData`)),1)])],2))]),_:3},8,[`class`]),s.footer?(S(),m(`div`,{key:1,"data-slot":`footer`,class:u(k.value.footer({class:l(b)?.footer}))},[A(t.$slots,`footer`,{ui:k.value})],2)):j(``,!0)]),_:3},16,[`selection-behavior`,`class`])],64))}}),qn={"data-testid":`universal-search`,class:`flex items-center gap-1`},Jn={class:`flex items-center justify-between border-t border-default bg-elevated/50 px-3 py-2 text-xs text-muted`},Yn=`w-auto inline-flex before:rounded-full`,Xn=Object.assign(x({__name:`SmartSearch`,setup(e){let t=ce(),n=_e(),a=nt(),{organisations:o}=F(n),c=D(!1),u=D(``),d=D([]),f=v(()=>u.value.length>0),h=v(()=>{if(!f.value)return[];let e=u.value;return[{id:`ask-usmart-discovery`,label:`Ask uSmart Discovery about "${e}"`,description:`Get a written summary of what's available`,icon:`i-lucide-sparkles`,kbds:[`enter`],click:()=>a.runSmartSearch(e)}]}),g=v(()=>(o.value?.result||[]).filter(e=>e.organisationGUID).map(e=>({id:e.slug,label:e.name,avatar:{src:e.logoReference,loading:`lazy`},to:`/organisation/${e.slug}`}))),_=[{id:`cyclingMonitoringDashboard`,label:`Cycling Monitoring Dashboard`,description:`A real-time cycling monitoring dashboard...`,icon:`i-heroicons-window`,href:`https://usmart.io/org/cyclingscotland/`}],y=D([]),b=D(0),x=D(!1),w=$e(async e=>{if(!e){y.value=[],b.value=0;return}x.value=!0;let t=await n.fetchDatasets(``,``,[],[],e,[],5,1,`public`,!0);x.value=!1,t&&(y.value=t.result??[],b.value=t.metadata?.totalCount??0)},500);s(u,e=>w(e));let E=v(()=>y.value.map(e=>{let t=n.getOrganisationInfo(`organisationGUID`,e.organisationGUID,`slug`);
1return{id:e.datasetGUID,label:e.title,description:n.getOrganisationName(e.organisationGUID)||`Unknown Organisation`,icon:`i-heroicons-circle-stack`,to:t?`/organisation/${t}/discovery/${e.datasetGUID}`:`/discovery?keywords=${encodeURIComponent(e.title)}`}}));function re(e){t.push(e),c.value=!1}let O=[{id:`browse-datasets`,slot:`browse`,label:`Datasets`,class:Yn,click:()=>re(`/discovery`)},{id:`browse-organisations`,slot:`browse`,label:`Organisations`,class:Yn,click:()=>re(`/discovery/organisations`)},{id:`browse-apps`,slot:`browse`,label:`Apps`,class:Yn,click:()=>re(`/discovery/apps`)}],k=v(()=>[{id:`ask`,items:h.value,ignoreFilter:!0},{id:`recent`,label:`Recent`,items:f.value?[]:d.value},{id:`datasets`,label:`Datasets`,items:E.value,ignoreFilter:!0},{id:`organisations`,label:`Organisations`,items:f.value?g.value:[]},{id:`apps`,label:`Apps`,items:f.value?_:[]},{id:`actions`,label:`Browse`,items:f.value?[]:O}].filter(e=>e.items.length>0));function A(e){if(e){if(!new Set([h.value[0]?.id,...O.map(e=>e.id)]).has(e.id)){let t=d.value.findIndex(t=>t.id===e.id||t.label===e.label);t!==-1&&d.value.splice(t,1),d.value.unshift(e),d.value.length>5&&d.value.pop()}e.click?e.click():e.to?t.push(e.to):e.href&&window.open(e.href,`_blank`),ee(()=>{c.value=!1}),u.value=``}}return(e,t)=>{let n=V,a=Ue,o=Kn,s=Ze;return S(),m(`div`,qn,[r(s,{open:l(c),"onUpdate:open":t[2]||=e=>te(c)?c.value=e:null},{content:T(()=>[r(o,{"search-term":l(u),"onUpdate:searchTerm":t[1]||=e=>te(u)?u.value=e:null,placeholder:`Search for datasets, organisations, and apps`,groups:l(k),loading:l(x),"onUpdate:modelValue":A},ne({browse:T(({item:e})=>[r(n,{as:`span`,"data-testid":e.id,size:`xs`,variant:`soft`,class:`rounded-full`,onClick:M(e.click,[`stop`])},{default:T(()=>[i(C(e.label),1)]),_:2},1032,[`data-testid`,`onClick`])]),_:2},[l(f)&&l(b)>0?{name:`footer`,fn:T(()=>[p(`div`,Jn,[p(`span`,null,C(l(b))+` result`+C(l(b)===1?``:`s`),1),r(a,{to:`/discovery?keywords=${encodeURIComponent(l(u))}`,class:`font-medium text-primary hover:underline`,onClick:t[0]||=e=>c.value=!1},{default:T(()=>[...t[4]||=[i(` See all in Discovery `,-1)]]),_:1},8,[`to`])])]),key:`0`}:void 0]),1032,[`search-term`,`groups`,`loading`])]),default:T(()=>[r(n,{icon:`i-lucide-sparkles`,variant:`soft`,color:`info`,class:`rounded-full`,"aria-label":`Ask uSmart`},{default:T(()=>[...t[3]||=[p(`span`,{class:`hidden sm:inline`},`Ask uSmart`,-1)]]),_:1})]),_:1},8,[`open`])])}}}),{__name:`SmartSearch`}),Zn={class:`flex flex-col`},Qn={__name:`FListBox`,props:n({modelValue:{type:null,required:!1},items:{type:Array,required:!0},labelKey:{type:[String,Number,Symbol],required:!1,default:`label`},valueKey:{type:[String,Number,Symbol],required:!1,default:`value`},leadingIconKey:{type:[String,Number,Symbol],required:!1,default:`leadingIcon`},trailingIconKey:{type:[String,Number,Symbol],required:!1,default:`trailingIcon`},deselectable:{type:Boolean,required:!1},size:{type:null,required:!1,default:`sm`}},{modelValue:{type:null},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=o(e,`modelValue`),n=e,r=e=>{n.deselectable&&t?.value===e?t.value=null:t.value=e},a=e=>t?.value===e,s=e=>e[n.labelKey],c=e=>n.leadingIconKey?e[n.leadingIconKey]:void 0,l=e=>n.trailingIconKey?e[n.trailingIconKey]:void 0;return(e,t)=>{let o=V;return S(),m(`div`,Zn,[(S(!0),m(w,null,h(n.items,e=>(S(),E(o,{key:String(e[n.valueKey]),onClick:t=>r(e),"leading-icon":c(e),"trailing-icon":l(e),class:u(`font-normal p-2 ${a(e)?`font-bold text-highlighted transform transition-colors duration-200`:``}`),variant:`ghost`,size:n.size},{default:T(()=>[i(C(s(e)),1)]),_:2},1032,[`onClick`,`leading-icon`,`trailing-icon`,`class`,`size`]))),128))])}}},$n={slots:{root:`inline-flex flex-row-reverse justify-end`,base:`relative rounded-full ring-bg first:me-0`},variants:{size:{"3xs":{base:`ring -me-0.5`},"2xs":{base:`ring -me-0.5`},xs:{base:`ring -me-0.5`},sm:{base:`ring-2 -me-1.5`},md:{base:`ring-2 -me-1.5`},lg:{base:`ring-2 -me-1.5`},xl:{base:`ring-3 -me-2`},"2xl":{base:`ring-3 -me-2`},"3xl":{base:`ring-3 -me-2`}}},defaultVariants:{size:`md`}},er={__name:`UAvatarGroup`,props:{as:{type:null,required:!1},size:{type:null,required:!1},max:{type:[Number,String],required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(e){let t=e,n=c(),r=me(),i=Pe(`avatarGroup`,t),a=v(()=>Ne({extend:Ne($n),...r.ui?.avatarGroup||{}})({size:t.size})),o=v(()=>typeof t.max==`string`?Number.parseInt(t.max,10):t.max),s=v(()=>{let e=n.default?.();return e?.length&&(e=e.flatMap(e=>typeof e.type==`symbol`?typeof e.children==`string`?void 0:e.children:e).filter(
1Boolean)),e||[]}),d=v(()=>s.value.length?!o.value||o.value<=0?[...s.value].reverse():[...s.value].slice(0,o.value).reverse():[]),f=v(()=>s.value.length?s.value.length-d.value.length:0);return b(qe,v(()=>({size:t.size}))),(n,r)=>(S(),E(l(Ae),{as:e.as,"data-slot":`root`,class:u(a.value.root({class:[l(i)?.root,t.class]}))},{default:T(()=>[f.value>0?(S(),E(Ke,{key:0,text:`+${f.value}`,"data-slot":`base`,class:u(a.value.base({class:l(i)?.base}))},null,8,[`text`,`class`])):j(``,!0),(S(!0),m(w,null,h(d.value,(e,t)=>(S(),E(O(e),{key:t,"data-slot":`base`,class:u(a.value.base({class:l(i)?.base}))},null,8,[`class`]))),128))]),_:1},8,[`as`,`class`]))}},tr={"data-testid":`user-popover`},nr={key:0,class:`header border-default`},rr={class:`flex items-center px-3 gap-2 mt-2 box-border min-w-0`},ir={class:`user`},ar={class:`name`},or={class:`email text-muted`},sr={key:1,class:`flex items-center gap-2 px-3 py-2 rounded-md bg-muted`},cr={class:`text-sm text-highlighted org-label`},lr={key:1,class:`flex items-center gap-2 px-3 py-2 rounded-md bg-muted`},ur=Qe({__name:`FUserPopover`,props:{user:Object,extraMenuItems:{type:Array,default:()=>[]}},emits:[`handleSignOut`],setup(e,{emit:t}){let{setActiveOrganisation:n,organisations:i,activeOrganisation:a}=he(),o=e,c=t,l=D(!1),u=D(null),d=ue(),f=v(()=>{let e=[];
1if(o.extraMenuItems?.length){let t=o.extraMenuItems;e.push(...Array.isArray(t[0])?t:[t])}return e.push([{label:`Logout`,icon:`i-heroicons-arrow-right-start-on-rectangle-16-solid`,onSelect:()=>c(`handleSignOut`)}]),e}),h=v(()=>{let e=o.user?.organisations?.map(e=>e.organisationGUID)??[];if(e.length===0){u.value=null,n(void 0);try{y.value&&=null}catch(e){console.warn(`Failed to clear organisation cookie:`,e)}}return e}),g=v(()=>i.value?.filter(e=>h.value.includes(e.organisationGUID)).map(e=>({label:e.name,value:e,avatar:{src:e.logoReference}}))??[]),_=v(()=>g.value.find(e=>a.value&&e.value.organisationGUID===a.value.organisationGUID)),y=de(`lastActiveOrganisation`),b=D(!1);s(g,e=>{if(b.value||e===void 0)return;let t=y?.value;if(t&&e.length>0){let r=e.find(e=>e.value.organisationGUID===t);if(r){u.value=r,n(r.value),b.value=!0;return}}if(_.value){u.value=_.value,b.value=!0;return}if(e&&e.length>0){u.value=e[0];try{n(e[0].value)}catch(e){console.error(`Failed to set active organisation on init:`,e)}b.value=!0}},{immediate:!0});let x=e=>{d.add({title:`You switched to ${e.name}`}),l.value=!1,n(e)};return s(u,(e,t)=>{t&&e?.value.organisationGUID!==t?.value.organisationGUID&&x(e.value)}),(t,n)=>{let i=Ke,a=Le,o=er,s=V,c=Ee,d=B,h=it;return S(),m(`div`,tr,[r(h,{open:l.value,"onUpdate:open":n[3]||=e=>l.value=e,items:f.value,modal:!1,content:{align:`end`,side:`bottom`,sideOffset:8},ui:{content:`w-60! min-w-60! max-w-60!`}},{"content-top":T(({sub:t})=>[t?j(``,!0):(S(),m(`div`,nr,[p(`div`,rr,[p(`div`,null,[r(i,{size:`md`,alt:e.user.givenName+` `+e.user.familyName},null,8,[`alt`])]),p(`div`,ir,[p(`div`,ar,C(e.user.givenName+` `+e.user.familyName),1),r(a,{text:e.user.email},{default:T(()=>[p(`div`,or,C(e.user.email),1)]),_:1},8,[`text`])])]),p(`div`,{class:`org`,onKeydown:n[1]||=M(()=>{},[`stop`]),onPointerdown:n[2]||=M(()=>{},[`stop`])},[g.value.length>0?(S(),m(w,{key:0},[g.value.length>1?(S(),E(c,{key:0,modelValue:u.value,"onUpdate:modelValue":n[0]||=e=>u.value=e,items:g.value,avatar:u.value?.avatar,class:`w-full`,ui:{container:`max-h-[220px] overflow-auto`,item:`org-item-label`}},null,8,[`modelValue`,`items`,`avatar`])):(S(),m(`div`,sr,[u.value?.avatar?(S(),E(i,{key:0,src:u.value.avatar.src,alt:u.value.label,size:`xs`},null,8,[`src`,`alt`])):j(``,!0),p(`span`,cr,C(u.value?.label),1)]))],64)):(S(),m(`div`,lr,[r(d,{name:`i-heroicons-information-circle`,class:`text-dimmed`}),n[4]||=p(`span`,{class:`text-sm text-muted`},` No organizations available `,-1)]))],32)]))]),default:T(()=>[r(s,{variant:`link`},{default:T(()=>[r(o,{ui:{root:`items-start flex-row`}},{default:T(()=>[u.value?(S(),E(a,{key:0,class:`rounded-full`,text:u.value.label},{default:T(()=>[r(i,{size:`xs`,src:u.value.avatar.src,alt:u.value.label},null,8,[`src`,`alt`])]),_:1},8,[`text`])):j(``,!0),r(i,{size:`md`,alt:e.user.givenName+` `+e.user.familyName},null,8,[`alt`])]),_:1})]),_:1})]),_:1},8,[`open`,`items`])])}}},[[`__scopeId`,`data-v-9ad3207e`]]),dr={__name:`FSubNav`,props:{items:{type:Array,required:!0},overlay:{type:Boolean,required:!1}},setup(e){return(t,n)=>{let r=Ue;return S(),m(`div`,{class:u([`subnav-container z-10 flex items-center w-full justify-center gap-4 h-8 border-b border-default`,e.overlay?`bg-default/80 backdrop-blur-md`:`bg-default`,e.overlay?``:`sticky top-20`]),"data-testid":`subnav-container`},[(S(!0),m(w,null,h(e.items,e=>(S(),E(r,{key:e.path,to:e.path,active:e.active,"active-class":`font-bold text-sm cursor-default`,"inactive-class":`text-muted hover:text-default text-sm`},{default:T(()=>[i(C(e.name),1)]),_:2},1032,[`to`,`active`]))),128))],2)}}},fr={class:`relative overflow-visible`},pr={class:`header bg-default border-b border-default`,"data-testid":`app-header`},mr={class:`left-nav`},hr={key:0,class:`mobile-nav-btn-container`},gr=[`src`],_r=[`src`],vr={class:`center-nav`},yr={key:0,class:`central-nav`,"data-testid":`desktop-nav-links`},br={class:`p-2`},xr={class:`right-nav`},Sr={key:0,class:`w-8 h-8 rounded-full bg-accented animate-pulse`},Cr={class:`mobile-nav-content-container`,"data-testid":`mobile-slideover`},wr={class:`mobile-nav-links-list`},Tr={key:0,class:`flex flex-col`},Er=Qe({__name:`FHeader`,props:{links:{type:Array,required:!1},logoAsset:{type:String,required:!0},darkLogoAsset:{type:String,required:!1},registerRedirectUrl:{type:String,required:!0},signInRedirectUrl:{type:String,required:!0},homeUrl:{type:String,required:!1},extraMenuItems:{type:Array,required:!1}},emits:[`sign-out`],setup(n,{emit:a}
1){let{setUser:o,setorganisations:c,setActiveOrganisation:d,setLoading:f,authState:_,user:b,session:x,organisations:C,activeOrganisation:te,loading:ne}=he(),re=e(),O=re.$checkAuthStatus,k=re.$signOut,M=t(),N=n,ae=ot(),se=v(()=>ae.value===`dark`&&N.darkLogoAsset?N.darkLogoAsset:N.logoAsset),ce=a,le=oe(),F=v(()=>le.path),ue=v(()=>N.homeUrl||`/`),I=e=>e.children?.length?e.children.some(e=>F.value===e.to||F.value.startsWith(e.to+`/`)):!!e.to&&(F.value===e.to||F.value.startsWith(e.to+`/`)),fe=e=>e.to&&e.to===F.value?!0:`children`in e&&e.children?.length?e.children.some(e=>e.to===F.value):!1,pe=v(()=>{if(!N.links)return null;for(let e of N.links){if(!e.children?.length&&e.to&&e.to===F.value)return e;if(e.children?.length){let t=e.children.find(e=>e.to===F.value);if(t)return t}}return null}),L=D(null),me=D(!1),R=y({}),ge=D(null),_e=v(()=>L.value?I(L.value):!1),ve=v(()=>L.value?.children?L.value.children.map(e=>({name:e.label,path:e.to,active:e.to===F.value})):[]),ye=()=>{if(me.value)return;let e=N.links?.find(e=>e.childMode===`subnav`&&e.children?.length&&I(e));e&&!L.value&&(L.value=e)};s(F,e=>{L.value&&(L.value.children?.some(t=>e===t.to||e.startsWith(t.to+`/`))||(L.value=null)),ee(()=>ye())}),s(()=>N.links,ye,{immediate:!0});let be=e=>e.childMode===`subnav`&&I(e),xe=e=>fe(e)&&!(e.childMode===`subnav`&&I(e)),Se=e=>e.childMode===`subnav`&&L.value?.label===e.label,Ce=e=>{e.childMode===`subnav`&&L.value&&(_e.value||setTimeout(()=>{_e.value||ge.value?.contains(document.activeElement)||(L.value=null)},100))},we=(e,t)=>{t.childMode===`listbox`&&(me.value=e,e||setTimeout(()=>{me.value=!1,ye()},50))},Te=e=>{if(e){if(`children`in e&&e.children?.length){e.childMode===`subnav`?L.value?.label===e.label?I(e)||(L.value=null):L.value=e:_e.value||(L.value=null);return}if(`to`in e&&e.to){for(let e of Object.keys(R))R[e]=!1;L.value=null,P(e.to)}}},Ee=D(!1),De=D(new Set),Oe=()=>{let e=new Set;for(let t of N.links??[])t.children?.length&&I(t)&&e.add(t.label);De.value=e},z=e=>{Ee.value=e,e&&Oe()},ke=e=>!!e.children?.length&&I(e),Ae=e=>{if(!e.children?.length||ke(e))return;let t=new Set(De.value);t.has(e.label)?t.delete(e.label):t.add(e.label),De.value=t},je=e=>{!e.children?.length&&e.to&&(P(e.to),z(!1))},Me=e=>{P(e.to),z(!1)},Ne=async()=>{let e=N.registerRedirectUrl;await P(e,{external:e.startsWith(`http`)})},Pe=async()=>{let e=N.signInRedirectUrl;await P(e,{external:e.startsWith(`http`)})},Fe=async()=>{try{k&&await k()}catch(e){console.error(`Sign out failed:`,e)}ce(`sign-out`);try{O&&await O()}catch(e){console.error(`Failed to sync auth state after sign out:`,e)}},Ie=async()=>{if(!M.public.AUTH_URL){console.warn(`AUTH_URL not configured`);return}try{if(!x.value||!x.value.tokens){console.info(`No tokens available`);return}let e={Authorization:x.value.tokens.accessToken??``},t=await $fetch(`${M.public.AUTH_URL}/user/get`,{headers:e});o(t)}catch(e){console.error(`Failed to fetch user:`,e)}};async function Le(){try{if(!x.value?.tokens?.accessToken)return;let e={Authorization:x.value.tokens.accessToken},{result:t}=await $fetch(`${M.public.AUTH_URL}/organisation/list`,{headers:e});c(t)}catch(e){console.error(`Failed to fetch organisation list:`,e)}}s(_,async e=>{e===`authenticated`&&Ie()},{immediate:!1}),s(b,async e=>{e&&Le()});let Re=de(`lastActiveOrganisation`,{domain:M.public.COOKIE_DOMAIN,path:`/`,maxAge:2592e3}),ze=()=>{try{let e=Re.value;return e&&C.value?C.value.find(t=>t.organisationGUID===e)??null:null}catch(e){return console.warn(`Error retrieving stored organisation:`,e),null}};return s(C,e=>{if(e){let t=ze();d(t??e[0])}}),s(te,e=>{e&&(Re.value=e.organisationGUID.toString())}),g(async()=>{ye();try{O?await O():f(!1)}catch(e){console.error(`Failed to check auth status:`,e),f(!1)}}),(e,t)=>{let a=V,o=Ue,s=B,c=Qn,d=rt,f=ur,g=dr,v=at;return S(),m(w,null,[p(`div`,fr,[p(`div`,pr,[p(`div`,mr,[n.links?(S(),m(`div`,hr,[Ee.value?j(``,!0):(S(),E(a,{key:0,"data-testid":`mobile-hamburger`,icon:`i-heroicons-bars-3-16-solid`,onClick:t[0]||=e=>z(!0),size:`sm`,color:`primary`,square:``,variant:`ghost`,class:`mobile-nav-btn`})),Ee.value?(S(),E(a,{key:1,"data-testid":`mobile-hamburger-close`,icon:`i-heroicons-x-mark-solid`,size:`sm`,color:`primary`,square:``,variant:`ghost`,class:`mobile-nav-btn`,onClick:t[1]||=e=>z(!1)})):j(``,!0)])):j(``,!0),r(o,{to:ue.value,class:`logo-link`},{default:T(()=>[p(`img`,{src:se.value,"data-testid":`logo-desktop`,class:`logo-desktop`,alt:`Logo`},null,8,gr),p(`img`,{src:se.value,"data-testid":`logo-mobile`,class:`logo-mobile`,alt:`Logo`},null,8,_r)]),_:1},8,[`to`]),A(e.$slots,`left-nav`,{},void 0,!0)]),p(`div`,vr,[A(e.$slots,`links`,{},()=>[n.links?(S(),m(`div`,yr,[(S(!0),m(w,null,h(n.links,(e,t)=>(S(),m(w,{key:`header-nav-${t}`},[e.children?.length&&e.childMode===`listbox`?(S(),E(d,{key:0,open:R[e.label],"onUpdate:open":[t=>R[e.label]=t,t=>we(t,e)]},{default:T(()=>[r(a,{onClick:t=>Te(e),onBlur:t=>Ce(e),label:e.label,class:u(xe(e)?`font-bold`:``),size:`sm`,variant:`ghost`},{trailing:T(()=>[r(s,{name:`i-heroicons-chevron-down`,class:u([`transition-transform duration-300`,{"rotate-180":R[e.label]}])},null,8,[`class`])]),_:2},1032,[`onClick`,`onBlur`,`label`,`class`])]),content:T(()=>[p(`div`,br,[r(c,{"model-value":pe.value,"onUpdate:modelValue":Te,items:e.children||[],labelKey:`label`,valueKey:`to`,leadingIconKey:`icon`},null,8,[`model-value`,`items`])])]),_:2},1032,[`open`,`onUpdate:open`])):(S(),E(a,{key:1,onClick:t=>Te(e),onBlur:t=>Ce(e),label:e.label,class:u(xe(e)?`font-bold`:``),size:`sm`,variant:`ghost`},{trailing:T(()=>[e.children?.length&&!be(e)?(S(),E(s,{key:0,name:`i-heroicons-chevron-down`,class:u([`transition-transform duration-300`,{"rotate-180":Se(e)}])},null,8,[`class`])):j(``,!0)]),_:2},1032,[`onClick`,`onBlur`,`label`,`class`]))],64))),128))])):j(``,!0)],!0)]),p(`div`,xr,[A(e.$slots,`right-nav`,{},()=>[A(e.$slots,`search`,{},void 0,!0),l(ne)||l(_)===`authenticated`&&l(b)===void 0?(S(),m(`div`,Sr)):l(_)===`authenticated`?(S(),E(f,{key:2,user:l(b),"extra-menu-items":n.extraMenuItems,onHandleSignOut:Fe},null,8,[`user`,`extra-menu-items`])):(S(),m(w,{key:1}
1,[r(a,{color:`neutral`,class:`register-btn`,variant:`solid`,onClick:t[2]||=e=>Ne()},{default:T(()=>[...t[7]||=[i(` Register `,-1)]]),_:1}),r(a,{color:`neutral`,variant:`outline`,class:`auth-btn`,onClick:t[3]||=e=>Pe()},{default:T(()=>[...t[8]||=[i(` Sign In `,-1)]]),_:1}),r(a,{color:`neutral`,variant:`outline`,size:`sm`,class:`auth-btn-mobile`,"data-testid":`sign-in-button-mobile`,onClick:t[4]||=e=>Pe()},{default:T(()=>[...t[9]||=[i(` Sign In `,-1)]]),_:1})],64))],!0)])]),r(ie,{"enter-active-class":`transition ease-out duration-200`,"enter-from-class":`opacity-0 -translate-y-1`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition ease-in duration-150`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0 -translate-y-1`},{default:T(()=>[L.value?(S(),m(`div`,{key:0,ref_key:`subnavRef`,ref:ge,"data-testid":`header-subnav`,class:u([`w-full max-md:hidden`,_e.value?``:`absolute top-20 z-100`])},[r(g,{items:ve.value,overlay:!_e.value},null,8,[`items`,`overlay`])],2)):j(``,!0)]),_:1})]),n.links?(S(),E(v,{key:0,open:Ee.value,"onUpdate:open":t[6]||=e=>Ee.value=e,side:`left`},{content:T(()=>[p(`div`,Cr,[r(a,{"data-testid":`mobile-slideover-close`,color:`primary`,variant:`ghost`,size:`sm`,icon:`i-heroicons-x-mark-20-solid`,class:`mobile-close-btn`,square:``,onClick:t[5]||=e=>z(!1)}),p(`div`,wr,[(S(!0),m(w,null,h(n.links,(e,t)=>(S(),m(`div`,{key:t,class:`mobile-nav-link`},[e.children?.length?(S(),E(a,{key:0,onClick:t=>Ae(e),label:e.label,size:`sm`,variant:`ghost`},{trailing:T(()=>[ke(e)?j(``,!0):(S(),E(s,{key:0,name:`i-heroicons-chevron-down`,class:u([`transition-transform duration-200`,{"rotate-180":De.value.has(e.label)}])},null,8,[`class`]))]),_:2},1032,[`onClick`,`label`])):(S(),E(a,{key:1,onClick:t=>je(e),label:e.label,size:`sm`,variant:`ghost`},null,8,[`onClick`,`label`])),r(ie,{"enter-active-class":`transition-all duration-200 ease-out overflow-hidden`,"enter-from-class":`max-h-0 opacity-0`,"enter-to-class":`max-h-96 opacity-100`,"leave-active-class":`transition-all duration-150 ease-in overflow-hidden`,"leave-from-class":`max-h-96 opacity-100`,"leave-to-class":`max-h-0 opacity-0`},{default:T(()=>[e.children?.length&&De.value.has(e.label)?(S(),m(`div`,Tr,[(S(!0),m(w,null,h(e.children,e=>(S(),E(a,{key:e.to,onClick:t=>Me(e),label:e.label,class:u([e.to===F.value?`font-bold text-primary-500`:``,`mobile-nav-child-link`]),variant:`ghost`},null,8,[`onClick`,`label`,`class`]))),128))])):j(``,!0)]),_:2},1024)]))),128))])])]),_:1},8,[`open`])):j(``,!0)],64)}}},[[`__scopeId`,`data-v-d47b3aab`]]);function Dr(){let{HOSTNAME:e,POSTHOG_PUBLIC_API_HOST:n}=t().public;return[{category:`Strictly Necessary Cookies`,cookies:[{category:`First Party Cookies`,list:[{name:`CognitoIdentityServiceProvider.xxxx.accessToken`,description:`Access tokens are used to verify the bearer of the token is authorized to perform an action against a resource.`,host:e,duration:`60 minutes`,type:`Targeting Cookies`},{name:`CognitoIdentityServiceProvider.xxxx.clockDrift`,description:``,host:e,duration:`Session`,type:`Targeting Cookies`},{name:`CognitoIdentityServiceProvider.xxxx.idToken`,description:`The ID token is a JSON Web Token (JWT) that contains claims about the identity of the authenticated user, such as name, email, and phone_number.`,host:e,duration:`60 minutes`,type:`Targeting Cookies`},{name:`CognitoIdentityServiceProvider.xxxx.refreshToken`,description:`Refresh tokens are used to retrieve new ID and access tokens`,host:e,duration:`5 days`,type:`Targeting Cookies`},{name:`CognitoIdentityServiceProvider.xxxx.signInDetails`,description:`This cookie contains information about the signed in user and the type of authentication used.`,host:e,duration:`Session`,type:`Targeting Cookies`},{name:`CognitoIdentityServiceProvider.xxxx.LastAuthUser`,description:`This cookie contains the identity of the last authenticated user`,host:e,duration:`Session`,type:`Targeting Cookies`},{name:`userConsent`,description:`This cookie contains the level of cookie permissions for the application to run certain functions`,host:e,duration:`180 days`,type:`Targeting Cookies`},{name:`userAllowedCookies`,description:`This cookie contains the allowed list of permissions that you as a user have provided for the application to run certain functions`,host:e,duration:`180 days`,type:`Targeting Cookies`},{name:`pendingAuthIdentification`,description:`This cookie is added on login, removed upon user accepting functional cookies, or removed when the user logs out`,host:e,duration:`Variable`,type:`Targeting Cookies`}]}]},{category:`Functional Cookies`,cookies:[{category:`First Party Cookies`,list:[{name:`ph_xxxx_posthog`,description:`Used by PostHog analytics to track user interactions, enable feature flags, and provide product analytics. It helps us understand how users engage with our site and allows us to test new features. The cookie stores a unique identifier and session data to maintain consistent user experience across visits.`,host:`${n}`,duration:`365 days`,type:`Targeting Cookies`}]}]}]}var Or={class:`p-5 grow flex flex-col gap-5`},kr={class:`flex items-center text-2xl justify-between`},Ar={class:`border rounded-md px-3`},jr={class:`flex flex-col gap-2 p-2 bg-default`},Mr={class:`text-sm text-muted`},Nr={class:`flex justify-between items-center`},Pr={key:0,class:`text-primary`},Fr={class:`px-4 grow`},Ir={class:`flex items-center text-xl p-2`},Lr={class:``},Rr={class:`max-h-[calc(100vh-15rem)] overflow-y-auto`},zr={class:`p-3 border rounded-md space-y-2 mb-4 shadow-xs bg-elevated border-default`},Br={class:`text-sm text-muted`},Vr={class:`flex sm:flex-row flex-col gap-2 bg-inverted p-7 justify-evenly`},Hr=Object.assign(x({__name:`Settings`,props:{showCookieSettings:{type:Boolean,default:!1},showCookieSettingsModifiers:{},showCookieBanner:{type:Boolean,default:!1},showCookieBannerModifiers:{}},emits:[`update:showCookieSettings`,`update:showCookieBanner`],setup(e){let t=Dr(),n=o(e,`showCookieSettings`),a=o(e,`showCookieBanner`),s=de(`userConsent`,{maxAge:15552e3}),c=de(`userAllowedCookies`,{maxAge:15552e3}),u=D({show:!1,category:``}),d=D({"Strictly Necessary Cookies":!0,"Functional Cookies":!0}),g=D([{defaultOpen:!0,label:`Strictly Necessary Cookies`,content:`These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.`},{label:`Functional Cookies`,content:`These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.`}]),_=v(()=>{let e=t.find(e=>e.category===u.value.category);return e?e.cookies.map(e=>({label:e.category,cookieData:e.list})):[]}),y=()=>{n.value=!n.value},b=e=>{u.value.show=!u.value.show,u.value.category=e||``},x=e=>{s.value=e,s.value===`granted`?c.value=null:c.value=JSON.stringify(d.value),n.value=!1,a.value=!1,u.value.show=!1},ee=()=>{s.value=`denied`,c.value=null,n.value=!1,a.value=!1,u.value.show=!1};return(e,t)=>{let a=V,o=ze,s=Re,c=Xe,v=at;return S(),E(v,{open:n.value,"onUpdate:open":t[3]||=e=>n.value=e,side:`right`},{content:T(()=>[f(p(`div`,Or,[p(`div`,kr,[t[4]||=p(`h1`,{class:`font-bold`},`Cookie Settings`,-1),r(a,{class:`p-0`,color:`neutral`,variant:`link`,icon:`i-heroicons-x-mark-20-solid`,size:`xl`,onClick:y}
1)]),t[6]||=p(`p`,null,` We use cookies to ensure our website works as intended - these are always enabled. With your consent, we also use analytics cookies to help us understand how our site is used and to improve your experience through new features. You can choose which types of cookies to accept below. `,-1),p(`div`,Ar,[r(s,{size:`xl`,variant:`solid`,color:`neutral`,items:l(g),multiple:``},{body:T(({item:e})=>[p(`div`,jr,[p(`p`,Mr,C(e.content),1),p(`div`,Nr,[r(a,{color:`neutral`,variant:`outline`,onClick:t=>b(e.label)},{default:T(()=>[...t[5]||=[i(`Cookie List`,-1)]]),_:1},8,[`onClick`]),e.label===`Strictly Necessary Cookies`?(S(),m(`label`,Pr,`Always Active`)):j(``,!0),e.label===`Strictly Necessary Cookies`?j(``,!0):(S(),E(o,{key:1,class:`justify-end`,label:`Accept`,modelValue:l(d)[e.label],"onUpdate:modelValue":t=>l(d)[e.label]=t},null,8,[`modelValue`,`onUpdate:modelValue`]))])])]),_:1},8,[`items`])])],512),[[ae,!l(u).show]]),f(p(`div`,Fr,[p(`div`,Ir,[r(a,{icon:`i-heroicons-arrow-left`,class:`p-0`,variant:`ghost`,onClick:t[0]||=()=>b()}),t[7]||=p(`h1`,{class:`font-bold m-2`},`Cookie List`,-1)]),p(`div`,Lr,[r(s,{items:l(_)},{body:T(({item:e})=>[p(`div`,Rr,[p(`ul`,null,[(S(!0),m(w,null,h(e.cookieData,e=>(S(),m(`li`,zr,[(S(!0),m(w,null,h(e,(e,t)=>(S(),m(`div`,null,[r(c,{label:t,class:`w-full`},{default:T(()=>[p(`div`,Br,C(e.length?e:`Not available`),1)]),_:2},1032,[`label`])]))),256))]))),256))])])]),_:1},8,[`items`])])],512),[[ae,l(u).show]]),p(`div`,Vr,[r(a,{size:`lg`,class:`text-inverted px-0 hover:underline`,onClick:ee},{default:T(()=>[...t[8]||=[i(`Reject non-essential`,-1)]]),_:1}),r(a,{size:`lg`,class:`text-inverted px-0 hover:underline`,onClick:t[1]||=e=>x(`granted`)},{default:T(()=>[...t[9]||=[i(`Accept All`,-1)]]),_:1}),r(a,{size:`lg`,color:`info`,variant:`solid`,onClick:t[2]||=e=>x(`partial`)},{default:T(()=>[...t[10]||=[i(` Accept Selected `,-1)]]),_:1})])]),_:1},8,[`open`])}}}),{__name:`CookieControlsSettings`}),Ur={key:0,class:`fixed bottom-0 z-50 w-full p-6 bg-inverted`,"data-testid":`cookie-banner`},Wr={class:`flex flex-col lg:flex-row justify-between text-inverted lg:items-center gap-4 lg:gap-16`},Gr={class:`text-sm`},Kr={class:`w-full lg:w-auto`},qr={class:`flex flex-col sm:flex-row gap-2`},Jr=Object.assign(x({__name:`Banner`,setup(e){let t=D(!1),n=D(!1),a=de(`userConsent`,{maxAge:15552e3}),o=()=>{n.value=!n.value},s=e=>{a.value=e,a.value,t.value=!1},c=()=>{a.value=`denied`,t.value=!1};return g(()=>{a.value===`granted`||a.value===`partial`||a.value===`denied`?t.value=!1:t.value=!0}),(e,a)=>{let l=R,u=V,d=Hr;return S(),m(w,null,[t.value?(S(),m(`div`,Ur,[p(`div`,Wr,[p(`div`,null,[a[6]||=p(`p`,{class:`font-display font-semibold`},`Cookie Settings`,-1),p(`p`,Gr,[a[4]||=i(` We use cookies to improve your experience, including for analytics and feature flags. You can choose which cookies to accept or manage your preferences. Visit our `,-1),r(l,{class:`inline font-semibold underline`,to:`/cookie-policy`},{default:T(()=>[...a[3]||=[i(`Cookie Policy`,-1)]]),_:1}),a[5]||=i(` for more info. `,-1)])]),p(`div`,Kr,[p(`div`,qr,[r(u,{class:`text-inverted hover:underline text-center justify-center`,label:`Open`,variant:`ghost`,onClick:o},{default:T(()=>[...a[7]||=[i(` Manage settings `,-1)]]),_:1}),r(u,{class:`text-inverted hover:underline text-center justify-center`,variant:`ghost`,onClick:c},{default:T(()=>[...a[8]||=[i(` Reject non-essential `,-1)]]),_:1}),r(u,{class:`text-inverted hover:underline text-center justify-center`,color:`info`,variant:`solid`,onClick:a[0]||=e=>s(`granted`)},{default:T(()=>[...a[9]||=[i(` Accept All `,-1)]]),_:1})])])])])):j(``,!0),n.value?(S(),E(d,{key:1,"show-cookie-settings":n.value,"onUpdate:showCookieSettings":a[1]||=e=>n.value=e,"show-cookie-banner":t.value,"onUpdate:showCookieBanner":a[2]||=e=>t.value=e},null,8,[`show-cookie-settings`,`show-cookie-banner`])):j(``,!0)],64)}}}),{__name:`CookieControlsBanner`}),Yr={class:`flex flex-col py-4 px-4 gap-3 max-w-7xl mx-auto`},Xr={class:`flex sm:items-end justify-between flex-col sm:flex-row gap-5`},Zr={class:`flex gap-x-6 gap-y-2 sm:gap-x-3 flex-wrap mb-4 sm:mb-0`},Qr={class:`flex justify-between text-sm`},$r={class:`text-muted`},ei=Object.assign(x({__name:`Footer`,setup(e){let t=v(()=>ot().value===`dark`),n=D([{label:`About`,to:`https://urbantide.com/products`},{label:`FAQ`,to:`/faq`},{label:`Terms`,to:`/terms`},{label:`Acceptable Use`,to:`/acceptable-use`},{label:`Privacy`,to:`/privacy`},{label:`Cookie Policy`,to:`/cookie-policy`}]),a=new Date().getFullYear();return(e,o)=>{let s=Je,c=Ue;return S(),m(`div`,Yr,[p(`div`,Xr,[p(`div`,null,[r(s,{class:`logo`,src:l(t)?`/images/Colour=Dark.png`:`/images/Colour=Default.png`,width:`100px`},null,8,[`src`]),o[0]||=p(`span`,{class:`text-muted`},`Unlock any data and utilise AI for good`,-1)]),p(`div`,Zr,[(S(!0),m(w,null,h(l(n),e=>(S(),E(c,{to:e.to,target:`_blank`,"active-class":`font-bold text-sm cursor-default`,"inactive-class":`text-muted hover:text-default text-sm`},{default:T(()=>[i(C(e.label),1)]),_:2},1032,[`to`]))),256))])]),p(`div`,Qr,[p(`span`,$r,` © 2014-`+C(l(a))+` UrbanTide Limited. All Rights Reserved. `,1)])])}}}),{__name:`Footer`});function ti(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ni=ti();function ri(e){ni=e}var ii={exec:()=>null};function q(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(J.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ai=(()=>{try{return!0}catch{return!1}})(),J={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine
vendor: 8,240 bytes, lines 1-2
1:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},oi=/^(?:[ \t]*(?:\n|$))+/,si=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ci=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,li=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ui=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,di=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,fi=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pi=q(fi).replace(/bull/g,di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),mi=q(fi).replace(/bull/g,di).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),hi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gi=/^[^\n]+/,_i=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,vi=q(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,_i).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yi=q(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,di).getRegex(),bi=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,xi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Si=q(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,xi).replace(`tag`,bi).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ci=q(hi).replace(`hr`,li).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,bi).getRegex(),wi={blockquote:q(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ci).getRegex(),code:si,def:vi,fences:ci,heading:ui,hr:li,html:Si,lheading:pi,list:yi,newline:oi,paragraph:Ci,table:ii,text:gi},Ti=q(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,li).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,bi).getRegex(),Ei={...wi,lheading:mi,table:Ti,paragraph:q(hi).replace(`hr`,li).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Ti).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,bi).getRegex()},Di={...wi,html:q(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,xi).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ii,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:q(hi).replace(`hr`,li).replace(`heading`,` *#{1,6} *[^ 2]`).replace(`lheading`,pi).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Oi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ki=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ai=/^( {2,}|\\)\n(?!\s*$)/,ji=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Mi=/[\p{P}\p{S}]/u,Ni=/[\s\p{P}\p{S}]/u,Pi=/[^\s\p{P}\p{S}]/u,Fi=q(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Ni).getRegex(),Ii=/(?!~)[\p{P}\p{S}]/u,Li=/(?!~)[\s\p{P}\p{S}]/u,Ri=/(?:[^\s\p{P}\p{S}]|~)/u,zi=q(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,ai?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Bi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Vi=q(Bi,`u`).replace(/punct/g,Mi).getRegex(),Hi=q(Bi,`u`).replace(/punct/g,Ii).getRegex(),Ui=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Wi=q(Ui,`gu`).replace(/notPunctSpace/g,Pi).replace(/punctSpace/g,Ni).replace(/punct/g,Mi).getRegex(),Gi=q(Ui,`gu`).replace(/notPunctSpace/g,Ri).replace(/punctSpace/g,Li).replace(/punct/g,Ii).getRegex(),Ki=q(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Pi).replace(/punctSpace/g,Ni).replace(/punct/g,Mi).getRegex(),qi=q(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Mi).getRegex(),Ji=q(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Pi).replace(/punctSpace/g,Ni).replace(/punct/g,Mi).getRegex(),Yi=q(/\\(punct)/,`gu`).replace(/punct/g,Mi).getRegex(),Xi=q(/^<(scheme:[^\s\x00-\x1f<>]*|email)>
2/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Zi=q(xi).replace(`(?:-->|$)`,`-->`).getRegex(),Qi=q(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,Zi).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$i=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ea=q(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,$i).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ta=q(/^!?\[(label)\]\[(ref)\]/).replace(`label`,$i).replace(`ref`,_i).getRegex(),na=q(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,_i).getRegex(),ra=q(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,ta).replace(`nolink`,na).getRegex(),ia=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,aa={_backpedal:ii,anyPunctuation:Yi,autolink:Xi,blockSkip:zi,br:Ai,code:ki,del:ii,delLDelim:ii,delRDelim:ii,emStrongLDelim:Vi,emStrongRDelimAst:Wi,emStrongRDelimUnd:Ki,escape:Oi,link:ea,nolink:na,punctuation:Fi,reflink:ta,reflinkSearch:ra,tag:Qi,text:ji,url:ii},oa={...aa,link:q(/^!?\[(label)\]\((.*?)\)/).replace(`label`,$i).getRegex(),reflink:q(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,$i).getRegex()},sa={...aa,emStrongRDelimAst:Gi,emStrongLDelim:Hi,delLDelim:qi,delRDelim:Ji,url:q(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,ia).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:q(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,ia).getRegex()},ca={...sa,br:q(Ai).replace(`{2,}`,`*`).getRegex(),text:q(sa.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},la={normal:wi,gfm:Ei,pedantic:Di},ua={normal:aa,gfm:sa,breaks:ca,pedantic:oa},da={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},fa=e=>da[e];function Y(e,t){if(t){if(J.escapeTest.test(e))return e.replace(J.escapeReplace,fa)}else if(J.escapeTestNoEncode.test(e))return e.replace(J.escapeReplaceNoEncode,fa);return e}function pa(e){try{e=encodeURI(e).replace(J.percentDecode,`%`)}catch{return null}return e}function ma(e,t){let n=e.replace(J.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(J.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(J.slashPipe,`|`);return n}function ha(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function ga(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function _a(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function va(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function ya(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` 3`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` 4`)}var ba=class{options;rules;lexer;constructor(e){this.options=e||ni}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:ha(e,` 5`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=ya(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ha(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:ha(t[0],` 6`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ha(t[0],` 7`).split(` 8`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(` 9`),c=s.replace(this.rules.other.blockquoteSetextReplace,` 10 $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n} 11${s}`:s,r=r?`${r} 12${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;
vendor: 8,474 bytes, lines 12-26
12if(u?.type===`blockquote`){let t=u,a=t.raw+` 13`+e.join(` 14`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if(u?.type===`list`){let t=u,a=t.raw+` 15`+e.join(` 16`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(` 17`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=_a(t[2].split(` 18`,1)[0],t[1].length),l=e.split(` 19`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` 20`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(` 21`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` 22`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` 23`+l}u=!l.trim(),r+=p+` 24`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ma(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(` 25`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(ma(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` 26`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ha(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=ga(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),va(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return va(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);
vendor: 12,497 bytes, lines 26-58
26if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},X=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ni,this.options.tokenizer=this.options.tokenizer||new ba,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:J,block:la.normal,inline:ua.normal};this.options.pedantic?(t.block=la.pedantic,t.inline=ua.pedantic):this.options.gfm&&(t.block=la.gfm,t.inline=this.options.breaks?ua.breaks:ua.gfm),this.tokenizer.rules=t}static get rules(){return{block:la,inline:ua}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(J.carriageReturn,` 27`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(J.tabCharGlobal,` `).replace(J.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` 28`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` 29`)?``:` 30`)+r.raw,n.text+=` 31`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` 32`)?``:` 33`)+r.raw,n.text+=` 34`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(` 35`)?``:` 36`)+r.raw,a.text+=` 37`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(` 38`)?``:` 39`)+r.raw,n.text+=` 40`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},xa=class{options;parser;constructor(e){this.options=e||ni}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(J.notSpaceStart)?.[0],i=e.replace(J.endingNewline,``)+` 41`;return r?`<pre><code class="language-`+Y(r)+`">`+(n?i:Y(i,!0))+`</code></pre> 42`:`<pre><code>`+(n?i:Y(i,!0))+`</code></pre> 43`}blockquote({tokens:e}){return`<blockquote> 44${this.parser.parse(e)}</blockquote> 45`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}> 46`}hr(e){return`<hr> 47`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`> 48`+r+`</`+i+`> 49`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li> 50`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p> 51`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table> 52<thead> 53`+t+`</thead> 54`+r+`</table> 55`}tablerow({text:e}){return`<tr> 56${e}</tr> 57`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}> 58`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Y(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=pa(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Y(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=pa(e);if(i===null)return Y(n);e=i;let a=`<img src="${e}" alt="${Y(n)}"`;return t&&(a+=` title="${Y(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Y(e.text)}},Sa=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Z=class e{options;renderer;textRenderer;constructor(e){this.options=e||ni,this.options.renderer=this.options.renderer||new xa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Sa}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Ca=class{options;block;constructor(e){this.options=e||ni}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?X.lex:X.lexInline}provideParser(e=this.block){return e?Z.parse:Z.parseInline}},Q=new class{defaults=ti();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Z;Renderer=xa;TextRenderer=Sa;Lexer=X;Tokenizer=ba;Hooks=Ca;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;
58for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new xa(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new ba(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Ca;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Ca.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Ca.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return X.lex(e,t??this.defaults)}parser(e,t){return Z.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?X.lex:X.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?X.lex:X.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` 59Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Y(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function $(e,t){return Q.parse(e,t)}$.options=$.setOptions=function(e){return Q.setOptions(e),$.defaults=Q.defaults,ri($.defaults),$},$.getDefaults=ti,$.defaults=ni,$.use=function(...e){return Q.use(...e),$.defaults=Q.defaults,ri($.defaults),$},$.walkTokens=function(e,t){return Q.walkTokens(e,t)},$.parseInline=Q.parseInline,$.Parser=Z,$.parser=Z.parse,$.Renderer=xa,$.TextRenderer=Sa,$.Lexer=X,$.lexer=X.lex,$.Tokenizer=ba,$.Hooks=Ca,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,Z.parse,X.lex;var wa={class:`p-6 border rounded-xl bg-info/10 shadow-sm inset-shadow-sm inset-shadow-info/10 shadow-info/10 border-info/20 hover:shadow-lg transition-all ease-in`},Ta=[`innerHTML`],Ea=Object.assign(Qe(x({__name:`SmartResults`,props:{answer:{}},setup(e){let t=e;$.setOptions({gfm:!0,breaks:!0});let n=v(()=>{let e=$.parse(t.answer??``,{async:!1});return ct.sanitize(e)});return(e,t)=>{let a=tt;return S(),m(`div`,wa,[r(a,{icon:`i-lucide-sparkles`,color:`info`,variant:`soft`},{default:T(()=>[...t[0]||=[i(`uSmart Discovery`,-1)]]),_:1}),p(`div`,{class:`smart-results`,innerHTML:l(n)},null,8,Ta)])}}}),[[`__scopeId`,`data-v-224df695`]]),{__name:`SmartResults`}),Da={class:`flex flex-col gap-6`},Oa={key:0,"data-testid":`smart-search-loading`,class:`flex flex-col gap-4`},ka={class:`flex flex-col gap-1`},Aa={class:`flex items-center gap-2 text-sm`},ja={class:`font-medium text-default`}
59,Ma={class:`smart-skeleton relative overflow-hidden p-6 w-[95%] max-w-5xl mx-auto border rounded-xl bg-info/10 border-info/20`},Na={class:`flex flex-col gap-2 mt-4`},Pa={key:1,"data-testid":`smart-search-error`,class:`flex flex-col items-center gap-2 py-12 text-center text-muted`},Fa={key:2,"data-testid":`smart-search-no-answer`,class:`flex flex-col items-center gap-2 py-12 text-center text-muted`},Ia={class:`flex flex-col gap-4`},La={class:`flex gap-2 flex-wrap`},Ra={class:`flex gap-2 flex-wrap`},za=Object.assign(Qe(x({__name:`SmartResultsContent`,props:{answer:{},results:{},loading:{type:Boolean},error:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let n=e,i=t,a=[`Searching the data catalogue`,`Reading dataset descriptions`,`Writing your summary`],o=D(0),c=v(()=>a[o.value]),{pause:u,resume:d}=et(()=>{o.value<a.length-1&&o.value++},4e3,{immediate:!1});return s(()=>n.loading,e=>{e?(o.value=0,d()):u()},{immediate:!0}),(t,n)=>{let a=B,o=st,s=Ea,u=tt,d=lt;return S(),m(`div`,Da,[e.loading?(S(),m(`div`,Oa,[p(`div`,ka,[p(`div`,Aa,[r(a,{name:`i-lucide-sparkles`,class:`w-4 h-4 shrink-0 text-muted`}),p(`p`,ja,C(l(c)),1)]),n[1]||=p(`p`,{class:`text-xs text-muted pl-6`},`Usually takes under a minute`,-1)]),p(`div`,Ma,[r(o,{class:`h-5 w-32 rounded-full bg-info/25 dark:bg-info/30`}),p(`div`,Na,[r(o,{class:`h-3 w-full rounded bg-info/25 dark:bg-info/30`}),r(o,{class:`h-3 w-[92%] rounded bg-info/25 dark:bg-info/30`}),r(o,{class:`h-3 w-[96%] rounded bg-info/25 dark:bg-info/30`}),r(o,{class:`h-3 w-[70%] rounded bg-info/25 dark:bg-info/30`})]),n[2]||=p(`div`,{class:`smart-skeleton-shimmer`,"aria-hidden":`true`},null,-1)])])):e.error?(S(),m(`div`,Pa,[r(a,{name:`i-heroicons-exclamation-triangle`,class:`w-6 h-6`}),n[3]||=p(`p`,null,`Something went wrong getting smart results. Please try again.`,-1)])):!e.answer&&!e.results.length?(S(),m(`div`,Fa,[r(a,{name:`i-heroicons-circle-stack-16-solid`,class:`w-6 h-6`}),n[4]||=p(`p`,null,`uSmart AI didn't find an answer for that - try rephrasing your question.`,-1)])):(S(),m(w,{key:3},[r(s,{answer:e.answer},null,8,[`answer`]),p(`div`,Ia,[(S(!0),m(w,null,h(e.results,e=>(S(),E(d,{key:e.itemId,"item-id":e.itemId,title:e.title,description:e.description,"organisation-name":e.organisationName,"org-slug":e.orgSlug,to:e.to,stats:e.stats,color:e.color,"action-stats":e.actionStats,onItemClick:n[0]||=e=>i(`select`)},ne({_:2},[e.themes.length?{name:`themes`,fn:T(()=>[p(`div`,La,[(S(!0),m(w,null,h(e.themes,e=>(S(),E(u,{key:e.label,size:`sm`,color:`primary`,variant:`soft`,icon:e.icon,label:e.label},null,8,[`icon`,`label`]))),128))])]),key:`0`}:void 0,e.tags.length?{name:`bottom-left`,fn:T(()=>[p(`div`,Ra,[(S(!0),m(w,null,h(e.tags,e=>(S(),E(u,{key:e,size:`sm`,color:`neutral`,variant:`soft`,icon:`i-heroicons-tag-16-solid`,label:e},null,8,[`label`]))),128))])]),key:`1`}:void 0]),1032,[`item-id`,`title`,`description`,`organisation-name`,`org-slug`,`to`,`stats`,`color`,`action-stats`]))),128))])],64))])}}}),[[`__scopeId`,`data-v-533cc11a`]]),{__name:`SmartResultsContent`}),Ba={class:`flex justify-between w-full items-center`},Va={class:`flex gap-2 items-center font-semibold text-lg`},Ha={class:`flex justify-end gap-3 w-full`},Ua=Object.assign(x({__name:`SmartResultsSlideover`,props:n({keywords:{},answer:{},results:{},loading:{type:Boolean},error:{type:Boolean}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:[`update:open`],setup(e){let t=o(e,`open`);return(n,a)=>{let o=B,s=V,c=za,u=at;return S(),E(u,{open:t.value,"onUpdate:open":a[4]||=e=>t.value=e,side:`right`,ui:l(ut)},{header:T(()=>[p(`div`,Ba,[p(`div`,Va,[r(o,{name:`i-lucide-sparkles`,class:`w-5 h-5`}),a[5]||=i(` uSmart Discovery `,-1)]),r(s,{variant:`link`,color:`neutral`,size:`sm`,onClick:a[0]||=e=>t.value=!1},{default:T(()=>[r(o,{name:`i-lucide-x`,class:`w-4 h-4`})]),_:1})])]),body:T(()=>[r(c,{answer:e.answer,results:e.results,loading:e.loading,error:e.error,onSelect:a[1]||=e=>t.value=!1},null,8,[`answer`,`results`,`loading`,`error`])]),footer:T(()=>[p(`div`,Ha,[r(s,{variant:`ghost`,color:`neutral`,label:`Close`,onClick:a[2]||=e=>t.value=!1}),r(s,{to:`/discovery?keywords=${encodeURIComponent(e.keywords)}`,color:`neutral`,label:`View results`,onClick:a[3]||=e=>t.value=!1},null,8,[`to`])])]),_:1},8,[`open`,`ui`])}}}),{__name:`SmartResultsSlideover`}),Wa={class:`main-content`},Ga=x({__name:`default`,setup(e){let n=ge(),i=L(),a=pe(),o=nt(),{authState:c}=F(n),{user:u}
59=F(i),{organisationDetails:d}=F(a),{resultsSlideoverOpen:f,smartKeywords:h,smartAnswer:g,smartResults:_,smartLoading:y,smartError:b}=F(o),{AUTH_URL:x}=t().public,C=oe(),w=ot(),{resetPosthog:ee}=fe(),ne=D(!1),re=v(()=>`/images/Colour=Default.png`),O=v(()=>`/images/Colour=Dark.png`),k=v(()=>[{label:`System`,value:`system`,icon:`i-heroicons-computer-desktop`},{label:`Light`,value:`light`,icon:`i-heroicons-sun`},{label:`Dark`,value:`dark`,icon:`i-heroicons-moon`}].map(e=>({label:e.label,icon:e.icon,type:`checkbox`,checked:w.preference===e.value,onUpdateChecked:()=>{w.preference=e.value}}))),ie=v(()=>[[{label:`Settings`,icon:`i-lucide:settings-2`,to:`/settings/mydetails`},{label:`Release Notes`,icon:`i-lucide:scroll-text`,href:`/releases`},{label:`Help`,icon:`i-lucide:circle-question-mark`,href:dt,target:`_blank`}],[{label:`Theme`,icon:`i-lucide:sun-moon`,children:k.value}]]),M=async()=>{await le(`/api/auth/session`,{method:`DELETE`,credentials:`include`}),localStorage.removeItem(`pendingAuthIdentification`),ee()},N=v(()=>c.value===`authenticated`),ae=v(()=>!!u.value?.organisations?.length),se={label:`Discovery`,children:[{label:`Datasets`,to:`/discovery`},{label:`Maps`,to:`/discovery/maps`},{label:`Organisations`,to:`/discovery/organisations`},{label:`Apps`,to:`/discovery/apps`}],childMode:`subnav`},ce=v(()=>{let e=N.value&&(ae.value||ne.value),t=d?.value?.tileServerEnabled?{label:`My Dashboard`,children:[{label:`Datasets`,to:`/dashboard/datasets`,icon:`i-heroicons-circle-stack`},{label:`Maps`,to:`/dashboard/maps`,icon:`i-heroicons-map`}],childMode:`listbox`}:{label:`My Dashboard`,to:`/dashboard/datasets`};return[...!N.value||!ae.value&&!ne.value?[{label:`Home`,to:`/`}]:[],...e?[t]:[],se,...N.value&&ae.value?[{label:`My Organisation`,to:`/my-organisation`}]:[]]}),P=v(()=>{switch(C.name){case`home`:case`discovery-organisations`:case`discovery-apps`:return!0;default:return!1}});return s(u,async e=>{if(e){let{accessTokenCookie:e}=I(),{result:t}=await le(`/api/proxy?method=POST&url=${x}/dataset/getDashboardSharing`,{method:`POST`,body:{offset:0,order:{updatedAt:`desc`},query:{themes:null,tags:null,statuses:null},filterAccessType:{ownByMe:null,sharedWithMe:null,groupAccess:null,public:null},filterGroup:[]},headers:{Authorization:e.value??``}});ne.value=t.length>0}},{immediate:!0}),(e,t)=>{let n=Xn,i=Er,a=Jr,o=ei,s=Ua;return S(),m(`div`,null,[r(i,{links:l(ce),"logo-asset":l(re),"dark-logo-asset":l(O),"register-redirect-url":`/authentication/register`,"sign-in-redirect-url":`/authentication/login`,"home-url":`/`,"extra-menu-items":l(ie),onSignOut:M},{search:T(()=>[r(n)]),_:1},8,[`links`,`logo-asset`,`dark-logo-asset`,`extra-menu-items`]),p(`section`,Wa,[A(e.$slots,`default`)]),r(a),l(P)?(S(),E(o,{key:0})):j(``,!0),r(s,{open:l(f),"onUpdate:open":t[0]||=e=>te(f)?f.value=e:null,keywords:l(h),answer:l(g),results:l(_),loading:l(y),error:l(b)},null,8,[`open`,`keywords`,`answer`,`results`,`loading`,`error`])])}}});export{Ga 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.