signalpilot-ai-internal 0.3.1__py3-none-any.whl → 0.3.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of signalpilot-ai-internal might be problematic. Click here for more details.

Files changed (46) hide show
  1. signalpilot_ai_internal/_version.py +1 -1
  2. signalpilot_ai_internal/cache_handlers.py +383 -0
  3. signalpilot_ai_internal/cache_service.py +552 -0
  4. signalpilot_ai_internal/handlers.py +35 -915
  5. signalpilot_ai_internal/snowflake_schema_service.py +639 -0
  6. signalpilot_ai_internal/unified_database_schema_service.py +742 -0
  7. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/package.json +3 -2
  8. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/schemas/signalpilot-ai-internal/package.json.orig +2 -1
  9. signalpilot_ai_internal-0.3.3.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/384.fa432bdb7fb6b1c95ad6.js +1 -0
  10. signalpilot_ai_internal-0.3.3.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/447.0fea0d444fc7ba458d5a.js +1 -0
  11. signalpilot_ai_internal-0.3.3.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/839.c61f5bc4d0da4a0781d6.js +1 -0
  12. signalpilot_ai_internal-0.3.3.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/remoteEntry.2e2c6ae0baa591126b0a.js +1 -0
  13. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/third-party-licenses.json +6 -0
  14. {signalpilot_ai_internal-0.3.1.dist-info → signalpilot_ai_internal-0.3.3.dist-info}/METADATA +1 -1
  15. signalpilot_ai_internal-0.3.3.dist-info/RECORD +45 -0
  16. signalpilot_ai_internal-0.3.1.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/447.45c187b4dc615d9cc073.js +0 -1
  17. signalpilot_ai_internal-0.3.1.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/839.e2bd05ad6dbdb957683f.js +0 -1
  18. signalpilot_ai_internal-0.3.1.data/data/share/jupyter/labextensions/signalpilot-ai-internal/static/remoteEntry.07bc9bbdead29df455e7.js +0 -1
  19. signalpilot_ai_internal-0.3.1.dist-info/RECORD +0 -40
  20. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/etc/jupyter/jupyter_server_config.d/signalpilot_ai.json +0 -0
  21. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/install.json +0 -0
  22. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/schemas/signalpilot-ai-internal/plugin.json +0 -0
  23. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/104.04e170724f369fcbaf19.js +0 -0
  24. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/104.04e170724f369fcbaf19.js.LICENSE.txt +0 -0
  25. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/122.e2dadf63dc64d7b5f1ee.js +0 -0
  26. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/220.328403b5545f268b95c6.js +0 -0
  27. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/262.726e1da31a50868cb297.js +0 -0
  28. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/280.35d8c8b68815702a5238.js +0 -0
  29. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/280.35d8c8b68815702a5238.js.LICENSE.txt +0 -0
  30. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/353.72484b768a04f89bd3dd.js +0 -0
  31. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/364.dbec4c2dc12e7b050dcc.js +0 -0
  32. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/439.37e271d7a80336daabe2.js +0 -0
  33. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/476.9b4f05a99f5003f82094.js +0 -0
  34. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/481.73c7a9290b7d35a8b9c1.js +0 -0
  35. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/512.b58fc0093d080b8ee61c.js +0 -0
  36. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/553.b4042a795c91d9ff71ef.js +0 -0
  37. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/553.b4042a795c91d9ff71ef.js.LICENSE.txt +0 -0
  38. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/606.90aaaae46b73dc3c08fb.js +0 -0
  39. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/635.9720593ee20b768da3ca.js +0 -0
  40. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/713.8e6edc9a965bdd578ca7.js +0 -0
  41. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/742.91e7b516c8699eea3373.js +0 -0
  42. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/785.3aa564fc148b37d1d719.js +0 -0
  43. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/888.34054db17bcf6e87ec95.js +0 -0
  44. {signalpilot_ai_internal-0.3.1.data → signalpilot_ai_internal-0.3.3.data}/data/share/jupyter/labextensions/signalpilot-ai-internal/static/style.js +0 -0
  45. {signalpilot_ai_internal-0.3.1.dist-info → signalpilot_ai_internal-0.3.3.dist-info}/WHEEL +0 -0
  46. {signalpilot_ai_internal-0.3.1.dist-info → signalpilot_ai_internal-0.3.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalpilot-ai-internal",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "SignalPilot Agent - Your Jupyter Notebook Assistant",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -77,6 +77,7 @@
77
77
  "diff": "^8.0.1",
78
78
  "diff2html": "^3.4.51",
79
79
  "dompurify": "^3.2.5",
80
+ "fuse.js": "^7.1.0",
80
81
  "jwt-decode": "^4.0.0",
81
82
  "marked": "^15.0.11",
82
83
  "partial-json": "^0.1.7",
@@ -132,7 +133,7 @@
132
133
  "outputDir": "signalpilot_ai_internal/labextension",
133
134
  "schemaDir": "schema",
134
135
  "_build": {
135
- "load": "static/remoteEntry.07bc9bbdead29df455e7.js",
136
+ "load": "static/remoteEntry.2e2c6ae0baa591126b0a.js",
136
137
  "extension": "./extension",
137
138
  "style": "./style"
138
139
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalpilot-ai-internal",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "SignalPilot Agent - Your Jupyter Notebook Assistant",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -77,6 +77,7 @@
77
77
  "diff": "^8.0.1",
78
78
  "diff2html": "^3.4.51",
79
79
  "dompurify": "^3.2.5",
80
+ "fuse.js": "^7.1.0",
80
81
  "jwt-decode": "^4.0.0",
81
82
  "marked": "^15.0.11",
82
83
  "partial-json": "^0.1.7",
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksignalpilot_ai_internal=self.webpackChunksignalpilot_ai_internal||[]).push([[384],{72384:(t,e,n)=>{function s(t){return Array.isArray?Array.isArray(t):"[object Array]"===h(t)}function i(t){return"string"==typeof t}function r(t){return"number"==typeof t}function u(t){return"object"==typeof t}function c(t){return null!=t}function o(t){return!t.trim().length}function h(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}n.r(e),n.d(e,{default:()=>K});const a=Object.prototype.hasOwnProperty;class l{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let n=d(t);this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function d(t){let e=null,n=null,r=null,u=1,c=null;if(i(t)||s(t))r=t,e=g(t),n=f(t);else{if(!a.call(t,"name"))throw new Error("Missing name property in key");const s=t.name;if(r=s,a.call(t,"weight")&&(u=t.weight,u<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(s));e=g(s),n=f(s),c=t.getFn}return{path:e,id:n,weight:u,src:r,getFn:c}}function g(t){return s(t)?t:t.split(".")}function f(t){return s(t)?t.join("."):t}var A={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let n=[],o=!1;const a=(t,e,l)=>{if(c(t))if(e[l]){const d=t[e[l]];if(!c(d))return;if(l===e.length-1&&(i(d)||r(d)||function(t){return!0===t||!1===t||function(t){return u(t)&&null!==t}(t)&&"[object Boolean]"==h(t)}(d)))n.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(d));else if(s(d)){o=!0;for(let t=0,n=d.length;t<n;t+=1)a(d[t],e,l+1)}else e.length&&a(d,e,l+1)}else n.push(t)};return a(t,i(e)?e.split("."):e,0),o?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const p=/[^ ]+/g;class C{constructor({getFn:t=A.getFn,fieldNormWeight:e=A.fieldNormWeight}={}){this.norm=function(t=1,e=3){const n=new Map,s=Math.pow(10,e);return{get(e){const i=e.match(p).length;if(n.has(i))return n.get(i);const r=1/Math.pow(i,.5*t),u=parseFloat(Math.round(r*s)/s);return n.set(i,u),u},clear(){n.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,i(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();i(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!c(t)||o(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(t,e){let n={i:e,$:{}};this.keys.forEach((e,r)=>{let u=e.getFn?e.getFn(t):this.getFn(t,e.path);if(c(u))if(s(u)){let t=[];const e=[{nestedArrIndex:-1,value:u}];for(;e.length;){const{nestedArrIndex:n,value:r}=e.pop();if(c(r))if(i(r)&&!o(r)){let e={v:r,i:n,n:this.norm.get(r)};t.push(e)}else s(r)&&r.forEach((t,n)=>{e.push({nestedArrIndex:n,value:t})})}n.$[r]=t}else if(i(u)&&!o(u)){let t={v:u,n:this.norm.get(u)};n.$[r]=t}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function m(t,e,{getFn:n=A.getFn,fieldNormWeight:s=A.fieldNormWeight}={}){const i=new C({getFn:n,fieldNormWeight:s});return i.setKeys(t.map(d)),i.setSources(e),i.create(),i}function F(t,{errors:e=0,currentLocation:n=0,expectedLocation:s=0,distance:i=A.distance,ignoreLocation:r=A.ignoreLocation}={}){const u=e/t.length;if(r)return u;const c=Math.abs(s-n);return i?u+c/i:c?1:u}const M=32;function E(t){let e={};for(let n=0,s=t.length;n<s;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<s-n-1}return e}const D=String.prototype.normalize?t=>t.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,""):t=>t;class y{constructor(t,{location:e=A.location,threshold:n=A.threshold,distance:s=A.distance,includeMatches:i=A.includeMatches,findAllMatches:r=A.findAllMatches,minMatchCharLength:u=A.minMatchCharLength,isCaseSensitive:c=A.isCaseSensitive,ignoreDiacritics:o=A.ignoreDiacritics,ignoreLocation:h=A.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h},t=c?t:t.toLowerCase(),t=o?D(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:E(t),startIndex:e})},l=this.pattern.length;if(l>M){let t=0;const e=l%M,n=l-e;for(;t<n;)a(this.pattern.substr(t,M),t),t+=M;if(e){const t=l-M;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s}=this.options;if(t=e?t:t.toLowerCase(),t=n?D(t):t,this.pattern===t){let e={isMatch:!0,score:0};return s&&(e.indices=[[0,t.length-1]]),e}const{location:i,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,ignoreLocation:h}=this.options;let a=[],l=0,d=!1;this.chunks.forEach(({pattern:e,alphabet:n,startIndex:g})=>{const{isMatch:f,score:p,indices:C}=function(t,e,n,{location:s=A.location,distance:i=A.distance,threshold:r=A.threshold,findAllMatches:u=A.findAllMatches,minMatchCharLength:c=A.minMatchCharLength,includeMatches:o=A.includeMatches,ignoreLocation:h=A.ignoreLocation}={}){if(e.length>M)throw new Error("Pattern length exceeds max of 32.");const a=e.length,l=t.length,d=Math.max(0,Math.min(s,l));let g=r,f=d;const p=c>1||o,C=p?Array(l):[];let m;for(;(m=t.indexOf(e,f))>-1;){let t=F(e,{currentLocation:m,expectedLocation:d,distance:i,ignoreLocation:h});if(g=Math.min(t,g),f=m+a,p){let t=0;for(;t<a;)C[m+t]=1,t+=1}}f=-1;let E=[],D=1,y=a+l;const B=1<<a-1;for(let s=0;s<a;s+=1){let r=0,c=y;for(;r<c;)F(e,{errors:s,currentLocation:d+c,expectedLocation:d,distance:i,ignoreLocation:h})<=g?r=c:y=c,c=Math.floor((y-r)/2+r);y=c;let o=Math.max(1,d-c+1),A=u?l:Math.min(d+c,l)+a,m=Array(A+2);m[A+1]=(1<<s)-1;for(let r=A;r>=o;r-=1){let u=r-1,c=n[t.charAt(u)];if(p&&(C[u]=+!!c),m[r]=(m[r+1]<<1|1)&c,s&&(m[r]|=(E[r+1]|E[r])<<1|1|E[r+1]),m[r]&B&&(D=F(e,{errors:s,currentLocation:u,expectedLocation:d,distance:i,ignoreLocation:h}),D<=g)){if(g=D,f=u,f<=d)break;o=Math.max(1,2*d-f)}}if(F(e,{errors:s+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>g)break;E=m}const x={isMatch:f>=0,score:Math.max(.001,D)};if(p){const t=function(t=[],e=A.minMatchCharLength){let n=[],s=-1,i=-1,r=0;for(let u=t.length;r<u;r+=1){let u=t[r];u&&-1===s?s=r:u||-1===s||(i=r-1,i-s+1>=e&&n.push([s,i]),s=-1)}return t[r-1]&&r-s>=e&&n.push([s,r-1]),n}(C,c);t.length?o&&(x.indices=t):x.isMatch=!1}return x}(t,e,n,{location:i+g,distance:r,threshold:u,findAllMatches:c,minMatchCharLength:o,includeMatches:s,ignoreLocation:h});f&&(d=!0),l+=p,f&&C&&(a=[...a,...C])});let g={isMatch:d,score:d?l/this.chunks.length:1};return d&&s&&(g.indices=a),g}}class B{constructor(t){this.pattern=t}static isMultiMatch(t){return x(t,this.multiRegex)}static isSingleMatch(t){return x(t,this.singleRegex)}search(){}}function x(t,e){const n=t.match(e);return n?n[1]:null}class L extends B{constructor(t,{location:e=A.location,threshold:n=A.threshold,distance:s=A.distance,includeMatches:i=A.includeMatches,findAllMatches:r=A.findAllMatches,minMatchCharLength:u=A.minMatchCharLength,isCaseSensitive:c=A.isCaseSensitive,ignoreDiacritics:o=A.ignoreDiacritics,ignoreLocation:h=A.ignoreLocation}={}){super(t),this._bitapSearch=new y(t,{location:e,threshold:n,distance:s,includeMatches:i,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:c,ignoreDiacritics:o,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class k extends B{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const s=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,s.push([e,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}}const _=[class extends B{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},k,class extends B{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends B{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},L],v=_.length,S=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,w=new Set([L.type,k.type]);const I=[];function $(t,e){for(let n=0,s=I.length;n<s;n+=1){let s=I[n];if(s.condition(t,e))return new s(t,e)}return new y(t,e)}const b="$and",N="$path",R=t=>!(!t[b]&&!t.$or),O=t=>({[b]:Object.keys(t).map(e=>({[e]:t[e]}))});function j(t,e,{auto:n=!0}={}){const r=t=>{let c=Object.keys(t);const o=(t=>!!t[N])(t);if(!o&&c.length>1&&!R(t))return r(O(t));if((t=>!s(t)&&u(t)&&!R(t))(t)){const s=o?t[N]:c[0],r=o?t.$val:t[s];if(!i(r))throw new Error((t=>`Invalid value for key ${t}`)(s));const u={keyId:f(s),pattern:r};return n&&(u.searcher=$(r,e)),u}let h={children:[],operator:c[0]};return c.forEach(e=>{const n=t[e];s(n)&&n.forEach(t=>{h.children.push(r(t))})}),h};return R(t)||(t=O(t)),r(t)}function W(t,e){const n=t.matches;e.matches=[],c(n)&&n.forEach(t=>{if(!c(t.indices)||!t.indices.length)return;const{indices:n,value:s}=t;let i={indices:n,value:s};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)})}function z(t,e){e.score=t.score}class K{constructor(t,e={},n){this.options={...A,...e},this.options.useExtendedSearch,this._keyStore=new l(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof C))throw new Error("Incorrect 'index' type");this._myIndex=e||m(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){c(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let n=0,s=this._docs.length;n<s;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,s-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:n,includeScore:s,shouldSort:u,sortFn:c,ignoreFieldNorm:o}=this.options;let h=i(t)?i(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=A.ignoreFieldNorm}){t.forEach(t=>{let n=1;t.matches.forEach(({key:t,norm:s,score:i})=>{const r=t?t.weight:null;n*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(e?1:s))}),t.score=n})}(h,{ignoreFieldNorm:o}),u&&h.sort(c),r(e)&&e>-1&&(h=h.slice(0,e)),function(t,e,{includeMatches:n=A.includeMatches,includeScore:s=A.includeScore}={}){const i=[];return n&&i.push(W),s&&i.push(z),t.map(t=>{const{idx:n}=t,s={item:e[n],refIndex:n};return i.length&&i.forEach(e=>{e(t,s)}),s})}(h,this._docs,{includeMatches:n,includeScore:s})}_searchStringList(t){const e=$(t,this.options),{records:n}=this._myIndex,s=[];return n.forEach(({v:t,i:n,n:i})=>{if(!c(t))return;const{isMatch:r,score:u,indices:o}=e.searchIn(t);r&&s.push({item:t,idx:n,matches:[{score:u,value:t,norm:i,indices:o}]})}),s}_searchLogical(t){const e=j(t,this.options),n=(t,e,s)=>{if(!t.children){const{keyId:n,searcher:i}=t,r=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return r&&r.length?[{idx:s,item:e,matches:r}]:[]}const i=[];for(let r=0,u=t.children.length;r<u;r+=1){const u=t.children[r],c=n(u,e,s);if(c.length)i.push(...c);else if(t.operator===b)return[]}return i},s=this._myIndex.records,i={},r=[];return s.forEach(({$:t,i:s})=>{if(c(t)){let u=n(e,t,s);u.length&&(i[s]||(i[s]={idx:s,item:t,matches:[]},r.push(i[s])),u.forEach(({matches:t})=>{i[s].matches.push(...t)}))}}),r}_searchObjectList(t){const e=$(t,this.options),{keys:n,records:s}=this._myIndex,i=[];return s.forEach(({$:t,i:s})=>{if(!c(t))return;let r=[];n.forEach((n,s)=>{r.push(...this._findMatches({key:n,value:t[s],searcher:e}))}),r.length&&i.push({idx:s,item:t,matches:r})}),i}_findMatches({key:t,value:e,searcher:n}){if(!c(e))return[];let i=[];if(s(e))e.forEach(({v:e,i:s,n:r})=>{if(!c(e))return;const{isMatch:u,score:o,indices:h}=n.searchIn(e);u&&i.push({score:o,key:t,value:e,idx:s,norm:r,indices:h})});else{const{v:s,n:r}=e,{isMatch:u,score:c,indices:o}=n.searchIn(s);u&&i.push({score:c,key:t,value:s,norm:r,indices:o})}return i}}K.version="7.1.0",K.createIndex=m,K.parseIndex=function(t,{getFn:e=A.getFn,fieldNormWeight:n=A.fieldNormWeight}={}){const{keys:s,records:i}=t,r=new C({getFn:e,fieldNormWeight:n});return r.setKeys(s),r.setIndexRecords(i),r},K.config=A,K.parseQuery=j,function(...t){I.push(...t)}(class{constructor(t,{isCaseSensitive:e=A.isCaseSensitive,ignoreDiacritics:n=A.ignoreDiacritics,includeMatches:s=A.includeMatches,minMatchCharLength:i=A.minMatchCharLength,ignoreLocation:r=A.ignoreLocation,findAllMatches:u=A.findAllMatches,location:c=A.location,threshold:o=A.threshold,distance:h=A.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:n,includeMatches:s,minMatchCharLength:i,findAllMatches:u,ignoreLocation:r,location:c,threshold:o,distance:h},t=e?t:t.toLowerCase(),t=n?D(t):t,this.pattern=t,this.query=function(t,e={}){return t.split("|").map(t=>{let n=t.trim().split(S).filter(t=>t&&!!t.trim()),s=[];for(let t=0,i=n.length;t<i;t+=1){const i=n[t];let r=!1,u=-1;for(;!r&&++u<v;){const t=_[u];let n=t.isMultiMatch(i);n&&(s.push(new t(n,e)),r=!0)}if(!r)for(u=-1;++u<v;){const t=_[u];let n=t.isSingleMatch(i);if(n){s.push(new t(n,e));break}}}return s})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:s,ignoreDiacritics:i}=this.options;t=s?t:t.toLowerCase(),t=i?D(t):t;let r=0,u=[],c=0;for(let s=0,i=e.length;s<i;s+=1){const i=e[s];u.length=0,r=0;for(let e=0,s=i.length;e<s;e+=1){const s=i[e],{isMatch:o,indices:h,score:a}=s.search(t);if(!o){c=0,r=0,u.length=0;break}if(r+=1,c+=a,n){const t=s.constructor.type;w.has(t)?u=[...u,...h]:u.push(h)}}if(r){let t={isMatch:!0,score:c/r};return n&&(t.indices=u),t}}return{isMatch:!1,score:1}}})}}]);